Index: imaps-frontend/node_modules/jspdf/LICENSE
===================================================================
--- imaps-frontend/node_modules/jspdf/LICENSE	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/LICENSE	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,22 @@
+Copyright
+(c) 2010-2021 James Hall, https://github.com/MrRio/jsPDF
+(c) 2015-2021 yWorks GmbH, https://www.yworks.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index: imaps-frontend/node_modules/jspdf/README.md
===================================================================
--- imaps-frontend/node_modules/jspdf/README.md	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/README.md	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,286 @@
+# ![jsPDF](https://parall.ax/parallax-2016/img/svg/jspdf-logo.svg)
+
+[![Continous Integration](https://github.com/MrRio/jsPDF/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/MrRio/jsPDF/actions/workflows/continuous-integration.yml?query=branch%3Amaster)
+[![Code Climate](https://codeclimate.com/repos/57f943855cdc43705e00592f/badges/2665cddeba042dc5191f/gpa.svg)](https://codeclimate.com/repos/57f943855cdc43705e00592f/feed)
+[![Test Coverage](https://codeclimate.com/repos/57f943855cdc43705e00592f/badges/2665cddeba042dc5191f/coverage.svg)](https://codeclimate.com/repos/57f943855cdc43705e00592f/coverage)
+[![GitHub license](https://img.shields.io/github/license/MrRio/jsPDF.svg)](https://github.com/MrRio/jsPDF/blob/master/LICENSE)
+[![Total alerts](https://img.shields.io/lgtm/alerts/g/MrRio/jsPDF.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/MrRio/jsPDF/alerts/)
+[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/MrRio/jsPDF.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/MrRio/jsPDF/context:javascript)
+[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/from-referrer/)
+
+**A library to generate PDFs in JavaScript.**
+
+You can [catch me on twitter](http://twitter.com/MrRio): [@MrRio](http://twitter.com/MrRio) or head over to [my company's website](http://parall.ax) for consultancy.
+
+jsPDF is now co-maintained by [yWorks - the diagramming experts](https://www.yworks.com/).
+
+## [Live Demo](http://raw.githack.com/MrRio/jsPDF/master/) | [Documentation](http://raw.githack.com/MrRio/jsPDF/master/docs/)
+
+## Install
+
+Recommended: get jsPDF from npm:
+
+```sh
+npm install jspdf --save
+# or
+yarn add jspdf
+```
+
+Alternatively, load it from a CDN:
+
+```html
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.2/jspdf.umd.min.js"></script>
+```
+
+Or always get latest version via [unpkg](https://unpkg.com/browse/jspdf/)
+
+```html
+<script src="https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js"></script>
+```
+
+The `dist` folder of this package contains different kinds of files:
+
+- **jspdf.es.\*.js**: Modern ES2015 module format.
+- **jspdf.node.\*.js**: For running in Node. Uses file operations for loading/saving files instead of browser APIs.
+- **jspdf.umd.\*.js**: UMD module format. For AMD or script-tag loading.
+- **polyfills\*.js**: Required polyfills for older browsers like Internet Explorer. The es variant simply imports all
+  required polyfills from `core-js`, the umd variant is self-contained.
+
+Usually it is not necessary to specify the exact file in the import statement. Build tools or Node automatically figure
+out the right file, so importing "jspdf" is enough.
+
+## Usage
+
+Then you're ready to start making your document:
+
+```javascript
+import { jsPDF } from "jspdf";
+
+// Default export is a4 paper, portrait, using millimeters for units
+const doc = new jsPDF();
+
+doc.text("Hello world!", 10, 10);
+doc.save("a4.pdf");
+```
+
+If you want to change the paper size, orientation, or units, you can do:
+
+```javascript
+// Landscape export, 2×4 inches
+const doc = new jsPDF({
+  orientation: "landscape",
+  unit: "in",
+  format: [4, 2]
+});
+
+doc.text("Hello world!", 1, 1);
+doc.save("two-by-four.pdf");
+```
+
+### Running in Node.js
+
+```javascript
+const { jsPDF } = require("jspdf"); // will automatically load the node version
+
+const doc = new jsPDF();
+doc.text("Hello world!", 10, 10);
+doc.save("a4.pdf"); // will save the file in the current working directory
+```
+
+### Other Module Formats
+
+<details>
+  <summary>
+    <b>AMD</b>
+  </summary>
+
+```js
+require(["jspdf"], ({ jsPDF }) => {
+  const doc = new jsPDF();
+  doc.text("Hello world!", 10, 10);
+  doc.save("a4.pdf");
+});
+```
+
+</details>
+
+<details>
+  <summary>
+    <b>Globals</b>
+  </summary>
+
+```js
+const { jsPDF } = window.jspdf;
+
+const doc = new jsPDF();
+doc.text("Hello world!", 10, 10);
+doc.save("a4.pdf");
+```
+
+</details>
+
+### Optional dependencies
+
+Some functions of jsPDF require optional dependencies. E.g. the `html` method, which depends on `html2canvas` and,
+when supplied with a string HTML document, `dompurify`. JsPDF loads them dynamically when required
+(using the respective module format, e.g. dynamic imports). Build tools like Webpack will automatically create separate
+chunks for each of the optional dependencies. If your application does not use any of the optional dependencies, you
+can prevent Webpack from generating the chunks by defining them as external dependencies:
+
+```js
+// webpack.config.js
+module.exports = {
+  // ...
+  externals: {
+    // only define the dependencies you are NOT using as externals!
+    canvg: "canvg",
+    html2canvas: "html2canvas",
+    dompurify: "dompurify"
+  }
+};
+```
+
+In **Vue CLI** projects, externals can be defined via the [configureWebpack](https://cli.vuejs.org/config/#configurewebpack)
+or [chainWebpack](https://cli.vuejs.org/config/#chainwebpack) properties of the `vue.config.js` file
+(needs to be created, first, in fresh projects).
+
+In **Angular** projects, externals can be defined using
+[custom webpack builders](https://github.com/just-jeb/angular-builders/tree/master/packages/custom-webpack).
+
+In **React** (`create-react-app`) projects, externals can be defined by either using
+[react-app-rewired](https://github.com/timarney/react-app-rewired) or ejecting.
+
+### TypeScript/Angular/Webpack/React/etc. Configuration:
+
+jsPDF can be imported just like any other 3rd party library. This works with all major toolkits and frameworks. jsPDF
+also offers a typings file for TypeScript projects.
+
+```js
+import { jsPDF } from "jspdf";
+```
+
+You can add jsPDF to your meteor-project as follows:
+
+```
+meteor add jspdf:core
+```
+
+### Polyfills
+
+jsPDF requires modern browser APIs in order to function. To use jsPDF in older browsers like Internet Explorer,
+polyfills are required. You can load all required polyfills as follows:
+
+```js
+import "jspdf/dist/polyfills.es.js";
+```
+
+Alternatively, you can load the prebundled polyfill file. This is not recommended, since you might end up
+loading polyfills multiple times. Might still be nifty for small applications or quick POCs.
+
+```html
+<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.2/polyfills.umd.js"></script>
+```
+
+## Use of Unicode Characters / UTF-8:
+
+The 14 standard fonts in PDF are limited to the ASCII-codepage. If you want to use UTF-8 you have to integrate a
+custom font, which provides the needed glyphs. jsPDF supports .ttf-files. So if you want to have for example
+Chinese text in your pdf, your font has to have the necessary Chinese glyphs. So, check if your font supports
+the wanted glyphs or else it will show garbled characters instead of the right text.
+
+To add the font to jsPDF use our fontconverter in
+[/fontconverter/fontconverter.html](https://rawgit.com/MrRio/jsPDF/master/fontconverter/fontconverter.html).
+The fontconverter will create a js-file with the content of the provided ttf-file as base64 encoded string
+and additional code for jsPDF. You just have to add this generated js-File to your project.
+You are then ready to go to use setFont-method in your code and write your UTF-8 encoded text.
+
+Alternatively you can just load the content of the \*.ttf file as a binary string using `fetch` or `XMLHttpRequest` and
+add the font to the PDF file:
+
+```js
+const doc = new jsPDF();
+
+const myFont = ... // load the *.ttf font file as binary string
+
+// add the font to jsPDF
+doc.addFileToVFS("MyFont.ttf", myFont);
+doc.addFont("MyFont.ttf", "MyFont", "normal");
+doc.setFont("MyFont");
+```
+
+## Advanced Functionality
+
+Since the merge with the [yWorks fork](https://github.com/yWorks/jsPDF) there are a lot of new features. However, some
+of them are API breaking, which is why there is an API-switch between two API modes:
+
+- In "compat" API mode, jsPDF has the same API as MrRio's original version, which means full compatibility with plugins.
+  However, some advanced features like transformation matrices and patterns won't work. This is the default mode.
+- In "advanced" API mode, jsPDF has the API you're used from the yWorks-fork version. This means the availability of
+  all advanced features like patterns, FormObjects, and transformation matrices.
+
+You can switch between the two modes by calling
+
+```javascript
+doc.advancedAPI(doc => {
+  // your code
+});
+// or
+doc.compatAPI(doc => {
+  // your code
+});
+```
+
+JsPDF will automatically switch back to the original API mode after the callback has run.
+
+## Support
+
+Please check if your question is already handled at Stackoverflow <https://stackoverflow.com/questions/tagged/jspdf>.
+Feel free to ask a question there with the tag `jspdf`.
+
+Feature requests, bug reports, etc. are very welcome as issues. Note that bug reports should follow these guidelines:
+
+- A bug should be reported as an [mcve](https://stackoverflow.com/help/mcve)
+- Make sure code is properly indented and [formatted](https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code) (Use ``` around code blocks)
+- Provide a runnable example.
+- Try to make sure and show in your issue that the issue is actually related to jspdf and not your framework of choice.
+
+## Contributing
+
+jsPDF cannot live without help from the community! If you think a feature is missing or you found a bug, please consider
+if you can spare one or two hours and prepare a pull request. If you're simply interested in this project and want to
+help, have a look at the open issues, especially those labeled with "bug".
+
+You can find information about building and testing jsPDF in the
+[contribution guide](https://github.com/MrRio/jsPDF/blob/master/CONTRIBUTING.md#pull-requests)
+
+## Credits
+
+- Big thanks to Daniel Dotsenko from [Willow Systems Corporation](https://github.com/willowsystems) for making huge contributions to the codebase.
+- Thanks to Ajaxian.com for [featuring us back in 2009](http://web.archive.org/web/20111011192314/http://ajaxian.com/archives/dynamically-generic-pdfs-with-javascript). (Internet Archive Wayback Machine reference)
+- Our special thanks to GH Lee ([sphilee](https://github.com/sphilee)) for programming the ttf-file-support and providing a large and long sought after feature
+- Everyone else that's contributed patches or bug reports. You rock.
+
+## License (MIT)
+
+Copyright
+(c) 2010-2021 James Hall, https://github.com/MrRio/jsPDF
+(c) 2015-2021 yWorks GmbH, https://www.yworks.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.es.js
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.es.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.es.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,27908 @@
+/** @license
+ *
+ * jsPDF - PDF Document creation from JavaScript
+ * Version 2.5.2 Built on 2024-09-17T13:29:57.859Z
+ *                      CommitID 00000000
+ *
+ * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
+ *               2015-2021 yWorks GmbH, http://www.yworks.com
+ *               2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
+ *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
+ *               2010 Aaron Spike, https://github.com/acspike
+ *               2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2012 Pablo Hess, https://github.com/pablohess
+ *               2012 Florian Jenett, https://github.com/fjenett
+ *               2013 Warren Weckesser, https://github.com/warrenweckesser
+ *               2013 Youssef Beddad, https://github.com/lifof
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2013 Stefan Slonevskiy, https://github.com/stefslon
+ *               2013 Jeremy Morel, https://github.com/jmorel
+ *               2013 Christoph Hartmann, https://github.com/chris-rock
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Makes, https://github.com/dollaruw
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 Steven Spungin, https://github.com/Flamenco
+ *               2014 Kenneth Glassey, https://github.com/Gavvers
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Contributor(s):
+ *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
+ *    kim3er, mfo, alnorth, Flamenco
+ */
+
+import _typeof from '@babel/runtime/helpers/typeof';
+import { zlibSync, unzlibSync } from 'fflate';
+
+var globalObject = function () {
+  return "undefined" !== typeof window ? window : "undefined" !== typeof global ? global : "undefined" !== typeof self ? self : this;
+}();
+
+function consoleLog() {
+  if (globalObject.console && typeof globalObject.console.log === "function") {
+    globalObject.console.log.apply(globalObject.console, arguments);
+  }
+}
+
+function consoleWarn(str) {
+  if (globalObject.console) {
+    if (typeof globalObject.console.warn === "function") {
+      globalObject.console.warn.apply(globalObject.console, arguments);
+    } else {
+      consoleLog.call(null, arguments);
+    }
+  }
+}
+
+function consoleError(str) {
+  if (globalObject.console) {
+    if (typeof globalObject.console.error === "function") {
+      globalObject.console.error.apply(globalObject.console, arguments);
+    } else {
+      consoleLog(str);
+    }
+  }
+}
+
+var console = {
+  log: consoleLog,
+  warn: consoleWarn,
+  error: consoleError
+};
+
+function bom(blob, opts) {
+  if (typeof opts === "undefined") opts = {
+    autoBom: false
+  };else if (_typeof(opts) !== "object") {
+    console.warn("Deprecated: Expected third argument to be a object");
+    opts = {
+      autoBom: !opts
+    };
+  } // prepend BOM for UTF-8 XML and text/* types (including HTML)
+  // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF
+
+  if (opts.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
+    return new Blob([String.fromCharCode(0xfeff), blob], {
+      type: blob.type
+    });
+  }
+
+  return blob;
+}
+
+function download(url, name, opts) {
+  var xhr = new XMLHttpRequest();
+  xhr.open("GET", url);
+  xhr.responseType = "blob";
+
+  xhr.onload = function () {
+    saveAs(xhr.response, name, opts);
+  };
+
+  xhr.onerror = function () {
+    console.error("could not download file");
+  };
+
+  xhr.send();
+}
+
+function corsEnabled(url) {
+  var xhr = new XMLHttpRequest(); // use sync to avoid popup blocker
+
+  xhr.open("HEAD", url, false);
+
+  try {
+    xhr.send();
+  } catch (e) {}
+
+  return xhr.status >= 200 && xhr.status <= 299;
+} // `a.click()` doesn't work for all browsers (#465)
+
+
+function click(node) {
+  try {
+    node.dispatchEvent(new MouseEvent("click"));
+  } catch (e) {
+    var evt = document.createEvent("MouseEvents");
+    evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
+    node.dispatchEvent(evt);
+  }
+}
+
+var saveAs = globalObject.saveAs || ( // probably in some web worker
+(typeof window === "undefined" ? "undefined" : _typeof(window)) !== "object" || window !== globalObject ? function saveAs() {
+  /* noop */
+} : // Use download attribute first if possible (#193 Lumia mobile) unless this is a native app
+typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype ? function saveAs(blob, name, opts) {
+  var URL = globalObject.URL || globalObject.webkitURL;
+  var a = document.createElement("a");
+  name = name || blob.name || "download";
+  a.download = name;
+  a.rel = "noopener"; // tabnabbing
+  // TODO: detect chrome extensions & packaged apps
+  // a.target = '_blank'
+
+  if (typeof blob === "string") {
+    // Support regular links
+    a.href = blob;
+
+    if (a.origin !== location.origin) {
+      corsEnabled(a.href) ? download(blob, name, opts) : click(a, a.target = "_blank");
+    } else {
+      click(a);
+    }
+  } else {
+    // Support blobs
+    a.href = URL.createObjectURL(blob);
+    setTimeout(function () {
+      URL.revokeObjectURL(a.href);
+    }, 4e4); // 40s
+
+    setTimeout(function () {
+      click(a);
+    }, 0);
+  }
+} : // Use msSaveOrOpenBlob as a second approach
+"msSaveOrOpenBlob" in navigator ? function saveAs(blob, name, opts) {
+  name = name || blob.name || "download";
+
+  if (typeof blob === "string") {
+    if (corsEnabled(blob)) {
+      download(blob, name, opts);
+    } else {
+      var a = document.createElement("a");
+      a.href = blob;
+      a.target = "_blank";
+      setTimeout(function () {
+        click(a);
+      });
+    }
+  } else {
+    navigator.msSaveOrOpenBlob(bom(blob, opts), name);
+  }
+} : // Fallback to using FileReader and a popup
+function saveAs(blob, name, opts, popup) {
+  // Open a popup immediately do go around popup blocker
+  // Mostly only available on user interaction and the fileReader is async so...
+  popup = popup || open("", "_blank");
+
+  if (popup) {
+    popup.document.title = popup.document.body.innerText = "downloading...";
+  }
+
+  if (typeof blob === "string") return download(blob, name, opts);
+  var force = blob.type === "application/octet-stream";
+
+  var isSafari = /constructor/i.test(globalObject.HTMLElement) || globalObject.safari;
+
+  var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
+
+  if ((isChromeIOS || force && isSafari) && (typeof FileReader === "undefined" ? "undefined" : _typeof(FileReader)) === "object") {
+    // Safari doesn't allow downloading of blob URLs
+    var reader = new FileReader();
+
+    reader.onloadend = function () {
+      var url = reader.result;
+      url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, "data:attachment/file;");
+      if (popup) popup.location.href = url;else location = url;
+      popup = null; // reverse-tabnabbing #460
+    };
+
+    reader.readAsDataURL(blob);
+  } else {
+    var URL = globalObject.URL || globalObject.webkitURL;
+    var url = URL.createObjectURL(blob);
+    if (popup) popup.location = url;else location.href = url;
+    popup = null; // reverse-tabnabbing #460
+
+    setTimeout(function () {
+      URL.revokeObjectURL(url);
+    }, 4e4); // 40s
+  }
+});
+
+/**
+ * A class to parse color values
+ * @author Stoyan Stefanov <sstoo@gmail.com>
+ * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
+ * @license Use it if you like it
+ */
+function RGBColor(color_string) {
+  color_string = color_string || "";
+  this.ok = false; // strip any leading #
+
+  if (color_string.charAt(0) == "#") {
+    // remove # if any
+    color_string = color_string.substr(1, 6);
+  }
+
+  color_string = color_string.replace(/ /g, "");
+  color_string = color_string.toLowerCase();
+  var channels; // before getting into regexps, try simple matches
+  // and overwrite the input
+
+  var simple_colors = {
+    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"
+  };
+  color_string = simple_colors[color_string] || color_string; // array of color definition objects
+
+  var color_defs = [{
+    re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
+    example: ["rgb(123, 234, 45)", "rgb(255,234,245)"],
+    process: function process(bits) {
+      return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];
+    }
+  }, {
+    re: /^(\w{2})(\w{2})(\w{2})$/,
+    example: ["#00ff00", "336699"],
+    process: function process(bits) {
+      return [parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16)];
+    }
+  }, {
+    re: /^(\w{1})(\w{1})(\w{1})$/,
+    example: ["#fb0", "f0f"],
+    process: function process(bits) {
+      return [parseInt(bits[1] + bits[1], 16), parseInt(bits[2] + bits[2], 16), parseInt(bits[3] + bits[3], 16)];
+    }
+  }]; // search through the definitions to find a match
+
+  for (var i = 0; i < color_defs.length; i++) {
+    var re = color_defs[i].re;
+    var processor = color_defs[i].process;
+    var bits = re.exec(color_string);
+
+    if (bits) {
+      channels = processor(bits);
+      this.r = channels[0];
+      this.g = channels[1];
+      this.b = channels[2];
+      this.ok = true;
+    }
+  } // validate/cleanup values
+
+
+  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; // some getters
+
+  this.toRGB = function () {
+    return "rgb(" + this.r + ", " + this.g + ", " + this.b + ")";
+  };
+
+  this.toHex = function () {
+    var r = this.r.toString(16);
+    var g = this.g.toString(16);
+    var b = this.b.toString(16);
+    if (r.length == 1) r = "0" + r;
+    if (g.length == 1) g = "0" + g;
+    if (b.length == 1) b = "0" + b;
+    return "#" + r + g + b;
+  };
+}
+
+var atob, btoa;
+
+(function () {
+  atob = globalObject.atob.bind(globalObject);
+  btoa = globalObject.btoa.bind(globalObject);
+  return;
+})();
+
+/**
+ * @license
+ * Joseph Myers does not specify a particular license for his work.
+ *
+ * Author: Joseph Myers
+ * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
+ *
+ * Modified by: Owen Leong
+ */
+function md5cycle(x, k) {
+  var a = x[0],
+      b = x[1],
+      c = x[2],
+      d = x[3];
+  a = ff(a, b, c, d, k[0], 7, -680876936);
+  d = ff(d, a, b, c, k[1], 12, -389564586);
+  c = ff(c, d, a, b, k[2], 17, 606105819);
+  b = ff(b, c, d, a, k[3], 22, -1044525330);
+  a = ff(a, b, c, d, k[4], 7, -176418897);
+  d = ff(d, a, b, c, k[5], 12, 1200080426);
+  c = ff(c, d, a, b, k[6], 17, -1473231341);
+  b = ff(b, c, d, a, k[7], 22, -45705983);
+  a = ff(a, b, c, d, k[8], 7, 1770035416);
+  d = ff(d, a, b, c, k[9], 12, -1958414417);
+  c = ff(c, d, a, b, k[10], 17, -42063);
+  b = ff(b, c, d, a, k[11], 22, -1990404162);
+  a = ff(a, b, c, d, k[12], 7, 1804603682);
+  d = ff(d, a, b, c, k[13], 12, -40341101);
+  c = ff(c, d, a, b, k[14], 17, -1502002290);
+  b = ff(b, c, d, a, k[15], 22, 1236535329);
+  a = gg(a, b, c, d, k[1], 5, -165796510);
+  d = gg(d, a, b, c, k[6], 9, -1069501632);
+  c = gg(c, d, a, b, k[11], 14, 643717713);
+  b = gg(b, c, d, a, k[0], 20, -373897302);
+  a = gg(a, b, c, d, k[5], 5, -701558691);
+  d = gg(d, a, b, c, k[10], 9, 38016083);
+  c = gg(c, d, a, b, k[15], 14, -660478335);
+  b = gg(b, c, d, a, k[4], 20, -405537848);
+  a = gg(a, b, c, d, k[9], 5, 568446438);
+  d = gg(d, a, b, c, k[14], 9, -1019803690);
+  c = gg(c, d, a, b, k[3], 14, -187363961);
+  b = gg(b, c, d, a, k[8], 20, 1163531501);
+  a = gg(a, b, c, d, k[13], 5, -1444681467);
+  d = gg(d, a, b, c, k[2], 9, -51403784);
+  c = gg(c, d, a, b, k[7], 14, 1735328473);
+  b = gg(b, c, d, a, k[12], 20, -1926607734);
+  a = hh(a, b, c, d, k[5], 4, -378558);
+  d = hh(d, a, b, c, k[8], 11, -2022574463);
+  c = hh(c, d, a, b, k[11], 16, 1839030562);
+  b = hh(b, c, d, a, k[14], 23, -35309556);
+  a = hh(a, b, c, d, k[1], 4, -1530992060);
+  d = hh(d, a, b, c, k[4], 11, 1272893353);
+  c = hh(c, d, a, b, k[7], 16, -155497632);
+  b = hh(b, c, d, a, k[10], 23, -1094730640);
+  a = hh(a, b, c, d, k[13], 4, 681279174);
+  d = hh(d, a, b, c, k[0], 11, -358537222);
+  c = hh(c, d, a, b, k[3], 16, -722521979);
+  b = hh(b, c, d, a, k[6], 23, 76029189);
+  a = hh(a, b, c, d, k[9], 4, -640364487);
+  d = hh(d, a, b, c, k[12], 11, -421815835);
+  c = hh(c, d, a, b, k[15], 16, 530742520);
+  b = hh(b, c, d, a, k[2], 23, -995338651);
+  a = ii(a, b, c, d, k[0], 6, -198630844);
+  d = ii(d, a, b, c, k[7], 10, 1126891415);
+  c = ii(c, d, a, b, k[14], 15, -1416354905);
+  b = ii(b, c, d, a, k[5], 21, -57434055);
+  a = ii(a, b, c, d, k[12], 6, 1700485571);
+  d = ii(d, a, b, c, k[3], 10, -1894986606);
+  c = ii(c, d, a, b, k[10], 15, -1051523);
+  b = ii(b, c, d, a, k[1], 21, -2054922799);
+  a = ii(a, b, c, d, k[8], 6, 1873313359);
+  d = ii(d, a, b, c, k[15], 10, -30611744);
+  c = ii(c, d, a, b, k[6], 15, -1560198380);
+  b = ii(b, c, d, a, k[13], 21, 1309151649);
+  a = ii(a, b, c, d, k[4], 6, -145523070);
+  d = ii(d, a, b, c, k[11], 10, -1120210379);
+  c = ii(c, d, a, b, k[2], 15, 718787259);
+  b = ii(b, c, d, a, k[9], 21, -343485551);
+  x[0] = add32(a, x[0]);
+  x[1] = add32(b, x[1]);
+  x[2] = add32(c, x[2]);
+  x[3] = add32(d, x[3]);
+}
+
+function cmn(q, a, b, x, s, t) {
+  a = add32(add32(a, q), add32(x, t));
+  return add32(a << s | a >>> 32 - s, b);
+}
+
+function ff(a, b, c, d, x, s, t) {
+  return cmn(b & c | ~b & d, a, b, x, s, t);
+}
+
+function gg(a, b, c, d, x, s, t) {
+  return cmn(b & d | c & ~d, a, b, x, s, t);
+}
+
+function hh(a, b, c, d, x, s, t) {
+  return cmn(b ^ c ^ d, a, b, x, s, t);
+}
+
+function ii(a, b, c, d, x, s, t) {
+  return cmn(c ^ (b | ~d), a, b, x, s, t);
+}
+
+function md51(s) {
+  // txt = '';
+  var n = s.length,
+      state = [1732584193, -271733879, -1732584194, 271733878],
+      i;
+
+  for (i = 64; i <= s.length; i += 64) {
+    md5cycle(state, md5blk(s.substring(i - 64, i)));
+  }
+
+  s = s.substring(i - 64);
+  var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+
+  for (i = 0; i < s.length; i++) {
+    tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);
+  }
+
+  tail[i >> 2] |= 0x80 << (i % 4 << 3);
+
+  if (i > 55) {
+    md5cycle(state, tail);
+
+    for (i = 0; i < 16; i++) {
+      tail[i] = 0;
+    }
+  }
+
+  tail[14] = n * 8;
+  md5cycle(state, tail);
+  return state;
+}
+/* there needs to be support for Unicode here,
+ * unless we pretend that we can redefine the MD-5
+ * algorithm for multi-byte characters (perhaps
+ * by adding every four 16-bit characters and
+ * shortening the sum to 32 bits). Otherwise
+ * I suggest performing MD-5 as if every character
+ * was two bytes--e.g., 0040 0025 = @%--but then
+ * how will an ordinary MD-5 sum be matched?
+ * There is no way to standardize text to something
+ * like UTF-8 before transformation; speed cost is
+ * utterly prohibitive. The JavaScript standard
+ * itself needs to look at this: it should start
+ * providing access to strings as preformed UTF-8
+ * 8-bit unsigned value arrays.
+ */
+
+
+function md5blk(s) {
+  /* I figured global was faster.   */
+  var md5blks = [],
+      i;
+  /* Andy King said do it this way. */
+
+  for (i = 0; i < 64; i += 4) {
+    md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
+  }
+
+  return md5blks;
+}
+
+var hex_chr = "0123456789abcdef".split("");
+
+function rhex(n) {
+  var s = "",
+      j = 0;
+
+  for (; j < 4; j++) {
+    s += hex_chr[n >> j * 8 + 4 & 0x0f] + hex_chr[n >> j * 8 & 0x0f];
+  }
+
+  return s;
+}
+
+function hex(x) {
+  for (var i = 0; i < x.length; i++) {
+    x[i] = rhex(x[i]);
+  }
+
+  return x.join("");
+} // Converts a 4-byte number to byte string
+
+
+function singleToByteString(n) {
+  return String.fromCharCode((n & 0xff) >> 0, (n & 0xff00) >> 8, (n & 0xff0000) >> 16, (n & 0xff000000) >> 24);
+} // Converts an array of numbers to a byte string
+
+
+function toByteString(x) {
+  return x.map(singleToByteString).join("");
+} // Returns the MD5 hash as a byte string
+
+
+function md5Bin(s) {
+  return toByteString(md51(s));
+} // Returns MD5 hash as a hex string
+
+
+function md5(s) {
+  return hex(md51(s));
+}
+
+var md5Check = md5("hello") != "5d41402abc4b2a76b9719d911017c592";
+
+function add32(a, b) {
+  if (md5Check) {
+    /* if the md5Check does not match
+     the expected value, we're dealing
+     with an old browser and need
+     this function. */
+    var lsw = (a & 0xffff) + (b & 0xffff),
+        msw = (a >> 16) + (b >> 16) + (lsw >> 16);
+    return msw << 16 | lsw & 0xffff;
+  } else {
+    /* this function is much faster,
+    so if possible we use it. Some IEs
+    are the only ones I know of that
+    need the idiotic second function,
+    generated by an if clause.  */
+    return a + b & 0xffffffff;
+  }
+}
+
+/**
+ * @license
+ * FPDF is released under a permissive license: there is no usage restriction.
+ * You may embed it freely in your application (commercial or not), with or
+ * without modifications.
+ *
+ * Reference: http://www.fpdf.org/en/script/script37.php
+ */
+function repeat(str, num) {
+  return new Array(num + 1).join(str);
+}
+/**
+ * Converts a byte string to a hex string
+ *
+ * @name rc4
+ * @function
+ * @param {string} key Byte string of encryption key
+ * @param {string} data Byte string of data to be encrypted
+ * @returns {string} Encrypted string
+ */
+
+
+function rc4(key, data) {
+  var lastKey, lastState;
+
+  if (key !== lastKey) {
+    var k = repeat(key, (256 / key.length >> 0) + 1);
+    var state = [];
+
+    for (var i = 0; i < 256; i++) {
+      state[i] = i;
+    }
+
+    var j = 0;
+
+    for (var i = 0; i < 256; i++) {
+      var t = state[i];
+      j = (j + t + k.charCodeAt(i)) % 256;
+      state[i] = state[j];
+      state[j] = t;
+    }
+
+    lastKey = key;
+    lastState = state;
+  } else {
+    state = lastState;
+  }
+
+  var length = data.length;
+  var a = 0;
+  var b = 0;
+  var out = "";
+
+  for (var i = 0; i < length; i++) {
+    a = (a + 1) % 256;
+    t = state[a];
+    b = (b + t) % 256;
+    state[a] = state[b];
+    state[b] = t;
+    k = state[(state[a] + state[b]) % 256];
+    out += String.fromCharCode(data.charCodeAt(i) ^ k);
+  }
+
+  return out;
+}
+
+/**
+ * @license
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ * Author: Owen Leong (@owenl131)
+ * Date: 15 Oct 2020
+ * References:
+ * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
+ * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
+ * http://www.fpdf.org/en/script/script37.php
+ */
+var permissionOptions = {
+  print: 4,
+  modify: 8,
+  copy: 16,
+  "annot-forms": 32
+};
+/**
+ * Initializes encryption settings
+ *
+ * @name constructor
+ * @function
+ * @param {Array} permissions Permissions allowed for user, "print", "modify", "copy" and "annot-forms".
+ * @param {String} userPassword Permissions apply to this user. Leaving this empty means the document
+ *                              is not password protected but viewer has the above permissions.
+ * @param {String} ownerPassword Owner has full functionalities to the file.
+ * @param {String} fileId As hex string, should be same as the file ID in the trailer.
+ * @example
+ * var security = new PDFSecurity(["print"])
+ */
+
+function PDFSecurity(permissions, userPassword, ownerPassword, fileId) {
+  this.v = 1; // algorithm 1, future work can add in more recent encryption schemes
+
+  this.r = 2; // revision 2
+  // set flags for what functionalities the user can access
+
+  var protection = 192;
+  permissions.forEach(function (perm) {
+    if (typeof permissionOptions.perm !== "undefined") {
+      throw new Error("Invalid permission: " + perm);
+    }
+
+    protection += permissionOptions[perm];
+  }); // padding is used to pad the passwords to 32 bytes, also is hashed and stored in the final PDF
+
+  this.padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08" + "\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A";
+  var paddedUserPassword = (userPassword + this.padding).substr(0, 32);
+  var paddedOwnerPassword = (ownerPassword + this.padding).substr(0, 32);
+  this.O = this.processOwnerPassword(paddedUserPassword, paddedOwnerPassword);
+  this.P = -((protection ^ 255) + 1);
+  this.encryptionKey = md5Bin(paddedUserPassword + this.O + this.lsbFirstWord(this.P) + this.hexToBytes(fileId)).substr(0, 5);
+  this.U = rc4(this.encryptionKey, this.padding);
+}
+/**
+ * Breaks down a 4-byte number into its individual bytes, with the least significant bit first
+ *
+ * @name lsbFirstWord
+ * @function
+ * @param {number} data 32-bit number
+ * @returns {Array}
+ */
+
+
+PDFSecurity.prototype.lsbFirstWord = function (data) {
+  return String.fromCharCode(data >> 0 & 0xff, data >> 8 & 0xff, data >> 16 & 0xff, data >> 24 & 0xff);
+};
+/**
+ * Converts a byte string to a hex string
+ *
+ * @name toHexString
+ * @function
+ * @param {String} byteString Byte string
+ * @returns {String}
+ */
+
+
+PDFSecurity.prototype.toHexString = function (byteString) {
+  return byteString.split("").map(function (byte) {
+    return ("0" + (byte.charCodeAt(0) & 0xff).toString(16)).slice(-2);
+  }).join("");
+};
+/**
+ * Converts a hex string to a byte string
+ *
+ * @name hexToBytes
+ * @function
+ * @param {String} hex Hex string
+ * @returns {String}
+ */
+
+
+PDFSecurity.prototype.hexToBytes = function (hex) {
+  for (var bytes = [], c = 0; c < hex.length; c += 2) {
+    bytes.push(String.fromCharCode(parseInt(hex.substr(c, 2), 16)));
+  }
+
+  return bytes.join("");
+};
+/**
+ * Computes the 'O' field in the encryption dictionary
+ *
+ * @name processOwnerPassword
+ * @function
+ * @param {String} paddedUserPassword Byte string of padded user password
+ * @param {String} paddedOwnerPassword Byte string of padded owner password
+ * @returns {String}
+ */
+
+
+PDFSecurity.prototype.processOwnerPassword = function (paddedUserPassword, paddedOwnerPassword) {
+  var key = md5Bin(paddedOwnerPassword).substr(0, 5);
+  return rc4(key, paddedUserPassword);
+};
+/**
+ * Returns an encryptor function which can take in a byte string and returns the encrypted version
+ *
+ * @name encryptor
+ * @function
+ * @param {number} objectId
+ * @param {number} generation Not sure what this is for, you can set it to 0
+ * @returns {Function}
+ * @example
+ * out("stream");
+ * encryptor = security.encryptor(object.id, 0);
+ * out(encryptor(data));
+ * out("endstream");
+ */
+
+
+PDFSecurity.prototype.encryptor = function (objectId, generation) {
+  var key = md5Bin(this.encryptionKey + String.fromCharCode(objectId & 0xff, objectId >> 8 & 0xff, objectId >> 16 & 0xff, generation & 0xff, generation >> 8 & 0xff)).substr(0, 10);
+  return function (data) {
+    return rc4(key, data);
+  };
+};
+
+/**
+ * Convert string to `PDF Name Object`.
+ * Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object
+ * @param str
+ */
+function toPDFName(str) {
+  // eslint-disable-next-line no-control-regex
+  if (/[^\u0000-\u00ff]/.test(str)) {
+    // non ascii string
+    throw new Error("Invalid PDF Name Object: " + str + ", Only accept ASCII characters.");
+  }
+
+  var result = "",
+      strLength = str.length;
+
+  for (var i = 0; i < strLength; i++) {
+    var charCode = str.charCodeAt(i);
+
+    if (charCode < 0x21 || charCode === 0x23
+    /* # */
+    || charCode === 0x25
+    /* % */
+    || charCode === 0x28
+    /* ( */
+    || charCode === 0x29
+    /* ) */
+    || charCode === 0x2f
+    /* / */
+    || charCode === 0x3c
+    /* < */
+    || charCode === 0x3e
+    /* > */
+    || charCode === 0x5b
+    /* [ */
+    || charCode === 0x5d
+    /* ] */
+    || charCode === 0x7b
+    /* { */
+    || charCode === 0x7d
+    /* } */
+    || charCode > 0x7e) {
+      // Char    CharCode    hexStr   paddingHexStr    Result
+      // "\t"    9           9        09               #09
+      // " "     32          20       20               #20
+      // "©"     169         a9       a9               #a9
+      var hexStr = charCode.toString(16),
+          paddingHexStr = ("0" + hexStr).slice(-2);
+      result += "#" + paddingHexStr;
+    } else {
+      // Other ASCII printable characters between 0x21 <= X <= 0x7e
+      result += str[i];
+    }
+  }
+
+  return result;
+}
+
+/**
+ * jsPDF's Internal PubSub Implementation.
+ * Backward compatible rewritten on 2014 by
+ * Diego Casorran, https://github.com/diegocr
+ *
+ * @class
+ * @name PubSub
+ * @ignore
+ */
+
+function PubSub(context) {
+  if (_typeof(context) !== "object") {
+    throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");
+  }
+
+  var topics = {};
+
+  this.subscribe = function (topic, callback, once) {
+    once = once || false;
+
+    if (typeof topic !== "string" || typeof callback !== "function" || typeof once !== "boolean") {
+      throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");
+    }
+
+    if (!topics.hasOwnProperty(topic)) {
+      topics[topic] = {};
+    }
+
+    var token = Math.random().toString(35);
+    topics[topic][token] = [callback, !!once];
+    return token;
+  };
+
+  this.unsubscribe = function (token) {
+    for (var topic in topics) {
+      if (topics[topic][token]) {
+        delete topics[topic][token];
+
+        if (Object.keys(topics[topic]).length === 0) {
+          delete topics[topic];
+        }
+
+        return true;
+      }
+    }
+
+    return false;
+  };
+
+  this.publish = function (topic) {
+    if (topics.hasOwnProperty(topic)) {
+      var args = Array.prototype.slice.call(arguments, 1),
+          tokens = [];
+
+      for (var token in topics[topic]) {
+        var sub = topics[topic][token];
+
+        try {
+          sub[0].apply(context, args);
+        } catch (ex) {
+          if (globalObject.console) {
+            console.error("jsPDF PubSub Error", ex.message, ex);
+          }
+        }
+
+        if (sub[1]) tokens.push(token);
+      }
+
+      if (tokens.length) tokens.forEach(this.unsubscribe);
+    }
+  };
+
+  this.getTopics = function () {
+    return topics;
+  };
+}
+
+function GState(parameters) {
+  if (!(this instanceof GState)) {
+    return new GState(parameters);
+  }
+  /**
+   * @name GState#opacity
+   * @type {any}
+   */
+
+  /**
+   * @name GState#stroke-opacity
+   * @type {any}
+   */
+
+
+  var supported = "opacity,stroke-opacity".split(",");
+
+  for (var p in parameters) {
+    if (parameters.hasOwnProperty(p) && supported.indexOf(p) >= 0) {
+      this[p] = parameters[p];
+    }
+  }
+  /**
+   * @name GState#id
+   * @type {string}
+   */
+
+
+  this.id = ""; // set by addGState()
+
+  /**
+   * @name GState#objectNumber
+   * @type {number}
+   */
+
+  this.objectNumber = -1; // will be set by putGState()
+}
+
+GState.prototype.equals = function equals(other) {
+  var ignore = "id,objectNumber,equals";
+  var p;
+  if (!other || _typeof(other) !== _typeof(this)) return false;
+  var count = 0;
+
+  for (p in this) {
+    if (ignore.indexOf(p) >= 0) continue;
+    if (this.hasOwnProperty(p) && !other.hasOwnProperty(p)) return false;
+    if (this[p] !== other[p]) return false;
+    count++;
+  }
+
+  for (p in other) {
+    if (other.hasOwnProperty(p) && ignore.indexOf(p) < 0) count--;
+  }
+
+  return count === 0;
+};
+
+function Pattern(gState, matrix) {
+  this.gState = gState;
+  this.matrix = matrix;
+  this.id = ""; // set by addPattern()
+
+  this.objectNumber = -1; // will be set by putPattern()
+}
+
+function ShadingPattern(type, coords, colors, gState, matrix) {
+  if (!(this instanceof ShadingPattern)) {
+    return new ShadingPattern(type, coords, colors, gState, matrix);
+  } // see putPattern() for information how they are realized
+
+
+  this.type = type === "axial" ? 2 : 3;
+  this.coords = coords;
+  this.colors = colors;
+  Pattern.call(this, gState, matrix);
+}
+
+function TilingPattern(boundingBox, xStep, yStep, gState, matrix) {
+  if (!(this instanceof TilingPattern)) {
+    return new TilingPattern(boundingBox, xStep, yStep, gState, matrix);
+  }
+
+  this.boundingBox = boundingBox;
+  this.xStep = xStep;
+  this.yStep = yStep;
+  this.stream = ""; // set by endTilingPattern();
+
+  this.cloneIndex = 0;
+  Pattern.call(this, gState, matrix);
+}
+/**
+ * Creates new jsPDF document object instance.
+ * @name jsPDF
+ * @class
+ * @param {Object} [options] - Collection of settings initializing the jsPDF-instance
+ * @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are "portrait" or "landscape" (or shortcuts "p" or "l").<br />
+ * @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />
+ * Possible values are "pt" (points), "mm", "cm", "in", "px", "pc", "em" or "ex". Note that in order to get the correct scaling for "px"
+ * units, you need to enable the hotfix "px_scaling" by setting options.hotfixes = ["px_scaling"].
+ * @param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />
+ * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
+ * @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.
+ * @param {boolean} [options.compress=false] Compress the generated PDF.
+ * @param {number} [options.precision=16] Precision of the element-positions.
+ * @param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.
+ * @param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.
+ * @param {Object} [options.encryption]
+ * @param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.
+ * @param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.
+ * @param {string[]} [options.encryption.userPermissions] Array of permissions "print", "modify", "copy", "annot-forms", accessible by the user.
+ * @param {number|"smart"} [options.floatPrecision=16]
+ * @returns {jsPDF} jsPDF-instance
+ * @description
+ * ```
+ * {
+ *  orientation: 'p',
+ *  unit: 'mm',
+ *  format: 'a4',
+ *  putOnlyUsedFonts:true,
+ *  floatPrecision: 16 // or "smart", default is 16
+ * }
+ * ```
+ *
+ * @constructor
+ */
+
+
+function jsPDF(options) {
+  var orientation = typeof arguments[0] === "string" ? arguments[0] : "p";
+  var unit = arguments[1];
+  var format = arguments[2];
+  var compressPdf = arguments[3];
+  var filters = [];
+  var userUnit = 1.0;
+  var precision;
+  var floatPrecision = 16;
+  var defaultPathOperation = "S";
+  var encryptionOptions = null;
+  options = options || {};
+
+  if (_typeof(options) === "object") {
+    orientation = options.orientation;
+    unit = options.unit || unit;
+    format = options.format || format;
+    compressPdf = options.compress || options.compressPdf || compressPdf;
+    encryptionOptions = options.encryption || null;
+
+    if (encryptionOptions !== null) {
+      encryptionOptions.userPassword = encryptionOptions.userPassword || "";
+      encryptionOptions.ownerPassword = encryptionOptions.ownerPassword || "";
+      encryptionOptions.userPermissions = encryptionOptions.userPermissions || [];
+    }
+
+    userUnit = typeof options.userUnit === "number" ? Math.abs(options.userUnit) : 1.0;
+
+    if (typeof options.precision !== "undefined") {
+      precision = options.precision;
+    }
+
+    if (typeof options.floatPrecision !== "undefined") {
+      floatPrecision = options.floatPrecision;
+    }
+
+    defaultPathOperation = options.defaultPathOperation || "S";
+  }
+
+  filters = options.filters || (compressPdf === true ? ["FlateEncode"] : filters);
+  unit = unit || "mm";
+  orientation = ("" + (orientation || "P")).toLowerCase();
+  var putOnlyUsedFonts = options.putOnlyUsedFonts || false;
+  var usedFonts = {};
+  var API = {
+    internal: {},
+    __private__: {}
+  };
+  API.__private__.PubSub = PubSub;
+  var pdfVersion = "1.3";
+
+  var getPdfVersion = API.__private__.getPdfVersion = function () {
+    return pdfVersion;
+  };
+
+  API.__private__.setPdfVersion = function (value) {
+    pdfVersion = value;
+  }; // Size in pt of various paper formats
+
+
+  var pageFormats = {
+    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]
+  };
+
+  API.__private__.getPageFormats = function () {
+    return pageFormats;
+  };
+
+  var getPageFormat = API.__private__.getPageFormat = function (value) {
+    return pageFormats[value];
+  };
+
+  format = format || "a4";
+  var ApiMode = {
+    COMPAT: "compat",
+    ADVANCED: "advanced"
+  };
+  var apiMode = ApiMode.COMPAT;
+
+  function advancedAPI() {
+    // prepend global change of basis matrix
+    // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix
+    // that does this job for us (however, texts, images and similar objects must be drawn bottom up))
+    this.saveGraphicsState();
+    out(new Matrix(scaleFactor, 0, 0, -scaleFactor, 0, getPageHeight() * scaleFactor).toString() + " cm");
+    this.setFontSize(this.getFontSize() / scaleFactor); // The default in MrRio's implementation is "S" (stroke), whereas the default in the yWorks implementation
+    // was "n" (none). Although this has nothing to do with transforms, we should use the API switch here.
+
+    defaultPathOperation = "n";
+    apiMode = ApiMode.ADVANCED;
+  }
+
+  function compatAPI() {
+    this.restoreGraphicsState();
+    defaultPathOperation = "S";
+    apiMode = ApiMode.COMPAT;
+  }
+  /**
+   * @function combineFontStyleAndFontWeight
+   * @param {string} fontStyle Fontstyle or variant. Example: "italic".
+   * @param {number | string} fontWeight Weight of the Font. Example: "normal" | 400
+   * @returns {string}
+   * @private
+   */
+
+
+  var combineFontStyleAndFontWeight = API.__private__.combineFontStyleAndFontWeight = function (fontStyle, fontWeight) {
+    if (fontStyle == "bold" && fontWeight == "normal" || fontStyle == "bold" && fontWeight == 400 || fontStyle == "normal" && fontWeight == "italic" || fontStyle == "bold" && fontWeight == "italic") {
+      throw new Error("Invalid Combination of fontweight and fontstyle");
+    }
+
+    if (fontWeight) {
+      fontStyle = fontWeight == 400 || fontWeight === "normal" ? fontStyle === "italic" ? "italic" : "normal" : (fontWeight == 700 || fontWeight === "bold") && fontStyle === "normal" ? "bold" : (fontWeight == 700 ? "bold" : fontWeight) + "" + fontStyle;
+    }
+
+    return fontStyle;
+  };
+  /**
+   * @callback ApiSwitchBody
+   * @param {jsPDF} pdf
+   */
+
+  /**
+   * For compatibility reasons jsPDF offers two API modes which differ in the way they convert between the the usual
+   * screen coordinates and the PDF coordinate system.
+   *   - "compat": Offers full compatibility across all plugins but does not allow arbitrary transforms
+   *   - "advanced": Allows arbitrary transforms and more advanced features like pattern fills. Some plugins might
+   *     not support this mode, though.
+   * Initial mode is "compat".
+   *
+   * You can either provide a callback to the body argument, which means that jsPDF will automatically switch back to
+   * the original API mode afterwards; or you can omit the callback and switch back manually using {@link compatAPI}.
+   *
+   * Note, that the calls to {@link saveGraphicsState} and {@link restoreGraphicsState} need to be balanced within the
+   * callback or between calls of this method and its counterpart {@link compatAPI}. Calls to {@link beginFormObject}
+   * or {@link beginTilingPattern} need to be closed by their counterparts before switching back to "compat" API mode.
+   *
+   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.
+   * The API mode will be switched back automatically afterwards.
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name advancedAPI
+   */
+
+
+  API.advancedAPI = function (body) {
+    var doSwitch = apiMode === ApiMode.COMPAT;
+
+    if (doSwitch) {
+      advancedAPI.call(this);
+    }
+
+    if (typeof body !== "function") {
+      return this;
+    }
+
+    body(this);
+
+    if (doSwitch) {
+      compatAPI.call(this);
+    }
+
+    return this;
+  };
+  /**
+   * Switches to "compat" API mode. See {@link advancedAPI} for more details.
+   *
+   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.
+   * The API mode will be switched back automatically afterwards.
+   * @return {jsPDF}
+   * @memberof jsPDF#
+   * @name compatApi
+   */
+
+
+  API.compatAPI = function (body) {
+    var doSwitch = apiMode === ApiMode.ADVANCED;
+
+    if (doSwitch) {
+      compatAPI.call(this);
+    }
+
+    if (typeof body !== "function") {
+      return this;
+    }
+
+    body(this);
+
+    if (doSwitch) {
+      advancedAPI.call(this);
+    }
+
+    return this;
+  };
+  /**
+   * @return {boolean} True iff the current API mode is "advanced". See {@link advancedAPI}.
+   * @memberof jsPDF#
+   * @name isAdvancedAPI
+   */
+
+
+  API.isAdvancedAPI = function () {
+    return apiMode === ApiMode.ADVANCED;
+  };
+
+  var advancedApiModeTrap = function advancedApiModeTrap(methodName) {
+    if (apiMode !== ApiMode.ADVANCED) {
+      throw new Error(methodName + " is only available in 'advanced' API mode. " + "You need to call advancedAPI() first.");
+    }
+  };
+
+  var roundToPrecision = API.roundToPrecision = API.__private__.roundToPrecision = function (number, parmPrecision) {
+    var tmpPrecision = precision || parmPrecision;
+
+    if (isNaN(number) || isNaN(tmpPrecision)) {
+      throw new Error("Invalid argument passed to jsPDF.roundToPrecision");
+    }
+
+    return number.toFixed(tmpPrecision).replace(/0+$/, "");
+  }; // high precision float
+
+
+  var hpf;
+
+  if (typeof floatPrecision === "number") {
+    hpf = API.hpf = API.__private__.hpf = function (number) {
+      if (isNaN(number)) {
+        throw new Error("Invalid argument passed to jsPDF.hpf");
+      }
+
+      return roundToPrecision(number, floatPrecision);
+    };
+  } else if (floatPrecision === "smart") {
+    hpf = API.hpf = API.__private__.hpf = function (number) {
+      if (isNaN(number)) {
+        throw new Error("Invalid argument passed to jsPDF.hpf");
+      }
+
+      if (number > -1 && number < 1) {
+        return roundToPrecision(number, 16);
+      } else {
+        return roundToPrecision(number, 5);
+      }
+    };
+  } else {
+    hpf = API.hpf = API.__private__.hpf = function (number) {
+      if (isNaN(number)) {
+        throw new Error("Invalid argument passed to jsPDF.hpf");
+      }
+
+      return roundToPrecision(number, 16);
+    };
+  }
+
+  var f2 = API.f2 = API.__private__.f2 = function (number) {
+    if (isNaN(number)) {
+      throw new Error("Invalid argument passed to jsPDF.f2");
+    }
+
+    return roundToPrecision(number, 2);
+  };
+
+  var f3 = API.__private__.f3 = function (number) {
+    if (isNaN(number)) {
+      throw new Error("Invalid argument passed to jsPDF.f3");
+    }
+
+    return roundToPrecision(number, 3);
+  };
+
+  var scale = API.scale = API.__private__.scale = function (number) {
+    if (isNaN(number)) {
+      throw new Error("Invalid argument passed to jsPDF.scale");
+    }
+
+    if (apiMode === ApiMode.COMPAT) {
+      return number * scaleFactor;
+    } else if (apiMode === ApiMode.ADVANCED) {
+      return number;
+    }
+  };
+
+  var transformY = function transformY(y) {
+    if (apiMode === ApiMode.COMPAT) {
+      return getPageHeight() - y;
+    } else if (apiMode === ApiMode.ADVANCED) {
+      return y;
+    }
+  };
+
+  var transformScaleY = function transformScaleY(y) {
+    return scale(transformY(y));
+  };
+  /**
+   * @name setPrecision
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {string} precision
+   * @returns {jsPDF}
+   */
+
+
+  API.__private__.setPrecision = API.setPrecision = function (value) {
+    if (typeof parseInt(value, 10) === "number") {
+      precision = parseInt(value, 10);
+    }
+  };
+
+  var fileId = "00000000000000000000000000000000";
+
+  var getFileId = API.__private__.getFileId = function () {
+    return fileId;
+  };
+
+  var setFileId = API.__private__.setFileId = function (value) {
+    if (typeof value !== "undefined" && /^[a-fA-F0-9]{32}$/.test(value)) {
+      fileId = value.toUpperCase();
+    } else {
+      fileId = fileId.split("").map(function () {
+        return "ABCDEF0123456789".charAt(Math.floor(Math.random() * 16));
+      }).join("");
+    }
+
+    if (encryptionOptions !== null) {
+      encryption = new PDFSecurity(encryptionOptions.userPermissions, encryptionOptions.userPassword, encryptionOptions.ownerPassword, fileId);
+    }
+
+    return fileId;
+  };
+  /**
+   * @name setFileId
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {string} value GUID.
+   * @returns {jsPDF}
+   */
+
+
+  API.setFileId = function (value) {
+    setFileId(value);
+    return this;
+  };
+  /**
+   * @name getFileId
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   *
+   * @returns {string} GUID.
+   */
+
+
+  API.getFileId = function () {
+    return getFileId();
+  };
+
+  var creationDate;
+
+  var convertDateToPDFDate = API.__private__.convertDateToPDFDate = function (parmDate) {
+    var result = "";
+    var tzoffset = parmDate.getTimezoneOffset(),
+        tzsign = tzoffset < 0 ? "+" : "-",
+        tzhour = Math.floor(Math.abs(tzoffset / 60)),
+        tzmin = Math.abs(tzoffset % 60),
+        timeZoneString = [tzsign, padd2(tzhour), "'", padd2(tzmin), "'"].join("");
+    result = ["D:", parmDate.getFullYear(), padd2(parmDate.getMonth() + 1), padd2(parmDate.getDate()), padd2(parmDate.getHours()), padd2(parmDate.getMinutes()), padd2(parmDate.getSeconds()), timeZoneString].join("");
+    return result;
+  };
+
+  var convertPDFDateToDate = API.__private__.convertPDFDateToDate = function (parmPDFDate) {
+    var year = parseInt(parmPDFDate.substr(2, 4), 10);
+    var month = parseInt(parmPDFDate.substr(6, 2), 10) - 1;
+    var date = parseInt(parmPDFDate.substr(8, 2), 10);
+    var hour = parseInt(parmPDFDate.substr(10, 2), 10);
+    var minutes = parseInt(parmPDFDate.substr(12, 2), 10);
+    var seconds = parseInt(parmPDFDate.substr(14, 2), 10); // var timeZoneHour = parseInt(parmPDFDate.substr(16, 2), 10);
+    // var timeZoneMinutes = parseInt(parmPDFDate.substr(20, 2), 10);
+
+    var resultingDate = new Date(year, month, date, hour, minutes, seconds, 0);
+    return resultingDate;
+  };
+
+  var setCreationDate = API.__private__.setCreationDate = function (date) {
+    var tmpCreationDateString;
+    var regexPDFCreationDate = /^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])'?$/;
+
+    if (typeof date === "undefined") {
+      date = new Date();
+    }
+
+    if (date instanceof Date) {
+      tmpCreationDateString = convertDateToPDFDate(date);
+    } else if (regexPDFCreationDate.test(date)) {
+      tmpCreationDateString = date;
+    } else {
+      throw new Error("Invalid argument passed to jsPDF.setCreationDate");
+    }
+
+    creationDate = tmpCreationDateString;
+    return creationDate;
+  };
+
+  var getCreationDate = API.__private__.getCreationDate = function (type) {
+    var result = creationDate;
+
+    if (type === "jsDate") {
+      result = convertPDFDateToDate(creationDate);
+    }
+
+    return result;
+  };
+  /**
+   * @name setCreationDate
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {Object} date
+   * @returns {jsPDF}
+   */
+
+
+  API.setCreationDate = function (date) {
+    setCreationDate(date);
+    return this;
+  };
+  /**
+   * @name getCreationDate
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {Object} type
+   * @returns {Object}
+   */
+
+
+  API.getCreationDate = function (type) {
+    return getCreationDate(type);
+  };
+
+  var padd2 = API.__private__.padd2 = function (number) {
+    return ("0" + parseInt(number)).slice(-2);
+  };
+
+  var padd2Hex = API.__private__.padd2Hex = function (hexString) {
+    hexString = hexString.toString();
+    return ("00" + hexString).substr(hexString.length);
+  };
+
+  var objectNumber = 0; // 'n' Current object number
+
+  var offsets = []; // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.
+
+  var content = [];
+  var contentLength = 0;
+  var additionalObjects = [];
+  var pages = [];
+  var currentPage;
+  var hasCustomDestination = false;
+  var outputDestination = content;
+
+  var resetDocument = function resetDocument() {
+    //reset fields relevant for objectNumber generation and xref.
+    objectNumber = 0;
+    contentLength = 0;
+    content = [];
+    offsets = [];
+    additionalObjects = [];
+    rootDictionaryObjId = newObjectDeferred();
+    resourceDictionaryObjId = newObjectDeferred();
+  };
+
+  API.__private__.setCustomOutputDestination = function (destination) {
+    hasCustomDestination = true;
+    outputDestination = destination;
+  };
+
+  var setOutputDestination = function setOutputDestination(destination) {
+    if (!hasCustomDestination) {
+      outputDestination = destination;
+    }
+  };
+
+  API.__private__.resetCustomOutputDestination = function () {
+    hasCustomDestination = false;
+    outputDestination = content;
+  };
+
+  var out = API.__private__.out = function (string) {
+    string = string.toString();
+    contentLength += string.length + 1;
+    outputDestination.push(string);
+    return outputDestination;
+  };
+
+  var write = API.__private__.write = function (value) {
+    return out(arguments.length === 1 ? value.toString() : Array.prototype.join.call(arguments, " "));
+  };
+
+  var getArrayBuffer = API.__private__.getArrayBuffer = function (data) {
+    var len = data.length,
+        ab = new ArrayBuffer(len),
+        u8 = new Uint8Array(ab);
+
+    while (len--) {
+      u8[len] = data.charCodeAt(len);
+    }
+
+    return ab;
+  };
+
+  var standardFonts = [["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]];
+
+  API.__private__.getStandardFonts = function () {
+    return standardFonts;
+  };
+
+  var activeFontSize = options.fontSize || 16;
+  /**
+   * Sets font size for upcoming text elements.
+   *
+   * @param {number} size Font size in points.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setFontSize
+   */
+
+  API.__private__.setFontSize = API.setFontSize = function (size) {
+    if (apiMode === ApiMode.ADVANCED) {
+      activeFontSize = size / scaleFactor;
+    } else {
+      activeFontSize = size;
+    }
+
+    return this;
+  };
+  /**
+   * Gets the fontsize for upcoming text elements.
+   *
+   * @function
+   * @instance
+   * @returns {number}
+   * @memberof jsPDF#
+   * @name getFontSize
+   */
+
+
+  var getFontSize = API.__private__.getFontSize = API.getFontSize = function () {
+    if (apiMode === ApiMode.COMPAT) {
+      return activeFontSize;
+    } else {
+      return activeFontSize * scaleFactor;
+    }
+  };
+
+  var R2L = options.R2L || false;
+  /**
+   * Set value of R2L functionality.
+   *
+   * @param {boolean} value
+   * @function
+   * @instance
+   * @returns {jsPDF} jsPDF-instance
+   * @memberof jsPDF#
+   * @name setR2L
+   */
+
+  API.__private__.setR2L = API.setR2L = function (value) {
+    R2L = value;
+    return this;
+  };
+  /**
+   * Get value of R2L functionality.
+   *
+   * @function
+   * @instance
+   * @returns {boolean} jsPDF-instance
+   * @memberof jsPDF#
+   * @name getR2L
+   */
+
+
+  API.__private__.getR2L = API.getR2L = function () {
+    return R2L;
+  };
+
+  var zoomMode; // default: 1;
+
+  var setZoomMode = API.__private__.setZoomMode = function (zoom) {
+    var validZoomModes = [undefined, null, "fullwidth", "fullheight", "fullpage", "original"];
+
+    if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(zoom)) {
+      zoomMode = zoom;
+    } else if (!isNaN(zoom)) {
+      zoomMode = parseInt(zoom, 10);
+    } else if (validZoomModes.indexOf(zoom) !== -1) {
+      zoomMode = zoom;
+    } else {
+      throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "' + zoom + '" is not recognized.');
+    }
+  };
+
+  API.__private__.getZoomMode = function () {
+    return zoomMode;
+  };
+
+  var pageMode; // default: 'UseOutlines';
+
+  var setPageMode = API.__private__.setPageMode = function (pmode) {
+    var validPageModes = [undefined, null, "UseNone", "UseOutlines", "UseThumbs", "FullScreen"];
+
+    if (validPageModes.indexOf(pmode) == -1) {
+      throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "' + pmode + '" is not recognized.');
+    }
+
+    pageMode = pmode;
+  };
+
+  API.__private__.getPageMode = function () {
+    return pageMode;
+  };
+
+  var layoutMode; // default: 'continuous';
+
+  var setLayoutMode = API.__private__.setLayoutMode = function (layout) {
+    var validLayoutModes = [undefined, null, "continuous", "single", "twoleft", "tworight", "two"];
+
+    if (validLayoutModes.indexOf(layout) == -1) {
+      throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "' + layout + '" is not recognized.');
+    }
+
+    layoutMode = layout;
+  };
+
+  API.__private__.getLayoutMode = function () {
+    return layoutMode;
+  };
+  /**
+   * Set the display mode options of the page like zoom and layout.
+   *
+   * @name setDisplayMode
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {integer|String} zoom   You can pass an integer or percentage as
+   * a string. 2 will scale the document up 2x, '200%' will scale up by the
+   * same amount. You can also set it to 'fullwidth', 'fullheight',
+   * 'fullpage', or 'original'.
+   *
+   * Only certain PDF readers support this, such as Adobe Acrobat.
+   *
+   * @param {string} layout Layout mode can be: 'continuous' - this is the
+   * default continuous scroll. 'single' - the single page mode only shows one
+   * page at a time. 'twoleft' - two column left mode, first page starts on
+   * the left, and 'tworight' - pages are laid out in two columns, with the
+   * first page on the right. This would be used for books.
+   * @param {string} pmode 'UseOutlines' - it shows the
+   * outline of the document on the left. 'UseThumbs' - shows thumbnails along
+   * the left. 'FullScreen' - prompts the user to enter fullscreen mode.
+   *
+   * @returns {jsPDF}
+   */
+
+
+  API.__private__.setDisplayMode = API.setDisplayMode = function (zoom, layout, pmode) {
+    setZoomMode(zoom);
+    setLayoutMode(layout);
+    setPageMode(pmode);
+    return this;
+  };
+
+  var documentProperties = {
+    title: "",
+    subject: "",
+    author: "",
+    keywords: "",
+    creator: ""
+  };
+
+  API.__private__.getDocumentProperty = function (key) {
+    if (Object.keys(documentProperties).indexOf(key) === -1) {
+      throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");
+    }
+
+    return documentProperties[key];
+  };
+
+  API.__private__.getDocumentProperties = function () {
+    return documentProperties;
+  };
+  /**
+   * Adds a properties to the PDF document.
+   *
+   * @param {Object} A property_name-to-property_value object structure.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setDocumentProperties
+   */
+
+
+  API.__private__.setDocumentProperties = API.setProperties = API.setDocumentProperties = function (properties) {
+    // copying only those properties we can render.
+    for (var property in documentProperties) {
+      if (documentProperties.hasOwnProperty(property) && properties[property]) {
+        documentProperties[property] = properties[property];
+      }
+    }
+
+    return this;
+  };
+
+  API.__private__.setDocumentProperty = function (key, value) {
+    if (Object.keys(documentProperties).indexOf(key) === -1) {
+      throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");
+    }
+
+    return documentProperties[key] = value;
+  };
+
+  var fonts = {}; // collection of font objects, where key is fontKey - a dynamically created label for a given font.
+
+  var fontmap = {}; // mapping structure fontName > fontStyle > font key - performance layer. See addFont()
+
+  var activeFontKey; // will be string representing the KEY of the font as combination of fontName + fontStyle
+
+  var fontStateStack = []; //
+
+  var patterns = {}; // collection of pattern objects
+
+  var patternMap = {}; // see fonts
+
+  var gStates = {}; // collection of graphic state objects
+
+  var gStatesMap = {}; // see fonts
+
+  var activeGState = null;
+  var scaleFactor; // Scale factor
+
+  var page = 0;
+  var pagesContext = [];
+  var events = new PubSub(API);
+  var hotfixes = options.hotfixes || [];
+  var renderTargets = {};
+  var renderTargetMap = {};
+  var renderTargetStack = [];
+  var pageX;
+  var pageY;
+  var pageMatrix; // only used for FormObjects
+
+  /**
+   * A matrix object for 2D homogenous transformations: <br>
+   * | a b 0 | <br>
+   * | c d 0 | <br>
+   * | e f 1 | <br>
+   * pdf multiplies matrices righthand: v' = v x m1 x m2 x ...
+   *
+   * @class
+   * @name Matrix
+   * @param {number} sx
+   * @param {number} shy
+   * @param {number} shx
+   * @param {number} sy
+   * @param {number} tx
+   * @param {number} ty
+   * @constructor
+   */
+
+  var Matrix = function Matrix(sx, shy, shx, sy, tx, ty) {
+    if (!(this instanceof Matrix)) {
+      return new Matrix(sx, shy, shx, sy, tx, ty);
+    }
+
+    if (isNaN(sx)) sx = 1;
+    if (isNaN(shy)) shy = 0;
+    if (isNaN(shx)) shx = 0;
+    if (isNaN(sy)) sy = 1;
+    if (isNaN(tx)) tx = 0;
+    if (isNaN(ty)) ty = 0;
+    this._matrix = [sx, shy, shx, sy, tx, ty];
+  };
+  /**
+   * @name sx
+   * @memberof Matrix#
+   */
+
+
+  Object.defineProperty(Matrix.prototype, "sx", {
+    get: function get() {
+      return this._matrix[0];
+    },
+    set: function set(value) {
+      this._matrix[0] = value;
+    }
+  });
+  /**
+   * @name shy
+   * @memberof Matrix#
+   */
+
+  Object.defineProperty(Matrix.prototype, "shy", {
+    get: function get() {
+      return this._matrix[1];
+    },
+    set: function set(value) {
+      this._matrix[1] = value;
+    }
+  });
+  /**
+   * @name shx
+   * @memberof Matrix#
+   */
+
+  Object.defineProperty(Matrix.prototype, "shx", {
+    get: function get() {
+      return this._matrix[2];
+    },
+    set: function set(value) {
+      this._matrix[2] = value;
+    }
+  });
+  /**
+   * @name sy
+   * @memberof Matrix#
+   */
+
+  Object.defineProperty(Matrix.prototype, "sy", {
+    get: function get() {
+      return this._matrix[3];
+    },
+    set: function set(value) {
+      this._matrix[3] = value;
+    }
+  });
+  /**
+   * @name tx
+   * @memberof Matrix#
+   */
+
+  Object.defineProperty(Matrix.prototype, "tx", {
+    get: function get() {
+      return this._matrix[4];
+    },
+    set: function set(value) {
+      this._matrix[4] = value;
+    }
+  });
+  /**
+   * @name ty
+   * @memberof Matrix#
+   */
+
+  Object.defineProperty(Matrix.prototype, "ty", {
+    get: function get() {
+      return this._matrix[5];
+    },
+    set: function set(value) {
+      this._matrix[5] = value;
+    }
+  });
+  Object.defineProperty(Matrix.prototype, "a", {
+    get: function get() {
+      return this._matrix[0];
+    },
+    set: function set(value) {
+      this._matrix[0] = value;
+    }
+  });
+  Object.defineProperty(Matrix.prototype, "b", {
+    get: function get() {
+      return this._matrix[1];
+    },
+    set: function set(value) {
+      this._matrix[1] = value;
+    }
+  });
+  Object.defineProperty(Matrix.prototype, "c", {
+    get: function get() {
+      return this._matrix[2];
+    },
+    set: function set(value) {
+      this._matrix[2] = value;
+    }
+  });
+  Object.defineProperty(Matrix.prototype, "d", {
+    get: function get() {
+      return this._matrix[3];
+    },
+    set: function set(value) {
+      this._matrix[3] = value;
+    }
+  });
+  Object.defineProperty(Matrix.prototype, "e", {
+    get: function get() {
+      return this._matrix[4];
+    },
+    set: function set(value) {
+      this._matrix[4] = value;
+    }
+  });
+  Object.defineProperty(Matrix.prototype, "f", {
+    get: function get() {
+      return this._matrix[5];
+    },
+    set: function set(value) {
+      this._matrix[5] = value;
+    }
+  });
+  /**
+   * @name rotation
+   * @memberof Matrix#
+   */
+
+  Object.defineProperty(Matrix.prototype, "rotation", {
+    get: function get() {
+      return Math.atan2(this.shx, this.sx);
+    }
+  });
+  /**
+   * @name scaleX
+   * @memberof Matrix#
+   */
+
+  Object.defineProperty(Matrix.prototype, "scaleX", {
+    get: function get() {
+      return this.decompose().scale.sx;
+    }
+  });
+  /**
+   * @name scaleY
+   * @memberof Matrix#
+   */
+
+  Object.defineProperty(Matrix.prototype, "scaleY", {
+    get: function get() {
+      return this.decompose().scale.sy;
+    }
+  });
+  /**
+   * @name isIdentity
+   * @memberof Matrix#
+   */
+
+  Object.defineProperty(Matrix.prototype, "isIdentity", {
+    get: function get() {
+      if (this.sx !== 1) {
+        return false;
+      }
+
+      if (this.shy !== 0) {
+        return false;
+      }
+
+      if (this.shx !== 0) {
+        return false;
+      }
+
+      if (this.sy !== 1) {
+        return false;
+      }
+
+      if (this.tx !== 0) {
+        return false;
+      }
+
+      if (this.ty !== 0) {
+        return false;
+      }
+
+      return true;
+    }
+  });
+  /**
+   * Join the Matrix Values to a String
+   *
+   * @function join
+   * @param {string} separator Specifies a string to separate each pair of adjacent elements of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma (","). If separator is an empty string, all elements are joined without any characters in between them.
+   * @returns {string} A string with all array elements joined.
+   * @memberof Matrix#
+   */
+
+  Matrix.prototype.join = function (separator) {
+    return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty].map(hpf).join(separator);
+  };
+  /**
+   * Multiply the matrix with given Matrix
+   *
+   * @function multiply
+   * @param matrix
+   * @returns {Matrix}
+   * @memberof Matrix#
+   */
+
+
+  Matrix.prototype.multiply = function (matrix) {
+    var sx = matrix.sx * this.sx + matrix.shy * this.shx;
+    var shy = matrix.sx * this.shy + matrix.shy * this.sy;
+    var shx = matrix.shx * this.sx + matrix.sy * this.shx;
+    var sy = matrix.shx * this.shy + matrix.sy * this.sy;
+    var tx = matrix.tx * this.sx + matrix.ty * this.shx + this.tx;
+    var ty = matrix.tx * this.shy + matrix.ty * this.sy + this.ty;
+    return new Matrix(sx, shy, shx, sy, tx, ty);
+  };
+  /**
+   * @function decompose
+   * @memberof Matrix#
+   */
+
+
+  Matrix.prototype.decompose = function () {
+    var a = this.sx;
+    var b = this.shy;
+    var c = this.shx;
+    var d = this.sy;
+    var e = this.tx;
+    var f = this.ty;
+    var scaleX = Math.sqrt(a * a + b * b);
+    a /= scaleX;
+    b /= scaleX;
+    var shear = a * c + b * d;
+    c -= a * shear;
+    d -= b * shear;
+    var scaleY = Math.sqrt(c * c + d * d);
+    c /= scaleY;
+    d /= scaleY;
+    shear /= scaleY;
+
+    if (a * d < b * c) {
+      a = -a;
+      b = -b;
+      shear = -shear;
+      scaleX = -scaleX;
+    }
+
+    return {
+      scale: new Matrix(scaleX, 0, 0, scaleY, 0, 0),
+      translate: new Matrix(1, 0, 0, 1, e, f),
+      rotate: new Matrix(a, b, -b, a, 0, 0),
+      skew: new Matrix(1, 0, shear, 1, 0, 0)
+    };
+  };
+  /**
+   * @function toString
+   * @memberof Matrix#
+   */
+
+
+  Matrix.prototype.toString = function (parmPrecision) {
+    return this.join(" ");
+  };
+  /**
+   * @function inversed
+   * @memberof Matrix#
+   */
+
+
+  Matrix.prototype.inversed = function () {
+    var a = this.sx,
+        b = this.shy,
+        c = this.shx,
+        d = this.sy,
+        e = this.tx,
+        f = this.ty;
+    var quot = 1 / (a * d - b * c);
+    var aInv = d * quot;
+    var bInv = -b * quot;
+    var cInv = -c * quot;
+    var dInv = a * quot;
+    var eInv = -aInv * e - cInv * f;
+    var fInv = -bInv * e - dInv * f;
+    return new Matrix(aInv, bInv, cInv, dInv, eInv, fInv);
+  };
+  /**
+   * @function applyToPoint
+   * @memberof Matrix#
+   */
+
+
+  Matrix.prototype.applyToPoint = function (pt) {
+    var x = pt.x * this.sx + pt.y * this.shx + this.tx;
+    var y = pt.x * this.shy + pt.y * this.sy + this.ty;
+    return new Point(x, y);
+  };
+  /**
+   * @function applyToRectangle
+   * @memberof Matrix#
+   */
+
+
+  Matrix.prototype.applyToRectangle = function (rect) {
+    var pt1 = this.applyToPoint(rect);
+    var pt2 = this.applyToPoint(new Point(rect.x + rect.w, rect.y + rect.h));
+    return new Rectangle(pt1.x, pt1.y, pt2.x - pt1.x, pt2.y - pt1.y);
+  };
+  /**
+   * Clone the Matrix
+   *
+   * @function clone
+   * @memberof Matrix#
+   * @name clone
+   * @instance
+   */
+
+
+  Matrix.prototype.clone = function () {
+    var sx = this.sx;
+    var shy = this.shy;
+    var shx = this.shx;
+    var sy = this.sy;
+    var tx = this.tx;
+    var ty = this.ty;
+    return new Matrix(sx, shy, shx, sy, tx, ty);
+  };
+
+  API.Matrix = Matrix;
+  /**
+   * Multiplies two matrices. (see {@link Matrix})
+   * @param {Matrix} m1
+   * @param {Matrix} m2
+   * @memberof jsPDF#
+   * @name matrixMult
+   */
+
+  var matrixMult = API.matrixMult = function (m1, m2) {
+    return m2.multiply(m1);
+  };
+  /**
+   * The identity matrix (equivalent to new Matrix(1, 0, 0, 1, 0, 0)).
+   * @type {Matrix}
+   * @memberof! jsPDF#
+   * @name identityMatrix
+   */
+
+
+  var identityMatrix = new Matrix(1, 0, 0, 1, 0, 0);
+  API.unitMatrix = API.identityMatrix = identityMatrix;
+  /**
+   * Adds a new pattern for later use.
+   * @param {String} key The key by it can be referenced later. The keys must be unique!
+   * @param {API.Pattern} pattern The pattern
+   */
+
+  var addPattern = function addPattern(key, pattern) {
+    // only add it if it is not already present (the keys provided by the user must be unique!)
+    if (patternMap[key]) return;
+    var prefix = pattern instanceof ShadingPattern ? "Sh" : "P";
+    var patternKey = prefix + (Object.keys(patterns).length + 1).toString(10);
+    pattern.id = patternKey;
+    patternMap[key] = patternKey;
+    patterns[patternKey] = pattern;
+    events.publish("addPattern", pattern);
+  };
+  /**
+   * A pattern describing a shading pattern.
+   *
+   * Only available in "advanced" API mode.
+   *
+   * @param {String} type One of "axial" or "radial"
+   * @param {Array<Number>} coords Either [x1, y1, x2, y2] for "axial" type describing the two interpolation points
+   * or [x1, y1, r, x2, y2, r2] for "radial" describing inner and the outer circle.
+   * @param {Array<Object>} colors An array of objects with the fields "offset" and "color". "offset" describes
+   * the offset in parameter space [0, 1]. "color" is an array of length 3 describing RGB values in [0, 255].
+   * @param {GState=} gState An additional graphics state that gets applied to the pattern (optional).
+   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system
+   * and the use coordinate system (optional).
+   * @constructor
+   * @extends API.Pattern
+   */
+
+
+  API.ShadingPattern = ShadingPattern;
+  /**
+   * A PDF Tiling pattern.
+   *
+   * Only available in "advanced" API mode.
+   *
+   * @param {Array.<Number>} boundingBox The bounding box at which one pattern cell gets clipped.
+   * @param {Number} xStep Horizontal spacing between pattern cells.
+   * @param {Number} yStep Vertical spacing between pattern cells.
+   * @param {API.GState=} gState An additional graphics state that gets applied to the pattern (optional).
+   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system
+   * and the use coordinate system (optional).
+   * @constructor
+   * @extends API.Pattern
+   */
+
+  API.TilingPattern = TilingPattern;
+  /**
+   * Adds a new {@link API.ShadingPattern} for later use. Only available in "advanced" API mode.
+   * @param {String} key
+   * @param {Pattern} pattern
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name addPattern
+   */
+
+  API.addShadingPattern = function (key, pattern) {
+    advancedApiModeTrap("addShadingPattern()");
+    addPattern(key, pattern);
+    return this;
+  };
+  /**
+   * Begins a new tiling pattern. All subsequent render calls are drawn to this pattern until {@link API.endTilingPattern}
+   * gets called. Only available in "advanced" API mode.
+   * @param {API.Pattern} pattern
+   * @memberof jsPDF#
+   * @name beginTilingPattern
+   */
+
+
+  API.beginTilingPattern = function (pattern) {
+    advancedApiModeTrap("beginTilingPattern()");
+    beginNewRenderTarget(pattern.boundingBox[0], pattern.boundingBox[1], pattern.boundingBox[2] - pattern.boundingBox[0], pattern.boundingBox[3] - pattern.boundingBox[1], pattern.matrix);
+  };
+  /**
+   * Ends a tiling pattern and sets the render target to the one active before {@link API.beginTilingPattern} has been called.
+   *
+   * Only available in "advanced" API mode.
+   *
+   * @param {string} key A unique key that is used to reference this pattern at later use.
+   * @param {API.Pattern} pattern The pattern to end.
+   * @memberof jsPDF#
+   * @name endTilingPattern
+   */
+
+
+  API.endTilingPattern = function (key, pattern) {
+    advancedApiModeTrap("endTilingPattern()"); // retrieve the stream
+
+    pattern.stream = pages[currentPage].join("\n");
+    addPattern(key, pattern);
+    events.publish("endTilingPattern", pattern); // restore state from stack
+
+    renderTargetStack.pop().restore();
+  };
+
+  var newObject = API.__private__.newObject = function () {
+    var oid = newObjectDeferred();
+    newObjectDeferredBegin(oid, true);
+    return oid;
+  }; // Does not output the object.  The caller must call newObjectDeferredBegin(oid) before outputing any data
+
+
+  var newObjectDeferred = API.__private__.newObjectDeferred = function () {
+    objectNumber++;
+
+    offsets[objectNumber] = function () {
+      return contentLength;
+    };
+
+    return objectNumber;
+  };
+
+  var newObjectDeferredBegin = function newObjectDeferredBegin(oid, doOutput) {
+    doOutput = typeof doOutput === "boolean" ? doOutput : false;
+    offsets[oid] = contentLength;
+
+    if (doOutput) {
+      out(oid + " 0 obj");
+    }
+
+    return oid;
+  }; // Does not output the object until after the pages have been output.
+  // Returns an object containing the objectId and content.
+  // All pages have been added so the object ID can be estimated to start right after.
+  // This does not modify the current objectNumber;  It must be updated after the newObjects are output.
+
+
+  var newAdditionalObject = API.__private__.newAdditionalObject = function () {
+    var objId = newObjectDeferred();
+    var obj = {
+      objId: objId,
+      content: ""
+    };
+    additionalObjects.push(obj);
+    return obj;
+  };
+
+  var rootDictionaryObjId = newObjectDeferred();
+  var resourceDictionaryObjId = newObjectDeferred(); /////////////////////
+  // Private functions
+  /////////////////////
+
+  var decodeColorString = API.__private__.decodeColorString = function (color) {
+    var colorEncoded = color.split(" ");
+
+    if (colorEncoded.length === 2 && (colorEncoded[1] === "g" || colorEncoded[1] === "G")) {
+      // convert grayscale value to rgb so that it can be converted to hex for consistency
+      var floatVal = parseFloat(colorEncoded[0]);
+      colorEncoded = [floatVal, floatVal, floatVal, "r"];
+    } else if (colorEncoded.length === 5 && (colorEncoded[4] === "k" || colorEncoded[4] === "K")) {
+      // convert CMYK values to rbg so that it can be converted to hex for consistency
+      var red = (1.0 - colorEncoded[0]) * (1.0 - colorEncoded[3]);
+      var green = (1.0 - colorEncoded[1]) * (1.0 - colorEncoded[3]);
+      var blue = (1.0 - colorEncoded[2]) * (1.0 - colorEncoded[3]);
+      colorEncoded = [red, green, blue, "r"];
+    }
+
+    var colorAsRGB = "#";
+
+    for (var i = 0; i < 3; i++) {
+      colorAsRGB += ("0" + Math.floor(parseFloat(colorEncoded[i]) * 255).toString(16)).slice(-2);
+    }
+
+    return colorAsRGB;
+  };
+
+  var encodeColorString = API.__private__.encodeColorString = function (options) {
+    var color;
+
+    if (typeof options === "string") {
+      options = {
+        ch1: options
+      };
+    }
+
+    var ch1 = options.ch1;
+    var ch2 = options.ch2;
+    var ch3 = options.ch3;
+    var ch4 = options.ch4;
+    var letterArray = options.pdfColorType === "draw" ? ["G", "RG", "K"] : ["g", "rg", "k"];
+
+    if (typeof ch1 === "string" && ch1.charAt(0) !== "#") {
+      var rgbColor = new RGBColor(ch1);
+
+      if (rgbColor.ok) {
+        ch1 = rgbColor.toHex();
+      } else if (!/^\d*\.?\d*$/.test(ch1)) {
+        throw new Error('Invalid color "' + ch1 + '" passed to jsPDF.encodeColorString.');
+      }
+    } //convert short rgb to long form
+
+
+    if (typeof ch1 === "string" && /^#[0-9A-Fa-f]{3}$/.test(ch1)) {
+      ch1 = "#" + ch1[1] + ch1[1] + ch1[2] + ch1[2] + ch1[3] + ch1[3];
+    }
+
+    if (typeof ch1 === "string" && /^#[0-9A-Fa-f]{6}$/.test(ch1)) {
+      var hex = parseInt(ch1.substr(1), 16);
+      ch1 = hex >> 16 & 255;
+      ch2 = hex >> 8 & 255;
+      ch3 = hex & 255;
+    }
+
+    if (typeof ch2 === "undefined" || typeof ch4 === "undefined" && ch1 === ch2 && ch2 === ch3) {
+      // Gray color space.
+      if (typeof ch1 === "string") {
+        color = ch1 + " " + letterArray[0];
+      } else {
+        switch (options.precision) {
+          case 2:
+            color = f2(ch1 / 255) + " " + letterArray[0];
+            break;
+
+          case 3:
+          default:
+            color = f3(ch1 / 255) + " " + letterArray[0];
+        }
+      }
+    } else if (typeof ch4 === "undefined" || _typeof(ch4) === "object") {
+      // assume RGBA
+      if (ch4 && !isNaN(ch4.a)) {
+        //TODO Implement transparency.
+        //WORKAROUND use white for now, if transparent, otherwise handle as rgb
+        if (ch4.a === 0) {
+          color = ["1.", "1.", "1.", letterArray[1]].join(" ");
+          return color;
+        }
+      } // assume RGB
+
+
+      if (typeof ch1 === "string") {
+        color = [ch1, ch2, ch3, letterArray[1]].join(" ");
+      } else {
+        switch (options.precision) {
+          case 2:
+            color = [f2(ch1 / 255), f2(ch2 / 255), f2(ch3 / 255), letterArray[1]].join(" ");
+            break;
+
+          default:
+          case 3:
+            color = [f3(ch1 / 255), f3(ch2 / 255), f3(ch3 / 255), letterArray[1]].join(" ");
+        }
+      }
+    } else {
+      // assume CMYK
+      if (typeof ch1 === "string") {
+        color = [ch1, ch2, ch3, ch4, letterArray[2]].join(" ");
+      } else {
+        switch (options.precision) {
+          case 2:
+            color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), letterArray[2]].join(" ");
+            break;
+
+          case 3:
+          default:
+            color = [f3(ch1), f3(ch2), f3(ch3), f3(ch4), letterArray[2]].join(" ");
+        }
+      }
+    }
+
+    return color;
+  };
+
+  var getFilters = API.__private__.getFilters = function () {
+    return filters;
+  };
+
+  var putStream = API.__private__.putStream = function (options) {
+    options = options || {};
+    var data = options.data || "";
+    var filters = options.filters || getFilters();
+    var alreadyAppliedFilters = options.alreadyAppliedFilters || [];
+    var addLength1 = options.addLength1 || false;
+    var valueOfLength1 = data.length;
+    var objectId = options.objectId;
+
+    var encryptor = function encryptor(data) {
+      return data;
+    };
+
+    if (encryptionOptions !== null && typeof objectId == "undefined") {
+      throw new Error("ObjectId must be passed to putStream for file encryption");
+    }
+
+    if (encryptionOptions !== null) {
+      encryptor = encryption.encryptor(objectId, 0);
+    }
+
+    var processedData = {};
+
+    if (filters === true) {
+      filters = ["FlateEncode"];
+    }
+
+    var keyValues = options.additionalKeyValues || [];
+
+    if (typeof jsPDF.API.processDataByFilters !== "undefined") {
+      processedData = jsPDF.API.processDataByFilters(data, filters);
+    } else {
+      processedData = {
+        data: data,
+        reverseChain: []
+      };
+    }
+
+    var filterAsString = processedData.reverseChain + (Array.isArray(alreadyAppliedFilters) ? alreadyAppliedFilters.join(" ") : alreadyAppliedFilters.toString());
+
+    if (processedData.data.length !== 0) {
+      keyValues.push({
+        key: "Length",
+        value: processedData.data.length
+      });
+
+      if (addLength1 === true) {
+        keyValues.push({
+          key: "Length1",
+          value: valueOfLength1
+        });
+      }
+    }
+
+    if (filterAsString.length != 0) {
+      if (filterAsString.split("/").length - 1 === 1) {
+        keyValues.push({
+          key: "Filter",
+          value: filterAsString
+        });
+      } else {
+        keyValues.push({
+          key: "Filter",
+          value: "[" + filterAsString + "]"
+        });
+
+        for (var j = 0; j < keyValues.length; j += 1) {
+          if (keyValues[j].key === "DecodeParms") {
+            var decodeParmsArray = [];
+
+            for (var i = 0; i < processedData.reverseChain.split("/").length - 1; i += 1) {
+              decodeParmsArray.push("null");
+            }
+
+            decodeParmsArray.push(keyValues[j].value);
+            keyValues[j].value = "[" + decodeParmsArray.join(" ") + "]";
+          }
+        }
+      }
+    }
+
+    out("<<");
+
+    for (var k = 0; k < keyValues.length; k++) {
+      out("/" + keyValues[k].key + " " + keyValues[k].value);
+    }
+
+    out(">>");
+
+    if (processedData.data.length !== 0) {
+      out("stream");
+      out(encryptor(processedData.data));
+      out("endstream");
+    }
+  };
+
+  var putPage = API.__private__.putPage = function (page) {
+    var pageNumber = page.number;
+    var data = page.data;
+    var pageObjectNumber = page.objId;
+    var pageContentsObjId = page.contentsObjId;
+    newObjectDeferredBegin(pageObjectNumber, true);
+    out("<</Type /Page");
+    out("/Parent " + page.rootDictionaryObjId + " 0 R");
+    out("/Resources " + page.resourceDictionaryObjId + " 0 R");
+    out("/MediaBox [" + parseFloat(hpf(page.mediaBox.bottomLeftX)) + " " + parseFloat(hpf(page.mediaBox.bottomLeftY)) + " " + hpf(page.mediaBox.topRightX) + " " + hpf(page.mediaBox.topRightY) + "]");
+
+    if (page.cropBox !== null) {
+      out("/CropBox [" + hpf(page.cropBox.bottomLeftX) + " " + hpf(page.cropBox.bottomLeftY) + " " + hpf(page.cropBox.topRightX) + " " + hpf(page.cropBox.topRightY) + "]");
+    }
+
+    if (page.bleedBox !== null) {
+      out("/BleedBox [" + hpf(page.bleedBox.bottomLeftX) + " " + hpf(page.bleedBox.bottomLeftY) + " " + hpf(page.bleedBox.topRightX) + " " + hpf(page.bleedBox.topRightY) + "]");
+    }
+
+    if (page.trimBox !== null) {
+      out("/TrimBox [" + hpf(page.trimBox.bottomLeftX) + " " + hpf(page.trimBox.bottomLeftY) + " " + hpf(page.trimBox.topRightX) + " " + hpf(page.trimBox.topRightY) + "]");
+    }
+
+    if (page.artBox !== null) {
+      out("/ArtBox [" + hpf(page.artBox.bottomLeftX) + " " + hpf(page.artBox.bottomLeftY) + " " + hpf(page.artBox.topRightX) + " " + hpf(page.artBox.topRightY) + "]");
+    }
+
+    if (typeof page.userUnit === "number" && page.userUnit !== 1.0) {
+      out("/UserUnit " + page.userUnit);
+    }
+
+    events.publish("putPage", {
+      objId: pageObjectNumber,
+      pageContext: pagesContext[pageNumber],
+      pageNumber: pageNumber,
+      page: data
+    });
+    out("/Contents " + pageContentsObjId + " 0 R");
+    out(">>");
+    out("endobj"); // Page content
+
+    var pageContent = data.join("\n");
+
+    if (apiMode === ApiMode.ADVANCED) {
+      // if the user forgot to switch back to COMPAT mode, we must balance the graphics stack again
+      pageContent += "\nQ";
+    }
+
+    newObjectDeferredBegin(pageContentsObjId, true);
+    putStream({
+      data: pageContent,
+      filters: getFilters(),
+      objectId: pageContentsObjId
+    });
+    out("endobj");
+    return pageObjectNumber;
+  };
+
+  var putPages = API.__private__.putPages = function () {
+    var n,
+        i,
+        pageObjectNumbers = [];
+
+    for (n = 1; n <= page; n++) {
+      pagesContext[n].objId = newObjectDeferred();
+      pagesContext[n].contentsObjId = newObjectDeferred();
+    }
+
+    for (n = 1; n <= page; n++) {
+      pageObjectNumbers.push(putPage({
+        number: n,
+        data: pages[n],
+        objId: pagesContext[n].objId,
+        contentsObjId: pagesContext[n].contentsObjId,
+        mediaBox: pagesContext[n].mediaBox,
+        cropBox: pagesContext[n].cropBox,
+        bleedBox: pagesContext[n].bleedBox,
+        trimBox: pagesContext[n].trimBox,
+        artBox: pagesContext[n].artBox,
+        userUnit: pagesContext[n].userUnit,
+        rootDictionaryObjId: rootDictionaryObjId,
+        resourceDictionaryObjId: resourceDictionaryObjId
+      }));
+    }
+
+    newObjectDeferredBegin(rootDictionaryObjId, true);
+    out("<</Type /Pages");
+    var kids = "/Kids [";
+
+    for (i = 0; i < page; i++) {
+      kids += pageObjectNumbers[i] + " 0 R ";
+    }
+
+    out(kids + "]");
+    out("/Count " + page);
+    out(">>");
+    out("endobj");
+    events.publish("postPutPages");
+  };
+
+  var putFont = function putFont(font) {
+    events.publish("putFont", {
+      font: font,
+      out: out,
+      newObject: newObject,
+      putStream: putStream
+    });
+
+    if (font.isAlreadyPutted !== true) {
+      font.objectNumber = newObject();
+      out("<<");
+      out("/Type /Font");
+      out("/BaseFont /" + toPDFName(font.postScriptName));
+      out("/Subtype /Type1");
+
+      if (typeof font.encoding === "string") {
+        out("/Encoding /" + font.encoding);
+      }
+
+      out("/FirstChar 32");
+      out("/LastChar 255");
+      out(">>");
+      out("endobj");
+    }
+  };
+
+  var putFonts = function putFonts() {
+    for (var fontKey in fonts) {
+      if (fonts.hasOwnProperty(fontKey)) {
+        if (putOnlyUsedFonts === false || putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey)) {
+          putFont(fonts[fontKey]);
+        }
+      }
+    }
+  };
+
+  var putXObject = function putXObject(xObject) {
+    xObject.objectNumber = newObject();
+    var options = [];
+    options.push({
+      key: "Type",
+      value: "/XObject"
+    });
+    options.push({
+      key: "Subtype",
+      value: "/Form"
+    });
+    options.push({
+      key: "BBox",
+      value: "[" + [hpf(xObject.x), hpf(xObject.y), hpf(xObject.x + xObject.width), hpf(xObject.y + xObject.height)].join(" ") + "]"
+    });
+    options.push({
+      key: "Matrix",
+      value: "[" + xObject.matrix.toString() + "]"
+    }); // TODO: /Resources
+
+    var stream = xObject.pages[1].join("\n");
+    putStream({
+      data: stream,
+      additionalKeyValues: options,
+      objectId: xObject.objectNumber
+    });
+    out("endobj");
+  };
+
+  var putXObjects = function putXObjects() {
+    for (var xObjectKey in renderTargets) {
+      if (renderTargets.hasOwnProperty(xObjectKey)) {
+        putXObject(renderTargets[xObjectKey]);
+      }
+    }
+  };
+
+  var interpolateAndEncodeRGBStream = function interpolateAndEncodeRGBStream(colors, numberSamples) {
+    var tValues = [];
+    var t;
+    var dT = 1.0 / (numberSamples - 1);
+
+    for (t = 0.0; t < 1.0; t += dT) {
+      tValues.push(t);
+    }
+
+    tValues.push(1.0); // add first and last control point if not present
+
+    if (colors[0].offset != 0.0) {
+      var c0 = {
+        offset: 0.0,
+        color: colors[0].color
+      };
+      colors.unshift(c0);
+    }
+
+    if (colors[colors.length - 1].offset != 1.0) {
+      var c1 = {
+        offset: 1.0,
+        color: colors[colors.length - 1].color
+      };
+      colors.push(c1);
+    }
+
+    var out = "";
+    var index = 0;
+
+    for (var i = 0; i < tValues.length; i++) {
+      t = tValues[i];
+
+      while (t > colors[index + 1].offset) {
+        index++;
+      }
+
+      var a = colors[index].offset;
+      var b = colors[index + 1].offset;
+      var d = (t - a) / (b - a);
+      var aColor = colors[index].color;
+      var bColor = colors[index + 1].color;
+      out += padd2Hex(Math.round((1 - d) * aColor[0] + d * bColor[0]).toString(16)) + padd2Hex(Math.round((1 - d) * aColor[1] + d * bColor[1]).toString(16)) + padd2Hex(Math.round((1 - d) * aColor[2] + d * bColor[2]).toString(16));
+    }
+
+    return out.trim();
+  };
+
+  var putShadingPattern = function putShadingPattern(pattern, numberSamples) {
+    /*
+       Axial patterns shade between the two points specified in coords, radial patterns between the inner
+       and outer circle.
+       The user can specify an array (colors) that maps t-Values in [0, 1] to RGB colors. These are now
+       interpolated to equidistant samples and written to pdf as a sample (type 0) function.
+       */
+    // The number of color samples that should be used to describe the shading.
+    // The higher, the more accurate the gradient will be.
+    numberSamples || (numberSamples = 21);
+    var funcObjectNumber = newObject();
+    var stream = interpolateAndEncodeRGBStream(pattern.colors, numberSamples);
+    var options = [];
+    options.push({
+      key: "FunctionType",
+      value: "0"
+    });
+    options.push({
+      key: "Domain",
+      value: "[0.0 1.0]"
+    });
+    options.push({
+      key: "Size",
+      value: "[" + numberSamples + "]"
+    });
+    options.push({
+      key: "BitsPerSample",
+      value: "8"
+    });
+    options.push({
+      key: "Range",
+      value: "[0.0 1.0 0.0 1.0 0.0 1.0]"
+    });
+    options.push({
+      key: "Decode",
+      value: "[0.0 1.0 0.0 1.0 0.0 1.0]"
+    });
+    putStream({
+      data: stream,
+      additionalKeyValues: options,
+      alreadyAppliedFilters: ["/ASCIIHexDecode"],
+      objectId: funcObjectNumber
+    });
+    out("endobj");
+    pattern.objectNumber = newObject();
+    out("<< /ShadingType " + pattern.type);
+    out("/ColorSpace /DeviceRGB");
+    var coords = "/Coords [" + hpf(parseFloat(pattern.coords[0])) + " " + // x1
+    hpf(parseFloat(pattern.coords[1])) + " "; // y1
+
+    if (pattern.type === 2) {
+      // axial
+      coords += hpf(parseFloat(pattern.coords[2])) + " " + // x2
+      hpf(parseFloat(pattern.coords[3])); // y2
+    } else {
+      // radial
+      coords += hpf(parseFloat(pattern.coords[2])) + " " + // r1
+      hpf(parseFloat(pattern.coords[3])) + " " + // x2
+      hpf(parseFloat(pattern.coords[4])) + " " + // y2
+      hpf(parseFloat(pattern.coords[5])); // r2
+    }
+
+    coords += "]";
+    out(coords);
+
+    if (pattern.matrix) {
+      out("/Matrix [" + pattern.matrix.toString() + "]");
+    }
+
+    out("/Function " + funcObjectNumber + " 0 R");
+    out("/Extend [true true]");
+    out(">>");
+    out("endobj");
+  };
+
+  var putTilingPattern = function putTilingPattern(pattern, deferredResourceDictionaryIds) {
+    var resourcesObjectId = newObjectDeferred();
+    var patternObjectId = newObject();
+    deferredResourceDictionaryIds.push({
+      resourcesOid: resourcesObjectId,
+      objectOid: patternObjectId
+    });
+    pattern.objectNumber = patternObjectId;
+    var options = [];
+    options.push({
+      key: "Type",
+      value: "/Pattern"
+    });
+    options.push({
+      key: "PatternType",
+      value: "1"
+    }); // tiling pattern
+
+    options.push({
+      key: "PaintType",
+      value: "1"
+    }); // colored tiling pattern
+
+    options.push({
+      key: "TilingType",
+      value: "1"
+    }); // constant spacing
+
+    options.push({
+      key: "BBox",
+      value: "[" + pattern.boundingBox.map(hpf).join(" ") + "]"
+    });
+    options.push({
+      key: "XStep",
+      value: hpf(pattern.xStep)
+    });
+    options.push({
+      key: "YStep",
+      value: hpf(pattern.yStep)
+    });
+    options.push({
+      key: "Resources",
+      value: resourcesObjectId + " 0 R"
+    });
+
+    if (pattern.matrix) {
+      options.push({
+        key: "Matrix",
+        value: "[" + pattern.matrix.toString() + "]"
+      });
+    }
+
+    putStream({
+      data: pattern.stream,
+      additionalKeyValues: options,
+      objectId: pattern.objectNumber
+    });
+    out("endobj");
+  };
+
+  var putPatterns = function putPatterns(deferredResourceDictionaryIds) {
+    var patternKey;
+
+    for (patternKey in patterns) {
+      if (patterns.hasOwnProperty(patternKey)) {
+        if (patterns[patternKey] instanceof ShadingPattern) {
+          putShadingPattern(patterns[patternKey]);
+        } else if (patterns[patternKey] instanceof TilingPattern) {
+          putTilingPattern(patterns[patternKey], deferredResourceDictionaryIds);
+        }
+      }
+    }
+  };
+
+  var putGState = function putGState(gState) {
+    gState.objectNumber = newObject();
+    out("<<");
+
+    for (var p in gState) {
+      switch (p) {
+        case "opacity":
+          out("/ca " + f2(gState[p]));
+          break;
+
+        case "stroke-opacity":
+          out("/CA " + f2(gState[p]));
+          break;
+      }
+    }
+
+    out(">>");
+    out("endobj");
+  };
+
+  var putGStates = function putGStates() {
+    var gStateKey;
+
+    for (gStateKey in gStates) {
+      if (gStates.hasOwnProperty(gStateKey)) {
+        putGState(gStates[gStateKey]);
+      }
+    }
+  };
+
+  var putXobjectDict = function putXobjectDict() {
+    out("/XObject <<");
+
+    for (var xObjectKey in renderTargets) {
+      if (renderTargets.hasOwnProperty(xObjectKey) && renderTargets[xObjectKey].objectNumber >= 0) {
+        out("/" + xObjectKey + " " + renderTargets[xObjectKey].objectNumber + " 0 R");
+      }
+    } // Loop through images, or other data objects
+
+
+    events.publish("putXobjectDict");
+    out(">>");
+  };
+
+  var putEncryptionDict = function putEncryptionDict() {
+    encryption.oid = newObject();
+    out("<<");
+    out("/Filter /Standard");
+    out("/V " + encryption.v);
+    out("/R " + encryption.r);
+    out("/U <" + encryption.toHexString(encryption.U) + ">");
+    out("/O <" + encryption.toHexString(encryption.O) + ">");
+    out("/P " + encryption.P);
+    out(">>");
+    out("endobj");
+  };
+
+  var putFontDict = function putFontDict() {
+    out("/Font <<");
+
+    for (var fontKey in fonts) {
+      if (fonts.hasOwnProperty(fontKey)) {
+        if (putOnlyUsedFonts === false || putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey)) {
+          out("/" + fontKey + " " + fonts[fontKey].objectNumber + " 0 R");
+        }
+      }
+    }
+
+    out(">>");
+  };
+
+  var putShadingPatternDict = function putShadingPatternDict() {
+    if (Object.keys(patterns).length > 0) {
+      out("/Shading <<");
+
+      for (var patternKey in patterns) {
+        if (patterns.hasOwnProperty(patternKey) && patterns[patternKey] instanceof ShadingPattern && patterns[patternKey].objectNumber >= 0) {
+          out("/" + patternKey + " " + patterns[patternKey].objectNumber + " 0 R");
+        }
+      }
+
+      events.publish("putShadingPatternDict");
+      out(">>");
+    }
+  };
+
+  var putTilingPatternDict = function putTilingPatternDict(objectOid) {
+    if (Object.keys(patterns).length > 0) {
+      out("/Pattern <<");
+
+      for (var patternKey in patterns) {
+        if (patterns.hasOwnProperty(patternKey) && patterns[patternKey] instanceof API.TilingPattern && patterns[patternKey].objectNumber >= 0 && patterns[patternKey].objectNumber < objectOid // prevent cyclic dependencies
+        ) {
+            out("/" + patternKey + " " + patterns[patternKey].objectNumber + " 0 R");
+          }
+      }
+
+      events.publish("putTilingPatternDict");
+      out(">>");
+    }
+  };
+
+  var putGStatesDict = function putGStatesDict() {
+    if (Object.keys(gStates).length > 0) {
+      var gStateKey;
+      out("/ExtGState <<");
+
+      for (gStateKey in gStates) {
+        if (gStates.hasOwnProperty(gStateKey) && gStates[gStateKey].objectNumber >= 0) {
+          out("/" + gStateKey + " " + gStates[gStateKey].objectNumber + " 0 R");
+        }
+      }
+
+      events.publish("putGStateDict");
+      out(">>");
+    }
+  };
+
+  var putResourceDictionary = function putResourceDictionary(objectIds) {
+    newObjectDeferredBegin(objectIds.resourcesOid, true);
+    out("<<");
+    out("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]");
+    putFontDict();
+    putShadingPatternDict();
+    putTilingPatternDict(objectIds.objectOid);
+    putGStatesDict();
+    putXobjectDict();
+    out(">>");
+    out("endobj");
+  };
+
+  var putResources = function putResources() {
+    // FormObjects, Patterns etc. might use other FormObjects/Patterns/Images
+    // which means their resource dictionaries must contain the already resolved
+    // object ids. For this reason we defer the serialization of the resource
+    // dicts until all objects have been serialized and have object ids.
+    //
+    // In order to prevent cyclic dependencies (which Adobe Reader doesn't like),
+    // we only put all oids that are smaller than the oid of the object the
+    // resource dict belongs to. This is correct behavior, since the streams
+    // may only use other objects that have already been defined and thus appear
+    // earlier in their respective collection.
+    // Currently, this only affects tiling patterns, but a (more) correct
+    // implementation of FormObjects would also define their own resource dicts.
+    var deferredResourceDictionaryIds = [];
+    putFonts();
+    putGStates();
+    putXObjects();
+    putPatterns(deferredResourceDictionaryIds);
+    events.publish("putResources");
+    deferredResourceDictionaryIds.forEach(putResourceDictionary);
+    putResourceDictionary({
+      resourcesOid: resourceDictionaryObjId,
+      objectOid: Number.MAX_SAFE_INTEGER // output all objects
+
+    });
+    events.publish("postPutResources");
+  };
+
+  var putAdditionalObjects = function putAdditionalObjects() {
+    events.publish("putAdditionalObjects");
+
+    for (var i = 0; i < additionalObjects.length; i++) {
+      var obj = additionalObjects[i];
+      newObjectDeferredBegin(obj.objId, true);
+      out(obj.content);
+      out("endobj");
+    }
+
+    events.publish("postPutAdditionalObjects");
+  };
+
+  var addFontToFontDictionary = function addFontToFontDictionary(font) {
+    fontmap[font.fontName] = fontmap[font.fontName] || {};
+    fontmap[font.fontName][font.fontStyle] = font.id;
+  };
+
+  var addFont = function addFont(postScriptName, fontName, fontStyle, encoding, isStandardFont) {
+    var font = {
+      id: "F" + (Object.keys(fonts).length + 1).toString(10),
+      postScriptName: postScriptName,
+      fontName: fontName,
+      fontStyle: fontStyle,
+      encoding: encoding,
+      isStandardFont: isStandardFont || false,
+      metadata: {}
+    };
+    events.publish("addFont", {
+      font: font,
+      instance: this
+    });
+    fonts[font.id] = font;
+    addFontToFontDictionary(font);
+    return font.id;
+  };
+
+  var addFonts = function addFonts(arrayOfFonts) {
+    for (var i = 0, l = standardFonts.length; i < l; i++) {
+      var fontKey = addFont.call(this, arrayOfFonts[i][0], arrayOfFonts[i][1], arrayOfFonts[i][2], standardFonts[i][3], true);
+
+      if (putOnlyUsedFonts === false) {
+        usedFonts[fontKey] = true;
+      } // adding aliases for standard fonts, this time matching the capitalization
+
+
+      var parts = arrayOfFonts[i][0].split("-");
+      addFontToFontDictionary({
+        id: fontKey,
+        fontName: parts[0],
+        fontStyle: parts[1] || ""
+      });
+    }
+
+    events.publish("addFonts", {
+      fonts: fonts,
+      dictionary: fontmap
+    });
+  };
+
+  var SAFE = function __safeCall(fn) {
+    fn.foo = function __safeCallWrapper() {
+      try {
+        return fn.apply(this, arguments);
+      } catch (e) {
+        var stack = e.stack || "";
+        if (~stack.indexOf(" at ")) stack = stack.split(" at ")[1];
+        var m = "Error in function " + stack.split("\n")[0].split("<")[0] + ": " + e.message;
+
+        if (globalObject.console) {
+          globalObject.console.error(m, e);
+          if (globalObject.alert) alert(m);
+        } else {
+          throw new Error(m);
+        }
+      }
+    };
+
+    fn.foo.bar = fn;
+    return fn.foo;
+  };
+
+  var to8bitStream = function to8bitStream(text, flags) {
+    /**
+     * PDF 1.3 spec:
+     * "For text strings encoded in Unicode, the first two bytes must be 254 followed by
+     * 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts
+     * with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely
+     * to be a meaningful beginning of a word or phrase.) The remainder of the
+     * string consists of Unicode character codes, according to the UTF-16 encoding
+     * specified in the Unicode standard, version 2.0. Commonly used Unicode values
+     * are represented as 2 bytes per character, with the high-order byte appearing first
+     * in the string."
+     *
+     * In other words, if there are chars in a string with char code above 255, we
+     * recode the string to UCS2 BE - string doubles in length and BOM is prepended.
+     *
+     * HOWEVER!
+     * Actual *content* (body) text (as opposed to strings used in document properties etc)
+     * does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)
+     *
+     * Because of Adobe's focus on "you subset your fonts!" you are not supposed to have
+     * a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could
+     * fudge it with "Identity-H" encoding and custom CIDtoGID map that mimics Unicode
+     * code page. There, however, all characters in the stream are treated as GIDs,
+     * including BOM, which is the reason we need to skip BOM in content text (i.e. that
+     * that is tied to a font).
+     *
+     * To signal this "special" PDFEscape / to8bitStream handling mode,
+     * API.text() function sets (unless you overwrite it with manual values
+     * given to API.text(.., flags) )
+     * flags.autoencode = true
+     * flags.noBOM = true
+     *
+     * ===================================================================================
+     * `flags` properties relied upon:
+     *   .sourceEncoding = string with encoding label.
+     *                     "Unicode" by default. = encoding of the incoming text.
+     *                     pass some non-existing encoding name
+     *                     (ex: 'Do not touch my strings! I know what I am doing.')
+     *                     to make encoding code skip the encoding step.
+     *   .outputEncoding = Either valid PDF encoding name
+     *                     (must be supported by jsPDF font metrics, otherwise no encoding)
+     *                     or a JS object, where key = sourceCharCode, value = outputCharCode
+     *                     missing keys will be treated as: sourceCharCode === outputCharCode
+     *   .noBOM
+     *       See comment higher above for explanation for why this is important
+     *   .autoencode
+     *       See comment higher above for explanation for why this is important
+     */
+    var i, l, sourceEncoding, encodingBlock, outputEncoding, newtext, isUnicode, ch, bch;
+    flags = flags || {};
+    sourceEncoding = flags.sourceEncoding || "Unicode";
+    outputEncoding = flags.outputEncoding; // This 'encoding' section relies on font metrics format
+    // attached to font objects by, among others,
+    // "Willow Systems' standard_font_metrics plugin"
+    // see jspdf.plugin.standard_font_metrics.js for format
+    // of the font.metadata.encoding Object.
+    // It should be something like
+    //   .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}
+    //   .widths = {0:width, code:width, ..., 'fof':divisor}
+    //   .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}
+
+    if ((flags.autoencode || outputEncoding) && fonts[activeFontKey].metadata && fonts[activeFontKey].metadata[sourceEncoding] && fonts[activeFontKey].metadata[sourceEncoding].encoding) {
+      encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding; // each font has default encoding. Some have it clearly defined.
+
+      if (!outputEncoding && fonts[activeFontKey].encoding) {
+        outputEncoding = fonts[activeFontKey].encoding;
+      } // Hmmm, the above did not work? Let's try again, in different place.
+
+
+      if (!outputEncoding && encodingBlock.codePages) {
+        outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default
+      }
+
+      if (typeof outputEncoding === "string") {
+        outputEncoding = encodingBlock[outputEncoding];
+      } // we want output encoding to be a JS Object, where
+      // key = sourceEncoding's character code and
+      // value = outputEncoding's character code.
+
+
+      if (outputEncoding) {
+        isUnicode = false;
+        newtext = [];
+
+        for (i = 0, l = text.length; i < l; i++) {
+          ch = outputEncoding[text.charCodeAt(i)];
+
+          if (ch) {
+            newtext.push(String.fromCharCode(ch));
+          } else {
+            newtext.push(text[i]);
+          } // since we are looping over chars anyway, might as well
+          // check for residual unicodeness
+
+
+          if (newtext[i].charCodeAt(0) >> 8) {
+            /* more than 255 */
+            isUnicode = true;
+          }
+        }
+
+        text = newtext.join("");
+      }
+    }
+
+    i = text.length; // isUnicode may be set to false above. Hence the triple-equal to undefined
+
+    while (isUnicode === undefined && i !== 0) {
+      if (text.charCodeAt(i - 1) >> 8) {
+        /* more than 255 */
+        isUnicode = true;
+      }
+
+      i--;
+    }
+
+    if (!isUnicode) {
+      return text;
+    }
+
+    newtext = flags.noBOM ? [] : [254, 255];
+
+    for (i = 0, l = text.length; i < l; i++) {
+      ch = text.charCodeAt(i);
+      bch = ch >> 8; // divide by 256
+
+      if (bch >> 8) {
+        /* something left after dividing by 256 second time */
+        throw new Error("Character at position " + i + " of string '" + text + "' exceeds 16bits. Cannot be encoded into UCS-2 BE");
+      }
+
+      newtext.push(bch);
+      newtext.push(ch - (bch << 8));
+    }
+
+    return String.fromCharCode.apply(undefined, newtext);
+  };
+
+  var pdfEscape = API.__private__.pdfEscape = API.pdfEscape = function (text, flags) {
+    /**
+     * Replace '/', '(', and ')' with pdf-safe versions
+     *
+     * Doing to8bitStream does NOT make this PDF display unicode text. For that
+     * we also need to reference a unicode font and embed it - royal pain in the rear.
+     *
+     * There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,
+     * which JavaScript Strings are happy to provide. So, while we still cannot display
+     * 2-byte characters property, at least CONDITIONALLY converting (entire string containing)
+     * 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF
+     * is still parseable.
+     * This will allow immediate support for unicode in document properties strings.
+     */
+    return to8bitStream(text, flags).replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
+  };
+
+  var beginPage = API.__private__.beginPage = function (format) {
+    pages[++page] = [];
+    pagesContext[page] = {
+      objId: 0,
+      contentsObjId: 0,
+      userUnit: Number(userUnit),
+      artBox: null,
+      bleedBox: null,
+      cropBox: null,
+      trimBox: null,
+      mediaBox: {
+        bottomLeftX: 0,
+        bottomLeftY: 0,
+        topRightX: Number(format[0]),
+        topRightY: Number(format[1])
+      }
+    };
+
+    _setPage(page);
+
+    setOutputDestination(pages[currentPage]);
+  };
+
+  var _addPage = function _addPage(parmFormat, parmOrientation) {
+    var dimensions, width, height;
+    orientation = parmOrientation || orientation;
+
+    if (typeof parmFormat === "string") {
+      dimensions = getPageFormat(parmFormat.toLowerCase());
+
+      if (Array.isArray(dimensions)) {
+        width = dimensions[0];
+        height = dimensions[1];
+      }
+    }
+
+    if (Array.isArray(parmFormat)) {
+      width = parmFormat[0] * scaleFactor;
+      height = parmFormat[1] * scaleFactor;
+    }
+
+    if (isNaN(width)) {
+      width = format[0];
+      height = format[1];
+    }
+
+    if (width > 14400 || height > 14400) {
+      console.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400");
+      width = Math.min(14400, width);
+      height = Math.min(14400, height);
+    }
+
+    format = [width, height];
+
+    switch (orientation.substr(0, 1)) {
+      case "l":
+        if (height > width) {
+          format = [height, width];
+        }
+
+        break;
+
+      case "p":
+        if (width > height) {
+          format = [height, width];
+        }
+
+        break;
+    }
+
+    beginPage(format); // Set line width
+
+    setLineWidth(lineWidth); // Set draw color
+
+    out(strokeColor); // resurrecting non-default line caps, joins
+
+    if (lineCapID !== 0) {
+      out(lineCapID + " J");
+    }
+
+    if (lineJoinID !== 0) {
+      out(lineJoinID + " j");
+    }
+
+    events.publish("addPage", {
+      pageNumber: page
+    });
+  };
+
+  var _deletePage = function _deletePage(n) {
+    if (n > 0 && n <= page) {
+      pages.splice(n, 1);
+      pagesContext.splice(n, 1);
+      page--;
+
+      if (currentPage > page) {
+        currentPage = page;
+      }
+
+      this.setPage(currentPage);
+    }
+  };
+
+  var _setPage = function _setPage(n) {
+    if (n > 0 && n <= page) {
+      currentPage = n;
+    }
+  };
+
+  var getNumberOfPages = API.__private__.getNumberOfPages = API.getNumberOfPages = function () {
+    return pages.length - 1;
+  };
+  /**
+   * Returns a document-specific font key - a label assigned to a
+   * font name + font type combination at the time the font was added
+   * to the font inventory.
+   *
+   * Font key is used as label for the desired font for a block of text
+   * to be added to the PDF document stream.
+   * @private
+   * @function
+   * @param fontName {string} can be undefined on "falthy" to indicate "use current"
+   * @param fontStyle {string} can be undefined on "falthy" to indicate "use current"
+   * @returns {string} Font key.
+   * @ignore
+   */
+
+
+  var getFont = function getFont(fontName, fontStyle, options) {
+    var key = undefined,
+        fontNameLowerCase;
+    options = options || {};
+    fontName = fontName !== undefined ? fontName : fonts[activeFontKey].fontName;
+    fontStyle = fontStyle !== undefined ? fontStyle : fonts[activeFontKey].fontStyle;
+    fontNameLowerCase = fontName.toLowerCase();
+
+    if (fontmap[fontNameLowerCase] !== undefined && fontmap[fontNameLowerCase][fontStyle] !== undefined) {
+      key = fontmap[fontNameLowerCase][fontStyle];
+    } else if (fontmap[fontName] !== undefined && fontmap[fontName][fontStyle] !== undefined) {
+      key = fontmap[fontName][fontStyle];
+    } else {
+      if (options.disableWarning === false) {
+        console.warn("Unable to look up font label for font '" + fontName + "', '" + fontStyle + "'. Refer to getFontList() for available fonts.");
+      }
+    }
+
+    if (!key && !options.noFallback) {
+      key = fontmap["times"][fontStyle];
+
+      if (key == null) {
+        key = fontmap["times"]["normal"];
+      }
+    }
+
+    return key;
+  };
+
+  var putInfo = API.__private__.putInfo = function () {
+    var objectId = newObject();
+
+    var encryptor = function encryptor(data) {
+      return data;
+    };
+
+    if (encryptionOptions !== null) {
+      encryptor = encryption.encryptor(objectId, 0);
+    }
+
+    out("<<");
+    out("/Producer (" + pdfEscape(encryptor("jsPDF " + jsPDF.version)) + ")");
+
+    for (var key in documentProperties) {
+      if (documentProperties.hasOwnProperty(key) && documentProperties[key]) {
+        out("/" + key.substr(0, 1).toUpperCase() + key.substr(1) + " (" + pdfEscape(encryptor(documentProperties[key])) + ")");
+      }
+    }
+
+    out("/CreationDate (" + pdfEscape(encryptor(creationDate)) + ")");
+    out(">>");
+    out("endobj");
+  };
+
+  var putCatalog = API.__private__.putCatalog = function (options) {
+    options = options || {};
+    var tmpRootDictionaryObjId = options.rootDictionaryObjId || rootDictionaryObjId;
+    newObject();
+    out("<<");
+    out("/Type /Catalog");
+    out("/Pages " + tmpRootDictionaryObjId + " 0 R"); // PDF13ref Section 7.2.1
+
+    if (!zoomMode) zoomMode = "fullwidth";
+
+    switch (zoomMode) {
+      case "fullwidth":
+        out("/OpenAction [3 0 R /FitH null]");
+        break;
+
+      case "fullheight":
+        out("/OpenAction [3 0 R /FitV null]");
+        break;
+
+      case "fullpage":
+        out("/OpenAction [3 0 R /Fit]");
+        break;
+
+      case "original":
+        out("/OpenAction [3 0 R /XYZ null null 1]");
+        break;
+
+      default:
+        var pcn = "" + zoomMode;
+        if (pcn.substr(pcn.length - 1) === "%") zoomMode = parseInt(zoomMode) / 100;
+
+        if (typeof zoomMode === "number") {
+          out("/OpenAction [3 0 R /XYZ null null " + f2(zoomMode) + "]");
+        }
+
+    }
+
+    if (!layoutMode) layoutMode = "continuous";
+
+    switch (layoutMode) {
+      case "continuous":
+        out("/PageLayout /OneColumn");
+        break;
+
+      case "single":
+        out("/PageLayout /SinglePage");
+        break;
+
+      case "two":
+      case "twoleft":
+        out("/PageLayout /TwoColumnLeft");
+        break;
+
+      case "tworight":
+        out("/PageLayout /TwoColumnRight");
+        break;
+    }
+
+    if (pageMode) {
+      /**
+       * A name object specifying how the document should be displayed when opened:
+       * UseNone      : Neither document outline nor thumbnail images visible -- DEFAULT
+       * UseOutlines  : Document outline visible
+       * UseThumbs    : Thumbnail images visible
+       * FullScreen   : Full-screen mode, with no menu bar, window controls, or any other window visible
+       */
+      out("/PageMode /" + pageMode);
+    }
+
+    events.publish("putCatalog");
+    out(">>");
+    out("endobj");
+  };
+
+  var putTrailer = API.__private__.putTrailer = function () {
+    out("trailer");
+    out("<<");
+    out("/Size " + (objectNumber + 1)); // Root and Info must be the last and second last objects written respectively
+
+    out("/Root " + objectNumber + " 0 R");
+    out("/Info " + (objectNumber - 1) + " 0 R");
+
+    if (encryptionOptions !== null) {
+      out("/Encrypt " + encryption.oid + " 0 R");
+    }
+
+    out("/ID [ <" + fileId + "> <" + fileId + "> ]");
+    out(">>");
+  };
+
+  var putHeader = API.__private__.putHeader = function () {
+    out("%PDF-" + pdfVersion);
+    out("%\xBA\xDF\xAC\xE0");
+  };
+
+  var putXRef = API.__private__.putXRef = function () {
+    var p = "0000000000";
+    out("xref");
+    out("0 " + (objectNumber + 1));
+    out("0000000000 65535 f ");
+
+    for (var i = 1; i <= objectNumber; i++) {
+      var offset = offsets[i];
+
+      if (typeof offset === "function") {
+        out((p + offsets[i]()).slice(-10) + " 00000 n ");
+      } else {
+        if (typeof offsets[i] !== "undefined") {
+          out((p + offsets[i]).slice(-10) + " 00000 n ");
+        } else {
+          out("0000000000 00000 n ");
+        }
+      }
+    }
+  };
+
+  var buildDocument = API.__private__.buildDocument = function () {
+    resetDocument();
+    setOutputDestination(content);
+    events.publish("buildDocument");
+    putHeader();
+    putPages();
+    putAdditionalObjects();
+    putResources();
+    if (encryptionOptions !== null) putEncryptionDict();
+    putInfo();
+    putCatalog();
+    var offsetOfXRef = contentLength;
+    putXRef();
+    putTrailer();
+    out("startxref");
+    out("" + offsetOfXRef);
+    out("%%EOF");
+    setOutputDestination(pages[currentPage]);
+    return content.join("\n");
+  };
+
+  var getBlob = API.__private__.getBlob = function (data) {
+    return new Blob([getArrayBuffer(data)], {
+      type: "application/pdf"
+    });
+  };
+  /**
+   * Generates the PDF document.
+   *
+   * If `type` argument is undefined, output is raw body of resulting PDF returned as a string.
+   *
+   * @param {string} type A string identifying one of the possible output types.<br/>
+   *                      Possible values are: <br/>
+   *                          'arraybuffer' -> (ArrayBuffer)<br/>
+   *                          'blob' -> (Blob)<br/>
+   *                          'bloburi'/'bloburl' -> (string)<br/>
+   *                          'datauristring'/'dataurlstring' -> (string)<br/>
+   *                          'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>
+   *                          'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>
+   *                          'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>
+   *                          'pdfjsnewwindow' -> (wind | null)
+   * @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>
+   *                                Possible options are 'filename'.<br/>
+   *                                A string can be passed instead of {filename:string} and defaults to 'generated.pdf'
+   * @function
+   * @instance
+   * @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}
+   * @memberof jsPDF#
+   * @name output
+   */
+
+
+  var output = API.output = API.__private__.output = SAFE(function output(type, options) {
+    options = options || {};
+
+    if (typeof options === "string") {
+      options = {
+        filename: options
+      };
+    } else {
+      options.filename = options.filename || "generated.pdf";
+    }
+
+    switch (type) {
+      case undefined:
+        return buildDocument();
+
+      case "save":
+        API.save(options.filename);
+        break;
+
+      case "arraybuffer":
+        return getArrayBuffer(buildDocument());
+
+      case "blob":
+        return getBlob(buildDocument());
+
+      case "bloburi":
+      case "bloburl":
+        // Developer is responsible of calling revokeObjectURL
+        if (typeof globalObject.URL !== "undefined" && typeof globalObject.URL.createObjectURL === "function") {
+          return globalObject.URL && globalObject.URL.createObjectURL(getBlob(buildDocument())) || void 0;
+        } else {
+          console.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");
+        }
+
+        break;
+
+      case "datauristring":
+      case "dataurlstring":
+        var dataURI = "";
+        var pdfDocument = buildDocument();
+
+        try {
+          dataURI = btoa(pdfDocument);
+        } catch (e) {
+          dataURI = btoa(unescape(encodeURIComponent(pdfDocument)));
+        }
+
+        return "data:application/pdf;filename=" + options.filename + ";base64," + dataURI;
+
+      case "pdfobjectnewwindow":
+        if (Object.prototype.toString.call(globalObject) === "[object Window]") {
+          var pdfObjectUrl = "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js";
+          var integrity = ' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';
+
+          if (options.pdfObjectUrl) {
+            pdfObjectUrl = options.pdfObjectUrl;
+            integrity = "";
+          }
+
+          var htmlForNewWindow = "<html>" + '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="' + pdfObjectUrl + '"' + integrity + '></script><script >PDFObject.embed("' + this.output("dataurlstring") + '", ' + JSON.stringify(options) + ");</script></body></html>";
+          var nW = globalObject.open();
+
+          if (nW !== null) {
+            nW.document.write(htmlForNewWindow);
+          }
+
+          return nW;
+        } else {
+          throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");
+        }
+
+      case "pdfjsnewwindow":
+        if (Object.prototype.toString.call(globalObject) === "[object Window]") {
+          var pdfJsUrl = options.pdfJsUrl || "examples/PDF.js/web/viewer.html";
+          var htmlForPDFjsNewWindow = "<html>" + "<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>" + '<body><iframe id="pdfViewer" src="' + pdfJsUrl + "?file=&downloadName=" + options.filename + '" width="500px" height="400px" />' + "</body></html>";
+          var PDFjsNewWindow = globalObject.open();
+
+          if (PDFjsNewWindow !== null) {
+            PDFjsNewWindow.document.write(htmlForPDFjsNewWindow);
+            var scope = this;
+
+            PDFjsNewWindow.document.documentElement.querySelector("#pdfViewer").onload = function () {
+              PDFjsNewWindow.document.title = options.filename;
+              PDFjsNewWindow.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(scope.output("bloburl"));
+            };
+          }
+
+          return PDFjsNewWindow;
+        } else {
+          throw new Error("The option pdfjsnewwindow just works in a browser-environment.");
+        }
+
+      case "dataurlnewwindow":
+        if (Object.prototype.toString.call(globalObject) === "[object Window]") {
+          var htmlForDataURLNewWindow = "<html>" + "<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>" + "<body>" + '<iframe src="' + this.output("datauristring", options) + '"></iframe>' + "</body></html>";
+          var dataURLNewWindow = globalObject.open();
+
+          if (dataURLNewWindow !== null) {
+            dataURLNewWindow.document.write(htmlForDataURLNewWindow);
+            dataURLNewWindow.document.title = options.filename;
+          }
+
+          if (dataURLNewWindow || typeof safari === "undefined") return dataURLNewWindow;
+        } else {
+          throw new Error("The option dataurlnewwindow just works in a browser-environment.");
+        }
+
+        break;
+
+      case "datauri":
+      case "dataurl":
+        return globalObject.document.location.href = this.output("datauristring", options);
+
+      default:
+        return null;
+    }
+  });
+  /**
+   * Used to see if a supplied hotfix was requested when the pdf instance was created.
+   * @param {string} hotfixName - The name of the hotfix to check.
+   * @returns {boolean}
+   */
+
+  var hasHotfix = function hasHotfix(hotfixName) {
+    return Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1;
+  };
+
+  switch (unit) {
+    case "pt":
+      scaleFactor = 1;
+      break;
+
+    case "mm":
+      scaleFactor = 72 / 25.4;
+      break;
+
+    case "cm":
+      scaleFactor = 72 / 2.54;
+      break;
+
+    case "in":
+      scaleFactor = 72;
+      break;
+
+    case "px":
+      if (hasHotfix("px_scaling") == true) {
+        scaleFactor = 72 / 96;
+      } else {
+        scaleFactor = 96 / 72;
+      }
+
+      break;
+
+    case "pc":
+      scaleFactor = 12;
+      break;
+
+    case "em":
+      scaleFactor = 12;
+      break;
+
+    case "ex":
+      scaleFactor = 6;
+      break;
+
+    default:
+      if (typeof unit === "number") {
+        scaleFactor = unit;
+      } else {
+        throw new Error("Invalid unit: " + unit);
+      }
+
+  }
+
+  var encryption = null;
+  setCreationDate();
+  setFileId();
+
+  var getEncryptor = function getEncryptor(objectId) {
+    if (encryptionOptions !== null) {
+      return encryption.encryptor(objectId, 0);
+    }
+
+    return function (data) {
+      return data;
+    };
+  }; //---------------------------------------
+  // Public API
+
+
+  var getPageInfo = API.__private__.getPageInfo = API.getPageInfo = function (pageNumberOneBased) {
+    if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {
+      throw new Error("Invalid argument passed to jsPDF.getPageInfo");
+    }
+
+    var objId = pagesContext[pageNumberOneBased].objId;
+    return {
+      objId: objId,
+      pageNumber: pageNumberOneBased,
+      pageContext: pagesContext[pageNumberOneBased]
+    };
+  };
+
+  var getPageInfoByObjId = API.__private__.getPageInfoByObjId = function (objId) {
+    if (isNaN(objId) || objId % 1 !== 0) {
+      throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");
+    }
+
+    for (var pageNumber in pagesContext) {
+      if (pagesContext[pageNumber].objId === objId) {
+        break;
+      }
+    }
+
+    return getPageInfo(pageNumber);
+  };
+
+  var getCurrentPageInfo = API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function () {
+    return {
+      objId: pagesContext[currentPage].objId,
+      pageNumber: currentPage,
+      pageContext: pagesContext[currentPage]
+    };
+  };
+  /**
+   * Adds (and transfers the focus to) new page to the PDF document.
+   * @param format {String/Array} The format of the new page. Can be: <ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />
+   * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
+   * @param orientation {string} Orientation of the new page. Possible values are "portrait" or "landscape" (or shortcuts "p" (Default), "l").
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   *
+   * @memberof jsPDF#
+   * @name addPage
+   */
+
+
+  API.addPage = function () {
+    _addPage.apply(this, arguments);
+
+    return this;
+  };
+  /**
+   * Adds (and transfers the focus to) new page to the PDF document.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   *
+   * @memberof jsPDF#
+   * @name setPage
+   * @param {number} page Switch the active page to the page number specified (indexed starting at 1).
+   * @example
+   * doc = jsPDF()
+   * doc.addPage()
+   * doc.addPage()
+   * doc.text('I am on page 3', 10, 10)
+   * doc.setPage(1)
+   * doc.text('I am on page 1', 10, 10)
+   */
+
+
+  API.setPage = function () {
+    _setPage.apply(this, arguments);
+
+    setOutputDestination.call(this, pages[currentPage]);
+    return this;
+  };
+  /**
+   * @name insertPage
+   * @memberof jsPDF#
+   *
+   * @function
+   * @instance
+   * @param {Object} beforePage
+   * @returns {jsPDF}
+   */
+
+
+  API.insertPage = function (beforePage) {
+    this.addPage();
+    this.movePage(currentPage, beforePage);
+    return this;
+  };
+  /**
+   * @name movePage
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {number} targetPage
+   * @param {number} beforePage
+   * @returns {jsPDF}
+   */
+
+
+  API.movePage = function (targetPage, beforePage) {
+    var tmpPages, tmpPagesContext;
+
+    if (targetPage > beforePage) {
+      tmpPages = pages[targetPage];
+      tmpPagesContext = pagesContext[targetPage];
+
+      for (var i = targetPage; i > beforePage; i--) {
+        pages[i] = pages[i - 1];
+        pagesContext[i] = pagesContext[i - 1];
+      }
+
+      pages[beforePage] = tmpPages;
+      pagesContext[beforePage] = tmpPagesContext;
+      this.setPage(beforePage);
+    } else if (targetPage < beforePage) {
+      tmpPages = pages[targetPage];
+      tmpPagesContext = pagesContext[targetPage];
+
+      for (var j = targetPage; j < beforePage; j++) {
+        pages[j] = pages[j + 1];
+        pagesContext[j] = pagesContext[j + 1];
+      }
+
+      pages[beforePage] = tmpPages;
+      pagesContext[beforePage] = tmpPagesContext;
+      this.setPage(beforePage);
+    }
+
+    return this;
+  };
+  /**
+   * Deletes a page from the PDF.
+   * @name deletePage
+   * @memberof jsPDF#
+   * @function
+   * @param {number} targetPage
+   * @instance
+   * @returns {jsPDF}
+   */
+
+
+  API.deletePage = function () {
+    _deletePage.apply(this, arguments);
+
+    return this;
+  };
+  /**
+   * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.
+   *
+   * @function
+   * @instance
+   * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+   * @param {Object} [options] - Collection of settings signaling how the text must be encoded.
+   * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.
+   * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging
+   * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.
+   * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.
+   * @param {number} [options.charSpace=0] - The space between each letter.
+   * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.
+   * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.
+   * @param {Object} [options.flags] - Flags for to8bitStream.
+   * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.
+   * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.
+   * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.
+   * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.
+   * @param {boolean} [options.isInputVisual] - Option for the BidiEngine
+   * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine
+   * @param {boolean} [options.isInputRtl] - Option for the BidiEngine
+   * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine
+   * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine
+   * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.
+   *
+   * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing
+   * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this
+   * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a
+   * DIFFERENT result. A matrix is only allowed in "advanced" API mode.
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name text
+   */
+
+
+  API.__private__.text = API.text = function (text, x, y, options, transform) {
+    /*
+     * Inserts something like this into PDF
+     *   BT
+     *    /F1 16 Tf  % Font name + size
+     *    16 TL % How many units down for next line in multiline text
+     *    0 g % color
+     *    28.35 813.54 Td % position
+     *    (line one) Tj
+     *    T* (line two) Tj
+     *    T* (line three) Tj
+     *   ET
+     */
+    options = options || {};
+    var scope = options.scope || this;
+    var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale; // Pre-August-2012 the order of arguments was function(x, y, text, flags)
+    // in effort to make all calls have similar signature like
+    //   function(data, coordinates... , miscellaneous)
+    // this method had its args flipped.
+    // code below allows backward compatibility with old arg order.
+
+    if (typeof text === "number" && typeof x === "number" && (typeof y === "string" || Array.isArray(y))) {
+      var tmp = y;
+      y = x;
+      x = text;
+      text = tmp;
+    }
+
+    var transformationMatrix;
+
+    if (arguments[3] instanceof Matrix === false) {
+      flags = arguments[3];
+      angle = arguments[4];
+      align = arguments[5];
+
+      if (_typeof(flags) !== "object" || flags === null) {
+        if (typeof angle === "string") {
+          align = angle;
+          angle = null;
+        }
+
+        if (typeof flags === "string") {
+          align = flags;
+          flags = null;
+        }
+
+        if (typeof flags === "number") {
+          angle = flags;
+          flags = null;
+        }
+
+        options = {
+          flags: flags,
+          angle: angle,
+          align: align
+        };
+      }
+    } else {
+      advancedApiModeTrap("The transform parameter of text() with a Matrix value");
+      transformationMatrix = transform;
+    }
+
+    if (isNaN(x) || isNaN(y) || typeof text === "undefined" || text === null) {
+      throw new Error("Invalid arguments passed to jsPDF.text");
+    }
+
+    if (text.length === 0) {
+      return scope;
+    }
+
+    var xtra = "";
+    var isHex = false;
+    var lineHeight = typeof options.lineHeightFactor === "number" ? options.lineHeightFactor : lineHeightFactor;
+    var scaleFactor = scope.internal.scaleFactor;
+
+    function ESC(s) {
+      s = s.split("\t").join(Array(options.TabLen || 9).join(" "));
+      return pdfEscape(s, flags);
+    }
+
+    function transformTextToSpecialArray(text) {
+      //we don't want to destroy original text array, so cloning it
+      var sa = text.concat();
+      var da = [];
+      var len = sa.length;
+      var curDa; //we do array.join('text that must not be PDFescaped")
+      //thus, pdfEscape each component separately
+
+      while (len--) {
+        curDa = sa.shift();
+
+        if (typeof curDa === "string") {
+          da.push(curDa);
+        } else {
+          if (Array.isArray(text) && (curDa.length === 1 || curDa[1] === undefined && curDa[2] === undefined)) {
+            da.push(curDa[0]);
+          } else {
+            da.push([curDa[0], curDa[1], curDa[2]]);
+          }
+        }
+      }
+
+      return da;
+    }
+
+    function processTextByFunction(text, processingFunction) {
+      var result;
+
+      if (typeof text === "string") {
+        result = processingFunction(text)[0];
+      } else if (Array.isArray(text)) {
+        //we don't want to destroy original text array, so cloning it
+        var sa = text.concat();
+        var da = [];
+        var len = sa.length;
+        var curDa;
+        var tmpResult; //we do array.join('text that must not be PDFescaped")
+        //thus, pdfEscape each component separately
+
+        while (len--) {
+          curDa = sa.shift();
+
+          if (typeof curDa === "string") {
+            da.push(processingFunction(curDa)[0]);
+          } else if (Array.isArray(curDa) && typeof curDa[0] === "string") {
+            tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);
+            da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);
+          }
+        }
+
+        result = da;
+      }
+
+      return result;
+    } //Check if text is of type String
+
+
+    var textIsOfTypeString = false;
+    var tmpTextIsOfTypeString = true;
+
+    if (typeof text === "string") {
+      textIsOfTypeString = true;
+    } else if (Array.isArray(text)) {
+      //we don't want to destroy original text array, so cloning it
+      var sa = text.concat();
+      da = [];
+      var len = sa.length;
+      var curDa; //we do array.join('text that must not be PDFescaped")
+      //thus, pdfEscape each component separately
+
+      while (len--) {
+        curDa = sa.shift();
+
+        if (typeof curDa !== "string" || Array.isArray(curDa) && typeof curDa[0] !== "string") {
+          tmpTextIsOfTypeString = false;
+        }
+      }
+
+      textIsOfTypeString = tmpTextIsOfTypeString;
+    }
+
+    if (textIsOfTypeString === false) {
+      throw new Error('Type of text must be string or Array. "' + text + '" is not recognized.');
+    } //If there are any newlines in text, we assume
+    //the user wanted to print multiple lines, so break the
+    //text up into an array. If the text is already an array,
+    //we assume the user knows what they are doing.
+    //Convert text into an array anyway to simplify
+    //later code.
+
+
+    if (typeof text === "string") {
+      if (text.match(/[\r?\n]/)) {
+        text = text.split(/\r\n|\r|\n/g);
+      } else {
+        text = [text];
+      }
+    } //baseline
+
+
+    var height = activeFontSize / scope.internal.scaleFactor;
+    var descent = height * (lineHeight - 1);
+
+    switch (options.baseline) {
+      case "bottom":
+        y -= descent;
+        break;
+
+      case "top":
+        y += height - descent;
+        break;
+
+      case "hanging":
+        y += height - 2 * descent;
+        break;
+
+      case "middle":
+        y += height / 2 - descent;
+        break;
+    } //multiline
+
+
+    maxWidth = options.maxWidth || 0;
+
+    if (maxWidth > 0) {
+      if (typeof text === "string") {
+        text = scope.splitTextToSize(text, maxWidth);
+      } else if (Object.prototype.toString.call(text) === "[object Array]") {
+        text = text.reduce(function (acc, textLine) {
+          return acc.concat(scope.splitTextToSize(textLine, maxWidth));
+        }, []);
+      }
+    } //creating Payload-Object to make text byRef
+
+
+    payload = {
+      text: text,
+      x: x,
+      y: y,
+      options: options,
+      mutex: {
+        pdfEscape: pdfEscape,
+        activeFontKey: activeFontKey,
+        fonts: fonts,
+        activeFontSize: activeFontSize
+      }
+    };
+    events.publish("preProcessText", payload);
+    text = payload.text;
+    options = payload.options; //angle
+
+    angle = options.angle;
+
+    if (transformationMatrix instanceof Matrix === false && angle && typeof angle === "number") {
+      angle *= Math.PI / 180;
+
+      if (options.rotationDirection === 0) {
+        angle = -angle;
+      }
+
+      if (apiMode === ApiMode.ADVANCED) {
+        angle = -angle;
+      }
+
+      var c = Math.cos(angle);
+      var s = Math.sin(angle);
+      transformationMatrix = new Matrix(c, s, -s, c, 0, 0);
+    } else if (angle && angle instanceof Matrix) {
+      transformationMatrix = angle;
+    }
+
+    if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {
+      transformationMatrix = identityMatrix;
+    } //charSpace
+
+
+    charSpace = options.charSpace || activeCharSpace;
+
+    if (typeof charSpace !== "undefined") {
+      xtra += hpf(scale(charSpace)) + " Tc\n";
+      this.setCharSpace(this.getCharSpace() || 0);
+    }
+
+    horizontalScale = options.horizontalScale;
+
+    if (typeof horizontalScale !== "undefined") {
+      xtra += hpf(horizontalScale * 100) + " Tz\n";
+    } //lang
+
+
+    var lang = options.lang;
+
+
+    var renderingMode = -1;
+    var parmRenderingMode = typeof options.renderingMode !== "undefined" ? options.renderingMode : options.stroke;
+    var pageContext = scope.internal.getCurrentPageInfo().pageContext;
+
+    switch (parmRenderingMode) {
+      case 0:
+      case false:
+      case "fill":
+        renderingMode = 0;
+        break;
+
+      case 1:
+      case true:
+      case "stroke":
+        renderingMode = 1;
+        break;
+
+      case 2:
+      case "fillThenStroke":
+        renderingMode = 2;
+        break;
+
+      case 3:
+      case "invisible":
+        renderingMode = 3;
+        break;
+
+      case 4:
+      case "fillAndAddForClipping":
+        renderingMode = 4;
+        break;
+
+      case 5:
+      case "strokeAndAddPathForClipping":
+        renderingMode = 5;
+        break;
+
+      case 6:
+      case "fillThenStrokeAndAddToPathForClipping":
+        renderingMode = 6;
+        break;
+
+      case 7:
+      case "addToPathForClipping":
+        renderingMode = 7;
+        break;
+    }
+
+    var usedRenderingMode = typeof pageContext.usedRenderingMode !== "undefined" ? pageContext.usedRenderingMode : -1; //if the coder wrote it explicitly to use a specific
+    //renderingMode, then use it
+
+    if (renderingMode !== -1) {
+      xtra += renderingMode + " Tr\n"; //otherwise check if we used the rendering Mode already
+      //if so then set the rendering Mode...
+    } else if (usedRenderingMode !== -1) {
+      xtra += "0 Tr\n";
+    }
+
+    if (renderingMode !== -1) {
+      pageContext.usedRenderingMode = renderingMode;
+    } //align
+
+
+    align = options.align || "left";
+    var leading = activeFontSize * lineHeight;
+    var pageWidth = scope.internal.pageSize.getWidth();
+    var activeFont = fonts[activeFontKey];
+    charSpace = options.charSpace || activeCharSpace;
+    maxWidth = options.maxWidth || 0;
+    var lineWidths;
+    flags = Object.assign({
+      autoencode: true,
+      noBOM: true
+    }, options.flags);
+    var wordSpacingPerLine = [];
+
+    var findWidth = function findWidth(v) {
+      return scope.getStringUnitWidth(v, {
+        font: activeFont,
+        charSpace: charSpace,
+        fontSize: activeFontSize,
+        doKerning: false
+      }) * activeFontSize / scaleFactor;
+    };
+
+    if (Object.prototype.toString.call(text) === "[object Array]") {
+      da = transformTextToSpecialArray(text);
+      var newY;
+
+      if (align !== "left") {
+        lineWidths = da.map(findWidth);
+      } //The first line uses the "main" Td setting,
+      //and the subsequent lines are offset by the
+      //previous line's x coordinate.
+
+
+      var prevWidth = 0;
+      var newX;
+
+      if (align === "right") {
+        //The passed in x coordinate defines the
+        //rightmost point of the text.
+        x -= lineWidths[0];
+        text = [];
+        len = da.length;
+
+        for (var i = 0; i < len; i++) {
+          if (i === 0) {
+            newX = getHorizontalCoordinate(x);
+            newY = getVerticalCoordinate(y);
+          } else {
+            newX = scale(prevWidth - lineWidths[i]);
+            newY = -leading;
+          }
+
+          text.push([da[i], newX, newY]);
+          prevWidth = lineWidths[i];
+        }
+      } else if (align === "center") {
+        //The passed in x coordinate defines
+        //the center point.
+        x -= lineWidths[0] / 2;
+        text = [];
+        len = da.length;
+
+        for (var j = 0; j < len; j++) {
+          if (j === 0) {
+            newX = getHorizontalCoordinate(x);
+            newY = getVerticalCoordinate(y);
+          } else {
+            newX = scale((prevWidth - lineWidths[j]) / 2);
+            newY = -leading;
+          }
+
+          text.push([da[j], newX, newY]);
+          prevWidth = lineWidths[j];
+        }
+      } else if (align === "left") {
+        text = [];
+        len = da.length;
+
+        for (var h = 0; h < len; h++) {
+          text.push(da[h]);
+        }
+      } else if (align === "justify" && activeFont.encoding === "Identity-H") {
+        // when using unicode fonts, wordSpacePerLine does not apply
+        text = [];
+        len = da.length;
+        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;
+        var backToStartX = 0;
+
+        for (var l = 0; l < len; l++) {
+          newY = l === 0 ? getVerticalCoordinate(y) : -leading;
+          newX = l === 0 ? getHorizontalCoordinate(x) : backToStartX;
+
+          if (l < len - 1) {
+            var spacing = scale((maxWidth - lineWidths[l]) / (da[l].split(" ").length - 1));
+            var words = da[l].split(" ");
+            text.push([words[0] + " ", newX, newY]);
+            backToStartX = 0; // distance to reset back to the left
+
+            for (var _i = 1; _i < words.length; _i++) {
+              var shiftAmount = (findWidth(words[_i - 1] + " " + words[_i]) - findWidth(words[_i])) * scaleFactor + spacing;
+              if (_i == words.length - 1) text.push([words[_i], shiftAmount, 0]);else text.push([words[_i] + " ", shiftAmount, 0]);
+              backToStartX -= shiftAmount;
+            }
+          } else {
+            text.push([da[l], newX, newY]);
+          }
+        }
+
+        text.push(["", backToStartX, 0]);
+      } else if (align === "justify") {
+        text = [];
+        len = da.length;
+        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;
+
+        for (var l = 0; l < len; l++) {
+          newY = l === 0 ? getVerticalCoordinate(y) : -leading;
+          newX = l === 0 ? getHorizontalCoordinate(x) : 0;
+
+          if (l < len - 1) {
+            wordSpacingPerLine.push(hpf(scale((maxWidth - lineWidths[l]) / (da[l].split(" ").length - 1))));
+          } else {
+            wordSpacingPerLine.push(0);
+          }
+
+          text.push([da[l], newX, newY]);
+        }
+      } else {
+        throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');
+      }
+    } //R2L
+
+
+    var doReversing = typeof options.R2L === "boolean" ? options.R2L : R2L;
+
+    if (doReversing === true) {
+      text = processTextByFunction(text, function (text, posX, posY) {
+        return [text.split("").reverse().join(""), posX, posY];
+      });
+    } //creating Payload-Object to make text byRef
+
+
+    payload = {
+      text: text,
+      x: x,
+      y: y,
+      options: options,
+      mutex: {
+        pdfEscape: pdfEscape,
+        activeFontKey: activeFontKey,
+        fonts: fonts,
+        activeFontSize: activeFontSize
+      }
+    };
+    events.publish("postProcessText", payload);
+    text = payload.text;
+    isHex = payload.mutex.isHex || false; //Escaping
+
+    var activeFontEncoding = fonts[activeFontKey].encoding;
+
+    if (activeFontEncoding === "WinAnsiEncoding" || activeFontEncoding === "StandardEncoding") {
+      text = processTextByFunction(text, function (text, posX, posY) {
+        return [ESC(text), posX, posY];
+      });
+    }
+
+    da = transformTextToSpecialArray(text);
+    text = [];
+    var STRING = 0;
+    var ARRAY = 1;
+    var variant = Array.isArray(da[0]) ? ARRAY : STRING;
+    var posX;
+    var posY;
+    var content;
+    var wordSpacing = "";
+
+    var generatePosition = function generatePosition(parmPosX, parmPosY, parmTransformationMatrix) {
+      var position = "";
+
+      if (parmTransformationMatrix instanceof Matrix) {
+        // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y
+        // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied
+        // in the coordinate system established by this matrix
+        if (typeof options.angle === "number") {
+          parmTransformationMatrix = matrixMult(parmTransformationMatrix, new Matrix(1, 0, 0, 1, parmPosX, parmPosY));
+        } else {
+          parmTransformationMatrix = matrixMult(new Matrix(1, 0, 0, 1, parmPosX, parmPosY), parmTransformationMatrix);
+        }
+
+        if (apiMode === ApiMode.ADVANCED) {
+          parmTransformationMatrix = matrixMult(new Matrix(1, 0, 0, -1, 0, 0), parmTransformationMatrix);
+        }
+
+        position = parmTransformationMatrix.join(" ") + " Tm\n";
+      } else {
+        position = hpf(parmPosX) + " " + hpf(parmPosY) + " Td\n";
+      }
+
+      return position;
+    };
+
+    for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {
+      wordSpacing = "";
+
+      switch (variant) {
+        case ARRAY:
+          content = (isHex ? "<" : "(") + da[lineIndex][0] + (isHex ? ">" : ")");
+          posX = parseFloat(da[lineIndex][1]);
+          posY = parseFloat(da[lineIndex][2]);
+          break;
+
+        case STRING:
+          content = (isHex ? "<" : "(") + da[lineIndex] + (isHex ? ">" : ")");
+          posX = getHorizontalCoordinate(x);
+          posY = getVerticalCoordinate(y);
+          break;
+      }
+
+      if (typeof wordSpacingPerLine !== "undefined" && typeof wordSpacingPerLine[lineIndex] !== "undefined") {
+        wordSpacing = wordSpacingPerLine[lineIndex] + " Tw\n";
+      }
+
+      if (lineIndex === 0) {
+        text.push(wordSpacing + generatePosition(posX, posY, transformationMatrix) + content);
+      } else if (variant === STRING) {
+        text.push(wordSpacing + content);
+      } else if (variant === ARRAY) {
+        text.push(wordSpacing + generatePosition(posX, posY, transformationMatrix) + content);
+      }
+    }
+
+    text = variant === STRING ? text.join(" Tj\nT* ") : text.join(" Tj\n");
+    text += " Tj\n";
+    var result = "BT\n/";
+    result += activeFontKey + " " + activeFontSize + " Tf\n"; // font face, style, size
+
+    result += hpf(activeFontSize * lineHeight) + " TL\n"; // line spacing
+
+    result += textColor + "\n";
+    result += xtra;
+    result += text;
+    result += "ET";
+    out(result);
+    usedFonts[activeFontKey] = true;
+    return scope;
+  }; // PDF supports these path painting and clip path operators:
+  //
+  // S - stroke
+  // s - close/stroke
+  // f (F) - fill non-zero
+  // f* - fill evenodd
+  // B - fill stroke nonzero
+  // B* - fill stroke evenodd
+  // b - close fill stroke nonzero
+  // b* - close fill stroke evenodd
+  // n - nothing (consume path)
+  // W - clip nonzero
+  // W* - clip evenodd
+  //
+  // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()
+  // method.
+
+  /**
+   *
+   * @name clip
+   * @function
+   * @instance
+   * @param {string} rule Only possible value is 'evenodd'
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @description All .clip() after calling drawing ops with a style argument of null.
+   */
+
+
+  var clip = API.__private__.clip = API.clip = function (rule) {
+    // Call .clip() after calling drawing ops with a style argument of null
+    // W is the PDF clipping op
+    if ("evenodd" === rule) {
+      out("W*");
+    } else {
+      out("W");
+    }
+
+    return this;
+  };
+  /**
+   * @name clipEvenOdd
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note
+   * that this will NOT consume the current path. In order to only use this path for clipping call
+   * {@link API.discardPath} afterwards.
+   */
+
+
+  API.clipEvenOdd = function () {
+    return clip("evenodd");
+  };
+  /**
+   * Consumes the current path without any effect. Mainly used in combination with {@link clip} or
+   * {@link clipEvenOdd}. The PDF "n" operator.
+   * @name discardPath
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+
+
+  API.__private__.discardPath = API.discardPath = function () {
+    out("n");
+    return this;
+  };
+
+  var isValidStyle = API.__private__.isValidStyle = function (style) {
+    var validStyleVariants = [undefined, null, "S", "D", "F", "DF", "FD", "f", "f*", "B", "B*", "n"];
+    var result = false;
+
+    if (validStyleVariants.indexOf(style) !== -1) {
+      result = true;
+    }
+
+    return result;
+  };
+
+  API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function (operator) {
+    if (isValidStyle(operator)) {
+      defaultPathOperation = operator;
+    }
+
+    return this;
+  };
+
+  var getStyle = API.__private__.getStyle = API.getStyle = function (style) {
+    // see path-painting operators in PDF spec
+    var op = defaultPathOperation; // stroke
+
+    switch (style) {
+      case "D":
+      case "S":
+        op = "S"; // stroke
+
+        break;
+
+      case "F":
+        op = "f"; // fill
+
+        break;
+
+      case "FD":
+      case "DF":
+        op = "B";
+        break;
+
+      case "f":
+      case "f*":
+      case "B":
+      case "B*":
+        /*
+               Allow direct use of these PDF path-painting operators:
+               - f    fill using nonzero winding number rule
+               - f*    fill using even-odd rule
+               - B    fill then stroke with fill using non-zero winding number rule
+               - B*    fill then stroke with fill using even-odd rule
+               */
+        op = style;
+        break;
+    }
+
+    return op;
+  };
+  /**
+   * Close the current path. The PDF "h" operator.
+   * @name close
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+
+
+  var close = API.close = function () {
+    out("h");
+    return this;
+  };
+  /**
+   * Stroke the path. The PDF "S" operator.
+   * @name stroke
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+
+
+  API.stroke = function () {
+    out("S");
+    return this;
+  };
+  /**
+   * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled
+   * with this pattern, otherwise with the current fill color. Equivalent to the PDF "f" operator.
+   * @name fill
+   * @function
+   * @instance
+   * @param {PatternData=} pattern If provided the path will be filled with this pattern
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+
+
+  API.fill = function (pattern) {
+    fillWithOptionalPattern("f", pattern);
+    return this;
+  };
+  /**
+   * Fill the current path using the even-odd rule. The PDF f* operator.
+   * @see API.fill
+   * @name fillEvenOdd
+   * @function
+   * @instance
+   * @param {PatternData=} pattern If provided the path will be filled with this pattern
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+
+
+  API.fillEvenOdd = function (pattern) {
+    fillWithOptionalPattern("f*", pattern);
+    return this;
+  };
+  /**
+   * Fill using the nonzero winding number rule and then stroke the current Path. The PDF "B" operator.
+   * @see API.fill
+   * @name fillStroke
+   * @function
+   * @instance
+   * @param {PatternData=} pattern If provided the path will be stroked with this pattern
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+
+
+  API.fillStroke = function (pattern) {
+    fillWithOptionalPattern("B", pattern);
+    return this;
+  };
+  /**
+   * Fill using the even-odd rule and then stroke the current Path. The PDF "B" operator.
+   * @see API.fill
+   * @name fillStrokeEvenOdd
+   * @function
+   * @instance
+   * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+
+
+  API.fillStrokeEvenOdd = function (pattern) {
+    fillWithOptionalPattern("B*", pattern);
+    return this;
+  };
+
+  var fillWithOptionalPattern = function fillWithOptionalPattern(style, pattern) {
+    if (_typeof(pattern) === "object") {
+      fillWithPattern(pattern, style);
+    } else {
+      out(style);
+    }
+  };
+
+  var putStyle = function putStyle(style) {
+    if (style === null || apiMode === ApiMode.ADVANCED && style === undefined) {
+      return;
+    }
+
+    style = getStyle(style); // stroking / filling / both the path
+
+    out(style);
+  };
+
+  function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {
+    var clone = new TilingPattern(boundingBox || this.boundingBox, xStep || this.xStep, yStep || this.yStep, this.gState, matrix || this.matrix);
+    clone.stream = this.stream;
+    var key = patternKey + "$$" + this.cloneIndex++ + "$$";
+    addPattern(key, clone);
+    return clone;
+  }
+
+  var fillWithPattern = function fillWithPattern(patternData, style) {
+    var patternId = patternMap[patternData.key];
+    var pattern = patterns[patternId];
+
+    if (pattern instanceof ShadingPattern) {
+      out("q");
+      out(clipRuleFromStyle(style));
+
+      if (pattern.gState) {
+        API.setGState(pattern.gState);
+      }
+
+      out(patternData.matrix.toString() + " cm");
+      out("/" + patternId + " sh");
+      out("Q");
+    } else if (pattern instanceof TilingPattern) {
+      // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,
+      // so we must flip them
+      var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());
+
+      if (patternData.matrix) {
+        matrix = matrix.multiply(patternData.matrix || identityMatrix); // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances
+        // for each use
+
+        patternId = cloneTilingPattern.call(pattern, patternData.key, patternData.boundingBox, patternData.xStep, patternData.yStep, matrix).id;
+      }
+
+      out("q");
+      out("/Pattern cs");
+      out("/" + patternId + " scn");
+
+      if (pattern.gState) {
+        API.setGState(pattern.gState);
+      }
+
+      out(style);
+      out("Q");
+    }
+  };
+
+  var clipRuleFromStyle = function clipRuleFromStyle(style) {
+    switch (style) {
+      case "f":
+      case "F":
+        return "W n";
+
+      case "f*":
+        return "W* n";
+
+      case "B":
+        return "W S";
+
+      case "B*":
+        return "W* S";
+      // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern
+      // and "n"/"S" as style would still fill/fill and stroke the path)
+
+      case "S":
+        return "W S";
+
+      case "n":
+        return "W n";
+    }
+  };
+  /**
+   * Begin a new subpath by moving the current point to coordinates (x, y). The PDF "m" operator.
+   * @param {number} x
+   * @param {number} y
+   * @name moveTo
+   * @function
+   * @instance
+   * @memberof jsPDF#
+   * @returns {jsPDF}
+   */
+
+
+  var moveTo = API.moveTo = function (x, y) {
+    out(hpf(scale(x)) + " " + hpf(transformScaleY(y)) + " m");
+    return this;
+  };
+  /**
+   * Append a straight line segment from the current point to the point (x, y). The PDF "l" operator.
+   * @param {number} x
+   * @param {number} y
+   * @memberof jsPDF#
+   * @name lineTo
+   * @function
+   * @instance
+   * @memberof jsPDF#
+   * @returns {jsPDF}
+   */
+
+
+  var lineTo = API.lineTo = function (x, y) {
+    out(hpf(scale(x)) + " " + hpf(transformScaleY(y)) + " l");
+    return this;
+  };
+  /**
+   * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point
+   * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).
+   * @param {number} x1
+   * @param {number} y1
+   * @param {number} x2
+   * @param {number} y2
+   * @param {number} x3
+   * @param {number} y3
+   * @memberof jsPDF#
+   * @name curveTo
+   * @function
+   * @instance
+   * @memberof jsPDF#
+   * @returns {jsPDF}
+   */
+
+
+  var curveTo = API.curveTo = function (x1, y1, x2, y2, x3, y3) {
+    out([hpf(scale(x1)), hpf(transformScaleY(y1)), hpf(scale(x2)), hpf(transformScaleY(y2)), hpf(scale(x3)), hpf(transformScaleY(y3)), "c"].join(" "));
+    return this;
+  };
+  /**
+   * Draw a line on the current page.
+   *
+   * @name line
+   * @function
+   * @instance
+   * @param {number} x1
+   * @param {number} y1
+   * @param {number} x2
+   * @param {number} y2
+   * @param {string} style A string specifying the painting style or null.  Valid styles include: 'S' [default] - stroke, 'F' - fill,  and 'DF' (or 'FD') -  fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+
+
+  API.__private__.line = API.line = function (x1, y1, x2, y2, style) {
+    if (isNaN(x1) || isNaN(y1) || isNaN(x2) || isNaN(y2) || !isValidStyle(style)) {
+      throw new Error("Invalid arguments passed to jsPDF.line");
+    }
+
+    if (apiMode === ApiMode.COMPAT) {
+      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || "S");
+    } else {
+      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();
+    }
+  };
+  /**
+   * @typedef {Object} PatternData
+   * {Matrix|undefined} matrix
+   * {Number|undefined} xStep
+   * {Number|undefined} yStep
+   * {Array.<Number>|undefined} boundingBox
+   */
+
+  /**
+   * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.
+   * All data points in `lines` are relative to last line origin.
+   * `x`, `y` become x1,y1 for first line / curve in the set.
+   * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.
+   * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.
+   *
+   * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line
+   * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name lines
+   */
+
+
+  API.__private__.lines = API.lines = function (lines, x, y, scale, style, closed) {
+    var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp; // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)
+    // in effort to make all calls have similar signature like
+    //   function(content, coordinateX, coordinateY , miscellaneous)
+    // this method had its args flipped.
+    // code below allows backward compatibility with old arg order.
+
+    if (typeof lines === "number") {
+      tmp = y;
+      y = x;
+      x = lines;
+      lines = tmp;
+    }
+
+    scale = scale || [1, 1];
+    closed = closed || false;
+
+    if (isNaN(x) || isNaN(y) || !Array.isArray(lines) || !Array.isArray(scale) || !isValidStyle(style) || typeof closed !== "boolean") {
+      throw new Error("Invalid arguments passed to jsPDF.lines");
+    } // starting point
+
+
+    moveTo(x, y);
+    scalex = scale[0];
+    scaley = scale[1];
+    l = lines.length; //, x2, y2 // bezier only. In page default measurement "units", *after* scaling
+    //, x3, y3 // bezier only. In page default measurement "units", *after* scaling
+    // ending point for all, lines and bezier. . In page default measurement "units", *after* scaling
+
+    x4 = x; // last / ending point = starting point for first item.
+
+    y4 = y; // last / ending point = starting point for first item.
+
+    for (i = 0; i < l; i++) {
+      leg = lines[i];
+
+      if (leg.length === 2) {
+        // simple line
+        x4 = leg[0] * scalex + x4; // here last x4 was prior ending point
+
+        y4 = leg[1] * scaley + y4; // here last y4 was prior ending point
+
+        lineTo(x4, y4);
+      } else {
+        // bezier curve
+        x2 = leg[0] * scalex + x4; // here last x4 is prior ending point
+
+        y2 = leg[1] * scaley + y4; // here last y4 is prior ending point
+
+        x3 = leg[2] * scalex + x4; // here last x4 is prior ending point
+
+        y3 = leg[3] * scaley + y4; // here last y4 is prior ending point
+
+        x4 = leg[4] * scalex + x4; // here last x4 was prior ending point
+
+        y4 = leg[5] * scaley + y4; // here last y4 was prior ending point
+
+        curveTo(x2, y2, x3, y3, x4, y4);
+      }
+    }
+
+    if (closed) {
+      close();
+    }
+
+    putStyle(style);
+    return this;
+  };
+  /**
+   * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.
+   * @param {Array<Object>} lines An array of {op: operator, c: coordinates} object, where op is one of "m" (move to), "l" (line to)
+   * "c" (cubic bezier curve) and "h" (close (sub)path)). c is an array of coordinates. "m" and "l" expect two, "c"
+   * six and "h" an empty array (or undefined).
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name path
+   */
+
+
+  API.path = function (lines) {
+    for (var i = 0; i < lines.length; i++) {
+      var leg = lines[i];
+      var coords = leg.c;
+
+      switch (leg.op) {
+        case "m":
+          moveTo(coords[0], coords[1]);
+          break;
+
+        case "l":
+          lineTo(coords[0], coords[1]);
+          break;
+
+        case "c":
+          curveTo.apply(this, coords);
+          break;
+
+        case "h":
+          close();
+          break;
+      }
+    }
+
+    return this;
+  };
+  /**
+   * Adds a rectangle to PDF.
+   *
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} w Width (in units declared at inception of PDF document)
+   * @param {number} h Height (in units declared at inception of PDF document)
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name rect
+   */
+
+
+  API.__private__.rect = API.rect = function (x, y, w, h, style) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {
+      throw new Error("Invalid arguments passed to jsPDF.rect");
+    }
+
+    if (apiMode === ApiMode.COMPAT) {
+      h = -h;
+    }
+
+    out([hpf(scale(x)), hpf(transformScaleY(y)), hpf(scale(w)), hpf(scale(h)), "re"].join(" "));
+    putStyle(style);
+    return this;
+  };
+  /**
+   * Adds a triangle to PDF.
+   *
+   * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name triangle
+   */
+
+
+  API.__private__.triangle = API.triangle = function (x1, y1, x2, y2, x3, y3, style) {
+    if (isNaN(x1) || isNaN(y1) || isNaN(x2) || isNaN(y2) || isNaN(x3) || isNaN(y3) || !isValidStyle(style)) {
+      throw new Error("Invalid arguments passed to jsPDF.triangle");
+    }
+
+    this.lines([[x2 - x1, y2 - y1], // vector to point 2
+    [x3 - x2, y3 - y2], // vector to point 3
+    [x1 - x3, y1 - y3] // closing vector back to point 1
+    ], x1, y1, // start of path
+    [1, 1], style, true);
+    return this;
+  };
+  /**
+   * Adds a rectangle with rounded corners to PDF.
+   *
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} w Width (in units declared at inception of PDF document)
+   * @param {number} h Height (in units declared at inception of PDF document)
+   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)
+   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name roundedRect
+   */
+
+
+  API.__private__.roundedRect = API.roundedRect = function (x, y, w, h, rx, ry, style) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || isNaN(rx) || isNaN(ry) || !isValidStyle(style)) {
+      throw new Error("Invalid arguments passed to jsPDF.roundedRect");
+    }
+
+    var MyArc = 4 / 3 * (Math.SQRT2 - 1);
+    rx = Math.min(rx, w * 0.5);
+    ry = Math.min(ry, h * 0.5);
+    this.lines([[w - 2 * rx, 0], [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry], [0, h - 2 * ry], [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry], [-w + 2 * rx, 0], [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry], [0, -h + 2 * ry], [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]], x + rx, y, // start of path
+    [1, 1], style, true);
+    return this;
+  };
+  /**
+   * Adds an ellipse to PDF.
+   *
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)
+   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name ellipse
+   */
+
+
+  API.__private__.ellipse = API.ellipse = function (x, y, rx, ry, style) {
+    if (isNaN(x) || isNaN(y) || isNaN(rx) || isNaN(ry) || !isValidStyle(style)) {
+      throw new Error("Invalid arguments passed to jsPDF.ellipse");
+    }
+
+    var lx = 4 / 3 * (Math.SQRT2 - 1) * rx,
+        ly = 4 / 3 * (Math.SQRT2 - 1) * ry;
+    moveTo(x + rx, y);
+    curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);
+    curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);
+    curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);
+    curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);
+    putStyle(style);
+    return this;
+  };
+  /**
+   * Adds an circle to PDF.
+   *
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} r Radius (in units declared at inception of PDF document)
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name circle
+   */
+
+
+  API.__private__.circle = API.circle = function (x, y, r, style) {
+    if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {
+      throw new Error("Invalid arguments passed to jsPDF.circle");
+    }
+
+    return this.ellipse(x, y, r, r, style);
+  };
+  /**
+   * Sets text font face, variant for upcoming text elements.
+   * See output of jsPDF.getFontList() for possible font names, styles.
+   *
+   * @param {string} fontName Font name or family. Example: "times".
+   * @param {string} fontStyle Font style or variant. Example: "italic".
+   * @param {number | string} fontWeight Weight of the Font. Example: "normal" | 400
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setFont
+   */
+
+
+  API.setFont = function (fontName, fontStyle, fontWeight) {
+    if (fontWeight) {
+      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);
+    }
+
+    activeFontKey = getFont(fontName, fontStyle, {
+      disableWarning: false
+    });
+    return this;
+  };
+  /**
+   * Gets text font face, variant for upcoming text elements.
+   *
+   * @function
+   * @instance
+   * @returns {Object}
+   * @memberof jsPDF#
+   * @name getFont
+   */
+
+
+  var getFontEntry = API.__private__.getFont = API.getFont = function () {
+    return fonts[getFont.apply(API, arguments)];
+  };
+  /**
+   * Returns an object - a tree of fontName to fontStyle relationships available to
+   * active PDF document.
+   *
+   * @public
+   * @function
+   * @instance
+   * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }
+   * @memberof jsPDF#
+   * @name getFontList
+   */
+
+
+  API.__private__.getFontList = API.getFontList = function () {
+    var list = {},
+        fontName,
+        fontStyle;
+
+    for (fontName in fontmap) {
+      if (fontmap.hasOwnProperty(fontName)) {
+        list[fontName] = [];
+
+        for (fontStyle in fontmap[fontName]) {
+          if (fontmap[fontName].hasOwnProperty(fontStyle)) {
+            list[fontName].push(fontStyle);
+          }
+        }
+      }
+    }
+
+    return list;
+  };
+  /**
+   * Add a custom font to the current instance.
+   *
+   * @param {string} postScriptName PDF specification full name for the font.
+   * @param {string} id PDF-document-instance-specific label assinged to the font.
+   * @param {string} fontStyle Style of the Font.
+   * @param {number | string} fontWeight Weight of the Font.
+   * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.
+   * @function
+   * @instance
+   * @memberof jsPDF#
+   * @name addFont
+   * @returns {string} fontId
+   */
+
+
+  API.addFont = function (postScriptName, fontName, fontStyle, fontWeight, encoding) {
+    var encodingOptions = ["StandardEncoding", "MacRomanEncoding", "Identity-H", "WinAnsiEncoding"];
+
+    if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {
+      //IE 11 fix
+      encoding = arguments[3];
+    } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {
+      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);
+    }
+
+    encoding = encoding || "Identity-H";
+    return addFont.call(this, postScriptName, fontName, fontStyle, encoding);
+  };
+
+  var lineWidth = options.lineWidth || 0.200025; // 2mm
+
+  /**
+   * Gets the line width, default: 0.200025.
+   *
+   * @function
+   * @instance
+   * @returns {number} lineWidth
+   * @memberof jsPDF#
+   * @name getLineWidth
+   */
+
+  var getLineWidth = API.__private__.getLineWidth = API.getLineWidth = function () {
+    return lineWidth;
+  };
+  /**
+   * Sets line width for upcoming lines.
+   *
+   * @param {number} width Line width (in units declared at inception of PDF document).
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineWidth
+   */
+
+
+  var setLineWidth = API.__private__.setLineWidth = API.setLineWidth = function (width) {
+    lineWidth = width;
+    out(hpf(scale(width)) + " w");
+    return this;
+  };
+  /**
+   * Sets the dash pattern for upcoming lines.
+   *
+   * To reset the settings simply call the method without any parameters.
+   * @param {Array<number>} dashArray An array containing 0-2 numbers. The first number sets the length of the
+   * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered
+   * to be as long as the dashes. An empty array means solid, unbroken lines.
+   * @param {number} dashPhase The phase lines start with.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineDashPattern
+   */
+
+
+  API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function (dashArray, dashPhase) {
+    dashArray = dashArray || [];
+    dashPhase = dashPhase || 0;
+
+    if (isNaN(dashPhase) || !Array.isArray(dashArray)) {
+      throw new Error("Invalid arguments passed to jsPDF.setLineDash");
+    }
+
+    dashArray = dashArray.map(function (x) {
+      return hpf(scale(x));
+    }).join(" ");
+    dashPhase = hpf(scale(dashPhase));
+    out("[" + dashArray + "] " + dashPhase + " d");
+    return this;
+  };
+
+  var lineHeightFactor;
+
+  var getLineHeight = API.__private__.getLineHeight = API.getLineHeight = function () {
+    return activeFontSize * lineHeightFactor;
+  };
+
+  API.__private__.getLineHeight = API.getLineHeight = function () {
+    return activeFontSize * lineHeightFactor;
+  };
+  /**
+   * Sets the LineHeightFactor of proportion.
+   *
+   * @param {number} value LineHeightFactor value. Default: 1.15.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineHeightFactor
+   */
+
+
+  var setLineHeightFactor = API.__private__.setLineHeightFactor = API.setLineHeightFactor = function (value) {
+    value = value || 1.15;
+
+    if (typeof value === "number") {
+      lineHeightFactor = value;
+    }
+
+    return this;
+  };
+  /**
+   * Gets the LineHeightFactor, default: 1.15.
+   *
+   * @function
+   * @instance
+   * @returns {number} lineHeightFactor
+   * @memberof jsPDF#
+   * @name getLineHeightFactor
+   */
+
+
+  var getLineHeightFactor = API.__private__.getLineHeightFactor = API.getLineHeightFactor = function () {
+    return lineHeightFactor;
+  };
+
+  setLineHeightFactor(options.lineHeight);
+
+  var getHorizontalCoordinate = API.__private__.getHorizontalCoordinate = function (value) {
+    return scale(value);
+  };
+
+  var getVerticalCoordinate = API.__private__.getVerticalCoordinate = function (value) {
+    if (apiMode === ApiMode.ADVANCED) {
+      return value;
+    } else {
+      var pageHeight = pagesContext[currentPage].mediaBox.topRightY - pagesContext[currentPage].mediaBox.bottomLeftY;
+      return pageHeight - scale(value);
+    }
+  };
+
+  var getHorizontalCoordinateString = API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function (value) {
+    return hpf(getHorizontalCoordinate(value));
+  };
+
+  var getVerticalCoordinateString = API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function (value) {
+    return hpf(getVerticalCoordinate(value));
+  };
+
+  var strokeColor = options.strokeColor || "0 G";
+  /**
+   *  Gets the stroke color for upcoming elements.
+   *
+   * @function
+   * @instance
+   * @returns {string} colorAsHex
+   * @memberof jsPDF#
+   * @name getDrawColor
+   */
+
+  API.__private__.getStrokeColor = API.getDrawColor = function () {
+    return decodeColorString(strokeColor);
+  };
+  /**
+   * Sets the stroke color for upcoming elements.
+   *
+   * Depending on the number of arguments given, Gray, RGB, or CMYK
+   * color space is implied.
+   *
+   * When only ch1 is given, "Gray" color space is implied and it
+   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+   * if values are communicated as String types, or in range from 0 (black)
+   * to 255 (white) if communicated as Number type.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+   * value must be in the range from 0.00 (minimum intensity) to to 1.00
+   * (max intensity) if values are communicated as String types, or
+   * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+   * as Number types.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+   * value must be a in the range from 0.00 (0% concentration) to to
+   * 1.00 (100% concentration)
+   *
+   * Because JavaScript treats fixed point numbers badly (rounds to
+   * floating point nearest to binary representation) it is highly advised to
+   * communicate the fractional numbers as String types, not JavaScript Number type.
+   *
+   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+   * @param {Number} ch2 Color channel value.
+   * @param {Number} ch3 Color channel value.
+   * @param {Number} ch4 Color channel value.
+   *
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setDrawColor
+   */
+
+
+  API.__private__.setStrokeColor = API.setDrawColor = function (ch1, ch2, ch3, ch4) {
+    var options = {
+      ch1: ch1,
+      ch2: ch2,
+      ch3: ch3,
+      ch4: ch4,
+      pdfColorType: "draw",
+      precision: 2
+    };
+    strokeColor = encodeColorString(options);
+    out(strokeColor);
+    return this;
+  };
+
+  var fillColor = options.fillColor || "0 g";
+  /**
+   * Gets the fill color for upcoming elements.
+   *
+   * @function
+   * @instance
+   * @returns {string} colorAsHex
+   * @memberof jsPDF#
+   * @name getFillColor
+   */
+
+  API.__private__.getFillColor = API.getFillColor = function () {
+    return decodeColorString(fillColor);
+  };
+  /**
+   * Sets the fill color for upcoming elements.
+   *
+   * Depending on the number of arguments given, Gray, RGB, or CMYK
+   * color space is implied.
+   *
+   * When only ch1 is given, "Gray" color space is implied and it
+   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+   * if values are communicated as String types, or in range from 0 (black)
+   * to 255 (white) if communicated as Number type.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+   * value must be in the range from 0.00 (minimum intensity) to to 1.00
+   * (max intensity) if values are communicated as String types, or
+   * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+   * as Number types.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+   * value must be a in the range from 0.00 (0% concentration) to to
+   * 1.00 (100% concentration)
+   *
+   * Because JavaScript treats fixed point numbers badly (rounds to
+   * floating point nearest to binary representation) it is highly advised to
+   * communicate the fractional numbers as String types, not JavaScript Number type.
+   *
+   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+   * @param {Number} ch2 Color channel value.
+   * @param {Number} ch3 Color channel value.
+   * @param {Number} ch4 Color channel value.
+   *
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setFillColor
+   */
+
+
+  API.__private__.setFillColor = API.setFillColor = function (ch1, ch2, ch3, ch4) {
+    var options = {
+      ch1: ch1,
+      ch2: ch2,
+      ch3: ch3,
+      ch4: ch4,
+      pdfColorType: "fill",
+      precision: 2
+    };
+    fillColor = encodeColorString(options);
+    out(fillColor);
+    return this;
+  };
+
+  var textColor = options.textColor || "0 g";
+  /**
+   * Gets the text color for upcoming elements.
+   *
+   * @function
+   * @instance
+   * @returns {string} colorAsHex
+   * @memberof jsPDF#
+   * @name getTextColor
+   */
+
+  var getTextColor = API.__private__.getTextColor = API.getTextColor = function () {
+    return decodeColorString(textColor);
+  };
+  /**
+   * Sets the text color for upcoming elements.
+   *
+   * Depending on the number of arguments given, Gray, RGB, or CMYK
+   * color space is implied.
+   *
+   * When only ch1 is given, "Gray" color space is implied and it
+   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+   * if values are communicated as String types, or in range from 0 (black)
+   * to 255 (white) if communicated as Number type.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+   * value must be in the range from 0.00 (minimum intensity) to to 1.00
+   * (max intensity) if values are communicated as String types, or
+   * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+   * as Number types.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+   * value must be a in the range from 0.00 (0% concentration) to to
+   * 1.00 (100% concentration)
+   *
+   * Because JavaScript treats fixed point numbers badly (rounds to
+   * floating point nearest to binary representation) it is highly advised to
+   * communicate the fractional numbers as String types, not JavaScript Number type.
+   *
+   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+   * @param {Number} ch2 Color channel value.
+   * @param {Number} ch3 Color channel value.
+   * @param {Number} ch4 Color channel value.
+   *
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setTextColor
+   */
+
+
+  API.__private__.setTextColor = API.setTextColor = function (ch1, ch2, ch3, ch4) {
+    var options = {
+      ch1: ch1,
+      ch2: ch2,
+      ch3: ch3,
+      ch4: ch4,
+      pdfColorType: "text",
+      precision: 3
+    };
+    textColor = encodeColorString(options);
+    return this;
+  };
+
+  var activeCharSpace = options.charSpace;
+  /**
+   * Get global value of CharSpace.
+   *
+   * @function
+   * @instance
+   * @returns {number} charSpace
+   * @memberof jsPDF#
+   * @name getCharSpace
+   */
+
+  var getCharSpace = API.__private__.getCharSpace = API.getCharSpace = function () {
+    return parseFloat(activeCharSpace || 0);
+  };
+  /**
+   * Set global value of CharSpace.
+   *
+   * @param {number} charSpace
+   * @function
+   * @instance
+   * @returns {jsPDF} jsPDF-instance
+   * @memberof jsPDF#
+   * @name setCharSpace
+   */
+
+
+  API.__private__.setCharSpace = API.setCharSpace = function (charSpace) {
+    if (isNaN(charSpace)) {
+      throw new Error("Invalid argument passed to jsPDF.setCharSpace");
+    }
+
+    activeCharSpace = charSpace;
+    return this;
+  };
+
+  var lineCapID = 0;
+  /**
+   * Is an Object providing a mapping from human-readable to
+   * integer flag values designating the varieties of line cap
+   * and join styles.
+   *
+   * @memberof jsPDF#
+   * @name CapJoinStyles
+   */
+
+  API.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
+  };
+  /**
+   * Sets the line cap styles.
+   * See {jsPDF.CapJoinStyles} for variants.
+   *
+   * @param {String|Number} style A string or number identifying the type of line cap.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineCap
+   */
+
+  API.__private__.setLineCap = API.setLineCap = function (style) {
+    var id = API.CapJoinStyles[style];
+
+    if (id === undefined) {
+      throw new Error("Line cap style of '" + style + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
+    }
+
+    lineCapID = id;
+    out(id + " J");
+    return this;
+  };
+
+  var lineJoinID = 0;
+  /**
+   * Sets the line join styles.
+   * See {jsPDF.CapJoinStyles} for variants.
+   *
+   * @param {String|Number} style A string or number identifying the type of line join.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineJoin
+   */
+
+  API.__private__.setLineJoin = API.setLineJoin = function (style) {
+    var id = API.CapJoinStyles[style];
+
+    if (id === undefined) {
+      throw new Error("Line join style of '" + style + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
+    }
+
+    lineJoinID = id;
+    out(id + " j");
+    return this;
+  };
+  /**
+   * Sets the miterLimit property, which effects the maximum miter length.
+   *
+   * @param {number} length The length of the miter
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineMiterLimit
+   */
+
+  API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function (length) {
+    length = length || 0;
+
+    if (isNaN(length)) {
+      throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");
+    }
+
+    out(hpf(scale(length)) + " M");
+    return this;
+  };
+  /**
+   * An object representing a pdf graphics state.
+   * @class GState
+   */
+
+  /**
+   *
+   * @param parameters A parameter object that contains all properties this graphics state wants to set.
+   * Supported are: opacity, stroke-opacity
+   * @constructor
+   */
+
+
+  API.GState = GState;
+  /**
+   * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.
+   * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState
+   * it will be added before use.
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setGState
+   */
+
+  API.setGState = function (gState) {
+    if (typeof gState === "string") {
+      gState = gStates[gStatesMap[gState]];
+    } else {
+      gState = addGState(null, gState);
+    }
+
+    if (!gState.equals(activeGState)) {
+      out("/" + gState.id + " gs");
+      activeGState = gState;
+    }
+  };
+  /**
+   * Adds a new Graphics State. Duplicates are automatically eliminated.
+   * @param {String} key Might also be null, if no later reference to this gState is needed
+   * @param {Object} gState The gState object
+   */
+
+
+  var addGState = function addGState(key, gState) {
+    // only add it if it is not already present (the keys provided by the user must be unique!)
+    if (key && gStatesMap[key]) return;
+    var duplicate = false;
+
+    for (var s in gStates) {
+      if (gStates.hasOwnProperty(s)) {
+        if (gStates[s].equals(gState)) {
+          duplicate = true;
+          break;
+        }
+      }
+    }
+
+    if (duplicate) {
+      gState = gStates[s];
+    } else {
+      var gStateKey = "GS" + (Object.keys(gStates).length + 1).toString(10);
+      gStates[gStateKey] = gState;
+      gState.id = gStateKey;
+    } // several user keys may point to the same GState object
+
+
+    key && (gStatesMap[key] = gState.id);
+    events.publish("addGState", gState);
+    return gState;
+  };
+  /**
+   * Adds a new {@link GState} for later use. See {@link setGState}.
+   * @param {String} key
+   * @param {GState} gState
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   *
+   * @memberof jsPDF#
+   * @name addGState
+   */
+
+
+  API.addGState = function (key, gState) {
+    addGState(key, gState);
+    return this;
+  };
+  /**
+   * Saves the current graphics state ("pushes it on the stack"). It can be restored by {@link restoreGraphicsState}
+   * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,
+   * fill and stroke colors etc.
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name saveGraphicsState
+   */
+
+
+  API.saveGraphicsState = function () {
+    out("q"); // as we cannot set font key and size independently we must keep track of both
+
+    fontStateStack.push({
+      key: activeFontKey,
+      size: activeFontSize,
+      color: textColor
+    });
+    return this;
+  };
+  /**
+   * Restores a previously saved graphics state saved by {@link saveGraphicsState} ("pops the stack").
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name restoreGraphicsState
+   */
+
+
+  API.restoreGraphicsState = function () {
+    out("Q"); // restore previous font state
+
+    var fontState = fontStateStack.pop();
+    activeFontKey = fontState.key;
+    activeFontSize = fontState.size;
+    textColor = fontState.color;
+    activeGState = null;
+    return this;
+  };
+  /**
+   * Appends this matrix to the left of all previously applied matrices.
+   *
+   * @param {Matrix} matrix
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setCurrentTransformationMatrix
+   */
+
+
+  API.setCurrentTransformationMatrix = function (matrix) {
+    out(matrix.toString() + " cm");
+    return this;
+  };
+  /**
+   * Inserts a debug comment into the generated pdf.
+   * @function
+   * @instance
+   * @param {String} text
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name comment
+   */
+
+
+  API.comment = function (text) {
+    out("#" + text);
+    return this;
+  };
+  /**
+   * Point
+   */
+
+
+  var Point = function Point(x, y) {
+    var _x = x || 0;
+
+    Object.defineProperty(this, "x", {
+      enumerable: true,
+      get: function get() {
+        return _x;
+      },
+      set: function set(value) {
+        if (!isNaN(value)) {
+          _x = parseFloat(value);
+        }
+      }
+    });
+
+    var _y = y || 0;
+
+    Object.defineProperty(this, "y", {
+      enumerable: true,
+      get: function get() {
+        return _y;
+      },
+      set: function set(value) {
+        if (!isNaN(value)) {
+          _y = parseFloat(value);
+        }
+      }
+    });
+    var _type = "pt";
+    Object.defineProperty(this, "type", {
+      enumerable: true,
+      get: function get() {
+        return _type;
+      },
+      set: function set(value) {
+        _type = value.toString();
+      }
+    });
+    return this;
+  };
+  /**
+   * Rectangle
+   */
+
+
+  var Rectangle = function Rectangle(x, y, w, h) {
+    Point.call(this, x, y);
+    this.type = "rect";
+
+    var _w = w || 0;
+
+    Object.defineProperty(this, "w", {
+      enumerable: true,
+      get: function get() {
+        return _w;
+      },
+      set: function set(value) {
+        if (!isNaN(value)) {
+          _w = parseFloat(value);
+        }
+      }
+    });
+
+    var _h = h || 0;
+
+    Object.defineProperty(this, "h", {
+      enumerable: true,
+      get: function get() {
+        return _h;
+      },
+      set: function set(value) {
+        if (!isNaN(value)) {
+          _h = parseFloat(value);
+        }
+      }
+    });
+    return this;
+  };
+  /**
+   * FormObject/RenderTarget
+   */
+
+
+  var RenderTarget = function RenderTarget() {
+    this.page = page;
+    this.currentPage = currentPage;
+    this.pages = pages.slice(0);
+    this.pagesContext = pagesContext.slice(0);
+    this.x = pageX;
+    this.y = pageY;
+    this.matrix = pageMatrix;
+    this.width = getPageWidth(currentPage);
+    this.height = getPageHeight(currentPage);
+    this.outputDestination = outputDestination;
+    this.id = ""; // set by endFormObject()
+
+    this.objectNumber = -1; // will be set by putXObject()
+  };
+
+  RenderTarget.prototype.restore = function () {
+    page = this.page;
+    currentPage = this.currentPage;
+    pagesContext = this.pagesContext;
+    pages = this.pages;
+    pageX = this.x;
+    pageY = this.y;
+    pageMatrix = this.matrix;
+    setPageWidth(currentPage, this.width);
+    setPageHeight(currentPage, this.height);
+    outputDestination = this.outputDestination;
+  };
+
+  var beginNewRenderTarget = function beginNewRenderTarget(x, y, width, height, matrix) {
+    // save current state
+    renderTargetStack.push(new RenderTarget()); // clear pages
+
+    page = currentPage = 0;
+    pages = [];
+    pageX = x;
+    pageY = y;
+    pageMatrix = matrix;
+    beginPage([width, height]);
+  };
+
+  var endFormObject = function endFormObject(key) {
+    // only add it if it is not already present (the keys provided by the user must be unique!)
+    if (renderTargetMap[key]) {
+      renderTargetStack.pop().restore();
+      return;
+    } // save the created xObject
+
+
+    var newXObject = new RenderTarget();
+    var xObjectId = "Xo" + (Object.keys(renderTargets).length + 1).toString(10);
+    newXObject.id = xObjectId;
+    renderTargetMap[key] = xObjectId;
+    renderTargets[xObjectId] = newXObject;
+    events.publish("addFormObject", newXObject); // restore state from stack
+
+    renderTargetStack.pop().restore();
+  };
+  /**
+   * Starts a new pdf form object, which means that all consequent draw calls target a new independent object
+   * until {@link endFormObject} is called. The created object can be referenced and drawn later using
+   * {@link doFormObject}. Nested form objects are possible.
+   * x, y, width, height set the bounding box that is used to clip the content.
+   *
+   * @param {number} x
+   * @param {number} y
+   * @param {number} width
+   * @param {number} height
+   * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to
+   * the parent's.
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name beginFormObject
+   */
+
+
+  API.beginFormObject = function (x, y, width, height, matrix) {
+    // The user can set the output target to a new form object. Nested form objects are possible.
+    // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as
+    // the PDF-Spec states:
+    // "In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which
+    // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,
+    // form XObjects may be independent of the content streams in which they appear, and this is strongly
+    // recommended although not required"
+    beginNewRenderTarget(x, y, width, height, matrix);
+    return this;
+  };
+  /**
+   * Completes and saves the form object.
+   * @param {String} key The key by which this form object can be referenced.
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name endFormObject
+   */
+
+
+  API.endFormObject = function (key) {
+    endFormObject(key);
+    return this;
+  };
+  /**
+   * Draws the specified form object by referencing to the respective pdf XObject created with
+   * {@link API.beginFormObject} and {@link endFormObject}.
+   * The location is determined by matrix.
+   *
+   * @param {String} key The key to the form object.
+   * @param {Matrix} matrix The matrix applied before drawing the form object.
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name doFormObject
+   */
+
+
+  API.doFormObject = function (key, matrix) {
+    var xObject = renderTargets[renderTargetMap[key]];
+    out("q");
+    out(matrix.toString() + " cm");
+    out("/" + xObject.id + " Do");
+    out("Q");
+    return this;
+  };
+  /**
+   * Returns the form object specified by key.
+   * @param key {String}
+   * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name getFormObject
+   */
+
+
+  API.getFormObject = function (key) {
+    var xObject = renderTargets[renderTargetMap[key]];
+    return {
+      x: xObject.x,
+      y: xObject.y,
+      width: xObject.width,
+      height: xObject.height,
+      matrix: xObject.matrix
+    };
+  };
+  /**
+   * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').
+   * Uses FileSaver.js-method saveAs.
+   *
+   * @memberof jsPDF#
+   * @name save
+   * @function
+   * @instance
+   * @param  {string} filename The filename including extension.
+   * @param  {Object} options An Object with additional options, possible options: 'returnPromise'.
+   * @returns {jsPDF|Promise} jsPDF-instance     */
+
+
+  API.save = function (filename, options) {
+    filename = filename || "generated.pdf";
+    options = options || {};
+    options.returnPromise = options.returnPromise || false;
+
+    if (options.returnPromise === false) {
+      saveAs(getBlob(buildDocument()), filename);
+
+      if (typeof saveAs.unload === "function") {
+        if (globalObject.setTimeout) {
+          setTimeout(saveAs.unload, 911);
+        }
+      }
+
+      return this;
+    } else {
+      return new Promise(function (resolve, reject) {
+        try {
+          var result = saveAs(getBlob(buildDocument()), filename);
+
+          if (typeof saveAs.unload === "function") {
+            if (globalObject.setTimeout) {
+              setTimeout(saveAs.unload, 911);
+            }
+          }
+
+          resolve(result);
+        } catch (e) {
+          reject(e.message);
+        }
+      });
+    }
+  }; // applying plugins (more methods) ON TOP of built-in API.
+  // this is intentional as we allow plugins to override
+  // built-ins
+
+
+  for (var plugin in jsPDF.API) {
+    if (jsPDF.API.hasOwnProperty(plugin)) {
+      if (plugin === "events" && jsPDF.API.events.length) {
+        (function (events, newEvents) {
+          // jsPDF.API.events is a JS Array of Arrays
+          // where each Array is a pair of event name, handler
+          // Events were added by plugins to the jsPDF instantiator.
+          // These are always added to the new instance and some ran
+          // during instantiation.
+          var eventname, handler_and_args, i;
+
+          for (i = newEvents.length - 1; i !== -1; i--) {
+            // subscribe takes 3 args: 'topic', function, runonce_flag
+            // if undefined, runonce is false.
+            // users can attach callback directly,
+            // or they can attach an array with [callback, runonce_flag]
+            // that's what the "apply" magic is for below.
+            eventname = newEvents[i][0];
+            handler_and_args = newEvents[i][1];
+            events.subscribe.apply(events, [eventname].concat(typeof handler_and_args === "function" ? [handler_and_args] : handler_and_args));
+          }
+        })(events, jsPDF.API.events);
+      } else {
+        API[plugin] = jsPDF.API[plugin];
+      }
+    }
+  }
+
+  var getPageWidth = API.getPageWidth = function (pageNumber) {
+    pageNumber = pageNumber || currentPage;
+    return (pagesContext[pageNumber].mediaBox.topRightX - pagesContext[pageNumber].mediaBox.bottomLeftX) / scaleFactor;
+  };
+
+  var setPageWidth = API.setPageWidth = function (pageNumber, value) {
+    pagesContext[pageNumber].mediaBox.topRightX = value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;
+  };
+
+  var getPageHeight = API.getPageHeight = function (pageNumber) {
+    pageNumber = pageNumber || currentPage;
+    return (pagesContext[pageNumber].mediaBox.topRightY - pagesContext[pageNumber].mediaBox.bottomLeftY) / scaleFactor;
+  };
+
+  var setPageHeight = API.setPageHeight = function (pageNumber, value) {
+    pagesContext[pageNumber].mediaBox.topRightY = value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;
+  };
+  /**
+   * Object exposing internal API to plugins
+   * @public
+   * @ignore
+   */
+
+
+  API.internal = {
+    pdfEscape: pdfEscape,
+    getStyle: getStyle,
+    getFont: getFontEntry,
+    getFontSize: getFontSize,
+    getCharSpace: getCharSpace,
+    getTextColor: getTextColor,
+    getLineHeight: getLineHeight,
+    getLineHeightFactor: getLineHeightFactor,
+    getLineWidth: getLineWidth,
+    write: write,
+    getHorizontalCoordinate: getHorizontalCoordinate,
+    getVerticalCoordinate: getVerticalCoordinate,
+    getCoordinateString: getHorizontalCoordinateString,
+    getVerticalCoordinateString: getVerticalCoordinateString,
+    collections: {},
+    newObject: newObject,
+    newAdditionalObject: newAdditionalObject,
+    newObjectDeferred: newObjectDeferred,
+    newObjectDeferredBegin: newObjectDeferredBegin,
+    getFilters: getFilters,
+    putStream: putStream,
+    events: events,
+    scaleFactor: scaleFactor,
+    pageSize: {
+      getWidth: function getWidth() {
+        return getPageWidth(currentPage);
+      },
+      setWidth: function setWidth(value) {
+        setPageWidth(currentPage, value);
+      },
+      getHeight: function getHeight() {
+        return getPageHeight(currentPage);
+      },
+      setHeight: function setHeight(value) {
+        setPageHeight(currentPage, value);
+      }
+    },
+    encryptionOptions: encryptionOptions,
+    encryption: encryption,
+    getEncryptor: getEncryptor,
+    output: output,
+    getNumberOfPages: getNumberOfPages,
+    pages: pages,
+    out: out,
+    f2: f2,
+    f3: f3,
+    getPageInfo: getPageInfo,
+    getPageInfoByObjId: getPageInfoByObjId,
+    getCurrentPageInfo: getCurrentPageInfo,
+    getPDFVersion: getPdfVersion,
+    Point: Point,
+    Rectangle: Rectangle,
+    Matrix: Matrix,
+    hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.
+
+  };
+  Object.defineProperty(API.internal.pageSize, "width", {
+    get: function get() {
+      return getPageWidth(currentPage);
+    },
+    set: function set(value) {
+      setPageWidth(currentPage, value);
+    },
+    enumerable: true,
+    configurable: true
+  });
+  Object.defineProperty(API.internal.pageSize, "height", {
+    get: function get() {
+      return getPageHeight(currentPage);
+    },
+    set: function set(value) {
+      setPageHeight(currentPage, value);
+    },
+    enumerable: true,
+    configurable: true
+  }); //////////////////////////////////////////////////////
+  // continuing initialization of jsPDF Document object
+  //////////////////////////////////////////////////////
+  // Add the first page automatically
+
+  addFonts.call(API, standardFonts);
+  activeFontKey = "F1";
+
+  _addPage(format, orientation);
+
+  events.publish("initialized");
+  return API;
+}
+/**
+ * jsPDF.API is a STATIC property of jsPDF class.
+ * jsPDF.API is an object you can add methods and properties to.
+ * The methods / properties you add will show up in new jsPDF objects.
+ *
+ * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,
+ * callbacks to this object. These will be reassigned to all new instances of jsPDF.
+ *
+ * @static
+ * @public
+ * @memberof jsPDF#
+ * @name API
+ *
+ * @example
+ * jsPDF.API.mymethod = function(){
+ *   // 'this' will be ref to internal API object. see jsPDF source
+ *   // , so you can refer to built-in methods like so:
+ *   //     this.line(....)
+ *   //     this.text(....)
+ * }
+ * var pdfdoc = new jsPDF()
+ * pdfdoc.mymethod() // <- !!!!!!
+ */
+
+
+jsPDF.API = {
+  events: []
+};
+/**
+ * The version of jsPDF.
+ * @name version
+ * @type {string}
+ * @memberof jsPDF#
+ */
+
+jsPDF.version = "2.5.2";
+
+var jsPDFAPI = jsPDF.API;
+var scaleFactor = 1;
+
+var pdfEscape = function pdfEscape(value) {
+  return value.replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
+};
+
+var pdfUnescape = function pdfUnescape(value) {
+  return value.replace(/\\\\/g, "\\").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
+};
+
+var f2 = function f2(number) {
+  return number.toFixed(2); // Ie, %.2f
+};
+
+var f5 = function f5(number) {
+  return number.toFixed(5); // Ie, %.2f
+};
+
+jsPDFAPI.__acroform__ = {};
+
+var inherit = function inherit(child, parent) {
+  child.prototype = Object.create(parent.prototype);
+  child.prototype.constructor = child;
+};
+
+var scale = function scale(x) {
+  return x * scaleFactor;
+};
+
+var createFormXObject = function createFormXObject(formObject) {
+  var xobj = new AcroFormXObject();
+  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;
+  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;
+  xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];
+  return xobj;
+};
+/**
+ * Bit-Operations
+ */
+
+
+var setBit = jsPDFAPI.__acroform__.setBit = function (number, bitPosition) {
+  number = number || 0;
+  bitPosition = bitPosition || 0;
+
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");
+  }
+
+  var bitMask = 1 << bitPosition;
+  number |= bitMask;
+  return number;
+};
+
+var clearBit = jsPDFAPI.__acroform__.clearBit = function (number, bitPosition) {
+  number = number || 0;
+  bitPosition = bitPosition || 0;
+
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");
+  }
+
+  var bitMask = 1 << bitPosition;
+  number &= ~bitMask;
+  return number;
+};
+
+var getBit = jsPDFAPI.__acroform__.getBit = function (number, bitPosition) {
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");
+  }
+
+  return (number & 1 << bitPosition) === 0 ? 0 : 1;
+};
+/*
+ * Ff starts counting the bit position at 1 and not like javascript at 0
+ */
+
+
+var getBitForPdf = jsPDFAPI.__acroform__.getBitForPdf = function (number, bitPosition) {
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");
+  }
+
+  return getBit(number, bitPosition - 1);
+};
+
+var setBitForPdf = jsPDFAPI.__acroform__.setBitForPdf = function (number, bitPosition) {
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");
+  }
+
+  return setBit(number, bitPosition - 1);
+};
+
+var clearBitForPdf = jsPDFAPI.__acroform__.clearBitForPdf = function (number, bitPosition) {
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");
+  }
+
+  return clearBit(number, bitPosition - 1);
+};
+
+var calculateCoordinates = jsPDFAPI.__acroform__.calculateCoordinates = function (args, scope) {
+  var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;
+  var getVerticalCoordinate = scope.internal.getVerticalCoordinate;
+  var x = args[0];
+  var y = args[1];
+  var w = args[2];
+  var h = args[3];
+  var coordinates = {};
+  coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;
+  coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;
+  coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;
+  coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;
+  return [Number(f2(coordinates.lowerLeft_X)), Number(f2(coordinates.lowerLeft_Y)), Number(f2(coordinates.upperRight_X)), Number(f2(coordinates.upperRight_Y))];
+};
+
+var calculateAppearanceStream = function calculateAppearanceStream(formObject) {
+  if (formObject.appearanceStreamContent) {
+    return formObject.appearanceStreamContent;
+  }
+
+  if (!formObject.V && !formObject.DV) {
+    return;
+  } // else calculate it
+
+
+  var stream = [];
+  var text = formObject._V || formObject.DV;
+  var calcRes = calculateX(formObject, text);
+  var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id; //PDF 32000-1:2008, page 444
+
+  stream.push("/Tx BMC");
+  stream.push("q");
+  stream.push("BT"); // Begin Text
+
+  stream.push(formObject.scope.__private__.encodeColorString(formObject.color));
+  stream.push("/" + fontKey + " " + f2(calcRes.fontSize) + " Tf");
+  stream.push("1 0 0 1 0 0 Tm"); // Transformation Matrix
+
+  stream.push(calcRes.text);
+  stream.push("ET"); // End Text
+
+  stream.push("Q");
+  stream.push("EMC");
+  var appearanceStreamContent = createFormXObject(formObject);
+  appearanceStreamContent.scope = formObject.scope;
+  appearanceStreamContent.stream = stream.join("\n");
+  return appearanceStreamContent;
+};
+
+var calculateX = function calculateX(formObject, text) {
+  var maxFontSize = formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;
+  var returnValue = {
+    text: "",
+    fontSize: ""
+  }; // Remove Brackets
+
+  text = text.substr(0, 1) == "(" ? text.substr(1) : text;
+  text = text.substr(text.length - 1) == ")" ? text.substr(0, text.length - 1) : text; // split into array of words
+
+  var textSplit = text.split(" ");
+
+  if (formObject.multiline) {
+    textSplit = textSplit.map(function (word) {
+      return word.split("\n");
+    });
+  } else {
+    textSplit = textSplit.map(function (word) {
+      return [word];
+    });
+  }
+
+  var fontSize = maxFontSize; // The Starting fontSize (The Maximum)
+
+  var lineSpacing = 2;
+  var borderPadding = 2;
+  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;
+  height = height < 0 ? -height : height;
+  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;
+  width = width < 0 ? -width : width;
+
+  var isSmallerThanWidth = function isSmallerThanWidth(i, lastLine, fontSize) {
+    if (i + 1 < textSplit.length) {
+      var tmp = lastLine + " " + textSplit[i + 1][0];
+      var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;
+      var FieldWidth = width - 2 * borderPadding;
+      return TextWidth <= FieldWidth;
+    } else {
+      return false;
+    }
+  };
+
+  fontSize++;
+
+  FontSize: while (fontSize > 0) {
+    text = "";
+    fontSize--;
+    var textHeight = calculateFontSpace("3", formObject, fontSize).height;
+    var startY = formObject.multiline ? height - fontSize : (height - textHeight) / 2;
+    startY += lineSpacing;
+    var startX;
+    var lastY = startY;
+    var firstWordInLine = 0,
+        lastWordInLine = 0;
+    var lastLength;
+    var currWord = 0;
+
+    if (fontSize <= 0) {
+      // In case, the Text doesn't fit at all
+      fontSize = 12;
+      text = "(...) Tj\n";
+      text += "% Width of Text: " + calculateFontSpace(text, formObject, fontSize).width + ", FieldWidth:" + width + "\n";
+      break;
+    }
+
+    var lastLine = "";
+    var lineCount = 0;
+
+    Line: for (var i = 0; i < textSplit.length; i++) {
+      if (textSplit.hasOwnProperty(i)) {
+        var isWithNewLine = false;
+
+        if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {
+          if ((textHeight + lineSpacing) * (lineCount + 2) + lineSpacing > height) {
+            continue FontSize;
+          }
+
+          lastLine += textSplit[i][currWord];
+          isWithNewLine = true;
+          lastWordInLine = i;
+          i--;
+        } else {
+          lastLine += textSplit[i][currWord] + " ";
+          lastLine = lastLine.substr(lastLine.length - 1) == " " ? lastLine.substr(0, lastLine.length - 1) : lastLine;
+          var key = parseInt(i);
+          var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);
+          var isLastWord = i >= textSplit.length - 1;
+
+          if (nextLineIsSmaller && !isLastWord) {
+            lastLine += " ";
+            currWord = 0;
+            continue; // Line
+          } else if (!nextLineIsSmaller && !isLastWord) {
+            if (!formObject.multiline) {
+              continue FontSize;
+            } else {
+              if ((textHeight + lineSpacing) * (lineCount + 2) + lineSpacing > height) {
+                // If the Text is higher than the
+                // FieldObject
+                continue FontSize;
+              }
+
+              lastWordInLine = key; // go on
+            }
+          } else if (isLastWord) {
+            lastWordInLine = key;
+          } else {
+            if (formObject.multiline && (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing > height) {
+              // If the Text is higher than the FieldObject
+              continue FontSize;
+            }
+          }
+        } // Remove last blank
+
+
+        var line = "";
+
+        for (var x = firstWordInLine; x <= lastWordInLine; x++) {
+          var currLine = textSplit[x];
+
+          if (formObject.multiline) {
+            if (x === lastWordInLine) {
+              line += currLine[currWord] + " ";
+              currWord = (currWord + 1) % currLine.length;
+              continue;
+            }
+
+            if (x === firstWordInLine) {
+              line += currLine[currLine.length - 1] + " ";
+              continue;
+            }
+          }
+
+          line += currLine[0] + " ";
+        } // Remove last blank
+
+
+        line = line.substr(line.length - 1) == " " ? line.substr(0, line.length - 1) : line; // lastLength -= blankSpace.width;
+
+        lastLength = calculateFontSpace(line, formObject, fontSize).width; // Calculate startX
+
+        switch (formObject.textAlign) {
+          case "right":
+            startX = width - lastLength - borderPadding;
+            break;
+
+          case "center":
+            startX = (width - lastLength) / 2;
+            break;
+
+          case "left":
+          default:
+            startX = borderPadding;
+            break;
+        }
+
+        text += f2(startX) + " " + f2(lastY) + " Td\n";
+        text += "(" + pdfEscape(line) + ") Tj\n"; // reset X in PDF
+
+        text += -f2(startX) + " 0 Td\n"; // After a Line, adjust y position
+
+        lastY = -(fontSize + lineSpacing); // Reset for next iteration step
+
+        lastLength = 0;
+        firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;
+        lineCount++;
+        lastLine = "";
+        continue Line;
+      }
+    }
+
+    break;
+  }
+
+  returnValue.text = text;
+  returnValue.fontSize = fontSize;
+  return returnValue;
+};
+/**
+ * Small workaround for calculating the TextMetric approximately.
+ *
+ * @param text
+ * @param fontsize
+ * @returns {TextMetrics} (Has Height and Width)
+ */
+
+
+var calculateFontSpace = function calculateFontSpace(text, formObject, fontSize) {
+  var font = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle);
+  var width = formObject.scope.getStringUnitWidth(text, {
+    font: font,
+    fontSize: parseFloat(fontSize),
+    charSpace: 0
+  }) * parseFloat(fontSize);
+  var height = formObject.scope.getStringUnitWidth("3", {
+    font: font,
+    fontSize: parseFloat(fontSize),
+    charSpace: 0
+  }) * parseFloat(fontSize) * 1.5;
+  return {
+    height: height,
+    width: width
+  };
+};
+
+var acroformPluginTemplate = {
+  fields: [],
+  xForms: [],
+
+  /**
+   * acroFormDictionaryRoot contains information about the AcroForm
+   * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has
+   * 1: The Object ID of the Root
+   */
+  acroFormDictionaryRoot: null,
+
+  /**
+   * After the PDF gets evaluated, the reference to the root has to be
+   * reset, this indicates, whether the root has already been printed
+   * out
+   */
+  printedOut: false,
+  internal: null,
+  isInitialized: false
+};
+
+var annotReferenceCallback = function annotReferenceCallback(scope) {
+  //set objId to undefined and force it to get a new objId on buildDocument
+  scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;
+  var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;
+
+  for (var i in fields) {
+    if (fields.hasOwnProperty(i)) {
+      var formObject = fields[i]; //set objId to undefined and force it to get a new objId on buildDocument
+
+      formObject.objId = undefined; // add Annot Reference!
+
+      if (formObject.hasAnnotation) {
+        // If theres an Annotation Widget in the Form Object, put the
+        // Reference in the /Annot array
+        createAnnotationReference(formObject, scope);
+      }
+    }
+  }
+};
+
+var putForm = function putForm(formObject) {
+  if (formObject.scope.internal.acroformPlugin.printedOut) {
+    formObject.scope.internal.acroformPlugin.printedOut = false;
+    formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;
+  }
+
+  formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(formObject);
+};
+/**
+ * Create the Reference to the widgetAnnotation, so that it gets referenced
+ * in the Annot[] int the+ (Requires the Annotation Plugin)
+ */
+
+
+var createAnnotationReference = function createAnnotationReference(object, scope) {
+  var options = {
+    type: "reference",
+    object: object
+  };
+
+  var findEntry = function findEntry(entry) {
+    return entry.type === options.type && entry.object === options.object;
+  };
+
+  if (scope.internal.getPageInfo(object.page).pageContext.annotations.find(findEntry) === undefined) {
+    scope.internal.getPageInfo(object.page).pageContext.annotations.push(options);
+  }
+}; // Callbacks
+
+
+var putCatalogCallback = function putCatalogCallback(scope) {
+  // Put reference to AcroForm to DocumentCatalog
+  if (typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== "undefined") {
+    // for safety, shouldn't normally be the case
+    scope.internal.write("/AcroForm " + scope.internal.acroformPlugin.acroFormDictionaryRoot.objId + " " + 0 + " R");
+  } else {
+    throw new Error("putCatalogCallback: Root missing.");
+  }
+};
+/**
+ * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm
+ * Dictionary
+ */
+
+
+var AcroFormDictionaryCallback = function AcroFormDictionaryCallback(scope) {
+  // Remove event
+  scope.internal.events.unsubscribe(scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID);
+  delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;
+  scope.internal.acroformPlugin.printedOut = true;
+};
+/**
+ * Creates the single Fields and writes them into the Document
+ *
+ * If fieldArray is set, use the fields that are inside it instead of the
+ * fields from the AcroRoot (for the FormXObjects...)
+ */
+
+
+var createFieldCallback = function createFieldCallback(fieldArray, scope) {
+  var standardFields = !fieldArray;
+
+  if (!fieldArray) {
+    // in case there is no fieldArray specified, we want to print out
+    // the Fields of the AcroForm
+    // Print out Root
+    scope.internal.newObjectDeferredBegin(scope.internal.acroformPlugin.acroFormDictionaryRoot.objId, true);
+    scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();
+  }
+
+  fieldArray = fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;
+
+  for (var i in fieldArray) {
+    if (fieldArray.hasOwnProperty(i)) {
+      var fieldObject = fieldArray[i];
+      var keyValueList = [];
+      var oldRect = fieldObject.Rect;
+
+      if (fieldObject.Rect) {
+        fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);
+      } // Start Writing the Object
+
+
+      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);
+      fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(fieldObject);
+
+      if (_typeof(fieldObject) === "object" && typeof fieldObject.getKeyValueListForStream === "function") {
+        keyValueList = fieldObject.getKeyValueListForStream();
+      }
+
+      fieldObject.Rect = oldRect;
+
+      if (fieldObject.hasAppearanceStream && !fieldObject.appearanceStreamContent) {
+        // Calculate Appearance
+        var appearance = calculateAppearanceStream(fieldObject);
+        keyValueList.push({
+          key: "AP",
+          value: "<</N " + appearance + ">>"
+        });
+        scope.internal.acroformPlugin.xForms.push(appearance);
+      } // Assume AppearanceStreamContent is a Array with N,R,D (at least
+      // one of them!)
+
+
+      if (fieldObject.appearanceStreamContent) {
+        var appearanceStreamString = ""; // Iterate over N,R and D
+
+        for (var k in fieldObject.appearanceStreamContent) {
+          if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {
+            var value = fieldObject.appearanceStreamContent[k];
+            appearanceStreamString += "/" + k + " ";
+            appearanceStreamString += "<<";
+
+            if (Object.keys(value).length >= 1 || Array.isArray(value)) {
+              // appearanceStream is an Array or Object!
+              for (var i in value) {
+                if (value.hasOwnProperty(i)) {
+                  var obj = value[i];
+
+                  if (typeof obj === "function") {
+                    // if Function is referenced, call it in order
+                    // to get the FormXObject
+                    obj = obj.call(scope, fieldObject);
+                  }
+
+                  appearanceStreamString += "/" + i + " " + obj + " "; // In case the XForm is already used, e.g. OffState
+                  // of CheckBoxes, don't add it
+
+                  if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0)) scope.internal.acroformPlugin.xForms.push(obj);
+                }
+              }
+            } else {
+              obj = value;
+
+              if (typeof obj === "function") {
+                // if Function is referenced, call it in order to
+                // get the FormXObject
+                obj = obj.call(scope, fieldObject);
+              }
+
+              appearanceStreamString += "/" + i + " " + obj;
+              if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0)) scope.internal.acroformPlugin.xForms.push(obj);
+            }
+
+            appearanceStreamString += ">>";
+          }
+        } // appearance stream is a normal Object..
+
+
+        keyValueList.push({
+          key: "AP",
+          value: "<<\n" + appearanceStreamString + ">>"
+        });
+      }
+
+      scope.internal.putStream({
+        additionalKeyValues: keyValueList,
+        objectId: fieldObject.objId
+      });
+      scope.internal.out("endobj");
+    }
+  }
+
+  if (standardFields) {
+    createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);
+  }
+};
+
+var createXFormObjectCallback = function createXFormObjectCallback(fieldArray, scope) {
+  for (var i in fieldArray) {
+    if (fieldArray.hasOwnProperty(i)) {
+      var key = i;
+      var fieldObject = fieldArray[i]; // Start Writing the Object
+
+      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);
+
+      if (_typeof(fieldObject) === "object" && typeof fieldObject.putStream === "function") {
+        fieldObject.putStream();
+      }
+
+      delete fieldArray[key];
+    }
+  }
+};
+
+var initializeAcroForm = function initializeAcroForm(scope, formObject) {
+  formObject.scope = scope;
+
+  if (scope.internal !== undefined && (scope.internal.acroformPlugin === undefined || scope.internal.acroformPlugin.isInitialized === false)) {
+    AcroFormField.FieldNum = 0;
+    scope.internal.acroformPlugin = JSON.parse(JSON.stringify(acroformPluginTemplate));
+
+    if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {
+      throw new Error("Exception while creating AcroformDictionary");
+    }
+
+    scaleFactor = scope.internal.scaleFactor; // The Object Number of the AcroForm Dictionary
+
+    scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();
+    scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope; // add Callback for creating the AcroForm Dictionary
+
+    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe("postPutResources", function () {
+      AcroFormDictionaryCallback(scope);
+    });
+    scope.internal.events.subscribe("buildDocument", function () {
+      annotReferenceCallback(scope);
+    }); // buildDocument
+    // Register event, that is triggered when the DocumentCatalog is
+    // written, in order to add /AcroForm
+
+    scope.internal.events.subscribe("putCatalog", function () {
+      putCatalogCallback(scope);
+    }); // Register event, that creates all Fields
+
+    scope.internal.events.subscribe("postPutPages", function (fieldArray) {
+      createFieldCallback(fieldArray, scope);
+    });
+    scope.internal.acroformPlugin.isInitialized = true;
+  }
+}; //PDF 32000-1:2008, page 26, 7.3.6
+
+
+var arrayToPdfArray = jsPDFAPI.__acroform__.arrayToPdfArray = function (array, objId, scope) {
+  var encryptor = function encryptor(data) {
+    return data;
+  };
+
+  if (Array.isArray(array)) {
+    var content = "[";
+
+    for (var i = 0; i < array.length; i++) {
+      if (i !== 0) {
+        content += " ";
+      }
+
+      switch (_typeof(array[i])) {
+        case "boolean":
+        case "number":
+        case "object":
+          content += array[i].toString();
+          break;
+
+        case "string":
+          if (array[i].substr(0, 1) !== "/") {
+            if (typeof objId !== "undefined" && scope) encryptor = scope.internal.getEncryptor(objId);
+            content += "(" + pdfEscape(encryptor(array[i].toString())) + ")";
+          } else {
+            content += array[i].toString();
+          }
+
+          break;
+      }
+    }
+
+    content += "]";
+    return content;
+  }
+
+  throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray");
+};
+
+function getMatches(string, regex, index) {
+  index || (index = 1); // default to the first capturing group
+
+  var matches = [];
+  var match;
+
+  while (match = regex.exec(string)) {
+    matches.push(match[index]);
+  }
+
+  return matches;
+}
+
+var pdfArrayToStringArray = function pdfArrayToStringArray(array) {
+  var result = [];
+
+  if (typeof array === "string") {
+    result = getMatches(array, /\((.*?)\)/g);
+  }
+
+  return result;
+};
+
+var toPdfString = function toPdfString(string, objId, scope) {
+  var encryptor = function encryptor(data) {
+    return data;
+  };
+
+  if (typeof objId !== "undefined" && scope) encryptor = scope.internal.getEncryptor(objId);
+  string = string || "";
+  string.toString();
+  string = "(" + pdfEscape(encryptor(string)) + ")";
+  return string;
+}; // ##########################
+// Classes
+// ##########################
+
+/**
+ * @class AcroFormPDFObject
+ * @classdesc A AcroFormPDFObject
+ */
+
+
+var AcroFormPDFObject = function AcroFormPDFObject() {
+  this._objId = undefined;
+  this._scope = undefined;
+  /**
+   * @name AcroFormPDFObject#objId
+   * @type {any}
+   */
+
+  Object.defineProperty(this, "objId", {
+    get: function get() {
+      if (typeof this._objId === "undefined") {
+        if (typeof this.scope === "undefined") {
+          return undefined;
+        }
+
+        this._objId = this.scope.internal.newObjectDeferred();
+      }
+
+      return this._objId;
+    },
+    set: function set(value) {
+      this._objId = value;
+    }
+  });
+  Object.defineProperty(this, "scope", {
+    value: this._scope,
+    writable: true
+  });
+};
+/**
+ * @function AcroFormPDFObject.toString
+ */
+
+
+AcroFormPDFObject.prototype.toString = function () {
+  return this.objId + " 0 R";
+};
+
+AcroFormPDFObject.prototype.putStream = function () {
+  var keyValueList = this.getKeyValueListForStream();
+  this.scope.internal.putStream({
+    data: this.stream,
+    additionalKeyValues: keyValueList,
+    objectId: this.objId
+  });
+  this.scope.internal.out("endobj");
+};
+/**
+ * Returns an key-value-List of all non-configurable Variables from the Object
+ *
+ * @name getKeyValueListForStream
+ * @returns {string}
+ */
+
+
+AcroFormPDFObject.prototype.getKeyValueListForStream = function () {
+  var keyValueList = [];
+  var keys = Object.getOwnPropertyNames(this).filter(function (key) {
+    return key != "content" && key != "appearanceStreamContent" && key != "scope" && key != "objId" && key.substring(0, 1) != "_";
+  });
+
+  for (var i in keys) {
+    if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {
+      var key = keys[i];
+      var value = this[key];
+
+      if (value) {
+        if (Array.isArray(value)) {
+          keyValueList.push({
+            key: key,
+            value: arrayToPdfArray(value, this.objId, this.scope)
+          });
+        } else if (value instanceof AcroFormPDFObject) {
+          // In case it is a reference to another PDFObject,
+          // take the reference number
+          value.scope = this.scope;
+          keyValueList.push({
+            key: key,
+            value: value.objId + " 0 R"
+          });
+        } else if (typeof value !== "function") {
+          keyValueList.push({
+            key: key,
+            value: value
+          });
+        }
+      }
+    }
+  }
+
+  return keyValueList;
+};
+
+var AcroFormXObject = function AcroFormXObject() {
+  AcroFormPDFObject.call(this);
+  Object.defineProperty(this, "Type", {
+    value: "/XObject",
+    configurable: false,
+    writable: true
+  });
+  Object.defineProperty(this, "Subtype", {
+    value: "/Form",
+    configurable: false,
+    writable: true
+  });
+  Object.defineProperty(this, "FormType", {
+    value: 1,
+    configurable: false,
+    writable: true
+  });
+  var _BBox = [];
+  Object.defineProperty(this, "BBox", {
+    configurable: false,
+    get: function get() {
+      return _BBox;
+    },
+    set: function set(value) {
+      _BBox = value;
+    }
+  });
+  Object.defineProperty(this, "Resources", {
+    value: "2 0 R",
+    configurable: false,
+    writable: true
+  });
+
+  var _stream;
+
+  Object.defineProperty(this, "stream", {
+    enumerable: false,
+    configurable: true,
+    set: function set(value) {
+      _stream = value.trim();
+    },
+    get: function get() {
+      if (_stream) {
+        return _stream;
+      } else {
+        return null;
+      }
+    }
+  });
+};
+
+inherit(AcroFormXObject, AcroFormPDFObject);
+
+var AcroFormDictionary = function AcroFormDictionary() {
+  AcroFormPDFObject.call(this);
+  var _Kids = [];
+  Object.defineProperty(this, "Kids", {
+    enumerable: false,
+    configurable: true,
+    get: function get() {
+      if (_Kids.length > 0) {
+        return _Kids;
+      } else {
+        return undefined;
+      }
+    }
+  });
+  Object.defineProperty(this, "Fields", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      return _Kids;
+    }
+  }); // Default Appearance
+
+  var _DA;
+
+  Object.defineProperty(this, "DA", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      if (!_DA) {
+        return undefined;
+      }
+
+      var encryptor = function encryptor(data) {
+        return data;
+      };
+
+      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+      return "(" + pdfEscape(encryptor(_DA)) + ")";
+    },
+    set: function set(value) {
+      _DA = value;
+    }
+  });
+};
+
+inherit(AcroFormDictionary, AcroFormPDFObject);
+/**
+ * The Field Object contains the Variables, that every Field needs
+ *
+ * @class AcroFormField
+ * @classdesc An AcroForm FieldObject
+ */
+
+var AcroFormField = function AcroFormField() {
+  AcroFormPDFObject.call(this); //Annotation-Flag See Table 165
+
+  var _F = 4;
+  Object.defineProperty(this, "F", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      return _F;
+    },
+    set: function set(value) {
+      if (!isNaN(value)) {
+        _F = value;
+      } else {
+        throw new Error('Invalid value "' + value + '" for attribute F supplied.');
+      }
+    }
+  });
+  /**
+   * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.
+   * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.
+   *
+   * @name AcroFormField#showWhenPrinted
+   * @default true
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "showWhenPrinted", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(_F, 3));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.F = setBitForPdf(_F, 3);
+      } else {
+        this.F = clearBitForPdf(_F, 3);
+      }
+    }
+  });
+  var _Ff = 0;
+  Object.defineProperty(this, "Ff", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      return _Ff;
+    },
+    set: function set(value) {
+      if (!isNaN(value)) {
+        _Ff = value;
+      } else {
+        throw new Error('Invalid value "' + value + '" for attribute Ff supplied.');
+      }
+    }
+  });
+  var _Rect = [];
+  Object.defineProperty(this, "Rect", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      if (_Rect.length === 0) {
+        return undefined;
+      }
+
+      return _Rect;
+    },
+    set: function set(value) {
+      if (typeof value !== "undefined") {
+        _Rect = value;
+      } else {
+        _Rect = [];
+      }
+    }
+  });
+  /**
+   * The x-position of the field.
+   *
+   * @name AcroFormField#x
+   * @default null
+   * @type {number}
+   */
+
+  Object.defineProperty(this, "x", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      if (!_Rect || isNaN(_Rect[0])) {
+        return 0;
+      }
+
+      return _Rect[0];
+    },
+    set: function set(value) {
+      _Rect[0] = value;
+    }
+  });
+  /**
+   * The y-position of the field.
+   *
+   * @name AcroFormField#y
+   * @default null
+   * @type {number}
+   */
+
+  Object.defineProperty(this, "y", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      if (!_Rect || isNaN(_Rect[1])) {
+        return 0;
+      }
+
+      return _Rect[1];
+    },
+    set: function set(value) {
+      _Rect[1] = value;
+    }
+  });
+  /**
+   * The width of the field.
+   *
+   * @name AcroFormField#width
+   * @default null
+   * @type {number}
+   */
+
+  Object.defineProperty(this, "width", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      if (!_Rect || isNaN(_Rect[2])) {
+        return 0;
+      }
+
+      return _Rect[2];
+    },
+    set: function set(value) {
+      _Rect[2] = value;
+    }
+  });
+  /**
+   * The height of the field.
+   *
+   * @name AcroFormField#height
+   * @default null
+   * @type {number}
+   */
+
+  Object.defineProperty(this, "height", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      if (!_Rect || isNaN(_Rect[3])) {
+        return 0;
+      }
+
+      return _Rect[3];
+    },
+    set: function set(value) {
+      _Rect[3] = value;
+    }
+  });
+  var _FT = "";
+  Object.defineProperty(this, "FT", {
+    enumerable: true,
+    configurable: false,
+    get: function get() {
+      return _FT;
+    },
+    set: function set(value) {
+      switch (value) {
+        case "/Btn":
+        case "/Tx":
+        case "/Ch":
+        case "/Sig":
+          _FT = value;
+          break;
+
+        default:
+          throw new Error('Invalid value "' + value + '" for attribute FT supplied.');
+      }
+    }
+  });
+  var _T = null;
+  Object.defineProperty(this, "T", {
+    enumerable: true,
+    configurable: false,
+    get: function get() {
+      if (!_T || _T.length < 1) {
+        // In case of a Child from a Radio´Group, you don't need a FieldName
+        if (this instanceof AcroFormChildClass) {
+          return undefined;
+        }
+
+        _T = "FieldObject" + AcroFormField.FieldNum++;
+      }
+
+      var encryptor = function encryptor(data) {
+        return data;
+      };
+
+      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+      return "(" + pdfEscape(encryptor(_T)) + ")";
+    },
+    set: function set(value) {
+      _T = value.toString();
+    }
+  });
+  /**
+   * (Optional) The partial field name (see 12.7.3.2, “Field Names”).
+   *
+   * @name AcroFormField#fieldName
+   * @default null
+   * @type {string}
+   */
+
+  Object.defineProperty(this, "fieldName", {
+    configurable: true,
+    enumerable: true,
+    get: function get() {
+      return _T;
+    },
+    set: function set(value) {
+      _T = value;
+    }
+  });
+  var _fontName = "helvetica";
+  /**
+   * The fontName of the font to be used.
+   *
+   * @name AcroFormField#fontName
+   * @default 'helvetica'
+   * @type {string}
+   */
+
+  Object.defineProperty(this, "fontName", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _fontName;
+    },
+    set: function set(value) {
+      _fontName = value;
+    }
+  });
+  var _fontStyle = "normal";
+  /**
+   * The fontStyle of the font to be used.
+   *
+   * @name AcroFormField#fontStyle
+   * @default 'normal'
+   * @type {string}
+   */
+
+  Object.defineProperty(this, "fontStyle", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _fontStyle;
+    },
+    set: function set(value) {
+      _fontStyle = value;
+    }
+  });
+  var _fontSize = 0;
+  /**
+   * The fontSize of the font to be used.
+   *
+   * @name AcroFormField#fontSize
+   * @default 0 (for auto)
+   * @type {number}
+   */
+
+  Object.defineProperty(this, "fontSize", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _fontSize;
+    },
+    set: function set(value) {
+      _fontSize = value;
+    }
+  });
+  var _maxFontSize = undefined;
+  /**
+   * The maximum fontSize of the font to be used.
+   *
+   * @name AcroFormField#maxFontSize
+   * @default 0 (for auto)
+   * @type {number}
+   */
+
+  Object.defineProperty(this, "maxFontSize", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      if (_maxFontSize === undefined) {
+        // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)
+        // ("50" is transformed to the "user space" but then used in "pdf space")
+        return 50 / scaleFactor;
+      } else {
+        return _maxFontSize;
+      }
+    },
+    set: function set(value) {
+      _maxFontSize = value;
+    }
+  });
+  var _color = "black";
+  /**
+   * The color of the text
+   *
+   * @name AcroFormField#color
+   * @default 'black'
+   * @type {string|rgba}
+   */
+
+  Object.defineProperty(this, "color", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _color;
+    },
+    set: function set(value) {
+      _color = value;
+    }
+  });
+  var _DA = "/F1 0 Tf 0 g"; // Defines the default appearance (Needed for variable Text)
+
+  Object.defineProperty(this, "DA", {
+    enumerable: true,
+    configurable: false,
+    get: function get() {
+      if (!_DA || this instanceof AcroFormChildClass || this instanceof AcroFormTextField) {
+        return undefined;
+      }
+
+      return toPdfString(_DA, this.objId, this.scope);
+    },
+    set: function set(value) {
+      value = value.toString();
+      _DA = value;
+    }
+  });
+  var _DV = null;
+  Object.defineProperty(this, "DV", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      if (!_DV) {
+        return undefined;
+      }
+
+      if (this instanceof AcroFormButton === false) {
+        return toPdfString(_DV, this.objId, this.scope);
+      }
+
+      return _DV;
+    },
+    set: function set(value) {
+      value = value.toString();
+
+      if (this instanceof AcroFormButton === false) {
+        if (value.substr(0, 1) === "(") {
+          _DV = pdfUnescape(value.substr(1, value.length - 2));
+        } else {
+          _DV = pdfUnescape(value);
+        }
+      } else {
+        _DV = value;
+      }
+    }
+  });
+  /**
+   * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.
+   *
+   * @name AcroFormField#defaultValue
+   * @default null
+   * @type {any}
+   */
+
+  Object.defineProperty(this, "defaultValue", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      if (this instanceof AcroFormButton === true) {
+        return pdfUnescape(_DV.substr(1, _DV.length - 1));
+      } else {
+        return _DV;
+      }
+    },
+    set: function set(value) {
+      value = value.toString();
+
+      if (this instanceof AcroFormButton === true) {
+        _DV = "/" + value;
+      } else {
+        _DV = value;
+      }
+    }
+  });
+  var _V = null;
+  Object.defineProperty(this, "_V", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      if (!_V) {
+        return undefined;
+      }
+
+      return _V;
+    },
+    set: function set(value) {
+      this.V = value;
+    }
+  });
+  Object.defineProperty(this, "V", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      if (!_V) {
+        return undefined;
+      }
+
+      if (this instanceof AcroFormButton === false) {
+        return toPdfString(_V, this.objId, this.scope);
+      }
+
+      return _V;
+    },
+    set: function set(value) {
+      value = value.toString();
+
+      if (this instanceof AcroFormButton === false) {
+        if (value.substr(0, 1) === "(") {
+          _V = pdfUnescape(value.substr(1, value.length - 2));
+        } else {
+          _V = pdfUnescape(value);
+        }
+      } else {
+        _V = value;
+      }
+    }
+  });
+  /**
+   * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.
+   *
+   * @name AcroFormField#value
+   * @default null
+   * @type {any}
+   */
+
+  Object.defineProperty(this, "value", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      if (this instanceof AcroFormButton === true) {
+        return pdfUnescape(_V.substr(1, _V.length - 1));
+      } else {
+        return _V;
+      }
+    },
+    set: function set(value) {
+      value = value.toString();
+
+      if (this instanceof AcroFormButton === true) {
+        _V = "/" + value;
+      } else {
+        _V = value;
+      }
+    }
+  });
+  /**
+   * Check if field has annotations
+   *
+   * @name AcroFormField#hasAnnotation
+   * @readonly
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "hasAnnotation", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return this.Rect;
+    }
+  });
+  Object.defineProperty(this, "Type", {
+    enumerable: true,
+    configurable: false,
+    get: function get() {
+      return this.hasAnnotation ? "/Annot" : null;
+    }
+  });
+  Object.defineProperty(this, "Subtype", {
+    enumerable: true,
+    configurable: false,
+    get: function get() {
+      return this.hasAnnotation ? "/Widget" : null;
+    }
+  });
+  var _hasAppearanceStream = false;
+  /**
+   * true if field has an appearanceStream
+   *
+   * @name AcroFormField#hasAppearanceStream
+   * @readonly
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "hasAppearanceStream", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _hasAppearanceStream;
+    },
+    set: function set(value) {
+      value = Boolean(value);
+      _hasAppearanceStream = value;
+    }
+  });
+  /**
+   * The page on which the AcroFormField is placed
+   *
+   * @name AcroFormField#page
+   * @type {number}
+   */
+
+  var _page;
+
+  Object.defineProperty(this, "page", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      if (!_page) {
+        return undefined;
+      }
+
+      return _page;
+    },
+    set: function set(value) {
+      _page = value;
+    }
+  });
+  /**
+   * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.
+   *
+   * @name AcroFormField#readOnly
+   * @default false
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "readOnly", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 1));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 1);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 1);
+      }
+    }
+  });
+  /**
+   * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).
+   *
+   * @name AcroFormField#required
+   * @default false
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "required", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 2));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 2);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 2);
+      }
+    }
+  });
+  /**
+   * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)
+   *
+   * @name AcroFormField#noExport
+   * @default false
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "noExport", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 3));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 3);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 3);
+      }
+    }
+  });
+  var _Q = null;
+  Object.defineProperty(this, "Q", {
+    enumerable: true,
+    configurable: false,
+    get: function get() {
+      if (_Q === null) {
+        return undefined;
+      }
+
+      return _Q;
+    },
+    set: function set(value) {
+      if ([0, 1, 2].indexOf(value) !== -1) {
+        _Q = value;
+      } else {
+        throw new Error('Invalid value "' + value + '" for attribute Q supplied.');
+      }
+    }
+  });
+  /**
+   * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:
+   * 'left', 'center', 'right'
+   *
+   * @name AcroFormField#textAlign
+   * @default 'left'
+   * @type {string}
+   */
+
+  Object.defineProperty(this, "textAlign", {
+    get: function get() {
+      var result;
+
+      switch (_Q) {
+        case 0:
+        default:
+          result = "left";
+          break;
+
+        case 1:
+          result = "center";
+          break;
+
+        case 2:
+          result = "right";
+          break;
+      }
+
+      return result;
+    },
+    configurable: true,
+    enumerable: true,
+    set: function set(value) {
+      switch (value) {
+        case "right":
+        case 2:
+          _Q = 2;
+          break;
+
+        case "center":
+        case 1:
+          _Q = 1;
+          break;
+
+        case "left":
+        case 0:
+        default:
+          _Q = 0;
+      }
+    }
+  });
+};
+
+inherit(AcroFormField, AcroFormPDFObject);
+/**
+ * @class AcroFormChoiceField
+ * @extends AcroFormField
+ */
+
+var AcroFormChoiceField = function AcroFormChoiceField() {
+  AcroFormField.call(this); // Field Type = Choice Field
+
+  this.FT = "/Ch"; // options
+
+  this.V = "()";
+  this.fontName = "zapfdingbats"; // Top Index
+
+  var _TI = 0;
+  Object.defineProperty(this, "TI", {
+    enumerable: true,
+    configurable: false,
+    get: function get() {
+      return _TI;
+    },
+    set: function set(value) {
+      _TI = value;
+    }
+  });
+  /**
+   * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.
+   *
+   * @name AcroFormChoiceField#topIndex
+   * @default 0
+   * @type {number}
+   */
+
+  Object.defineProperty(this, "topIndex", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _TI;
+    },
+    set: function set(value) {
+      _TI = value;
+    }
+  });
+  var _Opt = [];
+  Object.defineProperty(this, "Opt", {
+    enumerable: true,
+    configurable: false,
+    get: function get() {
+      return arrayToPdfArray(_Opt, this.objId, this.scope);
+    },
+    set: function set(value) {
+      _Opt = pdfArrayToStringArray(value);
+    }
+  });
+  /**
+   * @memberof AcroFormChoiceField
+   * @name getOptions
+   * @function
+   * @instance
+   * @returns {array} array of Options
+   */
+
+  this.getOptions = function () {
+    return _Opt;
+  };
+  /**
+   * @memberof AcroFormChoiceField
+   * @name setOptions
+   * @function
+   * @instance
+   * @param {array} value
+   */
+
+
+  this.setOptions = function (value) {
+    _Opt = value;
+
+    if (this.sort) {
+      _Opt.sort();
+    }
+  };
+  /**
+   * @memberof AcroFormChoiceField
+   * @name addOption
+   * @function
+   * @instance
+   * @param {string} value
+   */
+
+
+  this.addOption = function (value) {
+    value = value || "";
+    value = value.toString();
+
+    _Opt.push(value);
+
+    if (this.sort) {
+      _Opt.sort();
+    }
+  };
+  /**
+   * @memberof AcroFormChoiceField
+   * @name removeOption
+   * @function
+   * @instance
+   * @param {string} value
+   * @param {boolean} allEntries (default: false)
+   */
+
+
+  this.removeOption = function (value, allEntries) {
+    allEntries = allEntries || false;
+    value = value || "";
+    value = value.toString();
+
+    while (_Opt.indexOf(value) !== -1) {
+      _Opt.splice(_Opt.indexOf(value), 1);
+
+      if (allEntries === false) {
+        break;
+      }
+    }
+  };
+  /**
+   * If set, the field is a combo box; if clear, the field is a list box.
+   *
+   * @name AcroFormChoiceField#combo
+   * @default false
+   * @type {boolean}
+   */
+
+
+  Object.defineProperty(this, "combo", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 18));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 18);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 18);
+      }
+    }
+  });
+  /**
+   * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.
+   *
+   * @name AcroFormChoiceField#edit
+   * @default false
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "edit", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 19));
+    },
+    set: function set(value) {
+      //PDF 32000-1:2008, page 444
+      if (this.combo === true) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 19);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 19);
+        }
+      }
+    }
+  });
+  /**
+   * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).
+   *
+   * @name AcroFormChoiceField#sort
+   * @default false
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "sort", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 20));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 20);
+
+        _Opt.sort();
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 20);
+      }
+    }
+  });
+  /**
+   * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected
+   *
+   * @name AcroFormChoiceField#multiSelect
+   * @default false
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "multiSelect", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 22));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 22);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 22);
+      }
+    }
+  });
+  /**
+   * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.
+   *
+   * @name AcroFormChoiceField#doNotSpellCheck
+   * @default false
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "doNotSpellCheck", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 23));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 23);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 23);
+      }
+    }
+  });
+  /**
+   * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.
+   * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.
+   *
+   * @name AcroFormChoiceField#commitOnSelChange
+   * @default false
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "commitOnSelChange", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 27));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 27);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 27);
+      }
+    }
+  });
+  this.hasAppearanceStream = false;
+};
+
+inherit(AcroFormChoiceField, AcroFormField);
+/**
+ * @class AcroFormListBox
+ * @extends AcroFormChoiceField
+ * @extends AcroFormField
+ */
+
+var AcroFormListBox = function AcroFormListBox() {
+  AcroFormChoiceField.call(this);
+  this.fontName = "helvetica"; //PDF 32000-1:2008, page 444
+
+  this.combo = false;
+};
+
+inherit(AcroFormListBox, AcroFormChoiceField);
+/**
+ * @class AcroFormComboBox
+ * @extends AcroFormListBox
+ * @extends AcroFormChoiceField
+ * @extends AcroFormField
+ */
+
+var AcroFormComboBox = function AcroFormComboBox() {
+  AcroFormListBox.call(this);
+  this.combo = true;
+};
+
+inherit(AcroFormComboBox, AcroFormListBox);
+/**
+ * @class AcroFormEditBox
+ * @extends AcroFormComboBox
+ * @extends AcroFormListBox
+ * @extends AcroFormChoiceField
+ * @extends AcroFormField
+ */
+
+var AcroFormEditBox = function AcroFormEditBox() {
+  AcroFormComboBox.call(this);
+  this.edit = true;
+};
+
+inherit(AcroFormEditBox, AcroFormComboBox);
+/**
+ * @class AcroFormButton
+ * @extends AcroFormField
+ */
+
+var AcroFormButton = function AcroFormButton() {
+  AcroFormField.call(this);
+  this.FT = "/Btn";
+  /**
+   * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.
+   *
+   * @name AcroFormButton#noToggleToOff
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "noToggleToOff", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 15));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 15);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 15);
+      }
+    }
+  });
+  /**
+   * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.
+   *
+   * @name AcroFormButton#radio
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "radio", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 16));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 16);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 16);
+      }
+    }
+  });
+  /**
+   * If set, the field is a pushbutton that does not retain a permanent value.
+   *
+   * @name AcroFormButton#pushButton
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "pushButton", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 17));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 17);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 17);
+      }
+    }
+  });
+  /**
+   * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).
+   *
+   * @name AcroFormButton#radioIsUnison
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "radioIsUnison", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 26));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 26);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 26);
+      }
+    }
+  });
+  var _MK = {};
+  Object.defineProperty(this, "MK", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      var encryptor = function encryptor(data) {
+        return data;
+      };
+
+      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+
+      if (Object.keys(_MK).length !== 0) {
+        var result = [];
+        result.push("<<");
+        var key;
+
+        for (key in _MK) {
+          result.push("/" + key + " (" + pdfEscape(encryptor(_MK[key])) + ")");
+        }
+
+        result.push(">>");
+        return result.join("\n");
+      }
+
+      return undefined;
+    },
+    set: function set(value) {
+      if (_typeof(value) === "object") {
+        _MK = value;
+      }
+    }
+  });
+  /**
+   * From the PDF reference:
+   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.
+   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields").
+   *
+   * - '8' = Cross,
+   * - 'l' =  Circle,
+   * - '' = nothing
+   * @name AcroFormButton#caption
+   * @type {string}
+   */
+
+  Object.defineProperty(this, "caption", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _MK.CA || "";
+    },
+    set: function set(value) {
+      if (typeof value === "string") {
+        _MK.CA = value;
+      }
+    }
+  });
+
+  var _AS;
+
+  Object.defineProperty(this, "AS", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      return _AS;
+    },
+    set: function set(value) {
+      _AS = value;
+    }
+  });
+  /**
+   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams")
+   *
+   * @name AcroFormButton#appearanceState
+   * @type {any}
+   */
+
+  Object.defineProperty(this, "appearanceState", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _AS.substr(1, _AS.length - 1);
+    },
+    set: function set(value) {
+      _AS = "/" + value;
+    }
+  });
+};
+
+inherit(AcroFormButton, AcroFormField);
+/**
+ * @class AcroFormPushButton
+ * @extends AcroFormButton
+ * @extends AcroFormField
+ */
+
+var AcroFormPushButton = function AcroFormPushButton() {
+  AcroFormButton.call(this);
+  this.pushButton = true;
+};
+
+inherit(AcroFormPushButton, AcroFormButton);
+/**
+ * @class AcroFormRadioButton
+ * @extends AcroFormButton
+ * @extends AcroFormField
+ */
+
+var AcroFormRadioButton = function AcroFormRadioButton() {
+  AcroFormButton.call(this);
+  this.radio = true;
+  this.pushButton = false;
+  var _Kids = [];
+  Object.defineProperty(this, "Kids", {
+    enumerable: true,
+    configurable: false,
+    get: function get() {
+      return _Kids;
+    },
+    set: function set(value) {
+      if (typeof value !== "undefined") {
+        _Kids = value;
+      } else {
+        _Kids = [];
+      }
+    }
+  });
+};
+
+inherit(AcroFormRadioButton, AcroFormButton);
+/**
+ * The Child class of a RadioButton (the radioGroup) -> The single Buttons
+ *
+ * @class AcroFormChildClass
+ * @extends AcroFormField
+ * @ignore
+ */
+
+var AcroFormChildClass = function AcroFormChildClass() {
+  AcroFormField.call(this);
+
+  var _parent;
+
+  Object.defineProperty(this, "Parent", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      return _parent;
+    },
+    set: function set(value) {
+      _parent = value;
+    }
+  });
+
+  var _optionName;
+
+  Object.defineProperty(this, "optionName", {
+    enumerable: false,
+    configurable: true,
+    get: function get() {
+      return _optionName;
+    },
+    set: function set(value) {
+      _optionName = value;
+    }
+  });
+  var _MK = {};
+  Object.defineProperty(this, "MK", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      var encryptor = function encryptor(data) {
+        return data;
+      };
+
+      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+      var result = [];
+      result.push("<<");
+      var key;
+
+      for (key in _MK) {
+        result.push("/" + key + " (" + pdfEscape(encryptor(_MK[key])) + ")");
+      }
+
+      result.push(">>");
+      return result.join("\n");
+    },
+    set: function set(value) {
+      if (_typeof(value) === "object") {
+        _MK = value;
+      }
+    }
+  });
+  /**
+   * From the PDF reference:
+   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.
+   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields").
+   *
+   * - '8' = Cross,
+   * - 'l' =  Circle,
+   * - '' = nothing
+   * @name AcroFormButton#caption
+   * @type {string}
+   */
+
+  Object.defineProperty(this, "caption", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _MK.CA || "";
+    },
+    set: function set(value) {
+      if (typeof value === "string") {
+        _MK.CA = value;
+      }
+    }
+  });
+
+  var _AS;
+
+  Object.defineProperty(this, "AS", {
+    enumerable: false,
+    configurable: false,
+    get: function get() {
+      return _AS;
+    },
+    set: function set(value) {
+      _AS = value;
+    }
+  });
+  /**
+   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams")
+   *
+   * @name AcroFormButton#appearanceState
+   * @type {any}
+   */
+
+  Object.defineProperty(this, "appearanceState", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _AS.substr(1, _AS.length - 1);
+    },
+    set: function set(value) {
+      _AS = "/" + value;
+    }
+  });
+  this.caption = "l";
+  this.appearanceState = "Off"; // todo: set AppearanceType as variable that can be set from the
+  // outside...
+
+  this._AppearanceType = AcroFormAppearance.RadioButton.Circle; // The Default appearanceType is the Circle
+
+  this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(this.optionName);
+};
+
+inherit(AcroFormChildClass, AcroFormField);
+
+AcroFormRadioButton.prototype.setAppearance = function (appearance) {
+  if (!("createAppearanceStream" in appearance && "getCA" in appearance)) {
+    throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");
+  }
+
+  for (var objId in this.Kids) {
+    if (this.Kids.hasOwnProperty(objId)) {
+      var child = this.Kids[objId];
+      child.appearanceStreamContent = appearance.createAppearanceStream(child.optionName);
+      child.caption = appearance.getCA();
+    }
+  }
+};
+
+AcroFormRadioButton.prototype.createOption = function (name) {
+  // Create new Child for RadioGroup
+  var child = new AcroFormChildClass();
+  child.Parent = this;
+  child.optionName = name; // Add to Parent
+
+  this.Kids.push(child);
+  addField.call(this.scope, child);
+  return child;
+};
+/**
+ * @class AcroFormCheckBox
+ * @extends AcroFormButton
+ * @extends AcroFormField
+ */
+
+
+var AcroFormCheckBox = function AcroFormCheckBox() {
+  AcroFormButton.call(this);
+  this.fontName = "zapfdingbats";
+  this.caption = "3";
+  this.appearanceState = "On";
+  this.value = "On";
+  this.textAlign = "center";
+  this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();
+};
+
+inherit(AcroFormCheckBox, AcroFormButton);
+/**
+ * @class AcroFormTextField
+ * @extends AcroFormField
+ */
+
+var AcroFormTextField = function AcroFormTextField() {
+  AcroFormField.call(this);
+  this.FT = "/Tx";
+  /**
+   * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.
+   *
+   * @name AcroFormTextField#multiline
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "multiline", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 13));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 13);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 13);
+      }
+    }
+  });
+  /**
+   * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.
+   *
+   * @name AcroFormTextField#fileSelect
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "fileSelect", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 21));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 21);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 21);
+      }
+    }
+  });
+  /**
+   * (PDF 1.4) If set, text entered in the field shall not be spell-checked.
+   *
+   * @name AcroFormTextField#doNotSpellCheck
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "doNotSpellCheck", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 23));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 23);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 23);
+      }
+    }
+  });
+  /**
+   * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.
+   *
+   * @name AcroFormTextField#doNotScroll
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "doNotScroll", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 24));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 24);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 24);
+      }
+    }
+  });
+  /**
+   * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.
+   *
+   * @name AcroFormTextField#comb
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "comb", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 25));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 25);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 25);
+      }
+    }
+  });
+  /**
+   * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.
+   *
+   * @name AcroFormTextField#richText
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "richText", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 26));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 26);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 26);
+      }
+    }
+  });
+  var _MaxLen = null;
+  Object.defineProperty(this, "MaxLen", {
+    enumerable: true,
+    configurable: false,
+    get: function get() {
+      return _MaxLen;
+    },
+    set: function set(value) {
+      _MaxLen = value;
+    }
+  });
+  /**
+   * (Optional; inheritable) The maximum length of the field’s text, in characters.
+   *
+   * @name AcroFormTextField#maxLength
+   * @type {number}
+   */
+
+  Object.defineProperty(this, "maxLength", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return _MaxLen;
+    },
+    set: function set(value) {
+      if (Number.isInteger(value)) {
+        _MaxLen = value;
+      }
+    }
+  });
+  Object.defineProperty(this, "hasAppearanceStream", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return this.V || this.DV;
+    }
+  });
+};
+
+inherit(AcroFormTextField, AcroFormField);
+/**
+ * @class AcroFormPasswordField
+ * @extends AcroFormTextField
+ * @extends AcroFormField
+ */
+
+var AcroFormPasswordField = function AcroFormPasswordField() {
+  AcroFormTextField.call(this);
+  /**
+   * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.
+   * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.
+   *
+   * @name AcroFormTextField#password
+   * @type {boolean}
+   */
+
+  Object.defineProperty(this, "password", {
+    enumerable: true,
+    configurable: true,
+    get: function get() {
+      return Boolean(getBitForPdf(this.Ff, 14));
+    },
+    set: function set(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 14);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 14);
+      }
+    }
+  });
+  this.password = true;
+};
+
+inherit(AcroFormPasswordField, AcroFormTextField); // Contains Methods for creating standard appearances
+
+var AcroFormAppearance = {
+  CheckBox: {
+    createAppearanceStream: function createAppearanceStream() {
+      var appearance = {
+        N: {
+          On: AcroFormAppearance.CheckBox.YesNormal
+        },
+        D: {
+          On: AcroFormAppearance.CheckBox.YesPushDown,
+          Off: AcroFormAppearance.CheckBox.OffPushDown
+        }
+      };
+      return appearance;
+    },
+
+    /**
+     * Returns the standard On Appearance for a CheckBox
+     *
+     * @returns {AcroFormXObject}
+     */
+    YesPushDown: function YesPushDown(formObject) {
+      var xobj = createFormXObject(formObject);
+      xobj.scope = formObject.scope;
+      var stream = [];
+      var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;
+
+      var encodedColor = formObject.scope.__private__.encodeColorString(formObject.color);
+
+      var calcRes = calculateX(formObject, formObject.caption);
+      stream.push("0.749023 g");
+      stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re");
+      stream.push("f");
+      stream.push("BMC");
+      stream.push("q");
+      stream.push("0 0 1 rg");
+      stream.push("/" + fontKey + " " + f2(calcRes.fontSize) + " Tf " + encodedColor);
+      stream.push("BT");
+      stream.push(calcRes.text);
+      stream.push("ET");
+      stream.push("Q");
+      stream.push("EMC");
+      xobj.stream = stream.join("\n");
+      return xobj;
+    },
+    YesNormal: function YesNormal(formObject) {
+      var xobj = createFormXObject(formObject);
+      xobj.scope = formObject.scope;
+      var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;
+
+      var encodedColor = formObject.scope.__private__.encodeColorString(formObject.color);
+
+      var stream = [];
+      var height = AcroFormAppearance.internal.getHeight(formObject);
+      var width = AcroFormAppearance.internal.getWidth(formObject);
+      var calcRes = calculateX(formObject, formObject.caption);
+      stream.push("1 g");
+      stream.push("0 0 " + f2(width) + " " + f2(height) + " re");
+      stream.push("f");
+      stream.push("q");
+      stream.push("0 0 1 rg");
+      stream.push("0 0 " + f2(width - 1) + " " + f2(height - 1) + " re");
+      stream.push("W");
+      stream.push("n");
+      stream.push("0 g");
+      stream.push("BT");
+      stream.push("/" + fontKey + " " + f2(calcRes.fontSize) + " Tf " + encodedColor);
+      stream.push(calcRes.text);
+      stream.push("ET");
+      stream.push("Q");
+      xobj.stream = stream.join("\n");
+      return xobj;
+    },
+
+    /**
+     * Returns the standard Off Appearance for a CheckBox
+     *
+     * @returns {AcroFormXObject}
+     */
+    OffPushDown: function OffPushDown(formObject) {
+      var xobj = createFormXObject(formObject);
+      xobj.scope = formObject.scope;
+      var stream = [];
+      stream.push("0.749023 g");
+      stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re");
+      stream.push("f");
+      xobj.stream = stream.join("\n");
+      return xobj;
+    }
+  },
+  RadioButton: {
+    Circle: {
+      createAppearanceStream: function createAppearanceStream(name) {
+        var appearanceStreamContent = {
+          D: {
+            Off: AcroFormAppearance.RadioButton.Circle.OffPushDown
+          },
+          N: {}
+        };
+        appearanceStreamContent.N[name] = AcroFormAppearance.RadioButton.Circle.YesNormal;
+        appearanceStreamContent.D[name] = AcroFormAppearance.RadioButton.Circle.YesPushDown;
+        return appearanceStreamContent;
+      },
+      getCA: function getCA() {
+        return "l";
+      },
+      YesNormal: function YesNormal(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = []; // Make the Radius of the Circle relative to min(height, width) of formObject
+
+        var DotRadius = AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4; // The Borderpadding...
+
+        DotRadius = Number((DotRadius * 0.9).toFixed(5));
+        var c = AcroFormAppearance.internal.Bezier_C;
+        var DotRadiusBezier = Number((DotRadius * c).toFixed(5));
+        /*
+         * The Following is a Circle created with Bezier-Curves.
+         */
+
+        stream.push("q");
+        stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm");
+        stream.push(DotRadius + " 0 m");
+        stream.push(DotRadius + " " + DotRadiusBezier + " " + DotRadiusBezier + " " + DotRadius + " 0 " + DotRadius + " c");
+        stream.push("-" + DotRadiusBezier + " " + DotRadius + " -" + DotRadius + " " + DotRadiusBezier + " -" + DotRadius + " 0 c");
+        stream.push("-" + DotRadius + " -" + DotRadiusBezier + " -" + DotRadiusBezier + " -" + DotRadius + " 0 -" + DotRadius + " c");
+        stream.push(DotRadiusBezier + " -" + DotRadius + " " + DotRadius + " -" + DotRadiusBezier + " " + DotRadius + " 0 c");
+        stream.push("f");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      },
+      YesPushDown: function YesPushDown(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        var DotRadius = AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4; // The Borderpadding...
+
+        DotRadius = Number((DotRadius * 0.9).toFixed(5)); // Save results for later use; no need to waste
+        // processor ticks on doing math
+
+        var k = Number((DotRadius * 2).toFixed(5));
+        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));
+        var dc = Number((DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5));
+        stream.push("0.749023 g");
+        stream.push("q");
+        stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm");
+        stream.push(k + " 0 m");
+        stream.push(k + " " + kc + " " + kc + " " + k + " 0 " + k + " c");
+        stream.push("-" + kc + " " + k + " -" + k + " " + kc + " -" + k + " 0 c");
+        stream.push("-" + k + " -" + kc + " -" + kc + " -" + k + " 0 -" + k + " c");
+        stream.push(kc + " -" + k + " " + k + " -" + kc + " " + k + " 0 c");
+        stream.push("f");
+        stream.push("Q");
+        stream.push("0 g");
+        stream.push("q");
+        stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm");
+        stream.push(DotRadius + " 0 m");
+        stream.push("" + DotRadius + " " + dc + " " + dc + " " + DotRadius + " 0 " + DotRadius + " c");
+        stream.push("-" + dc + " " + DotRadius + " -" + DotRadius + " " + dc + " -" + DotRadius + " 0 c");
+        stream.push("-" + DotRadius + " -" + dc + " -" + dc + " -" + DotRadius + " 0 -" + DotRadius + " c");
+        stream.push(dc + " -" + DotRadius + " " + DotRadius + " -" + dc + " " + DotRadius + " 0 c");
+        stream.push("f");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      },
+      OffPushDown: function OffPushDown(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        var DotRadius = AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4; // The Borderpadding...
+
+        DotRadius = Number((DotRadius * 0.9).toFixed(5)); // Save results for later use; no need to waste
+        // processor ticks on doing math
+
+        var k = Number((DotRadius * 2).toFixed(5));
+        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));
+        stream.push("0.749023 g");
+        stream.push("q");
+        stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm");
+        stream.push(k + " 0 m");
+        stream.push(k + " " + kc + " " + kc + " " + k + " 0 " + k + " c");
+        stream.push("-" + kc + " " + k + " -" + k + " " + kc + " -" + k + " 0 c");
+        stream.push("-" + k + " -" + kc + " -" + kc + " -" + k + " 0 -" + k + " c");
+        stream.push(kc + " -" + k + " " + k + " -" + kc + " " + k + " 0 c");
+        stream.push("f");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      }
+    },
+    Cross: {
+      /**
+       * Creates the Actual AppearanceDictionary-References
+       *
+       * @param {string} name
+       * @returns {Object}
+       * @ignore
+       */
+      createAppearanceStream: function createAppearanceStream(name) {
+        var appearanceStreamContent = {
+          D: {
+            Off: AcroFormAppearance.RadioButton.Cross.OffPushDown
+          },
+          N: {}
+        };
+        appearanceStreamContent.N[name] = AcroFormAppearance.RadioButton.Cross.YesNormal;
+        appearanceStreamContent.D[name] = AcroFormAppearance.RadioButton.Cross.YesPushDown;
+        return appearanceStreamContent;
+      },
+      getCA: function getCA() {
+        return "8";
+      },
+      YesNormal: function YesNormal(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        var cross = AcroFormAppearance.internal.calculateCross(formObject);
+        stream.push("q");
+        stream.push("1 1 " + f2(AcroFormAppearance.internal.getWidth(formObject) - 2) + " " + f2(AcroFormAppearance.internal.getHeight(formObject) - 2) + " re");
+        stream.push("W");
+        stream.push("n");
+        stream.push(f2(cross.x1.x) + " " + f2(cross.x1.y) + " m");
+        stream.push(f2(cross.x2.x) + " " + f2(cross.x2.y) + " l");
+        stream.push(f2(cross.x4.x) + " " + f2(cross.x4.y) + " m");
+        stream.push(f2(cross.x3.x) + " " + f2(cross.x3.y) + " l");
+        stream.push("s");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      },
+      YesPushDown: function YesPushDown(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var cross = AcroFormAppearance.internal.calculateCross(formObject);
+        var stream = [];
+        stream.push("0.749023 g");
+        stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re");
+        stream.push("f");
+        stream.push("q");
+        stream.push("1 1 " + f2(AcroFormAppearance.internal.getWidth(formObject) - 2) + " " + f2(AcroFormAppearance.internal.getHeight(formObject) - 2) + " re");
+        stream.push("W");
+        stream.push("n");
+        stream.push(f2(cross.x1.x) + " " + f2(cross.x1.y) + " m");
+        stream.push(f2(cross.x2.x) + " " + f2(cross.x2.y) + " l");
+        stream.push(f2(cross.x4.x) + " " + f2(cross.x4.y) + " m");
+        stream.push(f2(cross.x3.x) + " " + f2(cross.x3.y) + " l");
+        stream.push("s");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      },
+      OffPushDown: function OffPushDown(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        stream.push("0.749023 g");
+        stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re");
+        stream.push("f");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      }
+    }
+  },
+
+  /**
+   * Returns the standard Appearance
+   *
+   * @returns {AcroFormXObject}
+   */
+  createDefaultAppearanceStream: function createDefaultAppearanceStream(formObject) {
+    // Set Helvetica to Standard Font (size: auto)
+    // Color: Black
+    var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;
+
+    var encodedColor = formObject.scope.__private__.encodeColorString(formObject.color);
+
+    var fontSize = formObject.fontSize;
+    var result = "/" + fontKey + " " + fontSize + " Tf " + encodedColor;
+    return result;
+  }
+};
+AcroFormAppearance.internal = {
+  Bezier_C: 0.551915024494,
+  calculateCross: function calculateCross(formObject) {
+    var width = AcroFormAppearance.internal.getWidth(formObject);
+    var height = AcroFormAppearance.internal.getHeight(formObject);
+    var a = Math.min(width, height);
+    var cross = {
+      x1: {
+        // upperLeft
+        x: (width - a) / 2,
+        y: (height - a) / 2 + a // height - borderPadding
+
+      },
+      x2: {
+        // lowerRight
+        x: (width - a) / 2 + a,
+        y: (height - a) / 2 // borderPadding
+
+      },
+      x3: {
+        // lowerLeft
+        x: (width - a) / 2,
+        y: (height - a) / 2 // borderPadding
+
+      },
+      x4: {
+        // upperRight
+        x: (width - a) / 2 + a,
+        y: (height - a) / 2 + a // height - borderPadding
+
+      }
+    };
+    return cross;
+  }
+};
+
+AcroFormAppearance.internal.getWidth = function (formObject) {
+  var result = 0;
+
+  if (_typeof(formObject) === "object") {
+    result = scale(formObject.Rect[2]);
+  }
+
+  return result;
+};
+
+AcroFormAppearance.internal.getHeight = function (formObject) {
+  var result = 0;
+
+  if (_typeof(formObject) === "object") {
+    result = scale(formObject.Rect[3]);
+  }
+
+  return result;
+}; // Public:
+
+/**
+ * Add an AcroForm-Field to the jsPDF-instance
+ *
+ * @name addField
+ * @function
+ * @instance
+ * @param {Object} fieldObject
+ * @returns {jsPDF}
+ */
+
+
+var addField = jsPDFAPI.addField = function (fieldObject) {
+  initializeAcroForm(this, fieldObject);
+
+  if (fieldObject instanceof AcroFormField) {
+    putForm(fieldObject);
+  } else {
+    throw new Error("Invalid argument passed to jsPDF.addField.");
+  }
+
+  fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;
+  return this;
+};
+
+jsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;
+jsPDFAPI.AcroFormListBox = AcroFormListBox;
+jsPDFAPI.AcroFormComboBox = AcroFormComboBox;
+jsPDFAPI.AcroFormEditBox = AcroFormEditBox;
+jsPDFAPI.AcroFormButton = AcroFormButton;
+jsPDFAPI.AcroFormPushButton = AcroFormPushButton;
+jsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;
+jsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;
+jsPDFAPI.AcroFormTextField = AcroFormTextField;
+jsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;
+jsPDFAPI.AcroFormAppearance = AcroFormAppearance;
+jsPDFAPI.AcroForm = {
+  ChoiceField: AcroFormChoiceField,
+  ListBox: AcroFormListBox,
+  ComboBox: AcroFormComboBox,
+  EditBox: AcroFormEditBox,
+  Button: AcroFormButton,
+  PushButton: AcroFormPushButton,
+  RadioButton: AcroFormRadioButton,
+  CheckBox: AcroFormCheckBox,
+  TextField: AcroFormTextField,
+  PasswordField: AcroFormPasswordField,
+  Appearance: AcroFormAppearance
+};
+jsPDF.AcroForm = {
+  ChoiceField: AcroFormChoiceField,
+  ListBox: AcroFormListBox,
+  ComboBox: AcroFormComboBox,
+  EditBox: AcroFormEditBox,
+  Button: AcroFormButton,
+  PushButton: AcroFormPushButton,
+  RadioButton: AcroFormRadioButton,
+  CheckBox: AcroFormCheckBox,
+  TextField: AcroFormTextField,
+  PasswordField: AcroFormPasswordField,
+  Appearance: AcroFormAppearance
+};
+var AcroForm = jsPDF.AcroForm;
+
+(function (jsPDFAPI) {
+
+  var namespace = "addImage_";
+  jsPDFAPI.__addimage__ = {};
+  var UNKNOWN = "UNKNOWN"; // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.
+  // With too small batch iteration will be slow as more calls are made,
+  // higher values cause larger and slower garbage collection.
+
+  var ARRAY_APPLY_BATCH = 8192;
+  var imageFileTypeHeaders = {
+    PNG: [[0x89, 0x50, 0x4e, 0x47]],
+    TIFF: [[0x4d, 0x4d, 0x00, 0x2a], //Motorola
+    [0x49, 0x49, 0x2a, 0x00] //Intel
+    ],
+    JPEG: [[0xff, 0xd8, 0xff, 0xe0, undefined, undefined, 0x4a, 0x46, 0x49, 0x46, 0x00], //JFIF
+    [0xff, 0xd8, 0xff, 0xe1, undefined, undefined, 0x45, 0x78, 0x69, 0x66, 0x00, 0x00], //Exif
+    [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW
+    [0xff, 0xd8, 0xff, 0xee] //EXIF RAW
+    ],
+    JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],
+    GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],
+    GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],
+    WEBP: [[0x52, 0x49, 0x46, 0x46, undefined, undefined, undefined, undefined, 0x57, 0x45, 0x42, 0x50]],
+    BMP: [[0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.
+    [0x42, 0x41], //BA - OS/2 struct bitmap array
+    [0x43, 0x49], //CI - OS/2 struct color icon
+    [0x43, 0x50], //CP - OS/2 const color pointer
+    [0x49, 0x43], //IC - OS/2 struct icon
+    [0x50, 0x54] //PT - OS/2 pointer
+    ]
+  };
+  /**
+   * Recognize filetype of Image by magic-bytes
+   *
+   * https://en.wikipedia.org/wiki/List_of_file_signatures
+   *
+   * @name getImageFileTypeByImageData
+   * @public
+   * @function
+   * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer
+   * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'
+   *
+   * @returns {string} filetype of Image
+   */
+
+  var getImageFileTypeByImageData = jsPDFAPI.__addimage__.getImageFileTypeByImageData = function (imageData, fallbackFormat) {
+    fallbackFormat = fallbackFormat || UNKNOWN;
+    var i;
+    var j;
+    var result = UNKNOWN;
+    var headerSchemata;
+    var compareResult;
+    var fileType;
+
+    if (fallbackFormat === "RGBA" || imageData.data !== undefined && imageData.data instanceof Uint8ClampedArray && "height" in imageData && "width" in imageData) {
+      return "RGBA";
+    }
+
+    if (isArrayBufferView(imageData)) {
+      for (fileType in imageFileTypeHeaders) {
+        headerSchemata = imageFileTypeHeaders[fileType];
+
+        for (i = 0; i < headerSchemata.length; i += 1) {
+          compareResult = true;
+
+          for (j = 0; j < headerSchemata[i].length; j += 1) {
+            if (headerSchemata[i][j] === undefined) {
+              continue;
+            }
+
+            if (headerSchemata[i][j] !== imageData[j]) {
+              compareResult = false;
+              break;
+            }
+          }
+
+          if (compareResult === true) {
+            result = fileType;
+            break;
+          }
+        }
+      }
+    } else {
+      for (fileType in imageFileTypeHeaders) {
+        headerSchemata = imageFileTypeHeaders[fileType];
+
+        for (i = 0; i < headerSchemata.length; i += 1) {
+          compareResult = true;
+
+          for (j = 0; j < headerSchemata[i].length; j += 1) {
+            if (headerSchemata[i][j] === undefined) {
+              continue;
+            }
+
+            if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {
+              compareResult = false;
+              break;
+            }
+          }
+
+          if (compareResult === true) {
+            result = fileType;
+            break;
+          }
+        }
+      }
+    }
+
+    if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {
+      result = fallbackFormat;
+    }
+
+    return result;
+  }; // Image functionality ported from pdf.js
+
+
+  var putImage = function putImage(image) {
+    var out = this.internal.write;
+    var putStream = this.internal.putStream;
+    var getFilters = this.internal.getFilters;
+    var filter = getFilters();
+
+    while (filter.indexOf("FlateEncode") !== -1) {
+      filter.splice(filter.indexOf("FlateEncode"), 1);
+    }
+
+    image.objectId = this.internal.newObject();
+    var additionalKeyValues = [];
+    additionalKeyValues.push({
+      key: "Type",
+      value: "/XObject"
+    });
+    additionalKeyValues.push({
+      key: "Subtype",
+      value: "/Image"
+    });
+    additionalKeyValues.push({
+      key: "Width",
+      value: image.width
+    });
+    additionalKeyValues.push({
+      key: "Height",
+      value: image.height
+    });
+
+    if (image.colorSpace === color_spaces.INDEXED) {
+      additionalKeyValues.push({
+        key: "ColorSpace",
+        value: "[/Indexed /DeviceRGB " + ( // if an indexed png defines more than one colour with transparency, we've created a sMask
+        image.palette.length / 3 - 1) + " " + ("sMask" in image && typeof image.sMask !== "undefined" ? image.objectId + 2 : image.objectId + 1) + " 0 R]"
+      });
+    } else {
+      additionalKeyValues.push({
+        key: "ColorSpace",
+        value: "/" + image.colorSpace
+      });
+
+      if (image.colorSpace === color_spaces.DEVICE_CMYK) {
+        additionalKeyValues.push({
+          key: "Decode",
+          value: "[1 0 1 0 1 0 1 0]"
+        });
+      }
+    }
+
+    additionalKeyValues.push({
+      key: "BitsPerComponent",
+      value: image.bitsPerComponent
+    });
+
+    if ("decodeParameters" in image && typeof image.decodeParameters !== "undefined") {
+      additionalKeyValues.push({
+        key: "DecodeParms",
+        value: "<<" + image.decodeParameters + ">>"
+      });
+    }
+
+    if ("transparency" in image && Array.isArray(image.transparency)) {
+      var transparency = "",
+          i = 0,
+          len = image.transparency.length;
+
+      for (; i < len; i++) {
+        transparency += image.transparency[i] + " " + image.transparency[i] + " ";
+      }
+
+      additionalKeyValues.push({
+        key: "Mask",
+        value: "[" + transparency + "]"
+      });
+    }
+
+    if (typeof image.sMask !== "undefined") {
+      additionalKeyValues.push({
+        key: "SMask",
+        value: image.objectId + 1 + " 0 R"
+      });
+    }
+
+    var alreadyAppliedFilters = typeof image.filter !== "undefined" ? ["/" + image.filter] : undefined;
+    putStream({
+      data: image.data,
+      additionalKeyValues: additionalKeyValues,
+      alreadyAppliedFilters: alreadyAppliedFilters,
+      objectId: image.objectId
+    });
+    out("endobj"); // Soft mask
+
+    if ("sMask" in image && typeof image.sMask !== "undefined") {
+      var decodeParameters = "/Predictor " + image.predictor + " /Colors 1 /BitsPerComponent " + image.bitsPerComponent + " /Columns " + image.width;
+      var sMask = {
+        width: image.width,
+        height: image.height,
+        colorSpace: "DeviceGray",
+        bitsPerComponent: image.bitsPerComponent,
+        decodeParameters: decodeParameters,
+        data: image.sMask
+      };
+
+      if ("filter" in image) {
+        sMask.filter = image.filter;
+      }
+
+      putImage.call(this, sMask);
+    } //Palette
+
+
+    if (image.colorSpace === color_spaces.INDEXED) {
+      var objId = this.internal.newObject(); //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');
+      //putStream(zlib.compress(img['pal']));
+
+      putStream({
+        data: arrayBufferToBinaryString(new Uint8Array(image.palette)),
+        objectId: objId
+      });
+      out("endobj");
+    }
+  };
+
+  var putResourcesCallback = function putResourcesCallback() {
+    var images = this.internal.collections[namespace + "images"];
+
+    for (var i in images) {
+      putImage.call(this, images[i]);
+    }
+  };
+
+  var putXObjectsDictCallback = function putXObjectsDictCallback() {
+    var images = this.internal.collections[namespace + "images"],
+        out = this.internal.write,
+        image;
+
+    for (var i in images) {
+      image = images[i];
+      out("/I" + image.index, image.objectId, "0", "R");
+    }
+  };
+
+  var checkCompressValue = function checkCompressValue(value) {
+    if (value && typeof value === "string") value = value.toUpperCase();
+    return value in jsPDFAPI.image_compression ? value : image_compression.NONE;
+  };
+
+  var initialize = function initialize() {
+    if (!this.internal.collections[namespace + "images"]) {
+      this.internal.collections[namespace + "images"] = {};
+      this.internal.events.subscribe("putResources", putResourcesCallback);
+      this.internal.events.subscribe("putXobjectDict", putXObjectsDictCallback);
+    }
+  };
+
+  var getImages = function getImages() {
+    var images = this.internal.collections[namespace + "images"];
+    initialize.call(this);
+    return images;
+  };
+
+  var getImageIndex = function getImageIndex() {
+    return Object.keys(this.internal.collections[namespace + "images"]).length;
+  };
+
+  var notDefined = function notDefined(value) {
+    return typeof value === "undefined" || value === null || value.length === 0;
+  };
+
+  var generateAliasFromImageData = function generateAliasFromImageData(imageData) {
+    if (typeof imageData === "string" || isArrayBufferView(imageData)) {
+      return sHashCode(imageData);
+    } else if (isArrayBufferView(imageData.data)) {
+      return sHashCode(imageData.data);
+    }
+
+    return null;
+  };
+
+  var isImageTypeSupported = function isImageTypeSupported(type) {
+    return typeof jsPDFAPI["process" + type.toUpperCase()] === "function";
+  };
+
+  var isDOMElement = function isDOMElement(object) {
+    return _typeof(object) === "object" && object.nodeType === 1;
+  };
+
+  var getImageDataFromElement = function getImageDataFromElement(element, format) {
+    //if element is an image which uses data url definition, just return the dataurl
+    if (element.nodeName === "IMG" && element.hasAttribute("src")) {
+      var src = "" + element.getAttribute("src"); //is base64 encoded dataUrl, directly process it
+
+      if (src.indexOf("data:image/") === 0) {
+        return atob(unescape(src).split("base64,").pop());
+      } //it is probably an url, try to load it
+
+
+      var tmpImageData = jsPDFAPI.loadFile(src, true);
+
+      if (tmpImageData !== undefined) {
+        return tmpImageData;
+      }
+    }
+
+    if (element.nodeName === "CANVAS") {
+      if (element.width === 0 || element.height === 0) {
+        throw new Error("Given canvas must have data. Canvas width: " + element.width + ", height: " + element.height);
+      }
+
+      var mimeType;
+
+      switch (format) {
+        case "PNG":
+          mimeType = "image/png";
+          break;
+
+        case "WEBP":
+          mimeType = "image/webp";
+          break;
+
+        case "JPEG":
+        case "JPG":
+        default:
+          mimeType = "image/jpeg";
+          break;
+      }
+
+      return atob(element.toDataURL(mimeType, 1.0).split("base64,").pop());
+    }
+  };
+
+  var checkImagesForAlias = function checkImagesForAlias(alias) {
+    var images = this.internal.collections[namespace + "images"];
+
+    if (images) {
+      for (var e in images) {
+        if (alias === images[e].alias) {
+          return images[e];
+        }
+      }
+    }
+  };
+
+  var determineWidthAndHeight = function determineWidthAndHeight(width, height, image) {
+    if (!width && !height) {
+      width = -96;
+      height = -96;
+    }
+
+    if (width < 0) {
+      width = -1 * image.width * 72 / width / this.internal.scaleFactor;
+    }
+
+    if (height < 0) {
+      height = -1 * image.height * 72 / height / this.internal.scaleFactor;
+    }
+
+    if (width === 0) {
+      width = height * image.width / image.height;
+    }
+
+    if (height === 0) {
+      height = width * image.height / image.width;
+    }
+
+    return [width, height];
+  };
+
+  var writeImageToPDF = function writeImageToPDF(x, y, width, height, image, rotation) {
+    var dims = determineWidthAndHeight.call(this, width, height, image),
+        coord = this.internal.getCoordinateString,
+        vcoord = this.internal.getVerticalCoordinateString;
+    var images = getImages.call(this);
+    width = dims[0];
+    height = dims[1];
+    images[image.index] = image;
+
+    if (rotation) {
+      rotation *= Math.PI / 180;
+      var c = Math.cos(rotation);
+      var s = Math.sin(rotation); //like in pdf Reference do it 4 digits instead of 2
+
+      var f4 = function f4(number) {
+        return number.toFixed(4);
+      };
+
+      var rotationTransformationMatrix = [f4(c), f4(s), f4(s * -1), f4(c), 0, 0, "cm"];
+    }
+
+    this.internal.write("q"); //Save graphics state
+
+    if (rotation) {
+      this.internal.write([1, "0", "0", 1, coord(x), vcoord(y + height), "cm"].join(" ")); //Translate
+
+      this.internal.write(rotationTransformationMatrix.join(" ")); //Rotate
+
+      this.internal.write([coord(width), "0", "0", coord(height), "0", "0", "cm"].join(" ")); //Scale
+    } else {
+      this.internal.write([coord(width), "0", "0", coord(height), coord(x), vcoord(y + height), "cm"].join(" ")); //Translate and Scale
+    }
+
+    if (this.isAdvancedAPI()) {
+      // draw image bottom up when in "advanced" API mode
+      this.internal.write([1, 0, 0, -1, 0, 0, "cm"].join(" "));
+    }
+
+    this.internal.write("/I" + image.index + " Do"); //Paint Image
+
+    this.internal.write("Q"); //Restore graphics state
+  };
+  /**
+   * COLOR SPACES
+   */
+
+
+  var color_spaces = jsPDFAPI.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"
+  };
+  /**
+   * DECODE METHODS
+   */
+
+  jsPDFAPI.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"
+  };
+  /**
+   * IMAGE COMPRESSION TYPES
+   */
+
+  var image_compression = jsPDFAPI.image_compression = {
+    NONE: "NONE",
+    FAST: "FAST",
+    MEDIUM: "MEDIUM",
+    SLOW: "SLOW"
+  };
+  /**
+   * @name sHashCode
+   * @function
+   * @param {string} data
+   * @returns {string}
+   */
+
+  var sHashCode = jsPDFAPI.__addimage__.sHashCode = function (data) {
+    var hash = 0,
+        i,
+        len;
+
+    if (typeof data === "string") {
+      len = data.length;
+
+      for (i = 0; i < len; i++) {
+        hash = (hash << 5) - hash + data.charCodeAt(i);
+        hash |= 0; // Convert to 32bit integer
+      }
+    } else if (isArrayBufferView(data)) {
+      len = data.byteLength / 2;
+
+      for (i = 0; i < len; i++) {
+        hash = (hash << 5) - hash + data[i];
+        hash |= 0; // Convert to 32bit integer
+      }
+    }
+
+    return hash;
+  };
+  /**
+   * Validates if given String is a valid Base64-String
+   *
+   * @name validateStringAsBase64
+   * @public
+   * @function
+   * @param {String} possible Base64-String
+   *
+   * @returns {boolean}
+   */
+
+
+  var validateStringAsBase64 = jsPDFAPI.__addimage__.validateStringAsBase64 = function (possibleBase64String) {
+    possibleBase64String = possibleBase64String || "";
+    possibleBase64String.toString().trim();
+    var result = true;
+
+    if (possibleBase64String.length === 0) {
+      result = false;
+    }
+
+    if (possibleBase64String.length % 4 !== 0) {
+      result = false;
+    }
+
+    if (/^[A-Za-z0-9+/]+$/.test(possibleBase64String.substr(0, possibleBase64String.length - 2)) === false) {
+      result = false;
+    }
+
+    if (/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(possibleBase64String.substr(-2)) === false) {
+      result = false;
+    }
+
+    return result;
+  };
+  /**
+   * Strips out and returns info from a valid base64 data URI
+   *
+   * @name extractImageFromDataUrl
+   * @function
+   * @param {string} dataUrl a valid data URI of format 'data:[<MIME-type>][;base64],<data>'
+   * @returns {Array}an Array containing the following
+   * [0] the complete data URI
+   * [1] <MIME-type>
+   * [2] format - the second part of the mime-type i.e 'png' in 'image/png'
+   * [4] <data>
+   */
+
+
+  var extractImageFromDataUrl = jsPDFAPI.__addimage__.extractImageFromDataUrl = function (dataUrl) {
+    dataUrl = dataUrl || "";
+    var dataUrlParts = dataUrl.split("base64,");
+    var result = null;
+
+    if (dataUrlParts.length === 2) {
+      var extractedInfo = /^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(dataUrlParts[0]);
+
+      if (Array.isArray(extractedInfo)) {
+        result = {
+          mimeType: extractedInfo[1],
+          charset: extractedInfo[2],
+          data: dataUrlParts[1]
+        };
+      }
+    }
+
+    return result;
+  };
+  /**
+   * Check to see if ArrayBuffer is supported
+   *
+   * @name supportsArrayBuffer
+   * @function
+   * @returns {boolean}
+   */
+
+
+  var supportsArrayBuffer = jsPDFAPI.__addimage__.supportsArrayBuffer = function () {
+    return typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined";
+  };
+  /**
+   * Tests supplied object to determine if ArrayBuffer
+   *
+   * @name isArrayBuffer
+   * @function
+   * @param {Object} object an Object
+   *
+   * @returns {boolean}
+   */
+
+
+  jsPDFAPI.__addimage__.isArrayBuffer = function (object) {
+    return supportsArrayBuffer() && object instanceof ArrayBuffer;
+  };
+  /**
+   * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface
+   *
+   * @name isArrayBufferView
+   * @function
+   * @param {Object} object an Object
+   * @returns {boolean}
+   */
+
+
+  var isArrayBufferView = jsPDFAPI.__addimage__.isArrayBufferView = function (object) {
+    return supportsArrayBuffer() && typeof Uint32Array !== "undefined" && (object instanceof Int8Array || object instanceof Uint8Array || typeof Uint8ClampedArray !== "undefined" && object instanceof Uint8ClampedArray || object instanceof Int16Array || object instanceof Uint16Array || object instanceof Int32Array || object instanceof Uint32Array || object instanceof Float32Array || object instanceof Float64Array);
+  };
+  /**
+   * Convert Binary String to ArrayBuffer
+   *
+   * @name binaryStringToUint8Array
+   * @public
+   * @function
+   * @param {string} BinaryString with ImageData
+   * @returns {Uint8Array}
+   */
+
+
+  var binaryStringToUint8Array = jsPDFAPI.__addimage__.binaryStringToUint8Array = function (binary_string) {
+    var len = binary_string.length;
+    var bytes = new Uint8Array(len);
+
+    for (var i = 0; i < len; i++) {
+      bytes[i] = binary_string.charCodeAt(i);
+    }
+
+    return bytes;
+  };
+  /**
+   * Convert the Buffer to a Binary String
+   *
+   * @name arrayBufferToBinaryString
+   * @public
+   * @function
+   * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData
+   *
+   * @returns {String}
+   */
+
+
+  var arrayBufferToBinaryString = jsPDFAPI.__addimage__.arrayBufferToBinaryString = function (buffer) {
+    var out = ""; // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.
+    // Do not copy the array if input is already an array.
+
+    var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);
+
+    for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {
+      // Limit the amount of characters being parsed to prevent overflow.
+      // Note that while TextDecoder would be faster, it does not have the same
+      // functionality as fromCharCode with any provided encodings as of 3/2021.
+      out += String.fromCharCode.apply(null, buf.subarray(i, i + ARRAY_APPLY_BATCH));
+    }
+
+    return out;
+  };
+  /**
+   * Possible parameter for addImage, an RGBA buffer with size.
+   *
+   * @typedef {Object} RGBAData
+   * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.
+   * @property {number} width - Image width as the data does not carry this information in itself.
+   * @property {number} height - Image height as the data does not carry this information in itself.
+   */
+
+  /**
+   * Adds an Image to the PDF.
+   *
+   * @name addImage
+   * @public
+   * @function
+   * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).
+   * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'
+   * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} width width of the image (in units declared at inception of PDF document)
+   * @param {number} height height of the Image (in units declared at inception of PDF document)
+   * @param {string} alias alias of the image (if used multiple times)
+   * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'
+   * @param {number} rotation rotation of the image in degrees (0-359)
+   *
+   * @returns jsPDF
+   */
+
+
+  jsPDFAPI.addImage = function () {
+    var imageData, format, x, y, w, h, alias, compression, rotation;
+    imageData = arguments[0];
+
+    if (typeof arguments[1] === "number") {
+      format = UNKNOWN;
+      x = arguments[1];
+      y = arguments[2];
+      w = arguments[3];
+      h = arguments[4];
+      alias = arguments[5];
+      compression = arguments[6];
+      rotation = arguments[7];
+    } else {
+      format = arguments[1];
+      x = arguments[2];
+      y = arguments[3];
+      w = arguments[4];
+      h = arguments[5];
+      alias = arguments[6];
+      compression = arguments[7];
+      rotation = arguments[8];
+    }
+
+    if (_typeof(imageData) === "object" && !isDOMElement(imageData) && "imageData" in imageData) {
+      var options = imageData;
+      imageData = options.imageData;
+      format = options.format || format || UNKNOWN;
+      x = options.x || x || 0;
+      y = options.y || y || 0;
+      w = options.w || options.width || w;
+      h = options.h || options.height || h;
+      alias = options.alias || alias;
+      compression = options.compression || compression;
+      rotation = options.rotation || options.angle || rotation;
+    } //If compression is not explicitly set, determine if we should use compression
+
+
+    var filter = this.internal.getFilters();
+
+    if (compression === undefined && filter.indexOf("FlateEncode") !== -1) {
+      compression = "SLOW";
+    }
+
+    if (isNaN(x) || isNaN(y)) {
+      throw new Error("Invalid coordinates passed to jsPDF.addImage");
+    }
+
+    initialize.call(this);
+    var image = processImageData.call(this, imageData, format, alias, compression);
+    writeImageToPDF.call(this, x, y, w, h, image, rotation);
+    return this;
+  };
+
+  var processImageData = function processImageData(imageData, format, alias, compression) {
+    var result, dataAsBinaryString;
+
+    if (typeof imageData === "string" && getImageFileTypeByImageData(imageData) === UNKNOWN) {
+      imageData = unescape(imageData);
+      var tmpImageData = convertBase64ToBinaryString(imageData, false);
+
+      if (tmpImageData !== "") {
+        imageData = tmpImageData;
+      } else {
+        tmpImageData = jsPDFAPI.loadFile(imageData, true);
+
+        if (tmpImageData !== undefined) {
+          imageData = tmpImageData;
+        }
+      }
+    }
+
+    if (isDOMElement(imageData)) {
+      imageData = getImageDataFromElement(imageData, format);
+    }
+
+    format = getImageFileTypeByImageData(imageData, format);
+
+    if (!isImageTypeSupported(format)) {
+      throw new Error("addImage does not support files of type '" + format + "', please ensure that a plugin for '" + format + "' support is added.");
+    } // now do the heavy lifting
+
+
+    if (notDefined(alias)) {
+      alias = generateAliasFromImageData(imageData);
+    }
+
+    result = checkImagesForAlias.call(this, alias);
+
+    if (!result) {
+      if (supportsArrayBuffer()) {
+        // no need to convert if imageData is already uint8array
+        if (!(imageData instanceof Uint8Array) && format !== "RGBA") {
+          dataAsBinaryString = imageData;
+          imageData = binaryStringToUint8Array(imageData);
+        }
+      }
+
+      result = this["process" + format.toUpperCase()](imageData, getImageIndex.call(this), alias, checkCompressValue(compression), dataAsBinaryString);
+    }
+
+    if (!result) {
+      throw new Error("An unknown error occurred whilst processing the image.");
+    }
+
+    return result;
+  };
+  /**
+   * @name convertBase64ToBinaryString
+   * @function
+   * @param {string} stringData
+   * @returns {string} binary string
+   */
+
+
+  var convertBase64ToBinaryString = jsPDFAPI.__addimage__.convertBase64ToBinaryString = function (stringData, throwError) {
+    throwError = typeof throwError === "boolean" ? throwError : true;
+    var base64Info;
+    var imageData = "";
+    var rawData;
+
+    if (typeof stringData === "string") {
+      base64Info = extractImageFromDataUrl(stringData);
+      rawData = base64Info !== null ? base64Info.data : stringData;
+
+      try {
+        imageData = atob(rawData);
+      } catch (e) {
+        if (throwError) {
+          if (!validateStringAsBase64(rawData)) {
+            throw new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ");
+          } else {
+            throw new Error("atob-Error in jsPDF.convertBase64ToBinaryString " + e.message);
+          }
+        }
+      }
+    }
+
+    return imageData;
+  };
+  /**
+   * @name getImageProperties
+   * @function
+   * @param {Object} imageData
+   * @returns {Object}
+   */
+
+
+  jsPDFAPI.getImageProperties = function (imageData) {
+    var image;
+    var tmpImageData = "";
+    var format;
+
+    if (isDOMElement(imageData)) {
+      imageData = getImageDataFromElement(imageData);
+    }
+
+    if (typeof imageData === "string" && getImageFileTypeByImageData(imageData) === UNKNOWN) {
+      tmpImageData = convertBase64ToBinaryString(imageData, false);
+
+      if (tmpImageData === "") {
+        tmpImageData = jsPDFAPI.loadFile(imageData) || "";
+      }
+
+      imageData = tmpImageData;
+    }
+
+    format = getImageFileTypeByImageData(imageData);
+
+    if (!isImageTypeSupported(format)) {
+      throw new Error("addImage does not support files of type '" + format + "', please ensure that a plugin for '" + format + "' support is added.");
+    }
+
+    if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {
+      imageData = binaryStringToUint8Array(imageData);
+    }
+
+    image = this["process" + format.toUpperCase()](imageData);
+
+    if (!image) {
+      throw new Error("An unknown error occurred whilst processing the image");
+    }
+
+    image.fileType = format;
+    return image;
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+(function (jsPDFAPI) {
+
+  var notEmpty = function notEmpty(obj) {
+    if (typeof obj != "undefined") {
+      if (obj != "") {
+        return true;
+      }
+    }
+  };
+
+  jsPDF.API.events.push(["addPage", function (addPageData) {
+    var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);
+    pageInfo.pageContext.annotations = [];
+  }]);
+  jsPDFAPI.events.push(["putPage", function (putPageData) {
+    var getHorizontalCoordinateString = this.internal.getCoordinateString;
+    var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;
+    var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);
+    var pageAnnos = putPageData.pageContext.annotations;
+    var anno, rect, line;
+    var found = false;
+
+    for (var a = 0; a < pageAnnos.length && !found; a++) {
+      anno = pageAnnos[a];
+
+      switch (anno.type) {
+        case "link":
+          if (notEmpty(anno.options.url) || notEmpty(anno.options.pageNumber)) {
+            found = true;
+          }
+
+          break;
+
+        case "reference":
+        case "text":
+        case "freetext":
+          found = true;
+          break;
+      }
+    }
+
+    if (found == false) {
+      return;
+    }
+
+    this.internal.write("/Annots [");
+
+    for (var i = 0; i < pageAnnos.length; i++) {
+      anno = pageAnnos[i];
+      var escape = this.internal.pdfEscape;
+      var encryptor = this.internal.getEncryptor(putPageData.objId);
+
+      switch (anno.type) {
+        case "reference":
+          // References to Widget Annotations (for AcroForm Fields)
+          this.internal.write(" " + anno.object.objId + " 0 R ");
+          break;
+
+        case "text":
+          // Create a an object for both the text and the popup
+          var objText = this.internal.newAdditionalObject();
+          var objPopup = this.internal.newAdditionalObject();
+          var encryptorText = this.internal.getEncryptor(objText.objId);
+          var title = anno.title || "Note";
+          rect = "/Rect [" + getHorizontalCoordinateString(anno.bounds.x) + " " + getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) + " " + getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) + " " + getVerticalCoordinateString(anno.bounds.y) + "] ";
+          line = "<</Type /Annot /Subtype /" + "Text" + " " + rect + "/Contents (" + escape(encryptorText(anno.contents)) + ")";
+          line += " /Popup " + objPopup.objId + " 0 R";
+          line += " /P " + pageInfo.objId + " 0 R";
+          line += " /T (" + escape(encryptorText(title)) + ") >>";
+          objText.content = line;
+          var parent = objText.objId + " 0 R";
+          var popoff = 30;
+          rect = "/Rect [" + getHorizontalCoordinateString(anno.bounds.x + popoff) + " " + getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) + " " + getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w + popoff) + " " + getVerticalCoordinateString(anno.bounds.y) + "] ";
+          line = "<</Type /Annot /Subtype /" + "Popup" + " " + rect + " /Parent " + parent;
+
+          if (anno.open) {
+            line += " /Open true";
+          }
+
+          line += " >>";
+          objPopup.content = line;
+          this.internal.write(objText.objId, "0 R", objPopup.objId, "0 R");
+          break;
+
+        case "freetext":
+          rect = "/Rect [" + getHorizontalCoordinateString(anno.bounds.x) + " " + getVerticalCoordinateString(anno.bounds.y) + " " + getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) + " " + getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) + "] ";
+          var color = anno.color || "#000000";
+          line = "<</Type /Annot /Subtype /" + "FreeText" + " " + rect + "/Contents (" + escape(encryptor(anno.contents)) + ")";
+          line += " /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#" + color + ")";
+          line += " /Border [0 0 0]";
+          line += " >>";
+          this.internal.write(line);
+          break;
+
+        case "link":
+          if (anno.options.name) {
+            var loc = this.annotations._nameMap[anno.options.name];
+            anno.options.pageNumber = loc.page;
+            anno.options.top = loc.y;
+          } else {
+            if (!anno.options.top) {
+              anno.options.top = 0;
+            }
+          }
+
+          rect = "/Rect [" + anno.finalBounds.x + " " + anno.finalBounds.y + " " + anno.finalBounds.w + " " + anno.finalBounds.h + "] ";
+          line = "";
+
+          if (anno.options.url) {
+            line = "<</Type /Annot /Subtype /Link " + rect + "/Border [0 0 0] /A <</S /URI /URI (" + escape(encryptor(anno.options.url)) + ") >>";
+          } else if (anno.options.pageNumber) {
+            // first page is 0
+            var info = this.internal.getPageInfo(anno.options.pageNumber);
+            line = "<</Type /Annot /Subtype /Link " + rect + "/Border [0 0 0] /Dest [" + info.objId + " 0 R";
+            anno.options.magFactor = anno.options.magFactor || "XYZ";
+
+            switch (anno.options.magFactor) {
+              case "Fit":
+                line += " /Fit]";
+                break;
+
+              case "FitH":
+                line += " /FitH " + anno.options.top + "]";
+                break;
+
+              case "FitV":
+                anno.options.left = anno.options.left || 0;
+                line += " /FitV " + anno.options.left + "]";
+                break;
+
+              case "XYZ":
+              default:
+                var top = getVerticalCoordinateString(anno.options.top);
+                anno.options.left = anno.options.left || 0; // 0 or null zoom will not change zoom factor
+
+                if (typeof anno.options.zoom === "undefined") {
+                  anno.options.zoom = 0;
+                }
+
+                line += " /XYZ " + anno.options.left + " " + top + " " + anno.options.zoom + "]";
+                break;
+            }
+          }
+
+          if (line != "") {
+            line += " >>";
+            this.internal.write(line);
+          }
+
+          break;
+      }
+    }
+
+    this.internal.write("]");
+  }]);
+  /**
+   * @name createAnnotation
+   * @function
+   * @param {Object} options
+   */
+
+  jsPDFAPI.createAnnotation = function (options) {
+    var pageInfo = this.internal.getCurrentPageInfo();
+
+    switch (options.type) {
+      case "link":
+        this.link(options.bounds.x, options.bounds.y, options.bounds.w, options.bounds.h, options);
+        break;
+
+      case "text":
+      case "freetext":
+        pageInfo.pageContext.annotations.push(options);
+        break;
+    }
+  };
+  /**
+   * Create a link
+   *
+   * valid options
+   * <li> pageNumber or url [required]
+   * <p>If pageNumber is specified, top and zoom may also be specified</p>
+   * @name link
+   * @function
+   * @param {number} x
+   * @param {number} y
+   * @param {number} w
+   * @param {number} h
+   * @param {Object} options
+   */
+
+
+  jsPDFAPI.link = function (x, y, w, h, options) {
+    var pageInfo = this.internal.getCurrentPageInfo();
+    var getHorizontalCoordinateString = this.internal.getCoordinateString;
+    var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;
+    pageInfo.pageContext.annotations.push({
+      finalBounds: {
+        x: getHorizontalCoordinateString(x),
+        y: getVerticalCoordinateString(y),
+        w: getHorizontalCoordinateString(x + w),
+        h: getVerticalCoordinateString(y + h)
+      },
+      options: options,
+      type: "link"
+    });
+  };
+  /**
+   * Currently only supports single line text.
+   * Returns the width of the text/link
+   *
+   * @name textWithLink
+   * @function
+   * @param {string} text
+   * @param {number} x
+   * @param {number} y
+   * @param {Object} options
+   * @returns {number} width the width of the text/link
+   */
+
+
+  jsPDFAPI.textWithLink = function (text, x, y, options) {
+    var totalLineWidth = this.getTextWidth(text);
+    var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;
+    var linkHeight, linkWidth; // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line
+
+    if (options.maxWidth !== undefined) {
+      var maxWidth = options.maxWidth;
+      linkWidth = maxWidth;
+      var numOfLines = this.splitTextToSize(text, linkWidth).length;
+      linkHeight = Math.ceil(lineHeight * numOfLines);
+    } else {
+      linkWidth = totalLineWidth;
+      linkHeight = lineHeight;
+    }
+
+    this.text(text, x, y, options); //TODO We really need the text baseline height to do this correctly.
+    // Or ability to draw text on top, bottom, center, or baseline.
+
+    y += lineHeight * 0.2; //handle x position based on the align option
+
+    if (options.align === "center") {
+      x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width
+    }
+
+    if (options.align === "right") {
+      x = x - totalLineWidth;
+    }
+
+    this.link(x, y - lineHeight, linkWidth, linkHeight, options);
+    return totalLineWidth;
+  }; //TODO move into external library
+
+  /**
+   * @name getTextWidth
+   * @function
+   * @param {string} text
+   * @returns {number} txtWidth
+   */
+
+
+  jsPDFAPI.getTextWidth = function (text) {
+    var fontSize = this.internal.getFontSize();
+    var txtWidth = this.getStringUnitWidth(text) * fontSize / this.internal.scaleFactor;
+    return txtWidth;
+  };
+
+  return this;
+})(jsPDF.API);
+
+/**
+ * @license
+ * Copyright (c) 2017 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * jsPDF arabic parser PlugIn
+ *
+ * @name arabic
+ * @module
+ */
+
+(function (jsPDFAPI) {
+  /**
+   * Arabic shape substitutions: char code => (isolated, final, initial, medial).
+   * Arabic Substition A
+   */
+
+  var arabicSubstitionA = {
+    0x0621: [0xfe80],
+    // ARABIC LETTER HAMZA
+    0x0622: [0xfe81, 0xfe82],
+    // ARABIC LETTER ALEF WITH MADDA ABOVE
+    0x0623: [0xfe83, 0xfe84],
+    // ARABIC LETTER ALEF WITH HAMZA ABOVE
+    0x0624: [0xfe85, 0xfe86],
+    // ARABIC LETTER WAW WITH HAMZA ABOVE
+    0x0625: [0xfe87, 0xfe88],
+    // ARABIC LETTER ALEF WITH HAMZA BELOW
+    0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c],
+    // ARABIC LETTER YEH WITH HAMZA ABOVE
+    0x0627: [0xfe8d, 0xfe8e],
+    // ARABIC LETTER ALEF
+    0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92],
+    // ARABIC LETTER BEH
+    0x0629: [0xfe93, 0xfe94],
+    // ARABIC LETTER TEH MARBUTA
+    0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98],
+    // ARABIC LETTER TEH
+    0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c],
+    // ARABIC LETTER THEH
+    0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0],
+    // ARABIC LETTER JEEM
+    0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4],
+    // ARABIC LETTER HAH
+    0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8],
+    // ARABIC LETTER KHAH
+    0x062f: [0xfea9, 0xfeaa],
+    // ARABIC LETTER DAL
+    0x0630: [0xfeab, 0xfeac],
+    // ARABIC LETTER THAL
+    0x0631: [0xfead, 0xfeae],
+    // ARABIC LETTER REH
+    0x0632: [0xfeaf, 0xfeb0],
+    // ARABIC LETTER ZAIN
+    0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4],
+    // ARABIC LETTER SEEN
+    0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8],
+    // ARABIC LETTER SHEEN
+    0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc],
+    // ARABIC LETTER SAD
+    0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0],
+    // ARABIC LETTER DAD
+    0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4],
+    // ARABIC LETTER TAH
+    0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8],
+    // ARABIC LETTER ZAH
+    0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc],
+    // ARABIC LETTER AIN
+    0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0],
+    // ARABIC LETTER GHAIN
+    0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4],
+    // ARABIC LETTER FEH
+    0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8],
+    // ARABIC LETTER QAF
+    0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc],
+    // ARABIC LETTER KAF
+    0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0],
+    // ARABIC LETTER LAM
+    0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4],
+    // ARABIC LETTER MEEM
+    0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8],
+    // ARABIC LETTER NOON
+    0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec],
+    // ARABIC LETTER HEH
+    0x0648: [0xfeed, 0xfeee],
+    // ARABIC LETTER WAW
+    0x0649: [0xfeef, 0xfef0, 64488, 64489],
+    // ARABIC LETTER ALEF MAKSURA
+    0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4],
+    // ARABIC LETTER YEH
+    0x0671: [0xfb50, 0xfb51],
+    // ARABIC LETTER ALEF WASLA
+    0x0677: [0xfbdd],
+    // ARABIC LETTER U WITH HAMZA ABOVE
+    0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69],
+    // ARABIC LETTER TTEH
+    0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61],
+    // ARABIC LETTER TTEHEH
+    0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55],
+    // ARABIC LETTER BEEH
+    0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59],
+    // ARABIC LETTER PEH
+    0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65],
+    // ARABIC LETTER TEHEH
+    0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d],
+    // ARABIC LETTER BEHEH
+    0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79],
+    // ARABIC LETTER NYEH
+    0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75],
+    // ARABIC LETTER DYEH
+    0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d],
+    // ARABIC LETTER TCHEH
+    0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81],
+    // ARABIC LETTER TCHEHEH
+    0x0688: [0xfb88, 0xfb89],
+    // ARABIC LETTER DDAL
+    0x068c: [0xfb84, 0xfb85],
+    // ARABIC LETTER DAHAL
+    0x068d: [0xfb82, 0xfb83],
+    // ARABIC LETTER DDAHAL
+    0x068e: [0xfb86, 0xfb87],
+    // ARABIC LETTER DUL
+    0x0691: [0xfb8c, 0xfb8d],
+    // ARABIC LETTER RREH
+    0x0698: [0xfb8a, 0xfb8b],
+    // ARABIC LETTER JEH
+    0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d],
+    // ARABIC LETTER VEH
+    0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71],
+    // ARABIC LETTER PEHEH
+    0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91],
+    // ARABIC LETTER KEHEH
+    0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6],
+    // ARABIC LETTER NG
+    0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95],
+    // ARABIC LETTER GAF
+    0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d],
+    // ARABIC LETTER NGOEH
+    0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99],
+    // ARABIC LETTER GUEH
+    0x06ba: [0xfb9e, 0xfb9f],
+    // ARABIC LETTER NOON GHUNNA
+    0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3],
+    // ARABIC LETTER RNOON
+    0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad],
+    // ARABIC LETTER HEH DOACHASHMEE
+    0x06c0: [0xfba4, 0xfba5],
+    // ARABIC LETTER HEH WITH YEH ABOVE
+    0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9],
+    // ARABIC LETTER HEH GOAL
+    0x06c5: [0xfbe0, 0xfbe1],
+    // ARABIC LETTER KIRGHIZ OE
+    0x06c6: [0xfbd9, 0xfbda],
+    // ARABIC LETTER OE
+    0x06c7: [0xfbd7, 0xfbd8],
+    // ARABIC LETTER U
+    0x06c8: [0xfbdb, 0xfbdc],
+    // ARABIC LETTER YU
+    0x06c9: [0xfbe2, 0xfbe3],
+    // ARABIC LETTER KIRGHIZ YU
+    0x06cb: [0xfbde, 0xfbdf],
+    // ARABIC LETTER VE
+    0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff],
+    // ARABIC LETTER FARSI YEH
+    0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7],
+    //ARABIC LETTER E
+    0x06d2: [0xfbae, 0xfbaf],
+    // ARABIC LETTER YEH BARREE
+    0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
+
+  };
+  /*
+    var ligaturesSubstitutionA = {
+        0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM
+    };
+    */
+
+  var ligatures = {
+    0xfedf: {
+      0xfe82: 0xfef5,
+      // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
+      0xfe84: 0xfef7,
+      // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
+      0xfe88: 0xfef9,
+      // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM
+      0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
+
+    },
+    0xfee0: {
+      0xfe82: 0xfef6,
+      // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM
+      0xfe84: 0xfef8,
+      // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM
+      0xfe88: 0xfefa,
+      // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM
+      0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+
+    },
+    0xfe8d: {
+      0xfedf: {
+        0xfee0: {
+          0xfeea: 0xfdf2
+        }
+      }
+    },
+    // ALLAH
+    0x0651: {
+      0x064c: 0xfc5e,
+      // Shadda + Dammatan
+      0x064d: 0xfc5f,
+      // Shadda + Kasratan
+      0x064e: 0xfc60,
+      // Shadda + Fatha
+      0x064f: 0xfc61,
+      // Shadda + Damma
+      0x0650: 0xfc62 // Shadda + Kasra
+
+    }
+  };
+  var arabic_diacritics = {
+    1612: 64606,
+    // Shadda + Dammatan
+    1613: 64607,
+    // Shadda + Kasratan
+    1614: 64608,
+    // Shadda + Fatha
+    1615: 64609,
+    // Shadda + Damma
+    1616: 64610 // Shadda + Kasra
+
+  };
+  var alfletter = [1570, 1571, 1573, 1575];
+  var noChangeInForm = -1;
+  var isolatedForm = 0;
+  var finalForm = 1;
+  var initialForm = 2;
+  var medialForm = 3;
+  jsPDFAPI.__arabicParser__ = {}; //private
+
+  var isInArabicSubstitutionA = jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function (letter) {
+    return typeof arabicSubstitionA[letter.charCodeAt(0)] !== "undefined";
+  };
+
+  var isArabicLetter = jsPDFAPI.__arabicParser__.isArabicLetter = function (letter) {
+    return typeof letter === "string" && /^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(letter);
+  };
+
+  var isArabicEndLetter = jsPDFAPI.__arabicParser__.isArabicEndLetter = function (letter) {
+    return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length <= 2;
+  };
+
+  var isArabicAlfLetter = jsPDFAPI.__arabicParser__.isArabicAlfLetter = function (letter) {
+    return isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0;
+  };
+
+  jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function (letter) {
+    return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length >= 1;
+  };
+
+  var arabicLetterHasFinalForm = jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function (letter) {
+    return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length >= 2;
+  };
+
+  jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function (letter) {
+    return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length >= 3;
+  };
+
+  var arabicLetterHasMedialForm = jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function (letter) {
+    return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length == 4;
+  };
+
+  var resolveLigatures = jsPDFAPI.__arabicParser__.resolveLigatures = function (letters) {
+    var i = 0;
+    var tmpLigatures = ligatures;
+    var result = "";
+    var effectedLetters = 0;
+
+    for (i = 0; i < letters.length; i += 1) {
+      if (typeof tmpLigatures[letters.charCodeAt(i)] !== "undefined") {
+        effectedLetters++;
+        tmpLigatures = tmpLigatures[letters.charCodeAt(i)];
+
+        if (typeof tmpLigatures === "number") {
+          result += String.fromCharCode(tmpLigatures);
+          tmpLigatures = ligatures;
+          effectedLetters = 0;
+        }
+
+        if (i === letters.length - 1) {
+          tmpLigatures = ligatures;
+          result += letters.charAt(i - (effectedLetters - 1));
+          i = i - (effectedLetters - 1);
+          effectedLetters = 0;
+        }
+      } else {
+        tmpLigatures = ligatures;
+        result += letters.charAt(i - effectedLetters);
+        i = i - effectedLetters;
+        effectedLetters = 0;
+      }
+    }
+
+    return result;
+  };
+
+  jsPDFAPI.__arabicParser__.isArabicDiacritic = function (letter) {
+    return letter !== undefined && arabic_diacritics[letter.charCodeAt(0)] !== undefined;
+  };
+
+  var getCorrectForm = jsPDFAPI.__arabicParser__.getCorrectForm = function (currentChar, beforeChar, nextChar) {
+    if (!isArabicLetter(currentChar)) {
+      return -1;
+    }
+
+    if (isInArabicSubstitutionA(currentChar) === false) {
+      return noChangeInForm;
+    }
+
+    if (!arabicLetterHasFinalForm(currentChar) || !isArabicLetter(beforeChar) && !isArabicLetter(nextChar) || !isArabicLetter(nextChar) && isArabicEndLetter(beforeChar) || isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar) || isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar) || isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar)) {
+      return isolatedForm;
+    }
+
+    if (arabicLetterHasMedialForm(currentChar) && isArabicLetter(beforeChar) && !isArabicEndLetter(beforeChar) && isArabicLetter(nextChar) && arabicLetterHasFinalForm(nextChar)) {
+      return medialForm;
+    }
+
+    if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {
+      return finalForm;
+    }
+
+    return initialForm;
+  };
+  /**
+   * @name processArabic
+   * @function
+   * @param {string} text
+   * @returns {string}
+   */
+
+
+  var parseArabic = function parseArabic(text) {
+    text = text || "";
+    var result = "";
+    var i = 0;
+    var j = 0;
+    var position = 0;
+    var currentLetter = "";
+    var prevLetter = "";
+    var nextLetter = "";
+    var words = text.split("\\s+");
+    var newWords = [];
+
+    for (i = 0; i < words.length; i += 1) {
+      newWords.push("");
+
+      for (j = 0; j < words[i].length; j += 1) {
+        currentLetter = words[i][j];
+        prevLetter = words[i][j - 1];
+        nextLetter = words[i][j + 1];
+
+        if (isArabicLetter(currentLetter)) {
+          position = getCorrectForm(currentLetter, prevLetter, nextLetter);
+
+          if (position !== -1) {
+            newWords[i] += String.fromCharCode(arabicSubstitionA[currentLetter.charCodeAt(0)][position]);
+          } else {
+            newWords[i] += currentLetter;
+          }
+        } else {
+          newWords[i] += currentLetter;
+        }
+      }
+
+      newWords[i] = resolveLigatures(newWords[i]);
+    }
+
+    result = newWords.join(" ");
+    return result;
+  };
+
+  var processArabic = jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function () {
+    var text = typeof arguments[0] === "string" ? arguments[0] : arguments[0].text;
+    var tmpText = [];
+    var result;
+
+    if (Array.isArray(text)) {
+      var i = 0;
+      tmpText = [];
+
+      for (i = 0; i < text.length; i += 1) {
+        if (Array.isArray(text[i])) {
+          tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);
+        } else {
+          tmpText.push([parseArabic(text[i])]);
+        }
+      }
+
+      result = tmpText;
+    } else {
+      result = parseArabic(text);
+    }
+
+    if (typeof arguments[0] === "string") {
+      return result;
+    } else {
+      arguments[0].text = result;
+      return arguments[0];
+    }
+  };
+
+  jsPDFAPI.events.push(["preProcessText", processArabic]);
+})(jsPDF.API);
+
+/** @license
+ * jsPDF Autoprint Plugin
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * @name autoprint
+ * @module
+ */
+
+(function (jsPDFAPI) {
+  /**
+   * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.
+   *
+   * @name autoPrint
+   * @function
+   * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .
+   * @returns {jsPDF}
+   * @example
+   * var doc = new jsPDF();
+   * doc.text(10, 10, 'This is a test');
+   * doc.autoPrint({variant: 'non-conform'});
+   * doc.save('autoprint.pdf');
+   */
+
+  jsPDFAPI.autoPrint = function (options) {
+
+    var refAutoPrintTag;
+    options = options || {};
+    options.variant = options.variant || "non-conform";
+
+    switch (options.variant) {
+      case "javascript":
+        //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb
+        this.addJS("print({});");
+        break;
+
+      case "non-conform":
+      default:
+        this.internal.events.subscribe("postPutResources", function () {
+          refAutoPrintTag = 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 " + refAutoPrintTag + " 0 R");
+        });
+        break;
+    }
+
+    return this;
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * jsPDF Canvas PlugIn
+ * This plugin mimics the HTML5 Canvas
+ *
+ * The goal is to provide a way for current canvas users to print directly to a PDF.
+ * @name canvas
+ * @module
+ */
+
+(function (jsPDFAPI) {
+  /**
+   * @class Canvas
+   * @classdesc A Canvas Wrapper for jsPDF
+   */
+
+  var Canvas = function Canvas() {
+    var jsPdfInstance = undefined;
+    Object.defineProperty(this, "pdf", {
+      get: function get() {
+        return jsPdfInstance;
+      },
+      set: function set(value) {
+        jsPdfInstance = value;
+      }
+    });
+    var _width = 150;
+    /**
+     * The height property is a positive integer reflecting the height HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.
+     * This is one of the two properties, the other being width, that controls the size of the canvas.
+     *
+     * @name width
+     */
+
+    Object.defineProperty(this, "width", {
+      get: function get() {
+        return _width;
+      },
+      set: function set(value) {
+        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {
+          _width = 150;
+        } else {
+          _width = value;
+        }
+
+        if (this.getContext("2d").pageWrapXEnabled) {
+          this.getContext("2d").pageWrapX = _width + 1;
+        }
+      }
+    });
+    var _height = 300;
+    /**
+     * The width property is a positive integer reflecting the width HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.
+     * This is one of the two properties, the other being height, that controls the size of the canvas.
+     *
+     * @name height
+     */
+
+    Object.defineProperty(this, "height", {
+      get: function get() {
+        return _height;
+      },
+      set: function set(value) {
+        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {
+          _height = 300;
+        } else {
+          _height = value;
+        }
+
+        if (this.getContext("2d").pageWrapYEnabled) {
+          this.getContext("2d").pageWrapY = _height + 1;
+        }
+      }
+    });
+    var _childNodes = [];
+    Object.defineProperty(this, "childNodes", {
+      get: function get() {
+        return _childNodes;
+      },
+      set: function set(value) {
+        _childNodes = value;
+      }
+    });
+    var _style = {};
+    Object.defineProperty(this, "style", {
+      get: function get() {
+        return _style;
+      },
+      set: function set(value) {
+        _style = value;
+      }
+    });
+    Object.defineProperty(this, "parentNode", {});
+  };
+  /**
+   * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.
+   *
+   * @name getContext
+   * @function
+   * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is "2d", leading to the creation of a Context2D object representing a two-dimensional rendering context.
+   * @param {object} contextAttributes
+   */
+
+
+  Canvas.prototype.getContext = function (contextType, contextAttributes) {
+    contextType = contextType || "2d";
+    var key;
+
+    if (contextType !== "2d") {
+      return null;
+    }
+
+    for (key in contextAttributes) {
+      if (this.pdf.context2d.hasOwnProperty(key)) {
+        this.pdf.context2d[key] = contextAttributes[key];
+      }
+    }
+
+    this.pdf.context2d._canvas = this;
+    return this.pdf.context2d;
+  };
+  /**
+   * The toDataURL() method is just a stub to throw an error if accidently called.
+   *
+   * @name toDataURL
+   * @function
+   */
+
+
+  Canvas.prototype.toDataURL = function () {
+    throw new Error("toDataURL is not implemented.");
+  };
+
+  jsPDFAPI.events.push(["initialized", function () {
+    this.canvas = new Canvas();
+    this.canvas.pdf = this;
+  }]);
+  return this;
+})(jsPDF.API);
+
+/**
+ * @name cell
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  var NO_MARGINS = {
+    left: 0,
+    top: 0,
+    bottom: 0,
+    right: 0
+  };
+  var px2pt = 0.264583 * 72 / 25.4;
+  var printingHeaderRow = false;
+
+  var _initialize = function _initialize() {
+    if (typeof this.internal.__cell__ === "undefined") {
+      this.internal.__cell__ = {};
+      this.internal.__cell__.padding = 3;
+      this.internal.__cell__.headerFunction = undefined;
+      this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);
+      this.internal.__cell__.margins.width = this.getPageWidth();
+
+      _reset.call(this);
+    }
+  };
+
+  var _reset = function _reset() {
+    this.internal.__cell__.lastCell = new Cell();
+    this.internal.__cell__.pages = 1;
+  };
+
+  var Cell = function Cell() {
+    var _x = arguments[0];
+    Object.defineProperty(this, "x", {
+      enumerable: true,
+      get: function get() {
+        return _x;
+      },
+      set: function set(value) {
+        _x = value;
+      }
+    });
+    var _y = arguments[1];
+    Object.defineProperty(this, "y", {
+      enumerable: true,
+      get: function get() {
+        return _y;
+      },
+      set: function set(value) {
+        _y = value;
+      }
+    });
+    var _width = arguments[2];
+    Object.defineProperty(this, "width", {
+      enumerable: true,
+      get: function get() {
+        return _width;
+      },
+      set: function set(value) {
+        _width = value;
+      }
+    });
+    var _height = arguments[3];
+    Object.defineProperty(this, "height", {
+      enumerable: true,
+      get: function get() {
+        return _height;
+      },
+      set: function set(value) {
+        _height = value;
+      }
+    });
+    var _text = arguments[4];
+    Object.defineProperty(this, "text", {
+      enumerable: true,
+      get: function get() {
+        return _text;
+      },
+      set: function set(value) {
+        _text = value;
+      }
+    });
+    var _lineNumber = arguments[5];
+    Object.defineProperty(this, "lineNumber", {
+      enumerable: true,
+      get: function get() {
+        return _lineNumber;
+      },
+      set: function set(value) {
+        _lineNumber = value;
+      }
+    });
+    var _align = arguments[6];
+    Object.defineProperty(this, "align", {
+      enumerable: true,
+      get: function get() {
+        return _align;
+      },
+      set: function set(value) {
+        _align = value;
+      }
+    });
+    return this;
+  };
+
+  Cell.prototype.clone = function () {
+    return new Cell(this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align);
+  };
+
+  Cell.prototype.toArray = function () {
+    return [this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align];
+  };
+  /**
+   * @name setHeaderFunction
+   * @function
+   * @param {function} func
+   */
+
+
+  jsPDFAPI.setHeaderFunction = function (func) {
+    _initialize.call(this);
+
+    this.internal.__cell__.headerFunction = typeof func === "function" ? func : undefined;
+    return this;
+  };
+  /**
+   * @name getTextDimensions
+   * @function
+   * @param {string} txt
+   * @returns {Object} dimensions
+   */
+
+
+  jsPDFAPI.getTextDimensions = function (text, options) {
+    _initialize.call(this);
+
+    options = options || {};
+    var fontSize = options.fontSize || this.getFontSize();
+    var font = options.font || this.getFont();
+    var scaleFactor = options.scaleFactor || this.internal.scaleFactor;
+    var width = 0;
+    var amountOfLines = 0;
+    var height = 0;
+    var tempWidth = 0;
+    var scope = this;
+
+    if (!Array.isArray(text) && typeof text !== "string") {
+      if (typeof text === "number") {
+        text = String(text);
+      } else {
+        throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");
+      }
+    }
+
+    var maxWidth = options.maxWidth;
+
+    if (maxWidth > 0) {
+      if (typeof text === "string") {
+        text = this.splitTextToSize(text, maxWidth);
+      } else if (Object.prototype.toString.call(text) === "[object Array]") {
+        text = text.reduce(function (acc, textLine) {
+          return acc.concat(scope.splitTextToSize(textLine, maxWidth));
+        }, []);
+      }
+    } else {
+      // Without the else clause, it will not work if you do not pass along maxWidth
+      text = Array.isArray(text) ? text : [text];
+    }
+
+    for (var i = 0; i < text.length; i++) {
+      tempWidth = this.getStringUnitWidth(text[i], {
+        font: font
+      }) * fontSize;
+
+      if (width < tempWidth) {
+        width = tempWidth;
+      }
+    }
+
+    if (width !== 0) {
+      amountOfLines = text.length;
+    }
+
+    width = width / scaleFactor;
+    height = Math.max((amountOfLines * fontSize * this.getLineHeightFactor() - fontSize * (this.getLineHeightFactor() - 1)) / scaleFactor, 0);
+    return {
+      w: width,
+      h: height
+    };
+  };
+  /**
+   * @name cellAddPage
+   * @function
+   */
+
+
+  jsPDFAPI.cellAddPage = function () {
+    _initialize.call(this);
+
+    this.addPage();
+    var margins = this.internal.__cell__.margins || NO_MARGINS;
+    this.internal.__cell__.lastCell = new Cell(margins.left, margins.top, undefined, undefined);
+    this.internal.__cell__.pages += 1;
+    return this;
+  };
+  /**
+   * @name cell
+   * @function
+   * @param {number} x
+   * @param {number} y
+   * @param {number} width
+   * @param {number} height
+   * @param {string} text
+   * @param {number} lineNumber lineNumber
+   * @param {string} align
+   * @return {jsPDF} jsPDF-instance
+   */
+
+
+  var cell = jsPDFAPI.cell = function () {
+    var currentCell;
+
+    if (arguments[0] instanceof Cell) {
+      currentCell = arguments[0];
+    } else {
+      currentCell = new Cell(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+    }
+
+    _initialize.call(this);
+
+    var lastCell = this.internal.__cell__.lastCell;
+    var padding = this.internal.__cell__.padding;
+    var margins = this.internal.__cell__.margins || NO_MARGINS;
+    var tableHeaderRow = this.internal.__cell__.tableHeaderRow;
+    var printHeaders = this.internal.__cell__.printHeaders; // If this is not the first cell, we must change its position
+
+    if (typeof lastCell.lineNumber !== "undefined") {
+      if (lastCell.lineNumber === currentCell.lineNumber) {
+        //Same line
+        currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);
+        currentCell.y = lastCell.y || 0;
+      } else {
+        //New line
+        if (lastCell.y + lastCell.height + currentCell.height + margins.bottom > this.getPageHeight()) {
+          this.cellAddPage();
+          currentCell.y = margins.top;
+
+          if (printHeaders && tableHeaderRow) {
+            this.printHeaderRow(currentCell.lineNumber, true);
+            currentCell.y += tableHeaderRow[0].height;
+          }
+        } else {
+          currentCell.y = lastCell.y + lastCell.height || currentCell.y;
+        }
+      }
+    }
+
+    if (typeof currentCell.text[0] !== "undefined") {
+      this.rect(currentCell.x, currentCell.y, currentCell.width, currentCell.height, printingHeaderRow === true ? "FD" : undefined);
+
+      if (currentCell.align === "right") {
+        this.text(currentCell.text, currentCell.x + currentCell.width - padding, currentCell.y + padding, {
+          align: "right",
+          baseline: "top"
+        });
+      } else if (currentCell.align === "center") {
+        this.text(currentCell.text, currentCell.x + currentCell.width / 2, currentCell.y + padding, {
+          align: "center",
+          baseline: "top",
+          maxWidth: currentCell.width - padding - padding
+        });
+      } else {
+        this.text(currentCell.text, currentCell.x + padding, currentCell.y + padding, {
+          align: "left",
+          baseline: "top",
+          maxWidth: currentCell.width - padding - padding
+        });
+      }
+    }
+
+    this.internal.__cell__.lastCell = currentCell;
+    return this;
+  };
+  /**
+     * Create a table from a set of data.
+     * @name table
+     * @function
+     * @param {Integer} [x] : left-position for top-left corner of table
+     * @param {Integer} [y] top-position for top-left corner of table
+     * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.
+     * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost
+      * @param {Object} [config.printHeaders] True to print column headers at the top of every page
+     * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value
+     * @param {Object} [config.margins] margin values for left, top, bottom, and width
+     * @param {Object} [config.fontSize] Integer fontSize to use (optional)
+     * @param {Object} [config.padding] cell-padding in pt to use (optional)
+     * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)
+     * @param {Object} [config.headerTextColor] default is #000 (optional)
+     * @param {Object} [config.rowStart] callback to handle before print each row (optional)
+     * @param {Object} [config.cellStart] callback to handle before print each cell (optional)
+     * @returns {jsPDF} jsPDF-instance
+     */
+
+
+  jsPDFAPI.table = function (x, y, data, headers, config) {
+    _initialize.call(this);
+
+    if (!data) {
+      throw new Error("No data for PDF table.");
+    }
+
+    config = config || {};
+    var headerNames = [],
+        headerLabels = [],
+        headerAligns = [],
+        i,
+        columnMatrix = {},
+        columnWidths = {},
+        column,
+        columnMinWidths = [],
+        j,
+        tableHeaderConfigs = [],
+        //set up defaults. If a value is provided in config, defaults will be overwritten:
+    autoSize = config.autoSize || false,
+        printHeaders = config.printHeaders === false ? false : true,
+        fontSize = config.css && typeof config.css["font-size"] !== "undefined" ? config.css["font-size"] * 16 : config.fontSize || 12,
+        margins = config.margins || Object.assign({
+      width: this.getPageWidth()
+    }, NO_MARGINS),
+        padding = typeof config.padding === "number" ? config.padding : 3,
+        headerBackgroundColor = config.headerBackgroundColor || "#c8c8c8",
+        headerTextColor = config.headerTextColor || "#000";
+
+    _reset.call(this);
+
+    this.internal.__cell__.printHeaders = printHeaders;
+    this.internal.__cell__.margins = margins;
+    this.internal.__cell__.table_font_size = fontSize;
+    this.internal.__cell__.padding = padding;
+    this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;
+    this.internal.__cell__.headerTextColor = headerTextColor;
+    this.setFontSize(fontSize); // Set header values
+
+    if (headers === undefined || headers === null) {
+      // No headers defined so we derive from data
+      headerNames = Object.keys(data[0]);
+      headerLabels = headerNames;
+      headerAligns = headerNames.map(function () {
+        return "left";
+      });
+    } else if (Array.isArray(headers) && _typeof(headers[0]) === "object") {
+      headerNames = headers.map(function (header) {
+        return header.name;
+      });
+      headerLabels = headers.map(function (header) {
+        return header.prompt || header.name || "";
+      });
+      headerAligns = headers.map(function (header) {
+        return header.align || "left";
+      }); // Split header configs into names and prompts
+
+      for (i = 0; i < headers.length; i += 1) {
+        columnWidths[headers[i].name] = headers[i].width * px2pt;
+      }
+    } else if (Array.isArray(headers) && typeof headers[0] === "string") {
+      headerNames = headers;
+      headerLabels = headerNames;
+      headerAligns = headerNames.map(function () {
+        return "left";
+      });
+    }
+
+    if (autoSize || Array.isArray(headers) && typeof headers[0] === "string") {
+      var headerName;
+
+      for (i = 0; i < headerNames.length; i += 1) {
+        headerName = headerNames[i]; // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}
+
+        columnMatrix[headerName] = data.map(function (rec) {
+          return rec[headerName];
+        }); // get header width
+
+        this.setFont(undefined, "bold");
+        columnMinWidths.push(this.getTextDimensions(headerLabels[i], {
+          fontSize: this.internal.__cell__.table_font_size,
+          scaleFactor: this.internal.scaleFactor
+        }).w);
+        column = columnMatrix[headerName]; // get cell widths
+
+        this.setFont(undefined, "normal");
+
+        for (j = 0; j < column.length; j += 1) {
+          columnMinWidths.push(this.getTextDimensions(column[j], {
+            fontSize: this.internal.__cell__.table_font_size,
+            scaleFactor: this.internal.scaleFactor
+          }).w);
+        } // get final column width
+
+
+        columnWidths[headerName] = Math.max.apply(null, columnMinWidths) + padding + padding; //have to reset
+
+        columnMinWidths = [];
+      }
+    } // -- Construct the table
+
+
+    if (printHeaders) {
+      var row = {};
+
+      for (i = 0; i < headerNames.length; i += 1) {
+        row[headerNames[i]] = {};
+        row[headerNames[i]].text = headerLabels[i];
+        row[headerNames[i]].align = headerAligns[i];
+      }
+
+      var rowHeight = calculateLineHeight.call(this, row, columnWidths); // Construct the header row
+
+      tableHeaderConfigs = headerNames.map(function (value) {
+        return new Cell(x, y, columnWidths[value], rowHeight, row[value].text, undefined, row[value].align);
+      }); // Store the table header config
+
+      this.setTableHeaderRow(tableHeaderConfigs); // Print the header for the start of the table
+
+      this.printHeaderRow(1, false);
+    } // Construct the data rows
+
+
+    var align = headers.reduce(function (pv, cv) {
+      pv[cv.name] = cv.align;
+      return pv;
+    }, {});
+
+    for (i = 0; i < data.length; i += 1) {
+      if ("rowStart" in config && config.rowStart instanceof Function) {
+        config.rowStart({
+          row: i,
+          data: data[i]
+        }, this);
+      }
+
+      var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);
+
+      for (j = 0; j < headerNames.length; j += 1) {
+        var cellData = data[i][headerNames[j]];
+
+        if ("cellStart" in config && config.cellStart instanceof Function) {
+          config.cellStart({
+            row: i,
+            col: j,
+            data: cellData
+          }, this);
+        }
+
+        cell.call(this, new Cell(x, y, columnWidths[headerNames[j]], lineHeight, cellData, i + 2, align[headerNames[j]]));
+      }
+    }
+
+    this.internal.__cell__.table_x = x;
+    this.internal.__cell__.table_y = y;
+    return this;
+  };
+  /**
+   * Calculate the height for containing the highest column
+   *
+   * @name calculateLineHeight
+   * @function
+   * @param {Object[]} model is the line of data we want to calculate the height of
+   * @param {Integer[]} columnWidths is size of each column
+   * @returns {number} lineHeight
+   * @private
+   */
+
+
+  var calculateLineHeight = function calculateLineHeight(model, columnWidths) {
+    var padding = this.internal.__cell__.padding;
+    var fontSize = this.internal.__cell__.table_font_size;
+    var scaleFactor = this.internal.scaleFactor;
+    return Object.keys(model).map(function (key) {
+      var value = model[key];
+      return this.splitTextToSize(value.hasOwnProperty("text") ? value.text : value, columnWidths[key] - padding - padding);
+    }, this).map(function (value) {
+      return this.getLineHeightFactor() * value.length * fontSize / scaleFactor + padding + padding;
+    }, this).reduce(function (pv, cv) {
+      return Math.max(pv, cv);
+    }, 0);
+  };
+  /**
+   * Store the config for outputting a table header
+   *
+   * @name setTableHeaderRow
+   * @function
+   * @param {Object[]} config
+   * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell
+   * except the lineNumber parameter is excluded
+   */
+
+
+  jsPDFAPI.setTableHeaderRow = function (config) {
+    _initialize.call(this);
+
+    this.internal.__cell__.tableHeaderRow = config;
+  };
+  /**
+   * Output the store header row
+   *
+   * @name printHeaderRow
+   * @function
+   * @param {number} lineNumber The line number to output the header at
+   * @param {boolean} new_page
+   */
+
+
+  jsPDFAPI.printHeaderRow = function (lineNumber, new_page) {
+    _initialize.call(this);
+
+    if (!this.internal.__cell__.tableHeaderRow) {
+      throw new Error("Property tableHeaderRow does not exist.");
+    }
+
+    var tableHeaderCell;
+    printingHeaderRow = true;
+
+    if (typeof this.internal.__cell__.headerFunction === "function") {
+      var position = this.internal.__cell__.headerFunction(this, this.internal.__cell__.pages);
+
+      this.internal.__cell__.lastCell = new Cell(position[0], position[1], position[2], position[3], undefined, -1);
+    }
+
+    this.setFont(undefined, "bold");
+    var tempHeaderConf = [];
+
+    for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {
+      tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();
+
+      if (new_page) {
+        tableHeaderCell.y = this.internal.__cell__.margins.top || 0;
+        tempHeaderConf.push(tableHeaderCell);
+      }
+
+      tableHeaderCell.lineNumber = lineNumber;
+      var currentTextColor = this.getTextColor();
+      this.setTextColor(this.internal.__cell__.headerTextColor);
+      this.setFillColor(this.internal.__cell__.headerBackgroundColor);
+      cell.call(this, tableHeaderCell);
+      this.setTextColor(currentTextColor);
+    }
+
+    if (tempHeaderConf.length > 0) {
+      this.setTableHeaderRow(tempHeaderConf);
+    }
+
+    this.setFont(undefined, "normal");
+    printingHeaderRow = false;
+  };
+})(jsPDF.API);
+
+function toLookup(arr) {
+  return arr.reduce(function (lookup, name, index) {
+    lookup[name] = index;
+    return lookup;
+  }, {});
+}
+
+var fontStyleOrder = {
+  italic: ["italic", "oblique", "normal"],
+  oblique: ["oblique", "italic", "normal"],
+  normal: ["normal", "oblique", "italic"]
+};
+var fontStretchOrder = ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"]; // For a given font-stretch value, we need to know where to start our search
+// from in the fontStretchOrder list.
+
+var fontStretchLookup = toLookup(fontStretchOrder);
+var fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];
+var fontWeightsLookup = toLookup(fontWeights);
+
+function normalizeFontStretch(stretch) {
+  stretch = stretch || "normal";
+  return typeof fontStretchLookup[stretch] === "number" ? stretch : "normal";
+}
+
+function normalizeFontStyle(style) {
+  style = style || "normal";
+  return fontStyleOrder[style] ? style : "normal";
+}
+
+function normalizeFontWeight(weight) {
+  if (!weight) {
+    return 400;
+  }
+
+  if (typeof weight === "number") {
+    // Ignore values which aren't valid font-weights.
+    return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;
+  }
+
+  if (/^\d00$/.test(weight)) {
+    return parseInt(weight);
+  }
+
+  switch (weight) {
+    case "bold":
+      return 700;
+
+    case "normal":
+    default:
+      return 400;
+  }
+}
+
+function normalizeFontFace(fontFace) {
+  var family = fontFace.family.replace(/"|'/g, "").toLowerCase();
+  var style = normalizeFontStyle(fontFace.style);
+  var weight = normalizeFontWeight(fontFace.weight);
+  var stretch = normalizeFontStretch(fontFace.stretch);
+  return {
+    family: family,
+    style: style,
+    weight: weight,
+    stretch: stretch,
+    src: fontFace.src || [],
+    // The ref property maps this font-face to the font
+    // added by the .addFont() method.
+    ref: fontFace.ref || {
+      name: family,
+      style: [stretch, style, weight].join(" ")
+    }
+  };
+}
+/**
+ * Turns a list of font-faces into a map, for easier lookup when resolving
+ * fonts.
+ * @private
+ */
+
+function buildFontFaceMap(fontFaces) {
+  var map = {};
+
+  for (var i = 0; i < fontFaces.length; ++i) {
+    var normalized = normalizeFontFace(fontFaces[i]);
+    var name = normalized.family;
+    var stretch = normalized.stretch;
+    var style = normalized.style;
+    var weight = normalized.weight;
+    map[name] = map[name] || {};
+    map[name][stretch] = map[name][stretch] || {};
+    map[name][stretch][style] = map[name][stretch][style] || {};
+    map[name][stretch][style][weight] = normalized;
+  }
+
+  return map;
+}
+/**
+ * Searches a map of stretches, weights, etc. in the given direction and
+ * then, if no match has been found, in the opposite directions.
+ *
+ * @param {Object.<string, any>} matchingSet A map of the various font variations.
+ * @param {any[]} order The order of the different variations
+ * @param {number} pivot The starting point of the search in the order list.
+ * @param {number} dir The initial direction of the search (desc = -1, asc = 1)
+ * @private
+ */
+
+function searchFromPivot(matchingSet, order, pivot, dir) {
+  var i;
+
+  for (i = pivot; i >= 0 && i < order.length; i += dir) {
+    if (matchingSet[order[i]]) {
+      return matchingSet[order[i]];
+    }
+  }
+
+  for (i = pivot; i >= 0 && i < order.length; i -= dir) {
+    if (matchingSet[order[i]]) {
+      return matchingSet[order[i]];
+    }
+  }
+}
+
+function resolveFontStretch(stretch, matchingSet) {
+  if (matchingSet[stretch]) {
+    return matchingSet[stretch];
+  }
+
+  var pivot = fontStretchLookup[stretch]; // If the font-stretch value is normal or more condensed, we want to
+  // start with a descending search, otherwise we should do ascending.
+
+  var dir = pivot <= fontStretchLookup["normal"] ? -1 : 1;
+  var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);
+
+  if (!match) {
+    // Since a font-family cannot exist without having at least one stretch value
+    // we should never reach this point.
+    throw new Error("Could not find a matching font-stretch value for " + stretch);
+  }
+
+  return match;
+}
+
+function resolveFontStyle(fontStyle, matchingSet) {
+  if (matchingSet[fontStyle]) {
+    return matchingSet[fontStyle];
+  }
+
+  var ordering = fontStyleOrder[fontStyle];
+
+  for (var i = 0; i < ordering.length; ++i) {
+    if (matchingSet[ordering[i]]) {
+      return matchingSet[ordering[i]];
+    }
+  } // Since a font-family cannot exist without having at least one style value
+  // we should never reach this point.
+
+
+  throw new Error("Could not find a matching font-style for " + fontStyle);
+}
+
+function resolveFontWeight(weight, matchingSet) {
+  if (matchingSet[weight]) {
+    return matchingSet[weight];
+  }
+
+  if (weight === 400 && matchingSet[500]) {
+    return matchingSet[500];
+  }
+
+  if (weight === 500 && matchingSet[400]) {
+    return matchingSet[400];
+  }
+
+  var pivot = fontWeightsLookup[weight]; // If the font-stretch value is normal or more condensed, we want to
+  // start with a descending search, otherwise we should do ascending.
+
+  var dir = weight < 400 ? -1 : 1;
+  var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);
+
+  if (!match) {
+    // Since a font-family cannot exist without having at least one stretch value
+    // we should never reach this point.
+    throw new Error("Could not find a matching font-weight for value " + weight);
+  }
+
+  return match;
+}
+
+var defaultGenericFontFamilies = {
+  "sans-serif": "helvetica",
+  fixed: "courier",
+  monospace: "courier",
+  terminal: "courier",
+  cursive: "times",
+  fantasy: "times",
+  serif: "times"
+};
+var systemFonts = {
+  caption: "times",
+  icon: "times",
+  menu: "times",
+  "message-box": "times",
+  "small-caption": "times",
+  "status-bar": "times"
+};
+
+function ruleToString(rule) {
+  return [rule.stretch, rule.style, rule.weight, rule.family].join(" ");
+}
+
+function resolveFontFace(fontFaceMap, rules, opts) {
+  opts = opts || {};
+  var defaultFontFamily = opts.defaultFontFamily || "times";
+  var genericFontFamilies = Object.assign({}, defaultGenericFontFamilies, opts.genericFontFamilies || {});
+  var rule = null;
+  var matches = null;
+
+  for (var i = 0; i < rules.length; ++i) {
+    rule = normalizeFontFace(rules[i]);
+
+    if (genericFontFamilies[rule.family]) {
+      rule.family = genericFontFamilies[rule.family];
+    }
+
+    if (fontFaceMap.hasOwnProperty(rule.family)) {
+      matches = fontFaceMap[rule.family];
+      break;
+    }
+  } // Always fallback to a known font family.
+
+
+  matches = matches || fontFaceMap[defaultFontFamily];
+
+  if (!matches) {
+    // At this point we should definitiely have a font family, but if we
+    // don't there is something wrong with our configuration
+    throw new Error("Could not find a font-family for the rule '" + ruleToString(rule) + "' and default family '" + defaultFontFamily + "'.");
+  }
+
+  matches = resolveFontStretch(rule.stretch, matches);
+  matches = resolveFontStyle(rule.style, matches);
+  matches = resolveFontWeight(rule.weight, matches);
+
+  if (!matches) {
+    // We should've fount
+    throw new Error("Failed to resolve a font for the rule '" + ruleToString(rule) + "'.");
+  }
+
+  return matches;
+}
+
+function eatWhiteSpace(input) {
+  return input.trimLeft();
+}
+
+function parseQuotedFontFamily(input, quote) {
+  var index = 0;
+
+  while (index < input.length) {
+    var current = input.charAt(index);
+
+    if (current === quote) {
+      return [input.substring(0, index), input.substring(index + 1)];
+    }
+
+    index += 1;
+  } // Unexpected end of input
+
+
+  return null;
+}
+
+function parseNonQuotedFontFamily(input) {
+  // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+  //
+  // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.
+  //
+  // Breakdown of regexp:
+  // -[a-z_]     - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit
+  // [a-z_]      - allow a-z and underscore at beginning of input
+  // [a-z0-9_-]* - after that, anything goes
+  var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i); // non quoted value contains illegal characters
+
+  if (match === null) {
+    return null;
+  }
+
+  return [match[0], input.substring(match[0].length)];
+}
+
+var defaultFont = ["times"];
+function parseFontFamily(input) {
+  var result = [];
+  var ch, parsed;
+  var remaining = input.trim();
+
+  if (remaining === "") {
+    return defaultFont;
+  }
+
+  if (remaining in systemFonts) {
+    return [systemFonts[remaining]];
+  }
+
+  while (remaining !== "") {
+    parsed = null;
+    remaining = eatWhiteSpace(remaining);
+    ch = remaining.charAt(0);
+
+    switch (ch) {
+      case '"':
+      case "'":
+        parsed = parseQuotedFontFamily(remaining.substring(1), ch);
+        break;
+
+      default:
+        parsed = parseNonQuotedFontFamily(remaining);
+        break;
+    }
+
+    if (parsed === null) {
+      return defaultFont;
+    }
+
+    result.push(parsed[0]);
+    remaining = eatWhiteSpace(parsed[1]); // We expect end of input or a comma separator here
+
+    if (remaining !== "" && remaining.charAt(0) !== ",") {
+      return defaultFont;
+    }
+
+    remaining = remaining.replace(/^,/, "");
+  }
+
+  return result;
+}
+
+/**
+ * This plugin mimics the HTML5 CanvasRenderingContext2D.
+ *
+ * The goal is to provide a way for current canvas implementations to print directly to a PDF.
+ *
+ * @name context2d
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  var ContextLayer = function ContextLayer(ctx) {
+    ctx = ctx || {};
+    this.isStrokeTransparent = ctx.isStrokeTransparent || false;
+    this.strokeOpacity = ctx.strokeOpacity || 1;
+    this.strokeStyle = ctx.strokeStyle || "#000000";
+    this.fillStyle = ctx.fillStyle || "#000000";
+    this.isFillTransparent = ctx.isFillTransparent || false;
+    this.fillOpacity = ctx.fillOpacity || 1;
+    this.font = ctx.font || "10px sans-serif";
+    this.textBaseline = ctx.textBaseline || "alphabetic";
+    this.textAlign = ctx.textAlign || "left";
+    this.lineWidth = ctx.lineWidth || 1;
+    this.lineJoin = ctx.lineJoin || "miter";
+    this.lineCap = ctx.lineCap || "butt";
+    this.path = ctx.path || [];
+    this.transform = typeof ctx.transform !== "undefined" ? ctx.transform.clone() : new Matrix();
+    this.globalCompositeOperation = ctx.globalCompositeOperation || "normal";
+    this.globalAlpha = ctx.globalAlpha || 1.0;
+    this.clip_path = ctx.clip_path || [];
+    this.currentPoint = ctx.currentPoint || new Point();
+    this.miterLimit = ctx.miterLimit || 10.0;
+    this.lastPoint = ctx.lastPoint || new Point();
+    this.lineDashOffset = ctx.lineDashOffset || 0.0;
+    this.lineDash = ctx.lineDash || [];
+    this.margin = ctx.margin || [0, 0, 0, 0];
+    this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;
+    this.ignoreClearRect = typeof ctx.ignoreClearRect === "boolean" ? ctx.ignoreClearRect : true;
+    return this;
+  }; //stub
+
+
+  var f2, getHorizontalCoordinateString, getVerticalCoordinateString, getHorizontalCoordinate, getVerticalCoordinate, Point, Rectangle, Matrix, _ctx;
+
+  jsPDFAPI.events.push(["initialized", function () {
+    this.context2d = new Context2D(this);
+    f2 = this.internal.f2;
+    getHorizontalCoordinateString = this.internal.getCoordinateString;
+    getVerticalCoordinateString = this.internal.getVerticalCoordinateString;
+    getHorizontalCoordinate = this.internal.getHorizontalCoordinate;
+    getVerticalCoordinate = this.internal.getVerticalCoordinate;
+    Point = this.internal.Point;
+    Rectangle = this.internal.Rectangle;
+    Matrix = this.internal.Matrix;
+    _ctx = new ContextLayer();
+  }]);
+
+  var Context2D = function Context2D(pdf) {
+    Object.defineProperty(this, "canvas", {
+      get: function get() {
+        return {
+          parentNode: false,
+          style: false
+        };
+      }
+    });
+    var _pdf = pdf;
+    Object.defineProperty(this, "pdf", {
+      get: function get() {
+        return _pdf;
+      }
+    });
+    var _pageWrapXEnabled = false;
+    /**
+     * @name pageWrapXEnabled
+     * @type {boolean}
+     * @default false
+     */
+
+    Object.defineProperty(this, "pageWrapXEnabled", {
+      get: function get() {
+        return _pageWrapXEnabled;
+      },
+      set: function set(value) {
+        _pageWrapXEnabled = Boolean(value);
+      }
+    });
+    var _pageWrapYEnabled = false;
+    /**
+     * @name pageWrapYEnabled
+     * @type {boolean}
+     * @default true
+     */
+
+    Object.defineProperty(this, "pageWrapYEnabled", {
+      get: function get() {
+        return _pageWrapYEnabled;
+      },
+      set: function set(value) {
+        _pageWrapYEnabled = Boolean(value);
+      }
+    });
+    var _posX = 0;
+    /**
+     * @name posX
+     * @type {number}
+     * @default 0
+     */
+
+    Object.defineProperty(this, "posX", {
+      get: function get() {
+        return _posX;
+      },
+      set: function set(value) {
+        if (!isNaN(value)) {
+          _posX = value;
+        }
+      }
+    });
+    var _posY = 0;
+    /**
+     * @name posY
+     * @type {number}
+     * @default 0
+     */
+
+    Object.defineProperty(this, "posY", {
+      get: function get() {
+        return _posY;
+      },
+      set: function set(value) {
+        if (!isNaN(value)) {
+          _posY = value;
+        }
+      }
+    });
+    /**
+     * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.
+     * @name margin
+     * @type {number|number[]}
+     * @default [0, 0, 0, 0]
+     */
+
+    Object.defineProperty(this, "margin", {
+      get: function get() {
+        return _ctx.margin;
+      },
+      set: function set(value) {
+        var margin;
+
+        if (typeof value === "number") {
+          margin = [value, value, value, value];
+        } else {
+          margin = new Array(4);
+          margin[0] = value[0];
+          margin[1] = value.length >= 2 ? value[1] : margin[0];
+          margin[2] = value.length >= 3 ? value[2] : margin[0];
+          margin[3] = value.length >= 4 ? value[3] : margin[1];
+        }
+
+        _ctx.margin = margin;
+      }
+    });
+    var _autoPaging = false;
+    /**
+     * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the
+     * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new
+     * pages if required.
+     *
+     * Context2d supports different modes:
+     * <ul>
+     * <li>
+     *   <code>false</code>: Auto paging is disabled.
+     * </li>
+     * <li>
+     *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly
+     *   slice text in half, making it difficult to read.
+     * </li>
+     * <li>
+     *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting
+     *   mostly of a single column of text.
+     * </li>
+     * </ul>
+     * @name Context2D#autoPaging
+     * @type {boolean|"slice"|"text"}
+     * @default false
+     */
+
+    Object.defineProperty(this, "autoPaging", {
+      get: function get() {
+        return _autoPaging;
+      },
+      set: function set(value) {
+        _autoPaging = value;
+      }
+    });
+    var lastBreak = 0;
+    /**
+     * @name lastBreak
+     * @type {number}
+     * @default 0
+     */
+
+    Object.defineProperty(this, "lastBreak", {
+      get: function get() {
+        return lastBreak;
+      },
+      set: function set(value) {
+        lastBreak = value;
+      }
+    });
+    var pageBreaks = [];
+    /**
+     * Y Position of page breaks.
+     * @name pageBreaks
+     * @type {number}
+     * @default 0
+     */
+
+    Object.defineProperty(this, "pageBreaks", {
+      get: function get() {
+        return pageBreaks;
+      },
+      set: function set(value) {
+        pageBreaks = value;
+      }
+    });
+    /**
+     * @name ctx
+     * @type {object}
+     * @default {}
+     */
+
+    Object.defineProperty(this, "ctx", {
+      get: function get() {
+        return _ctx;
+      },
+      set: function set(value) {
+        if (value instanceof ContextLayer) {
+          _ctx = value;
+        }
+      }
+    });
+    /**
+     * @name path
+     * @type {array}
+     * @default []
+     */
+
+    Object.defineProperty(this, "path", {
+      get: function get() {
+        return _ctx.path;
+      },
+      set: function set(value) {
+        _ctx.path = value;
+      }
+    });
+    /**
+     * @name ctxStack
+     * @type {array}
+     * @default []
+     */
+
+    var _ctxStack = [];
+    Object.defineProperty(this, "ctxStack", {
+      get: function get() {
+        return _ctxStack;
+      },
+      set: function set(value) {
+        _ctxStack = value;
+      }
+    });
+    /**
+     * Sets or returns the color, gradient, or pattern used to fill the drawing
+     *
+     * @name fillStyle
+     * @default #000000
+     * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />
+     * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />
+     * A pattern object to use to fill the drawing (not supported by context2d)
+     */
+
+    Object.defineProperty(this, "fillStyle", {
+      get: function get() {
+        return this.ctx.fillStyle;
+      },
+      set: function set(value) {
+        var rgba;
+        rgba = getRGBA(value);
+        this.ctx.fillStyle = rgba.style;
+        this.ctx.isFillTransparent = rgba.a === 0;
+        this.ctx.fillOpacity = rgba.a;
+        this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, {
+          a: rgba.a
+        });
+        this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, {
+          a: rgba.a
+        });
+      }
+    });
+    /**
+     * Sets or returns the color, gradient, or pattern used for strokes
+     *
+     * @name strokeStyle
+     * @default #000000
+     * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)
+     * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)
+     * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)
+     */
+
+    Object.defineProperty(this, "strokeStyle", {
+      get: function get() {
+        return this.ctx.strokeStyle;
+      },
+      set: function set(value) {
+        var rgba = getRGBA(value);
+        this.ctx.strokeStyle = rgba.style;
+        this.ctx.isStrokeTransparent = rgba.a === 0;
+        this.ctx.strokeOpacity = rgba.a;
+
+        if (rgba.a === 0) {
+          this.pdf.setDrawColor(255, 255, 255);
+        } else if (rgba.a === 1) {
+          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);
+        } else {
+          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);
+        }
+      }
+    });
+    /**
+     * Sets or returns the style of the end caps for a line
+     *
+     * @name lineCap
+     * @default butt
+     * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line <br/>
+     * round A rounded end cap is added to each end of the line<br/>
+     * square A square end cap is added to each end of the line<br/>
+     */
+
+    Object.defineProperty(this, "lineCap", {
+      get: function get() {
+        return this.ctx.lineCap;
+      },
+      set: function set(value) {
+        if (["butt", "round", "square"].indexOf(value) !== -1) {
+          this.ctx.lineCap = value;
+          this.pdf.setLineCap(value);
+        }
+      }
+    });
+    /**
+     * Sets or returns the current line width
+     *
+     * @name lineWidth
+     * @default 1
+     * @property {number} lineWidth The current line width, in pixels
+     */
+
+    Object.defineProperty(this, "lineWidth", {
+      get: function get() {
+        return this.ctx.lineWidth;
+      },
+      set: function set(value) {
+        if (!isNaN(value)) {
+          this.ctx.lineWidth = value;
+          this.pdf.setLineWidth(value);
+        }
+      }
+    });
+    /**
+     * Sets or returns the type of corner created, when two lines meet
+     */
+
+    Object.defineProperty(this, "lineJoin", {
+      get: function get() {
+        return this.ctx.lineJoin;
+      },
+      set: function set(value) {
+        if (["bevel", "round", "miter"].indexOf(value) !== -1) {
+          this.ctx.lineJoin = value;
+          this.pdf.setLineJoin(value);
+        }
+      }
+    });
+    /**
+     * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.
+     *
+     * @name miterLimit
+     * @default 10
+     */
+
+    Object.defineProperty(this, "miterLimit", {
+      get: function get() {
+        return this.ctx.miterLimit;
+      },
+      set: function set(value) {
+        if (!isNaN(value)) {
+          this.ctx.miterLimit = value;
+          this.pdf.setMiterLimit(value);
+        }
+      }
+    });
+    Object.defineProperty(this, "textBaseline", {
+      get: function get() {
+        return this.ctx.textBaseline;
+      },
+      set: function set(value) {
+        this.ctx.textBaseline = value;
+      }
+    });
+    Object.defineProperty(this, "textAlign", {
+      get: function get() {
+        return this.ctx.textAlign;
+      },
+      set: function set(value) {
+        if (["right", "end", "center", "left", "start"].indexOf(value) !== -1) {
+          this.ctx.textAlign = value;
+        }
+      }
+    });
+    var _fontFaceMap = null;
+
+    function getFontFaceMap(pdf, fontFaces) {
+      if (_fontFaceMap === null) {
+        var fontMap = pdf.getFontList();
+        var convertedFontFaces = convertToFontFaces(fontMap);
+        _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));
+      }
+
+      return _fontFaceMap;
+    }
+
+    function convertToFontFaces(fontMap) {
+      var fontFaces = [];
+      Object.keys(fontMap).forEach(function (family) {
+        var styles = fontMap[family];
+        styles.forEach(function (style) {
+          var fontFace = null;
+
+          switch (style) {
+            case "bold":
+              fontFace = {
+                family: family,
+                weight: "bold"
+              };
+              break;
+
+            case "italic":
+              fontFace = {
+                family: family,
+                style: "italic"
+              };
+              break;
+
+            case "bolditalic":
+              fontFace = {
+                family: family,
+                weight: "bold",
+                style: "italic"
+              };
+              break;
+
+            case "":
+            case "normal":
+              fontFace = {
+                family: family
+              };
+              break;
+          } // If font-face is still null here, it is a font with some styling we don't recognize and
+          // cannot map or it is a font added via the fontFaces option of .html().
+
+
+          if (fontFace !== null) {
+            fontFace.ref = {
+              name: family,
+              style: style
+            };
+            fontFaces.push(fontFace);
+          }
+        });
+      });
+      return fontFaces;
+    }
+
+    var _fontFaces = null;
+    /**
+     * A map of available font-faces, as passed in the options of
+     * .html(). If set a limited implementation of the font style matching
+     * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm
+     * will be used. If not set it will fallback to previous behavior.
+     */
+
+    Object.defineProperty(this, "fontFaces", {
+      get: function get() {
+        return _fontFaces;
+      },
+      set: function set(value) {
+        _fontFaceMap = null;
+        _fontFaces = value;
+      }
+    });
+    Object.defineProperty(this, "font", {
+      get: function get() {
+        return this.ctx.font;
+      },
+      set: function set(value) {
+        this.ctx.font = value;
+        var rx, matches; //source: https://stackoverflow.com/a/10136041
+        // eslint-disable-next-line no-useless-escape
+
+        rx = /^\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;
+        matches = rx.exec(value);
+
+        if (matches !== null) {
+          var fontStyle = matches[1];
+          var fontVariant = matches[2];
+          var fontWeight = matches[3];
+          var fontSize = matches[4];
+          var lineHeight = matches[5];
+          var fontFamily = matches[6];
+        } else {
+          return;
+        }
+
+        var rxFontSize = /^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;
+        var fontSizeUnit = rxFontSize.exec(fontSize)[2];
+
+        if ("px" === fontSizeUnit) {
+          fontSize = Math.floor(parseFloat(fontSize) * this.pdf.internal.scaleFactor);
+        } else if ("em" === fontSizeUnit) {
+          fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());
+        } else {
+          fontSize = Math.floor(parseFloat(fontSize) * this.pdf.internal.scaleFactor);
+        }
+
+        this.pdf.setFontSize(fontSize);
+        var parts = parseFontFamily(fontFamily);
+
+        if (this.fontFaces) {
+          var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);
+          var rules = parts.map(function (ff) {
+            return {
+              family: ff,
+              stretch: "normal",
+              // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)
+              weight: fontWeight,
+              style: fontStyle
+            };
+          });
+          var font = resolveFontFace(fontFaceMap, rules);
+          this.pdf.setFont(font.ref.name, font.ref.style);
+          return;
+        }
+
+        var style = "";
+
+        if (fontWeight === "bold" || parseInt(fontWeight, 10) >= 700 || fontStyle === "bold") {
+          style = "bold";
+        }
+
+        if (fontStyle === "italic") {
+          style += "italic";
+        }
+
+        if (style.length === 0) {
+          style = "normal";
+        }
+
+        var jsPdfFontName = "";
+        var fallbackFonts = {
+          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"
+        };
+
+        for (var i = 0; i < parts.length; i++) {
+          if (this.pdf.internal.getFont(parts[i], style, {
+            noFallback: true,
+            disableWarning: true
+          }) !== undefined) {
+            jsPdfFontName = parts[i];
+            break;
+          } else if (style === "bolditalic" && this.pdf.internal.getFont(parts[i], "bold", {
+            noFallback: true,
+            disableWarning: true
+          }) !== undefined) {
+            jsPdfFontName = parts[i];
+            style = "bold";
+          } else if (this.pdf.internal.getFont(parts[i], "normal", {
+            noFallback: true,
+            disableWarning: true
+          }) !== undefined) {
+            jsPdfFontName = parts[i];
+            style = "normal";
+            break;
+          }
+        }
+
+        if (jsPdfFontName === "") {
+          for (var j = 0; j < parts.length; j++) {
+            if (fallbackFonts[parts[j]]) {
+              jsPdfFontName = fallbackFonts[parts[j]];
+              break;
+            }
+          }
+        }
+
+        jsPdfFontName = jsPdfFontName === "" ? "Times" : jsPdfFontName;
+        this.pdf.setFont(jsPdfFontName, style);
+      }
+    });
+    Object.defineProperty(this, "globalCompositeOperation", {
+      get: function get() {
+        return this.ctx.globalCompositeOperation;
+      },
+      set: function set(value) {
+        this.ctx.globalCompositeOperation = value;
+      }
+    });
+    Object.defineProperty(this, "globalAlpha", {
+      get: function get() {
+        return this.ctx.globalAlpha;
+      },
+      set: function set(value) {
+        this.ctx.globalAlpha = value;
+      }
+    });
+    /**
+     * A float specifying the amount of the line dash offset. The default value is 0.0.
+     *
+     * @name lineDashOffset
+     * @default 0.0
+     */
+
+    Object.defineProperty(this, "lineDashOffset", {
+      get: function get() {
+        return this.ctx.lineDashOffset;
+      },
+      set: function set(value) {
+        this.ctx.lineDashOffset = value;
+        setLineDash.call(this);
+      }
+    }); // Not HTML API
+
+    Object.defineProperty(this, "lineDash", {
+      get: function get() {
+        return this.ctx.lineDash;
+      },
+      set: function set(value) {
+        this.ctx.lineDash = value;
+        setLineDash.call(this);
+      }
+    }); // Not HTML API
+
+    Object.defineProperty(this, "ignoreClearRect", {
+      get: function get() {
+        return this.ctx.ignoreClearRect;
+      },
+      set: function set(value) {
+        this.ctx.ignoreClearRect = Boolean(value);
+      }
+    });
+  };
+  /**
+   * Sets the line dash pattern used when stroking lines.
+   * @name setLineDash
+   * @function
+   * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.
+   */
+
+
+  Context2D.prototype.setLineDash = function (dashArray) {
+    this.lineDash = dashArray;
+  };
+  /**
+   * gets the current line dash pattern.
+   * @name getLineDash
+   * @function
+   * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].
+   */
+
+
+  Context2D.prototype.getLineDash = function () {
+    if (this.lineDash.length % 2) {
+      // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value
+      return this.lineDash.concat(this.lineDash);
+    } else {
+      // The copied value is returned to prevent contamination from outside.
+      return this.lineDash.slice();
+    }
+  };
+
+  Context2D.prototype.fill = function () {
+    pathPreProcess.call(this, "fill", false);
+  };
+  /**
+   * Actually draws the path you have defined
+   *
+   * @name stroke
+   * @function
+   * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.
+   */
+
+
+  Context2D.prototype.stroke = function () {
+    pathPreProcess.call(this, "stroke", false);
+  };
+  /**
+   * Begins a path, or resets the current
+   *
+   * @name beginPath
+   * @function
+   * @description The beginPath() method begins a path, or resets the current path.
+   */
+
+
+  Context2D.prototype.beginPath = function () {
+    this.path = [{
+      type: "begin"
+    }];
+  };
+  /**
+   * Moves the path to the specified point in the canvas, without creating a line
+   *
+   * @name moveTo
+   * @function
+   * @param x {Number} The x-coordinate of where to move the path to
+   * @param y {Number} The y-coordinate of where to move the path to
+   */
+
+
+  Context2D.prototype.moveTo = function (x, y) {
+    if (isNaN(x) || isNaN(y)) {
+      console.error("jsPDF.context2d.moveTo: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.moveTo");
+    }
+
+    var pt = this.ctx.transform.applyToPoint(new Point(x, y));
+    this.path.push({
+      type: "mt",
+      x: pt.x,
+      y: pt.y
+    });
+    this.ctx.lastPoint = new Point(x, y);
+  };
+  /**
+   * Creates a path from the current point back to the starting point
+   *
+   * @name closePath
+   * @function
+   * @description The closePath() method creates a path from the current point back to the starting point.
+   */
+
+
+  Context2D.prototype.closePath = function () {
+    var pathBegin = new Point(0, 0);
+    var i = 0;
+
+    for (i = this.path.length - 1; i !== -1; i--) {
+      if (this.path[i].type === "begin") {
+        if (_typeof(this.path[i + 1]) === "object" && typeof this.path[i + 1].x === "number") {
+          pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);
+          break;
+        }
+      }
+    }
+
+    this.path.push({
+      type: "close"
+    });
+    this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);
+  };
+  /**
+   * Adds a new point and creates a line to that point from the last specified point in the canvas
+   *
+   * @name lineTo
+   * @function
+   * @param x The x-coordinate of where to create the line to
+   * @param y The y-coordinate of where to create the line to
+   * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).
+   */
+
+
+  Context2D.prototype.lineTo = function (x, y) {
+    if (isNaN(x) || isNaN(y)) {
+      console.error("jsPDF.context2d.lineTo: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.lineTo");
+    }
+
+    var pt = this.ctx.transform.applyToPoint(new Point(x, y));
+    this.path.push({
+      type: "lt",
+      x: pt.x,
+      y: pt.y
+    });
+    this.ctx.lastPoint = new Point(pt.x, pt.y);
+  };
+  /**
+   * Clips a region of any shape and size from the original canvas
+   *
+   * @name clip
+   * @function
+   * @description The clip() method clips a region of any shape and size from the original canvas.
+   */
+
+
+  Context2D.prototype.clip = function () {
+    this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));
+    pathPreProcess.call(this, null, true);
+  };
+  /**
+   * Creates a cubic Bézier curve
+   *
+   * @name quadraticCurveTo
+   * @function
+   * @param cpx {Number} The x-coordinate of the Bézier control point
+   * @param cpy {Number} The y-coordinate of the Bézier control point
+   * @param x {Number} The x-coordinate of the ending point
+   * @param y {Number} The y-coordinate of the ending point
+   * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.<br /><br /> A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.
+   */
+
+
+  Context2D.prototype.quadraticCurveTo = function (cpx, cpy, x, y) {
+    if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {
+      console.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");
+    }
+
+    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));
+    var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));
+    this.path.push({
+      type: "qct",
+      x1: pt1.x,
+      y1: pt1.y,
+      x: pt0.x,
+      y: pt0.y
+    });
+    this.ctx.lastPoint = new Point(pt0.x, pt0.y);
+  };
+  /**
+   * Creates a cubic Bézier curve
+   *
+   * @name bezierCurveTo
+   * @function
+   * @param cp1x {Number} The x-coordinate of the first Bézier control point
+   * @param cp1y {Number} The y-coordinate of the first Bézier control point
+   * @param cp2x {Number} The x-coordinate of the second Bézier control point
+   * @param cp2y {Number} The y-coordinate of the second Bézier control point
+   * @param x {Number} The x-coordinate of the ending point
+   * @param y {Number} The y-coordinate of the ending point
+   * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve. <br /><br />A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve.  The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.
+   */
+
+
+  Context2D.prototype.bezierCurveTo = function (cp1x, cp1y, cp2x, cp2y, x, y) {
+    if (isNaN(x) || isNaN(y) || isNaN(cp1x) || isNaN(cp1y) || isNaN(cp2x) || isNaN(cp2y)) {
+      console.error("jsPDF.context2d.bezierCurveTo: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");
+    }
+
+    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));
+    var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));
+    var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));
+    this.path.push({
+      type: "bct",
+      x1: pt1.x,
+      y1: pt1.y,
+      x2: pt2.x,
+      y2: pt2.y,
+      x: pt0.x,
+      y: pt0.y
+    });
+    this.ctx.lastPoint = new Point(pt0.x, pt0.y);
+  };
+  /**
+   * Creates an arc/curve (used to create circles, or parts of circles)
+   *
+   * @name arc
+   * @function
+   * @param x {Number} The x-coordinate of the center of the circle
+   * @param y {Number} The y-coordinate of the center of the circle
+   * @param radius {Number} The radius of the circle
+   * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)
+   * @param endAngle {Number} The ending angle, in radians
+   * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.
+   * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).
+   */
+
+
+  Context2D.prototype.arc = function (x, y, radius, startAngle, endAngle, counterclockwise) {
+    if (isNaN(x) || isNaN(y) || isNaN(radius) || isNaN(startAngle) || isNaN(endAngle)) {
+      console.error("jsPDF.context2d.arc: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.arc");
+    }
+
+    counterclockwise = Boolean(counterclockwise);
+
+    if (!this.ctx.transform.isIdentity) {
+      var xpt = this.ctx.transform.applyToPoint(new Point(x, y));
+      x = xpt.x;
+      y = xpt.y;
+      var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));
+      var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));
+      radius = Math.sqrt(Math.pow(x_radPt.x - x_radPt0.x, 2) + Math.pow(x_radPt.y - x_radPt0.y, 2));
+    }
+
+    if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {
+      startAngle = 0;
+      endAngle = 2 * Math.PI;
+    }
+
+    this.path.push({
+      type: "arc",
+      x: x,
+      y: y,
+      radius: radius,
+      startAngle: startAngle,
+      endAngle: endAngle,
+      counterclockwise: counterclockwise
+    }); // this.ctx.lastPoint(new Point(pt.x,pt.y));
+  };
+  /**
+   * Creates an arc/curve between two tangents
+   *
+   * @name arcTo
+   * @function
+   * @param x1 {Number} The x-coordinate of the first tangent
+   * @param y1 {Number} The y-coordinate of the first tangent
+   * @param x2 {Number} The x-coordinate of the second tangent
+   * @param y2 {Number} The y-coordinate of the second tangent
+   * @param radius The radius of the arc
+   * @description The arcTo() method creates an arc/curve between two tangents on the canvas.
+   */
+  // eslint-disable-next-line no-unused-vars
+
+
+  Context2D.prototype.arcTo = function (x1, y1, x2, y2, radius) {
+    throw new Error("arcTo not implemented.");
+  };
+  /**
+   * Creates a rectangle
+   *
+   * @name rect
+   * @function
+   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+   * @param w {Number} The width of the rectangle, in pixels
+   * @param h {Number} The height of the rectangle, in pixels
+   * @description The rect() method creates a rectangle.
+   */
+
+
+  Context2D.prototype.rect = function (x, y, w, h) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+      console.error("jsPDF.context2d.rect: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.rect");
+    }
+
+    this.moveTo(x, y);
+    this.lineTo(x + w, y);
+    this.lineTo(x + w, y + h);
+    this.lineTo(x, y + h);
+    this.lineTo(x, y);
+    this.lineTo(x + w, y);
+    this.lineTo(x, y);
+  };
+  /**
+   * Draws a "filled" rectangle
+   *
+   * @name fillRect
+   * @function
+   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+   * @param w {Number} The width of the rectangle, in pixels
+   * @param h {Number} The height of the rectangle, in pixels
+   * @description The fillRect() method draws a "filled" rectangle. The default color of the fill is black.
+   */
+
+
+  Context2D.prototype.fillRect = function (x, y, w, h) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+      console.error("jsPDF.context2d.fillRect: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.fillRect");
+    }
+
+    if (isFillTransparent.call(this)) {
+      return;
+    }
+
+    var tmp = {};
+
+    if (this.lineCap !== "butt") {
+      tmp.lineCap = this.lineCap;
+      this.lineCap = "butt";
+    }
+
+    if (this.lineJoin !== "miter") {
+      tmp.lineJoin = this.lineJoin;
+      this.lineJoin = "miter";
+    }
+
+    this.beginPath();
+    this.rect(x, y, w, h);
+    this.fill();
+
+    if (tmp.hasOwnProperty("lineCap")) {
+      this.lineCap = tmp.lineCap;
+    }
+
+    if (tmp.hasOwnProperty("lineJoin")) {
+      this.lineJoin = tmp.lineJoin;
+    }
+  };
+  /**
+   *     Draws a rectangle (no fill)
+   *
+   * @name strokeRect
+   * @function
+   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+   * @param w {Number} The width of the rectangle, in pixels
+   * @param h {Number} The height of the rectangle, in pixels
+   * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.
+   */
+
+
+  Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+      console.error("jsPDF.context2d.strokeRect: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");
+    }
+
+    if (isStrokeTransparent.call(this)) {
+      return;
+    }
+
+    this.beginPath();
+    this.rect(x, y, w, h);
+    this.stroke();
+  };
+  /**
+   * Clears the specified pixels within a given rectangle
+   *
+   * @name clearRect
+   * @function
+   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+   * @param w {Number} The width of the rectangle to clear, in pixels
+   * @param h {Number} The height of the rectangle to clear, in pixels
+   * @description We cannot clear PDF commands that were already written to PDF, so we use white instead. <br />
+   * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.
+   * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.
+   * This flag is stored in the save/restore context and is managed the same way as other drawing states.
+   *
+   */
+
+
+  Context2D.prototype.clearRect = function (x, y, w, h) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+      console.error("jsPDF.context2d.clearRect: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.clearRect");
+    }
+
+    if (this.ignoreClearRect) {
+      return;
+    }
+
+    this.fillStyle = "#ffffff";
+    this.fillRect(x, y, w, h);
+  };
+  /**
+   * Saves the state of the current context
+   *
+   * @name save
+   * @function
+   */
+
+
+  Context2D.prototype.save = function (doStackPush) {
+    doStackPush = typeof doStackPush === "boolean" ? doStackPush : true;
+    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;
+
+    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {
+      this.pdf.setPage(i + 1);
+      this.pdf.internal.out("q");
+    }
+
+    this.pdf.setPage(tmpPageNumber);
+
+    if (doStackPush) {
+      this.ctx.fontSize = this.pdf.internal.getFontSize();
+      var ctx = new ContextLayer(this.ctx);
+      this.ctxStack.push(this.ctx);
+      this.ctx = ctx;
+    }
+  };
+  /**
+   * Returns previously saved path state and attributes
+   *
+   * @name restore
+   * @function
+   */
+
+
+  Context2D.prototype.restore = function (doStackPop) {
+    doStackPop = typeof doStackPop === "boolean" ? doStackPop : true;
+    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;
+
+    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {
+      this.pdf.setPage(i + 1);
+      this.pdf.internal.out("Q");
+    }
+
+    this.pdf.setPage(tmpPageNumber);
+
+    if (doStackPop && this.ctxStack.length !== 0) {
+      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;
+    }
+  };
+  /**
+   * @name toDataURL
+   * @function
+   */
+
+
+  Context2D.prototype.toDataURL = function () {
+    throw new Error("toDataUrl not implemented.");
+  }; //helper functions
+
+  /**
+   * Get the decimal values of r, g, b and a
+   *
+   * @name getRGBA
+   * @function
+   * @private
+   * @ignore
+   */
+
+
+  var getRGBA = function getRGBA(style) {
+    var rxRgb = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/;
+    var rxRgba = /rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/;
+    var rxTransparent = /transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/;
+    var r, g, b, a;
+
+    if (style.isCanvasGradient === true) {
+      style = style.getColor();
+    }
+
+    if (!style) {
+      return {
+        r: 0,
+        g: 0,
+        b: 0,
+        a: 0,
+        style: style
+      };
+    }
+
+    if (rxTransparent.test(style)) {
+      r = 0;
+      g = 0;
+      b = 0;
+      a = 0;
+    } else {
+      var matches = rxRgb.exec(style);
+
+      if (matches !== null) {
+        r = parseInt(matches[1]);
+        g = parseInt(matches[2]);
+        b = parseInt(matches[3]);
+        a = 1;
+      } else {
+        matches = rxRgba.exec(style);
+
+        if (matches !== null) {
+          r = parseInt(matches[1]);
+          g = parseInt(matches[2]);
+          b = parseInt(matches[3]);
+          a = parseFloat(matches[4]);
+        } else {
+          a = 1;
+
+          if (typeof style === "string" && style.charAt(0) !== "#") {
+            var rgbColor = new RGBColor(style);
+
+            if (rgbColor.ok) {
+              style = rgbColor.toHex();
+            } else {
+              style = "#000000";
+            }
+          }
+
+          if (style.length === 4) {
+            r = style.substring(1, 2);
+            r += r;
+            g = style.substring(2, 3);
+            g += g;
+            b = style.substring(3, 4);
+            b += b;
+          } else {
+            r = style.substring(1, 3);
+            g = style.substring(3, 5);
+            b = style.substring(5, 7);
+          }
+
+          r = parseInt(r, 16);
+          g = parseInt(g, 16);
+          b = parseInt(b, 16);
+        }
+      }
+    }
+
+    return {
+      r: r,
+      g: g,
+      b: b,
+      a: a,
+      style: style
+    };
+  };
+  /**
+   * @name isFillTransparent
+   * @function
+   * @private
+   * @ignore
+   * @returns {Boolean}
+   */
+
+
+  var isFillTransparent = function isFillTransparent() {
+    return this.ctx.isFillTransparent || this.globalAlpha == 0;
+  };
+  /**
+   * @name isStrokeTransparent
+   * @function
+   * @private
+   * @ignore
+   * @returns {Boolean}
+   */
+
+
+  var isStrokeTransparent = function isStrokeTransparent() {
+    return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);
+  };
+  /**
+   * Draws "filled" text on the canvas
+   *
+   * @name fillText
+   * @function
+   * @param text {String} Specifies the text that will be written on the canvas
+   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)
+   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
+   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
+   * @description The fillText() method draws filled text on the canvas. The default color of the text is black.
+   */
+
+
+  Context2D.prototype.fillText = function (text, x, y, maxWidth) {
+    if (isNaN(x) || isNaN(y) || typeof text !== "string") {
+      console.error("jsPDF.context2d.fillText: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.fillText");
+    }
+
+    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;
+
+    if (isFillTransparent.call(this)) {
+      return;
+    }
+
+    var degs = rad2deg(this.ctx.transform.rotation); // We only use X axis as scale hint
+
+    var scale = this.ctx.transform.scaleX;
+    putText.call(this, {
+      text: text,
+      x: x,
+      y: y,
+      scale: scale,
+      angle: degs,
+      align: this.textAlign,
+      maxWidth: maxWidth
+    });
+  };
+  /**
+   * Draws text on the canvas (no fill)
+   *
+   * @name strokeText
+   * @function
+   * @param text {String} Specifies the text that will be written on the canvas
+   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)
+   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
+   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
+   * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.
+   */
+
+
+  Context2D.prototype.strokeText = function (text, x, y, maxWidth) {
+    if (isNaN(x) || isNaN(y) || typeof text !== "string") {
+      console.error("jsPDF.context2d.strokeText: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.strokeText");
+    }
+
+    if (isStrokeTransparent.call(this)) {
+      return;
+    }
+
+    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;
+    var degs = rad2deg(this.ctx.transform.rotation);
+    var scale = this.ctx.transform.scaleX;
+    putText.call(this, {
+      text: text,
+      x: x,
+      y: y,
+      scale: scale,
+      renderingMode: "stroke",
+      angle: degs,
+      align: this.textAlign,
+      maxWidth: maxWidth
+    });
+  };
+  /**
+   * Returns an object that contains the width of the specified text
+   *
+   * @name measureText
+   * @function
+   * @param text {String} The text to be measured
+   * @description The measureText() method returns an object that contains the width of the specified text, in pixels.
+   * @returns {Number}
+   */
+
+
+  Context2D.prototype.measureText = function (text) {
+    if (typeof text !== "string") {
+      console.error("jsPDF.context2d.measureText: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.measureText");
+    }
+
+    var pdf = this.pdf;
+    var k = this.pdf.internal.scaleFactor;
+    var fontSize = pdf.internal.getFontSize();
+    var txtWidth = pdf.getStringUnitWidth(text) * fontSize / pdf.internal.scaleFactor;
+    txtWidth *= Math.round(k * 96 / 72 * 10000) / 10000;
+
+    var TextMetrics = function TextMetrics(options) {
+      options = options || {};
+
+      var _width = options.width || 0;
+
+      Object.defineProperty(this, "width", {
+        get: function get() {
+          return _width;
+        }
+      });
+      return this;
+    };
+
+    return new TextMetrics({
+      width: txtWidth
+    });
+  }; //Transformations
+
+  /**
+   * Scales the current drawing bigger or smaller
+   *
+   * @name scale
+   * @function
+   * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)
+   * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)
+   * @description The scale() method scales the current drawing, bigger or smaller.
+   */
+
+
+  Context2D.prototype.scale = function (scalewidth, scaleheight) {
+    if (isNaN(scalewidth) || isNaN(scaleheight)) {
+      console.error("jsPDF.context2d.scale: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.scale");
+    }
+
+    var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);
+    this.ctx.transform = this.ctx.transform.multiply(matrix);
+  };
+  /**
+   * Rotates the current drawing
+   *
+   * @name rotate
+   * @function
+   * @param angle {Number} The rotation angle, in radians.
+   * @description To calculate from degrees to radians: degrees*Math.PI/180. <br />
+   * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180
+   */
+
+
+  Context2D.prototype.rotate = function (angle) {
+    if (isNaN(angle)) {
+      console.error("jsPDF.context2d.rotate: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.rotate");
+    }
+
+    var matrix = new Matrix(Math.cos(angle), Math.sin(angle), -Math.sin(angle), Math.cos(angle), 0.0, 0.0);
+    this.ctx.transform = this.ctx.transform.multiply(matrix);
+  };
+  /**
+   * Remaps the (0,0) position on the canvas
+   *
+   * @name translate
+   * @function
+   * @param x {Number} The value to add to horizontal (x) coordinates
+   * @param y {Number} The value to add to vertical (y) coordinates
+   * @description The translate() method remaps the (0,0) position on the canvas.
+   */
+
+
+  Context2D.prototype.translate = function (x, y) {
+    if (isNaN(x) || isNaN(y)) {
+      console.error("jsPDF.context2d.translate: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.translate");
+    }
+
+    var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);
+    this.ctx.transform = this.ctx.transform.multiply(matrix);
+  };
+  /**
+   * Replaces the current transformation matrix for the drawing
+   *
+   * @name transform
+   * @function
+   * @param a {Number} Horizontal scaling
+   * @param b {Number} Horizontal skewing
+   * @param c {Number} Vertical skewing
+   * @param d {Number} Vertical scaling
+   * @param e {Number} Horizontal moving
+   * @param f {Number} Vertical moving
+   * @description Each object on the canvas has a current transformation matrix.<br /><br />The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:<br /><br /><br /><br />a    c    e<br /><br />b    d    f<br /><br />0    0    1<br /><br />In other words, the transform() method lets you scale, rotate, move, and skew the current context.
+   */
+
+
+  Context2D.prototype.transform = function (a, b, c, d, e, f) {
+    if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {
+      console.error("jsPDF.context2d.transform: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.transform");
+    }
+
+    var matrix = new Matrix(a, b, c, d, e, f);
+    this.ctx.transform = this.ctx.transform.multiply(matrix);
+  };
+  /**
+   * Resets the current transform to the identity matrix. Then runs transform()
+   *
+   * @name setTransform
+   * @function
+   * @param a {Number} Horizontal scaling
+   * @param b {Number} Horizontal skewing
+   * @param c {Number} Vertical skewing
+   * @param d {Number} Vertical scaling
+   * @param e {Number} Horizontal moving
+   * @param f {Number} Vertical moving
+   * @description Each object on the canvas has a current transformation matrix. <br /><br />The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.<br /><br />In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.
+   */
+
+
+  Context2D.prototype.setTransform = function (a, b, c, d, e, f) {
+    a = isNaN(a) ? 1 : a;
+    b = isNaN(b) ? 0 : b;
+    c = isNaN(c) ? 0 : c;
+    d = isNaN(d) ? 1 : d;
+    e = isNaN(e) ? 0 : e;
+    f = isNaN(f) ? 0 : f;
+    this.ctx.transform = new Matrix(a, b, c, d, e, f);
+  };
+
+  var hasMargins = function hasMargins() {
+    return this.margin[0] > 0 || this.margin[1] > 0 || this.margin[2] > 0 || this.margin[3] > 0;
+  };
+  /**
+   * Draws an image, canvas, or video onto the canvas
+   *
+   * @function
+   * @param img {} Specifies the image, canvas, or video element to use
+   * @param sx {Number} Optional. The x coordinate where to start clipping
+   * @param sy {Number} Optional. The y coordinate where to start clipping
+   * @param swidth {Number} Optional. The width of the clipped image
+   * @param sheight {Number} Optional. The height of the clipped image
+   * @param x {Number} The x coordinate where to place the image on the canvas
+   * @param y {Number} The y coordinate where to place the image on the canvas
+   * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)
+   * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
+   */
+
+
+  Context2D.prototype.drawImage = function (img, sx, sy, swidth, sheight, x, y, width, height) {
+    var imageProperties = this.pdf.getImageProperties(img);
+    var factorX = 1;
+    var factorY = 1;
+    var clipFactorX = 1;
+    var clipFactorY = 1;
+
+    if (typeof swidth !== "undefined" && typeof width !== "undefined") {
+      clipFactorX = width / swidth;
+      clipFactorY = height / sheight;
+      factorX = imageProperties.width / swidth * width / swidth;
+      factorY = imageProperties.height / sheight * height / sheight;
+    } //is sx and sy are set and x and y not, set x and y with values of sx and sy
+
+
+    if (typeof x === "undefined") {
+      x = sx;
+      y = sy;
+      sx = 0;
+      sy = 0;
+    }
+
+    if (typeof swidth !== "undefined" && typeof width === "undefined") {
+      width = swidth;
+      height = sheight;
+    }
+
+    if (typeof swidth === "undefined" && typeof width === "undefined") {
+      width = imageProperties.width;
+      height = imageProperties.height;
+    }
+
+    var decomposedTransformationMatrix = this.ctx.transform.decompose();
+    var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);
+    var matrix = new Matrix();
+    matrix = matrix.multiply(decomposedTransformationMatrix.translate);
+    matrix = matrix.multiply(decomposedTransformationMatrix.skew);
+    matrix = matrix.multiply(decomposedTransformationMatrix.scale);
+    var xRect = matrix.applyToRectangle(new Rectangle(x - sx * clipFactorX, y - sy * clipFactorY, swidth * factorX, sheight * factorY));
+    var pageArray = getPagesByPath.call(this, xRect);
+    var pages = [];
+
+    for (var ii = 0; ii < pageArray.length; ii += 1) {
+      if (pages.indexOf(pageArray[ii]) === -1) {
+        pages.push(pageArray[ii]);
+      }
+    }
+
+    sortPages(pages);
+    var clipPath;
+
+    if (this.autoPaging) {
+      var min = pages[0];
+      var max = pages[pages.length - 1];
+
+      for (var i = min; i < max + 1; i++) {
+        this.pdf.setPage(i);
+        var pageWidthMinusMargins = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];
+        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];
+        var firstPageHeight = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2];
+        var pageHeightMinusMargins = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
+        var previousPageHeightSum = i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;
+
+        if (this.ctx.clip_path.length !== 0) {
+          var tmpPaths = this.path;
+          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));
+          this.path = pathPositionRedo(clipPath, this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset);
+          drawPaths.call(this, "fill", true);
+          this.path = tmpPaths;
+        }
+
+        var tmpRect = JSON.parse(JSON.stringify(xRect));
+        tmpRect = pathPositionRedo([tmpRect], this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset)[0];
+        var needsClipping = (i > min || i < max) && hasMargins.call(this);
+
+        if (needsClipping) {
+          this.pdf.saveGraphicsState();
+          this.pdf.rect(this.margin[3], this.margin[0], pageWidthMinusMargins, pageHeightMinusMargins, null).clip().discardPath();
+        }
+
+        this.pdf.addImage(img, "JPEG", tmpRect.x, tmpRect.y, tmpRect.w, tmpRect.h, null, null, angle);
+
+        if (needsClipping) {
+          this.pdf.restoreGraphicsState();
+        }
+      }
+    } else {
+      this.pdf.addImage(img, "JPEG", xRect.x, xRect.y, xRect.w, xRect.h, null, null, angle);
+    }
+  };
+
+  var getPagesByPath = function getPagesByPath(path, pageWrapX, pageWrapY) {
+    var result = [];
+    pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;
+    pageWrapY = pageWrapY || this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
+    var yOffset = this.posY + this.ctx.prevPageLastElemOffset;
+
+    switch (path.type) {
+      default:
+      case "mt":
+      case "lt":
+        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);
+        break;
+
+      case "arc":
+        result.push(Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1);
+        result.push(Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1);
+        break;
+
+      case "qct":
+        var rectOfQuadraticCurve = getQuadraticCurveBoundary(this.ctx.lastPoint.x, this.ctx.lastPoint.y, path.x1, path.y1, path.x, path.y);
+        result.push(Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1);
+        result.push(Math.floor((rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) / pageWrapY) + 1);
+        break;
+
+      case "bct":
+        var rectOfBezierCurve = getBezierCurveBoundary(this.ctx.lastPoint.x, this.ctx.lastPoint.y, path.x1, path.y1, path.x2, path.y2, path.x, path.y);
+        result.push(Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1);
+        result.push(Math.floor((rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY) + 1);
+        break;
+
+      case "rect":
+        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);
+        result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);
+    }
+
+    for (var i = 0; i < result.length; i += 1) {
+      while (this.pdf.internal.getNumberOfPages() < result[i]) {
+        addPage.call(this);
+      }
+    }
+
+    return result;
+  };
+
+  var addPage = function addPage() {
+    var fillStyle = this.fillStyle;
+    var strokeStyle = this.strokeStyle;
+    var font = this.font;
+    var lineCap = this.lineCap;
+    var lineWidth = this.lineWidth;
+    var lineJoin = this.lineJoin;
+    this.pdf.addPage();
+    this.fillStyle = fillStyle;
+    this.strokeStyle = strokeStyle;
+    this.font = font;
+    this.lineCap = lineCap;
+    this.lineWidth = lineWidth;
+    this.lineJoin = lineJoin;
+  };
+
+  var pathPositionRedo = function pathPositionRedo(paths, x, y) {
+    for (var i = 0; i < paths.length; i++) {
+      switch (paths[i].type) {
+        case "bct":
+          paths[i].x2 += x;
+          paths[i].y2 += y;
+
+        case "qct":
+          paths[i].x1 += x;
+          paths[i].y1 += y;
+
+        case "mt":
+        case "lt":
+        case "arc":
+        default:
+          paths[i].x += x;
+          paths[i].y += y;
+      }
+    }
+
+    return paths;
+  };
+
+  var sortPages = function sortPages(pages) {
+    return pages.sort(function (a, b) {
+      return a - b;
+    });
+  };
+
+  var pathPreProcess = function pathPreProcess(rule, isClip) {
+    var fillStyle = this.fillStyle;
+    var strokeStyle = this.strokeStyle;
+    var lineCap = this.lineCap;
+    var oldLineWidth = this.lineWidth;
+    var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);
+    var lineJoin = this.lineJoin;
+    var origPath = JSON.parse(JSON.stringify(this.path));
+    var xPath = JSON.parse(JSON.stringify(this.path));
+    var clipPath;
+    var tmpPath;
+    var pages = [];
+
+    for (var i = 0; i < xPath.length; i++) {
+      if (typeof xPath[i].x !== "undefined") {
+        var page = getPagesByPath.call(this, xPath[i]);
+
+        for (var ii = 0; ii < page.length; ii += 1) {
+          if (pages.indexOf(page[ii]) === -1) {
+            pages.push(page[ii]);
+          }
+        }
+      }
+    }
+
+    for (var j = 0; j < pages.length; j++) {
+      while (this.pdf.internal.getNumberOfPages() < pages[j]) {
+        addPage.call(this);
+      }
+    }
+
+    sortPages(pages);
+
+    if (this.autoPaging) {
+      var min = pages[0];
+      var max = pages[pages.length - 1];
+
+      for (var k = min; k < max + 1; k++) {
+        this.pdf.setPage(k);
+        this.fillStyle = fillStyle;
+        this.strokeStyle = strokeStyle;
+        this.lineCap = lineCap;
+        this.lineWidth = lineWidth;
+        this.lineJoin = lineJoin;
+        var pageWidthMinusMargins = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];
+        var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];
+        var firstPageHeight = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2];
+        var pageHeightMinusMargins = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
+        var previousPageHeightSum = k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;
+
+        if (this.ctx.clip_path.length !== 0) {
+          var tmpPaths = this.path;
+          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));
+          this.path = pathPositionRedo(clipPath, this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset);
+          drawPaths.call(this, rule, true);
+          this.path = tmpPaths;
+        }
+
+        tmpPath = JSON.parse(JSON.stringify(origPath));
+        this.path = pathPositionRedo(tmpPath, this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset);
+
+        if (isClip === false || k === 0) {
+          var needsClipping = (k > min || k < max) && hasMargins.call(this);
+
+          if (needsClipping) {
+            this.pdf.saveGraphicsState();
+            this.pdf.rect(this.margin[3], this.margin[0], pageWidthMinusMargins, pageHeightMinusMargins, null).clip().discardPath();
+          }
+
+          drawPaths.call(this, rule, isClip);
+
+          if (needsClipping) {
+            this.pdf.restoreGraphicsState();
+          }
+        }
+
+        this.lineWidth = oldLineWidth;
+      }
+    } else {
+      this.lineWidth = lineWidth;
+      drawPaths.call(this, rule, isClip);
+      this.lineWidth = oldLineWidth;
+    }
+
+    this.path = origPath;
+  };
+  /**
+   * Processes the paths
+   *
+   * @function
+   * @param rule {String}
+   * @param isClip {Boolean}
+   * @private
+   * @ignore
+   */
+
+
+  var drawPaths = function drawPaths(rule, isClip) {
+    if (rule === "stroke" && !isClip && isStrokeTransparent.call(this)) {
+      return;
+    }
+
+    if (rule !== "stroke" && !isClip && isFillTransparent.call(this)) {
+      return;
+    }
+
+    var moves = []; //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;
+
+    var delta;
+    var xPath = this.path;
+
+    for (var i = 0; i < xPath.length; i++) {
+      var pt = xPath[i];
+
+      switch (pt.type) {
+        case "begin":
+          moves.push({
+            begin: true
+          });
+          break;
+
+        case "close":
+          moves.push({
+            close: true
+          });
+          break;
+
+        case "mt":
+          moves.push({
+            start: pt,
+            deltas: [],
+            abs: []
+          });
+          break;
+
+        case "lt":
+          var iii = moves.length;
+
+          if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {
+            delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];
+
+            if (iii > 0) {
+              for (iii; iii >= 0; iii--) {
+                if (moves[iii - 1].close !== true && moves[iii - 1].begin !== true) {
+                  moves[iii - 1].deltas.push(delta);
+                  moves[iii - 1].abs.push(pt);
+                  break;
+                }
+              }
+            }
+          }
+
+          break;
+
+        case "bct":
+          delta = [pt.x1 - xPath[i - 1].x, pt.y1 - xPath[i - 1].y, pt.x2 - xPath[i - 1].x, pt.y2 - xPath[i - 1].y, pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];
+          moves[moves.length - 1].deltas.push(delta);
+          break;
+
+        case "qct":
+          var x1 = xPath[i - 1].x + 2.0 / 3.0 * (pt.x1 - xPath[i - 1].x);
+          var y1 = xPath[i - 1].y + 2.0 / 3.0 * (pt.y1 - xPath[i - 1].y);
+          var x2 = pt.x + 2.0 / 3.0 * (pt.x1 - pt.x);
+          var y2 = pt.y + 2.0 / 3.0 * (pt.y1 - pt.y);
+          var x3 = pt.x;
+          var y3 = pt.y;
+          delta = [x1 - xPath[i - 1].x, y1 - xPath[i - 1].y, x2 - xPath[i - 1].x, y2 - xPath[i - 1].y, x3 - xPath[i - 1].x, y3 - xPath[i - 1].y];
+          moves[moves.length - 1].deltas.push(delta);
+          break;
+
+        case "arc":
+          moves.push({
+            deltas: [],
+            abs: [],
+            arc: true
+          });
+
+          if (Array.isArray(moves[moves.length - 1].abs)) {
+            moves[moves.length - 1].abs.push(pt);
+          }
+
+          break;
+      }
+    }
+
+    var style;
+
+    if (!isClip) {
+      if (rule === "stroke") {
+        style = "stroke";
+      } else {
+        style = "fill";
+      }
+    } else {
+      style = null;
+    }
+
+    var began = false;
+
+    for (var k = 0; k < moves.length; k++) {
+      if (moves[k].arc) {
+        var arcs = moves[k].abs;
+
+        for (var ii = 0; ii < arcs.length; ii++) {
+          var arc = arcs[ii];
+
+          if (arc.type === "arc") {
+            drawArc.call(this, arc.x, arc.y, arc.radius, arc.startAngle, arc.endAngle, arc.counterclockwise, undefined, isClip, !began);
+          } else {
+            drawLine.call(this, arc.x, arc.y);
+          }
+
+          began = true;
+        }
+      } else if (moves[k].close === true) {
+        this.pdf.internal.out("h");
+        began = false;
+      } else if (moves[k].begin !== true) {
+        var x = moves[k].start.x;
+        var y = moves[k].start.y;
+        drawLines.call(this, moves[k].deltas, x, y);
+        began = true;
+      }
+    }
+
+    if (style) {
+      putStyle.call(this, style);
+    }
+
+    if (isClip) {
+      doClip.call(this);
+    }
+  };
+
+  var getBaseline = function getBaseline(y) {
+    var height = this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;
+    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);
+
+    switch (this.ctx.textBaseline) {
+      case "bottom":
+        return y - descent;
+
+      case "top":
+        return y + height - descent;
+
+      case "hanging":
+        return y + height - 2 * descent;
+
+      case "middle":
+        return y + height / 2 - descent;
+
+      case "ideographic":
+        // TODO not implemented
+        return y;
+
+      case "alphabetic":
+      default:
+        return y;
+    }
+  };
+
+  var getTextBottom = function getTextBottom(yBaseLine) {
+    var height = this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;
+    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);
+    return yBaseLine + descent;
+  };
+
+  Context2D.prototype.createLinearGradient = function createLinearGradient() {
+    var canvasGradient = function canvasGradient() {};
+
+    canvasGradient.colorStops = [];
+
+    canvasGradient.addColorStop = function (offset, color) {
+      this.colorStops.push([offset, color]);
+    };
+
+    canvasGradient.getColor = function () {
+      if (this.colorStops.length === 0) {
+        return "#000000";
+      }
+
+      return this.colorStops[0][1];
+    };
+
+    canvasGradient.isCanvasGradient = true;
+    return canvasGradient;
+  };
+
+  Context2D.prototype.createPattern = function createPattern() {
+    return this.createLinearGradient();
+  };
+
+  Context2D.prototype.createRadialGradient = function createRadialGradient() {
+    return this.createLinearGradient();
+  };
+  /**
+   *
+   * @param x Edge point X
+   * @param y Edge point Y
+   * @param r Radius
+   * @param a1 start angle
+   * @param a2 end angle
+   * @param counterclockwise
+   * @param style
+   * @param isClip
+   */
+
+
+  var drawArc = function drawArc(x, y, r, a1, a2, counterclockwise, style, isClip, includeMove) {
+    // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html
+    var curves = createArc.call(this, r, a1, a2, counterclockwise);
+
+    for (var i = 0; i < curves.length; i++) {
+      var curve = curves[i];
+
+      if (i === 0) {
+        if (includeMove) {
+          doMove.call(this, curve.x1 + x, curve.y1 + y);
+        } else {
+          drawLine.call(this, curve.x1 + x, curve.y1 + y);
+        }
+      }
+
+      drawCurve.call(this, x, y, curve.x2, curve.y2, curve.x3, curve.y3, curve.x4, curve.y4);
+    }
+
+    if (!isClip) {
+      putStyle.call(this, style);
+    } else {
+      doClip.call(this);
+    }
+  };
+
+  var putStyle = function putStyle(style) {
+    switch (style) {
+      case "stroke":
+        this.pdf.internal.out("S");
+        break;
+
+      case "fill":
+        this.pdf.internal.out("f");
+        break;
+    }
+  };
+
+  var doClip = function doClip() {
+    this.pdf.clip();
+    this.pdf.discardPath();
+  };
+
+  var doMove = function doMove(x, y) {
+    this.pdf.internal.out(getHorizontalCoordinateString(x) + " " + getVerticalCoordinateString(y) + " m");
+  };
+
+  var putText = function putText(options) {
+    var textAlign;
+
+    switch (options.align) {
+      case "right":
+      case "end":
+        textAlign = "right";
+        break;
+
+      case "center":
+        textAlign = "center";
+        break;
+
+      case "left":
+      case "start":
+      default:
+        textAlign = "left";
+        break;
+    }
+
+    var textDimensions = this.pdf.getTextDimensions(options.text);
+    var yBaseLine = getBaseline.call(this, options.y);
+    var yBottom = getTextBottom.call(this, yBaseLine);
+    var yTop = yBottom - textDimensions.h;
+    var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));
+    var decomposedTransformationMatrix = this.ctx.transform.decompose();
+    var matrix = new Matrix();
+    matrix = matrix.multiply(decomposedTransformationMatrix.translate);
+    matrix = matrix.multiply(decomposedTransformationMatrix.skew);
+    matrix = matrix.multiply(decomposedTransformationMatrix.scale);
+    var baselineRect = this.ctx.transform.applyToRectangle(new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h));
+    var textBounds = matrix.applyToRectangle(new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h));
+    var pageArray = getPagesByPath.call(this, textBounds);
+    var pages = [];
+
+    for (var ii = 0; ii < pageArray.length; ii += 1) {
+      if (pages.indexOf(pageArray[ii]) === -1) {
+        pages.push(pageArray[ii]);
+      }
+    }
+
+    sortPages(pages);
+    var clipPath, oldSize, oldLineWidth;
+
+    if (this.autoPaging) {
+      var min = pages[0];
+      var max = pages[pages.length - 1];
+
+      for (var i = min; i < max + 1; i++) {
+        this.pdf.setPage(i);
+        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];
+        var firstPageHeight = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2];
+        var pageHeightMinusBottomMargin = this.pdf.internal.pageSize.height - this.margin[2];
+        var pageHeightMinusMargins = pageHeightMinusBottomMargin - this.margin[0];
+        var pageWidthMinusRightMargin = this.pdf.internal.pageSize.width - this.margin[1];
+        var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];
+        var previousPageHeightSum = i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;
+
+        if (this.ctx.clip_path.length !== 0) {
+          var tmpPaths = this.path;
+          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));
+          this.path = pathPositionRedo(clipPath, this.posX + this.margin[3], -1 * previousPageHeightSum + topMargin);
+          drawPaths.call(this, "fill", true);
+          this.path = tmpPaths;
+        }
+
+        var textBoundsOnPage = pathPositionRedo([JSON.parse(JSON.stringify(textBounds))], this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset)[0];
+
+        if (options.scale >= 0.01) {
+          oldSize = this.pdf.internal.getFontSize();
+          this.pdf.setFontSize(oldSize * options.scale);
+          oldLineWidth = this.lineWidth;
+          this.lineWidth = oldLineWidth * options.scale;
+        }
+
+        var doSlice = this.autoPaging !== "text";
+
+        if (doSlice || textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin) {
+          if (doSlice || textBoundsOnPage.y >= topMargin && textBoundsOnPage.x <= pageWidthMinusRightMargin) {
+            var croppedText = doSlice ? options.text : this.pdf.splitTextToSize(options.text, options.maxWidth || pageWidthMinusRightMargin - textBoundsOnPage.x)[0];
+            var baseLineRectOnPage = pathPositionRedo([JSON.parse(JSON.stringify(baselineRect))], this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset)[0];
+            var needsClipping = doSlice && (i > min || i < max) && hasMargins.call(this);
+
+            if (needsClipping) {
+              this.pdf.saveGraphicsState();
+              this.pdf.rect(this.margin[3], this.margin[0], pageWidthMinusMargins, pageHeightMinusMargins, null).clip().discardPath();
+            }
+
+            this.pdf.text(croppedText, baseLineRectOnPage.x, baseLineRectOnPage.y, {
+              angle: options.angle,
+              align: textAlign,
+              renderingMode: options.renderingMode
+            });
+
+            if (needsClipping) {
+              this.pdf.restoreGraphicsState();
+            }
+          }
+        } else {
+          // This text is the last element of the page, but it got cut off due to the margin
+          // so we render it in the next page
+          if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {
+            // As a result, all other elements have their y offset increased
+            this.ctx.prevPageLastElemOffset += pageHeightMinusBottomMargin - textBoundsOnPage.y;
+          }
+        }
+
+        if (options.scale >= 0.01) {
+          this.pdf.setFontSize(oldSize);
+          this.lineWidth = oldLineWidth;
+        }
+      }
+    } else {
+      if (options.scale >= 0.01) {
+        oldSize = this.pdf.internal.getFontSize();
+        this.pdf.setFontSize(oldSize * options.scale);
+        oldLineWidth = this.lineWidth;
+        this.lineWidth = oldLineWidth * options.scale;
+      }
+
+      this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {
+        angle: options.angle,
+        align: textAlign,
+        renderingMode: options.renderingMode,
+        maxWidth: options.maxWidth
+      });
+
+      if (options.scale >= 0.01) {
+        this.pdf.setFontSize(oldSize);
+        this.lineWidth = oldLineWidth;
+      }
+    }
+  };
+
+  var drawLine = function drawLine(x, y, prevX, prevY) {
+    prevX = prevX || 0;
+    prevY = prevY || 0;
+    this.pdf.internal.out(getHorizontalCoordinateString(x + prevX) + " " + getVerticalCoordinateString(y + prevY) + " l");
+  };
+
+  var drawLines = function drawLines(lines, x, y) {
+    return this.pdf.lines(lines, x, y, null, null);
+  };
+
+  var drawCurve = function drawCurve(x, y, x1, y1, x2, y2, x3, y3) {
+    this.pdf.internal.out([f2(getHorizontalCoordinate(x1 + x)), f2(getVerticalCoordinate(y1 + y)), f2(getHorizontalCoordinate(x2 + x)), f2(getVerticalCoordinate(y2 + y)), f2(getHorizontalCoordinate(x3 + x)), f2(getVerticalCoordinate(y3 + y)), "c"].join(" "));
+  };
+  /**
+   * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.
+   *
+   * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.
+   * @function createArc
+   */
+
+
+  var createArc = function createArc(radius, startAngle, endAngle, anticlockwise) {
+    var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below
+
+    var twoPi = Math.PI * 2;
+    var halfPi = Math.PI / 2.0;
+
+    while (startAngle > endAngle) {
+      startAngle = startAngle - twoPi;
+    }
+
+    var totalAngle = Math.abs(endAngle - startAngle);
+
+    if (totalAngle < twoPi) {
+      if (anticlockwise) {
+        totalAngle = twoPi - totalAngle;
+      }
+    } // Compute the sequence of arc curves, up to PI/2 at a time.
+
+
+    var curves = []; // clockwise or counterclockwise
+
+    var sgn = anticlockwise ? -1 : +1;
+    var a1 = startAngle;
+
+    for (; totalAngle > EPSILON;) {
+      var remain = sgn * Math.min(totalAngle, halfPi);
+      var a2 = a1 + remain;
+      curves.push(createSmallArc.call(this, radius, a1, a2));
+      totalAngle -= Math.abs(a2 - a1);
+      a1 = a2;
+    }
+
+    return curves;
+  };
+  /**
+   * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.
+   *
+   * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.
+   *
+   * This algorithm is based on the approach described in: A. Riškus, "Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa," Information Technology and Control, 35(4), 2006 pp. 371-378.
+   */
+
+
+  var createSmallArc = function createSmallArc(r, a1, a2) {
+    var a = (a2 - a1) / 2.0;
+    var x4 = r * Math.cos(a);
+    var y4 = r * Math.sin(a);
+    var x1 = x4;
+    var y1 = -y4;
+    var q1 = x1 * x1 + y1 * y1;
+    var q2 = q1 + x1 * x4 + y1 * y4;
+    var k2 = 4 / 3 * (Math.sqrt(2 * q1 * q2) - q2) / (x1 * y4 - y1 * x4);
+    var x2 = x1 - k2 * y1;
+    var y2 = y1 + k2 * x1;
+    var x3 = x2;
+    var y3 = -y2;
+    var ar = a + a1;
+    var cos_ar = Math.cos(ar);
+    var sin_ar = Math.sin(ar);
+    return {
+      x1: r * Math.cos(a1),
+      y1: r * Math.sin(a1),
+      x2: x2 * cos_ar - y2 * sin_ar,
+      y2: x2 * sin_ar + y2 * cos_ar,
+      x3: x3 * cos_ar - y3 * sin_ar,
+      y3: x3 * sin_ar + y3 * cos_ar,
+      x4: r * Math.cos(a2),
+      y4: r * Math.sin(a2)
+    };
+  };
+
+  var rad2deg = function rad2deg(value) {
+    return value * 180 / Math.PI;
+  };
+
+  var getQuadraticCurveBoundary = function getQuadraticCurveBoundary(sx, sy, cpx, cpy, ex, ey) {
+    var midX1 = sx + (cpx - sx) * 0.5;
+    var midY1 = sy + (cpy - sy) * 0.5;
+    var midX2 = ex + (cpx - ex) * 0.5;
+    var midY2 = ey + (cpy - ey) * 0.5;
+    var resultX1 = Math.min(sx, ex, midX1, midX2);
+    var resultX2 = Math.max(sx, ex, midX1, midX2);
+    var resultY1 = Math.min(sy, ey, midY1, midY2);
+    var resultY2 = Math.max(sy, ey, midY1, midY2);
+    return new Rectangle(resultX1, resultY1, resultX2 - resultX1, resultY2 - resultY1);
+  }; //De Casteljau algorithm
+
+
+  var getBezierCurveBoundary = function getBezierCurveBoundary(ax, ay, bx, by, cx, cy, dx, dy) {
+    var tobx = bx - ax;
+    var toby = by - ay;
+    var tocx = cx - bx;
+    var tocy = cy - by;
+    var todx = dx - cx;
+    var tody = dy - cy;
+    var precision = 40;
+    var d, i, px, py, qx, qy, rx, ry, tx, ty, sx, sy, x, y, minx, miny, maxx, maxy, toqx, toqy, torx, tory, totx, toty;
+
+    for (i = 0; i < precision + 1; i++) {
+      d = i / precision;
+      px = ax + d * tobx;
+      py = ay + d * toby;
+      qx = bx + d * tocx;
+      qy = by + d * tocy;
+      rx = cx + d * todx;
+      ry = cy + d * tody;
+      toqx = qx - px;
+      toqy = qy - py;
+      torx = rx - qx;
+      tory = ry - qy;
+      sx = px + d * toqx;
+      sy = py + d * toqy;
+      tx = qx + d * torx;
+      ty = qy + d * tory;
+      totx = tx - sx;
+      toty = ty - sy;
+      x = sx + d * totx;
+      y = sy + d * toty;
+
+      if (i == 0) {
+        minx = x;
+        miny = y;
+        maxx = x;
+        maxy = y;
+      } else {
+        minx = Math.min(minx, x);
+        miny = Math.min(miny, y);
+        maxx = Math.max(maxx, x);
+        maxy = Math.max(maxy, y);
+      }
+    }
+
+    return new Rectangle(Math.round(minx), Math.round(miny), Math.round(maxx - minx), Math.round(maxy - miny));
+  };
+
+  var getPrevLineDashValue = function getPrevLineDashValue(lineDash, lineDashOffset) {
+    return JSON.stringify({
+      lineDash: lineDash,
+      lineDashOffset: lineDashOffset
+    });
+  };
+
+  var setLineDash = function setLineDash() {
+    // Avoid unnecessary line dash declarations.
+    if (!this.prevLineDash && !this.ctx.lineDash.length && !this.ctx.lineDashOffset) {
+      return;
+    } // Avoid unnecessary line dash declarations.
+
+
+    var nextLineDash = getPrevLineDashValue(this.ctx.lineDash, this.ctx.lineDashOffset);
+
+    if (this.prevLineDash !== nextLineDash) {
+      this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);
+      this.prevLineDash = nextLineDash;
+    }
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * jsPDF filters PlugIn
+ * Copyright (c) 2014 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+(function (jsPDFAPI) {
+
+  var ASCII85Encode = function ASCII85Encode(a) {
+    var b, c, d, e, f, g, h, i, j, k; // eslint-disable-next-line no-control-regex
+
+    for (!/[^\x00-\xFF]/.test(a), b = "\x00\x00\x00\x00".slice(a.length % 4 || 4), a += b, c = [], d = 0, e = a.length; e > d; d += 4) {
+      f = (a.charCodeAt(d) << 24) + (a.charCodeAt(d + 1) << 16) + (a.charCodeAt(d + 2) << 8) + a.charCodeAt(d + 3), 0 !== f ? (k = f % 85, f = (f - k) / 85, j = f % 85, f = (f - j) / 85, i = f % 85, f = (f - i) / 85, h = f % 85, f = (f - h) / 85, g = f % 85, c.push(g + 33, h + 33, i + 33, j + 33, k + 33)) : c.push(122);
+    }
+
+    return function (a, b) {
+      for (var c = b; c > 0; c--) {
+        a.pop();
+      }
+    }(c, b.length), String.fromCharCode.apply(String, c) + "~>";
+  };
+
+  var ASCII85Decode = function ASCII85Decode(a) {
+    var c,
+        d,
+        e,
+        f,
+        g,
+        h = String,
+        l = "length",
+        w = 255,
+        x = "charCodeAt",
+        y = "slice",
+        z = "replace";
+
+    for ("~>" === a[y](-2), a = a[y](0, -2)[z](/\s/g, "")[z]("z", "!!!!!"), c = "uuuuu"[y](a[l] % 5 || 5), a += c, e = [], f = 0, g = a[l]; g > f; f += 5) {
+      d = 52200625 * (a[x](f) - 33) + 614125 * (a[x](f + 1) - 33) + 7225 * (a[x](f + 2) - 33) + 85 * (a[x](f + 3) - 33) + (a[x](f + 4) - 33), e.push(w & d >> 24, w & d >> 16, w & d >> 8, w & d);
+    }
+
+    return function (a, b) {
+      for (var c = b; c > 0; c--) {
+        a.pop();
+      }
+    }(e, c[l]), h.fromCharCode.apply(h, e);
+  };
+
+  var ASCIIHexEncode = function ASCIIHexEncode(value) {
+    return value.split("").map(function (value) {
+      return ("0" + value.charCodeAt().toString(16)).slice(-2);
+    }).join("") + ">";
+  };
+
+  var ASCIIHexDecode = function ASCIIHexDecode(value) {
+    var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);
+    value = value.replace(/\s/g, "");
+
+    if (value.indexOf(">") !== -1) {
+      value = value.substr(0, value.indexOf(">"));
+    }
+
+    if (value.length % 2) {
+      value += "0";
+    }
+
+    if (regexCheckIfHex.test(value) === false) {
+      return "";
+    }
+
+    var result = "";
+
+    for (var i = 0; i < value.length; i += 2) {
+      result += String.fromCharCode("0x" + (value[i] + value[i + 1]));
+    }
+
+    return result;
+  };
+  /*
+  var FlatePredictors = {
+      None: 1,
+      TIFF: 2,
+      PNG_None: 10,
+      PNG_Sub: 11,
+      PNG_Up: 12,
+      PNG_Average: 13,
+      PNG_Paeth: 14,
+      PNG_Optimum: 15
+  };
+  */
+
+
+  var FlateEncode = function FlateEncode(data) {
+    var arr = new Uint8Array(data.length);
+    var i = data.length;
+
+    while (i--) {
+      arr[i] = data.charCodeAt(i);
+    }
+
+    arr = zlibSync(arr);
+    data = arr.reduce(function (data, byte) {
+      return data + String.fromCharCode(byte);
+    }, "");
+    return data;
+  };
+
+  jsPDFAPI.processDataByFilters = function (origData, filterChain) {
+
+    var i = 0;
+    var data = origData || "";
+    var reverseChain = [];
+    filterChain = filterChain || [];
+
+    if (typeof filterChain === "string") {
+      filterChain = [filterChain];
+    }
+
+    for (i = 0; i < filterChain.length; i += 1) {
+      switch (filterChain[i]) {
+        case "ASCII85Decode":
+        case "/ASCII85Decode":
+          data = ASCII85Decode(data);
+          reverseChain.push("/ASCII85Encode");
+          break;
+
+        case "ASCII85Encode":
+        case "/ASCII85Encode":
+          data = ASCII85Encode(data);
+          reverseChain.push("/ASCII85Decode");
+          break;
+
+        case "ASCIIHexDecode":
+        case "/ASCIIHexDecode":
+          data = ASCIIHexDecode(data);
+          reverseChain.push("/ASCIIHexEncode");
+          break;
+
+        case "ASCIIHexEncode":
+        case "/ASCIIHexEncode":
+          data = ASCIIHexEncode(data);
+          reverseChain.push("/ASCIIHexDecode");
+          break;
+
+        case "FlateEncode":
+        case "/FlateEncode":
+          data = FlateEncode(data);
+          reverseChain.push("/FlateDecode");
+          break;
+
+        default:
+          throw new Error('The filter: "' + filterChain[i] + '" is not implemented');
+      }
+    }
+
+    return {
+      data: data,
+      reverseChain: reverseChain.reverse().join(" ")
+    };
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * jsPDF fileloading PlugIn
+ * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * @name fileloading
+ * @module
+ */
+
+(function (jsPDFAPI) {
+  /**
+   * @name loadFile
+   * @function
+   * @param {string} url
+   * @param {boolean} sync
+   * @param {function} callback
+   * @returns {string|undefined} result
+   */
+
+  jsPDFAPI.loadFile = function (url, sync, callback) {
+    return browserRequest(url, sync, callback);
+  };
+  /**
+   * @name loadImageFile
+   * @function
+   * @param {string} path
+   * @param {boolean} sync
+   * @param {function} callback
+   */
+
+
+  jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;
+
+  function browserRequest(url, sync, callback) {
+    sync = sync === false ? false : true;
+    callback = typeof callback === "function" ? callback : function () {};
+    var result = undefined;
+
+    var xhr = function xhr(url, sync, callback) {
+      var request = new XMLHttpRequest();
+      var i = 0;
+
+      var sanitizeUnicode = function sanitizeUnicode(data) {
+        var dataLength = data.length;
+        var charArray = [];
+        var StringFromCharCode = String.fromCharCode; //Transform Unicode to ASCII
+
+        for (i = 0; i < dataLength; i += 1) {
+          charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff));
+        }
+
+        return charArray.join("");
+      };
+
+      request.open("GET", url, !sync); // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]
+
+      request.overrideMimeType("text/plain; charset=x-user-defined");
+
+      if (sync === false) {
+        request.onload = function () {
+          if (request.status === 200) {
+            callback(sanitizeUnicode(this.responseText));
+          } else {
+            callback(undefined);
+          }
+        };
+      }
+
+      request.send(null);
+
+      if (sync && request.status === 200) {
+        return sanitizeUnicode(request.responseText);
+      }
+    };
+
+    try {
+      result = xhr(url, sync, callback); // eslint-disable-next-line no-empty
+    } catch (e) {}
+
+    return result;
+  }
+})(jsPDF.API);
+
+/**
+ * jsPDF html PlugIn
+ *
+ * @name html
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  function loadHtml2Canvas() {
+    return function () {
+      if (globalObject["html2canvas"]) {
+        return Promise.resolve(globalObject["html2canvas"]);
+      }
+
+      return import('html2canvas');
+    }().catch(function (e) {
+      return Promise.reject(new Error("Could not load html2canvas: " + e));
+    }).then(function (html2canvas) {
+      return html2canvas.default ? html2canvas.default : html2canvas;
+    });
+  }
+
+  function loadDomPurify() {
+    return function () {
+      if (globalObject["DOMPurify"]) {
+        return Promise.resolve(globalObject["DOMPurify"]);
+      }
+
+      return import('dompurify');
+    }().catch(function (e) {
+      return Promise.reject(new Error("Could not load dompurify: " + e));
+    }).then(function (dompurify) {
+      return dompurify.default ? dompurify.default : dompurify;
+    });
+  }
+  /**
+   * Determine the type of a variable/object.
+   *
+   * @private
+   * @ignore
+   */
+
+
+  var objType = function objType(obj) {
+    var type = _typeof(obj);
+
+    if (type === "undefined") return "undefined";else if (type === "string" || obj instanceof String) return "string";else if (type === "number" || obj instanceof Number) return "number";else if (type === "function" || obj instanceof Function) return "function";else if (!!obj && obj.constructor === Array) return "array";else if (obj && obj.nodeType === 1) return "element";else if (type === "object") return "object";else return "unknown";
+  };
+  /**
+   * Create an HTML element with optional className, innerHTML, and style.
+   *
+   * @private
+   * @ignore
+   */
+
+
+  var createElement = function createElement(tagName, opt) {
+    var el = document.createElement(tagName);
+    if (opt.className) el.className = opt.className;
+
+    if (opt.innerHTML && opt.dompurify) {
+      el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);
+    }
+
+    for (var key in opt.style) {
+      el.style[key] = opt.style[key];
+    }
+
+    return el;
+  };
+  /**
+   * Deep-clone a node and preserve contents/properties.
+   *
+   * @private
+   * @ignore
+   */
+
+
+  var cloneNode = function cloneNode(node, javascriptEnabled) {
+    // Recursively clone the node.
+    var clone = node.nodeType === 3 ? document.createTextNode(node.nodeValue) : node.cloneNode(false);
+
+    for (var child = node.firstChild; child; child = child.nextSibling) {
+      if (javascriptEnabled === true || child.nodeType !== 1 || child.nodeName !== "SCRIPT") {
+        clone.appendChild(cloneNode(child, javascriptEnabled));
+      }
+    }
+
+    if (node.nodeType === 1) {
+      // Preserve contents/properties of special nodes.
+      if (node.nodeName === "CANVAS") {
+        clone.width = node.width;
+        clone.height = node.height;
+        clone.getContext("2d").drawImage(node, 0, 0);
+      } else if (node.nodeName === "TEXTAREA" || node.nodeName === "SELECT") {
+        clone.value = node.value;
+      } // Preserve the node's scroll position when it loads.
+
+
+      clone.addEventListener("load", function () {
+        clone.scrollTop = node.scrollTop;
+        clone.scrollLeft = node.scrollLeft;
+      }, true);
+    } // Return the cloned node.
+
+
+    return clone;
+  };
+  /* ----- CONSTRUCTOR ----- */
+
+
+  var Worker = function Worker(opt) {
+    // Create the root parent for the proto chain, and the starting Worker.
+    var root = Object.assign(Worker.convert(Promise.resolve()), JSON.parse(JSON.stringify(Worker.template)));
+    var self = Worker.convert(Promise.resolve(), root); // Set progress, optional settings, and return.
+
+    self = self.setProgress(1, Worker, 1, [Worker]);
+    self = self.set(opt);
+    return self;
+  }; // Boilerplate for subclassing Promise.
+
+
+  Worker.prototype = Object.create(Promise.prototype);
+  Worker.prototype.constructor = Worker; // Converts/casts promises into Workers.
+
+  Worker.convert = function convert(promise, inherit) {
+    // Uses prototypal inheritance to receive changes made to ancestors' properties.
+    promise.__proto__ = inherit || Worker.prototype;
+    return promise;
+  };
+
+  Worker.template = {
+    prop: {
+      src: null,
+      container: null,
+      overlay: null,
+      canvas: null,
+      img: null,
+      pdf: null,
+      pageSize: null,
+      callback: function callback() {}
+    },
+    progress: {
+      val: 0,
+      state: null,
+      n: 0,
+      stack: []
+    },
+    opt: {
+      filename: "file.pdf",
+      margin: [0, 0, 0, 0],
+      enableLinks: true,
+      x: 0,
+      y: 0,
+      html2canvas: {},
+      jsPDF: {},
+      backgroundColor: "transparent"
+    }
+  };
+  /* ----- FROM / TO ----- */
+
+  Worker.prototype.from = function from(src, type) {
+    function getType(src) {
+      switch (objType(src)) {
+        case "string":
+          return "string";
+
+        case "element":
+          return src.nodeName.toLowerCase() === "canvas" ? "canvas" : "element";
+
+        default:
+          return "unknown";
+      }
+    }
+
+    return this.then(function from_main() {
+      type = type || getType(src);
+
+      switch (type) {
+        case "string":
+          return this.then(loadDomPurify).then(function (dompurify) {
+            return this.set({
+              src: createElement("div", {
+                innerHTML: src,
+                dompurify: dompurify
+              })
+            });
+          });
+
+        case "element":
+          return this.set({
+            src: src
+          });
+
+        case "canvas":
+          return this.set({
+            canvas: src
+          });
+
+        case "img":
+          return this.set({
+            img: src
+          });
+
+        default:
+          return this.error("Unknown source type.");
+      }
+    });
+  };
+
+  Worker.prototype.to = function to(target) {
+    // Route the 'to' request to the appropriate method.
+    switch (target) {
+      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.");
+    }
+  };
+
+  Worker.prototype.toContainer = function toContainer() {
+    // Set up function prerequisites.
+    var prereqs = [function checkSrc() {
+      return this.prop.src || this.error("Cannot duplicate - no source HTML.");
+    }, function checkPageSize() {
+      return this.prop.pageSize || this.setPageSize();
+    }];
+    return this.thenList(prereqs).then(function toContainer_main() {
+      // Define the CSS styles for the container and its overlay parent.
+      var overlayCSS = {
+        position: "fixed",
+        overflow: "hidden",
+        zIndex: 1000,
+        left: "-100000px",
+        right: 0,
+        bottom: 0,
+        top: 0
+      };
+      var containerCSS = {
+        position: "relative",
+        display: "inline-block",
+        width: (typeof this.opt.width === "number" && !isNaN(this.opt.width) && typeof this.opt.windowWidth === "number" && !isNaN(this.opt.windowWidth) ? this.opt.windowWidth : Math.max(this.prop.src.clientWidth, this.prop.src.scrollWidth, this.prop.src.offsetWidth)) + "px",
+        left: 0,
+        right: 0,
+        top: 0,
+        margin: "auto",
+        backgroundColor: this.opt.backgroundColor
+      }; // Set the overlay to hidden (could be changed in the future to provide a print preview).
+
+      var source = cloneNode(this.prop.src, this.opt.html2canvas.javascriptEnabled);
+
+      if (source.tagName === "BODY") {
+        containerCSS.height = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) + "px";
+      }
+
+      this.prop.overlay = createElement("div", {
+        className: "html2pdf__overlay",
+        style: overlayCSS
+      });
+      this.prop.container = createElement("div", {
+        className: "html2pdf__container",
+        style: containerCSS
+      });
+      this.prop.container.appendChild(source);
+      this.prop.container.firstChild.appendChild(createElement("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";
+    });
+  };
+
+  Worker.prototype.toCanvas = function toCanvas() {
+    // Set up function prerequisites.
+    var prereqs = [function checkContainer() {
+      return document.body.contains(this.prop.container) || this.toContainer();
+    }]; // Fulfill prereqs then create the canvas.
+
+    return this.thenList(prereqs).then(loadHtml2Canvas).then(function toCanvas_main(html2canvas) {
+      // Handle old-fashioned 'onrendered' argument.
+      var options = Object.assign({}, this.opt.html2canvas);
+      delete options.onrendered;
+      return html2canvas(this.prop.container, options);
+    }).then(function toCanvas_post(canvas) {
+      // Handle old-fashioned 'onrendered' argument.
+      var onRendered = this.opt.html2canvas.onrendered || function () {};
+
+      onRendered(canvas);
+      this.prop.canvas = canvas;
+      document.body.removeChild(this.prop.overlay);
+    });
+  };
+
+  Worker.prototype.toContext2d = function toContext2d() {
+    // Set up function prerequisites.
+    var prereqs = [function checkContainer() {
+      return document.body.contains(this.prop.container) || this.toContainer();
+    }]; // Fulfill prereqs then create the canvas.
+
+    return this.thenList(prereqs).then(loadHtml2Canvas).then(function toContext2d_main(html2canvas) {
+      // Handle old-fashioned 'onrendered' argument.
+      var pdf = this.opt.jsPDF;
+      var fontFaces = this.opt.fontFaces;
+      var scale = typeof this.opt.width === "number" && !isNaN(this.opt.width) && typeof this.opt.windowWidth === "number" && !isNaN(this.opt.windowWidth) ? this.opt.width / this.opt.windowWidth : 1;
+      var options = Object.assign({
+        async: true,
+        allowTaint: true,
+        scale: scale,
+        scrollX: this.opt.scrollX || 0,
+        scrollY: this.opt.scrollY || 0,
+        backgroundColor: "#ffffff",
+        imageTimeout: 15000,
+        logging: true,
+        proxy: null,
+        removeContainer: true,
+        foreignObjectRendering: false,
+        useCORS: false
+      }, this.opt.html2canvas);
+      delete options.onrendered;
+      pdf.context2d.autoPaging = typeof this.opt.autoPaging === "undefined" ? true : this.opt.autoPaging;
+      pdf.context2d.posX = this.opt.x;
+      pdf.context2d.posY = this.opt.y;
+      pdf.context2d.margin = this.opt.margin;
+      pdf.context2d.fontFaces = fontFaces;
+
+      if (fontFaces) {
+        for (var i = 0; i < fontFaces.length; ++i) {
+          var font = fontFaces[i];
+          var src = font.src.find(function (src) {
+            return src.format === "truetype";
+          });
+
+          if (src) {
+            pdf.addFont(src.url, font.ref.name, font.ref.style);
+          }
+        }
+      }
+
+      options.windowHeight = options.windowHeight || 0;
+      options.windowHeight = options.windowHeight == 0 ? Math.max(this.prop.container.clientHeight, this.prop.container.scrollHeight, this.prop.container.offsetHeight) : options.windowHeight;
+      pdf.context2d.save(true);
+      return html2canvas(this.prop.container, options);
+    }).then(function toContext2d_post(canvas) {
+      this.opt.jsPDF.context2d.restore(true); // Handle old-fashioned 'onrendered' argument.
+
+      var onRendered = this.opt.html2canvas.onrendered || function () {};
+
+      onRendered(canvas);
+      this.prop.canvas = canvas;
+      document.body.removeChild(this.prop.overlay);
+    });
+  };
+
+  Worker.prototype.toImg = function toImg() {
+    // Set up function prerequisites.
+    var prereqs = [function checkCanvas() {
+      return this.prop.canvas || this.toCanvas();
+    }]; // Fulfill prereqs then create the image.
+
+    return this.thenList(prereqs).then(function toImg_main() {
+      var imgData = this.prop.canvas.toDataURL("image/" + this.opt.image.type, this.opt.image.quality);
+      this.prop.img = document.createElement("img");
+      this.prop.img.src = imgData;
+    });
+  };
+
+  Worker.prototype.toPdf = function toPdf() {
+    // Set up function prerequisites.
+    var prereqs = [function checkContext2d() {
+      return this.toContext2d();
+    } //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }
+    ]; // Fulfill prereqs then create the image.
+
+    return this.thenList(prereqs).then(function toPdf_main() {
+      // Create local copies of frequently used properties.
+      this.prop.pdf = this.prop.pdf || this.opt.jsPDF;
+    });
+  };
+  /* ----- OUTPUT / SAVE ----- */
+
+
+  Worker.prototype.output = function output(type, options, src) {
+    // Redirect requests to the correct function (outputPdf / outputImg).
+    src = src || "pdf";
+
+    if (src.toLowerCase() === "img" || src.toLowerCase() === "image") {
+      return this.outputImg(type, options);
+    } else {
+      return this.outputPdf(type, options);
+    }
+  };
+
+  Worker.prototype.outputPdf = function outputPdf(type, options) {
+    // Set up function prerequisites.
+    var prereqs = [function checkPdf() {
+      return this.prop.pdf || this.toPdf();
+    }]; // Fulfill prereqs then perform the appropriate output.
+
+    return this.thenList(prereqs).then(function outputPdf_main() {
+      /* Currently implemented output types:
+       *    https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992
+       *  save(options), arraybuffer, blob, bloburi/bloburl,
+       *  datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl
+       */
+      return this.prop.pdf.output(type, options);
+    });
+  };
+
+  Worker.prototype.outputImg = function outputImg(type) {
+    // Set up function prerequisites.
+    var prereqs = [function checkImg() {
+      return this.prop.img || this.toImg();
+    }]; // Fulfill prereqs then perform the appropriate output.
+
+    return this.thenList(prereqs).then(function outputImg_main() {
+      switch (type) {
+        case undefined:
+        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 "' + type + '" is not supported.';
+      }
+    });
+  };
+
+  Worker.prototype.save = function save(filename) {
+    // Set up function prerequisites.
+    var prereqs = [function checkPdf() {
+      return this.prop.pdf || this.toPdf();
+    }]; // Fulfill prereqs, update the filename (if provided), and save the PDF.
+
+    return this.thenList(prereqs).set(filename ? {
+      filename: filename
+    } : null).then(function save_main() {
+      this.prop.pdf.save(this.opt.filename);
+    });
+  };
+
+  Worker.prototype.doCallback = function doCallback() {
+    // Set up function prerequisites.
+    var prereqs = [function checkPdf() {
+      return this.prop.pdf || this.toPdf();
+    }]; // Fulfill prereqs, update the filename (if provided), and save the PDF.
+
+    return this.thenList(prereqs).then(function doCallback_main() {
+      this.prop.callback(this.prop.pdf);
+    });
+  };
+  /* ----- SET / GET ----- */
+
+
+  Worker.prototype.set = function set(opt) {
+    // TODO: Implement ordered pairs?
+    // Silently ignore invalid or empty input.
+    if (objType(opt) !== "object") {
+      return this;
+    } // Build an array of setter functions to queue.
+
+
+    var fns = Object.keys(opt || {}).map(function (key) {
+      if (key in Worker.template.prop) {
+        // Set pre-defined properties.
+        return function set_prop() {
+          this.prop[key] = opt[key];
+        };
+      } else {
+        switch (key) {
+          case "margin":
+            return this.setMargin.bind(this, opt.margin);
+
+          case "jsPDF":
+            return function set_jsPDF() {
+              this.opt.jsPDF = opt.jsPDF;
+              return this.setPageSize();
+            };
+
+          case "pageSize":
+            return this.setPageSize.bind(this, opt.pageSize);
+
+          default:
+            // Set any other properties in opt.
+            return function set_opt() {
+              this.opt[key] = opt[key];
+            };
+        }
+      }
+    }, this); // Set properties within the promise chain.
+
+    return this.then(function set_main() {
+      return this.thenList(fns);
+    });
+  };
+
+  Worker.prototype.get = function get(key, cbk) {
+    return this.then(function get_main() {
+      // Fetch the requested property, either as a predefined prop or in opt.
+      var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];
+      return cbk ? cbk(val) : val;
+    });
+  };
+
+  Worker.prototype.setMargin = function setMargin(margin) {
+    return this.then(function setMargin_main() {
+      // Parse the margin property.
+      switch (objType(margin)) {
+        case "number":
+          margin = [margin, margin, margin, margin];
+        // eslint-disable-next-line no-fallthrough
+
+        case "array":
+          if (margin.length === 2) {
+            margin = [margin[0], margin[1], margin[0], margin[1]];
+          }
+
+          if (margin.length === 4) {
+            break;
+          }
+
+        // eslint-disable-next-line no-fallthrough
+
+        default:
+          return this.error("Invalid margin array.");
+      } // Set the margin property, then update pageSize.
+
+
+      this.opt.margin = margin;
+    }).then(this.setPageSize);
+  };
+
+  Worker.prototype.setPageSize = function setPageSize(pageSize) {
+    function toPx(val, k) {
+      return Math.floor(val * k / 72 * 96);
+    }
+
+    return this.then(function setPageSize_main() {
+      // Retrieve page-size based on jsPDF settings, if not explicitly provided.
+      pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF); // Add 'inner' field if not present.
+
+      if (!pageSize.hasOwnProperty("inner")) {
+        pageSize.inner = {
+          width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],
+          height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]
+        };
+        pageSize.inner.px = {
+          width: toPx(pageSize.inner.width, pageSize.k),
+          height: toPx(pageSize.inner.height, pageSize.k)
+        };
+        pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;
+      } // Attach pageSize to this.
+
+
+      this.prop.pageSize = pageSize;
+    });
+  };
+
+  Worker.prototype.setProgress = function setProgress(val, state, n, stack) {
+    // Immediately update all progress values.
+    if (val != null) this.progress.val = val;
+    if (state != null) this.progress.state = state;
+    if (n != null) this.progress.n = n;
+    if (stack != null) this.progress.stack = stack;
+    this.progress.ratio = this.progress.val / this.progress.state; // Return this for command chaining.
+
+    return this;
+  };
+
+  Worker.prototype.updateProgress = function updateProgress(val, state, n, stack) {
+    // Immediately update all progress values, using setProgress.
+    return this.setProgress(val ? this.progress.val + val : null, state ? state : null, n ? this.progress.n + n : null, stack ? this.progress.stack.concat(stack) : null);
+  };
+  /* ----- PROMISE MAPPING ----- */
+
+
+  Worker.prototype.then = function then(onFulfilled, onRejected) {
+    // Wrap `this` for encapsulation.
+    var self = this;
+    return this.thenCore(onFulfilled, onRejected, function then_main(onFulfilled, onRejected) {
+      // Update progress while queuing, calling, and resolving `then`.
+      self.updateProgress(null, null, 1, [onFulfilled]);
+      return Promise.prototype.then.call(this, function then_pre(val) {
+        self.updateProgress(null, onFulfilled);
+        return val;
+      }).then(onFulfilled, onRejected).then(function then_post(val) {
+        self.updateProgress(1);
+        return val;
+      });
+    });
+  };
+
+  Worker.prototype.thenCore = function thenCore(onFulfilled, onRejected, thenBase) {
+    // Handle optional thenBase parameter.
+    thenBase = thenBase || Promise.prototype.then; // Wrap `this` for encapsulation and bind it to the promise handlers.
+
+    var self = this;
+
+    if (onFulfilled) {
+      onFulfilled = onFulfilled.bind(self);
+    }
+
+    if (onRejected) {
+      onRejected = onRejected.bind(self);
+    } // Cast self into a Promise to avoid polyfills recursively defining `then`.
+
+
+    var isNative = Promise.toString().indexOf("[native code]") !== -1 && Promise.name === "Promise";
+    var selfPromise = isNative ? self : Worker.convert(Object.assign({}, self), Promise.prototype); // Return the promise, after casting it into a Worker and preserving props.
+
+    var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);
+    return Worker.convert(returnVal, self.__proto__);
+  };
+
+  Worker.prototype.thenExternal = function thenExternal(onFulfilled, onRejected) {
+    // Call `then` and return a standard promise (exits the Worker chain).
+    return Promise.prototype.then.call(this, onFulfilled, onRejected);
+  };
+
+  Worker.prototype.thenList = function thenList(fns) {
+    // Queue a series of promise 'factories' into the promise chain.
+    var self = this;
+    fns.forEach(function thenList_forEach(fn) {
+      self = self.thenCore(fn);
+    });
+    return self;
+  };
+
+  Worker.prototype["catch"] = function (onRejected) {
+    // Bind `this` to the promise handler, call `catch`, and return a Worker.
+    if (onRejected) {
+      onRejected = onRejected.bind(this);
+    }
+
+    var returnVal = Promise.prototype["catch"].call(this, onRejected);
+    return Worker.convert(returnVal, this);
+  };
+
+  Worker.prototype.catchExternal = function catchExternal(onRejected) {
+    // Call `catch` and return a standard promise (exits the Worker chain).
+    return Promise.prototype["catch"].call(this, onRejected);
+  };
+
+  Worker.prototype.error = function error(msg) {
+    // Throw the error in the Promise chain.
+    return this.then(function error_main() {
+      throw new Error(msg);
+    });
+  };
+  /* ----- ALIASES ----- */
+
+
+  Worker.prototype.using = Worker.prototype.set;
+  Worker.prototype.saveAs = Worker.prototype.save;
+  Worker.prototype.export = Worker.prototype.output;
+  Worker.prototype.run = Worker.prototype.then; // Get dimensions of a PDF page, as determined by jsPDF.
+
+  jsPDF.getPageSize = function (orientation, unit, format) {
+    // Decode options object
+    if (_typeof(orientation) === "object") {
+      var options = orientation;
+      orientation = options.orientation;
+      unit = options.unit || unit;
+      format = options.format || format;
+    } // Default options
+
+
+    unit = unit || "mm";
+    format = format || "a4";
+    orientation = ("" + (orientation || "P")).toLowerCase();
+    var format_as_string = ("" + format).toLowerCase(); // Size in pt of various paper formats
+
+    var pageFormats = {
+      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]
+    };
+    var k; // Unit conversion
+
+    switch (unit) {
+      case "pt":
+        k = 1;
+        break;
+
+      case "mm":
+        k = 72 / 25.4;
+        break;
+
+      case "cm":
+        k = 72 / 2.54;
+        break;
+
+      case "in":
+        k = 72;
+        break;
+
+      case "px":
+        k = 72 / 96;
+        break;
+
+      case "pc":
+        k = 12;
+        break;
+
+      case "em":
+        k = 12;
+        break;
+
+      case "ex":
+        k = 6;
+        break;
+
+      default:
+        throw "Invalid unit: " + unit;
+    }
+
+    var pageHeight = 0;
+    var pageWidth = 0; // Dimensions are stored as user units and converted to points on output
+
+    if (pageFormats.hasOwnProperty(format_as_string)) {
+      pageHeight = pageFormats[format_as_string][1] / k;
+      pageWidth = pageFormats[format_as_string][0] / k;
+    } else {
+      try {
+        pageHeight = format[1];
+        pageWidth = format[0];
+      } catch (err) {
+        throw new Error("Invalid format: " + format);
+      }
+    }
+
+    var tmp; // Handle page orientation
+
+    if (orientation === "p" || orientation === "portrait") {
+      orientation = "p";
+
+      if (pageWidth > pageHeight) {
+        tmp = pageWidth;
+        pageWidth = pageHeight;
+        pageHeight = tmp;
+      }
+    } else if (orientation === "l" || orientation === "landscape") {
+      orientation = "l";
+
+      if (pageHeight > pageWidth) {
+        tmp = pageWidth;
+        pageWidth = pageHeight;
+        pageHeight = tmp;
+      }
+    } else {
+      throw "Invalid orientation: " + orientation;
+    } // Return information (k is the unit conversion ratio from pts)
+
+
+    var info = {
+      width: pageWidth,
+      height: pageHeight,
+      unit: unit,
+      k: k,
+      orientation: orientation
+    };
+    return info;
+  };
+  /**
+   * @typedef FontFace
+   *
+   * The font-face type implements an interface similar to that of the font-face CSS rule,
+   * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D
+   * is updated.
+   *
+   * All properties expect values similar to those in the font-face CSS rule. A difference
+   * is the font-family, which do not need to be enclosed in double-quotes when containing
+   * spaces like in CSS.
+   *
+   * @property {string} family The name of the font-family.
+   * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.
+   * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)
+   * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.
+   * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.
+   * @property {string} [src] url A URL to a font of a specific format.
+   * @property {string} [src] format Format of the font referenced by the URL.
+   */
+
+  /**
+   * Generate a PDF from an HTML element or string using.
+   *
+   * @name html
+   * @function
+   * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.
+   * @param {Object} [options] Collection of settings
+   * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance
+   * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.
+   * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.
+   * <ul>
+   * <li>
+   *   <code>false</code>: Auto paging is disabled.
+   * </li>
+   * <li>
+   *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly
+   *   slice text in half, making it difficult to read.
+   * </li>
+   * <li>
+   *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting
+   *   mostly of a single column of text.
+   * </li>
+   * </ul>
+   * Default is <code>true</code>.
+   * @param {string} [options.filename] name of the file
+   * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image
+   * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options
+   * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.
+   * @param {jsPDF} [options.jsPDF] jsPDF instance
+   * @param {number=} [options.x] x position on the PDF document in jsPDF units.
+   * @param {number=} [options.y] y position on the PDF document in jsPDF units.
+   * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be
+   * scaled such that it fits into the specified width. Has no effect if either the <code>html2canvas.scale<code> is
+   * specified or the <code>windowWidth</code> option is NOT specified.
+   * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the
+   * <code>html2canvas.windowWidth</code> option, this option affects the actual container size while rendering and
+   * does NOT affect CSS media queries. This option only has an effect, if the <code>width<code> option is also specified.
+   *
+   * @example
+   * var doc = new jsPDF();
+   *
+   * doc.html(document.body, {
+   *    callback: function (doc) {
+   *      doc.save();
+   *    },
+   *    x: 10,
+   *    y: 10
+   * });
+   */
+
+
+  jsPDFAPI.html = function (src, options) {
+
+    options = options || {};
+
+    options.callback = options.callback || function () {};
+
+    options.html2canvas = options.html2canvas || {};
+    options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;
+    options.jsPDF = options.jsPDF || this;
+    options.fontFaces = options.fontFaces ? options.fontFaces.map(normalizeFontFace) : null; // Create a new worker with the given options.
+
+    var worker = new Worker(options);
+
+    if (!options.worker) {
+      // If worker is not set to true, perform the traditional 'simple' operation.
+      return worker.from(src).doCallback();
+    } else {
+      // Otherwise, return the worker for new Promise-based operation.
+      return worker;
+    }
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * ====================================================================
+ * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+/**
+ * jsPDF JavaScript plugin
+ *
+ * @name javascript
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  var jsNamesObj, jsJsObj, text;
+  /**
+   * @name addJS
+   * @function
+   * @param {string} javascript The javascript to be embedded into the PDF-file.
+   * @returns {jsPDF}
+   */
+
+  jsPDFAPI.addJS = function (javascript) {
+    text = javascript;
+    this.internal.events.subscribe("postPutResources", function () {
+      jsNamesObj = this.internal.newObject();
+      this.internal.out("<<");
+      this.internal.out("/Names [(EmbeddedJS) " + (jsNamesObj + 1) + " 0 R]");
+      this.internal.out(">>");
+      this.internal.out("endobj");
+      jsJsObj = this.internal.newObject();
+      this.internal.out("<<");
+      this.internal.out("/S /JavaScript");
+      this.internal.out("/JS (" + text + ")");
+      this.internal.out(">>");
+      this.internal.out("endobj");
+    });
+    this.internal.events.subscribe("putCatalog", function () {
+      if (jsNamesObj !== undefined && jsJsObj !== undefined) {
+        this.internal.out("/Names <</JavaScript " + jsNamesObj + " 0 R>>");
+      }
+    });
+    return this;
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * jsPDF Outline PlugIn
+ *
+ * Generates a PDF Outline
+ * @name outline
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  var namesOid; //var destsGoto = [];
+
+  jsPDFAPI.events.push(["postPutResources", function () {
+    var pdf = this;
+    var rx = /^(\d+) 0 obj$/; // Write action goto objects for each page
+    // this.outline.destsGoto = [];
+    // for (var i = 0; i < totalPages; i++) {
+    // var id = pdf.internal.newObject();
+    // this.outline.destsGoto.push(id);
+    // pdf.internal.write("<</D[" + (i * 2 + 3) + " 0 R /XYZ null
+    // null null]/S/GoTo>> endobj");
+    // }
+    //
+    // for (var i = 0; i < dests.length; i++) {
+    // pdf.internal.write("(page_" + (i + 1) + ")" + dests[i] + " 0
+    // R");
+    // }
+    //
+
+    if (this.outline.root.children.length > 0) {
+      var lines = pdf.outline.render().split(/\r\n/);
+
+      for (var i = 0; i < lines.length; i++) {
+        var line = lines[i];
+        var m = rx.exec(line);
+
+        if (m != null) {
+          var oid = m[1];
+          pdf.internal.newObjectDeferredBegin(oid, false);
+        }
+
+        pdf.internal.write(line);
+      }
+    } // This code will write named destination for each page reference
+    // (page_1, etc)
+
+
+    if (this.outline.createNamedDestinations) {
+      var totalPages = this.internal.pages.length; // WARNING: this assumes jsPDF starts on page 3 and pageIDs
+      // follow 5, 7, 9, etc
+      // Write destination objects for each page
+
+      var dests = [];
+
+      for (var i = 0; i < totalPages; i++) {
+        var id = pdf.internal.newObject();
+        dests.push(id);
+        var info = pdf.internal.getPageInfo(i + 1);
+        pdf.internal.write("<< /D[" + info.objId + " 0 R /XYZ null null null]>> endobj");
+      } // assign a name for each destination
+
+
+      var names2Oid = pdf.internal.newObject();
+      pdf.internal.write("<< /Names [ ");
+
+      for (var i = 0; i < dests.length; i++) {
+        pdf.internal.write("(page_" + (i + 1) + ")" + dests[i] + " 0 R");
+      }
+
+      pdf.internal.write(" ] >>", "endobj"); // var kids = pdf.internal.newObject();
+      // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');
+      // pdf.internal.write(' ] >>', 'endobj');
+
+      namesOid = pdf.internal.newObject();
+      pdf.internal.write("<< /Dests " + names2Oid + " 0 R");
+      pdf.internal.write(">>", "endobj");
+    }
+  }]);
+  jsPDFAPI.events.push(["putCatalog", function () {
+    var pdf = this;
+
+    if (pdf.outline.root.children.length > 0) {
+      pdf.internal.write("/Outlines", this.outline.makeRef(this.outline.root));
+
+      if (this.outline.createNamedDestinations) {
+        pdf.internal.write("/Names " + namesOid + " 0 R");
+      } // Open with Bookmarks showing
+      // pdf.internal.write("/PageMode /UseOutlines");
+
+    }
+  }]);
+  jsPDFAPI.events.push(["initialized", function () {
+    var pdf = this;
+    pdf.outline = {
+      createNamedDestinations: false,
+      root: {
+        children: []
+      }
+    };
+    /**
+     * Options: pageNumber
+     */
+
+    pdf.outline.add = function (parent, title, options) {
+      var item = {
+        title: title,
+        options: options,
+        children: []
+      };
+
+      if (parent == null) {
+        parent = this.root;
+      }
+
+      parent.children.push(item);
+      return item;
+    };
+
+    pdf.outline.render = function () {
+      this.ctx = {};
+      this.ctx.val = "";
+      this.ctx.pdf = pdf;
+      this.genIds_r(this.root);
+      this.renderRoot(this.root);
+      this.renderItems(this.root);
+      return this.ctx.val;
+    };
+
+    pdf.outline.genIds_r = function (node) {
+      node.id = pdf.internal.newObjectDeferred();
+
+      for (var i = 0; i < node.children.length; i++) {
+        this.genIds_r(node.children[i]);
+      }
+    };
+
+    pdf.outline.renderRoot = function (node) {
+      this.objStart(node);
+      this.line("/Type /Outlines");
+
+      if (node.children.length > 0) {
+        this.line("/First " + this.makeRef(node.children[0]));
+        this.line("/Last " + this.makeRef(node.children[node.children.length - 1]));
+      }
+
+      this.line("/Count " + this.count_r({
+        count: 0
+      }, node));
+      this.objEnd();
+    };
+
+    pdf.outline.renderItems = function (node) {
+      var getVerticalCoordinateString = this.ctx.pdf.internal.getVerticalCoordinateString;
+
+      for (var i = 0; i < node.children.length; i++) {
+        var item = node.children[i];
+        this.objStart(item);
+        this.line("/Title " + this.makeString(item.title));
+        this.line("/Parent " + this.makeRef(node));
+
+        if (i > 0) {
+          this.line("/Prev " + this.makeRef(node.children[i - 1]));
+        }
+
+        if (i < node.children.length - 1) {
+          this.line("/Next " + this.makeRef(node.children[i + 1]));
+        }
+
+        if (item.children.length > 0) {
+          this.line("/First " + this.makeRef(item.children[0]));
+          this.line("/Last " + this.makeRef(item.children[item.children.length - 1]));
+        }
+
+        var count = this.count = this.count_r({
+          count: 0
+        }, item);
+
+        if (count > 0) {
+          this.line("/Count " + count);
+        }
+
+        if (item.options) {
+          if (item.options.pageNumber) {
+            // Explicit Destination
+            //WARNING this assumes page ids are 3,5,7, etc.
+            var info = pdf.internal.getPageInfo(item.options.pageNumber);
+            this.line("/Dest " + "[" + info.objId + " 0 R /XYZ 0 " + getVerticalCoordinateString(0) + " 0]"); // this line does not work on all clients (pageNumber instead of page ref)
+            //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');
+            // Named Destination
+            // this.line('/Dest (page_' + (item.options.pageNumber) + ')');
+            // Action Destination
+            // var id = pdf.internal.newObject();
+            // pdf.internal.write('<</D[' + (item.options.pageNumber - 1) + ' /XYZ null null null]/S/GoTo>> endobj');
+            // this.line('/A ' + id + ' 0 R' );
+          }
+        }
+
+        this.objEnd();
+      }
+
+      for (var z = 0; z < node.children.length; z++) {
+        this.renderItems(node.children[z]);
+      }
+    };
+
+    pdf.outline.line = function (text) {
+      this.ctx.val += text + "\r\n";
+    };
+
+    pdf.outline.makeRef = function (node) {
+      return node.id + " 0 R";
+    };
+
+    pdf.outline.makeString = function (val) {
+      return "(" + pdf.internal.pdfEscape(val) + ")";
+    };
+
+    pdf.outline.objStart = function (node) {
+      this.ctx.val += "\r\n" + node.id + " 0 obj" + "\r\n<<\r\n";
+    };
+
+    pdf.outline.objEnd = function () {
+      this.ctx.val += ">> \r\n" + "endobj" + "\r\n";
+    };
+
+    pdf.outline.count_r = function (ctx, node) {
+      for (var i = 0; i < node.children.length; i++) {
+        ctx.count++;
+        this.count_r(ctx, node.children[i]);
+      }
+
+      return ctx.count;
+    };
+  }]);
+  return this;
+})(jsPDF.API);
+
+/**
+ * @license
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * jsPDF jpeg Support PlugIn
+ *
+ * @name jpeg_support
+ * @module
+ */
+
+(function (jsPDFAPI) {
+  /**
+   * 0xc0 (SOF) Huffman  - Baseline DCT
+   * 0xc1 (SOF) Huffman  - Extended sequential DCT
+   * 0xc2 Progressive DCT (SOF2)
+   * 0xc3 Spatial (sequential) lossless (SOF3)
+   * 0xc4 Differential sequential DCT (SOF5)
+   * 0xc5 Differential progressive DCT (SOF6)
+   * 0xc6 Differential spatial (SOF7)
+   * 0xc7
+   */
+
+  var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7]; //takes a string imgData containing the raw bytes of
+  //a jpeg image and returns [width, height]
+  //Algorithm from: http://www.64lines.com/jpeg-width-height
+
+  var getJpegInfo = function getJpegInfo(imgData) {
+    var width, height, numcomponents;
+    var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);
+    var len = imgData.length;
+    var result = {
+      width: 0,
+      height: 0,
+      numcomponents: 1
+    };
+
+    for (var i = 4; i < len; i += 2) {
+      i += blockLength;
+
+      if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {
+        height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);
+        width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);
+        numcomponents = imgData.charCodeAt(i + 9);
+        result = {
+          width: width,
+          height: height,
+          numcomponents: numcomponents
+        };
+        break;
+      } else {
+        blockLength = imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);
+      }
+    }
+
+    return result;
+  };
+  /**
+   * @ignore
+   */
+
+
+  jsPDFAPI.processJPEG = function (data, index, alias, compression, dataAsBinaryString, colorSpace) {
+    var filter = this.decode.DCT_DECODE,
+        bpc = 8,
+        dims,
+        result = null;
+
+    if (typeof data === "string" || this.__addimage__.isArrayBuffer(data) || this.__addimage__.isArrayBufferView(data)) {
+      // if we already have a stored binary string rep use that
+      data = dataAsBinaryString || data;
+      data = this.__addimage__.isArrayBuffer(data) ? new Uint8Array(data) : data;
+      data = this.__addimage__.isArrayBufferView(data) ? this.__addimage__.arrayBufferToBinaryString(data) : data;
+      dims = getJpegInfo(data);
+
+      switch (dims.numcomponents) {
+        case 1:
+          colorSpace = this.color_spaces.DEVICE_GRAY;
+          break;
+
+        case 4:
+          colorSpace = this.color_spaces.DEVICE_CMYK;
+          break;
+
+        case 3:
+          colorSpace = this.color_spaces.DEVICE_RGB;
+          break;
+      }
+
+      result = {
+        data: data,
+        width: dims.width,
+        height: dims.height,
+        colorSpace: colorSpace,
+        bitsPerComponent: bpc,
+        filter: filter,
+        index: index,
+        alias: alias
+      };
+    }
+
+    return result;
+  };
+})(jsPDF.API);
+
+// Generated by CoffeeScript 1.4.0
+
+var PNG = function () {
+  var APNG_BLEND_OP_SOURCE, APNG_DISPOSE_OP_BACKGROUND, APNG_DISPOSE_OP_PREVIOUS, makeImage, scratchCanvas, scratchCtx;
+  APNG_DISPOSE_OP_BACKGROUND = 1;
+  APNG_DISPOSE_OP_PREVIOUS = 2;
+  APNG_BLEND_OP_SOURCE = 0;
+
+  function PNG(data) {
+    var chunkSize, colors, palLen, delayDen, delayNum, frame, i, index, key, section, palShort, text, _i, _j, _ref;
+
+    this.data = data;
+    this.pos = 8;
+    this.palette = [];
+    this.imgData = [];
+    this.transparency = {};
+    this.animation = null;
+    this.text = {};
+    frame = null;
+
+    while (true) {
+      chunkSize = this.readUInt32();
+
+      section = function () {
+        var _i, _results;
+
+        _results = [];
+
+        for (i = _i = 0; _i < 4; i = ++_i) {
+          _results.push(String.fromCharCode(this.data[this.pos++]));
+        }
+
+        return _results;
+      }.call(this).join("");
+
+      switch (section) {
+        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() || Infinity,
+            frames: []
+          };
+          break;
+
+        case "PLTE":
+          this.palette = this.read(chunkSize);
+          break;
+
+        case "fcTL":
+          if (frame) {
+            this.animation.frames.push(frame);
+          }
+
+          this.pos += 4;
+          frame = {
+            width: this.readUInt32(),
+            height: this.readUInt32(),
+            xOffset: this.readUInt32(),
+            yOffset: this.readUInt32()
+          };
+          delayNum = this.readUInt16();
+          delayDen = this.readUInt16() || 100;
+          frame.delay = 1000 * delayNum / delayDen;
+          frame.disposeOp = this.data[this.pos++];
+          frame.blendOp = this.data[this.pos++];
+          frame.data = [];
+          break;
+
+        case "IDAT":
+        case "fdAT":
+          if (section === "fdAT") {
+            this.pos += 4;
+            chunkSize -= 4;
+          }
+
+          data = (frame != null ? frame.data : void 0) || this.imgData;
+
+          for (i = _i = 0; 0 <= chunkSize ? _i < chunkSize : _i > chunkSize; i = 0 <= chunkSize ? ++_i : --_i) {
+            data.push(this.data[this.pos++]);
+          }
+
+          break;
+
+        case "tRNS":
+          this.transparency = {};
+
+          switch (this.colorType) {
+            case 3:
+              palLen = this.palette.length / 3;
+              this.transparency.indexed = this.read(chunkSize);
+              if (this.transparency.indexed.length > palLen) throw new Error("More transparent colors than palette size");
+              /*
+               * According to the PNG spec trns should be increased to the same size as palette if shorter
+               */
+              //palShort = 255 - this.transparency.indexed.length;
+
+              palShort = palLen - this.transparency.indexed.length;
+
+              if (palShort > 0) {
+                for (i = _j = 0; 0 <= palShort ? _j < palShort : _j > palShort; i = 0 <= palShort ? ++_j : --_j) {
+                  this.transparency.indexed.push(255);
+                }
+              }
+
+              break;
+
+            case 0:
+              this.transparency.grayscale = this.read(chunkSize)[0];
+              break;
+
+            case 2:
+              this.transparency.rgb = this.read(chunkSize);
+          }
+
+          break;
+
+        case "tEXt":
+          text = this.read(chunkSize);
+          index = text.indexOf(0);
+          key = String.fromCharCode.apply(String, text.slice(0, index));
+          this.text[key] = String.fromCharCode.apply(String, text.slice(index + 1));
+          break;
+
+        case "IEND":
+          if (frame) {
+            this.animation.frames.push(frame);
+          }
+
+          this.colors = function () {
+            switch (this.colorType) {
+              case 0:
+              case 3:
+              case 4:
+                return 1;
+
+              case 2:
+              case 6:
+                return 3;
+            }
+          }.call(this);
+
+          this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;
+          colors = this.colors + (this.hasAlphaChannel ? 1 : 0);
+          this.pixelBitlength = this.bits * colors;
+
+          this.colorSpace = function () {
+            switch (this.colors) {
+              case 1:
+                return "DeviceGray";
+
+              case 3:
+                return "DeviceRGB";
+            }
+          }.call(this);
+
+          this.imgData = new Uint8Array(this.imgData);
+          return;
+
+        default:
+          this.pos += chunkSize;
+      }
+
+      this.pos += 4;
+
+      if (this.pos > this.data.length) {
+        throw new Error("Incomplete or corrupt PNG file");
+      }
+    }
+  }
+
+  PNG.prototype.read = function (bytes) {
+    var i, _i, _results;
+
+    _results = [];
+
+    for (i = _i = 0; 0 <= bytes ? _i < bytes : _i > bytes; i = 0 <= bytes ? ++_i : --_i) {
+      _results.push(this.data[this.pos++]);
+    }
+
+    return _results;
+  };
+
+  PNG.prototype.readUInt32 = function () {
+    var b1, b2, b3, b4;
+    b1 = this.data[this.pos++] << 24;
+    b2 = this.data[this.pos++] << 16;
+    b3 = this.data[this.pos++] << 8;
+    b4 = this.data[this.pos++];
+    return b1 | b2 | b3 | b4;
+  };
+
+  PNG.prototype.readUInt16 = function () {
+    var b1, b2;
+    b1 = this.data[this.pos++] << 8;
+    b2 = this.data[this.pos++];
+    return b1 | b2;
+  };
+
+  PNG.prototype.decodePixels = function (data) {
+    var pixelBytes = this.pixelBitlength / 8;
+    var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);
+    var pos = 0;
+
+    var _this = this;
+
+    if (data == null) {
+      data = this.imgData;
+    }
+
+    if (data.length === 0) {
+      return new Uint8Array(0);
+    }
+
+    data = unzlibSync(data);
+
+    function pass(x0, y0, dx, dy) {
+      var abyte, c, col, i, left, length, p, pa, paeth, pb, pc, pixels, row, scanlineLength, upper, upperLeft, _i, _j, _k, _l, _m;
+
+      var w = Math.ceil((_this.width - x0) / dx),
+          h = Math.ceil((_this.height - y0) / dy);
+      var isFull = _this.width == w && _this.height == h;
+      scanlineLength = pixelBytes * w;
+      pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);
+      length = data.length;
+      row = 0;
+      c = 0;
+
+      while (row < h && pos < length) {
+        switch (data[pos++]) {
+          case 0:
+            for (i = _i = 0; _i < scanlineLength; i = _i += 1) {
+              pixels[c++] = data[pos++];
+            }
+
+            break;
+
+          case 1:
+            for (i = _j = 0; _j < scanlineLength; i = _j += 1) {
+              abyte = data[pos++];
+              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];
+              pixels[c++] = (abyte + left) % 256;
+            }
+
+            break;
+
+          case 2:
+            for (i = _k = 0; _k < scanlineLength; i = _k += 1) {
+              abyte = data[pos++];
+              col = (i - i % pixelBytes) / pixelBytes;
+              upper = row && pixels[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
+              pixels[c++] = (upper + abyte) % 256;
+            }
+
+            break;
+
+          case 3:
+            for (i = _l = 0; _l < scanlineLength; i = _l += 1) {
+              abyte = data[pos++];
+              col = (i - i % pixelBytes) / pixelBytes;
+              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];
+              upper = row && pixels[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
+              pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;
+            }
+
+            break;
+
+          case 4:
+            for (i = _m = 0; _m < scanlineLength; i = _m += 1) {
+              abyte = data[pos++];
+              col = (i - i % pixelBytes) / pixelBytes;
+              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];
+
+              if (row === 0) {
+                upper = upperLeft = 0;
+              } else {
+                upper = pixels[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
+                upperLeft = col && pixels[(row - 1) * scanlineLength + (col - 1) * pixelBytes + i % pixelBytes];
+              }
+
+              p = left + upper - upperLeft;
+              pa = Math.abs(p - left);
+              pb = Math.abs(p - upper);
+              pc = Math.abs(p - upperLeft);
+
+              if (pa <= pb && pa <= pc) {
+                paeth = left;
+              } else if (pb <= pc) {
+                paeth = upper;
+              } else {
+                paeth = upperLeft;
+              }
+
+              pixels[c++] = (abyte + paeth) % 256;
+            }
+
+            break;
+
+          default:
+            throw new Error("Invalid filter algorithm: " + data[pos - 1]);
+        }
+
+        if (!isFull) {
+          var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;
+          var partPos = row * scanlineLength;
+
+          for (i = 0; i < w; i += 1) {
+            for (var j = 0; j < pixelBytes; j += 1) {
+              fullPixels[fullPos++] = pixels[partPos++];
+            }
+
+            fullPos += (dx - 1) * pixelBytes;
+          }
+        }
+
+        row++;
+      }
+    }
+
+    if (_this.interlaceMethod == 1) {
+      /*
+          1 6 4 6 2 6 4 6
+          7 7 7 7 7 7 7 7
+          5 6 5 6 5 6 5 6
+          7 7 7 7 7 7 7 7
+          3 6 4 6 3 6 4 6
+          7 7 7 7 7 7 7 7
+          5 6 5 6 5 6 5 6
+          7 7 7 7 7 7 7 7
+        */
+      pass(0, 0, 8, 8); // 1
+
+      /* NOTE these seem to follow the pattern:
+       * pass(x, 0, 2*x, 2*x);
+       * pass(0, x,   x, 2*x);
+       * with x being 4, 2, 1.
+       */
+
+      pass(4, 0, 8, 8); // 2
+
+      pass(0, 4, 4, 8); // 3
+
+      pass(2, 0, 4, 4); // 4
+
+      pass(0, 2, 2, 4); // 5
+
+      pass(1, 0, 2, 2); // 6
+
+      pass(0, 1, 1, 2); // 7
+    } else {
+      pass(0, 0, 1, 1);
+    }
+
+    return fullPixels;
+  };
+
+  PNG.prototype.decodePalette = function () {
+    var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;
+
+    palette = this.palette;
+    transparency = this.transparency.indexed || [];
+    ret = new Uint8Array((transparency.length || 0) + palette.length);
+    pos = 0;
+    length = palette.length;
+    c = 0;
+
+    for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {
+      ret[pos++] = palette[i];
+      ret[pos++] = palette[i + 1];
+      ret[pos++] = palette[i + 2];
+      ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;
+    }
+
+    return ret;
+  };
+
+  PNG.prototype.copyToImageData = function (imageData, pixels) {
+    var alpha, colors, data, i, input, j, k, length, palette, v, _ref;
+
+    colors = this.colors;
+    palette = null;
+    alpha = this.hasAlphaChannel;
+
+    if (this.palette.length) {
+      palette = (_ref = this._decodedPalette) != null ? _ref : this._decodedPalette = this.decodePalette();
+      colors = 4;
+      alpha = true;
+    }
+
+    data = imageData.data || imageData;
+    length = data.length;
+    input = palette || pixels;
+    i = j = 0;
+
+    if (colors === 1) {
+      while (i < length) {
+        k = palette ? pixels[i / 4] * 4 : j;
+        v = input[k++];
+        data[i++] = v;
+        data[i++] = v;
+        data[i++] = v;
+        data[i++] = alpha ? input[k++] : 255;
+        j = k;
+      }
+    } else {
+      while (i < length) {
+        k = palette ? pixels[i / 4] * 4 : j;
+        data[i++] = input[k++];
+        data[i++] = input[k++];
+        data[i++] = input[k++];
+        data[i++] = alpha ? input[k++] : 255;
+        j = k;
+      }
+    }
+  };
+
+  PNG.prototype.decode = function () {
+    var ret;
+    ret = new Uint8Array(this.width * this.height * 4);
+    this.copyToImageData(ret, this.decodePixels());
+    return ret;
+  };
+
+  var hasBrowserCanvas = function hasBrowserCanvas() {
+    if (Object.prototype.toString.call(globalObject) === "[object Window]") {
+      try {
+        scratchCanvas = globalObject.document.createElement("canvas");
+        scratchCtx = scratchCanvas.getContext("2d");
+      } catch (e) {
+        return false;
+      }
+
+      return true;
+    }
+
+    return false;
+  };
+
+  hasBrowserCanvas();
+
+  makeImage = function makeImage(imageData) {
+    if (hasBrowserCanvas() === true) {
+      var img;
+      scratchCtx.width = imageData.width;
+      scratchCtx.height = imageData.height;
+      scratchCtx.clearRect(0, 0, imageData.width, imageData.height);
+      scratchCtx.putImageData(imageData, 0, 0);
+      img = new Image();
+      img.src = scratchCanvas.toDataURL();
+      return img;
+    }
+
+    throw new Error("This method requires a Browser with Canvas-capability.");
+  };
+
+  PNG.prototype.decodeFrames = function (ctx) {
+    var frame, i, imageData, pixels, _i, _len, _ref, _results;
+
+    if (!this.animation) {
+      return;
+    }
+
+    _ref = this.animation.frames;
+    _results = [];
+
+    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
+      frame = _ref[i];
+      imageData = ctx.createImageData(frame.width, frame.height);
+      pixels = this.decodePixels(new Uint8Array(frame.data));
+      this.copyToImageData(imageData, pixels);
+      frame.imageData = imageData;
+
+      _results.push(frame.image = makeImage(imageData));
+    }
+
+    return _results;
+  };
+
+  PNG.prototype.renderFrame = function (ctx, number) {
+    var frame, frames, prev;
+    frames = this.animation.frames;
+    frame = frames[number];
+    prev = frames[number - 1];
+
+    if (number === 0) {
+      ctx.clearRect(0, 0, this.width, this.height);
+    }
+
+    if ((prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND) {
+      ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);
+    } else if ((prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS) {
+      ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);
+    }
+
+    if (frame.blendOp === APNG_BLEND_OP_SOURCE) {
+      ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);
+    }
+
+    return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);
+  };
+
+  PNG.prototype.animate = function (ctx) {
+    var _doFrame,
+        frameNumber,
+        frames,
+        numFrames,
+        numPlays,
+        _ref,
+        _this = this;
+
+    frameNumber = 0;
+    _ref = this.animation, numFrames = _ref.numFrames, frames = _ref.frames, numPlays = _ref.numPlays;
+    return (_doFrame = function doFrame() {
+      var f, frame;
+      f = frameNumber++ % numFrames;
+      frame = frames[f];
+
+      _this.renderFrame(ctx, f);
+
+      if (numFrames > 1 && frameNumber / numFrames < numPlays) {
+        return _this.animation._timeout = setTimeout(_doFrame, frame.delay);
+      }
+    })();
+  };
+
+  PNG.prototype.stopAnimation = function () {
+    var _ref;
+
+    return clearTimeout((_ref = this.animation) != null ? _ref._timeout : void 0);
+  };
+
+  PNG.prototype.render = function (canvas) {
+    var ctx, data;
+
+    if (canvas._png) {
+      canvas._png.stopAnimation();
+    }
+
+    canvas._png = this;
+    canvas.width = this.width;
+    canvas.height = this.height;
+    ctx = canvas.getContext("2d");
+
+    if (this.animation) {
+      this.decodeFrames(ctx);
+      return this.animate(ctx);
+    } else {
+      data = ctx.createImageData(this.width, this.height);
+      this.copyToImageData(data, this.decodePixels());
+      return ctx.putImageData(data, 0, 0);
+    }
+  };
+
+  return PNG;
+}();
+
+/**
+ * @license
+ *
+ * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+/**
+ * jsPDF PNG PlugIn
+ * @name png_support
+ * @module
+ */
+
+(function (jsPDFAPI) {
+  /*
+   * @see http://www.w3.org/TR/PNG-Chunks.html
+   *
+   Color    Allowed      Interpretation
+   Type     Bit Depths
+      0       1,2,4,8,16  Each pixel is a grayscale sample.
+      2       8,16        Each pixel is an R,G,B triple.
+      3       1,2,4,8     Each pixel is a palette index;
+                         a PLTE chunk must appear.
+      4       8,16        Each pixel is a grayscale sample,
+                         followed by an alpha sample.
+      6       8,16        Each pixel is an R,G,B triple,
+                         followed by an alpha sample.
+  */
+
+  /*
+   * PNG filter method types
+   *
+   * @see http://www.w3.org/TR/PNG-Filters.html
+   * @see http://www.libpng.org/pub/png/book/chapter09.html
+   *
+   * This is what the value 'Predictor' in decode params relates to
+   *
+   * 15 is "optimal prediction", which means the prediction algorithm can change from line to line.
+   * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.
+   *
+     0       None
+     1       Sub
+     2       Up
+     3       Average
+     4       Paeth
+   */
+
+  var canCompress = function canCompress(value) {
+    return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();
+  };
+
+  var hasCompressionJS = function hasCompressionJS() {
+    return typeof zlibSync === "function";
+  };
+
+  var compressBytes = function compressBytes(bytes, lineLength, colorsPerPixel, compression) {
+    var level = 4;
+    var filter_method = filterUp;
+
+    switch (compression) {
+      case jsPDFAPI.image_compression.FAST:
+        level = 1;
+        filter_method = filterSub;
+        break;
+
+      case jsPDFAPI.image_compression.MEDIUM:
+        level = 6;
+        filter_method = filterAverage;
+        break;
+
+      case jsPDFAPI.image_compression.SLOW:
+        level = 9;
+        filter_method = filterPaeth;
+        break;
+    }
+
+    bytes = applyPngFilterMethod(bytes, lineLength, colorsPerPixel, filter_method);
+    var dat = zlibSync(bytes, {
+      level: level
+    });
+    return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);
+  };
+
+  var applyPngFilterMethod = function applyPngFilterMethod(bytes, lineLength, colorsPerPixel, filter_method) {
+    var lines = bytes.length / lineLength,
+        result = new Uint8Array(bytes.length + lines),
+        filter_methods = getFilterMethods(),
+        line,
+        prevLine,
+        offset;
+
+    for (var i = 0; i < lines; i += 1) {
+      offset = i * lineLength;
+      line = bytes.subarray(offset, offset + lineLength);
+
+      if (filter_method) {
+        result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);
+      } else {
+        var len = filter_methods.length,
+            results = [];
+
+        for (var j; j < len; j += 1) {
+          results[j] = filter_methods[j](line, colorsPerPixel, prevLine);
+        }
+
+        var ind = getIndexOfSmallestSum(results.concat());
+        result.set(results[ind], offset + i);
+      }
+
+      prevLine = line;
+    }
+
+    return result;
+  };
+
+  var filterNone = function filterNone(line) {
+    /*var result = new Uint8Array(line.length + 1);
+    result[0] = 0;
+    result.set(line, 1);*/
+    var result = Array.apply([], line);
+    result.unshift(0);
+    return result;
+  };
+
+  var filterSub = function filterSub(line, colorsPerPixel) {
+    var result = [],
+        len = line.length,
+        left;
+    result[0] = 1;
+
+    for (var i = 0; i < len; i += 1) {
+      left = line[i - colorsPerPixel] || 0;
+      result[i + 1] = line[i] - left + 0x0100 & 0xff;
+    }
+
+    return result;
+  };
+
+  var filterUp = function filterUp(line, colorsPerPixel, prevLine) {
+    var result = [],
+        len = line.length,
+        up;
+    result[0] = 2;
+
+    for (var i = 0; i < len; i += 1) {
+      up = prevLine && prevLine[i] || 0;
+      result[i + 1] = line[i] - up + 0x0100 & 0xff;
+    }
+
+    return result;
+  };
+
+  var filterAverage = function filterAverage(line, colorsPerPixel, prevLine) {
+    var result = [],
+        len = line.length,
+        left,
+        up;
+    result[0] = 3;
+
+    for (var i = 0; i < len; i += 1) {
+      left = line[i - colorsPerPixel] || 0;
+      up = prevLine && prevLine[i] || 0;
+      result[i + 1] = line[i] + 0x0100 - (left + up >>> 1) & 0xff;
+    }
+
+    return result;
+  };
+
+  var filterPaeth = function filterPaeth(line, colorsPerPixel, prevLine) {
+    var result = [],
+        len = line.length,
+        left,
+        up,
+        upLeft,
+        paeth;
+    result[0] = 4;
+
+    for (var i = 0; i < len; i += 1) {
+      left = line[i - colorsPerPixel] || 0;
+      up = prevLine && prevLine[i] || 0;
+      upLeft = prevLine && prevLine[i - colorsPerPixel] || 0;
+      paeth = paethPredictor(left, up, upLeft);
+      result[i + 1] = line[i] - paeth + 0x0100 & 0xff;
+    }
+
+    return result;
+  };
+
+  var paethPredictor = function paethPredictor(left, up, upLeft) {
+    if (left === up && up === upLeft) {
+      return left;
+    }
+
+    var pLeft = Math.abs(up - upLeft),
+        pUp = Math.abs(left - upLeft),
+        pUpLeft = Math.abs(left + up - upLeft - upLeft);
+    return pLeft <= pUp && pLeft <= pUpLeft ? left : pUp <= pUpLeft ? up : upLeft;
+  };
+
+  var getFilterMethods = function getFilterMethods() {
+    return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];
+  };
+
+  var getIndexOfSmallestSum = function getIndexOfSmallestSum(arrays) {
+    var sum = arrays.map(function (value) {
+      return value.reduce(function (pv, cv) {
+        return pv + Math.abs(cv);
+      }, 0);
+    });
+    return sum.indexOf(Math.min.apply(null, sum));
+  };
+
+  var getPredictorFromCompression = function getPredictorFromCompression(compression) {
+    var predictor;
+
+    switch (compression) {
+      case jsPDFAPI.image_compression.FAST:
+        predictor = 11;
+        break;
+
+      case jsPDFAPI.image_compression.MEDIUM:
+        predictor = 13;
+        break;
+
+      case jsPDFAPI.image_compression.SLOW:
+        predictor = 14;
+        break;
+
+      default:
+        predictor = 12;
+        break;
+    }
+
+    return predictor;
+  };
+  /**
+   * @name processPNG
+   * @function
+   * @ignore
+   */
+
+
+  jsPDFAPI.processPNG = function (imageData, index, alias, compression) {
+
+    var colorSpace,
+        filter = this.decode.FLATE_DECODE,
+        bitsPerComponent,
+        image,
+        decodeParameters = "",
+        trns,
+        colors,
+        pal,
+        smask,
+        pixels,
+        len,
+        alphaData,
+        imgData,
+        hasColors,
+        pixel,
+        i,
+        n;
+    if (this.__addimage__.isArrayBuffer(imageData)) imageData = new Uint8Array(imageData);
+
+    if (this.__addimage__.isArrayBufferView(imageData)) {
+      image = new PNG(imageData);
+      imageData = image.imgData;
+      bitsPerComponent = image.bits;
+      colorSpace = image.colorSpace;
+      colors = image.colors;
+      /*
+       * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.
+       *
+       * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.
+       *
+       * Extract alpha to create two separate images, using the alpha as a sMask
+       */
+
+      if ([4, 6].indexOf(image.colorType) !== -1) {
+        /*
+         * processes 8 bit RGBA and grayscale + alpha images
+         */
+        if (image.bits === 8) {
+          pixels = image.pixelBitlength == 32 ? new Uint32Array(image.decodePixels().buffer) : image.pixelBitlength == 16 ? new Uint16Array(image.decodePixels().buffer) : new Uint8Array(image.decodePixels().buffer);
+          len = pixels.length;
+          imgData = new Uint8Array(len * image.colors);
+          alphaData = new Uint8Array(len);
+          var pDiff = image.pixelBitlength - image.bits;
+          i = 0;
+          n = 0;
+          var pbl;
+
+          for (; i < len; i++) {
+            pixel = pixels[i];
+            pbl = 0;
+
+            while (pbl < pDiff) {
+              imgData[n++] = pixel >>> pbl & 0xff;
+              pbl = pbl + image.bits;
+            }
+
+            alphaData[i] = pixel >>> pbl & 0xff;
+          }
+        }
+        /*
+         * processes 16 bit RGBA and grayscale + alpha images
+         */
+
+
+        if (image.bits === 16) {
+          pixels = new Uint32Array(image.decodePixels().buffer);
+          len = pixels.length;
+          imgData = new Uint8Array(len * (32 / image.pixelBitlength) * image.colors);
+          alphaData = new Uint8Array(len * (32 / image.pixelBitlength));
+          hasColors = image.colors > 1;
+          i = 0;
+          n = 0;
+          var a = 0;
+
+          while (i < len) {
+            pixel = pixels[i++];
+            imgData[n++] = pixel >>> 0 & 0xff;
+
+            if (hasColors) {
+              imgData[n++] = pixel >>> 16 & 0xff;
+              pixel = pixels[i++];
+              imgData[n++] = pixel >>> 0 & 0xff;
+            }
+
+            alphaData[a++] = pixel >>> 16 & 0xff;
+          }
+
+          bitsPerComponent = 8;
+        }
+
+        if (canCompress(compression)) {
+          imageData = compressBytes(imgData, image.width * image.colors, image.colors, compression);
+          smask = compressBytes(alphaData, image.width, 1, compression);
+        } else {
+          imageData = imgData;
+          smask = alphaData;
+          filter = undefined;
+        }
+      }
+      /*
+       * Indexed png. Each pixel is a palette index.
+       */
+
+
+      if (image.colorType === 3) {
+        colorSpace = this.color_spaces.INDEXED;
+        pal = image.palette;
+
+        if (image.transparency.indexed) {
+          var trans = image.transparency.indexed;
+          var total = 0;
+          i = 0;
+          len = trans.length;
+
+          for (; i < len; ++i) {
+            total += trans[i];
+          }
+
+          total = total / 255;
+          /*
+           * a single color is specified as 100% transparent (0),
+           * so we set trns to use a /Mask with that index
+           */
+
+          if (total === len - 1 && trans.indexOf(0) !== -1) {
+            trns = [trans.indexOf(0)];
+            /*
+             * there's more than one colour within the palette that specifies
+             * a transparency value less than 255, so we unroll the pixels to create an image sMask
+             */
+          } else if (total !== len) {
+            pixels = image.decodePixels();
+            alphaData = new Uint8Array(pixels.length);
+            i = 0;
+            len = pixels.length;
+
+            for (; i < len; i++) {
+              alphaData[i] = trans[pixels[i]];
+            }
+
+            smask = compressBytes(alphaData, image.width, 1);
+          }
+        }
+      }
+
+      var predictor = getPredictorFromCompression(compression);
+
+      if (filter === this.decode.FLATE_DECODE) {
+        decodeParameters = "/Predictor " + predictor + " ";
+      }
+
+      decodeParameters += "/Colors " + colors + " /BitsPerComponent " + bitsPerComponent + " /Columns " + image.width;
+
+      if (this.__addimage__.isArrayBuffer(imageData) || this.__addimage__.isArrayBufferView(imageData)) {
+        imageData = this.__addimage__.arrayBufferToBinaryString(imageData);
+      }
+
+      if (smask && this.__addimage__.isArrayBuffer(smask) || this.__addimage__.isArrayBufferView(smask)) {
+        smask = this.__addimage__.arrayBufferToBinaryString(smask);
+      }
+
+      return {
+        alias: alias,
+        data: imageData,
+        index: index,
+        filter: filter,
+        decodeParameters: decodeParameters,
+        transparency: trns,
+        palette: pal,
+        sMask: smask,
+        predictor: predictor,
+        width: image.width,
+        height: image.height,
+        bitsPerComponent: bitsPerComponent,
+        colorSpace: colorSpace
+      };
+    }
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * (c) Dean McNamee <dean@gmail.com>, 2013.
+ *
+ * https://github.com/deanm/omggif
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
+ * including animation and compression.  It does not rely on any specific
+ * underlying system, so should run in the browser, Node, or Plask.
+ */
+
+function GifReader(buf) {
+  var p = 0; // - Header (GIF87a or GIF89a).
+
+  if (buf[p++] !== 0x47 || buf[p++] !== 0x49 || buf[p++] !== 0x46 || buf[p++] !== 0x38 || (buf[p++] + 1 & 0xfd) !== 0x38 || buf[p++] !== 0x61) {
+    throw new Error("Invalid GIF 87a/89a header.");
+  } // - Logical Screen Descriptor.
+
+
+  var width = buf[p++] | buf[p++] << 8;
+  var height = buf[p++] | buf[p++] << 8;
+  var pf0 = buf[p++]; // <Packed Fields>.
+
+  var global_palette_flag = pf0 >> 7;
+  var num_global_colors_pow2 = pf0 & 0x7;
+  var num_global_colors = 1 << num_global_colors_pow2 + 1;
+  var background = buf[p++];
+  buf[p++]; // Pixel aspect ratio (unused?).
+
+  var global_palette_offset = null;
+  var global_palette_size = null;
+
+  if (global_palette_flag) {
+    global_palette_offset = p;
+    global_palette_size = num_global_colors;
+    p += num_global_colors * 3; // Seek past palette.
+  }
+
+  var no_eof = true;
+  var frames = [];
+  var delay = 0;
+  var transparent_index = null;
+  var disposal = 0; // 0 - No disposal specified.
+
+  var loop_count = null;
+  this.width = width;
+  this.height = height;
+
+  while (no_eof && p < buf.length) {
+    switch (buf[p++]) {
+      case 0x21:
+        // Graphics Control Extension Block
+        switch (buf[p++]) {
+          case 0xff:
+            // Application specific block
+            // Try if it's a Netscape block (with animation loop counter).
+            if (buf[p] !== 0x0b || // 21 FF already read, check block size.
+            // NETSCAPE2.0
+            buf[p + 1] == 0x4e && buf[p + 2] == 0x45 && buf[p + 3] == 0x54 && buf[p + 4] == 0x53 && buf[p + 5] == 0x43 && buf[p + 6] == 0x41 && buf[p + 7] == 0x50 && buf[p + 8] == 0x45 && buf[p + 9] == 0x32 && buf[p + 10] == 0x2e && buf[p + 11] == 0x30 && // Sub-block
+            buf[p + 12] == 0x03 && buf[p + 13] == 0x01 && buf[p + 16] == 0) {
+              p += 14;
+              loop_count = buf[p++] | buf[p++] << 8;
+              p++; // Skip terminator.
+            } else {
+              // We don't know what it is, just try to get past it.
+              p += 12;
+
+              while (true) {
+                // Seek through subblocks.
+                var block_size = buf[p++]; // Bad block size (ex: undefined from an out of bounds read).
+
+                if (!(block_size >= 0)) throw Error("Invalid block size");
+                if (block_size === 0) break; // 0 size is terminator
+
+                p += block_size;
+              }
+            }
+
+            break;
+
+          case 0xf9:
+            // Graphics Control Extension
+            if (buf[p++] !== 0x4 || buf[p + 4] !== 0) throw new Error("Invalid graphics extension block.");
+            var pf1 = buf[p++];
+            delay = buf[p++] | buf[p++] << 8;
+            transparent_index = buf[p++];
+            if ((pf1 & 1) === 0) transparent_index = null;
+            disposal = pf1 >> 2 & 0x7;
+            p++; // Skip terminator.
+
+            break;
+
+          case 0xfe:
+            // Comment Extension.
+            while (true) {
+              // Seek through subblocks.
+              var block_size = buf[p++]; // Bad block size (ex: undefined from an out of bounds read).
+
+              if (!(block_size >= 0)) throw Error("Invalid block size");
+              if (block_size === 0) break; // 0 size is terminator
+              // console.log(buf.slice(p, p+block_size).toString('ascii'));
+
+              p += block_size;
+            }
+
+            break;
+
+          default:
+            throw new Error("Unknown graphic control label: 0x" + buf[p - 1].toString(16));
+        }
+
+        break;
+
+      case 0x2c:
+        // Image Descriptor.
+        var x = buf[p++] | buf[p++] << 8;
+        var y = buf[p++] | buf[p++] << 8;
+        var w = buf[p++] | buf[p++] << 8;
+        var h = buf[p++] | buf[p++] << 8;
+        var pf2 = buf[p++];
+        var local_palette_flag = pf2 >> 7;
+        var interlace_flag = pf2 >> 6 & 1;
+        var num_local_colors_pow2 = pf2 & 0x7;
+        var num_local_colors = 1 << num_local_colors_pow2 + 1;
+        var palette_offset = global_palette_offset;
+        var palette_size = global_palette_size;
+        var has_local_palette = false;
+
+        if (local_palette_flag) {
+          var has_local_palette = true;
+          palette_offset = p; // Override with local palette.
+
+          palette_size = num_local_colors;
+          p += num_local_colors * 3; // Seek past palette.
+        }
+
+        var data_offset = p;
+        p++; // codesize
+
+        while (true) {
+          var block_size = buf[p++]; // Bad block size (ex: undefined from an out of bounds read).
+
+          if (!(block_size >= 0)) throw Error("Invalid block size");
+          if (block_size === 0) break; // 0 size is terminator
+
+          p += block_size;
+        }
+
+        frames.push({
+          x: x,
+          y: y,
+          width: w,
+          height: h,
+          has_local_palette: has_local_palette,
+          palette_offset: palette_offset,
+          palette_size: palette_size,
+          data_offset: data_offset,
+          data_length: p - data_offset,
+          transparent_index: transparent_index,
+          interlaced: !!interlace_flag,
+          delay: delay,
+          disposal: disposal
+        });
+        break;
+
+      case 0x3b:
+        // Trailer Marker (end of file).
+        no_eof = false;
+        break;
+
+      default:
+        throw new Error("Unknown gif block: 0x" + buf[p - 1].toString(16));
+    }
+  }
+
+  this.numFrames = function () {
+    return frames.length;
+  };
+
+  this.loopCount = function () {
+    return loop_count;
+  };
+
+  this.frameInfo = function (frame_num) {
+    if (frame_num < 0 || frame_num >= frames.length) throw new Error("Frame index out of range.");
+    return frames[frame_num];
+  };
+
+  this.decodeAndBlitFrameBGRA = function (frame_num, pixels) {
+    var frame = this.frameInfo(frame_num);
+    var num_pixels = frame.width * frame.height;
+    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.
+
+    GifReaderLZWOutputIndexStream(buf, frame.data_offset, index_stream, num_pixels);
+    var palette_offset = frame.palette_offset; // NOTE(deanm): It seems to be much faster to compare index to 256 than
+    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in
+    // the profile, not sure if it's related to using a Uint8Array.
+
+    var trans = frame.transparent_index;
+    if (trans === null) trans = 256; // We are possibly just blitting to a portion of the entire frame.
+    // That is a subrect within the framerect, so the additional pixels
+    // must be skipped over after we finished a scanline.
+
+    var framewidth = frame.width;
+    var framestride = width - framewidth;
+    var xleft = framewidth; // Number of subrect pixels left in scanline.
+    // Output indices of the top left and bottom right corners of the subrect.
+
+    var opbeg = (frame.y * width + frame.x) * 4;
+    var opend = ((frame.y + frame.height) * width + frame.x) * 4;
+    var op = opbeg;
+    var scanstride = framestride * 4; // Use scanstride to skip past the rows when interlacing.  This is skipping
+    // 7 rows for the first two passes, then 3 then 1.
+
+    if (frame.interlaced === true) {
+      scanstride += width * 4 * 7; // Pass 1.
+    }
+
+    var interlaceskip = 8; // Tracking the row interval in the current pass.
+
+    for (var i = 0, il = index_stream.length; i < il; ++i) {
+      var index = index_stream[i];
+
+      if (xleft === 0) {
+        // Beginning of new scan line
+        op += scanstride;
+        xleft = framewidth;
+
+        if (op >= opend) {
+          // Catch the wrap to switch passes when interlacing.
+          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1); // interlaceskip / 2 * 4 is interlaceskip << 1.
+
+          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);
+          interlaceskip >>= 1;
+        }
+      }
+
+      if (index === trans) {
+        op += 4;
+      } else {
+        var r = buf[palette_offset + index * 3];
+        var g = buf[palette_offset + index * 3 + 1];
+        var b = buf[palette_offset + index * 3 + 2];
+        pixels[op++] = b;
+        pixels[op++] = g;
+        pixels[op++] = r;
+        pixels[op++] = 255;
+      }
+
+      --xleft;
+    }
+  }; // I will go to copy and paste hell one day...
+
+
+  this.decodeAndBlitFrameRGBA = function (frame_num, pixels) {
+    var frame = this.frameInfo(frame_num);
+    var num_pixels = frame.width * frame.height;
+    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.
+
+    GifReaderLZWOutputIndexStream(buf, frame.data_offset, index_stream, num_pixels);
+    var palette_offset = frame.palette_offset; // NOTE(deanm): It seems to be much faster to compare index to 256 than
+    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in
+    // the profile, not sure if it's related to using a Uint8Array.
+
+    var trans = frame.transparent_index;
+    if (trans === null) trans = 256; // We are possibly just blitting to a portion of the entire frame.
+    // That is a subrect within the framerect, so the additional pixels
+    // must be skipped over after we finished a scanline.
+
+    var framewidth = frame.width;
+    var framestride = width - framewidth;
+    var xleft = framewidth; // Number of subrect pixels left in scanline.
+    // Output indices of the top left and bottom right corners of the subrect.
+
+    var opbeg = (frame.y * width + frame.x) * 4;
+    var opend = ((frame.y + frame.height) * width + frame.x) * 4;
+    var op = opbeg;
+    var scanstride = framestride * 4; // Use scanstride to skip past the rows when interlacing.  This is skipping
+    // 7 rows for the first two passes, then 3 then 1.
+
+    if (frame.interlaced === true) {
+      scanstride += width * 4 * 7; // Pass 1.
+    }
+
+    var interlaceskip = 8; // Tracking the row interval in the current pass.
+
+    for (var i = 0, il = index_stream.length; i < il; ++i) {
+      var index = index_stream[i];
+
+      if (xleft === 0) {
+        // Beginning of new scan line
+        op += scanstride;
+        xleft = framewidth;
+
+        if (op >= opend) {
+          // Catch the wrap to switch passes when interlacing.
+          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1); // interlaceskip / 2 * 4 is interlaceskip << 1.
+
+          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);
+          interlaceskip >>= 1;
+        }
+      }
+
+      if (index === trans) {
+        op += 4;
+      } else {
+        var r = buf[palette_offset + index * 3];
+        var g = buf[palette_offset + index * 3 + 1];
+        var b = buf[palette_offset + index * 3 + 2];
+        pixels[op++] = r;
+        pixels[op++] = g;
+        pixels[op++] = b;
+        pixels[op++] = 255;
+      }
+
+      --xleft;
+    }
+  };
+}
+
+function GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {
+  var min_code_size = code_stream[p++];
+  var clear_code = 1 << min_code_size;
+  var eoi_code = clear_code + 1;
+  var next_code = eoi_code + 1;
+  var cur_code_size = min_code_size + 1; // Number of bits per code.
+  // NOTE: This shares the same name as the encoder, but has a different
+  // meaning here.  Here this masks each code coming from the code stream.
+
+  var code_mask = (1 << cur_code_size) - 1;
+  var cur_shift = 0;
+  var cur = 0;
+  var op = 0; // Output pointer.
+
+  var subblock_size = code_stream[p++]; // TODO(deanm): Would using a TypedArray be any faster?  At least it would
+  // solve the fast mode / backing store uncertainty.
+  // var code_table = Array(4096);
+
+  var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.
+
+  var prev_code = null; // Track code-1.
+
+  while (true) {
+    // Read up to two bytes, making sure we always 12-bits for max sized code.
+    while (cur_shift < 16) {
+      if (subblock_size === 0) break; // No more data to be read.
+
+      cur |= code_stream[p++] << cur_shift;
+      cur_shift += 8;
+
+      if (subblock_size === 1) {
+        // Never let it get to 0 to hold logic above.
+        subblock_size = code_stream[p++]; // Next subblock.
+      } else {
+        --subblock_size;
+      }
+    } // TODO(deanm): We should never really get here, we should have received
+    // and EOI.
+
+
+    if (cur_shift < cur_code_size) break;
+    var code = cur & code_mask;
+    cur >>= cur_code_size;
+    cur_shift -= cur_code_size; // TODO(deanm): Maybe should check that the first code was a clear code,
+    // at least this is what you're supposed to do.  But actually our encoder
+    // now doesn't emit a clear code first anyway.
+
+    if (code === clear_code) {
+      // We don't actually have to clear the table.  This could be a good idea
+      // for greater error checking, but we don't really do any anyway.  We
+      // will just track it with next_code and overwrite old entries.
+      next_code = eoi_code + 1;
+      cur_code_size = min_code_size + 1;
+      code_mask = (1 << cur_code_size) - 1; // Don't update prev_code ?
+
+      prev_code = null;
+      continue;
+    } else if (code === eoi_code) {
+      break;
+    } // We have a similar situation as the decoder, where we want to store
+    // variable length entries (code table entries), but we want to do in a
+    // faster manner than an array of arrays.  The code below stores sort of a
+    // linked list within the code table, and then "chases" through it to
+    // construct the dictionary entries.  When a new entry is created, just the
+    // last byte is stored, and the rest (prefix) of the entry is only
+    // referenced by its table entry.  Then the code chases through the
+    // prefixes until it reaches a single byte code.  We have to chase twice,
+    // first to compute the length, and then to actually copy the data to the
+    // output (backwards, since we know the length).  The alternative would be
+    // storing something in an intermediate stack, but that doesn't make any
+    // more sense.  I implemented an approach where it also stored the length
+    // in the code table, although it's a bit tricky because you run out of
+    // bits (12 + 12 + 8), but I didn't measure much improvements (the table
+    // entries are generally not the long).  Even when I created benchmarks for
+    // very long table entries the complexity did not seem worth it.
+    // The code table stores the prefix entry in 12 bits and then the suffix
+    // byte in 8 bits, so each entry is 20 bits.
+
+
+    var chase_code = code < next_code ? code : prev_code; // Chase what we will output, either {CODE} or {CODE-1}.
+
+    var chase_length = 0;
+    var chase = chase_code;
+
+    while (chase > clear_code) {
+      chase = code_table[chase] >> 8;
+      ++chase_length;
+    }
+
+    var k = chase;
+    var op_end = op + chase_length + (chase_code !== code ? 1 : 0);
+
+    if (op_end > output_length) {
+      console.log("Warning, gif stream longer than expected.");
+      return;
+    } // Already have the first byte from the chase, might as well write it fast.
+
+
+    output[op++] = k;
+    op += chase_length;
+    var b = op; // Track pointer, writing backwards.
+
+    if (chase_code !== code) // The case of emitting {CODE-1} + k.
+      output[op++] = k;
+    chase = chase_code;
+
+    while (chase_length--) {
+      chase = code_table[chase];
+      output[--b] = chase & 0xff; // Write backwards.
+
+      chase >>= 8; // Pull down to the prefix code.
+    }
+
+    if (prev_code !== null && next_code < 4096) {
+      code_table[next_code++] = prev_code << 8 | k; // TODO(deanm): Figure out this clearing vs code growth logic better.  I
+      // have an feeling that it should just happen somewhere else, for now it
+      // is awkward between when we grow past the max and then hit a clear code.
+      // For now just check if we hit the max 12-bits (then a clear code should
+      // follow, also of course encoded in 12-bits).
+
+      if (next_code >= code_mask + 1 && cur_code_size < 12) {
+        ++cur_code_size;
+        code_mask = code_mask << 1 | 1;
+      }
+    }
+
+    prev_code = code;
+  }
+
+  if (op !== output_length) {
+    console.log("Warning, gif stream shorter than expected.");
+  }
+
+  return output;
+}
+
+/**
+ * @license
+  Copyright (c) 2008, Adobe Systems Incorporated
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without 
+  modification, are permitted provided that the following conditions are
+  met:
+
+  * Redistributions of source code must retain the above copyright notice, 
+    this list of conditions and the following disclaimer.
+  
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the 
+    documentation and/or other materials provided with the distribution.
+  
+  * Neither the name of Adobe Systems Incorporated nor the names of its 
+    contributors may be used to endorse or promote products derived from 
+    this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/*
+JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009
+
+Basic GUI blocking jpeg encoder
+*/
+function JPEGEncoder(quality) {
+  var ffloor = Math.floor;
+  var YTable = new Array(64);
+  var UVTable = new Array(64);
+  var fdtbl_Y = new Array(64);
+  var fdtbl_UV = new Array(64);
+  var YDC_HT;
+  var UVDC_HT;
+  var YAC_HT;
+  var UVAC_HT;
+  var bitcode = new Array(65535);
+  var category = new Array(65535);
+  var outputfDCTQuant = new Array(64);
+  var DU = new Array(64);
+  var byteout = [];
+  var bytenew = 0;
+  var bytepos = 7;
+  var YDU = new Array(64);
+  var UDU = new Array(64);
+  var VDU = new Array(64);
+  var clt = new Array(256);
+  var RGB_YUV_TABLE = new Array(2048);
+  var currentQuality;
+  var ZigZag = [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];
+  var std_dc_luminance_nrcodes = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0];
+  var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
+  var std_ac_luminance_nrcodes = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d];
+  var std_ac_luminance_values = [0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa];
+  var std_dc_chrominance_nrcodes = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0];
+  var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
+  var std_ac_chrominance_nrcodes = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77];
+  var std_ac_chrominance_values = [0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa];
+
+  function initQuantTables(sf) {
+    var YQT = [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];
+
+    for (var i = 0; i < 64; i++) {
+      var t = ffloor((YQT[i] * sf + 50) / 100);
+      t = Math.min(Math.max(t, 1), 255);
+      YTable[ZigZag[i]] = t;
+    }
+
+    var UVQT = [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];
+
+    for (var j = 0; j < 64; j++) {
+      var u = ffloor((UVQT[j] * sf + 50) / 100);
+      u = Math.min(Math.max(u, 1), 255);
+      UVTable[ZigZag[j]] = u;
+    }
+
+    var aasf = [1.0, 1.387039845, 1.306562965, 1.175875602, 1.0, 0.785694958, 0.5411961, 0.275899379];
+    var k = 0;
+
+    for (var row = 0; row < 8; row++) {
+      for (var col = 0; col < 8; col++) {
+        fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);
+        fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);
+        k++;
+      }
+    }
+  }
+
+  function computeHuffmanTbl(nrcodes, std_table) {
+    var codevalue = 0;
+    var pos_in_table = 0;
+    var HT = new Array();
+
+    for (var k = 1; k <= 16; k++) {
+      for (var j = 1; j <= nrcodes[k]; j++) {
+        HT[std_table[pos_in_table]] = [];
+        HT[std_table[pos_in_table]][0] = codevalue;
+        HT[std_table[pos_in_table]][1] = k;
+        pos_in_table++;
+        codevalue++;
+      }
+
+      codevalue *= 2;
+    }
+
+    return HT;
+  }
+
+  function initHuffmanTbl() {
+    YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes, std_dc_luminance_values);
+    UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes, std_dc_chrominance_values);
+    YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes, std_ac_luminance_values);
+    UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes, std_ac_chrominance_values);
+  }
+
+  function initCategoryNumber() {
+    var nrlower = 1;
+    var nrupper = 2;
+
+    for (var cat = 1; cat <= 15; cat++) {
+      //Positive numbers
+      for (var nr = nrlower; nr < nrupper; nr++) {
+        category[32767 + nr] = cat;
+        bitcode[32767 + nr] = [];
+        bitcode[32767 + nr][1] = cat;
+        bitcode[32767 + nr][0] = nr;
+      } //Negative numbers
+
+
+      for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {
+        category[32767 + nrneg] = cat;
+        bitcode[32767 + nrneg] = [];
+        bitcode[32767 + nrneg][1] = cat;
+        bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;
+      }
+
+      nrlower <<= 1;
+      nrupper <<= 1;
+    }
+  }
+
+  function initRGBYUVTable() {
+    for (var i = 0; i < 256; i++) {
+      RGB_YUV_TABLE[i] = 19595 * i;
+      RGB_YUV_TABLE[i + 256 >> 0] = 38470 * i;
+      RGB_YUV_TABLE[i + 512 >> 0] = 7471 * i + 0x8000;
+      RGB_YUV_TABLE[i + 768 >> 0] = -11059 * i;
+      RGB_YUV_TABLE[i + 1024 >> 0] = -21709 * i;
+      RGB_YUV_TABLE[i + 1280 >> 0] = 32768 * i + 0x807fff;
+      RGB_YUV_TABLE[i + 1536 >> 0] = -27439 * i;
+      RGB_YUV_TABLE[i + 1792 >> 0] = -5329 * i;
+    }
+  } // IO functions
+
+
+  function writeBits(bs) {
+    var value = bs[0];
+    var posval = bs[1] - 1;
+
+    while (posval >= 0) {
+      if (value & 1 << posval) {
+        bytenew |= 1 << bytepos;
+      }
+
+      posval--;
+      bytepos--;
+
+      if (bytepos < 0) {
+        if (bytenew == 0xff) {
+          writeByte(0xff);
+          writeByte(0);
+        } else {
+          writeByte(bytenew);
+        }
+
+        bytepos = 7;
+        bytenew = 0;
+      }
+    }
+  }
+
+  function writeByte(value) {
+    //byteout.push(clt[value]); // write char directly instead of converting later
+    byteout.push(value);
+  }
+
+  function writeWord(value) {
+    writeByte(value >> 8 & 0xff);
+    writeByte(value & 0xff);
+  } // DCT & quantization core
+
+
+  function fDCTQuant(data, fdtbl) {
+    var d0, d1, d2, d3, d4, d5, d6, d7;
+    /* Pass 1: process rows. */
+
+    var dataOff = 0;
+    var i;
+    var I8 = 8;
+    var I64 = 64;
+
+    for (i = 0; i < I8; ++i) {
+      d0 = data[dataOff];
+      d1 = data[dataOff + 1];
+      d2 = data[dataOff + 2];
+      d3 = data[dataOff + 3];
+      d4 = data[dataOff + 4];
+      d5 = data[dataOff + 5];
+      d6 = data[dataOff + 6];
+      d7 = data[dataOff + 7];
+      var tmp0 = d0 + d7;
+      var tmp7 = d0 - d7;
+      var tmp1 = d1 + d6;
+      var tmp6 = d1 - d6;
+      var tmp2 = d2 + d5;
+      var tmp5 = d2 - d5;
+      var tmp3 = d3 + d4;
+      var tmp4 = d3 - d4;
+      /* Even part */
+
+      var tmp10 = tmp0 + tmp3;
+      /* phase 2 */
+
+      var tmp13 = tmp0 - tmp3;
+      var tmp11 = tmp1 + tmp2;
+      var tmp12 = tmp1 - tmp2;
+      data[dataOff] = tmp10 + tmp11;
+      /* phase 3 */
+
+      data[dataOff + 4] = tmp10 - tmp11;
+      var z1 = (tmp12 + tmp13) * 0.707106781;
+      /* c4 */
+
+      data[dataOff + 2] = tmp13 + z1;
+      /* phase 5 */
+
+      data[dataOff + 6] = tmp13 - z1;
+      /* Odd part */
+
+      tmp10 = tmp4 + tmp5;
+      /* phase 2 */
+
+      tmp11 = tmp5 + tmp6;
+      tmp12 = tmp6 + tmp7;
+      /* The rotator is modified from fig 4-8 to avoid extra negations. */
+
+      var z5 = (tmp10 - tmp12) * 0.382683433;
+      /* c6 */
+
+      var z2 = 0.5411961 * tmp10 + z5;
+      /* c2-c6 */
+
+      var z4 = 1.306562965 * tmp12 + z5;
+      /* c2+c6 */
+
+      var z3 = tmp11 * 0.707106781;
+      /* c4 */
+
+      var z11 = tmp7 + z3;
+      /* phase 5 */
+
+      var z13 = tmp7 - z3;
+      data[dataOff + 5] = z13 + z2;
+      /* phase 6 */
+
+      data[dataOff + 3] = z13 - z2;
+      data[dataOff + 1] = z11 + z4;
+      data[dataOff + 7] = z11 - z4;
+      dataOff += 8;
+      /* advance pointer to next row */
+    }
+    /* Pass 2: process columns. */
+
+
+    dataOff = 0;
+
+    for (i = 0; i < I8; ++i) {
+      d0 = data[dataOff];
+      d1 = data[dataOff + 8];
+      d2 = data[dataOff + 16];
+      d3 = data[dataOff + 24];
+      d4 = data[dataOff + 32];
+      d5 = data[dataOff + 40];
+      d6 = data[dataOff + 48];
+      d7 = data[dataOff + 56];
+      var tmp0p2 = d0 + d7;
+      var tmp7p2 = d0 - d7;
+      var tmp1p2 = d1 + d6;
+      var tmp6p2 = d1 - d6;
+      var tmp2p2 = d2 + d5;
+      var tmp5p2 = d2 - d5;
+      var tmp3p2 = d3 + d4;
+      var tmp4p2 = d3 - d4;
+      /* Even part */
+
+      var tmp10p2 = tmp0p2 + tmp3p2;
+      /* phase 2 */
+
+      var tmp13p2 = tmp0p2 - tmp3p2;
+      var tmp11p2 = tmp1p2 + tmp2p2;
+      var tmp12p2 = tmp1p2 - tmp2p2;
+      data[dataOff] = tmp10p2 + tmp11p2;
+      /* phase 3 */
+
+      data[dataOff + 32] = tmp10p2 - tmp11p2;
+      var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781;
+      /* c4 */
+
+      data[dataOff + 16] = tmp13p2 + z1p2;
+      /* phase 5 */
+
+      data[dataOff + 48] = tmp13p2 - z1p2;
+      /* Odd part */
+
+      tmp10p2 = tmp4p2 + tmp5p2;
+      /* phase 2 */
+
+      tmp11p2 = tmp5p2 + tmp6p2;
+      tmp12p2 = tmp6p2 + tmp7p2;
+      /* The rotator is modified from fig 4-8 to avoid extra negations. */
+
+      var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433;
+      /* c6 */
+
+      var z2p2 = 0.5411961 * tmp10p2 + z5p2;
+      /* c2-c6 */
+
+      var z4p2 = 1.306562965 * tmp12p2 + z5p2;
+      /* c2+c6 */
+
+      var z3p2 = tmp11p2 * 0.707106781;
+      /* c4 */
+
+      var z11p2 = tmp7p2 + z3p2;
+      /* phase 5 */
+
+      var z13p2 = tmp7p2 - z3p2;
+      data[dataOff + 40] = z13p2 + z2p2;
+      /* phase 6 */
+
+      data[dataOff + 24] = z13p2 - z2p2;
+      data[dataOff + 8] = z11p2 + z4p2;
+      data[dataOff + 56] = z11p2 - z4p2;
+      dataOff++;
+      /* advance pointer to next column */
+    } // Quantize/descale the coefficients
+
+
+    var fDCTQuant;
+
+    for (i = 0; i < I64; ++i) {
+      // Apply the quantization and scaling factor & Round to nearest integer
+      fDCTQuant = data[i] * fdtbl[i];
+      outputfDCTQuant[i] = fDCTQuant > 0.0 ? fDCTQuant + 0.5 | 0 : fDCTQuant - 0.5 | 0; //outputfDCTQuant[i] = fround(fDCTQuant);
+    }
+
+    return outputfDCTQuant;
+  }
+
+  function writeAPP0() {
+    writeWord(0xffe0); // marker
+
+    writeWord(16); // length
+
+    writeByte(0x4a); // J
+
+    writeByte(0x46); // F
+
+    writeByte(0x49); // I
+
+    writeByte(0x46); // F
+
+    writeByte(0); // = "JFIF",'\0'
+
+    writeByte(1); // versionhi
+
+    writeByte(1); // versionlo
+
+    writeByte(0); // xyunits
+
+    writeWord(1); // xdensity
+
+    writeWord(1); // ydensity
+
+    writeByte(0); // thumbnwidth
+
+    writeByte(0); // thumbnheight
+  }
+
+  function writeSOF0(width, height) {
+    writeWord(0xffc0); // marker
+
+    writeWord(17); // length, truecolor YUV JPG
+
+    writeByte(8); // precision
+
+    writeWord(height);
+    writeWord(width);
+    writeByte(3); // nrofcomponents
+
+    writeByte(1); // IdY
+
+    writeByte(0x11); // HVY
+
+    writeByte(0); // QTY
+
+    writeByte(2); // IdU
+
+    writeByte(0x11); // HVU
+
+    writeByte(1); // QTU
+
+    writeByte(3); // IdV
+
+    writeByte(0x11); // HVV
+
+    writeByte(1); // QTV
+  }
+
+  function writeDQT() {
+    writeWord(0xffdb); // marker
+
+    writeWord(132); // length
+
+    writeByte(0);
+
+    for (var i = 0; i < 64; i++) {
+      writeByte(YTable[i]);
+    }
+
+    writeByte(1);
+
+    for (var j = 0; j < 64; j++) {
+      writeByte(UVTable[j]);
+    }
+  }
+
+  function writeDHT() {
+    writeWord(0xffc4); // marker
+
+    writeWord(0x01a2); // length
+
+    writeByte(0); // HTYDCinfo
+
+    for (var i = 0; i < 16; i++) {
+      writeByte(std_dc_luminance_nrcodes[i + 1]);
+    }
+
+    for (var j = 0; j <= 11; j++) {
+      writeByte(std_dc_luminance_values[j]);
+    }
+
+    writeByte(0x10); // HTYACinfo
+
+    for (var k = 0; k < 16; k++) {
+      writeByte(std_ac_luminance_nrcodes[k + 1]);
+    }
+
+    for (var l = 0; l <= 161; l++) {
+      writeByte(std_ac_luminance_values[l]);
+    }
+
+    writeByte(1); // HTUDCinfo
+
+    for (var m = 0; m < 16; m++) {
+      writeByte(std_dc_chrominance_nrcodes[m + 1]);
+    }
+
+    for (var n = 0; n <= 11; n++) {
+      writeByte(std_dc_chrominance_values[n]);
+    }
+
+    writeByte(0x11); // HTUACinfo
+
+    for (var o = 0; o < 16; o++) {
+      writeByte(std_ac_chrominance_nrcodes[o + 1]);
+    }
+
+    for (var p = 0; p <= 161; p++) {
+      writeByte(std_ac_chrominance_values[p]);
+    }
+  }
+
+  function writeSOS() {
+    writeWord(0xffda); // marker
+
+    writeWord(12); // length
+
+    writeByte(3); // nrofcomponents
+
+    writeByte(1); // IdY
+
+    writeByte(0); // HTY
+
+    writeByte(2); // IdU
+
+    writeByte(0x11); // HTU
+
+    writeByte(3); // IdV
+
+    writeByte(0x11); // HTV
+
+    writeByte(0); // Ss
+
+    writeByte(0x3f); // Se
+
+    writeByte(0); // Bf
+  }
+
+  function processDU(CDU, fdtbl, DC, HTDC, HTAC) {
+    var EOB = HTAC[0x00];
+    var M16zeroes = HTAC[0xf0];
+    var pos;
+    var I16 = 16;
+    var I63 = 63;
+    var I64 = 64;
+    var DU_DCT = fDCTQuant(CDU, fdtbl); //ZigZag reorder
+
+    for (var j = 0; j < I64; ++j) {
+      DU[ZigZag[j]] = DU_DCT[j];
+    }
+
+    var Diff = DU[0] - DC;
+    DC = DU[0]; //Encode DC
+
+    if (Diff == 0) {
+      writeBits(HTDC[0]); // Diff might be 0
+    } else {
+      pos = 32767 + Diff;
+      writeBits(HTDC[category[pos]]);
+      writeBits(bitcode[pos]);
+    } //Encode ACs
+
+
+    var end0pos = 63; // was const... which is crazy
+
+    while (end0pos > 0 && DU[end0pos] == 0) {
+      end0pos--;
+    } //end0pos = first element in reverse order !=0
+
+
+    if (end0pos == 0) {
+      writeBits(EOB);
+      return DC;
+    }
+
+    var i = 1;
+    var lng;
+
+    while (i <= end0pos) {
+      var startpos = i;
+
+      while (DU[i] == 0 && i <= end0pos) {
+        ++i;
+      }
+
+      var nrzeroes = i - startpos;
+
+      if (nrzeroes >= I16) {
+        lng = nrzeroes >> 4;
+
+        for (var nrmarker = 1; nrmarker <= lng; ++nrmarker) {
+          writeBits(M16zeroes);
+        }
+
+        nrzeroes = nrzeroes & 0xf;
+      }
+
+      pos = 32767 + DU[i];
+      writeBits(HTAC[(nrzeroes << 4) + category[pos]]);
+      writeBits(bitcode[pos]);
+      i++;
+    }
+
+    if (end0pos != I63) {
+      writeBits(EOB);
+    }
+
+    return DC;
+  }
+
+  function initCharLookupTable() {
+    var sfcc = String.fromCharCode;
+
+    for (var i = 0; i < 256; i++) {
+      ///// ACHTUNG // 255
+      clt[i] = sfcc(i);
+    }
+  }
+
+  this.encode = function (image, quality // image data object
+  ) {
+    if (quality) setQuality(quality); // Initialize bit writer
+
+    byteout = new Array();
+    bytenew = 0;
+    bytepos = 7; // Add JPEG headers
+
+    writeWord(0xffd8); // SOI
+
+    writeAPP0();
+    writeDQT();
+    writeSOF0(image.width, image.height);
+    writeDHT();
+    writeSOS(); // Encode 8x8 macroblocks
+
+    var DCY = 0;
+    var DCU = 0;
+    var DCV = 0;
+    bytenew = 0;
+    bytepos = 7;
+    this.encode.displayName = "_encode_";
+    var imageData = image.data;
+    var width = image.width;
+    var height = image.height;
+    var quadWidth = width * 4;
+    var x,
+        y = 0;
+    var r, g, b;
+    var start, p, col, row, pos;
+
+    while (y < height) {
+      x = 0;
+
+      while (x < quadWidth) {
+        start = quadWidth * y + x;
+        col = -1;
+        row = 0;
+
+        for (pos = 0; pos < 64; pos++) {
+          row = pos >> 3; // /8
+
+          col = (pos & 7) * 4; // %8
+
+          p = start + row * quadWidth + col;
+
+          if (y + row >= height) {
+            // padding bottom
+            p -= quadWidth * (y + 1 + row - height);
+          }
+
+          if (x + col >= quadWidth) {
+            // padding right
+            p -= x + col - quadWidth + 4;
+          }
+
+          r = imageData[p++];
+          g = imageData[p++];
+          b = imageData[p++];
+          /* // calculate YUV values dynamically
+          YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80
+          UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));
+          VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));
+          */
+          // use lookup table (slightly faster)
+
+          YDU[pos] = (RGB_YUV_TABLE[r] + RGB_YUV_TABLE[g + 256 >> 0] + RGB_YUV_TABLE[b + 512 >> 0] >> 16) - 128;
+          UDU[pos] = (RGB_YUV_TABLE[r + 768 >> 0] + RGB_YUV_TABLE[g + 1024 >> 0] + RGB_YUV_TABLE[b + 1280 >> 0] >> 16) - 128;
+          VDU[pos] = (RGB_YUV_TABLE[r + 1280 >> 0] + RGB_YUV_TABLE[g + 1536 >> 0] + RGB_YUV_TABLE[b + 1792 >> 0] >> 16) - 128;
+        }
+
+        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
+        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
+        x += 32;
+      }
+
+      y += 8;
+    } ////////////////////////////////////////////////////////////////
+    // Do the bit alignment of the EOI marker
+
+
+    if (bytepos >= 0) {
+      var fillbits = [];
+      fillbits[1] = bytepos + 1;
+      fillbits[0] = (1 << bytepos + 1) - 1;
+      writeBits(fillbits);
+    }
+
+    writeWord(0xffd9); //EOI
+
+    return new Uint8Array(byteout);
+  };
+
+  function setQuality(quality) {
+    quality = Math.min(Math.max(quality, 1), 100);
+    if (currentQuality == quality) return; // don't recalc if unchanged
+
+    var sf = quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);
+    initQuantTables(sf);
+    currentQuality = quality; //console.log('Quality set to: '+quality +'%');
+  }
+
+  function init() {
+    quality = quality || 50; // Create tables
+
+    initCharLookupTable();
+    initHuffmanTbl();
+    initCategoryNumber();
+    initRGBYUVTable();
+    setQuality(quality);
+  }
+
+  init();
+}
+
+/**
+ * @license
+ * Copyright (c) 2017 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * jsPDF Gif Support PlugIn
+ *
+ * @name gif_support
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  jsPDFAPI.processGIF89A = function (imageData, index, alias, compression) {
+    var reader = new GifReader(imageData);
+    var width = reader.width,
+        height = reader.height;
+    var qu = 100;
+    var pixels = [];
+    reader.decodeAndBlitFrameRGBA(0, pixels);
+    var rawImageData = {
+      data: pixels,
+      width: width,
+      height: height
+    };
+    var encoder = new JPEGEncoder(qu);
+    var data = encoder.encode(rawImageData, qu);
+    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);
+  };
+
+  jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;
+})(jsPDF.API);
+
+/**
+ * @author shaozilee
+ *
+ * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp
+ *
+ */
+
+function BmpDecoder(buffer, is_with_alpha) {
+  this.pos = 0;
+  this.buffer = buffer;
+  this.datav = new DataView(buffer.buffer);
+  this.is_with_alpha = !!is_with_alpha;
+  this.bottom_up = true;
+  this.flag = String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);
+  this.pos += 2;
+  if (["BM", "BA", "CI", "CP", "IC", "PT"].indexOf(this.flag) === -1) throw new Error("Invalid BMP File");
+  this.parseHeader();
+  this.parseBGR();
+}
+
+BmpDecoder.prototype.parseHeader = function () {
+  this.fileSize = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.reserved = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.offset = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.headerSize = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.width = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.height = this.datav.getInt32(this.pos, true);
+  this.pos += 4;
+  this.planes = this.datav.getUint16(this.pos, true);
+  this.pos += 2;
+  this.bitPP = this.datav.getUint16(this.pos, true);
+  this.pos += 2;
+  this.compress = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.rawSize = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.hr = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.vr = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.colors = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.importantColors = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+
+  if (this.bitPP === 16 && this.is_with_alpha) {
+    this.bitPP = 15;
+  }
+
+  if (this.bitPP < 15) {
+    var len = this.colors === 0 ? 1 << this.bitPP : this.colors;
+    this.palette = new Array(len);
+
+    for (var i = 0; i < len; i++) {
+      var blue = this.datav.getUint8(this.pos++, true);
+      var green = this.datav.getUint8(this.pos++, true);
+      var red = this.datav.getUint8(this.pos++, true);
+      var quad = this.datav.getUint8(this.pos++, true);
+      this.palette[i] = {
+        red: red,
+        green: green,
+        blue: blue,
+        quad: quad
+      };
+    }
+  }
+
+  if (this.height < 0) {
+    this.height *= -1;
+    this.bottom_up = false;
+  }
+};
+
+BmpDecoder.prototype.parseBGR = function () {
+  this.pos = this.offset;
+
+  try {
+    var bitn = "bit" + this.bitPP;
+    var len = this.width * this.height * 4;
+    this.data = new Uint8Array(len);
+    this[bitn]();
+  } catch (e) {
+    console.log("bit decode error:" + e);
+  }
+};
+
+BmpDecoder.prototype.bit1 = function () {
+  var xlen = Math.ceil(this.width / 8);
+  var mode = xlen % 4;
+  var y;
+
+  for (y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+
+    for (var x = 0; x < xlen; x++) {
+      var b = this.datav.getUint8(this.pos++, true);
+      var location = line * this.width * 4 + x * 8 * 4;
+
+      for (var i = 0; i < 8; i++) {
+        if (x * 8 + i < this.width) {
+          var rgb = this.palette[b >> 7 - i & 0x1];
+          this.data[location + i * 4] = rgb.blue;
+          this.data[location + i * 4 + 1] = rgb.green;
+          this.data[location + i * 4 + 2] = rgb.red;
+          this.data[location + i * 4 + 3] = 0xff;
+        } else {
+          break;
+        }
+      }
+    }
+
+    if (mode !== 0) {
+      this.pos += 4 - mode;
+    }
+  }
+};
+
+BmpDecoder.prototype.bit4 = function () {
+  var xlen = Math.ceil(this.width / 2);
+  var mode = xlen % 4;
+
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+
+    for (var x = 0; x < xlen; x++) {
+      var b = this.datav.getUint8(this.pos++, true);
+      var location = line * this.width * 4 + x * 2 * 4;
+      var before = b >> 4;
+      var after = b & 0x0f;
+      var rgb = this.palette[before];
+      this.data[location] = rgb.blue;
+      this.data[location + 1] = rgb.green;
+      this.data[location + 2] = rgb.red;
+      this.data[location + 3] = 0xff;
+      if (x * 2 + 1 >= this.width) break;
+      rgb = this.palette[after];
+      this.data[location + 4] = rgb.blue;
+      this.data[location + 4 + 1] = rgb.green;
+      this.data[location + 4 + 2] = rgb.red;
+      this.data[location + 4 + 3] = 0xff;
+    }
+
+    if (mode !== 0) {
+      this.pos += 4 - mode;
+    }
+  }
+};
+
+BmpDecoder.prototype.bit8 = function () {
+  var mode = this.width % 4;
+
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+
+    for (var x = 0; x < this.width; x++) {
+      var b = this.datav.getUint8(this.pos++, true);
+      var location = line * this.width * 4 + x * 4;
+
+      if (b < this.palette.length) {
+        var rgb = this.palette[b];
+        this.data[location] = rgb.red;
+        this.data[location + 1] = rgb.green;
+        this.data[location + 2] = rgb.blue;
+        this.data[location + 3] = 0xff;
+      } else {
+        this.data[location] = 0xff;
+        this.data[location + 1] = 0xff;
+        this.data[location + 2] = 0xff;
+        this.data[location + 3] = 0xff;
+      }
+    }
+
+    if (mode !== 0) {
+      this.pos += 4 - mode;
+    }
+  }
+};
+
+BmpDecoder.prototype.bit15 = function () {
+  var dif_w = this.width % 3;
+
+  var _11111 = parseInt("11111", 2),
+      _1_5 = _11111;
+
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+
+    for (var x = 0; x < this.width; x++) {
+      var B = this.datav.getUint16(this.pos, true);
+      this.pos += 2;
+      var blue = (B & _1_5) / _1_5 * 255 | 0;
+      var green = (B >> 5 & _1_5) / _1_5 * 255 | 0;
+      var red = (B >> 10 & _1_5) / _1_5 * 255 | 0;
+      var alpha = B >> 15 ? 0xff : 0x00;
+      var location = line * this.width * 4 + x * 4;
+      this.data[location] = red;
+      this.data[location + 1] = green;
+      this.data[location + 2] = blue;
+      this.data[location + 3] = alpha;
+    } //skip extra bytes
+
+
+    this.pos += dif_w;
+  }
+};
+
+BmpDecoder.prototype.bit16 = function () {
+  var dif_w = this.width % 3;
+
+  var _11111 = parseInt("11111", 2),
+      _1_5 = _11111;
+
+  var _111111 = parseInt("111111", 2),
+      _1_6 = _111111;
+
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+
+    for (var x = 0; x < this.width; x++) {
+      var B = this.datav.getUint16(this.pos, true);
+      this.pos += 2;
+      var alpha = 0xff;
+      var blue = (B & _1_5) / _1_5 * 255 | 0;
+      var green = (B >> 5 & _1_6) / _1_6 * 255 | 0;
+      var red = (B >> 11) / _1_5 * 255 | 0;
+      var location = line * this.width * 4 + x * 4;
+      this.data[location] = red;
+      this.data[location + 1] = green;
+      this.data[location + 2] = blue;
+      this.data[location + 3] = alpha;
+    } //skip extra bytes
+
+
+    this.pos += dif_w;
+  }
+};
+
+BmpDecoder.prototype.bit24 = function () {
+  //when height > 0
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+
+    for (var x = 0; x < this.width; x++) {
+      var blue = this.datav.getUint8(this.pos++, true);
+      var green = this.datav.getUint8(this.pos++, true);
+      var red = this.datav.getUint8(this.pos++, true);
+      var location = line * this.width * 4 + x * 4;
+      this.data[location] = red;
+      this.data[location + 1] = green;
+      this.data[location + 2] = blue;
+      this.data[location + 3] = 0xff;
+    } //skip extra bytes
+
+
+    this.pos += this.width % 4;
+  }
+};
+/**
+ * add 32bit decode func
+ * @author soubok
+ */
+
+
+BmpDecoder.prototype.bit32 = function () {
+  //when height > 0
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+
+    for (var x = 0; x < this.width; x++) {
+      var blue = this.datav.getUint8(this.pos++, true);
+      var green = this.datav.getUint8(this.pos++, true);
+      var red = this.datav.getUint8(this.pos++, true);
+      var alpha = this.datav.getUint8(this.pos++, true);
+      var location = line * this.width * 4 + x * 4;
+      this.data[location] = red;
+      this.data[location + 1] = green;
+      this.data[location + 2] = blue;
+      this.data[location + 3] = alpha;
+    } //skip extra bytes
+    //this.pos += (this.width % 4);
+
+  }
+};
+
+BmpDecoder.prototype.getData = function () {
+  return this.data;
+};
+
+/**
+ * @license
+ * Copyright (c) 2018 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * jsPDF bmp Support PlugIn
+ * @name bmp_support
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  jsPDFAPI.processBMP = function (imageData, index, alias, compression) {
+    var reader = new BmpDecoder(imageData, false);
+    var width = reader.width,
+        height = reader.height;
+    var qu = 100;
+    var pixels = reader.getData();
+    var rawImageData = {
+      data: pixels,
+      width: width,
+      height: height
+    };
+    var encoder = new JPEGEncoder(qu);
+    var data = encoder.encode(rawImageData, qu);
+    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);
+  };
+})(jsPDF.API);
+
+function WebPDecoder(imageData) {
+
+  function x(F) {
+    if (!F) throw Error("assert :P");
+  }
+
+  function fa(F, L, J) {
+    for (var H = 0; 4 > H; H++) {
+      if (F[L + H] != J.charCodeAt(H)) return !0;
+    }
+
+    return !1;
+  }
+
+  function I(F, L, J, H, Z) {
+    for (var O = 0; O < Z; O++) {
+      F[L + O] = J[H + O];
+    }
+  }
+
+  function M(F, L, J, H) {
+    for (var Z = 0; Z < H; Z++) {
+      F[L + Z] = J;
+    }
+  }
+
+  function V(F) {
+    return new Int32Array(F);
+  }
+
+  function wa(F, L) {
+    for (var J = [], H = 0; H < F; H++) {
+      J.push(new L());
+    }
+
+    return J;
+  }
+
+  function wb() {
+    function F(J, H, Z) {
+      for (var O = Z[H], L = 0; L < O; L++) {
+        J.push(Z.length > H + 1 ? [] : 0);
+        if (Z.length < H + 1) break;
+        F(J[L], H + 1, Z);
+      }
+    }
+
+    var L = [];
+    F(L, 0, [3, 11]);
+    return L;
+  }
+
+  function Ed(F, L) {
+    function J(H, O, F) {
+      for (var Z = F[O], ma = 0; ma < Z; ma++) {
+        H.push(F.length > O + 1 ? [] : new L());
+        if (F.length < O + 1) break;
+        J(H[ma], O + 1, F);
+      }
+    }
+
+    var H = [];
+    J(H, 0, F);
+    return H;
+  }
+
+  var _WebPDecoder = function _WebPDecoder() {
+    var self = this;
+
+    function L(a, b) {
+      for (var c = 1 << b - 1 >>> 0; a & c;) {
+        c >>>= 1;
+      }
+
+      return c ? (a & c - 1) + c : a;
+    }
+
+    function J(a, b, c, d, e) {
+      x(!(d % c));
+
+      do {
+        d -= c, a[b + d] = e;
+      } while (0 < d);
+    }
+
+    function H(a, b, c, d, e, f) {
+      var g = b,
+          h = 1 << c,
+          k,
+          l,
+          m = V(16),
+          n = V(16);
+      x(0 != e);
+      x(null != d);
+      x(null != a);
+      x(0 < c);
+
+      for (l = 0; l < e; ++l) {
+        if (15 < d[l]) return 0;
+        ++m[d[l]];
+      }
+
+      if (m[0] == e) return 0;
+      n[1] = 0;
+
+      for (k = 1; 15 > k; ++k) {
+        if (m[k] > 1 << k) return 0;
+        n[k + 1] = n[k] + m[k];
+      }
+
+      for (l = 0; l < e; ++l) {
+        k = d[l], 0 < d[l] && (f[n[k]++] = l);
+      }
+
+      if (1 == n[15]) return d = new O(), d.g = 0, d.value = f[0], J(a, g, 1, h, d), h;
+      var r = -1,
+          q = h - 1,
+          t = 0,
+          v = 1,
+          p = 1,
+          u,
+          w = 1 << c;
+      l = 0;
+      k = 1;
+
+      for (e = 2; k <= c; ++k, e <<= 1) {
+        p <<= 1;
+        v += p;
+        p -= m[k];
+        if (0 > p) return 0;
+
+        for (; 0 < m[k]; --m[k]) {
+          d = new O(), d.g = k, d.value = f[l++], J(a, g + t, e, w, d), t = L(t, k);
+        }
+      }
+
+      k = c + 1;
+
+      for (e = 2; 15 >= k; ++k, e <<= 1) {
+        p <<= 1;
+        v += p;
+        p -= m[k];
+        if (0 > p) return 0;
+
+        for (; 0 < m[k]; --m[k]) {
+          d = new O();
+
+          if ((t & q) != r) {
+            g += w;
+            r = k;
+
+            for (u = 1 << r - c; 15 > r;) {
+              u -= m[r];
+              if (0 >= u) break;
+              ++r;
+              u <<= 1;
+            }
+
+            u = r - c;
+            w = 1 << u;
+            h += w;
+            r = t & q;
+            a[b + r].g = u + c;
+            a[b + r].value = g - b - r;
+          }
+
+          d.g = k - c;
+          d.value = f[l++];
+          J(a, g + (t >> c), e, w, d);
+          t = L(t, k);
+        }
+      }
+
+      return v != 2 * n[15] - 1 ? 0 : h;
+    }
+
+    function Z(a, b, c, d, e) {
+      x(2328 >= e);
+      if (512 >= e) var f = V(512);else if (f = V(e), null == f) return 0;
+      return H(a, b, c, d, e, f);
+    }
+
+    function O() {
+      this.value = this.g = 0;
+    }
+
+    function Fd() {
+      this.value = this.g = 0;
+    }
+
+    function Ub() {
+      this.G = wa(5, O);
+      this.H = V(5);
+      this.jc = this.Qb = this.qb = this.nd = 0;
+      this.pd = wa(xb, Fd);
+    }
+
+    function ma(a, b, c, d) {
+      x(null != a);
+      x(null != b);
+      x(2147483648 > d);
+      a.Ca = 254;
+      a.I = 0;
+      a.b = -8;
+      a.Ka = 0;
+      a.oa = b;
+      a.pa = c;
+      a.Jd = b;
+      a.Yc = c + d;
+      a.Zc = 4 <= d ? c + d - 4 + 1 : c;
+      Qa(a);
+    }
+
+    function na(a, b) {
+      for (var c = 0; 0 < b--;) {
+        c |= K(a, 128) << b;
+      }
+
+      return c;
+    }
+
+    function ca(a, b) {
+      var c = na(a, b);
+      return G(a) ? -c : c;
+    }
+
+    function cb(a, b, c, d) {
+      var e,
+          f = 0;
+      x(null != a);
+      x(null != b);
+      x(4294967288 > d);
+      a.Sb = d;
+      a.Ra = 0;
+      a.u = 0;
+      a.h = 0;
+      4 < d && (d = 4);
+
+      for (e = 0; e < d; ++e) {
+        f += b[c + e] << 8 * e;
+      }
+
+      a.Ra = f;
+      a.bb = d;
+      a.oa = b;
+      a.pa = c;
+    }
+
+    function Vb(a) {
+      for (; 8 <= a.u && a.bb < a.Sb;) {
+        a.Ra >>>= 8, a.Ra += a.oa[a.pa + a.bb] << ob - 8 >>> 0, ++a.bb, a.u -= 8;
+      }
+
+      db(a) && (a.h = 1, a.u = 0);
+    }
+
+    function D(a, b) {
+      x(0 <= b);
+
+      if (!a.h && b <= Gd) {
+        var c = pb(a) & Hd[b];
+        a.u += b;
+        Vb(a);
+        return c;
+      }
+
+      a.h = 1;
+      return a.u = 0;
+    }
+
+    function Wb() {
+      this.b = this.Ca = this.I = 0;
+      this.oa = [];
+      this.pa = 0;
+      this.Jd = [];
+      this.Yc = 0;
+      this.Zc = [];
+      this.Ka = 0;
+    }
+
+    function Ra() {
+      this.Ra = 0;
+      this.oa = [];
+      this.h = this.u = this.bb = this.Sb = this.pa = 0;
+    }
+
+    function pb(a) {
+      return a.Ra >>> (a.u & ob - 1) >>> 0;
+    }
+
+    function db(a) {
+      x(a.bb <= a.Sb);
+      return a.h || a.bb == a.Sb && a.u > ob;
+    }
+
+    function qb(a, b) {
+      a.u = b;
+      a.h = db(a);
+    }
+
+    function Sa(a) {
+      a.u >= Xb && (x(a.u >= Xb), Vb(a));
+    }
+
+    function Qa(a) {
+      x(null != a && null != a.oa);
+      a.pa < a.Zc ? (a.I = (a.oa[a.pa++] | a.I << 8) >>> 0, a.b += 8) : (x(null != a && null != a.oa), a.pa < a.Yc ? (a.b += 8, a.I = a.oa[a.pa++] | a.I << 8) : a.Ka ? a.b = 0 : (a.I <<= 8, a.b += 8, a.Ka = 1));
+    }
+
+    function G(a) {
+      return na(a, 1);
+    }
+
+    function K(a, b) {
+      var c = a.Ca;
+      0 > a.b && Qa(a);
+      var d = a.b,
+          e = c * b >>> 8,
+          f = (a.I >>> d > e) + 0;
+      f ? (c -= e, a.I -= e + 1 << d >>> 0) : c = e + 1;
+      d = c;
+
+      for (e = 0; 256 <= d;) {
+        e += 8, d >>= 8;
+      }
+
+      d = 7 ^ e + Id[d];
+      a.b -= d;
+      a.Ca = (c << d) - 1;
+      return f;
+    }
+
+    function ra(a, b, c) {
+      a[b + 0] = c >> 24 & 255;
+      a[b + 1] = c >> 16 & 255;
+      a[b + 2] = c >> 8 & 255;
+      a[b + 3] = c >> 0 & 255;
+    }
+
+    function Ta(a, b) {
+      return a[b + 0] << 0 | a[b + 1] << 8;
+    }
+
+    function Yb(a, b) {
+      return Ta(a, b) | a[b + 2] << 16;
+    }
+
+    function Ha(a, b) {
+      return Ta(a, b) | Ta(a, b + 2) << 16;
+    }
+
+    function Zb(a, b) {
+      var c = 1 << b;
+      x(null != a);
+      x(0 < b);
+      a.X = V(c);
+      if (null == a.X) return 0;
+      a.Mb = 32 - b;
+      a.Xa = b;
+      return 1;
+    }
+
+    function $b(a, b) {
+      x(null != a);
+      x(null != b);
+      x(a.Xa == b.Xa);
+      I(b.X, 0, a.X, 0, 1 << b.Xa);
+    }
+
+    function ac() {
+      this.X = [];
+      this.Xa = this.Mb = 0;
+    }
+
+    function bc(a, b, c, d) {
+      x(null != c);
+      x(null != d);
+      var e = c[0],
+          f = d[0];
+      0 == e && (e = (a * f + b / 2) / b);
+      0 == f && (f = (b * e + a / 2) / a);
+      if (0 >= e || 0 >= f) return 0;
+      c[0] = e;
+      d[0] = f;
+      return 1;
+    }
+
+    function xa(a, b) {
+      return a + (1 << b) - 1 >>> b;
+    }
+
+    function yb(a, b) {
+      return ((a & 4278255360) + (b & 4278255360) >>> 0 & 4278255360) + ((a & 16711935) + (b & 16711935) >>> 0 & 16711935) >>> 0;
+    }
+
+    function X(a, b) {
+      self[b] = function (b, d, e, f, g, h, k) {
+        var c;
+
+        for (c = 0; c < g; ++c) {
+          var m = self[a](h[k + c - 1], e, f + c);
+          h[k + c] = yb(b[d + c], m);
+        }
+      };
+    }
+
+    function Jd() {
+      this.ud = this.hd = this.jd = 0;
+    }
+
+    function aa(a, b) {
+      return (((a ^ b) & 4278124286) >>> 1) + (a & b) >>> 0;
+    }
+
+    function sa(a) {
+      if (0 <= a && 256 > a) return a;
+      if (0 > a) return 0;
+      if (255 < a) return 255;
+    }
+
+    function eb(a, b) {
+      return sa(a + (a - b + 0.5 >> 1));
+    }
+
+    function Ia(a, b, c) {
+      return Math.abs(b - c) - Math.abs(a - c);
+    }
+
+    function cc(a, b, c, d, e, f, g) {
+      d = f[g - 1];
+
+      for (c = 0; c < e; ++c) {
+        f[g + c] = d = yb(a[b + c], d);
+      }
+    }
+
+    function Kd(a, b, c, d, e) {
+      var f;
+
+      for (f = 0; f < c; ++f) {
+        var g = a[b + f],
+            h = g >> 8 & 255,
+            k = g & 16711935,
+            k = k + ((h << 16) + h),
+            k = k & 16711935;
+        d[e + f] = (g & 4278255360) + k >>> 0;
+      }
+    }
+
+    function dc(a, b) {
+      b.jd = a >> 0 & 255;
+      b.hd = a >> 8 & 255;
+      b.ud = a >> 16 & 255;
+    }
+
+    function Ld(a, b, c, d, e, f) {
+      var g;
+
+      for (g = 0; g < d; ++g) {
+        var h = b[c + g],
+            k = h >>> 8,
+            l = h >>> 16,
+            m = h,
+            l = l + ((a.jd << 24 >> 24) * (k << 24 >> 24) >>> 5),
+            l = l & 255,
+            m = m + ((a.hd << 24 >> 24) * (k << 24 >> 24) >>> 5),
+            m = m + ((a.ud << 24 >> 24) * (l << 24 >> 24) >>> 5),
+            m = m & 255;
+        e[f + g] = (h & 4278255360) + (l << 16) + m;
+      }
+    }
+
+    function ec(a, b, c, d, e) {
+      self[b] = function (a, b, c, k, l, m, n, r, q) {
+        for (k = n; k < r; ++k) {
+          for (n = 0; n < q; ++n) {
+            l[m++] = e(c[d(a[b++])]);
+          }
+        }
+      };
+
+      self[a] = function (a, b, h, k, l, m, n) {
+        var f = 8 >> a.b,
+            g = a.Ea,
+            t = a.K[0],
+            v = a.w;
+        if (8 > f) for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {
+          var p = 0,
+              u;
+
+          for (u = 0; u < g; ++u) {
+            u & a || (p = d(k[l++])), m[n++] = e(t[p & v]), p >>= f;
+          }
+        } else self["VP8LMapColor" + c](k, l, t, v, m, n, b, h, g);
+      };
+    }
+
+    function Md(a, b, c, d, e) {
+      for (c = b + c; b < c;) {
+        var f = a[b++];
+        d[e++] = f >> 16 & 255;
+        d[e++] = f >> 8 & 255;
+        d[e++] = f >> 0 & 255;
+      }
+    }
+
+    function Nd(a, b, c, d, e) {
+      for (c = b + c; b < c;) {
+        var f = a[b++];
+        d[e++] = f >> 16 & 255;
+        d[e++] = f >> 8 & 255;
+        d[e++] = f >> 0 & 255;
+        d[e++] = f >> 24 & 255;
+      }
+    }
+
+    function Od(a, b, c, d, e) {
+      for (c = b + c; b < c;) {
+        var f = a[b++],
+            g = f >> 16 & 240 | f >> 12 & 15,
+            f = f >> 0 & 240 | f >> 28 & 15;
+        d[e++] = g;
+        d[e++] = f;
+      }
+    }
+
+    function Pd(a, b, c, d, e) {
+      for (c = b + c; b < c;) {
+        var f = a[b++],
+            g = f >> 16 & 248 | f >> 13 & 7,
+            f = f >> 5 & 224 | f >> 3 & 31;
+        d[e++] = g;
+        d[e++] = f;
+      }
+    }
+
+    function Qd(a, b, c, d, e) {
+      for (c = b + c; b < c;) {
+        var f = a[b++];
+        d[e++] = f >> 0 & 255;
+        d[e++] = f >> 8 & 255;
+        d[e++] = f >> 16 & 255;
+      }
+    }
+
+    function fb(a, b, c, d, e, f) {
+      if (0 == f) for (c = b + c; b < c;) {
+        f = a[b++], ra(d, (f[0] >> 24 | f[1] >> 8 & 65280 | f[2] << 8 & 16711680 | f[3] << 24) >>> 0), e += 32;
+      } else I(d, e, a, b, c);
+    }
+
+    function gb(a, b) {
+      self[b][0] = self[a + "0"];
+      self[b][1] = self[a + "1"];
+      self[b][2] = self[a + "2"];
+      self[b][3] = self[a + "3"];
+      self[b][4] = self[a + "4"];
+      self[b][5] = self[a + "5"];
+      self[b][6] = self[a + "6"];
+      self[b][7] = self[a + "7"];
+      self[b][8] = self[a + "8"];
+      self[b][9] = self[a + "9"];
+      self[b][10] = self[a + "10"];
+      self[b][11] = self[a + "11"];
+      self[b][12] = self[a + "12"];
+      self[b][13] = self[a + "13"];
+      self[b][14] = self[a + "0"];
+      self[b][15] = self[a + "0"];
+    }
+
+    function hb(a) {
+      return a == zb || a == Ab || a == Ja || a == Bb;
+    }
+
+    function Rd() {
+      this.eb = [];
+      this.size = this.A = this.fb = 0;
+    }
+
+    function Sd() {
+      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 Cb() {
+      this.Rd = this.height = this.width = this.S = 0;
+      this.f = {};
+      this.f.RGBA = new Rd();
+      this.f.kb = new Sd();
+      this.sd = null;
+    }
+
+    function Td() {
+      this.width = [0];
+      this.height = [0];
+      this.Pd = [0];
+      this.Qd = [0];
+      this.format = [0];
+    }
+
+    function Ud() {
+      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 Vd(a) {
+      alert("todo:WebPSamplerProcessPlane");
+      return a.T;
+    }
+
+    function Wd(a, b) {
+      var c = a.T,
+          d = b.ba.f.RGBA,
+          e = d.eb,
+          f = d.fb + a.ka * d.A,
+          g = P[b.ba.S],
+          h = a.y,
+          k = a.O,
+          l = a.f,
+          m = a.N,
+          n = a.ea,
+          r = a.W,
+          q = b.cc,
+          t = b.dc,
+          v = b.Mc,
+          p = b.Nc,
+          u = a.ka,
+          w = a.ka + a.T,
+          y = a.U,
+          A = y + 1 >> 1;
+      0 == u ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y) : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y), ++c);
+
+      for (; u + 2 < w; u += 2) {
+        q = l, t = m, v = n, p = r, m += a.Rc, r += a.Rc, f += 2 * d.A, k += 2 * a.fa, g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);
+      }
+
+      k += a.fa;
+      a.j + w < a.o ? (I(b.ec, b.fc, h, k, y), I(b.cc, b.dc, l, m, A), I(b.Mc, b.Nc, n, r, A), c--) : w & 1 || g(h, k, null, null, l, m, n, r, l, m, n, r, e, f + d.A, null, null, y);
+      return c;
+    }
+
+    function Xd(a, b, c) {
+      var d = a.F,
+          e = [a.J];
+
+      if (null != d) {
+        var f = a.U,
+            g = b.ba.S,
+            h = g == ya || g == Ja;
+        b = b.ba.f.RGBA;
+        var k = [0],
+            l = a.ka;
+        k[0] = a.T;
+        a.Kb && (0 == l ? --k[0] : (--l, e[0] -= a.width), a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));
+        var m = b.eb,
+            l = b.fb + l * b.A;
+        a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);
+        x(c == k);
+        a && hb(g) && za(m, l, h, f, k, b.A);
+      }
+
+      return 0;
+    }
+
+    function gc(a) {
+      var b = a.ma,
+          c = b.ba.S,
+          d = 11 > c,
+          e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);
+      b.memory = null;
+      b.Ib = null;
+      b.Jb = null;
+      b.Nd = null;
+      if (!hc(b.Oa, a, e ? 11 : 12)) return 0;
+      e && hb(c) && ic();
+      if (a.da) alert("todo:use_scaling");else {
+        if (d) {
+          if (b.Ib = Vd, a.Kb) {
+            c = a.U + 1 >> 1;
+            b.memory = V(a.U + 2 * c);
+            if (null == b.memory) return 0;
+            b.ec = b.memory;
+            b.fc = 0;
+            b.cc = b.ec;
+            b.dc = b.fc + a.U;
+            b.Mc = b.cc;
+            b.Nc = b.dc + c;
+            b.Ib = Wd;
+            ic();
+          }
+        } else alert("todo:EmitYUV");
+
+        e && (b.Jb = Xd, d && Aa());
+      }
+
+      if (d && !jc) {
+        for (a = 0; 256 > a; ++a) {
+          Yd[a] = 89858 * (a - 128) + Ba >> Wa, Zd[a] = -22014 * (a - 128) + Ba, $d[a] = -45773 * (a - 128), ae[a] = 113618 * (a - 128) + Ba >> Wa;
+        }
+
+        for (a = ta; a < Eb; ++a) {
+          b = 76283 * (a - 16) + Ba >> Wa, be[a - ta] = ga(b, 255), ce[a - ta] = ga(b + 8 >> 4, 15);
+        }
+
+        jc = 1;
+      }
+
+      return 1;
+    }
+
+    function kc(a) {
+      var b = a.ma,
+          c = a.U,
+          d = a.T;
+      x(!(a.ka & 1));
+      if (0 >= c || 0 >= d) return 0;
+      c = b.Ib(a, b);
+      null != b.Jb && b.Jb(a, b, c);
+      b.Dc += c;
+      return 1;
+    }
+
+    function lc(a) {
+      a.ma.memory = null;
+    }
+
+    function mc(a, b, c, d) {
+      if (47 != D(a, 8)) return 0;
+      b[0] = D(a, 14) + 1;
+      c[0] = D(a, 14) + 1;
+      d[0] = D(a, 1);
+      return 0 != D(a, 3) ? 0 : !a.h;
+    }
+
+    function ib(a, b) {
+      if (4 > a) return a + 1;
+      var c = a - 2 >> 1;
+      return (2 + (a & 1) << c) + D(b, c) + 1;
+    }
+
+    function nc(a, b) {
+      if (120 < b) return b - 120;
+      var c = de[b - 1],
+          c = (c >> 4) * a + (8 - (c & 15));
+      return 1 <= c ? c : 1;
+    }
+
+    function ua(a, b, c) {
+      var d = pb(c);
+      b += d & 255;
+      var e = a[b].g - 8;
+      0 < e && (qb(c, c.u + 8), d = pb(c), b += a[b].value, b += d & (1 << e) - 1);
+      qb(c, c.u + a[b].g);
+      return a[b].value;
+    }
+
+    function ub(a, b, c) {
+      c.g += a.g;
+      c.value += a.value << b >>> 0;
+      x(8 >= c.g);
+      return a.g;
+    }
+
+    function ha(a, b, c) {
+      var d = a.xc;
+      b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];
+      x(b < a.Wb);
+      return a.Ya[b];
+    }
+
+    function oc(a, b, c, d) {
+      var e = a.ab,
+          f = a.c * b,
+          g = a.C;
+      b = g + b;
+      var h = c,
+          k = d;
+      d = a.Ta;
+
+      for (c = a.Ua; 0 < e--;) {
+        var l = a.gc[e],
+            m = g,
+            n = b,
+            r = h,
+            q = k,
+            k = d,
+            h = c,
+            t = l.Ea;
+        x(m < n);
+        x(n <= l.nc);
+
+        switch (l.hc) {
+          case 2:
+            pc(r, q, (n - m) * t, k, h);
+            break;
+
+          case 0:
+            var v = l,
+                p = m,
+                u = n,
+                w = k,
+                y = h,
+                A = v.Ea;
+            0 == p && (ee(r, q, null, null, 1, w, y), cc(r, q + 1, 0, 0, A - 1, w, y + 1), q += A, y += A, ++p);
+
+            for (var E = 1 << v.b, B = E - 1, C = xa(A, v.b), N = v.K, v = v.w + (p >> v.b) * C; p < u;) {
+              var z = N,
+                  Q = v,
+                  S = 1;
+
+              for (fe(r, q, w, y - A, 1, w, y); S < A;) {
+                var K = qc[z[Q++] >> 8 & 15],
+                    D = (S & ~B) + E;
+                D > A && (D = A);
+                K(r, q + +S, w, y + S - A, D - S, w, y + S);
+                S = D;
+              }
+
+              q += A;
+              y += A;
+              ++p;
+              p & B || (v += C);
+            }
+
+            n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);
+            break;
+
+          case 1:
+            t = r;
+            u = q;
+            r = l.Ea;
+            q = 1 << l.b;
+            w = q - 1;
+            y = r & ~w;
+            A = r - y;
+            p = xa(r, l.b);
+            E = l.K;
+
+            for (l = l.w + (m >> l.b) * p; m < n;) {
+              B = E;
+              C = l;
+              N = new Jd();
+              v = u + y;
+
+              for (z = u + r; u < v;) {
+                dc(B[C++], N), Fb(N, t, u, q, k, h), u += q, h += q;
+              }
+
+              u < z && (dc(B[C++], N), Fb(N, t, u, A, k, h), u += A, h += A);
+              ++m;
+              m & w || (l += p);
+            }
+
+            break;
+
+          case 3:
+            if (r == k && q == h && 0 < l.b) {
+              y = (n - m) * xa(l.Ea, l.b);
+              t = h + (n - m) * t - y;
+              u = k;
+              r = t;
+              q = k;
+              w = h;
+              A = y;
+              p = [];
+
+              for (y = A - 1; 0 <= y; --y) {
+                p[y] = q[w + y];
+              }
+
+              for (y = A - 1; 0 <= y; --y) {
+                u[r + y] = p[y];
+              }
+
+              rc(l, m, n, k, t, k, h);
+            } else rc(l, m, n, r, q, k, h);
+
+        }
+
+        h = d;
+        k = c;
+      }
+
+      k != c && I(d, c, h, k, f);
+    }
+
+    function ge(a, b) {
+      var c = a.V,
+          d = a.Ba + a.c * a.C,
+          e = b - a.C;
+      x(b <= a.l.o);
+      x(16 >= e);
+
+      if (0 < e) {
+        var f = a.l,
+            g = a.Ta,
+            h = a.Ua,
+            k = f.width;
+        oc(a, e, c, d);
+        h = [h];
+        c = a.C;
+        d = b;
+        e = h;
+        x(c < d);
+        x(f.v < f.va);
+        d > f.o && (d = f.o);
+
+        if (c < f.j) {
+          var l = f.j - c,
+              c = f.j;
+          e[0] += l * k;
+        }
+
+        c >= d ? c = 0 : (e[0] += 4 * f.v, f.ka = c - f.j, f.U = f.va - f.v, f.T = d - c, c = 1);
+
+        if (c) {
+          h = h[0];
+          c = a.ca;
+
+          if (11 > c.S) {
+            for (var m = c.f.RGBA, d = c.S, e = f.U, f = f.T, l = m.eb, n = m.A, r = f, m = m.fb + a.Ma * m.A; 0 < r--;) {
+              var q = g,
+                  t = h,
+                  v = e,
+                  p = l,
+                  u = m;
+
+              switch (d) {
+                case Ca:
+                  sc(q, t, v, p, u);
+                  break;
+
+                case Ua:
+                  Gb(q, t, v, p, u);
+                  break;
+
+                case zb:
+                  Gb(q, t, v, p, u);
+                  za(p, u, 0, v, 1, 0);
+                  break;
+
+                case tc:
+                  uc(q, t, v, p, u);
+                  break;
+
+                case Va:
+                  fb(q, t, v, p, u, 1);
+                  break;
+
+                case Ab:
+                  fb(q, t, v, p, u, 1);
+                  za(p, u, 0, v, 1, 0);
+                  break;
+
+                case ya:
+                  fb(q, t, v, p, u, 0);
+                  break;
+
+                case Ja:
+                  fb(q, t, v, p, u, 0);
+                  za(p, u, 1, v, 1, 0);
+                  break;
+
+                case Db:
+                  Hb(q, t, v, p, u);
+                  break;
+
+                case Bb:
+                  Hb(q, t, v, p, u);
+                  vc(p, u, v, 1, 0);
+                  break;
+
+                case wc:
+                  xc(q, t, v, p, u);
+                  break;
+
+                default:
+                  x(0);
+              }
+
+              h += k;
+              m += n;
+            }
+
+            a.Ma += f;
+          } else alert("todo:EmitRescaledRowsYUVA");
+
+          x(a.Ma <= c.height);
+        }
+      }
+
+      a.C = b;
+      x(a.C <= a.i);
+    }
+
+    function yc(a) {
+      var b;
+      if (0 < a.ua) return 0;
+
+      for (b = 0; b < a.Wb; ++b) {
+        var c = a.Ya[b].G,
+            d = a.Ya[b].H;
+        if (0 < c[1][d[1] + 0].g || 0 < c[2][d[2] + 0].g || 0 < c[3][d[3] + 0].g) return 0;
+      }
+
+      return 1;
+    }
+
+    function zc(a, b, c, d, e, f) {
+      if (0 != a.Z) {
+        var g = a.qd,
+            h = a.rd;
+
+        for (x(null != ia[a.Z]); b < c; ++b) {
+          ia[a.Z](g, h, d, e, d, e, f), g = d, h = e, e += f;
+        }
+
+        a.qd = g;
+        a.rd = h;
+      }
+    }
+
+    function Ib(a, b) {
+      var c = a.l.ma,
+          d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,
+          d = a.C < d ? d : a.C;
+      x(b <= a.l.o);
+
+      if (b > d) {
+        var e = a.l.width,
+            f = c.ca,
+            g = c.tb + e * d,
+            h = a.V,
+            k = a.Ba + a.c * d,
+            l = a.gc;
+        x(1 == a.ab);
+        x(3 == l[0].hc);
+        he(l[0], d, b, h, k, f, g);
+        zc(c, d, b, f, g, e);
+      }
+
+      a.C = a.Ma = b;
+    }
+
+    function Jb(a, b, c, d, e, f, g) {
+      var h = a.$ / d,
+          k = a.$ % d,
+          l = a.m,
+          m = a.s,
+          n = c + a.$,
+          r = n;
+      e = c + d * e;
+      var q = c + d * f,
+          t = 280 + m.ua,
+          v = a.Pb ? h : 16777216,
+          p = 0 < m.ua ? m.Wa : null,
+          u = m.wc,
+          w = n < q ? ha(m, k, h) : null;
+      x(a.C < f);
+      x(q <= e);
+      var y = !1;
+
+      a: for (;;) {
+        for (; y || n < q;) {
+          var A = 0;
+
+          if (h >= v) {
+            var v = a,
+                E = n - c;
+            x(v.Pb);
+            v.wd = v.m;
+            v.xd = E;
+            0 < v.s.ua && $b(v.s.Wa, v.s.vb);
+            v = h + ie;
+          }
+
+          k & u || (w = ha(m, k, h));
+          x(null != w);
+          w.Qb && (b[n] = w.qb, y = !0);
+          if (!y) if (Sa(l), w.jc) {
+            var A = l,
+                E = b,
+                B = n,
+                C = w.pd[pb(A) & xb - 1];
+            x(w.jc);
+            256 > C.g ? (qb(A, A.u + C.g), E[B] = C.value, A = 0) : (qb(A, A.u + C.g - 256), x(256 <= C.value), A = C.value);
+            0 == A && (y = !0);
+          } else A = ua(w.G[0], w.H[0], l);
+          if (l.h) break;
+
+          if (y || 256 > A) {
+            if (!y) if (w.nd) b[n] = (w.qb | A << 8) >>> 0;else {
+              Sa(l);
+              y = ua(w.G[1], w.H[1], l);
+              Sa(l);
+              E = ua(w.G[2], w.H[2], l);
+              B = ua(w.G[3], w.H[3], l);
+              if (l.h) break;
+              b[n] = (B << 24 | y << 16 | A << 8 | E) >>> 0;
+            }
+            y = !1;
+            ++n;
+            ++k;
+            if (k >= d && (k = 0, ++h, null != g && h <= f && !(h % 16) && g(a, h), null != p)) for (; r < n;) {
+              A = b[r++], p.X[(506832829 * A & 4294967295) >>> p.Mb] = A;
+            }
+          } else if (280 > A) {
+            A = ib(A - 256, l);
+            E = ua(w.G[4], w.H[4], l);
+            Sa(l);
+            E = ib(E, l);
+            E = nc(d, E);
+            if (l.h) break;
+            if (n - c < E || e - n < A) break a;else for (B = 0; B < A; ++B) {
+              b[n + B] = b[n + B - E];
+            }
+            n += A;
+
+            for (k += A; k >= d;) {
+              k -= d, ++h, null != g && h <= f && !(h % 16) && g(a, h);
+            }
+
+            x(n <= e);
+            k & u && (w = ha(m, k, h));
+            if (null != p) for (; r < n;) {
+              A = b[r++], p.X[(506832829 * A & 4294967295) >>> p.Mb] = A;
+            }
+          } else if (A < t) {
+            y = A - 280;
+
+            for (x(null != p); r < n;) {
+              A = b[r++], p.X[(506832829 * A & 4294967295) >>> p.Mb] = A;
+            }
+
+            A = n;
+            E = p;
+            x(!(y >>> E.Xa));
+            b[A] = E.X[y];
+            y = !0;
+          } else break a;
+
+          y || x(l.h == db(l));
+        }
+
+        if (a.Pb && l.h && n < e) x(a.m.h), a.a = 5, a.m = a.wd, a.$ = a.xd, 0 < a.s.ua && $b(a.s.vb, a.s.Wa);else if (l.h) break a;else null != g && g(a, h > f ? f : h), a.a = 0, a.$ = n - c;
+        return 1;
+      }
+
+      a.a = 3;
+      return 0;
+    }
+
+    function Ac(a) {
+      x(null != a);
+      a.vc = null;
+      a.yc = null;
+      a.Ya = null;
+      var b = a.Wa;
+      null != b && (b.X = null);
+      a.vb = null;
+      x(null != a);
+    }
+
+    function Bc() {
+      var a = new je();
+      if (null == a) return null;
+      a.a = 0;
+      a.xb = Cc;
+      gb("Predictor", "VP8LPredictors");
+      gb("Predictor", "VP8LPredictors_C");
+      gb("PredictorAdd", "VP8LPredictorsAdd");
+      gb("PredictorAdd", "VP8LPredictorsAdd_C");
+      pc = Kd;
+      Fb = Ld;
+      sc = Md;
+      Gb = Nd;
+      Hb = Od;
+      xc = Pd;
+      uc = Qd;
+      self.VP8LMapColor32b = ke;
+      self.VP8LMapColor8b = le;
+      return a;
+    }
+
+    function rb(a, b, c, d, e) {
+      var f = 1,
+          g = [a],
+          h = [b],
+          k = d.m,
+          l = d.s,
+          m = null,
+          n = 0;
+
+      a: for (;;) {
+        if (c) for (; f && D(k, 1);) {
+          var r = g,
+              q = h,
+              t = d,
+              v = 1,
+              p = t.m,
+              u = t.gc[t.ab],
+              w = D(p, 2);
+          if (t.Oc & 1 << w) f = 0;else {
+            t.Oc |= 1 << w;
+            u.hc = w;
+            u.Ea = r[0];
+            u.nc = q[0];
+            u.K = [null];
+            ++t.ab;
+            x(4 >= t.ab);
+
+            switch (w) {
+              case 0:
+              case 1:
+                u.b = D(p, 3) + 2;
+                v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);
+                u.K = u.K[0];
+                break;
+
+              case 3:
+                var y = D(p, 8) + 1,
+                    A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;
+                r[0] = xa(u.Ea, A);
+                u.b = A;
+                var v = rb(y, 1, 0, t, u.K),
+                    E;
+
+                if (E = v) {
+                  var B,
+                      C = y,
+                      N = u,
+                      z = 1 << (8 >> N.b),
+                      Q = V(z);
+                  if (null == Q) E = 0;else {
+                    var S = N.K[0],
+                        K = N.w;
+                    Q[0] = N.K[0][0];
+
+                    for (B = 1; B < 1 * C; ++B) {
+                      Q[B] = yb(S[K + B], Q[B - 1]);
+                    }
+
+                    for (; B < 4 * z; ++B) {
+                      Q[B] = 0;
+                    }
+
+                    N.K[0] = null;
+                    N.K[0] = Q;
+                    E = 1;
+                  }
+                }
+
+                v = E;
+                break;
+
+              case 2:
+                break;
+
+              default:
+                x(0);
+            }
+
+            f = v;
+          }
+        }
+        g = g[0];
+        h = h[0];
+
+        if (f && D(k, 1) && (n = D(k, 4), f = 1 <= n && 11 >= n, !f)) {
+          d.a = 3;
+          break a;
+        }
+
+        var H;
+        if (H = f) b: {
+          var F = d,
+              G = g,
+              L = h,
+              J = n,
+              T = c,
+              Da,
+              ba,
+              X = F.m,
+              R = F.s,
+              P = [null],
+              U,
+              W = 1,
+              aa = 0,
+              na = me[J];
+
+          c: for (;;) {
+            if (T && D(X, 1)) {
+              var ca = D(X, 3) + 2,
+                  ga = xa(G, ca),
+                  ka = xa(L, ca),
+                  qa = ga * ka;
+              if (!rb(ga, ka, 0, F, P)) break c;
+              P = P[0];
+              R.xc = ca;
+
+              for (Da = 0; Da < qa; ++Da) {
+                var ia = P[Da] >> 8 & 65535;
+                P[Da] = ia;
+                ia >= W && (W = ia + 1);
+              }
+            }
+
+            if (X.h) break c;
+
+            for (ba = 0; 5 > ba; ++ba) {
+              var Y = Dc[ba];
+              !ba && 0 < J && (Y += 1 << J);
+              aa < Y && (aa = Y);
+            }
+
+            var ma = wa(W * na, O);
+            var ua = W,
+                va = wa(ua, Ub);
+            if (null == va) var la = null;else x(65536 >= ua), la = va;
+            var ha = V(aa);
+
+            if (null == la || null == ha || null == ma) {
+              F.a = 1;
+              break c;
+            }
+
+            var pa = ma;
+
+            for (Da = U = 0; Da < W; ++Da) {
+              var ja = la[Da],
+                  da = ja.G,
+                  ea = ja.H,
+                  Fa = 0,
+                  ra = 1,
+                  Ha = 0;
+
+              for (ba = 0; 5 > ba; ++ba) {
+                Y = Dc[ba];
+                da[ba] = pa;
+                ea[ba] = U;
+                !ba && 0 < J && (Y += 1 << J);
+
+                d: {
+                  var sa,
+                      za = Y,
+                      ta = F,
+                      oa = ha,
+                      db = pa,
+                      eb = U,
+                      Ia = 0,
+                      Ka = ta.m,
+                      fb = D(Ka, 1);
+                  M(oa, 0, 0, za);
+
+                  if (fb) {
+                    var gb = D(Ka, 1) + 1,
+                        hb = D(Ka, 1),
+                        Ja = D(Ka, 0 == hb ? 1 : 8);
+                    oa[Ja] = 1;
+                    2 == gb && (Ja = D(Ka, 8), oa[Ja] = 1);
+                    var ya = 1;
+                  } else {
+                    var Ua = V(19),
+                        Va = D(Ka, 4) + 4;
+
+                    if (19 < Va) {
+                      ta.a = 3;
+                      var Aa = 0;
+                      break d;
+                    }
+
+                    for (sa = 0; sa < Va; ++sa) {
+                      Ua[ne[sa]] = D(Ka, 3);
+                    }
+
+                    var Ba = void 0,
+                        sb = void 0,
+                        Wa = ta,
+                        ib = Ua,
+                        Ca = za,
+                        Xa = oa,
+                        Oa = 0,
+                        La = Wa.m,
+                        Ya = 8,
+                        Za = wa(128, O);
+
+                    e: for (;;) {
+                      if (!Z(Za, 0, 7, ib, 19)) break e;
+
+                      if (D(La, 1)) {
+                        var kb = 2 + 2 * D(La, 3),
+                            Ba = 2 + D(La, kb);
+                        if (Ba > Ca) break e;
+                      } else Ba = Ca;
+
+                      for (sb = 0; sb < Ca && Ba--;) {
+                        Sa(La);
+                        var $a = Za[0 + (pb(La) & 127)];
+                        qb(La, La.u + $a.g);
+                        var jb = $a.value;
+                        if (16 > jb) Xa[sb++] = jb, 0 != jb && (Ya = jb);else {
+                          var lb = 16 == jb,
+                              ab = jb - 16,
+                              mb = oe[ab],
+                              bb = D(La, pe[ab]) + mb;
+                          if (sb + bb > Ca) break e;else for (var nb = lb ? Ya : 0; 0 < bb--;) {
+                            Xa[sb++] = nb;
+                          }
+                        }
+                      }
+
+                      Oa = 1;
+                      break e;
+                    }
+
+                    Oa || (Wa.a = 3);
+                    ya = Oa;
+                  }
+
+                  (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));
+                  ya && 0 != Ia ? Aa = Ia : (ta.a = 3, Aa = 0);
+                }
+
+                if (0 == Aa) break c;
+                ra && 1 == qe[ba] && (ra = 0 == pa[U].g);
+                Fa += pa[U].g;
+                U += Aa;
+
+                if (3 >= ba) {
+                  var Pa = ha[0],
+                      tb;
+
+                  for (tb = 1; tb < Y; ++tb) {
+                    ha[tb] > Pa && (Pa = ha[tb]);
+                  }
+
+                  Ha += Pa;
+                }
+              }
+
+              ja.nd = ra;
+              ja.Qb = 0;
+              ra && (ja.qb = (da[3][ea[3] + 0].value << 24 | da[1][ea[1] + 0].value << 16 | da[2][ea[2] + 0].value) >>> 0, 0 == Fa && 256 > da[0][ea[0] + 0].value && (ja.Qb = 1, ja.qb += da[0][ea[0] + 0].value << 8));
+              ja.jc = !ja.Qb && 6 > Ha;
+
+              if (ja.jc) {
+                var Ga,
+                    Ea = ja;
+
+                for (Ga = 0; Ga < xb; ++Ga) {
+                  var Ma = Ga,
+                      Na = Ea.pd[Ma],
+                      vb = Ea.G[0][Ea.H[0] + Ma];
+                  256 <= vb.value ? (Na.g = vb.g + 256, Na.value = vb.value) : (Na.g = 0, Na.value = 0, Ma >>= ub(vb, 8, Na), Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na), Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na), ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));
+                }
+              }
+            }
+
+            R.vc = P;
+            R.Wb = W;
+            R.Ya = la;
+            R.yc = ma;
+            H = 1;
+            break b;
+          }
+
+          H = 0;
+        }
+        f = H;
+
+        if (!f) {
+          d.a = 3;
+          break a;
+        }
+
+        if (0 < n) {
+          if (l.ua = 1 << n, !Zb(l.Wa, n)) {
+            d.a = 1;
+            f = 0;
+            break a;
+          }
+        } else l.ua = 0;
+
+        var Qa = d,
+            cb = g,
+            ob = h,
+            Ra = Qa.s,
+            Ta = Ra.xc;
+        Qa.c = cb;
+        Qa.i = ob;
+        Ra.md = xa(cb, Ta);
+        Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;
+
+        if (c) {
+          d.xb = re;
+          break a;
+        }
+
+        m = V(g * h);
+
+        if (null == m) {
+          d.a = 1;
+          f = 0;
+          break a;
+        }
+
+        f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;
+        break a;
+      }
+
+      f ? (null != e ? e[0] = m : (x(null == m), x(c)), d.$ = 0, c || Ac(l)) : Ac(l);
+      return f;
+    }
+
+    function Ec(a, b) {
+      var c = a.c * a.i,
+          d = c + b + 16 * b;
+      x(a.c <= b);
+      a.V = V(d);
+      if (null == a.V) return a.Ta = null, a.Ua = 0, a.a = 1, 0;
+      a.Ta = a.V;
+      a.Ua = a.Ba + c + b;
+      return 1;
+    }
+
+    function se(a, b) {
+      var c = a.C,
+          d = b - c,
+          e = a.V,
+          f = a.Ba + a.c * c;
+
+      for (x(b <= a.l.o); 0 < d;) {
+        var g = 16 < d ? 16 : d,
+            h = a.l.ma,
+            k = a.l.width,
+            l = k * g,
+            m = h.ca,
+            n = h.tb + k * c,
+            r = a.Ta,
+            q = a.Ua;
+        oc(a, g, e, f);
+        Fc(r, q, m, n, l);
+        zc(h, c, c + g, m, n, k);
+        d -= g;
+        e += g * a.c;
+        c += g;
+      }
+
+      x(c == b);
+      a.C = a.Ma = b;
+    }
+
+    function te(a, b) {
+      var c = [0],
+          d = [0],
+          e = [0];
+
+      a: for (;;) {
+        if (null == a) return 0;
+        if (null == b) return a.a = 2, 0;
+        a.l = b;
+        a.a = 0;
+        cb(a.m, b.data, b.w, b.ha);
+
+        if (!mc(a.m, c, d, e)) {
+          a.a = 3;
+          break a;
+        }
+
+        a.xb = Cc;
+        b.width = c[0];
+        b.height = d[0];
+        if (!rb(c[0], d[0], 1, a, null)) break a;
+        return 1;
+      }
+
+      x(0 != a.a);
+      return 0;
+    }
+
+    function ue() {
+      this.ub = this.yd = this.td = this.Rb = 0;
+    }
+
+    function ve() {
+      this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;
+    }
+
+    function we() {
+      this.Fb = this.Bb = this.Cb = 0;
+      this.Zb = V(4);
+      this.Lb = V(4);
+    }
+
+    function Gc() {
+      this.Yb = wb();
+    }
+
+    function xe() {
+      this.jb = V(3);
+      this.Wc = Ed([4, 8], Gc);
+      this.Xc = Ed([4, 17], Gc);
+    }
+
+    function ye() {
+      this.Pc = this.wb = this.Tb = this.zd = 0;
+      this.vd = new V(4);
+      this.od = new V(4);
+    }
+
+    function Xa() {
+      this.ld = this.La = this.dd = this.tc = 0;
+    }
+
+    function Hc() {
+      this.Na = this.la = 0;
+    }
+
+    function ze() {
+      this.Sc = [0, 0];
+      this.Eb = [0, 0];
+      this.Qc = [0, 0];
+      this.ia = this.lc = 0;
+    }
+
+    function Kb() {
+      this.ad = V(384);
+      this.Za = 0;
+      this.Ob = V(16);
+      this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;
+    }
+
+    function Ae() {
+      this.uc = this.M = this.Nb = 0;
+      this.wa = Array(new Xa());
+      this.Y = 0;
+      this.ya = Array(new Kb());
+      this.aa = 0;
+      this.l = new Oa();
+    }
+
+    function Ic() {
+      this.y = V(16);
+      this.f = V(8);
+      this.ea = V(8);
+    }
+
+    function Be() {
+      this.cb = this.a = 0;
+      this.sc = "";
+      this.m = new Wb();
+      this.Od = new ue();
+      this.Kc = new ve();
+      this.ed = new ye();
+      this.Qa = new we();
+      this.Ic = this.$c = this.Aa = 0;
+      this.D = new Ae();
+      this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;
+      this.Jc = wa(8, Wb);
+      this.ia = 0;
+      this.pb = wa(4, ze);
+      this.Pa = new xe();
+      this.Bd = this.kc = 0;
+      this.Ac = [];
+      this.Bc = 0;
+      this.zc = [0, 0, 0, 0];
+      this.Gd = Array(new Ic());
+      this.Hd = 0;
+      this.rb = Array(new Hc());
+      this.sb = 0;
+      this.wa = Array(new Xa());
+      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 Kb());
+      this.L = this.aa = 0;
+      this.gd = Ed([4, 2], Xa);
+      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 ga(a, b) {
+      return 0 > a ? 0 : a > b ? b : a;
+    }
+
+    function Oa() {
+      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 Ce() {
+      var a = new Be();
+      null != a && (a.a = 0, a.sc = "OK", a.cb = 0, a.Xb = 0, oa || (oa = De));
+      return a;
+    }
+
+    function T(a, b, c) {
+      0 == a.a && (a.a = b, a.sc = c, a.cb = 0);
+      return 0;
+    }
+
+    function Jc(a, b, c) {
+      return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];
+    }
+
+    function Kc(a, b) {
+      if (null == a) return 0;
+      a.a = 0;
+      a.sc = "OK";
+      if (null == b) return T(a, 2, "null VP8Io passed to VP8GetHeaders()");
+      var c = b.data;
+      var d = b.w;
+      var e = b.ha;
+      if (4 > e) return T(a, 7, "Truncated header.");
+      var f = c[d + 0] | c[d + 1] << 8 | c[d + 2] << 16;
+      var g = a.Od;
+      g.Rb = !(f & 1);
+      g.td = f >> 1 & 7;
+      g.yd = f >> 4 & 1;
+      g.ub = f >> 5;
+      if (3 < g.td) return T(a, 3, "Incorrect keyframe parameters.");
+      if (!g.yd) return T(a, 4, "Frame not displayable.");
+      d += 3;
+      e -= 3;
+      var h = a.Kc;
+
+      if (g.Rb) {
+        if (7 > e) return T(a, 7, "cannot parse picture header");
+        if (!Jc(c, d, e)) return T(a, 3, "Bad code word");
+        h.c = (c[d + 4] << 8 | c[d + 3]) & 16383;
+        h.Td = c[d + 4] >> 6;
+        h.i = (c[d + 6] << 8 | c[d + 5]) & 16383;
+        h.Ud = c[d + 6] >> 6;
+        d += 7;
+        e -= 7;
+        a.za = h.c + 15 >> 4;
+        a.Ub = h.i + 15 >> 4;
+        b.width = h.c;
+        b.height = h.i;
+        b.Da = 0;
+        b.j = 0;
+        b.v = 0;
+        b.va = b.width;
+        b.o = b.height;
+        b.da = 0;
+        b.ib = b.width;
+        b.hb = b.height;
+        b.U = b.width;
+        b.T = b.height;
+        f = a.Pa;
+        M(f.jb, 0, 255, f.jb.length);
+        f = a.Qa;
+        x(null != f);
+        f.Cb = 0;
+        f.Bb = 0;
+        f.Fb = 1;
+        M(f.Zb, 0, 0, f.Zb.length);
+        M(f.Lb, 0, 0, f.Lb);
+      }
+
+      if (g.ub > e) return T(a, 7, "bad partition length");
+      f = a.m;
+      ma(f, c, d, g.ub);
+      d += g.ub;
+      e -= g.ub;
+      g.Rb && (h.Ld = G(f), h.Kd = G(f));
+      h = a.Qa;
+      var k = a.Pa,
+          l;
+      x(null != f);
+      x(null != h);
+      h.Cb = G(f);
+
+      if (h.Cb) {
+        h.Bb = G(f);
+
+        if (G(f)) {
+          h.Fb = G(f);
+
+          for (l = 0; 4 > l; ++l) {
+            h.Zb[l] = G(f) ? ca(f, 7) : 0;
+          }
+
+          for (l = 0; 4 > l; ++l) {
+            h.Lb[l] = G(f) ? ca(f, 6) : 0;
+          }
+        }
+
+        if (h.Bb) for (l = 0; 3 > l; ++l) {
+          k.jb[l] = G(f) ? na(f, 8) : 255;
+        }
+      } else h.Bb = 0;
+
+      if (f.Ka) return T(a, 3, "cannot parse segment header");
+      h = a.ed;
+      h.zd = G(f);
+      h.Tb = na(f, 6);
+      h.wb = na(f, 3);
+      h.Pc = G(f);
+
+      if (h.Pc && G(f)) {
+        for (k = 0; 4 > k; ++k) {
+          G(f) && (h.vd[k] = ca(f, 6));
+        }
+
+        for (k = 0; 4 > k; ++k) {
+          G(f) && (h.od[k] = ca(f, 6));
+        }
+      }
+
+      a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;
+      if (f.Ka) return T(a, 3, "cannot parse filter header");
+      l = d;
+      var m = e;
+      e = l;
+      d = l + m;
+      h = m;
+      a.Xb = (1 << na(a.m, 2)) - 1;
+      k = a.Xb;
+      if (m < 3 * k) c = 7;else {
+        l += 3 * k;
+        h -= 3 * k;
+
+        for (m = 0; m < k; ++m) {
+          var n = c[e + 0] | c[e + 1] << 8 | c[e + 2] << 16;
+          n > h && (n = h);
+          ma(a.Jc[+m], c, l, n);
+          l += n;
+          h -= n;
+          e += 3;
+        }
+
+        ma(a.Jc[+k], c, l, h);
+        c = l < d ? 0 : 5;
+      }
+      if (0 != c) return T(a, c, "cannot parse partitions");
+      l = a.m;
+      c = na(l, 7);
+      e = G(l) ? ca(l, 4) : 0;
+      d = G(l) ? ca(l, 4) : 0;
+      h = G(l) ? ca(l, 4) : 0;
+      k = G(l) ? ca(l, 4) : 0;
+      l = G(l) ? ca(l, 4) : 0;
+      m = a.Qa;
+
+      for (n = 0; 4 > n; ++n) {
+        if (m.Cb) {
+          var r = m.Zb[n];
+          m.Fb || (r += c);
+        } else if (0 < n) {
+          a.pb[n] = a.pb[0];
+          continue;
+        } else r = c;
+
+        var q = a.pb[n];
+        q.Sc[0] = Lb[ga(r + e, 127)];
+        q.Sc[1] = Mb[ga(r + 0, 127)];
+        q.Eb[0] = 2 * Lb[ga(r + d, 127)];
+        q.Eb[1] = 101581 * Mb[ga(r + h, 127)] >> 16;
+        8 > q.Eb[1] && (q.Eb[1] = 8);
+        q.Qc[0] = Lb[ga(r + k, 117)];
+        q.Qc[1] = Mb[ga(r + l, 127)];
+        q.lc = r + l;
+      }
+
+      if (!g.Rb) return T(a, 4, "Not a key frame.");
+      G(f);
+      g = a.Pa;
+
+      for (c = 0; 4 > c; ++c) {
+        for (e = 0; 8 > e; ++e) {
+          for (d = 0; 3 > d; ++d) {
+            for (h = 0; 11 > h; ++h) {
+              k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h], g.Wc[c][e].Yb[d][h] = k;
+            }
+          }
+        }
+
+        for (e = 0; 17 > e; ++e) {
+          g.Xc[c][e] = g.Wc[c][Ge[e]];
+        }
+      }
+
+      a.kc = G(f);
+      a.kc && (a.Bd = na(f, 8));
+      return a.cb = 1;
+    }
+
+    function De(a, b, c, d, e, f, g) {
+      var h = b[e].Yb[c];
+
+      for (c = 0; 16 > e; ++e) {
+        if (!K(a, h[c + 0])) return e;
+
+        for (; !K(a, h[c + 1]);) {
+          if (h = b[++e].Yb[0], c = 0, 16 == e) return 16;
+        }
+
+        var k = b[e + 1].Yb;
+
+        if (K(a, h[c + 2])) {
+          var l = a,
+              m = h,
+              n = c;
+          var r = 0;
+          if (K(l, m[n + 3])) {
+            if (K(l, m[n + 6])) {
+              h = 0;
+              r = K(l, m[n + 8]);
+              m = K(l, m[n + 9 + r]);
+              n = 2 * r + m;
+              r = 0;
+
+              for (m = He[n]; m[h]; ++h) {
+                r += r + K(l, m[h]);
+              }
+
+              r += 3 + (8 << n);
+            } else K(l, m[n + 7]) ? (r = 7 + 2 * K(l, 165), r += K(l, 145)) : r = 5 + K(l, 159);
+          } else K(l, m[n + 4]) ? r = 3 + K(l, m[n + 5]) : r = 2;
+          h = k[2];
+        } else r = 1, h = k[1];
+
+        k = g + Ie[e];
+        l = a;
+        0 > l.b && Qa(l);
+        var m = l.b,
+            n = l.Ca >> 1,
+            q = n - (l.I >> m) >> 31;
+        --l.b;
+        l.Ca += q;
+        l.Ca |= 1;
+        l.I -= (n + 1 & q) << m;
+        f[k] = ((r ^ q) - q) * d[(0 < e) + 0];
+      }
+
+      return 16;
+    }
+
+    function Lc(a) {
+      var b = a.rb[a.sb - 1];
+      b.la = 0;
+      b.Na = 0;
+      M(a.zc, 0, 0, a.zc.length);
+      a.ja = 0;
+    }
+
+    function Je(a, b) {
+      for (a.M = 0; a.M < a.Va; ++a.M) {
+        var c = a.Jc[a.M & a.Xb],
+            d = a.m,
+            e = a,
+            f;
+
+        for (f = 0; f < e.za; ++f) {
+          var g = d;
+          var h = e;
+          var k = h.Ac,
+              l = h.Bc + 4 * f,
+              m = h.zc,
+              n = h.ya[h.aa + f];
+          h.Qa.Bb ? n.$b = K(g, h.Pa.jb[0]) ? 2 + K(g, h.Pa.jb[2]) : K(g, h.Pa.jb[1]) : n.$b = 0;
+          h.kc && (n.Ad = K(g, h.Bd));
+          n.Za = !K(g, 145) + 0;
+
+          if (n.Za) {
+            var r = n.Ob,
+                q = 0;
+
+            for (h = 0; 4 > h; ++h) {
+              var t = m[0 + h];
+              var v;
+
+              for (v = 0; 4 > v; ++v) {
+                t = Ke[k[l + v]][t];
+
+                for (var p = Mc[K(g, t[0])]; 0 < p;) {
+                  p = Mc[2 * p + K(g, t[p])];
+                }
+
+                t = -p;
+                k[l + v] = t;
+              }
+
+              I(r, q, k, l, 4);
+              q += 4;
+              m[0 + h] = t;
+            }
+          } else t = K(g, 156) ? K(g, 128) ? 1 : 3 : K(g, 163) ? 2 : 0, n.Ob[0] = t, M(k, l, t, 4), M(m, 0, t, 4);
+
+          n.Dd = K(g, 142) ? K(g, 114) ? K(g, 183) ? 1 : 3 : 2 : 0;
+        }
+
+        if (e.m.Ka) return T(a, 7, "Premature end-of-partition0 encountered.");
+
+        for (; a.ja < a.za; ++a.ja) {
+          d = a;
+          e = c;
+          g = d.rb[d.sb - 1];
+          k = d.rb[d.sb + d.ja];
+          f = d.ya[d.aa + d.ja];
+          if (l = d.kc ? f.Ad : 0) g.la = k.la = 0, f.Za || (g.Na = k.Na = 0), f.Hc = 0, f.Gc = 0, f.ia = 0;else {
+            var u,
+                w,
+                g = k,
+                k = e,
+                l = d.Pa.Xc,
+                m = d.ya[d.aa + d.ja],
+                n = d.pb[m.$b];
+            h = m.ad;
+            r = 0;
+            q = d.rb[d.sb - 1];
+            t = v = 0;
+            M(h, r, 0, 384);
+
+            if (m.Za) {
+              var y = 0;
+              var A = l[3];
+            } else {
+              p = V(16);
+              var E = g.Na + q.Na;
+              E = oa(k, l[1], E, n.Eb, 0, p, 0);
+              g.Na = q.Na = (0 < E) + 0;
+              if (1 < E) Nc(p, 0, h, r);else {
+                var B = p[0] + 3 >> 3;
+
+                for (p = 0; 256 > p; p += 16) {
+                  h[r + p] = B;
+                }
+              }
+              y = 1;
+              A = l[0];
+            }
+
+            var C = g.la & 15;
+            var N = q.la & 15;
+
+            for (p = 0; 4 > p; ++p) {
+              var z = N & 1;
+
+              for (B = w = 0; 4 > B; ++B) {
+                E = z + (C & 1), E = oa(k, A, E, n.Sc, y, h, r), z = E > y, C = C >> 1 | z << 7, w = w << 2 | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0]), r += 16;
+              }
+
+              C >>= 4;
+              N = N >> 1 | z << 7;
+              v = (v << 8 | w) >>> 0;
+            }
+
+            A = C;
+            y = N >> 4;
+
+            for (u = 0; 4 > u; u += 2) {
+              w = 0;
+              C = g.la >> 4 + u;
+              N = q.la >> 4 + u;
+
+              for (p = 0; 2 > p; ++p) {
+                z = N & 1;
+
+                for (B = 0; 2 > B; ++B) {
+                  E = z + (C & 1), E = oa(k, l[2], E, n.Qc, 0, h, r), z = 0 < E, C = C >> 1 | z << 3, w = w << 2 | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0]), r += 16;
+                }
+
+                C >>= 2;
+                N = N >> 1 | z << 5;
+              }
+
+              t |= w << 4 * u;
+              A |= C << 4 << u;
+              y |= (N & 240) << u;
+            }
+
+            g.la = A;
+            q.la = y;
+            m.Hc = v;
+            m.Gc = t;
+            m.ia = t & 43690 ? 0 : n.ia;
+            l = !(v | t);
+          }
+          0 < d.L && (d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za], d.wa[d.Y + d.ja].La |= !l);
+          if (e.Ka) return T(a, 7, "Premature end-of-file encountered.");
+        }
+
+        Lc(a);
+        c = a;
+        d = b;
+        e = 1;
+        f = c.D;
+        g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;
+        if (0 == c.Aa) a: {
+          f.M = c.M, f.uc = g, Oc(c, f), e = 1;
+          w = c.D;
+          f = w.Nb;
+          t = Ya[c.L];
+          g = t * c.R;
+          k = t / 2 * c.B;
+          p = 16 * f * c.R;
+          B = 8 * f * c.B;
+          l = c.sa;
+          m = c.ta - g + p;
+          n = c.qa;
+          h = c.ra - k + B;
+          r = c.Ha;
+          q = c.Ia - k + B;
+          C = w.M;
+          N = 0 == C;
+          v = C >= c.Va - 1;
+          2 == c.Aa && Oc(c, w);
+          if (w.uc) for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {
+            var Q = E;
+            y = w;
+            A = z;
+            var S = Q.D,
+                D = S.Nb;
+            u = Q.R;
+            var S = S.wa[S.Y + y],
+                F = Q.sa,
+                H = Q.ta + 16 * D * u + 16 * y,
+                J = S.dd,
+                G = S.tc;
+            if (0 != G) if (x(3 <= G), 1 == Q.L) 0 < y && Pc(F, H, u, G + 4), S.La && Qc(F, H, u, G), 0 < A && Rc(F, H, u, G + 4), S.La && Sc(F, H, u, G);else {
+              var L = Q.B,
+                  O = Q.qa,
+                  P = Q.ra + 8 * D * L + 8 * y,
+                  R = Q.Ha,
+                  Q = Q.Ia + 8 * D * L + 8 * y,
+                  D = S.ld;
+              0 < y && (Tc(F, H, u, G + 4, J, D), Uc(O, P, R, Q, L, G + 4, J, D));
+              S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));
+              0 < A && (Xc(F, H, u, G + 4, J, D), Yc(O, P, R, Q, L, G + 4, J, D));
+              S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));
+            }
+          }
+          c.ia && alert("todo:DitherRow");
+
+          if (null != d.put) {
+            w = 16 * C;
+            C = 16 * (C + 1);
+            N ? (d.y = c.sa, d.O = c.ta + p, d.f = c.qa, d.N = c.ra + B, d.ea = c.Ha, d.W = c.Ia + B) : (w -= t, d.y = l, d.O = m, d.f = n, d.N = h, d.ea = r, d.W = q);
+            v || (C -= t);
+            C > d.o && (C = d.o);
+            d.F = null;
+            d.J = null;
+
+            if (null != c.Fa && 0 < c.Fa.length && w < C && (d.J = Le(c, d, w, C - w), d.F = c.mb, null == d.F && 0 == d.F.length)) {
+              e = T(c, 3, "Could not decode alpha data.");
+              break a;
+            }
+
+            w < d.j && (t = d.j - w, w = d.j, x(!(t & 1)), d.O += c.R * t, d.N += c.B * (t >> 1), d.W += c.B * (t >> 1), null != d.F && (d.J += d.width * t));
+            w < C && (d.O += d.v, d.N += d.v >> 1, d.W += d.v >> 1, null != d.F && (d.J += d.v), d.ka = w - d.j, d.U = d.va - d.v, d.T = C - w, e = d.put(d));
+          }
+
+          f + 1 != c.Ic || v || (I(c.sa, c.ta - g, l, m + 16 * c.R, g), I(c.qa, c.ra - k, n, h + 8 * c.B, k), I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));
+        }
+        if (!e) return T(a, 6, "Output aborted.");
+      }
+
+      return 1;
+    }
+
+    function Me(a, b) {
+      if (null == a) return 0;
+      if (null == b) return T(a, 2, "NULL VP8Io parameter in VP8Decode().");
+      if (!a.cb && !Kc(a, b)) return 0;
+      x(a.cb);
+
+      if (null == b.ac || b.ac(b)) {
+        b.ob && (a.L = 0);
+        var c = Ya[a.L];
+        2 == a.L ? (a.yb = 0, a.zb = 0) : (a.yb = b.v - c >> 4, a.zb = b.j - c >> 4, 0 > a.yb && (a.yb = 0), 0 > a.zb && (a.zb = 0));
+        a.Va = b.o + 15 + c >> 4;
+        a.Hb = b.va + 15 + c >> 4;
+        a.Hb > a.za && (a.Hb = a.za);
+        a.Va > a.Ub && (a.Va = a.Ub);
+
+        if (0 < a.L) {
+          var d = a.ed;
+
+          for (c = 0; 4 > c; ++c) {
+            var e;
+
+            if (a.Qa.Cb) {
+              var f = a.Qa.Lb[c];
+              a.Qa.Fb || (f += d.Tb);
+            } else f = d.Tb;
+
+            for (e = 0; 1 >= e; ++e) {
+              var g = a.gd[c][e],
+                  h = f;
+              d.Pc && (h += d.vd[0], e && (h += d.od[0]));
+              h = 0 > h ? 0 : 63 < h ? 63 : h;
+
+              if (0 < h) {
+                var k = h;
+                0 < d.wb && (k = 4 < d.wb ? k >> 2 : k >> 1, k > 9 - d.wb && (k = 9 - d.wb));
+                1 > k && (k = 1);
+                g.dd = k;
+                g.tc = 2 * h + k;
+                g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;
+              } else g.tc = 0;
+
+              g.La = e;
+            }
+          }
+        }
+
+        c = 0;
+      } else T(a, 6, "Frame setup failed"), c = a.a;
+
+      if (c = 0 == c) {
+        if (c) {
+          a.$c = 0;
+          0 < a.Aa || (a.Ic = Ne);
+
+          b: {
+            c = a.Ic;
+            var k = a.za,
+                d = 4 * k,
+                l = 32 * k,
+                m = k + 1,
+                n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,
+                r = (2 == a.Aa ? 2 : 1) * k;
+            e = 3 * (16 * c + Ya[a.L]) / 2 * l;
+            f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;
+            g = d + 832 + e + f;
+            if (g != g) c = 0;else {
+              if (g > a.Vb) {
+                a.Vb = 0;
+                a.Ec = V(g);
+                a.Fc = 0;
+
+                if (null == a.Ec) {
+                  c = T(a, 1, "no memory during frame initialization.");
+                  break b;
+                }
+
+                a.Vb = g;
+              }
+
+              g = a.Ec;
+              h = a.Fc;
+              a.Ac = g;
+              a.Bc = h;
+              h += d;
+              a.Gd = wa(l, Ic);
+              a.Hd = 0;
+              a.rb = wa(m + 1, Hc);
+              a.sb = 1;
+              a.wa = n ? wa(n, Xa) : null;
+              a.Y = 0;
+              a.D.Nb = 0;
+              a.D.wa = a.wa;
+              a.D.Y = a.Y;
+              0 < a.Aa && (a.D.Y += k);
+              x(!0);
+              a.oc = g;
+              a.pc = h;
+              h += 832;
+              a.ya = wa(r, Kb);
+              a.aa = 0;
+              a.D.ya = a.ya;
+              a.D.aa = a.aa;
+              2 == a.Aa && (a.D.aa += k);
+              a.R = 16 * k;
+              a.B = 8 * k;
+              l = Ya[a.L];
+              k = l * a.R;
+              l = l / 2 * a.B;
+              a.sa = g;
+              a.ta = h + k;
+              a.qa = a.sa;
+              a.ra = a.ta + 16 * c * a.R + l;
+              a.Ha = a.qa;
+              a.Ia = a.ra + 8 * c * a.B + l;
+              a.$c = 0;
+              h += e;
+              a.mb = f ? g : null;
+              a.nb = f ? h : null;
+              x(h + f <= a.Fc + a.Vb);
+              Lc(a);
+              M(a.Ac, a.Bc, 0, d);
+              c = 1;
+            }
+          }
+
+          if (c) {
+            b.ka = 0;
+            b.y = a.sa;
+            b.O = a.ta;
+            b.f = a.qa;
+            b.N = a.ra;
+            b.ea = a.Ha;
+            b.Vd = a.Ia;
+            b.fa = a.R;
+            b.Rc = a.B;
+            b.F = null;
+            b.J = 0;
+
+            if (!ad) {
+              for (c = -255; 255 >= c; ++c) {
+                bd[255 + c] = 0 > c ? -c : c;
+              }
+
+              for (c = -1020; 1020 >= c; ++c) {
+                cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;
+              }
+
+              for (c = -112; 112 >= c; ++c) {
+                dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;
+              }
+
+              for (c = -255; 510 >= c; ++c) {
+                ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;
+              }
+
+              ad = 1;
+            }
+
+            Nc = Oe;
+            Za = Pe;
+            Nb = Qe;
+            pa = Re;
+            Ob = Se;
+            fd = Te;
+            Xc = Ue;
+            Tc = Ve;
+            Yc = We;
+            Uc = Xe;
+            Zc = Ye;
+            Vc = Ze;
+            $c = $e;
+            Wc = af;
+            Rc = gd;
+            Pc = hd;
+            Sc = bf;
+            Qc = cf;
+            W[0] = df;
+            W[1] = ef;
+            W[2] = ff;
+            W[3] = gf;
+            W[4] = hf;
+            W[5] = jf;
+            W[6] = kf;
+            W[7] = lf;
+            W[8] = mf;
+            W[9] = nf;
+            Y[0] = of;
+            Y[1] = pf;
+            Y[2] = qf;
+            Y[3] = rf;
+            Y[4] = sf;
+            Y[5] = tf;
+            Y[6] = uf;
+            ka[0] = vf;
+            ka[1] = wf;
+            ka[2] = xf;
+            ka[3] = yf;
+            ka[4] = zf;
+            ka[5] = Af;
+            ka[6] = Bf;
+            c = 1;
+          } else c = 0;
+        }
+
+        c && (c = Je(a, b));
+        null != b.bc && b.bc(b);
+        c &= 1;
+      }
+
+      if (!c) return 0;
+      a.cb = 0;
+      return c;
+    }
+
+    function qa(a, b, c, d, e) {
+      e = a[b + c + 32 * d] + (e >> 3);
+      a[b + c + 32 * d] = e & -256 ? 0 > e ? 0 : 255 : e;
+    }
+
+    function kb(a, b, c, d, e, f) {
+      qa(a, b, 0, c, d + e);
+      qa(a, b, 1, c, d + f);
+      qa(a, b, 2, c, d - f);
+      qa(a, b, 3, c, d - e);
+    }
+
+    function da(a) {
+      return (20091 * a >> 16) + a;
+    }
+
+    function id(a, b, c, d) {
+      var e = 0,
+          f;
+      var g = V(16);
+
+      for (f = 0; 4 > f; ++f) {
+        var h = a[b + 0] + a[b + 8];
+        var k = a[b + 0] - a[b + 8];
+        var l = (35468 * a[b + 4] >> 16) - da(a[b + 12]);
+        var m = da(a[b + 4]) + (35468 * a[b + 12] >> 16);
+        g[e + 0] = h + m;
+        g[e + 1] = k + l;
+        g[e + 2] = k - l;
+        g[e + 3] = h - m;
+        e += 4;
+        b++;
+      }
+
+      for (f = e = 0; 4 > f; ++f) {
+        a = g[e + 0] + 4, h = a + g[e + 8], k = a - g[e + 8], l = (35468 * g[e + 4] >> 16) - da(g[e + 12]), m = da(g[e + 4]) + (35468 * g[e + 12] >> 16), qa(c, d, 0, 0, h + m), qa(c, d, 1, 0, k + l), qa(c, d, 2, 0, k - l), qa(c, d, 3, 0, h - m), e++, d += 32;
+      }
+    }
+
+    function Te(a, b, c, d) {
+      var e = a[b + 0] + 4,
+          f = 35468 * a[b + 4] >> 16,
+          g = da(a[b + 4]),
+          h = 35468 * a[b + 1] >> 16;
+      a = da(a[b + 1]);
+      kb(c, d, 0, e + g, a, h);
+      kb(c, d, 1, e + f, a, h);
+      kb(c, d, 2, e - f, a, h);
+      kb(c, d, 3, e - g, a, h);
+    }
+
+    function Pe(a, b, c, d, e) {
+      id(a, b, c, d);
+      e && id(a, b + 16, c, d + 4);
+    }
+
+    function Qe(a, b, c, d) {
+      Za(a, b + 0, c, d, 1);
+      Za(a, b + 32, c, d + 128, 1);
+    }
+
+    function Re(a, b, c, d) {
+      a = a[b + 0] + 4;
+      var e;
+
+      for (e = 0; 4 > e; ++e) {
+        for (b = 0; 4 > b; ++b) {
+          qa(c, d, b, e, a);
+        }
+      }
+    }
+
+    function Se(a, b, c, d) {
+      a[b + 0] && pa(a, b + 0, c, d);
+      a[b + 16] && pa(a, b + 16, c, d + 4);
+      a[b + 32] && pa(a, b + 32, c, d + 128);
+      a[b + 48] && pa(a, b + 48, c, d + 128 + 4);
+    }
+
+    function Oe(a, b, c, d) {
+      var e = V(16),
+          f;
+
+      for (f = 0; 4 > f; ++f) {
+        var g = a[b + 0 + f] + a[b + 12 + f];
+        var h = a[b + 4 + f] + a[b + 8 + f];
+        var k = a[b + 4 + f] - a[b + 8 + f];
+        var l = a[b + 0 + f] - a[b + 12 + f];
+        e[0 + f] = g + h;
+        e[8 + f] = g - h;
+        e[4 + f] = l + k;
+        e[12 + f] = l - k;
+      }
+
+      for (f = 0; 4 > f; ++f) {
+        a = e[0 + 4 * f] + 3, g = a + e[3 + 4 * f], h = e[1 + 4 * f] + e[2 + 4 * f], k = e[1 + 4 * f] - e[2 + 4 * f], l = a - e[3 + 4 * f], c[d + 0] = g + h >> 3, c[d + 16] = l + k >> 3, c[d + 32] = g - h >> 3, c[d + 48] = l - k >> 3, d += 64;
+      }
+    }
+
+    function Pb(a, b, c) {
+      var d = b - 32,
+          e = R,
+          f = 255 - a[d - 1],
+          g;
+
+      for (g = 0; g < c; ++g) {
+        var h = e,
+            k = f + a[b - 1],
+            l;
+
+        for (l = 0; l < c; ++l) {
+          a[b + l] = h[k + a[d + l]];
+        }
+
+        b += 32;
+      }
+    }
+
+    function ef(a, b) {
+      Pb(a, b, 4);
+    }
+
+    function wf(a, b) {
+      Pb(a, b, 8);
+    }
+
+    function pf(a, b) {
+      Pb(a, b, 16);
+    }
+
+    function qf(a, b) {
+      var c;
+
+      for (c = 0; 16 > c; ++c) {
+        I(a, b + 32 * c, a, b - 32, 16);
+      }
+    }
+
+    function rf(a, b) {
+      var c;
+
+      for (c = 16; 0 < c; --c) {
+        M(a, b, a[b - 1], 16), b += 32;
+      }
+    }
+
+    function $a(a, b, c) {
+      var d;
+
+      for (d = 0; 16 > d; ++d) {
+        M(b, c + 32 * d, a, 16);
+      }
+    }
+
+    function of(a, b) {
+      var c = 16,
+          d;
+
+      for (d = 0; 16 > d; ++d) {
+        c += a[b - 1 + 32 * d] + a[b + d - 32];
+      }
+
+      $a(c >> 5, a, b);
+    }
+
+    function sf(a, b) {
+      var c = 8,
+          d;
+
+      for (d = 0; 16 > d; ++d) {
+        c += a[b - 1 + 32 * d];
+      }
+
+      $a(c >> 4, a, b);
+    }
+
+    function tf(a, b) {
+      var c = 8,
+          d;
+
+      for (d = 0; 16 > d; ++d) {
+        c += a[b + d - 32];
+      }
+
+      $a(c >> 4, a, b);
+    }
+
+    function uf(a, b) {
+      $a(128, a, b);
+    }
+
+    function z(a, b, c) {
+      return a + 2 * b + c + 2 >> 2;
+    }
+
+    function ff(a, b) {
+      var c = b - 32,
+          c = new Uint8Array([z(a[c - 1], a[c + 0], a[c + 1]), z(a[c + 0], a[c + 1], a[c + 2]), z(a[c + 1], a[c + 2], a[c + 3]), z(a[c + 2], a[c + 3], a[c + 4])]),
+          d;
+
+      for (d = 0; 4 > d; ++d) {
+        I(a, b + 32 * d, c, 0, c.length);
+      }
+    }
+
+    function gf(a, b) {
+      var c = a[b - 1],
+          d = a[b - 1 + 32],
+          e = a[b - 1 + 64],
+          f = a[b - 1 + 96];
+      ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));
+      ra(a, b + 32, 16843009 * z(c, d, e));
+      ra(a, b + 64, 16843009 * z(d, e, f));
+      ra(a, b + 96, 16843009 * z(e, f, f));
+    }
+
+    function df(a, b) {
+      var c = 4,
+          d;
+
+      for (d = 0; 4 > d; ++d) {
+        c += a[b + d - 32] + a[b - 1 + 32 * d];
+      }
+
+      c >>= 3;
+
+      for (d = 0; 4 > d; ++d) {
+        M(a, b + 32 * d, c, 4);
+      }
+    }
+
+    function hf(a, b) {
+      var c = a[b - 1 + 0],
+          d = a[b - 1 + 32],
+          e = a[b - 1 + 64],
+          f = a[b - 1 - 32],
+          g = a[b + 0 - 32],
+          h = a[b + 1 - 32],
+          k = a[b + 2 - 32],
+          l = a[b + 3 - 32];
+      a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);
+      a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);
+      a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);
+      a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);
+      a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);
+      a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);
+      a[b + 3 + 0] = z(l, k, h);
+    }
+
+    function kf(a, b) {
+      var c = a[b + 1 - 32],
+          d = a[b + 2 - 32],
+          e = a[b + 3 - 32],
+          f = a[b + 4 - 32],
+          g = a[b + 5 - 32],
+          h = a[b + 6 - 32],
+          k = a[b + 7 - 32];
+      a[b + 0 + 0] = z(a[b + 0 - 32], c, d);
+      a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);
+      a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);
+      a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);
+      a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);
+      a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);
+      a[b + 3 + 96] = z(h, k, k);
+    }
+
+    function jf(a, b) {
+      var c = a[b - 1 + 0],
+          d = a[b - 1 + 32],
+          e = a[b - 1 + 64],
+          f = a[b - 1 - 32],
+          g = a[b + 0 - 32],
+          h = a[b + 1 - 32],
+          k = a[b + 2 - 32],
+          l = a[b + 3 - 32];
+      a[b + 0 + 0] = a[b + 1 + 64] = f + g + 1 >> 1;
+      a[b + 1 + 0] = a[b + 2 + 64] = g + h + 1 >> 1;
+      a[b + 2 + 0] = a[b + 3 + 64] = h + k + 1 >> 1;
+      a[b + 3 + 0] = k + l + 1 >> 1;
+      a[b + 0 + 96] = z(e, d, c);
+      a[b + 0 + 64] = z(d, c, f);
+      a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);
+      a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);
+      a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);
+      a[b + 3 + 32] = z(h, k, l);
+    }
+
+    function lf(a, b) {
+      var c = a[b + 0 - 32],
+          d = a[b + 1 - 32],
+          e = a[b + 2 - 32],
+          f = a[b + 3 - 32],
+          g = a[b + 4 - 32],
+          h = a[b + 5 - 32],
+          k = a[b + 6 - 32],
+          l = a[b + 7 - 32];
+      a[b + 0 + 0] = c + d + 1 >> 1;
+      a[b + 1 + 0] = a[b + 0 + 64] = d + e + 1 >> 1;
+      a[b + 2 + 0] = a[b + 1 + 64] = e + f + 1 >> 1;
+      a[b + 3 + 0] = a[b + 2 + 64] = f + g + 1 >> 1;
+      a[b + 0 + 32] = z(c, d, e);
+      a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);
+      a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);
+      a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);
+      a[b + 3 + 64] = z(g, h, k);
+      a[b + 3 + 96] = z(h, k, l);
+    }
+
+    function nf(a, b) {
+      var c = a[b - 1 + 0],
+          d = a[b - 1 + 32],
+          e = a[b - 1 + 64],
+          f = a[b - 1 + 96];
+      a[b + 0 + 0] = c + d + 1 >> 1;
+      a[b + 2 + 0] = a[b + 0 + 32] = d + e + 1 >> 1;
+      a[b + 2 + 32] = a[b + 0 + 64] = e + f + 1 >> 1;
+      a[b + 1 + 0] = z(c, d, e);
+      a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);
+      a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);
+      a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[b + 2 + 96] = a[b + 3 + 96] = f;
+    }
+
+    function mf(a, b) {
+      var c = a[b - 1 + 0],
+          d = a[b - 1 + 32],
+          e = a[b - 1 + 64],
+          f = a[b - 1 + 96],
+          g = a[b - 1 - 32],
+          h = a[b + 0 - 32],
+          k = a[b + 1 - 32],
+          l = a[b + 2 - 32];
+      a[b + 0 + 0] = a[b + 2 + 32] = c + g + 1 >> 1;
+      a[b + 0 + 32] = a[b + 2 + 64] = d + c + 1 >> 1;
+      a[b + 0 + 64] = a[b + 2 + 96] = e + d + 1 >> 1;
+      a[b + 0 + 96] = f + e + 1 >> 1;
+      a[b + 3 + 0] = z(h, k, l);
+      a[b + 2 + 0] = z(g, h, k);
+      a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);
+      a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);
+      a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);
+      a[b + 1 + 96] = z(f, e, d);
+    }
+
+    function xf(a, b) {
+      var c;
+
+      for (c = 0; 8 > c; ++c) {
+        I(a, b + 32 * c, a, b - 32, 8);
+      }
+    }
+
+    function yf(a, b) {
+      var c;
+
+      for (c = 0; 8 > c; ++c) {
+        M(a, b, a[b - 1], 8), b += 32;
+      }
+    }
+
+    function lb(a, b, c) {
+      var d;
+
+      for (d = 0; 8 > d; ++d) {
+        M(b, c + 32 * d, a, 8);
+      }
+    }
+
+    function vf(a, b) {
+      var c = 8,
+          d;
+
+      for (d = 0; 8 > d; ++d) {
+        c += a[b + d - 32] + a[b - 1 + 32 * d];
+      }
+
+      lb(c >> 4, a, b);
+    }
+
+    function Af(a, b) {
+      var c = 4,
+          d;
+
+      for (d = 0; 8 > d; ++d) {
+        c += a[b + d - 32];
+      }
+
+      lb(c >> 3, a, b);
+    }
+
+    function zf(a, b) {
+      var c = 4,
+          d;
+
+      for (d = 0; 8 > d; ++d) {
+        c += a[b - 1 + 32 * d];
+      }
+
+      lb(c >> 3, a, b);
+    }
+
+    function Bf(a, b) {
+      lb(128, a, b);
+    }
+
+    function ab(a, b, c) {
+      var d = a[b - c],
+          e = a[b + 0],
+          f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],
+          g = mb[112 + (f + 4 >> 3)];
+      a[b - c] = R[255 + d + mb[112 + (f + 3 >> 3)]];
+      a[b + 0] = R[255 + e - g];
+    }
+
+    function jd(a, b, c, d) {
+      var e = a[b + 0],
+          f = a[b + c];
+      return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;
+    }
+
+    function kd(a, b, c, d) {
+      return 4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d;
+    }
+
+    function ld(a, b, c, d, e) {
+      var f = a[b - 3 * c],
+          g = a[b - 2 * c],
+          h = a[b - c],
+          k = a[b + 0],
+          l = a[b + c],
+          m = a[b + 2 * c],
+          n = a[b + 3 * c];
+      return 4 * U[255 + h - k] + U[255 + g - l] > d ? 0 : U[255 + a[b - 4 * c] - f] <= e && U[255 + f - g] <= e && U[255 + g - h] <= e && U[255 + n - m] <= e && U[255 + m - l] <= e && U[255 + l - k] <= e;
+    }
+
+    function gd(a, b, c, d) {
+      var e = 2 * d + 1;
+
+      for (d = 0; 16 > d; ++d) {
+        kd(a, b + d, c, e) && ab(a, b + d, c);
+      }
+    }
+
+    function hd(a, b, c, d) {
+      var e = 2 * d + 1;
+
+      for (d = 0; 16 > d; ++d) {
+        kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);
+      }
+    }
+
+    function bf(a, b, c, d) {
+      var e;
+
+      for (e = 3; 0 < e; --e) {
+        b += 4 * c, gd(a, b, c, d);
+      }
+    }
+
+    function cf(a, b, c, d) {
+      var e;
+
+      for (e = 3; 0 < e; --e) {
+        b += 4, hd(a, b, c, d);
+      }
+    }
+
+    function ea(a, b, c, d, e, f, g, h) {
+      for (f = 2 * f + 1; 0 < e--;) {
+        if (ld(a, b, c, f, g)) if (jd(a, b, c, h)) ab(a, b, c);else {
+          var k = a,
+              l = b,
+              m = c,
+              n = k[l - 2 * m],
+              r = k[l - m],
+              q = k[l + 0],
+              t = k[l + m],
+              v = k[l + 2 * m],
+              p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],
+              u = 27 * p + 63 >> 7,
+              w = 18 * p + 63 >> 7,
+              p = 9 * p + 63 >> 7;
+          k[l - 3 * m] = R[255 + k[l - 3 * m] + p];
+          k[l - 2 * m] = R[255 + n + w];
+          k[l - m] = R[255 + r + u];
+          k[l + 0] = R[255 + q - u];
+          k[l + m] = R[255 + t - w];
+          k[l + 2 * m] = R[255 + v - p];
+        }
+        b += d;
+      }
+    }
+
+    function Fa(a, b, c, d, e, f, g, h) {
+      for (f = 2 * f + 1; 0 < e--;) {
+        if (ld(a, b, c, f, g)) if (jd(a, b, c, h)) ab(a, b, c);else {
+          var k = a,
+              l = b,
+              m = c,
+              n = k[l - m],
+              r = k[l + 0],
+              q = k[l + m],
+              t = 3 * (r - n),
+              v = mb[112 + (t + 4 >> 3)],
+              t = mb[112 + (t + 3 >> 3)],
+              p = v + 1 >> 1;
+          k[l - 2 * m] = R[255 + k[l - 2 * m] + p];
+          k[l - m] = R[255 + n + t];
+          k[l + 0] = R[255 + r - v];
+          k[l + m] = R[255 + q - p];
+        }
+        b += d;
+      }
+    }
+
+    function Ue(a, b, c, d, e, f) {
+      ea(a, b, c, 1, 16, d, e, f);
+    }
+
+    function Ve(a, b, c, d, e, f) {
+      ea(a, b, 1, c, 16, d, e, f);
+    }
+
+    function Ye(a, b, c, d, e, f) {
+      var g;
+
+      for (g = 3; 0 < g; --g) {
+        b += 4 * c, Fa(a, b, c, 1, 16, d, e, f);
+      }
+    }
+
+    function Ze(a, b, c, d, e, f) {
+      var g;
+
+      for (g = 3; 0 < g; --g) {
+        b += 4, Fa(a, b, 1, c, 16, d, e, f);
+      }
+    }
+
+    function We(a, b, c, d, e, f, g, h) {
+      ea(a, b, e, 1, 8, f, g, h);
+      ea(c, d, e, 1, 8, f, g, h);
+    }
+
+    function Xe(a, b, c, d, e, f, g, h) {
+      ea(a, b, 1, e, 8, f, g, h);
+      ea(c, d, 1, e, 8, f, g, h);
+    }
+
+    function $e(a, b, c, d, e, f, g, h) {
+      Fa(a, b + 4 * e, e, 1, 8, f, g, h);
+      Fa(c, d + 4 * e, e, 1, 8, f, g, h);
+    }
+
+    function af(a, b, c, d, e, f, g, h) {
+      Fa(a, b + 4, 1, e, 8, f, g, h);
+      Fa(c, d + 4, 1, e, 8, f, g, h);
+    }
+
+    function Cf() {
+      this.ba = new Cb();
+      this.ec = [];
+      this.cc = [];
+      this.Mc = [];
+      this.Dc = this.Nc = this.dc = this.fc = 0;
+      this.Oa = new Ud();
+      this.memory = 0;
+      this.Ib = "OutputFunc";
+      this.Jb = "OutputAlphaFunc";
+      this.Nd = "OutputRowFunc";
+    }
+
+    function md() {
+      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 Df() {
+      this.nc = this.Ea = this.b = this.hc = 0;
+      this.K = [];
+      this.w = 0;
+    }
+
+    function Ef() {
+      this.ua = 0;
+      this.Wa = new ac();
+      this.vb = new ac();
+      this.md = this.xc = this.wc = 0;
+      this.vc = [];
+      this.Wb = 0;
+      this.Ya = new Ub();
+      this.yc = new O();
+    }
+
+    function je() {
+      this.xb = this.a = 0;
+      this.l = new Oa();
+      this.ca = new Cb();
+      this.V = [];
+      this.Ba = 0;
+      this.Ta = [];
+      this.Ua = 0;
+      this.m = new Ra();
+      this.Pb = 0;
+      this.wd = new Ra();
+      this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;
+      this.s = new Ef();
+      this.ab = 0;
+      this.gc = wa(4, Df);
+      this.Oc = 0;
+    }
+
+    function Ff() {
+      this.Lc = this.Z = this.$a = this.i = this.c = 0;
+      this.l = new Oa();
+      this.ic = 0;
+      this.ca = [];
+      this.tb = 0;
+      this.qd = null;
+      this.rd = 0;
+    }
+
+    function Rb(a, b, c, d, e, f, g) {
+      a = null == a ? 0 : a[b + 0];
+
+      for (b = 0; b < g; ++b) {
+        e[f + b] = a + c[d + b] & 255, a = e[f + b];
+      }
+    }
+
+    function Gf(a, b, c, d, e, f, g) {
+      if (null == a) Rb(null, null, c, d, e, f, g);else {
+        var h;
+
+        for (h = 0; h < g; ++h) {
+          e[f + h] = a[b + h] + c[d + h] & 255;
+        }
+      }
+    }
+
+    function Hf(a, b, c, d, e, f, g) {
+      if (null == a) Rb(null, null, c, d, e, f, g);else {
+        var h = a[b + 0],
+            k = h,
+            l = h,
+            m;
+
+        for (m = 0; m < g; ++m) {
+          h = a[b + m], k = l + h - k, l = c[d + m] + (k & -256 ? 0 > k ? 0 : 255 : k) & 255, k = h, e[f + m] = l;
+        }
+      }
+    }
+
+    function Le(a, b, c, d) {
+      var e = b.width,
+          f = b.o;
+      x(null != a && null != b);
+      if (0 > c || 0 >= d || c + d > f) return null;
+
+      if (!a.Cc) {
+        if (null == a.ga) {
+          a.ga = new Ff();
+          var g;
+          (g = null == a.ga) || (g = b.width * b.o, x(0 == a.Gb.length), a.Gb = V(g), a.Uc = 0, null == a.Gb ? g = 0 : (a.mb = a.Gb, a.nb = a.Uc, a.rc = null, g = 1), g = !g);
+
+          if (!g) {
+            g = a.ga;
+            var h = a.Fa,
+                k = a.P,
+                l = a.qc,
+                m = a.mb,
+                n = a.nb,
+                r = k + 1,
+                q = l - 1,
+                t = g.l;
+            x(null != h && null != m && null != b);
+            ia[0] = null;
+            ia[1] = Rb;
+            ia[2] = Gf;
+            ia[3] = Hf;
+            g.ca = m;
+            g.tb = n;
+            g.c = b.width;
+            g.i = b.height;
+            x(0 < g.c && 0 < g.i);
+            if (1 >= l) b = 0;else if (g.$a = h[k + 0] >> 0 & 3, g.Z = h[k + 0] >> 2 & 3, g.Lc = h[k + 0] >> 4 & 3, k = h[k + 0] >> 6 & 3, 0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k) b = 0;else if (t.put = kc, t.ac = gc, t.bc = lc, t.ma = g, t.width = b.width, t.height = b.height, t.Da = b.Da, t.v = b.v, t.va = b.va, t.j = b.j, t.o = b.o, g.$a) b: {
+              x(1 == g.$a), b = Bc();
+
+              c: for (;;) {
+                if (null == b) {
+                  b = 0;
+                  break b;
+                }
+
+                x(null != g);
+                g.mc = b;
+                b.c = g.c;
+                b.i = g.i;
+                b.l = g.l;
+                b.l.ma = g;
+                b.l.width = g.c;
+                b.l.height = g.i;
+                b.a = 0;
+                cb(b.m, h, r, q);
+                if (!rb(g.c, g.i, 1, b, null)) break c;
+                1 == b.ab && 3 == b.gc[0].hc && yc(b.s) ? (g.ic = 1, h = b.c * b.i, b.Ta = null, b.Ua = 0, b.V = V(h), b.Ba = 0, null == b.V ? (b.a = 1, b = 0) : b = 1) : (g.ic = 0, b = Ec(b, g.c));
+                if (!b) break c;
+                b = 1;
+                break b;
+              }
+
+              g.mc = null;
+              b = 0;
+            } else b = q >= g.c * g.i;
+            g = !b;
+          }
+
+          if (g) return null;
+          1 != a.ga.Lc ? a.Ga = 0 : d = f - c;
+        }
+
+        x(null != a.ga);
+        x(c + d <= f);
+
+        a: {
+          h = a.ga;
+          b = h.c;
+          f = h.l.o;
+
+          if (0 == h.$a) {
+            r = a.rc;
+            q = a.Vc;
+            t = a.Fa;
+            k = a.P + 1 + c * b;
+            l = a.mb;
+            m = a.nb + c * b;
+            x(k <= a.P + a.qc);
+            if (0 != h.Z) for (x(null != ia[h.Z]), g = 0; g < d; ++g) {
+              ia[h.Z](r, q, t, k, l, m, b), r = l, q = m, m += b, k += b;
+            } else for (g = 0; g < d; ++g) {
+              I(l, m, t, k, b), r = l, q = m, m += b, k += b;
+            }
+            a.rc = r;
+            a.Vc = q;
+          } else {
+            x(null != h.mc);
+            b = c + d;
+            g = h.mc;
+            x(null != g);
+            x(b <= g.i);
+            if (g.C >= b) b = 1;else if (h.ic || Aa(), h.ic) {
+              var h = g.V,
+                  r = g.Ba,
+                  q = g.c,
+                  v = g.i,
+                  t = 1,
+                  k = g.$ / q,
+                  l = g.$ % q,
+                  m = g.m,
+                  n = g.s,
+                  p = g.$,
+                  u = q * v,
+                  w = q * b,
+                  y = n.wc,
+                  A = p < w ? ha(n, l, k) : null;
+              x(p <= u);
+              x(b <= v);
+              x(yc(n));
+
+              c: for (;;) {
+                for (; !m.h && p < w;) {
+                  l & y || (A = ha(n, l, k));
+                  x(null != A);
+                  Sa(m);
+                  v = ua(A.G[0], A.H[0], m);
+                  if (256 > v) h[r + p] = v, ++p, ++l, l >= q && (l = 0, ++k, k <= b && !(k % 16) && Ib(g, k));else if (280 > v) {
+                    var v = ib(v - 256, m);
+                    var E = ua(A.G[4], A.H[4], m);
+                    Sa(m);
+                    E = ib(E, m);
+                    E = nc(q, E);
+
+                    if (p >= E && u - p >= v) {
+                      var B;
+
+                      for (B = 0; B < v; ++B) {
+                        h[r + p + B] = h[r + p + B - E];
+                      }
+                    } else {
+                      t = 0;
+                      break c;
+                    }
+
+                    p += v;
+
+                    for (l += v; l >= q;) {
+                      l -= q, ++k, k <= b && !(k % 16) && Ib(g, k);
+                    }
+
+                    p < w && l & y && (A = ha(n, l, k));
+                  } else {
+                    t = 0;
+                    break c;
+                  }
+                  x(m.h == db(m));
+                }
+
+                Ib(g, k > b ? b : k);
+                break c;
+              }
+
+              !t || m.h && p < u ? (t = 0, g.a = m.h ? 5 : 3) : g.$ = p;
+              b = t;
+            } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);
+
+            if (!b) {
+              d = 0;
+              break a;
+            }
+          }
+
+          c + d >= f && (a.Cc = 1);
+          d = 1;
+        }
+
+        if (!d) return null;
+        if (a.Cc && (d = a.ga, null != d && (d.mc = null), a.ga = null, 0 < a.Ga)) return alert("todo:WebPDequantizeLevels"), null;
+      }
+
+      return a.nb + c * e;
+    }
+
+    function If(a, b, c, d, e, f) {
+      for (; 0 < e--;) {
+        var g = a,
+            h = b + (c ? 1 : 0),
+            k = a,
+            l = b + (c ? 0 : 3),
+            m;
+
+        for (m = 0; m < d; ++m) {
+          var n = k[l + 4 * m];
+          255 != n && (n *= 32897, g[h + 4 * m + 0] = g[h + 4 * m + 0] * n >> 23, g[h + 4 * m + 1] = g[h + 4 * m + 1] * n >> 23, g[h + 4 * m + 2] = g[h + 4 * m + 2] * n >> 23);
+        }
+
+        b += f;
+      }
+    }
+
+    function Jf(a, b, c, d, e) {
+      for (; 0 < d--;) {
+        var f;
+
+        for (f = 0; f < c; ++f) {
+          var g = a[b + 2 * f + 0],
+              h = a[b + 2 * f + 1],
+              k = h & 15,
+              l = 4369 * k,
+              h = (h & 240 | h >> 4) * l >> 16;
+          a[b + 2 * f + 0] = (g & 240 | g >> 4) * l >> 16 & 240 | (g & 15 | g << 4) * l >> 16 >> 4 & 15;
+          a[b + 2 * f + 1] = h & 240 | k;
+        }
+
+        b += e;
+      }
+    }
+
+    function Kf(a, b, c, d, e, f, g, h) {
+      var k = 255,
+          l,
+          m;
+
+      for (m = 0; m < e; ++m) {
+        for (l = 0; l < d; ++l) {
+          var n = a[b + l];
+          f[g + 4 * l] = n;
+          k &= n;
+        }
+
+        b += c;
+        g += h;
+      }
+
+      return 255 != k;
+    }
+
+    function Lf(a, b, c, d, e) {
+      var f;
+
+      for (f = 0; f < e; ++f) {
+        c[d + f] = a[b + f] >> 8;
+      }
+    }
+
+    function Aa() {
+      za = If;
+      vc = Jf;
+      fc = Kf;
+      Fc = Lf;
+    }
+
+    function va(a, b, c) {
+      self[a] = function (a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {
+        var d,
+            E = y - 1 >> 1;
+        var B = h[k + 0] | l[m + 0] << 16;
+        var C = n[r + 0] | q[t + 0] << 16;
+        x(null != a);
+        var z = 3 * B + C + 131074 >> 2;
+        b(a[e + 0], z & 255, z >> 16, v, p);
+        null != f && (z = 3 * C + B + 131074 >> 2, b(f[g + 0], z & 255, z >> 16, u, w));
+
+        for (d = 1; d <= E; ++d) {
+          var D = h[k + d] | l[m + d] << 16;
+          var G = n[r + d] | q[t + d] << 16;
+          var F = B + D + C + G + 524296;
+          var H = F + 2 * (D + C) >> 3;
+          F = F + 2 * (B + G) >> 3;
+          z = H + B >> 1;
+          B = F + D >> 1;
+          b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);
+          b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);
+          null != f && (z = F + C >> 1, B = H + G >> 1, b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c), b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));
+          B = D;
+          C = G;
+        }
+
+        y & 1 || (z = 3 * B + C + 131074 >> 2, b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c), null != f && (z = 3 * C + B + 131074 >> 2, b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));
+      };
+    }
+
+    function ic() {
+      P[Ca] = Mf;
+      P[Ua] = nd;
+      P[tc] = Nf;
+      P[Va] = od;
+      P[ya] = pd;
+      P[Db] = qd;
+      P[wc] = Of;
+      P[zb] = nd;
+      P[Ab] = od;
+      P[Ja] = pd;
+      P[Bb] = qd;
+    }
+
+    function Sb(a) {
+      return a & ~Pf ? 0 > a ? 0 : 255 : a >> rd;
+    }
+
+    function bb(a, b) {
+      return Sb((19077 * a >> 8) + (26149 * b >> 8) - 14234);
+    }
+
+    function nb(a, b, c) {
+      return Sb((19077 * a >> 8) - (6419 * b >> 8) - (13320 * c >> 8) + 8708);
+    }
+
+    function Pa(a, b) {
+      return Sb((19077 * a >> 8) + (33050 * b >> 8) - 17685);
+    }
+
+    function Ga(a, b, c, d, e) {
+      d[e + 0] = bb(a, c);
+      d[e + 1] = nb(a, b, c);
+      d[e + 2] = Pa(a, b);
+    }
+
+    function Tb(a, b, c, d, e) {
+      d[e + 0] = Pa(a, b);
+      d[e + 1] = nb(a, b, c);
+      d[e + 2] = bb(a, c);
+    }
+
+    function sd(a, b, c, d, e) {
+      var f = nb(a, b, c);
+      b = f << 3 & 224 | Pa(a, b) >> 3;
+      d[e + 0] = bb(a, c) & 248 | f >> 5;
+      d[e + 1] = b;
+    }
+
+    function td(a, b, c, d, e) {
+      var f = Pa(a, b) & 240 | 15;
+      d[e + 0] = bb(a, c) & 240 | nb(a, b, c) >> 4;
+      d[e + 1] = f;
+    }
+
+    function ud(a, b, c, d, e) {
+      d[e + 0] = 255;
+      Ga(a, b, c, d, e + 1);
+    }
+
+    function vd(a, b, c, d, e) {
+      Tb(a, b, c, d, e);
+      d[e + 3] = 255;
+    }
+
+    function wd(a, b, c, d, e) {
+      Ga(a, b, c, d, e);
+      d[e + 3] = 255;
+    }
+
+    function ga(a, b) {
+      return 0 > a ? 0 : a > b ? b : a;
+    }
+
+    function la(a, b, c) {
+      self[a] = function (a, e, f, g, h, k, l, m, n) {
+        for (var d = m + (n & -2) * c; m != d;) {
+          b(a[e + 0], f[g + 0], h[k + 0], l, m), b(a[e + 1], f[g + 0], h[k + 0], l, m + c), e += 2, ++g, ++k, m += 2 * c;
+        }
+
+        n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);
+      };
+    }
+
+    function xd(a, b, c) {
+      return 0 == c ? 0 == a ? 0 == b ? 6 : 5 : 0 == b ? 4 : 0 : c;
+    }
+
+    function yd(a, b, c, d, e) {
+      switch (a >>> 30) {
+        case 3:
+          Za(b, c, d, e, 0);
+          break;
+
+        case 2:
+          fd(b, c, d, e);
+          break;
+
+        case 1:
+          pa(b, c, d, e);
+      }
+    }
+
+    function Oc(a, b) {
+      var c,
+          d,
+          e = b.M,
+          f = b.Nb,
+          g = a.oc,
+          h = a.pc + 40,
+          k = a.oc,
+          l = a.pc + 584,
+          m = a.oc,
+          n = a.pc + 600;
+
+      for (c = 0; 16 > c; ++c) {
+        g[h + 32 * c - 1] = 129;
+      }
+
+      for (c = 0; 8 > c; ++c) {
+        k[l + 32 * c - 1] = 129, m[n + 32 * c - 1] = 129;
+      }
+
+      0 < e ? g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129 : (M(g, h - 32 - 1, 127, 21), M(k, l - 32 - 1, 127, 9), M(m, n - 32 - 1, 127, 9));
+
+      for (d = 0; d < a.za; ++d) {
+        var r = b.ya[b.aa + d];
+
+        if (0 < d) {
+          for (c = -1; 16 > c; ++c) {
+            I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);
+          }
+
+          for (c = -1; 8 > c; ++c) {
+            I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4), I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);
+          }
+        }
+
+        var q = a.Gd,
+            t = a.Hd + d,
+            v = r.ad,
+            p = r.Hc;
+        0 < e && (I(g, h - 32, q[t].y, 0, 16), I(k, l - 32, q[t].f, 0, 8), I(m, n - 32, q[t].ea, 0, 8));
+
+        if (r.Za) {
+          var u = g;
+          var w = h - 32 + 16;
+          0 < e && (d >= a.za - 1 ? M(u, w, q[t].y[15], 4) : I(u, w, q[t + 1].y, 0, 4));
+
+          for (c = 0; 4 > c; c++) {
+            u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];
+          }
+
+          for (c = 0; 16 > c; ++c, p <<= 2) {
+            u = g, w = h + zd[c], W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);
+          }
+        } else if (u = xd(d, e, r.Ob[0]), Y[u](g, h), 0 != p) for (c = 0; 16 > c; ++c, p <<= 2) {
+          yd(p, v, 16 * +c, g, h + zd[c]);
+        }
+
+        c = r.Gc;
+        u = xd(d, e, r.Dd);
+        ka[u](k, l);
+        ka[u](m, n);
+        r = c >> 0;
+        p = v;
+        u = k;
+        w = l;
+        r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));
+        c >>= 8;
+        r = m;
+        p = n;
+        c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));
+        e < a.Ub - 1 && (I(q[t].y, 0, g, h + 480, 16), I(q[t].f, 0, k, l + 224, 8), I(q[t].ea, 0, m, n + 224, 8));
+        c = 8 * f * a.B;
+        q = a.sa;
+        t = a.ta + 16 * d + 16 * f * a.R;
+        v = a.qa;
+        r = a.ra + 8 * d + c;
+        p = a.Ha;
+        u = a.Ia + 8 * d + c;
+
+        for (c = 0; 16 > c; ++c) {
+          I(q, t + c * a.R, g, h + 32 * c, 16);
+        }
+
+        for (c = 0; 8 > c; ++c) {
+          I(v, r + c * a.B, k, l + 32 * c, 8), I(p, u + c * a.B, m, n + 32 * c, 8);
+        }
+      }
+    }
+
+    function Ad(a, b, c, d, e, f, g, h, k) {
+      var l = [0],
+          m = [0],
+          n = 0,
+          r = null != k ? k.kd : 0,
+          q = null != k ? k : new md();
+      if (null == a || 12 > c) return 7;
+      q.data = a;
+      q.w = b;
+      q.ha = c;
+      b = [b];
+      c = [c];
+      q.gb = [q.gb];
+
+      a: {
+        var t = b;
+        var v = c;
+        var p = q.gb;
+        x(null != a);
+        x(null != v);
+        x(null != p);
+        p[0] = 0;
+
+        if (12 <= v[0] && !fa(a, t[0], "RIFF")) {
+          if (fa(a, t[0] + 8, "WEBP")) {
+            p = 3;
+            break a;
+          }
+
+          var u = Ha(a, t[0] + 4);
+
+          if (12 > u || 4294967286 < u) {
+            p = 3;
+            break a;
+          }
+
+          if (r && u > v[0] - 8) {
+            p = 7;
+            break a;
+          }
+
+          p[0] = u;
+          t[0] += 12;
+          v[0] -= 12;
+        }
+
+        p = 0;
+      }
+
+      if (0 != p) return p;
+      u = 0 < q.gb[0];
+
+      for (c = c[0];;) {
+        t = [0];
+        n = [n];
+
+        a: {
+          var w = a;
+          v = b;
+          p = c;
+          var y = n,
+              A = l,
+              z = m,
+              B = t;
+          y[0] = 0;
+          if (8 > p[0]) p = 7;else {
+            if (!fa(w, v[0], "VP8X")) {
+              if (10 != Ha(w, v[0] + 4)) {
+                p = 3;
+                break a;
+              }
+
+              if (18 > p[0]) {
+                p = 7;
+                break a;
+              }
+
+              var C = Ha(w, v[0] + 8);
+              var D = 1 + Yb(w, v[0] + 12);
+              w = 1 + Yb(w, v[0] + 15);
+
+              if (2147483648 <= D * w) {
+                p = 3;
+                break a;
+              }
+
+              null != B && (B[0] = C);
+              null != A && (A[0] = D);
+              null != z && (z[0] = w);
+              v[0] += 18;
+              p[0] -= 18;
+              y[0] = 1;
+            }
+
+            p = 0;
+          }
+        }
+
+        n = n[0];
+        t = t[0];
+        if (0 != p) return p;
+        v = !!(t & 2);
+        if (!u && n) return 3;
+        null != f && (f[0] = !!(t & 16));
+        null != g && (g[0] = v);
+        null != h && (h[0] = 0);
+        g = l[0];
+        t = m[0];
+
+        if (n && v && null == k) {
+          p = 0;
+          break;
+        }
+
+        if (4 > c) {
+          p = 7;
+          break;
+        }
+
+        if (u && n || !u && !n && !fa(a, b[0], "ALPH")) {
+          c = [c];
+          q.na = [q.na];
+          q.P = [q.P];
+          q.Sa = [q.Sa];
+
+          a: {
+            C = a;
+            p = b;
+            u = c;
+            var y = q.gb,
+                A = q.na,
+                z = q.P,
+                B = q.Sa;
+            D = 22;
+            x(null != C);
+            x(null != u);
+            w = p[0];
+            var F = u[0];
+            x(null != A);
+            x(null != B);
+            A[0] = null;
+            z[0] = null;
+
+            for (B[0] = 0;;) {
+              p[0] = w;
+              u[0] = F;
+
+              if (8 > F) {
+                p = 7;
+                break a;
+              }
+
+              var G = Ha(C, w + 4);
+
+              if (4294967286 < G) {
+                p = 3;
+                break a;
+              }
+
+              var H = 8 + G + 1 & -2;
+              D += H;
+
+              if (0 < y && D > y) {
+                p = 3;
+                break a;
+              }
+
+              if (!fa(C, w, "VP8 ") || !fa(C, w, "VP8L")) {
+                p = 0;
+                break a;
+              }
+
+              if (F[0] < H) {
+                p = 7;
+                break a;
+              }
+
+              fa(C, w, "ALPH") || (A[0] = C, z[0] = w + 8, B[0] = G);
+              w += H;
+              F -= H;
+            }
+          }
+
+          c = c[0];
+          q.na = q.na[0];
+          q.P = q.P[0];
+          q.Sa = q.Sa[0];
+          if (0 != p) break;
+        }
+
+        c = [c];
+        q.Ja = [q.Ja];
+        q.xa = [q.xa];
+
+        a: if (y = a, p = b, u = c, A = q.gb[0], z = q.Ja, B = q.xa, C = p[0], w = !fa(y, C, "VP8 "), D = !fa(y, C, "VP8L"), x(null != y), x(null != u), x(null != z), x(null != B), 8 > u[0]) p = 7;else {
+          if (w || D) {
+            y = Ha(y, C + 4);
+
+            if (12 <= A && y > A - 12) {
+              p = 3;
+              break a;
+            }
+
+            if (r && y > u[0] - 8) {
+              p = 7;
+              break a;
+            }
+
+            z[0] = y;
+            p[0] += 8;
+            u[0] -= 8;
+            B[0] = D;
+          } else B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5), z[0] = u[0];
+
+          p = 0;
+        }
+
+        c = c[0];
+        q.Ja = q.Ja[0];
+        q.xa = q.xa[0];
+        b = b[0];
+        if (0 != p) break;
+        if (4294967286 < q.Ja) return 3;
+        null == h || v || (h[0] = q.xa ? 2 : 1);
+        g = [g];
+        t = [t];
+
+        if (q.xa) {
+          if (5 > c) {
+            p = 7;
+            break;
+          }
+
+          h = g;
+          r = t;
+          v = f;
+          null == a || 5 > c ? a = 0 : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5) ? (u = [0], y = [0], A = [0], z = new Ra(), cb(z, a, b, c), mc(z, u, y, A) ? (null != h && (h[0] = u[0]), null != r && (r[0] = y[0]), null != v && (v[0] = A[0]), a = 1) : a = 0) : a = 0;
+        } else {
+          if (10 > c) {
+            p = 7;
+            break;
+          }
+
+          h = t;
+          null == a || 10 > c || !Jc(a, b + 3, c - 3) ? a = 0 : (r = a[b + 0] | a[b + 1] << 8 | a[b + 2] << 16, v = (a[b + 7] << 8 | a[b + 6]) & 16383, a = (a[b + 9] << 8 | a[b + 8]) & 16383, r & 1 || 3 < (r >> 1 & 7) || !(r >> 4 & 1) || r >> 5 >= q.Ja || !v || !a ? a = 0 : (g && (g[0] = v), h && (h[0] = a), a = 1));
+        }
+
+        if (!a) return 3;
+        g = g[0];
+        t = t[0];
+        if (n && (l[0] != g || m[0] != t)) return 3;
+        null != k && (k[0] = q, k.offset = b - k.w, x(4294967286 > b - k.w), x(k.offset == k.ha - c));
+        break;
+      }
+
+      return 0 == p || 7 == p && n && null == k ? (null != f && (f[0] |= null != q.na && 0 < q.na.length), null != d && (d[0] = g), null != e && (e[0] = t), 0) : p;
+    }
+
+    function hc(a, b, c) {
+      var d = b.width,
+          e = b.height,
+          f = 0,
+          g = 0,
+          h = d,
+          k = e;
+      b.Da = null != a && 0 < a.Da;
+      if (b.Da && (h = a.cd, k = a.bd, f = a.v, g = a.j, 11 > c || (f &= -2, g &= -2), 0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)) return 0;
+      b.v = f;
+      b.j = g;
+      b.va = f + h;
+      b.o = g + k;
+      b.U = h;
+      b.T = k;
+      b.da = null != a && 0 < a.da;
+
+      if (b.da) {
+        c = [a.ib];
+        f = [a.hb];
+        if (!bc(h, k, c, f)) return 0;
+        b.ib = c[0];
+        b.hb = f[0];
+      }
+
+      b.ob = null != a && a.ob;
+      b.Kb = null == a || !a.Sd;
+      b.da && (b.ob = b.ib < 3 * d / 4 && b.hb < 3 * e / 4, b.Kb = 0);
+      return 1;
+    }
+
+    function Bd(a) {
+      if (null == a) return 2;
+
+      if (11 > a.S) {
+        var b = a.f.RGBA;
+        b.fb += (a.height - 1) * b.A;
+        b.A = -b.A;
+      } else b = a.f.kb, a = a.height, b.O += (a - 1) * b.fa, b.fa = -b.fa, b.N += (a - 1 >> 1) * b.Ab, b.Ab = -b.Ab, b.W += (a - 1 >> 1) * b.Db, b.Db = -b.Db, null != b.F && (b.J += (a - 1) * b.lb, b.lb = -b.lb);
+
+      return 0;
+    }
+
+    function Cd(a, b, c, d) {
+      if (null == d || 0 >= a || 0 >= b) return 2;
+
+      if (null != c) {
+        if (c.Da) {
+          var e = c.cd,
+              f = c.bd,
+              g = c.v & -2,
+              h = c.j & -2;
+          if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b) return 2;
+          a = e;
+          b = f;
+        }
+
+        if (c.da) {
+          e = [c.ib];
+          f = [c.hb];
+          if (!bc(a, b, e, f)) return 2;
+          a = e[0];
+          b = f[0];
+        }
+      }
+
+      d.width = a;
+      d.height = b;
+
+      a: {
+        var k = d.width;
+        var l = d.height;
+        a = d.S;
+        if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;else {
+          if (0 >= d.Rd && null == d.sd) {
+            var g = f = e = b = 0,
+                h = k * Dd[a],
+                m = h * l;
+            11 > a || (b = (k + 1) / 2, f = (l + 1) / 2 * b, 12 == a && (e = k, g = e * l));
+            l = V(m + 2 * f + g);
+
+            if (null == l) {
+              a = 1;
+              break a;
+            }
+
+            d.sd = l;
+            11 > a ? (k = d.f.RGBA, k.eb = l, k.fb = 0, k.A = h, k.size = m) : (k = d.f.kb, k.y = l, k.O = 0, k.fa = h, k.Fd = m, k.f = l, k.N = 0 + m, k.Ab = b, k.Cd = f, k.ea = l, k.W = 0 + m + f, k.Db = b, k.Ed = f, 12 == a && (k.F = l, k.J = 0 + m + 2 * f), k.Tc = g, k.lb = e);
+          }
+
+          b = 1;
+          e = d.S;
+          f = d.width;
+          g = d.height;
+          if (e >= Ca && 13 > e) {
+            if (11 > e) a = d.f.RGBA, h = Math.abs(a.A), b &= h * (g - 1) + f <= a.size, b &= h >= f * Dd[e], b &= null != a.eb;else {
+              a = d.f.kb;
+              h = (f + 1) / 2;
+              m = (g + 1) / 2;
+              k = Math.abs(a.fa);
+              var l = Math.abs(a.Ab),
+                  n = Math.abs(a.Db),
+                  r = Math.abs(a.lb),
+                  q = r * (g - 1) + f;
+              b &= k * (g - 1) + f <= a.Fd;
+              b &= l * (m - 1) + h <= a.Cd;
+              b &= n * (m - 1) + h <= a.Ed;
+              b = b & k >= f & l >= h & n >= h;
+              b &= null != a.y;
+              b &= null != a.f;
+              b &= null != a.ea;
+              12 == e && (b &= r >= f, b &= q <= a.Tc, b &= null != a.F);
+            }
+          } else b = 0;
+          a = b ? 0 : 2;
+        }
+      }
+
+      if (0 != a) return a;
+      null != c && c.fd && (a = Bd(d));
+      return a;
+    }
+
+    var xb = 64,
+        Hd = [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],
+        Gd = 24,
+        ob = 32,
+        Xb = 8,
+        Id = [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];
+    X("Predictor0", "PredictorAdd0");
+
+    self.Predictor0 = function () {
+      return 4278190080;
+    };
+
+    self.Predictor1 = function (a) {
+      return a;
+    };
+
+    self.Predictor2 = function (a, b, c) {
+      return b[c + 0];
+    };
+
+    self.Predictor3 = function (a, b, c) {
+      return b[c + 1];
+    };
+
+    self.Predictor4 = function (a, b, c) {
+      return b[c - 1];
+    };
+
+    self.Predictor5 = function (a, b, c) {
+      return aa(aa(a, b[c + 1]), b[c + 0]);
+    };
+
+    self.Predictor6 = function (a, b, c) {
+      return aa(a, b[c - 1]);
+    };
+
+    self.Predictor7 = function (a, b, c) {
+      return aa(a, b[c + 0]);
+    };
+
+    self.Predictor8 = function (a, b, c) {
+      return aa(b[c - 1], b[c + 0]);
+    };
+
+    self.Predictor9 = function (a, b, c) {
+      return aa(b[c + 0], b[c + 1]);
+    };
+
+    self.Predictor10 = function (a, b, c) {
+      return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));
+    };
+
+    self.Predictor11 = function (a, b, c) {
+      var d = b[c + 0];
+      b = b[c - 1];
+      return 0 >= Ia(d >> 24 & 255, a >> 24 & 255, b >> 24 & 255) + Ia(d >> 16 & 255, a >> 16 & 255, b >> 16 & 255) + Ia(d >> 8 & 255, a >> 8 & 255, b >> 8 & 255) + Ia(d & 255, a & 255, b & 255) ? d : a;
+    };
+
+    self.Predictor12 = function (a, b, c) {
+      var d = b[c + 0];
+      b = b[c - 1];
+      return (sa((a >> 24 & 255) + (d >> 24 & 255) - (b >> 24 & 255)) << 24 | sa((a >> 16 & 255) + (d >> 16 & 255) - (b >> 16 & 255)) << 16 | sa((a >> 8 & 255) + (d >> 8 & 255) - (b >> 8 & 255)) << 8 | sa((a & 255) + (d & 255) - (b & 255))) >>> 0;
+    };
+
+    self.Predictor13 = function (a, b, c) {
+      var d = b[c - 1];
+      a = aa(a, b[c + 0]);
+      return (eb(a >> 24 & 255, d >> 24 & 255) << 24 | eb(a >> 16 & 255, d >> 16 & 255) << 16 | eb(a >> 8 & 255, d >> 8 & 255) << 8 | eb(a >> 0 & 255, d >> 0 & 255)) >>> 0;
+    };
+
+    var ee = self.PredictorAdd0;
+    self.PredictorAdd1 = cc;
+    X("Predictor2", "PredictorAdd2");
+    X("Predictor3", "PredictorAdd3");
+    X("Predictor4", "PredictorAdd4");
+    X("Predictor5", "PredictorAdd5");
+    X("Predictor6", "PredictorAdd6");
+    X("Predictor7", "PredictorAdd7");
+    X("Predictor8", "PredictorAdd8");
+    X("Predictor9", "PredictorAdd9");
+    X("Predictor10", "PredictorAdd10");
+    X("Predictor11", "PredictorAdd11");
+    X("Predictor12", "PredictorAdd12");
+    X("Predictor13", "PredictorAdd13");
+    var fe = self.PredictorAdd2;
+    ec("ColorIndexInverseTransform", "MapARGB", "32b", function (a) {
+      return a >> 8 & 255;
+    }, function (a) {
+      return a;
+    });
+    ec("VP8LColorIndexInverseTransformAlpha", "MapAlpha", "8b", function (a) {
+      return a;
+    }, function (a) {
+      return a >> 8 & 255;
+    });
+    var rc = self.ColorIndexInverseTransform,
+        ke = self.MapARGB,
+        he = self.VP8LColorIndexInverseTransformAlpha,
+        le = self.MapAlpha,
+        pc,
+        qc = self.VP8LPredictorsAdd = [];
+    qc.length = 16;
+    (self.VP8LPredictors = []).length = 16;
+    (self.VP8LPredictorsAdd_C = []).length = 16;
+    (self.VP8LPredictors_C = []).length = 16;
+    var Fb,
+        sc,
+        Gb,
+        Hb,
+        xc,
+        uc,
+        bd = V(511),
+        cd = V(2041),
+        dd = V(225),
+        ed = V(767),
+        ad = 0,
+        Qb = cd,
+        mb = dd,
+        R = ed,
+        U = bd,
+        Ca = 0,
+        Ua = 1,
+        tc = 2,
+        Va = 3,
+        ya = 4,
+        Db = 5,
+        wc = 6,
+        zb = 7,
+        Ab = 8,
+        Ja = 9,
+        Bb = 10,
+        pe = [2, 3, 7],
+        oe = [3, 3, 11],
+        Dc = [280, 256, 256, 256, 40],
+        qe = [0, 1, 1, 1, 0],
+        ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
+        de = [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],
+        me = [2954, 2956, 2958, 2962, 2970, 2986, 3018, 3082, 3212, 3468, 3980, 5004],
+        ie = 8,
+        Lb = [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],
+        Mb = [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],
+        oa = null,
+        He = [[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]],
+        Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],
+        Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],
+        Fe = [[[[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]]]],
+        Ke = [[[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]]],
+        Ee = [[[[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]]]],
+        Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],
+        Nc,
+        Y = [],
+        W = [],
+        ka = [],
+        Za,
+        fd,
+        Nb,
+        pa,
+        Ob,
+        Xc,
+        Tc,
+        Yc,
+        Uc,
+        Zc,
+        Vc,
+        $c,
+        Wc,
+        Rc,
+        Pc,
+        Sc,
+        Qc,
+        re = 1,
+        Cc = 2,
+        ia = [],
+        za,
+        vc,
+        fc,
+        Fc,
+        P = [];
+    va("UpsampleRgbLinePair", Ga, 3);
+    va("UpsampleBgrLinePair", Tb, 3);
+    va("UpsampleRgbaLinePair", wd, 4);
+    va("UpsampleBgraLinePair", vd, 4);
+    va("UpsampleArgbLinePair", ud, 4);
+    va("UpsampleRgba4444LinePair", td, 2);
+    va("UpsampleRgb565LinePair", sd, 2);
+    var Mf = self.UpsampleRgbLinePair,
+        Nf = self.UpsampleBgrLinePair,
+        nd = self.UpsampleRgbaLinePair,
+        od = self.UpsampleBgraLinePair,
+        pd = self.UpsampleArgbLinePair,
+        qd = self.UpsampleRgba4444LinePair,
+        Of = self.UpsampleRgb565LinePair,
+        Wa = 16,
+        Ba = 1 << Wa - 1,
+        ta = -227,
+        Eb = 482,
+        rd = 6,
+        Pf = (256 << rd) - 1,
+        jc = 0,
+        Yd = V(256),
+        ae = V(256),
+        $d = V(256),
+        Zd = V(256),
+        be = V(Eb - ta),
+        ce = V(Eb - ta);
+    la("YuvToRgbRow", Ga, 3);
+    la("YuvToBgrRow", Tb, 3);
+    la("YuvToRgbaRow", wd, 4);
+    la("YuvToBgraRow", vd, 4);
+    la("YuvToArgbRow", ud, 4);
+    la("YuvToRgba4444Row", td, 2);
+    la("YuvToRgb565Row", sd, 2);
+    var zd = [0, 4, 8, 12, 128, 132, 136, 140, 256, 260, 264, 268, 384, 388, 392, 396],
+        Ya = [0, 2, 8],
+        Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],
+        Ne = 1;
+
+    this.WebPDecodeRGBA = function (a, b, c, d, e) {
+      var f = Ua;
+      var g = new Cf(),
+          h = new Cb();
+      g.ba = h;
+      h.S = f;
+      h.width = [h.width];
+      h.height = [h.height];
+      var k = h.width;
+      var l = h.height,
+          m = new Td();
+      if (null == m || null == a) var n = 2;else x(null != m), n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null);
+      0 != n ? k = 0 : (null != k && (k[0] = m.width[0]), null != l && (l[0] = m.height[0]), k = 1);
+
+      if (k) {
+        h.width = h.width[0];
+        h.height = h.height[0];
+        null != d && (d[0] = h.width);
+        null != e && (e[0] = h.height);
+
+        b: {
+          d = new Oa();
+          e = new md();
+          e.data = a;
+          e.w = b;
+          e.ha = c;
+          e.kd = 1;
+          b = [0];
+          x(null != e);
+          a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);
+          (0 == a || 7 == a) && b[0] && (a = 4);
+          b = a;
+
+          if (0 == b) {
+            x(null != g);
+            d.data = e.data;
+            d.w = e.w + e.offset;
+            d.ha = e.ha - e.offset;
+            d.put = kc;
+            d.ac = gc;
+            d.bc = lc;
+            d.ma = g;
+
+            if (e.xa) {
+              a = Bc();
+
+              if (null == a) {
+                g = 1;
+                break b;
+              }
+
+              if (te(a, d)) {
+                b = Cd(d.width, d.height, g.Oa, g.ba);
+
+                if (d = 0 == b) {
+                  c: {
+                    d = a;
+
+                    d: for (;;) {
+                      if (null == d) {
+                        d = 0;
+                        break c;
+                      }
+
+                      x(null != d.s.yc);
+                      x(null != d.s.Ya);
+                      x(0 < d.s.Wb);
+                      c = d.l;
+                      x(null != c);
+                      e = c.ma;
+                      x(null != e);
+
+                      if (0 != d.xb) {
+                        d.ca = e.ba;
+                        d.tb = e.tb;
+                        x(null != d.ca);
+
+                        if (!hc(e.Oa, c, Va)) {
+                          d.a = 2;
+                          break d;
+                        }
+
+                        if (!Ec(d, c.width)) break d;
+                        if (c.da) break d;
+                        (c.da || hb(d.ca.S)) && Aa();
+                        11 > d.ca.S || (alert("todo:WebPInitConvertARGBToYUV"), null != d.ca.f.kb.F && Aa());
+
+                        if (d.Pb && 0 < d.s.ua && null == d.s.vb.X && !Zb(d.s.vb, d.s.Wa.Xa)) {
+                          d.a = 1;
+                          break d;
+                        }
+
+                        d.xb = 0;
+                      }
+
+                      if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;
+                      e.Dc = d.Ma;
+                      d = 1;
+                      break c;
+                    }
+
+                    x(0 != d.a);
+                    d = 0;
+                  }
+
+                  d = !d;
+                }
+
+                d && (b = a.a);
+              } else b = a.a;
+            } else {
+              a = new Ce();
+
+              if (null == a) {
+                g = 1;
+                break b;
+              }
+
+              a.Fa = e.na;
+              a.P = e.P;
+              a.qc = e.Sa;
+
+              if (Kc(a, d)) {
+                if (b = Cd(d.width, d.height, g.Oa, g.ba), 0 == b) {
+                  a.Aa = 0;
+                  c = g.Oa;
+                  e = a;
+                  x(null != e);
+
+                  if (null != c) {
+                    k = c.Md;
+                    k = 0 > k ? 0 : 100 < k ? 255 : 255 * k / 100;
+
+                    if (0 < k) {
+                      for (l = m = 0; 4 > l; ++l) {
+                        n = e.pb[l], 12 > n.lc && (n.ia = k * Qf[0 > n.lc ? 0 : n.lc] >> 3), m |= n.ia;
+                      }
+
+                      m && (alert("todo:VP8InitRandom"), e.ia = 1);
+                    }
+
+                    e.Ga = c.Id;
+                    100 < e.Ga ? e.Ga = 100 : 0 > e.Ga && (e.Ga = 0);
+                  }
+
+                  Me(a, d) || (b = a.a);
+                }
+              } else b = a.a;
+            }
+
+            0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));
+          }
+
+          g = b;
+        }
+
+        f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;
+      } else f = null;
+
+      return f;
+    };
+
+    var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];
+  };
+
+  new _WebPDecoder();
+  /** @license
+   * Copyright (c) 2017 Dominik Homberger
+  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+  https://webpjs.appspot.com
+  WebPRiffParser dominikhlbg@gmail.com
+  */
+
+  function memcmp(data, data_off, str, size) {
+    for (var i = 0; i < size; i++) {
+      if (data[data_off + i] != str.charCodeAt(i)) return true;
+    }
+
+    return false;
+  }
+
+  function GetTag(data, data_off) {
+    var str = "";
+
+    for (var i = 0; i < 4; i++) {
+      str += String.fromCharCode(data[data_off++]);
+    }
+
+    return str;
+  }
+
+  function GetLE16(data, data_off) {
+    return data[data_off + 0] << 0 | data[data_off + 1] << 8;
+  }
+
+  function GetLE24(data, data_off) {
+    return (data[data_off + 0] << 0 | data[data_off + 1] << 8 | data[data_off + 2] << 16) >>> 0;
+  }
+
+  function GetLE32(data, data_off) {
+    return (data[data_off + 0] << 0 | data[data_off + 1] << 8 | data[data_off + 2] << 16 | data[data_off + 3] << 24) >>> 0;
+  }
+
+  function WebPRiffParser(src, src_off) {
+    var imagearray = {};
+    var i = 0;
+    var alpha_chunk = false;
+    var alpha_size = 0;
+    var alpha_offset = 0;
+    imagearray["frames"] = [];
+    if (memcmp(src, src_off, "RIFF", 4)) return;
+    src_off += 4;
+    var riff_size = GetLE32(src, src_off) + 8;
+    src_off += 8;
+
+    while (src_off < src.length) {
+      var fourcc = GetTag(src, src_off);
+      src_off += 4;
+      var payload_size = GetLE32(src, src_off);
+      src_off += 4;
+      var payload_size_padded = payload_size + (payload_size & 1);
+
+      switch (fourcc) {
+        case "VP8 ":
+        case "VP8L":
+          if (typeof imagearray["frames"][i] === "undefined") imagearray["frames"][i] = {};
+          var obj = imagearray["frames"][i];
+          var height = [0];
+          var width = [0];
+          obj["src_off"] = alpha_chunk ? alpha_offset : src_off - 8;
+          obj["src_size"] = alpha_size + payload_size + 8; //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);
+          //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};
+
+          i++;
+
+          if (alpha_chunk) {
+            alpha_chunk = false;
+            alpha_size = 0;
+            alpha_offset = 0;
+          }
+
+          break;
+
+        case "VP8X":
+          var obj = imagearray["header"] = {};
+          var feature_flags = obj["feature_flags"] = src[src_off];
+          var src_off_ = src_off + 4;
+          var canvas_width = obj["canvas_width"] = 1 + GetLE24(src, src_off_);
+          src_off_ += 3;
+          var canvas_height = obj["canvas_height"] = 1 + GetLE24(src, src_off_);
+          src_off_ += 3;
+          break;
+
+        case "ALPH":
+          alpha_chunk = true;
+          alpha_size = payload_size_padded + 8;
+          alpha_offset = src_off - 8;
+          break;
+
+        case "ANIM":
+          var obj = imagearray["header"];
+          var bgcolor = obj["bgcolor"] = GetLE32(src, src_off);
+          src_off_ = src_off + 4;
+          var loop_count = obj["loop_count"] = GetLE16(src, src_off_);
+          src_off_ += 2;
+          break;
+
+        case "ANMF":
+          var offset_x = 0,
+              offset_y = 0,
+              width = 0,
+              height = 0,
+              duration = 0,
+              blend = 0,
+              dispose = 0,
+              temp = 0;
+          var obj = imagearray["frames"][i] = {};
+          obj["offset_x"] = offset_x = 2 * GetLE24(src, src_off);
+          src_off += 3;
+          obj["offset_y"] = offset_y = 2 * GetLE24(src, src_off);
+          src_off += 3;
+          obj["width"] = width = 1 + GetLE24(src, src_off);
+          src_off += 3;
+          obj["height"] = height = 1 + GetLE24(src, src_off);
+          src_off += 3;
+          obj["duration"] = duration = GetLE24(src, src_off);
+          src_off += 3;
+          temp = src[src_off++];
+          obj["dispose"] = dispose = temp & 1;
+          obj["blend"] = blend = temp >> 1 & 1;
+          break;
+      }
+
+      if (fourcc != "ANMF") src_off += payload_size_padded;
+    }
+
+    return imagearray;
+  }
+
+  var height = [0];
+  var width = [0];
+  var pixels = [];
+  var webpdecoder = new _WebPDecoder();
+  var response = imageData;
+  var imagearray = WebPRiffParser(response, 0);
+  imagearray["response"] = response;
+  imagearray["rgbaoutput"] = true;
+  imagearray["dataurl"] = false;
+  var header = imagearray["header"] ? imagearray["header"] : null;
+  var frames = imagearray["frames"] ? imagearray["frames"] : null;
+
+  if (header) {
+    header["loop_counter"] = header["loop_count"];
+    height = [header["canvas_height"]];
+    width = [header["canvas_width"]];
+
+    for (var f = 0; f < frames.length; f++) {
+      if (frames[f]["blend"] == 0) {
+        break;
+      }
+    }
+  }
+
+  var frame = frames[0];
+  var rgba = webpdecoder.WebPDecodeRGBA(response, frame["src_off"], frame["src_size"], width, height);
+  frame["rgba"] = rgba;
+  frame["imgwidth"] = width[0];
+  frame["imgheight"] = height[0];
+
+  for (var i = 0; i < width[0] * height[0] * 4; i++) {
+    pixels[i] = rgba[i];
+  }
+
+  this.width = width;
+  this.height = height;
+  this.data = pixels;
+  return this;
+}
+
+WebPDecoder.prototype.getData = function () {
+  return this.data;
+};
+
+/**
+ * @license
+ * Copyright (c) 2019 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * jsPDF webp Support PlugIn
+ *
+ * @name webp_support
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  jsPDFAPI.processWEBP = function (imageData, index, alias, compression) {
+    var reader = new WebPDecoder(imageData, false);
+    var width = reader.width,
+        height = reader.height;
+    var qu = 100;
+    var pixels = reader.getData();
+    var rawImageData = {
+      data: pixels,
+      width: width,
+      height: height
+    };
+    var encoder = new JPEGEncoder(qu);
+    var data = encoder.encode(rawImageData, qu);
+    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ *
+ * Copyright (c) 2021 Antti Palola, https://github.com/Pantura
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+/**
+ * jsPDF RGBA array PlugIn
+ * @name rgba_support
+ * @module
+ */
+
+(function (jsPDFAPI) {
+  /**
+   * @name processRGBA
+   * @function
+   *
+   * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].
+   * RGBA array data can be obtained from DOM canvas getImageData.
+   * @ignore
+   */
+
+  jsPDFAPI.processRGBA = function (imageData, index, alias) {
+
+    var imagePixels = imageData.data;
+    var length = imagePixels.length; // jsPDF takes alpha data separately so extract that.
+
+    var rgbOut = new Uint8Array(length / 4 * 3);
+    var alphaOut = new Uint8Array(length / 4);
+    var outIndex = 0;
+    var alphaIndex = 0;
+
+    for (var i = 0; i < length; i += 4) {
+      var r = imagePixels[i];
+      var g = imagePixels[i + 1];
+      var b = imagePixels[i + 2];
+      var alpha = imagePixels[i + 3];
+      rgbOut[outIndex++] = r;
+      rgbOut[outIndex++] = g;
+      rgbOut[outIndex++] = b;
+      alphaOut[alphaIndex++] = alpha;
+    }
+
+    var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);
+
+    var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);
+
+    return {
+      alpha: alphaData,
+      data: rgbData,
+      index: index,
+      alias: alias,
+      colorSpace: "DeviceRGB",
+      bitsPerComponent: 8,
+      width: imageData.width,
+      height: imageData.height
+    };
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * jsPDF setLanguage Plugin
+ *
+ * @name setLanguage
+ * @module
+ */
+
+(function (jsPDFAPI) {
+  /**
+   * Add Language Tag to the generated PDF
+   *
+   * @name setLanguage
+   * @function
+   * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').
+   * @returns {jsPDF}
+   * @example
+   * var doc = new jsPDF()
+   * doc.text(10, 10, 'This is a test')
+   * doc.setLanguage("en-US")
+   * doc.save('english.pdf')
+   */
+
+  jsPDFAPI.setLanguage = function (langCode) {
+
+    var langCodes = {
+      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"
+    };
+
+    if (this.internal.languageSettings === undefined) {
+      this.internal.languageSettings = {};
+      this.internal.languageSettings.isSubscribed = false;
+    }
+
+    if (langCodes[langCode] !== undefined) {
+      this.internal.languageSettings.languageCode = langCode;
+
+      if (this.internal.languageSettings.isSubscribed === false) {
+        this.internal.events.subscribe("putCatalog", function () {
+          this.internal.write("/Lang (" + this.internal.languageSettings.languageCode + ")");
+        });
+        this.internal.languageSettings.isSubscribed = true;
+      }
+    }
+
+    return this;
+  };
+})(jsPDF.API);
+
+/**
+ * jsPDF split_text_to_size plugin
+ *
+ * @name split_text_to_size
+ * @module
+ */
+
+(function (API) {
+  /**
+   * Returns an array of length matching length of the 'word' string, with each
+   * cell occupied by the width of the char in that position.
+   *
+   * @name getCharWidthsArray
+   * @function
+   * @param {string} text
+   * @param {Object} options
+   * @returns {Array}
+   */
+
+  var getCharWidthsArray = API.getCharWidthsArray = function (text, options) {
+    options = options || {};
+    var activeFont = options.font || this.internal.getFont();
+    var fontSize = options.fontSize || this.internal.getFontSize();
+    var charSpace = options.charSpace || this.internal.getCharSpace();
+    var widths = options.widths ? options.widths : activeFont.metadata.Unicode.widths;
+    var widthsFractionOf = widths.fof ? widths.fof : 1;
+    var kerning = options.kerning ? options.kerning : activeFont.metadata.Unicode.kerning;
+    var kerningFractionOf = kerning.fof ? kerning.fof : 1;
+    var doKerning = options.doKerning === false ? false : true;
+    var kerningValue = 0;
+    var i;
+    var length = text.length;
+    var char_code;
+    var prior_char_code = 0; //for kerning
+
+    var default_char_width = widths[0] || widthsFractionOf;
+    var output = [];
+
+    for (i = 0; i < length; i++) {
+      char_code = text.charCodeAt(i);
+
+      if (typeof activeFont.metadata.widthOfString === "function") {
+        output.push((activeFont.metadata.widthOfGlyph(activeFont.metadata.characterToGlyph(char_code)) + charSpace * (1000 / fontSize) || 0) / 1000);
+      } else {
+        if (doKerning && _typeof(kerning[char_code]) === "object" && !isNaN(parseInt(kerning[char_code][prior_char_code], 10))) {
+          kerningValue = kerning[char_code][prior_char_code] / kerningFractionOf;
+        } else {
+          kerningValue = 0;
+        }
+
+        output.push((widths[char_code] || default_char_width) / widthsFractionOf + kerningValue);
+      }
+
+      prior_char_code = char_code;
+    }
+
+    return output;
+  };
+  /**
+   * Returns a widths of string in a given font, if the font size is set as 1 point.
+   *
+   * In other words, this is "proportional" value. For 1 unit of font size, the length
+   * of the string will be that much.
+   *
+   * Multiply by font size to get actual width in *points*
+   * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.
+   *
+   * @name getStringUnitWidth
+   * @public
+   * @function
+   * @param {string} text
+   * @param {string} options
+   * @returns {number} result
+   */
+
+
+  var getStringUnitWidth = API.getStringUnitWidth = function (text, options) {
+    options = options || {};
+    var fontSize = options.fontSize || this.internal.getFontSize();
+    var font = options.font || this.internal.getFont();
+    var charSpace = options.charSpace || this.internal.getCharSpace();
+    var result = 0;
+
+    if (API.processArabic) {
+      text = API.processArabic(text);
+    }
+
+    if (typeof font.metadata.widthOfString === "function") {
+      result = font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;
+    } else {
+      result = getCharWidthsArray.apply(this, arguments).reduce(function (pv, cv) {
+        return pv + cv;
+      }, 0);
+    }
+
+    return result;
+  };
+  /**
+  returns array of lines
+  */
+
+
+  var splitLongWord = function splitLongWord(word, widths_array, firstLineMaxLen, maxLen) {
+    var answer = []; // 1st, chop off the piece that can fit on the hanging line.
+
+    var i = 0,
+        l = word.length,
+        workingLen = 0;
+
+    while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {
+      workingLen += widths_array[i];
+      i++;
+    } // this is first line.
+
+
+    answer.push(word.slice(0, i)); // 2nd. Split the rest into maxLen pieces.
+
+    var startOfLine = i;
+    workingLen = 0;
+
+    while (i !== l) {
+      if (workingLen + widths_array[i] > maxLen) {
+        answer.push(word.slice(startOfLine, i));
+        workingLen = 0;
+        startOfLine = i;
+      }
+
+      workingLen += widths_array[i];
+      i++;
+    }
+
+    if (startOfLine !== i) {
+      answer.push(word.slice(startOfLine, i));
+    }
+
+    return answer;
+  }; // Note, all sizing inputs for this function must be in "font measurement units"
+  // By default, for PDF, it's "point".
+
+
+  var splitParagraphIntoLines = function splitParagraphIntoLines(text, maxlen, options) {
+    // at this time works only on Western scripts, ones with space char
+    // separating the words. Feel free to expand.
+    if (!options) {
+      options = {};
+    }
+
+    var line = [],
+        lines = [line],
+        line_length = options.textIndent || 0,
+        separator_length = 0,
+        current_word_length = 0,
+        word,
+        widths_array,
+        words = text.split(" "),
+        spaceCharWidth = getCharWidthsArray.apply(this, [" ", options])[0],
+        i,
+        l,
+        tmp,
+        lineIndent;
+
+    if (options.lineIndent === -1) {
+      lineIndent = words[0].length + 2;
+    } else {
+      lineIndent = options.lineIndent || 0;
+    }
+
+    if (lineIndent) {
+      var pad = Array(lineIndent).join(" "),
+          wrds = [];
+      words.map(function (wrd) {
+        wrd = wrd.split(/\s*\n/);
+
+        if (wrd.length > 1) {
+          wrds = wrds.concat(wrd.map(function (wrd, idx) {
+            return (idx && wrd.length ? "\n" : "") + wrd;
+          }));
+        } else {
+          wrds.push(wrd[0]);
+        }
+      });
+      words = wrds;
+      lineIndent = getStringUnitWidth.apply(this, [pad, options]);
+    }
+
+    for (i = 0, l = words.length; i < l; i++) {
+      var force = 0;
+      word = words[i];
+
+      if (lineIndent && word[0] == "\n") {
+        word = word.substr(1);
+        force = 1;
+      }
+
+      widths_array = getCharWidthsArray.apply(this, [word, options]);
+      current_word_length = widths_array.reduce(function (pv, cv) {
+        return pv + cv;
+      }, 0);
+
+      if (line_length + separator_length + current_word_length > maxlen || force) {
+        if (current_word_length > maxlen) {
+          // this happens when you have space-less long URLs for example.
+          // we just chop these to size. We do NOT insert hiphens
+          tmp = splitLongWord.apply(this, [word, widths_array, maxlen - (line_length + separator_length), maxlen]); // first line we add to existing line object
+
+          line.push(tmp.shift()); // it's ok to have extra space indicator there
+          // last line we make into new line object
+
+          line = [tmp.pop()]; // lines in the middle we apped to lines object as whole lines
+
+          while (tmp.length) {
+            lines.push([tmp.shift()]); // single fragment occupies whole line
+          }
+
+          current_word_length = widths_array.slice(word.length - (line[0] ? line[0].length : 0)).reduce(function (pv, cv) {
+            return pv + cv;
+          }, 0);
+        } else {
+          // just put it on a new line
+          line = [word];
+        } // now we attach new line to lines
+
+
+        lines.push(line);
+        line_length = current_word_length + lineIndent;
+        separator_length = spaceCharWidth;
+      } else {
+        line.push(word);
+        line_length += separator_length + current_word_length;
+        separator_length = spaceCharWidth;
+      }
+    }
+
+    var postProcess;
+
+    if (lineIndent) {
+      postProcess = function postProcess(ln, idx) {
+        return (idx ? pad : "") + ln.join(" ");
+      };
+    } else {
+      postProcess = function postProcess(ln) {
+        return ln.join(" ");
+      };
+    }
+
+    return lines.map(postProcess);
+  };
+  /**
+   * Splits a given string into an array of strings. Uses 'size' value
+   * (in measurement units declared as default for the jsPDF instance)
+   * and the font's "widths" and "Kerning" tables, where available, to
+   * determine display length of a given string for a given font.
+   *
+   * We use character's 100% of unit size (height) as width when Width
+   * table or other default width is not available.
+   *
+   * @name splitTextToSize
+   * @public
+   * @function
+   * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.
+   * @param {number} size Nominal number, measured in units default to this instance of jsPDF.
+   * @param {Object} options Optional flags needed for chopper to do the right thing.
+   * @returns {Array} array Array with strings chopped to size.
+   */
+
+
+  API.splitTextToSize = function (text, maxlen, options) {
+
+    options = options || {};
+
+    var fsize = options.fontSize || this.internal.getFontSize(),
+        newOptions = function (options) {
+      var widths = {
+        0: 1
+      },
+          kerning = {};
+
+      if (!options.widths || !options.kerning) {
+        var f = this.internal.getFont(options.fontName, options.fontStyle),
+            encoding = "Unicode"; // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE
+        // Actual JavaScript-native String's 16bit char codes used.
+        // no multi-byte logic here
+
+        if (f.metadata[encoding]) {
+          return {
+            widths: f.metadata[encoding].widths || widths,
+            kerning: f.metadata[encoding].kerning || kerning
+          };
+        } else {
+          return {
+            font: f.metadata,
+            fontSize: this.internal.getFontSize(),
+            charSpace: this.internal.getCharSpace()
+          };
+        }
+      } else {
+        return {
+          widths: options.widths,
+          kerning: options.kerning
+        };
+      }
+    }.call(this, options); // first we split on end-of-line chars
+
+
+    var paragraphs;
+
+    if (Array.isArray(text)) {
+      paragraphs = text;
+    } else {
+      paragraphs = String(text).split(/\r?\n/);
+    } // now we convert size (max length of line) into "font size units"
+    // at present time, the "font size unit" is always 'point'
+    // 'proportional' means, "in proportion to font size"
+
+
+    var fontUnit_maxLen = 1.0 * this.internal.scaleFactor * maxlen / fsize; // at this time, fsize is always in "points" regardless of the default measurement unit of the doc.
+    // this may change in the future?
+    // until then, proportional_maxlen is likely to be in 'points'
+    // If first line is to be indented (shorter or longer) than maxLen
+    // we indicate that by using CSS-style "text-indent" option.
+    // here it's in font units too (which is likely 'points')
+    // it can be negative (which makes the first line longer than maxLen)
+
+    newOptions.textIndent = options.textIndent ? options.textIndent * 1.0 * this.internal.scaleFactor / fsize : 0;
+    newOptions.lineIndent = options.lineIndent;
+    var i,
+        l,
+        output = [];
+
+    for (i = 0, l = paragraphs.length; i < l; i++) {
+      output = output.concat(splitParagraphIntoLines.apply(this, [paragraphs[i], fontUnit_maxLen, newOptions]));
+    }
+
+    return output;
+  };
+})(jsPDF.API);
+
+/**
+ * This file adds the standard font metrics to jsPDF.
+ *
+ * Font metrics data is reprocessed derivative of contents of
+ * "Font Metrics for PDF Core 14 Fonts" package, which exhibits the following copyright and license:
+ *
+ * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.
+ *
+ * This file and the 14 PostScript(R) AFM files it accompanies may be used,
+ * copied, and distributed for any purpose and without charge, with or without
+ * modification, provided that all copyright notices are retained; that the AFM
+ * files are not distributed without this file; that all modifications to this
+ * file or any of the AFM files are prominently noted in the modified file(s);
+ * and that this paragraph is not modified. Adobe Systems has no responsibility
+ * or obligation to support the use of the AFM files.
+ *
+ * @name standard_fonts_metrics
+ * @module
+ */
+
+(function (API) {
+
+  API.__fontmetrics__ = API.__fontmetrics__ || {};
+  var decoded = "0123456789abcdef",
+      encoded = "klmnopqrstuvwxyz",
+      mappingUncompress = {},
+      mappingCompress = {};
+
+  for (var i = 0; i < encoded.length; i++) {
+    mappingUncompress[encoded[i]] = decoded[i];
+    mappingCompress[decoded[i]] = encoded[i];
+  }
+
+  var hex = function hex(value) {
+    return "0x" + parseInt(value, 10).toString(16);
+  };
+
+  var compress = API.__fontmetrics__.compress = function (data) {
+    var vals = ["{"];
+    var value, keystring, valuestring, numberprefix;
+
+    for (var key in data) {
+      value = data[key];
+
+      if (!isNaN(parseInt(key, 10))) {
+        key = parseInt(key, 10);
+        keystring = hex(key).slice(2);
+        keystring = keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];
+      } else {
+        keystring = "'" + key + "'";
+      }
+
+      if (typeof value == "number") {
+        if (value < 0) {
+          valuestring = hex(value).slice(3);
+          numberprefix = "-";
+        } else {
+          valuestring = hex(value).slice(2);
+          numberprefix = "";
+        }
+
+        valuestring = numberprefix + valuestring.slice(0, -1) + mappingCompress[valuestring.slice(-1)];
+      } else {
+        if (_typeof(value) === "object") {
+          valuestring = compress(value);
+        } else {
+          throw new Error("Don't know what to do with value type " + _typeof(value) + ".");
+        }
+      }
+
+      vals.push(keystring + valuestring);
+    }
+
+    vals.push("}");
+    return vals.join("");
+  };
+  /**
+   * Uncompresses data compressed into custom, base16-like format.
+   *
+   * @public
+   * @function
+   * @param
+   * @returns {Type}
+   */
+
+
+  var uncompress = API.__fontmetrics__.uncompress = function (data) {
+    if (typeof data !== "string") {
+      throw new Error("Invalid argument passed to uncompress.");
+    }
+
+    var output = {},
+        sign = 1,
+        stringparts,
+        // undef. will be [] in string mode
+    activeobject = output,
+        parentchain = [],
+        parent_key_pair,
+        keyparts = "",
+        valueparts = "",
+        key,
+        // undef. will be Truthy when Key is resolved.
+    datalen = data.length - 1,
+        // stripping ending }
+    ch;
+
+    for (var i = 1; i < datalen; i += 1) {
+      // - { } ' are special.
+      ch = data[i];
+
+      if (ch == "'") {
+        if (stringparts) {
+          // end of string mode
+          key = stringparts.join("");
+          stringparts = undefined;
+        } else {
+          // start of string mode
+          stringparts = [];
+        }
+      } else if (stringparts) {
+        stringparts.push(ch);
+      } else if (ch == "{") {
+        // start of object
+        parentchain.push([activeobject, key]);
+        activeobject = {};
+        key = undefined;
+      } else if (ch == "}") {
+        // end of object
+        parent_key_pair = parentchain.pop();
+        parent_key_pair[0][parent_key_pair[1]] = activeobject;
+        key = undefined;
+        activeobject = parent_key_pair[0];
+      } else if (ch == "-") {
+        sign = -1;
+      } else {
+        // must be number
+        if (key === undefined) {
+          if (mappingUncompress.hasOwnProperty(ch)) {
+            keyparts += mappingUncompress[ch];
+            key = parseInt(keyparts, 16) * sign;
+            sign = +1;
+            keyparts = "";
+          } else {
+            keyparts += ch;
+          }
+        } else {
+          if (mappingUncompress.hasOwnProperty(ch)) {
+            valueparts += mappingUncompress[ch];
+            activeobject[key] = parseInt(valueparts, 16) * sign;
+            sign = +1;
+            key = undefined;
+            valueparts = "";
+          } else {
+            valueparts += ch;
+          }
+        }
+      }
+    }
+
+    return output;
+  }; // encoding = 'Unicode'
+  // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior
+  // Actual 16bit char codes used.
+  // no multi-byte logic here
+  // Unicode characters to WinAnsiEncoding:
+  // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}
+  // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.
+  // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly
+  // as well as give strings with some (supported by these fonts) Unicode characters and
+  // these will be mapped to win cp1252
+  // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting "Euro" glyph displayed in both cases.
+
+
+  var encodingBlock = {
+    codePages: ["WinAnsiEncoding"],
+    WinAnsiEncoding: uncompress("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")
+  };
+  var encodings = {
+    Unicode: {
+      Courier: encodingBlock,
+      "Courier-Bold": encodingBlock,
+      "Courier-BoldOblique": encodingBlock,
+      "Courier-Oblique": encodingBlock,
+      Helvetica: encodingBlock,
+      "Helvetica-Bold": encodingBlock,
+      "Helvetica-BoldOblique": encodingBlock,
+      "Helvetica-Oblique": encodingBlock,
+      "Times-Roman": encodingBlock,
+      "Times-Bold": encodingBlock,
+      "Times-BoldItalic": encodingBlock,
+      "Times-Italic": encodingBlock //	, 'Symbol'
+      //	, 'ZapfDingbats'
+
+    }
+  };
+  var fontMetrics = {
+    Unicode: {
+      // all sizing numbers are n/fontMetricsFractionOf = one font size unit
+      // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's
+      // width is 476/1000 or 47.6% of its height (regardless of font size)
+      // At this time this value applies to "widths" and "kerning" numbers.
+      // char code 0 represents "default" (average) width - use it for chars missing in this table.
+      // key 'fof' represents the "fontMetricsFractionOf" value
+      "Courier-Oblique": uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
+      "Times-BoldItalic": uncompress("{'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": uncompress("{'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: uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
+      "Courier-BoldOblique": uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
+      "Times-Bold": uncompress("{'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: uncompress("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),
+      Helvetica: uncompress("{'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": uncompress("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p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ucltcmtcntcotcpt4lt4wtckt}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: uncompress("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),
+      "Courier-Bold": uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
+      "Times-Italic": uncompress("{'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": uncompress("{'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": uncompress("{'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}}}")
+    }
+  };
+  /*
+  This event handler is fired when a new jsPDF object is initialized
+  This event handler appends metrics data to standard fonts within
+  that jsPDF instance. The metrics are mapped over Unicode character
+  codes, NOT CIDs or other codes matching the StandardEncoding table of the
+  standard PDF fonts.
+  Future:
+  Also included is the encoding maping table, converting Unicode (UCS-2, UTF-16)
+  char codes to StandardEncoding character codes. The encoding table is to be used
+  somewhere around "pdfEscape" call.
+  */
+
+  API.events.push(["addFont", function (data) {
+    var font = data.font;
+    var metrics = fontMetrics["Unicode"][font.postScriptName];
+
+    if (metrics) {
+      font.metadata["Unicode"] = {};
+      font.metadata["Unicode"].widths = metrics.widths;
+      font.metadata["Unicode"].kerning = metrics.kerning;
+    }
+
+    var encodingBlock = encodings["Unicode"][font.postScriptName];
+
+    if (encodingBlock) {
+      font.metadata["Unicode"].encoding = encodingBlock;
+      font.encoding = encodingBlock.codePages[0];
+    }
+  }]); // end of adding event handler
+})(jsPDF.API);
+
+/**
+ * @license
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * @name ttfsupport
+ * @module
+ */
+
+(function (jsPDF) {
+
+  var binaryStringToUint8Array = function binaryStringToUint8Array(binary_string) {
+    var len = binary_string.length;
+    var bytes = new Uint8Array(len);
+
+    for (var i = 0; i < len; i++) {
+      bytes[i] = binary_string.charCodeAt(i);
+    }
+
+    return bytes;
+  };
+
+  var addFont = function addFont(font, file) {
+    // eslint-disable-next-line no-control-regex
+    if (/^\x00\x01\x00\x00/.test(file)) {
+      file = binaryStringToUint8Array(file);
+    } else {
+      file = binaryStringToUint8Array(atob(file));
+    }
+
+    font.metadata = jsPDF.API.TTFFont.open(file);
+    font.metadata.Unicode = font.metadata.Unicode || {
+      encoding: {},
+      kerning: {},
+      widths: []
+    };
+    font.metadata.glyIdsUsed = [0];
+  };
+
+  jsPDF.API.events.push(["addFont", function (data) {
+    var file = undefined;
+    var font = data.font;
+    var instance = data.instance;
+
+    if (font.isStandardFont) {
+      return;
+    }
+
+    if (typeof instance !== "undefined") {
+      if (instance.existsFileInVFS(font.postScriptName) === false) {
+        file = instance.loadFile(font.postScriptName);
+      } else {
+        file = instance.getFileFromVFS(font.postScriptName);
+      }
+
+      if (typeof file !== "string") {
+        throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('" + font.postScriptName + "').");
+      }
+
+      addFont(font, file);
+    } else {
+      throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('" + font.postScriptName + "').");
+    }
+  }]); // end of adding event handler
+})(jsPDF);
+
+/** @license
+ * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+/**
+ * jsPDF SVG plugin
+ *
+ * @name svg
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  function loadCanvg() {
+    return function () {
+      if (globalObject["canvg"]) {
+        return Promise.resolve(globalObject["canvg"]);
+      }
+
+      return import('canvg');
+    }().catch(function (e) {
+      return Promise.reject(new Error("Could not load canvg: " + e));
+    }).then(function (canvg) {
+      return canvg.default ? canvg.default : canvg;
+    });
+  }
+  /**
+   * Parses SVG XML and saves it as image into the PDF.
+   *
+   * Depends on canvas-element and canvg
+   *
+   * @name addSvgAsImage
+   * @public
+   * @function
+   * @param {string} SVG-Data as Text
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} width of SVG-Image (in units declared at inception of PDF document)
+   * @param {number} height of SVG-Image (in units declared at inception of PDF document)
+   * @param {string} alias of SVG-Image (if used multiple times)
+   * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'
+   * @param {number} rotation of the image in degrees (0-359)
+   *
+   * @returns jsPDF jsPDF-instance
+   */
+
+
+  jsPDFAPI.addSvgAsImage = function (svg, x, y, w, h, alias, compression, rotation) {
+    if (isNaN(x) || isNaN(y)) {
+      console.error("jsPDF.addSvgAsImage: Invalid coordinates", arguments);
+      throw new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");
+    }
+
+    if (isNaN(w) || isNaN(h)) {
+      console.error("jsPDF.addSvgAsImage: Invalid measurements", arguments);
+      throw new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");
+    }
+
+    var canvas = document.createElement("canvas");
+    canvas.width = w;
+    canvas.height = h;
+    var ctx = canvas.getContext("2d");
+    ctx.fillStyle = "#fff"; /// set white fill style
+
+    ctx.fillRect(0, 0, canvas.width, canvas.height);
+    var options = {
+      ignoreMouse: true,
+      ignoreAnimation: true,
+      ignoreDimensions: true
+    };
+    var doc = this;
+    return loadCanvg().then(function (canvg) {
+      return canvg.fromString(ctx, svg, options);
+    }, function () {
+      return Promise.reject(new Error("Could not load canvg."));
+    }).then(function (instance) {
+      return instance.render(options);
+    }).then(function () {
+      doc.addImage(canvas.toDataURL("image/jpeg", 1.0), x, y, w, h, compression, rotation);
+    });
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * ====================================================================
+ * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+/**
+ * jsPDF total_pages plugin
+ * @name total_pages
+ * @module
+ */
+
+(function (jsPDFAPI) {
+  /**
+   * @name putTotalPages
+   * @function
+   * @param {string} pageExpression Regular Expression
+   * @returns {jsPDF} jsPDF-instance
+   */
+
+  jsPDFAPI.putTotalPages = function (pageExpression) {
+
+    var replaceExpression;
+    var totalNumberOfPages = 0;
+
+    if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {
+      replaceExpression = new RegExp(pageExpression, "g");
+      totalNumberOfPages = this.internal.getNumberOfPages();
+    } else {
+      replaceExpression = new RegExp(this.pdfEscape16(pageExpression, this.internal.getFont()), "g");
+      totalNumberOfPages = 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(replaceExpression, totalNumberOfPages);
+      }
+    }
+
+    return this;
+  };
+})(jsPDF.API);
+
+/**
+ * Adds the ability to set ViewerPreferences and by thus
+ * controlling the way the document is to be presented on the
+ * screen or in print.
+ * @name viewerpreferences
+ * @module
+ */
+
+(function (jsPDFAPI) {
+  /**
+   * Set the ViewerPreferences of the generated PDF
+   *
+   * @name viewerPreferences
+   * @function
+   * @public
+   * @param {Object} options Array with the ViewerPreferences<br />
+   * Example: doc.viewerPreferences({"FitWindow":true});<br />
+   * <br />
+   * You can set following preferences:<br />
+   * <br/>
+   * <b>HideToolbar</b> <i>(boolean)</i><br />
+   * Default value: false<br />
+   * <br />
+   * <b>HideMenubar</b> <i>(boolean)</i><br />
+   * Default value: false.<br />
+   * <br />
+   * <b>HideWindowUI</b> <i>(boolean)</i><br />
+   * Default value: false.<br />
+   * <br />
+   * <b>FitWindow</b> <i>(boolean)</i><br />
+   * Default value: false.<br />
+   * <br />
+   * <b>CenterWindow</b> <i>(boolean)</i><br />
+   * Default value: false<br />
+   * <br />
+   * <b>DisplayDocTitle</b> <i>(boolean)</i><br />
+   * Default value: false.<br />
+   * <br />
+   * <b>NonFullScreenPageMode</b> <i>(string)</i><br />
+   * Possible values: UseNone, UseOutlines, UseThumbs, UseOC<br />
+   * Default value: UseNone<br/>
+   * <br />
+   * <b>Direction</b> <i>(string)</i><br />
+   * Possible values: L2R, R2L<br />
+   * Default value: L2R.<br />
+   * <br />
+   * <b>ViewArea</b> <i>(string)</i><br />
+   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+   * Default value: CropBox.<br />
+   * <br />
+   * <b>ViewClip</b> <i>(string)</i><br />
+   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+   * Default value: CropBox<br />
+   * <br />
+   * <b>PrintArea</b> <i>(string)</i><br />
+   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+   * Default value: CropBox<br />
+   * <br />
+   * <b>PrintClip</b> <i>(string)</i><br />
+   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+   * Default value: CropBox.<br />
+   * <br />
+   * <b>PrintScaling</b> <i>(string)</i><br />
+   * Possible values: AppDefault, None<br />
+   * Default value: AppDefault.<br />
+   * <br />
+   * <b>Duplex</b> <i>(string)</i><br />
+   * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge
+   * Default value: none<br />
+   * <br />
+   * <b>PickTrayByPDFSize</b> <i>(boolean)</i><br />
+   * Default value: false<br />
+   * <br />
+   * <b>PrintPageRange</b> <i>(Array)</i><br />
+   * Example: [[1,5], [7,9]]<br />
+   * Default value: as defined by PDF viewer application<br />
+   * <br />
+   * <b>NumCopies</b> <i>(Number)</i><br />
+   * Possible values: 1, 2, 3, 4, 5<br />
+   * Default value: 1<br />
+   * <br />
+   * For more information see the PDF Reference, sixth edition on Page 577
+   * @param {boolean} doReset True to reset the settings
+   * @function
+   * @returns jsPDF jsPDF-instance
+   * @example
+   * var doc = new jsPDF()
+   * doc.text('This is a test', 10, 10)
+   * doc.viewerPreferences({'FitWindow': true}, true)
+   * doc.save("viewerPreferences.pdf")
+   *
+   * // Example printing 10 copies, using cropbox, and hiding UI.
+   * doc.viewerPreferences({
+   *   'HideWindowUI': true,
+   *   'PrintArea': 'CropBox',
+   *   'NumCopies': 10
+   * })
+   */
+
+  jsPDFAPI.viewerPreferences = function (options, doReset) {
+    options = options || {};
+    doReset = doReset || false;
+    var configuration;
+    var configurationTemplate = {
+      HideToolbar: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.3
+      },
+      HideMenubar: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.3
+      },
+      HideWindowUI: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.3
+      },
+      FitWindow: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.3
+      },
+      CenterWindow: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.3
+      },
+      DisplayDocTitle: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.4
+      },
+      NonFullScreenPageMode: {
+        defaultValue: "UseNone",
+        value: "UseNone",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["UseNone", "UseOutlines", "UseThumbs", "UseOC"],
+        pdfVersion: 1.3
+      },
+      Direction: {
+        defaultValue: "L2R",
+        value: "L2R",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["L2R", "R2L"],
+        pdfVersion: 1.3
+      },
+      ViewArea: {
+        defaultValue: "CropBox",
+        value: "CropBox",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+        pdfVersion: 1.4
+      },
+      ViewClip: {
+        defaultValue: "CropBox",
+        value: "CropBox",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+        pdfVersion: 1.4
+      },
+      PrintArea: {
+        defaultValue: "CropBox",
+        value: "CropBox",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+        pdfVersion: 1.4
+      },
+      PrintClip: {
+        defaultValue: "CropBox",
+        value: "CropBox",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+        pdfVersion: 1.4
+      },
+      PrintScaling: {
+        defaultValue: "AppDefault",
+        value: "AppDefault",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["AppDefault", "None"],
+        pdfVersion: 1.6
+      },
+      Duplex: {
+        defaultValue: "",
+        value: "none",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["Simplex", "DuplexFlipShortEdge", "DuplexFlipLongEdge", "none"],
+        pdfVersion: 1.7
+      },
+      PickTrayByPDFSize: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.7
+      },
+      PrintPageRange: {
+        defaultValue: "",
+        value: "",
+        type: "array",
+        explicitSet: false,
+        valueSet: null,
+        pdfVersion: 1.7
+      },
+      NumCopies: {
+        defaultValue: 1,
+        value: 1,
+        type: "integer",
+        explicitSet: false,
+        valueSet: null,
+        pdfVersion: 1.7
+      }
+    };
+    var configurationKeys = Object.keys(configurationTemplate);
+    var rangeArray = [];
+    var i = 0;
+    var j = 0;
+    var k = 0;
+    var isValid;
+    var method;
+    var value;
+
+    function arrayContainsElement(array, element) {
+      var iterator;
+      var result = false;
+
+      for (iterator = 0; iterator < array.length; iterator += 1) {
+        if (array[iterator] === element) {
+          result = true;
+        }
+      }
+
+      return result;
+    }
+
+    if (this.internal.viewerpreferences === undefined) {
+      this.internal.viewerpreferences = {};
+      this.internal.viewerpreferences.configuration = JSON.parse(JSON.stringify(configurationTemplate));
+      this.internal.viewerpreferences.isSubscribed = false;
+    }
+
+    configuration = this.internal.viewerpreferences.configuration;
+
+    if (options === "reset" || doReset === true) {
+      var len = configurationKeys.length;
+
+      for (k = 0; k < len; k += 1) {
+        configuration[configurationKeys[k]].value = configuration[configurationKeys[k]].defaultValue;
+        configuration[configurationKeys[k]].explicitSet = false;
+      }
+    }
+
+    if (_typeof(options) === "object") {
+      for (method in options) {
+        value = options[method];
+
+        if (arrayContainsElement(configurationKeys, method) && value !== undefined) {
+          if (configuration[method].type === "boolean" && typeof value === "boolean") {
+            configuration[method].value = value;
+          } else if (configuration[method].type === "name" && arrayContainsElement(configuration[method].valueSet, value)) {
+            configuration[method].value = value;
+          } else if (configuration[method].type === "integer" && Number.isInteger(value)) {
+            configuration[method].value = value;
+          } else if (configuration[method].type === "array") {
+            for (i = 0; i < value.length; i += 1) {
+              isValid = true;
+
+              if (value[i].length === 1 && typeof value[i][0] === "number") {
+                rangeArray.push(String(value[i] - 1));
+              } else if (value[i].length > 1) {
+                for (j = 0; j < value[i].length; j += 1) {
+                  if (typeof value[i][j] !== "number") {
+                    isValid = false;
+                  }
+                }
+
+                if (isValid === true) {
+                  rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(" "));
+                }
+              }
+            }
+
+            configuration[method].value = "[" + rangeArray.join(" ") + "]";
+          } else {
+            configuration[method].value = configuration[method].defaultValue;
+          }
+
+          configuration[method].explicitSet = true;
+        }
+      }
+    }
+
+    if (this.internal.viewerpreferences.isSubscribed === false) {
+      this.internal.events.subscribe("putCatalog", function () {
+        var pdfDict = [];
+        var vPref;
+
+        for (vPref in configuration) {
+          if (configuration[vPref].explicitSet === true) {
+            if (configuration[vPref].type === "name") {
+              pdfDict.push("/" + vPref + " /" + configuration[vPref].value);
+            } else {
+              pdfDict.push("/" + vPref + " " + configuration[vPref].value);
+            }
+          }
+        }
+
+        if (pdfDict.length !== 0) {
+          this.internal.write("/ViewerPreferences\n<<\n" + pdfDict.join("\n") + "\n>>");
+        }
+      });
+      this.internal.viewerpreferences.isSubscribed = true;
+    }
+
+    this.internal.viewerpreferences.configuration = configuration;
+    return this;
+  };
+})(jsPDF.API);
+
+/** ====================================================================
+ * @license
+ * jsPDF XMP metadata plugin
+ * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+/**
+ * @name xmp_metadata
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  var postPutResources = function postPutResources() {
+    var xmpmeta_beginning = '<x:xmpmeta xmlns:x="adobe:ns:meta/">';
+    var rdf_beginning = '<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>';
+    var rdf_ending = "</jspdf:metadata></rdf:Description></rdf:RDF>";
+    var xmpmeta_ending = "</x:xmpmeta>";
+    var utf8_xmpmeta_beginning = unescape(encodeURIComponent(xmpmeta_beginning));
+    var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));
+    var utf8_metadata = unescape(encodeURIComponent(this.internal.__metadata__.metadata));
+    var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));
+    var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));
+    var total_len = utf8_rdf_beginning.length + utf8_metadata.length + utf8_rdf_ending.length + utf8_xmpmeta_beginning.length + utf8_xmpmeta_ending.length;
+    this.internal.__metadata__.metadata_object_number = this.internal.newObject();
+    this.internal.write("<< /Type /Metadata /Subtype /XML /Length " + total_len + " >>");
+    this.internal.write("stream");
+    this.internal.write(utf8_xmpmeta_beginning + utf8_rdf_beginning + utf8_metadata + utf8_rdf_ending + utf8_xmpmeta_ending);
+    this.internal.write("endstream");
+    this.internal.write("endobj");
+  };
+
+  var putCatalog = function putCatalog() {
+    if (this.internal.__metadata__.metadata_object_number) {
+      this.internal.write("/Metadata " + this.internal.__metadata__.metadata_object_number + " 0 R");
+    }
+  };
+  /**
+   * Adds XMP formatted metadata to PDF
+   *
+   * @name addMetadata
+   * @function
+   * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters "<", ">" or "&", those characters should be written using XML entities.
+   * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.
+   * @returns {jsPDF} jsPDF-instance
+   */
+
+
+  jsPDFAPI.addMetadata = function (metadata, namespaceuri) {
+    if (typeof this.internal.__metadata__ === "undefined") {
+      this.internal.__metadata__ = {
+        metadata: metadata,
+        namespaceuri: namespaceuri || "http://jspdf.default.namespaceuri/"
+      };
+      this.internal.events.subscribe("putCatalog", putCatalog);
+      this.internal.events.subscribe("postPutResources", postPutResources);
+    }
+
+    return this;
+  };
+})(jsPDF.API);
+
+/**
+ * @name utf8
+ * @module
+ */
+
+(function (jsPDF) {
+
+  var jsPDFAPI = jsPDF.API;
+  /***************************************************************************************************/
+
+  /* function : pdfEscape16                                                                          */
+
+  /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */
+
+  /*   the corresponding glyph id and width, and then adding padding to the string.                  */
+
+  /***************************************************************************************************/
+
+  var pdfEscape16 = jsPDFAPI.pdfEscape16 = function (text, font) {
+    var widths = font.metadata.Unicode.widths;
+    var padz = ["", "0", "00", "000", "0000"];
+    var ar = [""];
+
+    for (var i = 0, l = text.length, t; i < l; ++i) {
+      t = font.metadata.characterToGlyph(text.charCodeAt(i));
+      font.metadata.glyIdsUsed.push(t);
+      font.metadata.toUnicode[t] = text.charCodeAt(i);
+
+      if (widths.indexOf(t) == -1) {
+        widths.push(t);
+        widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);
+      }
+
+      if (t == "0") {
+        //Spaces are not allowed in cmap.
+        return ar.join("");
+      } else {
+        t = t.toString(16);
+        ar.push(padz[4 - t.length], t);
+      }
+    }
+
+    return ar.join("");
+  };
+
+  var toUnicodeCmap = function toUnicodeCmap(map) {
+    var code, codes, range, unicode, unicodeMap, _i, _len;
+
+    unicodeMap = "/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";
+    codes = Object.keys(map).sort(function (a, b) {
+      return a - b;
+    });
+    range = [];
+
+    for (_i = 0, _len = codes.length; _i < _len; _i++) {
+      code = codes[_i];
+
+      if (range.length >= 100) {
+        unicodeMap += "\n" + range.length + " beginbfchar\n" + range.join("\n") + "\nendbfchar";
+        range = [];
+      }
+
+      if (map[code] !== undefined && map[code] !== null && typeof map[code].toString === "function") {
+        unicode = ("0000" + map[code].toString(16)).slice(-4);
+        code = ("0000" + (+code).toString(16)).slice(-4);
+        range.push("<" + code + "><" + unicode + ">");
+      }
+    }
+
+    if (range.length) {
+      unicodeMap += "\n" + range.length + " beginbfchar\n" + range.join("\n") + "\nendbfchar\n";
+    }
+
+    unicodeMap += "endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend";
+    return unicodeMap;
+  };
+
+  var identityHFunction = function identityHFunction(options) {
+    var font = options.font;
+    var out = options.out;
+    var newObject = options.newObject;
+    var putStream = options.putStream;
+
+    if (font.metadata instanceof jsPDF.API.TTFFont && font.encoding === "Identity-H") {
+      //Tag with Identity-H
+      var widths = font.metadata.Unicode.widths;
+      var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);
+      var pdfOutput = data;
+      var pdfOutput2 = "";
+
+      for (var i = 0; i < pdfOutput.length; i++) {
+        pdfOutput2 += String.fromCharCode(pdfOutput[i]);
+      }
+
+      var fontTable = newObject();
+      putStream({
+        data: pdfOutput2,
+        addLength1: true,
+        objectId: fontTable
+      });
+      out("endobj");
+      var cmap = newObject();
+      var cmapData = toUnicodeCmap(font.metadata.toUnicode);
+      putStream({
+        data: cmapData,
+        addLength1: true,
+        objectId: cmap
+      });
+      out("endobj");
+      var fontDescriptor = newObject();
+      out("<<");
+      out("/Type /FontDescriptor");
+      out("/FontName /" + toPDFName(font.fontName));
+      out("/FontFile2 " + fontTable + " 0 R");
+      out("/FontBBox " + jsPDF.API.PDFObject.convert(font.metadata.bbox));
+      out("/Flags " + font.metadata.flags);
+      out("/StemV " + font.metadata.stemV);
+      out("/ItalicAngle " + font.metadata.italicAngle);
+      out("/Ascent " + font.metadata.ascender);
+      out("/Descent " + font.metadata.decender);
+      out("/CapHeight " + font.metadata.capHeight);
+      out(">>");
+      out("endobj");
+      var DescendantFont = newObject();
+      out("<<");
+      out("/Type /Font");
+      out("/BaseFont /" + toPDFName(font.fontName));
+      out("/FontDescriptor " + fontDescriptor + " 0 R");
+      out("/W " + jsPDF.API.PDFObject.convert(widths));
+      out("/CIDToGIDMap /Identity");
+      out("/DW 1000");
+      out("/Subtype /CIDFontType2");
+      out("/CIDSystemInfo");
+      out("<<");
+      out("/Supplement 0");
+      out("/Registry (Adobe)");
+      out("/Ordering (" + font.encoding + ")");
+      out(">>");
+      out(">>");
+      out("endobj");
+      font.objectNumber = newObject();
+      out("<<");
+      out("/Type /Font");
+      out("/Subtype /Type0");
+      out("/ToUnicode " + cmap + " 0 R");
+      out("/BaseFont /" + toPDFName(font.fontName));
+      out("/Encoding /" + font.encoding);
+      out("/DescendantFonts [" + DescendantFont + " 0 R]");
+      out(">>");
+      out("endobj");
+      font.isAlreadyPutted = true;
+    }
+  };
+
+  jsPDFAPI.events.push(["putFont", function (args) {
+    identityHFunction(args);
+  }]);
+
+  var winAnsiEncodingFunction = function winAnsiEncodingFunction(options) {
+    var font = options.font;
+    var out = options.out;
+    var newObject = options.newObject;
+    var putStream = options.putStream;
+
+    if (font.metadata instanceof jsPDF.API.TTFFont && font.encoding === "WinAnsiEncoding") {
+      //Tag with WinAnsi encoding
+      var data = font.metadata.rawData;
+      var pdfOutput = data;
+      var pdfOutput2 = "";
+
+      for (var i = 0; i < pdfOutput.length; i++) {
+        pdfOutput2 += String.fromCharCode(pdfOutput[i]);
+      }
+
+      var fontTable = newObject();
+      putStream({
+        data: pdfOutput2,
+        addLength1: true,
+        objectId: fontTable
+      });
+      out("endobj");
+      var cmap = newObject();
+      var cmapData = toUnicodeCmap(font.metadata.toUnicode);
+      putStream({
+        data: cmapData,
+        addLength1: true,
+        objectId: cmap
+      });
+      out("endobj");
+      var fontDescriptor = newObject();
+      out("<<");
+      out("/Descent " + font.metadata.decender);
+      out("/CapHeight " + font.metadata.capHeight);
+      out("/StemV " + font.metadata.stemV);
+      out("/Type /FontDescriptor");
+      out("/FontFile2 " + fontTable + " 0 R");
+      out("/Flags 96");
+      out("/FontBBox " + jsPDF.API.PDFObject.convert(font.metadata.bbox));
+      out("/FontName /" + toPDFName(font.fontName));
+      out("/ItalicAngle " + font.metadata.italicAngle);
+      out("/Ascent " + font.metadata.ascender);
+      out(">>");
+      out("endobj");
+      font.objectNumber = newObject();
+
+      for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {
+        font.metadata.hmtx.widths[j] = parseInt(font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)); //Change the width of Em units to Point units.
+      }
+
+      out("<</Subtype/TrueType/Type/Font/ToUnicode " + cmap + " 0 R/BaseFont/" + toPDFName(font.fontName) + "/FontDescriptor " + fontDescriptor + " 0 R" + "/Encoding/" + font.encoding + " /FirstChar 29 /LastChar 255 /Widths " + jsPDF.API.PDFObject.convert(font.metadata.hmtx.widths) + ">>");
+      out("endobj");
+      font.isAlreadyPutted = true;
+    }
+  };
+
+  jsPDFAPI.events.push(["putFont", function (args) {
+    winAnsiEncodingFunction(args);
+  }]);
+
+  var utf8TextFunction = function utf8TextFunction(args) {
+    var text = args.text || "";
+    var x = args.x;
+    var y = args.y;
+    var options = args.options || {};
+    var mutex = args.mutex || {};
+    var pdfEscape = mutex.pdfEscape;
+    var activeFontKey = mutex.activeFontKey;
+    var fonts = mutex.fonts;
+    var key = activeFontKey;
+    var str = "",
+        s = 0,
+        cmapConfirm;
+    var strText = "";
+    var encoding = fonts[key].encoding;
+
+    if (fonts[key].encoding !== "Identity-H") {
+      return {
+        text: text,
+        x: x,
+        y: y,
+        options: options,
+        mutex: mutex
+      };
+    }
+
+    strText = text;
+    key = activeFontKey;
+
+    if (Array.isArray(text)) {
+      strText = text[0];
+    }
+
+    for (s = 0; s < strText.length; s += 1) {
+      if (fonts[key].metadata.hasOwnProperty("cmap")) {
+        cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];
+        /*
+             if (Object.prototype.toString.call(text) === '[object Array]') {
+                var i = 0;
+               // for (i = 0; i < text.length; i += 1) {
+                    if (Object.prototype.toString.call(text[s]) === '[object Array]') {
+                        cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id
+                    } else {
+                     }
+                //}
+             } else {
+                cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id
+            }*/
+      }
+
+      if (!cmapConfirm) {
+        if (strText[s].charCodeAt(0) < 256 && fonts[key].metadata.hasOwnProperty("Unicode")) {
+          str += strText[s];
+        } else {
+          str += "";
+        }
+      } else {
+        str += strText[s];
+      }
+    }
+
+    var result = "";
+
+    if (parseInt(key.slice(1)) < 14 || encoding === "WinAnsiEncoding") {
+      //For the default 13 font
+      result = pdfEscape(str, key).split("").map(function (cv) {
+        return cv.charCodeAt(0).toString(16);
+      }).join("");
+    } else if (encoding === "Identity-H") {
+      result = pdfEscape16(str, fonts[key]);
+    }
+
+    mutex.isHex = true;
+    return {
+      text: result,
+      x: x,
+      y: y,
+      options: options,
+      mutex: mutex
+    };
+  };
+
+  var utf8EscapeFunction = function utf8EscapeFunction(parms) {
+    var text = parms.text || "",
+        x = parms.x,
+        y = parms.y,
+        options = parms.options,
+        mutex = parms.mutex;
+    var tmpText = [];
+    var args = {
+      text: text,
+      x: x,
+      y: y,
+      options: options,
+      mutex: mutex
+    };
+
+    if (Array.isArray(text)) {
+      var i = 0;
+
+      for (i = 0; i < text.length; i += 1) {
+        if (Array.isArray(text[i])) {
+          if (text[i].length === 3) {
+            tmpText.push([utf8TextFunction(Object.assign({}, args, {
+              text: text[i][0]
+            })).text, text[i][1], text[i][2]]);
+          } else {
+            tmpText.push(utf8TextFunction(Object.assign({}, args, {
+              text: text[i]
+            })).text);
+          }
+        } else {
+          tmpText.push(utf8TextFunction(Object.assign({}, args, {
+            text: text[i]
+          })).text);
+        }
+      }
+
+      parms.text = tmpText;
+    } else {
+      parms.text = utf8TextFunction(Object.assign({}, args, {
+        text: text
+      })).text;
+    }
+  };
+
+  jsPDFAPI.events.push(["postProcessText", utf8EscapeFunction]);
+})(jsPDF);
+
+/**
+ * @license
+ * jsPDF virtual FileSystem functionality
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+/**
+ * Use the vFS to handle files
+ *
+ * @name vFS
+ * @module
+ */
+
+(function (jsPDFAPI) {
+
+  var _initializeVFS = function _initializeVFS() {
+    if (typeof this.internal.vFS === "undefined") {
+      this.internal.vFS = {};
+    }
+
+    return true;
+  };
+  /**
+   * Check if the file exists in the vFS
+   *
+   * @name existsFileInVFS
+   * @function
+   * @param {string} Possible filename in the vFS.
+   * @returns {boolean}
+   * @example
+   * doc.existsFileInVFS("someFile.txt");
+   */
+
+
+  jsPDFAPI.existsFileInVFS = function (filename) {
+    _initializeVFS.call(this);
+
+    return typeof this.internal.vFS[filename] !== "undefined";
+  };
+  /**
+   * Add a file to the vFS
+   *
+   * @name addFileToVFS
+   * @function
+   * @param {string} filename The name of the file which should be added.
+   * @param {string} filecontent The content of the file.
+   * @returns {jsPDF}
+   * @example
+   * doc.addFileToVFS("someFile.txt", "BADFACE1");
+   */
+
+
+  jsPDFAPI.addFileToVFS = function (filename, filecontent) {
+    _initializeVFS.call(this);
+
+    this.internal.vFS[filename] = filecontent;
+    return this;
+  };
+  /**
+   * Get the file from the vFS
+   *
+   * @name getFileFromVFS
+   * @function
+   * @param {string} The name of the file which gets requested.
+   * @returns {string}
+   * @example
+   * doc.getFileFromVFS("someFile.txt");
+   */
+
+
+  jsPDFAPI.getFileFromVFS = function (filename) {
+    _initializeVFS.call(this);
+
+    if (typeof this.internal.vFS[filename] !== "undefined") {
+      return this.internal.vFS[filename];
+    }
+
+    return null;
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
+ * MIT License
+ */
+
+(function (jsPDF) {
+  /**
+   * Table of Unicode types.
+   *
+   * Generated by:
+   *
+   * var bidi = require("./bidi/index");
+   * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).
+   * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).
+   * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));
+   *
+   * for( var i = 0; i < bidi_accumulate.length; i++) {
+   * 	if(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')
+   * 		bidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined
+   * }
+   * var bidiAccumulateStr = 'return [ "' + bidi_accumulate.toString().replace(/,/g, '", "') + '" ];';
+   * require("fs").writeFile('unicode-types.js', bidiAccumulateStr);
+   *
+   * Based on:
+   * https://github.com/mathiasbynens/unicode-8.0.0
+   */
+
+  var bidiUnicodeTypes = ["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"];
+  /**
+   * Unicode Bidi algorithm compliant Bidi engine.
+   * For reference see http://unicode.org/reports/tr9/
+   */
+
+  /**
+   * constructor ( options )
+   *
+   * Initializes Bidi engine
+   *
+   * @param {Object} See 'setOptions' below for detailed description.
+   * options are cashed between invocation of 'doBidiReorder' method
+   *
+   * sample usage pattern of BidiEngine:
+   * var opt = {
+   * 	isInputVisual: true,
+   * 	isInputRtl: false,
+   * 	isOutputVisual: false,
+   * 	isOutputRtl: false,
+   * 	isSymmetricSwapping: true
+   * }
+   * var sourceToTarget = [], levels = [];
+   * var bidiEng = Globalize.bidiEngine(opt);
+   * var src = "text string to be reordered";
+   * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);
+   */
+
+  jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function (options) {
+    var _UNICODE_TYPES = _bidiUnicodeTypes;
+    var _STATE_TABLE_LTR = [[0, 3, 0, 1, 0, 0, 0], [0, 3, 0, 1, 2, 2, 0], [0, 3, 0, 0x11, 2, 0, 1], [0, 3, 5, 5, 4, 1, 0], [0, 3, 0x15, 0x15, 4, 0, 1], [0, 3, 5, 5, 4, 2, 0]];
+    var _STATE_TABLE_RTL = [[2, 0, 1, 1, 0, 1, 0], [2, 0, 1, 1, 0, 2, 0], [2, 0, 2, 1, 3, 2, 0], [2, 0, 2, 0x21, 3, 1, 1]];
+    var _TYPE_NAMES_MAP = {
+      L: 0,
+      R: 1,
+      EN: 2,
+      AN: 3,
+      N: 4,
+      B: 5,
+      S: 6
+    };
+    var _UNICODE_RANGES_MAP = {
+      0: 0,
+      5: 1,
+      6: 2,
+      7: 3,
+      0x20: 4,
+      0xfb: 5,
+      0xfe: 6,
+      0xff: 7
+    };
+    var _SWAP_TABLE = ["(", ")", "(", "<", ">", "<", "[", "]", "[", "{", "}", "{", "\xAB", "\xBB", "\xAB", "\u2039", "\u203A", "\u2039", "\u2045", "\u2046", "\u2045", "\u207D", "\u207E", "\u207D", "\u208D", "\u208E", "\u208D", "\u2264", "\u2265", "\u2264", "\u2329", "\u232A", "\u2329", "\uFE59", "\uFE5A", "\uFE59", "\uFE5B", "\uFE5C", "\uFE5B", "\uFE5D", "\uFE5E", "\uFE5D", "\uFE64", "\uFE65", "\uFE64"];
+
+    var _LTR_RANGES_REG_EXPR = 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)$/);
+
+    var _lastArabic = false,
+        _hasUbatB,
+        _hasUbatS,
+        DIR_LTR = 0,
+        DIR_RTL = 1,
+        _isInVisual,
+        _isInRtl,
+        _isOutVisual,
+        _isOutRtl,
+        _isSymmetricSwapping,
+        _dir = DIR_LTR;
+
+    this.__bidiEngine__ = {};
+
+    var _init = function _init(text, sourceToTargetMap) {
+      if (sourceToTargetMap) {
+        for (var i = 0; i < text.length; i++) {
+          sourceToTargetMap[i] = i;
+        }
+      }
+
+      if (_isInRtl === undefined) {
+        _isInRtl = _isContextualDirRtl(text);
+      }
+
+      if (_isOutRtl === undefined) {
+        _isOutRtl = _isContextualDirRtl(text);
+      }
+    }; // for reference see 3.2 in http://unicode.org/reports/tr9/
+    //
+
+
+    var _getCharType = function _getCharType(ch) {
+      var charCode = ch.charCodeAt(),
+          range = charCode >> 8,
+          rangeIdx = _UNICODE_RANGES_MAP[range];
+
+      if (rangeIdx !== undefined) {
+        return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];
+      } else if (range === 0xfc || range === 0xfd) {
+        return "AL";
+      } else if (_LTR_RANGES_REG_EXPR.test(range)) {
+        //unlikely case
+        return "L";
+      } else if (range === 8) {
+        // even less likely
+        return "R";
+      }
+
+      return "N"; //undefined type, mark as neutral
+    };
+
+    var _isContextualDirRtl = function _isContextualDirRtl(text) {
+      for (var i = 0, charType; i < text.length; i++) {
+        charType = _getCharType(text.charAt(i));
+
+        if (charType === "L") {
+          return false;
+        } else if (charType === "R") {
+          return true;
+        }
+      }
+
+      return false;
+    }; // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/
+    //
+
+
+    var _resolveCharType = function _resolveCharType(chars, types, resolvedTypes, index) {
+      var cType = types[index],
+          wType,
+          nType,
+          i,
+          len;
+
+      switch (cType) {
+        case "L":
+        case "R":
+          _lastArabic = false;
+          break;
+
+        case "N":
+        case "AN":
+          break;
+
+        case "EN":
+          if (_lastArabic) {
+            cType = "AN";
+          }
+
+          break;
+
+        case "AL":
+          _lastArabic = true;
+          cType = "R";
+          break;
+
+        case "WS":
+          cType = "N";
+          break;
+
+        case "CS":
+          if (index < 1 || index + 1 >= types.length || (wType = resolvedTypes[index - 1]) !== "EN" && wType !== "AN" || (nType = types[index + 1]) !== "EN" && nType !== "AN") {
+            cType = "N";
+          } else if (_lastArabic) {
+            nType = "AN";
+          }
+
+          cType = nType === wType ? nType : "N";
+          break;
+
+        case "ES":
+          wType = index > 0 ? resolvedTypes[index - 1] : "B";
+          cType = wType === "EN" && index + 1 < types.length && types[index + 1] === "EN" ? "EN" : "N";
+          break;
+
+        case "ET":
+          if (index > 0 && resolvedTypes[index - 1] === "EN") {
+            cType = "EN";
+            break;
+          } else if (_lastArabic) {
+            cType = "N";
+            break;
+          }
+
+          i = index + 1;
+          len = types.length;
+
+          while (i < len && types[i] === "ET") {
+            i++;
+          }
+
+          if (i < len && types[i] === "EN") {
+            cType = "EN";
+          } else {
+            cType = "N";
+          }
+
+          break;
+
+        case "NSM":
+          if (_isInVisual && !_isInRtl) {
+            //V->L
+            len = types.length;
+            i = index + 1;
+
+            while (i < len && types[i] === "NSM") {
+              i++;
+            }
+
+            if (i < len) {
+              var c = chars[index];
+              var rtlCandidate = c >= 0x0591 && c <= 0x08ff || c === 0xfb1e;
+              wType = types[i];
+
+              if (rtlCandidate && (wType === "R" || wType === "AL")) {
+                cType = "R";
+                break;
+              }
+            }
+          }
+
+          if (index < 1 || (wType = types[index - 1]) === "B") {
+            cType = "N";
+          } else {
+            cType = resolvedTypes[index - 1];
+          }
+
+          break;
+
+        case "B":
+          _lastArabic = false;
+          _hasUbatB = true;
+          cType = _dir;
+          break;
+
+        case "S":
+          _hasUbatS = true;
+          cType = "N";
+          break;
+
+        case "LRE":
+        case "RLE":
+        case "LRO":
+        case "RLO":
+        case "PDF":
+          _lastArabic = false;
+          break;
+
+        case "BN":
+          cType = "N";
+          break;
+      }
+
+      return cType;
+    };
+
+    var _handleUbatS = function _handleUbatS(types, levels, length) {
+      for (var i = 0; i < length; i++) {
+        if (types[i] === "S") {
+          levels[i] = _dir;
+
+          for (var j = i - 1; j >= 0; j--) {
+            if (types[j] === "WS") {
+              levels[j] = _dir;
+            } else {
+              break;
+            }
+          }
+        }
+      }
+    };
+
+    var _invertString = function _invertString(text, sourceToTargetMap, levels) {
+      var charArray = text.split("");
+
+      if (levels) {
+        _computeLevels(charArray, levels, {
+          hiLevel: _dir
+        });
+      }
+
+      charArray.reverse();
+      sourceToTargetMap && sourceToTargetMap.reverse();
+      return charArray.join("");
+    }; // For reference see 3.3 in http://unicode.org/reports/tr9/
+    //
+
+
+    var _computeLevels = function _computeLevels(chars, levels, params) {
+      var action,
+          condition,
+          i,
+          index,
+          newLevel,
+          prevState,
+          condPos = -1,
+          len = chars.length,
+          newState = 0,
+          resolvedTypes = [],
+          stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,
+          types = [];
+      _lastArabic = false;
+      _hasUbatB = false;
+      _hasUbatS = false;
+
+      for (i = 0; i < len; i++) {
+        types[i] = _getCharType(chars[i]);
+      }
+
+      for (index = 0; index < len; index++) {
+        prevState = newState;
+        resolvedTypes[index] = _resolveCharType(chars, types, resolvedTypes, index);
+        newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];
+        action = newState & 0xf0;
+        newState &= 0x0f;
+        levels[index] = newLevel = stateTable[newState][5];
+
+        if (action > 0) {
+          if (action === 0x10) {
+            for (i = condPos; i < index; i++) {
+              levels[i] = 1;
+            }
+
+            condPos = -1;
+          } else {
+            condPos = -1;
+          }
+        }
+
+        condition = stateTable[newState][6];
+
+        if (condition) {
+          if (condPos === -1) {
+            condPos = index;
+          }
+        } else {
+          if (condPos > -1) {
+            for (i = condPos; i < index; i++) {
+              levels[i] = newLevel;
+            }
+
+            condPos = -1;
+          }
+        }
+
+        if (types[index] === "B") {
+          levels[index] = 0;
+        }
+
+        params.hiLevel |= newLevel;
+      }
+
+      if (_hasUbatS) {
+        _handleUbatS(types, levels, len);
+      }
+    }; // for reference see 3.4 in http://unicode.org/reports/tr9/
+    //
+
+
+    var _invertByLevel = function _invertByLevel(level, charArray, sourceToTargetMap, levels, params) {
+      if (params.hiLevel < level) {
+        return;
+      }
+
+      if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {
+        charArray.reverse();
+        sourceToTargetMap && sourceToTargetMap.reverse();
+        return;
+      }
+
+      var ch,
+          high,
+          end,
+          low,
+          len = charArray.length,
+          start = 0;
+
+      while (start < len) {
+        if (levels[start] >= level) {
+          end = start + 1;
+
+          while (end < len && levels[end] >= level) {
+            end++;
+          }
+
+          for (low = start, high = end - 1; low < high; low++, high--) {
+            ch = charArray[low];
+            charArray[low] = charArray[high];
+            charArray[high] = ch;
+
+            if (sourceToTargetMap) {
+              ch = sourceToTargetMap[low];
+              sourceToTargetMap[low] = sourceToTargetMap[high];
+              sourceToTargetMap[high] = ch;
+            }
+          }
+
+          start = end;
+        }
+
+        start++;
+      }
+    }; // for reference see 7 & BD16 in http://unicode.org/reports/tr9/
+    //
+
+
+    var _symmetricSwap = function _symmetricSwap(charArray, levels, params) {
+      if (params.hiLevel !== 0 && _isSymmetricSwapping) {
+        for (var i = 0, index; i < charArray.length; i++) {
+          if (levels[i] === 1) {
+            index = _SWAP_TABLE.indexOf(charArray[i]);
+
+            if (index >= 0) {
+              charArray[i] = _SWAP_TABLE[index + 1];
+            }
+          }
+        }
+      }
+    };
+
+    var _reorder = function _reorder(text, sourceToTargetMap, levels) {
+      var charArray = text.split(""),
+          params = {
+        hiLevel: _dir
+      };
+
+      if (!levels) {
+        levels = [];
+      }
+
+      _computeLevels(charArray, levels, params);
+
+      _symmetricSwap(charArray, levels, params);
+
+      _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);
+
+      _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);
+
+      return charArray.join("");
+    }; // doBidiReorder( text, sourceToTargetMap, levels )
+    // Performs Bidi reordering by implementing Unicode Bidi algorithm.
+    // Returns reordered string
+    // @text [String]:
+    // - input string to be reordered, this is input parameter
+    // $sourceToTargetMap [Array] (optional)
+    // - resultant mapping between input and output strings, this is output parameter
+    // $levels [Array] (optional)
+    // - array of calculated Bidi levels, , this is output parameter
+
+
+    this.__bidiEngine__.doBidiReorder = function (text, sourceToTargetMap, levels) {
+      _init(text, sourceToTargetMap);
+
+      if (!_isInVisual && _isOutVisual && !_isOutRtl) {
+        // LLTR->VLTR, LRTL->VLTR
+        _dir = _isInRtl ? DIR_RTL : DIR_LTR;
+        text = _reorder(text, sourceToTargetMap, levels);
+      } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {
+        // VRTL->VLTR, VLTR->VRTL
+        _dir = _isInRtl ? DIR_RTL : DIR_LTR;
+        text = _invertString(text, sourceToTargetMap, levels);
+      } else if (!_isInVisual && _isOutVisual && _isOutRtl) {
+        // LLTR->VRTL, LRTL->VRTL
+        _dir = _isInRtl ? DIR_RTL : DIR_LTR;
+        text = _reorder(text, sourceToTargetMap, levels);
+        text = _invertString(text, sourceToTargetMap);
+      } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {
+        // VLTR->LLTR
+        _dir = DIR_LTR;
+        text = _reorder(text, sourceToTargetMap, levels);
+      } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {
+        // VLTR->LRTL, VRTL->LLTR
+        text = _invertString(text, sourceToTargetMap);
+
+        if (_isInRtl) {
+          //LLTR -> VLTR
+          _dir = DIR_LTR;
+          text = _reorder(text, sourceToTargetMap, levels);
+        } else {
+          //LRTL -> VRTL
+          _dir = DIR_RTL;
+          text = _reorder(text, sourceToTargetMap, levels);
+          text = _invertString(text, sourceToTargetMap);
+        }
+      } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {
+        //  VRTL->LRTL
+        _dir = DIR_RTL;
+        text = _reorder(text, sourceToTargetMap, levels);
+        text = _invertString(text, sourceToTargetMap);
+      } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {
+        // LRTL->LLTR, LLTR->LRTL
+        var isSymmetricSwappingOrig = _isSymmetricSwapping;
+
+        if (_isInRtl) {
+          //LRTL->LLTR
+          _dir = DIR_RTL;
+          text = _reorder(text, sourceToTargetMap, levels);
+          _dir = DIR_LTR;
+          _isSymmetricSwapping = false;
+          text = _reorder(text, sourceToTargetMap, levels);
+          _isSymmetricSwapping = isSymmetricSwappingOrig;
+        } else {
+          //LLTR->LRTL
+          _dir = DIR_LTR;
+          text = _reorder(text, sourceToTargetMap, levels);
+          text = _invertString(text, sourceToTargetMap);
+          _dir = DIR_RTL;
+          _isSymmetricSwapping = false;
+          text = _reorder(text, sourceToTargetMap, levels);
+          _isSymmetricSwapping = isSymmetricSwappingOrig;
+          text = _invertString(text, sourceToTargetMap);
+        }
+      }
+
+      return text;
+    };
+    /**
+     * @name setOptions( options )
+     * @function
+     * Sets options for Bidi conversion
+     * @param {Object}:
+     * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)
+     * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)
+     * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)
+     * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)
+     * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),
+     */
+
+
+    this.__bidiEngine__.setOptions = function (options) {
+      if (options) {
+        _isInVisual = options.isInputVisual;
+        _isOutVisual = options.isOutputVisual;
+        _isInRtl = options.isInputRtl;
+        _isOutRtl = options.isOutputRtl;
+        _isSymmetricSwapping = options.isSymmetricSwapping;
+      }
+    };
+
+    this.__bidiEngine__.setOptions(options);
+
+    return this.__bidiEngine__;
+  };
+
+  var _bidiUnicodeTypes = bidiUnicodeTypes;
+  var bidiEngine = new jsPDF.__bidiEngine__({
+    isInputVisual: true
+  });
+
+  var bidiEngineFunction = function bidiEngineFunction(args) {
+    var text = args.text;
+    var x = args.x;
+    var y = args.y;
+    var options = args.options || {};
+    var mutex = args.mutex || {};
+    var lang = options.lang;
+    var tmpText = [];
+    options.isInputVisual = typeof options.isInputVisual === "boolean" ? options.isInputVisual : true;
+    bidiEngine.setOptions(options);
+
+    if (Object.prototype.toString.call(text) === "[object Array]") {
+      var i = 0;
+      tmpText = [];
+
+      for (i = 0; i < text.length; i += 1) {
+        if (Object.prototype.toString.call(text[i]) === "[object Array]") {
+          tmpText.push([bidiEngine.doBidiReorder(text[i][0]), text[i][1], text[i][2]]);
+        } else {
+          tmpText.push([bidiEngine.doBidiReorder(text[i])]);
+        }
+      }
+
+      args.text = tmpText;
+    } else {
+      args.text = bidiEngine.doBidiReorder(text);
+    }
+
+    bidiEngine.setOptions({
+      isInputVisual: true
+    });
+  };
+
+  jsPDF.API.events.push(["postProcessText", bidiEngineFunction]);
+})(jsPDF);
+
+/* eslint-disable no-control-regex */
+
+jsPDF.API.TTFFont = function () {
+  /************************************************************************/
+
+  /* function : open                                                       */
+
+  /* comment : Decode the encoded ttf content and create a TTFFont object. */
+
+  /************************************************************************/
+  TTFFont.open = function (file) {
+    return new TTFFont(file);
+  };
+  /***************************************************************/
+
+  /* function : TTFFont gernerator                               */
+
+  /* comment : Decode TTF contents are parsed, Data,             */
+
+  /* Subset object is created, and registerTTF function is called.*/
+
+  /***************************************************************/
+
+
+  function TTFFont(rawData) {
+    var data;
+    this.rawData = rawData;
+    data = this.contents = new Data(rawData);
+    this.contents.pos = 4;
+
+    if (data.readString(4) === "ttcf") {
+      throw new Error("TTCF not supported.");
+    } else {
+      data.pos = 0;
+      this.parse();
+      this.subset = new Subset(this);
+      this.registerTTF();
+    }
+  }
+  /********************************************************/
+
+  /* function : parse                                     */
+
+  /* comment : TTF Parses the file contents by each table.*/
+
+  /********************************************************/
+
+
+  TTFFont.prototype.parse = function () {
+    this.directory = new Directory(this.contents);
+    this.head = new HeadTable(this);
+    this.name = new NameTable(this);
+    this.cmap = new CmapTable(this);
+    this.toUnicode = {};
+    this.hhea = new HheaTable(this);
+    this.maxp = new MaxpTable(this);
+    this.hmtx = new HmtxTable(this);
+    this.post = new PostTable(this);
+    this.os2 = new OS2Table(this);
+    this.loca = new LocaTable(this);
+    this.glyf = new GlyfTable(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;
+    return this.bbox = [this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax];
+  };
+  /***************************************************************/
+
+  /* function : registerTTF                                      */
+
+  /* comment : Get the value to assign pdf font descriptors.     */
+
+  /***************************************************************/
+
+
+  TTFFont.prototype.registerTTF = function () {
+    var e, hi, low, raw, _ref;
+
+    this.scaleFactor = 1000.0 / this.head.unitsPerEm;
+
+    this.bbox = function () {
+      var _i, _len, _ref, _results;
+
+      _ref = this.bbox;
+      _results = [];
+
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        e = _ref[_i];
+
+        _results.push(Math.round(e * this.scaleFactor));
+      }
+
+      return _results;
+    }.call(this);
+
+    this.stemV = 0;
+
+    if (this.post.exists) {
+      raw = this.post.italic_angle;
+      hi = raw >> 16;
+      low = raw & 0xff;
+
+      if ((hi & 0x8000) !== 0) {
+        hi = -((hi ^ 0xffff) + 1);
+      }
+
+      this.italicAngle = +("" + hi + "." + low);
+    } else {
+      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 = (_ref = this.familyClass) === 1 || _ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 7;
+    this.isScript = this.familyClass === 10;
+    this.flags = 0;
+
+    if (this.post.isFixedPitch) {
+      this.flags |= 1 << 0;
+    }
+
+    if (this.isSerif) {
+      this.flags |= 1 << 1;
+    }
+
+    if (this.isScript) {
+      this.flags |= 1 << 3;
+    }
+
+    if (this.italicAngle !== 0) {
+      this.flags |= 1 << 6;
+    }
+
+    this.flags |= 1 << 5;
+
+    if (!this.cmap.unicode) {
+      throw new Error("No unicode cmap for font");
+    }
+  };
+
+  TTFFont.prototype.characterToGlyph = function (character) {
+    var _ref;
+
+    return ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) || 0;
+  };
+
+  TTFFont.prototype.widthOfGlyph = function (glyph) {
+    var scale;
+    scale = 1000.0 / this.head.unitsPerEm;
+    return this.hmtx.forGlyph(glyph).advance * scale;
+  };
+
+  TTFFont.prototype.widthOfString = function (string, size, charSpace) {
+    var charCode, i, scale, width, _ref;
+
+    string = "" + string;
+    width = 0;
+
+    for (i = 0, _ref = string.length; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) {
+      charCode = string.charCodeAt(i);
+      width += this.widthOfGlyph(this.characterToGlyph(charCode)) + charSpace * (1000 / size) || 0;
+    }
+
+    scale = size / 1000;
+    return width * scale;
+  };
+
+  TTFFont.prototype.lineHeight = function (size, includeGap) {
+    var gap;
+
+    if (includeGap == null) {
+      includeGap = false;
+    }
+
+    gap = includeGap ? this.lineGap : 0;
+    return (this.ascender + gap - this.decender) / 1000 * size;
+  };
+
+  return TTFFont;
+}();
+/************************************************************************************************/
+
+/* function : Data                                                                              */
+
+/* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/
+
+/************************************************************************************************/
+
+
+var Data = function () {
+  function Data(data) {
+    this.data = data != null ? data : [];
+    this.pos = 0;
+    this.length = this.data.length;
+  }
+
+  Data.prototype.readByte = function () {
+    return this.data[this.pos++];
+  };
+
+  Data.prototype.writeByte = function (byte) {
+    return this.data[this.pos++] = byte;
+  };
+
+  Data.prototype.readUInt32 = function () {
+    var b1, b2, b3, b4;
+    b1 = this.readByte() * 0x1000000;
+    b2 = this.readByte() << 16;
+    b3 = this.readByte() << 8;
+    b4 = this.readByte();
+    return b1 + b2 + b3 + b4;
+  };
+
+  Data.prototype.writeUInt32 = function (val) {
+    this.writeByte(val >>> 24 & 0xff);
+    this.writeByte(val >> 16 & 0xff);
+    this.writeByte(val >> 8 & 0xff);
+    return this.writeByte(val & 0xff);
+  };
+
+  Data.prototype.readInt32 = function () {
+    var int;
+    int = this.readUInt32();
+
+    if (int >= 0x80000000) {
+      return int - 0x100000000;
+    } else {
+      return int;
+    }
+  };
+
+  Data.prototype.writeInt32 = function (val) {
+    if (val < 0) {
+      val += 0x100000000;
+    }
+
+    return this.writeUInt32(val);
+  };
+
+  Data.prototype.readUInt16 = function () {
+    var b1, b2;
+    b1 = this.readByte() << 8;
+    b2 = this.readByte();
+    return b1 | b2;
+  };
+
+  Data.prototype.writeUInt16 = function (val) {
+    this.writeByte(val >> 8 & 0xff);
+    return this.writeByte(val & 0xff);
+  };
+
+  Data.prototype.readInt16 = function () {
+    var int;
+    int = this.readUInt16();
+
+    if (int >= 0x8000) {
+      return int - 0x10000;
+    } else {
+      return int;
+    }
+  };
+
+  Data.prototype.writeInt16 = function (val) {
+    if (val < 0) {
+      val += 0x10000;
+    }
+
+    return this.writeUInt16(val);
+  };
+
+  Data.prototype.readString = function (length) {
+    var i, ret;
+    ret = [];
+
+    for (i = 0; 0 <= length ? i < length : i > length; i = 0 <= length ? ++i : --i) {
+      ret[i] = String.fromCharCode(this.readByte());
+    }
+
+    return ret.join("");
+  };
+
+  Data.prototype.writeString = function (val) {
+    var i, _ref, _results;
+
+    _results = [];
+
+    for (i = 0, _ref = val.length; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) {
+      _results.push(this.writeByte(val.charCodeAt(i)));
+    }
+
+    return _results;
+  };
+  /*Data.prototype.stringAt = function (pos, length) {
+            this.pos = pos;
+            return this.readString(length);
+        };*/
+
+
+  Data.prototype.readShort = function () {
+    return this.readInt16();
+  };
+
+  Data.prototype.writeShort = function (val) {
+    return this.writeInt16(val);
+  };
+
+  Data.prototype.readLongLong = function () {
+    var b1, b2, b3, b4, b5, b6, b7, b8;
+    b1 = this.readByte();
+    b2 = this.readByte();
+    b3 = this.readByte();
+    b4 = this.readByte();
+    b5 = this.readByte();
+    b6 = this.readByte();
+    b7 = this.readByte();
+    b8 = this.readByte();
+
+    if (b1 & 0x80) {
+      return ((b1 ^ 0xff) * 0x100000000000000 + (b2 ^ 0xff) * 0x1000000000000 + (b3 ^ 0xff) * 0x10000000000 + (b4 ^ 0xff) * 0x100000000 + (b5 ^ 0xff) * 0x1000000 + (b6 ^ 0xff) * 0x10000 + (b7 ^ 0xff) * 0x100 + (b8 ^ 0xff) + 1) * -1;
+    }
+
+    return b1 * 0x100000000000000 + b2 * 0x1000000000000 + b3 * 0x10000000000 + b4 * 0x100000000 + b5 * 0x1000000 + b6 * 0x10000 + b7 * 0x100 + b8;
+  };
+
+  Data.prototype.writeLongLong = function (val) {
+    var high, low;
+    high = Math.floor(val / 0x100000000);
+    low = val & 0xffffffff;
+    this.writeByte(high >> 24 & 0xff);
+    this.writeByte(high >> 16 & 0xff);
+    this.writeByte(high >> 8 & 0xff);
+    this.writeByte(high & 0xff);
+    this.writeByte(low >> 24 & 0xff);
+    this.writeByte(low >> 16 & 0xff);
+    this.writeByte(low >> 8 & 0xff);
+    return this.writeByte(low & 0xff);
+  };
+
+  Data.prototype.readInt = function () {
+    return this.readInt32();
+  };
+
+  Data.prototype.writeInt = function (val) {
+    return this.writeInt32(val);
+  };
+  /*Data.prototype.slice = function (start, end) {
+            return this.data.slice(start, end);
+        };*/
+
+
+  Data.prototype.read = function (bytes) {
+    var buf, i;
+    buf = [];
+
+    for (i = 0; 0 <= bytes ? i < bytes : i > bytes; i = 0 <= bytes ? ++i : --i) {
+      buf.push(this.readByte());
+    }
+
+    return buf;
+  };
+
+  Data.prototype.write = function (bytes) {
+    var byte, i, _len, _results;
+
+    _results = [];
+
+    for (i = 0, _len = bytes.length; i < _len; i++) {
+      byte = bytes[i];
+
+      _results.push(this.writeByte(byte));
+    }
+
+    return _results;
+  };
+
+  return Data;
+}();
+
+var Directory = function () {
+  var checksum;
+  /*****************************************************************************************************/
+
+  /* function : Directory generator                                                                    */
+
+  /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/
+
+  /*****************************************************************************************************/
+
+  function Directory(data) {
+    var entry, i, _ref;
+
+    this.scalarType = data.readInt();
+    this.tableCount = data.readShort();
+    this.searchRange = data.readShort();
+    this.entrySelector = data.readShort();
+    this.rangeShift = data.readShort();
+    this.tables = {};
+
+    for (i = 0, _ref = this.tableCount; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) {
+      entry = {
+        tag: data.readString(4),
+        checksum: data.readInt(),
+        offset: data.readInt(),
+        length: data.readInt()
+      };
+      this.tables[entry.tag] = entry;
+    }
+  }
+  /********************************************************************************************************/
+
+  /* function : encode                                                                                    */
+
+  /* comment : It encodes and stores the font table object and information used for the directory object. */
+
+  /********************************************************************************************************/
+
+
+  Directory.prototype.encode = function (tables) {
+    var adjustment, directory, directoryLength, entrySelector, headOffset, log2, offset, rangeShift, searchRange, sum, table, tableCount, tableData, tag;
+    tableCount = Object.keys(tables).length;
+    log2 = Math.log(2);
+    searchRange = Math.floor(Math.log(tableCount) / log2) * 16;
+    entrySelector = Math.floor(searchRange / log2);
+    rangeShift = tableCount * 16 - searchRange;
+    directory = new Data();
+    directory.writeInt(this.scalarType);
+    directory.writeShort(tableCount);
+    directory.writeShort(searchRange);
+    directory.writeShort(entrySelector);
+    directory.writeShort(rangeShift);
+    directoryLength = tableCount * 16;
+    offset = directory.pos + directoryLength;
+    headOffset = null;
+    tableData = [];
+
+    for (tag in tables) {
+      table = tables[tag];
+      directory.writeString(tag);
+      directory.writeInt(checksum(table));
+      directory.writeInt(offset);
+      directory.writeInt(table.length);
+      tableData = tableData.concat(table);
+
+      if (tag === "head") {
+        headOffset = offset;
+      }
+
+      offset += table.length;
+
+      while (offset % 4) {
+        tableData.push(0);
+        offset++;
+      }
+    }
+
+    directory.write(tableData);
+    sum = checksum(directory.data);
+    adjustment = 0xb1b0afba - sum;
+    directory.pos = headOffset + 8;
+    directory.writeUInt32(adjustment);
+    return directory.data;
+  };
+  /***************************************************************/
+
+  /* function : checksum                                         */
+
+  /* comment : Duplicate the table for the tag.                  */
+
+  /***************************************************************/
+
+
+  checksum = function checksum(data) {
+    var i, sum, tmp, _ref;
+
+    data = __slice.call(data);
+
+    while (data.length % 4) {
+      data.push(0);
+    }
+
+    tmp = new Data(data);
+    sum = 0;
+
+    for (i = 0, _ref = data.length; i < _ref; i = i += 4) {
+      sum += tmp.readUInt32();
+    }
+
+    return sum & 0xffffffff;
+  };
+
+  return Directory;
+}();
+
+var Table,
+    __hasProp = {}.hasOwnProperty,
+    __extends = function __extends(child, parent) {
+  for (var key in parent) {
+    if (__hasProp.call(parent, key)) child[key] = parent[key];
+  }
+
+  function ctor() {
+    this.constructor = child;
+  }
+
+  ctor.prototype = parent.prototype;
+  child.prototype = new ctor();
+  child.__super__ = parent.prototype;
+  return child;
+};
+/***************************************************************/
+
+/* function : Table                                            */
+
+/* comment : Save info for each table, and parse the table.    */
+
+/***************************************************************/
+
+
+Table = function () {
+  function Table(file) {
+    var info;
+    this.file = file;
+    info = this.file.directory.tables[this.tag];
+    this.exists = !!info;
+
+    if (info) {
+      this.offset = info.offset, this.length = info.length;
+      this.parse(this.file.contents);
+    }
+  }
+
+  Table.prototype.parse = function () {};
+
+  Table.prototype.encode = function () {};
+
+  Table.prototype.raw = function () {
+    if (!this.exists) {
+      return null;
+    }
+
+    this.file.contents.pos = this.offset;
+    return this.file.contents.read(this.length);
+  };
+
+  return Table;
+}();
+
+var HeadTable = function (_super) {
+  __extends(HeadTable, _super);
+
+  function HeadTable() {
+    return HeadTable.__super__.constructor.apply(this, arguments);
+  }
+
+  HeadTable.prototype.tag = "head";
+
+  HeadTable.prototype.parse = function (data) {
+    data.pos = this.offset;
+    this.version = data.readInt();
+    this.revision = data.readInt();
+    this.checkSumAdjustment = data.readInt();
+    this.magicNumber = data.readInt();
+    this.flags = data.readShort();
+    this.unitsPerEm = data.readShort();
+    this.created = data.readLongLong();
+    this.modified = data.readLongLong();
+    this.xMin = data.readShort();
+    this.yMin = data.readShort();
+    this.xMax = data.readShort();
+    this.yMax = data.readShort();
+    this.macStyle = data.readShort();
+    this.lowestRecPPEM = data.readShort();
+    this.fontDirectionHint = data.readShort();
+    this.indexToLocFormat = data.readShort();
+    return this.glyphDataFormat = data.readShort();
+  };
+
+  HeadTable.prototype.encode = function (indexToLocFormat) {
+    var table;
+    table = new Data();
+    table.writeInt(this.version);
+    table.writeInt(this.revision);
+    table.writeInt(this.checkSumAdjustment);
+    table.writeInt(this.magicNumber);
+    table.writeShort(this.flags);
+    table.writeShort(this.unitsPerEm);
+    table.writeLongLong(this.created);
+    table.writeLongLong(this.modified);
+    table.writeShort(this.xMin);
+    table.writeShort(this.yMin);
+    table.writeShort(this.xMax);
+    table.writeShort(this.yMax);
+    table.writeShort(this.macStyle);
+    table.writeShort(this.lowestRecPPEM);
+    table.writeShort(this.fontDirectionHint);
+    table.writeShort(indexToLocFormat);
+    table.writeShort(this.glyphDataFormat);
+    return table.data;
+  };
+
+  return HeadTable;
+}(Table);
+/************************************************************************************/
+
+/* function : CmapEntry                                                             */
+
+/* comment : Cmap Initializes and encodes object information (required by pdf spec).*/
+
+/************************************************************************************/
+
+
+var CmapEntry = function () {
+  function CmapEntry(data, offset) {
+    var code, count, endCode, glyphId, glyphIds, i, idDelta, idRangeOffset, index, saveOffset, segCount, segCountX2, start, startCode, tail, _j, _k, _len;
+
+    this.platformID = data.readUInt16();
+    this.encodingID = data.readShort();
+    this.offset = offset + data.readInt();
+    saveOffset = data.pos;
+    data.pos = this.offset;
+    this.format = data.readUInt16();
+    this.length = data.readUInt16();
+    this.language = data.readUInt16();
+    this.isUnicode = this.platformID === 3 && this.encodingID === 1 && this.format === 4 || this.platformID === 0 && this.format === 4;
+    this.codeMap = {};
+
+    switch (this.format) {
+      case 0:
+        for (i = 0; i < 256; ++i) {
+          this.codeMap[i] = data.readByte();
+        }
+
+        break;
+
+      case 4:
+        segCountX2 = data.readUInt16();
+        segCount = segCountX2 / 2;
+        data.pos += 6;
+
+        endCode = function () {
+          var _j, _results;
+
+          _results = [];
+
+          for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) {
+            _results.push(data.readUInt16());
+          }
+
+          return _results;
+        }();
+
+        data.pos += 2;
+
+        startCode = function () {
+          var _j, _results;
+
+          _results = [];
+
+          for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) {
+            _results.push(data.readUInt16());
+          }
+
+          return _results;
+        }();
+
+        idDelta = function () {
+          var _j, _results;
+
+          _results = [];
+
+          for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) {
+            _results.push(data.readUInt16());
+          }
+
+          return _results;
+        }();
+
+        idRangeOffset = function () {
+          var _j, _results;
+
+          _results = [];
+
+          for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) {
+            _results.push(data.readUInt16());
+          }
+
+          return _results;
+        }();
+
+        count = (this.length - data.pos + this.offset) / 2;
+
+        glyphIds = function () {
+          var _j, _results;
+
+          _results = [];
+
+          for (i = _j = 0; 0 <= count ? _j < count : _j > count; i = 0 <= count ? ++_j : --_j) {
+            _results.push(data.readUInt16());
+          }
+
+          return _results;
+        }();
+
+        for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {
+          tail = endCode[i];
+          start = startCode[i];
+
+          for (code = _k = start; start <= tail ? _k <= tail : _k >= tail; code = start <= tail ? ++_k : --_k) {
+            if (idRangeOffset[i] === 0) {
+              glyphId = code + idDelta[i];
+            } else {
+              index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);
+              glyphId = glyphIds[index] || 0;
+
+              if (glyphId !== 0) {
+                glyphId += idDelta[i];
+              }
+            }
+
+            this.codeMap[code] = glyphId & 0xffff;
+          }
+        }
+
+    }
+
+    data.pos = saveOffset;
+  }
+
+  CmapEntry.encode = function (charmap, encoding) {
+    var charMap, code, codeMap, codes, delta, deltas, diff, endCode, endCodes, entrySelector, glyphIDs, i, id, indexes, last, map, nextID, offset, old, rangeOffsets, rangeShift, searchRange, segCount, segCountX2, startCode, startCodes, startGlyph, subtable, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _len7, _m, _n, _name, _o, _p, _q;
+
+    subtable = new Data();
+    codes = Object.keys(charmap).sort(function (a, b) {
+      return a - b;
+    });
+
+    switch (encoding) {
+      case "macroman":
+        id = 0;
+
+        indexes = function () {
+          var _results = [];
+
+          for (i = 0; i < 256; ++i) {
+            _results.push(0);
+          }
+
+          return _results;
+        }();
+
+        map = {
+          0: 0
+        };
+        codeMap = {};
+
+        for (_i = 0, _len = codes.length; _i < _len; _i++) {
+          code = codes[_i];
+
+          if (map[_name = charmap[code]] == null) {
+            map[_name] = ++id;
+          }
+
+          codeMap[code] = {
+            old: charmap[code],
+            new: map[charmap[code]]
+          };
+          indexes[code] = map[charmap[code]];
+        }
+
+        subtable.writeUInt16(1);
+        subtable.writeUInt16(0);
+        subtable.writeUInt32(12);
+        subtable.writeUInt16(0);
+        subtable.writeUInt16(262);
+        subtable.writeUInt16(0);
+        subtable.write(indexes);
+        return {
+          charMap: codeMap,
+          subtable: subtable.data,
+          maxGlyphID: id + 1
+        };
+
+      case "unicode":
+        startCodes = [];
+        endCodes = [];
+        nextID = 0;
+        map = {};
+        charMap = {};
+        last = diff = null;
+
+        for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {
+          code = codes[_j];
+          old = charmap[code];
+
+          if (map[old] == null) {
+            map[old] = ++nextID;
+          }
+
+          charMap[code] = {
+            old: old,
+            new: map[old]
+          };
+          delta = map[old] - code;
+
+          if (last == null || delta !== diff) {
+            if (last) {
+              endCodes.push(last);
+            }
+
+            startCodes.push(code);
+            diff = delta;
+          }
+
+          last = code;
+        }
+
+        if (last) {
+          endCodes.push(last);
+        }
+
+        endCodes.push(0xffff);
+        startCodes.push(0xffff);
+        segCount = startCodes.length;
+        segCountX2 = segCount * 2;
+        searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);
+        entrySelector = Math.log(searchRange / 2) / Math.LN2;
+        rangeShift = 2 * segCount - searchRange;
+        deltas = [];
+        rangeOffsets = [];
+        glyphIDs = [];
+
+        for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {
+          startCode = startCodes[i];
+          endCode = endCodes[i];
+
+          if (startCode === 0xffff) {
+            deltas.push(0);
+            rangeOffsets.push(0);
+            break;
+          }
+
+          startGlyph = charMap[startCode]["new"];
+
+          if (startCode - startGlyph >= 0x8000) {
+            deltas.push(0);
+            rangeOffsets.push(2 * (glyphIDs.length + segCount - i));
+
+            for (code = _l = startCode; startCode <= endCode ? _l <= endCode : _l >= endCode; code = startCode <= endCode ? ++_l : --_l) {
+              glyphIDs.push(charMap[code]["new"]);
+            }
+          } else {
+            deltas.push(startGlyph - startCode);
+            rangeOffsets.push(0);
+          }
+        }
+
+        subtable.writeUInt16(3);
+        subtable.writeUInt16(1);
+        subtable.writeUInt32(12);
+        subtable.writeUInt16(4);
+        subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);
+        subtable.writeUInt16(0);
+        subtable.writeUInt16(segCountX2);
+        subtable.writeUInt16(searchRange);
+        subtable.writeUInt16(entrySelector);
+        subtable.writeUInt16(rangeShift);
+
+        for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {
+          code = endCodes[_m];
+          subtable.writeUInt16(code);
+        }
+
+        subtable.writeUInt16(0);
+
+        for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {
+          code = startCodes[_n];
+          subtable.writeUInt16(code);
+        }
+
+        for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {
+          delta = deltas[_o];
+          subtable.writeUInt16(delta);
+        }
+
+        for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {
+          offset = rangeOffsets[_p];
+          subtable.writeUInt16(offset);
+        }
+
+        for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {
+          id = glyphIDs[_q];
+          subtable.writeUInt16(id);
+        }
+
+        return {
+          charMap: charMap,
+          subtable: subtable.data,
+          maxGlyphID: nextID + 1
+        };
+    }
+  };
+
+  return CmapEntry;
+}();
+
+var CmapTable = function (_super) {
+  __extends(CmapTable, _super);
+
+  function CmapTable() {
+    return CmapTable.__super__.constructor.apply(this, arguments);
+  }
+
+  CmapTable.prototype.tag = "cmap";
+
+  CmapTable.prototype.parse = function (data) {
+    var entry, i, tableCount;
+    data.pos = this.offset;
+    this.version = data.readUInt16();
+    tableCount = data.readUInt16();
+    this.tables = [];
+    this.unicode = null;
+
+    for (i = 0; 0 <= tableCount ? i < tableCount : i > tableCount; i = 0 <= tableCount ? ++i : --i) {
+      entry = new CmapEntry(data, this.offset);
+      this.tables.push(entry);
+
+      if (entry.isUnicode) {
+        if (this.unicode == null) {
+          this.unicode = entry;
+        }
+      }
+    }
+
+    return true;
+  };
+  /*************************************************************************/
+
+  /* function : encode                                                     */
+
+  /* comment : Encode the cmap table corresponding to the input character. */
+
+  /*************************************************************************/
+
+
+  CmapTable.encode = function (charmap, encoding) {
+    var result, table;
+
+    if (encoding == null) {
+      encoding = "macroman";
+    }
+
+    result = CmapEntry.encode(charmap, encoding);
+    table = new Data();
+    table.writeUInt16(0);
+    table.writeUInt16(1);
+    result.table = table.data.concat(result.subtable);
+    return result;
+  };
+
+  return CmapTable;
+}(Table);
+
+var HheaTable = function (_super) {
+  __extends(HheaTable, _super);
+
+  function HheaTable() {
+    return HheaTable.__super__.constructor.apply(this, arguments);
+  }
+
+  HheaTable.prototype.tag = "hhea";
+
+  HheaTable.prototype.parse = function (data) {
+    data.pos = this.offset;
+    this.version = data.readInt();
+    this.ascender = data.readShort();
+    this.decender = data.readShort();
+    this.lineGap = data.readShort();
+    this.advanceWidthMax = data.readShort();
+    this.minLeftSideBearing = data.readShort();
+    this.minRightSideBearing = data.readShort();
+    this.xMaxExtent = data.readShort();
+    this.caretSlopeRise = data.readShort();
+    this.caretSlopeRun = data.readShort();
+    this.caretOffset = data.readShort();
+    data.pos += 4 * 2;
+    this.metricDataFormat = data.readShort();
+    return this.numberOfMetrics = data.readUInt16();
+  };
+  /*HheaTable.prototype.encode = function (ids) {
+            var i, table, _i, _ref;
+            table = new Data;
+            table.writeInt(this.version);
+            table.writeShort(this.ascender);
+            table.writeShort(this.decender);
+            table.writeShort(this.lineGap);
+            table.writeShort(this.advanceWidthMax);
+            table.writeShort(this.minLeftSideBearing);
+            table.writeShort(this.minRightSideBearing);
+            table.writeShort(this.xMaxExtent);
+            table.writeShort(this.caretSlopeRise);
+            table.writeShort(this.caretSlopeRun);
+            table.writeShort(this.caretOffset);
+            for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+                table.writeByte(0);
+            }
+            table.writeShort(this.metricDataFormat);
+            table.writeUInt16(ids.length);
+            return table.data;
+        };*/
+
+
+  return HheaTable;
+}(Table);
+
+var OS2Table = function (_super) {
+  __extends(OS2Table, _super);
+
+  function OS2Table() {
+    return OS2Table.__super__.constructor.apply(this, arguments);
+  }
+
+  OS2Table.prototype.tag = "OS/2";
+
+  OS2Table.prototype.parse = function (data) {
+    data.pos = this.offset;
+    this.version = data.readUInt16();
+    this.averageCharWidth = data.readShort();
+    this.weightClass = data.readUInt16();
+    this.widthClass = data.readUInt16();
+    this.type = data.readShort();
+    this.ySubscriptXSize = data.readShort();
+    this.ySubscriptYSize = data.readShort();
+    this.ySubscriptXOffset = data.readShort();
+    this.ySubscriptYOffset = data.readShort();
+    this.ySuperscriptXSize = data.readShort();
+    this.ySuperscriptYSize = data.readShort();
+    this.ySuperscriptXOffset = data.readShort();
+    this.ySuperscriptYOffset = data.readShort();
+    this.yStrikeoutSize = data.readShort();
+    this.yStrikeoutPosition = data.readShort();
+    this.familyClass = data.readShort();
+
+    this.panose = function () {
+      var i, _results;
+
+      _results = [];
+
+      for (i = 0; i < 10; ++i) {
+        _results.push(data.readByte());
+      }
+
+      return _results;
+    }();
+
+    this.charRange = function () {
+      var i, _results;
+
+      _results = [];
+
+      for (i = 0; i < 4; ++i) {
+        _results.push(data.readInt());
+      }
+
+      return _results;
+    }();
+
+    this.vendorID = data.readString(4);
+    this.selection = data.readShort();
+    this.firstCharIndex = data.readShort();
+    this.lastCharIndex = data.readShort();
+
+    if (this.version > 0) {
+      this.ascent = data.readShort();
+      this.descent = data.readShort();
+      this.lineGap = data.readShort();
+      this.winAscent = data.readShort();
+      this.winDescent = data.readShort();
+
+      this.codePageRange = function () {
+        var i, _results;
+
+        _results = [];
+
+        for (i = 0; i < 2; i = ++i) {
+          _results.push(data.readInt());
+        }
+
+        return _results;
+      }();
+
+      if (this.version > 1) {
+        this.xHeight = data.readShort();
+        this.capHeight = data.readShort();
+        this.defaultChar = data.readShort();
+        this.breakChar = data.readShort();
+        return this.maxContext = data.readShort();
+      }
+    }
+  };
+  /*OS2Table.prototype.encode = function () {
+            return this.raw();
+        };*/
+
+
+  return OS2Table;
+}(Table);
+
+var PostTable = function (_super) {
+
+  __extends(PostTable, _super);
+
+  function PostTable() {
+    return PostTable.__super__.constructor.apply(this, arguments);
+  }
+
+  PostTable.prototype.tag = "post";
+
+  PostTable.prototype.parse = function (data) {
+    var length, numberOfGlyphs, _results;
+
+    data.pos = this.offset;
+    this.format = data.readInt();
+    this.italicAngle = data.readInt();
+    this.underlinePosition = data.readShort();
+    this.underlineThickness = data.readShort();
+    this.isFixedPitch = data.readInt();
+    this.minMemType42 = data.readInt();
+    this.maxMemType42 = data.readInt();
+    this.minMemType1 = data.readInt();
+    this.maxMemType1 = data.readInt();
+
+    switch (this.format) {
+      case 0x00010000:
+        break;
+
+      case 0x00020000:
+        numberOfGlyphs = data.readUInt16();
+        this.glyphNameIndex = [];
+        var i;
+
+        for (i = 0; 0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs; i = 0 <= numberOfGlyphs ? ++i : --i) {
+          this.glyphNameIndex.push(data.readUInt16());
+        }
+
+        this.names = [];
+        _results = [];
+
+        while (data.pos < this.offset + this.length) {
+          length = data.readByte();
+
+          _results.push(this.names.push(data.readString(length)));
+        }
+
+        return _results;
+
+      case 0x00025000:
+        numberOfGlyphs = data.readUInt16();
+        return this.offsets = data.read(numberOfGlyphs);
+
+      case 0x00030000:
+        break;
+
+      case 0x00040000:
+        return this.map = function () {
+          var _j, _ref, _results1;
+
+          _results1 = [];
+
+          for (i = _j = 0, _ref = this.file.maxp.numGlyphs; 0 <= _ref ? _j < _ref : _j > _ref; i = 0 <= _ref ? ++_j : --_j) {
+            _results1.push(data.readUInt32());
+          }
+
+          return _results1;
+        }.call(this);
+    }
+  };
+  return PostTable;
+}(Table);
+/*********************************************************************************************************/
+
+/* function : NameEntry                                                                                  */
+
+/* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/
+
+/*********************************************************************************************************/
+
+
+var NameEntry = function () {
+  function NameEntry(raw, entry) {
+    this.raw = raw;
+    this.length = raw.length;
+    this.platformID = entry.platformID;
+    this.encodingID = entry.encodingID;
+    this.languageID = entry.languageID;
+  }
+
+  return NameEntry;
+}();
+
+var NameTable = function (_super) {
+
+  __extends(NameTable, _super);
+
+  function NameTable() {
+    return NameTable.__super__.constructor.apply(this, arguments);
+  }
+
+  NameTable.prototype.tag = "name";
+
+  NameTable.prototype.parse = function (data) {
+    var count, entries, entry, i, name, stringOffset, strings, text, _j, _len, _name;
+
+    data.pos = this.offset;
+    data.readShort(); //format
+
+    count = data.readShort();
+    stringOffset = data.readShort();
+    entries = [];
+
+    for (i = 0; 0 <= count ? i < count : i > count; i = 0 <= count ? ++i : --i) {
+      entries.push({
+        platformID: data.readShort(),
+        encodingID: data.readShort(),
+        languageID: data.readShort(),
+        nameID: data.readShort(),
+        length: data.readShort(),
+        offset: this.offset + stringOffset + data.readShort()
+      });
+    }
+
+    strings = {};
+
+    for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {
+      entry = entries[i];
+      data.pos = entry.offset;
+      text = data.readString(entry.length);
+      name = new NameEntry(text, entry);
+
+      if (strings[_name = entry.nameID] == null) {
+        strings[_name] = [];
+      }
+
+      strings[entry.nameID].push(name);
+    }
+
+    this.strings = strings;
+    this.copyright = strings[0];
+    this.fontFamily = strings[1];
+    this.fontSubfamily = strings[2];
+    this.uniqueSubfamily = strings[3];
+    this.fontName = strings[4];
+    this.version = strings[5];
+
+    try {
+      this.postscriptName = strings[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g, "");
+    } catch (e) {
+      this.postscriptName = strings[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g, "");
+    }
+
+    this.trademark = strings[7];
+    this.manufacturer = strings[8];
+    this.designer = strings[9];
+    this.description = strings[10];
+    this.vendorUrl = strings[11];
+    this.designerUrl = strings[12];
+    this.license = strings[13];
+    this.licenseUrl = strings[14];
+    this.preferredFamily = strings[15];
+    this.preferredSubfamily = strings[17];
+    this.compatibleFull = strings[18];
+    return this.sampleText = strings[19];
+  };
+  /*NameTable.prototype.encode = function () {
+            var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;
+            strings = {};
+            _ref = this.strings;
+            for (id in _ref) {
+                val = _ref[id];
+                strings[id] = val;
+            }
+            postscriptName = new NameEntry("" + subsetTag + "+" + this.postscriptName, {
+                platformID: 1
+                , encodingID: 0
+                , languageID: 0
+            });
+            strings[6] = [postscriptName];
+            subsetTag = successorOf(subsetTag);
+            strCount = 0;
+            for (id in strings) {
+                list = strings[id];
+                if (list != null) {
+                    strCount += list.length;
+                }
+            }
+            table = new Data;
+            strTable = new Data;
+            table.writeShort(0);
+            table.writeShort(strCount);
+            table.writeShort(6 + 12 * strCount);
+            for (nameID in strings) {
+                list = strings[nameID];
+                if (list != null) {
+                    for (_i = 0, _len = list.length; _i < _len; _i++) {
+                        string = list[_i];
+                        table.writeShort(string.platformID);
+                        table.writeShort(string.encodingID);
+                        table.writeShort(string.languageID);
+                        table.writeShort(nameID);
+                        table.writeShort(string.length);
+                        table.writeShort(strTable.pos);
+                        strTable.writeString(string.raw);
+                    }
+                }
+            }
+            return nameTable = {
+                postscriptName: postscriptName.raw
+                , table: table.data.concat(strTable.data)
+            };
+        };*/
+
+  return NameTable;
+}(Table);
+
+var MaxpTable = function (_super) {
+  __extends(MaxpTable, _super);
+
+  function MaxpTable() {
+    return MaxpTable.__super__.constructor.apply(this, arguments);
+  }
+
+  MaxpTable.prototype.tag = "maxp";
+
+  MaxpTable.prototype.parse = function (data) {
+    data.pos = this.offset;
+    this.version = data.readInt();
+    this.numGlyphs = data.readUInt16();
+    this.maxPoints = data.readUInt16();
+    this.maxContours = data.readUInt16();
+    this.maxCompositePoints = data.readUInt16();
+    this.maxComponentContours = data.readUInt16();
+    this.maxZones = data.readUInt16();
+    this.maxTwilightPoints = data.readUInt16();
+    this.maxStorage = data.readUInt16();
+    this.maxFunctionDefs = data.readUInt16();
+    this.maxInstructionDefs = data.readUInt16();
+    this.maxStackElements = data.readUInt16();
+    this.maxSizeOfInstructions = data.readUInt16();
+    this.maxComponentElements = data.readUInt16();
+    return this.maxComponentDepth = data.readUInt16();
+  };
+  /*MaxpTable.prototype.encode = function (ids) {
+            var table;
+            table = new Data;
+            table.writeInt(this.version);
+            table.writeUInt16(ids.length);
+            table.writeUInt16(this.maxPoints);
+            table.writeUInt16(this.maxContours);
+            table.writeUInt16(this.maxCompositePoints);
+            table.writeUInt16(this.maxComponentContours);
+            table.writeUInt16(this.maxZones);
+            table.writeUInt16(this.maxTwilightPoints);
+            table.writeUInt16(this.maxStorage);
+            table.writeUInt16(this.maxFunctionDefs);
+            table.writeUInt16(this.maxInstructionDefs);
+            table.writeUInt16(this.maxStackElements);
+            table.writeUInt16(this.maxSizeOfInstructions);
+            table.writeUInt16(this.maxComponentElements);
+            table.writeUInt16(this.maxComponentDepth);
+            return table.data;
+        };*/
+
+
+  return MaxpTable;
+}(Table);
+
+var HmtxTable = function (_super) {
+  __extends(HmtxTable, _super);
+
+  function HmtxTable() {
+    return HmtxTable.__super__.constructor.apply(this, arguments);
+  }
+
+  HmtxTable.prototype.tag = "hmtx";
+
+  HmtxTable.prototype.parse = function (data) {
+    var i, last, lsbCount, m, _j, _ref, _results;
+
+    data.pos = this.offset;
+    this.metrics = [];
+
+    for (i = 0, _ref = this.file.hhea.numberOfMetrics; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) {
+      this.metrics.push({
+        advance: data.readUInt16(),
+        lsb: data.readInt16()
+      });
+    }
+
+    lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;
+
+    this.leftSideBearings = function () {
+      var _j, _results;
+
+      _results = [];
+
+      for (i = _j = 0; 0 <= lsbCount ? _j < lsbCount : _j > lsbCount; i = 0 <= lsbCount ? ++_j : --_j) {
+        _results.push(data.readInt16());
+      }
+
+      return _results;
+    }();
+
+    this.widths = function () {
+      var _j, _len, _ref1, _results;
+
+      _ref1 = this.metrics;
+      _results = [];
+
+      for (_j = 0, _len = _ref1.length; _j < _len; _j++) {
+        m = _ref1[_j];
+
+        _results.push(m.advance);
+      }
+
+      return _results;
+    }.call(this);
+
+    last = this.widths[this.widths.length - 1];
+    _results = [];
+
+    for (i = _j = 0; 0 <= lsbCount ? _j < lsbCount : _j > lsbCount; i = 0 <= lsbCount ? ++_j : --_j) {
+      _results.push(this.widths.push(last));
+    }
+
+    return _results;
+  };
+  /***************************************************************/
+
+  /* function : forGlyph                                         */
+
+  /* comment : Returns the advance width and lsb for this glyph. */
+
+  /***************************************************************/
+
+
+  HmtxTable.prototype.forGlyph = function (id) {
+    if (id in this.metrics) {
+      return this.metrics[id];
+    }
+
+    return {
+      advance: this.metrics[this.metrics.length - 1].advance,
+      lsb: this.leftSideBearings[id - this.metrics.length]
+    };
+  };
+  /*HmtxTable.prototype.encode = function (mapping) {
+            var id, metric, table, _i, _len;
+            table = new Data;
+            for (_i = 0, _len = mapping.length; _i < _len; _i++) {
+                id = mapping[_i];
+                metric = this.forGlyph(id);
+                table.writeUInt16(metric.advance);
+                table.writeUInt16(metric.lsb);
+            }
+            return table.data;
+        };*/
+
+
+  return HmtxTable;
+}(Table);
+
+var __slice = [].slice;
+
+var GlyfTable = function (_super) {
+  __extends(GlyfTable, _super);
+
+  function GlyfTable() {
+    return GlyfTable.__super__.constructor.apply(this, arguments);
+  }
+
+  GlyfTable.prototype.tag = "glyf";
+
+  GlyfTable.prototype.parse = function () {
+    return this.cache = {};
+  };
+
+  GlyfTable.prototype.glyphFor = function (id) {
+    var data, index, length, loca, numberOfContours, raw, xMax, xMin, yMax, yMin;
+
+    if (id in this.cache) {
+      return this.cache[id];
+    }
+
+    loca = this.file.loca;
+    data = this.file.contents;
+    index = loca.indexOf(id);
+    length = loca.lengthOf(id);
+
+    if (length === 0) {
+      return this.cache[id] = null;
+    }
+
+    data.pos = this.offset + index;
+    raw = new Data(data.read(length));
+    numberOfContours = raw.readShort();
+    xMin = raw.readShort();
+    yMin = raw.readShort();
+    xMax = raw.readShort();
+    yMax = raw.readShort();
+
+    if (numberOfContours === -1) {
+      this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);
+    } else {
+      this.cache[id] = new SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax);
+    }
+
+    return this.cache[id];
+  };
+
+  GlyfTable.prototype.encode = function (glyphs, mapping, old2new) {
+    var glyph, id, offsets, table, _i, _len;
+
+    table = [];
+    offsets = [];
+
+    for (_i = 0, _len = mapping.length; _i < _len; _i++) {
+      id = mapping[_i];
+      glyph = glyphs[id];
+      offsets.push(table.length);
+
+      if (glyph) {
+        table = table.concat(glyph.encode(old2new));
+      }
+    }
+
+    offsets.push(table.length);
+    return {
+      table: table,
+      offsets: offsets
+    };
+  };
+
+  return GlyfTable;
+}(Table);
+
+var SimpleGlyph = function () {
+  /**************************************************************************/
+
+  /* function : SimpleGlyph                                                 */
+
+  /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/
+
+  /**************************************************************************/
+  function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {
+    this.raw = raw;
+    this.numberOfContours = numberOfContours;
+    this.xMin = xMin;
+    this.yMin = yMin;
+    this.xMax = xMax;
+    this.yMax = yMax;
+    this.compound = false;
+  }
+
+  SimpleGlyph.prototype.encode = function () {
+    return this.raw.data;
+  };
+
+  return SimpleGlyph;
+}();
+
+var CompoundGlyph = function () {
+  var ARG_1_AND_2_ARE_WORDS, MORE_COMPONENTS, WE_HAVE_AN_X_AND_Y_SCALE, WE_HAVE_A_SCALE, WE_HAVE_A_TWO_BY_TWO;
+  ARG_1_AND_2_ARE_WORDS = 0x0001;
+  WE_HAVE_A_SCALE = 0x0008;
+  MORE_COMPONENTS = 0x0020;
+  WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;
+  WE_HAVE_A_TWO_BY_TWO = 0x0080;
+  /********************************************************************************************************************/
+
+  /* function : CompoundGlypg generator                                                                               */
+
+  /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/
+
+  /********************************************************************************************************************/
+
+  function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {
+    var data, flags;
+    this.raw = raw;
+    this.xMin = xMin;
+    this.yMin = yMin;
+    this.xMax = xMax;
+    this.yMax = yMax;
+    this.compound = true;
+    this.glyphIDs = [];
+    this.glyphOffsets = [];
+    data = this.raw;
+
+    while (true) {
+      flags = data.readShort();
+      this.glyphOffsets.push(data.pos);
+      this.glyphIDs.push(data.readUInt16());
+
+      if (!(flags & MORE_COMPONENTS)) {
+        break;
+      }
+
+      if (flags & ARG_1_AND_2_ARE_WORDS) {
+        data.pos += 4;
+      } else {
+        data.pos += 2;
+      }
+
+      if (flags & WE_HAVE_A_TWO_BY_TWO) {
+        data.pos += 8;
+      } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {
+        data.pos += 4;
+      } else if (flags & WE_HAVE_A_SCALE) {
+        data.pos += 2;
+      }
+    }
+  }
+  /****************************************************************************************************************/
+
+  /* function : CompoundGlypg encode                                                                              */
+
+  /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/
+
+  /****************************************************************************************************************/
+
+
+  CompoundGlyph.prototype.encode = function () {
+    var i, result, _len, _ref;
+
+    result = new Data(__slice.call(this.raw.data));
+    _ref = this.glyphIDs;
+
+    for (i = 0, _len = _ref.length; i < _len; ++i) {
+      result.pos = this.glyphOffsets[i];
+    }
+
+    return result.data;
+  };
+
+  return CompoundGlyph;
+}();
+
+var LocaTable = function (_super) {
+  __extends(LocaTable, _super);
+
+  function LocaTable() {
+    return LocaTable.__super__.constructor.apply(this, arguments);
+  }
+
+  LocaTable.prototype.tag = "loca";
+
+  LocaTable.prototype.parse = function (data) {
+    var format, i;
+    data.pos = this.offset;
+    format = this.file.head.indexToLocFormat;
+
+    if (format === 0) {
+      return this.offsets = function () {
+        var _ref, _results;
+
+        _results = [];
+
+        for (i = 0, _ref = this.length; i < _ref; i += 2) {
+          _results.push(data.readUInt16() * 2);
+        }
+
+        return _results;
+      }.call(this);
+    } else {
+      return this.offsets = function () {
+        var _ref, _results;
+
+        _results = [];
+
+        for (i = 0, _ref = this.length; i < _ref; i += 4) {
+          _results.push(data.readUInt32());
+        }
+
+        return _results;
+      }.call(this);
+    }
+  };
+
+  LocaTable.prototype.indexOf = function (id) {
+    return this.offsets[id];
+  };
+
+  LocaTable.prototype.lengthOf = function (id) {
+    return this.offsets[id + 1] - this.offsets[id];
+  };
+
+  LocaTable.prototype.encode = function (offsets, activeGlyphs) {
+    var LocaTable = new Uint32Array(this.offsets.length);
+    var glyfPtr = 0;
+    var listGlyf = 0;
+
+    for (var k = 0; k < LocaTable.length; ++k) {
+      LocaTable[k] = glyfPtr;
+
+      if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {
+        ++listGlyf;
+        LocaTable[k] = glyfPtr;
+        var start = this.offsets[k];
+        var len = this.offsets[k + 1] - start;
+
+        if (len > 0) {
+          glyfPtr += len;
+        }
+      }
+    }
+
+    var newLocaTable = new Array(LocaTable.length * 4);
+
+    for (var j = 0; j < LocaTable.length; ++j) {
+      newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;
+      newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;
+      newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;
+      newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;
+    }
+
+    return newLocaTable;
+  };
+
+  return LocaTable;
+}(Table);
+/************************************************************************************/
+
+/* function : invert                                                                */
+
+/* comment : Change the object's (key: value) to create an object with (value: key).*/
+
+/************************************************************************************/
+
+
+var invert = function invert(object) {
+  var key, ret, val;
+  ret = {};
+
+  for (key in object) {
+    val = object[key];
+    ret[val] = key;
+  }
+
+  return ret;
+};
+/*var successorOf = function (input) {
+        var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;
+        alphabet = 'abcdefghijklmnopqrstuvwxyz';
+        length = alphabet.length;
+        result = input;
+        i = input.length;
+        while (i >= 0) {
+            last = input.charAt(--i);
+            if (isNaN(last)) {
+                index = alphabet.indexOf(last.toLowerCase());
+                if (index === -1) {
+                    next = last;
+                    carry = true;
+                }
+                else {
+                    next = alphabet.charAt((index + 1) % length);
+                    isUpperCase = last === last.toUpperCase();
+                    if (isUpperCase) {
+                        next = next.toUpperCase();
+                    }
+                    carry = index + 1 >= length;
+                    if (carry && i === 0) {
+                        added = isUpperCase ? 'A' : 'a';
+                        result = added + next + result.slice(1);
+                        break;
+                    }
+                }
+            }
+            else {
+                next = +last + 1;
+                carry = next > 9;
+                if (carry) {
+                    next = 0;
+                }
+                if (carry && i === 0) {
+                    result = '1' + next + result.slice(1);
+                    break;
+                }
+            }
+            result = result.slice(0, i) + next + result.slice(i + 1);
+            if (!carry) {
+                break;
+            }
+        }
+        return result;
+    };*/
+
+
+var Subset = function () {
+  function Subset(font) {
+    this.font = font;
+    this.subset = {};
+    this.unicodes = {};
+    this.next = 33;
+  }
+  /*Subset.prototype.use = function (character) {
+            var i, _i, _ref;
+            if (typeof character === 'string') {
+                for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+                    this.use(character.charCodeAt(i));
+                }
+                return;
+            }
+            if (!this.unicodes[character]) {
+                this.subset[this.next] = character;
+                return this.unicodes[character] = this.next++;
+            }
+        };*/
+
+  /*Subset.prototype.encodeText = function (text) {
+            var char, i, string, _i, _ref;
+            string = '';
+            for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+                char = this.unicodes[text.charCodeAt(i)];
+                string += String.fromCharCode(char);
+            }
+            return string;
+        };*/
+
+  /***************************************************************/
+
+  /* function : generateCmap                                     */
+
+  /* comment : Returns the unicode cmap for this font.         */
+
+  /***************************************************************/
+
+
+  Subset.prototype.generateCmap = function () {
+    var mapping, roman, unicode, unicodeCmap, _ref;
+
+    unicodeCmap = this.font.cmap.tables[0].codeMap;
+    mapping = {};
+    _ref = this.subset;
+
+    for (roman in _ref) {
+      unicode = _ref[roman];
+      mapping[roman] = unicodeCmap[unicode];
+    }
+
+    return mapping;
+  };
+  /*Subset.prototype.glyphIDs = function () {
+            var ret, roman, unicode, unicodeCmap, val, _ref;
+            unicodeCmap = this.font.cmap.tables[0].codeMap;
+            ret = [0];
+            _ref = this.subset;
+            for (roman in _ref) {
+                unicode = _ref[roman];
+                val = unicodeCmap[unicode];
+                if ((val != null) && __indexOf.call(ret, val) < 0) {
+                    ret.push(val);
+                }
+            }
+            return ret.sort();
+        };*/
+
+  /******************************************************************/
+
+  /* function : glyphsFor                                           */
+
+  /* comment : Returns simple glyph objects for the input character.*/
+
+  /******************************************************************/
+
+
+  Subset.prototype.glyphsFor = function (glyphIDs) {
+    var additionalIDs, glyph, glyphs, id, _i, _len, _ref;
+
+    glyphs = {};
+
+    for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {
+      id = glyphIDs[_i];
+      glyphs[id] = this.font.glyf.glyphFor(id);
+    }
+
+    additionalIDs = [];
+
+    for (id in glyphs) {
+      glyph = glyphs[id];
+
+      if (glyph != null ? glyph.compound : void 0) {
+        additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);
+      }
+    }
+
+    if (additionalIDs.length > 0) {
+      _ref = this.glyphsFor(additionalIDs);
+
+      for (id in _ref) {
+        glyph = _ref[id];
+        glyphs[id] = glyph;
+      }
+    }
+
+    return glyphs;
+  };
+  /***************************************************************/
+
+  /* function : encode                                           */
+
+  /* comment : Encode various tables for the characters you use. */
+
+  /***************************************************************/
+
+
+  Subset.prototype.encode = function (glyID, indexToLocFormat) {
+    var cmap, code, glyf, glyphs, id, ids, loca, new2old, newIDs, nextGlyphID, old2new, oldID, oldIDs, tables, _ref;
+
+    cmap = CmapTable.encode(this.generateCmap(), "unicode");
+    glyphs = this.glyphsFor(glyID);
+    old2new = {
+      0: 0
+    };
+    _ref = cmap.charMap;
+
+    for (code in _ref) {
+      ids = _ref[code];
+      old2new[ids.old] = ids["new"];
+    }
+
+    nextGlyphID = cmap.maxGlyphID;
+
+    for (oldID in glyphs) {
+      if (!(oldID in old2new)) {
+        old2new[oldID] = nextGlyphID++;
+      }
+    }
+
+    new2old = invert(old2new);
+    newIDs = Object.keys(new2old).sort(function (a, b) {
+      return a - b;
+    });
+
+    oldIDs = function () {
+      var _i, _len, _results;
+
+      _results = [];
+
+      for (_i = 0, _len = newIDs.length; _i < _len; _i++) {
+        id = newIDs[_i];
+
+        _results.push(new2old[id]);
+      }
+
+      return _results;
+    }();
+
+    glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);
+    loca = this.font.loca.encode(glyf.offsets, oldIDs);
+    tables = {
+      cmap: this.font.cmap.raw(),
+      glyf: glyf.table,
+      loca: loca,
+      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(indexToLocFormat)
+    };
+
+    if (this.font.os2.exists) {
+      tables["OS/2"] = this.font.os2.raw();
+    }
+
+    return this.font.directory.encode(tables);
+  };
+
+  return Subset;
+}();
+
+jsPDF.API.PDFObject = function () {
+  var pad;
+
+  function PDFObject() {}
+
+  pad = function pad(str, length) {
+    return (Array(length + 1).join("0") + str).slice(-length);
+  };
+  /*****************************************************************************/
+
+  /* function : convert                                                        */
+
+  /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */
+
+  /*****************************************************************************/
+
+
+  PDFObject.convert = function (object) {
+    var e, items, key, out, val;
+
+    if (Array.isArray(object)) {
+      items = function () {
+        var _i, _len, _results;
+
+        _results = [];
+
+        for (_i = 0, _len = object.length; _i < _len; _i++) {
+          e = object[_i];
+
+          _results.push(PDFObject.convert(e));
+        }
+
+        return _results;
+      }().join(" ");
+
+      return "[" + items + "]";
+    } else if (typeof object === "string") {
+      return "/" + object;
+    } else if (object != null ? object.isString : void 0) {
+      return "(" + object + ")";
+    } else if (object instanceof Date) {
+      return "(D:" + pad(object.getUTCFullYear(), 4) + pad(object.getUTCMonth(), 2) + pad(object.getUTCDate(), 2) + pad(object.getUTCHours(), 2) + pad(object.getUTCMinutes(), 2) + pad(object.getUTCSeconds(), 2) + "Z)";
+    } else if ({}.toString.call(object) === "[object Object]") {
+      out = ["<<"];
+
+      for (key in object) {
+        val = object[key];
+        out.push("/" + key + " " + PDFObject.convert(val));
+      }
+
+      out.push(">>");
+      return out.join("\n");
+    } else {
+      return "" + object;
+    }
+  };
+
+  return PDFObject;
+}();
+
+export default jsPDF;
+export { AcroForm, AcroFormAppearance, AcroFormButton, AcroFormCheckBox, AcroFormChoiceField, AcroFormComboBox, AcroFormEditBox, AcroFormListBox, AcroFormPasswordField, AcroFormPushButton, AcroFormRadioButton, AcroFormTextField, GState, ShadingPattern, TilingPattern, jsPDF };
+//# sourceMappingURL=jspdf.es.js.map
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.es.js.map
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.es.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.es.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"jspdf.es.js","sources":["../src/libs/globalObject.js","../src/libs/console.js","../src/libs/FileSaver.js","../src/libs/rgbcolor.js","../src/libs/AtobBtoa.js","../src/libs/md5.js","../src/libs/rc4.js","../src/libs/pdfsecurity.js","../src/libs/pdfname.js","../src/jspdf.js","../src/modules/acroform.js","../src/modules/addimage.js","../src/modules/annotations.js","../src/modules/arabic.js","../src/modules/autoprint.js","../src/modules/canvas.js","../src/modules/cell.js","../src/libs/fontFace.js","../src/modules/context2d.js","../src/modules/filters.js","../src/modules/fileloading.js","../src/modules/html.js","../src/modules/javascript.js","../src/modules/outline.js","../src/modules/jpeg_support.js","../src/libs/png.js","../src/modules/png_support.js","../src/libs/omggif.js","../src/libs/JPEGEncoder.js","../src/modules/gif_support.js","../src/libs/BMPDecoder.js","../src/modules/bmp_support.js","../src/libs/WebPDecoder.js","../src/modules/webp_support.js","../src/modules/rgba_support.js","../src/modules/setlanguage.js","../src/modules/split_text_to_size.js","../src/modules/standard_fonts_metrics.js","../src/modules/ttfsupport.js","../src/modules/svg.js","../src/modules/total_pages.js","../src/modules/viewerpreferences.js","../src/modules/xmp_metadata.js","../src/modules/utf8.js","../src/modules/vfs.js","../src/libs/bidiEngine.js","../src/libs/ttffont.js"],"sourcesContent":["export var globalObject = (function() {\n  return \"undefined\" !== typeof window\n    ? window\n    : \"undefined\" !== typeof global\n    ? global\n    : \"undefined\" !== typeof self\n    ? self\n    : this;\n})();\n","import { globalObject } from \"./globalObject.js\";\n\nfunction consoleLog() {\n  if (globalObject.console && typeof globalObject.console.log === \"function\") {\n    globalObject.console.log.apply(globalObject.console, arguments);\n  }\n}\n\nfunction consoleWarn(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.warn === \"function\") {\n      globalObject.console.warn.apply(globalObject.console, arguments);\n    } else {\n      consoleLog.call(null, arguments);\n    }\n  }\n}\n\nfunction consoleError(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.error === \"function\") {\n      globalObject.console.error.apply(globalObject.console, arguments);\n    } else {\n      consoleLog(str);\n    }\n  }\n}\nexport var console = {\n  log: consoleLog,\n  warn: consoleWarn,\n  error: consoleError\n};\n","/**\n * @license\n * FileSaver.js\n * A saveAs() FileSaver implementation.\n *\n * By Eli Grey, http://eligrey.com\n *\n * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)\n * source  : http://purl.eligrey.com/github/FileSaver.js\n */\n\nimport { globalObject as _global } from \"./globalObject.js\";\nimport { console } from \"./console.js\";\n\nfunction bom(blob, opts) {\n  if (typeof opts === \"undefined\") opts = { autoBom: false };\n  else if (typeof opts !== \"object\") {\n    console.warn(\"Deprecated: Expected third argument to be a object\");\n    opts = { autoBom: !opts };\n  }\n\n  // prepend BOM for UTF-8 XML and text/* types (including HTML)\n  // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n  if (\n    opts.autoBom &&\n    /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(\n      blob.type\n    )\n  ) {\n    return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n  }\n  return blob;\n}\n\nfunction download(url, name, opts) {\n  var xhr = new XMLHttpRequest();\n  xhr.open(\"GET\", url);\n  xhr.responseType = \"blob\";\n  xhr.onload = function() {\n    saveAs(xhr.response, name, opts);\n  };\n  xhr.onerror = function() {\n    console.error(\"could not download file\");\n  };\n  xhr.send();\n}\n\nfunction corsEnabled(url) {\n  var xhr = new XMLHttpRequest();\n  // use sync to avoid popup blocker\n  xhr.open(\"HEAD\", url, false);\n  try {\n    xhr.send();\n  } catch (e) {}\n  return xhr.status >= 200 && xhr.status <= 299;\n}\n\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n  try {\n    node.dispatchEvent(new MouseEvent(\"click\"));\n  } catch (e) {\n    var evt = document.createEvent(\"MouseEvents\");\n    evt.initMouseEvent(\n      \"click\",\n      true,\n      true,\n      window,\n      0,\n      0,\n      0,\n      80,\n      20,\n      false,\n      false,\n      false,\n      false,\n      0,\n      null\n    );\n    node.dispatchEvent(evt);\n  }\n}\n\nvar saveAs =\n  _global.saveAs ||\n  // probably in some web worker\n  (typeof window !== \"object\" || window !== _global\n    ? function saveAs() {\n        /* noop */\n      }\n    : // Use download attribute first if possible (#193 Lumia mobile) unless this is a native app\n    typeof HTMLAnchorElement !== \"undefined\" &&\n      \"download\" in HTMLAnchorElement.prototype\n    ? function saveAs(blob, name, opts) {\n        var URL = _global.URL || _global.webkitURL;\n        var a = document.createElement(\"a\");\n        name = name || blob.name || \"download\";\n\n        a.download = name;\n        a.rel = \"noopener\"; // tabnabbing\n\n        // TODO: detect chrome extensions & packaged apps\n        // a.target = '_blank'\n\n        if (typeof blob === \"string\") {\n          // Support regular links\n          a.href = blob;\n          if (a.origin !== location.origin) {\n            corsEnabled(a.href)\n              ? download(blob, name, opts)\n              : click(a, (a.target = \"_blank\"));\n          } else {\n            click(a);\n          }\n        } else {\n          // Support blobs\n          a.href = URL.createObjectURL(blob);\n          setTimeout(function() {\n            URL.revokeObjectURL(a.href);\n          }, 4e4); // 40s\n          setTimeout(function() {\n            click(a);\n          }, 0);\n        }\n      }\n    : // Use msSaveOrOpenBlob as a second approach\n    \"msSaveOrOpenBlob\" in navigator\n    ? function saveAs(blob, name, opts) {\n        name = name || blob.name || \"download\";\n\n        if (typeof blob === \"string\") {\n          if (corsEnabled(blob)) {\n            download(blob, name, opts);\n          } else {\n            var a = document.createElement(\"a\");\n            a.href = blob;\n            a.target = \"_blank\";\n            setTimeout(function() {\n              click(a);\n            });\n          }\n        } else {\n          navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n        }\n      }\n    : // Fallback to using FileReader and a popup\n      function saveAs(blob, name, opts, popup) {\n        // Open a popup immediately do go around popup blocker\n        // Mostly only available on user interaction and the fileReader is async so...\n        popup = popup || open(\"\", \"_blank\");\n        if (popup) {\n          popup.document.title = popup.document.body.innerText =\n            \"downloading...\";\n        }\n\n        if (typeof blob === \"string\") return download(blob, name, opts);\n\n        var force = blob.type === \"application/octet-stream\";\n        var isSafari =\n          /constructor/i.test(_global.HTMLElement) || _global.safari;\n        var isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n\n        if (\n          (isChromeIOS || (force && isSafari)) &&\n          typeof FileReader === \"object\"\n        ) {\n          // Safari doesn't allow downloading of blob URLs\n          var reader = new FileReader();\n          reader.onloadend = function() {\n            var url = reader.result;\n            url = isChromeIOS\n              ? url\n              : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n            if (popup) popup.location.href = url;\n            else location = url;\n            popup = null; // reverse-tabnabbing #460\n          };\n          reader.readAsDataURL(blob);\n        } else {\n          var URL = _global.URL || _global.webkitURL;\n          var url = URL.createObjectURL(blob);\n          if (popup) popup.location = url;\n          else location.href = url;\n          popup = null; // reverse-tabnabbing #460\n          setTimeout(function() {\n            URL.revokeObjectURL(url);\n          }, 4e4); // 40s\n        }\n      });\n\nexport { saveAs };\n","/**\n * A class to parse color values\n * @author Stoyan Stefanov <sstoo@gmail.com>\n * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}\n * @license Use it if you like it\n */\n\nfunction RGBColor(color_string) {\n  color_string = color_string || \"\";\n  this.ok = false;\n\n  // strip any leading #\n  if (color_string.charAt(0) == \"#\") {\n    // remove # if any\n    color_string = color_string.substr(1, 6);\n  }\n\n  color_string = color_string.replace(/ /g, \"\");\n  color_string = color_string.toLowerCase();\n\n  var channels;\n\n  // before getting into regexps, try simple matches\n  // and overwrite the input\n  var simple_colors = {\n    aliceblue: \"f0f8ff\",\n    antiquewhite: \"faebd7\",\n    aqua: \"00ffff\",\n    aquamarine: \"7fffd4\",\n    azure: \"f0ffff\",\n    beige: \"f5f5dc\",\n    bisque: \"ffe4c4\",\n    black: \"000000\",\n    blanchedalmond: \"ffebcd\",\n    blue: \"0000ff\",\n    blueviolet: \"8a2be2\",\n    brown: \"a52a2a\",\n    burlywood: \"deb887\",\n    cadetblue: \"5f9ea0\",\n    chartreuse: \"7fff00\",\n    chocolate: \"d2691e\",\n    coral: \"ff7f50\",\n    cornflowerblue: \"6495ed\",\n    cornsilk: \"fff8dc\",\n    crimson: \"dc143c\",\n    cyan: \"00ffff\",\n    darkblue: \"00008b\",\n    darkcyan: \"008b8b\",\n    darkgoldenrod: \"b8860b\",\n    darkgray: \"a9a9a9\",\n    darkgreen: \"006400\",\n    darkkhaki: \"bdb76b\",\n    darkmagenta: \"8b008b\",\n    darkolivegreen: \"556b2f\",\n    darkorange: \"ff8c00\",\n    darkorchid: \"9932cc\",\n    darkred: \"8b0000\",\n    darksalmon: \"e9967a\",\n    darkseagreen: \"8fbc8f\",\n    darkslateblue: \"483d8b\",\n    darkslategray: \"2f4f4f\",\n    darkturquoise: \"00ced1\",\n    darkviolet: \"9400d3\",\n    deeppink: \"ff1493\",\n    deepskyblue: \"00bfff\",\n    dimgray: \"696969\",\n    dodgerblue: \"1e90ff\",\n    feldspar: \"d19275\",\n    firebrick: \"b22222\",\n    floralwhite: \"fffaf0\",\n    forestgreen: \"228b22\",\n    fuchsia: \"ff00ff\",\n    gainsboro: \"dcdcdc\",\n    ghostwhite: \"f8f8ff\",\n    gold: \"ffd700\",\n    goldenrod: \"daa520\",\n    gray: \"808080\",\n    green: \"008000\",\n    greenyellow: \"adff2f\",\n    honeydew: \"f0fff0\",\n    hotpink: \"ff69b4\",\n    indianred: \"cd5c5c\",\n    indigo: \"4b0082\",\n    ivory: \"fffff0\",\n    khaki: \"f0e68c\",\n    lavender: \"e6e6fa\",\n    lavenderblush: \"fff0f5\",\n    lawngreen: \"7cfc00\",\n    lemonchiffon: \"fffacd\",\n    lightblue: \"add8e6\",\n    lightcoral: \"f08080\",\n    lightcyan: \"e0ffff\",\n    lightgoldenrodyellow: \"fafad2\",\n    lightgrey: \"d3d3d3\",\n    lightgreen: \"90ee90\",\n    lightpink: \"ffb6c1\",\n    lightsalmon: \"ffa07a\",\n    lightseagreen: \"20b2aa\",\n    lightskyblue: \"87cefa\",\n    lightslateblue: \"8470ff\",\n    lightslategray: \"778899\",\n    lightsteelblue: \"b0c4de\",\n    lightyellow: \"ffffe0\",\n    lime: \"00ff00\",\n    limegreen: \"32cd32\",\n    linen: \"faf0e6\",\n    magenta: \"ff00ff\",\n    maroon: \"800000\",\n    mediumaquamarine: \"66cdaa\",\n    mediumblue: \"0000cd\",\n    mediumorchid: \"ba55d3\",\n    mediumpurple: \"9370d8\",\n    mediumseagreen: \"3cb371\",\n    mediumslateblue: \"7b68ee\",\n    mediumspringgreen: \"00fa9a\",\n    mediumturquoise: \"48d1cc\",\n    mediumvioletred: \"c71585\",\n    midnightblue: \"191970\",\n    mintcream: \"f5fffa\",\n    mistyrose: \"ffe4e1\",\n    moccasin: \"ffe4b5\",\n    navajowhite: \"ffdead\",\n    navy: \"000080\",\n    oldlace: \"fdf5e6\",\n    olive: \"808000\",\n    olivedrab: \"6b8e23\",\n    orange: \"ffa500\",\n    orangered: \"ff4500\",\n    orchid: \"da70d6\",\n    palegoldenrod: \"eee8aa\",\n    palegreen: \"98fb98\",\n    paleturquoise: \"afeeee\",\n    palevioletred: \"d87093\",\n    papayawhip: \"ffefd5\",\n    peachpuff: \"ffdab9\",\n    peru: \"cd853f\",\n    pink: \"ffc0cb\",\n    plum: \"dda0dd\",\n    powderblue: \"b0e0e6\",\n    purple: \"800080\",\n    red: \"ff0000\",\n    rosybrown: \"bc8f8f\",\n    royalblue: \"4169e1\",\n    saddlebrown: \"8b4513\",\n    salmon: \"fa8072\",\n    sandybrown: \"f4a460\",\n    seagreen: \"2e8b57\",\n    seashell: \"fff5ee\",\n    sienna: \"a0522d\",\n    silver: \"c0c0c0\",\n    skyblue: \"87ceeb\",\n    slateblue: \"6a5acd\",\n    slategray: \"708090\",\n    snow: \"fffafa\",\n    springgreen: \"00ff7f\",\n    steelblue: \"4682b4\",\n    tan: \"d2b48c\",\n    teal: \"008080\",\n    thistle: \"d8bfd8\",\n    tomato: \"ff6347\",\n    turquoise: \"40e0d0\",\n    violet: \"ee82ee\",\n    violetred: \"d02090\",\n    wheat: \"f5deb3\",\n    white: \"ffffff\",\n    whitesmoke: \"f5f5f5\",\n    yellow: \"ffff00\",\n    yellowgreen: \"9acd32\"\n  };\n  color_string = simple_colors[color_string] || color_string;\n\n  // array of color definition objects\n  var color_defs = [\n    {\n      re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n      example: [\"rgb(123, 234, 45)\", \"rgb(255,234,245)\"],\n      process: function(bits) {\n        return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];\n      }\n    },\n    {\n      re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n      example: [\"#00ff00\", \"336699\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1], 16),\n          parseInt(bits[2], 16),\n          parseInt(bits[3], 16)\n        ];\n      }\n    },\n    {\n      re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n      example: [\"#fb0\", \"f0f\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1] + bits[1], 16),\n          parseInt(bits[2] + bits[2], 16),\n          parseInt(bits[3] + bits[3], 16)\n        ];\n      }\n    }\n  ];\n\n  // search through the definitions to find a match\n  for (var i = 0; i < color_defs.length; i++) {\n    var re = color_defs[i].re;\n    var processor = color_defs[i].process;\n    var bits = re.exec(color_string);\n    if (bits) {\n      channels = processor(bits);\n      this.r = channels[0];\n      this.g = channels[1];\n      this.b = channels[2];\n      this.ok = true;\n    }\n  }\n\n  // validate/cleanup values\n  this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r;\n  this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g;\n  this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b;\n\n  // some getters\n  this.toRGB = function() {\n    return \"rgb(\" + this.r + \", \" + this.g + \", \" + this.b + \")\";\n  };\n  this.toHex = function() {\n    var r = this.r.toString(16);\n    var g = this.g.toString(16);\n    var b = this.b.toString(16);\n    if (r.length == 1) r = \"0\" + r;\n    if (g.length == 1) g = \"0\" + g;\n    if (b.length == 1) b = \"0\" + b;\n    return \"#\" + r + g + b;\n  };\n}\n\nexport { RGBColor };\n","import { globalObject } from \"./globalObject.js\";\n\nvar atob, btoa;\n\n(function() {\n  atob = globalObject.atob.bind(globalObject);\n  btoa = globalObject.btoa.bind(globalObject);\n  return;\n\n})();\n\nexport { atob, btoa };\n","/**\n * @license\n * Joseph Myers does not specify a particular license for his work.\n *\n * Author: Joseph Myers\n * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js\n *\n * Modified by: Owen Leong\n */\n\nfunction md5cycle(x, k) {\n  var a = x[0],\n    b = x[1],\n    c = x[2],\n    d = x[3];\n\n  a = ff(a, b, c, d, k[0], 7, -680876936);\n  d = ff(d, a, b, c, k[1], 12, -389564586);\n  c = ff(c, d, a, b, k[2], 17, 606105819);\n  b = ff(b, c, d, a, k[3], 22, -1044525330);\n  a = ff(a, b, c, d, k[4], 7, -176418897);\n  d = ff(d, a, b, c, k[5], 12, 1200080426);\n  c = ff(c, d, a, b, k[6], 17, -1473231341);\n  b = ff(b, c, d, a, k[7], 22, -45705983);\n  a = ff(a, b, c, d, k[8], 7, 1770035416);\n  d = ff(d, a, b, c, k[9], 12, -1958414417);\n  c = ff(c, d, a, b, k[10], 17, -42063);\n  b = ff(b, c, d, a, k[11], 22, -1990404162);\n  a = ff(a, b, c, d, k[12], 7, 1804603682);\n  d = ff(d, a, b, c, k[13], 12, -40341101);\n  c = ff(c, d, a, b, k[14], 17, -1502002290);\n  b = ff(b, c, d, a, k[15], 22, 1236535329);\n\n  a = gg(a, b, c, d, k[1], 5, -165796510);\n  d = gg(d, a, b, c, k[6], 9, -1069501632);\n  c = gg(c, d, a, b, k[11], 14, 643717713);\n  b = gg(b, c, d, a, k[0], 20, -373897302);\n  a = gg(a, b, c, d, k[5], 5, -701558691);\n  d = gg(d, a, b, c, k[10], 9, 38016083);\n  c = gg(c, d, a, b, k[15], 14, -660478335);\n  b = gg(b, c, d, a, k[4], 20, -405537848);\n  a = gg(a, b, c, d, k[9], 5, 568446438);\n  d = gg(d, a, b, c, k[14], 9, -1019803690);\n  c = gg(c, d, a, b, k[3], 14, -187363961);\n  b = gg(b, c, d, a, k[8], 20, 1163531501);\n  a = gg(a, b, c, d, k[13], 5, -1444681467);\n  d = gg(d, a, b, c, k[2], 9, -51403784);\n  c = gg(c, d, a, b, k[7], 14, 1735328473);\n  b = gg(b, c, d, a, k[12], 20, -1926607734);\n\n  a = hh(a, b, c, d, k[5], 4, -378558);\n  d = hh(d, a, b, c, k[8], 11, -2022574463);\n  c = hh(c, d, a, b, k[11], 16, 1839030562);\n  b = hh(b, c, d, a, k[14], 23, -35309556);\n  a = hh(a, b, c, d, k[1], 4, -1530992060);\n  d = hh(d, a, b, c, k[4], 11, 1272893353);\n  c = hh(c, d, a, b, k[7], 16, -155497632);\n  b = hh(b, c, d, a, k[10], 23, -1094730640);\n  a = hh(a, b, c, d, k[13], 4, 681279174);\n  d = hh(d, a, b, c, k[0], 11, -358537222);\n  c = hh(c, d, a, b, k[3], 16, -722521979);\n  b = hh(b, c, d, a, k[6], 23, 76029189);\n  a = hh(a, b, c, d, k[9], 4, -640364487);\n  d = hh(d, a, b, c, k[12], 11, -421815835);\n  c = hh(c, d, a, b, k[15], 16, 530742520);\n  b = hh(b, c, d, a, k[2], 23, -995338651);\n\n  a = ii(a, b, c, d, k[0], 6, -198630844);\n  d = ii(d, a, b, c, k[7], 10, 1126891415);\n  c = ii(c, d, a, b, k[14], 15, -1416354905);\n  b = ii(b, c, d, a, k[5], 21, -57434055);\n  a = ii(a, b, c, d, k[12], 6, 1700485571);\n  d = ii(d, a, b, c, k[3], 10, -1894986606);\n  c = ii(c, d, a, b, k[10], 15, -1051523);\n  b = ii(b, c, d, a, k[1], 21, -2054922799);\n  a = ii(a, b, c, d, k[8], 6, 1873313359);\n  d = ii(d, a, b, c, k[15], 10, -30611744);\n  c = ii(c, d, a, b, k[6], 15, -1560198380);\n  b = ii(b, c, d, a, k[13], 21, 1309151649);\n  a = ii(a, b, c, d, k[4], 6, -145523070);\n  d = ii(d, a, b, c, k[11], 10, -1120210379);\n  c = ii(c, d, a, b, k[2], 15, 718787259);\n  b = ii(b, c, d, a, k[9], 21, -343485551);\n\n  x[0] = add32(a, x[0]);\n  x[1] = add32(b, x[1]);\n  x[2] = add32(c, x[2]);\n  x[3] = add32(d, x[3]);\n}\n\nfunction cmn(q, a, b, x, s, t) {\n  a = add32(add32(a, q), add32(x, t));\n  return add32((a << s) | (a >>> (32 - s)), b);\n}\n\nfunction ff(a, b, c, d, x, s, t) {\n  return cmn((b & c) | (~b & d), a, b, x, s, t);\n}\n\nfunction gg(a, b, c, d, x, s, t) {\n  return cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\n\nfunction hh(a, b, c, d, x, s, t) {\n  return cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction ii(a, b, c, d, x, s, t) {\n  return cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nfunction md51(s) {\n  // txt = '';\n  var n = s.length,\n    state = [1732584193, -271733879, -1732584194, 271733878],\n    i;\n  for (i = 64; i <= s.length; i += 64) {\n    md5cycle(state, md5blk(s.substring(i - 64, i)));\n  }\n  s = s.substring(i - 64);\n  var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n  for (i = 0; i < s.length; i++)\n    tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n  tail[i >> 2] |= 0x80 << (i % 4 << 3);\n  if (i > 55) {\n    md5cycle(state, tail);\n    for (i = 0; i < 16; i++) tail[i] = 0;\n  }\n  tail[14] = n * 8;\n  md5cycle(state, tail);\n  return state;\n}\n\n/* there needs to be support for Unicode here,\n * unless we pretend that we can redefine the MD-5\n * algorithm for multi-byte characters (perhaps\n * by adding every four 16-bit characters and\n * shortening the sum to 32 bits). Otherwise\n * I suggest performing MD-5 as if every character\n * was two bytes--e.g., 0040 0025 = @%--but then\n * how will an ordinary MD-5 sum be matched?\n * There is no way to standardize text to something\n * like UTF-8 before transformation; speed cost is\n * utterly prohibitive. The JavaScript standard\n * itself needs to look at this: it should start\n * providing access to strings as preformed UTF-8\n * 8-bit unsigned value arrays.\n */\nfunction md5blk(s) {\n  /* I figured global was faster.   */\n  var md5blks = [],\n    i; /* Andy King said do it this way. */\n  for (i = 0; i < 64; i += 4) {\n    md5blks[i >> 2] =\n      s.charCodeAt(i) +\n      (s.charCodeAt(i + 1) << 8) +\n      (s.charCodeAt(i + 2) << 16) +\n      (s.charCodeAt(i + 3) << 24);\n  }\n  return md5blks;\n}\n\nvar hex_chr = \"0123456789abcdef\".split(\"\");\n\nfunction rhex(n) {\n  var s = \"\",\n    j = 0;\n  for (; j < 4; j++)\n    s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];\n  return s;\n}\n\nfunction hex(x) {\n  for (var i = 0; i < x.length; i++) x[i] = rhex(x[i]);\n  return x.join(\"\");\n}\n\n// Converts a 4-byte number to byte string\nfunction singleToByteString(n) {\n  return String.fromCharCode(\n    (n & 0xff) >> 0,\n    (n & 0xff00) >> 8,\n    (n & 0xff0000) >> 16,\n    (n & 0xff000000) >> 24\n  );\n}\n\n// Converts an array of numbers to a byte string\nfunction toByteString(x) {\n  return x.map(singleToByteString).join(\"\");\n}\n\n// Returns the MD5 hash as a byte string\nfunction md5Bin(s) {\n  return toByteString(md51(s));\n}\n\n// Returns MD5 hash as a hex string\nfunction md5(s) {\n  return hex(md51(s));\n}\n\nvar md5Check = md5(\"hello\") != \"5d41402abc4b2a76b9719d911017c592\";\n\nfunction add32(a, b) {\n  if (md5Check) {\n    /* if the md5Check does not match\n     the expected value, we're dealing\n     with an old browser and need\n     this function. */\n    var lsw = (a & 0xffff) + (b & 0xffff),\n      msw = (a >> 16) + (b >> 16) + (lsw >> 16);\n    return (msw << 16) | (lsw & 0xffff);\n  } else {\n    /* this function is much faster,\n    so if possible we use it. Some IEs\n    are the only ones I know of that\n    need the idiotic second function,\n    generated by an if clause.  */\n    return (a + b) & 0xffffffff;\n  }\n}\n\nexport { md5, md5Bin };\n","/**\r\n * @license\r\n * FPDF is released under a permissive license: there is no usage restriction.\r\n * You may embed it freely in your application (commercial or not), with or\r\n * without modifications.\r\n *\r\n * Reference: http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nfunction repeat(str, num) {\r\n  return new Array(num + 1).join(str);\r\n}\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name rc4\r\n * @function\r\n * @param {string} key Byte string of encryption key\r\n * @param {string} data Byte string of data to be encrypted\r\n * @returns {string} Encrypted string\r\n */\r\nfunction rc4(key, data) {\r\n  var lastKey, lastState;\r\n  if (key !== lastKey) {\r\n    var k = repeat(key, ((256 / key.length) >> 0) + 1);\r\n    var state = [];\r\n    for (var i = 0; i < 256; i++) {\r\n      state[i] = i;\r\n    }\r\n    var j = 0;\r\n    for (var i = 0; i < 256; i++) {\r\n      var t = state[i];\r\n      j = (j + t + k.charCodeAt(i)) % 256;\r\n      state[i] = state[j];\r\n      state[j] = t;\r\n    }\r\n    lastKey = key;\r\n    lastState = state;\r\n  } else {\r\n    state = lastState;\r\n  }\r\n  var length = data.length;\r\n  var a = 0;\r\n  var b = 0;\r\n  var out = \"\";\r\n  for (var i = 0; i < length; i++) {\r\n    a = (a + 1) % 256;\r\n    t = state[a];\r\n    b = (b + t) % 256;\r\n    state[a] = state[b];\r\n    state[b] = t;\r\n    k = state[(state[a] + state[b]) % 256];\r\n    out += String.fromCharCode(data.charCodeAt(i) ^ k);\r\n  }\r\n  return out;\r\n}\r\n\r\nexport { rc4 };\r\n","/**\r\n * @license\r\n * Licensed under the MIT License.\r\n * http://opensource.org/licenses/mit-license\r\n * Author: Owen Leong (@owenl131)\r\n * Date: 15 Oct 2020\r\n * References:\r\n * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt\r\n * https://github.com/foliojs/pdfkit/blob/master/lib/security.js\r\n * http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nimport { md5Bin } from \"./md5.js\";\r\nimport { rc4 } from \"./rc4.js\";\r\n\r\nvar permissionOptions = {\r\n  print: 4,\r\n  modify: 8,\r\n  copy: 16,\r\n  \"annot-forms\": 32\r\n};\r\n\r\n/**\r\n * Initializes encryption settings\r\n *\r\n * @name constructor\r\n * @function\r\n * @param {Array} permissions Permissions allowed for user, \"print\", \"modify\", \"copy\" and \"annot-forms\".\r\n * @param {String} userPassword Permissions apply to this user. Leaving this empty means the document\r\n *                              is not password protected but viewer has the above permissions.\r\n * @param {String} ownerPassword Owner has full functionalities to the file.\r\n * @param {String} fileId As hex string, should be same as the file ID in the trailer.\r\n * @example\r\n * var security = new PDFSecurity([\"print\"])\r\n */\r\nfunction PDFSecurity(permissions, userPassword, ownerPassword, fileId) {\r\n  this.v = 1; // algorithm 1, future work can add in more recent encryption schemes\r\n  this.r = 2; // revision 2\r\n\r\n  // set flags for what functionalities the user can access\r\n  let protection = 192;\r\n  permissions.forEach(function(perm) {\r\n    if (typeof permissionOptions.perm !== \"undefined\") {\r\n      throw new Error(\"Invalid permission: \" + perm);\r\n    }\r\n    protection += permissionOptions[perm];\r\n  });\r\n\r\n  // padding is used to pad the passwords to 32 bytes, also is hashed and stored in the final PDF\r\n  this.padding =\r\n    \"\\x28\\xBF\\x4E\\x5E\\x4E\\x75\\x8A\\x41\\x64\\x00\\x4E\\x56\\xFF\\xFA\\x01\\x08\" +\r\n    \"\\x2E\\x2E\\x00\\xB6\\xD0\\x68\\x3E\\x80\\x2F\\x0C\\xA9\\xFE\\x64\\x53\\x69\\x7A\";\r\n  let paddedUserPassword = (userPassword + this.padding).substr(0, 32);\r\n  let paddedOwnerPassword = (ownerPassword + this.padding).substr(0, 32);\r\n\r\n  this.O = this.processOwnerPassword(paddedUserPassword, paddedOwnerPassword);\r\n  this.P = -((protection ^ 255) + 1);\r\n  this.encryptionKey = md5Bin(\r\n    paddedUserPassword +\r\n      this.O +\r\n      this.lsbFirstWord(this.P) +\r\n      this.hexToBytes(fileId)\r\n  ).substr(0, 5);\r\n  this.U = rc4(this.encryptionKey, this.padding);\r\n}\r\n\r\n/**\r\n * Breaks down a 4-byte number into its individual bytes, with the least significant bit first\r\n *\r\n * @name lsbFirstWord\r\n * @function\r\n * @param {number} data 32-bit number\r\n * @returns {Array}\r\n */\r\nPDFSecurity.prototype.lsbFirstWord = function(data) {\r\n  return String.fromCharCode(\r\n    (data >> 0) & 0xff,\r\n    (data >> 8) & 0xff,\r\n    (data >> 16) & 0xff,\r\n    (data >> 24) & 0xff\r\n  );\r\n};\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name toHexString\r\n * @function\r\n * @param {String} byteString Byte string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.toHexString = function(byteString) {\r\n  return byteString\r\n    .split(\"\")\r\n    .map(function(byte) {\r\n      return (\"0\" + (byte.charCodeAt(0) & 0xff).toString(16)).slice(-2);\r\n    })\r\n    .join(\"\");\r\n};\r\n\r\n/**\r\n * Converts a hex string to a byte string\r\n *\r\n * @name hexToBytes\r\n * @function\r\n * @param {String} hex Hex string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.hexToBytes = function(hex) {\r\n  for (var bytes = [], c = 0; c < hex.length; c += 2)\r\n    bytes.push(String.fromCharCode(parseInt(hex.substr(c, 2), 16)));\r\n  return bytes.join(\"\");\r\n};\r\n\r\n/**\r\n * Computes the 'O' field in the encryption dictionary\r\n *\r\n * @name processOwnerPassword\r\n * @function\r\n * @param {String} paddedUserPassword Byte string of padded user password\r\n * @param {String} paddedOwnerPassword Byte string of padded owner password\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.processOwnerPassword = function(\r\n  paddedUserPassword,\r\n  paddedOwnerPassword\r\n) {\r\n  let key = md5Bin(paddedOwnerPassword).substr(0, 5);\r\n  return rc4(key, paddedUserPassword);\r\n};\r\n\r\n/**\r\n * Returns an encryptor function which can take in a byte string and returns the encrypted version\r\n *\r\n * @name encryptor\r\n * @function\r\n * @param {number} objectId\r\n * @param {number} generation Not sure what this is for, you can set it to 0\r\n * @returns {Function}\r\n * @example\r\n * out(\"stream\");\r\n * encryptor = security.encryptor(object.id, 0);\r\n * out(encryptor(data));\r\n * out(\"endstream\");\r\n */\r\nPDFSecurity.prototype.encryptor = function(objectId, generation) {\r\n  let key = md5Bin(\r\n    this.encryptionKey +\r\n      String.fromCharCode(\r\n        objectId & 0xff,\r\n        (objectId >> 8) & 0xff,\r\n        (objectId >> 16) & 0xff,\r\n        generation & 0xff,\r\n        (generation >> 8) & 0xff\r\n      )\r\n  ).substr(0, 10);\r\n  return function(data) {\r\n    return rc4(key, data);\r\n  };\r\n};\r\n\r\nexport { PDFSecurity };\r\n","/**\n * Convert string to `PDF Name Object`.\n * Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object\n * @param str\n */\nfunction toPDFName(str) {\n  // eslint-disable-next-line no-control-regex\n  if (/[^\\u0000-\\u00ff]/.test(str)) {\n    // non ascii string\n    throw new Error(\n      \"Invalid PDF Name Object: \" + str + \", Only accept ASCII characters.\"\n    );\n  }\n  var result = \"\",\n    strLength = str.length;\n  for (var i = 0; i < strLength; i++) {\n    var charCode = str.charCodeAt(i);\n    if (\n      charCode < 0x21 ||\n      charCode === 0x23 /* # */ ||\n      charCode === 0x25 /* % */ ||\n      charCode === 0x28 /* ( */ ||\n      charCode === 0x29 /* ) */ ||\n      charCode === 0x2f /* / */ ||\n      charCode === 0x3c /* < */ ||\n      charCode === 0x3e /* > */ ||\n      charCode === 0x5b /* [ */ ||\n      charCode === 0x5d /* ] */ ||\n      charCode === 0x7b /* { */ ||\n      charCode === 0x7d /* } */ ||\n      charCode > 0x7e\n    ) {\n      // Char    CharCode    hexStr   paddingHexStr    Result\n      // \"\\t\"    9           9        09               #09\n      // \" \"     32          20       20               #20\n      // \"©\"     169         a9       a9               #a9\n      var hexStr = charCode.toString(16),\n        paddingHexStr = (\"0\" + hexStr).slice(-2);\n\n      result += \"#\" + paddingHexStr;\n    } else {\n      // Other ASCII printable characters between 0x21 <= X <= 0x7e\n      result += str[i];\n    }\n  }\n  return result;\n}\n\nexport { toPDFName };\n","/* eslint-disable no-console */\r\n\r\nimport { saveAs } from \"./libs/FileSaver.js\";\r\nimport { globalObject } from \"./libs/globalObject.js\";\r\nimport { RGBColor } from \"./libs/rgbcolor.js\";\r\nimport { btoa } from \"./libs/AtobBtoa.js\";\r\nimport { console } from \"./libs/console.js\";\r\nimport { PDFSecurity } from \"./libs/pdfsecurity.js\";\r\nimport { toPDFName } from \"./libs/pdfname.js\";\r\n/**\r\n * jsPDF's Internal PubSub Implementation.\r\n * Backward compatible rewritten on 2014 by\r\n * Diego Casorran, https://github.com/diegocr\r\n *\r\n * @class\r\n * @name PubSub\r\n * @ignore\r\n */\r\nfunction PubSub(context) {\r\n  if (typeof context !== \"object\") {\r\n    throw new Error(\r\n      \"Invalid Context passed to initialize PubSub (jsPDF-module)\"\r\n    );\r\n  }\r\n  var topics = {};\r\n\r\n  this.subscribe = function(topic, callback, once) {\r\n    once = once || false;\r\n    if (\r\n      typeof topic !== \"string\" ||\r\n      typeof callback !== \"function\" ||\r\n      typeof once !== \"boolean\"\r\n    ) {\r\n      throw new Error(\r\n        \"Invalid arguments passed to PubSub.subscribe (jsPDF-module)\"\r\n      );\r\n    }\r\n\r\n    if (!topics.hasOwnProperty(topic)) {\r\n      topics[topic] = {};\r\n    }\r\n\r\n    var token = Math.random().toString(35);\r\n    topics[topic][token] = [callback, !!once];\r\n\r\n    return token;\r\n  };\r\n\r\n  this.unsubscribe = function(token) {\r\n    for (var topic in topics) {\r\n      if (topics[topic][token]) {\r\n        delete topics[topic][token];\r\n        if (Object.keys(topics[topic]).length === 0) {\r\n          delete topics[topic];\r\n        }\r\n        return true;\r\n      }\r\n    }\r\n    return false;\r\n  };\r\n\r\n  this.publish = function(topic) {\r\n    if (topics.hasOwnProperty(topic)) {\r\n      var args = Array.prototype.slice.call(arguments, 1),\r\n        tokens = [];\r\n\r\n      for (var token in topics[topic]) {\r\n        var sub = topics[topic][token];\r\n        try {\r\n          sub[0].apply(context, args);\r\n        } catch (ex) {\r\n          if (globalObject.console) {\r\n            console.error(\"jsPDF PubSub Error\", ex.message, ex);\r\n          }\r\n        }\r\n        if (sub[1]) tokens.push(token);\r\n      }\r\n      if (tokens.length) tokens.forEach(this.unsubscribe);\r\n    }\r\n  };\r\n\r\n  this.getTopics = function() {\r\n    return topics;\r\n  };\r\n}\r\n\r\nfunction GState(parameters) {\r\n  if (!(this instanceof GState)) {\r\n    return new GState(parameters);\r\n  }\r\n\r\n  /**\r\n   * @name GState#opacity\r\n   * @type {any}\r\n   */\r\n  /**\r\n   * @name GState#stroke-opacity\r\n   * @type {any}\r\n   */\r\n  var supported = \"opacity,stroke-opacity\".split(\",\");\r\n  for (var p in parameters) {\r\n    if (parameters.hasOwnProperty(p) && supported.indexOf(p) >= 0) {\r\n      this[p] = parameters[p];\r\n    }\r\n  }\r\n  /**\r\n   * @name GState#id\r\n   * @type {string}\r\n   */\r\n  this.id = \"\"; // set by addGState()\r\n  /**\r\n   * @name GState#objectNumber\r\n   * @type {number}\r\n   */\r\n  this.objectNumber = -1; // will be set by putGState()\r\n}\r\n\r\nGState.prototype.equals = function equals(other) {\r\n  var ignore = \"id,objectNumber,equals\";\r\n  var p;\r\n  if (!other || typeof other !== typeof this) return false;\r\n  var count = 0;\r\n  for (p in this) {\r\n    if (ignore.indexOf(p) >= 0) continue;\r\n    if (this.hasOwnProperty(p) && !other.hasOwnProperty(p)) return false;\r\n    if (this[p] !== other[p]) return false;\r\n    count++;\r\n  }\r\n  for (p in other) {\r\n    if (other.hasOwnProperty(p) && ignore.indexOf(p) < 0) count--;\r\n  }\r\n  return count === 0;\r\n};\r\n\r\nfunction Pattern(gState, matrix) {\r\n  this.gState = gState;\r\n  this.matrix = matrix;\r\n\r\n  this.id = \"\"; // set by addPattern()\r\n  this.objectNumber = -1; // will be set by putPattern()\r\n}\r\n\r\nfunction ShadingPattern(type, coords, colors, gState, matrix) {\r\n  if (!(this instanceof ShadingPattern)) {\r\n    return new ShadingPattern(type, coords, colors, gState, matrix);\r\n  }\r\n\r\n  // see putPattern() for information how they are realized\r\n  this.type = type === \"axial\" ? 2 : 3;\r\n  this.coords = coords;\r\n  this.colors = colors;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\nfunction TilingPattern(boundingBox, xStep, yStep, gState, matrix) {\r\n  if (!(this instanceof TilingPattern)) {\r\n    return new TilingPattern(boundingBox, xStep, yStep, gState, matrix);\r\n  }\r\n\r\n  this.boundingBox = boundingBox;\r\n  this.xStep = xStep;\r\n  this.yStep = yStep;\r\n\r\n  this.stream = \"\"; // set by endTilingPattern();\r\n\r\n  this.cloneIndex = 0;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\n/**\r\n * Creates new jsPDF document object instance.\r\n * @name jsPDF\r\n * @class\r\n * @param {Object} [options] - Collection of settings initializing the jsPDF-instance\r\n * @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" or \"l\").<br />\r\n * @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />\r\n * Possible values are \"pt\" (points), \"mm\", \"cm\", \"in\", \"px\", \"pc\", \"em\" or \"ex\". Note that in order to get the correct scaling for \"px\"\r\n * units, you need to enable the hotfix \"px_scaling\" by setting options.hotfixes = [\"px_scaling\"].\r\n * @param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n * @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.\r\n * @param {boolean} [options.compress=false] Compress the generated PDF.\r\n * @param {number} [options.precision=16] Precision of the element-positions.\r\n * @param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.\r\n * @param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.\r\n * @param {Object} [options.encryption]\r\n * @param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.\r\n * @param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.\r\n * @param {string[]} [options.encryption.userPermissions] Array of permissions \"print\", \"modify\", \"copy\", \"annot-forms\", accessible by the user.\r\n * @param {number|\"smart\"} [options.floatPrecision=16]\r\n * @returns {jsPDF} jsPDF-instance\r\n * @description\r\n * ```\r\n * {\r\n *  orientation: 'p',\r\n *  unit: 'mm',\r\n *  format: 'a4',\r\n *  putOnlyUsedFonts:true,\r\n *  floatPrecision: 16 // or \"smart\", default is 16\r\n * }\r\n * ```\r\n *\r\n * @constructor\r\n */\r\nfunction jsPDF(options) {\r\n  var orientation = typeof arguments[0] === \"string\" ? arguments[0] : \"p\";\r\n  var unit = arguments[1];\r\n  var format = arguments[2];\r\n  var compressPdf = arguments[3];\r\n  var filters = [];\r\n  var userUnit = 1.0;\r\n  var precision;\r\n  var floatPrecision = 16;\r\n  var defaultPathOperation = \"S\";\r\n  var encryptionOptions = null;\r\n\r\n  options = options || {};\r\n\r\n  if (typeof options === \"object\") {\r\n    orientation = options.orientation;\r\n    unit = options.unit || unit;\r\n    format = options.format || format;\r\n    compressPdf = options.compress || options.compressPdf || compressPdf;\r\n    encryptionOptions = options.encryption || null;\r\n    if (encryptionOptions !== null) {\r\n      encryptionOptions.userPassword = encryptionOptions.userPassword || \"\";\r\n      encryptionOptions.ownerPassword = encryptionOptions.ownerPassword || \"\";\r\n      encryptionOptions.userPermissions =\r\n        encryptionOptions.userPermissions || [];\r\n    }\r\n    userUnit =\r\n      typeof options.userUnit === \"number\" ? Math.abs(options.userUnit) : 1.0;\r\n    if (typeof options.precision !== \"undefined\") {\r\n      precision = options.precision;\r\n    }\r\n    if (typeof options.floatPrecision !== \"undefined\") {\r\n      floatPrecision = options.floatPrecision;\r\n    }\r\n    defaultPathOperation = options.defaultPathOperation || \"S\";\r\n  }\r\n\r\n  filters =\r\n    options.filters || (compressPdf === true ? [\"FlateEncode\"] : filters);\r\n\r\n  unit = unit || \"mm\";\r\n  orientation = (\"\" + (orientation || \"P\")).toLowerCase();\r\n  var putOnlyUsedFonts = options.putOnlyUsedFonts || false;\r\n  var usedFonts = {};\r\n\r\n  var API = {\r\n    internal: {},\r\n    __private__: {}\r\n  };\r\n\r\n  API.__private__.PubSub = PubSub;\r\n\r\n  var pdfVersion = \"1.3\";\r\n  var getPdfVersion = (API.__private__.getPdfVersion = function() {\r\n    return pdfVersion;\r\n  });\r\n\r\n  API.__private__.setPdfVersion = function(value) {\r\n    pdfVersion = value;\r\n  };\r\n\r\n  // Size in pt of various paper formats\r\n  var pageFormats = {\r\n    a0: [2383.94, 3370.39],\r\n    a1: [1683.78, 2383.94],\r\n    a2: [1190.55, 1683.78],\r\n    a3: [841.89, 1190.55],\r\n    a4: [595.28, 841.89],\r\n    a5: [419.53, 595.28],\r\n    a6: [297.64, 419.53],\r\n    a7: [209.76, 297.64],\r\n    a8: [147.4, 209.76],\r\n    a9: [104.88, 147.4],\r\n    a10: [73.7, 104.88],\r\n    b0: [2834.65, 4008.19],\r\n    b1: [2004.09, 2834.65],\r\n    b2: [1417.32, 2004.09],\r\n    b3: [1000.63, 1417.32],\r\n    b4: [708.66, 1000.63],\r\n    b5: [498.9, 708.66],\r\n    b6: [354.33, 498.9],\r\n    b7: [249.45, 354.33],\r\n    b8: [175.75, 249.45],\r\n    b9: [124.72, 175.75],\r\n    b10: [87.87, 124.72],\r\n    c0: [2599.37, 3676.54],\r\n    c1: [1836.85, 2599.37],\r\n    c2: [1298.27, 1836.85],\r\n    c3: [918.43, 1298.27],\r\n    c4: [649.13, 918.43],\r\n    c5: [459.21, 649.13],\r\n    c6: [323.15, 459.21],\r\n    c7: [229.61, 323.15],\r\n    c8: [161.57, 229.61],\r\n    c9: [113.39, 161.57],\r\n    c10: [79.37, 113.39],\r\n    dl: [311.81, 623.62],\r\n    letter: [612, 792],\r\n    \"government-letter\": [576, 756],\r\n    legal: [612, 1008],\r\n    \"junior-legal\": [576, 360],\r\n    ledger: [1224, 792],\r\n    tabloid: [792, 1224],\r\n    \"credit-card\": [153, 243]\r\n  };\r\n\r\n  API.__private__.getPageFormats = function() {\r\n    return pageFormats;\r\n  };\r\n\r\n  var getPageFormat = (API.__private__.getPageFormat = function(value) {\r\n    return pageFormats[value];\r\n  });\r\n\r\n  format = format || \"a4\";\r\n\r\n  var ApiMode = {\r\n    COMPAT: \"compat\",\r\n    ADVANCED: \"advanced\"\r\n  };\r\n  var apiMode = ApiMode.COMPAT;\r\n\r\n  function advancedAPI() {\r\n    // prepend global change of basis matrix\r\n    // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix\r\n    // that does this job for us (however, texts, images and similar objects must be drawn bottom up))\r\n    this.saveGraphicsState();\r\n    out(\r\n      new Matrix(\r\n        scaleFactor,\r\n        0,\r\n        0,\r\n        -scaleFactor,\r\n        0,\r\n        getPageHeight() * scaleFactor\r\n      ).toString() + \" cm\"\r\n    );\r\n    this.setFontSize(this.getFontSize() / scaleFactor);\r\n\r\n    // The default in MrRio's implementation is \"S\" (stroke), whereas the default in the yWorks implementation\r\n    // was \"n\" (none). Although this has nothing to do with transforms, we should use the API switch here.\r\n    defaultPathOperation = \"n\";\r\n\r\n    apiMode = ApiMode.ADVANCED;\r\n  }\r\n\r\n  function compatAPI() {\r\n    this.restoreGraphicsState();\r\n    defaultPathOperation = \"S\";\r\n    apiMode = ApiMode.COMPAT;\r\n  }\r\n\r\n  /**\r\n   * @function combineFontStyleAndFontWeight\r\n   * @param {string} fontStyle Fontstyle or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @returns {string}\r\n   * @private\r\n   */\r\n  var combineFontStyleAndFontWeight = (API.__private__.combineFontStyleAndFontWeight = function(\r\n    fontStyle,\r\n    fontWeight\r\n  ) {\r\n    if (\r\n      (fontStyle == \"bold\" && fontWeight == \"normal\") ||\r\n      (fontStyle == \"bold\" && fontWeight == 400) ||\r\n      (fontStyle == \"normal\" && fontWeight == \"italic\") ||\r\n      (fontStyle == \"bold\" && fontWeight == \"italic\")\r\n    ) {\r\n      throw new Error(\"Invalid Combination of fontweight and fontstyle\");\r\n    }\r\n    if (fontWeight) {\r\n      fontStyle =\r\n        fontWeight == 400 || fontWeight === \"normal\"\r\n          ? fontStyle === \"italic\"\r\n            ? \"italic\"\r\n            : \"normal\"\r\n          : (fontWeight == 700 || fontWeight === \"bold\") &&\r\n            fontStyle === \"normal\"\r\n          ? \"bold\"\r\n          : (fontWeight == 700 ? \"bold\" : fontWeight) + \"\" + fontStyle;\r\n    }\r\n    return fontStyle;\r\n  });\r\n\r\n  /**\r\n   * @callback ApiSwitchBody\r\n   * @param {jsPDF} pdf\r\n   */\r\n\r\n  /**\r\n   * For compatibility reasons jsPDF offers two API modes which differ in the way they convert between the the usual\r\n   * screen coordinates and the PDF coordinate system.\r\n   *   - \"compat\": Offers full compatibility across all plugins but does not allow arbitrary transforms\r\n   *   - \"advanced\": Allows arbitrary transforms and more advanced features like pattern fills. Some plugins might\r\n   *     not support this mode, though.\r\n   * Initial mode is \"compat\".\r\n   *\r\n   * You can either provide a callback to the body argument, which means that jsPDF will automatically switch back to\r\n   * the original API mode afterwards; or you can omit the callback and switch back manually using {@link compatAPI}.\r\n   *\r\n   * Note, that the calls to {@link saveGraphicsState} and {@link restoreGraphicsState} need to be balanced within the\r\n   * callback or between calls of this method and its counterpart {@link compatAPI}. Calls to {@link beginFormObject}\r\n   * or {@link beginTilingPattern} need to be closed by their counterparts before switching back to \"compat\" API mode.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name advancedAPI\r\n   */\r\n  API.advancedAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.COMPAT;\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Switches to \"compat\" API mode. See {@link advancedAPI} for more details.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @return {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name compatApi\r\n   */\r\n  API.compatAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.ADVANCED;\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @return {boolean} True iff the current API mode is \"advanced\". See {@link advancedAPI}.\r\n   * @memberof jsPDF#\r\n   * @name isAdvancedAPI\r\n   */\r\n  API.isAdvancedAPI = function() {\r\n    return apiMode === ApiMode.ADVANCED;\r\n  };\r\n\r\n  var advancedApiModeTrap = function(methodName) {\r\n    if (apiMode !== ApiMode.ADVANCED) {\r\n      throw new Error(\r\n        methodName +\r\n          \" is only available in 'advanced' API mode. \" +\r\n          \"You need to call advancedAPI() first.\"\r\n      );\r\n    }\r\n  };\r\n\r\n  var roundToPrecision = (API.roundToPrecision = API.__private__.roundToPrecision = function(\r\n    number,\r\n    parmPrecision\r\n  ) {\r\n    var tmpPrecision = precision || parmPrecision;\r\n    if (isNaN(number) || isNaN(tmpPrecision)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.roundToPrecision\");\r\n    }\r\n    return number.toFixed(tmpPrecision).replace(/0+$/, \"\");\r\n  });\r\n\r\n  // high precision float\r\n  var hpf;\r\n  if (typeof floatPrecision === \"number\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, floatPrecision);\r\n    };\r\n  } else if (floatPrecision === \"smart\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      if (number > -1 && number < 1) {\r\n        return roundToPrecision(number, 16);\r\n      } else {\r\n        return roundToPrecision(number, 5);\r\n      }\r\n    };\r\n  } else {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, 16);\r\n    };\r\n  }\r\n  var f2 = (API.f2 = API.__private__.f2 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f2\");\r\n    }\r\n    return roundToPrecision(number, 2);\r\n  });\r\n\r\n  var f3 = (API.__private__.f3 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f3\");\r\n    }\r\n    return roundToPrecision(number, 3);\r\n  });\r\n\r\n  var scale = (API.scale = API.__private__.scale = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.scale\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return number * scaleFactor;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return number;\r\n    }\r\n  });\r\n\r\n  var transformY = function(y) {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return getPageHeight() - y;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return y;\r\n    }\r\n  };\r\n\r\n  var transformScaleY = function(y) {\r\n    return scale(transformY(y));\r\n  };\r\n\r\n  /**\r\n   * @name setPrecision\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} precision\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setPrecision = API.setPrecision = function(value) {\r\n    if (typeof parseInt(value, 10) === \"number\") {\r\n      precision = parseInt(value, 10);\r\n    }\r\n  };\r\n\r\n  var fileId = \"00000000000000000000000000000000\";\r\n\r\n  var getFileId = (API.__private__.getFileId = function() {\r\n    return fileId;\r\n  });\r\n\r\n  var setFileId = (API.__private__.setFileId = function(value) {\r\n    if (typeof value !== \"undefined\" && /^[a-fA-F0-9]{32}$/.test(value)) {\r\n      fileId = value.toUpperCase();\r\n    } else {\r\n      fileId = fileId\r\n        .split(\"\")\r\n        .map(function() {\r\n          return \"ABCDEF0123456789\".charAt(Math.floor(Math.random() * 16));\r\n        })\r\n        .join(\"\");\r\n    }\r\n\r\n    if (encryptionOptions !== null) {\r\n      encryption = new PDFSecurity(\r\n        encryptionOptions.userPermissions,\r\n        encryptionOptions.userPassword,\r\n        encryptionOptions.ownerPassword,\r\n        fileId\r\n      );\r\n    }\r\n    return fileId;\r\n  });\r\n\r\n  /**\r\n   * @name setFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} value GUID.\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setFileId = function(value) {\r\n    setFileId(value);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   *\r\n   * @returns {string} GUID.\r\n   */\r\n  API.getFileId = function() {\r\n    return getFileId();\r\n  };\r\n\r\n  var creationDate;\r\n\r\n  var convertDateToPDFDate = (API.__private__.convertDateToPDFDate = function(\r\n    parmDate\r\n  ) {\r\n    var result = \"\";\r\n    var tzoffset = parmDate.getTimezoneOffset(),\r\n      tzsign = tzoffset < 0 ? \"+\" : \"-\",\r\n      tzhour = Math.floor(Math.abs(tzoffset / 60)),\r\n      tzmin = Math.abs(tzoffset % 60),\r\n      timeZoneString = [tzsign, padd2(tzhour), \"'\", padd2(tzmin), \"'\"].join(\"\");\r\n\r\n    result = [\r\n      \"D:\",\r\n      parmDate.getFullYear(),\r\n      padd2(parmDate.getMonth() + 1),\r\n      padd2(parmDate.getDate()),\r\n      padd2(parmDate.getHours()),\r\n      padd2(parmDate.getMinutes()),\r\n      padd2(parmDate.getSeconds()),\r\n      timeZoneString\r\n    ].join(\"\");\r\n    return result;\r\n  });\r\n\r\n  var convertPDFDateToDate = (API.__private__.convertPDFDateToDate = function(\r\n    parmPDFDate\r\n  ) {\r\n    var year = parseInt(parmPDFDate.substr(2, 4), 10);\r\n    var month = parseInt(parmPDFDate.substr(6, 2), 10) - 1;\r\n    var date = parseInt(parmPDFDate.substr(8, 2), 10);\r\n    var hour = parseInt(parmPDFDate.substr(10, 2), 10);\r\n    var minutes = parseInt(parmPDFDate.substr(12, 2), 10);\r\n    var seconds = parseInt(parmPDFDate.substr(14, 2), 10);\r\n    // var timeZoneHour = parseInt(parmPDFDate.substr(16, 2), 10);\r\n    // var timeZoneMinutes = parseInt(parmPDFDate.substr(20, 2), 10);\r\n\r\n    var resultingDate = new Date(year, month, date, hour, minutes, seconds, 0);\r\n    return resultingDate;\r\n  });\r\n\r\n  var setCreationDate = (API.__private__.setCreationDate = function(date) {\r\n    var tmpCreationDateString;\r\n    var regexPDFCreationDate = /^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])'?$/;\r\n    if (typeof date === \"undefined\") {\r\n      date = new Date();\r\n    }\r\n\r\n    if (date instanceof Date) {\r\n      tmpCreationDateString = convertDateToPDFDate(date);\r\n    } else if (regexPDFCreationDate.test(date)) {\r\n      tmpCreationDateString = date;\r\n    } else {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCreationDate\");\r\n    }\r\n    creationDate = tmpCreationDateString;\r\n    return creationDate;\r\n  });\r\n\r\n  var getCreationDate = (API.__private__.getCreationDate = function(type) {\r\n    var result = creationDate;\r\n    if (type === \"jsDate\") {\r\n      result = convertPDFDateToDate(creationDate);\r\n    }\r\n    return result;\r\n  });\r\n\r\n  /**\r\n   * @name setCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} date\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setCreationDate = function(date) {\r\n    setCreationDate(date);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} type\r\n   * @returns {Object}\r\n   */\r\n  API.getCreationDate = function(type) {\r\n    return getCreationDate(type);\r\n  };\r\n\r\n  var padd2 = (API.__private__.padd2 = function(number) {\r\n    return (\"0\" + parseInt(number)).slice(-2);\r\n  });\r\n\r\n  var padd2Hex = (API.__private__.padd2Hex = function(hexString) {\r\n    hexString = hexString.toString();\r\n    return (\"00\" + hexString).substr(hexString.length);\r\n  });\r\n\r\n  var objectNumber = 0; // 'n' Current object number\r\n  var offsets = []; // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.\r\n  var content = [];\r\n  var contentLength = 0;\r\n  var additionalObjects = [];\r\n\r\n  var pages = [];\r\n  var currentPage;\r\n  var hasCustomDestination = false;\r\n  var outputDestination = content;\r\n\r\n  var resetDocument = function() {\r\n    //reset fields relevant for objectNumber generation and xref.\r\n    objectNumber = 0;\r\n    contentLength = 0;\r\n    content = [];\r\n    offsets = [];\r\n    additionalObjects = [];\r\n\r\n    rootDictionaryObjId = newObjectDeferred();\r\n    resourceDictionaryObjId = newObjectDeferred();\r\n  };\r\n\r\n  API.__private__.setCustomOutputDestination = function(destination) {\r\n    hasCustomDestination = true;\r\n    outputDestination = destination;\r\n  };\r\n  var setOutputDestination = function(destination) {\r\n    if (!hasCustomDestination) {\r\n      outputDestination = destination;\r\n    }\r\n  };\r\n\r\n  API.__private__.resetCustomOutputDestination = function() {\r\n    hasCustomDestination = false;\r\n    outputDestination = content;\r\n  };\r\n\r\n  var out = (API.__private__.out = function(string) {\r\n    string = string.toString();\r\n    contentLength += string.length + 1;\r\n    outputDestination.push(string);\r\n\r\n    return outputDestination;\r\n  });\r\n\r\n  var write = (API.__private__.write = function(value) {\r\n    return out(\r\n      arguments.length === 1\r\n        ? value.toString()\r\n        : Array.prototype.join.call(arguments, \" \")\r\n    );\r\n  });\r\n\r\n  var getArrayBuffer = (API.__private__.getArrayBuffer = function(data) {\r\n    var len = data.length,\r\n      ab = new ArrayBuffer(len),\r\n      u8 = new Uint8Array(ab);\r\n\r\n    while (len--) u8[len] = data.charCodeAt(len);\r\n    return ab;\r\n  });\r\n\r\n  var standardFonts = [\r\n    [\"Helvetica\", \"helvetica\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Bold\", \"helvetica\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Oblique\", \"helvetica\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-BoldOblique\", \"helvetica\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Courier\", \"courier\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Bold\", \"courier\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Oblique\", \"courier\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Courier-BoldOblique\", \"courier\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Times-Roman\", \"times\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Times-Bold\", \"times\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Times-Italic\", \"times\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Times-BoldItalic\", \"times\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"ZapfDingbats\", \"zapfdingbats\", \"normal\", null],\r\n    [\"Symbol\", \"symbol\", \"normal\", null]\r\n  ];\r\n\r\n  API.__private__.getStandardFonts = function() {\r\n    return standardFonts;\r\n  };\r\n\r\n  var activeFontSize = options.fontSize || 16;\r\n\r\n  /**\r\n   * Sets font size for upcoming text elements.\r\n   *\r\n   * @param {number} size Font size in points.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFontSize\r\n   */\r\n  API.__private__.setFontSize = API.setFontSize = function(size) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      activeFontSize = size / scaleFactor;\r\n    } else {\r\n      activeFontSize = size;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets the fontsize for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number}\r\n   * @memberof jsPDF#\r\n   * @name getFontSize\r\n   */\r\n  var getFontSize = (API.__private__.getFontSize = API.getFontSize = function() {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return activeFontSize;\r\n    } else {\r\n      return activeFontSize * scaleFactor;\r\n    }\r\n  });\r\n\r\n  var R2L = options.R2L || false;\r\n\r\n  /**\r\n   * Set value of R2L functionality.\r\n   *\r\n   * @param {boolean} value\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setR2L\r\n   */\r\n  API.__private__.setR2L = API.setR2L = function(value) {\r\n    R2L = value;\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Get value of R2L functionality.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {boolean} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name getR2L\r\n   */\r\n  API.__private__.getR2L = API.getR2L = function() {\r\n    return R2L;\r\n  };\r\n\r\n  var zoomMode; // default: 1;\r\n\r\n  var setZoomMode = (API.__private__.setZoomMode = function(zoom) {\r\n    var validZoomModes = [\r\n      undefined,\r\n      null,\r\n      \"fullwidth\",\r\n      \"fullheight\",\r\n      \"fullpage\",\r\n      \"original\"\r\n    ];\r\n\r\n    if (/^(?:\\d+\\.\\d*|\\d*\\.\\d+|\\d+)%$/.test(zoom)) {\r\n      zoomMode = zoom;\r\n    } else if (!isNaN(zoom)) {\r\n      zoomMode = parseInt(zoom, 10);\r\n    } else if (validZoomModes.indexOf(zoom) !== -1) {\r\n      zoomMode = zoom;\r\n    } else {\r\n      throw new Error(\r\n        'zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. \"' +\r\n          zoom +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n  });\r\n\r\n  API.__private__.getZoomMode = function() {\r\n    return zoomMode;\r\n  };\r\n\r\n  var pageMode; // default: 'UseOutlines';\r\n  var setPageMode = (API.__private__.setPageMode = function(pmode) {\r\n    var validPageModes = [\r\n      undefined,\r\n      null,\r\n      \"UseNone\",\r\n      \"UseOutlines\",\r\n      \"UseThumbs\",\r\n      \"FullScreen\"\r\n    ];\r\n\r\n    if (validPageModes.indexOf(pmode) == -1) {\r\n      throw new Error(\r\n        'Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. \"' +\r\n          pmode +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    pageMode = pmode;\r\n  });\r\n\r\n  API.__private__.getPageMode = function() {\r\n    return pageMode;\r\n  };\r\n\r\n  var layoutMode; // default: 'continuous';\r\n  var setLayoutMode = (API.__private__.setLayoutMode = function(layout) {\r\n    var validLayoutModes = [\r\n      undefined,\r\n      null,\r\n      \"continuous\",\r\n      \"single\",\r\n      \"twoleft\",\r\n      \"tworight\",\r\n      \"two\"\r\n    ];\r\n\r\n    if (validLayoutModes.indexOf(layout) == -1) {\r\n      throw new Error(\r\n        'Layout mode must be one of continuous, single, twoleft, tworight. \"' +\r\n          layout +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    layoutMode = layout;\r\n  });\r\n\r\n  API.__private__.getLayoutMode = function() {\r\n    return layoutMode;\r\n  };\r\n\r\n  /**\r\n   * Set the display mode options of the page like zoom and layout.\r\n   *\r\n   * @name setDisplayMode\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {integer|String} zoom   You can pass an integer or percentage as\r\n   * a string. 2 will scale the document up 2x, '200%' will scale up by the\r\n   * same amount. You can also set it to 'fullwidth', 'fullheight',\r\n   * 'fullpage', or 'original'.\r\n   *\r\n   * Only certain PDF readers support this, such as Adobe Acrobat.\r\n   *\r\n   * @param {string} layout Layout mode can be: 'continuous' - this is the\r\n   * default continuous scroll. 'single' - the single page mode only shows one\r\n   * page at a time. 'twoleft' - two column left mode, first page starts on\r\n   * the left, and 'tworight' - pages are laid out in two columns, with the\r\n   * first page on the right. This would be used for books.\r\n   * @param {string} pmode 'UseOutlines' - it shows the\r\n   * outline of the document on the left. 'UseThumbs' - shows thumbnails along\r\n   * the left. 'FullScreen' - prompts the user to enter fullscreen mode.\r\n   *\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setDisplayMode = API.setDisplayMode = function(\r\n    zoom,\r\n    layout,\r\n    pmode\r\n  ) {\r\n    setZoomMode(zoom);\r\n    setLayoutMode(layout);\r\n    setPageMode(pmode);\r\n    return this;\r\n  };\r\n\r\n  var documentProperties = {\r\n    title: \"\",\r\n    subject: \"\",\r\n    author: \"\",\r\n    keywords: \"\",\r\n    creator: \"\"\r\n  };\r\n\r\n  API.__private__.getDocumentProperty = function(key) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getDocumentProperty\");\r\n    }\r\n    return documentProperties[key];\r\n  };\r\n\r\n  API.__private__.getDocumentProperties = function() {\r\n    return documentProperties;\r\n  };\r\n\r\n  /**\r\n   * Adds a properties to the PDF document.\r\n   *\r\n   * @param {Object} A property_name-to-property_value object structure.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDocumentProperties\r\n   */\r\n  API.__private__.setDocumentProperties = API.setProperties = API.setDocumentProperties = function(\r\n    properties\r\n  ) {\r\n    // copying only those properties we can render.\r\n    for (var property in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(property) && properties[property]) {\r\n        documentProperties[property] = properties[property];\r\n      }\r\n    }\r\n    return this;\r\n  };\r\n\r\n  API.__private__.setDocumentProperty = function(key, value) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setDocumentProperty\");\r\n    }\r\n    return (documentProperties[key] = value);\r\n  };\r\n\r\n  var fonts = {}; // collection of font objects, where key is fontKey - a dynamically created label for a given font.\r\n  var fontmap = {}; // mapping structure fontName > fontStyle > font key - performance layer. See addFont()\r\n  var activeFontKey; // will be string representing the KEY of the font as combination of fontName + fontStyle\r\n  var fontStateStack = []; //\r\n  var patterns = {}; // collection of pattern objects\r\n  var patternMap = {}; // see fonts\r\n  var gStates = {}; // collection of graphic state objects\r\n  var gStatesMap = {}; // see fonts\r\n  var activeGState = null;\r\n  var scaleFactor; // Scale factor\r\n  var page = 0;\r\n  var pagesContext = [];\r\n  var events = new PubSub(API);\r\n  var hotfixes = options.hotfixes || [];\r\n\r\n  var renderTargets = {};\r\n  var renderTargetMap = {};\r\n  var renderTargetStack = [];\r\n  var pageX;\r\n  var pageY;\r\n  var pageMatrix; // only used for FormObjects\r\n\r\n  /**\r\n   * A matrix object for 2D homogenous transformations: <br>\r\n   * | a b 0 | <br>\r\n   * | c d 0 | <br>\r\n   * | e f 1 | <br>\r\n   * pdf multiplies matrices righthand: v' = v x m1 x m2 x ...\r\n   *\r\n   * @class\r\n   * @name Matrix\r\n   * @param {number} sx\r\n   * @param {number} shy\r\n   * @param {number} shx\r\n   * @param {number} sy\r\n   * @param {number} tx\r\n   * @param {number} ty\r\n   * @constructor\r\n   */\r\n  var Matrix = function(sx, shy, shx, sy, tx, ty) {\r\n    if (!(this instanceof Matrix)) {\r\n      return new Matrix(sx, shy, shx, sy, tx, ty);\r\n    }\r\n\r\n    if (isNaN(sx)) sx = 1;\r\n    if (isNaN(shy)) shy = 0;\r\n    if (isNaN(shx)) shx = 0;\r\n    if (isNaN(sy)) sy = 1;\r\n    if (isNaN(tx)) tx = 0;\r\n    if (isNaN(ty)) ty = 0;\r\n\r\n    this._matrix = [sx, shy, shx, sy, tx, ty];\r\n  };\r\n\r\n  /**\r\n   * @name sx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sx\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shy\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shx\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name sy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sy\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name tx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"tx\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name ty\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"ty\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"a\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"b\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"c\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"d\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"e\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"f\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name rotation\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"rotation\", {\r\n    get: function() {\r\n      return Math.atan2(this.shx, this.sx);\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleX\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleX\", {\r\n    get: function() {\r\n      return this.decompose().scale.sx;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleY\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleY\", {\r\n    get: function() {\r\n      return this.decompose().scale.sy;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name isIdentity\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"isIdentity\", {\r\n    get: function() {\r\n      if (this.sx !== 1) {\r\n        return false;\r\n      }\r\n      if (this.shy !== 0) {\r\n        return false;\r\n      }\r\n      if (this.shx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.sy !== 1) {\r\n        return false;\r\n      }\r\n      if (this.tx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.ty !== 0) {\r\n        return false;\r\n      }\r\n      return true;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * Join the Matrix Values to a String\r\n   *\r\n   * @function join\r\n   * @param {string} separator Specifies a string to separate each pair of adjacent elements of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma (\",\"). If separator is an empty string, all elements are joined without any characters in between them.\r\n   * @returns {string} A string with all array elements joined.\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.join = function(separator) {\r\n    return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty]\r\n      .map(hpf)\r\n      .join(separator);\r\n  };\r\n\r\n  /**\r\n   * Multiply the matrix with given Matrix\r\n   *\r\n   * @function multiply\r\n   * @param matrix\r\n   * @returns {Matrix}\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.multiply = function(matrix) {\r\n    var sx = matrix.sx * this.sx + matrix.shy * this.shx;\r\n    var shy = matrix.sx * this.shy + matrix.shy * this.sy;\r\n    var shx = matrix.shx * this.sx + matrix.sy * this.shx;\r\n    var sy = matrix.shx * this.shy + matrix.sy * this.sy;\r\n    var tx = matrix.tx * this.sx + matrix.ty * this.shx + this.tx;\r\n    var ty = matrix.tx * this.shy + matrix.ty * this.sy + this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  /**\r\n   * @function decompose\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.decompose = function() {\r\n    var a = this.sx;\r\n    var b = this.shy;\r\n    var c = this.shx;\r\n    var d = this.sy;\r\n    var e = this.tx;\r\n    var f = this.ty;\r\n\r\n    var scaleX = Math.sqrt(a * a + b * b);\r\n    a /= scaleX;\r\n    b /= scaleX;\r\n\r\n    var shear = a * c + b * d;\r\n    c -= a * shear;\r\n    d -= b * shear;\r\n\r\n    var scaleY = Math.sqrt(c * c + d * d);\r\n    c /= scaleY;\r\n    d /= scaleY;\r\n    shear /= scaleY;\r\n\r\n    if (a * d < b * c) {\r\n      a = -a;\r\n      b = -b;\r\n      shear = -shear;\r\n      scaleX = -scaleX;\r\n    }\r\n\r\n    return {\r\n      scale: new Matrix(scaleX, 0, 0, scaleY, 0, 0),\r\n      translate: new Matrix(1, 0, 0, 1, e, f),\r\n      rotate: new Matrix(a, b, -b, a, 0, 0),\r\n      skew: new Matrix(1, 0, shear, 1, 0, 0)\r\n    };\r\n  };\r\n\r\n  /**\r\n   * @function toString\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.toString = function(parmPrecision) {\r\n    return this.join(\" \");\r\n  };\r\n\r\n  /**\r\n   * @function inversed\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.inversed = function() {\r\n    var a = this.sx,\r\n      b = this.shy,\r\n      c = this.shx,\r\n      d = this.sy,\r\n      e = this.tx,\r\n      f = this.ty;\r\n\r\n    var quot = 1 / (a * d - b * c);\r\n\r\n    var aInv = d * quot;\r\n    var bInv = -b * quot;\r\n    var cInv = -c * quot;\r\n    var dInv = a * quot;\r\n    var eInv = -aInv * e - cInv * f;\r\n    var fInv = -bInv * e - dInv * f;\r\n\r\n    return new Matrix(aInv, bInv, cInv, dInv, eInv, fInv);\r\n  };\r\n\r\n  /**\r\n   * @function applyToPoint\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToPoint = function(pt) {\r\n    var x = pt.x * this.sx + pt.y * this.shx + this.tx;\r\n    var y = pt.x * this.shy + pt.y * this.sy + this.ty;\r\n    return new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * @function applyToRectangle\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToRectangle = function(rect) {\r\n    var pt1 = this.applyToPoint(rect);\r\n    var pt2 = this.applyToPoint(new Point(rect.x + rect.w, rect.y + rect.h));\r\n    return new Rectangle(pt1.x, pt1.y, pt2.x - pt1.x, pt2.y - pt1.y);\r\n  };\r\n\r\n  /**\r\n   * Clone the Matrix\r\n   *\r\n   * @function clone\r\n   * @memberof Matrix#\r\n   * @name clone\r\n   * @instance\r\n   */\r\n  Matrix.prototype.clone = function() {\r\n    var sx = this.sx;\r\n    var shy = this.shy;\r\n    var shx = this.shx;\r\n    var sy = this.sy;\r\n    var tx = this.tx;\r\n    var ty = this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  API.Matrix = Matrix;\r\n\r\n  /**\r\n   * Multiplies two matrices. (see {@link Matrix})\r\n   * @param {Matrix} m1\r\n   * @param {Matrix} m2\r\n   * @memberof jsPDF#\r\n   * @name matrixMult\r\n   */\r\n  var matrixMult = (API.matrixMult = function(m1, m2) {\r\n    return m2.multiply(m1);\r\n  });\r\n\r\n  /**\r\n   * The identity matrix (equivalent to new Matrix(1, 0, 0, 1, 0, 0)).\r\n   * @type {Matrix}\r\n   * @memberof! jsPDF#\r\n   * @name identityMatrix\r\n   */\r\n  var identityMatrix = new Matrix(1, 0, 0, 1, 0, 0);\r\n  API.unitMatrix = API.identityMatrix = identityMatrix;\r\n\r\n  /**\r\n   * Adds a new pattern for later use.\r\n   * @param {String} key The key by it can be referenced later. The keys must be unique!\r\n   * @param {API.Pattern} pattern The pattern\r\n   */\r\n  var addPattern = function(key, pattern) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (patternMap[key]) return;\r\n\r\n    var prefix = pattern instanceof ShadingPattern ? \"Sh\" : \"P\";\r\n    var patternKey = prefix + (Object.keys(patterns).length + 1).toString(10);\r\n    pattern.id = patternKey;\r\n\r\n    patternMap[key] = patternKey;\r\n    patterns[patternKey] = pattern;\r\n\r\n    events.publish(\"addPattern\", pattern);\r\n  };\r\n\r\n  /**\r\n   * A pattern describing a shading pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {String} type One of \"axial\" or \"radial\"\r\n   * @param {Array<Number>} coords Either [x1, y1, x2, y2] for \"axial\" type describing the two interpolation points\r\n   * or [x1, y1, r, x2, y2, r2] for \"radial\" describing inner and the outer circle.\r\n   * @param {Array<Object>} colors An array of objects with the fields \"offset\" and \"color\". \"offset\" describes\r\n   * the offset in parameter space [0, 1]. \"color\" is an array of length 3 describing RGB values in [0, 255].\r\n   * @param {GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.ShadingPattern = ShadingPattern;\r\n\r\n  /**\r\n   * A PDF Tiling pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {Array.<Number>} boundingBox The bounding box at which one pattern cell gets clipped.\r\n   * @param {Number} xStep Horizontal spacing between pattern cells.\r\n   * @param {Number} yStep Vertical spacing between pattern cells.\r\n   * @param {API.GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.TilingPattern = TilingPattern;\r\n\r\n  /**\r\n   * Adds a new {@link API.ShadingPattern} for later use. Only available in \"advanced\" API mode.\r\n   * @param {String} key\r\n   * @param {Pattern} pattern\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name addPattern\r\n   */\r\n  API.addShadingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"addShadingPattern()\");\r\n\r\n    addPattern(key, pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Begins a new tiling pattern. All subsequent render calls are drawn to this pattern until {@link API.endTilingPattern}\r\n   * gets called. Only available in \"advanced\" API mode.\r\n   * @param {API.Pattern} pattern\r\n   * @memberof jsPDF#\r\n   * @name beginTilingPattern\r\n   */\r\n  API.beginTilingPattern = function(pattern) {\r\n    advancedApiModeTrap(\"beginTilingPattern()\");\r\n\r\n    beginNewRenderTarget(\r\n      pattern.boundingBox[0],\r\n      pattern.boundingBox[1],\r\n      pattern.boundingBox[2] - pattern.boundingBox[0],\r\n      pattern.boundingBox[3] - pattern.boundingBox[1],\r\n      pattern.matrix\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Ends a tiling pattern and sets the render target to the one active before {@link API.beginTilingPattern} has been called.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {string} key A unique key that is used to reference this pattern at later use.\r\n   * @param {API.Pattern} pattern The pattern to end.\r\n   * @memberof jsPDF#\r\n   * @name endTilingPattern\r\n   */\r\n  API.endTilingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"endTilingPattern()\");\r\n\r\n    // retrieve the stream\r\n    pattern.stream = pages[currentPage].join(\"\\n\");\r\n\r\n    addPattern(key, pattern);\r\n\r\n    events.publish(\"endTilingPattern\", pattern);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  var newObject = (API.__private__.newObject = function() {\r\n    var oid = newObjectDeferred();\r\n    newObjectDeferredBegin(oid, true);\r\n    return oid;\r\n  });\r\n\r\n  // Does not output the object.  The caller must call newObjectDeferredBegin(oid) before outputing any data\r\n  var newObjectDeferred = (API.__private__.newObjectDeferred = function() {\r\n    objectNumber++;\r\n    offsets[objectNumber] = function() {\r\n      return contentLength;\r\n    };\r\n    return objectNumber;\r\n  });\r\n\r\n  var newObjectDeferredBegin = function(oid, doOutput) {\r\n    doOutput = typeof doOutput === \"boolean\" ? doOutput : false;\r\n    offsets[oid] = contentLength;\r\n    if (doOutput) {\r\n      out(oid + \" 0 obj\");\r\n    }\r\n    return oid;\r\n  };\r\n  // Does not output the object until after the pages have been output.\r\n  // Returns an object containing the objectId and content.\r\n  // All pages have been added so the object ID can be estimated to start right after.\r\n  // This does not modify the current objectNumber;  It must be updated after the newObjects are output.\r\n  var newAdditionalObject = (API.__private__.newAdditionalObject = function() {\r\n    var objId = newObjectDeferred();\r\n    var obj = {\r\n      objId: objId,\r\n      content: \"\"\r\n    };\r\n    additionalObjects.push(obj);\r\n    return obj;\r\n  });\r\n\r\n  var rootDictionaryObjId = newObjectDeferred();\r\n  var resourceDictionaryObjId = newObjectDeferred();\r\n\r\n  /////////////////////\r\n  // Private functions\r\n  /////////////////////\r\n\r\n  var decodeColorString = (API.__private__.decodeColorString = function(color) {\r\n    var colorEncoded = color.split(\" \");\r\n    if (\r\n      colorEncoded.length === 2 &&\r\n      (colorEncoded[1] === \"g\" || colorEncoded[1] === \"G\")\r\n    ) {\r\n      // convert grayscale value to rgb so that it can be converted to hex for consistency\r\n      var floatVal = parseFloat(colorEncoded[0]);\r\n      colorEncoded = [floatVal, floatVal, floatVal, \"r\"];\r\n    } else if (\r\n      colorEncoded.length === 5 &&\r\n      (colorEncoded[4] === \"k\" || colorEncoded[4] === \"K\")\r\n    ) {\r\n      // convert CMYK values to rbg so that it can be converted to hex for consistency\r\n      var red = (1.0 - colorEncoded[0]) * (1.0 - colorEncoded[3]);\r\n      var green = (1.0 - colorEncoded[1]) * (1.0 - colorEncoded[3]);\r\n      var blue = (1.0 - colorEncoded[2]) * (1.0 - colorEncoded[3]);\r\n\r\n      colorEncoded = [red, green, blue, \"r\"];\r\n    }\r\n    var colorAsRGB = \"#\";\r\n    for (var i = 0; i < 3; i++) {\r\n      colorAsRGB += (\r\n        \"0\" + Math.floor(parseFloat(colorEncoded[i]) * 255).toString(16)\r\n      ).slice(-2);\r\n    }\r\n    return colorAsRGB;\r\n  });\r\n\r\n  var encodeColorString = (API.__private__.encodeColorString = function(\r\n    options\r\n  ) {\r\n    var color;\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        ch1: options\r\n      };\r\n    }\r\n    var ch1 = options.ch1;\r\n    var ch2 = options.ch2;\r\n    var ch3 = options.ch3;\r\n    var ch4 = options.ch4;\r\n    var letterArray =\r\n      options.pdfColorType === \"draw\" ? [\"G\", \"RG\", \"K\"] : [\"g\", \"rg\", \"k\"];\r\n\r\n    if (typeof ch1 === \"string\" && ch1.charAt(0) !== \"#\") {\r\n      var rgbColor = new RGBColor(ch1);\r\n      if (rgbColor.ok) {\r\n        ch1 = rgbColor.toHex();\r\n      } else if (!/^\\d*\\.?\\d*$/.test(ch1)) {\r\n        throw new Error(\r\n          'Invalid color \"' + ch1 + '\" passed to jsPDF.encodeColorString.'\r\n        );\r\n      }\r\n    }\r\n    //convert short rgb to long form\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{3}$/.test(ch1)) {\r\n      ch1 = \"#\" + ch1[1] + ch1[1] + ch1[2] + ch1[2] + ch1[3] + ch1[3];\r\n    }\r\n\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{6}$/.test(ch1)) {\r\n      var hex = parseInt(ch1.substr(1), 16);\r\n      ch1 = (hex >> 16) & 255;\r\n      ch2 = (hex >> 8) & 255;\r\n      ch3 = hex & 255;\r\n    }\r\n\r\n    if (\r\n      typeof ch2 === \"undefined\" ||\r\n      (typeof ch4 === \"undefined\" && ch1 === ch2 && ch2 === ch3)\r\n    ) {\r\n      // Gray color space.\r\n      if (typeof ch1 === \"string\") {\r\n        color = ch1 + \" \" + letterArray[0];\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = f2(ch1 / 255) + \" \" + letterArray[0];\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = f3(ch1 / 255) + \" \" + letterArray[0];\r\n        }\r\n      }\r\n    } else if (typeof ch4 === \"undefined\" || typeof ch4 === \"object\") {\r\n      // assume RGBA\r\n      if (ch4 && !isNaN(ch4.a)) {\r\n        //TODO Implement transparency.\r\n        //WORKAROUND use white for now, if transparent, otherwise handle as rgb\r\n        if (ch4.a === 0) {\r\n          color = [\"1.\", \"1.\", \"1.\", letterArray[1]].join(\" \");\r\n          return color;\r\n        }\r\n      }\r\n      // assume RGB\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, letterArray[1]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [\r\n              f2(ch1 / 255),\r\n              f2(ch2 / 255),\r\n              f2(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n            break;\r\n          default:\r\n          case 3:\r\n            color = [\r\n              f3(ch1 / 255),\r\n              f3(ch2 / 255),\r\n              f3(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n        }\r\n      }\r\n    } else {\r\n      // assume CMYK\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, ch4, letterArray[2]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = [f3(ch1), f3(ch2), f3(ch3), f3(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n        }\r\n      }\r\n    }\r\n    return color;\r\n  });\r\n\r\n  var getFilters = (API.__private__.getFilters = function() {\r\n    return filters;\r\n  });\r\n\r\n  var putStream = (API.__private__.putStream = function(options) {\r\n    options = options || {};\r\n    var data = options.data || \"\";\r\n    var filters = options.filters || getFilters();\r\n    var alreadyAppliedFilters = options.alreadyAppliedFilters || [];\r\n    var addLength1 = options.addLength1 || false;\r\n    var valueOfLength1 = data.length;\r\n    var objectId = options.objectId;\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null && typeof objectId == \"undefined\") {\r\n      throw new Error(\r\n        \"ObjectId must be passed to putStream for file encryption\"\r\n      );\r\n    }\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n\r\n    var processedData = {};\r\n    if (filters === true) {\r\n      filters = [\"FlateEncode\"];\r\n    }\r\n    var keyValues = options.additionalKeyValues || [];\r\n    if (typeof jsPDF.API.processDataByFilters !== \"undefined\") {\r\n      processedData = jsPDF.API.processDataByFilters(data, filters);\r\n    } else {\r\n      processedData = { data: data, reverseChain: [] };\r\n    }\r\n    var filterAsString =\r\n      processedData.reverseChain +\r\n      (Array.isArray(alreadyAppliedFilters)\r\n        ? alreadyAppliedFilters.join(\" \")\r\n        : alreadyAppliedFilters.toString());\r\n\r\n    if (processedData.data.length !== 0) {\r\n      keyValues.push({\r\n        key: \"Length\",\r\n        value: processedData.data.length\r\n      });\r\n      if (addLength1 === true) {\r\n        keyValues.push({\r\n          key: \"Length1\",\r\n          value: valueOfLength1\r\n        });\r\n      }\r\n    }\r\n\r\n    if (filterAsString.length != 0) {\r\n      if (filterAsString.split(\"/\").length - 1 === 1) {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: filterAsString\r\n        });\r\n      } else {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: \"[\" + filterAsString + \"]\"\r\n        });\r\n\r\n        for (var j = 0; j < keyValues.length; j += 1) {\r\n          if (keyValues[j].key === \"DecodeParms\") {\r\n            var decodeParmsArray = [];\r\n\r\n            for (\r\n              var i = 0;\r\n              i < processedData.reverseChain.split(\"/\").length - 1;\r\n              i += 1\r\n            ) {\r\n              decodeParmsArray.push(\"null\");\r\n            }\r\n\r\n            decodeParmsArray.push(keyValues[j].value);\r\n            keyValues[j].value = \"[\" + decodeParmsArray.join(\" \") + \"]\";\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    out(\"<<\");\r\n    for (var k = 0; k < keyValues.length; k++) {\r\n      out(\"/\" + keyValues[k].key + \" \" + keyValues[k].value);\r\n    }\r\n    out(\">>\");\r\n    if (processedData.data.length !== 0) {\r\n      out(\"stream\");\r\n      out(encryptor(processedData.data));\r\n      out(\"endstream\");\r\n    }\r\n  });\r\n\r\n  var putPage = (API.__private__.putPage = function(page) {\r\n    var pageNumber = page.number;\r\n    var data = page.data;\r\n    var pageObjectNumber = page.objId;\r\n    var pageContentsObjId = page.contentsObjId;\r\n\r\n    newObjectDeferredBegin(pageObjectNumber, true);\r\n    out(\"<</Type /Page\");\r\n    out(\"/Parent \" + page.rootDictionaryObjId + \" 0 R\");\r\n    out(\"/Resources \" + page.resourceDictionaryObjId + \" 0 R\");\r\n    out(\r\n      \"/MediaBox [\" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftX)) +\r\n        \" \" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftY)) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightX) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightY) +\r\n        \"]\"\r\n    );\r\n    if (page.cropBox !== null) {\r\n      out(\r\n        \"/CropBox [\" +\r\n          hpf(page.cropBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.cropBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.bleedBox !== null) {\r\n      out(\r\n        \"/BleedBox [\" +\r\n          hpf(page.bleedBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.trimBox !== null) {\r\n      out(\r\n        \"/TrimBox [\" +\r\n          hpf(page.trimBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.trimBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.artBox !== null) {\r\n      out(\r\n        \"/ArtBox [\" +\r\n          hpf(page.artBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.artBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (typeof page.userUnit === \"number\" && page.userUnit !== 1.0) {\r\n      out(\"/UserUnit \" + page.userUnit);\r\n    }\r\n\r\n    events.publish(\"putPage\", {\r\n      objId: pageObjectNumber,\r\n      pageContext: pagesContext[pageNumber],\r\n      pageNumber: pageNumber,\r\n      page: data\r\n    });\r\n    out(\"/Contents \" + pageContentsObjId + \" 0 R\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    // Page content\r\n    var pageContent = data.join(\"\\n\");\r\n\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      // if the user forgot to switch back to COMPAT mode, we must balance the graphics stack again\r\n      pageContent += \"\\nQ\";\r\n    }\r\n\r\n    newObjectDeferredBegin(pageContentsObjId, true);\r\n    putStream({\r\n      data: pageContent,\r\n      filters: getFilters(),\r\n      objectId: pageContentsObjId\r\n    });\r\n    out(\"endobj\");\r\n    return pageObjectNumber;\r\n  });\r\n\r\n  var putPages = (API.__private__.putPages = function() {\r\n    var n,\r\n      i,\r\n      pageObjectNumbers = [];\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pagesContext[n].objId = newObjectDeferred();\r\n      pagesContext[n].contentsObjId = newObjectDeferred();\r\n    }\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pageObjectNumbers.push(\r\n        putPage({\r\n          number: n,\r\n          data: pages[n],\r\n          objId: pagesContext[n].objId,\r\n          contentsObjId: pagesContext[n].contentsObjId,\r\n          mediaBox: pagesContext[n].mediaBox,\r\n          cropBox: pagesContext[n].cropBox,\r\n          bleedBox: pagesContext[n].bleedBox,\r\n          trimBox: pagesContext[n].trimBox,\r\n          artBox: pagesContext[n].artBox,\r\n          userUnit: pagesContext[n].userUnit,\r\n          rootDictionaryObjId: rootDictionaryObjId,\r\n          resourceDictionaryObjId: resourceDictionaryObjId\r\n        })\r\n      );\r\n    }\r\n    newObjectDeferredBegin(rootDictionaryObjId, true);\r\n    out(\"<</Type /Pages\");\r\n    var kids = \"/Kids [\";\r\n    for (i = 0; i < page; i++) {\r\n      kids += pageObjectNumbers[i] + \" 0 R \";\r\n    }\r\n    out(kids + \"]\");\r\n    out(\"/Count \" + page);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    events.publish(\"postPutPages\");\r\n  });\r\n\r\n  var putFont = function(font) {\r\n    events.publish(\"putFont\", {\r\n      font: font,\r\n      out: out,\r\n      newObject: newObject,\r\n      putStream: putStream\r\n    });\r\n\r\n    if (font.isAlreadyPutted !== true) {\r\n      font.objectNumber = newObject();\r\n      out(\"<<\");\r\n      out(\"/Type /Font\");\r\n      out(\"/BaseFont /\" + toPDFName(font.postScriptName));\r\n      out(\"/Subtype /Type1\");\r\n      if (typeof font.encoding === \"string\") {\r\n        out(\"/Encoding /\" + font.encoding);\r\n      }\r\n      out(\"/FirstChar 32\");\r\n      out(\"/LastChar 255\");\r\n      out(\">>\");\r\n      out(\"endobj\");\r\n    }\r\n  };\r\n\r\n  var putFonts = function() {\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          putFont(fonts[fontKey]);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXObject = function(xObject) {\r\n    xObject.objectNumber = newObject();\r\n\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/XObject\" });\r\n    options.push({ key: \"Subtype\", value: \"/Form\" });\r\n    options.push({\r\n      key: \"BBox\",\r\n      value:\r\n        \"[\" +\r\n        [\r\n          hpf(xObject.x),\r\n          hpf(xObject.y),\r\n          hpf(xObject.x + xObject.width),\r\n          hpf(xObject.y + xObject.height)\r\n        ].join(\" \") +\r\n        \"]\"\r\n    });\r\n    options.push({\r\n      key: \"Matrix\",\r\n      value: \"[\" + xObject.matrix.toString() + \"]\"\r\n    });\r\n    // TODO: /Resources\r\n\r\n    var stream = xObject.pages[1].join(\"\\n\");\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      objectId: xObject.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putXObjects = function() {\r\n    for (var xObjectKey in renderTargets) {\r\n      if (renderTargets.hasOwnProperty(xObjectKey)) {\r\n        putXObject(renderTargets[xObjectKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var interpolateAndEncodeRGBStream = function(colors, numberSamples) {\r\n    var tValues = [];\r\n    var t;\r\n    var dT = 1.0 / (numberSamples - 1);\r\n    for (t = 0.0; t < 1.0; t += dT) {\r\n      tValues.push(t);\r\n    }\r\n    tValues.push(1.0);\r\n    // add first and last control point if not present\r\n    if (colors[0].offset != 0.0) {\r\n      var c0 = {\r\n        offset: 0.0,\r\n        color: colors[0].color\r\n      };\r\n      colors.unshift(c0);\r\n    }\r\n    if (colors[colors.length - 1].offset != 1.0) {\r\n      var c1 = {\r\n        offset: 1.0,\r\n        color: colors[colors.length - 1].color\r\n      };\r\n      colors.push(c1);\r\n    }\r\n    var out = \"\";\r\n    var index = 0;\r\n\r\n    for (var i = 0; i < tValues.length; i++) {\r\n      t = tValues[i];\r\n      while (t > colors[index + 1].offset) index++;\r\n      var a = colors[index].offset;\r\n      var b = colors[index + 1].offset;\r\n      var d = (t - a) / (b - a);\r\n\r\n      var aColor = colors[index].color;\r\n      var bColor = colors[index + 1].color;\r\n\r\n      out +=\r\n        padd2Hex(Math.round((1 - d) * aColor[0] + d * bColor[0]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[1] + d * bColor[1]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[2] + d * bColor[2]).toString(16));\r\n    }\r\n    return out.trim();\r\n  };\r\n\r\n  var putShadingPattern = function(pattern, numberSamples) {\r\n    /*\r\n       Axial patterns shade between the two points specified in coords, radial patterns between the inner\r\n       and outer circle.\r\n       The user can specify an array (colors) that maps t-Values in [0, 1] to RGB colors. These are now\r\n       interpolated to equidistant samples and written to pdf as a sample (type 0) function.\r\n       */\r\n    // The number of color samples that should be used to describe the shading.\r\n    // The higher, the more accurate the gradient will be.\r\n    numberSamples || (numberSamples = 21);\r\n    var funcObjectNumber = newObject();\r\n    var stream = interpolateAndEncodeRGBStream(pattern.colors, numberSamples);\r\n\r\n    var options = [];\r\n    options.push({ key: \"FunctionType\", value: \"0\" });\r\n    options.push({ key: \"Domain\", value: \"[0.0 1.0]\" });\r\n    options.push({ key: \"Size\", value: \"[\" + numberSamples + \"]\" });\r\n    options.push({ key: \"BitsPerSample\", value: \"8\" });\r\n    options.push({ key: \"Range\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n    options.push({ key: \"Decode\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      alreadyAppliedFilters: [\"/ASCIIHexDecode\"],\r\n      objectId: funcObjectNumber\r\n    });\r\n    out(\"endobj\");\r\n\r\n    pattern.objectNumber = newObject();\r\n    out(\"<< /ShadingType \" + pattern.type);\r\n    out(\"/ColorSpace /DeviceRGB\");\r\n    var coords =\r\n      \"/Coords [\" +\r\n      hpf(parseFloat(pattern.coords[0])) +\r\n      \" \" + // x1\r\n      hpf(parseFloat(pattern.coords[1])) +\r\n      \" \"; // y1\r\n    if (pattern.type === 2) {\r\n      // axial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[3])); // y2\r\n    } else {\r\n      // radial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // r1\r\n        hpf(parseFloat(pattern.coords[3])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[4])) +\r\n        \" \" + // y2\r\n        hpf(parseFloat(pattern.coords[5])); // r2\r\n    }\r\n    coords += \"]\";\r\n    out(coords);\r\n\r\n    if (pattern.matrix) {\r\n      out(\"/Matrix [\" + pattern.matrix.toString() + \"]\");\r\n    }\r\n    out(\"/Function \" + funcObjectNumber + \" 0 R\");\r\n    out(\"/Extend [true true]\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putTilingPattern = function(pattern, deferredResourceDictionaryIds) {\r\n    var resourcesObjectId = newObjectDeferred();\r\n    var patternObjectId = newObject();\r\n\r\n    deferredResourceDictionaryIds.push({\r\n      resourcesOid: resourcesObjectId,\r\n      objectOid: patternObjectId\r\n    });\r\n\r\n    pattern.objectNumber = patternObjectId;\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/Pattern\" });\r\n    options.push({ key: \"PatternType\", value: \"1\" }); // tiling pattern\r\n    options.push({ key: \"PaintType\", value: \"1\" }); // colored tiling pattern\r\n    options.push({ key: \"TilingType\", value: \"1\" }); // constant spacing\r\n    options.push({\r\n      key: \"BBox\",\r\n      value: \"[\" + pattern.boundingBox.map(hpf).join(\" \") + \"]\"\r\n    });\r\n    options.push({ key: \"XStep\", value: hpf(pattern.xStep) });\r\n    options.push({ key: \"YStep\", value: hpf(pattern.yStep) });\r\n    options.push({ key: \"Resources\", value: resourcesObjectId + \" 0 R\" });\r\n    if (pattern.matrix) {\r\n      options.push({\r\n        key: \"Matrix\",\r\n        value: \"[\" + pattern.matrix.toString() + \"]\"\r\n      });\r\n    }\r\n\r\n    putStream({\r\n      data: pattern.stream,\r\n      additionalKeyValues: options,\r\n      objectId: pattern.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putPatterns = function(deferredResourceDictionaryIds) {\r\n    var patternKey;\r\n    for (patternKey in patterns) {\r\n      if (patterns.hasOwnProperty(patternKey)) {\r\n        if (patterns[patternKey] instanceof ShadingPattern) {\r\n          putShadingPattern(patterns[patternKey]);\r\n        } else if (patterns[patternKey] instanceof TilingPattern) {\r\n          putTilingPattern(patterns[patternKey], deferredResourceDictionaryIds);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putGState = function(gState) {\r\n    gState.objectNumber = newObject();\r\n    out(\"<<\");\r\n    for (var p in gState) {\r\n      switch (p) {\r\n        case \"opacity\":\r\n          out(\"/ca \" + f2(gState[p]));\r\n          break;\r\n        case \"stroke-opacity\":\r\n          out(\"/CA \" + f2(gState[p]));\r\n          break;\r\n      }\r\n    }\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putGStates = function() {\r\n    var gStateKey;\r\n    for (gStateKey in gStates) {\r\n      if (gStates.hasOwnProperty(gStateKey)) {\r\n        putGState(gStates[gStateKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXobjectDict = function() {\r\n    out(\"/XObject <<\");\r\n    for (var xObjectKey in renderTargets) {\r\n      if (\r\n        renderTargets.hasOwnProperty(xObjectKey) &&\r\n        renderTargets[xObjectKey].objectNumber >= 0\r\n      ) {\r\n        out(\r\n          \"/\" +\r\n            xObjectKey +\r\n            \" \" +\r\n            renderTargets[xObjectKey].objectNumber +\r\n            \" 0 R\"\r\n        );\r\n      }\r\n    }\r\n\r\n    // Loop through images, or other data objects\r\n    events.publish(\"putXobjectDict\");\r\n    out(\">>\");\r\n  };\r\n\r\n  var putEncryptionDict = function() {\r\n    encryption.oid = newObject();\r\n    out(\"<<\");\r\n    out(\"/Filter /Standard\");\r\n    out(\"/V \" + encryption.v);\r\n    out(\"/R \" + encryption.r);\r\n    out(\"/U <\" + encryption.toHexString(encryption.U) + \">\");\r\n    out(\"/O <\" + encryption.toHexString(encryption.O) + \">\");\r\n    out(\"/P \" + encryption.P);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putFontDict = function() {\r\n    out(\"/Font <<\");\r\n\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          out(\"/\" + fontKey + \" \" + fonts[fontKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n    }\r\n    out(\">>\");\r\n  };\r\n\r\n  var putShadingPatternDict = function() {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Shading <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof ShadingPattern &&\r\n          patterns[patternKey].objectNumber >= 0\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n\r\n      events.publish(\"putShadingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putTilingPatternDict = function(objectOid) {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Pattern <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof API.TilingPattern &&\r\n          patterns[patternKey].objectNumber >= 0 &&\r\n          patterns[patternKey].objectNumber < objectOid // prevent cyclic dependencies\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n      events.publish(\"putTilingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putGStatesDict = function() {\r\n    if (Object.keys(gStates).length > 0) {\r\n      var gStateKey;\r\n      out(\"/ExtGState <<\");\r\n      for (gStateKey in gStates) {\r\n        if (\r\n          gStates.hasOwnProperty(gStateKey) &&\r\n          gStates[gStateKey].objectNumber >= 0\r\n        ) {\r\n          out(\"/\" + gStateKey + \" \" + gStates[gStateKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n\r\n      events.publish(\"putGStateDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putResourceDictionary = function(objectIds) {\r\n    newObjectDeferredBegin(objectIds.resourcesOid, true);\r\n    out(\"<<\");\r\n    out(\"/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\");\r\n    putFontDict();\r\n    putShadingPatternDict();\r\n    putTilingPatternDict(objectIds.objectOid);\r\n    putGStatesDict();\r\n    putXobjectDict();\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putResources = function() {\r\n    // FormObjects, Patterns etc. might use other FormObjects/Patterns/Images\r\n    // which means their resource dictionaries must contain the already resolved\r\n    // object ids. For this reason we defer the serialization of the resource\r\n    // dicts until all objects have been serialized and have object ids.\r\n    //\r\n    // In order to prevent cyclic dependencies (which Adobe Reader doesn't like),\r\n    // we only put all oids that are smaller than the oid of the object the\r\n    // resource dict belongs to. This is correct behavior, since the streams\r\n    // may only use other objects that have already been defined and thus appear\r\n    // earlier in their respective collection.\r\n    // Currently, this only affects tiling patterns, but a (more) correct\r\n    // implementation of FormObjects would also define their own resource dicts.\r\n    var deferredResourceDictionaryIds = [];\r\n\r\n    putFonts();\r\n    putGStates();\r\n    putXObjects();\r\n    putPatterns(deferredResourceDictionaryIds);\r\n\r\n    events.publish(\"putResources\");\r\n    deferredResourceDictionaryIds.forEach(putResourceDictionary);\r\n    putResourceDictionary({\r\n      resourcesOid: resourceDictionaryObjId,\r\n      objectOid: Number.MAX_SAFE_INTEGER // output all objects\r\n    });\r\n    events.publish(\"postPutResources\");\r\n  };\r\n\r\n  var putAdditionalObjects = function() {\r\n    events.publish(\"putAdditionalObjects\");\r\n    for (var i = 0; i < additionalObjects.length; i++) {\r\n      var obj = additionalObjects[i];\r\n      newObjectDeferredBegin(obj.objId, true);\r\n      out(obj.content);\r\n      out(\"endobj\");\r\n    }\r\n    events.publish(\"postPutAdditionalObjects\");\r\n  };\r\n\r\n  var addFontToFontDictionary = function(font) {\r\n    fontmap[font.fontName] = fontmap[font.fontName] || {};\r\n    fontmap[font.fontName][font.fontStyle] = font.id;\r\n  };\r\n\r\n  var addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    encoding,\r\n    isStandardFont\r\n  ) {\r\n    var font = {\r\n      id: \"F\" + (Object.keys(fonts).length + 1).toString(10),\r\n      postScriptName: postScriptName,\r\n      fontName: fontName,\r\n      fontStyle: fontStyle,\r\n      encoding: encoding,\r\n      isStandardFont: isStandardFont || false,\r\n      metadata: {}\r\n    };\r\n\r\n    events.publish(\"addFont\", {\r\n      font: font,\r\n      instance: this\r\n    });\r\n\r\n    fonts[font.id] = font;\r\n    addFontToFontDictionary(font);\r\n    return font.id;\r\n  };\r\n\r\n  var addFonts = function(arrayOfFonts) {\r\n    for (var i = 0, l = standardFonts.length; i < l; i++) {\r\n      var fontKey = addFont.call(\r\n        this,\r\n        arrayOfFonts[i][0],\r\n        arrayOfFonts[i][1],\r\n        arrayOfFonts[i][2],\r\n        standardFonts[i][3],\r\n        true\r\n      );\r\n\r\n      if (putOnlyUsedFonts === false) {\r\n        usedFonts[fontKey] = true;\r\n      }\r\n      // adding aliases for standard fonts, this time matching the capitalization\r\n      var parts = arrayOfFonts[i][0].split(\"-\");\r\n      addFontToFontDictionary({\r\n        id: fontKey,\r\n        fontName: parts[0],\r\n        fontStyle: parts[1] || \"\"\r\n      });\r\n    }\r\n    events.publish(\"addFonts\", {\r\n      fonts: fonts,\r\n      dictionary: fontmap\r\n    });\r\n  };\r\n\r\n  var SAFE = function __safeCall(fn) {\r\n    fn.foo = function __safeCallWrapper() {\r\n      try {\r\n        return fn.apply(this, arguments);\r\n      } catch (e) {\r\n        var stack = e.stack || \"\";\r\n        if (~stack.indexOf(\" at \")) stack = stack.split(\" at \")[1];\r\n        var m =\r\n          \"Error in function \" +\r\n          stack.split(\"\\n\")[0].split(\"<\")[0] +\r\n          \": \" +\r\n          e.message;\r\n        if (globalObject.console) {\r\n          globalObject.console.error(m, e);\r\n          if (globalObject.alert) alert(m);\r\n        } else {\r\n          throw new Error(m);\r\n        }\r\n      }\r\n    };\r\n    fn.foo.bar = fn;\r\n    return fn.foo;\r\n  };\r\n\r\n  var to8bitStream = function(text, flags) {\r\n    /**\r\n     * PDF 1.3 spec:\r\n     * \"For text strings encoded in Unicode, the first two bytes must be 254 followed by\r\n     * 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts\r\n     * with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely\r\n     * to be a meaningful beginning of a word or phrase.) The remainder of the\r\n     * string consists of Unicode character codes, according to the UTF-16 encoding\r\n     * specified in the Unicode standard, version 2.0. Commonly used Unicode values\r\n     * are represented as 2 bytes per character, with the high-order byte appearing first\r\n     * in the string.\"\r\n     *\r\n     * In other words, if there are chars in a string with char code above 255, we\r\n     * recode the string to UCS2 BE - string doubles in length and BOM is prepended.\r\n     *\r\n     * HOWEVER!\r\n     * Actual *content* (body) text (as opposed to strings used in document properties etc)\r\n     * does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)\r\n     *\r\n     * Because of Adobe's focus on \"you subset your fonts!\" you are not supposed to have\r\n     * a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could\r\n     * fudge it with \"Identity-H\" encoding and custom CIDtoGID map that mimics Unicode\r\n     * code page. There, however, all characters in the stream are treated as GIDs,\r\n     * including BOM, which is the reason we need to skip BOM in content text (i.e. that\r\n     * that is tied to a font).\r\n     *\r\n     * To signal this \"special\" PDFEscape / to8bitStream handling mode,\r\n     * API.text() function sets (unless you overwrite it with manual values\r\n     * given to API.text(.., flags) )\r\n     * flags.autoencode = true\r\n     * flags.noBOM = true\r\n     *\r\n     * ===================================================================================\r\n     * `flags` properties relied upon:\r\n     *   .sourceEncoding = string with encoding label.\r\n     *                     \"Unicode\" by default. = encoding of the incoming text.\r\n     *                     pass some non-existing encoding name\r\n     *                     (ex: 'Do not touch my strings! I know what I am doing.')\r\n     *                     to make encoding code skip the encoding step.\r\n     *   .outputEncoding = Either valid PDF encoding name\r\n     *                     (must be supported by jsPDF font metrics, otherwise no encoding)\r\n     *                     or a JS object, where key = sourceCharCode, value = outputCharCode\r\n     *                     missing keys will be treated as: sourceCharCode === outputCharCode\r\n     *   .noBOM\r\n     *       See comment higher above for explanation for why this is important\r\n     *   .autoencode\r\n     *       See comment higher above for explanation for why this is important\r\n     */\r\n\r\n    var i,\r\n      l,\r\n      sourceEncoding,\r\n      encodingBlock,\r\n      outputEncoding,\r\n      newtext,\r\n      isUnicode,\r\n      ch,\r\n      bch;\r\n\r\n    flags = flags || {};\r\n    sourceEncoding = flags.sourceEncoding || \"Unicode\";\r\n    outputEncoding = flags.outputEncoding;\r\n\r\n    // This 'encoding' section relies on font metrics format\r\n    // attached to font objects by, among others,\r\n    // \"Willow Systems' standard_font_metrics plugin\"\r\n    // see jspdf.plugin.standard_font_metrics.js for format\r\n    // of the font.metadata.encoding Object.\r\n    // It should be something like\r\n    //   .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}\r\n    //   .widths = {0:width, code:width, ..., 'fof':divisor}\r\n    //   .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}\r\n    if (\r\n      (flags.autoencode || outputEncoding) &&\r\n      fonts[activeFontKey].metadata &&\r\n      fonts[activeFontKey].metadata[sourceEncoding] &&\r\n      fonts[activeFontKey].metadata[sourceEncoding].encoding\r\n    ) {\r\n      encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding;\r\n\r\n      // each font has default encoding. Some have it clearly defined.\r\n      if (!outputEncoding && fonts[activeFontKey].encoding) {\r\n        outputEncoding = fonts[activeFontKey].encoding;\r\n      }\r\n\r\n      // Hmmm, the above did not work? Let's try again, in different place.\r\n      if (!outputEncoding && encodingBlock.codePages) {\r\n        outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default\r\n      }\r\n\r\n      if (typeof outputEncoding === \"string\") {\r\n        outputEncoding = encodingBlock[outputEncoding];\r\n      }\r\n      // we want output encoding to be a JS Object, where\r\n      // key = sourceEncoding's character code and\r\n      // value = outputEncoding's character code.\r\n      if (outputEncoding) {\r\n        isUnicode = false;\r\n        newtext = [];\r\n        for (i = 0, l = text.length; i < l; i++) {\r\n          ch = outputEncoding[text.charCodeAt(i)];\r\n          if (ch) {\r\n            newtext.push(String.fromCharCode(ch));\r\n          } else {\r\n            newtext.push(text[i]);\r\n          }\r\n\r\n          // since we are looping over chars anyway, might as well\r\n          // check for residual unicodeness\r\n          if (newtext[i].charCodeAt(0) >> 8) {\r\n            /* more than 255 */\r\n            isUnicode = true;\r\n          }\r\n        }\r\n        text = newtext.join(\"\");\r\n      }\r\n    }\r\n\r\n    i = text.length;\r\n    // isUnicode may be set to false above. Hence the triple-equal to undefined\r\n    while (isUnicode === undefined && i !== 0) {\r\n      if (text.charCodeAt(i - 1) >> 8) {\r\n        /* more than 255 */\r\n        isUnicode = true;\r\n      }\r\n      i--;\r\n    }\r\n    if (!isUnicode) {\r\n      return text;\r\n    }\r\n\r\n    newtext = flags.noBOM ? [] : [254, 255];\r\n    for (i = 0, l = text.length; i < l; i++) {\r\n      ch = text.charCodeAt(i);\r\n      bch = ch >> 8; // divide by 256\r\n      if (bch >> 8) {\r\n        /* something left after dividing by 256 second time */\r\n        throw new Error(\r\n          \"Character at position \" +\r\n            i +\r\n            \" of string '\" +\r\n            text +\r\n            \"' exceeds 16bits. Cannot be encoded into UCS-2 BE\"\r\n        );\r\n      }\r\n      newtext.push(bch);\r\n      newtext.push(ch - (bch << 8));\r\n    }\r\n    return String.fromCharCode.apply(undefined, newtext);\r\n  };\r\n\r\n  var pdfEscape = (API.__private__.pdfEscape = API.pdfEscape = function(\r\n    text,\r\n    flags\r\n  ) {\r\n    /**\r\n     * Replace '/', '(', and ')' with pdf-safe versions\r\n     *\r\n     * Doing to8bitStream does NOT make this PDF display unicode text. For that\r\n     * we also need to reference a unicode font and embed it - royal pain in the rear.\r\n     *\r\n     * There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,\r\n     * which JavaScript Strings are happy to provide. So, while we still cannot display\r\n     * 2-byte characters property, at least CONDITIONALLY converting (entire string containing)\r\n     * 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF\r\n     * is still parseable.\r\n     * This will allow immediate support for unicode in document properties strings.\r\n     */\r\n    return to8bitStream(text, flags)\r\n      .replace(/\\\\/g, \"\\\\\\\\\")\r\n      .replace(/\\(/g, \"\\\\(\")\r\n      .replace(/\\)/g, \"\\\\)\");\r\n  });\r\n\r\n  var beginPage = (API.__private__.beginPage = function(format) {\r\n    pages[++page] = [];\r\n    pagesContext[page] = {\r\n      objId: 0,\r\n      contentsObjId: 0,\r\n      userUnit: Number(userUnit),\r\n      artBox: null,\r\n      bleedBox: null,\r\n      cropBox: null,\r\n      trimBox: null,\r\n      mediaBox: {\r\n        bottomLeftX: 0,\r\n        bottomLeftY: 0,\r\n        topRightX: Number(format[0]),\r\n        topRightY: Number(format[1])\r\n      }\r\n    };\r\n    _setPage(page);\r\n    setOutputDestination(pages[currentPage]);\r\n  });\r\n\r\n  var _addPage = function(parmFormat, parmOrientation) {\r\n    var dimensions, width, height;\r\n\r\n    orientation = parmOrientation || orientation;\r\n\r\n    if (typeof parmFormat === \"string\") {\r\n      dimensions = getPageFormat(parmFormat.toLowerCase());\r\n      if (Array.isArray(dimensions)) {\r\n        width = dimensions[0];\r\n        height = dimensions[1];\r\n      }\r\n    }\r\n\r\n    if (Array.isArray(parmFormat)) {\r\n      width = parmFormat[0] * scaleFactor;\r\n      height = parmFormat[1] * scaleFactor;\r\n    }\r\n\r\n    if (isNaN(width)) {\r\n      width = format[0];\r\n      height = format[1];\r\n    }\r\n\r\n    if (width > 14400 || height > 14400) {\r\n      console.warn(\r\n        \"A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400\"\r\n      );\r\n      width = Math.min(14400, width);\r\n      height = Math.min(14400, height);\r\n    }\r\n\r\n    format = [width, height];\r\n\r\n    switch (orientation.substr(0, 1)) {\r\n      case \"l\":\r\n        if (height > width) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n      case \"p\":\r\n        if (width > height) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n    }\r\n\r\n    beginPage(format);\r\n\r\n    // Set line width\r\n    setLineWidth(lineWidth);\r\n    // Set draw color\r\n    out(strokeColor);\r\n    // resurrecting non-default line caps, joins\r\n    if (lineCapID !== 0) {\r\n      out(lineCapID + \" J\");\r\n    }\r\n    if (lineJoinID !== 0) {\r\n      out(lineJoinID + \" j\");\r\n    }\r\n    events.publish(\"addPage\", {\r\n      pageNumber: page\r\n    });\r\n  };\r\n\r\n  var _deletePage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      pages.splice(n, 1);\r\n      pagesContext.splice(n, 1);\r\n      page--;\r\n      if (currentPage > page) {\r\n        currentPage = page;\r\n      }\r\n      this.setPage(currentPage);\r\n    }\r\n  };\r\n\r\n  var _setPage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      currentPage = n;\r\n    }\r\n  };\r\n\r\n  var getNumberOfPages = (API.__private__.getNumberOfPages = API.getNumberOfPages = function() {\r\n    return pages.length - 1;\r\n  });\r\n\r\n  /**\r\n   * Returns a document-specific font key - a label assigned to a\r\n   * font name + font type combination at the time the font was added\r\n   * to the font inventory.\r\n   *\r\n   * Font key is used as label for the desired font for a block of text\r\n   * to be added to the PDF document stream.\r\n   * @private\r\n   * @function\r\n   * @param fontName {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @param fontStyle {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @returns {string} Font key.\r\n   * @ignore\r\n   */\r\n  var getFont = function(fontName, fontStyle, options) {\r\n    var key = undefined,\r\n      fontNameLowerCase;\r\n    options = options || {};\r\n\r\n    fontName =\r\n      fontName !== undefined ? fontName : fonts[activeFontKey].fontName;\r\n    fontStyle =\r\n      fontStyle !== undefined ? fontStyle : fonts[activeFontKey].fontStyle;\r\n    fontNameLowerCase = fontName.toLowerCase();\r\n\r\n    if (\r\n      fontmap[fontNameLowerCase] !== undefined &&\r\n      fontmap[fontNameLowerCase][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontNameLowerCase][fontStyle];\r\n    } else if (\r\n      fontmap[fontName] !== undefined &&\r\n      fontmap[fontName][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontName][fontStyle];\r\n    } else {\r\n      if (options.disableWarning === false) {\r\n        console.warn(\r\n          \"Unable to look up font label for font '\" +\r\n            fontName +\r\n            \"', '\" +\r\n            fontStyle +\r\n            \"'. Refer to getFontList() for available fonts.\"\r\n        );\r\n      }\r\n    }\r\n\r\n    if (!key && !options.noFallback) {\r\n      key = fontmap[\"times\"][fontStyle];\r\n      if (key == null) {\r\n        key = fontmap[\"times\"][\"normal\"];\r\n      }\r\n    }\r\n    return key;\r\n  };\r\n\r\n  var putInfo = (API.__private__.putInfo = function() {\r\n    var objectId = newObject();\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n    out(\"<<\");\r\n    out(\"/Producer (\" + pdfEscape(encryptor(\"jsPDF \" + jsPDF.version)) + \")\");\r\n    for (var key in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(key) && documentProperties[key]) {\r\n        out(\r\n          \"/\" +\r\n            key.substr(0, 1).toUpperCase() +\r\n            key.substr(1) +\r\n            \" (\" +\r\n            pdfEscape(encryptor(documentProperties[key])) +\r\n            \")\"\r\n        );\r\n      }\r\n    }\r\n    out(\"/CreationDate (\" + pdfEscape(encryptor(creationDate)) + \")\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putCatalog = (API.__private__.putCatalog = function(options) {\r\n    options = options || {};\r\n    var tmpRootDictionaryObjId =\r\n      options.rootDictionaryObjId || rootDictionaryObjId;\r\n    newObject();\r\n    out(\"<<\");\r\n    out(\"/Type /Catalog\");\r\n    out(\"/Pages \" + tmpRootDictionaryObjId + \" 0 R\");\r\n    // PDF13ref Section 7.2.1\r\n    if (!zoomMode) zoomMode = \"fullwidth\";\r\n    switch (zoomMode) {\r\n      case \"fullwidth\":\r\n        out(\"/OpenAction [3 0 R /FitH null]\");\r\n        break;\r\n      case \"fullheight\":\r\n        out(\"/OpenAction [3 0 R /FitV null]\");\r\n        break;\r\n      case \"fullpage\":\r\n        out(\"/OpenAction [3 0 R /Fit]\");\r\n        break;\r\n      case \"original\":\r\n        out(\"/OpenAction [3 0 R /XYZ null null 1]\");\r\n        break;\r\n      default:\r\n        var pcn = \"\" + zoomMode;\r\n        if (pcn.substr(pcn.length - 1) === \"%\")\r\n          zoomMode = parseInt(zoomMode) / 100;\r\n        if (typeof zoomMode === \"number\") {\r\n          out(\"/OpenAction [3 0 R /XYZ null null \" + f2(zoomMode) + \"]\");\r\n        }\r\n    }\r\n    if (!layoutMode) layoutMode = \"continuous\";\r\n    switch (layoutMode) {\r\n      case \"continuous\":\r\n        out(\"/PageLayout /OneColumn\");\r\n        break;\r\n      case \"single\":\r\n        out(\"/PageLayout /SinglePage\");\r\n        break;\r\n      case \"two\":\r\n      case \"twoleft\":\r\n        out(\"/PageLayout /TwoColumnLeft\");\r\n        break;\r\n      case \"tworight\":\r\n        out(\"/PageLayout /TwoColumnRight\");\r\n        break;\r\n    }\r\n    if (pageMode) {\r\n      /**\r\n       * A name object specifying how the document should be displayed when opened:\r\n       * UseNone      : Neither document outline nor thumbnail images visible -- DEFAULT\r\n       * UseOutlines  : Document outline visible\r\n       * UseThumbs    : Thumbnail images visible\r\n       * FullScreen   : Full-screen mode, with no menu bar, window controls, or any other window visible\r\n       */\r\n      out(\"/PageMode /\" + pageMode);\r\n    }\r\n    events.publish(\"putCatalog\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putTrailer = (API.__private__.putTrailer = function() {\r\n    out(\"trailer\");\r\n    out(\"<<\");\r\n    out(\"/Size \" + (objectNumber + 1));\r\n    // Root and Info must be the last and second last objects written respectively\r\n    out(\"/Root \" + objectNumber + \" 0 R\");\r\n    out(\"/Info \" + (objectNumber - 1) + \" 0 R\");\r\n    if (encryptionOptions !== null) {\r\n      out(\"/Encrypt \" + encryption.oid + \" 0 R\");\r\n    }\r\n    out(\"/ID [ <\" + fileId + \"> <\" + fileId + \"> ]\");\r\n    out(\">>\");\r\n  });\r\n\r\n  var putHeader = (API.__private__.putHeader = function() {\r\n    out(\"%PDF-\" + pdfVersion);\r\n    out(\"%\\xBA\\xDF\\xAC\\xE0\");\r\n  });\r\n\r\n  var putXRef = (API.__private__.putXRef = function() {\r\n    var p = \"0000000000\";\r\n\r\n    out(\"xref\");\r\n    out(\"0 \" + (objectNumber + 1));\r\n    out(\"0000000000 65535 f \");\r\n    for (var i = 1; i <= objectNumber; i++) {\r\n      var offset = offsets[i];\r\n      if (typeof offset === \"function\") {\r\n        out((p + offsets[i]()).slice(-10) + \" 00000 n \");\r\n      } else {\r\n        if (typeof offsets[i] !== \"undefined\") {\r\n          out((p + offsets[i]).slice(-10) + \" 00000 n \");\r\n        } else {\r\n          out(\"0000000000 00000 n \");\r\n        }\r\n      }\r\n    }\r\n  });\r\n\r\n  var buildDocument = (API.__private__.buildDocument = function() {\r\n    resetDocument();\r\n    setOutputDestination(content);\r\n\r\n    events.publish(\"buildDocument\");\r\n\r\n    putHeader();\r\n    putPages();\r\n    putAdditionalObjects();\r\n    putResources();\r\n    if (encryptionOptions !== null) putEncryptionDict();\r\n    putInfo();\r\n    putCatalog();\r\n\r\n    var offsetOfXRef = contentLength;\r\n    putXRef();\r\n    putTrailer();\r\n    out(\"startxref\");\r\n    out(\"\" + offsetOfXRef);\r\n    out(\"%%EOF\");\r\n\r\n    setOutputDestination(pages[currentPage]);\r\n\r\n    return content.join(\"\\n\");\r\n  });\r\n\r\n  var getBlob = (API.__private__.getBlob = function(data) {\r\n    return new Blob([getArrayBuffer(data)], {\r\n      type: \"application/pdf\"\r\n    });\r\n  });\r\n\r\n  /**\r\n   * Generates the PDF document.\r\n   *\r\n   * If `type` argument is undefined, output is raw body of resulting PDF returned as a string.\r\n   *\r\n   * @param {string} type A string identifying one of the possible output types.<br/>\r\n   *                      Possible values are: <br/>\r\n   *                          'arraybuffer' -> (ArrayBuffer)<br/>\r\n   *                          'blob' -> (Blob)<br/>\r\n   *                          'bloburi'/'bloburl' -> (string)<br/>\r\n   *                          'datauristring'/'dataurlstring' -> (string)<br/>\r\n   *                          'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>\r\n   *                          'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfjsnewwindow' -> (wind | null)\r\n   * @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>\r\n   *                                Possible options are 'filename'.<br/>\r\n   *                                A string can be passed instead of {filename:string} and defaults to 'generated.pdf'\r\n   * @function\r\n   * @instance\r\n   * @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}\r\n   * @memberof jsPDF#\r\n   * @name output\r\n   */\r\n  var output = (API.output = API.__private__.output = SAFE(function output(\r\n    type,\r\n    options\r\n  ) {\r\n    options = options || {};\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        filename: options\r\n      };\r\n    } else {\r\n      options.filename = options.filename || \"generated.pdf\";\r\n    }\r\n\r\n    switch (type) {\r\n      case undefined:\r\n        return buildDocument();\r\n      case \"save\":\r\n        API.save(options.filename);\r\n        break;\r\n      case \"arraybuffer\":\r\n        return getArrayBuffer(buildDocument());\r\n      case \"blob\":\r\n        return getBlob(buildDocument());\r\n      case \"bloburi\":\r\n      case \"bloburl\":\r\n        // Developer is responsible of calling revokeObjectURL\r\n        if (\r\n          typeof globalObject.URL !== \"undefined\" &&\r\n          typeof globalObject.URL.createObjectURL === \"function\"\r\n        ) {\r\n          return (\r\n            (globalObject.URL &&\r\n              globalObject.URL.createObjectURL(getBlob(buildDocument()))) ||\r\n            void 0\r\n          );\r\n        } else {\r\n          console.warn(\r\n            \"bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauristring\":\r\n      case \"dataurlstring\":\r\n        var dataURI = \"\";\r\n        var pdfDocument = buildDocument();\r\n        try {\r\n          dataURI = btoa(pdfDocument);\r\n        } catch (e) {\r\n          dataURI = btoa(unescape(encodeURIComponent(pdfDocument)));\r\n        }\r\n        return (\r\n          \"data:application/pdf;filename=\" +\r\n          options.filename +\r\n          \";base64,\" +\r\n          dataURI\r\n        );\r\n      case \"pdfobjectnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfObjectUrl =\r\n            \"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js\";\r\n          var integrity =\r\n            ' integrity=\"sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==\" crossorigin=\"anonymous\"';\r\n\r\n          if (options.pdfObjectUrl) {\r\n            pdfObjectUrl = options.pdfObjectUrl;\r\n            integrity = \"\";\r\n          }\r\n\r\n          var htmlForNewWindow =\r\n            \"<html>\" +\r\n            '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src=\"' +\r\n            pdfObjectUrl +\r\n            '\"' +\r\n            integrity +\r\n            '></script><script >PDFObject.embed(\"' +\r\n            this.output(\"dataurlstring\") +\r\n            '\", ' +\r\n            JSON.stringify(options) +\r\n            \");</script></body></html>\";\r\n          var nW = globalObject.open();\r\n\r\n          if (nW !== null) {\r\n            nW.document.write(htmlForNewWindow);\r\n          }\r\n          return nW;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfobjectnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"pdfjsnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfJsUrl = options.pdfJsUrl || \"examples/PDF.js/web/viewer.html\";\r\n          var htmlForPDFjsNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            '<body><iframe id=\"pdfViewer\" src=\"' +\r\n            pdfJsUrl +\r\n            \"?file=&downloadName=\" +\r\n            options.filename +\r\n            '\" width=\"500px\" height=\"400px\" />' +\r\n            \"</body></html>\";\r\n          var PDFjsNewWindow = globalObject.open();\r\n\r\n          if (PDFjsNewWindow !== null) {\r\n            PDFjsNewWindow.document.write(htmlForPDFjsNewWindow);\r\n            var scope = this;\r\n            PDFjsNewWindow.document.documentElement.querySelector(\r\n              \"#pdfViewer\"\r\n            ).onload = function() {\r\n              PDFjsNewWindow.document.title = options.filename;\r\n              PDFjsNewWindow.document.documentElement\r\n                .querySelector(\"#pdfViewer\")\r\n                .contentWindow.PDFViewerApplication.open(\r\n                  scope.output(\"bloburl\")\r\n                );\r\n            };\r\n          }\r\n          return PDFjsNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfjsnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"dataurlnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var htmlForDataURLNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            \"<body>\" +\r\n            '<iframe src=\"' +\r\n            this.output(\"datauristring\", options) +\r\n            '\"></iframe>' +\r\n            \"</body></html>\";\r\n          var dataURLNewWindow = globalObject.open();\r\n          if (dataURLNewWindow !== null) {\r\n            dataURLNewWindow.document.write(htmlForDataURLNewWindow);\r\n            dataURLNewWindow.document.title = options.filename;\r\n          }\r\n          if (dataURLNewWindow || typeof safari === \"undefined\")\r\n            return dataURLNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option dataurlnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauri\":\r\n      case \"dataurl\":\r\n        return (globalObject.document.location.href = this.output(\r\n          \"datauristring\",\r\n          options\r\n        ));\r\n      default:\r\n        return null;\r\n    }\r\n  }));\r\n\r\n  /**\r\n   * Used to see if a supplied hotfix was requested when the pdf instance was created.\r\n   * @param {string} hotfixName - The name of the hotfix to check.\r\n   * @returns {boolean}\r\n   */\r\n  var hasHotfix = function(hotfixName) {\r\n    return (\r\n      Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1\r\n    );\r\n  };\r\n\r\n  switch (unit) {\r\n    case \"pt\":\r\n      scaleFactor = 1;\r\n      break;\r\n    case \"mm\":\r\n      scaleFactor = 72 / 25.4;\r\n      break;\r\n    case \"cm\":\r\n      scaleFactor = 72 / 2.54;\r\n      break;\r\n    case \"in\":\r\n      scaleFactor = 72;\r\n      break;\r\n    case \"px\":\r\n      if (hasHotfix(\"px_scaling\") == true) {\r\n        scaleFactor = 72 / 96;\r\n      } else {\r\n        scaleFactor = 96 / 72;\r\n      }\r\n      break;\r\n    case \"pc\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"em\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"ex\":\r\n      scaleFactor = 6;\r\n      break;\r\n    default:\r\n      if (typeof unit === \"number\") {\r\n        scaleFactor = unit;\r\n      } else {\r\n        throw new Error(\"Invalid unit: \" + unit);\r\n      }\r\n  }\r\n\r\n  var encryption = null;\r\n  setCreationDate();\r\n  setFileId();\r\n\r\n  var getEncryptor = function(objectId) {\r\n    if (encryptionOptions !== null) {\r\n      return encryption.encryptor(objectId, 0);\r\n    }\r\n    return function(data) {\r\n      return data;\r\n    };\r\n  };\r\n\r\n  //---------------------------------------\r\n  // Public API\r\n\r\n  var getPageInfo = (API.__private__.getPageInfo = API.getPageInfo = function(\r\n    pageNumberOneBased\r\n  ) {\r\n    if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfo\");\r\n    }\r\n    var objId = pagesContext[pageNumberOneBased].objId;\r\n    return {\r\n      objId: objId,\r\n      pageNumber: pageNumberOneBased,\r\n      pageContext: pagesContext[pageNumberOneBased]\r\n    };\r\n  });\r\n\r\n  var getPageInfoByObjId = (API.__private__.getPageInfoByObjId = function(\r\n    objId\r\n  ) {\r\n    if (isNaN(objId) || objId % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfoByObjId\");\r\n    }\r\n    for (var pageNumber in pagesContext) {\r\n      if (pagesContext[pageNumber].objId === objId) {\r\n        break;\r\n      }\r\n    }\r\n    return getPageInfo(pageNumber);\r\n  });\r\n\r\n  var getCurrentPageInfo = (API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function() {\r\n    return {\r\n      objId: pagesContext[currentPage].objId,\r\n      pageNumber: currentPage,\r\n      pageContext: pagesContext[currentPage]\r\n    };\r\n  });\r\n\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @param format {String/Array} The format of the new page. Can be: <ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n   * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n   * @param orientation {string} Orientation of the new page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" (Default), \"l\").\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addPage\r\n   */\r\n  API.addPage = function() {\r\n    _addPage.apply(this, arguments);\r\n    return this;\r\n  };\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name setPage\r\n   * @param {number} page Switch the active page to the page number specified (indexed starting at 1).\r\n   * @example\r\n   * doc = jsPDF()\r\n   * doc.addPage()\r\n   * doc.addPage()\r\n   * doc.text('I am on page 3', 10, 10)\r\n   * doc.setPage(1)\r\n   * doc.text('I am on page 1', 10, 10)\r\n   */\r\n  API.setPage = function() {\r\n    _setPage.apply(this, arguments);\r\n    setOutputDestination.call(this, pages[currentPage]);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name insertPage\r\n   * @memberof jsPDF#\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {Object} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.insertPage = function(beforePage) {\r\n    this.addPage();\r\n    this.movePage(currentPage, beforePage);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name movePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {number} targetPage\r\n   * @param {number} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.movePage = function(targetPage, beforePage) {\r\n    var tmpPages, tmpPagesContext;\r\n    if (targetPage > beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var i = targetPage; i > beforePage; i--) {\r\n        pages[i] = pages[i - 1];\r\n        pagesContext[i] = pagesContext[i - 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    } else if (targetPage < beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var j = targetPage; j < beforePage; j++) {\r\n        pages[j] = pages[j + 1];\r\n        pagesContext[j] = pagesContext[j + 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Deletes a page from the PDF.\r\n   * @name deletePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @param {number} targetPage\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   */\r\n  API.deletePage = function() {\r\n    _deletePage.apply(this, arguments);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.\r\n   * @param {Object} [options] - Collection of settings signaling how the text must be encoded.\r\n   * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.\r\n   * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging\r\n   * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.\r\n   * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.\r\n   * @param {number} [options.charSpace=0] - The space between each letter.\r\n   * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.\r\n   * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.\r\n   * @param {Object} [options.flags] - Flags for to8bitStream.\r\n   * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.\r\n   * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.\r\n   * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.\r\n   * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.\r\n   * @param {boolean} [options.isInputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isInputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine\r\n   * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.\r\n   *\r\n   * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing\r\n   * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this\r\n   * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a\r\n   * DIFFERENT result. A matrix is only allowed in \"advanced\" API mode.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name text\r\n   */\r\n  API.__private__.text = API.text = function(text, x, y, options, transform) {\r\n    /*\r\n     * Inserts something like this into PDF\r\n     *   BT\r\n     *    /F1 16 Tf  % Font name + size\r\n     *    16 TL % How many units down for next line in multiline text\r\n     *    0 g % color\r\n     *    28.35 813.54 Td % position\r\n     *    (line one) Tj\r\n     *    T* (line two) Tj\r\n     *    T* (line three) Tj\r\n     *   ET\r\n     */\r\n    options = options || {};\r\n    var scope = options.scope || this;\r\n    var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, text, flags)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(data, coordinates... , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (\r\n      typeof text === \"number\" &&\r\n      typeof x === \"number\" &&\r\n      (typeof y === \"string\" || Array.isArray(y))\r\n    ) {\r\n      var tmp = y;\r\n      y = x;\r\n      x = text;\r\n      text = tmp;\r\n    }\r\n\r\n    var transformationMatrix;\r\n\r\n    if (arguments[3] instanceof Matrix === false) {\r\n      flags = arguments[3];\r\n      angle = arguments[4];\r\n      align = arguments[5];\r\n\r\n      if (typeof flags !== \"object\" || flags === null) {\r\n        if (typeof angle === \"string\") {\r\n          align = angle;\r\n          angle = null;\r\n        }\r\n        if (typeof flags === \"string\") {\r\n          align = flags;\r\n          flags = null;\r\n        }\r\n        if (typeof flags === \"number\") {\r\n          angle = flags;\r\n          flags = null;\r\n        }\r\n        options = {\r\n          flags: flags,\r\n          angle: angle,\r\n          align: align\r\n        };\r\n      }\r\n    } else {\r\n      advancedApiModeTrap(\r\n        \"The transform parameter of text() with a Matrix value\"\r\n      );\r\n      transformationMatrix = transform;\r\n    }\r\n\r\n    if (isNaN(x) || isNaN(y) || typeof text === \"undefined\" || text === null) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.text\");\r\n    }\r\n\r\n    if (text.length === 0) {\r\n      return scope;\r\n    }\r\n\r\n    var xtra = \"\";\r\n    var isHex = false;\r\n    var lineHeight =\r\n      typeof options.lineHeightFactor === \"number\"\r\n        ? options.lineHeightFactor\r\n        : lineHeightFactor;\r\n    var scaleFactor = scope.internal.scaleFactor;\r\n\r\n    function ESC(s) {\r\n      s = s.split(\"\\t\").join(Array(options.TabLen || 9).join(\" \"));\r\n      return pdfEscape(s, flags);\r\n    }\r\n\r\n    function transformTextToSpecialArray(text) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      var da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (typeof curDa === \"string\") {\r\n          da.push(curDa);\r\n        } else {\r\n          if (\r\n            Array.isArray(text) &&\r\n            (curDa.length === 1 ||\r\n              (curDa[1] === undefined && curDa[2] === undefined))\r\n          ) {\r\n            da.push(curDa[0]);\r\n          } else {\r\n            da.push([curDa[0], curDa[1], curDa[2]]);\r\n          }\r\n        }\r\n      }\r\n      return da;\r\n    }\r\n\r\n    function processTextByFunction(text, processingFunction) {\r\n      var result;\r\n      if (typeof text === \"string\") {\r\n        result = processingFunction(text)[0];\r\n      } else if (Array.isArray(text)) {\r\n        //we don't want to destroy original text array, so cloning it\r\n        var sa = text.concat();\r\n        var da = [];\r\n        var len = sa.length;\r\n        var curDa;\r\n        var tmpResult;\r\n        //we do array.join('text that must not be PDFescaped\")\r\n        //thus, pdfEscape each component separately\r\n        while (len--) {\r\n          curDa = sa.shift();\r\n          if (typeof curDa === \"string\") {\r\n            da.push(processingFunction(curDa)[0]);\r\n          } else if (Array.isArray(curDa) && typeof curDa[0] === \"string\") {\r\n            tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);\r\n            da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);\r\n          }\r\n        }\r\n        result = da;\r\n      }\r\n      return result;\r\n    }\r\n\r\n    //Check if text is of type String\r\n    var textIsOfTypeString = false;\r\n    var tmpTextIsOfTypeString = true;\r\n\r\n    if (typeof text === \"string\") {\r\n      textIsOfTypeString = true;\r\n    } else if (Array.isArray(text)) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (\r\n          typeof curDa !== \"string\" ||\r\n          (Array.isArray(curDa) && typeof curDa[0] !== \"string\")\r\n        ) {\r\n          tmpTextIsOfTypeString = false;\r\n        }\r\n      }\r\n      textIsOfTypeString = tmpTextIsOfTypeString;\r\n    }\r\n    if (textIsOfTypeString === false) {\r\n      throw new Error(\r\n        'Type of text must be string or Array. \"' +\r\n          text +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n\r\n    //If there are any newlines in text, we assume\r\n    //the user wanted to print multiple lines, so break the\r\n    //text up into an array. If the text is already an array,\r\n    //we assume the user knows what they are doing.\r\n    //Convert text into an array anyway to simplify\r\n    //later code.\r\n\r\n    if (typeof text === \"string\") {\r\n      if (text.match(/[\\r?\\n]/)) {\r\n        text = text.split(/\\r\\n|\\r|\\n/g);\r\n      } else {\r\n        text = [text];\r\n      }\r\n    }\r\n\r\n    //baseline\r\n    var height = activeFontSize / scope.internal.scaleFactor;\r\n    var descent = height * (lineHeight - 1);\r\n\r\n    switch (options.baseline) {\r\n      case \"bottom\":\r\n        y -= descent;\r\n        break;\r\n      case \"top\":\r\n        y += height - descent;\r\n        break;\r\n      case \"hanging\":\r\n        y += height - 2 * descent;\r\n        break;\r\n      case \"middle\":\r\n        y += height / 2 - descent;\r\n        break;\r\n      case \"ideographic\":\r\n      case \"alphabetic\":\r\n      default:\r\n        // do nothing, everything is fine\r\n        break;\r\n    }\r\n\r\n    //multiline\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    if (maxWidth > 0) {\r\n      if (typeof text === \"string\") {\r\n        text = scope.splitTextToSize(text, maxWidth);\r\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n        text = text.reduce(function(acc, textLine) {\r\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\r\n        }, []);\r\n      }\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"preProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    options = payload.options;\r\n\r\n    //angle\r\n    angle = options.angle;\r\n\r\n    if (\r\n      transformationMatrix instanceof Matrix === false &&\r\n      angle &&\r\n      typeof angle === \"number\"\r\n    ) {\r\n      angle *= Math.PI / 180;\r\n\r\n      if (options.rotationDirection === 0) {\r\n        angle = -angle;\r\n      }\r\n\r\n      if (apiMode === ApiMode.ADVANCED) {\r\n        angle = -angle;\r\n      }\r\n\r\n      var c = Math.cos(angle);\r\n      var s = Math.sin(angle);\r\n      transformationMatrix = new Matrix(c, s, -s, c, 0, 0);\r\n    } else if (angle && angle instanceof Matrix) {\r\n      transformationMatrix = angle;\r\n    }\r\n\r\n    if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {\r\n      transformationMatrix = identityMatrix;\r\n    }\r\n\r\n    //charSpace\r\n\r\n    charSpace = options.charSpace || activeCharSpace;\r\n\r\n    if (typeof charSpace !== \"undefined\") {\r\n      xtra += hpf(scale(charSpace)) + \" Tc\\n\";\r\n      this.setCharSpace(this.getCharSpace() || 0);\r\n    }\r\n\r\n    horizontalScale = options.horizontalScale;\r\n    if (typeof horizontalScale !== \"undefined\") {\r\n      xtra += hpf(horizontalScale * 100) + \" Tz\\n\";\r\n    }\r\n\r\n    //lang\r\n\r\n    var lang = options.lang;\r\n\r\n    if (lang) {\r\n      //    xtra += \"/Lang (\" + lang +\")\\n\";\r\n    }\r\n\r\n    //renderingMode\r\n    var renderingMode = -1;\r\n    var parmRenderingMode =\r\n      typeof options.renderingMode !== \"undefined\"\r\n        ? options.renderingMode\r\n        : options.stroke;\r\n    var pageContext = scope.internal.getCurrentPageInfo().pageContext;\r\n\r\n    switch (parmRenderingMode) {\r\n      case 0:\r\n      case false:\r\n      case \"fill\":\r\n        renderingMode = 0;\r\n        break;\r\n      case 1:\r\n      case true:\r\n      case \"stroke\":\r\n        renderingMode = 1;\r\n        break;\r\n      case 2:\r\n      case \"fillThenStroke\":\r\n        renderingMode = 2;\r\n        break;\r\n      case 3:\r\n      case \"invisible\":\r\n        renderingMode = 3;\r\n        break;\r\n      case 4:\r\n      case \"fillAndAddForClipping\":\r\n        renderingMode = 4;\r\n        break;\r\n      case 5:\r\n      case \"strokeAndAddPathForClipping\":\r\n        renderingMode = 5;\r\n        break;\r\n      case 6:\r\n      case \"fillThenStrokeAndAddToPathForClipping\":\r\n        renderingMode = 6;\r\n        break;\r\n      case 7:\r\n      case \"addToPathForClipping\":\r\n        renderingMode = 7;\r\n        break;\r\n    }\r\n\r\n    var usedRenderingMode =\r\n      typeof pageContext.usedRenderingMode !== \"undefined\"\r\n        ? pageContext.usedRenderingMode\r\n        : -1;\r\n\r\n    //if the coder wrote it explicitly to use a specific\r\n    //renderingMode, then use it\r\n    if (renderingMode !== -1) {\r\n      xtra += renderingMode + \" Tr\\n\";\r\n      //otherwise check if we used the rendering Mode already\r\n      //if so then set the rendering Mode...\r\n    } else if (usedRenderingMode !== -1) {\r\n      xtra += \"0 Tr\\n\";\r\n    }\r\n\r\n    if (renderingMode !== -1) {\r\n      pageContext.usedRenderingMode = renderingMode;\r\n    }\r\n\r\n    //align\r\n    align = options.align || \"left\";\r\n    var leading = activeFontSize * lineHeight;\r\n    var pageWidth = scope.internal.pageSize.getWidth();\r\n    var activeFont = fonts[activeFontKey];\r\n    charSpace = options.charSpace || activeCharSpace;\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    var lineWidths;\r\n    flags = Object.assign({ autoencode: true, noBOM: true }, options.flags);\r\n\r\n    var wordSpacingPerLine = [];\r\n    var findWidth = function(v) {\r\n      return (\r\n        (scope.getStringUnitWidth(v, {\r\n          font: activeFont,\r\n          charSpace: charSpace,\r\n          fontSize: activeFontSize,\r\n          doKerning: false\r\n        }) *\r\n          activeFontSize) /\r\n        scaleFactor\r\n      );\r\n    };\r\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n      da = transformTextToSpecialArray(text);\r\n      var newY;\r\n      if (align !== \"left\") {\r\n        lineWidths = da.map(findWidth);\r\n      }\r\n      //The first line uses the \"main\" Td setting,\r\n      //and the subsequent lines are offset by the\r\n      //previous line's x coordinate.\r\n      var prevWidth = 0;\r\n      var newX;\r\n      if (align === \"right\") {\r\n        //The passed in x coordinate defines the\r\n        //rightmost point of the text.\r\n        x -= lineWidths[0];\r\n        text = [];\r\n        len = da.length;\r\n        for (var i = 0; i < len; i++) {\r\n          if (i === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale(prevWidth - lineWidths[i]);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[i], newX, newY]);\r\n          prevWidth = lineWidths[i];\r\n        }\r\n      } else if (align === \"center\") {\r\n        //The passed in x coordinate defines\r\n        //the center point.\r\n        x -= lineWidths[0] / 2;\r\n        text = [];\r\n        len = da.length;\r\n        for (var j = 0; j < len; j++) {\r\n          if (j === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale((prevWidth - lineWidths[j]) / 2);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[j], newX, newY]);\r\n          prevWidth = lineWidths[j];\r\n        }\r\n      } else if (align === \"left\") {\r\n        text = [];\r\n        len = da.length;\r\n        for (var h = 0; h < len; h++) {\r\n          text.push(da[h]);\r\n        }\r\n      } else if (align === \"justify\" && activeFont.encoding === \"Identity-H\") {\r\n        // when using unicode fonts, wordSpacePerLine does not apply\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        let backToStartX = 0;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : backToStartX;\r\n          if (l < len - 1) {\r\n            let spacing = scale(\r\n              (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n            );\r\n            let words = da[l].split(\" \");\r\n            text.push([words[0] + \" \", newX, newY]);\r\n            backToStartX = 0; // distance to reset back to the left\r\n            for (let i = 1; i < words.length; i++) {\r\n              let shiftAmount =\r\n                (findWidth(words[i - 1] + \" \" + words[i]) -\r\n                  findWidth(words[i])) *\r\n                  scaleFactor +\r\n                spacing;\r\n              if (i == words.length - 1) text.push([words[i], shiftAmount, 0]);\r\n              else text.push([words[i] + \" \", shiftAmount, 0]);\r\n              backToStartX -= shiftAmount;\r\n            }\r\n          } else {\r\n            text.push([da[l], newX, newY]);\r\n          }\r\n        }\r\n        text.push([\"\", backToStartX, 0]);\r\n      } else if (align === \"justify\") {\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : 0;\r\n          if (l < len - 1) {\r\n            wordSpacingPerLine.push(\r\n              hpf(\r\n                scale(\r\n                  (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n                )\r\n              )\r\n            );\r\n          } else {\r\n            wordSpacingPerLine.push(0);\r\n          }\r\n          text.push([da[l], newX, newY]);\r\n        }\r\n      } else {\r\n        throw new Error(\r\n          'Unrecognized alignment option, use \"left\", \"center\", \"right\" or \"justify\".'\r\n        );\r\n      }\r\n    }\r\n\r\n    //R2L\r\n    var doReversing = typeof options.R2L === \"boolean\" ? options.R2L : R2L;\r\n    if (doReversing === true) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [\r\n          text\r\n            .split(\"\")\r\n            .reverse()\r\n            .join(\"\"),\r\n          posX,\r\n          posY\r\n        ];\r\n      });\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"postProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    isHex = payload.mutex.isHex || false;\r\n\r\n    //Escaping\r\n    var activeFontEncoding = fonts[activeFontKey].encoding;\r\n\r\n    if (\r\n      activeFontEncoding === \"WinAnsiEncoding\" ||\r\n      activeFontEncoding === \"StandardEncoding\"\r\n    ) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [ESC(text), posX, posY];\r\n      });\r\n    }\r\n\r\n    da = transformTextToSpecialArray(text);\r\n\r\n    text = [];\r\n    var STRING = 0;\r\n    var ARRAY = 1;\r\n    var variant = Array.isArray(da[0]) ? ARRAY : STRING;\r\n    var posX;\r\n    var posY;\r\n    var content;\r\n    var wordSpacing = \"\";\r\n\r\n    var generatePosition = function(\r\n      parmPosX,\r\n      parmPosY,\r\n      parmTransformationMatrix\r\n    ) {\r\n      var position = \"\";\r\n      if (parmTransformationMatrix instanceof Matrix) {\r\n        // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y\r\n        // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied\r\n        // in the coordinate system established by this matrix\r\n        if (typeof options.angle === \"number\") {\r\n          parmTransformationMatrix = matrixMult(\r\n            parmTransformationMatrix,\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY)\r\n          );\r\n        } else {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        if (apiMode === ApiMode.ADVANCED) {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, -1, 0, 0),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        position = parmTransformationMatrix.join(\" \") + \" Tm\\n\";\r\n      } else {\r\n        position = hpf(parmPosX) + \" \" + hpf(parmPosY) + \" Td\\n\";\r\n      }\r\n      return position;\r\n    };\r\n\r\n    for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {\r\n      wordSpacing = \"\";\r\n\r\n      switch (variant) {\r\n        case ARRAY:\r\n          content =\r\n            (isHex ? \"<\" : \"(\") + da[lineIndex][0] + (isHex ? \">\" : \")\");\r\n          posX = parseFloat(da[lineIndex][1]);\r\n          posY = parseFloat(da[lineIndex][2]);\r\n          break;\r\n        case STRING:\r\n          content = (isHex ? \"<\" : \"(\") + da[lineIndex] + (isHex ? \">\" : \")\");\r\n          posX = getHorizontalCoordinate(x);\r\n          posY = getVerticalCoordinate(y);\r\n          break;\r\n      }\r\n\r\n      if (\r\n        typeof wordSpacingPerLine !== \"undefined\" &&\r\n        typeof wordSpacingPerLine[lineIndex] !== \"undefined\"\r\n      ) {\r\n        wordSpacing = wordSpacingPerLine[lineIndex] + \" Tw\\n\";\r\n      }\r\n\r\n      if (lineIndex === 0) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      } else if (variant === STRING) {\r\n        text.push(wordSpacing + content);\r\n      } else if (variant === ARRAY) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      }\r\n    }\r\n\r\n    text = variant === STRING ? text.join(\" Tj\\nT* \") : text.join(\" Tj\\n\");\r\n    text += \" Tj\\n\";\r\n\r\n    var result = \"BT\\n/\";\r\n    result += activeFontKey + \" \" + activeFontSize + \" Tf\\n\"; // font face, style, size\r\n    result += hpf(activeFontSize * lineHeight) + \" TL\\n\"; // line spacing\r\n    result += textColor + \"\\n\";\r\n    result += xtra;\r\n    result += text;\r\n    result += \"ET\";\r\n\r\n    out(result);\r\n    usedFonts[activeFontKey] = true;\r\n    return scope;\r\n  };\r\n\r\n  // PDF supports these path painting and clip path operators:\r\n  //\r\n  // S - stroke\r\n  // s - close/stroke\r\n  // f (F) - fill non-zero\r\n  // f* - fill evenodd\r\n  // B - fill stroke nonzero\r\n  // B* - fill stroke evenodd\r\n  // b - close fill stroke nonzero\r\n  // b* - close fill stroke evenodd\r\n  // n - nothing (consume path)\r\n  // W - clip nonzero\r\n  // W* - clip evenodd\r\n  //\r\n  // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()\r\n  // method.\r\n  /**\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @instance\r\n   * @param {string} rule Only possible value is 'evenodd'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description All .clip() after calling drawing ops with a style argument of null.\r\n   */\r\n  var clip = (API.__private__.clip = API.clip = function(rule) {\r\n    // Call .clip() after calling drawing ops with a style argument of null\r\n    // W is the PDF clipping op\r\n    if (\"evenodd\" === rule) {\r\n      out(\"W*\");\r\n    } else {\r\n      out(\"W\");\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * @name clipEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note\r\n   * that this will NOT consume the current path. In order to only use this path for clipping call\r\n   * {@link API.discardPath} afterwards.\r\n   */\r\n  API.clipEvenOdd = function() {\r\n    return clip(\"evenodd\");\r\n  };\r\n\r\n  /**\r\n   * Consumes the current path without any effect. Mainly used in combination with {@link clip} or\r\n   * {@link clipEvenOdd}. The PDF \"n\" operator.\r\n   * @name discardPath\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.discardPath = API.discardPath = function() {\r\n    out(\"n\");\r\n    return this;\r\n  };\r\n\r\n  var isValidStyle = (API.__private__.isValidStyle = function(style) {\r\n    var validStyleVariants = [\r\n      undefined,\r\n      null,\r\n      \"S\",\r\n      \"D\",\r\n      \"F\",\r\n      \"DF\",\r\n      \"FD\",\r\n      \"f\",\r\n      \"f*\",\r\n      \"B\",\r\n      \"B*\",\r\n      \"n\"\r\n    ];\r\n    var result = false;\r\n    if (validStyleVariants.indexOf(style) !== -1) {\r\n      result = true;\r\n    }\r\n    return result;\r\n  });\r\n\r\n  API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function(\r\n    operator\r\n  ) {\r\n    if (isValidStyle(operator)) {\r\n      defaultPathOperation = operator;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  var getStyle = (API.__private__.getStyle = API.getStyle = function(style) {\r\n    // see path-painting operators in PDF spec\r\n    var op = defaultPathOperation; // stroke\r\n\r\n    switch (style) {\r\n      case \"D\":\r\n      case \"S\":\r\n        op = \"S\"; // stroke\r\n        break;\r\n      case \"F\":\r\n        op = \"f\"; // fill\r\n        break;\r\n      case \"FD\":\r\n      case \"DF\":\r\n        op = \"B\";\r\n        break;\r\n      case \"f\":\r\n      case \"f*\":\r\n      case \"B\":\r\n      case \"B*\":\r\n        /*\r\n               Allow direct use of these PDF path-painting operators:\r\n               - f    fill using nonzero winding number rule\r\n               - f*    fill using even-odd rule\r\n               - B    fill then stroke with fill using non-zero winding number rule\r\n               - B*    fill then stroke with fill using even-odd rule\r\n               */\r\n        op = style;\r\n        break;\r\n    }\r\n    return op;\r\n  });\r\n\r\n  /**\r\n   * Close the current path. The PDF \"h\" operator.\r\n   * @name close\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  var close = (API.close = function() {\r\n    out(\"h\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Stroke the path. The PDF \"S\" operator.\r\n   * @name stroke\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.stroke = function() {\r\n    out(\"S\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled\r\n   * with this pattern, otherwise with the current fill color. Equivalent to the PDF \"f\" operator.\r\n   * @name fill\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fill = function(pattern) {\r\n    fillWithOptionalPattern(\"f\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the even-odd rule. The PDF f* operator.\r\n   * @see API.fill\r\n   * @name fillEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"f*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the nonzero winding number rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStroke\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStroke = function(pattern) {\r\n    fillWithOptionalPattern(\"B\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the even-odd rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStrokeEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStrokeEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"B*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  var fillWithOptionalPattern = function(style, pattern) {\r\n    if (typeof pattern === \"object\") {\r\n      fillWithPattern(pattern, style);\r\n    } else {\r\n      out(style);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    if (\r\n      style === null ||\r\n      (apiMode === ApiMode.ADVANCED && style === undefined)\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    style = getStyle(style);\r\n\r\n    // stroking / filling / both the path\r\n    out(style);\r\n  };\r\n\r\n  function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {\r\n    var clone = new TilingPattern(\r\n      boundingBox || this.boundingBox,\r\n      xStep || this.xStep,\r\n      yStep || this.yStep,\r\n      this.gState,\r\n      matrix || this.matrix\r\n    );\r\n    clone.stream = this.stream;\r\n    var key = patternKey + \"$$\" + this.cloneIndex++ + \"$$\";\r\n    addPattern(key, clone);\r\n    return clone;\r\n  }\r\n\r\n  var fillWithPattern = function(patternData, style) {\r\n    var patternId = patternMap[patternData.key];\r\n    var pattern = patterns[patternId];\r\n\r\n    if (pattern instanceof ShadingPattern) {\r\n      out(\"q\");\r\n\r\n      out(clipRuleFromStyle(style));\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n      out(patternData.matrix.toString() + \" cm\");\r\n      out(\"/\" + patternId + \" sh\");\r\n      out(\"Q\");\r\n    } else if (pattern instanceof TilingPattern) {\r\n      // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,\r\n      // so we must flip them\r\n      var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());\r\n\r\n      if (patternData.matrix) {\r\n        matrix = matrix.multiply(patternData.matrix || identityMatrix);\r\n        // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances\r\n        // for each use\r\n        patternId = cloneTilingPattern.call(\r\n          pattern,\r\n          patternData.key,\r\n          patternData.boundingBox,\r\n          patternData.xStep,\r\n          patternData.yStep,\r\n          matrix\r\n        ).id;\r\n      }\r\n\r\n      out(\"q\");\r\n      out(\"/Pattern cs\");\r\n      out(\"/\" + patternId + \" scn\");\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n\r\n      out(style);\r\n      out(\"Q\");\r\n    }\r\n  };\r\n\r\n  var clipRuleFromStyle = function(style) {\r\n    switch (style) {\r\n      case \"f\":\r\n      case \"F\":\r\n        return \"W n\";\r\n      case \"f*\":\r\n        return \"W* n\";\r\n      case \"B\":\r\n        return \"W S\";\r\n      case \"B*\":\r\n        return \"W* S\";\r\n\r\n      // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern\r\n      // and \"n\"/\"S\" as style would still fill/fill and stroke the path)\r\n      case \"S\":\r\n        return \"W S\";\r\n      case \"n\":\r\n        return \"W n\";\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Begin a new subpath by moving the current point to coordinates (x, y). The PDF \"m\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @name moveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var moveTo = (API.moveTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" m\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a straight line segment from the current point to the point (x, y). The PDF \"l\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @memberof jsPDF#\r\n   * @name lineTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var lineTo = (API.lineTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" l\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point\r\n   * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {number} x3\r\n   * @param {number} y3\r\n   * @memberof jsPDF#\r\n   * @name curveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var curveTo = (API.curveTo = function(x1, y1, x2, y2, x3, y3) {\r\n    out(\r\n      [\r\n        hpf(scale(x1)),\r\n        hpf(transformScaleY(y1)),\r\n        hpf(scale(x2)),\r\n        hpf(transformScaleY(y2)),\r\n        hpf(scale(x3)),\r\n        hpf(transformScaleY(y3)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Draw a line on the current page.\r\n   *\r\n   * @name line\r\n   * @function\r\n   * @instance\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {string} style A string specifying the painting style or null.  Valid styles include: 'S' [default] - stroke, 'F' - fill,  and 'DF' (or 'FD') -  fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.line = API.line = function(x1, y1, x2, y2, style) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.line\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || \"S\");\r\n    } else {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @typedef {Object} PatternData\r\n   * {Matrix|undefined} matrix\r\n   * {Number|undefined} xStep\r\n   * {Number|undefined} yStep\r\n   * {Array.<Number>|undefined} boundingBox\r\n   */\r\n\r\n  /**\r\n   * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.\r\n   * All data points in `lines` are relative to last line origin.\r\n   * `x`, `y` become x1,y1 for first line / curve in the set.\r\n   * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.\r\n   * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.\r\n   *\r\n   * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line\r\n   * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name lines\r\n   */\r\n  API.__private__.lines = API.lines = function(\r\n    lines,\r\n    x,\r\n    y,\r\n    scale,\r\n    style,\r\n    closed\r\n  ) {\r\n    var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(content, coordinateX, coordinateY , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (typeof lines === \"number\") {\r\n      tmp = y;\r\n      y = x;\r\n      x = lines;\r\n      lines = tmp;\r\n    }\r\n\r\n    scale = scale || [1, 1];\r\n    closed = closed || false;\r\n\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      !Array.isArray(lines) ||\r\n      !Array.isArray(scale) ||\r\n      !isValidStyle(style) ||\r\n      typeof closed !== \"boolean\"\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.lines\");\r\n    }\r\n\r\n    // starting point\r\n    moveTo(x, y);\r\n\r\n    scalex = scale[0];\r\n    scaley = scale[1];\r\n    l = lines.length;\r\n    //, x2, y2 // bezier only. In page default measurement \"units\", *after* scaling\r\n    //, x3, y3 // bezier only. In page default measurement \"units\", *after* scaling\r\n    // ending point for all, lines and bezier. . In page default measurement \"units\", *after* scaling\r\n    x4 = x; // last / ending point = starting point for first item.\r\n    y4 = y; // last / ending point = starting point for first item.\r\n\r\n    for (i = 0; i < l; i++) {\r\n      leg = lines[i];\r\n      if (leg.length === 2) {\r\n        // simple line\r\n        x4 = leg[0] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[1] * scaley + y4; // here last y4 was prior ending point\r\n        lineTo(x4, y4);\r\n      } else {\r\n        // bezier curve\r\n        x2 = leg[0] * scalex + x4; // here last x4 is prior ending point\r\n        y2 = leg[1] * scaley + y4; // here last y4 is prior ending point\r\n        x3 = leg[2] * scalex + x4; // here last x4 is prior ending point\r\n        y3 = leg[3] * scaley + y4; // here last y4 is prior ending point\r\n        x4 = leg[4] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[5] * scaley + y4; // here last y4 was prior ending point\r\n        curveTo(x2, y2, x3, y3, x4, y4);\r\n      }\r\n    }\r\n\r\n    if (closed) {\r\n      close();\r\n    }\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.\r\n   * @param {Array<Object>} lines An array of {op: operator, c: coordinates} object, where op is one of \"m\" (move to), \"l\" (line to)\r\n   * \"c\" (cubic bezier curve) and \"h\" (close (sub)path)). c is an array of coordinates. \"m\" and \"l\" expect two, \"c\"\r\n   * six and \"h\" an empty array (or undefined).\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name path\r\n   */\r\n  API.path = function(lines) {\r\n    for (var i = 0; i < lines.length; i++) {\r\n      var leg = lines[i];\r\n      var coords = leg.c;\r\n      switch (leg.op) {\r\n        case \"m\":\r\n          moveTo(coords[0], coords[1]);\r\n          break;\r\n        case \"l\":\r\n          lineTo(coords[0], coords[1]);\r\n          break;\r\n        case \"c\":\r\n          curveTo.apply(this, coords);\r\n          break;\r\n        case \"h\":\r\n          close();\r\n          break;\r\n      }\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name rect\r\n   */\r\n  API.__private__.rect = API.rect = function(x, y, w, h, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.rect\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      h = -h;\r\n    }\r\n\r\n    out(\r\n      [\r\n        hpf(scale(x)),\r\n        hpf(transformScaleY(y)),\r\n        hpf(scale(w)),\r\n        hpf(scale(h)),\r\n        \"re\"\r\n      ].join(\" \")\r\n    );\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a triangle to PDF.\r\n   *\r\n   * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name triangle\r\n   */\r\n  API.__private__.triangle = API.triangle = function(\r\n    x1,\r\n    y1,\r\n    x2,\r\n    y2,\r\n    x3,\r\n    y3,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      isNaN(x3) ||\r\n      isNaN(y3) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.triangle\");\r\n    }\r\n    this.lines(\r\n      [\r\n        [x2 - x1, y2 - y1], // vector to point 2\r\n        [x3 - x2, y3 - y2], // vector to point 3\r\n        [x1 - x3, y1 - y3] // closing vector back to point 1\r\n      ],\r\n      x1,\r\n      y1, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle with rounded corners to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name roundedRect\r\n   */\r\n  API.__private__.roundedRect = API.roundedRect = function(\r\n    x,\r\n    y,\r\n    w,\r\n    h,\r\n    rx,\r\n    ry,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(w) ||\r\n      isNaN(h) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.roundedRect\");\r\n    }\r\n    var MyArc = (4 / 3) * (Math.SQRT2 - 1);\r\n\r\n    rx = Math.min(rx, w * 0.5);\r\n    ry = Math.min(ry, h * 0.5);\r\n\r\n    this.lines(\r\n      [\r\n        [w - 2 * rx, 0],\r\n        [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry],\r\n        [0, h - 2 * ry],\r\n        [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry],\r\n        [-w + 2 * rx, 0],\r\n        [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry],\r\n        [0, -h + 2 * ry],\r\n        [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]\r\n      ],\r\n      x + rx,\r\n      y, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an ellipse to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name ellipse\r\n   */\r\n  API.__private__.ellipse = API.ellipse = function(x, y, rx, ry, style) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.ellipse\");\r\n    }\r\n    var lx = (4 / 3) * (Math.SQRT2 - 1) * rx,\r\n      ly = (4 / 3) * (Math.SQRT2 - 1) * ry;\r\n\r\n    moveTo(x + rx, y);\r\n    curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);\r\n    curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);\r\n    curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);\r\n    curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an circle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} r Radius (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name circle\r\n   */\r\n  API.__private__.circle = API.circle = function(x, y, r, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.circle\");\r\n    }\r\n    return this.ellipse(x, y, r, r, style);\r\n  };\r\n\r\n  /**\r\n   * Sets text font face, variant for upcoming text elements.\r\n   * See output of jsPDF.getFontList() for possible font names, styles.\r\n   *\r\n   * @param {string} fontName Font name or family. Example: \"times\".\r\n   * @param {string} fontStyle Font style or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFont\r\n   */\r\n  API.setFont = function(fontName, fontStyle, fontWeight) {\r\n    if (fontWeight) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    activeFontKey = getFont(fontName, fontStyle, {\r\n      disableWarning: false\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets text font face, variant for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {Object}\r\n   * @memberof jsPDF#\r\n   * @name getFont\r\n   */\r\n  var getFontEntry = (API.__private__.getFont = API.getFont = function() {\r\n    return fonts[getFont.apply(API, arguments)];\r\n  });\r\n\r\n  /**\r\n   * Returns an object - a tree of fontName to fontStyle relationships available to\r\n   * active PDF document.\r\n   *\r\n   * @public\r\n   * @function\r\n   * @instance\r\n   * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }\r\n   * @memberof jsPDF#\r\n   * @name getFontList\r\n   */\r\n  API.__private__.getFontList = API.getFontList = function() {\r\n    var list = {},\r\n      fontName,\r\n      fontStyle;\r\n\r\n    for (fontName in fontmap) {\r\n      if (fontmap.hasOwnProperty(fontName)) {\r\n        list[fontName] = [];\r\n        for (fontStyle in fontmap[fontName]) {\r\n          if (fontmap[fontName].hasOwnProperty(fontStyle)) {\r\n            list[fontName].push(fontStyle);\r\n          }\r\n        }\r\n      }\r\n    }\r\n    return list;\r\n  };\r\n\r\n  /**\r\n   * Add a custom font to the current instance.\r\n   *\r\n   * @param {string} postScriptName PDF specification full name for the font.\r\n   * @param {string} id PDF-document-instance-specific label assinged to the font.\r\n   * @param {string} fontStyle Style of the Font.\r\n   * @param {number | string} fontWeight Weight of the Font.\r\n   * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @name addFont\r\n   * @returns {string} fontId\r\n   */\r\n  API.addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    fontWeight,\r\n    encoding\r\n  ) {\r\n    var encodingOptions = [\r\n      \"StandardEncoding\",\r\n      \"MacRomanEncoding\",\r\n      \"Identity-H\",\r\n      \"WinAnsiEncoding\"\r\n    ];\r\n    if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {\r\n      //IE 11 fix\r\n      encoding = arguments[3];\r\n    } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    encoding = encoding || \"Identity-H\";\r\n    return addFont.call(this, postScriptName, fontName, fontStyle, encoding);\r\n  };\r\n\r\n  var lineWidth = options.lineWidth || 0.200025; // 2mm\r\n  /**\r\n   * Gets the line width, default: 0.200025.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineWidth\r\n   * @memberof jsPDF#\r\n   * @name getLineWidth\r\n   */\r\n  var getLineWidth = (API.__private__.getLineWidth = API.getLineWidth = function() {\r\n    return lineWidth;\r\n  });\r\n\r\n  /**\r\n   * Sets line width for upcoming lines.\r\n   *\r\n   * @param {number} width Line width (in units declared at inception of PDF document).\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineWidth\r\n   */\r\n  var setLineWidth = (API.__private__.setLineWidth = API.setLineWidth = function(\r\n    width\r\n  ) {\r\n    lineWidth = width;\r\n    out(hpf(scale(width)) + \" w\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Sets the dash pattern for upcoming lines.\r\n   *\r\n   * To reset the settings simply call the method without any parameters.\r\n   * @param {Array<number>} dashArray An array containing 0-2 numbers. The first number sets the length of the\r\n   * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered\r\n   * to be as long as the dashes. An empty array means solid, unbroken lines.\r\n   * @param {number} dashPhase The phase lines start with.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineDashPattern\r\n   */\r\n  API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function(\r\n    dashArray,\r\n    dashPhase\r\n  ) {\r\n    dashArray = dashArray || [];\r\n    dashPhase = dashPhase || 0;\r\n\r\n    if (isNaN(dashPhase) || !Array.isArray(dashArray)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setLineDash\");\r\n    }\r\n\r\n    dashArray = dashArray\r\n      .map(function(x) {\r\n        return hpf(scale(x));\r\n      })\r\n      .join(\" \");\r\n    dashPhase = hpf(scale(dashPhase));\r\n\r\n    out(\"[\" + dashArray + \"] \" + dashPhase + \" d\");\r\n    return this;\r\n  };\r\n\r\n  var lineHeightFactor;\r\n\r\n  var getLineHeight = (API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  });\r\n\r\n  API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  };\r\n\r\n  /**\r\n   * Sets the LineHeightFactor of proportion.\r\n   *\r\n   * @param {number} value LineHeightFactor value. Default: 1.15.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineHeightFactor\r\n   */\r\n  var setLineHeightFactor = (API.__private__.setLineHeightFactor = API.setLineHeightFactor = function(\r\n    value\r\n  ) {\r\n    value = value || 1.15;\r\n    if (typeof value === \"number\") {\r\n      lineHeightFactor = value;\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Gets the LineHeightFactor, default: 1.15.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineHeightFactor\r\n   * @memberof jsPDF#\r\n   * @name getLineHeightFactor\r\n   */\r\n  var getLineHeightFactor = (API.__private__.getLineHeightFactor = API.getLineHeightFactor = function() {\r\n    return lineHeightFactor;\r\n  });\r\n\r\n  setLineHeightFactor(options.lineHeight);\r\n\r\n  var getHorizontalCoordinate = (API.__private__.getHorizontalCoordinate = function(\r\n    value\r\n  ) {\r\n    return scale(value);\r\n  });\r\n\r\n  var getVerticalCoordinate = (API.__private__.getVerticalCoordinate = function(\r\n    value\r\n  ) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      return value;\r\n    } else {\r\n      var pageHeight =\r\n        pagesContext[currentPage].mediaBox.topRightY -\r\n        pagesContext[currentPage].mediaBox.bottomLeftY;\r\n      return pageHeight - scale(value);\r\n    }\r\n  });\r\n\r\n  var getHorizontalCoordinateString = (API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getHorizontalCoordinate(value));\r\n  });\r\n\r\n  var getVerticalCoordinateString = (API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getVerticalCoordinate(value));\r\n  });\r\n\r\n  var strokeColor = options.strokeColor || \"0 G\";\r\n\r\n  /**\r\n   *  Gets the stroke color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getDrawColor\r\n   */\r\n  API.__private__.getStrokeColor = API.getDrawColor = function() {\r\n    return decodeColorString(strokeColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the stroke color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDrawColor\r\n   */\r\n  API.__private__.setStrokeColor = API.setDrawColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"draw\",\r\n      precision: 2\r\n    };\r\n\r\n    strokeColor = encodeColorString(options);\r\n    out(strokeColor);\r\n    return this;\r\n  };\r\n\r\n  var fillColor = options.fillColor || \"0 g\";\r\n\r\n  /**\r\n   * Gets the fill color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getFillColor\r\n   */\r\n  API.__private__.getFillColor = API.getFillColor = function() {\r\n    return decodeColorString(fillColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the fill color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFillColor\r\n   */\r\n  API.__private__.setFillColor = API.setFillColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"fill\",\r\n      precision: 2\r\n    };\r\n\r\n    fillColor = encodeColorString(options);\r\n    out(fillColor);\r\n    return this;\r\n  };\r\n\r\n  var textColor = options.textColor || \"0 g\";\r\n  /**\r\n   * Gets the text color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getTextColor\r\n   */\r\n  var getTextColor = (API.__private__.getTextColor = API.getTextColor = function() {\r\n    return decodeColorString(textColor);\r\n  });\r\n  /**\r\n   * Sets the text color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setTextColor\r\n   */\r\n  API.__private__.setTextColor = API.setTextColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"text\",\r\n      precision: 3\r\n    };\r\n    textColor = encodeColorString(options);\r\n\r\n    return this;\r\n  };\r\n\r\n  var activeCharSpace = options.charSpace;\r\n\r\n  /**\r\n   * Get global value of CharSpace.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} charSpace\r\n   * @memberof jsPDF#\r\n   * @name getCharSpace\r\n   */\r\n  var getCharSpace = (API.__private__.getCharSpace = API.getCharSpace = function() {\r\n    return parseFloat(activeCharSpace || 0);\r\n  });\r\n\r\n  /**\r\n   * Set global value of CharSpace.\r\n   *\r\n   * @param {number} charSpace\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setCharSpace\r\n   */\r\n  API.__private__.setCharSpace = API.setCharSpace = function(charSpace) {\r\n    if (isNaN(charSpace)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCharSpace\");\r\n    }\r\n    activeCharSpace = charSpace;\r\n    return this;\r\n  };\r\n\r\n  var lineCapID = 0;\r\n  /**\r\n   * Is an Object providing a mapping from human-readable to\r\n   * integer flag values designating the varieties of line cap\r\n   * and join styles.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name CapJoinStyles\r\n   */\r\n  API.CapJoinStyles = {\r\n    0: 0,\r\n    butt: 0,\r\n    but: 0,\r\n    miter: 0,\r\n    1: 1,\r\n    round: 1,\r\n    rounded: 1,\r\n    circle: 1,\r\n    2: 2,\r\n    projecting: 2,\r\n    project: 2,\r\n    square: 2,\r\n    bevel: 2\r\n  };\r\n\r\n  /**\r\n   * Sets the line cap styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line cap.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineCap\r\n   */\r\n  API.__private__.setLineCap = API.setLineCap = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line cap style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineCapID = id;\r\n    out(id + \" J\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var lineJoinID = 0;\r\n  /**\r\n   * Sets the line join styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line join.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineJoin\r\n   */\r\n  API.__private__.setLineJoin = API.setLineJoin = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line join style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineJoinID = id;\r\n    out(id + \" j\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var miterLimit;\r\n  /**\r\n   * Sets the miterLimit property, which effects the maximum miter length.\r\n   *\r\n   * @param {number} length The length of the miter\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineMiterLimit\r\n   */\r\n  API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function(\r\n    length\r\n  ) {\r\n    length = length || 0;\r\n    if (isNaN(length)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setLineMiterLimit\");\r\n    }\r\n    out(hpf(scale(length)) + \" M\");\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * An object representing a pdf graphics state.\r\n   * @class GState\r\n   */\r\n\r\n  /**\r\n   *\r\n   * @param parameters A parameter object that contains all properties this graphics state wants to set.\r\n   * Supported are: opacity, stroke-opacity\r\n   * @constructor\r\n   */\r\n  API.GState = GState;\r\n\r\n  /**\r\n   * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.\r\n   * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState\r\n   * it will be added before use.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setGState\r\n   */\r\n  API.setGState = function(gState) {\r\n    if (typeof gState === \"string\") {\r\n      gState = gStates[gStatesMap[gState]];\r\n    } else {\r\n      gState = addGState(null, gState);\r\n    }\r\n\r\n    if (!gState.equals(activeGState)) {\r\n      out(\"/\" + gState.id + \" gs\");\r\n      activeGState = gState;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Adds a new Graphics State. Duplicates are automatically eliminated.\r\n   * @param {String} key Might also be null, if no later reference to this gState is needed\r\n   * @param {Object} gState The gState object\r\n   */\r\n  var addGState = function(key, gState) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (key && gStatesMap[key]) return;\r\n    var duplicate = false;\r\n    for (var s in gStates) {\r\n      if (gStates.hasOwnProperty(s)) {\r\n        if (gStates[s].equals(gState)) {\r\n          duplicate = true;\r\n          break;\r\n        }\r\n      }\r\n    }\r\n\r\n    if (duplicate) {\r\n      gState = gStates[s];\r\n    } else {\r\n      var gStateKey = \"GS\" + (Object.keys(gStates).length + 1).toString(10);\r\n      gStates[gStateKey] = gState;\r\n      gState.id = gStateKey;\r\n    }\r\n\r\n    // several user keys may point to the same GState object\r\n    key && (gStatesMap[key] = gState.id);\r\n\r\n    events.publish(\"addGState\", gState);\r\n\r\n    return gState;\r\n  };\r\n\r\n  /**\r\n   * Adds a new {@link GState} for later use. See {@link setGState}.\r\n   * @param {String} key\r\n   * @param {GState} gState\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addGState\r\n   */\r\n  API.addGState = function(key, gState) {\r\n    addGState(key, gState);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Saves the current graphics state (\"pushes it on the stack\"). It can be restored by {@link restoreGraphicsState}\r\n   * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,\r\n   * fill and stroke colors etc.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name saveGraphicsState\r\n   */\r\n  API.saveGraphicsState = function() {\r\n    out(\"q\");\r\n    // as we cannot set font key and size independently we must keep track of both\r\n    fontStateStack.push({\r\n      key: activeFontKey,\r\n      size: activeFontSize,\r\n      color: textColor\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Restores a previously saved graphics state saved by {@link saveGraphicsState} (\"pops the stack\").\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name restoreGraphicsState\r\n   */\r\n  API.restoreGraphicsState = function() {\r\n    out(\"Q\");\r\n\r\n    // restore previous font state\r\n    var fontState = fontStateStack.pop();\r\n    activeFontKey = fontState.key;\r\n    activeFontSize = fontState.size;\r\n    textColor = fontState.color;\r\n\r\n    activeGState = null;\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Appends this matrix to the left of all previously applied matrices.\r\n   *\r\n   * @param {Matrix} matrix\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setCurrentTransformationMatrix\r\n   */\r\n  API.setCurrentTransformationMatrix = function(matrix) {\r\n    out(matrix.toString() + \" cm\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Inserts a debug comment into the generated pdf.\r\n   * @function\r\n   * @instance\r\n   * @param {String} text\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name comment\r\n   */\r\n  API.comment = function(text) {\r\n    out(\"#\" + text);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Point\r\n   */\r\n  var Point = function(x, y) {\r\n    var _x = x || 0;\r\n    Object.defineProperty(this, \"x\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _x;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _x = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _y = y || 0;\r\n    Object.defineProperty(this, \"y\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _y;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _y = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _type = \"pt\";\r\n    Object.defineProperty(this, \"type\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _type;\r\n      },\r\n      set: function(value) {\r\n        _type = value.toString();\r\n      }\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Rectangle\r\n   */\r\n  var Rectangle = function(x, y, w, h) {\r\n    Point.call(this, x, y);\r\n    this.type = \"rect\";\r\n\r\n    var _w = w || 0;\r\n    Object.defineProperty(this, \"w\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _w;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _w = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _h = h || 0;\r\n    Object.defineProperty(this, \"h\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _h;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _h = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * FormObject/RenderTarget\r\n   */\r\n\r\n  var RenderTarget = function() {\r\n    this.page = page;\r\n    this.currentPage = currentPage;\r\n    this.pages = pages.slice(0);\r\n    this.pagesContext = pagesContext.slice(0);\r\n    this.x = pageX;\r\n    this.y = pageY;\r\n    this.matrix = pageMatrix;\r\n    this.width = getPageWidth(currentPage);\r\n    this.height = getPageHeight(currentPage);\r\n    this.outputDestination = outputDestination;\r\n\r\n    this.id = \"\"; // set by endFormObject()\r\n    this.objectNumber = -1; // will be set by putXObject()\r\n  };\r\n\r\n  RenderTarget.prototype.restore = function() {\r\n    page = this.page;\r\n    currentPage = this.currentPage;\r\n    pagesContext = this.pagesContext;\r\n    pages = this.pages;\r\n    pageX = this.x;\r\n    pageY = this.y;\r\n    pageMatrix = this.matrix;\r\n    setPageWidth(currentPage, this.width);\r\n    setPageHeight(currentPage, this.height);\r\n    outputDestination = this.outputDestination;\r\n  };\r\n\r\n  var beginNewRenderTarget = function(x, y, width, height, matrix) {\r\n    // save current state\r\n    renderTargetStack.push(new RenderTarget());\r\n\r\n    // clear pages\r\n    page = currentPage = 0;\r\n    pages = [];\r\n    pageX = x;\r\n    pageY = y;\r\n\r\n    pageMatrix = matrix;\r\n\r\n    beginPage([width, height]);\r\n  };\r\n\r\n  var endFormObject = function(key) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (renderTargetMap[key]) {\r\n      renderTargetStack.pop().restore();\r\n      return;\r\n    }\r\n\r\n    // save the created xObject\r\n    var newXObject = new RenderTarget();\r\n\r\n    var xObjectId = \"Xo\" + (Object.keys(renderTargets).length + 1).toString(10);\r\n    newXObject.id = xObjectId;\r\n\r\n    renderTargetMap[key] = xObjectId;\r\n    renderTargets[xObjectId] = newXObject;\r\n\r\n    events.publish(\"addFormObject\", newXObject);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  /**\r\n   * Starts a new pdf form object, which means that all consequent draw calls target a new independent object\r\n   * until {@link endFormObject} is called. The created object can be referenced and drawn later using\r\n   * {@link doFormObject}. Nested form objects are possible.\r\n   * x, y, width, height set the bounding box that is used to clip the content.\r\n   *\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @param {number} width\r\n   * @param {number} height\r\n   * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to\r\n   * the parent's.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name beginFormObject\r\n   */\r\n  API.beginFormObject = function(x, y, width, height, matrix) {\r\n    // The user can set the output target to a new form object. Nested form objects are possible.\r\n    // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as\r\n    // the PDF-Spec states:\r\n    // \"In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which\r\n    // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,\r\n    // form XObjects may be independent of the content streams in which they appear, and this is strongly\r\n    // recommended although not required\"\r\n    beginNewRenderTarget(x, y, width, height, matrix);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Completes and saves the form object.\r\n   * @param {String} key The key by which this form object can be referenced.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name endFormObject\r\n   */\r\n  API.endFormObject = function(key) {\r\n    endFormObject(key);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Draws the specified form object by referencing to the respective pdf XObject created with\r\n   * {@link API.beginFormObject} and {@link endFormObject}.\r\n   * The location is determined by matrix.\r\n   *\r\n   * @param {String} key The key to the form object.\r\n   * @param {Matrix} matrix The matrix applied before drawing the form object.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name doFormObject\r\n   */\r\n  API.doFormObject = function(key, matrix) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    out(\"q\");\r\n    out(matrix.toString() + \" cm\");\r\n    out(\"/\" + xObject.id + \" Do\");\r\n    out(\"Q\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Returns the form object specified by key.\r\n   * @param key {String}\r\n   * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name getFormObject\r\n   */\r\n  API.getFormObject = function(key) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    return {\r\n      x: xObject.x,\r\n      y: xObject.y,\r\n      width: xObject.width,\r\n      height: xObject.height,\r\n      matrix: xObject.matrix\r\n    };\r\n  };\r\n\r\n  /**\r\n   * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').\r\n   * Uses FileSaver.js-method saveAs.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name save\r\n   * @function\r\n   * @instance\r\n   * @param  {string} filename The filename including extension.\r\n   * @param  {Object} options An Object with additional options, possible options: 'returnPromise'.\r\n   * @returns {jsPDF|Promise} jsPDF-instance     */\r\n  API.save = function(filename, options) {\r\n    filename = filename || \"generated.pdf\";\r\n\r\n    options = options || {};\r\n    options.returnPromise = options.returnPromise || false;\r\n\r\n    if (options.returnPromise === false) {\r\n      saveAs(getBlob(buildDocument()), filename);\r\n      if (typeof saveAs.unload === \"function\") {\r\n        if (globalObject.setTimeout) {\r\n          setTimeout(saveAs.unload, 911);\r\n        }\r\n      }\r\n      return this;\r\n    } else {\r\n      return new Promise(function(resolve, reject) {\r\n        try {\r\n          var result = saveAs(getBlob(buildDocument()), filename);\r\n          if (typeof saveAs.unload === \"function\") {\r\n            if (globalObject.setTimeout) {\r\n              setTimeout(saveAs.unload, 911);\r\n            }\r\n          }\r\n          resolve(result);\r\n        } catch (e) {\r\n          reject(e.message);\r\n        }\r\n      });\r\n    }\r\n\r\n  };\r\n\r\n  // applying plugins (more methods) ON TOP of built-in API.\r\n  // this is intentional as we allow plugins to override\r\n  // built-ins\r\n  for (var plugin in jsPDF.API) {\r\n    if (jsPDF.API.hasOwnProperty(plugin)) {\r\n      if (plugin === \"events\" && jsPDF.API.events.length) {\r\n        (function(events, newEvents) {\r\n          // jsPDF.API.events is a JS Array of Arrays\r\n          // where each Array is a pair of event name, handler\r\n          // Events were added by plugins to the jsPDF instantiator.\r\n          // These are always added to the new instance and some ran\r\n          // during instantiation.\r\n          var eventname, handler_and_args, i;\r\n\r\n          for (i = newEvents.length - 1; i !== -1; i--) {\r\n            // subscribe takes 3 args: 'topic', function, runonce_flag\r\n            // if undefined, runonce is false.\r\n            // users can attach callback directly,\r\n            // or they can attach an array with [callback, runonce_flag]\r\n            // that's what the \"apply\" magic is for below.\r\n            eventname = newEvents[i][0];\r\n            handler_and_args = newEvents[i][1];\r\n            events.subscribe.apply(\r\n              events,\r\n              [eventname].concat(\r\n                typeof handler_and_args === \"function\"\r\n                  ? [handler_and_args]\r\n                  : handler_and_args\r\n              )\r\n            );\r\n          }\r\n        })(events, jsPDF.API.events);\r\n      } else {\r\n        API[plugin] = jsPDF.API[plugin];\r\n      }\r\n    }\r\n  }\r\n\r\n  var getPageWidth = (API.getPageWidth = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightX -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftX) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageWidth = (API.setPageWidth = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightX =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;\r\n  });\r\n\r\n  var getPageHeight = (API.getPageHeight = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightY -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftY) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageHeight = (API.setPageHeight = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightY =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;\r\n  });\r\n\r\n  /**\r\n   * Object exposing internal API to plugins\r\n   * @public\r\n   * @ignore\r\n   */\r\n  API.internal = {\r\n    pdfEscape: pdfEscape,\r\n    getStyle: getStyle,\r\n    getFont: getFontEntry,\r\n    getFontSize: getFontSize,\r\n    getCharSpace: getCharSpace,\r\n    getTextColor: getTextColor,\r\n    getLineHeight: getLineHeight,\r\n    getLineHeightFactor: getLineHeightFactor,\r\n    getLineWidth: getLineWidth,\r\n    write: write,\r\n    getHorizontalCoordinate: getHorizontalCoordinate,\r\n    getVerticalCoordinate: getVerticalCoordinate,\r\n    getCoordinateString: getHorizontalCoordinateString,\r\n    getVerticalCoordinateString: getVerticalCoordinateString,\r\n    collections: {},\r\n    newObject: newObject,\r\n    newAdditionalObject: newAdditionalObject,\r\n    newObjectDeferred: newObjectDeferred,\r\n    newObjectDeferredBegin: newObjectDeferredBegin,\r\n    getFilters: getFilters,\r\n    putStream: putStream,\r\n    events: events,\r\n    scaleFactor: scaleFactor,\r\n    pageSize: {\r\n      getWidth: function() {\r\n        return getPageWidth(currentPage);\r\n      },\r\n      setWidth: function(value) {\r\n        setPageWidth(currentPage, value);\r\n      },\r\n      getHeight: function() {\r\n        return getPageHeight(currentPage);\r\n      },\r\n      setHeight: function(value) {\r\n        setPageHeight(currentPage, value);\r\n      }\r\n    },\r\n    encryptionOptions: encryptionOptions,\r\n    encryption: encryption,\r\n    getEncryptor: getEncryptor,\r\n    output: output,\r\n    getNumberOfPages: getNumberOfPages,\r\n    pages: pages,\r\n    out: out,\r\n    f2: f2,\r\n    f3: f3,\r\n    getPageInfo: getPageInfo,\r\n    getPageInfoByObjId: getPageInfoByObjId,\r\n    getCurrentPageInfo: getCurrentPageInfo,\r\n    getPDFVersion: getPdfVersion,\r\n    Point: Point,\r\n    Rectangle: Rectangle,\r\n    Matrix: Matrix,\r\n    hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.\r\n  };\r\n\r\n  Object.defineProperty(API.internal.pageSize, \"width\", {\r\n    get: function() {\r\n      return getPageWidth(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageWidth(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n  Object.defineProperty(API.internal.pageSize, \"height\", {\r\n    get: function() {\r\n      return getPageHeight(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageHeight(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n\r\n  //////////////////////////////////////////////////////\r\n  // continuing initialization of jsPDF Document object\r\n  //////////////////////////////////////////////////////\r\n  // Add the first page automatically\r\n  addFonts.call(API, standardFonts);\r\n  activeFontKey = \"F1\";\r\n  _addPage(format, orientation);\r\n\r\n  events.publish(\"initialized\");\r\n  return API;\r\n}\r\n\r\n/**\r\n * jsPDF.API is a STATIC property of jsPDF class.\r\n * jsPDF.API is an object you can add methods and properties to.\r\n * The methods / properties you add will show up in new jsPDF objects.\r\n *\r\n * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,\r\n * callbacks to this object. These will be reassigned to all new instances of jsPDF.\r\n *\r\n * @static\r\n * @public\r\n * @memberof jsPDF#\r\n * @name API\r\n *\r\n * @example\r\n * jsPDF.API.mymethod = function(){\r\n *   // 'this' will be ref to internal API object. see jsPDF source\r\n *   // , so you can refer to built-in methods like so:\r\n *   //     this.line(....)\r\n *   //     this.text(....)\r\n * }\r\n * var pdfdoc = new jsPDF()\r\n * pdfdoc.mymethod() // <- !!!!!!\r\n */\r\njsPDF.API = {\r\n  events: []\r\n};\r\n/**\r\n * The version of jsPDF.\r\n * @name version\r\n * @type {string}\r\n * @memberof jsPDF#\r\n */\r\njsPDF.version = \"0.0.0\";\r\n\r\nexport { jsPDF, ShadingPattern, TilingPattern, GState };\r\nexport default jsPDF;\r\n","/* global jsPDF */\n/**\n * @license\n * Copyright (c) 2016 Alexander Weidt,\n * https://github.com/BiggA94\n *\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF AcroForm Plugin\n * @module AcroForm\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\nvar jsPDFAPI = jsPDF.API;\nvar scaleFactor = 1;\n\nvar pdfEscape = function(value) {\n  return value\n    .replace(/\\\\/g, \"\\\\\\\\\")\n    .replace(/\\(/g, \"\\\\(\")\n    .replace(/\\)/g, \"\\\\)\");\n};\nvar pdfUnescape = function(value) {\n  return value\n    .replace(/\\\\\\\\/g, \"\\\\\")\n    .replace(/\\\\\\(/g, \"(\")\n    .replace(/\\\\\\)/g, \")\");\n};\n\nvar f2 = function(number) {\n  return number.toFixed(2); // Ie, %.2f\n};\n\nvar f5 = function(number) {\n  return number.toFixed(5); // Ie, %.2f\n};\n\njsPDFAPI.__acroform__ = {};\nvar inherit = function(child, parent) {\n  child.prototype = Object.create(parent.prototype);\n  child.prototype.constructor = child;\n};\n\nvar scale = function(x) {\n  return x * scaleFactor;\n};\n\nvar createFormXObject = function(formObject) {\n  var xobj = new AcroFormXObject();\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];\n  return xobj;\n};\n\n/**\n * Bit-Operations\n */\nvar setBit = (jsPDFAPI.__acroform__.setBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number |= bitMask;\n\n  return number;\n});\n\nvar clearBit = (jsPDFAPI.__acroform__.clearBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number &= ~bitMask;\n\n  return number;\n});\n\nvar getBit = (jsPDFAPI.__acroform__.getBit = function(number, bitPosition) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBit\"\n    );\n  }\n  return (number & (1 << bitPosition)) === 0 ? 0 : 1;\n});\n\n/*\n * Ff starts counting the bit position at 1 and not like javascript at 0\n */\nvar getBitForPdf = (jsPDFAPI.__acroform__.getBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf\"\n    );\n  }\n  return getBit(number, bitPosition - 1);\n});\n\nvar setBitForPdf = (jsPDFAPI.__acroform__.setBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf\"\n    );\n  }\n  return setBit(number, bitPosition - 1);\n});\n\nvar clearBitForPdf = (jsPDFAPI.__acroform__.clearBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf\"\n    );\n  }\n  return clearBit(number, bitPosition - 1);\n});\n\nvar calculateCoordinates = (jsPDFAPI.__acroform__.calculateCoordinates = function(\n  args,\n  scope\n) {\n  var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;\n  var getVerticalCoordinate = scope.internal.getVerticalCoordinate;\n  var x = args[0];\n  var y = args[1];\n  var w = args[2];\n  var h = args[3];\n\n  var coordinates = {};\n\n  coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;\n  coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;\n  coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;\n  coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;\n\n  return [\n    Number(f2(coordinates.lowerLeft_X)),\n    Number(f2(coordinates.lowerLeft_Y)),\n    Number(f2(coordinates.upperRight_X)),\n    Number(f2(coordinates.upperRight_Y))\n  ];\n});\n\nvar calculateAppearanceStream = function(formObject) {\n  if (formObject.appearanceStreamContent) {\n    return formObject.appearanceStreamContent;\n  }\n\n  if (!formObject.V && !formObject.DV) {\n    return;\n  }\n\n  // else calculate it\n\n  var stream = [];\n  var text = formObject._V || formObject.DV;\n  var calcRes = calculateX(formObject, text);\n  var fontKey = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  ).id;\n\n  //PDF 32000-1:2008, page 444\n  stream.push(\"/Tx BMC\");\n  stream.push(\"q\");\n  stream.push(\"BT\"); // Begin Text\n  stream.push(formObject.scope.__private__.encodeColorString(formObject.color));\n  stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf\");\n  stream.push(\"1 0 0 1 0 0 Tm\"); // Transformation Matrix\n  stream.push(calcRes.text);\n  stream.push(\"ET\"); // End Text\n  stream.push(\"Q\");\n  stream.push(\"EMC\");\n\n  var appearanceStreamContent = createFormXObject(formObject);\n  appearanceStreamContent.scope = formObject.scope;\n  appearanceStreamContent.stream = stream.join(\"\\n\");\n  return appearanceStreamContent;\n};\n\nvar calculateX = function(formObject, text) {\n  var maxFontSize =\n    formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;\n  var returnValue = {\n    text: \"\",\n    fontSize: \"\"\n  };\n  // Remove Brackets\n  text = text.substr(0, 1) == \"(\" ? text.substr(1) : text;\n  text =\n    text.substr(text.length - 1) == \")\"\n      ? text.substr(0, text.length - 1)\n      : text;\n  // split into array of words\n  var textSplit = text.split(\" \");\n  if (formObject.multiline) {\n    textSplit = textSplit.map(word => word.split(\"\\n\"));\n  } else {\n    textSplit = textSplit.map(word => [word]);\n  }\n\n  var fontSize = maxFontSize; // The Starting fontSize (The Maximum)\n  var lineSpacing = 2;\n  var borderPadding = 2;\n\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  height = height < 0 ? -height : height;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  width = width < 0 ? -width : width;\n\n  var isSmallerThanWidth = function(i, lastLine, fontSize) {\n    if (i + 1 < textSplit.length) {\n      var tmp = lastLine + \" \" + textSplit[i + 1][0];\n      var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;\n      var FieldWidth = width - 2 * borderPadding;\n      return TextWidth <= FieldWidth;\n    } else {\n      return false;\n    }\n  };\n\n  fontSize++;\n  FontSize: while (fontSize > 0) {\n    text = \"\";\n    fontSize--;\n    var textHeight = calculateFontSpace(\"3\", formObject, fontSize).height;\n    var startY = formObject.multiline\n      ? height - fontSize\n      : (height - textHeight) / 2;\n    startY += lineSpacing;\n    var startX;\n\n    var lastY = startY;\n    var firstWordInLine = 0,\n      lastWordInLine = 0;\n    var lastLength;\n    var currWord = 0;\n\n    if (fontSize <= 0) {\n      // In case, the Text doesn't fit at all\n      fontSize = 12;\n      text = \"(...) Tj\\n\";\n      text +=\n        \"% Width of Text: \" +\n        calculateFontSpace(text, formObject, fontSize).width +\n        \", FieldWidth:\" +\n        width +\n        \"\\n\";\n      break;\n    }\n\n    var lastLine = \"\";\n    var lineCount = 0;\n    Line: for (var i = 0; i < textSplit.length; i++) {\n      if (textSplit.hasOwnProperty(i)) {\n        let isWithNewLine = false;\n        if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {\n          if (\n            (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n            height\n          ) {\n            continue FontSize;\n          }\n\n          lastLine += textSplit[i][currWord];\n          isWithNewLine = true;\n          lastWordInLine = i;\n          i--;\n        } else {\n          lastLine += textSplit[i][currWord] + \" \";\n          lastLine =\n            lastLine.substr(lastLine.length - 1) == \" \"\n              ? lastLine.substr(0, lastLine.length - 1)\n              : lastLine;\n          var key = parseInt(i);\n          var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);\n          var isLastWord = i >= textSplit.length - 1;\n\n          if (nextLineIsSmaller && !isLastWord) {\n            lastLine += \" \";\n            currWord = 0;\n            continue; // Line\n          } else if (!nextLineIsSmaller && !isLastWord) {\n            if (!formObject.multiline) {\n              continue FontSize;\n            } else {\n              if (\n                (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n              ) {\n                // If the Text is higher than the\n                // FieldObject\n                continue FontSize;\n              }\n              lastWordInLine = key;\n              // go on\n            }\n          } else if (isLastWord) {\n            lastWordInLine = key;\n          } else {\n            if (\n              formObject.multiline &&\n              (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n            ) {\n              // If the Text is higher than the FieldObject\n              continue FontSize;\n            }\n          }\n        }\n        // Remove last blank\n\n        var line = \"\";\n\n        for (var x = firstWordInLine; x <= lastWordInLine; x++) {\n          var currLine = textSplit[x];\n          if (formObject.multiline) {\n            if (x === lastWordInLine) {\n              line += currLine[currWord] + \" \";\n              currWord = (currWord + 1) % currLine.length;\n              continue;\n            }\n            if (x === firstWordInLine) {\n              line += currLine[currLine.length - 1] + \" \";\n              continue;\n            }\n          }\n          line += currLine[0] + \" \";\n        }\n\n        // Remove last blank\n        line =\n          line.substr(line.length - 1) == \" \"\n            ? line.substr(0, line.length - 1)\n            : line;\n        // lastLength -= blankSpace.width;\n        lastLength = calculateFontSpace(line, formObject, fontSize).width;\n\n        // Calculate startX\n        switch (formObject.textAlign) {\n          case \"right\":\n            startX = width - lastLength - borderPadding;\n            break;\n          case \"center\":\n            startX = (width - lastLength) / 2;\n            break;\n          case \"left\":\n          default:\n            startX = borderPadding;\n            break;\n        }\n        text += f2(startX) + \" \" + f2(lastY) + \" Td\\n\";\n        text += \"(\" + pdfEscape(line) + \") Tj\\n\";\n        // reset X in PDF\n        text += -f2(startX) + \" 0 Td\\n\";\n\n        // After a Line, adjust y position\n        lastY = -(fontSize + lineSpacing);\n\n        // Reset for next iteration step\n        lastLength = 0;\n        firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;\n        lineCount++;\n\n        lastLine = \"\";\n        continue Line;\n      }\n    }\n    break;\n  }\n\n  returnValue.text = text;\n  returnValue.fontSize = fontSize;\n\n  return returnValue;\n};\n\n/**\n * Small workaround for calculating the TextMetric approximately.\n *\n * @param text\n * @param fontsize\n * @returns {TextMetrics} (Has Height and Width)\n */\nvar calculateFontSpace = function(text, formObject, fontSize) {\n  var font = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  );\n  var width =\n    formObject.scope.getStringUnitWidth(text, {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) * parseFloat(fontSize);\n  var height =\n    formObject.scope.getStringUnitWidth(\"3\", {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) *\n    parseFloat(fontSize) *\n    1.5;\n  return { height: height, width: width };\n};\n\nvar acroformPluginTemplate = {\n  fields: [],\n  xForms: [],\n  /**\n   * acroFormDictionaryRoot contains information about the AcroForm\n   * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has\n   * 1: The Object ID of the Root\n   */\n  acroFormDictionaryRoot: null,\n  /**\n   * After the PDF gets evaluated, the reference to the root has to be\n   * reset, this indicates, whether the root has already been printed\n   * out\n   */\n  printedOut: false,\n  internal: null,\n  isInitialized: false\n};\n\nvar annotReferenceCallback = function(scope) {\n  //set objId to undefined and force it to get a new objId on buildDocument\n  scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;\n  var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n  for (var i in fields) {\n    if (fields.hasOwnProperty(i)) {\n      var formObject = fields[i];\n      //set objId to undefined and force it to get a new objId on buildDocument\n      formObject.objId = undefined;\n      // add Annot Reference!\n      if (formObject.hasAnnotation) {\n        // If theres an Annotation Widget in the Form Object, put the\n        // Reference in the /Annot array\n        createAnnotationReference(formObject, scope);\n      }\n    }\n  }\n};\n\nvar putForm = function(formObject) {\n  if (formObject.scope.internal.acroformPlugin.printedOut) {\n    formObject.scope.internal.acroformPlugin.printedOut = false;\n    formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;\n  }\n  formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(\n    formObject\n  );\n};\n/**\n * Create the Reference to the widgetAnnotation, so that it gets referenced\n * in the Annot[] int the+ (Requires the Annotation Plugin)\n */\nvar createAnnotationReference = function(object, scope) {\n  var options = {\n    type: \"reference\",\n    object: object\n  };\n  var findEntry = function(entry) {\n    return entry.type === options.type && entry.object === options.object;\n  };\n  if (\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.find(findEntry) === undefined\n  ) {\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.push(options);\n  }\n};\n\n// Callbacks\n\nvar putCatalogCallback = function(scope) {\n  // Put reference to AcroForm to DocumentCatalog\n  if (\n    typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== \"undefined\"\n  ) {\n    // for safety, shouldn't normally be the case\n    scope.internal.write(\n      \"/AcroForm \" +\n        scope.internal.acroformPlugin.acroFormDictionaryRoot.objId +\n        \" \" +\n        0 +\n        \" R\"\n    );\n  } else {\n    throw new Error(\"putCatalogCallback: Root missing.\");\n  }\n};\n\n/**\n * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm\n * Dictionary\n */\nvar AcroFormDictionaryCallback = function(scope) {\n  // Remove event\n  scope.internal.events.unsubscribe(\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID\n  );\n  delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;\n  scope.internal.acroformPlugin.printedOut = true;\n};\n\n/**\n * Creates the single Fields and writes them into the Document\n *\n * If fieldArray is set, use the fields that are inside it instead of the\n * fields from the AcroRoot (for the FormXObjects...)\n */\nvar createFieldCallback = function(fieldArray, scope) {\n  var standardFields = !fieldArray;\n\n  if (!fieldArray) {\n    // in case there is no fieldArray specified, we want to print out\n    // the Fields of the AcroForm\n    // Print out Root\n    scope.internal.newObjectDeferredBegin(\n      scope.internal.acroformPlugin.acroFormDictionaryRoot.objId,\n      true\n    );\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();\n  }\n\n  fieldArray =\n    fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;\n\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var fieldObject = fieldArray[i];\n      var keyValueList = [];\n      var oldRect = fieldObject.Rect;\n\n      if (fieldObject.Rect) {\n        fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);\n      }\n\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(\n        fieldObject\n      );\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.getKeyValueListForStream === \"function\"\n      ) {\n        keyValueList = fieldObject.getKeyValueListForStream();\n      }\n\n      fieldObject.Rect = oldRect;\n\n      if (\n        fieldObject.hasAppearanceStream &&\n        !fieldObject.appearanceStreamContent\n      ) {\n        // Calculate Appearance\n        var appearance = calculateAppearanceStream(fieldObject);\n        keyValueList.push({ key: \"AP\", value: \"<</N \" + appearance + \">>\" });\n\n        scope.internal.acroformPlugin.xForms.push(appearance);\n      }\n\n      // Assume AppearanceStreamContent is a Array with N,R,D (at least\n      // one of them!)\n      if (fieldObject.appearanceStreamContent) {\n        var appearanceStreamString = \"\";\n        // Iterate over N,R and D\n        for (var k in fieldObject.appearanceStreamContent) {\n          if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {\n            var value = fieldObject.appearanceStreamContent[k];\n            appearanceStreamString += \"/\" + k + \" \";\n            appearanceStreamString += \"<<\";\n            if (Object.keys(value).length >= 1 || Array.isArray(value)) {\n              // appearanceStream is an Array or Object!\n              for (var i in value) {\n                if (value.hasOwnProperty(i)) {\n                  var obj = value[i];\n                  if (typeof obj === \"function\") {\n                    // if Function is referenced, call it in order\n                    // to get the FormXObject\n                    obj = obj.call(scope, fieldObject);\n                  }\n                  appearanceStreamString += \"/\" + i + \" \" + obj + \" \";\n\n                  // In case the XForm is already used, e.g. OffState\n                  // of CheckBoxes, don't add it\n                  if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                    scope.internal.acroformPlugin.xForms.push(obj);\n                }\n              }\n            } else {\n              obj = value;\n              if (typeof obj === \"function\") {\n                // if Function is referenced, call it in order to\n                // get the FormXObject\n                obj = obj.call(scope, fieldObject);\n              }\n              appearanceStreamString += \"/\" + i + \" \" + obj;\n              if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                scope.internal.acroformPlugin.xForms.push(obj);\n            }\n            appearanceStreamString += \">>\";\n          }\n        }\n\n        // appearance stream is a normal Object..\n        keyValueList.push({\n          key: \"AP\",\n          value: \"<<\\n\" + appearanceStreamString + \">>\"\n        });\n      }\n\n      scope.internal.putStream({\n        additionalKeyValues: keyValueList,\n        objectId: fieldObject.objId\n      });\n\n      scope.internal.out(\"endobj\");\n    }\n  }\n  if (standardFields) {\n    createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);\n  }\n};\n\nvar createXFormObjectCallback = function(fieldArray, scope) {\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var key = i;\n      var fieldObject = fieldArray[i];\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.putStream === \"function\"\n      ) {\n        fieldObject.putStream();\n      }\n      delete fieldArray[key];\n    }\n  }\n};\n\nvar initializeAcroForm = function(scope, formObject) {\n  formObject.scope = scope;\n  if (\n    scope.internal !== undefined &&\n    (scope.internal.acroformPlugin === undefined ||\n      scope.internal.acroformPlugin.isInitialized === false)\n  ) {\n    AcroFormField.FieldNum = 0;\n    scope.internal.acroformPlugin = JSON.parse(\n      JSON.stringify(acroformPluginTemplate)\n    );\n    if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {\n      throw new Error(\"Exception while creating AcroformDictionary\");\n    }\n    scaleFactor = scope.internal.scaleFactor;\n    // The Object Number of the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope;\n\n    // add Callback for creating the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe(\n      \"postPutResources\",\n      function() {\n        AcroFormDictionaryCallback(scope);\n      }\n    );\n\n    scope.internal.events.subscribe(\"buildDocument\", function() {\n      annotReferenceCallback(scope);\n    }); // buildDocument\n\n    // Register event, that is triggered when the DocumentCatalog is\n    // written, in order to add /AcroForm\n\n    scope.internal.events.subscribe(\"putCatalog\", function() {\n      putCatalogCallback(scope);\n    });\n\n    // Register event, that creates all Fields\n    scope.internal.events.subscribe(\"postPutPages\", function(fieldArray) {\n      createFieldCallback(fieldArray, scope);\n    });\n\n    scope.internal.acroformPlugin.isInitialized = true;\n  }\n};\n\n//PDF 32000-1:2008, page 26, 7.3.6\nvar arrayToPdfArray = (jsPDFAPI.__acroform__.arrayToPdfArray = function(\n  array,\n  objId,\n  scope\n) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (Array.isArray(array)) {\n    var content = \"[\";\n    for (var i = 0; i < array.length; i++) {\n      if (i !== 0) {\n        content += \" \";\n      }\n      switch (typeof array[i]) {\n        case \"boolean\":\n        case \"number\":\n        case \"object\":\n          content += array[i].toString();\n          break;\n        case \"string\":\n          if (array[i].substr(0, 1) !== \"/\") {\n            if (typeof objId !== \"undefined\" && scope)\n              encryptor = scope.internal.getEncryptor(objId);\n            content += \"(\" + pdfEscape(encryptor(array[i].toString())) + \")\";\n          } else {\n            content += array[i].toString();\n          }\n          break;\n      }\n    }\n    content += \"]\";\n    return content;\n  }\n  throw new Error(\n    \"Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray\"\n  );\n});\nfunction getMatches(string, regex, index) {\n  index || (index = 1); // default to the first capturing group\n  var matches = [];\n  var match;\n  while ((match = regex.exec(string))) {\n    matches.push(match[index]);\n  }\n  return matches;\n}\nvar pdfArrayToStringArray = function(array) {\n  var result = [];\n  if (typeof array === \"string\") {\n    result = getMatches(array, /\\((.*?)\\)/g);\n  }\n  return result;\n};\n\nvar toPdfString = function(string, objId, scope) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (typeof objId !== \"undefined\" && scope)\n    encryptor = scope.internal.getEncryptor(objId);\n  string = string || \"\";\n  string.toString();\n  string = \"(\" + pdfEscape(encryptor(string)) + \")\";\n  return string;\n};\n\n// ##########################\n// Classes\n// ##########################\n\n/**\n * @class AcroFormPDFObject\n * @classdesc A AcroFormPDFObject\n */\nvar AcroFormPDFObject = function() {\n  this._objId = undefined;\n  this._scope = undefined;\n\n  /**\n   * @name AcroFormPDFObject#objId\n   * @type {any}\n   */\n  Object.defineProperty(this, \"objId\", {\n    get: function() {\n      if (typeof this._objId === \"undefined\") {\n        if (typeof this.scope === \"undefined\") {\n          return undefined;\n        }\n        this._objId = this.scope.internal.newObjectDeferred();\n      }\n      return this._objId;\n    },\n    set: function(value) {\n      this._objId = value;\n    }\n  });\n  Object.defineProperty(this, \"scope\", {\n    value: this._scope,\n    writable: true\n  });\n};\n\n/**\n * @function AcroFormPDFObject.toString\n */\nAcroFormPDFObject.prototype.toString = function() {\n  return this.objId + \" 0 R\";\n};\n\nAcroFormPDFObject.prototype.putStream = function() {\n  var keyValueList = this.getKeyValueListForStream();\n  this.scope.internal.putStream({\n    data: this.stream,\n    additionalKeyValues: keyValueList,\n    objectId: this.objId\n  });\n  this.scope.internal.out(\"endobj\");\n};\n\n/**\n * Returns an key-value-List of all non-configurable Variables from the Object\n *\n * @name getKeyValueListForStream\n * @returns {string}\n */\nAcroFormPDFObject.prototype.getKeyValueListForStream = function() {\n  var keyValueList = [];\n  var keys = Object.getOwnPropertyNames(this).filter(function(key) {\n    return (\n      key != \"content\" &&\n      key != \"appearanceStreamContent\" &&\n      key != \"scope\" &&\n      key != \"objId\" &&\n      key.substring(0, 1) != \"_\"\n    );\n  });\n\n  for (var i in keys) {\n    if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {\n      var key = keys[i];\n      var value = this[key];\n\n      if (value) {\n        if (Array.isArray(value)) {\n          keyValueList.push({\n            key: key,\n            value: arrayToPdfArray(value, this.objId, this.scope)\n          });\n        } else if (value instanceof AcroFormPDFObject) {\n          // In case it is a reference to another PDFObject,\n          // take the reference number\n          value.scope = this.scope;\n          keyValueList.push({ key: key, value: value.objId + \" 0 R\" });\n        } else if (typeof value !== \"function\") {\n          keyValueList.push({ key: key, value: value });\n        }\n      }\n    }\n  }\n  return keyValueList;\n};\n\nvar AcroFormXObject = function() {\n  AcroFormPDFObject.call(this);\n\n  Object.defineProperty(this, \"Type\", {\n    value: \"/XObject\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    value: \"/Form\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"FormType\", {\n    value: 1,\n    configurable: false,\n    writable: true\n  });\n\n  var _BBox = [];\n  Object.defineProperty(this, \"BBox\", {\n    configurable: false,\n    get: function() {\n      return _BBox;\n    },\n    set: function(value) {\n      _BBox = value;\n    }\n  });\n\n  Object.defineProperty(this, \"Resources\", {\n    value: \"2 0 R\",\n    configurable: false,\n    writable: true\n  });\n\n  var _stream;\n  Object.defineProperty(this, \"stream\", {\n    enumerable: false,\n    configurable: true,\n    set: function(value) {\n      _stream = value.trim();\n    },\n    get: function() {\n      if (_stream) {\n        return _stream;\n      } else {\n        return null;\n      }\n    }\n  });\n};\n\ninherit(AcroFormXObject, AcroFormPDFObject);\n\nvar AcroFormDictionary = function() {\n  AcroFormPDFObject.call(this);\n\n  var _Kids = [];\n\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      if (_Kids.length > 0) {\n        return _Kids;\n      } else {\n        return undefined;\n      }\n    }\n  });\n  Object.defineProperty(this, \"Fields\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    }\n  });\n\n  // Default Appearance\n  var _DA;\n  Object.defineProperty(this, \"DA\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DA) {\n        return undefined;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_DA)) + \")\";\n    },\n    set: function(value) {\n      _DA = value;\n    }\n  });\n};\n\ninherit(AcroFormDictionary, AcroFormPDFObject);\n\n/**\n * The Field Object contains the Variables, that every Field needs\n *\n * @class AcroFormField\n * @classdesc An AcroForm FieldObject\n */\nvar AcroFormField = function() {\n  AcroFormPDFObject.call(this);\n\n  //Annotation-Flag See Table 165\n  var _F = 4;\n  Object.defineProperty(this, \"F\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _F;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _F = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute F supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.\n   * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.\n   *\n   * @name AcroFormField#showWhenPrinted\n   * @default true\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"showWhenPrinted\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(_F, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.F = setBitForPdf(_F, 3);\n      } else {\n        this.F = clearBitForPdf(_F, 3);\n      }\n    }\n  });\n\n  var _Ff = 0;\n  Object.defineProperty(this, \"Ff\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Ff;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _Ff = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Ff supplied.'\n        );\n      }\n    }\n  });\n\n  var _Rect = [];\n  Object.defineProperty(this, \"Rect\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (_Rect.length === 0) {\n        return undefined;\n      }\n      return _Rect;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Rect = value;\n      } else {\n        _Rect = [];\n      }\n    }\n  });\n\n  /**\n   * The x-position of the field.\n   *\n   * @name AcroFormField#x\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"x\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[0])) {\n        return 0;\n      }\n      return _Rect[0];\n    },\n    set: function(value) {\n      _Rect[0] = value;\n    }\n  });\n\n  /**\n   * The y-position of the field.\n   *\n   * @name AcroFormField#y\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"y\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[1])) {\n        return 0;\n      }\n      return _Rect[1];\n    },\n    set: function(value) {\n      _Rect[1] = value;\n    }\n  });\n\n  /**\n   * The width of the field.\n   *\n   * @name AcroFormField#width\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"width\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[2])) {\n        return 0;\n      }\n      return _Rect[2];\n    },\n    set: function(value) {\n      _Rect[2] = value;\n    }\n  });\n\n  /**\n   * The height of the field.\n   *\n   * @name AcroFormField#height\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"height\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[3])) {\n        return 0;\n      }\n      return _Rect[3];\n    },\n    set: function(value) {\n      _Rect[3] = value;\n    }\n  });\n\n  var _FT = \"\";\n  Object.defineProperty(this, \"FT\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _FT;\n    },\n    set: function(value) {\n      switch (value) {\n        case \"/Btn\":\n        case \"/Tx\":\n        case \"/Ch\":\n        case \"/Sig\":\n          _FT = value;\n          break;\n        default:\n          throw new Error(\n            'Invalid value \"' + value + '\" for attribute FT supplied.'\n          );\n      }\n    }\n  });\n\n  var _T = null;\n\n  Object.defineProperty(this, \"T\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (!_T || _T.length < 1) {\n        // In case of a Child from a Radio´Group, you don't need a FieldName\n        if (this instanceof AcroFormChildClass) {\n          return undefined;\n        }\n        _T = \"FieldObject\" + AcroFormField.FieldNum++;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_T)) + \")\";\n    },\n    set: function(value) {\n      _T = value.toString();\n    }\n  });\n\n  /**\n   * (Optional) The partial field name (see 12.7.3.2, “Field Names”).\n   *\n   * @name AcroFormField#fieldName\n   * @default null\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fieldName\", {\n    configurable: true,\n    enumerable: true,\n    get: function() {\n      return _T;\n    },\n    set: function(value) {\n      _T = value;\n    }\n  });\n\n  var _fontName = \"helvetica\";\n  /**\n   * The fontName of the font to be used.\n   *\n   * @name AcroFormField#fontName\n   * @default 'helvetica'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontName\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontName;\n    },\n    set: function(value) {\n      _fontName = value;\n    }\n  });\n\n  var _fontStyle = \"normal\";\n  /**\n   * The fontStyle of the font to be used.\n   *\n   * @name AcroFormField#fontStyle\n   * @default 'normal'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontStyle\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontStyle;\n    },\n    set: function(value) {\n      _fontStyle = value;\n    }\n  });\n\n  var _fontSize = 0;\n  /**\n   * The fontSize of the font to be used.\n   *\n   * @name AcroFormField#fontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"fontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontSize;\n    },\n    set: function(value) {\n      _fontSize = value;\n    }\n  });\n\n  var _maxFontSize = undefined;\n  /**\n   * The maximum fontSize of the font to be used.\n   *\n   * @name AcroFormField#maxFontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxFontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (_maxFontSize === undefined) {\n        // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)\n        // (\"50\" is transformed to the \"user space\" but then used in \"pdf space\")\n        return 50 / scaleFactor;\n      } else {\n        return _maxFontSize;\n      }\n    },\n    set: function(value) {\n      _maxFontSize = value;\n    }\n  });\n\n  var _color = \"black\";\n  /**\n   * The color of the text\n   *\n   * @name AcroFormField#color\n   * @default 'black'\n   * @type {string|rgba}\n   */\n  Object.defineProperty(this, \"color\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _color;\n    },\n    set: function(value) {\n      _color = value;\n    }\n  });\n\n  var _DA = \"/F1 0 Tf 0 g\";\n  // Defines the default appearance (Needed for variable Text)\n  Object.defineProperty(this, \"DA\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (\n        !_DA ||\n        this instanceof AcroFormChildClass ||\n        this instanceof AcroFormTextField\n      ) {\n        return undefined;\n      }\n      return toPdfString(_DA, this.objId, this.scope);\n    },\n    set: function(value) {\n      value = value.toString();\n      _DA = value;\n    }\n  });\n\n  var _DV = null;\n  Object.defineProperty(this, \"DV\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DV) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_DV, this.objId, this.scope);\n      }\n      return _DV;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _DV = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _DV = pdfUnescape(value);\n        }\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.\n   *\n   * @name AcroFormField#defaultValue\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"defaultValue\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_DV.substr(1, _DV.length - 1));\n      } else {\n        return _DV;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _DV = \"/\" + value;\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  var _V = null;\n  Object.defineProperty(this, \"_V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      return _V;\n    },\n    set: function(value) {\n      this.V = value;\n    }\n  });\n  Object.defineProperty(this, \"V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_V, this.objId, this.scope);\n      }\n      return _V;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _V = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _V = pdfUnescape(value);\n        }\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.\n   *\n   * @name AcroFormField#value\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"value\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_V.substr(1, _V.length - 1));\n      } else {\n        return _V;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _V = \"/\" + value;\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * Check if field has annotations\n   *\n   * @name AcroFormField#hasAnnotation\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAnnotation\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.Rect;\n    }\n  });\n\n  Object.defineProperty(this, \"Type\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Annot\" : null;\n    }\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Widget\" : null;\n    }\n  });\n\n  var _hasAppearanceStream = false;\n  /**\n   * true if field has an appearanceStream\n   *\n   * @name AcroFormField#hasAppearanceStream\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _hasAppearanceStream;\n    },\n    set: function(value) {\n      value = Boolean(value);\n      _hasAppearanceStream = value;\n    }\n  });\n\n  /**\n   * The page on which the AcroFormField is placed\n   *\n   * @name AcroFormField#page\n   * @type {number}\n   */\n  var _page;\n  Object.defineProperty(this, \"page\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_page) {\n        return undefined;\n      }\n      return _page;\n    },\n    set: function(value) {\n      _page = value;\n    }\n  });\n\n  /**\n   * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.\n   *\n   * @name AcroFormField#readOnly\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"readOnly\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 1));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 1);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 1);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).\n   *\n   * @name AcroFormField#required\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"required\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 2));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 2);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 2);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)\n   *\n   * @name AcroFormField#noExport\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noExport\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 3);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 3);\n      }\n    }\n  });\n\n  var _Q = null;\n  Object.defineProperty(this, \"Q\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (_Q === null) {\n        return undefined;\n      }\n      return _Q;\n    },\n    set: function(value) {\n      if ([0, 1, 2].indexOf(value) !== -1) {\n        _Q = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Q supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:\n   * 'left', 'center', 'right'\n   *\n   * @name AcroFormField#textAlign\n   * @default 'left'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"textAlign\", {\n    get: function() {\n      var result;\n      switch (_Q) {\n        case 0:\n        default:\n          result = \"left\";\n          break;\n        case 1:\n          result = \"center\";\n          break;\n        case 2:\n          result = \"right\";\n          break;\n      }\n      return result;\n    },\n    configurable: true,\n    enumerable: true,\n    set: function(value) {\n      switch (value) {\n        case \"right\":\n        case 2:\n          _Q = 2;\n          break;\n        case \"center\":\n        case 1:\n          _Q = 1;\n          break;\n        case \"left\":\n        case 0:\n        default:\n          _Q = 0;\n      }\n    }\n  });\n};\n\ninherit(AcroFormField, AcroFormPDFObject);\n\n/**\n * @class AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormChoiceField = function() {\n  AcroFormField.call(this);\n  // Field Type = Choice Field\n  this.FT = \"/Ch\";\n  // options\n  this.V = \"()\";\n\n  this.fontName = \"zapfdingbats\";\n  // Top Index\n  var _TI = 0;\n\n  Object.defineProperty(this, \"TI\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  /**\n   * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.\n   *\n   * @name AcroFormChoiceField#topIndex\n   * @default 0\n   * @type {number}\n   */\n  Object.defineProperty(this, \"topIndex\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  var _Opt = [];\n  Object.defineProperty(this, \"Opt\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return arrayToPdfArray(_Opt, this.objId, this.scope);\n    },\n    set: function(value) {\n      _Opt = pdfArrayToStringArray(value);\n    }\n  });\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name getOptions\n   * @function\n   * @instance\n   * @returns {array} array of Options\n   */\n  this.getOptions = function() {\n    return _Opt;\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name setOptions\n   * @function\n   * @instance\n   * @param {array} value\n   */\n  this.setOptions = function(value) {\n    _Opt = value;\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name addOption\n   * @function\n   * @instance\n   * @param {string} value\n   */\n  this.addOption = function(value) {\n    value = value || \"\";\n    value = value.toString();\n    _Opt.push(value);\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name removeOption\n   * @function\n   * @instance\n   * @param {string} value\n   * @param {boolean} allEntries (default: false)\n   */\n  this.removeOption = function(value, allEntries) {\n    allEntries = allEntries || false;\n    value = value || \"\";\n    value = value.toString();\n\n    while (_Opt.indexOf(value) !== -1) {\n      _Opt.splice(_Opt.indexOf(value), 1);\n      if (allEntries === false) {\n        break;\n      }\n    }\n  };\n\n  /**\n   * If set, the field is a combo box; if clear, the field is a list box.\n   *\n   * @name AcroFormChoiceField#combo\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"combo\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 18));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 18);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 18);\n      }\n    }\n  });\n\n  /**\n   * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.\n   *\n   * @name AcroFormChoiceField#edit\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"edit\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 19));\n    },\n    set: function(value) {\n      //PDF 32000-1:2008, page 444\n      if (this.combo === true) {\n        if (Boolean(value) === true) {\n          this.Ff = setBitForPdf(this.Ff, 19);\n        } else {\n          this.Ff = clearBitForPdf(this.Ff, 19);\n        }\n      }\n    }\n  });\n\n  /**\n   * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).\n   *\n   * @name AcroFormChoiceField#sort\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"sort\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 20));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 20);\n        _Opt.sort();\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 20);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected\n   *\n   * @name AcroFormChoiceField#multiSelect\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 22));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 22);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 22);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.\n   *\n   * @name AcroFormChoiceField#doNotSpellCheck\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.\n   * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.\n   *\n   * @name AcroFormChoiceField#commitOnSelChange\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"commitOnSelChange\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 27));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 27);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 27);\n      }\n    }\n  });\n\n  this.hasAppearanceStream = false;\n};\ninherit(AcroFormChoiceField, AcroFormField);\n\n/**\n * @class AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormListBox = function() {\n  AcroFormChoiceField.call(this);\n  this.fontName = \"helvetica\";\n\n  //PDF 32000-1:2008, page 444\n  this.combo = false;\n};\ninherit(AcroFormListBox, AcroFormChoiceField);\n\n/**\n * @class AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormComboBox = function() {\n  AcroFormListBox.call(this);\n  this.combo = true;\n};\ninherit(AcroFormComboBox, AcroFormListBox);\n\n/**\n * @class AcroFormEditBox\n * @extends AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormEditBox = function() {\n  AcroFormComboBox.call(this);\n  this.edit = true;\n};\ninherit(AcroFormEditBox, AcroFormComboBox);\n\n/**\n * @class AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormButton = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Btn\";\n\n  /**\n   * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.\n   *\n   * @name AcroFormButton#noToggleToOff\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noToggleToOff\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 15));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 15);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 15);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.\n   *\n   * @name AcroFormButton#radio\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radio\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 16));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 16);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 16);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a pushbutton that does not retain a permanent value.\n   *\n   * @name AcroFormButton#pushButton\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"pushButton\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 17));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 17);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 17);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).\n   *\n   * @name AcroFormButton#radioIsUnison\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radioIsUnison\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      if (Object.keys(_MK).length !== 0) {\n        var result = [];\n        result.push(\"<<\");\n        var key;\n        for (key in _MK) {\n          result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n        }\n        result.push(\">>\");\n        return result.join(\"\\n\");\n      }\n      return undefined;\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n};\ninherit(AcroFormButton, AcroFormField);\n\n/**\n * @class AcroFormPushButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormPushButton = function() {\n  AcroFormButton.call(this);\n  this.pushButton = true;\n};\ninherit(AcroFormPushButton, AcroFormButton);\n\n/**\n * @class AcroFormRadioButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormRadioButton = function() {\n  AcroFormButton.call(this);\n  this.radio = true;\n  this.pushButton = false;\n\n  var _Kids = [];\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Kids = value;\n      } else {\n        _Kids = [];\n      }\n    }\n  });\n};\ninherit(AcroFormRadioButton, AcroFormButton);\n\n/**\n * The Child class of a RadioButton (the radioGroup) -> The single Buttons\n *\n * @class AcroFormChildClass\n * @extends AcroFormField\n * @ignore\n */\nvar AcroFormChildClass = function() {\n  AcroFormField.call(this);\n\n  var _parent;\n  Object.defineProperty(this, \"Parent\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _parent;\n    },\n    set: function(value) {\n      _parent = value;\n    }\n  });\n\n  var _optionName;\n  Object.defineProperty(this, \"optionName\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      return _optionName;\n    },\n    set: function(value) {\n      _optionName = value;\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      var result = [];\n      result.push(\"<<\");\n      var key;\n      for (key in _MK) {\n        result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n      }\n      result.push(\">>\");\n      return result.join(\"\\n\");\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n  this.caption = \"l\";\n  this.appearanceState = \"Off\";\n  // todo: set AppearanceType as variable that can be set from the\n  // outside...\n  this._AppearanceType = AcroFormAppearance.RadioButton.Circle;\n  // The Default appearanceType is the Circle\n  this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(\n    this.optionName\n  );\n};\ninherit(AcroFormChildClass, AcroFormField);\n\nAcroFormRadioButton.prototype.setAppearance = function(appearance) {\n  if (!(\"createAppearanceStream\" in appearance && \"getCA\" in appearance)) {\n    throw new Error(\n      \"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\"\n    );\n  }\n  for (var objId in this.Kids) {\n    if (this.Kids.hasOwnProperty(objId)) {\n      var child = this.Kids[objId];\n      child.appearanceStreamContent = appearance.createAppearanceStream(\n        child.optionName\n      );\n      child.caption = appearance.getCA();\n    }\n  }\n};\n\nAcroFormRadioButton.prototype.createOption = function(name) {\n  // Create new Child for RadioGroup\n  var child = new AcroFormChildClass();\n  child.Parent = this;\n  child.optionName = name;\n  // Add to Parent\n  this.Kids.push(child);\n\n  addField.call(this.scope, child);\n\n  return child;\n};\n\n/**\n * @class AcroFormCheckBox\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormCheckBox = function() {\n  AcroFormButton.call(this);\n\n  this.fontName = \"zapfdingbats\";\n  this.caption = \"3\";\n  this.appearanceState = \"On\";\n  this.value = \"On\";\n  this.textAlign = \"center\";\n  this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();\n};\ninherit(AcroFormCheckBox, AcroFormButton);\n\n/**\n * @class AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormTextField = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Tx\";\n\n  /**\n   * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.\n   *\n   * @name AcroFormTextField#multiline\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiline\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 13));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 13);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 13);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.\n   *\n   * @name AcroFormTextField#fileSelect\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"fileSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 21));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 21);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 21);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spell-checked.\n   *\n   * @name AcroFormTextField#doNotSpellCheck\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.\n   *\n   * @name AcroFormTextField#doNotScroll\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotScroll\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 24));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 24);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 24);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.\n   *\n   * @name AcroFormTextField#comb\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"comb\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 25));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 25);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 25);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.\n   *\n   * @name AcroFormTextField#richText\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"richText\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MaxLen = null;\n  Object.defineProperty(this, \"MaxLen\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      _MaxLen = value;\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The maximum length of the field’s text, in characters.\n   *\n   * @name AcroFormTextField#maxLength\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxLength\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      if (Number.isInteger(value)) {\n        _MaxLen = value;\n      }\n    }\n  });\n\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.V || this.DV;\n    }\n  });\n};\ninherit(AcroFormTextField, AcroFormField);\n\n/**\n * @class AcroFormPasswordField\n * @extends AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormPasswordField = function() {\n  AcroFormTextField.call(this);\n\n  /**\n   * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.\n   * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.\n   *\n   * @name AcroFormTextField#password\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"password\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 14));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 14);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 14);\n      }\n    }\n  });\n  this.password = true;\n};\ninherit(AcroFormPasswordField, AcroFormTextField);\n\n// Contains Methods for creating standard appearances\nvar AcroFormAppearance = {\n  CheckBox: {\n    createAppearanceStream: function() {\n      var appearance = {\n        N: {\n          On: AcroFormAppearance.CheckBox.YesNormal\n        },\n        D: {\n          On: AcroFormAppearance.CheckBox.YesPushDown,\n          Off: AcroFormAppearance.CheckBox.OffPushDown\n        }\n      };\n\n      return appearance;\n    },\n    /**\n     * Returns the standard On Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    YesPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      stream.push(\"BMC\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(\"BT\");\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      stream.push(\"EMC\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    YesNormal: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var stream = [];\n      var height = AcroFormAppearance.internal.getHeight(formObject);\n      var width = AcroFormAppearance.internal.getWidth(formObject);\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"1 g\");\n      stream.push(\"0 0 \" + f2(width) + \" \" + f2(height) + \" re\");\n      stream.push(\"f\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\"0 0 \" + f2(width - 1) + \" \" + f2(height - 1) + \" re\");\n      stream.push(\"W\");\n      stream.push(\"n\");\n      stream.push(\"0 g\");\n      stream.push(\"BT\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    /**\n     * Returns the standard Off Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    OffPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    }\n  },\n\n  RadioButton: {\n    Circle: {\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Circle.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Circle.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Circle.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"l\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        // Make the Radius of the Circle relative to min(height, width) of formObject\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        var c = AcroFormAppearance.internal.Bezier_C;\n        var DotRadiusBezier = Number((DotRadius * c).toFixed(5));\n        /*\n         * The Following is a Circle created with Bezier-Curves.\n         */\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n        var dc = Number(\n          (DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5)\n        );\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        stream.push(\"0 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          \"\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" \" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" -\" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          dc +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    },\n\n    Cross: {\n      /**\n       * Creates the Actual AppearanceDictionary-References\n       *\n       * @param {string} name\n       * @returns {Object}\n       * @ignore\n       */\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Cross.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Cross.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Cross.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"8\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    }\n  },\n\n  /**\n   * Returns the standard Appearance\n   *\n   * @returns {AcroFormXObject}\n   */\n  createDefaultAppearanceStream: function(formObject) {\n    // Set Helvetica to Standard Font (size: auto)\n    // Color: Black\n    var fontKey = formObject.scope.internal.getFont(\n      formObject.fontName,\n      formObject.fontStyle\n    ).id;\n    var encodedColor = formObject.scope.__private__.encodeColorString(\n      formObject.color\n    );\n    var fontSize = formObject.fontSize;\n    var result = \"/\" + fontKey + \" \" + fontSize + \" Tf \" + encodedColor;\n    return result;\n  }\n};\n\nAcroFormAppearance.internal = {\n  Bezier_C: 0.551915024494,\n\n  calculateCross: function(formObject) {\n    var width = AcroFormAppearance.internal.getWidth(formObject);\n    var height = AcroFormAppearance.internal.getHeight(formObject);\n    var a = Math.min(width, height);\n\n    var cross = {\n      x1: {\n        // upperLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 + a // height - borderPadding\n      },\n      x2: {\n        // lowerRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 // borderPadding\n      },\n      x3: {\n        // lowerLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 // borderPadding\n      },\n      x4: {\n        // upperRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 + a // height - borderPadding\n      }\n    };\n\n    return cross;\n  }\n};\nAcroFormAppearance.internal.getWidth = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[2]);\n  }\n  return result;\n};\nAcroFormAppearance.internal.getHeight = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[3]);\n  }\n  return result;\n};\n\n// Public:\n\n/**\n * Add an AcroForm-Field to the jsPDF-instance\n *\n * @name addField\n * @function\n * @instance\n * @param {Object} fieldObject\n * @returns {jsPDF}\n */\nvar addField = (jsPDFAPI.addField = function(fieldObject) {\n  initializeAcroForm(this, fieldObject);\n\n  if (fieldObject instanceof AcroFormField) {\n    putForm(fieldObject);\n  } else {\n    throw new Error(\"Invalid argument passed to jsPDF.addField.\");\n  }\n  fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;\n  return this;\n});\n\njsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;\njsPDFAPI.AcroFormListBox = AcroFormListBox;\njsPDFAPI.AcroFormComboBox = AcroFormComboBox;\njsPDFAPI.AcroFormEditBox = AcroFormEditBox;\njsPDFAPI.AcroFormButton = AcroFormButton;\njsPDFAPI.AcroFormPushButton = AcroFormPushButton;\njsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;\njsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;\njsPDFAPI.AcroFormTextField = AcroFormTextField;\njsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;\njsPDFAPI.AcroFormAppearance = AcroFormAppearance;\n\njsPDFAPI.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\njsPDF.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\nvar AcroForm = jsPDF.AcroForm;\n\nexport {\n  AcroForm,\n  AcroFormChoiceField,\n  AcroFormListBox,\n  AcroFormComboBox,\n  AcroFormEditBox,\n  AcroFormButton,\n  AcroFormPushButton,\n  AcroFormRadioButton,\n  AcroFormCheckBox,\n  AcroFormTextField,\n  AcroFormPasswordField,\n  AcroFormAppearance\n};\n","/** @license\n * jsPDF addImage plugin\n * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/\n *               2013 Chris Dowling, https://github.com/gingerchris\n *               2013 Trinh Ho, https://github.com/ineedfat\n *               2013 Edwin Alejandro Perez, https://github.com/eaparango\n *               2013 Norah Smith, https://github.com/burnburnrocket\n *               2014 Diego Casorran, https://github.com/diegocr\n *               2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * @name addImage\n * @module\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob, btoa } from \"../libs/AtobBtoa.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namespace = \"addImage_\";\n  jsPDFAPI.__addimage__ = {};\n\n  var UNKNOWN = \"UNKNOWN\";\n\n  // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.\n  // With too small batch iteration will be slow as more calls are made,\n  // higher values cause larger and slower garbage collection.\n  var ARRAY_APPLY_BATCH = 8192;\n\n  var imageFileTypeHeaders = {\n    PNG: [[0x89, 0x50, 0x4e, 0x47]],\n    TIFF: [\n      [0x4d, 0x4d, 0x00, 0x2a], //Motorola\n      [0x49, 0x49, 0x2a, 0x00] //Intel\n    ],\n    JPEG: [\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe0,\n        undefined,\n        undefined,\n        0x4a,\n        0x46,\n        0x49,\n        0x46,\n        0x00\n      ], //JFIF\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe1,\n        undefined,\n        undefined,\n        0x45,\n        0x78,\n        0x69,\n        0x66,\n        0x00,\n        0x00\n      ], //Exif\n      [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW\n      [0xff, 0xd8, 0xff, 0xee] //EXIF RAW\n    ],\n    JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],\n    GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],\n    GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],\n    WEBP: [\n      [\n        0x52,\n        0x49,\n        0x46,\n        0x46,\n        undefined,\n        undefined,\n        undefined,\n        undefined,\n        0x57,\n        0x45,\n        0x42,\n        0x50\n      ]\n    ],\n    BMP: [\n      [0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.\n      [0x42, 0x41], //BA - OS/2 struct bitmap array\n      [0x43, 0x49], //CI - OS/2 struct color icon\n      [0x43, 0x50], //CP - OS/2 const color pointer\n      [0x49, 0x43], //IC - OS/2 struct icon\n      [0x50, 0x54] //PT - OS/2 pointer\n    ]\n  };\n\n  /**\n   * Recognize filetype of Image by magic-bytes\n   *\n   * https://en.wikipedia.org/wiki/List_of_file_signatures\n   *\n   * @name getImageFileTypeByImageData\n   * @public\n   * @function\n   * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer\n   * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'\n   *\n   * @returns {string} filetype of Image\n   */\n  var getImageFileTypeByImageData = (jsPDFAPI.__addimage__.getImageFileTypeByImageData = function(\n    imageData,\n    fallbackFormat\n  ) {\n    fallbackFormat = fallbackFormat || UNKNOWN;\n    var i;\n    var j;\n    var result = UNKNOWN;\n    var headerSchemata;\n    var compareResult;\n    var fileType;\n\n    if (\n      fallbackFormat === \"RGBA\" ||\n      (imageData.data !== undefined &&\n        imageData.data instanceof Uint8ClampedArray &&\n        \"height\" in imageData &&\n        \"width\" in imageData)\n    ) {\n      return \"RGBA\";\n    }\n\n    if (isArrayBufferView(imageData)) {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData[j]) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    } else {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    }\n\n    if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {\n      result = fallbackFormat;\n    }\n    return result;\n  });\n\n  // Image functionality ported from pdf.js\n  var putImage = function(image) {\n    var out = this.internal.write;\n    var putStream = this.internal.putStream;\n    var getFilters = this.internal.getFilters;\n\n    var filter = getFilters();\n    while (filter.indexOf(\"FlateEncode\") !== -1) {\n      filter.splice(filter.indexOf(\"FlateEncode\"), 1);\n    }\n\n    image.objectId = this.internal.newObject();\n\n    var additionalKeyValues = [];\n    additionalKeyValues.push({ key: \"Type\", value: \"/XObject\" });\n    additionalKeyValues.push({ key: \"Subtype\", value: \"/Image\" });\n    additionalKeyValues.push({ key: \"Width\", value: image.width });\n    additionalKeyValues.push({ key: \"Height\", value: image.height });\n\n    if (image.colorSpace === color_spaces.INDEXED) {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value:\n          \"[/Indexed /DeviceRGB \" +\n          // if an indexed png defines more than one colour with transparency, we've created a sMask\n          (image.palette.length / 3 - 1) +\n          \" \" +\n          (\"sMask\" in image && typeof image.sMask !== \"undefined\"\n            ? image.objectId + 2\n            : image.objectId + 1) +\n          \" 0 R]\"\n      });\n    } else {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value: \"/\" + image.colorSpace\n      });\n      if (image.colorSpace === color_spaces.DEVICE_CMYK) {\n        additionalKeyValues.push({ key: \"Decode\", value: \"[1 0 1 0 1 0 1 0]\" });\n      }\n    }\n    additionalKeyValues.push({\n      key: \"BitsPerComponent\",\n      value: image.bitsPerComponent\n    });\n    if (\n      \"decodeParameters\" in image &&\n      typeof image.decodeParameters !== \"undefined\"\n    ) {\n      additionalKeyValues.push({\n        key: \"DecodeParms\",\n        value: \"<<\" + image.decodeParameters + \">>\"\n      });\n    }\n    if (\"transparency\" in image && Array.isArray(image.transparency)) {\n      var transparency = \"\",\n        i = 0,\n        len = image.transparency.length;\n      for (; i < len; i++)\n        transparency +=\n          image.transparency[i] + \" \" + image.transparency[i] + \" \";\n\n      additionalKeyValues.push({\n        key: \"Mask\",\n        value: \"[\" + transparency + \"]\"\n      });\n    }\n    if (typeof image.sMask !== \"undefined\") {\n      additionalKeyValues.push({\n        key: \"SMask\",\n        value: image.objectId + 1 + \" 0 R\"\n      });\n    }\n\n    var alreadyAppliedFilters =\n      typeof image.filter !== \"undefined\" ? [\"/\" + image.filter] : undefined;\n\n    putStream({\n      data: image.data,\n      additionalKeyValues: additionalKeyValues,\n      alreadyAppliedFilters: alreadyAppliedFilters,\n      objectId: image.objectId\n    });\n\n    out(\"endobj\");\n\n    // Soft mask\n    if (\"sMask\" in image && typeof image.sMask !== \"undefined\") {\n      var decodeParameters =\n        \"/Predictor \" +\n        image.predictor +\n        \" /Colors 1 /BitsPerComponent \" +\n        image.bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n      var sMask = {\n        width: image.width,\n        height: image.height,\n        colorSpace: \"DeviceGray\",\n        bitsPerComponent: image.bitsPerComponent,\n        decodeParameters: decodeParameters,\n        data: image.sMask\n      };\n      if (\"filter\" in image) {\n        sMask.filter = image.filter;\n      }\n      putImage.call(this, sMask);\n    }\n\n    //Palette\n    if (image.colorSpace === color_spaces.INDEXED) {\n      var objId = this.internal.newObject();\n      //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');\n      //putStream(zlib.compress(img['pal']));\n      putStream({\n        data: arrayBufferToBinaryString(new Uint8Array(image.palette)),\n        objectId: objId\n      });\n      out(\"endobj\");\n    }\n  };\n  var putResourcesCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    for (var i in images) {\n      putImage.call(this, images[i]);\n    }\n  };\n  var putXObjectsDictCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"],\n      out = this.internal.write,\n      image;\n    for (var i in images) {\n      image = images[i];\n      out(\"/I\" + image.index, image.objectId, \"0\", \"R\");\n    }\n  };\n\n  var checkCompressValue = function(value) {\n    if (value && typeof value === \"string\") value = value.toUpperCase();\n    return value in jsPDFAPI.image_compression ? value : image_compression.NONE;\n  };\n\n  var initialize = function() {\n    if (!this.internal.collections[namespace + \"images\"]) {\n      this.internal.collections[namespace + \"images\"] = {};\n      this.internal.events.subscribe(\"putResources\", putResourcesCallback);\n      this.internal.events.subscribe(\"putXobjectDict\", putXObjectsDictCallback);\n    }\n  };\n\n  var getImages = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    initialize.call(this);\n    return images;\n  };\n  var getImageIndex = function() {\n    return Object.keys(this.internal.collections[namespace + \"images\"]).length;\n  };\n  var notDefined = function(value) {\n    return typeof value === \"undefined\" || value === null || value.length === 0;\n  };\n  var generateAliasFromImageData = function(imageData) {\n    if (typeof imageData === \"string\" || isArrayBufferView(imageData)) {\n      return sHashCode(imageData);\n    } else if (isArrayBufferView(imageData.data)) {\n      return sHashCode(imageData.data);\n    }\n\n    return null;\n  };\n\n  var isImageTypeSupported = function(type) {\n    return typeof jsPDFAPI[\"process\" + type.toUpperCase()] === \"function\";\n  };\n\n  var isDOMElement = function(object) {\n    return typeof object === \"object\" && object.nodeType === 1;\n  };\n\n  var getImageDataFromElement = function(element, format) {\n    //if element is an image which uses data url definition, just return the dataurl\n    if (element.nodeName === \"IMG\" && element.hasAttribute(\"src\")) {\n      var src = \"\" + element.getAttribute(\"src\");\n\n      //is base64 encoded dataUrl, directly process it\n      if (src.indexOf(\"data:image/\") === 0) {\n        return atob(\n          unescape(src)\n            .split(\"base64,\")\n            .pop()\n        );\n      }\n\n      //it is probably an url, try to load it\n      var tmpImageData = jsPDFAPI.loadFile(src, true);\n      if (tmpImageData !== undefined) {\n        return tmpImageData;\n      }\n    }\n\n    if (element.nodeName === \"CANVAS\") {\n      if (element.width === 0 || element.height === 0) {\n        throw new Error(\n          \"Given canvas must have data. Canvas width: \" +\n            element.width +\n            \", height: \" +\n            element.height\n        );\n      }\n      var mimeType;\n      switch (format) {\n        case \"PNG\":\n          mimeType = \"image/png\";\n          break;\n        case \"WEBP\":\n          mimeType = \"image/webp\";\n          break;\n        case \"JPEG\":\n        case \"JPG\":\n        default:\n          mimeType = \"image/jpeg\";\n          break;\n      }\n      return atob(\n        element\n          .toDataURL(mimeType, 1.0)\n          .split(\"base64,\")\n          .pop()\n      );\n    }\n  };\n\n  var checkImagesForAlias = function(alias) {\n    var images = this.internal.collections[namespace + \"images\"];\n    if (images) {\n      for (var e in images) {\n        if (alias === images[e].alias) {\n          return images[e];\n        }\n      }\n    }\n  };\n\n  var determineWidthAndHeight = function(width, height, image) {\n    if (!width && !height) {\n      width = -96;\n      height = -96;\n    }\n    if (width < 0) {\n      width = (-1 * image.width * 72) / width / this.internal.scaleFactor;\n    }\n    if (height < 0) {\n      height = (-1 * image.height * 72) / height / this.internal.scaleFactor;\n    }\n    if (width === 0) {\n      width = (height * image.width) / image.height;\n    }\n    if (height === 0) {\n      height = (width * image.height) / image.width;\n    }\n\n    return [width, height];\n  };\n\n  var writeImageToPDF = function(x, y, width, height, image, rotation) {\n    var dims = determineWidthAndHeight.call(this, width, height, image),\n      coord = this.internal.getCoordinateString,\n      vcoord = this.internal.getVerticalCoordinateString;\n\n    var images = getImages.call(this);\n\n    width = dims[0];\n    height = dims[1];\n    images[image.index] = image;\n\n    if (rotation) {\n      rotation *= Math.PI / 180;\n      var c = Math.cos(rotation);\n      var s = Math.sin(rotation);\n      //like in pdf Reference do it 4 digits instead of 2\n      var f4 = function(number) {\n        return number.toFixed(4);\n      };\n      var rotationTransformationMatrix = [\n        f4(c),\n        f4(s),\n        f4(s * -1),\n        f4(c),\n        0,\n        0,\n        \"cm\"\n      ];\n    }\n    this.internal.write(\"q\"); //Save graphics state\n    if (rotation) {\n      this.internal.write(\n        [1, \"0\", \"0\", 1, coord(x), vcoord(y + height), \"cm\"].join(\" \")\n      ); //Translate\n      this.internal.write(rotationTransformationMatrix.join(\" \")); //Rotate\n      this.internal.write(\n        [coord(width), \"0\", \"0\", coord(height), \"0\", \"0\", \"cm\"].join(\" \")\n      ); //Scale\n    } else {\n      this.internal.write(\n        [\n          coord(width),\n          \"0\",\n          \"0\",\n          coord(height),\n          coord(x),\n          vcoord(y + height),\n          \"cm\"\n        ].join(\" \")\n      ); //Translate and Scale\n    }\n\n    if (this.isAdvancedAPI()) {\n      // draw image bottom up when in \"advanced\" API mode\n      this.internal.write([1, 0, 0, -1, 0, 0, \"cm\"].join(\" \"));\n    }\n\n    this.internal.write(\"/I\" + image.index + \" Do\"); //Paint Image\n    this.internal.write(\"Q\"); //Restore graphics state\n  };\n\n  /**\n   * COLOR SPACES\n   */\n  var color_spaces = (jsPDFAPI.color_spaces = {\n    DEVICE_RGB: \"DeviceRGB\",\n    DEVICE_GRAY: \"DeviceGray\",\n    DEVICE_CMYK: \"DeviceCMYK\",\n    CAL_GREY: \"CalGray\",\n    CAL_RGB: \"CalRGB\",\n    LAB: \"Lab\",\n    ICC_BASED: \"ICCBased\",\n    INDEXED: \"Indexed\",\n    PATTERN: \"Pattern\",\n    SEPARATION: \"Separation\",\n    DEVICE_N: \"DeviceN\"\n  });\n\n  /**\n   * DECODE METHODS\n   */\n  jsPDFAPI.decode = {\n    DCT_DECODE: \"DCTDecode\",\n    FLATE_DECODE: \"FlateDecode\",\n    LZW_DECODE: \"LZWDecode\",\n    JPX_DECODE: \"JPXDecode\",\n    JBIG2_DECODE: \"JBIG2Decode\",\n    ASCII85_DECODE: \"ASCII85Decode\",\n    ASCII_HEX_DECODE: \"ASCIIHexDecode\",\n    RUN_LENGTH_DECODE: \"RunLengthDecode\",\n    CCITT_FAX_DECODE: \"CCITTFaxDecode\"\n  };\n\n  /**\n   * IMAGE COMPRESSION TYPES\n   */\n  var image_compression = (jsPDFAPI.image_compression = {\n    NONE: \"NONE\",\n    FAST: \"FAST\",\n    MEDIUM: \"MEDIUM\",\n    SLOW: \"SLOW\"\n  });\n\n  /**\n   * @name sHashCode\n   * @function\n   * @param {string} data\n   * @returns {string}\n   */\n  var sHashCode = (jsPDFAPI.__addimage__.sHashCode = function(data) {\n    var hash = 0,\n      i,\n      len;\n\n    if (typeof data === \"string\") {\n      len = data.length;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data.charCodeAt(i);\n        hash |= 0; // Convert to 32bit integer\n      }\n    } else if (isArrayBufferView(data)) {\n      len = data.byteLength / 2;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data[i];\n        hash |= 0; // Convert to 32bit integer\n      }\n    }\n    return hash;\n  });\n\n  /**\n   * Validates if given String is a valid Base64-String\n   *\n   * @name validateStringAsBase64\n   * @public\n   * @function\n   * @param {String} possible Base64-String\n   *\n   * @returns {boolean}\n   */\n  var validateStringAsBase64 = (jsPDFAPI.__addimage__.validateStringAsBase64 = function(\n    possibleBase64String\n  ) {\n    possibleBase64String = possibleBase64String || \"\";\n    possibleBase64String.toString().trim();\n\n    var result = true;\n\n    if (possibleBase64String.length === 0) {\n      result = false;\n    }\n\n    if (possibleBase64String.length % 4 !== 0) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9+/]+$/.test(\n        possibleBase64String.substr(0, possibleBase64String.length - 2)\n      ) === false\n    ) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(\n        possibleBase64String.substr(-2)\n      ) === false\n    ) {\n      result = false;\n    }\n    return result;\n  });\n\n  /**\n   * Strips out and returns info from a valid base64 data URI\n   *\n   * @name extractImageFromDataUrl\n   * @function\n   * @param {string} dataUrl a valid data URI of format 'data:[<MIME-type>][;base64],<data>'\n   * @returns {Array}an Array containing the following\n   * [0] the complete data URI\n   * [1] <MIME-type>\n   * [2] format - the second part of the mime-type i.e 'png' in 'image/png'\n   * [4] <data>\n   */\n  var extractImageFromDataUrl = (jsPDFAPI.__addimage__.extractImageFromDataUrl = function(\n    dataUrl\n  ) {\n    dataUrl = dataUrl || \"\";\n    var dataUrlParts = dataUrl.split(\"base64,\");\n    var result = null;\n\n    if (dataUrlParts.length === 2) {\n      var extractedInfo = /^data:(\\w*\\/\\w*);*(charset=(?!charset=)[\\w=-]*)*;*$/.exec(\n        dataUrlParts[0]\n      );\n      if (Array.isArray(extractedInfo)) {\n        result = {\n          mimeType: extractedInfo[1],\n          charset: extractedInfo[2],\n          data: dataUrlParts[1]\n        };\n      }\n    }\n    return result;\n  });\n\n  /**\n   * Check to see if ArrayBuffer is supported\n   *\n   * @name supportsArrayBuffer\n   * @function\n   * @returns {boolean}\n   */\n  var supportsArrayBuffer = (jsPDFAPI.__addimage__.supportsArrayBuffer = function() {\n    return (\n      typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\"\n    );\n  });\n\n  /**\n   * Tests supplied object to determine if ArrayBuffer\n   *\n   * @name isArrayBuffer\n   * @function\n   * @param {Object} object an Object\n   *\n   * @returns {boolean}\n   */\n  jsPDFAPI.__addimage__.isArrayBuffer = function(object) {\n    return supportsArrayBuffer() && object instanceof ArrayBuffer;\n  };\n\n  /**\n   * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface\n   *\n   * @name isArrayBufferView\n   * @function\n   * @param {Object} object an Object\n   * @returns {boolean}\n   */\n  var isArrayBufferView = (jsPDFAPI.__addimage__.isArrayBufferView = function(\n    object\n  ) {\n    return (\n      supportsArrayBuffer() &&\n      typeof Uint32Array !== \"undefined\" &&\n      (object instanceof Int8Array ||\n        object instanceof Uint8Array ||\n        (typeof Uint8ClampedArray !== \"undefined\" &&\n          object instanceof Uint8ClampedArray) ||\n        object instanceof Int16Array ||\n        object instanceof Uint16Array ||\n        object instanceof Int32Array ||\n        object instanceof Uint32Array ||\n        object instanceof Float32Array ||\n        object instanceof Float64Array)\n    );\n  });\n\n  /**\n   * Convert Binary String to ArrayBuffer\n   *\n   * @name binaryStringToUint8Array\n   * @public\n   * @function\n   * @param {string} BinaryString with ImageData\n   * @returns {Uint8Array}\n   */\n  var binaryStringToUint8Array = (jsPDFAPI.__addimage__.binaryStringToUint8Array = function(\n    binary_string\n  ) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  });\n\n  /**\n   * Convert the Buffer to a Binary String\n   *\n   * @name arrayBufferToBinaryString\n   * @public\n   * @function\n   * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData\n   *\n   * @returns {String}\n   */\n  var arrayBufferToBinaryString = (jsPDFAPI.__addimage__.arrayBufferToBinaryString = function(\n    buffer\n  ) {\n    var out = \"\";\n    // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.\n    // Do not copy the array if input is already an array.\n    var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);\n    for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {\n      // Limit the amount of characters being parsed to prevent overflow.\n      // Note that while TextDecoder would be faster, it does not have the same\n      // functionality as fromCharCode with any provided encodings as of 3/2021.\n      out += String.fromCharCode.apply(\n        null,\n        buf.subarray(i, i + ARRAY_APPLY_BATCH)\n      );\n    }\n    return out;\n  });\n\n  /**\n   * Possible parameter for addImage, an RGBA buffer with size.\n   *\n   * @typedef {Object} RGBAData\n   * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.\n   * @property {number} width - Image width as the data does not carry this information in itself.\n   * @property {number} height - Image height as the data does not carry this information in itself.\n   */\n\n  /**\n   * Adds an Image to the PDF.\n   *\n   * @name addImage\n   * @public\n   * @function\n   * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).\n   * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'\n   * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width width of the image (in units declared at inception of PDF document)\n   * @param {number} height height of the Image (in units declared at inception of PDF document)\n   * @param {string} alias alias of the image (if used multiple times)\n   * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF\n   */\n  jsPDFAPI.addImage = function() {\n    var imageData, format, x, y, w, h, alias, compression, rotation;\n\n    imageData = arguments[0];\n    if (typeof arguments[1] === \"number\") {\n      format = UNKNOWN;\n      x = arguments[1];\n      y = arguments[2];\n      w = arguments[3];\n      h = arguments[4];\n      alias = arguments[5];\n      compression = arguments[6];\n      rotation = arguments[7];\n    } else {\n      format = arguments[1];\n      x = arguments[2];\n      y = arguments[3];\n      w = arguments[4];\n      h = arguments[5];\n      alias = arguments[6];\n      compression = arguments[7];\n      rotation = arguments[8];\n    }\n\n    if (\n      typeof imageData === \"object\" &&\n      !isDOMElement(imageData) &&\n      \"imageData\" in imageData\n    ) {\n      var options = imageData;\n\n      imageData = options.imageData;\n      format = options.format || format || UNKNOWN;\n      x = options.x || x || 0;\n      y = options.y || y || 0;\n      w = options.w || options.width || w;\n      h = options.h || options.height || h;\n      alias = options.alias || alias;\n      compression = options.compression || compression;\n      rotation = options.rotation || options.angle || rotation;\n    }\n\n    //If compression is not explicitly set, determine if we should use compression\n    var filter = this.internal.getFilters();\n    if (compression === undefined && filter.indexOf(\"FlateEncode\") !== -1) {\n      compression = \"SLOW\";\n    }\n\n    if (isNaN(x) || isNaN(y)) {\n      throw new Error(\"Invalid coordinates passed to jsPDF.addImage\");\n    }\n\n    initialize.call(this);\n\n    var image = processImageData.call(\n      this,\n      imageData,\n      format,\n      alias,\n      compression\n    );\n\n    writeImageToPDF.call(this, x, y, w, h, image, rotation);\n\n    return this;\n  };\n\n  var processImageData = function(imageData, format, alias, compression) {\n    var result, dataAsBinaryString;\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      imageData = unescape(imageData);\n      var tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData !== \"\") {\n        imageData = tmpImageData;\n      } else {\n        tmpImageData = jsPDFAPI.loadFile(imageData, true);\n        if (tmpImageData !== undefined) {\n          imageData = tmpImageData;\n        }\n      }\n    }\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData, format);\n    }\n\n    format = getImageFileTypeByImageData(imageData, format);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    // now do the heavy lifting\n\n    if (notDefined(alias)) {\n      alias = generateAliasFromImageData(imageData);\n    }\n    result = checkImagesForAlias.call(this, alias);\n\n    if (!result) {\n      if (supportsArrayBuffer()) {\n        // no need to convert if imageData is already uint8array\n        if (!(imageData instanceof Uint8Array) && format !== \"RGBA\") {\n          dataAsBinaryString = imageData;\n          imageData = binaryStringToUint8Array(imageData);\n        }\n      }\n\n      result = this[\"process\" + format.toUpperCase()](\n        imageData,\n        getImageIndex.call(this),\n        alias,\n        checkCompressValue(compression),\n        dataAsBinaryString\n      );\n    }\n\n    if (!result) {\n      throw new Error(\"An unknown error occurred whilst processing the image.\");\n    }\n    return result;\n  };\n\n  /**\n   * @name convertBase64ToBinaryString\n   * @function\n   * @param {string} stringData\n   * @returns {string} binary string\n   */\n  var convertBase64ToBinaryString = (jsPDFAPI.__addimage__.convertBase64ToBinaryString = function(\n    stringData,\n    throwError\n  ) {\n    throwError = typeof throwError === \"boolean\" ? throwError : true;\n    var base64Info;\n    var imageData = \"\";\n    var rawData;\n\n    if (typeof stringData === \"string\") {\n      base64Info = extractImageFromDataUrl(stringData);\n      rawData = base64Info !== null ? base64Info.data : stringData;\n\n      try {\n        imageData = atob(rawData);\n      } catch (e) {\n        if (throwError) {\n          if (!validateStringAsBase64(rawData)) {\n            throw new Error(\n              \"Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString \"\n            );\n          } else {\n            throw new Error(\n              \"atob-Error in jsPDF.convertBase64ToBinaryString \" + e.message\n            );\n          }\n        }\n      }\n    }\n    return imageData;\n  });\n\n  /**\n   * @name getImageProperties\n   * @function\n   * @param {Object} imageData\n   * @returns {Object}\n   */\n  jsPDFAPI.getImageProperties = function(imageData) {\n    var image;\n    var tmpImageData = \"\";\n    var format;\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData);\n    }\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData === \"\") {\n        tmpImageData = jsPDFAPI.loadFile(imageData) || \"\";\n      }\n      imageData = tmpImageData;\n    }\n\n    format = getImageFileTypeByImageData(imageData);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {\n      imageData = binaryStringToUint8Array(imageData);\n    }\n\n    image = this[\"process\" + format.toUpperCase()](imageData);\n\n    if (!image) {\n      throw new Error(\"An unknown error occurred whilst processing the image\");\n    }\n\n    image.fileType = format;\n\n    return image;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF Annotations PlugIn\n *\n * There are many types of annotations in a PDF document. Annotations are placed\n * on a page at a particular location. They are not 'attached' to an object.\n * <br />\n * This plugin current supports <br />\n * <li> Goto Page (set pageNumber and top in options)\n * <li> Goto Name (set name and top in options)\n * <li> Goto URL (set url in options)\n * <p>\n * \tThe destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below)\n *  (set magFactor in options).  XYZ is the default.\n * </p>\n * <p>\n *  Links, Text, Popup, and FreeText are supported.\n * </p>\n * <p>\n * Options In PDF spec Not Implemented Yet\n * <li> link border\n * <li> named target\n * <li> page coordinates\n * <li> destination page scaling and layout\n * <li> actions other than URL and GotoPage\n * <li> background / hover actions\n * </p>\n * @name annotations\n * @module\n */\n\n/*\n    Destination Magnification Factors\n    See PDF 1.3 Page 386 for meanings and options\n\n    [supported]\n\tXYZ (options; left top zoom)\n\tFit (no options)\n\tFitH (options: top)\n\tFitV (options: left)\n\n\t[not supported]\n\tFitR\n\tFitB\n\tFitBH\n\tFitBV\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var notEmpty = function(obj) {\n    if (typeof obj != \"undefined\") {\n      if (obj != \"\") {\n        return true;\n      }\n    }\n  };\n\n  jsPDF.API.events.push([\n    \"addPage\",\n    function(addPageData) {\n      var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);\n      pageInfo.pageContext.annotations = [];\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putPage\",\n    function(putPageData) {\n      var getHorizontalCoordinateString = this.internal.getCoordinateString;\n      var getVerticalCoordinateString = this.internal\n        .getVerticalCoordinateString;\n      var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);\n      var pageAnnos = putPageData.pageContext.annotations;\n\n      var anno, rect, line;\n      var found = false;\n      for (var a = 0; a < pageAnnos.length && !found; a++) {\n        anno = pageAnnos[a];\n        switch (anno.type) {\n          case \"link\":\n            if (\n              notEmpty(anno.options.url) ||\n              notEmpty(anno.options.pageNumber)\n            ) {\n              found = true;\n            }\n            break;\n          case \"reference\":\n          case \"text\":\n          case \"freetext\":\n            found = true;\n            break;\n        }\n      }\n      if (found == false) {\n        return;\n      }\n\n      this.internal.write(\"/Annots [\");\n      for (var i = 0; i < pageAnnos.length; i++) {\n        anno = pageAnnos[i];\n        var escape = this.internal.pdfEscape;\n        var encryptor = this.internal.getEncryptor(putPageData.objId);\n\n        switch (anno.type) {\n          case \"reference\":\n            // References to Widget Annotations (for AcroForm Fields)\n            this.internal.write(\" \" + anno.object.objId + \" 0 R \");\n            break;\n          case \"text\":\n            // Create a an object for both the text and the popup\n            var objText = this.internal.newAdditionalObject();\n            var objPopup = this.internal.newAdditionalObject();\n            var encryptorText = this.internal.getEncryptor(objText.objId);\n\n            var title = anno.title || \"Note\";\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Text\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptorText(anno.contents)) +\n              \")\";\n            line += \" /Popup \" + objPopup.objId + \" 0 R\";\n            line += \" /P \" + pageInfo.objId + \" 0 R\";\n            line += \" /T (\" + escape(encryptorText(title)) + \") >>\";\n            objText.content = line;\n\n            var parent = objText.objId + \" 0 R\";\n            var popoff = 30;\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x + popoff) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(\n                anno.bounds.x + anno.bounds.w + popoff\n              ) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Popup\" +\n              \" \" +\n              rect +\n              \" /Parent \" +\n              parent;\n            if (anno.open) {\n              line += \" /Open true\";\n            }\n            line += \" >>\";\n            objPopup.content = line;\n\n            this.internal.write(objText.objId, \"0 R\", objPopup.objId, \"0 R\");\n\n            break;\n          case \"freetext\":\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \"] \";\n            var color = anno.color || \"#000000\";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"FreeText\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptor(anno.contents)) +\n              \")\";\n            line +=\n              \" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#\" +\n              color +\n              \")\";\n            line += \" /Border [0 0 0]\";\n            line += \" >>\";\n            this.internal.write(line);\n            break;\n          case \"link\":\n            if (anno.options.name) {\n              var loc = this.annotations._nameMap[anno.options.name];\n              anno.options.pageNumber = loc.page;\n              anno.options.top = loc.y;\n            } else {\n              if (!anno.options.top) {\n                anno.options.top = 0;\n              }\n            }\n\n            rect =\n              \"/Rect [\" +\n              anno.finalBounds.x +\n              \" \" +\n              anno.finalBounds.y +\n              \" \" +\n              anno.finalBounds.w +\n              \" \" +\n              anno.finalBounds.h +\n              \"] \";\n\n            line = \"\";\n            if (anno.options.url) {\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /A <</S /URI /URI (\" +\n                escape(encryptor(anno.options.url)) +\n                \") >>\";\n            } else if (anno.options.pageNumber) {\n              // first page is 0\n              var info = this.internal.getPageInfo(anno.options.pageNumber);\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /Dest [\" +\n                info.objId +\n                \" 0 R\";\n              anno.options.magFactor = anno.options.magFactor || \"XYZ\";\n              switch (anno.options.magFactor) {\n                case \"Fit\":\n                  line += \" /Fit]\";\n                  break;\n                case \"FitH\":\n                  line += \" /FitH \" + anno.options.top + \"]\";\n                  break;\n                case \"FitV\":\n                  anno.options.left = anno.options.left || 0;\n                  line += \" /FitV \" + anno.options.left + \"]\";\n                  break;\n                case \"XYZ\":\n                default:\n                  var top = getVerticalCoordinateString(anno.options.top);\n                  anno.options.left = anno.options.left || 0;\n                  // 0 or null zoom will not change zoom factor\n                  if (typeof anno.options.zoom === \"undefined\") {\n                    anno.options.zoom = 0;\n                  }\n                  line +=\n                    \" /XYZ \" +\n                    anno.options.left +\n                    \" \" +\n                    top +\n                    \" \" +\n                    anno.options.zoom +\n                    \"]\";\n                  break;\n              }\n            }\n\n            if (line != \"\") {\n              line += \" >>\";\n              this.internal.write(line);\n            }\n            break;\n        }\n      }\n      this.internal.write(\"]\");\n    }\n  ]);\n\n  /**\n   * @name createAnnotation\n   * @function\n   * @param {Object} options\n   */\n  jsPDFAPI.createAnnotation = function(options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    switch (options.type) {\n      case \"link\":\n        this.link(\n          options.bounds.x,\n          options.bounds.y,\n          options.bounds.w,\n          options.bounds.h,\n          options\n        );\n        break;\n      case \"text\":\n      case \"freetext\":\n        pageInfo.pageContext.annotations.push(options);\n        break;\n    }\n  };\n\n  /**\n   * Create a link\n   *\n   * valid options\n   * <li> pageNumber or url [required]\n   * <p>If pageNumber is specified, top and zoom may also be specified</p>\n   * @name link\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} w\n   * @param {number} h\n   * @param {Object} options\n   */\n  jsPDFAPI.link = function(x, y, w, h, options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    var getHorizontalCoordinateString = this.internal.getCoordinateString;\n    var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\n\n    pageInfo.pageContext.annotations.push({\n      finalBounds: {\n        x: getHorizontalCoordinateString(x),\n        y: getVerticalCoordinateString(y),\n        w: getHorizontalCoordinateString(x + w),\n        h: getVerticalCoordinateString(y + h)\n      },\n      options: options,\n      type: \"link\"\n    });\n  };\n\n  /**\n   * Currently only supports single line text.\n   * Returns the width of the text/link\n   *\n   * @name textWithLink\n   * @function\n   * @param {string} text\n   * @param {number} x\n   * @param {number} y\n   * @param {Object} options\n   * @returns {number} width the width of the text/link\n   */\n  jsPDFAPI.textWithLink = function(text, x, y, options) {\n    var totalLineWidth = this.getTextWidth(text);\n    var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;\n    var linkHeight, linkWidth;\n\n    // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line\n    if (options.maxWidth !== undefined) {\n      var { maxWidth } = options;\n      linkWidth = maxWidth;\n      var numOfLines = this.splitTextToSize(text, linkWidth).length;\n      linkHeight = Math.ceil(lineHeight * numOfLines);\n    } else {\n      linkWidth = totalLineWidth;\n      linkHeight = lineHeight;\n    }\n\n    this.text(text, x, y, options);\n\n    //TODO We really need the text baseline height to do this correctly.\n    // Or ability to draw text on top, bottom, center, or baseline.\n    y += lineHeight * 0.2;\n    //handle x position based on the align option\n    if (options.align === \"center\") {\n      x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width\n    }\n    if (options.align === \"right\") {\n      x = x - totalLineWidth;\n    }\n    this.link(x, y - lineHeight, linkWidth, linkHeight, options);\n    return totalLineWidth;\n  };\n\n  //TODO move into external library\n  /**\n   * @name getTextWidth\n   * @function\n   * @param {string} text\n   * @returns {number} txtWidth\n   */\n  jsPDFAPI.getTextWidth = function(text) {\n    var fontSize = this.internal.getFontSize();\n    var txtWidth =\n      (this.getStringUnitWidth(text) * fontSize) / this.internal.scaleFactor;\n    return txtWidth;\n  };\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF arabic parser PlugIn\n *\n * @name arabic\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Arabic shape substitutions: char code => (isolated, final, initial, medial).\n   * Arabic Substition A\n   */\n  var arabicSubstitionA = {\n    0x0621: [0xfe80], // ARABIC LETTER HAMZA\n    0x0622: [0xfe81, 0xfe82], // ARABIC LETTER ALEF WITH MADDA ABOVE\n    0x0623: [0xfe83, 0xfe84], // ARABIC LETTER ALEF WITH HAMZA ABOVE\n    0x0624: [0xfe85, 0xfe86], // ARABIC LETTER WAW WITH HAMZA ABOVE\n    0x0625: [0xfe87, 0xfe88], // ARABIC LETTER ALEF WITH HAMZA BELOW\n    0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c], // ARABIC LETTER YEH WITH HAMZA ABOVE\n    0x0627: [0xfe8d, 0xfe8e], // ARABIC LETTER ALEF\n    0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92], // ARABIC LETTER BEH\n    0x0629: [0xfe93, 0xfe94], // ARABIC LETTER TEH MARBUTA\n    0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98], // ARABIC LETTER TEH\n    0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c], // ARABIC LETTER THEH\n    0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0], // ARABIC LETTER JEEM\n    0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4], // ARABIC LETTER HAH\n    0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8], // ARABIC LETTER KHAH\n    0x062f: [0xfea9, 0xfeaa], // ARABIC LETTER DAL\n    0x0630: [0xfeab, 0xfeac], // ARABIC LETTER THAL\n    0x0631: [0xfead, 0xfeae], // ARABIC LETTER REH\n    0x0632: [0xfeaf, 0xfeb0], // ARABIC LETTER ZAIN\n    0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4], // ARABIC LETTER SEEN\n    0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8], // ARABIC LETTER SHEEN\n    0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc], // ARABIC LETTER SAD\n    0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0], // ARABIC LETTER DAD\n    0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4], // ARABIC LETTER TAH\n    0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8], // ARABIC LETTER ZAH\n    0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc], // ARABIC LETTER AIN\n    0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0], // ARABIC LETTER GHAIN\n    0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4], // ARABIC LETTER FEH\n    0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8], // ARABIC LETTER QAF\n    0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc], // ARABIC LETTER KAF\n    0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0], // ARABIC LETTER LAM\n    0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], // ARABIC LETTER MEEM\n    0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], // ARABIC LETTER NOON\n    0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], // ARABIC LETTER HEH\n    0x0648: [0xfeed, 0xfeee], // ARABIC LETTER WAW\n    0x0649: [0xfeef, 0xfef0, 64488, 64489], // ARABIC LETTER ALEF MAKSURA\n    0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], // ARABIC LETTER YEH\n    0x0671: [0xfb50, 0xfb51], // ARABIC LETTER ALEF WASLA\n    0x0677: [0xfbdd], // ARABIC LETTER U WITH HAMZA ABOVE\n    0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], // ARABIC LETTER TTEH\n    0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], // ARABIC LETTER TTEHEH\n    0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], // ARABIC LETTER BEEH\n    0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], // ARABIC LETTER PEH\n    0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], // ARABIC LETTER TEHEH\n    0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], // ARABIC LETTER BEHEH\n    0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], // ARABIC LETTER NYEH\n    0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], // ARABIC LETTER DYEH\n    0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], // ARABIC LETTER TCHEH\n    0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], // ARABIC LETTER TCHEHEH\n    0x0688: [0xfb88, 0xfb89], // ARABIC LETTER DDAL\n    0x068c: [0xfb84, 0xfb85], // ARABIC LETTER DAHAL\n    0x068d: [0xfb82, 0xfb83], // ARABIC LETTER DDAHAL\n    0x068e: [0xfb86, 0xfb87], // ARABIC LETTER DUL\n    0x0691: [0xfb8c, 0xfb8d], // ARABIC LETTER RREH\n    0x0698: [0xfb8a, 0xfb8b], // ARABIC LETTER JEH\n    0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], // ARABIC LETTER VEH\n    0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], // ARABIC LETTER PEHEH\n    0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], // ARABIC LETTER KEHEH\n    0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], // ARABIC LETTER NG\n    0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], // ARABIC LETTER GAF\n    0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d], // ARABIC LETTER NGOEH\n    0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99], // ARABIC LETTER GUEH\n    0x06ba: [0xfb9e, 0xfb9f], // ARABIC LETTER NOON GHUNNA\n    0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3], // ARABIC LETTER RNOON\n    0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad], // ARABIC LETTER HEH DOACHASHMEE\n    0x06c0: [0xfba4, 0xfba5], // ARABIC LETTER HEH WITH YEH ABOVE\n    0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9], // ARABIC LETTER HEH GOAL\n    0x06c5: [0xfbe0, 0xfbe1], // ARABIC LETTER KIRGHIZ OE\n    0x06c6: [0xfbd9, 0xfbda], // ARABIC LETTER OE\n    0x06c7: [0xfbd7, 0xfbd8], // ARABIC LETTER U\n    0x06c8: [0xfbdb, 0xfbdc], // ARABIC LETTER YU\n    0x06c9: [0xfbe2, 0xfbe3], // ARABIC LETTER KIRGHIZ YU\n    0x06cb: [0xfbde, 0xfbdf], // ARABIC LETTER VE\n    0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff], // ARABIC LETTER FARSI YEH\n    0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7], //ARABIC LETTER E\n    0x06d2: [0xfbae, 0xfbaf], // ARABIC LETTER YEH BARREE\n    0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE\n  };\n\n  /*\n    var ligaturesSubstitutionA = {\n        0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM\n    };\n    */\n\n  var ligatures = {\n    0xfedf: {\n      0xfe82: 0xfef5, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM\n      0xfe84: 0xfef7, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM\n      0xfe88: 0xfef9, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM\n      0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM\n    },\n    0xfee0: {\n      0xfe82: 0xfef6, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM\n      0xfe84: 0xfef8, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM\n      0xfe88: 0xfefa, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM\n      0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM\n    },\n    0xfe8d: { 0xfedf: { 0xfee0: { 0xfeea: 0xfdf2 } } }, // ALLAH\n    0x0651: {\n      0x064c: 0xfc5e, // Shadda + Dammatan\n      0x064d: 0xfc5f, // Shadda + Kasratan\n      0x064e: 0xfc60, // Shadda + Fatha\n      0x064f: 0xfc61, // Shadda + Damma\n      0x0650: 0xfc62 // Shadda + Kasra\n    }\n  };\n\n  var arabic_diacritics = {\n    1612: 64606, // Shadda + Dammatan\n    1613: 64607, // Shadda + Kasratan\n    1614: 64608, // Shadda + Fatha\n    1615: 64609, // Shadda + Damma\n    1616: 64610 // Shadda + Kasra\n  };\n\n  var alfletter = [1570, 1571, 1573, 1575];\n\n  var noChangeInForm = -1;\n  var isolatedForm = 0;\n  var finalForm = 1;\n  var initialForm = 2;\n  var medialForm = 3;\n\n  jsPDFAPI.__arabicParser__ = {};\n\n  //private\n  var isInArabicSubstitutionA = (jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function(\n    letter\n  ) {\n    return typeof arabicSubstitionA[letter.charCodeAt(0)] !== \"undefined\";\n  });\n\n  var isArabicLetter = (jsPDFAPI.__arabicParser__.isArabicLetter = function(\n    letter\n  ) {\n    return (\n      typeof letter === \"string\" &&\n      /^[\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF\\uFB50-\\uFDFF\\uFE70-\\uFEFF]+$/.test(\n        letter\n      )\n    );\n  });\n\n  var isArabicEndLetter = (jsPDFAPI.__arabicParser__.isArabicEndLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length <= 2\n    );\n  });\n\n  var isArabicAlfLetter = (jsPDFAPI.__arabicParser__.isArabicAlfLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 1\n    );\n  };\n\n  var arabicLetterHasFinalForm = (jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 2\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 3\n    );\n  };\n\n  var arabicLetterHasMedialForm = (jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length == 4\n    );\n  });\n\n  var resolveLigatures = (jsPDFAPI.__arabicParser__.resolveLigatures = function(\n    letters\n  ) {\n    var i = 0;\n    var tmpLigatures = ligatures;\n    var result = \"\";\n    var effectedLetters = 0;\n\n    for (i = 0; i < letters.length; i += 1) {\n      if (typeof tmpLigatures[letters.charCodeAt(i)] !== \"undefined\") {\n        effectedLetters++;\n        tmpLigatures = tmpLigatures[letters.charCodeAt(i)];\n\n        if (typeof tmpLigatures === \"number\") {\n          result += String.fromCharCode(tmpLigatures);\n          tmpLigatures = ligatures;\n          effectedLetters = 0;\n        }\n        if (i === letters.length - 1) {\n          tmpLigatures = ligatures;\n          result += letters.charAt(i - (effectedLetters - 1));\n          i = i - (effectedLetters - 1);\n          effectedLetters = 0;\n        }\n      } else {\n        tmpLigatures = ligatures;\n        result += letters.charAt(i - effectedLetters);\n        i = i - effectedLetters;\n        effectedLetters = 0;\n      }\n    }\n\n    return result;\n  });\n\n  jsPDFAPI.__arabicParser__.isArabicDiacritic = function(letter) {\n    return (\n      letter !== undefined &&\n      arabic_diacritics[letter.charCodeAt(0)] !== undefined\n    );\n  };\n\n  var getCorrectForm = (jsPDFAPI.__arabicParser__.getCorrectForm = function(\n    currentChar,\n    beforeChar,\n    nextChar\n  ) {\n    if (!isArabicLetter(currentChar)) {\n      return -1;\n    }\n\n    if (isInArabicSubstitutionA(currentChar) === false) {\n      return noChangeInForm;\n    }\n    if (\n      !arabicLetterHasFinalForm(currentChar) ||\n      (!isArabicLetter(beforeChar) && !isArabicLetter(nextChar)) ||\n      (!isArabicLetter(nextChar) && isArabicEndLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar))\n    ) {\n      return isolatedForm;\n    }\n\n    if (\n      arabicLetterHasMedialForm(currentChar) &&\n      isArabicLetter(beforeChar) &&\n      !isArabicEndLetter(beforeChar) &&\n      isArabicLetter(nextChar) &&\n      arabicLetterHasFinalForm(nextChar)\n    ) {\n      return medialForm;\n    }\n\n    if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {\n      return finalForm;\n    }\n    return initialForm;\n  });\n\n  /**\n   * @name processArabic\n   * @function\n   * @param {string} text\n   * @returns {string}\n   */\n  var parseArabic = function(text) {\n    text = text || \"\";\n\n    var result = \"\";\n    var i = 0;\n    var j = 0;\n    var position = 0;\n    var currentLetter = \"\";\n    var prevLetter = \"\";\n    var nextLetter = \"\";\n\n    var words = text.split(\"\\\\s+\");\n    var newWords = [];\n    for (i = 0; i < words.length; i += 1) {\n      newWords.push(\"\");\n      for (j = 0; j < words[i].length; j += 1) {\n        currentLetter = words[i][j];\n        prevLetter = words[i][j - 1];\n        nextLetter = words[i][j + 1];\n        if (isArabicLetter(currentLetter)) {\n          position = getCorrectForm(currentLetter, prevLetter, nextLetter);\n          if (position !== -1) {\n            newWords[i] += String.fromCharCode(\n              arabicSubstitionA[currentLetter.charCodeAt(0)][position]\n            );\n          } else {\n            newWords[i] += currentLetter;\n          }\n        } else {\n          newWords[i] += currentLetter;\n        }\n      }\n\n      newWords[i] = resolveLigatures(newWords[i]);\n    }\n    result = newWords.join(\" \");\n\n    return result;\n  };\n\n  var processArabic = (jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function() {\n    var text =\n      typeof arguments[0] === \"string\" ? arguments[0] : arguments[0].text;\n    var tmpText = [];\n    var result;\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);\n        } else {\n          tmpText.push([parseArabic(text[i])]);\n        }\n      }\n      result = tmpText;\n    } else {\n      result = parseArabic(text);\n    }\n    if (typeof arguments[0] === \"string\") {\n      return result;\n    } else {\n      arguments[0].text = result;\n      return arguments[0];\n    }\n  });\n\n  jsPDFAPI.events.push([\"preProcessText\", processArabic]);\n})(jsPDF.API);\n","/** @license\n * jsPDF Autoprint Plugin\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name autoprint\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.\n   *\n   * @name autoPrint\n   * @function\n   * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF();\n   * doc.text(10, 10, 'This is a test');\n   * doc.autoPrint({variant: 'non-conform'});\n   * doc.save('autoprint.pdf');\n   */\n  jsPDFAPI.autoPrint = function(options) {\n    \"use strict\";\n    var refAutoPrintTag;\n    options = options || {};\n    options.variant = options.variant || \"non-conform\";\n\n    switch (options.variant) {\n      case \"javascript\":\n        //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb\n        this.addJS(\"print({});\");\n        break;\n      case \"non-conform\":\n      default:\n        this.internal.events.subscribe(\"postPutResources\", function() {\n          refAutoPrintTag = this.internal.newObject();\n          this.internal.out(\"<<\");\n          this.internal.out(\"/S /Named\");\n          this.internal.out(\"/Type /Action\");\n          this.internal.out(\"/N /Print\");\n          this.internal.out(\">>\");\n          this.internal.out(\"endobj\");\n        });\n\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.out(\"/OpenAction \" + refAutoPrintTag + \" 0 R\");\n        });\n        break;\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Canvas PlugIn\n * This plugin mimics the HTML5 Canvas\n *\n * The goal is to provide a way for current canvas users to print directly to a PDF.\n * @name canvas\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @class Canvas\n   * @classdesc A Canvas Wrapper for jsPDF\n   */\n  var Canvas = function() {\n    var jsPdfInstance = undefined;\n    Object.defineProperty(this, \"pdf\", {\n      get: function() {\n        return jsPdfInstance;\n      },\n      set: function(value) {\n        jsPdfInstance = value;\n      }\n    });\n\n    var _width = 150;\n    /**\n     * The height property is a positive integer reflecting the height HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.\n     * This is one of the two properties, the other being width, that controls the size of the canvas.\n     *\n     * @name width\n     */\n    Object.defineProperty(this, \"width\", {\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _width = 150;\n        } else {\n          _width = value;\n        }\n        if (this.getContext(\"2d\").pageWrapXEnabled) {\n          this.getContext(\"2d\").pageWrapX = _width + 1;\n        }\n      }\n    });\n\n    var _height = 300;\n    /**\n     * The width property is a positive integer reflecting the width HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.\n     * This is one of the two properties, the other being height, that controls the size of the canvas.\n     *\n     * @name height\n     */\n    Object.defineProperty(this, \"height\", {\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _height = 300;\n        } else {\n          _height = value;\n        }\n        if (this.getContext(\"2d\").pageWrapYEnabled) {\n          this.getContext(\"2d\").pageWrapY = _height + 1;\n        }\n      }\n    });\n\n    var _childNodes = [];\n    Object.defineProperty(this, \"childNodes\", {\n      get: function() {\n        return _childNodes;\n      },\n      set: function(value) {\n        _childNodes = value;\n      }\n    });\n\n    var _style = {};\n    Object.defineProperty(this, \"style\", {\n      get: function() {\n        return _style;\n      },\n      set: function(value) {\n        _style = value;\n      }\n    });\n\n    Object.defineProperty(this, \"parentNode\", {});\n  };\n\n  /**\n   * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\n   *\n   * @name getContext\n   * @function\n   * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is \"2d\", leading to the creation of a Context2D object representing a two-dimensional rendering context.\n   * @param {object} contextAttributes\n   */\n  Canvas.prototype.getContext = function(contextType, contextAttributes) {\n    contextType = contextType || \"2d\";\n    var key;\n\n    if (contextType !== \"2d\") {\n      return null;\n    }\n    for (key in contextAttributes) {\n      if (this.pdf.context2d.hasOwnProperty(key)) {\n        this.pdf.context2d[key] = contextAttributes[key];\n      }\n    }\n    this.pdf.context2d._canvas = this;\n    return this.pdf.context2d;\n  };\n\n  /**\n   * The toDataURL() method is just a stub to throw an error if accidently called.\n   *\n   * @name toDataURL\n   * @function\n   */\n  Canvas.prototype.toDataURL = function() {\n    throw new Error(\"toDataURL is not implemented.\");\n  };\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      this.canvas = new Canvas();\n      this.canvas.pdf = this;\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *               2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *               2013 Lee Driscoll, https://github.com/lsdriscoll\n *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n *               2014 James Hall, james@parall.ax\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name cell\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var NO_MARGINS = { left: 0, top: 0, bottom: 0, right: 0 };\n\n  var px2pt = (0.264583 * 72) / 25.4;\n  var printingHeaderRow = false;\n\n  var _initialize = function() {\n    if (typeof this.internal.__cell__ === \"undefined\") {\n      this.internal.__cell__ = {};\n      this.internal.__cell__.padding = 3;\n      this.internal.__cell__.headerFunction = undefined;\n      this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);\n      this.internal.__cell__.margins.width = this.getPageWidth();\n      _reset.call(this);\n    }\n  };\n\n  var _reset = function() {\n    this.internal.__cell__.lastCell = new Cell();\n    this.internal.__cell__.pages = 1;\n  };\n\n  var Cell = function() {\n    var _x = arguments[0];\n    Object.defineProperty(this, \"x\", {\n      enumerable: true,\n      get: function() {\n        return _x;\n      },\n      set: function(value) {\n        _x = value;\n      }\n    });\n    var _y = arguments[1];\n    Object.defineProperty(this, \"y\", {\n      enumerable: true,\n      get: function() {\n        return _y;\n      },\n      set: function(value) {\n        _y = value;\n      }\n    });\n    var _width = arguments[2];\n    Object.defineProperty(this, \"width\", {\n      enumerable: true,\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        _width = value;\n      }\n    });\n    var _height = arguments[3];\n    Object.defineProperty(this, \"height\", {\n      enumerable: true,\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        _height = value;\n      }\n    });\n    var _text = arguments[4];\n    Object.defineProperty(this, \"text\", {\n      enumerable: true,\n      get: function() {\n        return _text;\n      },\n      set: function(value) {\n        _text = value;\n      }\n    });\n    var _lineNumber = arguments[5];\n    Object.defineProperty(this, \"lineNumber\", {\n      enumerable: true,\n      get: function() {\n        return _lineNumber;\n      },\n      set: function(value) {\n        _lineNumber = value;\n      }\n    });\n    var _align = arguments[6];\n    Object.defineProperty(this, \"align\", {\n      enumerable: true,\n      get: function() {\n        return _align;\n      },\n      set: function(value) {\n        _align = value;\n      }\n    });\n\n    return this;\n  };\n\n  Cell.prototype.clone = function() {\n    return new Cell(\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    );\n  };\n\n  Cell.prototype.toArray = function() {\n    return [\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    ];\n  };\n\n  /**\n   * @name setHeaderFunction\n   * @function\n   * @param {function} func\n   */\n  jsPDFAPI.setHeaderFunction = function(func) {\n    _initialize.call(this);\n    this.internal.__cell__.headerFunction =\n      typeof func === \"function\" ? func : undefined;\n    return this;\n  };\n\n  /**\n   * @name getTextDimensions\n   * @function\n   * @param {string} txt\n   * @returns {Object} dimensions\n   */\n  jsPDFAPI.getTextDimensions = function(text, options) {\n    _initialize.call(this);\n    options = options || {};\n    var fontSize = options.fontSize || this.getFontSize();\n    var font = options.font || this.getFont();\n    var scaleFactor = options.scaleFactor || this.internal.scaleFactor;\n    var width = 0;\n    var amountOfLines = 0;\n    var height = 0;\n    var tempWidth = 0;\n    var scope = this;\n\n    if (!Array.isArray(text) && typeof text !== \"string\") {\n      if (typeof text === \"number\") {\n        text = String(text);\n      } else {\n        throw new Error(\n          \"getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.\"\n        );\n      }\n    }\n\n    const maxWidth = options.maxWidth;\n    if (maxWidth > 0) {\n      if (typeof text === \"string\") {\n        text = this.splitTextToSize(text, maxWidth);\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\n        text = text.reduce(function(acc, textLine) {\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\n        }, []);\n      }\n    } else {\n      // Without the else clause, it will not work if you do not pass along maxWidth\n      text = Array.isArray(text) ? text : [text];\n    }\n\n    for (var i = 0; i < text.length; i++) {\n      tempWidth = this.getStringUnitWidth(text[i], { font: font }) * fontSize;\n      if (width < tempWidth) {\n        width = tempWidth;\n      }\n    }\n\n    if (width !== 0) {\n      amountOfLines = text.length;\n    }\n\n    width = width / scaleFactor;\n    height = Math.max(\n      (amountOfLines * fontSize * this.getLineHeightFactor() -\n        fontSize * (this.getLineHeightFactor() - 1)) /\n        scaleFactor,\n      0\n    );\n    return { w: width, h: height };\n  };\n\n  /**\n   * @name cellAddPage\n   * @function\n   */\n  jsPDFAPI.cellAddPage = function() {\n    _initialize.call(this);\n\n    this.addPage();\n\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    this.internal.__cell__.lastCell = new Cell(\n      margins.left,\n      margins.top,\n      undefined,\n      undefined\n    );\n    this.internal.__cell__.pages += 1;\n\n    return this;\n  };\n\n  /**\n   * @name cell\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} width\n   * @param {number} height\n   * @param {string} text\n   * @param {number} lineNumber lineNumber\n   * @param {string} align\n   * @return {jsPDF} jsPDF-instance\n   */\n  var cell = (jsPDFAPI.cell = function() {\n    var currentCell;\n\n    if (arguments[0] instanceof Cell) {\n      currentCell = arguments[0];\n    } else {\n      currentCell = new Cell(\n        arguments[0],\n        arguments[1],\n        arguments[2],\n        arguments[3],\n        arguments[4],\n        arguments[5]\n      );\n    }\n    _initialize.call(this);\n    var lastCell = this.internal.__cell__.lastCell;\n    var padding = this.internal.__cell__.padding;\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    var tableHeaderRow = this.internal.__cell__.tableHeaderRow;\n    var printHeaders = this.internal.__cell__.printHeaders;\n    // If this is not the first cell, we must change its position\n    if (typeof lastCell.lineNumber !== \"undefined\") {\n      if (lastCell.lineNumber === currentCell.lineNumber) {\n        //Same line\n        currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);\n        currentCell.y = lastCell.y || 0;\n      } else {\n        //New line\n        if (\n          lastCell.y + lastCell.height + currentCell.height + margins.bottom >\n          this.getPageHeight()\n        ) {\n          this.cellAddPage();\n          currentCell.y = margins.top;\n          if (printHeaders && tableHeaderRow) {\n            this.printHeaderRow(currentCell.lineNumber, true);\n            currentCell.y += tableHeaderRow[0].height;\n          }\n        } else {\n          currentCell.y = lastCell.y + lastCell.height || currentCell.y;\n        }\n      }\n    }\n\n    if (typeof currentCell.text[0] !== \"undefined\") {\n      this.rect(\n        currentCell.x,\n        currentCell.y,\n        currentCell.width,\n        currentCell.height,\n        printingHeaderRow === true ? \"FD\" : undefined\n      );\n      if (currentCell.align === \"right\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width - padding,\n          currentCell.y + padding,\n          { align: \"right\", baseline: \"top\" }\n        );\n      } else if (currentCell.align === \"center\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width / 2,\n          currentCell.y + padding,\n          {\n            align: \"center\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      } else {\n        this.text(\n          currentCell.text,\n          currentCell.x + padding,\n          currentCell.y + padding,\n          {\n            align: \"left\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      }\n    }\n    this.internal.__cell__.lastCell = currentCell;\n    return this;\n  });\n\n  /**\n     * Create a table from a set of data.\n     * @name table\n     * @function\n     * @param {Integer} [x] : left-position for top-left corner of table\n     * @param {Integer} [y] top-position for top-left corner of table\n     * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.\n     * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost\n\n     * @param {Object} [config.printHeaders] True to print column headers at the top of every page\n     * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value\n     * @param {Object} [config.margins] margin values for left, top, bottom, and width\n     * @param {Object} [config.fontSize] Integer fontSize to use (optional)\n     * @param {Object} [config.padding] cell-padding in pt to use (optional)\n     * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)\n     * @param {Object} [config.headerTextColor] default is #000 (optional)\n     * @param {Object} [config.rowStart] callback to handle before print each row (optional)\n     * @param {Object} [config.cellStart] callback to handle before print each cell (optional)\n     * @returns {jsPDF} jsPDF-instance\n     */\n\n  jsPDFAPI.table = function(x, y, data, headers, config) {\n    _initialize.call(this);\n    if (!data) {\n      throw new Error(\"No data for PDF table.\");\n    }\n\n    config = config || {};\n\n    var headerNames = [],\n      headerLabels = [],\n      headerAligns = [],\n      i,\n      columnMatrix = {},\n      columnWidths = {},\n      column,\n      columnMinWidths = [],\n      j,\n      tableHeaderConfigs = [],\n      //set up defaults. If a value is provided in config, defaults will be overwritten:\n      autoSize = config.autoSize || false,\n      printHeaders = config.printHeaders === false ? false : true,\n      fontSize =\n        config.css && typeof config.css[\"font-size\"] !== \"undefined\"\n          ? config.css[\"font-size\"] * 16\n          : config.fontSize || 12,\n      margins =\n        config.margins ||\n        Object.assign({ width: this.getPageWidth() }, NO_MARGINS),\n      padding = typeof config.padding === \"number\" ? config.padding : 3,\n      headerBackgroundColor = config.headerBackgroundColor || \"#c8c8c8\",\n      headerTextColor = config.headerTextColor || \"#000\";\n\n    _reset.call(this);\n\n    this.internal.__cell__.printHeaders = printHeaders;\n    this.internal.__cell__.margins = margins;\n    this.internal.__cell__.table_font_size = fontSize;\n    this.internal.__cell__.padding = padding;\n    this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;\n    this.internal.__cell__.headerTextColor = headerTextColor;\n    this.setFontSize(fontSize);\n\n    // Set header values\n    if (headers === undefined || headers === null) {\n      // No headers defined so we derive from data\n      headerNames = Object.keys(data[0]);\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    } else if (Array.isArray(headers) && typeof headers[0] === \"object\") {\n      headerNames = headers.map(function(header) {\n        return header.name;\n      });\n      headerLabels = headers.map(function(header) {\n        return header.prompt || header.name || \"\";\n      });\n      headerAligns = headers.map(function(header) {\n        return header.align || \"left\";\n      });\n      // Split header configs into names and prompts\n      for (i = 0; i < headers.length; i += 1) {\n        columnWidths[headers[i].name] = headers[i].width * px2pt;\n      }\n    } else if (Array.isArray(headers) && typeof headers[0] === \"string\") {\n      headerNames = headers;\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    }\n\n    if (\n      autoSize ||\n      (Array.isArray(headers) && typeof headers[0] === \"string\")\n    ) {\n      var headerName;\n      for (i = 0; i < headerNames.length; i += 1) {\n        headerName = headerNames[i];\n\n        // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}\n\n        columnMatrix[headerName] = data.map(function(rec) {\n          return rec[headerName];\n        });\n\n        // get header width\n        this.setFont(undefined, \"bold\");\n        columnMinWidths.push(\n          this.getTextDimensions(headerLabels[i], {\n            fontSize: this.internal.__cell__.table_font_size,\n            scaleFactor: this.internal.scaleFactor\n          }).w\n        );\n        column = columnMatrix[headerName];\n\n        // get cell widths\n        this.setFont(undefined, \"normal\");\n        for (j = 0; j < column.length; j += 1) {\n          columnMinWidths.push(\n            this.getTextDimensions(column[j], {\n              fontSize: this.internal.__cell__.table_font_size,\n              scaleFactor: this.internal.scaleFactor\n            }).w\n          );\n        }\n\n        // get final column width\n        columnWidths[headerName] =\n          Math.max.apply(null, columnMinWidths) + padding + padding;\n\n        //have to reset\n        columnMinWidths = [];\n      }\n    }\n\n    // -- Construct the table\n\n    if (printHeaders) {\n      var row = {};\n      for (i = 0; i < headerNames.length; i += 1) {\n        row[headerNames[i]] = {};\n        row[headerNames[i]].text = headerLabels[i];\n        row[headerNames[i]].align = headerAligns[i];\n      }\n\n      var rowHeight = calculateLineHeight.call(this, row, columnWidths);\n\n      // Construct the header row\n      tableHeaderConfigs = headerNames.map(function(value) {\n        return new Cell(\n          x,\n          y,\n          columnWidths[value],\n          rowHeight,\n          row[value].text,\n          undefined,\n          row[value].align\n        );\n      });\n\n      // Store the table header config\n      this.setTableHeaderRow(tableHeaderConfigs);\n\n      // Print the header for the start of the table\n      this.printHeaderRow(1, false);\n    }\n\n    // Construct the data rows\n\n    var align = headers.reduce(function(pv, cv) {\n      pv[cv.name] = cv.align;\n      return pv;\n    }, {});\n    for (i = 0; i < data.length; i += 1) {\n      if (\"rowStart\" in config && config.rowStart instanceof Function) {\n        config.rowStart(\n          {\n            row: i,\n            data: data[i]\n          },\n          this\n        );\n      }\n      var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);\n\n      for (j = 0; j < headerNames.length; j += 1) {\n        var cellData = data[i][headerNames[j]];\n        if (\"cellStart\" in config && config.cellStart instanceof Function) {\n          config.cellStart(\n            {\n              row: i,\n              col: j,\n              data: cellData\n            },\n            this\n          );\n        }\n        cell.call(\n          this,\n          new Cell(\n            x,\n            y,\n            columnWidths[headerNames[j]],\n            lineHeight,\n            cellData,\n            i + 2,\n            align[headerNames[j]]\n          )\n        );\n      }\n    }\n    this.internal.__cell__.table_x = x;\n    this.internal.__cell__.table_y = y;\n    return this;\n  };\n\n  /**\n   * Calculate the height for containing the highest column\n   *\n   * @name calculateLineHeight\n   * @function\n   * @param {Object[]} model is the line of data we want to calculate the height of\n   * @param {Integer[]} columnWidths is size of each column\n   * @returns {number} lineHeight\n   * @private\n   */\n  var calculateLineHeight = function calculateLineHeight(model, columnWidths) {\n    var padding = this.internal.__cell__.padding;\n    var fontSize = this.internal.__cell__.table_font_size;\n    var scaleFactor = this.internal.scaleFactor;\n\n    return Object.keys(model)\n      .map(function(key) {\n        var value = model[key];\n        return this.splitTextToSize(\n          value.hasOwnProperty(\"text\") ? value.text : value,\n          columnWidths[key] - padding - padding\n        );\n      }, this)\n      .map(function(value) {\n        return (\n          (this.getLineHeightFactor() * value.length * fontSize) / scaleFactor +\n          padding +\n          padding\n        );\n      }, this)\n      .reduce(function(pv, cv) {\n        return Math.max(pv, cv);\n      }, 0);\n  };\n\n  /**\n   * Store the config for outputting a table header\n   *\n   * @name setTableHeaderRow\n   * @function\n   * @param {Object[]} config\n   * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell\n   * except the lineNumber parameter is excluded\n   */\n  jsPDFAPI.setTableHeaderRow = function(config) {\n    _initialize.call(this);\n    this.internal.__cell__.tableHeaderRow = config;\n  };\n\n  /**\n   * Output the store header row\n   *\n   * @name printHeaderRow\n   * @function\n   * @param {number} lineNumber The line number to output the header at\n   * @param {boolean} new_page\n   */\n  jsPDFAPI.printHeaderRow = function(lineNumber, new_page) {\n    _initialize.call(this);\n    if (!this.internal.__cell__.tableHeaderRow) {\n      throw new Error(\"Property tableHeaderRow does not exist.\");\n    }\n\n    var tableHeaderCell;\n\n    printingHeaderRow = true;\n    if (typeof this.internal.__cell__.headerFunction === \"function\") {\n      var position = this.internal.__cell__.headerFunction(\n        this,\n        this.internal.__cell__.pages\n      );\n      this.internal.__cell__.lastCell = new Cell(\n        position[0],\n        position[1],\n        position[2],\n        position[3],\n        undefined,\n        -1\n      );\n    }\n    this.setFont(undefined, \"bold\");\n\n    var tempHeaderConf = [];\n    for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {\n      tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();\n      if (new_page) {\n        tableHeaderCell.y = this.internal.__cell__.margins.top || 0;\n        tempHeaderConf.push(tableHeaderCell);\n      }\n      tableHeaderCell.lineNumber = lineNumber;\n      var currentTextColor = this.getTextColor();\n      this.setTextColor(this.internal.__cell__.headerTextColor);\n      this.setFillColor(this.internal.__cell__.headerBackgroundColor);\n      cell.call(this, tableHeaderCell);\n      this.setTextColor(currentTextColor);\n    }\n    if (tempHeaderConf.length > 0) {\n      this.setTableHeaderRow(tempHeaderConf);\n    }\n    this.setFont(undefined, \"normal\");\n    printingHeaderRow = false;\n  };\n})(jsPDF.API);\n","function toLookup(arr) {\n  return arr.reduce(function(lookup, name, index) {\n    lookup[name] = index;\n\n    return lookup;\n  }, {});\n}\n\nvar fontStyleOrder = {\n  italic: [\"italic\", \"oblique\", \"normal\"],\n  oblique: [\"oblique\", \"italic\", \"normal\"],\n  normal: [\"normal\", \"oblique\", \"italic\"]\n};\n\nvar fontStretchOrder = [\n  \"ultra-condensed\",\n  \"extra-condensed\",\n  \"condensed\",\n  \"semi-condensed\",\n  \"normal\",\n  \"semi-expanded\",\n  \"expanded\",\n  \"extra-expanded\",\n  \"ultra-expanded\"\n];\n\n// For a given font-stretch value, we need to know where to start our search\n// from in the fontStretchOrder list.\nvar fontStretchLookup = toLookup(fontStretchOrder);\n\nvar fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];\nvar fontWeightsLookup = toLookup(fontWeights);\n\nfunction normalizeFontStretch(stretch) {\n  stretch = stretch || \"normal\";\n\n  return typeof fontStretchLookup[stretch] === \"number\" ? stretch : \"normal\";\n}\n\nfunction normalizeFontStyle(style) {\n  style = style || \"normal\";\n\n  return fontStyleOrder[style] ? style : \"normal\";\n}\n\nfunction normalizeFontWeight(weight) {\n  if (!weight) {\n    return 400;\n  }\n\n  if (typeof weight === \"number\") {\n    // Ignore values which aren't valid font-weights.\n    return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;\n  }\n\n  if (/^\\d00$/.test(weight)) {\n    return parseInt(weight);\n  }\n\n  switch (weight) {\n    case \"bold\":\n      return 700;\n\n    case \"normal\":\n    default:\n      return 400;\n  }\n}\n\nexport function normalizeFontFace(fontFace) {\n  var family = fontFace.family.replace(/\"|'/g, \"\").toLowerCase();\n\n  var style = normalizeFontStyle(fontFace.style);\n  var weight = normalizeFontWeight(fontFace.weight);\n  var stretch = normalizeFontStretch(fontFace.stretch);\n\n  return {\n    family: family,\n    style: style,\n    weight: weight,\n    stretch: stretch,\n    src: fontFace.src || [],\n\n    // The ref property maps this font-face to the font\n    // added by the .addFont() method.\n    ref: fontFace.ref || {\n      name: family,\n      style: [stretch, style, weight].join(\" \")\n    }\n  };\n}\n\n/**\n * Turns a list of font-faces into a map, for easier lookup when resolving\n * fonts.\n * @private\n */\nexport function buildFontFaceMap(fontFaces) {\n  var map = {};\n\n  for (var i = 0; i < fontFaces.length; ++i) {\n    var normalized = normalizeFontFace(fontFaces[i]);\n\n    var name = normalized.family;\n    var stretch = normalized.stretch;\n    var style = normalized.style;\n    var weight = normalized.weight;\n\n    map[name] = map[name] || {};\n\n    map[name][stretch] = map[name][stretch] || {};\n    map[name][stretch][style] = map[name][stretch][style] || {};\n    map[name][stretch][style][weight] = normalized;\n  }\n\n  return map;\n}\n\n/**\n * Searches a map of stretches, weights, etc. in the given direction and\n * then, if no match has been found, in the opposite directions.\n *\n * @param {Object.<string, any>} matchingSet A map of the various font variations.\n * @param {any[]} order The order of the different variations\n * @param {number} pivot The starting point of the search in the order list.\n * @param {number} dir The initial direction of the search (desc = -1, asc = 1)\n * @private\n */\n\nfunction searchFromPivot(matchingSet, order, pivot, dir) {\n  var i;\n\n  for (i = pivot; i >= 0 && i < order.length; i += dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n\n  for (i = pivot; i >= 0 && i < order.length; i -= dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n}\n\nfunction resolveFontStretch(stretch, matchingSet) {\n  if (matchingSet[stretch]) {\n    return matchingSet[stretch];\n  }\n\n  var pivot = fontStretchLookup[stretch];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = pivot <= fontStretchLookup[\"normal\"] ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-stretch value for \" + stretch\n    );\n  }\n\n  return match;\n}\n\nfunction resolveFontStyle(fontStyle, matchingSet) {\n  if (matchingSet[fontStyle]) {\n    return matchingSet[fontStyle];\n  }\n\n  var ordering = fontStyleOrder[fontStyle];\n\n  for (var i = 0; i < ordering.length; ++i) {\n    if (matchingSet[ordering[i]]) {\n      return matchingSet[ordering[i]];\n    }\n  }\n\n  // Since a font-family cannot exist without having at least one style value\n  // we should never reach this point.\n  throw new Error(\"Could not find a matching font-style for \" + fontStyle);\n}\n\nfunction resolveFontWeight(weight, matchingSet) {\n  if (matchingSet[weight]) {\n    return matchingSet[weight];\n  }\n\n  if (weight === 400 && matchingSet[500]) {\n    return matchingSet[500];\n  }\n\n  if (weight === 500 && matchingSet[400]) {\n    return matchingSet[400];\n  }\n\n  var pivot = fontWeightsLookup[weight];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = weight < 400 ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-weight for value \" + weight\n    );\n  }\n\n  return match;\n}\n\nvar defaultGenericFontFamilies = {\n  \"sans-serif\": \"helvetica\",\n  fixed: \"courier\",\n  monospace: \"courier\",\n  terminal: \"courier\",\n  cursive: \"times\",\n  fantasy: \"times\",\n  serif: \"times\"\n};\n\nvar systemFonts = {\n  caption: \"times\",\n  icon: \"times\",\n  menu: \"times\",\n  \"message-box\": \"times\",\n  \"small-caption\": \"times\",\n  \"status-bar\": \"times\"\n};\n\nfunction ruleToString(rule) {\n  return [rule.stretch, rule.style, rule.weight, rule.family].join(\" \");\n}\n\nexport function resolveFontFace(fontFaceMap, rules, opts) {\n  opts = opts || {};\n\n  var defaultFontFamily = opts.defaultFontFamily || \"times\";\n  var genericFontFamilies = Object.assign(\n    {},\n    defaultGenericFontFamilies,\n    opts.genericFontFamilies || {}\n  );\n\n  var rule = null;\n  var matches = null;\n\n  for (var i = 0; i < rules.length; ++i) {\n    rule = normalizeFontFace(rules[i]);\n\n    if (genericFontFamilies[rule.family]) {\n      rule.family = genericFontFamilies[rule.family];\n    }\n\n    if (fontFaceMap.hasOwnProperty(rule.family)) {\n      matches = fontFaceMap[rule.family];\n\n      break;\n    }\n  }\n\n  // Always fallback to a known font family.\n  matches = matches || fontFaceMap[defaultFontFamily];\n\n  if (!matches) {\n    // At this point we should definitiely have a font family, but if we\n    // don't there is something wrong with our configuration\n    throw new Error(\n      \"Could not find a font-family for the rule '\" +\n        ruleToString(rule) +\n        \"' and default family '\" +\n        defaultFontFamily +\n        \"'.\"\n    );\n  }\n\n  matches = resolveFontStretch(rule.stretch, matches);\n  matches = resolveFontStyle(rule.style, matches);\n  matches = resolveFontWeight(rule.weight, matches);\n\n  if (!matches) {\n    // We should've fount\n    throw new Error(\n      \"Failed to resolve a font for the rule '\" + ruleToString(rule) + \"'.\"\n    );\n  }\n\n  return matches;\n}\n\n/**\n * Builds a style id for use with the addFont() method.\n * @param {FontFace} font\n * @private\n */\nexport function toStyleName(font) {\n  return [font.weight, font.style, font.stretch].join(\" \");\n}\n\nfunction eatWhiteSpace(input) {\n  return input.trimLeft();\n}\n\nfunction parseQuotedFontFamily(input, quote) {\n  var index = 0;\n\n  while (index < input.length) {\n    var current = input.charAt(index);\n\n    if (current === quote) {\n      return [input.substring(0, index), input.substring(index + 1)];\n    }\n\n    index += 1;\n  }\n\n  // Unexpected end of input\n  return null;\n}\n\nfunction parseNonQuotedFontFamily(input) {\n  // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n  //\n  // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.\n  //\n  // Breakdown of regexp:\n  // -[a-z_]     - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit\n  // [a-z_]      - allow a-z and underscore at beginning of input\n  // [a-z0-9_-]* - after that, anything goes\n  var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);\n\n  // non quoted value contains illegal characters\n  if (match === null) {\n    return null;\n  }\n\n  return [match[0], input.substring(match[0].length)];\n}\n\nvar defaultFont = [\"times\"];\n\nexport function parseFontFamily(input) {\n  var result = [];\n  var ch, parsed;\n  var remaining = input.trim();\n\n  if (remaining === \"\") {\n    return defaultFont;\n  }\n\n  if (remaining in systemFonts) {\n    return [systemFonts[remaining]];\n  }\n\n  while (remaining !== \"\") {\n    parsed = null;\n    remaining = eatWhiteSpace(remaining);\n    ch = remaining.charAt(0);\n\n    switch (ch) {\n      case '\"':\n      case \"'\":\n        parsed = parseQuotedFontFamily(remaining.substring(1), ch);\n        break;\n\n      default:\n        parsed = parseNonQuotedFontFamily(remaining);\n        break;\n    }\n\n    if (parsed === null) {\n      return defaultFont;\n    }\n\n    result.push(parsed[0]);\n\n    remaining = eatWhiteSpace(parsed[1]);\n\n    // We expect end of input or a comma separator here\n    if (remaining !== \"\" && remaining.charAt(0) !== \",\") {\n      return defaultFont;\n    }\n\n    remaining = remaining.replace(/^,/, \"\");\n  }\n\n  return result;\n}\n","/* eslint-disable no-fallthrough */\r\n/* eslint-disable no-console */\r\n/**\r\n * @license\r\n * jsPDF Context2D PlugIn Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\r\n *\r\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\r\n */\r\n\r\nimport { jsPDF } from \"../jspdf.js\";\r\nimport { RGBColor } from \"../libs/rgbcolor.js\";\r\nimport { console } from \"../libs/console.js\";\r\nimport {\r\n  buildFontFaceMap,\r\n  parseFontFamily,\r\n  resolveFontFace\r\n} from \"../libs/fontFace.js\";\r\n\r\n/**\r\n * This plugin mimics the HTML5 CanvasRenderingContext2D.\r\n *\r\n * The goal is to provide a way for current canvas implementations to print directly to a PDF.\r\n *\r\n * @name context2d\r\n * @module\r\n */\r\n(function(jsPDFAPI) {\r\n  \"use strict\";\r\n  var ContextLayer = function(ctx) {\r\n    ctx = ctx || {};\r\n    this.isStrokeTransparent = ctx.isStrokeTransparent || false;\r\n    this.strokeOpacity = ctx.strokeOpacity || 1;\r\n    this.strokeStyle = ctx.strokeStyle || \"#000000\";\r\n    this.fillStyle = ctx.fillStyle || \"#000000\";\r\n    this.isFillTransparent = ctx.isFillTransparent || false;\r\n    this.fillOpacity = ctx.fillOpacity || 1;\r\n    this.font = ctx.font || \"10px sans-serif\";\r\n    this.textBaseline = ctx.textBaseline || \"alphabetic\";\r\n    this.textAlign = ctx.textAlign || \"left\";\r\n    this.lineWidth = ctx.lineWidth || 1;\r\n    this.lineJoin = ctx.lineJoin || \"miter\";\r\n    this.lineCap = ctx.lineCap || \"butt\";\r\n    this.path = ctx.path || [];\r\n    this.transform =\r\n      typeof ctx.transform !== \"undefined\"\r\n        ? ctx.transform.clone()\r\n        : new Matrix();\r\n    this.globalCompositeOperation = ctx.globalCompositeOperation || \"normal\";\r\n    this.globalAlpha = ctx.globalAlpha || 1.0;\r\n    this.clip_path = ctx.clip_path || [];\r\n    this.currentPoint = ctx.currentPoint || new Point();\r\n    this.miterLimit = ctx.miterLimit || 10.0;\r\n    this.lastPoint = ctx.lastPoint || new Point();\r\n    this.lineDashOffset = ctx.lineDashOffset || 0.0;\r\n    this.lineDash = ctx.lineDash || [];\r\n    this.margin = ctx.margin || [0, 0, 0, 0];\r\n    this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;\r\n\r\n    this.ignoreClearRect =\r\n      typeof ctx.ignoreClearRect === \"boolean\" ? ctx.ignoreClearRect : true;\r\n    return this;\r\n  };\r\n\r\n  //stub\r\n  var f2,\r\n    getHorizontalCoordinateString,\r\n    getVerticalCoordinateString,\r\n    getHorizontalCoordinate,\r\n    getVerticalCoordinate,\r\n    Point,\r\n    Rectangle,\r\n    Matrix,\r\n    _ctx;\r\n  jsPDFAPI.events.push([\r\n    \"initialized\",\r\n    function() {\r\n      this.context2d = new Context2D(this);\r\n\r\n      f2 = this.internal.f2;\r\n      getHorizontalCoordinateString = this.internal.getCoordinateString;\r\n      getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\r\n      getHorizontalCoordinate = this.internal.getHorizontalCoordinate;\r\n      getVerticalCoordinate = this.internal.getVerticalCoordinate;\r\n      Point = this.internal.Point;\r\n      Rectangle = this.internal.Rectangle;\r\n      Matrix = this.internal.Matrix;\r\n      _ctx = new ContextLayer();\r\n    }\r\n  ]);\r\n\r\n  var Context2D = function(pdf) {\r\n    Object.defineProperty(this, \"canvas\", {\r\n      get: function() {\r\n        return { parentNode: false, style: false };\r\n      }\r\n    });\r\n\r\n    var _pdf = pdf;\r\n    Object.defineProperty(this, \"pdf\", {\r\n      get: function() {\r\n        return _pdf;\r\n      }\r\n    });\r\n\r\n    var _pageWrapXEnabled = false;\r\n    /**\r\n     * @name pageWrapXEnabled\r\n     * @type {boolean}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"pageWrapXEnabled\", {\r\n      get: function() {\r\n        return _pageWrapXEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapXEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _pageWrapYEnabled = false;\r\n    /**\r\n     * @name pageWrapYEnabled\r\n     * @type {boolean}\r\n     * @default true\r\n     */\r\n    Object.defineProperty(this, \"pageWrapYEnabled\", {\r\n      get: function() {\r\n        return _pageWrapYEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapYEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _posX = 0;\r\n    /**\r\n     * @name posX\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posX\", {\r\n      get: function() {\r\n        return _posX;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posX = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _posY = 0;\r\n    /**\r\n     * @name posY\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posY\", {\r\n      get: function() {\r\n        return _posY;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posY = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.\r\n     * @name margin\r\n     * @type {number|number[]}\r\n     * @default [0, 0, 0, 0]\r\n     */\r\n    Object.defineProperty(this, \"margin\", {\r\n      get: function() {\r\n        return _ctx.margin;\r\n      },\r\n      set: function(value) {\r\n        var margin;\r\n        if (typeof value === \"number\") {\r\n          margin = [value, value, value, value];\r\n        } else {\r\n          margin = new Array(4);\r\n          margin[0] = value[0];\r\n          margin[1] = value.length >= 2 ? value[1] : margin[0];\r\n          margin[2] = value.length >= 3 ? value[2] : margin[0];\r\n          margin[3] = value.length >= 4 ? value[3] : margin[1];\r\n        }\r\n        _ctx.margin = margin;\r\n      }\r\n    });\r\n\r\n    var _autoPaging = false;\r\n    /**\r\n     * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the\r\n     * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new\r\n     * pages if required.\r\n     *\r\n     * Context2d supports different modes:\r\n     * <ul>\r\n     * <li>\r\n     *   <code>false</code>: Auto paging is disabled.\r\n     * </li>\r\n     * <li>\r\n     *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\r\n     *   slice text in half, making it difficult to read.\r\n     * </li>\r\n     * <li>\r\n     *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\r\n     *   mostly of a single column of text.\r\n     * </li>\r\n     * </ul>\r\n     * @name Context2D#autoPaging\r\n     * @type {boolean|\"slice\"|\"text\"}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"autoPaging\", {\r\n      get: function() {\r\n        return _autoPaging;\r\n      },\r\n      set: function(value) {\r\n        _autoPaging = value;\r\n      }\r\n    });\r\n\r\n    var lastBreak = 0;\r\n    /**\r\n     * @name lastBreak\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"lastBreak\", {\r\n      get: function() {\r\n        return lastBreak;\r\n      },\r\n      set: function(value) {\r\n        lastBreak = value;\r\n      }\r\n    });\r\n\r\n    var pageBreaks = [];\r\n    /**\r\n     * Y Position of page breaks.\r\n     * @name pageBreaks\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"pageBreaks\", {\r\n      get: function() {\r\n        return pageBreaks;\r\n      },\r\n      set: function(value) {\r\n        pageBreaks = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctx\r\n     * @type {object}\r\n     * @default {}\r\n     */\r\n    Object.defineProperty(this, \"ctx\", {\r\n      get: function() {\r\n        return _ctx;\r\n      },\r\n      set: function(value) {\r\n        if (value instanceof ContextLayer) {\r\n          _ctx = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name path\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    Object.defineProperty(this, \"path\", {\r\n      get: function() {\r\n        return _ctx.path;\r\n      },\r\n      set: function(value) {\r\n        _ctx.path = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctxStack\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    var _ctxStack = [];\r\n    Object.defineProperty(this, \"ctxStack\", {\r\n      get: function() {\r\n        return _ctxStack;\r\n      },\r\n      set: function(value) {\r\n        _ctxStack = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used to fill the drawing\r\n     *\r\n     * @name fillStyle\r\n     * @default #000000\r\n     * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />\r\n     * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />\r\n     * A pattern object to use to fill the drawing (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"fillStyle\", {\r\n      get: function() {\r\n        return this.ctx.fillStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba;\r\n        rgba = getRGBA(value);\r\n\r\n        this.ctx.fillStyle = rgba.style;\r\n        this.ctx.isFillTransparent = rgba.a === 0;\r\n        this.ctx.fillOpacity = rgba.a;\r\n\r\n        this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n        this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used for strokes\r\n     *\r\n     * @name strokeStyle\r\n     * @default #000000\r\n     * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)\r\n     * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)\r\n     * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"strokeStyle\", {\r\n      get: function() {\r\n        return this.ctx.strokeStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba = getRGBA(value);\r\n\r\n        this.ctx.strokeStyle = rgba.style;\r\n        this.ctx.isStrokeTransparent = rgba.a === 0;\r\n        this.ctx.strokeOpacity = rgba.a;\r\n\r\n        if (rgba.a === 0) {\r\n          this.pdf.setDrawColor(255, 255, 255);\r\n        } else if (rgba.a === 1) {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        } else {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the style of the end caps for a line\r\n     *\r\n     * @name lineCap\r\n     * @default butt\r\n     * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line <br/>\r\n     * round A rounded end cap is added to each end of the line<br/>\r\n     * square A square end cap is added to each end of the line<br/>\r\n     */\r\n    Object.defineProperty(this, \"lineCap\", {\r\n      get: function() {\r\n        return this.ctx.lineCap;\r\n      },\r\n      set: function(value) {\r\n        if ([\"butt\", \"round\", \"square\"].indexOf(value) !== -1) {\r\n          this.ctx.lineCap = value;\r\n          this.pdf.setLineCap(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the current line width\r\n     *\r\n     * @name lineWidth\r\n     * @default 1\r\n     * @property {number} lineWidth The current line width, in pixels\r\n     */\r\n    Object.defineProperty(this, \"lineWidth\", {\r\n      get: function() {\r\n        return this.ctx.lineWidth;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.lineWidth = value;\r\n          this.pdf.setLineWidth(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the type of corner created, when two lines meet\r\n     */\r\n    Object.defineProperty(this, \"lineJoin\", {\r\n      get: function() {\r\n        return this.ctx.lineJoin;\r\n      },\r\n      set: function(value) {\r\n        if ([\"bevel\", \"round\", \"miter\"].indexOf(value) !== -1) {\r\n          this.ctx.lineJoin = value;\r\n          this.pdf.setLineJoin(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.\r\n     *\r\n     * @name miterLimit\r\n     * @default 10\r\n     */\r\n    Object.defineProperty(this, \"miterLimit\", {\r\n      get: function() {\r\n        return this.ctx.miterLimit;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.miterLimit = value;\r\n          this.pdf.setMiterLimit(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textBaseline\", {\r\n      get: function() {\r\n        return this.ctx.textBaseline;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.textBaseline = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textAlign\", {\r\n      get: function() {\r\n        return this.ctx.textAlign;\r\n      },\r\n      set: function(value) {\r\n        if ([\"right\", \"end\", \"center\", \"left\", \"start\"].indexOf(value) !== -1) {\r\n          this.ctx.textAlign = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _fontFaceMap = null;\r\n\r\n    function getFontFaceMap(pdf, fontFaces) {\r\n      if (_fontFaceMap === null) {\r\n        var fontMap = pdf.getFontList();\r\n\r\n        var convertedFontFaces = convertToFontFaces(fontMap);\r\n\r\n        _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));\r\n      }\r\n\r\n      return _fontFaceMap;\r\n    }\r\n\r\n    function convertToFontFaces(fontMap) {\r\n      var fontFaces = [];\r\n\r\n      Object.keys(fontMap).forEach(function(family) {\r\n        var styles = fontMap[family];\r\n\r\n        styles.forEach(function(style) {\r\n          var fontFace = null;\r\n\r\n          switch (style) {\r\n            case \"bold\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\"\r\n              };\r\n              break;\r\n\r\n            case \"italic\":\r\n              fontFace = {\r\n                family: family,\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"bolditalic\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\",\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"\":\r\n            case \"normal\":\r\n              fontFace = {\r\n                family: family\r\n              };\r\n              break;\r\n          }\r\n\r\n          // If font-face is still null here, it is a font with some styling we don't recognize and\r\n          // cannot map or it is a font added via the fontFaces option of .html().\r\n          if (fontFace !== null) {\r\n            fontFace.ref = {\r\n              name: family,\r\n              style: style\r\n            };\r\n\r\n            fontFaces.push(fontFace);\r\n          }\r\n        });\r\n      });\r\n\r\n      return fontFaces;\r\n    }\r\n\r\n    var _fontFaces = null;\r\n    /**\r\n     * A map of available font-faces, as passed in the options of\r\n     * .html(). If set a limited implementation of the font style matching\r\n     * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm\r\n     * will be used. If not set it will fallback to previous behavior.\r\n     */\r\n\r\n    Object.defineProperty(this, \"fontFaces\", {\r\n      get: function() {\r\n        return _fontFaces;\r\n      },\r\n      set: function(value) {\r\n        _fontFaceMap = null;\r\n        _fontFaces = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"font\", {\r\n      get: function() {\r\n        return this.ctx.font;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.font = value;\r\n        var rx, matches;\r\n\r\n        //source: https://stackoverflow.com/a/10136041\r\n        // eslint-disable-next-line no-useless-escape\r\n        rx = /^\\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;\r\n        matches = rx.exec(value);\r\n        if (matches !== null) {\r\n          var fontStyle = matches[1];\r\n          var fontVariant = matches[2];\r\n          var fontWeight = matches[3];\r\n          var fontSize = matches[4];\r\n          var lineHeight = matches[5];\r\n          var fontFamily = matches[6];\r\n        } else {\r\n          return;\r\n        }\r\n        var rxFontSize = /^([.\\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;\r\n        var fontSizeUnit = rxFontSize.exec(fontSize)[2];\r\n\r\n        if (\"px\" === fontSizeUnit) {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        } else if (\"em\" === fontSizeUnit) {\r\n          fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());\r\n        } else {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        }\r\n\r\n        this.pdf.setFontSize(fontSize);\r\n        var parts = parseFontFamily(fontFamily);\r\n\r\n        if (this.fontFaces) {\r\n          var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);\r\n\r\n          var rules = parts.map(function(ff) {\r\n            return {\r\n              family: ff,\r\n              stretch: \"normal\", // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)\r\n              weight: fontWeight,\r\n              style: fontStyle\r\n            };\r\n          });\r\n\r\n          var font = resolveFontFace(fontFaceMap, rules);\r\n          this.pdf.setFont(font.ref.name, font.ref.style);\r\n          return;\r\n        }\r\n\r\n        var style = \"\";\r\n        if (\r\n          fontWeight === \"bold\" ||\r\n          parseInt(fontWeight, 10) >= 700 ||\r\n          fontStyle === \"bold\"\r\n        ) {\r\n          style = \"bold\";\r\n        }\r\n\r\n        if (fontStyle === \"italic\") {\r\n          style += \"italic\";\r\n        }\r\n\r\n        if (style.length === 0) {\r\n          style = \"normal\";\r\n        }\r\n        var jsPdfFontName = \"\";\r\n\r\n        var fallbackFonts = {\r\n          arial: \"Helvetica\",\r\n          Arial: \"Helvetica\",\r\n          verdana: \"Helvetica\",\r\n          Verdana: \"Helvetica\",\r\n          helvetica: \"Helvetica\",\r\n          Helvetica: \"Helvetica\",\r\n          \"sans-serif\": \"Helvetica\",\r\n          fixed: \"Courier\",\r\n          monospace: \"Courier\",\r\n          terminal: \"Courier\",\r\n          cursive: \"Times\",\r\n          fantasy: \"Times\",\r\n          serif: \"Times\"\r\n        };\r\n\r\n        for (var i = 0; i < parts.length; i++) {\r\n          if (\r\n            this.pdf.internal.getFont(parts[i], style, {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            break;\r\n          } else if (\r\n            style === \"bolditalic\" &&\r\n            this.pdf.internal.getFont(parts[i], \"bold\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"bold\";\r\n          } else if (\r\n            this.pdf.internal.getFont(parts[i], \"normal\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"normal\";\r\n            break;\r\n          }\r\n        }\r\n        if (jsPdfFontName === \"\") {\r\n          for (var j = 0; j < parts.length; j++) {\r\n            if (fallbackFonts[parts[j]]) {\r\n              jsPdfFontName = fallbackFonts[parts[j]];\r\n              break;\r\n            }\r\n          }\r\n        }\r\n        jsPdfFontName = jsPdfFontName === \"\" ? \"Times\" : jsPdfFontName;\r\n        this.pdf.setFont(jsPdfFontName, style);\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalCompositeOperation\", {\r\n      get: function() {\r\n        return this.ctx.globalCompositeOperation;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalCompositeOperation = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalAlpha\", {\r\n      get: function() {\r\n        return this.ctx.globalAlpha;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalAlpha = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A float specifying the amount of the line dash offset. The default value is 0.0.\r\n     *\r\n     * @name lineDashOffset\r\n     * @default 0.0\r\n     */\r\n    Object.defineProperty(this, \"lineDashOffset\", {\r\n      get: function() {\r\n        return this.ctx.lineDashOffset;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDashOffset = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"lineDash\", {\r\n      get: function() {\r\n        return this.ctx.lineDash;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDash = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"ignoreClearRect\", {\r\n      get: function() {\r\n        return this.ctx.ignoreClearRect;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.ignoreClearRect = Boolean(value);\r\n      }\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Sets the line dash pattern used when stroking lines.\r\n   * @name setLineDash\r\n   * @function\r\n   * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.\r\n   */\r\n  Context2D.prototype.setLineDash = function(dashArray) {\r\n    this.lineDash = dashArray;\r\n  };\r\n\r\n  /**\r\n   * gets the current line dash pattern.\r\n   * @name getLineDash\r\n   * @function\r\n   * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].\r\n   */\r\n  Context2D.prototype.getLineDash = function() {\r\n    if (this.lineDash.length % 2) {\r\n      // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value\r\n      return this.lineDash.concat(this.lineDash);\r\n    } else {\r\n      // The copied value is returned to prevent contamination from outside.\r\n      return this.lineDash.slice();\r\n    }\r\n  };\r\n\r\n  Context2D.prototype.fill = function() {\r\n    pathPreProcess.call(this, \"fill\", false);\r\n  };\r\n\r\n  /**\r\n   * Actually draws the path you have defined\r\n   *\r\n   * @name stroke\r\n   * @function\r\n   * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.\r\n   */\r\n  Context2D.prototype.stroke = function() {\r\n    pathPreProcess.call(this, \"stroke\", false);\r\n  };\r\n\r\n  /**\r\n   * Begins a path, or resets the current\r\n   *\r\n   * @name beginPath\r\n   * @function\r\n   * @description The beginPath() method begins a path, or resets the current path.\r\n   */\r\n  Context2D.prototype.beginPath = function() {\r\n    this.path = [\r\n      {\r\n        type: \"begin\"\r\n      }\r\n    ];\r\n  };\r\n\r\n  /**\r\n   * Moves the path to the specified point in the canvas, without creating a line\r\n   *\r\n   * @name moveTo\r\n   * @function\r\n   * @param x {Number} The x-coordinate of where to move the path to\r\n   * @param y {Number} The y-coordinate of where to move the path to\r\n   */\r\n  Context2D.prototype.moveTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.moveTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.moveTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"mt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * Creates a path from the current point back to the starting point\r\n   *\r\n   * @name closePath\r\n   * @function\r\n   * @description The closePath() method creates a path from the current point back to the starting point.\r\n   */\r\n  Context2D.prototype.closePath = function() {\r\n    var pathBegin = new Point(0, 0);\r\n    var i = 0;\r\n    for (i = this.path.length - 1; i !== -1; i--) {\r\n      if (this.path[i].type === \"begin\") {\r\n        if (\r\n          typeof this.path[i + 1] === \"object\" &&\r\n          typeof this.path[i + 1].x === \"number\"\r\n        ) {\r\n          pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);\r\n          break;\r\n        }\r\n      }\r\n    }\r\n    this.path.push({\r\n      type: \"close\"\r\n    });\r\n    this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);\r\n  };\r\n\r\n  /**\r\n   * Adds a new point and creates a line to that point from the last specified point in the canvas\r\n   *\r\n   * @name lineTo\r\n   * @function\r\n   * @param x The x-coordinate of where to create the line to\r\n   * @param y The y-coordinate of where to create the line to\r\n   * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).\r\n   */\r\n  Context2D.prototype.lineTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.lineTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.lineTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"lt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt.x, pt.y);\r\n  };\r\n\r\n  /**\r\n   * Clips a region of any shape and size from the original canvas\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @description The clip() method clips a region of any shape and size from the original canvas.\r\n   */\r\n  Context2D.prototype.clip = function() {\r\n    this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));\r\n    pathPreProcess.call(this, null, true);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name quadraticCurveTo\r\n   * @function\r\n   * @param cpx {Number} The x-coordinate of the Bézier control point\r\n   * @param cpy {Number} The y-coordinate of the Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.<br /><br /> A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {\r\n      console.error(\r\n        \"jsPDF.context2d.quadraticCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.quadraticCurveTo\"\r\n      );\r\n    }\r\n\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));\r\n\r\n    this.path.push({\r\n      type: \"qct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name bezierCurveTo\r\n   * @function\r\n   * @param cp1x {Number} The x-coordinate of the first Bézier control point\r\n   * @param cp1y {Number} The y-coordinate of the first Bézier control point\r\n   * @param cp2x {Number} The x-coordinate of the second Bézier control point\r\n   * @param cp2y {Number} The y-coordinate of the second Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve. <br /><br />A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve.  The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(cp1x) ||\r\n      isNaN(cp1y) ||\r\n      isNaN(cp2x) ||\r\n      isNaN(cp2y)\r\n    ) {\r\n      console.error(\r\n        \"jsPDF.context2d.bezierCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.bezierCurveTo\"\r\n      );\r\n    }\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));\r\n    var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));\r\n\r\n    this.path.push({\r\n      type: \"bct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x2: pt2.x,\r\n      y2: pt2.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve (used to create circles, or parts of circles)\r\n   *\r\n   * @name arc\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the center of the circle\r\n   * @param y {Number} The y-coordinate of the center of the circle\r\n   * @param radius {Number} The radius of the circle\r\n   * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)\r\n   * @param endAngle {Number} The ending angle, in radians\r\n   * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.\r\n   * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).\r\n   */\r\n  Context2D.prototype.arc = function(\r\n    x,\r\n    y,\r\n    radius,\r\n    startAngle,\r\n    endAngle,\r\n    counterclockwise\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(radius) ||\r\n      isNaN(startAngle) ||\r\n      isNaN(endAngle)\r\n    ) {\r\n      console.error(\"jsPDF.context2d.arc: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.arc\");\r\n    }\r\n    counterclockwise = Boolean(counterclockwise);\r\n\r\n    if (!this.ctx.transform.isIdentity) {\r\n      var xpt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n      x = xpt.x;\r\n      y = xpt.y;\r\n\r\n      var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));\r\n      var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));\r\n      radius = Math.sqrt(\r\n        Math.pow(x_radPt.x - x_radPt0.x, 2) +\r\n          Math.pow(x_radPt.y - x_radPt0.y, 2)\r\n      );\r\n    }\r\n    if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {\r\n      startAngle = 0;\r\n      endAngle = 2 * Math.PI;\r\n    }\r\n\r\n    this.path.push({\r\n      type: \"arc\",\r\n      x: x,\r\n      y: y,\r\n      radius: radius,\r\n      startAngle: startAngle,\r\n      endAngle: endAngle,\r\n      counterclockwise: counterclockwise\r\n    });\r\n    // this.ctx.lastPoint(new Point(pt.x,pt.y));\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve between two tangents\r\n   *\r\n   * @name arcTo\r\n   * @function\r\n   * @param x1 {Number} The x-coordinate of the first tangent\r\n   * @param y1 {Number} The y-coordinate of the first tangent\r\n   * @param x2 {Number} The x-coordinate of the second tangent\r\n   * @param y2 {Number} The y-coordinate of the second tangent\r\n   * @param radius The radius of the arc\r\n   * @description The arcTo() method creates an arc/curve between two tangents on the canvas.\r\n   */\r\n  // eslint-disable-next-line no-unused-vars\r\n  Context2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {\r\n    throw new Error(\"arcTo not implemented.\");\r\n  };\r\n\r\n  /**\r\n   * Creates a rectangle\r\n   *\r\n   * @name rect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The rect() method creates a rectangle.\r\n   */\r\n  Context2D.prototype.rect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.rect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rect\");\r\n    }\r\n    this.moveTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x + w, y + h);\r\n    this.lineTo(x, y + h);\r\n    this.lineTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x, y);\r\n  };\r\n\r\n  /**\r\n   * Draws a \"filled\" rectangle\r\n   *\r\n   * @name fillRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The fillRect() method draws a \"filled\" rectangle. The default color of the fill is black.\r\n   */\r\n  Context2D.prototype.fillRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.fillRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillRect\");\r\n    }\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n    var tmp = {};\r\n    if (this.lineCap !== \"butt\") {\r\n      tmp.lineCap = this.lineCap;\r\n      this.lineCap = \"butt\";\r\n    }\r\n    if (this.lineJoin !== \"miter\") {\r\n      tmp.lineJoin = this.lineJoin;\r\n      this.lineJoin = \"miter\";\r\n    }\r\n\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.fill();\r\n\r\n    if (tmp.hasOwnProperty(\"lineCap\")) {\r\n      this.lineCap = tmp.lineCap;\r\n    }\r\n    if (tmp.hasOwnProperty(\"lineJoin\")) {\r\n      this.lineJoin = tmp.lineJoin;\r\n    }\r\n  };\r\n\r\n  /**\r\n   *     Draws a rectangle (no fill)\r\n   *\r\n   * @name strokeRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.\r\n   */\r\n  Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.strokeRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeRect\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.stroke();\r\n  };\r\n\r\n  /**\r\n   * Clears the specified pixels within a given rectangle\r\n   *\r\n   * @name clearRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle to clear, in pixels\r\n   * @param h {Number} The height of the rectangle to clear, in pixels\r\n   * @description We cannot clear PDF commands that were already written to PDF, so we use white instead. <br />\r\n   * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.\r\n   * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.\r\n   * This flag is stored in the save/restore context and is managed the same way as other drawing states.\r\n   *\r\n   */\r\n  Context2D.prototype.clearRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.clearRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.clearRect\");\r\n    }\r\n    if (this.ignoreClearRect) {\r\n      return;\r\n    }\r\n\r\n    this.fillStyle = \"#ffffff\";\r\n    this.fillRect(x, y, w, h);\r\n  };\r\n\r\n  /**\r\n   * Saves the state of the current context\r\n   *\r\n   * @name save\r\n   * @function\r\n   */\r\n  Context2D.prototype.save = function(doStackPush) {\r\n    doStackPush = typeof doStackPush === \"boolean\" ? doStackPush : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPush) {\r\n      this.ctx.fontSize = this.pdf.internal.getFontSize();\r\n      var ctx = new ContextLayer(this.ctx);\r\n      this.ctxStack.push(this.ctx);\r\n      this.ctx = ctx;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Returns previously saved path state and attributes\r\n   *\r\n   * @name restore\r\n   * @function\r\n   */\r\n  Context2D.prototype.restore = function(doStackPop) {\r\n    doStackPop = typeof doStackPop === \"boolean\" ? doStackPop : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"Q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPop && this.ctxStack.length !== 0) {\r\n      this.ctx = this.ctxStack.pop();\r\n      this.fillStyle = this.ctx.fillStyle;\r\n      this.strokeStyle = this.ctx.strokeStyle;\r\n      this.font = this.ctx.font;\r\n      this.lineCap = this.ctx.lineCap;\r\n      this.lineWidth = this.ctx.lineWidth;\r\n      this.lineJoin = this.ctx.lineJoin;\r\n      this.lineDash = this.ctx.lineDash;\r\n      this.lineDashOffset = this.ctx.lineDashOffset;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @name toDataURL\r\n   * @function\r\n   */\r\n  Context2D.prototype.toDataURL = function() {\r\n    throw new Error(\"toDataUrl not implemented.\");\r\n  };\r\n\r\n  //helper functions\r\n\r\n  /**\r\n   * Get the decimal values of r, g, b and a\r\n   *\r\n   * @name getRGBA\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var getRGBA = function(style) {\r\n    var rxRgb = /rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/;\r\n    var rxRgba = /rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*([\\d.]+)\\s*\\)/;\r\n    var rxTransparent = /transparent|rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*0+\\s*\\)/;\r\n\r\n    var r, g, b, a;\r\n\r\n    if (style.isCanvasGradient === true) {\r\n      style = style.getColor();\r\n    }\r\n\r\n    if (!style) {\r\n      return { r: 0, g: 0, b: 0, a: 0, style: style };\r\n    }\r\n\r\n    if (rxTransparent.test(style)) {\r\n      r = 0;\r\n      g = 0;\r\n      b = 0;\r\n      a = 0;\r\n    } else {\r\n      var matches = rxRgb.exec(style);\r\n      if (matches !== null) {\r\n        r = parseInt(matches[1]);\r\n        g = parseInt(matches[2]);\r\n        b = parseInt(matches[3]);\r\n        a = 1;\r\n      } else {\r\n        matches = rxRgba.exec(style);\r\n        if (matches !== null) {\r\n          r = parseInt(matches[1]);\r\n          g = parseInt(matches[2]);\r\n          b = parseInt(matches[3]);\r\n          a = parseFloat(matches[4]);\r\n        } else {\r\n          a = 1;\r\n\r\n          if (typeof style === \"string\" && style.charAt(0) !== \"#\") {\r\n            var rgbColor = new RGBColor(style);\r\n            if (rgbColor.ok) {\r\n              style = rgbColor.toHex();\r\n            } else {\r\n              style = \"#000000\";\r\n            }\r\n          }\r\n\r\n          if (style.length === 4) {\r\n            r = style.substring(1, 2);\r\n            r += r;\r\n            g = style.substring(2, 3);\r\n            g += g;\r\n            b = style.substring(3, 4);\r\n            b += b;\r\n          } else {\r\n            r = style.substring(1, 3);\r\n            g = style.substring(3, 5);\r\n            b = style.substring(5, 7);\r\n          }\r\n          r = parseInt(r, 16);\r\n          g = parseInt(g, 16);\r\n          b = parseInt(b, 16);\r\n        }\r\n      }\r\n    }\r\n    return { r: r, g: g, b: b, a: a, style: style };\r\n  };\r\n\r\n  /**\r\n   * @name isFillTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isFillTransparent = function() {\r\n    return this.ctx.isFillTransparent || this.globalAlpha == 0;\r\n  };\r\n\r\n  /**\r\n   * @name isStrokeTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isStrokeTransparent = function() {\r\n    return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);\r\n  };\r\n\r\n  /**\r\n   * Draws \"filled\" text on the canvas\r\n   *\r\n   * @name fillText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The fillText() method draws filled text on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.fillText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.fillText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillText\");\r\n    }\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n\r\n    // We only use X axis as scale hint\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Draws text on the canvas (no fill)\r\n   *\r\n   * @name strokeText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.strokeText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.strokeText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeText\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      renderingMode: \"stroke\",\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Returns an object that contains the width of the specified text\r\n   *\r\n   * @name measureText\r\n   * @function\r\n   * @param text {String} The text to be measured\r\n   * @description The measureText() method returns an object that contains the width of the specified text, in pixels.\r\n   * @returns {Number}\r\n   */\r\n  Context2D.prototype.measureText = function(text) {\r\n    if (typeof text !== \"string\") {\r\n      console.error(\r\n        \"jsPDF.context2d.measureText: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.measureText\"\r\n      );\r\n    }\r\n    var pdf = this.pdf;\r\n    var k = this.pdf.internal.scaleFactor;\r\n\r\n    var fontSize = pdf.internal.getFontSize();\r\n    var txtWidth =\r\n      (pdf.getStringUnitWidth(text) * fontSize) / pdf.internal.scaleFactor;\r\n    txtWidth *= Math.round(((k * 96) / 72) * 10000) / 10000;\r\n\r\n    var TextMetrics = function(options) {\r\n      options = options || {};\r\n      var _width = options.width || 0;\r\n      Object.defineProperty(this, \"width\", {\r\n        get: function() {\r\n          return _width;\r\n        }\r\n      });\r\n      return this;\r\n    };\r\n    return new TextMetrics({ width: txtWidth });\r\n  };\r\n\r\n  //Transformations\r\n\r\n  /**\r\n   * Scales the current drawing bigger or smaller\r\n   *\r\n   * @name scale\r\n   * @function\r\n   * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @description The scale() method scales the current drawing, bigger or smaller.\r\n   */\r\n  Context2D.prototype.scale = function(scalewidth, scaleheight) {\r\n    if (isNaN(scalewidth) || isNaN(scaleheight)) {\r\n      console.error(\"jsPDF.context2d.scale: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.scale\");\r\n    }\r\n    var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Rotates the current drawing\r\n   *\r\n   * @name rotate\r\n   * @function\r\n   * @param angle {Number} The rotation angle, in radians.\r\n   * @description To calculate from degrees to radians: degrees*Math.PI/180. <br />\r\n   * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180\r\n   */\r\n  Context2D.prototype.rotate = function(angle) {\r\n    if (isNaN(angle)) {\r\n      console.error(\"jsPDF.context2d.rotate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rotate\");\r\n    }\r\n    var matrix = new Matrix(\r\n      Math.cos(angle),\r\n      Math.sin(angle),\r\n      -Math.sin(angle),\r\n      Math.cos(angle),\r\n      0.0,\r\n      0.0\r\n    );\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Remaps the (0,0) position on the canvas\r\n   *\r\n   * @name translate\r\n   * @function\r\n   * @param x {Number} The value to add to horizontal (x) coordinates\r\n   * @param y {Number} The value to add to vertical (y) coordinates\r\n   * @description The translate() method remaps the (0,0) position on the canvas.\r\n   */\r\n  Context2D.prototype.translate = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.translate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.translate\");\r\n    }\r\n    var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Replaces the current transformation matrix for the drawing\r\n   *\r\n   * @name transform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix.<br /><br />The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:<br /><br /><br /><br />a    c    e<br /><br />b    d    f<br /><br />0    0    1<br /><br />In other words, the transform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.transform = function(a, b, c, d, e, f) {\r\n    if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {\r\n      console.error(\"jsPDF.context2d.transform: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.transform\");\r\n    }\r\n    var matrix = new Matrix(a, b, c, d, e, f);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Resets the current transform to the identity matrix. Then runs transform()\r\n   *\r\n   * @name setTransform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix. <br /><br />The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.<br /><br />In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.setTransform = function(a, b, c, d, e, f) {\r\n    a = isNaN(a) ? 1 : a;\r\n    b = isNaN(b) ? 0 : b;\r\n    c = isNaN(c) ? 0 : c;\r\n    d = isNaN(d) ? 1 : d;\r\n    e = isNaN(e) ? 0 : e;\r\n    f = isNaN(f) ? 0 : f;\r\n    this.ctx.transform = new Matrix(a, b, c, d, e, f);\r\n  };\r\n\r\n  /**\r\n   * Should only be used if pageWrapYEnabled is true\r\n   *\r\n   * @name setPageByYPosition\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns One-based Page Number\r\n   */\r\n  var setPageByYPosition = function(y) {\r\n    if (this.pageWrapYEnabled) {\r\n      this.lastBreak = 0;\r\n      var manualBreaks = 0;\r\n      var autoBreaks = 0;\r\n      for (var i = 0; i < this.pageBreaks.length; i++) {\r\n        if (y >= this.pageBreaks[i]) {\r\n          manualBreaks++;\r\n          if (this.lastBreak === 0) {\r\n            autoBreaks++;\r\n          }\r\n          var spaceBetweenLastBreak = this.pageBreaks[i] - this.lastBreak;\r\n          this.lastBreak = this.pageBreaks[i];\r\n          var pagesSinceLastBreak = Math.floor(\r\n            spaceBetweenLastBreak / this.pageWrapY\r\n          );\r\n          autoBreaks += pagesSinceLastBreak;\r\n        }\r\n      }\r\n      if (this.lastBreak === 0) {\r\n        var pagesSinceLastBreak = Math.floor(y / this.pageWrapY) + 1;\r\n        autoBreaks += pagesSinceLastBreak;\r\n      }\r\n      return autoBreaks + manualBreaks;\r\n    } else {\r\n      return this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    }\r\n  };\r\n\r\n  var hasMargins = function() {\r\n    return (\r\n      this.margin[0] > 0 ||\r\n      this.margin[1] > 0 ||\r\n      this.margin[2] > 0 ||\r\n      this.margin[3] > 0\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Draws an image, canvas, or video onto the canvas\r\n   *\r\n   * @function\r\n   * @param img {} Specifies the image, canvas, or video element to use\r\n   * @param sx {Number} Optional. The x coordinate where to start clipping\r\n   * @param sy {Number} Optional. The y coordinate where to start clipping\r\n   * @param swidth {Number} Optional. The width of the clipped image\r\n   * @param sheight {Number} Optional. The height of the clipped image\r\n   * @param x {Number} The x coordinate where to place the image on the canvas\r\n   * @param y {Number} The y coordinate where to place the image on the canvas\r\n   * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)\r\n   * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)\r\n   */\r\n  Context2D.prototype.drawImage = function(\r\n    img,\r\n    sx,\r\n    sy,\r\n    swidth,\r\n    sheight,\r\n    x,\r\n    y,\r\n    width,\r\n    height\r\n  ) {\r\n    var imageProperties = this.pdf.getImageProperties(img);\r\n    var factorX = 1;\r\n    var factorY = 1;\r\n    var isClip;\r\n\r\n    var clipFactorX = 1;\r\n    var clipFactorY = 1;\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width !== \"undefined\") {\r\n      isClip = true;\r\n      clipFactorX = width / swidth;\r\n      clipFactorY = height / sheight;\r\n      factorX = ((imageProperties.width / swidth) * width) / swidth;\r\n      factorY = ((imageProperties.height / sheight) * height) / sheight;\r\n    }\r\n\r\n    //is sx and sy are set and x and y not, set x and y with values of sx and sy\r\n    if (typeof x === \"undefined\") {\r\n      x = sx;\r\n      y = sy;\r\n      sx = 0;\r\n      sy = 0;\r\n    }\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width === \"undefined\") {\r\n      width = swidth;\r\n      height = sheight;\r\n    }\r\n    if (typeof swidth === \"undefined\" && typeof width === \"undefined\") {\r\n      width = imageProperties.width;\r\n      height = imageProperties.height;\r\n    }\r\n\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n    var xRect = matrix.applyToRectangle(\r\n      new Rectangle(\r\n        x - sx * clipFactorX,\r\n        y - sy * clipFactorY,\r\n        swidth * factorX,\r\n        sheight * factorY\r\n      )\r\n    );\r\n    var pageArray = getPagesByPath.call(this, xRect);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var tmpRect = JSON.parse(JSON.stringify(xRect));\r\n        tmpRect = pathPositionRedo(\r\n          [tmpRect],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        const needsClipping = (i > min || i < max) && hasMargins.call(this);\r\n\r\n        if (needsClipping) {\r\n          this.pdf.saveGraphicsState();\r\n          this.pdf\r\n            .rect(\r\n              this.margin[3],\r\n              this.margin[0],\r\n              pageWidthMinusMargins,\r\n              pageHeightMinusMargins,\r\n              null\r\n            )\r\n            .clip()\r\n            .discardPath();\r\n        }\r\n        this.pdf.addImage(\r\n          img,\r\n          \"JPEG\",\r\n          tmpRect.x,\r\n          tmpRect.y,\r\n          tmpRect.w,\r\n          tmpRect.h,\r\n          null,\r\n          null,\r\n          angle\r\n        );\r\n        if (needsClipping) {\r\n          this.pdf.restoreGraphicsState();\r\n        }\r\n      }\r\n    } else {\r\n      this.pdf.addImage(\r\n        img,\r\n        \"JPEG\",\r\n        xRect.x,\r\n        xRect.y,\r\n        xRect.w,\r\n        xRect.h,\r\n        null,\r\n        null,\r\n        angle\r\n      );\r\n    }\r\n  };\r\n\r\n  var getPagesByPath = function(path, pageWrapX, pageWrapY) {\r\n    var result = [];\r\n    pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;\r\n    pageWrapY =\r\n      pageWrapY ||\r\n      this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n    var yOffset = this.posY + this.ctx.prevPageLastElemOffset;\r\n\r\n    switch (path.type) {\r\n      default:\r\n      case \"mt\":\r\n      case \"lt\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        break;\r\n      case \"arc\":\r\n        result.push(\r\n          Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1\r\n        );\r\n        break;\r\n      case \"qct\":\r\n        var rectOfQuadraticCurve = getQuadraticCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) /\r\n              pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"bct\":\r\n        var rectOfBezierCurve = getBezierCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x2,\r\n          path.y2,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"rect\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);\r\n    }\r\n\r\n    for (var i = 0; i < result.length; i += 1) {\r\n      while (this.pdf.internal.getNumberOfPages() < result[i]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    return result;\r\n  };\r\n\r\n  var addPage = function() {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var font = this.font;\r\n    var lineCap = this.lineCap;\r\n    var lineWidth = this.lineWidth;\r\n    var lineJoin = this.lineJoin;\r\n    this.pdf.addPage();\r\n    this.fillStyle = fillStyle;\r\n    this.strokeStyle = strokeStyle;\r\n    this.font = font;\r\n    this.lineCap = lineCap;\r\n    this.lineWidth = lineWidth;\r\n    this.lineJoin = lineJoin;\r\n  };\r\n\r\n  var pathPositionRedo = function(paths, x, y) {\r\n    for (var i = 0; i < paths.length; i++) {\r\n      switch (paths[i].type) {\r\n        case \"bct\":\r\n          paths[i].x2 += x;\r\n          paths[i].y2 += y;\r\n        case \"qct\":\r\n          paths[i].x1 += x;\r\n          paths[i].y1 += y;\r\n        case \"mt\":\r\n        case \"lt\":\r\n        case \"arc\":\r\n        default:\r\n          paths[i].x += x;\r\n          paths[i].y += y;\r\n      }\r\n    }\r\n    return paths;\r\n  };\r\n\r\n  var sortPages = function(pages) {\r\n    return pages.sort(function(a, b) {\r\n      return a - b;\r\n    });\r\n  };\r\n\r\n  var pathPreProcess = function(rule, isClip) {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var lineCap = this.lineCap;\r\n    var oldLineWidth = this.lineWidth;\r\n    var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);\r\n    var lineJoin = this.lineJoin;\r\n\r\n    var origPath = JSON.parse(JSON.stringify(this.path));\r\n    var xPath = JSON.parse(JSON.stringify(this.path));\r\n    var clipPath;\r\n    var tmpPath;\r\n    var pages = [];\r\n\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      if (typeof xPath[i].x !== \"undefined\") {\r\n        var page = getPagesByPath.call(this, xPath[i]);\r\n\r\n        for (var ii = 0; ii < page.length; ii += 1) {\r\n          if (pages.indexOf(page[ii]) === -1) {\r\n            pages.push(page[ii]);\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    for (var j = 0; j < pages.length; j++) {\r\n      while (this.pdf.internal.getNumberOfPages() < pages[j]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    sortPages(pages);\r\n\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var k = min; k < max + 1; k++) {\r\n        this.pdf.setPage(k);\r\n\r\n        this.fillStyle = fillStyle;\r\n        this.strokeStyle = strokeStyle;\r\n        this.lineCap = lineCap;\r\n        this.lineWidth = lineWidth;\r\n        this.lineJoin = lineJoin;\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, rule, true);\r\n          this.path = tmpPaths;\r\n        }\r\n        tmpPath = JSON.parse(JSON.stringify(origPath));\r\n        this.path = pathPositionRedo(\r\n          tmpPath,\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        );\r\n        if (isClip === false || k === 0) {\r\n          const needsClipping = (k > min || k < max) && hasMargins.call(this);\r\n          if (needsClipping) {\r\n            this.pdf.saveGraphicsState();\r\n            this.pdf\r\n              .rect(\r\n                this.margin[3],\r\n                this.margin[0],\r\n                pageWidthMinusMargins,\r\n                pageHeightMinusMargins,\r\n                null\r\n              )\r\n              .clip()\r\n              .discardPath();\r\n          }\r\n          drawPaths.call(this, rule, isClip);\r\n          if (needsClipping) {\r\n            this.pdf.restoreGraphicsState();\r\n          }\r\n        }\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    } else {\r\n      this.lineWidth = lineWidth;\r\n      drawPaths.call(this, rule, isClip);\r\n      this.lineWidth = oldLineWidth;\r\n    }\r\n    this.path = origPath;\r\n  };\r\n\r\n  /**\r\n   * Processes the paths\r\n   *\r\n   * @function\r\n   * @param rule {String}\r\n   * @param isClip {Boolean}\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var drawPaths = function(rule, isClip) {\r\n    if (rule === \"stroke\" && !isClip && isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    if (rule !== \"stroke\" && !isClip && isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var moves = [];\r\n\r\n    //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;\r\n    var delta;\r\n    var xPath = this.path;\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      var pt = xPath[i];\r\n\r\n      switch (pt.type) {\r\n        case \"begin\":\r\n          moves.push({\r\n            begin: true\r\n          });\r\n          break;\r\n\r\n        case \"close\":\r\n          moves.push({\r\n            close: true\r\n          });\r\n          break;\r\n\r\n        case \"mt\":\r\n          moves.push({\r\n            start: pt,\r\n            deltas: [],\r\n            abs: []\r\n          });\r\n          break;\r\n\r\n        case \"lt\":\r\n          var iii = moves.length;\r\n          if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {\r\n            delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];\r\n            if (iii > 0) {\r\n              for (iii; iii >= 0; iii--) {\r\n                if (\r\n                  moves[iii - 1].close !== true &&\r\n                  moves[iii - 1].begin !== true\r\n                ) {\r\n                  moves[iii - 1].deltas.push(delta);\r\n                  moves[iii - 1].abs.push(pt);\r\n                  break;\r\n                }\r\n              }\r\n            }\r\n          }\r\n          break;\r\n\r\n        case \"bct\":\r\n          delta = [\r\n            pt.x1 - xPath[i - 1].x,\r\n            pt.y1 - xPath[i - 1].y,\r\n            pt.x2 - xPath[i - 1].x,\r\n            pt.y2 - xPath[i - 1].y,\r\n            pt.x - xPath[i - 1].x,\r\n            pt.y - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"qct\":\r\n          var x1 = xPath[i - 1].x + (2.0 / 3.0) * (pt.x1 - xPath[i - 1].x);\r\n          var y1 = xPath[i - 1].y + (2.0 / 3.0) * (pt.y1 - xPath[i - 1].y);\r\n          var x2 = pt.x + (2.0 / 3.0) * (pt.x1 - pt.x);\r\n          var y2 = pt.y + (2.0 / 3.0) * (pt.y1 - pt.y);\r\n          var x3 = pt.x;\r\n          var y3 = pt.y;\r\n          delta = [\r\n            x1 - xPath[i - 1].x,\r\n            y1 - xPath[i - 1].y,\r\n            x2 - xPath[i - 1].x,\r\n            y2 - xPath[i - 1].y,\r\n            x3 - xPath[i - 1].x,\r\n            y3 - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"arc\":\r\n          moves.push({\r\n            deltas: [],\r\n            abs: [],\r\n            arc: true\r\n          });\r\n\r\n          if (Array.isArray(moves[moves.length - 1].abs)) {\r\n            moves[moves.length - 1].abs.push(pt);\r\n          }\r\n          break;\r\n      }\r\n    }\r\n    var style;\r\n    if (!isClip) {\r\n      if (rule === \"stroke\") {\r\n        style = \"stroke\";\r\n      } else {\r\n        style = \"fill\";\r\n      }\r\n    } else {\r\n      style = null;\r\n    }\r\n\r\n    var began = false;\r\n    for (var k = 0; k < moves.length; k++) {\r\n      if (moves[k].arc) {\r\n        var arcs = moves[k].abs;\r\n\r\n        for (var ii = 0; ii < arcs.length; ii++) {\r\n          var arc = arcs[ii];\r\n\r\n          if (arc.type === \"arc\") {\r\n            drawArc.call(\r\n              this,\r\n              arc.x,\r\n              arc.y,\r\n              arc.radius,\r\n              arc.startAngle,\r\n              arc.endAngle,\r\n              arc.counterclockwise,\r\n              undefined,\r\n              isClip,\r\n              !began\r\n            );\r\n          } else {\r\n            drawLine.call(this, arc.x, arc.y);\r\n          }\r\n          began = true;\r\n        }\r\n      } else if (moves[k].close === true) {\r\n        this.pdf.internal.out(\"h\");\r\n        began = false;\r\n      } else if (moves[k].begin !== true) {\r\n        var x = moves[k].start.x;\r\n        var y = moves[k].start.y;\r\n        drawLines.call(this, moves[k].deltas, x, y);\r\n        began = true;\r\n      }\r\n    }\r\n\r\n    if (style) {\r\n      putStyle.call(this, style);\r\n    }\r\n    if (isClip) {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var getBaseline = function(y) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    switch (this.ctx.textBaseline) {\r\n      case \"bottom\":\r\n        return y - descent;\r\n      case \"top\":\r\n        return y + height - descent;\r\n      case \"hanging\":\r\n        return y + height - 2 * descent;\r\n      case \"middle\":\r\n        return y + height / 2 - descent;\r\n      case \"ideographic\":\r\n        // TODO not implemented\r\n        return y;\r\n      case \"alphabetic\":\r\n      default:\r\n        return y;\r\n    }\r\n  };\r\n\r\n  var getTextBottom = function(yBaseLine) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    return yBaseLine + descent;\r\n  };\r\n\r\n  Context2D.prototype.createLinearGradient = function createLinearGradient() {\r\n    var canvasGradient = function canvasGradient() {};\r\n\r\n    canvasGradient.colorStops = [];\r\n    canvasGradient.addColorStop = function(offset, color) {\r\n      this.colorStops.push([offset, color]);\r\n    };\r\n\r\n    canvasGradient.getColor = function() {\r\n      if (this.colorStops.length === 0) {\r\n        return \"#000000\";\r\n      }\r\n\r\n      return this.colorStops[0][1];\r\n    };\r\n\r\n    canvasGradient.isCanvasGradient = true;\r\n    return canvasGradient;\r\n  };\r\n  Context2D.prototype.createPattern = function createPattern() {\r\n    return this.createLinearGradient();\r\n  };\r\n  Context2D.prototype.createRadialGradient = function createRadialGradient() {\r\n    return this.createLinearGradient();\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param x Edge point X\r\n   * @param y Edge point Y\r\n   * @param r Radius\r\n   * @param a1 start angle\r\n   * @param a2 end angle\r\n   * @param counterclockwise\r\n   * @param style\r\n   * @param isClip\r\n   */\r\n  var drawArc = function(\r\n    x,\r\n    y,\r\n    r,\r\n    a1,\r\n    a2,\r\n    counterclockwise,\r\n    style,\r\n    isClip,\r\n    includeMove\r\n  ) {\r\n    // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html\r\n    var curves = createArc.call(this, r, a1, a2, counterclockwise);\r\n\r\n    for (var i = 0; i < curves.length; i++) {\r\n      var curve = curves[i];\r\n      if (i === 0) {\r\n        if (includeMove) {\r\n          doMove.call(this, curve.x1 + x, curve.y1 + y);\r\n        } else {\r\n          drawLine.call(this, curve.x1 + x, curve.y1 + y);\r\n        }\r\n      }\r\n      drawCurve.call(\r\n        this,\r\n        x,\r\n        y,\r\n        curve.x2,\r\n        curve.y2,\r\n        curve.x3,\r\n        curve.y3,\r\n        curve.x4,\r\n        curve.y4\r\n      );\r\n    }\r\n\r\n    if (!isClip) {\r\n      putStyle.call(this, style);\r\n    } else {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    switch (style) {\r\n      case \"stroke\":\r\n        this.pdf.internal.out(\"S\");\r\n        break;\r\n      case \"fill\":\r\n        this.pdf.internal.out(\"f\");\r\n        break;\r\n    }\r\n  };\r\n\r\n  var doClip = function() {\r\n    this.pdf.clip();\r\n    this.pdf.discardPath();\r\n  };\r\n\r\n  var doMove = function(x, y) {\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y) +\r\n        \" m\"\r\n    );\r\n  };\r\n\r\n  var putText = function(options) {\r\n    var textAlign;\r\n    switch (options.align) {\r\n      case \"right\":\r\n      case \"end\":\r\n        textAlign = \"right\";\r\n        break;\r\n      case \"center\":\r\n        textAlign = \"center\";\r\n        break;\r\n      case \"left\":\r\n      case \"start\":\r\n      default:\r\n        textAlign = \"left\";\r\n        break;\r\n    }\r\n\r\n    var textDimensions = this.pdf.getTextDimensions(options.text);\r\n    var yBaseLine = getBaseline.call(this, options.y);\r\n    var yBottom = getTextBottom.call(this, yBaseLine);\r\n    var yTop = yBottom - textDimensions.h;\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n\r\n    var baselineRect = this.ctx.transform.applyToRectangle(\r\n      new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h)\r\n    );\r\n    var textBounds = matrix.applyToRectangle(\r\n      new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h)\r\n    );\r\n    var pageArray = getPagesByPath.call(this, textBounds);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath, oldSize, oldLineWidth;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusBottomMargin =\r\n          this.pdf.internal.pageSize.height - this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          pageHeightMinusBottomMargin - this.margin[0];\r\n        var pageWidthMinusRightMargin =\r\n          this.pdf.internal.pageSize.width - this.margin[1];\r\n        var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -1 * previousPageHeightSum + topMargin\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var textBoundsOnPage = pathPositionRedo(\r\n          [JSON.parse(JSON.stringify(textBounds))],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        if (options.scale >= 0.01) {\r\n          oldSize = this.pdf.internal.getFontSize();\r\n          this.pdf.setFontSize(oldSize * options.scale);\r\n          oldLineWidth = this.lineWidth;\r\n          this.lineWidth = oldLineWidth * options.scale;\r\n        }\r\n\r\n        var doSlice = this.autoPaging !== \"text\";\r\n\r\n        if (\r\n          doSlice ||\r\n          textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin\r\n        ) {\r\n          if (\r\n            doSlice ||\r\n            (textBoundsOnPage.y >= topMargin &&\r\n              textBoundsOnPage.x <= pageWidthMinusRightMargin)\r\n          ) {\r\n            var croppedText = doSlice\r\n              ? options.text\r\n              : this.pdf.splitTextToSize(\r\n                  options.text,\r\n                  options.maxWidth ||\r\n                    pageWidthMinusRightMargin - textBoundsOnPage.x\r\n                )[0];\r\n            var baseLineRectOnPage = pathPositionRedo(\r\n              [JSON.parse(JSON.stringify(baselineRect))],\r\n              this.posX + this.margin[3],\r\n              -previousPageHeightSum +\r\n                topMargin +\r\n                this.ctx.prevPageLastElemOffset\r\n            )[0];\r\n\r\n            const needsClipping =\r\n              doSlice && (i > min || i < max) && hasMargins.call(this);\r\n\r\n            if (needsClipping) {\r\n              this.pdf.saveGraphicsState();\r\n              this.pdf\r\n                .rect(\r\n                  this.margin[3],\r\n                  this.margin[0],\r\n                  pageWidthMinusMargins,\r\n                  pageHeightMinusMargins,\r\n                  null\r\n                )\r\n                .clip()\r\n                .discardPath();\r\n            }\r\n\r\n            this.pdf.text(\r\n              croppedText,\r\n              baseLineRectOnPage.x,\r\n              baseLineRectOnPage.y,\r\n              {\r\n                angle: options.angle,\r\n                align: textAlign,\r\n                renderingMode: options.renderingMode\r\n              }\r\n            );\r\n\r\n            if (needsClipping) {\r\n              this.pdf.restoreGraphicsState();\r\n            }\r\n          }\r\n        } else {\r\n          // This text is the last element of the page, but it got cut off due to the margin\r\n          // so we render it in the next page\r\n\r\n          if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {\r\n            // As a result, all other elements have their y offset increased\r\n            this.ctx.prevPageLastElemOffset +=\r\n              pageHeightMinusBottomMargin - textBoundsOnPage.y;\r\n          }\r\n        }\r\n\r\n        if (options.scale >= 0.01) {\r\n          this.pdf.setFontSize(oldSize);\r\n          this.lineWidth = oldLineWidth;\r\n        }\r\n      }\r\n    } else {\r\n      if (options.scale >= 0.01) {\r\n        oldSize = this.pdf.internal.getFontSize();\r\n        this.pdf.setFontSize(oldSize * options.scale);\r\n        oldLineWidth = this.lineWidth;\r\n        this.lineWidth = oldLineWidth * options.scale;\r\n      }\r\n      this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {\r\n        angle: options.angle,\r\n        align: textAlign,\r\n        renderingMode: options.renderingMode,\r\n        maxWidth: options.maxWidth\r\n      });\r\n\r\n      if (options.scale >= 0.01) {\r\n        this.pdf.setFontSize(oldSize);\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    }\r\n  };\r\n\r\n  var drawLine = function(x, y, prevX, prevY) {\r\n    prevX = prevX || 0;\r\n    prevY = prevY || 0;\r\n\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x + prevX) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y + prevY) +\r\n        \" l\"\r\n    );\r\n  };\r\n\r\n  var drawLines = function(lines, x, y) {\r\n    return this.pdf.lines(lines, x, y, null, null);\r\n  };\r\n\r\n  var drawCurve = function(x, y, x1, y1, x2, y2, x3, y3) {\r\n    this.pdf.internal.out(\r\n      [\r\n        f2(getHorizontalCoordinate(x1 + x)),\r\n        f2(getVerticalCoordinate(y1 + y)),\r\n        f2(getHorizontalCoordinate(x2 + x)),\r\n        f2(getVerticalCoordinate(y2 + y)),\r\n        f2(getHorizontalCoordinate(x3 + x)),\r\n        f2(getVerticalCoordinate(y3 + y)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.\r\n   *\r\n   * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   * @function createArc\r\n   */\r\n  var createArc = function(radius, startAngle, endAngle, anticlockwise) {\r\n    var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below\r\n    var twoPi = Math.PI * 2;\r\n    var halfPi = Math.PI / 2.0;\r\n\r\n    while (startAngle > endAngle) {\r\n      startAngle = startAngle - twoPi;\r\n    }\r\n    var totalAngle = Math.abs(endAngle - startAngle);\r\n    if (totalAngle < twoPi) {\r\n      if (anticlockwise) {\r\n        totalAngle = twoPi - totalAngle;\r\n      }\r\n    }\r\n\r\n    // Compute the sequence of arc curves, up to PI/2 at a time.\r\n    var curves = [];\r\n\r\n    // clockwise or counterclockwise\r\n    var sgn = anticlockwise ? -1 : +1;\r\n\r\n    var a1 = startAngle;\r\n    for (; totalAngle > EPSILON; ) {\r\n      var remain = sgn * Math.min(totalAngle, halfPi);\r\n      var a2 = a1 + remain;\r\n      curves.push(createSmallArc.call(this, radius, a1, a2));\r\n      totalAngle -= Math.abs(a2 - a1);\r\n      a1 = a2;\r\n    }\r\n\r\n    return curves;\r\n  };\r\n\r\n  /**\r\n   * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.\r\n   *\r\n   * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   *\r\n   * This algorithm is based on the approach described in: A. Riškus, \"Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa,\" Information Technology and Control, 35(4), 2006 pp. 371-378.\r\n   */\r\n  var createSmallArc = function(r, a1, a2) {\r\n    var a = (a2 - a1) / 2.0;\r\n\r\n    var x4 = r * Math.cos(a);\r\n    var y4 = r * Math.sin(a);\r\n    var x1 = x4;\r\n    var y1 = -y4;\r\n\r\n    var q1 = x1 * x1 + y1 * y1;\r\n    var q2 = q1 + x1 * x4 + y1 * y4;\r\n    var k2 = ((4 / 3) * (Math.sqrt(2 * q1 * q2) - q2)) / (x1 * y4 - y1 * x4);\r\n\r\n    var x2 = x1 - k2 * y1;\r\n    var y2 = y1 + k2 * x1;\r\n    var x3 = x2;\r\n    var y3 = -y2;\r\n\r\n    var ar = a + a1;\r\n    var cos_ar = Math.cos(ar);\r\n    var sin_ar = Math.sin(ar);\r\n\r\n    return {\r\n      x1: r * Math.cos(a1),\r\n      y1: r * Math.sin(a1),\r\n      x2: x2 * cos_ar - y2 * sin_ar,\r\n      y2: x2 * sin_ar + y2 * cos_ar,\r\n      x3: x3 * cos_ar - y3 * sin_ar,\r\n      y3: x3 * sin_ar + y3 * cos_ar,\r\n      x4: r * Math.cos(a2),\r\n      y4: r * Math.sin(a2)\r\n    };\r\n  };\r\n\r\n  var rad2deg = function(value) {\r\n    return (value * 180) / Math.PI;\r\n  };\r\n\r\n  var getQuadraticCurveBoundary = function(sx, sy, cpx, cpy, ex, ey) {\r\n    var midX1 = sx + (cpx - sx) * 0.5;\r\n    var midY1 = sy + (cpy - sy) * 0.5;\r\n    var midX2 = ex + (cpx - ex) * 0.5;\r\n    var midY2 = ey + (cpy - ey) * 0.5;\r\n    var resultX1 = Math.min(sx, ex, midX1, midX2);\r\n    var resultX2 = Math.max(sx, ex, midX1, midX2);\r\n    var resultY1 = Math.min(sy, ey, midY1, midY2);\r\n    var resultY2 = Math.max(sy, ey, midY1, midY2);\r\n    return new Rectangle(\r\n      resultX1,\r\n      resultY1,\r\n      resultX2 - resultX1,\r\n      resultY2 - resultY1\r\n    );\r\n  };\r\n\r\n  //De Casteljau algorithm\r\n  var getBezierCurveBoundary = function(ax, ay, bx, by, cx, cy, dx, dy) {\r\n    var tobx = bx - ax;\r\n    var toby = by - ay;\r\n    var tocx = cx - bx;\r\n    var tocy = cy - by;\r\n    var todx = dx - cx;\r\n    var tody = dy - cy;\r\n    var precision = 40;\r\n    var d,\r\n      i,\r\n      px,\r\n      py,\r\n      qx,\r\n      qy,\r\n      rx,\r\n      ry,\r\n      tx,\r\n      ty,\r\n      sx,\r\n      sy,\r\n      x,\r\n      y,\r\n      minx,\r\n      miny,\r\n      maxx,\r\n      maxy,\r\n      toqx,\r\n      toqy,\r\n      torx,\r\n      tory,\r\n      totx,\r\n      toty;\r\n    for (i = 0; i < precision + 1; i++) {\r\n      d = i / precision;\r\n      px = ax + d * tobx;\r\n      py = ay + d * toby;\r\n      qx = bx + d * tocx;\r\n      qy = by + d * tocy;\r\n      rx = cx + d * todx;\r\n      ry = cy + d * tody;\r\n      toqx = qx - px;\r\n      toqy = qy - py;\r\n      torx = rx - qx;\r\n      tory = ry - qy;\r\n\r\n      sx = px + d * toqx;\r\n      sy = py + d * toqy;\r\n      tx = qx + d * torx;\r\n      ty = qy + d * tory;\r\n      totx = tx - sx;\r\n      toty = ty - sy;\r\n\r\n      x = sx + d * totx;\r\n      y = sy + d * toty;\r\n      if (i == 0) {\r\n        minx = x;\r\n        miny = y;\r\n        maxx = x;\r\n        maxy = y;\r\n      } else {\r\n        minx = Math.min(minx, x);\r\n        miny = Math.min(miny, y);\r\n        maxx = Math.max(maxx, x);\r\n        maxy = Math.max(maxy, y);\r\n      }\r\n    }\r\n    return new Rectangle(\r\n      Math.round(minx),\r\n      Math.round(miny),\r\n      Math.round(maxx - minx),\r\n      Math.round(maxy - miny)\r\n    );\r\n  };\r\n\r\n  var getPrevLineDashValue = function(lineDash, lineDashOffset) {\r\n    return JSON.stringify({\r\n      lineDash: lineDash,\r\n      lineDashOffset: lineDashOffset\r\n    });\r\n  };\r\n\r\n  var setLineDash = function() {\r\n    // Avoid unnecessary line dash declarations.\r\n    if (\r\n      !this.prevLineDash &&\r\n      !this.ctx.lineDash.length &&\r\n      !this.ctx.lineDashOffset\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    // Avoid unnecessary line dash declarations.\r\n    const nextLineDash = getPrevLineDashValue(\r\n      this.ctx.lineDash,\r\n      this.ctx.lineDashOffset\r\n    );\r\n    if (this.prevLineDash !== nextLineDash) {\r\n      this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);\r\n      this.prevLineDash = nextLineDash;\r\n    }\r\n  };\r\n})(jsPDF.API);\r\n","/**\n * @license\n * jsPDF filters PlugIn\n * Copyright (c) 2014 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var ASCII85Encode = function(a) {\n    var b, c, d, e, f, g, h, i, j, k;\n    // eslint-disable-next-line no-control-regex\n    for (\n      !/[^\\x00-\\xFF]/.test(a),\n        b = \"\\x00\\x00\\x00\\x00\".slice(a.length % 4 || 4),\n        a += b,\n        c = [],\n        d = 0,\n        e = a.length;\n      e > d;\n      d += 4\n    )\n      (f =\n        (a.charCodeAt(d) << 24) +\n        (a.charCodeAt(d + 1) << 16) +\n        (a.charCodeAt(d + 2) << 8) +\n        a.charCodeAt(d + 3)),\n        0 !== f\n          ? ((k = f % 85),\n            (f = (f - k) / 85),\n            (j = f % 85),\n            (f = (f - j) / 85),\n            (i = f % 85),\n            (f = (f - i) / 85),\n            (h = f % 85),\n            (f = (f - h) / 85),\n            (g = f % 85),\n            c.push(g + 33, h + 33, i + 33, j + 33, k + 33))\n          : c.push(122);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(c, b.length),\n      String.fromCharCode.apply(String, c) + \"~>\"\n    );\n  };\n\n  var ASCII85Decode = function(a) {\n    var c,\n      d,\n      e,\n      f,\n      g,\n      h = String,\n      l = \"length\",\n      w = 255,\n      x = \"charCodeAt\",\n      y = \"slice\",\n      z = \"replace\";\n    for (\n      \"~>\" === a[y](-2),\n        a = a[y](0, -2)\n          [z](/\\s/g, \"\")\n          [z](\"z\", \"!!!!!\"),\n        c = \"uuuuu\"[y](a[l] % 5 || 5),\n        a += c,\n        e = [],\n        f = 0,\n        g = a[l];\n      g > f;\n      f += 5\n    )\n      (d =\n        52200625 * (a[x](f) - 33) +\n        614125 * (a[x](f + 1) - 33) +\n        7225 * (a[x](f + 2) - 33) +\n        85 * (a[x](f + 3) - 33) +\n        (a[x](f + 4) - 33)),\n        e.push(w & (d >> 24), w & (d >> 16), w & (d >> 8), w & d);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(e, c[l]),\n      h.fromCharCode.apply(h, e)\n    );\n  };\n\n  var ASCIIHexEncode = function(value) {\n    return (\n      value\n        .split(\"\")\n        .map(function(value) {\n          return (\"0\" + value.charCodeAt().toString(16)).slice(-2);\n        })\n        .join(\"\") + \">\"\n    );\n  };\n\n  var ASCIIHexDecode = function(value) {\n    var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);\n    value = value.replace(/\\s/g, \"\");\n    if (value.indexOf(\">\") !== -1) {\n      value = value.substr(0, value.indexOf(\">\"));\n    }\n    if (value.length % 2) {\n      value += \"0\";\n    }\n    if (regexCheckIfHex.test(value) === false) {\n      return \"\";\n    }\n    var result = \"\";\n    for (var i = 0; i < value.length; i += 2) {\n      result += String.fromCharCode(\"0x\" + (value[i] + value[i + 1]));\n    }\n    return result;\n  };\n  /*\n  var FlatePredictors = {\n      None: 1,\n      TIFF: 2,\n      PNG_None: 10,\n      PNG_Sub: 11,\n      PNG_Up: 12,\n      PNG_Average: 13,\n      PNG_Paeth: 14,\n      PNG_Optimum: 15\n  };\n  */\n\n  var FlateEncode = function(data) {\n    var arr = new Uint8Array(data.length);\n    var i = data.length;\n    while (i--) {\n      arr[i] = data.charCodeAt(i);\n    }\n    arr = zlibSync(arr);\n    data = arr.reduce(function(data, byte) {\n      return data + String.fromCharCode(byte);\n    }, \"\");\n    return data;\n  };\n\n  jsPDFAPI.processDataByFilters = function(origData, filterChain) {\n    \"use strict\";\n    var i = 0;\n    var data = origData || \"\";\n    var reverseChain = [];\n    filterChain = filterChain || [];\n\n    if (typeof filterChain === \"string\") {\n      filterChain = [filterChain];\n    }\n\n    for (i = 0; i < filterChain.length; i += 1) {\n      switch (filterChain[i]) {\n        case \"ASCII85Decode\":\n        case \"/ASCII85Decode\":\n          data = ASCII85Decode(data);\n          reverseChain.push(\"/ASCII85Encode\");\n          break;\n        case \"ASCII85Encode\":\n        case \"/ASCII85Encode\":\n          data = ASCII85Encode(data);\n          reverseChain.push(\"/ASCII85Decode\");\n          break;\n        case \"ASCIIHexDecode\":\n        case \"/ASCIIHexDecode\":\n          data = ASCIIHexDecode(data);\n          reverseChain.push(\"/ASCIIHexEncode\");\n          break;\n        case \"ASCIIHexEncode\":\n        case \"/ASCIIHexEncode\":\n          data = ASCIIHexEncode(data);\n          reverseChain.push(\"/ASCIIHexDecode\");\n          break;\n        case \"FlateEncode\":\n        case \"/FlateEncode\":\n          data = FlateEncode(data);\n          reverseChain.push(\"/FlateDecode\");\n          break;\n        default:\n          throw new Error(\n            'The filter: \"' + filterChain[i] + '\" is not implemented'\n          );\n      }\n    }\n\n    return { data: data, reverseChain: reverseChain.reverse().join(\" \") };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF fileloading PlugIn\n * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name fileloading\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name loadFile\n   * @function\n   * @param {string} url\n   * @param {boolean} sync\n   * @param {function} callback\n   * @returns {string|undefined} result\n   */\n  jsPDFAPI.loadFile = function(url, sync, callback) {\n    return browserRequest(url, sync, callback);\n\n  };\n\n  /**\n   * @name loadImageFile\n   * @function\n   * @param {string} path\n   * @param {boolean} sync\n   * @param {function} callback\n   */\n  jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;\n\n  function browserRequest(url, sync, callback) {\n    sync = sync === false ? false : true;\n    callback = typeof callback === \"function\" ? callback : function() {};\n    var result = undefined;\n\n    var xhr = function(url, sync, callback) {\n      var request = new XMLHttpRequest();\n      var i = 0;\n\n      var sanitizeUnicode = function(data) {\n        var dataLength = data.length;\n        var charArray = [];\n        var StringFromCharCode = String.fromCharCode;\n\n        //Transform Unicode to ASCII\n        for (i = 0; i < dataLength; i += 1) {\n          charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff));\n        }\n        return charArray.join(\"\");\n      };\n\n      request.open(\"GET\", url, !sync);\n      // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]\n      request.overrideMimeType(\"text/plain; charset=x-user-defined\");\n\n      if (sync === false) {\n        request.onload = function() {\n          if (request.status === 200) {\n            callback(sanitizeUnicode(this.responseText));\n          } else {\n            callback(undefined);\n          }\n        };\n      }\n      request.send(null);\n\n      if (sync && request.status === 200) {\n        return sanitizeUnicode(request.responseText);\n      }\n    };\n    try {\n      result = xhr(url, sync, callback);\n      // eslint-disable-next-line no-empty\n    } catch (e) {}\n    return result;\n  }\n\n  function nodeReadFile(url, sync, callback) {\n    sync = sync === false ? false : true;\n    var result = undefined;\n\n    var fs = require(\"fs\");\n    var path = require(\"path\");\n\n    url = path.resolve(url);\n    if (sync) {\n      try {\n        result = fs.readFileSync(url, { encoding: \"latin1\" });\n      } catch (e) {\n        return undefined;\n      }\n    } else {\n      fs.readFile(url, { encoding: \"latin1\" }, function(err, data) {\n        if (!callback) {\n          return;\n        }\n        if (err) {\n          callback(undefined);\n        }\n        callback(data);\n      });\n    }\n\n    return result;\n  }\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2018 Erik Koopmans\n * Released under the MIT License.\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { normalizeFontFace } from \"../libs/fontFace.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF html PlugIn\n *\n * @name html\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadHtml2Canvas() {\n    return (function() {\n      if (globalObject[\"html2canvas\"]) {\n        return Promise.resolve(globalObject[\"html2canvas\"]);\n      }\n\n      return import(\"html2canvas\");\n\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load html2canvas: \" + e));\n      })\n      .then(function(html2canvas) {\n        return html2canvas.default ? html2canvas.default : html2canvas;\n      });\n  }\n\n  function loadDomPurify() {\n    return (function() {\n      if (globalObject[\"DOMPurify\"]) {\n        return Promise.resolve(globalObject[\"DOMPurify\"]);\n      }\n\n      return import(\"dompurify\");\n\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load dompurify: \" + e));\n      })\n      .then(function(dompurify) {\n        return dompurify.default ? dompurify.default : dompurify;\n      });\n  }\n\n  /**\n   * Determine the type of a variable/object.\n   *\n   * @private\n   * @ignore\n   */\n  var objType = function(obj) {\n    var type = typeof obj;\n    if (type === \"undefined\") return \"undefined\";\n    else if (type === \"string\" || obj instanceof String) return \"string\";\n    else if (type === \"number\" || obj instanceof Number) return \"number\";\n    else if (type === \"function\" || obj instanceof Function) return \"function\";\n    else if (!!obj && obj.constructor === Array) return \"array\";\n    else if (obj && obj.nodeType === 1) return \"element\";\n    else if (type === \"object\") return \"object\";\n    else return \"unknown\";\n  };\n\n  /**\n   * Create an HTML element with optional className, innerHTML, and style.\n   *\n   * @private\n   * @ignore\n   */\n  var createElement = function(tagName, opt) {\n    var el = document.createElement(tagName);\n    if (opt.className) el.className = opt.className;\n    if (opt.innerHTML && opt.dompurify) {\n      el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);\n    }\n    for (var key in opt.style) {\n      el.style[key] = opt.style[key];\n    }\n    return el;\n  };\n\n  /**\n   * Deep-clone a node and preserve contents/properties.\n   *\n   * @private\n   * @ignore\n   */\n  var cloneNode = function(node, javascriptEnabled) {\n    // Recursively clone the node.\n    var clone =\n      node.nodeType === 3\n        ? document.createTextNode(node.nodeValue)\n        : node.cloneNode(false);\n    for (var child = node.firstChild; child; child = child.nextSibling) {\n      if (\n        javascriptEnabled === true ||\n        child.nodeType !== 1 ||\n        child.nodeName !== \"SCRIPT\"\n      ) {\n        clone.appendChild(cloneNode(child, javascriptEnabled));\n      }\n    }\n\n    if (node.nodeType === 1) {\n      // Preserve contents/properties of special nodes.\n      if (node.nodeName === \"CANVAS\") {\n        clone.width = node.width;\n        clone.height = node.height;\n        clone.getContext(\"2d\").drawImage(node, 0, 0);\n      } else if (node.nodeName === \"TEXTAREA\" || node.nodeName === \"SELECT\") {\n        clone.value = node.value;\n      }\n\n      // Preserve the node's scroll position when it loads.\n      clone.addEventListener(\n        \"load\",\n        function() {\n          clone.scrollTop = node.scrollTop;\n          clone.scrollLeft = node.scrollLeft;\n        },\n        true\n      );\n    }\n\n    // Return the cloned node.\n    return clone;\n  };\n\n  /* ----- CONSTRUCTOR ----- */\n\n  var Worker = function Worker(opt) {\n    // Create the root parent for the proto chain, and the starting Worker.\n    var root = Object.assign(\n      Worker.convert(Promise.resolve()),\n      JSON.parse(JSON.stringify(Worker.template))\n    );\n    var self = Worker.convert(Promise.resolve(), root);\n\n    // Set progress, optional settings, and return.\n    self = self.setProgress(1, Worker, 1, [Worker]);\n    self = self.set(opt);\n    return self;\n  };\n\n  // Boilerplate for subclassing Promise.\n  Worker.prototype = Object.create(Promise.prototype);\n  Worker.prototype.constructor = Worker;\n\n  // Converts/casts promises into Workers.\n  Worker.convert = function convert(promise, inherit) {\n    // Uses prototypal inheritance to receive changes made to ancestors' properties.\n    promise.__proto__ = inherit || Worker.prototype;\n    return promise;\n  };\n\n  Worker.template = {\n    prop: {\n      src: null,\n      container: null,\n      overlay: null,\n      canvas: null,\n      img: null,\n      pdf: null,\n      pageSize: null,\n      callback: function() {}\n    },\n    progress: {\n      val: 0,\n      state: null,\n      n: 0,\n      stack: []\n    },\n    opt: {\n      filename: \"file.pdf\",\n      margin: [0, 0, 0, 0],\n      enableLinks: true,\n      x: 0,\n      y: 0,\n      html2canvas: {},\n      jsPDF: {},\n      backgroundColor: \"transparent\"\n    }\n  };\n\n  /* ----- FROM / TO ----- */\n\n  Worker.prototype.from = function from(src, type) {\n    function getType(src) {\n      switch (objType(src)) {\n        case \"string\":\n          return \"string\";\n        case \"element\":\n          return src.nodeName.toLowerCase() === \"canvas\" ? \"canvas\" : \"element\";\n        default:\n          return \"unknown\";\n      }\n    }\n\n    return this.then(function from_main() {\n      type = type || getType(src);\n      switch (type) {\n        case \"string\":\n          return this.then(loadDomPurify).then(function(dompurify) {\n            return this.set({\n              src: createElement(\"div\", {\n                innerHTML: src,\n                dompurify: dompurify\n              })\n            });\n          });\n        case \"element\":\n          return this.set({ src: src });\n        case \"canvas\":\n          return this.set({ canvas: src });\n        case \"img\":\n          return this.set({ img: src });\n        default:\n          return this.error(\"Unknown source type.\");\n      }\n    });\n  };\n\n  Worker.prototype.to = function to(target) {\n    // Route the 'to' request to the appropriate method.\n    switch (target) {\n      case \"container\":\n        return this.toContainer();\n      case \"canvas\":\n        return this.toCanvas();\n      case \"img\":\n        return this.toImg();\n      case \"pdf\":\n        return this.toPdf();\n      default:\n        return this.error(\"Invalid target.\");\n    }\n  };\n\n  Worker.prototype.toContainer = function toContainer() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkSrc() {\n        return (\n          this.prop.src || this.error(\"Cannot duplicate - no source HTML.\")\n        );\n      },\n      function checkPageSize() {\n        return this.prop.pageSize || this.setPageSize();\n      }\n    ];\n    return this.thenList(prereqs).then(function toContainer_main() {\n      // Define the CSS styles for the container and its overlay parent.\n      var overlayCSS = {\n        position: \"fixed\",\n        overflow: \"hidden\",\n        zIndex: 1000,\n        left: \"-100000px\",\n        right: 0,\n        bottom: 0,\n        top: 0\n      };\n      var containerCSS = {\n        position: \"relative\",\n        display: \"inline-block\",\n        width:\n          (typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.windowWidth\n            : Math.max(\n                this.prop.src.clientWidth,\n                this.prop.src.scrollWidth,\n                this.prop.src.offsetWidth\n              )) + \"px\",\n        left: 0,\n        right: 0,\n        top: 0,\n        margin: \"auto\",\n        backgroundColor: this.opt.backgroundColor\n      }; // Set the overlay to hidden (could be changed in the future to provide a print preview).\n\n      var source = cloneNode(\n        this.prop.src,\n        this.opt.html2canvas.javascriptEnabled\n      );\n\n      if (source.tagName === \"BODY\") {\n        containerCSS.height =\n          Math.max(\n            document.body.scrollHeight,\n            document.body.offsetHeight,\n            document.documentElement.clientHeight,\n            document.documentElement.scrollHeight,\n            document.documentElement.offsetHeight\n          ) + \"px\";\n      }\n\n      this.prop.overlay = createElement(\"div\", {\n        className: \"html2pdf__overlay\",\n        style: overlayCSS\n      });\n      this.prop.container = createElement(\"div\", {\n        className: \"html2pdf__container\",\n        style: containerCSS\n      });\n      this.prop.container.appendChild(source);\n      this.prop.container.firstChild.appendChild(\n        createElement(\"div\", {\n          style: {\n            clear: \"both\",\n            border: \"0 none transparent\",\n            margin: 0,\n            padding: 0,\n            height: 0\n          }\n        })\n      );\n      this.prop.container.style.float = \"none\";\n      this.prop.overlay.appendChild(this.prop.container);\n      document.body.appendChild(this.prop.overlay);\n      this.prop.container.firstChild.style.position = \"relative\";\n      this.prop.container.height =\n        Math.max(\n          this.prop.container.firstChild.clientHeight,\n          this.prop.container.firstChild.scrollHeight,\n          this.prop.container.firstChild.offsetHeight\n        ) + \"px\";\n    });\n  };\n\n  Worker.prototype.toCanvas = function toCanvas() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toCanvas_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var options = Object.assign({}, this.opt.html2canvas);\n        delete options.onrendered;\n\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toCanvas_post(canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toContext2d = function toContext2d() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toContext2d_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n\n        var pdf = this.opt.jsPDF;\n        var fontFaces = this.opt.fontFaces;\n\n        var scale =\n          typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.width / this.opt.windowWidth\n            : 1;\n\n        var options = Object.assign(\n          {\n            async: true,\n            allowTaint: true,\n            scale: scale,\n            scrollX: this.opt.scrollX || 0,\n            scrollY: this.opt.scrollY || 0,\n            backgroundColor: \"#ffffff\",\n            imageTimeout: 15000,\n            logging: true,\n            proxy: null,\n            removeContainer: true,\n            foreignObjectRendering: false,\n            useCORS: false\n          },\n          this.opt.html2canvas\n        );\n        delete options.onrendered;\n\n        pdf.context2d.autoPaging =\n          typeof this.opt.autoPaging === \"undefined\"\n            ? true\n            : this.opt.autoPaging;\n        pdf.context2d.posX = this.opt.x;\n        pdf.context2d.posY = this.opt.y;\n        pdf.context2d.margin = this.opt.margin;\n        pdf.context2d.fontFaces = fontFaces;\n\n        if (fontFaces) {\n          for (var i = 0; i < fontFaces.length; ++i) {\n            var font = fontFaces[i];\n            var src = font.src.find(function(src) {\n              return src.format === \"truetype\";\n            });\n\n            if (src) {\n              pdf.addFont(src.url, font.ref.name, font.ref.style);\n            }\n          }\n        }\n\n        options.windowHeight = options.windowHeight || 0;\n        options.windowHeight =\n          options.windowHeight == 0\n            ? Math.max(\n                this.prop.container.clientHeight,\n                this.prop.container.scrollHeight,\n                this.prop.container.offsetHeight\n              )\n            : options.windowHeight;\n\n        pdf.context2d.save(true);\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toContext2d_post(canvas) {\n        this.opt.jsPDF.context2d.restore(true);\n\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toImg = function toImg() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkCanvas() {\n        return this.prop.canvas || this.toCanvas();\n      }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toImg_main() {\n      var imgData = this.prop.canvas.toDataURL(\n        \"image/\" + this.opt.image.type,\n        this.opt.image.quality\n      );\n      this.prop.img = document.createElement(\"img\");\n      this.prop.img.src = imgData;\n    });\n  };\n\n  Worker.prototype.toPdf = function toPdf() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContext2d() {\n        return this.toContext2d();\n      }\n      //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toPdf_main() {\n      // Create local copies of frequently used properties.\n      this.prop.pdf = this.prop.pdf || this.opt.jsPDF;\n    });\n  };\n\n  /* ----- OUTPUT / SAVE ----- */\n\n  Worker.prototype.output = function output(type, options, src) {\n    // Redirect requests to the correct function (outputPdf / outputImg).\n    src = src || \"pdf\";\n    if (src.toLowerCase() === \"img\" || src.toLowerCase() === \"image\") {\n      return this.outputImg(type, options);\n    } else {\n      return this.outputPdf(type, options);\n    }\n  };\n\n  Worker.prototype.outputPdf = function outputPdf(type, options) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputPdf_main() {\n      /* Currently implemented output types:\n       *    https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992\n       *  save(options), arraybuffer, blob, bloburi/bloburl,\n       *  datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl\n       */\n      return this.prop.pdf.output(type, options);\n    });\n  };\n\n  Worker.prototype.outputImg = function outputImg(type) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkImg() {\n        return this.prop.img || this.toImg();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputImg_main() {\n      switch (type) {\n        case undefined:\n        case \"img\":\n          return this.prop.img;\n        case \"datauristring\":\n        case \"dataurlstring\":\n          return this.prop.img.src;\n        case \"datauri\":\n        case \"dataurl\":\n          return (document.location.href = this.prop.img.src);\n        default:\n          throw 'Image output type \"' + type + '\" is not supported.';\n      }\n    });\n  };\n\n  Worker.prototype.save = function save(filename) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs)\n      .set(filename ? { filename: filename } : null)\n      .then(function save_main() {\n        this.prop.pdf.save(this.opt.filename);\n      });\n  };\n\n  Worker.prototype.doCallback = function doCallback() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs).then(function doCallback_main() {\n      this.prop.callback(this.prop.pdf);\n    });\n  };\n\n  /* ----- SET / GET ----- */\n\n  Worker.prototype.set = function set(opt) {\n    // TODO: Implement ordered pairs?\n\n    // Silently ignore invalid or empty input.\n    if (objType(opt) !== \"object\") {\n      return this;\n    }\n\n    // Build an array of setter functions to queue.\n    var fns = Object.keys(opt || {}).map(function(key) {\n      if (key in Worker.template.prop) {\n        // Set pre-defined properties.\n        return function set_prop() {\n          this.prop[key] = opt[key];\n        };\n      } else {\n        switch (key) {\n          case \"margin\":\n            return this.setMargin.bind(this, opt.margin);\n          case \"jsPDF\":\n            return function set_jsPDF() {\n              this.opt.jsPDF = opt.jsPDF;\n              return this.setPageSize();\n            };\n          case \"pageSize\":\n            return this.setPageSize.bind(this, opt.pageSize);\n          default:\n            // Set any other properties in opt.\n            return function set_opt() {\n              this.opt[key] = opt[key];\n            };\n        }\n      }\n    }, this);\n\n    // Set properties within the promise chain.\n    return this.then(function set_main() {\n      return this.thenList(fns);\n    });\n  };\n\n  Worker.prototype.get = function get(key, cbk) {\n    return this.then(function get_main() {\n      // Fetch the requested property, either as a predefined prop or in opt.\n      var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];\n      return cbk ? cbk(val) : val;\n    });\n  };\n\n  Worker.prototype.setMargin = function setMargin(margin) {\n    return this.then(function setMargin_main() {\n      // Parse the margin property.\n      switch (objType(margin)) {\n        case \"number\":\n          margin = [margin, margin, margin, margin];\n        // eslint-disable-next-line no-fallthrough\n        case \"array\":\n          if (margin.length === 2) {\n            margin = [margin[0], margin[1], margin[0], margin[1]];\n          }\n          if (margin.length === 4) {\n            break;\n          }\n        // eslint-disable-next-line no-fallthrough\n        default:\n          return this.error(\"Invalid margin array.\");\n      }\n\n      // Set the margin property, then update pageSize.\n      this.opt.margin = margin;\n    }).then(this.setPageSize);\n  };\n\n  Worker.prototype.setPageSize = function setPageSize(pageSize) {\n    function toPx(val, k) {\n      return Math.floor(((val * k) / 72) * 96);\n    }\n\n    return this.then(function setPageSize_main() {\n      // Retrieve page-size based on jsPDF settings, if not explicitly provided.\n      pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF);\n\n      // Add 'inner' field if not present.\n      if (!pageSize.hasOwnProperty(\"inner\")) {\n        pageSize.inner = {\n          width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],\n          height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]\n        };\n        pageSize.inner.px = {\n          width: toPx(pageSize.inner.width, pageSize.k),\n          height: toPx(pageSize.inner.height, pageSize.k)\n        };\n        pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;\n      }\n\n      // Attach pageSize to this.\n      this.prop.pageSize = pageSize;\n    });\n  };\n\n  Worker.prototype.setProgress = function setProgress(val, state, n, stack) {\n    // Immediately update all progress values.\n    if (val != null) this.progress.val = val;\n    if (state != null) this.progress.state = state;\n    if (n != null) this.progress.n = n;\n    if (stack != null) this.progress.stack = stack;\n    this.progress.ratio = this.progress.val / this.progress.state;\n\n    // Return this for command chaining.\n    return this;\n  };\n\n  Worker.prototype.updateProgress = function updateProgress(\n    val,\n    state,\n    n,\n    stack\n  ) {\n    // Immediately update all progress values, using setProgress.\n    return this.setProgress(\n      val ? this.progress.val + val : null,\n      state ? state : null,\n      n ? this.progress.n + n : null,\n      stack ? this.progress.stack.concat(stack) : null\n    );\n  };\n\n  /* ----- PROMISE MAPPING ----- */\n\n  Worker.prototype.then = function then(onFulfilled, onRejected) {\n    // Wrap `this` for encapsulation.\n    var self = this;\n\n    return this.thenCore(onFulfilled, onRejected, function then_main(\n      onFulfilled,\n      onRejected\n    ) {\n      // Update progress while queuing, calling, and resolving `then`.\n      self.updateProgress(null, null, 1, [onFulfilled]);\n      return Promise.prototype.then\n        .call(this, function then_pre(val) {\n          self.updateProgress(null, onFulfilled);\n          return val;\n        })\n        .then(onFulfilled, onRejected)\n        .then(function then_post(val) {\n          self.updateProgress(1);\n          return val;\n        });\n    });\n  };\n\n  Worker.prototype.thenCore = function thenCore(\n    onFulfilled,\n    onRejected,\n    thenBase\n  ) {\n    // Handle optional thenBase parameter.\n    thenBase = thenBase || Promise.prototype.then;\n\n    // Wrap `this` for encapsulation and bind it to the promise handlers.\n    var self = this;\n    if (onFulfilled) {\n      onFulfilled = onFulfilled.bind(self);\n    }\n    if (onRejected) {\n      onRejected = onRejected.bind(self);\n    }\n\n    // Cast self into a Promise to avoid polyfills recursively defining `then`.\n    var isNative =\n      Promise.toString().indexOf(\"[native code]\") !== -1 &&\n      Promise.name === \"Promise\";\n    var selfPromise = isNative\n      ? self\n      : Worker.convert(Object.assign({}, self), Promise.prototype);\n\n    // Return the promise, after casting it into a Worker and preserving props.\n    var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);\n    return Worker.convert(returnVal, self.__proto__);\n  };\n\n  Worker.prototype.thenExternal = function thenExternal(\n    onFulfilled,\n    onRejected\n  ) {\n    // Call `then` and return a standard promise (exits the Worker chain).\n    return Promise.prototype.then.call(this, onFulfilled, onRejected);\n  };\n\n  Worker.prototype.thenList = function thenList(fns) {\n    // Queue a series of promise 'factories' into the promise chain.\n    var self = this;\n    fns.forEach(function thenList_forEach(fn) {\n      self = self.thenCore(fn);\n    });\n    return self;\n  };\n\n  Worker.prototype[\"catch\"] = function(onRejected) {\n    // Bind `this` to the promise handler, call `catch`, and return a Worker.\n    if (onRejected) {\n      onRejected = onRejected.bind(this);\n    }\n    var returnVal = Promise.prototype[\"catch\"].call(this, onRejected);\n    return Worker.convert(returnVal, this);\n  };\n\n  Worker.prototype.catchExternal = function catchExternal(onRejected) {\n    // Call `catch` and return a standard promise (exits the Worker chain).\n    return Promise.prototype[\"catch\"].call(this, onRejected);\n  };\n\n  Worker.prototype.error = function error(msg) {\n    // Throw the error in the Promise chain.\n    return this.then(function error_main() {\n      throw new Error(msg);\n    });\n  };\n\n  /* ----- ALIASES ----- */\n\n  Worker.prototype.using = Worker.prototype.set;\n  Worker.prototype.saveAs = Worker.prototype.save;\n  Worker.prototype.export = Worker.prototype.output;\n  Worker.prototype.run = Worker.prototype.then;\n\n  // Get dimensions of a PDF page, as determined by jsPDF.\n  jsPDF.getPageSize = function(orientation, unit, format) {\n    // Decode options object\n    if (typeof orientation === \"object\") {\n      var options = orientation;\n      orientation = options.orientation;\n      unit = options.unit || unit;\n      format = options.format || format;\n    }\n\n    // Default options\n    unit = unit || \"mm\";\n    format = format || \"a4\";\n    orientation = (\"\" + (orientation || \"P\")).toLowerCase();\n    var format_as_string = (\"\" + format).toLowerCase();\n\n    // Size in pt of various paper formats\n    var pageFormats = {\n      a0: [2383.94, 3370.39],\n      a1: [1683.78, 2383.94],\n      a2: [1190.55, 1683.78],\n      a3: [841.89, 1190.55],\n      a4: [595.28, 841.89],\n      a5: [419.53, 595.28],\n      a6: [297.64, 419.53],\n      a7: [209.76, 297.64],\n      a8: [147.4, 209.76],\n      a9: [104.88, 147.4],\n      a10: [73.7, 104.88],\n      b0: [2834.65, 4008.19],\n      b1: [2004.09, 2834.65],\n      b2: [1417.32, 2004.09],\n      b3: [1000.63, 1417.32],\n      b4: [708.66, 1000.63],\n      b5: [498.9, 708.66],\n      b6: [354.33, 498.9],\n      b7: [249.45, 354.33],\n      b8: [175.75, 249.45],\n      b9: [124.72, 175.75],\n      b10: [87.87, 124.72],\n      c0: [2599.37, 3676.54],\n      c1: [1836.85, 2599.37],\n      c2: [1298.27, 1836.85],\n      c3: [918.43, 1298.27],\n      c4: [649.13, 918.43],\n      c5: [459.21, 649.13],\n      c6: [323.15, 459.21],\n      c7: [229.61, 323.15],\n      c8: [161.57, 229.61],\n      c9: [113.39, 161.57],\n      c10: [79.37, 113.39],\n      dl: [311.81, 623.62],\n      letter: [612, 792],\n      \"government-letter\": [576, 756],\n      legal: [612, 1008],\n      \"junior-legal\": [576, 360],\n      ledger: [1224, 792],\n      tabloid: [792, 1224],\n      \"credit-card\": [153, 243]\n    };\n\n    var k;\n    // Unit conversion\n    switch (unit) {\n      case \"pt\":\n        k = 1;\n        break;\n      case \"mm\":\n        k = 72 / 25.4;\n        break;\n      case \"cm\":\n        k = 72 / 2.54;\n        break;\n      case \"in\":\n        k = 72;\n        break;\n      case \"px\":\n        k = 72 / 96;\n        break;\n      case \"pc\":\n        k = 12;\n        break;\n      case \"em\":\n        k = 12;\n        break;\n      case \"ex\":\n        k = 6;\n        break;\n      default:\n        throw \"Invalid unit: \" + unit;\n    }\n    var pageHeight = 0;\n    var pageWidth = 0;\n\n    // Dimensions are stored as user units and converted to points on output\n    if (pageFormats.hasOwnProperty(format_as_string)) {\n      pageHeight = pageFormats[format_as_string][1] / k;\n      pageWidth = pageFormats[format_as_string][0] / k;\n    } else {\n      try {\n        pageHeight = format[1];\n        pageWidth = format[0];\n      } catch (err) {\n        throw new Error(\"Invalid format: \" + format);\n      }\n    }\n\n    var tmp;\n    // Handle page orientation\n    if (orientation === \"p\" || orientation === \"portrait\") {\n      orientation = \"p\";\n      if (pageWidth > pageHeight) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else if (orientation === \"l\" || orientation === \"landscape\") {\n      orientation = \"l\";\n      if (pageHeight > pageWidth) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else {\n      throw \"Invalid orientation: \" + orientation;\n    }\n\n    // Return information (k is the unit conversion ratio from pts)\n    var info = {\n      width: pageWidth,\n      height: pageHeight,\n      unit: unit,\n      k: k,\n      orientation: orientation\n    };\n    return info;\n  };\n\n  /**\n   * @typedef FontFace\n   *\n   * The font-face type implements an interface similar to that of the font-face CSS rule,\n   * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D\n   * is updated.\n   *\n   * All properties expect values similar to those in the font-face CSS rule. A difference\n   * is the font-family, which do not need to be enclosed in double-quotes when containing\n   * spaces like in CSS.\n   *\n   * @property {string} family The name of the font-family.\n   * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.\n   * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)\n   * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.\n   * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.\n   * @property {string} [src] url A URL to a font of a specific format.\n   * @property {string} [src] format Format of the font referenced by the URL.\n   */\n\n  /**\n   * Generate a PDF from an HTML element or string using.\n   *\n   * @name html\n   * @function\n   * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.\n   * @param {Object} [options] Collection of settings\n   * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance\n   * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.\n   * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.\n   * <ul>\n   * <li>\n   *   <code>false</code>: Auto paging is disabled.\n   * </li>\n   * <li>\n   *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\n   *   slice text in half, making it difficult to read.\n   * </li>\n   * <li>\n   *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\n   *   mostly of a single column of text.\n   * </li>\n   * </ul>\n   * Default is <code>true</code>.\n   * @param {string} [options.filename] name of the file\n   * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image\n   * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options\n   * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.\n   * @param {jsPDF} [options.jsPDF] jsPDF instance\n   * @param {number=} [options.x] x position on the PDF document in jsPDF units.\n   * @param {number=} [options.y] y position on the PDF document in jsPDF units.\n   * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be\n   * scaled such that it fits into the specified width. Has no effect if either the <code>html2canvas.scale<code> is\n   * specified or the <code>windowWidth</code> option is NOT specified.\n   * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the\n   * <code>html2canvas.windowWidth</code> option, this option affects the actual container size while rendering and\n   * does NOT affect CSS media queries. This option only has an effect, if the <code>width<code> option is also specified.\n   *\n   * @example\n   * var doc = new jsPDF();\n   *\n   * doc.html(document.body, {\n   *    callback: function (doc) {\n   *      doc.save();\n   *    },\n   *    x: 10,\n   *    y: 10\n   * });\n   */\n  jsPDFAPI.html = function(src, options) {\n    \"use strict\";\n\n    options = options || {};\n    options.callback = options.callback || function() {};\n    options.html2canvas = options.html2canvas || {};\n    options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;\n    options.jsPDF = options.jsPDF || this;\n    options.fontFaces = options.fontFaces\n      ? options.fontFaces.map(normalizeFontFace)\n      : null;\n\n    // Create a new worker with the given options.\n    var worker = new Worker(options);\n\n    if (!options.worker) {\n      // If worker is not set to true, perform the traditional 'simple' operation.\n      return worker.from(src).doCallback();\n    } else {\n      // Otherwise, return the worker for new Promise-based operation.\n      return worker;\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF JavaScript plugin\n *\n * @name javascript\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  var jsNamesObj, jsJsObj, text;\n  /**\n   * @name addJS\n   * @function\n   * @param {string} javascript The javascript to be embedded into the PDF-file.\n   * @returns {jsPDF}\n   */\n  jsPDFAPI.addJS = function(javascript) {\n    text = javascript;\n    this.internal.events.subscribe(\"postPutResources\", function() {\n      jsNamesObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/Names [(EmbeddedJS) \" + (jsNamesObj + 1) + \" 0 R]\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n\n      jsJsObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/S /JavaScript\");\n      this.internal.out(\"/JS (\" + text + \")\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n    });\n    this.internal.events.subscribe(\"putCatalog\", function() {\n      if (jsNamesObj !== undefined && jsJsObj !== undefined) {\n        this.internal.out(\"/Names <</JavaScript \" + jsNamesObj + \" 0 R>>\");\n      }\n    });\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Outline PlugIn\n *\n * Generates a PDF Outline\n * @name outline\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namesOid;\n  //var destsGoto = [];\n\n  jsPDFAPI.events.push([\n    \"postPutResources\",\n    function() {\n      var pdf = this;\n      var rx = /^(\\d+) 0 obj$/;\n\n      // Write action goto objects for each page\n      // this.outline.destsGoto = [];\n      // for (var i = 0; i < totalPages; i++) {\n      // var id = pdf.internal.newObject();\n      // this.outline.destsGoto.push(id);\n      // pdf.internal.write(\"<</D[\" + (i * 2 + 3) + \" 0 R /XYZ null\n      // null null]/S/GoTo>> endobj\");\n      // }\n      //\n      // for (var i = 0; i < dests.length; i++) {\n      // pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0\n      // R\");\n      // }\n      //\n      if (this.outline.root.children.length > 0) {\n        var lines = pdf.outline.render().split(/\\r\\n/);\n        for (var i = 0; i < lines.length; i++) {\n          var line = lines[i];\n          var m = rx.exec(line);\n          if (m != null) {\n            var oid = m[1];\n            pdf.internal.newObjectDeferredBegin(oid, false);\n          }\n          pdf.internal.write(line);\n        }\n      }\n\n      // This code will write named destination for each page reference\n      // (page_1, etc)\n      if (this.outline.createNamedDestinations) {\n        var totalPages = this.internal.pages.length;\n        // WARNING: this assumes jsPDF starts on page 3 and pageIDs\n        // follow 5, 7, 9, etc\n        // Write destination objects for each page\n        var dests = [];\n        for (var i = 0; i < totalPages; i++) {\n          var id = pdf.internal.newObject();\n          dests.push(id);\n          var info = pdf.internal.getPageInfo(i + 1);\n          pdf.internal.write(\n            \"<< /D[\" + info.objId + \" 0 R /XYZ null null null]>> endobj\"\n          );\n        }\n\n        // assign a name for each destination\n        var names2Oid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Names [ \");\n        for (var i = 0; i < dests.length; i++) {\n          pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0 R\");\n        }\n        pdf.internal.write(\" ] >>\", \"endobj\");\n\n        // var kids = pdf.internal.newObject();\n        // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');\n        // pdf.internal.write(' ] >>', 'endobj');\n\n        namesOid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Dests \" + names2Oid + \" 0 R\");\n        pdf.internal.write(\">>\", \"endobj\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putCatalog\",\n    function() {\n      var pdf = this;\n      if (pdf.outline.root.children.length > 0) {\n        pdf.internal.write(\n          \"/Outlines\",\n          this.outline.makeRef(this.outline.root)\n        );\n        if (this.outline.createNamedDestinations) {\n          pdf.internal.write(\"/Names \" + namesOid + \" 0 R\");\n        }\n        // Open with Bookmarks showing\n        // pdf.internal.write(\"/PageMode /UseOutlines\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      var pdf = this;\n\n      pdf.outline = {\n        createNamedDestinations: false,\n        root: {\n          children: []\n        }\n      };\n\n      /**\n       * Options: pageNumber\n       */\n      pdf.outline.add = function(parent, title, options) {\n        var item = {\n          title: title,\n          options: options,\n          children: []\n        };\n        if (parent == null) {\n          parent = this.root;\n        }\n        parent.children.push(item);\n        return item;\n      };\n\n      pdf.outline.render = function() {\n        this.ctx = {};\n        this.ctx.val = \"\";\n        this.ctx.pdf = pdf;\n\n        this.genIds_r(this.root);\n        this.renderRoot(this.root);\n        this.renderItems(this.root);\n\n        return this.ctx.val;\n      };\n\n      pdf.outline.genIds_r = function(node) {\n        node.id = pdf.internal.newObjectDeferred();\n        for (var i = 0; i < node.children.length; i++) {\n          this.genIds_r(node.children[i]);\n        }\n      };\n\n      pdf.outline.renderRoot = function(node) {\n        this.objStart(node);\n        this.line(\"/Type /Outlines\");\n        if (node.children.length > 0) {\n          this.line(\"/First \" + this.makeRef(node.children[0]));\n          this.line(\n            \"/Last \" + this.makeRef(node.children[node.children.length - 1])\n          );\n        }\n        this.line(\n          \"/Count \" +\n            this.count_r(\n              {\n                count: 0\n              },\n              node\n            )\n        );\n        this.objEnd();\n      };\n\n      pdf.outline.renderItems = function(node) {\n        var getVerticalCoordinateString = this.ctx.pdf.internal\n          .getVerticalCoordinateString;\n        for (var i = 0; i < node.children.length; i++) {\n          var item = node.children[i];\n          this.objStart(item);\n\n          this.line(\"/Title \" + this.makeString(item.title));\n\n          this.line(\"/Parent \" + this.makeRef(node));\n          if (i > 0) {\n            this.line(\"/Prev \" + this.makeRef(node.children[i - 1]));\n          }\n          if (i < node.children.length - 1) {\n            this.line(\"/Next \" + this.makeRef(node.children[i + 1]));\n          }\n          if (item.children.length > 0) {\n            this.line(\"/First \" + this.makeRef(item.children[0]));\n            this.line(\n              \"/Last \" + this.makeRef(item.children[item.children.length - 1])\n            );\n          }\n\n          var count = (this.count = this.count_r(\n            {\n              count: 0\n            },\n            item\n          ));\n          if (count > 0) {\n            this.line(\"/Count \" + count);\n          }\n\n          if (item.options) {\n            if (item.options.pageNumber) {\n              // Explicit Destination\n              //WARNING this assumes page ids are 3,5,7, etc.\n              var info = pdf.internal.getPageInfo(item.options.pageNumber);\n              this.line(\n                \"/Dest \" +\n                  \"[\" +\n                  info.objId +\n                  \" 0 R /XYZ 0 \" +\n                  getVerticalCoordinateString(0) +\n                  \" 0]\"\n              );\n              // this line does not work on all clients (pageNumber instead of page ref)\n              //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');\n\n              // Named Destination\n              // this.line('/Dest (page_' + (item.options.pageNumber) + ')');\n\n              // Action Destination\n              // var id = pdf.internal.newObject();\n              // pdf.internal.write('<</D[' + (item.options.pageNumber - 1) + ' /XYZ null null null]/S/GoTo>> endobj');\n              // this.line('/A ' + id + ' 0 R' );\n            }\n          }\n          this.objEnd();\n        }\n        for (var z = 0; z < node.children.length; z++) {\n          this.renderItems(node.children[z]);\n        }\n      };\n\n      pdf.outline.line = function(text) {\n        this.ctx.val += text + \"\\r\\n\";\n      };\n\n      pdf.outline.makeRef = function(node) {\n        return node.id + \" 0 R\";\n      };\n\n      pdf.outline.makeString = function(val) {\n        return \"(\" + pdf.internal.pdfEscape(val) + \")\";\n      };\n\n      pdf.outline.objStart = function(node) {\n        this.ctx.val += \"\\r\\n\" + node.id + \" 0 obj\" + \"\\r\\n<<\\r\\n\";\n      };\n\n      pdf.outline.objEnd = function() {\n        this.ctx.val += \">> \\r\\n\" + \"endobj\" + \"\\r\\n\";\n      };\n\n      pdf.outline.count_r = function(ctx, node) {\n        for (var i = 0; i < node.children.length; i++) {\n          ctx.count++;\n          this.count_r(ctx, node.children[i]);\n        }\n        return ctx.count;\n      };\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF jpeg Support PlugIn\n *\n * @name jpeg_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * 0xc0 (SOF) Huffman  - Baseline DCT\n   * 0xc1 (SOF) Huffman  - Extended sequential DCT\n   * 0xc2 Progressive DCT (SOF2)\n   * 0xc3 Spatial (sequential) lossless (SOF3)\n   * 0xc4 Differential sequential DCT (SOF5)\n   * 0xc5 Differential progressive DCT (SOF6)\n   * 0xc6 Differential spatial (SOF7)\n   * 0xc7\n   */\n  var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];\n\n  //takes a string imgData containing the raw bytes of\n  //a jpeg image and returns [width, height]\n  //Algorithm from: http://www.64lines.com/jpeg-width-height\n  var getJpegInfo = function(imgData) {\n    var width, height, numcomponents;\n    var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);\n    var len = imgData.length;\n    var result = { width: 0, height: 0, numcomponents: 1 };\n    for (var i = 4; i < len; i += 2) {\n      i += blockLength;\n      if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {\n        height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);\n        width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);\n        numcomponents = imgData.charCodeAt(i + 9);\n        result = { width: width, height: height, numcomponents: numcomponents };\n        break;\n      } else {\n        blockLength =\n          imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);\n      }\n    }\n    return result;\n  };\n\n  /**\n   * @ignore\n   */\n  jsPDFAPI.processJPEG = function(\n    data,\n    index,\n    alias,\n    compression,\n    dataAsBinaryString,\n    colorSpace\n  ) {\n    var filter = this.decode.DCT_DECODE,\n      bpc = 8,\n      dims,\n      result = null;\n\n    if (\n      typeof data === \"string\" ||\n      this.__addimage__.isArrayBuffer(data) ||\n      this.__addimage__.isArrayBufferView(data)\n    ) {\n      // if we already have a stored binary string rep use that\n      data = dataAsBinaryString || data;\n      data = this.__addimage__.isArrayBuffer(data)\n        ? new Uint8Array(data)\n        : data;\n      data = this.__addimage__.isArrayBufferView(data)\n        ? this.__addimage__.arrayBufferToBinaryString(data)\n        : data;\n\n      dims = getJpegInfo(data);\n      switch (dims.numcomponents) {\n        case 1:\n          colorSpace = this.color_spaces.DEVICE_GRAY;\n          break;\n        case 4:\n          colorSpace = this.color_spaces.DEVICE_CMYK;\n          break;\n        case 3:\n          colorSpace = this.color_spaces.DEVICE_RGB;\n          break;\n      }\n\n      result = {\n        data: data,\n        width: dims.width,\n        height: dims.height,\n        colorSpace: colorSpace,\n        bitsPerComponent: bpc,\n        filter: filter,\n        index: index,\n        alias: alias\n      };\n    }\n    return result;\n  };\n})(jsPDF.API);\n","// Generated by CoffeeScript 1.4.0\n\n/**\n * @license\n * PNG.js\n * Copyright (c) 2011 Devon Govett\n * MIT LICENSE\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this\n * software and associated documentation files (the \"Software\"), to deal in the Software\n * without restriction, including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons\n * to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or\n * substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\n * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport { unzlibSync } from \"./fflate.js\";\nimport { globalObject } from \"./globalObject.js\";\n\nvar PNG = (function() {\n  var APNG_BLEND_OP_OVER,\n    APNG_BLEND_OP_SOURCE,\n    APNG_DISPOSE_OP_BACKGROUND,\n    APNG_DISPOSE_OP_NONE,\n    APNG_DISPOSE_OP_PREVIOUS,\n    makeImage,\n    scratchCanvas,\n    scratchCtx;\n\n  APNG_DISPOSE_OP_NONE = 0;\n\n  APNG_DISPOSE_OP_BACKGROUND = 1;\n\n  APNG_DISPOSE_OP_PREVIOUS = 2;\n\n  APNG_BLEND_OP_SOURCE = 0;\n\n  APNG_BLEND_OP_OVER = 1;\n\n  function PNG(data) {\n    var chunkSize,\n      colors,\n      palLen,\n      delayDen,\n      delayNum,\n      frame,\n      i,\n      index,\n      key,\n      section,\n      palShort,\n      text,\n      _i,\n      _j,\n      _ref;\n    this.data = data;\n    this.pos = 8;\n    this.palette = [];\n    this.imgData = [];\n    this.transparency = {};\n    this.animation = null;\n    this.text = {};\n    frame = null;\n    while (true) {\n      chunkSize = this.readUInt32();\n      section = function() {\n        var _i, _results;\n        _results = [];\n        for (i = _i = 0; _i < 4; i = ++_i) {\n          _results.push(String.fromCharCode(this.data[this.pos++]));\n        }\n        return _results;\n      }\n        .call(this)\n        .join(\"\");\n      switch (section) {\n        case \"IHDR\":\n          this.width = this.readUInt32();\n          this.height = this.readUInt32();\n          this.bits = this.data[this.pos++];\n          this.colorType = this.data[this.pos++];\n          this.compressionMethod = this.data[this.pos++];\n          this.filterMethod = this.data[this.pos++];\n          this.interlaceMethod = this.data[this.pos++];\n          break;\n        case \"acTL\":\n          this.animation = {\n            numFrames: this.readUInt32(),\n            numPlays: this.readUInt32() || Infinity,\n            frames: []\n          };\n          break;\n        case \"PLTE\":\n          this.palette = this.read(chunkSize);\n          break;\n        case \"fcTL\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.pos += 4;\n          frame = {\n            width: this.readUInt32(),\n            height: this.readUInt32(),\n            xOffset: this.readUInt32(),\n            yOffset: this.readUInt32()\n          };\n          delayNum = this.readUInt16();\n          delayDen = this.readUInt16() || 100;\n          frame.delay = (1000 * delayNum) / delayDen;\n          frame.disposeOp = this.data[this.pos++];\n          frame.blendOp = this.data[this.pos++];\n          frame.data = [];\n          break;\n        case \"IDAT\":\n        case \"fdAT\":\n          if (section === \"fdAT\") {\n            this.pos += 4;\n            chunkSize -= 4;\n          }\n          data = (frame != null ? frame.data : void 0) || this.imgData;\n          for (\n            i = _i = 0;\n            0 <= chunkSize ? _i < chunkSize : _i > chunkSize;\n            i = 0 <= chunkSize ? ++_i : --_i\n          ) {\n            data.push(this.data[this.pos++]);\n          }\n          break;\n        case \"tRNS\":\n          this.transparency = {};\n          switch (this.colorType) {\n            case 3:\n              palLen = this.palette.length / 3;\n              this.transparency.indexed = this.read(chunkSize);\n              if (this.transparency.indexed.length > palLen)\n                throw new Error(\"More transparent colors than palette size\");\n              /*\n               * According to the PNG spec trns should be increased to the same size as palette if shorter\n               */\n              //palShort = 255 - this.transparency.indexed.length;\n              palShort = palLen - this.transparency.indexed.length;\n              if (palShort > 0) {\n                for (\n                  i = _j = 0;\n                  0 <= palShort ? _j < palShort : _j > palShort;\n                  i = 0 <= palShort ? ++_j : --_j\n                ) {\n                  this.transparency.indexed.push(255);\n                }\n              }\n              break;\n            case 0:\n              this.transparency.grayscale = this.read(chunkSize)[0];\n              break;\n            case 2:\n              this.transparency.rgb = this.read(chunkSize);\n          }\n          break;\n        case \"tEXt\":\n          text = this.read(chunkSize);\n          index = text.indexOf(0);\n          key = String.fromCharCode.apply(String, text.slice(0, index));\n          this.text[key] = String.fromCharCode.apply(\n            String,\n            text.slice(index + 1)\n          );\n          break;\n        case \"IEND\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.colors = function() {\n            switch (this.colorType) {\n              case 0:\n              case 3:\n              case 4:\n                return 1;\n              case 2:\n              case 6:\n                return 3;\n            }\n          }.call(this);\n          this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;\n          colors = this.colors + (this.hasAlphaChannel ? 1 : 0);\n          this.pixelBitlength = this.bits * colors;\n          this.colorSpace = function() {\n            switch (this.colors) {\n              case 1:\n                return \"DeviceGray\";\n              case 3:\n                return \"DeviceRGB\";\n            }\n          }.call(this);\n          this.imgData = new Uint8Array(this.imgData);\n          return;\n        default:\n          this.pos += chunkSize;\n      }\n      this.pos += 4;\n      if (this.pos > this.data.length) {\n        throw new Error(\"Incomplete or corrupt PNG file\");\n      }\n    }\n  }\n\n  PNG.prototype.read = function(bytes) {\n    var i, _i, _results;\n    _results = [];\n    for (\n      i = _i = 0;\n      0 <= bytes ? _i < bytes : _i > bytes;\n      i = 0 <= bytes ? ++_i : --_i\n    ) {\n      _results.push(this.data[this.pos++]);\n    }\n    return _results;\n  };\n\n  PNG.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.data[this.pos++] << 24;\n    b2 = this.data[this.pos++] << 16;\n    b3 = this.data[this.pos++] << 8;\n    b4 = this.data[this.pos++];\n    return b1 | b2 | b3 | b4;\n  };\n\n  PNG.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.data[this.pos++] << 8;\n    b2 = this.data[this.pos++];\n    return b1 | b2;\n  };\n\n  PNG.prototype.decodePixels = function(data) {\n    var pixelBytes = this.pixelBitlength / 8;\n    var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);\n    var pos = 0;\n    var _this = this;\n\n    if (data == null) {\n      data = this.imgData;\n    }\n    if (data.length === 0) {\n      return new Uint8Array(0);\n    }\n\n    data = unzlibSync(data);\n    function pass(x0, y0, dx, dy) {\n      var abyte,\n        c,\n        col,\n        i,\n        left,\n        length,\n        p,\n        pa,\n        paeth,\n        pb,\n        pc,\n        pixels,\n        row,\n        scanlineLength,\n        upper,\n        upperLeft,\n        _i,\n        _j,\n        _k,\n        _l,\n        _m;\n      var w = Math.ceil((_this.width - x0) / dx),\n        h = Math.ceil((_this.height - y0) / dy);\n      var isFull = _this.width == w && _this.height == h;\n      scanlineLength = pixelBytes * w;\n      pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);\n      length = data.length;\n      row = 0;\n      c = 0;\n      while (row < h && pos < length) {\n        switch (data[pos++]) {\n          case 0:\n            for (i = _i = 0; _i < scanlineLength; i = _i += 1) {\n              pixels[c++] = data[pos++];\n            }\n            break;\n          case 1:\n            for (i = _j = 0; _j < scanlineLength; i = _j += 1) {\n              abyte = data[pos++];\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              pixels[c++] = (abyte + left) % 256;\n            }\n            break;\n          case 2:\n            for (i = _k = 0; _k < scanlineLength; i = _k += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (upper + abyte) % 256;\n            }\n            break;\n          case 3:\n            for (i = _l = 0; _l < scanlineLength; i = _l += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;\n            }\n            break;\n          case 4:\n            for (i = _m = 0; _m < scanlineLength; i = _m += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              if (row === 0) {\n                upper = upperLeft = 0;\n              } else {\n                upper =\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      col * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n                upperLeft =\n                  col &&\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      (col - 1) * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n              }\n              p = left + upper - upperLeft;\n              pa = Math.abs(p - left);\n              pb = Math.abs(p - upper);\n              pc = Math.abs(p - upperLeft);\n              if (pa <= pb && pa <= pc) {\n                paeth = left;\n              } else if (pb <= pc) {\n                paeth = upper;\n              } else {\n                paeth = upperLeft;\n              }\n              pixels[c++] = (abyte + paeth) % 256;\n            }\n            break;\n          default:\n            throw new Error(\"Invalid filter algorithm: \" + data[pos - 1]);\n        }\n        if (!isFull) {\n          var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;\n          var partPos = row * scanlineLength;\n          for (i = 0; i < w; i += 1) {\n            for (var j = 0; j < pixelBytes; j += 1)\n              fullPixels[fullPos++] = pixels[partPos++];\n            fullPos += (dx - 1) * pixelBytes;\n          }\n        }\n        row++;\n      }\n    }\n    if (_this.interlaceMethod == 1) {\n      /*\n          1 6 4 6 2 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n          3 6 4 6 3 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n        */\n      pass(0, 0, 8, 8); // 1\n      /* NOTE these seem to follow the pattern:\n       * pass(x, 0, 2*x, 2*x);\n       * pass(0, x,   x, 2*x);\n       * with x being 4, 2, 1.\n       */\n      pass(4, 0, 8, 8); // 2\n      pass(0, 4, 4, 8); // 3\n\n      pass(2, 0, 4, 4); // 4\n      pass(0, 2, 2, 4); // 5\n\n      pass(1, 0, 2, 2); // 6\n      pass(0, 1, 1, 2); // 7\n    } else {\n      pass(0, 0, 1, 1);\n    }\n    return fullPixels;\n  };\n\n  PNG.prototype.decodePalette = function() {\n    var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;\n    palette = this.palette;\n    transparency = this.transparency.indexed || [];\n    ret = new Uint8Array((transparency.length || 0) + palette.length);\n    pos = 0;\n    length = palette.length;\n    c = 0;\n    for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {\n      ret[pos++] = palette[i];\n      ret[pos++] = palette[i + 1];\n      ret[pos++] = palette[i + 2];\n      ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;\n    }\n    return ret;\n  };\n\n  PNG.prototype.copyToImageData = function(imageData, pixels) {\n    var alpha, colors, data, i, input, j, k, length, palette, v, _ref;\n    colors = this.colors;\n    palette = null;\n    alpha = this.hasAlphaChannel;\n    if (this.palette.length) {\n      palette =\n        (_ref = this._decodedPalette) != null\n          ? _ref\n          : (this._decodedPalette = this.decodePalette());\n      colors = 4;\n      alpha = true;\n    }\n    data = imageData.data || imageData;\n    length = data.length;\n    input = palette || pixels;\n    i = j = 0;\n    if (colors === 1) {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        v = input[k++];\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    } else {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    }\n  };\n\n  PNG.prototype.decode = function() {\n    var ret;\n    ret = new Uint8Array(this.width * this.height * 4);\n    this.copyToImageData(ret, this.decodePixels());\n    return ret;\n  };\n\n  var hasBrowserCanvas = function() {\n    if (Object.prototype.toString.call(globalObject) === \"[object Window]\") {\n      try {\n        scratchCanvas = globalObject.document.createElement(\"canvas\");\n        scratchCtx = scratchCanvas.getContext(\"2d\");\n      } catch (e) {\n        return false;\n      }\n      return true;\n    }\n    return false;\n  };\n\n  hasBrowserCanvas();\n\n  makeImage = function(imageData) {\n    if (hasBrowserCanvas() === true) {\n      var img;\n      scratchCtx.width = imageData.width;\n      scratchCtx.height = imageData.height;\n      scratchCtx.clearRect(0, 0, imageData.width, imageData.height);\n      scratchCtx.putImageData(imageData, 0, 0);\n      img = new Image();\n      img.src = scratchCanvas.toDataURL();\n      return img;\n    }\n    throw new Error(\"This method requires a Browser with Canvas-capability.\");\n  };\n\n  PNG.prototype.decodeFrames = function(ctx) {\n    var frame, i, imageData, pixels, _i, _len, _ref, _results;\n    if (!this.animation) {\n      return;\n    }\n    _ref = this.animation.frames;\n    _results = [];\n    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {\n      frame = _ref[i];\n      imageData = ctx.createImageData(frame.width, frame.height);\n      pixels = this.decodePixels(new Uint8Array(frame.data));\n      this.copyToImageData(imageData, pixels);\n      frame.imageData = imageData;\n      _results.push((frame.image = makeImage(imageData)));\n    }\n    return _results;\n  };\n\n  PNG.prototype.renderFrame = function(ctx, number) {\n    var frame, frames, prev;\n    frames = this.animation.frames;\n    frame = frames[number];\n    prev = frames[number - 1];\n    if (number === 0) {\n      ctx.clearRect(0, 0, this.width, this.height);\n    }\n    if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND\n    ) {\n      ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);\n    } else if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS\n    ) {\n      ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);\n    }\n    if (frame.blendOp === APNG_BLEND_OP_SOURCE) {\n      ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);\n    }\n    return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);\n  };\n\n  PNG.prototype.animate = function(ctx) {\n    var doFrame,\n      frameNumber,\n      frames,\n      numFrames,\n      numPlays,\n      _ref,\n      _this = this;\n    frameNumber = 0;\n    (_ref = this.animation),\n      (numFrames = _ref.numFrames),\n      (frames = _ref.frames),\n      (numPlays = _ref.numPlays);\n    return (doFrame = function() {\n      var f, frame;\n      f = frameNumber++ % numFrames;\n      frame = frames[f];\n      _this.renderFrame(ctx, f);\n      if (numFrames > 1 && frameNumber / numFrames < numPlays) {\n        return (_this.animation._timeout = setTimeout(doFrame, frame.delay));\n      }\n    })();\n  };\n\n  PNG.prototype.stopAnimation = function() {\n    var _ref;\n    return clearTimeout(\n      (_ref = this.animation) != null ? _ref._timeout : void 0\n    );\n  };\n\n  PNG.prototype.render = function(canvas) {\n    var ctx, data;\n    if (canvas._png) {\n      canvas._png.stopAnimation();\n    }\n    canvas._png = this;\n    canvas.width = this.width;\n    canvas.height = this.height;\n    ctx = canvas.getContext(\"2d\");\n    if (this.animation) {\n      this.decodeFrames(ctx);\n      return this.animate(ctx);\n    } else {\n      data = ctx.createImageData(this.width, this.height);\n      this.copyToImageData(data, this.decodePixels());\n      return ctx.putImageData(data, 0, 0);\n    }\n  };\n\n  return PNG;\n})();\n\nexport { PNG };\n","/**\n * @license\n *\n * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\nimport { PNG } from \"../libs/png.js\";\n\n/**\n * jsPDF PNG PlugIn\n * @name png_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /*\n   * @see http://www.w3.org/TR/PNG-Chunks.html\n   *\n   Color    Allowed      Interpretation\n   Type     Bit Depths\n\n     0       1,2,4,8,16  Each pixel is a grayscale sample.\n\n     2       8,16        Each pixel is an R,G,B triple.\n\n     3       1,2,4,8     Each pixel is a palette index;\n                         a PLTE chunk must appear.\n\n     4       8,16        Each pixel is a grayscale sample,\n                         followed by an alpha sample.\n\n     6       8,16        Each pixel is an R,G,B triple,\n                         followed by an alpha sample.\n  */\n\n  /*\n   * PNG filter method types\n   *\n   * @see http://www.w3.org/TR/PNG-Filters.html\n   * @see http://www.libpng.org/pub/png/book/chapter09.html\n   *\n   * This is what the value 'Predictor' in decode params relates to\n   *\n   * 15 is \"optimal prediction\", which means the prediction algorithm can change from line to line.\n   * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.\n   *\n     0       None\n     1       Sub\n     2       Up\n     3       Average\n     4       Paeth\n   */\n\n  var canCompress = function(value) {\n    return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();\n  };\n\n  var hasCompressionJS = function() {\n    return typeof zlibSync === \"function\";\n  };\n  var compressBytes = function(bytes, lineLength, colorsPerPixel, compression) {\n    var level = 4;\n    var filter_method = filterUp;\n\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        level = 1;\n        filter_method = filterSub;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        level = 6;\n        filter_method = filterAverage;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        level = 9;\n        filter_method = filterPaeth;\n        break;\n    }\n\n    bytes = applyPngFilterMethod(\n      bytes,\n      lineLength,\n      colorsPerPixel,\n      filter_method\n    );\n    var dat = zlibSync(bytes, { level: level });\n    return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);\n  };\n\n  var applyPngFilterMethod = function(\n    bytes,\n    lineLength,\n    colorsPerPixel,\n    filter_method\n  ) {\n    var lines = bytes.length / lineLength,\n      result = new Uint8Array(bytes.length + lines),\n      filter_methods = getFilterMethods(),\n      line,\n      prevLine,\n      offset;\n\n    for (var i = 0; i < lines; i += 1) {\n      offset = i * lineLength;\n      line = bytes.subarray(offset, offset + lineLength);\n\n      if (filter_method) {\n        result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);\n      } else {\n        var len = filter_methods.length,\n          results = [];\n\n        for (var j; j < len; j += 1) {\n          results[j] = filter_methods[j](line, colorsPerPixel, prevLine);\n        }\n\n        var ind = getIndexOfSmallestSum(results.concat());\n\n        result.set(results[ind], offset + i);\n      }\n\n      prevLine = line;\n    }\n\n    return result;\n  };\n\n  var filterNone = function(line) {\n    /*var result = new Uint8Array(line.length + 1);\n    result[0] = 0;\n    result.set(line, 1);*/\n\n    var result = Array.apply([], line);\n    result.unshift(0);\n\n    return result;\n  };\n\n  var filterSub = function(line, colorsPerPixel) {\n    var result = [],\n      len = line.length,\n      left;\n\n    result[0] = 1;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      result[i + 1] = (line[i] - left + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterUp = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      up;\n\n    result[0] = 2;\n\n    for (var i = 0; i < len; i += 1) {\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] - up + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterAverage = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up;\n\n    result[0] = 3;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] + 0x0100 - ((left + up) >>> 1)) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterPaeth = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up,\n      upLeft,\n      paeth;\n\n    result[0] = 4;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      upLeft = (prevLine && prevLine[i - colorsPerPixel]) || 0;\n      paeth = paethPredictor(left, up, upLeft);\n      result[i + 1] = (line[i] - paeth + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var paethPredictor = function(left, up, upLeft) {\n    if (left === up && up === upLeft) {\n      return left;\n    }\n    var pLeft = Math.abs(up - upLeft),\n      pUp = Math.abs(left - upLeft),\n      pUpLeft = Math.abs(left + up - upLeft - upLeft);\n    return pLeft <= pUp && pLeft <= pUpLeft\n      ? left\n      : pUp <= pUpLeft\n      ? up\n      : upLeft;\n  };\n\n  var getFilterMethods = function() {\n    return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];\n  };\n\n  var getIndexOfSmallestSum = function(arrays) {\n    var sum = arrays.map(function(value) {\n      return value.reduce(function(pv, cv) {\n        return pv + Math.abs(cv);\n      }, 0);\n    });\n    return sum.indexOf(Math.min.apply(null, sum));\n  };\n\n  var getPredictorFromCompression = function(compression) {\n    var predictor;\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        predictor = 11;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        predictor = 13;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        predictor = 14;\n        break;\n\n      default:\n        predictor = 12;\n        break;\n    }\n    return predictor;\n  };\n\n  /**\n   * @name processPNG\n   * @function\n   * @ignore\n   */\n  jsPDFAPI.processPNG = function(imageData, index, alias, compression) {\n    \"use strict\";\n\n    var colorSpace,\n      filter = this.decode.FLATE_DECODE,\n      bitsPerComponent,\n      image,\n      decodeParameters = \"\",\n      trns,\n      colors,\n      pal,\n      smask,\n      pixels,\n      len,\n      alphaData,\n      imgData,\n      hasColors,\n      pixel,\n      i,\n      n;\n\n    if (this.__addimage__.isArrayBuffer(imageData))\n      imageData = new Uint8Array(imageData);\n\n    if (this.__addimage__.isArrayBufferView(imageData)) {\n      image = new PNG(imageData);\n      imageData = image.imgData;\n      bitsPerComponent = image.bits;\n      colorSpace = image.colorSpace;\n      colors = image.colors;\n\n      /*\n       * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.\n       *\n       * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.\n       *\n       * Extract alpha to create two separate images, using the alpha as a sMask\n       */\n      if ([4, 6].indexOf(image.colorType) !== -1) {\n        /*\n         * processes 8 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 8) {\n          pixels =\n            image.pixelBitlength == 32\n              ? new Uint32Array(image.decodePixels().buffer)\n              : image.pixelBitlength == 16\n              ? new Uint16Array(image.decodePixels().buffer)\n              : new Uint8Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(len * image.colors);\n          alphaData = new Uint8Array(len);\n          var pDiff = image.pixelBitlength - image.bits;\n          i = 0;\n          n = 0;\n          var pbl;\n\n          for (; i < len; i++) {\n            pixel = pixels[i];\n            pbl = 0;\n\n            while (pbl < pDiff) {\n              imgData[n++] = (pixel >>> pbl) & 0xff;\n              pbl = pbl + image.bits;\n            }\n\n            alphaData[i] = (pixel >>> pbl) & 0xff;\n          }\n        }\n\n        /*\n         * processes 16 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 16) {\n          pixels = new Uint32Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(\n            len * (32 / image.pixelBitlength) * image.colors\n          );\n          alphaData = new Uint8Array(len * (32 / image.pixelBitlength));\n          hasColors = image.colors > 1;\n          i = 0;\n          n = 0;\n          var a = 0;\n\n          while (i < len) {\n            pixel = pixels[i++];\n\n            imgData[n++] = (pixel >>> 0) & 0xff;\n\n            if (hasColors) {\n              imgData[n++] = (pixel >>> 16) & 0xff;\n\n              pixel = pixels[i++];\n              imgData[n++] = (pixel >>> 0) & 0xff;\n            }\n\n            alphaData[a++] = (pixel >>> 16) & 0xff;\n          }\n          bitsPerComponent = 8;\n        }\n\n        if (canCompress(compression)) {\n          imageData = compressBytes(\n            imgData,\n            image.width * image.colors,\n            image.colors,\n            compression\n          );\n          smask = compressBytes(alphaData, image.width, 1, compression);\n        } else {\n          imageData = imgData;\n          smask = alphaData;\n          filter = undefined;\n        }\n      }\n\n      /*\n       * Indexed png. Each pixel is a palette index.\n       */\n      if (image.colorType === 3) {\n        colorSpace = this.color_spaces.INDEXED;\n        pal = image.palette;\n\n        if (image.transparency.indexed) {\n          var trans = image.transparency.indexed;\n          var total = 0;\n          i = 0;\n          len = trans.length;\n\n          for (; i < len; ++i) {\n            total += trans[i];\n          }\n\n          total = total / 255;\n\n          /*\n           * a single color is specified as 100% transparent (0),\n           * so we set trns to use a /Mask with that index\n           */\n          if (total === len - 1 && trans.indexOf(0) !== -1) {\n            trns = [trans.indexOf(0)];\n\n            /*\n             * there's more than one colour within the palette that specifies\n             * a transparency value less than 255, so we unroll the pixels to create an image sMask\n             */\n          } else if (total !== len) {\n            pixels = image.decodePixels();\n            alphaData = new Uint8Array(pixels.length);\n            i = 0;\n            len = pixels.length;\n\n            for (; i < len; i++) {\n              alphaData[i] = trans[pixels[i]];\n            }\n\n            smask = compressBytes(alphaData, image.width, 1);\n          }\n        }\n      }\n\n      var predictor = getPredictorFromCompression(compression);\n\n      if (filter === this.decode.FLATE_DECODE) {\n        decodeParameters = \"/Predictor \" + predictor + \" \";\n      }\n      decodeParameters +=\n        \"/Colors \" +\n        colors +\n        \" /BitsPerComponent \" +\n        bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n\n      if (\n        this.__addimage__.isArrayBuffer(imageData) ||\n        this.__addimage__.isArrayBufferView(imageData)\n      ) {\n        imageData = this.__addimage__.arrayBufferToBinaryString(imageData);\n      }\n\n      if (\n        (smask && this.__addimage__.isArrayBuffer(smask)) ||\n        this.__addimage__.isArrayBufferView(smask)\n      ) {\n        smask = this.__addimage__.arrayBufferToBinaryString(smask);\n      }\n\n      return {\n        alias: alias,\n        data: imageData,\n        index: index,\n        filter: filter,\n        decodeParameters: decodeParameters,\n        transparency: trns,\n        palette: pal,\n        sMask: smask,\n        predictor: predictor,\n        width: image.width,\n        height: image.height,\n        bitsPerComponent: bitsPerComponent,\n        colorSpace: colorSpace\n      };\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * (c) Dean McNamee <dean@gmail.com>, 2013.\n *\n * https://github.com/deanm/omggif\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,\n * including animation and compression.  It does not rely on any specific\n * underlying system, so should run in the browser, Node, or Plask.\n */\n\n\"use strict\";\n\nimport { console } from \"./console.js\";\n\nfunction GifWriter(buf, width, height, gopts) {\n  var p = 0;\n\n  var gopts = gopts === undefined ? {} : gopts;\n  var loop_count = gopts.loop === undefined ? null : gopts.loop;\n  var global_palette = gopts.palette === undefined ? null : gopts.palette;\n\n  if (width <= 0 || height <= 0 || width > 65535 || height > 65535)\n    throw new Error(\"Width/Height invalid.\");\n\n  function check_palette_and_num_colors(palette) {\n    var num_colors = palette.length;\n    if (num_colors < 2 || num_colors > 256 || num_colors & (num_colors - 1)) {\n      throw new Error(\n        \"Invalid code/color length, must be power of 2 and 2 .. 256.\"\n      );\n    }\n    return num_colors;\n  }\n\n  // - Header.\n  buf[p++] = 0x47;\n  buf[p++] = 0x49;\n  buf[p++] = 0x46; // GIF\n  buf[p++] = 0x38;\n  buf[p++] = 0x39;\n  buf[p++] = 0x61; // 89a\n\n  // Handling of Global Color Table (palette) and background index.\n  var gp_num_colors_pow2 = 0;\n  var background = 0;\n  if (global_palette !== null) {\n    var gp_num_colors = check_palette_and_num_colors(global_palette);\n    while ((gp_num_colors >>= 1)) ++gp_num_colors_pow2;\n    gp_num_colors = 1 << gp_num_colors_pow2;\n    --gp_num_colors_pow2;\n    if (gopts.background !== undefined) {\n      background = gopts.background;\n      if (background >= gp_num_colors)\n        throw new Error(\"Background index out of range.\");\n      // The GIF spec states that a background index of 0 should be ignored, so\n      // this is probably a mistake and you really want to set it to another\n      // slot in the palette.  But actually in the end most browsers, etc end\n      // up ignoring this almost completely (including for dispose background).\n      if (background === 0)\n        throw new Error(\"Background index explicitly passed as 0.\");\n    }\n  }\n\n  // - Logical Screen Descriptor.\n  // NOTE(deanm): w/h apparently ignored by implementations, but set anyway.\n  buf[p++] = width & 0xff;\n  buf[p++] = (width >> 8) & 0xff;\n  buf[p++] = height & 0xff;\n  buf[p++] = (height >> 8) & 0xff;\n  // NOTE: Indicates 0-bpp original color resolution (unused?).\n  buf[p++] = (global_palette !== null ? 0x80 : 0) | gp_num_colors_pow2; // Global Color Table Flag. // NOTE: No sort flag (unused?).\n  buf[p++] = background; // Background Color Index.\n  buf[p++] = 0; // Pixel aspect ratio (unused?).\n\n  // - Global Color Table\n  if (global_palette !== null) {\n    for (var i = 0, il = global_palette.length; i < il; ++i) {\n      var rgb = global_palette[i];\n      buf[p++] = (rgb >> 16) & 0xff;\n      buf[p++] = (rgb >> 8) & 0xff;\n      buf[p++] = rgb & 0xff;\n    }\n  }\n\n  if (loop_count !== null) {\n    // Netscape block for looping.\n    if (loop_count < 0 || loop_count > 65535)\n      throw new Error(\"Loop count invalid.\");\n    // Extension code, label, and length.\n    buf[p++] = 0x21;\n    buf[p++] = 0xff;\n    buf[p++] = 0x0b;\n    // NETSCAPE2.0\n    buf[p++] = 0x4e;\n    buf[p++] = 0x45;\n    buf[p++] = 0x54;\n    buf[p++] = 0x53;\n    buf[p++] = 0x43;\n    buf[p++] = 0x41;\n    buf[p++] = 0x50;\n    buf[p++] = 0x45;\n    buf[p++] = 0x32;\n    buf[p++] = 0x2e;\n    buf[p++] = 0x30;\n    // Sub-block\n    buf[p++] = 0x03;\n    buf[p++] = 0x01;\n    buf[p++] = loop_count & 0xff;\n    buf[p++] = (loop_count >> 8) & 0xff;\n    buf[p++] = 0x00; // Terminator.\n  }\n\n  var ended = false;\n\n  this.addFrame = function(x, y, w, h, indexed_pixels, opts) {\n    if (ended === true) {\n      --p;\n      ended = false;\n    } // Un-end.\n\n    opts = opts === undefined ? {} : opts;\n\n    // TODO(deanm): Bounds check x, y.  Do they need to be within the virtual\n    // canvas width/height, I imagine?\n    if (x < 0 || y < 0 || x > 65535 || y > 65535)\n      throw new Error(\"x/y invalid.\");\n\n    if (w <= 0 || h <= 0 || w > 65535 || h > 65535)\n      throw new Error(\"Width/Height invalid.\");\n\n    if (indexed_pixels.length < w * h)\n      throw new Error(\"Not enough pixels for the frame size.\");\n\n    var using_local_palette = true;\n    var palette = opts.palette;\n    if (palette === undefined || palette === null) {\n      using_local_palette = false;\n      palette = global_palette;\n    }\n\n    if (palette === undefined || palette === null)\n      throw new Error(\"Must supply either a local or global palette.\");\n\n    var num_colors = check_palette_and_num_colors(palette);\n\n    // Compute the min_code_size (power of 2), destroying num_colors.\n    var min_code_size = 0;\n    while ((num_colors >>= 1)) ++min_code_size;\n    num_colors = 1 << min_code_size; // Now we can easily get it back.\n\n    var delay = opts.delay === undefined ? 0 : opts.delay;\n\n    // From the spec:\n    //     0 -   No disposal specified. The decoder is\n    //           not required to take any action.\n    //     1 -   Do not dispose. The graphic is to be left\n    //           in place.\n    //     2 -   Restore to background color. The area used by the\n    //           graphic must be restored to the background color.\n    //     3 -   Restore to previous. The decoder is required to\n    //           restore the area overwritten by the graphic with\n    //           what was there prior to rendering the graphic.\n    //  4-7 -    To be defined.\n    // NOTE(deanm): Dispose background doesn't really work, apparently most\n    // browsers ignore the background palette index and clear to transparency.\n    var disposal = opts.disposal === undefined ? 0 : opts.disposal;\n    if (disposal < 0 || disposal > 3)\n      // 4-7 is reserved.\n      throw new Error(\"Disposal out of range.\");\n\n    var use_transparency = false;\n    var transparent_index = 0;\n    if (opts.transparent !== undefined && opts.transparent !== null) {\n      use_transparency = true;\n      transparent_index = opts.transparent;\n      if (transparent_index < 0 || transparent_index >= num_colors)\n        throw new Error(\"Transparent color index.\");\n    }\n\n    if (disposal !== 0 || use_transparency || delay !== 0) {\n      // - Graphics Control Extension\n      buf[p++] = 0x21;\n      buf[p++] = 0xf9; // Extension / Label.\n      buf[p++] = 4; // Byte size.\n\n      buf[p++] = (disposal << 2) | (use_transparency === true ? 1 : 0);\n      buf[p++] = delay & 0xff;\n      buf[p++] = (delay >> 8) & 0xff;\n      buf[p++] = transparent_index; // Transparent color index.\n      buf[p++] = 0; // Block Terminator.\n    }\n\n    // - Image Descriptor\n    buf[p++] = 0x2c; // Image Seperator.\n    buf[p++] = x & 0xff;\n    buf[p++] = (x >> 8) & 0xff; // Left.\n    buf[p++] = y & 0xff;\n    buf[p++] = (y >> 8) & 0xff; // Top.\n    buf[p++] = w & 0xff;\n    buf[p++] = (w >> 8) & 0xff;\n    buf[p++] = h & 0xff;\n    buf[p++] = (h >> 8) & 0xff;\n    // NOTE: No sort flag (unused?).\n    // TODO(deanm): Support interlace.\n    buf[p++] = using_local_palette === true ? 0x80 | (min_code_size - 1) : 0;\n\n    // - Local Color Table\n    if (using_local_palette === true) {\n      for (var i = 0, il = palette.length; i < il; ++i) {\n        var rgb = palette[i];\n        buf[p++] = (rgb >> 16) & 0xff;\n        buf[p++] = (rgb >> 8) & 0xff;\n        buf[p++] = rgb & 0xff;\n      }\n    }\n\n    p = GifWriterOutputLZWCodeStream(\n      buf,\n      p,\n      min_code_size < 2 ? 2 : min_code_size,\n      indexed_pixels\n    );\n\n    return p;\n  };\n\n  this.end = function() {\n    if (ended === false) {\n      buf[p++] = 0x3b; // Trailer.\n      ended = true;\n    }\n    return p;\n  };\n\n  this.getOutputBuffer = function() {\n    return buf;\n  };\n  this.setOutputBuffer = function(v) {\n    buf = v;\n  };\n  this.getOutputBufferPosition = function() {\n    return p;\n  };\n  this.setOutputBufferPosition = function(v) {\n    p = v;\n  };\n}\n\n// Main compression routine, palette indexes -> LZW code stream.\n// |index_stream| must have at least one entry.\nfunction GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) {\n  buf[p++] = min_code_size;\n  var cur_subblock = p++; // Pointing at the length field.\n\n  var clear_code = 1 << min_code_size;\n  var code_mask = clear_code - 1;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  var cur_shift = 0;\n  // We have at most 12-bit codes, so we should have to hold a max of 19\n  // bits here (and then we would write out).\n  var cur = 0;\n\n  function emit_bytes_to_buffer(bit_block_size) {\n    while (cur_shift >= bit_block_size) {\n      buf[p++] = cur & 0xff;\n      cur >>= 8;\n      cur_shift -= 8;\n      if (p === cur_subblock + 256) {\n        // Finished a subblock.\n        buf[cur_subblock] = 255;\n        cur_subblock = p++;\n      }\n    }\n  }\n\n  function emit_code(c) {\n    cur |= c << cur_shift;\n    cur_shift += cur_code_size;\n    emit_bytes_to_buffer(8);\n  }\n\n  // I am not an expert on the topic, and I don't want to write a thesis.\n  // However, it is good to outline here the basic algorithm and the few data\n  // structures and optimizations here that make this implementation fast.\n  // The basic idea behind LZW is to build a table of previously seen runs\n  // addressed by a short id (herein called output code).  All data is\n  // referenced by a code, which represents one or more values from the\n  // original input stream.  All input bytes can be referenced as the same\n  // value as an output code.  So if you didn't want any compression, you\n  // could more or less just output the original bytes as codes (there are\n  // some details to this, but it is the idea).  In order to achieve\n  // compression, values greater then the input range (codes can be up to\n  // 12-bit while input only 8-bit) represent a sequence of previously seen\n  // inputs.  The decompressor is able to build the same mapping while\n  // decoding, so there is always a shared common knowledge between the\n  // encoding and decoder, which is also important for \"timing\" aspects like\n  // how to handle variable bit width code encoding.\n  //\n  // One obvious but very important consequence of the table system is there\n  // is always a unique id (at most 12-bits) to map the runs.  'A' might be\n  // 4, then 'AA' might be 10, 'AAA' 11, 'AAAA' 12, etc.  This relationship\n  // can be used for an effecient lookup strategy for the code mapping.  We\n  // need to know if a run has been seen before, and be able to map that run\n  // to the output code.  Since we start with known unique ids (input bytes),\n  // and then from those build more unique ids (table entries), we can\n  // continue this chain (almost like a linked list) to always have small\n  // integer values that represent the current byte chains in the encoder.\n  // This means instead of tracking the input bytes (AAAABCD) to know our\n  // current state, we can track the table entry for AAAABC (it is guaranteed\n  // to exist by the nature of the algorithm) and the next character D.\n  // Therefor the tuple of (table_entry, byte) is guaranteed to also be\n  // unique.  This allows us to create a simple lookup key for mapping input\n  // sequences to codes (table indices) without having to store or search\n  // any of the code sequences.  So if 'AAAA' has a table entry of 12, the\n  // tuple of ('AAAA', K) for any input byte K will be unique, and can be our\n  // key.  This leads to a integer value at most 20-bits, which can always\n  // fit in an SMI value and be used as a fast sparse array / object key.\n\n  // Output code for the current contents of the index buffer.\n  var ib_code = index_stream[0] & code_mask; // Load first input index.\n  var code_table = {}; // Key'd on our 20-bit \"tuple\".\n\n  emit_code(clear_code); // Spec says first code should be a clear code.\n\n  // First index already loaded, process the rest of the stream.\n  for (var i = 1, il = index_stream.length; i < il; ++i) {\n    var k = index_stream[i] & code_mask;\n    var cur_key = (ib_code << 8) | k; // (prev, k) unique tuple.\n    var cur_code = code_table[cur_key]; // buffer + k.\n\n    // Check if we have to create a new code table entry.\n    if (cur_code === undefined) {\n      // We don't have buffer + k.\n      // Emit index buffer (without k).\n      // This is an inline version of emit_code, because this is the core\n      // writing routine of the compressor (and V8 cannot inline emit_code\n      // because it is a closure here in a different context).  Additionally\n      // we can call emit_byte_to_buffer less often, because we can have\n      // 30-bits (from our 31-bit signed SMI), and we know our codes will only\n      // be 12-bits, so can safely have 18-bits there without overflow.\n      // emit_code(ib_code);\n      cur |= ib_code << cur_shift;\n      cur_shift += cur_code_size;\n      while (cur_shift >= 8) {\n        buf[p++] = cur & 0xff;\n        cur >>= 8;\n        cur_shift -= 8;\n        if (p === cur_subblock + 256) {\n          // Finished a subblock.\n          buf[cur_subblock] = 255;\n          cur_subblock = p++;\n        }\n      }\n\n      if (next_code === 4096) {\n        // Table full, need a clear.\n        emit_code(clear_code);\n        next_code = eoi_code + 1;\n        cur_code_size = min_code_size + 1;\n        code_table = {};\n      } else {\n        // Table not full, insert a new entry.\n        // Increase our variable bit code sizes if necessary.  This is a bit\n        // tricky as it is based on \"timing\" between the encoding and\n        // decoder.  From the encoders perspective this should happen after\n        // we've already emitted the index buffer and are about to create the\n        // first table entry that would overflow our current code bit size.\n        if (next_code >= 1 << cur_code_size) ++cur_code_size;\n        code_table[cur_key] = next_code++; // Insert into code table.\n      }\n\n      ib_code = k; // Index buffer to single input k.\n    } else {\n      ib_code = cur_code; // Index buffer to sequence in code table.\n    }\n  }\n\n  emit_code(ib_code); // There will still be something in the index buffer.\n  emit_code(eoi_code); // End Of Information.\n\n  // Flush / finalize the sub-blocks stream to the buffer.\n  emit_bytes_to_buffer(1);\n\n  // Finish the sub-blocks, writing out any unfinished lengths and\n  // terminating with a sub-block of length 0.  If we have already started\n  // but not yet used a sub-block it can just become the terminator.\n  if (cur_subblock + 1 === p) {\n    // Started but unused.\n    buf[cur_subblock] = 0;\n  } else {\n    // Started and used, write length and additional terminator block.\n    buf[cur_subblock] = p - cur_subblock - 1;\n    buf[p++] = 0;\n  }\n  return p;\n}\n\nfunction GifReader(buf) {\n  var p = 0;\n\n  // - Header (GIF87a or GIF89a).\n  if (\n    buf[p++] !== 0x47 ||\n    buf[p++] !== 0x49 ||\n    buf[p++] !== 0x46 ||\n    buf[p++] !== 0x38 ||\n    ((buf[p++] + 1) & 0xfd) !== 0x38 ||\n    buf[p++] !== 0x61\n  ) {\n    throw new Error(\"Invalid GIF 87a/89a header.\");\n  }\n\n  // - Logical Screen Descriptor.\n  var width = buf[p++] | (buf[p++] << 8);\n  var height = buf[p++] | (buf[p++] << 8);\n  var pf0 = buf[p++]; // <Packed Fields>.\n  var global_palette_flag = pf0 >> 7;\n  var num_global_colors_pow2 = pf0 & 0x7;\n  var num_global_colors = 1 << (num_global_colors_pow2 + 1);\n  var background = buf[p++];\n  buf[p++]; // Pixel aspect ratio (unused?).\n\n  var global_palette_offset = null;\n  var global_palette_size = null;\n\n  if (global_palette_flag) {\n    global_palette_offset = p;\n    global_palette_size = num_global_colors;\n    p += num_global_colors * 3; // Seek past palette.\n  }\n\n  var no_eof = true;\n\n  var frames = [];\n\n  var delay = 0;\n  var transparent_index = null;\n  var disposal = 0; // 0 - No disposal specified.\n  var loop_count = null;\n\n  this.width = width;\n  this.height = height;\n\n  while (no_eof && p < buf.length) {\n    switch (buf[p++]) {\n      case 0x21: // Graphics Control Extension Block\n        switch (buf[p++]) {\n          case 0xff: // Application specific block\n            // Try if it's a Netscape block (with animation loop counter).\n            if (\n              buf[p] !== 0x0b || // 21 FF already read, check block size.\n              // NETSCAPE2.0\n              (buf[p + 1] == 0x4e &&\n                buf[p + 2] == 0x45 &&\n                buf[p + 3] == 0x54 &&\n                buf[p + 4] == 0x53 &&\n                buf[p + 5] == 0x43 &&\n                buf[p + 6] == 0x41 &&\n                buf[p + 7] == 0x50 &&\n                buf[p + 8] == 0x45 &&\n                buf[p + 9] == 0x32 &&\n                buf[p + 10] == 0x2e &&\n                buf[p + 11] == 0x30 &&\n                // Sub-block\n                buf[p + 12] == 0x03 &&\n                buf[p + 13] == 0x01 &&\n                buf[p + 16] == 0)\n            ) {\n              p += 14;\n              loop_count = buf[p++] | (buf[p++] << 8);\n              p++; // Skip terminator.\n            } else {\n              // We don't know what it is, just try to get past it.\n              p += 12;\n              while (true) {\n                // Seek through subblocks.\n                var block_size = buf[p++];\n                // Bad block size (ex: undefined from an out of bounds read).\n                if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n                if (block_size === 0) break; // 0 size is terminator\n                p += block_size;\n              }\n            }\n            break;\n\n          case 0xf9: // Graphics Control Extension\n            if (buf[p++] !== 0x4 || buf[p + 4] !== 0)\n              throw new Error(\"Invalid graphics extension block.\");\n            var pf1 = buf[p++];\n            delay = buf[p++] | (buf[p++] << 8);\n            transparent_index = buf[p++];\n            if ((pf1 & 1) === 0) transparent_index = null;\n            disposal = (pf1 >> 2) & 0x7;\n            p++; // Skip terminator.\n            break;\n\n          case 0xfe: // Comment Extension.\n            while (true) {\n              // Seek through subblocks.\n              var block_size = buf[p++];\n              // Bad block size (ex: undefined from an out of bounds read).\n              if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n              if (block_size === 0) break; // 0 size is terminator\n              // console.log(buf.slice(p, p+block_size).toString('ascii'));\n              p += block_size;\n            }\n            break;\n\n          default:\n            throw new Error(\n              \"Unknown graphic control label: 0x\" + buf[p - 1].toString(16)\n            );\n        }\n        break;\n\n      case 0x2c: // Image Descriptor.\n        var x = buf[p++] | (buf[p++] << 8);\n        var y = buf[p++] | (buf[p++] << 8);\n        var w = buf[p++] | (buf[p++] << 8);\n        var h = buf[p++] | (buf[p++] << 8);\n        var pf2 = buf[p++];\n        var local_palette_flag = pf2 >> 7;\n        var interlace_flag = (pf2 >> 6) & 1;\n        var num_local_colors_pow2 = pf2 & 0x7;\n        var num_local_colors = 1 << (num_local_colors_pow2 + 1);\n        var palette_offset = global_palette_offset;\n        var palette_size = global_palette_size;\n        var has_local_palette = false;\n        if (local_palette_flag) {\n          var has_local_palette = true;\n          palette_offset = p; // Override with local palette.\n          palette_size = num_local_colors;\n          p += num_local_colors * 3; // Seek past palette.\n        }\n\n        var data_offset = p;\n\n        p++; // codesize\n        while (true) {\n          var block_size = buf[p++];\n          // Bad block size (ex: undefined from an out of bounds read).\n          if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n          if (block_size === 0) break; // 0 size is terminator\n          p += block_size;\n        }\n\n        frames.push({\n          x: x,\n          y: y,\n          width: w,\n          height: h,\n          has_local_palette: has_local_palette,\n          palette_offset: palette_offset,\n          palette_size: palette_size,\n          data_offset: data_offset,\n          data_length: p - data_offset,\n          transparent_index: transparent_index,\n          interlaced: !!interlace_flag,\n          delay: delay,\n          disposal: disposal\n        });\n        break;\n\n      case 0x3b: // Trailer Marker (end of file).\n        no_eof = false;\n        break;\n\n      default:\n        throw new Error(\"Unknown gif block: 0x\" + buf[p - 1].toString(16));\n        break;\n    }\n  }\n\n  this.numFrames = function() {\n    return frames.length;\n  };\n\n  this.loopCount = function() {\n    return loop_count;\n  };\n\n  this.frameInfo = function(frame_num) {\n    if (frame_num < 0 || frame_num >= frames.length)\n      throw new Error(\"Frame index out of range.\");\n    return frames[frame_num];\n  };\n\n  this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = b;\n        pixels[op++] = g;\n        pixels[op++] = r;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n\n  // I will go to copy and paste hell one day...\n  this.decodeAndBlitFrameRGBA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = r;\n        pixels[op++] = g;\n        pixels[op++] = b;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n}\n\nfunction GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {\n  var min_code_size = code_stream[p++];\n\n  var clear_code = 1 << min_code_size;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  // NOTE: This shares the same name as the encoder, but has a different\n  // meaning here.  Here this masks each code coming from the code stream.\n  var code_mask = (1 << cur_code_size) - 1;\n  var cur_shift = 0;\n  var cur = 0;\n\n  var op = 0; // Output pointer.\n\n  var subblock_size = code_stream[p++];\n\n  // TODO(deanm): Would using a TypedArray be any faster?  At least it would\n  // solve the fast mode / backing store uncertainty.\n  // var code_table = Array(4096);\n  var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.\n\n  var prev_code = null; // Track code-1.\n\n  while (true) {\n    // Read up to two bytes, making sure we always 12-bits for max sized code.\n    while (cur_shift < 16) {\n      if (subblock_size === 0) break; // No more data to be read.\n\n      cur |= code_stream[p++] << cur_shift;\n      cur_shift += 8;\n\n      if (subblock_size === 1) {\n        // Never let it get to 0 to hold logic above.\n        subblock_size = code_stream[p++]; // Next subblock.\n      } else {\n        --subblock_size;\n      }\n    }\n\n    // TODO(deanm): We should never really get here, we should have received\n    // and EOI.\n    if (cur_shift < cur_code_size) break;\n\n    var code = cur & code_mask;\n    cur >>= cur_code_size;\n    cur_shift -= cur_code_size;\n\n    // TODO(deanm): Maybe should check that the first code was a clear code,\n    // at least this is what you're supposed to do.  But actually our encoder\n    // now doesn't emit a clear code first anyway.\n    if (code === clear_code) {\n      // We don't actually have to clear the table.  This could be a good idea\n      // for greater error checking, but we don't really do any anyway.  We\n      // will just track it with next_code and overwrite old entries.\n\n      next_code = eoi_code + 1;\n      cur_code_size = min_code_size + 1;\n      code_mask = (1 << cur_code_size) - 1;\n\n      // Don't update prev_code ?\n      prev_code = null;\n      continue;\n    } else if (code === eoi_code) {\n      break;\n    }\n\n    // We have a similar situation as the decoder, where we want to store\n    // variable length entries (code table entries), but we want to do in a\n    // faster manner than an array of arrays.  The code below stores sort of a\n    // linked list within the code table, and then \"chases\" through it to\n    // construct the dictionary entries.  When a new entry is created, just the\n    // last byte is stored, and the rest (prefix) of the entry is only\n    // referenced by its table entry.  Then the code chases through the\n    // prefixes until it reaches a single byte code.  We have to chase twice,\n    // first to compute the length, and then to actually copy the data to the\n    // output (backwards, since we know the length).  The alternative would be\n    // storing something in an intermediate stack, but that doesn't make any\n    // more sense.  I implemented an approach where it also stored the length\n    // in the code table, although it's a bit tricky because you run out of\n    // bits (12 + 12 + 8), but I didn't measure much improvements (the table\n    // entries are generally not the long).  Even when I created benchmarks for\n    // very long table entries the complexity did not seem worth it.\n    // The code table stores the prefix entry in 12 bits and then the suffix\n    // byte in 8 bits, so each entry is 20 bits.\n\n    var chase_code = code < next_code ? code : prev_code;\n\n    // Chase what we will output, either {CODE} or {CODE-1}.\n    var chase_length = 0;\n    var chase = chase_code;\n    while (chase > clear_code) {\n      chase = code_table[chase] >> 8;\n      ++chase_length;\n    }\n\n    var k = chase;\n\n    var op_end = op + chase_length + (chase_code !== code ? 1 : 0);\n    if (op_end > output_length) {\n      console.log(\"Warning, gif stream longer than expected.\");\n      return;\n    }\n\n    // Already have the first byte from the chase, might as well write it fast.\n    output[op++] = k;\n\n    op += chase_length;\n    var b = op; // Track pointer, writing backwards.\n\n    if (chase_code !== code)\n      // The case of emitting {CODE-1} + k.\n      output[op++] = k;\n\n    chase = chase_code;\n    while (chase_length--) {\n      chase = code_table[chase];\n      output[--b] = chase & 0xff; // Write backwards.\n      chase >>= 8; // Pull down to the prefix code.\n    }\n\n    if (prev_code !== null && next_code < 4096) {\n      code_table[next_code++] = (prev_code << 8) | k;\n      // TODO(deanm): Figure out this clearing vs code growth logic better.  I\n      // have an feeling that it should just happen somewhere else, for now it\n      // is awkward between when we grow past the max and then hit a clear code.\n      // For now just check if we hit the max 12-bits (then a clear code should\n      // follow, also of course encoded in 12-bits).\n      if (next_code >= code_mask + 1 && cur_code_size < 12) {\n        ++cur_code_size;\n        code_mask = (code_mask << 1) | 1;\n      }\n    }\n\n    prev_code = code;\n  }\n\n  if (op !== output_length) {\n    console.log(\"Warning, gif stream shorter than expected.\");\n  }\n\n  return output;\n}\n\nexport { GifReader, GifWriter };\n","/**\n * @license\n  Copyright (c) 2008, Adobe Systems Incorporated\n  All rights reserved.\n\n  Redistribution and use in source and binary forms, with or without \n  modification, are permitted provided that the following conditions are\n  met:\n\n  * Redistributions of source code must retain the above copyright notice, \n    this list of conditions and the following disclaimer.\n  \n  * Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the \n    documentation and/or other materials provided with the distribution.\n  \n  * Neither the name of Adobe Systems Incorporated nor the names of its \n    contributors may be used to endorse or promote products derived from \n    this software without specific prior written permission.\n\n  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n  IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \n  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*\nJPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n\nBasic GUI blocking jpeg encoder\n*/\n\nfunction JPEGEncoder(quality) {\n  var ffloor = Math.floor;\n  var YTable = new Array(64);\n  var UVTable = new Array(64);\n  var fdtbl_Y = new Array(64);\n  var fdtbl_UV = new Array(64);\n  var YDC_HT;\n  var UVDC_HT;\n  var YAC_HT;\n  var UVAC_HT;\n\n  var bitcode = new Array(65535);\n  var category = new Array(65535);\n  var outputfDCTQuant = new Array(64);\n  var DU = new Array(64);\n  var byteout = [];\n  var bytenew = 0;\n  var bytepos = 7;\n\n  var YDU = new Array(64);\n  var UDU = new Array(64);\n  var VDU = new Array(64);\n  var clt = new Array(256);\n  var RGB_YUV_TABLE = new Array(2048);\n  var currentQuality;\n\n  var ZigZag = [\n    0,\n    1,\n    5,\n    6,\n    14,\n    15,\n    27,\n    28,\n    2,\n    4,\n    7,\n    13,\n    16,\n    26,\n    29,\n    42,\n    3,\n    8,\n    12,\n    17,\n    25,\n    30,\n    41,\n    43,\n    9,\n    11,\n    18,\n    24,\n    31,\n    40,\n    44,\n    53,\n    10,\n    19,\n    23,\n    32,\n    39,\n    45,\n    52,\n    54,\n    20,\n    22,\n    33,\n    38,\n    46,\n    51,\n    55,\n    60,\n    21,\n    34,\n    37,\n    47,\n    50,\n    56,\n    59,\n    61,\n    35,\n    36,\n    48,\n    49,\n    57,\n    58,\n    62,\n    63\n  ];\n\n  var std_dc_luminance_nrcodes = [\n    0,\n    0,\n    1,\n    5,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_luminance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    3,\n    3,\n    2,\n    4,\n    3,\n    5,\n    5,\n    4,\n    4,\n    0,\n    0,\n    1,\n    0x7d\n  ];\n  var std_ac_luminance_values = [\n    0x01,\n    0x02,\n    0x03,\n    0x00,\n    0x04,\n    0x11,\n    0x05,\n    0x12,\n    0x21,\n    0x31,\n    0x41,\n    0x06,\n    0x13,\n    0x51,\n    0x61,\n    0x07,\n    0x22,\n    0x71,\n    0x14,\n    0x32,\n    0x81,\n    0x91,\n    0xa1,\n    0x08,\n    0x23,\n    0x42,\n    0xb1,\n    0xc1,\n    0x15,\n    0x52,\n    0xd1,\n    0xf0,\n    0x24,\n    0x33,\n    0x62,\n    0x72,\n    0x82,\n    0x09,\n    0x0a,\n    0x16,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x25,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x34,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe1,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf1,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  var std_dc_chrominance_nrcodes = [\n    0,\n    0,\n    3,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_chrominance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    2,\n    4,\n    4,\n    3,\n    4,\n    7,\n    5,\n    4,\n    4,\n    0,\n    1,\n    2,\n    0x77\n  ];\n  var std_ac_chrominance_values = [\n    0x00,\n    0x01,\n    0x02,\n    0x03,\n    0x11,\n    0x04,\n    0x05,\n    0x21,\n    0x31,\n    0x06,\n    0x12,\n    0x41,\n    0x51,\n    0x07,\n    0x61,\n    0x71,\n    0x13,\n    0x22,\n    0x32,\n    0x81,\n    0x08,\n    0x14,\n    0x42,\n    0x91,\n    0xa1,\n    0xb1,\n    0xc1,\n    0x09,\n    0x23,\n    0x33,\n    0x52,\n    0xf0,\n    0x15,\n    0x62,\n    0x72,\n    0xd1,\n    0x0a,\n    0x16,\n    0x24,\n    0x34,\n    0xe1,\n    0x25,\n    0xf1,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x82,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  function initQuantTables(sf) {\n    var YQT = [\n      16,\n      11,\n      10,\n      16,\n      24,\n      40,\n      51,\n      61,\n      12,\n      12,\n      14,\n      19,\n      26,\n      58,\n      60,\n      55,\n      14,\n      13,\n      16,\n      24,\n      40,\n      57,\n      69,\n      56,\n      14,\n      17,\n      22,\n      29,\n      51,\n      87,\n      80,\n      62,\n      18,\n      22,\n      37,\n      56,\n      68,\n      109,\n      103,\n      77,\n      24,\n      35,\n      55,\n      64,\n      81,\n      104,\n      113,\n      92,\n      49,\n      64,\n      78,\n      87,\n      103,\n      121,\n      120,\n      101,\n      72,\n      92,\n      95,\n      98,\n      112,\n      100,\n      103,\n      99\n    ];\n\n    for (var i = 0; i < 64; i++) {\n      var t = ffloor((YQT[i] * sf + 50) / 100);\n      t = Math.min(Math.max(t, 1), 255);\n      YTable[ZigZag[i]] = t;\n    }\n    var UVQT = [\n      17,\n      18,\n      24,\n      47,\n      99,\n      99,\n      99,\n      99,\n      18,\n      21,\n      26,\n      66,\n      99,\n      99,\n      99,\n      99,\n      24,\n      26,\n      56,\n      99,\n      99,\n      99,\n      99,\n      99,\n      47,\n      66,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99\n    ];\n    for (var j = 0; j < 64; j++) {\n      var u = ffloor((UVQT[j] * sf + 50) / 100);\n      u = Math.min(Math.max(u, 1), 255);\n      UVTable[ZigZag[j]] = u;\n    }\n    var aasf = [\n      1.0,\n      1.387039845,\n      1.306562965,\n      1.175875602,\n      1.0,\n      0.785694958,\n      0.5411961,\n      0.275899379\n    ];\n    var k = 0;\n    for (var row = 0; row < 8; row++) {\n      for (var col = 0; col < 8; col++) {\n        fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        k++;\n      }\n    }\n  }\n\n  function computeHuffmanTbl(nrcodes, std_table) {\n    var codevalue = 0;\n    var pos_in_table = 0;\n    var HT = new Array();\n    for (var k = 1; k <= 16; k++) {\n      for (var j = 1; j <= nrcodes[k]; j++) {\n        HT[std_table[pos_in_table]] = [];\n        HT[std_table[pos_in_table]][0] = codevalue;\n        HT[std_table[pos_in_table]][1] = k;\n        pos_in_table++;\n        codevalue++;\n      }\n      codevalue *= 2;\n    }\n    return HT;\n  }\n\n  function initHuffmanTbl() {\n    YDC_HT = computeHuffmanTbl(\n      std_dc_luminance_nrcodes,\n      std_dc_luminance_values\n    );\n    UVDC_HT = computeHuffmanTbl(\n      std_dc_chrominance_nrcodes,\n      std_dc_chrominance_values\n    );\n    YAC_HT = computeHuffmanTbl(\n      std_ac_luminance_nrcodes,\n      std_ac_luminance_values\n    );\n    UVAC_HT = computeHuffmanTbl(\n      std_ac_chrominance_nrcodes,\n      std_ac_chrominance_values\n    );\n  }\n\n  function initCategoryNumber() {\n    var nrlower = 1;\n    var nrupper = 2;\n    for (var cat = 1; cat <= 15; cat++) {\n      //Positive numbers\n      for (var nr = nrlower; nr < nrupper; nr++) {\n        category[32767 + nr] = cat;\n        bitcode[32767 + nr] = [];\n        bitcode[32767 + nr][1] = cat;\n        bitcode[32767 + nr][0] = nr;\n      }\n      //Negative numbers\n      for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {\n        category[32767 + nrneg] = cat;\n        bitcode[32767 + nrneg] = [];\n        bitcode[32767 + nrneg][1] = cat;\n        bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;\n      }\n      nrlower <<= 1;\n      nrupper <<= 1;\n    }\n  }\n\n  function initRGBYUVTable() {\n    for (var i = 0; i < 256; i++) {\n      RGB_YUV_TABLE[i] = 19595 * i;\n      RGB_YUV_TABLE[(i + 256) >> 0] = 38470 * i;\n      RGB_YUV_TABLE[(i + 512) >> 0] = 7471 * i + 0x8000;\n      RGB_YUV_TABLE[(i + 768) >> 0] = -11059 * i;\n      RGB_YUV_TABLE[(i + 1024) >> 0] = -21709 * i;\n      RGB_YUV_TABLE[(i + 1280) >> 0] = 32768 * i + 0x807fff;\n      RGB_YUV_TABLE[(i + 1536) >> 0] = -27439 * i;\n      RGB_YUV_TABLE[(i + 1792) >> 0] = -5329 * i;\n    }\n  }\n\n  // IO functions\n  function writeBits(bs) {\n    var value = bs[0];\n    var posval = bs[1] - 1;\n    while (posval >= 0) {\n      if (value & (1 << posval)) {\n        bytenew |= 1 << bytepos;\n      }\n      posval--;\n      bytepos--;\n      if (bytepos < 0) {\n        if (bytenew == 0xff) {\n          writeByte(0xff);\n          writeByte(0);\n        } else {\n          writeByte(bytenew);\n        }\n        bytepos = 7;\n        bytenew = 0;\n      }\n    }\n  }\n\n  function writeByte(value) {\n    //byteout.push(clt[value]); // write char directly instead of converting later\n    byteout.push(value);\n  }\n\n  function writeWord(value) {\n    writeByte((value >> 8) & 0xff);\n    writeByte(value & 0xff);\n  }\n\n  // DCT & quantization core\n  function fDCTQuant(data, fdtbl) {\n    var d0, d1, d2, d3, d4, d5, d6, d7;\n    /* Pass 1: process rows. */\n    var dataOff = 0;\n    var i;\n    var I8 = 8;\n    var I64 = 64;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 1];\n      d2 = data[dataOff + 2];\n      d3 = data[dataOff + 3];\n      d4 = data[dataOff + 4];\n      d5 = data[dataOff + 5];\n      d6 = data[dataOff + 6];\n      d7 = data[dataOff + 7];\n\n      var tmp0 = d0 + d7;\n      var tmp7 = d0 - d7;\n      var tmp1 = d1 + d6;\n      var tmp6 = d1 - d6;\n      var tmp2 = d2 + d5;\n      var tmp5 = d2 - d5;\n      var tmp3 = d3 + d4;\n      var tmp4 = d3 - d4;\n\n      /* Even part */\n      var tmp10 = tmp0 + tmp3; /* phase 2 */\n      var tmp13 = tmp0 - tmp3;\n      var tmp11 = tmp1 + tmp2;\n      var tmp12 = tmp1 - tmp2;\n\n      data[dataOff] = tmp10 + tmp11; /* phase 3 */\n      data[dataOff + 4] = tmp10 - tmp11;\n\n      var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n      data[dataOff + 2] = tmp13 + z1; /* phase 5 */\n      data[dataOff + 6] = tmp13 - z1;\n\n      /* Odd part */\n      tmp10 = tmp4 + tmp5; /* phase 2 */\n      tmp11 = tmp5 + tmp6;\n      tmp12 = tmp6 + tmp7;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n      var z2 = 0.5411961 * tmp10 + z5; /* c2-c6 */\n      var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n      var z3 = tmp11 * 0.707106781; /* c4 */\n\n      var z11 = tmp7 + z3; /* phase 5 */\n      var z13 = tmp7 - z3;\n\n      data[dataOff + 5] = z13 + z2; /* phase 6 */\n      data[dataOff + 3] = z13 - z2;\n      data[dataOff + 1] = z11 + z4;\n      data[dataOff + 7] = z11 - z4;\n\n      dataOff += 8; /* advance pointer to next row */\n    }\n\n    /* Pass 2: process columns. */\n    dataOff = 0;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 8];\n      d2 = data[dataOff + 16];\n      d3 = data[dataOff + 24];\n      d4 = data[dataOff + 32];\n      d5 = data[dataOff + 40];\n      d6 = data[dataOff + 48];\n      d7 = data[dataOff + 56];\n\n      var tmp0p2 = d0 + d7;\n      var tmp7p2 = d0 - d7;\n      var tmp1p2 = d1 + d6;\n      var tmp6p2 = d1 - d6;\n      var tmp2p2 = d2 + d5;\n      var tmp5p2 = d2 - d5;\n      var tmp3p2 = d3 + d4;\n      var tmp4p2 = d3 - d4;\n\n      /* Even part */\n      var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n      var tmp13p2 = tmp0p2 - tmp3p2;\n      var tmp11p2 = tmp1p2 + tmp2p2;\n      var tmp12p2 = tmp1p2 - tmp2p2;\n\n      data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n      data[dataOff + 32] = tmp10p2 - tmp11p2;\n\n      var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n      data[dataOff + 16] = tmp13p2 + z1p2; /* phase 5 */\n      data[dataOff + 48] = tmp13p2 - z1p2;\n\n      /* Odd part */\n      tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n      tmp11p2 = tmp5p2 + tmp6p2;\n      tmp12p2 = tmp6p2 + tmp7p2;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n      var z2p2 = 0.5411961 * tmp10p2 + z5p2; /* c2-c6 */\n      var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n      var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\n      var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n      var z13p2 = tmp7p2 - z3p2;\n\n      data[dataOff + 40] = z13p2 + z2p2; /* phase 6 */\n      data[dataOff + 24] = z13p2 - z2p2;\n      data[dataOff + 8] = z11p2 + z4p2;\n      data[dataOff + 56] = z11p2 - z4p2;\n\n      dataOff++; /* advance pointer to next column */\n    }\n\n    // Quantize/descale the coefficients\n    var fDCTQuant;\n    for (i = 0; i < I64; ++i) {\n      // Apply the quantization and scaling factor & Round to nearest integer\n      fDCTQuant = data[i] * fdtbl[i];\n      outputfDCTQuant[i] =\n        fDCTQuant > 0.0 ? (fDCTQuant + 0.5) | 0 : (fDCTQuant - 0.5) | 0;\n      //outputfDCTQuant[i] = fround(fDCTQuant);\n    }\n    return outputfDCTQuant;\n  }\n\n  function writeAPP0() {\n    writeWord(0xffe0); // marker\n    writeWord(16); // length\n    writeByte(0x4a); // J\n    writeByte(0x46); // F\n    writeByte(0x49); // I\n    writeByte(0x46); // F\n    writeByte(0); // = \"JFIF\",'\\0'\n    writeByte(1); // versionhi\n    writeByte(1); // versionlo\n    writeByte(0); // xyunits\n    writeWord(1); // xdensity\n    writeWord(1); // ydensity\n    writeByte(0); // thumbnwidth\n    writeByte(0); // thumbnheight\n  }\n\n  function writeSOF0(width, height) {\n    writeWord(0xffc0); // marker\n    writeWord(17); // length, truecolor YUV JPG\n    writeByte(8); // precision\n    writeWord(height);\n    writeWord(width);\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0x11); // HVY\n    writeByte(0); // QTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HVU\n    writeByte(1); // QTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HVV\n    writeByte(1); // QTV\n  }\n\n  function writeDQT() {\n    writeWord(0xffdb); // marker\n    writeWord(132); // length\n    writeByte(0);\n    for (var i = 0; i < 64; i++) {\n      writeByte(YTable[i]);\n    }\n    writeByte(1);\n    for (var j = 0; j < 64; j++) {\n      writeByte(UVTable[j]);\n    }\n  }\n\n  function writeDHT() {\n    writeWord(0xffc4); // marker\n    writeWord(0x01a2); // length\n\n    writeByte(0); // HTYDCinfo\n    for (var i = 0; i < 16; i++) {\n      writeByte(std_dc_luminance_nrcodes[i + 1]);\n    }\n    for (var j = 0; j <= 11; j++) {\n      writeByte(std_dc_luminance_values[j]);\n    }\n\n    writeByte(0x10); // HTYACinfo\n    for (var k = 0; k < 16; k++) {\n      writeByte(std_ac_luminance_nrcodes[k + 1]);\n    }\n    for (var l = 0; l <= 161; l++) {\n      writeByte(std_ac_luminance_values[l]);\n    }\n\n    writeByte(1); // HTUDCinfo\n    for (var m = 0; m < 16; m++) {\n      writeByte(std_dc_chrominance_nrcodes[m + 1]);\n    }\n    for (var n = 0; n <= 11; n++) {\n      writeByte(std_dc_chrominance_values[n]);\n    }\n\n    writeByte(0x11); // HTUACinfo\n    for (var o = 0; o < 16; o++) {\n      writeByte(std_ac_chrominance_nrcodes[o + 1]);\n    }\n    for (var p = 0; p <= 161; p++) {\n      writeByte(std_ac_chrominance_values[p]);\n    }\n  }\n\n  function writeSOS() {\n    writeWord(0xffda); // marker\n    writeWord(12); // length\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0); // HTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HTV\n    writeByte(0); // Ss\n    writeByte(0x3f); // Se\n    writeByte(0); // Bf\n  }\n\n  function processDU(CDU, fdtbl, DC, HTDC, HTAC) {\n    var EOB = HTAC[0x00];\n    var M16zeroes = HTAC[0xf0];\n    var pos;\n    var I16 = 16;\n    var I63 = 63;\n    var I64 = 64;\n    var DU_DCT = fDCTQuant(CDU, fdtbl);\n    //ZigZag reorder\n    for (var j = 0; j < I64; ++j) {\n      DU[ZigZag[j]] = DU_DCT[j];\n    }\n    var Diff = DU[0] - DC;\n    DC = DU[0];\n    //Encode DC\n    if (Diff == 0) {\n      writeBits(HTDC[0]); // Diff might be 0\n    } else {\n      pos = 32767 + Diff;\n      writeBits(HTDC[category[pos]]);\n      writeBits(bitcode[pos]);\n    }\n    //Encode ACs\n    var end0pos = 63; // was const... which is crazy\n    while (end0pos > 0 && DU[end0pos] == 0) {\n      end0pos--;\n    }\n    //end0pos = first element in reverse order !=0\n    if (end0pos == 0) {\n      writeBits(EOB);\n      return DC;\n    }\n    var i = 1;\n    var lng;\n    while (i <= end0pos) {\n      var startpos = i;\n      while (DU[i] == 0 && i <= end0pos) {\n        ++i;\n      }\n      var nrzeroes = i - startpos;\n      if (nrzeroes >= I16) {\n        lng = nrzeroes >> 4;\n        for (var nrmarker = 1; nrmarker <= lng; ++nrmarker)\n          writeBits(M16zeroes);\n        nrzeroes = nrzeroes & 0xf;\n      }\n      pos = 32767 + DU[i];\n      writeBits(HTAC[(nrzeroes << 4) + category[pos]]);\n      writeBits(bitcode[pos]);\n      i++;\n    }\n    if (end0pos != I63) {\n      writeBits(EOB);\n    }\n    return DC;\n  }\n\n  function initCharLookupTable() {\n    var sfcc = String.fromCharCode;\n    for (var i = 0; i < 256; i++) {\n      ///// ACHTUNG // 255\n      clt[i] = sfcc(i);\n    }\n  }\n\n  this.encode = function(\n    image,\n    quality // image data object\n  ) {\n    if (quality) setQuality(quality);\n\n    // Initialize bit writer\n    byteout = new Array();\n    bytenew = 0;\n    bytepos = 7;\n\n    // Add JPEG headers\n    writeWord(0xffd8); // SOI\n    writeAPP0();\n    writeDQT();\n    writeSOF0(image.width, image.height);\n    writeDHT();\n    writeSOS();\n\n    // Encode 8x8 macroblocks\n    var DCY = 0;\n    var DCU = 0;\n    var DCV = 0;\n\n    bytenew = 0;\n    bytepos = 7;\n\n    this.encode.displayName = \"_encode_\";\n\n    var imageData = image.data;\n    var width = image.width;\n    var height = image.height;\n\n    var quadWidth = width * 4;\n\n    var x,\n      y = 0;\n    var r, g, b;\n    var start, p, col, row, pos;\n    while (y < height) {\n      x = 0;\n      while (x < quadWidth) {\n        start = quadWidth * y + x;\n        col = -1;\n        row = 0;\n\n        for (pos = 0; pos < 64; pos++) {\n          row = pos >> 3; // /8\n          col = (pos & 7) * 4; // %8\n          p = start + row * quadWidth + col;\n\n          if (y + row >= height) {\n            // padding bottom\n            p -= quadWidth * (y + 1 + row - height);\n          }\n\n          if (x + col >= quadWidth) {\n            // padding right\n            p -= x + col - quadWidth + 4;\n          }\n\n          r = imageData[p++];\n          g = imageData[p++];\n          b = imageData[p++];\n\n          /* // calculate YUV values dynamically\n\t\t\t\t\tYDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n\t\t\t\t\tUDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n\t\t\t\t\tVDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n\t\t\t\t\t*/\n\n          // use lookup table (slightly faster)\n          YDU[pos] =\n            ((RGB_YUV_TABLE[r] +\n              RGB_YUV_TABLE[(g + 256) >> 0] +\n              RGB_YUV_TABLE[(b + 512) >> 0]) >>\n              16) -\n            128;\n          UDU[pos] =\n            ((RGB_YUV_TABLE[(r + 768) >> 0] +\n              RGB_YUV_TABLE[(g + 1024) >> 0] +\n              RGB_YUV_TABLE[(b + 1280) >> 0]) >>\n              16) -\n            128;\n          VDU[pos] =\n            ((RGB_YUV_TABLE[(r + 1280) >> 0] +\n              RGB_YUV_TABLE[(g + 1536) >> 0] +\n              RGB_YUV_TABLE[(b + 1792) >> 0]) >>\n              16) -\n            128;\n        }\n\n        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n        x += 32;\n      }\n      y += 8;\n    }\n\n    ////////////////////////////////////////////////////////////////\n\n    // Do the bit alignment of the EOI marker\n    if (bytepos >= 0) {\n      var fillbits = [];\n      fillbits[1] = bytepos + 1;\n      fillbits[0] = (1 << (bytepos + 1)) - 1;\n      writeBits(fillbits);\n    }\n\n    writeWord(0xffd9); //EOI\n\n    return new Uint8Array(byteout);\n  };\n\n  function setQuality(quality) {\n    quality = Math.min(Math.max(quality, 1), 100);\n\n    if (currentQuality == quality) return; // don't recalc if unchanged\n\n    var sf =\n      quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);\n\n    initQuantTables(sf);\n    currentQuality = quality;\n    //console.log('Quality set to: '+quality +'%');\n  }\n\n  function init() {\n    quality = quality || 50;\n    // Create tables\n    initCharLookupTable();\n    initHuffmanTbl();\n    initCategoryNumber();\n    initRGBYUVTable();\n\n    setQuality(quality);\n  }\n  init();\n}\n\nexport { JPEGEncoder };\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { GifReader } from \"../libs/omggif.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\n\n/**\n * jsPDF Gif Support PlugIn\n *\n * @name gif_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processGIF89A = function(imageData, index, alias, compression) {\n    var reader = new GifReader(imageData);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = [];\n\n    reader.decodeAndBlitFrameRGBA(0, pixels);\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n\n  jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;\n})(jsPDF.API);\n","/**\n * @author shaozilee\n *\n * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp\n *\n */\n\nimport { console } from \"./console.js\";\n\nfunction BmpDecoder(buffer, is_with_alpha) {\n  this.pos = 0;\n  this.buffer = buffer;\n  this.datav = new DataView(buffer.buffer);\n  this.is_with_alpha = !!is_with_alpha;\n  this.bottom_up = true;\n  this.flag =\n    String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);\n  this.pos += 2;\n  if ([\"BM\", \"BA\", \"CI\", \"CP\", \"IC\", \"PT\"].indexOf(this.flag) === -1)\n    throw new Error(\"Invalid BMP File\");\n  this.parseHeader();\n  this.parseBGR();\n}\n\nBmpDecoder.prototype.parseHeader = function() {\n  this.fileSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.reserved = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.offset = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.headerSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.width = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.height = this.datav.getInt32(this.pos, true);\n  this.pos += 4;\n  this.planes = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.bitPP = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.compress = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.rawSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.hr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.vr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.colors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.importantColors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n\n  if (this.bitPP === 16 && this.is_with_alpha) {\n    this.bitPP = 15;\n  }\n  if (this.bitPP < 15) {\n    var len = this.colors === 0 ? 1 << this.bitPP : this.colors;\n    this.palette = new Array(len);\n    for (var i = 0; i < len; i++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var quad = this.datav.getUint8(this.pos++, true);\n      this.palette[i] = {\n        red: red,\n        green: green,\n        blue: blue,\n        quad: quad\n      };\n    }\n  }\n  if (this.height < 0) {\n    this.height *= -1;\n    this.bottom_up = false;\n  }\n};\n\nBmpDecoder.prototype.parseBGR = function() {\n  this.pos = this.offset;\n  try {\n    var bitn = \"bit\" + this.bitPP;\n    var len = this.width * this.height * 4;\n    this.data = new Uint8Array(len);\n\n    this[bitn]();\n  } catch (e) {\n    console.log(\"bit decode error:\" + e);\n  }\n};\n\nBmpDecoder.prototype.bit1 = function() {\n  var xlen = Math.ceil(this.width / 8);\n  var mode = xlen % 4;\n  var y;\n  for (y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 8 * 4;\n      for (var i = 0; i < 8; i++) {\n        if (x * 8 + i < this.width) {\n          var rgb = this.palette[(b >> (7 - i)) & 0x1];\n          this.data[location + i * 4] = rgb.blue;\n          this.data[location + i * 4 + 1] = rgb.green;\n          this.data[location + i * 4 + 2] = rgb.red;\n          this.data[location + i * 4 + 3] = 0xff;\n        } else {\n          break;\n        }\n      }\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit4 = function() {\n  var xlen = Math.ceil(this.width / 2);\n  var mode = xlen % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 2 * 4;\n\n      var before = b >> 4;\n      var after = b & 0x0f;\n\n      var rgb = this.palette[before];\n      this.data[location] = rgb.blue;\n      this.data[location + 1] = rgb.green;\n      this.data[location + 2] = rgb.red;\n      this.data[location + 3] = 0xff;\n\n      if (x * 2 + 1 >= this.width) break;\n\n      rgb = this.palette[after];\n      this.data[location + 4] = rgb.blue;\n      this.data[location + 4 + 1] = rgb.green;\n      this.data[location + 4 + 2] = rgb.red;\n      this.data[location + 4 + 3] = 0xff;\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit8 = function() {\n  var mode = this.width % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      if (b < this.palette.length) {\n        var rgb = this.palette[b];\n        this.data[location] = rgb.red;\n        this.data[location + 1] = rgb.green;\n        this.data[location + 2] = rgb.blue;\n        this.data[location + 3] = 0xff;\n      } else {\n        this.data[location] = 0xff;\n        this.data[location + 1] = 0xff;\n        this.data[location + 2] = 0xff;\n        this.data[location + 3] = 0xff;\n      }\n    }\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit15 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_5) / _1_5) * 255) | 0;\n      var red = ((((B >> 10) & _1_5) / _1_5) * 255) | 0;\n      var alpha = B >> 15 ? 0xff : 0x00;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit16 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  var _111111 = parseInt(\"111111\", 2),\n    _1_6 = _111111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var alpha = 0xff;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_6) / _1_6) * 255) | 0;\n      var red = (((B >> 11) / _1_5) * 255) | 0;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit24 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = 0xff;\n    }\n    //skip extra bytes\n    this.pos += this.width % 4;\n  }\n};\n\n/**\n * add 32bit decode func\n * @author soubok\n */\nBmpDecoder.prototype.bit32 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var alpha = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    //this.pos += (this.width % 4);\n  }\n};\n\nBmpDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { BmpDecoder };\n","import { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { BmpDecoder } from \"../libs/BMPDecoder.js\";\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @license\n * Copyright (c) 2018 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF bmp Support PlugIn\n * @name bmp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processBMP = function(imageData, index, alias, compression) {\n    var reader = new BmpDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","function WebPDecoder(imageData) {\n  /** @license\n   * Copyright 2011 Google Inc.\n   *\n   * This code is licensed under the same terms as WebM:\n   *  Software License Agreement:  http://www.webmproject.org/license/software/\n   *  Additional IP Rights Grant:  http://www.webmproject.org/license/additional/\n   * -----------------------------------------------------------------------------\n   *\n   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n   * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n   * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n   * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n   *\n   * -----------------------------------------------------------------------------\n   *\n   * Copyright 2011-2017 Dominik Homberger\n   * Libwebp Javascript / libwebpjs - the libwebp implementation in javascript (v0.6.0)\n   *\n   * Author: Dominik Homberger (dominik.homberger@gmail.com)\n   */\n\n  var self = this;\n  var UpsampleRgbLinePair,\n    UpsampleBgrLinePair,\n    UpsampleRgbaLinePair,\n    UpsampleBgraLinePair,\n    UpsampleArgbLinePair,\n    UpsampleArgbLinePair,\n    UpsampleRgba4444LinePair,\n    UpsampleRgb565LinePair;\n\n  function x(F) {\n    if (!F) throw Error(\"assert :P\");\n  }\n  function fa(F, L, J) {\n    for (var H = 0; 4 > H; H++) if (F[L + H] != J.charCodeAt(H)) return !0;\n    return !1;\n  }\n  function I(F, L, J, H, Z) {\n    for (var O = 0; O < Z; O++) F[L + O] = J[H + O];\n  }\n  function M(F, L, J, H) {\n    for (var Z = 0; Z < H; Z++) F[L + Z] = J;\n  }\n  function V(F) {\n    return new Int32Array(F);\n  }\n  function wa(F, L) {\n    for (var J = [], H = 0; H < F; H++) J.push(new L());\n    return J;\n  }\n  function wb() {\n    function F(J, H, Z) {\n      for (var O = Z[H], L = 0; L < O; L++) {\n        J.push(Z.length > H + 1 ? [] : 0);\n        if (Z.length < H + 1) break;\n        F(J[L], H + 1, Z);\n      }\n    }\n    var L = [];\n    F(L, 0, [3, 11]);\n    return L;\n  }\n  function Ed(F, L) {\n    function J(H, O, F) {\n      for (var Z = F[O], ma = 0; ma < Z; ma++) {\n        H.push(F.length > O + 1 ? [] : new L());\n        if (F.length < O + 1) break;\n        J(H[ma], O + 1, F);\n      }\n    }\n    var H = [];\n    J(H, 0, F);\n    return H;\n  }\n  var _WebPDecoder = function() {\n    var self = this;\n    function F() {\n      V(55);\n    }\n    function L(a, b) {\n      for (var c = (1 << (b - 1)) >>> 0; a & c; ) c >>>= 1;\n      return c ? (a & (c - 1)) + c : a;\n    }\n    function J(a, b, c, d, e) {\n      x(!(d % c));\n      do (d -= c), (a[b + d] = e);\n      while (0 < d);\n    }\n    function H(a, b, c, d, e, f) {\n      var g = b,\n        h = 1 << c,\n        k,\n        l,\n        m = V(16),\n        n = V(16);\n      x(0 != e);\n      x(null != d);\n      x(null != a);\n      x(0 < c);\n      for (l = 0; l < e; ++l) {\n        if (15 < d[l]) return 0;\n        ++m[d[l]];\n      }\n      if (m[0] == e) return 0;\n      n[1] = 0;\n      for (k = 1; 15 > k; ++k) {\n        if (m[k] > 1 << k) return 0;\n        n[k + 1] = n[k] + m[k];\n      }\n      for (l = 0; l < e; ++l) (k = d[l]), 0 < d[l] && (f[n[k]++] = l);\n      if (1 == n[15])\n        return (d = new O()), (d.g = 0), (d.value = f[0]), J(a, g, 1, h, d), h;\n      var r = -1,\n        q = h - 1,\n        t = 0,\n        v = 1,\n        p = 1,\n        u,\n        w = 1 << c;\n      l = 0;\n      k = 1;\n      for (e = 2; k <= c; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k])\n          (d = new O()),\n            (d.g = k),\n            (d.value = f[l++]),\n            J(a, g + t, e, w, d),\n            (t = L(t, k));\n      }\n      k = c + 1;\n      for (e = 2; 15 >= k; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k]) {\n          d = new O();\n          if ((t & q) != r) {\n            g += w;\n            r = k;\n            for (u = 1 << (r - c); 15 > r; ) {\n              u -= m[r];\n              if (0 >= u) break;\n              ++r;\n              u <<= 1;\n            }\n            u = r - c;\n            w = 1 << u;\n            h += w;\n            r = t & q;\n            a[b + r].g = u + c;\n            a[b + r].value = g - b - r;\n          }\n          d.g = k - c;\n          d.value = f[l++];\n          J(a, g + (t >> c), e, w, d);\n          t = L(t, k);\n        }\n      }\n      return v != 2 * n[15] - 1 ? 0 : h;\n    }\n    function Z(a, b, c, d, e) {\n      x(2328 >= e);\n      if (512 >= e) var f = V(512);\n      else if (((f = V(e)), null == f)) return 0;\n      return H(a, b, c, d, e, f);\n    }\n    function O() {\n      this.value = this.g = 0;\n    }\n    function Fd() {\n      this.value = this.g = 0;\n    }\n    function Ub() {\n      this.G = wa(5, O);\n      this.H = V(5);\n      this.jc = this.Qb = this.qb = this.nd = 0;\n      this.pd = wa(xb, Fd);\n    }\n    function ma(a, b, c, d) {\n      x(null != a);\n      x(null != b);\n      x(2147483648 > d);\n      a.Ca = 254;\n      a.I = 0;\n      a.b = -8;\n      a.Ka = 0;\n      a.oa = b;\n      a.pa = c;\n      a.Jd = b;\n      a.Yc = c + d;\n      a.Zc = 4 <= d ? c + d - 4 + 1 : c;\n      Qa(a);\n    }\n    function na(a, b) {\n      for (var c = 0; 0 < b--; ) c |= K(a, 128) << b;\n      return c;\n    }\n    function ca(a, b) {\n      var c = na(a, b);\n      return G(a) ? -c : c;\n    }\n    function cb(a, b, c, d) {\n      var e,\n        f = 0;\n      x(null != a);\n      x(null != b);\n      x(4294967288 > d);\n      a.Sb = d;\n      a.Ra = 0;\n      a.u = 0;\n      a.h = 0;\n      4 < d && (d = 4);\n      for (e = 0; e < d; ++e) f += b[c + e] << (8 * e);\n      a.Ra = f;\n      a.bb = d;\n      a.oa = b;\n      a.pa = c;\n    }\n    function Vb(a) {\n      for (; 8 <= a.u && a.bb < a.Sb; )\n        (a.Ra >>>= 8),\n          (a.Ra += (a.oa[a.pa + a.bb] << (ob - 8)) >>> 0),\n          ++a.bb,\n          (a.u -= 8);\n      db(a) && ((a.h = 1), (a.u = 0));\n    }\n    function D(a, b) {\n      x(0 <= b);\n      if (!a.h && b <= Gd) {\n        var c = pb(a) & Hd[b];\n        a.u += b;\n        Vb(a);\n        return c;\n      }\n      a.h = 1;\n      return (a.u = 0);\n    }\n    function Wb() {\n      this.b = this.Ca = this.I = 0;\n      this.oa = [];\n      this.pa = 0;\n      this.Jd = [];\n      this.Yc = 0;\n      this.Zc = [];\n      this.Ka = 0;\n    }\n    function Ra() {\n      this.Ra = 0;\n      this.oa = [];\n      this.h = this.u = this.bb = this.Sb = this.pa = 0;\n    }\n    function pb(a) {\n      return (a.Ra >>> (a.u & (ob - 1))) >>> 0;\n    }\n    function db(a) {\n      x(a.bb <= a.Sb);\n      return a.h || (a.bb == a.Sb && a.u > ob);\n    }\n    function qb(a, b) {\n      a.u = b;\n      a.h = db(a);\n    }\n    function Sa(a) {\n      a.u >= Xb && (x(a.u >= Xb), Vb(a));\n    }\n    function Qa(a) {\n      x(null != a && null != a.oa);\n      a.pa < a.Zc\n        ? ((a.I = (a.oa[a.pa++] | (a.I << 8)) >>> 0), (a.b += 8))\n        : (x(null != a && null != a.oa),\n          a.pa < a.Yc\n            ? ((a.b += 8), (a.I = a.oa[a.pa++] | (a.I << 8)))\n            : a.Ka\n            ? (a.b = 0)\n            : ((a.I <<= 8), (a.b += 8), (a.Ka = 1)));\n    }\n    function G(a) {\n      return na(a, 1);\n    }\n    function K(a, b) {\n      var c = a.Ca;\n      0 > a.b && Qa(a);\n      var d = a.b,\n        e = (c * b) >>> 8,\n        f = (a.I >>> d > e) + 0;\n      f ? ((c -= e), (a.I -= ((e + 1) << d) >>> 0)) : (c = e + 1);\n      d = c;\n      for (e = 0; 256 <= d; ) (e += 8), (d >>= 8);\n      d = 7 ^ (e + Id[d]);\n      a.b -= d;\n      a.Ca = (c << d) - 1;\n      return f;\n    }\n    function ra(a, b, c) {\n      a[b + 0] = (c >> 24) & 255;\n      a[b + 1] = (c >> 16) & 255;\n      a[b + 2] = (c >> 8) & 255;\n      a[b + 3] = (c >> 0) & 255;\n    }\n    function Ta(a, b) {\n      return (a[b + 0] << 0) | (a[b + 1] << 8);\n    }\n    function Yb(a, b) {\n      return Ta(a, b) | (a[b + 2] << 16);\n    }\n    function Ha(a, b) {\n      return Ta(a, b) | (Ta(a, b + 2) << 16);\n    }\n    function Zb(a, b) {\n      var c = 1 << b;\n      x(null != a);\n      x(0 < b);\n      a.X = V(c);\n      if (null == a.X) return 0;\n      a.Mb = 32 - b;\n      a.Xa = b;\n      return 1;\n    }\n    function $b(a, b) {\n      x(null != a);\n      x(null != b);\n      x(a.Xa == b.Xa);\n      I(b.X, 0, a.X, 0, 1 << b.Xa);\n    }\n    function ac() {\n      this.X = [];\n      this.Xa = this.Mb = 0;\n    }\n    function bc(a, b, c, d) {\n      x(null != c);\n      x(null != d);\n      var e = c[0],\n        f = d[0];\n      0 == e && (e = (a * f + b / 2) / b);\n      0 == f && (f = (b * e + a / 2) / a);\n      if (0 >= e || 0 >= f) return 0;\n      c[0] = e;\n      d[0] = f;\n      return 1;\n    }\n    function xa(a, b) {\n      return (a + (1 << b) - 1) >>> b;\n    }\n    function yb(a, b) {\n      return (\n        (((((a & 4278255360) + (b & 4278255360)) >>> 0) & 4278255360) +\n          ((((a & 16711935) + (b & 16711935)) >>> 0) & 16711935)) >>>\n        0\n      );\n    }\n    function X(a, b) {\n      self[b] = function(b, d, e, f, g, h, k) {\n        var c;\n        for (c = 0; c < g; ++c) {\n          var m = self[a](h[k + c - 1], e, f + c);\n          h[k + c] = yb(b[d + c], m);\n        }\n      };\n    }\n    function Jd() {\n      this.ud = this.hd = this.jd = 0;\n    }\n    function aa(a, b) {\n      return ((((a ^ b) & 4278124286) >>> 1) + (a & b)) >>> 0;\n    }\n    function sa(a) {\n      if (0 <= a && 256 > a) return a;\n      if (0 > a) return 0;\n      if (255 < a) return 255;\n    }\n    function eb(a, b) {\n      return sa(a + ((a - b + 0.5) >> 1));\n    }\n    function Ia(a, b, c) {\n      return Math.abs(b - c) - Math.abs(a - c);\n    }\n    function cc(a, b, c, d, e, f, g) {\n      d = f[g - 1];\n      for (c = 0; c < e; ++c) f[g + c] = d = yb(a[b + c], d);\n    }\n    function Kd(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < c; ++f) {\n        var g = a[b + f],\n          h = (g >> 8) & 255,\n          k = g & 16711935,\n          k = k + ((h << 16) + h),\n          k = k & 16711935;\n        d[e + f] = ((g & 4278255360) + k) >>> 0;\n      }\n    }\n    function dc(a, b) {\n      b.jd = (a >> 0) & 255;\n      b.hd = (a >> 8) & 255;\n      b.ud = (a >> 16) & 255;\n    }\n    function Ld(a, b, c, d, e, f) {\n      var g;\n      for (g = 0; g < d; ++g) {\n        var h = b[c + g],\n          k = h >>> 8,\n          l = h >>> 16,\n          m = h,\n          l = l + ((((a.jd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          l = l & 255,\n          m = m + ((((a.hd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          m = m + ((((a.ud << 24) >> 24) * ((l << 24) >> 24)) >>> 5),\n          m = m & 255;\n        e[f + g] = (h & 4278255360) + (l << 16) + m;\n      }\n    }\n    function ec(a, b, c, d, e) {\n      self[b] = function(a, b, c, k, l, m, n, r, q) {\n        for (k = n; k < r; ++k)\n          for (n = 0; n < q; ++n) l[m++] = e(c[d(a[b++])]);\n      };\n      self[a] = function(a, b, h, k, l, m, n) {\n        var f = 8 >> a.b,\n          g = a.Ea,\n          t = a.K[0],\n          v = a.w;\n        if (8 > f)\n          for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {\n            var p = 0,\n              u;\n            for (u = 0; u < g; ++u)\n              u & a || (p = d(k[l++])), (m[n++] = e(t[p & v])), (p >>= f);\n          }\n        else self[\"VP8LMapColor\" + c](k, l, t, v, m, n, b, h, g);\n      };\n    }\n    function Md(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n      }\n    }\n    function Nd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 24) & 255;\n      }\n    }\n    function Od(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 240) | ((f >> 12) & 15),\n          f = ((f >> 0) & 240) | ((f >> 28) & 15);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Pd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 248) | ((f >> 13) & 7),\n          f = ((f >> 5) & 224) | ((f >> 3) & 31);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Qd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 16) & 255;\n      }\n    }\n    function fb(a, b, c, d, e, f) {\n      if (0 == f)\n        for (c = b + c; b < c; )\n          (f = a[b++]),\n            ra(\n              d,\n              ((f[0] >> 24) |\n                ((f[1] >> 8) & 65280) |\n                ((f[2] << 8) & 16711680) |\n                (f[3] << 24)) >>>\n                0\n            ),\n            (e += 32);\n      else I(d, e, a, b, c);\n    }\n    function gb(a, b) {\n      self[b][0] = self[a + \"0\"];\n      self[b][1] = self[a + \"1\"];\n      self[b][2] = self[a + \"2\"];\n      self[b][3] = self[a + \"3\"];\n      self[b][4] = self[a + \"4\"];\n      self[b][5] = self[a + \"5\"];\n      self[b][6] = self[a + \"6\"];\n      self[b][7] = self[a + \"7\"];\n      self[b][8] = self[a + \"8\"];\n      self[b][9] = self[a + \"9\"];\n      self[b][10] = self[a + \"10\"];\n      self[b][11] = self[a + \"11\"];\n      self[b][12] = self[a + \"12\"];\n      self[b][13] = self[a + \"13\"];\n      self[b][14] = self[a + \"0\"];\n      self[b][15] = self[a + \"0\"];\n    }\n    function hb(a) {\n      return a == zb || a == Ab || a == Ja || a == Bb;\n    }\n    function Rd() {\n      this.eb = [];\n      this.size = this.A = this.fb = 0;\n    }\n    function Sd() {\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.F = [];\n      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;\n    }\n    function Cb() {\n      this.Rd = this.height = this.width = this.S = 0;\n      this.f = {};\n      this.f.RGBA = new Rd();\n      this.f.kb = new Sd();\n      this.sd = null;\n    }\n    function Td() {\n      this.width = [0];\n      this.height = [0];\n      this.Pd = [0];\n      this.Qd = [0];\n      this.format = [0];\n    }\n    function Ud() {\n      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;\n    }\n    function Vd(a) {\n      alert(\"todo:WebPSamplerProcessPlane\");\n      return a.T;\n    }\n    function Wd(a, b) {\n      var c = a.T,\n        d = b.ba.f.RGBA,\n        e = d.eb,\n        f = d.fb + a.ka * d.A,\n        g = P[b.ba.S],\n        h = a.y,\n        k = a.O,\n        l = a.f,\n        m = a.N,\n        n = a.ea,\n        r = a.W,\n        q = b.cc,\n        t = b.dc,\n        v = b.Mc,\n        p = b.Nc,\n        u = a.ka,\n        w = a.ka + a.T,\n        y = a.U,\n        A = (y + 1) >> 1;\n      0 == u\n        ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y)\n        : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y),\n          ++c);\n      for (; u + 2 < w; u += 2)\n        (q = l),\n          (t = m),\n          (v = n),\n          (p = r),\n          (m += a.Rc),\n          (r += a.Rc),\n          (f += 2 * d.A),\n          (k += 2 * a.fa),\n          g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);\n      k += a.fa;\n      a.j + w < a.o\n        ? (I(b.ec, b.fc, h, k, y),\n          I(b.cc, b.dc, l, m, A),\n          I(b.Mc, b.Nc, n, r, A),\n          c--)\n        : w & 1 ||\n          g(\n            h,\n            k,\n            null,\n            null,\n            l,\n            m,\n            n,\n            r,\n            l,\n            m,\n            n,\n            r,\n            e,\n            f + d.A,\n            null,\n            null,\n            y\n          );\n      return c;\n    }\n    function Xd(a, b, c) {\n      var d = a.F,\n        e = [a.J];\n      if (null != d) {\n        var f = a.U,\n          g = b.ba.S,\n          h = g == ya || g == Ja;\n        b = b.ba.f.RGBA;\n        var k = [0],\n          l = a.ka;\n        k[0] = a.T;\n        a.Kb &&\n          (0 == l ? --k[0] : (--l, (e[0] -= a.width)),\n          a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));\n        var m = b.eb,\n          l = b.fb + l * b.A;\n        a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);\n        x(c == k);\n        a && hb(g) && za(m, l, h, f, k, b.A);\n      }\n      return 0;\n    }\n    function gc(a) {\n      var b = a.ma,\n        c = b.ba.S,\n        d = 11 > c,\n        e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);\n      b.memory = null;\n      b.Ib = null;\n      b.Jb = null;\n      b.Nd = null;\n      if (!hc(b.Oa, a, e ? 11 : 12)) return 0;\n      e && hb(c) && ic();\n      if (a.da) alert(\"todo:use_scaling\");\n      else {\n        if (d) {\n          if (((b.Ib = Vd), a.Kb)) {\n            c = (a.U + 1) >> 1;\n            b.memory = V(a.U + 2 * c);\n            if (null == b.memory) return 0;\n            b.ec = b.memory;\n            b.fc = 0;\n            b.cc = b.ec;\n            b.dc = b.fc + a.U;\n            b.Mc = b.cc;\n            b.Nc = b.dc + c;\n            b.Ib = Wd;\n            ic();\n          }\n        } else alert(\"todo:EmitYUV\");\n        e && ((b.Jb = Xd), d && Aa());\n      }\n      if (d && !jc) {\n        for (a = 0; 256 > a; ++a)\n          (Yd[a] = (89858 * (a - 128) + Ba) >> Wa),\n            (Zd[a] = -22014 * (a - 128) + Ba),\n            ($d[a] = -45773 * (a - 128)),\n            (ae[a] = (113618 * (a - 128) + Ba) >> Wa);\n        for (a = ta; a < Eb; ++a)\n          (b = (76283 * (a - 16) + Ba) >> Wa),\n            (be[a - ta] = ga(b, 255)),\n            (ce[a - ta] = ga((b + 8) >> 4, 15));\n        jc = 1;\n      }\n      return 1;\n    }\n    function kc(a) {\n      var b = a.ma,\n        c = a.U,\n        d = a.T;\n      x(!(a.ka & 1));\n      if (0 >= c || 0 >= d) return 0;\n      c = b.Ib(a, b);\n      null != b.Jb && b.Jb(a, b, c);\n      b.Dc += c;\n      return 1;\n    }\n    function lc(a) {\n      a.ma.memory = null;\n    }\n    function mc(a, b, c, d) {\n      if (47 != D(a, 8)) return 0;\n      b[0] = D(a, 14) + 1;\n      c[0] = D(a, 14) + 1;\n      d[0] = D(a, 1);\n      return 0 != D(a, 3) ? 0 : !a.h;\n    }\n    function ib(a, b) {\n      if (4 > a) return a + 1;\n      var c = (a - 2) >> 1;\n      return ((2 + (a & 1)) << c) + D(b, c) + 1;\n    }\n    function nc(a, b) {\n      if (120 < b) return b - 120;\n      var c = de[b - 1],\n        c = (c >> 4) * a + (8 - (c & 15));\n      return 1 <= c ? c : 1;\n    }\n    function ua(a, b, c) {\n      var d = pb(c);\n      b += d & 255;\n      var e = a[b].g - 8;\n      0 < e &&\n        (qb(c, c.u + 8),\n        (d = pb(c)),\n        (b += a[b].value),\n        (b += d & ((1 << e) - 1)));\n      qb(c, c.u + a[b].g);\n      return a[b].value;\n    }\n    function ub(a, b, c) {\n      c.g += a.g;\n      c.value += (a.value << b) >>> 0;\n      x(8 >= c.g);\n      return a.g;\n    }\n    function ha(a, b, c) {\n      var d = a.xc;\n      b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];\n      x(b < a.Wb);\n      return a.Ya[b];\n    }\n    function oc(a, b, c, d) {\n      var e = a.ab,\n        f = a.c * b,\n        g = a.C;\n      b = g + b;\n      var h = c,\n        k = d;\n      d = a.Ta;\n      for (c = a.Ua; 0 < e--; ) {\n        var l = a.gc[e],\n          m = g,\n          n = b,\n          r = h,\n          q = k,\n          k = d,\n          h = c,\n          t = l.Ea;\n        x(m < n);\n        x(n <= l.nc);\n        switch (l.hc) {\n          case 2:\n            pc(r, q, (n - m) * t, k, h);\n            break;\n          case 0:\n            var v = l,\n              p = m,\n              u = n,\n              w = k,\n              y = h,\n              A = v.Ea;\n            0 == p &&\n              (ee(r, q, null, null, 1, w, y),\n              cc(r, q + 1, 0, 0, A - 1, w, y + 1),\n              (q += A),\n              (y += A),\n              ++p);\n            for (\n              var E = 1 << v.b,\n                B = E - 1,\n                C = xa(A, v.b),\n                N = v.K,\n                v = v.w + (p >> v.b) * C;\n              p < u;\n\n            ) {\n              var z = N,\n                Q = v,\n                S = 1;\n              for (fe(r, q, w, y - A, 1, w, y); S < A; ) {\n                var K = qc[(z[Q++] >> 8) & 15],\n                  D = (S & ~B) + E;\n                D > A && (D = A);\n                K(r, q + +S, w, y + S - A, D - S, w, y + S);\n                S = D;\n              }\n              q += A;\n              y += A;\n              ++p;\n              p & B || (v += C);\n            }\n            n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);\n            break;\n          case 1:\n            t = r;\n            u = q;\n            r = l.Ea;\n            q = 1 << l.b;\n            w = q - 1;\n            y = r & ~w;\n            A = r - y;\n            p = xa(r, l.b);\n            E = l.K;\n            for (l = l.w + (m >> l.b) * p; m < n; ) {\n              B = E;\n              C = l;\n              N = new Jd();\n              v = u + y;\n              for (z = u + r; u < v; )\n                dc(B[C++], N), Fb(N, t, u, q, k, h), (u += q), (h += q);\n              u < z &&\n                (dc(B[C++], N), Fb(N, t, u, A, k, h), (u += A), (h += A));\n              ++m;\n              m & w || (l += p);\n            }\n            break;\n          case 3:\n            if (r == k && q == h && 0 < l.b) {\n              y = (n - m) * xa(l.Ea, l.b);\n              t = h + (n - m) * t - y;\n              u = k;\n              r = t;\n              q = k;\n              w = h;\n              A = y;\n              p = [];\n              for (y = A - 1; 0 <= y; --y) p[y] = q[w + y];\n              for (y = A - 1; 0 <= y; --y) u[r + y] = p[y];\n              rc(l, m, n, k, t, k, h);\n            } else rc(l, m, n, r, q, k, h);\n        }\n        h = d;\n        k = c;\n      }\n      k != c && I(d, c, h, k, f);\n    }\n    function ge(a, b) {\n      var c = a.V,\n        d = a.Ba + a.c * a.C,\n        e = b - a.C;\n      x(b <= a.l.o);\n      x(16 >= e);\n      if (0 < e) {\n        var f = a.l,\n          g = a.Ta,\n          h = a.Ua,\n          k = f.width;\n        oc(a, e, c, d);\n        h = [h];\n        c = a.C;\n        d = b;\n        e = h;\n        x(c < d);\n        x(f.v < f.va);\n        d > f.o && (d = f.o);\n        if (c < f.j) {\n          var l = f.j - c,\n            c = f.j;\n          e[0] += l * k;\n        }\n        c >= d\n          ? (c = 0)\n          : ((e[0] += 4 * f.v),\n            (f.ka = c - f.j),\n            (f.U = f.va - f.v),\n            (f.T = d - c),\n            (c = 1));\n        if (c) {\n          h = h[0];\n          c = a.ca;\n          if (11 > c.S) {\n            for (\n              var m = c.f.RGBA,\n                d = c.S,\n                e = f.U,\n                f = f.T,\n                l = m.eb,\n                n = m.A,\n                r = f,\n                m = m.fb + a.Ma * m.A;\n              0 < r--;\n\n            ) {\n              var q = g,\n                t = h,\n                v = e,\n                p = l,\n                u = m;\n              switch (d) {\n                case Ca:\n                  sc(q, t, v, p, u);\n                  break;\n                case Ua:\n                  Gb(q, t, v, p, u);\n                  break;\n                case zb:\n                  Gb(q, t, v, p, u);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case tc:\n                  uc(q, t, v, p, u);\n                  break;\n                case Va:\n                  fb(q, t, v, p, u, 1);\n                  break;\n                case Ab:\n                  fb(q, t, v, p, u, 1);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case ya:\n                  fb(q, t, v, p, u, 0);\n                  break;\n                case Ja:\n                  fb(q, t, v, p, u, 0);\n                  za(p, u, 1, v, 1, 0);\n                  break;\n                case Db:\n                  Hb(q, t, v, p, u);\n                  break;\n                case Bb:\n                  Hb(q, t, v, p, u);\n                  vc(p, u, v, 1, 0);\n                  break;\n                case wc:\n                  xc(q, t, v, p, u);\n                  break;\n                default:\n                  x(0);\n              }\n              h += k;\n              m += n;\n            }\n            a.Ma += f;\n          } else alert(\"todo:EmitRescaledRowsYUVA\");\n          x(a.Ma <= c.height);\n        }\n      }\n      a.C = b;\n      x(a.C <= a.i);\n    }\n    function yc(a) {\n      var b;\n      if (0 < a.ua) return 0;\n      for (b = 0; b < a.Wb; ++b) {\n        var c = a.Ya[b].G,\n          d = a.Ya[b].H;\n        if (\n          0 < c[1][d[1] + 0].g ||\n          0 < c[2][d[2] + 0].g ||\n          0 < c[3][d[3] + 0].g\n        )\n          return 0;\n      }\n      return 1;\n    }\n    function zc(a, b, c, d, e, f) {\n      if (0 != a.Z) {\n        var g = a.qd,\n          h = a.rd;\n        for (x(null != ia[a.Z]); b < c; ++b)\n          ia[a.Z](g, h, d, e, d, e, f), (g = d), (h = e), (e += f);\n        a.qd = g;\n        a.rd = h;\n      }\n    }\n    function Ib(a, b) {\n      var c = a.l.ma,\n        d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,\n        d = a.C < d ? d : a.C;\n      x(b <= a.l.o);\n      if (b > d) {\n        var e = a.l.width,\n          f = c.ca,\n          g = c.tb + e * d,\n          h = a.V,\n          k = a.Ba + a.c * d,\n          l = a.gc;\n        x(1 == a.ab);\n        x(3 == l[0].hc);\n        he(l[0], d, b, h, k, f, g);\n        zc(c, d, b, f, g, e);\n      }\n      a.C = a.Ma = b;\n    }\n    function Jb(a, b, c, d, e, f, g) {\n      var h = a.$ / d,\n        k = a.$ % d,\n        l = a.m,\n        m = a.s,\n        n = c + a.$,\n        r = n;\n      e = c + d * e;\n      var q = c + d * f,\n        t = 280 + m.ua,\n        v = a.Pb ? h : 16777216,\n        p = 0 < m.ua ? m.Wa : null,\n        u = m.wc,\n        w = n < q ? ha(m, k, h) : null;\n      x(a.C < f);\n      x(q <= e);\n      var y = !1;\n      a: for (;;) {\n        for (; y || n < q; ) {\n          var A = 0;\n          if (h >= v) {\n            var v = a,\n              E = n - c;\n            x(v.Pb);\n            v.wd = v.m;\n            v.xd = E;\n            0 < v.s.ua && $b(v.s.Wa, v.s.vb);\n            v = h + ie;\n          }\n          k & u || (w = ha(m, k, h));\n          x(null != w);\n          w.Qb && ((b[n] = w.qb), (y = !0));\n          if (!y)\n            if ((Sa(l), w.jc)) {\n              var A = l,\n                E = b,\n                B = n,\n                C = w.pd[pb(A) & (xb - 1)];\n              x(w.jc);\n              256 > C.g\n                ? (qb(A, A.u + C.g), (E[B] = C.value), (A = 0))\n                : (qb(A, A.u + C.g - 256), x(256 <= C.value), (A = C.value));\n              0 == A && (y = !0);\n            } else A = ua(w.G[0], w.H[0], l);\n          if (l.h) break;\n          if (y || 256 > A) {\n            if (!y)\n              if (w.nd) b[n] = (w.qb | (A << 8)) >>> 0;\n              else {\n                Sa(l);\n                y = ua(w.G[1], w.H[1], l);\n                Sa(l);\n                E = ua(w.G[2], w.H[2], l);\n                B = ua(w.G[3], w.H[3], l);\n                if (l.h) break;\n                b[n] = ((B << 24) | (y << 16) | (A << 8) | E) >>> 0;\n              }\n            y = !1;\n            ++n;\n            ++k;\n            if (\n              k >= d &&\n              ((k = 0),\n              ++h,\n              null != g && h <= f && !(h % 16) && g(a, h),\n              null != p)\n            )\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (280 > A) {\n            A = ib(A - 256, l);\n            E = ua(w.G[4], w.H[4], l);\n            Sa(l);\n            E = ib(E, l);\n            E = nc(d, E);\n            if (l.h) break;\n            if (n - c < E || e - n < A) break a;\n            else for (B = 0; B < A; ++B) b[n + B] = b[n + B - E];\n            n += A;\n            for (k += A; k >= d; )\n              (k -= d), ++h, null != g && h <= f && !(h % 16) && g(a, h);\n            x(n <= e);\n            k & u && (w = ha(m, k, h));\n            if (null != p)\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (A < t) {\n            y = A - 280;\n            for (x(null != p); r < n; )\n              (A = b[r++]), (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n            A = n;\n            E = p;\n            x(!(y >>> E.Xa));\n            b[A] = E.X[y];\n            y = !0;\n          } else break a;\n          y || x(l.h == db(l));\n        }\n        if (a.Pb && l.h && n < e)\n          x(a.m.h),\n            (a.a = 5),\n            (a.m = a.wd),\n            (a.$ = a.xd),\n            0 < a.s.ua && $b(a.s.vb, a.s.Wa);\n        else if (l.h) break a;\n        else null != g && g(a, h > f ? f : h), (a.a = 0), (a.$ = n - c);\n        return 1;\n      }\n      a.a = 3;\n      return 0;\n    }\n    function Ac(a) {\n      x(null != a);\n      a.vc = null;\n      a.yc = null;\n      a.Ya = null;\n      var b = a.Wa;\n      null != b && (b.X = null);\n      a.vb = null;\n      x(null != a);\n    }\n    function Bc() {\n      var a = new je();\n      if (null == a) return null;\n      a.a = 0;\n      a.xb = Cc;\n      gb(\"Predictor\", \"VP8LPredictors\");\n      gb(\"Predictor\", \"VP8LPredictors_C\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd_C\");\n      pc = Kd;\n      Fb = Ld;\n      sc = Md;\n      Gb = Nd;\n      Hb = Od;\n      xc = Pd;\n      uc = Qd;\n      self.VP8LMapColor32b = ke;\n      self.VP8LMapColor8b = le;\n      return a;\n    }\n    function rb(a, b, c, d, e) {\n      var f = 1,\n        g = [a],\n        h = [b],\n        k = d.m,\n        l = d.s,\n        m = null,\n        n = 0;\n      a: for (;;) {\n        if (c)\n          for (; f && D(k, 1); ) {\n            var r = g,\n              q = h,\n              t = d,\n              v = 1,\n              p = t.m,\n              u = t.gc[t.ab],\n              w = D(p, 2);\n            if (t.Oc & (1 << w)) f = 0;\n            else {\n              t.Oc |= 1 << w;\n              u.hc = w;\n              u.Ea = r[0];\n              u.nc = q[0];\n              u.K = [null];\n              ++t.ab;\n              x(4 >= t.ab);\n              switch (w) {\n                case 0:\n                case 1:\n                  u.b = D(p, 3) + 2;\n                  v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);\n                  u.K = u.K[0];\n                  break;\n                case 3:\n                  var y = D(p, 8) + 1,\n                    A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;\n                  r[0] = xa(u.Ea, A);\n                  u.b = A;\n                  var v = rb(y, 1, 0, t, u.K),\n                    E;\n                  if ((E = v)) {\n                    var B,\n                      C = y,\n                      N = u,\n                      z = 1 << (8 >> N.b),\n                      Q = V(z);\n                    if (null == Q) E = 0;\n                    else {\n                      var S = N.K[0],\n                        K = N.w;\n                      Q[0] = N.K[0][0];\n                      for (B = 1; B < 1 * C; ++B) Q[B] = yb(S[K + B], Q[B - 1]);\n                      for (; B < 4 * z; ++B) Q[B] = 0;\n                      N.K[0] = null;\n                      N.K[0] = Q;\n                      E = 1;\n                    }\n                  }\n                  v = E;\n                  break;\n                case 2:\n                  break;\n                default:\n                  x(0);\n              }\n              f = v;\n            }\n          }\n        g = g[0];\n        h = h[0];\n        if (f && D(k, 1) && ((n = D(k, 4)), (f = 1 <= n && 11 >= n), !f)) {\n          d.a = 3;\n          break a;\n        }\n        var H;\n        if ((H = f))\n          b: {\n            var F = d,\n              G = g,\n              L = h,\n              J = n,\n              T = c,\n              Da,\n              ba,\n              X = F.m,\n              R = F.s,\n              P = [null],\n              U,\n              W = 1,\n              aa = 0,\n              na = me[J];\n            c: for (;;) {\n              if (T && D(X, 1)) {\n                var ca = D(X, 3) + 2,\n                  ga = xa(G, ca),\n                  ka = xa(L, ca),\n                  qa = ga * ka;\n                if (!rb(ga, ka, 0, F, P)) break c;\n                P = P[0];\n                R.xc = ca;\n                for (Da = 0; Da < qa; ++Da) {\n                  var ia = (P[Da] >> 8) & 65535;\n                  P[Da] = ia;\n                  ia >= W && (W = ia + 1);\n                }\n              }\n              if (X.h) break c;\n              for (ba = 0; 5 > ba; ++ba) {\n                var Y = Dc[ba];\n                !ba && 0 < J && (Y += 1 << J);\n                aa < Y && (aa = Y);\n              }\n              var ma = wa(W * na, O);\n              var ua = W,\n                va = wa(ua, Ub);\n              if (null == va) var la = null;\n              else x(65536 >= ua), (la = va);\n              var ha = V(aa);\n              if (null == la || null == ha || null == ma) {\n                F.a = 1;\n                break c;\n              }\n              var pa = ma;\n              for (Da = U = 0; Da < W; ++Da) {\n                var ja = la[Da],\n                  da = ja.G,\n                  ea = ja.H,\n                  Fa = 0,\n                  ra = 1,\n                  Ha = 0;\n                for (ba = 0; 5 > ba; ++ba) {\n                  Y = Dc[ba];\n                  da[ba] = pa;\n                  ea[ba] = U;\n                  !ba && 0 < J && (Y += 1 << J);\n                  d: {\n                    var sa,\n                      za = Y,\n                      ta = F,\n                      oa = ha,\n                      db = pa,\n                      eb = U,\n                      Ia = 0,\n                      Ka = ta.m,\n                      fb = D(Ka, 1);\n                    M(oa, 0, 0, za);\n                    if (fb) {\n                      var gb = D(Ka, 1) + 1,\n                        hb = D(Ka, 1),\n                        Ja = D(Ka, 0 == hb ? 1 : 8);\n                      oa[Ja] = 1;\n                      2 == gb && ((Ja = D(Ka, 8)), (oa[Ja] = 1));\n                      var ya = 1;\n                    } else {\n                      var Ua = V(19),\n                        Va = D(Ka, 4) + 4;\n                      if (19 < Va) {\n                        ta.a = 3;\n                        var Aa = 0;\n                        break d;\n                      }\n                      for (sa = 0; sa < Va; ++sa) Ua[ne[sa]] = D(Ka, 3);\n                      var Ba = void 0,\n                        sb = void 0,\n                        Wa = ta,\n                        ib = Ua,\n                        Ca = za,\n                        Xa = oa,\n                        Oa = 0,\n                        La = Wa.m,\n                        Ya = 8,\n                        Za = wa(128, O);\n                      e: for (;;) {\n                        if (!Z(Za, 0, 7, ib, 19)) break e;\n                        if (D(La, 1)) {\n                          var kb = 2 + 2 * D(La, 3),\n                            Ba = 2 + D(La, kb);\n                          if (Ba > Ca) break e;\n                        } else Ba = Ca;\n                        for (sb = 0; sb < Ca && Ba--; ) {\n                          Sa(La);\n                          var $a = Za[0 + (pb(La) & 127)];\n                          qb(La, La.u + $a.g);\n                          var jb = $a.value;\n                          if (16 > jb) (Xa[sb++] = jb), 0 != jb && (Ya = jb);\n                          else {\n                            var lb = 16 == jb,\n                              ab = jb - 16,\n                              mb = oe[ab],\n                              bb = D(La, pe[ab]) + mb;\n                            if (sb + bb > Ca) break e;\n                            else\n                              for (var nb = lb ? Ya : 0; 0 < bb--; )\n                                Xa[sb++] = nb;\n                          }\n                        }\n                        Oa = 1;\n                        break e;\n                      }\n                      Oa || (Wa.a = 3);\n                      ya = Oa;\n                    }\n                    (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));\n                    ya && 0 != Ia ? (Aa = Ia) : ((ta.a = 3), (Aa = 0));\n                  }\n                  if (0 == Aa) break c;\n                  ra && 1 == qe[ba] && (ra = 0 == pa[U].g);\n                  Fa += pa[U].g;\n                  U += Aa;\n                  if (3 >= ba) {\n                    var Pa = ha[0],\n                      tb;\n                    for (tb = 1; tb < Y; ++tb) ha[tb] > Pa && (Pa = ha[tb]);\n                    Ha += Pa;\n                  }\n                }\n                ja.nd = ra;\n                ja.Qb = 0;\n                ra &&\n                  ((ja.qb =\n                    ((da[3][ea[3] + 0].value << 24) |\n                      (da[1][ea[1] + 0].value << 16) |\n                      da[2][ea[2] + 0].value) >>>\n                    0),\n                  0 == Fa &&\n                    256 > da[0][ea[0] + 0].value &&\n                    ((ja.Qb = 1), (ja.qb += da[0][ea[0] + 0].value << 8)));\n                ja.jc = !ja.Qb && 6 > Ha;\n                if (ja.jc) {\n                  var Ga,\n                    Ea = ja;\n                  for (Ga = 0; Ga < xb; ++Ga) {\n                    var Ma = Ga,\n                      Na = Ea.pd[Ma],\n                      vb = Ea.G[0][Ea.H[0] + Ma];\n                    256 <= vb.value\n                      ? ((Na.g = vb.g + 256), (Na.value = vb.value))\n                      : ((Na.g = 0),\n                        (Na.value = 0),\n                        (Ma >>= ub(vb, 8, Na)),\n                        (Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na)),\n                        (Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na)),\n                        ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));\n                  }\n                }\n              }\n              R.vc = P;\n              R.Wb = W;\n              R.Ya = la;\n              R.yc = ma;\n              H = 1;\n              break b;\n            }\n            H = 0;\n          }\n        f = H;\n        if (!f) {\n          d.a = 3;\n          break a;\n        }\n        if (0 < n) {\n          if (((l.ua = 1 << n), !Zb(l.Wa, n))) {\n            d.a = 1;\n            f = 0;\n            break a;\n          }\n        } else l.ua = 0;\n        var Qa = d,\n          cb = g,\n          ob = h,\n          Ra = Qa.s,\n          Ta = Ra.xc;\n        Qa.c = cb;\n        Qa.i = ob;\n        Ra.md = xa(cb, Ta);\n        Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;\n        if (c) {\n          d.xb = re;\n          break a;\n        }\n        m = V(g * h);\n        if (null == m) {\n          d.a = 1;\n          f = 0;\n          break a;\n        }\n        f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;\n        break a;\n      }\n      f\n        ? (null != e ? (e[0] = m) : (x(null == m), x(c)), (d.$ = 0), c || Ac(l))\n        : Ac(l);\n      return f;\n    }\n    function Ec(a, b) {\n      var c = a.c * a.i,\n        d = c + b + 16 * b;\n      x(a.c <= b);\n      a.V = V(d);\n      if (null == a.V) return (a.Ta = null), (a.Ua = 0), (a.a = 1), 0;\n      a.Ta = a.V;\n      a.Ua = a.Ba + c + b;\n      return 1;\n    }\n    function se(a, b) {\n      var c = a.C,\n        d = b - c,\n        e = a.V,\n        f = a.Ba + a.c * c;\n      for (x(b <= a.l.o); 0 < d; ) {\n        var g = 16 < d ? 16 : d,\n          h = a.l.ma,\n          k = a.l.width,\n          l = k * g,\n          m = h.ca,\n          n = h.tb + k * c,\n          r = a.Ta,\n          q = a.Ua;\n        oc(a, g, e, f);\n        Fc(r, q, m, n, l);\n        zc(h, c, c + g, m, n, k);\n        d -= g;\n        e += g * a.c;\n        c += g;\n      }\n      x(c == b);\n      a.C = a.Ma = b;\n    }\n    function te(a, b) {\n      var c = [0],\n        d = [0],\n        e = [0];\n      a: for (;;) {\n        if (null == a) return 0;\n        if (null == b) return (a.a = 2), 0;\n        a.l = b;\n        a.a = 0;\n        cb(a.m, b.data, b.w, b.ha);\n        if (!mc(a.m, c, d, e)) {\n          a.a = 3;\n          break a;\n        }\n        a.xb = Cc;\n        b.width = c[0];\n        b.height = d[0];\n        if (!rb(c[0], d[0], 1, a, null)) break a;\n        return 1;\n      }\n      x(0 != a.a);\n      return 0;\n    }\n    function ue() {\n      this.ub = this.yd = this.td = this.Rb = 0;\n    }\n    function ve() {\n      this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;\n    }\n    function we() {\n      this.Fb = this.Bb = this.Cb = 0;\n      this.Zb = V(4);\n      this.Lb = V(4);\n    }\n    function Gc() {\n      this.Yb = wb();\n    }\n    function xe() {\n      this.jb = V(3);\n      this.Wc = Ed([4, 8], Gc);\n      this.Xc = Ed([4, 17], Gc);\n    }\n    function ye() {\n      this.Pc = this.wb = this.Tb = this.zd = 0;\n      this.vd = new V(4);\n      this.od = new V(4);\n    }\n    function Xa() {\n      this.ld = this.La = this.dd = this.tc = 0;\n    }\n    function Hc() {\n      this.Na = this.la = 0;\n    }\n    function ze() {\n      this.Sc = [0, 0];\n      this.Eb = [0, 0];\n      this.Qc = [0, 0];\n      this.ia = this.lc = 0;\n    }\n    function Kb() {\n      this.ad = V(384);\n      this.Za = 0;\n      this.Ob = V(16);\n      this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;\n    }\n    function Ae() {\n      this.uc = this.M = this.Nb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.ya = Array(new Kb());\n      this.aa = 0;\n      this.l = new Oa();\n    }\n    function Ic() {\n      this.y = V(16);\n      this.f = V(8);\n      this.ea = V(8);\n    }\n    function Be() {\n      this.cb = this.a = 0;\n      this.sc = \"\";\n      this.m = new Wb();\n      this.Od = new ue();\n      this.Kc = new ve();\n      this.ed = new ye();\n      this.Qa = new we();\n      this.Ic = this.$c = this.Aa = 0;\n      this.D = new Ae();\n      this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;\n      this.Jc = wa(8, Wb);\n      this.ia = 0;\n      new F();\n      this.pb = wa(4, ze);\n      this.Pa = new xe();\n      this.Bd = this.kc = 0;\n      this.Ac = [];\n      this.Bc = 0;\n      this.zc = [0, 0, 0, 0];\n      this.Gd = Array(new Ic());\n      this.Hd = 0;\n      this.rb = Array(new Hc());\n      this.sb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.oc = [];\n      this.pc = 0;\n      this.sa = [];\n      this.ta = 0;\n      this.qa = [];\n      this.ra = 0;\n      this.Ha = [];\n      this.B = this.R = this.Ia = 0;\n      this.Ec = [];\n      this.M = this.ja = this.Vb = this.Fc = 0;\n      this.ya = Array(new Kb());\n      this.L = this.aa = 0;\n      this.gd = Ed([4, 2], Xa);\n      this.ga = null;\n      this.Fa = [];\n      this.Cc = this.qc = this.P = 0;\n      this.Gb = [];\n      this.Uc = 0;\n      this.mb = [];\n      this.nb = 0;\n      this.rc = [];\n      this.Ga = this.Vc = 0;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function Oa() {\n      this.T = this.U = this.ka = this.height = this.width = 0;\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.Rc = this.fa = this.W = this.N = this.O = 0;\n      this.ma = \"void\";\n      this.put = \"VP8IoPutHook\";\n      this.ac = \"VP8IoSetupHook\";\n      this.bc = \"VP8IoTeardownHook\";\n      this.ha = this.Kb = 0;\n      this.data = [];\n      this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0;\n      this.F = [];\n      this.J = 0;\n    }\n    function Ce() {\n      var a = new Be();\n      null != a &&\n        ((a.a = 0), (a.sc = \"OK\"), (a.cb = 0), (a.Xb = 0), oa || (oa = De));\n      return a;\n    }\n    function T(a, b, c) {\n      0 == a.a && ((a.a = b), (a.sc = c), (a.cb = 0));\n      return 0;\n    }\n    function Jc(a, b, c) {\n      return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];\n    }\n    function Kc(a, b) {\n      if (null == a) return 0;\n      a.a = 0;\n      a.sc = \"OK\";\n      if (null == b) return T(a, 2, \"null VP8Io passed to VP8GetHeaders()\");\n      var c = b.data;\n      var d = b.w;\n      var e = b.ha;\n      if (4 > e) return T(a, 7, \"Truncated header.\");\n      var f = c[d + 0] | (c[d + 1] << 8) | (c[d + 2] << 16);\n      var g = a.Od;\n      g.Rb = !(f & 1);\n      g.td = (f >> 1) & 7;\n      g.yd = (f >> 4) & 1;\n      g.ub = f >> 5;\n      if (3 < g.td) return T(a, 3, \"Incorrect keyframe parameters.\");\n      if (!g.yd) return T(a, 4, \"Frame not displayable.\");\n      d += 3;\n      e -= 3;\n      var h = a.Kc;\n      if (g.Rb) {\n        if (7 > e) return T(a, 7, \"cannot parse picture header\");\n        if (!Jc(c, d, e)) return T(a, 3, \"Bad code word\");\n        h.c = ((c[d + 4] << 8) | c[d + 3]) & 16383;\n        h.Td = c[d + 4] >> 6;\n        h.i = ((c[d + 6] << 8) | c[d + 5]) & 16383;\n        h.Ud = c[d + 6] >> 6;\n        d += 7;\n        e -= 7;\n        a.za = (h.c + 15) >> 4;\n        a.Ub = (h.i + 15) >> 4;\n        b.width = h.c;\n        b.height = h.i;\n        b.Da = 0;\n        b.j = 0;\n        b.v = 0;\n        b.va = b.width;\n        b.o = b.height;\n        b.da = 0;\n        b.ib = b.width;\n        b.hb = b.height;\n        b.U = b.width;\n        b.T = b.height;\n        f = a.Pa;\n        M(f.jb, 0, 255, f.jb.length);\n        f = a.Qa;\n        x(null != f);\n        f.Cb = 0;\n        f.Bb = 0;\n        f.Fb = 1;\n        M(f.Zb, 0, 0, f.Zb.length);\n        M(f.Lb, 0, 0, f.Lb);\n      }\n      if (g.ub > e) return T(a, 7, \"bad partition length\");\n      f = a.m;\n      ma(f, c, d, g.ub);\n      d += g.ub;\n      e -= g.ub;\n      g.Rb && ((h.Ld = G(f)), (h.Kd = G(f)));\n      h = a.Qa;\n      var k = a.Pa,\n        l;\n      x(null != f);\n      x(null != h);\n      h.Cb = G(f);\n      if (h.Cb) {\n        h.Bb = G(f);\n        if (G(f)) {\n          h.Fb = G(f);\n          for (l = 0; 4 > l; ++l) h.Zb[l] = G(f) ? ca(f, 7) : 0;\n          for (l = 0; 4 > l; ++l) h.Lb[l] = G(f) ? ca(f, 6) : 0;\n        }\n        if (h.Bb) for (l = 0; 3 > l; ++l) k.jb[l] = G(f) ? na(f, 8) : 255;\n      } else h.Bb = 0;\n      if (f.Ka) return T(a, 3, \"cannot parse segment header\");\n      h = a.ed;\n      h.zd = G(f);\n      h.Tb = na(f, 6);\n      h.wb = na(f, 3);\n      h.Pc = G(f);\n      if (h.Pc && G(f)) {\n        for (k = 0; 4 > k; ++k) G(f) && (h.vd[k] = ca(f, 6));\n        for (k = 0; 4 > k; ++k) G(f) && (h.od[k] = ca(f, 6));\n      }\n      a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;\n      if (f.Ka) return T(a, 3, \"cannot parse filter header\");\n      l = d;\n      var m = e;\n      e = l;\n      d = l + m;\n      h = m;\n      a.Xb = (1 << na(a.m, 2)) - 1;\n      k = a.Xb;\n      if (m < 3 * k) c = 7;\n      else {\n        l += 3 * k;\n        h -= 3 * k;\n        for (m = 0; m < k; ++m) {\n          var n = c[e + 0] | (c[e + 1] << 8) | (c[e + 2] << 16);\n          n > h && (n = h);\n          ma(a.Jc[+m], c, l, n);\n          l += n;\n          h -= n;\n          e += 3;\n        }\n        ma(a.Jc[+k], c, l, h);\n        c = l < d ? 0 : 5;\n      }\n      if (0 != c) return T(a, c, \"cannot parse partitions\");\n      l = a.m;\n      c = na(l, 7);\n      e = G(l) ? ca(l, 4) : 0;\n      d = G(l) ? ca(l, 4) : 0;\n      h = G(l) ? ca(l, 4) : 0;\n      k = G(l) ? ca(l, 4) : 0;\n      l = G(l) ? ca(l, 4) : 0;\n      m = a.Qa;\n      for (n = 0; 4 > n; ++n) {\n        if (m.Cb) {\n          var r = m.Zb[n];\n          m.Fb || (r += c);\n        } else if (0 < n) {\n          a.pb[n] = a.pb[0];\n          continue;\n        } else r = c;\n        var q = a.pb[n];\n        q.Sc[0] = Lb[ga(r + e, 127)];\n        q.Sc[1] = Mb[ga(r + 0, 127)];\n        q.Eb[0] = 2 * Lb[ga(r + d, 127)];\n        q.Eb[1] = (101581 * Mb[ga(r + h, 127)]) >> 16;\n        8 > q.Eb[1] && (q.Eb[1] = 8);\n        q.Qc[0] = Lb[ga(r + k, 117)];\n        q.Qc[1] = Mb[ga(r + l, 127)];\n        q.lc = r + l;\n      }\n      if (!g.Rb) return T(a, 4, \"Not a key frame.\");\n      G(f);\n      g = a.Pa;\n      for (c = 0; 4 > c; ++c) {\n        for (e = 0; 8 > e; ++e)\n          for (d = 0; 3 > d; ++d)\n            for (h = 0; 11 > h; ++h)\n              (k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h]),\n                (g.Wc[c][e].Yb[d][h] = k);\n        for (e = 0; 17 > e; ++e) g.Xc[c][e] = g.Wc[c][Ge[e]];\n      }\n      a.kc = G(f);\n      a.kc && (a.Bd = na(f, 8));\n      return (a.cb = 1);\n    }\n    function De(a, b, c, d, e, f, g) {\n      var h = b[e].Yb[c];\n      for (c = 0; 16 > e; ++e) {\n        if (!K(a, h[c + 0])) return e;\n        for (; !K(a, h[c + 1]); )\n          if (((h = b[++e].Yb[0]), (c = 0), 16 == e)) return 16;\n        var k = b[e + 1].Yb;\n        if (K(a, h[c + 2])) {\n          var l = a,\n            m = h,\n            n = c;\n          var r = 0;\n          if (K(l, m[n + 3]))\n            if (K(l, m[n + 6])) {\n              h = 0;\n              r = K(l, m[n + 8]);\n              m = K(l, m[n + 9 + r]);\n              n = 2 * r + m;\n              r = 0;\n              for (m = He[n]; m[h]; ++h) r += r + K(l, m[h]);\n              r += 3 + (8 << n);\n            } else\n              K(l, m[n + 7])\n                ? ((r = 7 + 2 * K(l, 165)), (r += K(l, 145)))\n                : (r = 5 + K(l, 159));\n          else K(l, m[n + 4]) ? (r = 3 + K(l, m[n + 5])) : (r = 2);\n          h = k[2];\n        } else (r = 1), (h = k[1]);\n        k = g + Ie[e];\n        l = a;\n        0 > l.b && Qa(l);\n        var m = l.b,\n          n = l.Ca >> 1,\n          q = (n - (l.I >> m)) >> 31;\n        --l.b;\n        l.Ca += q;\n        l.Ca |= 1;\n        l.I -= ((n + 1) & q) << m;\n        f[k] = ((r ^ q) - q) * d[(0 < e) + 0];\n      }\n      return 16;\n    }\n    function Lc(a) {\n      var b = a.rb[a.sb - 1];\n      b.la = 0;\n      b.Na = 0;\n      M(a.zc, 0, 0, a.zc.length);\n      a.ja = 0;\n    }\n    function Je(a, b) {\n      for (a.M = 0; a.M < a.Va; ++a.M) {\n        var c = a.Jc[a.M & a.Xb],\n          d = a.m,\n          e = a,\n          f;\n        for (f = 0; f < e.za; ++f) {\n          var g = d;\n          var h = e;\n          var k = h.Ac,\n            l = h.Bc + 4 * f,\n            m = h.zc,\n            n = h.ya[h.aa + f];\n          h.Qa.Bb\n            ? (n.$b = K(g, h.Pa.jb[0])\n                ? 2 + K(g, h.Pa.jb[2])\n                : K(g, h.Pa.jb[1]))\n            : (n.$b = 0);\n          h.kc && (n.Ad = K(g, h.Bd));\n          n.Za = !K(g, 145) + 0;\n          if (n.Za) {\n            var r = n.Ob,\n              q = 0;\n            for (h = 0; 4 > h; ++h) {\n              var t = m[0 + h];\n              var v;\n              for (v = 0; 4 > v; ++v) {\n                t = Ke[k[l + v]][t];\n                for (var p = Mc[K(g, t[0])]; 0 < p; )\n                  p = Mc[2 * p + K(g, t[p])];\n                t = -p;\n                k[l + v] = t;\n              }\n              I(r, q, k, l, 4);\n              q += 4;\n              m[0 + h] = t;\n            }\n          } else\n            (t = K(g, 156) ? (K(g, 128) ? 1 : 3) : K(g, 163) ? 2 : 0),\n              (n.Ob[0] = t),\n              M(k, l, t, 4),\n              M(m, 0, t, 4);\n          n.Dd = K(g, 142) ? (K(g, 114) ? (K(g, 183) ? 1 : 3) : 2) : 0;\n        }\n        if (e.m.Ka) return T(a, 7, \"Premature end-of-partition0 encountered.\");\n        for (; a.ja < a.za; ++a.ja) {\n          d = a;\n          e = c;\n          g = d.rb[d.sb - 1];\n          k = d.rb[d.sb + d.ja];\n          f = d.ya[d.aa + d.ja];\n          if ((l = d.kc ? f.Ad : 0))\n            (g.la = k.la = 0),\n              f.Za || (g.Na = k.Na = 0),\n              (f.Hc = 0),\n              (f.Gc = 0),\n              (f.ia = 0);\n          else {\n            var u,\n              w,\n              g = k,\n              k = e,\n              l = d.Pa.Xc,\n              m = d.ya[d.aa + d.ja],\n              n = d.pb[m.$b];\n            h = m.ad;\n            r = 0;\n            q = d.rb[d.sb - 1];\n            t = v = 0;\n            M(h, r, 0, 384);\n            if (m.Za) {\n              var y = 0;\n              var A = l[3];\n            } else {\n              p = V(16);\n              var E = g.Na + q.Na;\n              E = oa(k, l[1], E, n.Eb, 0, p, 0);\n              g.Na = q.Na = (0 < E) + 0;\n              if (1 < E) Nc(p, 0, h, r);\n              else {\n                var B = (p[0] + 3) >> 3;\n                for (p = 0; 256 > p; p += 16) h[r + p] = B;\n              }\n              y = 1;\n              A = l[0];\n            }\n            var C = g.la & 15;\n            var N = q.la & 15;\n            for (p = 0; 4 > p; ++p) {\n              var z = N & 1;\n              for (B = w = 0; 4 > B; ++B)\n                (E = z + (C & 1)),\n                  (E = oa(k, A, E, n.Sc, y, h, r)),\n                  (z = E > y),\n                  (C = (C >> 1) | (z << 7)),\n                  (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                  (r += 16);\n              C >>= 4;\n              N = (N >> 1) | (z << 7);\n              v = ((v << 8) | w) >>> 0;\n            }\n            A = C;\n            y = N >> 4;\n            for (u = 0; 4 > u; u += 2) {\n              w = 0;\n              C = g.la >> (4 + u);\n              N = q.la >> (4 + u);\n              for (p = 0; 2 > p; ++p) {\n                z = N & 1;\n                for (B = 0; 2 > B; ++B)\n                  (E = z + (C & 1)),\n                    (E = oa(k, l[2], E, n.Qc, 0, h, r)),\n                    (z = 0 < E),\n                    (C = (C >> 1) | (z << 3)),\n                    (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                    (r += 16);\n                C >>= 2;\n                N = (N >> 1) | (z << 5);\n              }\n              t |= w << (4 * u);\n              A |= (C << 4) << u;\n              y |= (N & 240) << u;\n            }\n            g.la = A;\n            q.la = y;\n            m.Hc = v;\n            m.Gc = t;\n            m.ia = t & 43690 ? 0 : n.ia;\n            l = !(v | t);\n          }\n          0 < d.L &&\n            ((d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za]),\n            (d.wa[d.Y + d.ja].La |= !l));\n          if (e.Ka) return T(a, 7, \"Premature end-of-file encountered.\");\n        }\n        Lc(a);\n        c = a;\n        d = b;\n        e = 1;\n        f = c.D;\n        g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;\n        if (0 == c.Aa)\n          a: {\n            (f.M = c.M), (f.uc = g), Oc(c, f), (e = 1);\n            w = c.D;\n            f = w.Nb;\n            t = Ya[c.L];\n            g = t * c.R;\n            k = (t / 2) * c.B;\n            p = 16 * f * c.R;\n            B = 8 * f * c.B;\n            l = c.sa;\n            m = c.ta - g + p;\n            n = c.qa;\n            h = c.ra - k + B;\n            r = c.Ha;\n            q = c.Ia - k + B;\n            C = w.M;\n            N = 0 == C;\n            v = C >= c.Va - 1;\n            2 == c.Aa && Oc(c, w);\n            if (w.uc)\n              for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {\n                var Q = E;\n                y = w;\n                A = z;\n                var S = Q.D,\n                  D = S.Nb;\n                u = Q.R;\n                var S = S.wa[S.Y + y],\n                  F = Q.sa,\n                  H = Q.ta + 16 * D * u + 16 * y,\n                  J = S.dd,\n                  G = S.tc;\n                if (0 != G)\n                  if ((x(3 <= G), 1 == Q.L))\n                    0 < y && Pc(F, H, u, G + 4),\n                      S.La && Qc(F, H, u, G),\n                      0 < A && Rc(F, H, u, G + 4),\n                      S.La && Sc(F, H, u, G);\n                  else {\n                    var L = Q.B,\n                      O = Q.qa,\n                      P = Q.ra + 8 * D * L + 8 * y,\n                      R = Q.Ha,\n                      Q = Q.Ia + 8 * D * L + 8 * y,\n                      D = S.ld;\n                    0 < y &&\n                      (Tc(F, H, u, G + 4, J, D),\n                      Uc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));\n                    0 < A &&\n                      (Xc(F, H, u, G + 4, J, D),\n                      Yc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));\n                  }\n              }\n            c.ia && alert(\"todo:DitherRow\");\n            if (null != d.put) {\n              w = 16 * C;\n              C = 16 * (C + 1);\n              N\n                ? ((d.y = c.sa),\n                  (d.O = c.ta + p),\n                  (d.f = c.qa),\n                  (d.N = c.ra + B),\n                  (d.ea = c.Ha),\n                  (d.W = c.Ia + B))\n                : ((w -= t),\n                  (d.y = l),\n                  (d.O = m),\n                  (d.f = n),\n                  (d.N = h),\n                  (d.ea = r),\n                  (d.W = q));\n              v || (C -= t);\n              C > d.o && (C = d.o);\n              d.F = null;\n              d.J = null;\n              if (\n                null != c.Fa &&\n                0 < c.Fa.length &&\n                w < C &&\n                ((d.J = Le(c, d, w, C - w)),\n                (d.F = c.mb),\n                null == d.F && 0 == d.F.length)\n              ) {\n                e = T(c, 3, \"Could not decode alpha data.\");\n                break a;\n              }\n              w < d.j &&\n                ((t = d.j - w),\n                (w = d.j),\n                x(!(t & 1)),\n                (d.O += c.R * t),\n                (d.N += c.B * (t >> 1)),\n                (d.W += c.B * (t >> 1)),\n                null != d.F && (d.J += d.width * t));\n              w < C &&\n                ((d.O += d.v),\n                (d.N += d.v >> 1),\n                (d.W += d.v >> 1),\n                null != d.F && (d.J += d.v),\n                (d.ka = w - d.j),\n                (d.U = d.va - d.v),\n                (d.T = C - w),\n                (e = d.put(d)));\n            }\n            f + 1 != c.Ic ||\n              v ||\n              (I(c.sa, c.ta - g, l, m + 16 * c.R, g),\n              I(c.qa, c.ra - k, n, h + 8 * c.B, k),\n              I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));\n          }\n        if (!e) return T(a, 6, \"Output aborted.\");\n      }\n      return 1;\n    }\n    function Me(a, b) {\n      if (null == a) return 0;\n      if (null == b) return T(a, 2, \"NULL VP8Io parameter in VP8Decode().\");\n      if (!a.cb && !Kc(a, b)) return 0;\n      x(a.cb);\n      if (null == b.ac || b.ac(b)) {\n        b.ob && (a.L = 0);\n        var c = Ya[a.L];\n        2 == a.L\n          ? ((a.yb = 0), (a.zb = 0))\n          : ((a.yb = (b.v - c) >> 4),\n            (a.zb = (b.j - c) >> 4),\n            0 > a.yb && (a.yb = 0),\n            0 > a.zb && (a.zb = 0));\n        a.Va = (b.o + 15 + c) >> 4;\n        a.Hb = (b.va + 15 + c) >> 4;\n        a.Hb > a.za && (a.Hb = a.za);\n        a.Va > a.Ub && (a.Va = a.Ub);\n        if (0 < a.L) {\n          var d = a.ed;\n          for (c = 0; 4 > c; ++c) {\n            var e;\n            if (a.Qa.Cb) {\n              var f = a.Qa.Lb[c];\n              a.Qa.Fb || (f += d.Tb);\n            } else f = d.Tb;\n            for (e = 0; 1 >= e; ++e) {\n              var g = a.gd[c][e],\n                h = f;\n              d.Pc && ((h += d.vd[0]), e && (h += d.od[0]));\n              h = 0 > h ? 0 : 63 < h ? 63 : h;\n              if (0 < h) {\n                var k = h;\n                0 < d.wb &&\n                  ((k = 4 < d.wb ? k >> 2 : k >> 1),\n                  k > 9 - d.wb && (k = 9 - d.wb));\n                1 > k && (k = 1);\n                g.dd = k;\n                g.tc = 2 * h + k;\n                g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;\n              } else g.tc = 0;\n              g.La = e;\n            }\n          }\n        }\n        c = 0;\n      } else T(a, 6, \"Frame setup failed\"), (c = a.a);\n      if ((c = 0 == c)) {\n        if (c) {\n          a.$c = 0;\n          0 < a.Aa || (a.Ic = Ne);\n          b: {\n            c = a.Ic;\n            var k = a.za,\n              d = 4 * k,\n              l = 32 * k,\n              m = k + 1,\n              n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,\n              r = (2 == a.Aa ? 2 : 1) * k;\n            e = ((3 * (16 * c + Ya[a.L])) / 2) * l;\n            f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;\n            g = d + 832 + e + f;\n            if (g != g) c = 0;\n            else {\n              if (g > a.Vb) {\n                a.Vb = 0;\n                a.Ec = V(g);\n                a.Fc = 0;\n                if (null == a.Ec) {\n                  c = T(a, 1, \"no memory during frame initialization.\");\n                  break b;\n                }\n                a.Vb = g;\n              }\n              g = a.Ec;\n              h = a.Fc;\n              a.Ac = g;\n              a.Bc = h;\n              h += d;\n              a.Gd = wa(l, Ic);\n              a.Hd = 0;\n              a.rb = wa(m + 1, Hc);\n              a.sb = 1;\n              a.wa = n ? wa(n, Xa) : null;\n              a.Y = 0;\n              a.D.Nb = 0;\n              a.D.wa = a.wa;\n              a.D.Y = a.Y;\n              0 < a.Aa && (a.D.Y += k);\n              x(!0);\n              a.oc = g;\n              a.pc = h;\n              h += 832;\n              a.ya = wa(r, Kb);\n              a.aa = 0;\n              a.D.ya = a.ya;\n              a.D.aa = a.aa;\n              2 == a.Aa && (a.D.aa += k);\n              a.R = 16 * k;\n              a.B = 8 * k;\n              l = Ya[a.L];\n              k = l * a.R;\n              l = (l / 2) * a.B;\n              a.sa = g;\n              a.ta = h + k;\n              a.qa = a.sa;\n              a.ra = a.ta + 16 * c * a.R + l;\n              a.Ha = a.qa;\n              a.Ia = a.ra + 8 * c * a.B + l;\n              a.$c = 0;\n              h += e;\n              a.mb = f ? g : null;\n              a.nb = f ? h : null;\n              x(h + f <= a.Fc + a.Vb);\n              Lc(a);\n              M(a.Ac, a.Bc, 0, d);\n              c = 1;\n            }\n          }\n          if (c) {\n            b.ka = 0;\n            b.y = a.sa;\n            b.O = a.ta;\n            b.f = a.qa;\n            b.N = a.ra;\n            b.ea = a.Ha;\n            b.Vd = a.Ia;\n            b.fa = a.R;\n            b.Rc = a.B;\n            b.F = null;\n            b.J = 0;\n            if (!ad) {\n              for (c = -255; 255 >= c; ++c) bd[255 + c] = 0 > c ? -c : c;\n              for (c = -1020; 1020 >= c; ++c)\n                cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;\n              for (c = -112; 112 >= c; ++c)\n                dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;\n              for (c = -255; 510 >= c; ++c)\n                ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;\n              ad = 1;\n            }\n            Nc = Oe;\n            Za = Pe;\n            Nb = Qe;\n            pa = Re;\n            Ob = Se;\n            fd = Te;\n            Xc = Ue;\n            Tc = Ve;\n            Yc = We;\n            Uc = Xe;\n            Zc = Ye;\n            Vc = Ze;\n            $c = $e;\n            Wc = af;\n            Rc = gd;\n            Pc = hd;\n            Sc = bf;\n            Qc = cf;\n            W[0] = df;\n            W[1] = ef;\n            W[2] = ff;\n            W[3] = gf;\n            W[4] = hf;\n            W[5] = jf;\n            W[6] = kf;\n            W[7] = lf;\n            W[8] = mf;\n            W[9] = nf;\n            Y[0] = of;\n            Y[1] = pf;\n            Y[2] = qf;\n            Y[3] = rf;\n            Y[4] = sf;\n            Y[5] = tf;\n            Y[6] = uf;\n            ka[0] = vf;\n            ka[1] = wf;\n            ka[2] = xf;\n            ka[3] = yf;\n            ka[4] = zf;\n            ka[5] = Af;\n            ka[6] = Bf;\n            c = 1;\n          } else c = 0;\n        }\n        c && (c = Je(a, b));\n        null != b.bc && b.bc(b);\n        c &= 1;\n      }\n      if (!c) return 0;\n      a.cb = 0;\n      return c;\n    }\n    function qa(a, b, c, d, e) {\n      e = a[b + c + 32 * d] + (e >> 3);\n      a[b + c + 32 * d] = e & -256 ? (0 > e ? 0 : 255) : e;\n    }\n    function kb(a, b, c, d, e, f) {\n      qa(a, b, 0, c, d + e);\n      qa(a, b, 1, c, d + f);\n      qa(a, b, 2, c, d - f);\n      qa(a, b, 3, c, d - e);\n    }\n    function da(a) {\n      return ((20091 * a) >> 16) + a;\n    }\n    function id(a, b, c, d) {\n      var e = 0,\n        f;\n      var g = V(16);\n      for (f = 0; 4 > f; ++f) {\n        var h = a[b + 0] + a[b + 8];\n        var k = a[b + 0] - a[b + 8];\n        var l = ((35468 * a[b + 4]) >> 16) - da(a[b + 12]);\n        var m = da(a[b + 4]) + ((35468 * a[b + 12]) >> 16);\n        g[e + 0] = h + m;\n        g[e + 1] = k + l;\n        g[e + 2] = k - l;\n        g[e + 3] = h - m;\n        e += 4;\n        b++;\n      }\n      for (f = e = 0; 4 > f; ++f)\n        (a = g[e + 0] + 4),\n          (h = a + g[e + 8]),\n          (k = a - g[e + 8]),\n          (l = ((35468 * g[e + 4]) >> 16) - da(g[e + 12])),\n          (m = da(g[e + 4]) + ((35468 * g[e + 12]) >> 16)),\n          qa(c, d, 0, 0, h + m),\n          qa(c, d, 1, 0, k + l),\n          qa(c, d, 2, 0, k - l),\n          qa(c, d, 3, 0, h - m),\n          e++,\n          (d += 32);\n    }\n    function Te(a, b, c, d) {\n      var e = a[b + 0] + 4,\n        f = (35468 * a[b + 4]) >> 16,\n        g = da(a[b + 4]),\n        h = (35468 * a[b + 1]) >> 16;\n      a = da(a[b + 1]);\n      kb(c, d, 0, e + g, a, h);\n      kb(c, d, 1, e + f, a, h);\n      kb(c, d, 2, e - f, a, h);\n      kb(c, d, 3, e - g, a, h);\n    }\n    function Pe(a, b, c, d, e) {\n      id(a, b, c, d);\n      e && id(a, b + 16, c, d + 4);\n    }\n    function Qe(a, b, c, d) {\n      Za(a, b + 0, c, d, 1);\n      Za(a, b + 32, c, d + 128, 1);\n    }\n    function Re(a, b, c, d) {\n      a = a[b + 0] + 4;\n      var e;\n      for (e = 0; 4 > e; ++e) for (b = 0; 4 > b; ++b) qa(c, d, b, e, a);\n    }\n    function Se(a, b, c, d) {\n      a[b + 0] && pa(a, b + 0, c, d);\n      a[b + 16] && pa(a, b + 16, c, d + 4);\n      a[b + 32] && pa(a, b + 32, c, d + 128);\n      a[b + 48] && pa(a, b + 48, c, d + 128 + 4);\n    }\n    function Oe(a, b, c, d) {\n      var e = V(16),\n        f;\n      for (f = 0; 4 > f; ++f) {\n        var g = a[b + 0 + f] + a[b + 12 + f];\n        var h = a[b + 4 + f] + a[b + 8 + f];\n        var k = a[b + 4 + f] - a[b + 8 + f];\n        var l = a[b + 0 + f] - a[b + 12 + f];\n        e[0 + f] = g + h;\n        e[8 + f] = g - h;\n        e[4 + f] = l + k;\n        e[12 + f] = l - k;\n      }\n      for (f = 0; 4 > f; ++f)\n        (a = e[0 + 4 * f] + 3),\n          (g = a + e[3 + 4 * f]),\n          (h = e[1 + 4 * f] + e[2 + 4 * f]),\n          (k = e[1 + 4 * f] - e[2 + 4 * f]),\n          (l = a - e[3 + 4 * f]),\n          (c[d + 0] = (g + h) >> 3),\n          (c[d + 16] = (l + k) >> 3),\n          (c[d + 32] = (g - h) >> 3),\n          (c[d + 48] = (l - k) >> 3),\n          (d += 64);\n    }\n    function Pb(a, b, c) {\n      var d = b - 32,\n        e = R,\n        f = 255 - a[d - 1],\n        g;\n      for (g = 0; g < c; ++g) {\n        var h = e,\n          k = f + a[b - 1],\n          l;\n        for (l = 0; l < c; ++l) a[b + l] = h[k + a[d + l]];\n        b += 32;\n      }\n    }\n    function ef(a, b) {\n      Pb(a, b, 4);\n    }\n    function wf(a, b) {\n      Pb(a, b, 8);\n    }\n    function pf(a, b) {\n      Pb(a, b, 16);\n    }\n    function qf(a, b) {\n      var c;\n      for (c = 0; 16 > c; ++c) I(a, b + 32 * c, a, b - 32, 16);\n    }\n    function rf(a, b) {\n      var c;\n      for (c = 16; 0 < c; --c) M(a, b, a[b - 1], 16), (b += 32);\n    }\n    function $a(a, b, c) {\n      var d;\n      for (d = 0; 16 > d; ++d) M(b, c + 32 * d, a, 16);\n    }\n    function of(a, b) {\n      var c = 16,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d] + a[b + d - 32];\n      $a(c >> 5, a, b);\n    }\n    function sf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d];\n      $a(c >> 4, a, b);\n    }\n    function tf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b + d - 32];\n      $a(c >> 4, a, b);\n    }\n    function uf(a, b) {\n      $a(128, a, b);\n    }\n    function z(a, b, c) {\n      return (a + 2 * b + c + 2) >> 2;\n    }\n    function ff(a, b) {\n      var c = b - 32,\n        c = new Uint8Array([\n          z(a[c - 1], a[c + 0], a[c + 1]),\n          z(a[c + 0], a[c + 1], a[c + 2]),\n          z(a[c + 1], a[c + 2], a[c + 3]),\n          z(a[c + 2], a[c + 3], a[c + 4])\n        ]),\n        d;\n      for (d = 0; 4 > d; ++d) I(a, b + 32 * d, c, 0, c.length);\n    }\n    function gf(a, b) {\n      var c = a[b - 1],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));\n      ra(a, b + 32, 16843009 * z(c, d, e));\n      ra(a, b + 64, 16843009 * z(d, e, f));\n      ra(a, b + 96, 16843009 * z(e, f, f));\n    }\n    function df(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 4 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      c >>= 3;\n      for (d = 0; 4 > d; ++d) M(a, b + 32 * d, c, 4);\n    }\n    function hf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);\n      a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);\n      a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);\n      a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);\n      a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);\n      a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);\n      a[b + 3 + 0] = z(l, k, h);\n    }\n    function kf(a, b) {\n      var c = a[b + 1 - 32],\n        d = a[b + 2 - 32],\n        e = a[b + 3 - 32],\n        f = a[b + 4 - 32],\n        g = a[b + 5 - 32],\n        h = a[b + 6 - 32],\n        k = a[b + 7 - 32];\n      a[b + 0 + 0] = z(a[b + 0 - 32], c, d);\n      a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);\n      a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);\n      a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);\n      a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, k);\n    }\n    function jf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 0] = a[b + 1 + 64] = (f + g + 1) >> 1;\n      a[b + 1 + 0] = a[b + 2 + 64] = (g + h + 1) >> 1;\n      a[b + 2 + 0] = a[b + 3 + 64] = (h + k + 1) >> 1;\n      a[b + 3 + 0] = (k + l + 1) >> 1;\n      a[b + 0 + 96] = z(e, d, c);\n      a[b + 0 + 64] = z(d, c, f);\n      a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);\n      a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);\n      a[b + 3 + 32] = z(h, k, l);\n    }\n    function lf(a, b) {\n      var c = a[b + 0 - 32],\n        d = a[b + 1 - 32],\n        e = a[b + 2 - 32],\n        f = a[b + 3 - 32],\n        g = a[b + 4 - 32],\n        h = a[b + 5 - 32],\n        k = a[b + 6 - 32],\n        l = a[b + 7 - 32];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 1 + 0] = a[b + 0 + 64] = (d + e + 1) >> 1;\n      a[b + 2 + 0] = a[b + 1 + 64] = (e + f + 1) >> 1;\n      a[b + 3 + 0] = a[b + 2 + 64] = (f + g + 1) >> 1;\n      a[b + 0 + 32] = z(c, d, e);\n      a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);\n      a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 3 + 64] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, l);\n    }\n    function nf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 2 + 0] = a[b + 0 + 32] = (d + e + 1) >> 1;\n      a[b + 2 + 32] = a[b + 0 + 64] = (e + f + 1) >> 1;\n      a[b + 1 + 0] = z(c, d, e);\n      a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);\n      a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);\n      a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[\n        b + 2 + 96\n      ] = a[b + 3 + 96] = f;\n    }\n    function mf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96],\n        g = a[b - 1 - 32],\n        h = a[b + 0 - 32],\n        k = a[b + 1 - 32],\n        l = a[b + 2 - 32];\n      a[b + 0 + 0] = a[b + 2 + 32] = (c + g + 1) >> 1;\n      a[b + 0 + 32] = a[b + 2 + 64] = (d + c + 1) >> 1;\n      a[b + 0 + 64] = a[b + 2 + 96] = (e + d + 1) >> 1;\n      a[b + 0 + 96] = (f + e + 1) >> 1;\n      a[b + 3 + 0] = z(h, k, l);\n      a[b + 2 + 0] = z(g, h, k);\n      a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);\n      a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);\n      a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);\n      a[b + 1 + 96] = z(f, e, d);\n    }\n    function xf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) I(a, b + 32 * c, a, b - 32, 8);\n    }\n    function yf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) M(a, b, a[b - 1], 8), (b += 32);\n    }\n    function lb(a, b, c) {\n      var d;\n      for (d = 0; 8 > d; ++d) M(b, c + 32 * d, a, 8);\n    }\n    function vf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      lb(c >> 4, a, b);\n    }\n    function Af(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32];\n      lb(c >> 3, a, b);\n    }\n    function zf(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b - 1 + 32 * d];\n      lb(c >> 3, a, b);\n    }\n    function Bf(a, b) {\n      lb(128, a, b);\n    }\n    function ab(a, b, c) {\n      var d = a[b - c],\n        e = a[b + 0],\n        f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],\n        g = mb[112 + ((f + 4) >> 3)];\n      a[b - c] = R[255 + d + mb[112 + ((f + 3) >> 3)]];\n      a[b + 0] = R[255 + e - g];\n    }\n    function jd(a, b, c, d) {\n      var e = a[b + 0],\n        f = a[b + c];\n      return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;\n    }\n    function kd(a, b, c, d) {\n      return (\n        4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d\n      );\n    }\n    function ld(a, b, c, d, e) {\n      var f = a[b - 3 * c],\n        g = a[b - 2 * c],\n        h = a[b - c],\n        k = a[b + 0],\n        l = a[b + c],\n        m = a[b + 2 * c],\n        n = a[b + 3 * c];\n      return 4 * U[255 + h - k] + U[255 + g - l] > d\n        ? 0\n        : U[255 + a[b - 4 * c] - f] <= e &&\n            U[255 + f - g] <= e &&\n            U[255 + g - h] <= e &&\n            U[255 + n - m] <= e &&\n            U[255 + m - l] <= e &&\n            U[255 + l - k] <= e;\n    }\n    function gd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d, c, e) && ab(a, b + d, c);\n    }\n    function hd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);\n    }\n    function bf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4 * c), gd(a, b, c, d);\n    }\n    function cf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4), hd(a, b, c, d);\n    }\n    function ea(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - 2 * m],\n              r = k[l - m],\n              q = k[l + 0],\n              t = k[l + m],\n              v = k[l + 2 * m],\n              p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],\n              u = (27 * p + 63) >> 7,\n              w = (18 * p + 63) >> 7,\n              p = (9 * p + 63) >> 7;\n            k[l - 3 * m] = R[255 + k[l - 3 * m] + p];\n            k[l - 2 * m] = R[255 + n + w];\n            k[l - m] = R[255 + r + u];\n            k[l + 0] = R[255 + q - u];\n            k[l + m] = R[255 + t - w];\n            k[l + 2 * m] = R[255 + v - p];\n          }\n        b += d;\n      }\n    }\n    function Fa(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - m],\n              r = k[l + 0],\n              q = k[l + m],\n              t = 3 * (r - n),\n              v = mb[112 + ((t + 4) >> 3)],\n              t = mb[112 + ((t + 3) >> 3)],\n              p = (v + 1) >> 1;\n            k[l - 2 * m] = R[255 + k[l - 2 * m] + p];\n            k[l - m] = R[255 + n + t];\n            k[l + 0] = R[255 + r - v];\n            k[l + m] = R[255 + q - p];\n          }\n        b += d;\n      }\n    }\n    function Ue(a, b, c, d, e, f) {\n      ea(a, b, c, 1, 16, d, e, f);\n    }\n    function Ve(a, b, c, d, e, f) {\n      ea(a, b, 1, c, 16, d, e, f);\n    }\n    function Ye(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4 * c), Fa(a, b, c, 1, 16, d, e, f);\n    }\n    function Ze(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4), Fa(a, b, 1, c, 16, d, e, f);\n    }\n    function We(a, b, c, d, e, f, g, h) {\n      ea(a, b, e, 1, 8, f, g, h);\n      ea(c, d, e, 1, 8, f, g, h);\n    }\n    function Xe(a, b, c, d, e, f, g, h) {\n      ea(a, b, 1, e, 8, f, g, h);\n      ea(c, d, 1, e, 8, f, g, h);\n    }\n    function $e(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4 * e, e, 1, 8, f, g, h);\n      Fa(c, d + 4 * e, e, 1, 8, f, g, h);\n    }\n    function af(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4, 1, e, 8, f, g, h);\n      Fa(c, d + 4, 1, e, 8, f, g, h);\n    }\n    function Cf() {\n      this.ba = new Cb();\n      this.ec = [];\n      this.cc = [];\n      this.Mc = [];\n      this.Dc = this.Nc = this.dc = this.fc = 0;\n      this.Oa = new Ud();\n      this.memory = 0;\n      this.Ib = \"OutputFunc\";\n      this.Jb = \"OutputAlphaFunc\";\n      this.Nd = \"OutputRowFunc\";\n    }\n    function md() {\n      this.data = [];\n      this.offset = this.kd = this.ha = this.w = 0;\n      this.na = [];\n      this.xa = this.gb = this.Ja = this.Sa = this.P = 0;\n    }\n    function Df() {\n      this.nc = this.Ea = this.b = this.hc = 0;\n      this.K = [];\n      this.w = 0;\n    }\n    function Ef() {\n      this.ua = 0;\n      this.Wa = new ac();\n      this.vb = new ac();\n      this.md = this.xc = this.wc = 0;\n      this.vc = [];\n      this.Wb = 0;\n      this.Ya = new Ub();\n      this.yc = new O();\n    }\n    function je() {\n      this.xb = this.a = 0;\n      this.l = new Oa();\n      this.ca = new Cb();\n      this.V = [];\n      this.Ba = 0;\n      this.Ta = [];\n      this.Ua = 0;\n      this.m = new Ra();\n      this.Pb = 0;\n      this.wd = new Ra();\n      this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;\n      this.s = new Ef();\n      this.ab = 0;\n      this.gc = wa(4, Df);\n      this.Oc = 0;\n    }\n    function Ff() {\n      this.Lc = this.Z = this.$a = this.i = this.c = 0;\n      this.l = new Oa();\n      this.ic = 0;\n      this.ca = [];\n      this.tb = 0;\n      this.qd = null;\n      this.rd = 0;\n    }\n    function Rb(a, b, c, d, e, f, g) {\n      a = null == a ? 0 : a[b + 0];\n      for (b = 0; b < g; ++b) (e[f + b] = (a + c[d + b]) & 255), (a = e[f + b]);\n    }\n    function Gf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h;\n        for (h = 0; h < g; ++h) e[f + h] = (a[b + h] + c[d + h]) & 255;\n      }\n    }\n    function Hf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h = a[b + 0],\n          k = h,\n          l = h,\n          m;\n        for (m = 0; m < g; ++m)\n          (h = a[b + m]),\n            (k = l + h - k),\n            (l = (c[d + m] + (k & -256 ? (0 > k ? 0 : 255) : k)) & 255),\n            (k = h),\n            (e[f + m] = l);\n      }\n    }\n    function Le(a, b, c, d) {\n      var e = b.width,\n        f = b.o;\n      x(null != a && null != b);\n      if (0 > c || 0 >= d || c + d > f) return null;\n      if (!a.Cc) {\n        if (null == a.ga) {\n          a.ga = new Ff();\n          var g;\n          (g = null == a.ga) ||\n            ((g = b.width * b.o),\n            x(0 == a.Gb.length),\n            (a.Gb = V(g)),\n            (a.Uc = 0),\n            null == a.Gb\n              ? (g = 0)\n              : ((a.mb = a.Gb), (a.nb = a.Uc), (a.rc = null), (g = 1)),\n            (g = !g));\n          if (!g) {\n            g = a.ga;\n            var h = a.Fa,\n              k = a.P,\n              l = a.qc,\n              m = a.mb,\n              n = a.nb,\n              r = k + 1,\n              q = l - 1,\n              t = g.l;\n            x(null != h && null != m && null != b);\n            ia[0] = null;\n            ia[1] = Rb;\n            ia[2] = Gf;\n            ia[3] = Hf;\n            g.ca = m;\n            g.tb = n;\n            g.c = b.width;\n            g.i = b.height;\n            x(0 < g.c && 0 < g.i);\n            if (1 >= l) b = 0;\n            else if (\n              ((g.$a = (h[k + 0] >> 0) & 3),\n              (g.Z = (h[k + 0] >> 2) & 3),\n              (g.Lc = (h[k + 0] >> 4) & 3),\n              (k = (h[k + 0] >> 6) & 3),\n              0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k)\n            )\n              b = 0;\n            else if (\n              ((t.put = kc),\n              (t.ac = gc),\n              (t.bc = lc),\n              (t.ma = g),\n              (t.width = b.width),\n              (t.height = b.height),\n              (t.Da = b.Da),\n              (t.v = b.v),\n              (t.va = b.va),\n              (t.j = b.j),\n              (t.o = b.o),\n              g.$a)\n            )\n              b: {\n                x(1 == g.$a), (b = Bc());\n                c: for (;;) {\n                  if (null == b) {\n                    b = 0;\n                    break b;\n                  }\n                  x(null != g);\n                  g.mc = b;\n                  b.c = g.c;\n                  b.i = g.i;\n                  b.l = g.l;\n                  b.l.ma = g;\n                  b.l.width = g.c;\n                  b.l.height = g.i;\n                  b.a = 0;\n                  cb(b.m, h, r, q);\n                  if (!rb(g.c, g.i, 1, b, null)) break c;\n                  1 == b.ab && 3 == b.gc[0].hc && yc(b.s)\n                    ? ((g.ic = 1),\n                      (h = b.c * b.i),\n                      (b.Ta = null),\n                      (b.Ua = 0),\n                      (b.V = V(h)),\n                      (b.Ba = 0),\n                      null == b.V ? ((b.a = 1), (b = 0)) : (b = 1))\n                    : ((g.ic = 0), (b = Ec(b, g.c)));\n                  if (!b) break c;\n                  b = 1;\n                  break b;\n                }\n                g.mc = null;\n                b = 0;\n              }\n            else b = q >= g.c * g.i;\n            g = !b;\n          }\n          if (g) return null;\n          1 != a.ga.Lc ? (a.Ga = 0) : (d = f - c);\n        }\n        x(null != a.ga);\n        x(c + d <= f);\n        a: {\n          h = a.ga;\n          b = h.c;\n          f = h.l.o;\n          if (0 == h.$a) {\n            r = a.rc;\n            q = a.Vc;\n            t = a.Fa;\n            k = a.P + 1 + c * b;\n            l = a.mb;\n            m = a.nb + c * b;\n            x(k <= a.P + a.qc);\n            if (0 != h.Z)\n              for (x(null != ia[h.Z]), g = 0; g < d; ++g)\n                ia[h.Z](r, q, t, k, l, m, b),\n                  (r = l),\n                  (q = m),\n                  (m += b),\n                  (k += b);\n            else\n              for (g = 0; g < d; ++g)\n                I(l, m, t, k, b), (r = l), (q = m), (m += b), (k += b);\n            a.rc = r;\n            a.Vc = q;\n          } else {\n            x(null != h.mc);\n            b = c + d;\n            g = h.mc;\n            x(null != g);\n            x(b <= g.i);\n            if (g.C >= b) b = 1;\n            else if ((h.ic || Aa(), h.ic)) {\n              var h = g.V,\n                r = g.Ba,\n                q = g.c,\n                v = g.i,\n                t = 1,\n                k = g.$ / q,\n                l = g.$ % q,\n                m = g.m,\n                n = g.s,\n                p = g.$,\n                u = q * v,\n                w = q * b,\n                y = n.wc,\n                A = p < w ? ha(n, l, k) : null;\n              x(p <= u);\n              x(b <= v);\n              x(yc(n));\n              c: for (;;) {\n                for (; !m.h && p < w; ) {\n                  l & y || (A = ha(n, l, k));\n                  x(null != A);\n                  Sa(m);\n                  v = ua(A.G[0], A.H[0], m);\n                  if (256 > v)\n                    (h[r + p] = v),\n                      ++p,\n                      ++l,\n                      l >= q && ((l = 0), ++k, k <= b && !(k % 16) && Ib(g, k));\n                  else if (280 > v) {\n                    var v = ib(v - 256, m);\n                    var E = ua(A.G[4], A.H[4], m);\n                    Sa(m);\n                    E = ib(E, m);\n                    E = nc(q, E);\n                    if (p >= E && u - p >= v) {\n                      var B;\n                      for (B = 0; B < v; ++B) h[r + p + B] = h[r + p + B - E];\n                    } else {\n                      t = 0;\n                      break c;\n                    }\n                    p += v;\n                    for (l += v; l >= q; )\n                      (l -= q), ++k, k <= b && !(k % 16) && Ib(g, k);\n                    p < w && l & y && (A = ha(n, l, k));\n                  } else {\n                    t = 0;\n                    break c;\n                  }\n                  x(m.h == db(m));\n                }\n                Ib(g, k > b ? b : k);\n                break c;\n              }\n              !t || (m.h && p < u) ? ((t = 0), (g.a = m.h ? 5 : 3)) : (g.$ = p);\n              b = t;\n            } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);\n            if (!b) {\n              d = 0;\n              break a;\n            }\n          }\n          c + d >= f && (a.Cc = 1);\n          d = 1;\n        }\n        if (!d) return null;\n        if (\n          a.Cc &&\n          ((d = a.ga), null != d && (d.mc = null), (a.ga = null), 0 < a.Ga)\n        )\n          return alert(\"todo:WebPDequantizeLevels\"), null;\n      }\n      return a.nb + c * e;\n    }\n    function If(a, b, c, d, e, f) {\n      for (; 0 < e--; ) {\n        var g = a,\n          h = b + (c ? 1 : 0),\n          k = a,\n          l = b + (c ? 0 : 3),\n          m;\n        for (m = 0; m < d; ++m) {\n          var n = k[l + 4 * m];\n          255 != n &&\n            ((n *= 32897),\n            (g[h + 4 * m + 0] = (g[h + 4 * m + 0] * n) >> 23),\n            (g[h + 4 * m + 1] = (g[h + 4 * m + 1] * n) >> 23),\n            (g[h + 4 * m + 2] = (g[h + 4 * m + 2] * n) >> 23));\n        }\n        b += f;\n      }\n    }\n    function Jf(a, b, c, d, e) {\n      for (; 0 < d--; ) {\n        var f;\n        for (f = 0; f < c; ++f) {\n          var g = a[b + 2 * f + 0],\n            h = a[b + 2 * f + 1],\n            k = h & 15,\n            l = 4369 * k,\n            h = (((h & 240) | (h >> 4)) * l) >> 16;\n          a[b + 2 * f + 0] =\n            (((((g & 240) | (g >> 4)) * l) >> 16) & 240) |\n            ((((((g & 15) | (g << 4)) * l) >> 16) >> 4) & 15);\n          a[b + 2 * f + 1] = (h & 240) | k;\n        }\n        b += e;\n      }\n    }\n    function Kf(a, b, c, d, e, f, g, h) {\n      var k = 255,\n        l,\n        m;\n      for (m = 0; m < e; ++m) {\n        for (l = 0; l < d; ++l) {\n          var n = a[b + l];\n          f[g + 4 * l] = n;\n          k &= n;\n        }\n        b += c;\n        g += h;\n      }\n      return 255 != k;\n    }\n    function Lf(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < e; ++f) c[d + f] = a[b + f] >> 8;\n    }\n    function Aa() {\n      za = If;\n      vc = Jf;\n      fc = Kf;\n      Fc = Lf;\n    }\n    function va(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {\n        var d,\n          E = (y - 1) >> 1;\n        var B = h[k + 0] | (l[m + 0] << 16);\n        var C = n[r + 0] | (q[t + 0] << 16);\n        x(null != a);\n        var z = (3 * B + C + 131074) >> 2;\n        b(a[e + 0], z & 255, z >> 16, v, p);\n        null != f &&\n          ((z = (3 * C + B + 131074) >> 2),\n          b(f[g + 0], z & 255, z >> 16, u, w));\n        for (d = 1; d <= E; ++d) {\n          var D = h[k + d] | (l[m + d] << 16);\n          var G = n[r + d] | (q[t + d] << 16);\n          var F = B + D + C + G + 524296;\n          var H = (F + 2 * (D + C)) >> 3;\n          F = (F + 2 * (B + G)) >> 3;\n          z = (H + B) >> 1;\n          B = (F + D) >> 1;\n          b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);\n          b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);\n          null != f &&\n            ((z = (F + C) >> 1),\n            (B = (H + G) >> 1),\n            b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c),\n            b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));\n          B = D;\n          C = G;\n        }\n        y & 1 ||\n          ((z = (3 * B + C + 131074) >> 2),\n          b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c),\n          null != f &&\n            ((z = (3 * C + B + 131074) >> 2),\n            b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));\n      };\n    }\n    function ic() {\n      P[Ca] = Mf;\n      P[Ua] = nd;\n      P[tc] = Nf;\n      P[Va] = od;\n      P[ya] = pd;\n      P[Db] = qd;\n      P[wc] = Of;\n      P[zb] = nd;\n      P[Ab] = od;\n      P[Ja] = pd;\n      P[Bb] = qd;\n    }\n    function Sb(a) {\n      return a & ~Pf ? (0 > a ? 0 : 255) : a >> rd;\n    }\n    function bb(a, b) {\n      return Sb(((19077 * a) >> 8) + ((26149 * b) >> 8) - 14234);\n    }\n    function nb(a, b, c) {\n      return Sb(\n        ((19077 * a) >> 8) - ((6419 * b) >> 8) - ((13320 * c) >> 8) + 8708\n      );\n    }\n    function Pa(a, b) {\n      return Sb(((19077 * a) >> 8) + ((33050 * b) >> 8) - 17685);\n    }\n    function Ga(a, b, c, d, e) {\n      d[e + 0] = bb(a, c);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = Pa(a, b);\n    }\n    function Tb(a, b, c, d, e) {\n      d[e + 0] = Pa(a, b);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = bb(a, c);\n    }\n    function sd(a, b, c, d, e) {\n      var f = nb(a, b, c);\n      b = ((f << 3) & 224) | (Pa(a, b) >> 3);\n      d[e + 0] = (bb(a, c) & 248) | (f >> 5);\n      d[e + 1] = b;\n    }\n    function td(a, b, c, d, e) {\n      var f = (Pa(a, b) & 240) | 15;\n      d[e + 0] = (bb(a, c) & 240) | (nb(a, b, c) >> 4);\n      d[e + 1] = f;\n    }\n    function ud(a, b, c, d, e) {\n      d[e + 0] = 255;\n      Ga(a, b, c, d, e + 1);\n    }\n    function vd(a, b, c, d, e) {\n      Tb(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function wd(a, b, c, d, e) {\n      Ga(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function la(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n) {\n        for (var d = m + (n & -2) * c; m != d; )\n          b(a[e + 0], f[g + 0], h[k + 0], l, m),\n            b(a[e + 1], f[g + 0], h[k + 0], l, m + c),\n            (e += 2),\n            ++g,\n            ++k,\n            (m += 2 * c);\n        n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);\n      };\n    }\n    function xd(a, b, c) {\n      return 0 == c ? (0 == a ? (0 == b ? 6 : 5) : 0 == b ? 4 : 0) : c;\n    }\n    function yd(a, b, c, d, e) {\n      switch (a >>> 30) {\n        case 3:\n          Za(b, c, d, e, 0);\n          break;\n        case 2:\n          fd(b, c, d, e);\n          break;\n        case 1:\n          pa(b, c, d, e);\n      }\n    }\n    function Oc(a, b) {\n      var c,\n        d,\n        e = b.M,\n        f = b.Nb,\n        g = a.oc,\n        h = a.pc + 40,\n        k = a.oc,\n        l = a.pc + 584,\n        m = a.oc,\n        n = a.pc + 600;\n      for (c = 0; 16 > c; ++c) g[h + 32 * c - 1] = 129;\n      for (c = 0; 8 > c; ++c)\n        (k[l + 32 * c - 1] = 129), (m[n + 32 * c - 1] = 129);\n      0 < e\n        ? (g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129)\n        : (M(g, h - 32 - 1, 127, 21),\n          M(k, l - 32 - 1, 127, 9),\n          M(m, n - 32 - 1, 127, 9));\n      for (d = 0; d < a.za; ++d) {\n        var r = b.ya[b.aa + d];\n        if (0 < d) {\n          for (c = -1; 16 > c; ++c) I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);\n          for (c = -1; 8 > c; ++c)\n            I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4),\n              I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);\n        }\n        var q = a.Gd,\n          t = a.Hd + d,\n          v = r.ad,\n          p = r.Hc;\n        0 < e &&\n          (I(g, h - 32, q[t].y, 0, 16),\n          I(k, l - 32, q[t].f, 0, 8),\n          I(m, n - 32, q[t].ea, 0, 8));\n        if (r.Za) {\n          var u = g;\n          var w = h - 32 + 16;\n          0 < e &&\n            (d >= a.za - 1\n              ? M(u, w, q[t].y[15], 4)\n              : I(u, w, q[t + 1].y, 0, 4));\n          for (c = 0; 4 > c; c++)\n            u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];\n          for (c = 0; 16 > c; ++c, p <<= 2)\n            (u = g), (w = h + zd[c]), W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);\n        } else if (((u = xd(d, e, r.Ob[0])), Y[u](g, h), 0 != p))\n          for (c = 0; 16 > c; ++c, p <<= 2) yd(p, v, 16 * +c, g, h + zd[c]);\n        c = r.Gc;\n        u = xd(d, e, r.Dd);\n        ka[u](k, l);\n        ka[u](m, n);\n        r = c >> 0;\n        p = v;\n        u = k;\n        w = l;\n        r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));\n        c >>= 8;\n        r = m;\n        p = n;\n        c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));\n        e < a.Ub - 1 &&\n          (I(q[t].y, 0, g, h + 480, 16),\n          I(q[t].f, 0, k, l + 224, 8),\n          I(q[t].ea, 0, m, n + 224, 8));\n        c = 8 * f * a.B;\n        q = a.sa;\n        t = a.ta + 16 * d + 16 * f * a.R;\n        v = a.qa;\n        r = a.ra + 8 * d + c;\n        p = a.Ha;\n        u = a.Ia + 8 * d + c;\n        for (c = 0; 16 > c; ++c) I(q, t + c * a.R, g, h + 32 * c, 16);\n        for (c = 0; 8 > c; ++c)\n          I(v, r + c * a.B, k, l + 32 * c, 8),\n            I(p, u + c * a.B, m, n + 32 * c, 8);\n      }\n    }\n    function Ad(a, b, c, d, e, f, g, h, k) {\n      var l = [0],\n        m = [0],\n        n = 0,\n        r = null != k ? k.kd : 0,\n        q = null != k ? k : new md();\n      if (null == a || 12 > c) return 7;\n      q.data = a;\n      q.w = b;\n      q.ha = c;\n      b = [b];\n      c = [c];\n      q.gb = [q.gb];\n      a: {\n        var t = b;\n        var v = c;\n        var p = q.gb;\n        x(null != a);\n        x(null != v);\n        x(null != p);\n        p[0] = 0;\n        if (12 <= v[0] && !fa(a, t[0], \"RIFF\")) {\n          if (fa(a, t[0] + 8, \"WEBP\")) {\n            p = 3;\n            break a;\n          }\n          var u = Ha(a, t[0] + 4);\n          if (12 > u || 4294967286 < u) {\n            p = 3;\n            break a;\n          }\n          if (r && u > v[0] - 8) {\n            p = 7;\n            break a;\n          }\n          p[0] = u;\n          t[0] += 12;\n          v[0] -= 12;\n        }\n        p = 0;\n      }\n      if (0 != p) return p;\n      u = 0 < q.gb[0];\n      for (c = c[0]; ; ) {\n        t = [0];\n        n = [n];\n        a: {\n          var w = a;\n          v = b;\n          p = c;\n          var y = n,\n            A = l,\n            z = m,\n            B = t;\n          y[0] = 0;\n          if (8 > p[0]) p = 7;\n          else {\n            if (!fa(w, v[0], \"VP8X\")) {\n              if (10 != Ha(w, v[0] + 4)) {\n                p = 3;\n                break a;\n              }\n              if (18 > p[0]) {\n                p = 7;\n                break a;\n              }\n              var C = Ha(w, v[0] + 8);\n              var D = 1 + Yb(w, v[0] + 12);\n              w = 1 + Yb(w, v[0] + 15);\n              if (2147483648 <= D * w) {\n                p = 3;\n                break a;\n              }\n              null != B && (B[0] = C);\n              null != A && (A[0] = D);\n              null != z && (z[0] = w);\n              v[0] += 18;\n              p[0] -= 18;\n              y[0] = 1;\n            }\n            p = 0;\n          }\n        }\n        n = n[0];\n        t = t[0];\n        if (0 != p) return p;\n        v = !!(t & 2);\n        if (!u && n) return 3;\n        null != f && (f[0] = !!(t & 16));\n        null != g && (g[0] = v);\n        null != h && (h[0] = 0);\n        g = l[0];\n        t = m[0];\n        if (n && v && null == k) {\n          p = 0;\n          break;\n        }\n        if (4 > c) {\n          p = 7;\n          break;\n        }\n        if ((u && n) || (!u && !n && !fa(a, b[0], \"ALPH\"))) {\n          c = [c];\n          q.na = [q.na];\n          q.P = [q.P];\n          q.Sa = [q.Sa];\n          a: {\n            C = a;\n            p = b;\n            u = c;\n            var y = q.gb,\n              A = q.na,\n              z = q.P,\n              B = q.Sa;\n            D = 22;\n            x(null != C);\n            x(null != u);\n            w = p[0];\n            var F = u[0];\n            x(null != A);\n            x(null != B);\n            A[0] = null;\n            z[0] = null;\n            for (B[0] = 0; ; ) {\n              p[0] = w;\n              u[0] = F;\n              if (8 > F) {\n                p = 7;\n                break a;\n              }\n              var G = Ha(C, w + 4);\n              if (4294967286 < G) {\n                p = 3;\n                break a;\n              }\n              var H = (8 + G + 1) & -2;\n              D += H;\n              if (0 < y && D > y) {\n                p = 3;\n                break a;\n              }\n              if (!fa(C, w, \"VP8 \") || !fa(C, w, \"VP8L\")) {\n                p = 0;\n                break a;\n              }\n              if (F[0] < H) {\n                p = 7;\n                break a;\n              }\n              fa(C, w, \"ALPH\") || ((A[0] = C), (z[0] = w + 8), (B[0] = G));\n              w += H;\n              F -= H;\n            }\n          }\n          c = c[0];\n          q.na = q.na[0];\n          q.P = q.P[0];\n          q.Sa = q.Sa[0];\n          if (0 != p) break;\n        }\n        c = [c];\n        q.Ja = [q.Ja];\n        q.xa = [q.xa];\n        a: if (\n          ((y = a),\n          (p = b),\n          (u = c),\n          (A = q.gb[0]),\n          (z = q.Ja),\n          (B = q.xa),\n          (C = p[0]),\n          (w = !fa(y, C, \"VP8 \")),\n          (D = !fa(y, C, \"VP8L\")),\n          x(null != y),\n          x(null != u),\n          x(null != z),\n          x(null != B),\n          8 > u[0])\n        )\n          p = 7;\n        else {\n          if (w || D) {\n            y = Ha(y, C + 4);\n            if (12 <= A && y > A - 12) {\n              p = 3;\n              break a;\n            }\n            if (r && y > u[0] - 8) {\n              p = 7;\n              break a;\n            }\n            z[0] = y;\n            p[0] += 8;\n            u[0] -= 8;\n            B[0] = D;\n          } else\n            (B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5)),\n              (z[0] = u[0]);\n          p = 0;\n        }\n        c = c[0];\n        q.Ja = q.Ja[0];\n        q.xa = q.xa[0];\n        b = b[0];\n        if (0 != p) break;\n        if (4294967286 < q.Ja) return 3;\n        null == h || v || (h[0] = q.xa ? 2 : 1);\n        g = [g];\n        t = [t];\n        if (q.xa) {\n          if (5 > c) {\n            p = 7;\n            break;\n          }\n          h = g;\n          r = t;\n          v = f;\n          null == a || 5 > c\n            ? (a = 0)\n            : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5)\n            ? ((u = [0]),\n              (y = [0]),\n              (A = [0]),\n              (z = new Ra()),\n              cb(z, a, b, c),\n              mc(z, u, y, A)\n                ? (null != h && (h[0] = u[0]),\n                  null != r && (r[0] = y[0]),\n                  null != v && (v[0] = A[0]),\n                  (a = 1))\n                : (a = 0))\n            : (a = 0);\n        } else {\n          if (10 > c) {\n            p = 7;\n            break;\n          }\n          h = t;\n          null == a || 10 > c || !Jc(a, b + 3, c - 3)\n            ? (a = 0)\n            : ((r = a[b + 0] | (a[b + 1] << 8) | (a[b + 2] << 16)),\n              (v = ((a[b + 7] << 8) | a[b + 6]) & 16383),\n              (a = ((a[b + 9] << 8) | a[b + 8]) & 16383),\n              r & 1 ||\n              3 < ((r >> 1) & 7) ||\n              !((r >> 4) & 1) ||\n              r >> 5 >= q.Ja ||\n              !v ||\n              !a\n                ? (a = 0)\n                : (g && (g[0] = v), h && (h[0] = a), (a = 1)));\n        }\n        if (!a) return 3;\n        g = g[0];\n        t = t[0];\n        if (n && (l[0] != g || m[0] != t)) return 3;\n        null != k &&\n          ((k[0] = q),\n          (k.offset = b - k.w),\n          x(4294967286 > b - k.w),\n          x(k.offset == k.ha - c));\n        break;\n      }\n      return 0 == p || (7 == p && n && null == k)\n        ? (null != f && (f[0] |= null != q.na && 0 < q.na.length),\n          null != d && (d[0] = g),\n          null != e && (e[0] = t),\n          0)\n        : p;\n    }\n    function hc(a, b, c) {\n      var d = b.width,\n        e = b.height,\n        f = 0,\n        g = 0,\n        h = d,\n        k = e;\n      b.Da = null != a && 0 < a.Da;\n      if (\n        b.Da &&\n        ((h = a.cd),\n        (k = a.bd),\n        (f = a.v),\n        (g = a.j),\n        11 > c || ((f &= -2), (g &= -2)),\n        0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)\n      )\n        return 0;\n      b.v = f;\n      b.j = g;\n      b.va = f + h;\n      b.o = g + k;\n      b.U = h;\n      b.T = k;\n      b.da = null != a && 0 < a.da;\n      if (b.da) {\n        c = [a.ib];\n        f = [a.hb];\n        if (!bc(h, k, c, f)) return 0;\n        b.ib = c[0];\n        b.hb = f[0];\n      }\n      b.ob = null != a && a.ob;\n      b.Kb = null == a || !a.Sd;\n      b.da && ((b.ob = b.ib < (3 * d) / 4 && b.hb < (3 * e) / 4), (b.Kb = 0));\n      return 1;\n    }\n    function Bd(a) {\n      if (null == a) return 2;\n      if (11 > a.S) {\n        var b = a.f.RGBA;\n        b.fb += (a.height - 1) * b.A;\n        b.A = -b.A;\n      } else\n        (b = a.f.kb),\n          (a = a.height),\n          (b.O += (a - 1) * b.fa),\n          (b.fa = -b.fa),\n          (b.N += ((a - 1) >> 1) * b.Ab),\n          (b.Ab = -b.Ab),\n          (b.W += ((a - 1) >> 1) * b.Db),\n          (b.Db = -b.Db),\n          null != b.F && ((b.J += (a - 1) * b.lb), (b.lb = -b.lb));\n      return 0;\n    }\n    function Cd(a, b, c, d) {\n      if (null == d || 0 >= a || 0 >= b) return 2;\n      if (null != c) {\n        if (c.Da) {\n          var e = c.cd,\n            f = c.bd,\n            g = c.v & -2,\n            h = c.j & -2;\n          if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b)\n            return 2;\n          a = e;\n          b = f;\n        }\n        if (c.da) {\n          e = [c.ib];\n          f = [c.hb];\n          if (!bc(a, b, e, f)) return 2;\n          a = e[0];\n          b = f[0];\n        }\n      }\n      d.width = a;\n      d.height = b;\n      a: {\n        var k = d.width;\n        var l = d.height;\n        a = d.S;\n        if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;\n        else {\n          if (0 >= d.Rd && null == d.sd) {\n            var g = (f = e = b = 0),\n              h = k * Dd[a],\n              m = h * l;\n            11 > a ||\n              ((b = (k + 1) / 2),\n              (f = ((l + 1) / 2) * b),\n              12 == a && ((e = k), (g = e * l)));\n            l = V(m + 2 * f + g);\n            if (null == l) {\n              a = 1;\n              break a;\n            }\n            d.sd = l;\n            11 > a\n              ? ((k = d.f.RGBA),\n                (k.eb = l),\n                (k.fb = 0),\n                (k.A = h),\n                (k.size = m))\n              : ((k = d.f.kb),\n                (k.y = l),\n                (k.O = 0),\n                (k.fa = h),\n                (k.Fd = m),\n                (k.f = l),\n                (k.N = 0 + m),\n                (k.Ab = b),\n                (k.Cd = f),\n                (k.ea = l),\n                (k.W = 0 + m + f),\n                (k.Db = b),\n                (k.Ed = f),\n                12 == a && ((k.F = l), (k.J = 0 + m + 2 * f)),\n                (k.Tc = g),\n                (k.lb = e));\n          }\n          b = 1;\n          e = d.S;\n          f = d.width;\n          g = d.height;\n          if (e >= Ca && 13 > e)\n            if (11 > e)\n              (a = d.f.RGBA),\n                (h = Math.abs(a.A)),\n                (b &= h * (g - 1) + f <= a.size),\n                (b &= h >= f * Dd[e]),\n                (b &= null != a.eb);\n            else {\n              a = d.f.kb;\n              h = (f + 1) / 2;\n              m = (g + 1) / 2;\n              k = Math.abs(a.fa);\n              var l = Math.abs(a.Ab),\n                n = Math.abs(a.Db),\n                r = Math.abs(a.lb),\n                q = r * (g - 1) + f;\n              b &= k * (g - 1) + f <= a.Fd;\n              b &= l * (m - 1) + h <= a.Cd;\n              b &= n * (m - 1) + h <= a.Ed;\n              b = b & (k >= f) & (l >= h) & (n >= h);\n              b &= null != a.y;\n              b &= null != a.f;\n              b &= null != a.ea;\n              12 == e && ((b &= r >= f), (b &= q <= a.Tc), (b &= null != a.F));\n            }\n          else b = 0;\n          a = b ? 0 : 2;\n        }\n      }\n      if (0 != a) return a;\n      null != c && c.fd && (a = Bd(d));\n      return a;\n    }\n    var xb = 64,\n      Hd = [\n        0,\n        1,\n        3,\n        7,\n        15,\n        31,\n        63,\n        127,\n        255,\n        511,\n        1023,\n        2047,\n        4095,\n        8191,\n        16383,\n        32767,\n        65535,\n        131071,\n        262143,\n        524287,\n        1048575,\n        2097151,\n        4194303,\n        8388607,\n        16777215\n      ],\n      Gd = 24,\n      ob = 32,\n      Xb = 8,\n      Id = [\n        0,\n        0,\n        1,\n        1,\n        2,\n        2,\n        2,\n        2,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7\n      ];\n    X(\"Predictor0\", \"PredictorAdd0\");\n    self.Predictor0 = function() {\n      return 4278190080;\n    };\n    self.Predictor1 = function(a) {\n      return a;\n    };\n    self.Predictor2 = function(a, b, c) {\n      return b[c + 0];\n    };\n    self.Predictor3 = function(a, b, c) {\n      return b[c + 1];\n    };\n    self.Predictor4 = function(a, b, c) {\n      return b[c - 1];\n    };\n    self.Predictor5 = function(a, b, c) {\n      return aa(aa(a, b[c + 1]), b[c + 0]);\n    };\n    self.Predictor6 = function(a, b, c) {\n      return aa(a, b[c - 1]);\n    };\n    self.Predictor7 = function(a, b, c) {\n      return aa(a, b[c + 0]);\n    };\n    self.Predictor8 = function(a, b, c) {\n      return aa(b[c - 1], b[c + 0]);\n    };\n    self.Predictor9 = function(a, b, c) {\n      return aa(b[c + 0], b[c + 1]);\n    };\n    self.Predictor10 = function(a, b, c) {\n      return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));\n    };\n    self.Predictor11 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return 0 >=\n        Ia((d >> 24) & 255, (a >> 24) & 255, (b >> 24) & 255) +\n          Ia((d >> 16) & 255, (a >> 16) & 255, (b >> 16) & 255) +\n          Ia((d >> 8) & 255, (a >> 8) & 255, (b >> 8) & 255) +\n          Ia(d & 255, a & 255, b & 255)\n        ? d\n        : a;\n    };\n    self.Predictor12 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return (\n        ((sa(((a >> 24) & 255) + ((d >> 24) & 255) - ((b >> 24) & 255)) << 24) |\n          (sa(((a >> 16) & 255) + ((d >> 16) & 255) - ((b >> 16) & 255)) <<\n            16) |\n          (sa(((a >> 8) & 255) + ((d >> 8) & 255) - ((b >> 8) & 255)) << 8) |\n          sa((a & 255) + (d & 255) - (b & 255))) >>>\n        0\n      );\n    };\n    self.Predictor13 = function(a, b, c) {\n      var d = b[c - 1];\n      a = aa(a, b[c + 0]);\n      return (\n        ((eb((a >> 24) & 255, (d >> 24) & 255) << 24) |\n          (eb((a >> 16) & 255, (d >> 16) & 255) << 16) |\n          (eb((a >> 8) & 255, (d >> 8) & 255) << 8) |\n          eb((a >> 0) & 255, (d >> 0) & 255)) >>>\n        0\n      );\n    };\n    var ee = self.PredictorAdd0;\n    self.PredictorAdd1 = cc;\n    X(\"Predictor2\", \"PredictorAdd2\");\n    X(\"Predictor3\", \"PredictorAdd3\");\n    X(\"Predictor4\", \"PredictorAdd4\");\n    X(\"Predictor5\", \"PredictorAdd5\");\n    X(\"Predictor6\", \"PredictorAdd6\");\n    X(\"Predictor7\", \"PredictorAdd7\");\n    X(\"Predictor8\", \"PredictorAdd8\");\n    X(\"Predictor9\", \"PredictorAdd9\");\n    X(\"Predictor10\", \"PredictorAdd10\");\n    X(\"Predictor11\", \"PredictorAdd11\");\n    X(\"Predictor12\", \"PredictorAdd12\");\n    X(\"Predictor13\", \"PredictorAdd13\");\n    var fe = self.PredictorAdd2;\n    ec(\n      \"ColorIndexInverseTransform\",\n      \"MapARGB\",\n      \"32b\",\n      function(a) {\n        return (a >> 8) & 255;\n      },\n      function(a) {\n        return a;\n      }\n    );\n    ec(\n      \"VP8LColorIndexInverseTransformAlpha\",\n      \"MapAlpha\",\n      \"8b\",\n      function(a) {\n        return a;\n      },\n      function(a) {\n        return (a >> 8) & 255;\n      }\n    );\n    var rc = self.ColorIndexInverseTransform,\n      ke = self.MapARGB,\n      he = self.VP8LColorIndexInverseTransformAlpha,\n      le = self.MapAlpha,\n      pc,\n      qc = (self.VP8LPredictorsAdd = []);\n    qc.length = 16;\n    (self.VP8LPredictors = []).length = 16;\n    (self.VP8LPredictorsAdd_C = []).length = 16;\n    (self.VP8LPredictors_C = []).length = 16;\n    var Fb,\n      sc,\n      Gb,\n      Hb,\n      xc,\n      uc,\n      bd = V(511),\n      cd = V(2041),\n      dd = V(225),\n      ed = V(767),\n      ad = 0,\n      Qb = cd,\n      mb = dd,\n      R = ed,\n      U = bd,\n      Ca = 0,\n      Ua = 1,\n      tc = 2,\n      Va = 3,\n      ya = 4,\n      Db = 5,\n      wc = 6,\n      zb = 7,\n      Ab = 8,\n      Ja = 9,\n      Bb = 10,\n      pe = [2, 3, 7],\n      oe = [3, 3, 11],\n      Dc = [280, 256, 256, 256, 40],\n      qe = [0, 1, 1, 1, 0],\n      ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n      de = [\n        24,\n        7,\n        23,\n        25,\n        40,\n        6,\n        39,\n        41,\n        22,\n        26,\n        38,\n        42,\n        56,\n        5,\n        55,\n        57,\n        21,\n        27,\n        54,\n        58,\n        37,\n        43,\n        72,\n        4,\n        71,\n        73,\n        20,\n        28,\n        53,\n        59,\n        70,\n        74,\n        36,\n        44,\n        88,\n        69,\n        75,\n        52,\n        60,\n        3,\n        87,\n        89,\n        19,\n        29,\n        86,\n        90,\n        35,\n        45,\n        68,\n        76,\n        85,\n        91,\n        51,\n        61,\n        104,\n        2,\n        103,\n        105,\n        18,\n        30,\n        102,\n        106,\n        34,\n        46,\n        84,\n        92,\n        67,\n        77,\n        101,\n        107,\n        50,\n        62,\n        120,\n        1,\n        119,\n        121,\n        83,\n        93,\n        17,\n        31,\n        100,\n        108,\n        66,\n        78,\n        118,\n        122,\n        33,\n        47,\n        117,\n        123,\n        49,\n        63,\n        99,\n        109,\n        82,\n        94,\n        0,\n        116,\n        124,\n        65,\n        79,\n        16,\n        32,\n        98,\n        110,\n        48,\n        115,\n        125,\n        81,\n        95,\n        64,\n        114,\n        126,\n        97,\n        111,\n        80,\n        113,\n        127,\n        96,\n        112\n      ],\n      me = [\n        2954,\n        2956,\n        2958,\n        2962,\n        2970,\n        2986,\n        3018,\n        3082,\n        3212,\n        3468,\n        3980,\n        5004\n      ],\n      ie = 8,\n      Lb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        17,\n        18,\n        19,\n        20,\n        20,\n        21,\n        21,\n        22,\n        22,\n        23,\n        23,\n        24,\n        25,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        59,\n        60,\n        61,\n        62,\n        63,\n        64,\n        65,\n        66,\n        67,\n        68,\n        69,\n        70,\n        71,\n        72,\n        73,\n        74,\n        75,\n        76,\n        76,\n        77,\n        78,\n        79,\n        80,\n        81,\n        82,\n        83,\n        84,\n        85,\n        86,\n        87,\n        88,\n        89,\n        91,\n        93,\n        95,\n        96,\n        98,\n        100,\n        101,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        118,\n        122,\n        124,\n        126,\n        128,\n        130,\n        132,\n        134,\n        136,\n        138,\n        140,\n        143,\n        145,\n        148,\n        151,\n        154,\n        157\n      ],\n      Mb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        18,\n        19,\n        20,\n        21,\n        22,\n        23,\n        24,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        60,\n        62,\n        64,\n        66,\n        68,\n        70,\n        72,\n        74,\n        76,\n        78,\n        80,\n        82,\n        84,\n        86,\n        88,\n        90,\n        92,\n        94,\n        96,\n        98,\n        100,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        119,\n        122,\n        125,\n        128,\n        131,\n        134,\n        137,\n        140,\n        143,\n        146,\n        149,\n        152,\n        155,\n        158,\n        161,\n        164,\n        167,\n        170,\n        173,\n        177,\n        181,\n        185,\n        189,\n        193,\n        197,\n        201,\n        205,\n        209,\n        213,\n        217,\n        221,\n        225,\n        229,\n        234,\n        239,\n        245,\n        249,\n        254,\n        259,\n        264,\n        269,\n        274,\n        279,\n        284\n      ],\n      oa = null,\n      He = [\n        [173, 148, 140, 0],\n        [176, 155, 140, 135, 0],\n        [180, 157, 141, 134, 130, 0],\n        [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]\n      ],\n      Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],\n      Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],\n      Fe = [\n        [\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],\n            [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128],\n            [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],\n            [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],\n            [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]\n          ],\n          [\n            [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],\n            [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],\n            [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],\n            [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],\n            [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128],\n            [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],\n            [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],\n            [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],\n            [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],\n            [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],\n            [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]\n          ],\n          [\n            [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],\n            [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],\n            [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]\n          ],\n          [\n            [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],\n            [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],\n            [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]\n          ],\n          [\n            [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],\n            [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],\n            [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],\n            [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],\n            [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]\n          ],\n          [\n            [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],\n            [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],\n            [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],\n            [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],\n            [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]\n          ],\n          [\n            [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],\n            [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],\n            [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128],\n            [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]\n          ],\n          [\n            [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],\n            [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],\n            [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],\n            [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],\n            [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]\n          ],\n          [\n            [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],\n            [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],\n            [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],\n            [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],\n            [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],\n            [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],\n            [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],\n            [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]\n          ],\n          [\n            [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],\n            [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],\n            [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]\n          ],\n          [\n            [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],\n            [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],\n            [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]\n          ],\n          [\n            [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],\n            [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128],\n            [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]\n          ],\n          [\n            [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],\n            [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],\n            [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]\n          ],\n          [\n            [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],\n            [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],\n            [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],\n            [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],\n            [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ]\n      ],\n      Ke = [\n        [\n          [231, 120, 48, 89, 115, 113, 120, 152, 112],\n          [152, 179, 64, 126, 170, 118, 46, 70, 95],\n          [175, 69, 143, 80, 85, 82, 72, 155, 103],\n          [56, 58, 10, 171, 218, 189, 17, 13, 152],\n          [114, 26, 17, 163, 44, 195, 21, 10, 173],\n          [121, 24, 80, 195, 26, 62, 44, 64, 85],\n          [144, 71, 10, 38, 171, 213, 144, 34, 26],\n          [170, 46, 55, 19, 136, 160, 33, 206, 71],\n          [63, 20, 8, 114, 114, 208, 12, 9, 226],\n          [81, 40, 11, 96, 182, 84, 29, 16, 36]\n        ],\n        [\n          [134, 183, 89, 137, 98, 101, 106, 165, 148],\n          [72, 187, 100, 130, 157, 111, 32, 75, 80],\n          [66, 102, 167, 99, 74, 62, 40, 234, 128],\n          [41, 53, 9, 178, 241, 141, 26, 8, 107],\n          [74, 43, 26, 146, 73, 166, 49, 23, 157],\n          [65, 38, 105, 160, 51, 52, 31, 115, 128],\n          [104, 79, 12, 27, 217, 255, 87, 17, 7],\n          [87, 68, 71, 44, 114, 51, 15, 186, 23],\n          [47, 41, 14, 110, 182, 183, 21, 17, 194],\n          [66, 45, 25, 102, 197, 189, 23, 18, 22]\n        ],\n        [\n          [88, 88, 147, 150, 42, 46, 45, 196, 205],\n          [43, 97, 183, 117, 85, 38, 35, 179, 61],\n          [39, 53, 200, 87, 26, 21, 43, 232, 171],\n          [56, 34, 51, 104, 114, 102, 29, 93, 77],\n          [39, 28, 85, 171, 58, 165, 90, 98, 64],\n          [34, 22, 116, 206, 23, 34, 43, 166, 73],\n          [107, 54, 32, 26, 51, 1, 81, 43, 31],\n          [68, 25, 106, 22, 64, 171, 36, 225, 114],\n          [34, 19, 21, 102, 132, 188, 16, 76, 124],\n          [62, 18, 78, 95, 85, 57, 50, 48, 51]\n        ],\n        [\n          [193, 101, 35, 159, 215, 111, 89, 46, 111],\n          [60, 148, 31, 172, 219, 228, 21, 18, 111],\n          [112, 113, 77, 85, 179, 255, 38, 120, 114],\n          [40, 42, 1, 196, 245, 209, 10, 25, 109],\n          [88, 43, 29, 140, 166, 213, 37, 43, 154],\n          [61, 63, 30, 155, 67, 45, 68, 1, 209],\n          [100, 80, 8, 43, 154, 1, 51, 26, 71],\n          [142, 78, 78, 16, 255, 128, 34, 197, 171],\n          [41, 40, 5, 102, 211, 183, 4, 1, 221],\n          [51, 50, 17, 168, 209, 192, 23, 25, 82]\n        ],\n        [\n          [138, 31, 36, 171, 27, 166, 38, 44, 229],\n          [67, 87, 58, 169, 82, 115, 26, 59, 179],\n          [63, 59, 90, 180, 59, 166, 93, 73, 154],\n          [40, 40, 21, 116, 143, 209, 34, 39, 175],\n          [47, 15, 16, 183, 34, 223, 49, 45, 183],\n          [46, 17, 33, 183, 6, 98, 15, 32, 183],\n          [57, 46, 22, 24, 128, 1, 54, 17, 37],\n          [65, 32, 73, 115, 28, 128, 23, 128, 205],\n          [40, 3, 9, 115, 51, 192, 18, 6, 223],\n          [87, 37, 9, 115, 59, 77, 64, 21, 47]\n        ],\n        [\n          [104, 55, 44, 218, 9, 54, 53, 130, 226],\n          [64, 90, 70, 205, 40, 41, 23, 26, 57],\n          [54, 57, 112, 184, 5, 41, 38, 166, 213],\n          [30, 34, 26, 133, 152, 116, 10, 32, 134],\n          [39, 19, 53, 221, 26, 114, 32, 73, 255],\n          [31, 9, 65, 234, 2, 15, 1, 118, 73],\n          [75, 32, 12, 51, 192, 255, 160, 43, 51],\n          [88, 31, 35, 67, 102, 85, 55, 186, 85],\n          [56, 21, 23, 111, 59, 205, 45, 37, 192],\n          [55, 38, 70, 124, 73, 102, 1, 34, 98]\n        ],\n        [\n          [125, 98, 42, 88, 104, 85, 117, 175, 82],\n          [95, 84, 53, 89, 128, 100, 113, 101, 45],\n          [75, 79, 123, 47, 51, 128, 81, 171, 1],\n          [57, 17, 5, 71, 102, 57, 53, 41, 49],\n          [38, 33, 13, 121, 57, 73, 26, 1, 85],\n          [41, 10, 67, 138, 77, 110, 90, 47, 114],\n          [115, 21, 2, 10, 102, 255, 166, 23, 6],\n          [101, 29, 16, 10, 85, 128, 101, 196, 26],\n          [57, 18, 10, 102, 102, 213, 34, 20, 43],\n          [117, 20, 15, 36, 163, 128, 68, 1, 26]\n        ],\n        [\n          [102, 61, 71, 37, 34, 53, 31, 243, 192],\n          [69, 60, 71, 38, 73, 119, 28, 222, 37],\n          [68, 45, 128, 34, 1, 47, 11, 245, 171],\n          [62, 17, 19, 70, 146, 85, 55, 62, 70],\n          [37, 43, 37, 154, 100, 163, 85, 160, 1],\n          [63, 9, 92, 136, 28, 64, 32, 201, 85],\n          [75, 15, 9, 9, 64, 255, 184, 119, 16],\n          [86, 6, 28, 5, 64, 255, 25, 248, 1],\n          [56, 8, 17, 132, 137, 255, 55, 116, 128],\n          [58, 15, 20, 82, 135, 57, 26, 121, 40]\n        ],\n        [\n          [164, 50, 31, 137, 154, 133, 25, 35, 218],\n          [51, 103, 44, 131, 131, 123, 31, 6, 158],\n          [86, 40, 64, 135, 148, 224, 45, 183, 128],\n          [22, 26, 17, 131, 240, 154, 14, 1, 209],\n          [45, 16, 21, 91, 64, 222, 7, 1, 197],\n          [56, 21, 39, 155, 60, 138, 23, 102, 213],\n          [83, 12, 13, 54, 192, 255, 68, 47, 28],\n          [85, 26, 85, 85, 128, 128, 32, 146, 171],\n          [18, 11, 7, 63, 144, 171, 4, 4, 246],\n          [35, 27, 10, 146, 174, 171, 12, 26, 128]\n        ],\n        [\n          [190, 80, 35, 99, 180, 80, 126, 54, 45],\n          [85, 126, 47, 87, 176, 51, 41, 20, 32],\n          [101, 75, 128, 139, 118, 146, 116, 128, 85],\n          [56, 41, 15, 176, 236, 85, 37, 9, 62],\n          [71, 30, 17, 119, 118, 255, 17, 18, 138],\n          [101, 38, 60, 138, 55, 70, 43, 26, 142],\n          [146, 36, 19, 30, 171, 255, 97, 27, 20],\n          [138, 45, 61, 62, 219, 1, 81, 188, 64],\n          [32, 41, 20, 117, 151, 142, 20, 21, 163],\n          [112, 19, 12, 61, 195, 128, 48, 4, 24]\n        ]\n      ],\n      Ee = [\n        [\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],\n            [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255],\n            [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],\n            [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ]\n      ],\n      Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],\n      Nc,\n      Y = [],\n      W = [],\n      ka = [],\n      Za,\n      fd,\n      Nb,\n      pa,\n      Ob,\n      Xc,\n      Tc,\n      Yc,\n      Uc,\n      Zc,\n      Vc,\n      $c,\n      Wc,\n      Rc,\n      Pc,\n      Sc,\n      Qc,\n      re = 1,\n      Cc = 2,\n      ia = [],\n      za,\n      vc,\n      fc,\n      Fc,\n      P = [];\n    va(\"UpsampleRgbLinePair\", Ga, 3);\n    va(\"UpsampleBgrLinePair\", Tb, 3);\n    va(\"UpsampleRgbaLinePair\", wd, 4);\n    va(\"UpsampleBgraLinePair\", vd, 4);\n    va(\"UpsampleArgbLinePair\", ud, 4);\n    va(\"UpsampleRgba4444LinePair\", td, 2);\n    va(\"UpsampleRgb565LinePair\", sd, 2);\n    var Mf = self.UpsampleRgbLinePair,\n      Nf = self.UpsampleBgrLinePair,\n      nd = self.UpsampleRgbaLinePair,\n      od = self.UpsampleBgraLinePair,\n      pd = self.UpsampleArgbLinePair,\n      qd = self.UpsampleRgba4444LinePair,\n      Of = self.UpsampleRgb565LinePair,\n      Wa = 16,\n      Ba = 1 << (Wa - 1),\n      ta = -227,\n      Eb = 482,\n      rd = 6,\n      Pf = (256 << rd) - 1,\n      jc = 0,\n      Yd = V(256),\n      ae = V(256),\n      $d = V(256),\n      Zd = V(256),\n      be = V(Eb - ta),\n      ce = V(Eb - ta);\n    la(\"YuvToRgbRow\", Ga, 3);\n    la(\"YuvToBgrRow\", Tb, 3);\n    la(\"YuvToRgbaRow\", wd, 4);\n    la(\"YuvToBgraRow\", vd, 4);\n    la(\"YuvToArgbRow\", ud, 4);\n    la(\"YuvToRgba4444Row\", td, 2);\n    la(\"YuvToRgb565Row\", sd, 2);\n    var zd = [\n        0,\n        4,\n        8,\n        12,\n        128,\n        132,\n        136,\n        140,\n        256,\n        260,\n        264,\n        268,\n        384,\n        388,\n        392,\n        396\n      ],\n      Ya = [0, 2, 8],\n      Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],\n      Ne = 1;\n    this.WebPDecodeRGBA = function(a, b, c, d, e) {\n      var f = Ua;\n      var g = new Cf(),\n        h = new Cb();\n      g.ba = h;\n      h.S = f;\n      h.width = [h.width];\n      h.height = [h.height];\n      var k = h.width;\n      var l = h.height,\n        m = new Td();\n      if (null == m || null == a) var n = 2;\n      else\n        x(null != m),\n          (n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null));\n      0 != n\n        ? (k = 0)\n        : (null != k && (k[0] = m.width[0]),\n          null != l && (l[0] = m.height[0]),\n          (k = 1));\n      if (k) {\n        h.width = h.width[0];\n        h.height = h.height[0];\n        null != d && (d[0] = h.width);\n        null != e && (e[0] = h.height);\n        b: {\n          d = new Oa();\n          e = new md();\n          e.data = a;\n          e.w = b;\n          e.ha = c;\n          e.kd = 1;\n          b = [0];\n          x(null != e);\n          a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);\n          (0 == a || 7 == a) && b[0] && (a = 4);\n          b = a;\n          if (0 == b) {\n            x(null != g);\n            d.data = e.data;\n            d.w = e.w + e.offset;\n            d.ha = e.ha - e.offset;\n            d.put = kc;\n            d.ac = gc;\n            d.bc = lc;\n            d.ma = g;\n            if (e.xa) {\n              a = Bc();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              if (te(a, d)) {\n                b = Cd(d.width, d.height, g.Oa, g.ba);\n                if ((d = 0 == b)) {\n                  c: {\n                    d = a;\n                    d: for (;;) {\n                      if (null == d) {\n                        d = 0;\n                        break c;\n                      }\n                      x(null != d.s.yc);\n                      x(null != d.s.Ya);\n                      x(0 < d.s.Wb);\n                      c = d.l;\n                      x(null != c);\n                      e = c.ma;\n                      x(null != e);\n                      if (0 != d.xb) {\n                        d.ca = e.ba;\n                        d.tb = e.tb;\n                        x(null != d.ca);\n                        if (!hc(e.Oa, c, Va)) {\n                          d.a = 2;\n                          break d;\n                        }\n                        if (!Ec(d, c.width)) break d;\n                        if (c.da) break d;\n                        (c.da || hb(d.ca.S)) && Aa();\n                        11 > d.ca.S ||\n                          (alert(\"todo:WebPInitConvertARGBToYUV\"),\n                          null != d.ca.f.kb.F && Aa());\n                        if (\n                          d.Pb &&\n                          0 < d.s.ua &&\n                          null == d.s.vb.X &&\n                          !Zb(d.s.vb, d.s.Wa.Xa)\n                        ) {\n                          d.a = 1;\n                          break d;\n                        }\n                        d.xb = 0;\n                      }\n                      if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;\n                      e.Dc = d.Ma;\n                      d = 1;\n                      break c;\n                    }\n                    x(0 != d.a);\n                    d = 0;\n                  }\n                  d = !d;\n                }\n                d && (b = a.a);\n              } else b = a.a;\n            } else {\n              a = new Ce();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              a.Fa = e.na;\n              a.P = e.P;\n              a.qc = e.Sa;\n              if (Kc(a, d)) {\n                if (((b = Cd(d.width, d.height, g.Oa, g.ba)), 0 == b)) {\n                  a.Aa = 0;\n                  c = g.Oa;\n                  e = a;\n                  x(null != e);\n                  if (null != c) {\n                    k = c.Md;\n                    k = 0 > k ? 0 : 100 < k ? 255 : (255 * k) / 100;\n                    if (0 < k) {\n                      for (l = m = 0; 4 > l; ++l)\n                        (n = e.pb[l]),\n                          12 > n.lc &&\n                            (n.ia = (k * Qf[0 > n.lc ? 0 : n.lc]) >> 3),\n                          (m |= n.ia);\n                      m && (alert(\"todo:VP8InitRandom\"), (e.ia = 1));\n                    }\n                    e.Ga = c.Id;\n                    100 < e.Ga ? (e.Ga = 100) : 0 > e.Ga && (e.Ga = 0);\n                  }\n                  Me(a, d) || (b = a.a);\n                }\n              } else b = a.a;\n            }\n            0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));\n          }\n          g = b;\n        }\n        f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;\n      } else f = null;\n      return f;\n    };\n    var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];\n  };\n  new _WebPDecoder();\n\n  /** @license\n   * Copyright (c) 2017 Dominik Homberger\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nhttps://webpjs.appspot.com\nWebPRiffParser dominikhlbg@gmail.com\n*/\n\n  function memcmp(data, data_off, str, size) {\n    for (var i = 0; i < size; i++)\n      if (data[data_off + i] != str.charCodeAt(i)) return true;\n    return false;\n  }\n\n  function GetTag(data, data_off) {\n    var str = \"\";\n    for (var i = 0; i < 4; i++) str += String.fromCharCode(data[data_off++]);\n    return str;\n  }\n\n  function GetLE16(data, data_off) {\n    return (data[data_off + 0] << 0) | (data[data_off + 1] << 8);\n  }\n\n  function GetLE24(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16)) >>>\n      0\n    );\n  }\n\n  function GetLE32(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16) |\n        (data[data_off + 3] << 24)) >>>\n      0\n    );\n  }\n\n  function WebPRiffParser(src, src_off) {\n    var imagearray = {};\n    var i = 0;\n    var alpha_chunk = false;\n    var alpha_size = 0;\n    var alpha_offset = 0;\n    imagearray[\"frames\"] = [];\n    if (memcmp(src, src_off, \"RIFF\", 4)) return;\n    src_off += 4;\n    var riff_size = GetLE32(src, src_off) + 8;\n    src_off += 8;\n\n    while (src_off < src.length) {\n      var fourcc = GetTag(src, src_off);\n      src_off += 4;\n\n      var payload_size = GetLE32(src, src_off);\n      src_off += 4;\n      var payload_size_padded = payload_size + (payload_size & 1);\n\n      switch (fourcc) {\n        case \"VP8 \":\n        case \"VP8L\":\n          if (typeof imagearray[\"frames\"][i] === \"undefined\")\n            imagearray[\"frames\"][i] = {};\n          var obj = imagearray[\"frames\"][i];\n          var height = [0];\n          var width = [0];\n          obj[\"src_off\"] = alpha_chunk ? alpha_offset : src_off - 8;\n          obj[\"src_size\"] = alpha_size + payload_size + 8;\n          //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);\n          //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};\n          i++;\n          if (alpha_chunk) {\n            alpha_chunk = false;\n            alpha_size = 0;\n            alpha_offset = 0;\n          }\n          break;\n        case \"VP8X\":\n          var obj = (imagearray[\"header\"] = {});\n          var feature_flags = (obj[\"feature_flags\"] = src[src_off]);\n          var src_off_ = src_off + 4;\n          var canvas_width = (obj[\"canvas_width\"] = 1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          var canvas_height = (obj[\"canvas_height\"] =\n            1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          break;\n        case \"ALPH\":\n          alpha_chunk = true;\n          alpha_size = payload_size_padded + 8;\n          alpha_offset = src_off - 8;\n          break;\n\n        case \"ANIM\":\n          var obj = imagearray[\"header\"];\n          var bgcolor = (obj[\"bgcolor\"] = GetLE32(src, src_off));\n          src_off_ = src_off + 4;\n\n          var loop_count = (obj[\"loop_count\"] = GetLE16(src, src_off_));\n          src_off_ += 2;\n          break;\n        case \"ANMF\":\n          var offset_x = 0,\n            offset_y = 0,\n            width = 0,\n            height = 0,\n            duration = 0,\n            blend = 0,\n            dispose = 0,\n            temp = 0;\n          var obj = (imagearray[\"frames\"][i] = {});\n          obj[\"offset_x\"] = offset_x = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"offset_y\"] = offset_y = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"width\"] = width = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"height\"] = height = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"duration\"] = duration = GetLE24(src, src_off);\n          src_off += 3;\n          temp = src[src_off++];\n          obj[\"dispose\"] = dispose = temp & 1;\n          obj[\"blend\"] = blend = (temp >> 1) & 1;\n          break;\n        default:\n      }\n      if (fourcc != \"ANMF\") src_off += payload_size_padded;\n    }\n    return imagearray;\n  }\n\n  var height = [0];\n  var width = [0];\n  var pixels = [];\n  var webpdecoder = new _WebPDecoder();\n\n  var response = imageData;\n  var imagearray = WebPRiffParser(response, 0);\n  imagearray[\"response\"] = response;\n  imagearray[\"rgbaoutput\"] = true;\n  imagearray[\"dataurl\"] = false;\n\n  var header = imagearray[\"header\"] ? imagearray[\"header\"] : null;\n  var frames = imagearray[\"frames\"] ? imagearray[\"frames\"] : null;\n\n  if (header) {\n    header[\"loop_counter\"] = header[\"loop_count\"];\n    height = [header[\"canvas_height\"]];\n    width = [header[\"canvas_width\"]];\n\n    var blend = false;\n    for (var f = 0; f < frames.length; f++)\n      if (frames[f][\"blend\"] == 0) {\n        blend = true;\n        break;\n      }\n  }\n\n  var frame = frames[0];\n  var rgba = webpdecoder.WebPDecodeRGBA(\n    response,\n    frame[\"src_off\"],\n    frame[\"src_size\"],\n    width,\n    height\n  );\n  frame[\"rgba\"] = rgba;\n  frame[\"imgwidth\"] = width[0];\n  frame[\"imgheight\"] = height[0];\n\n  for (var i = 0; i < width[0] * height[0] * 4; i++) {\n    pixels[i] = rgba[i];\n  }\n\n  this.width = width;\n  this.height = height;\n  this.data = pixels;\n  return this;\n}\n\nWebPDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { WebPDecoder };\n","/**\n * @license\n * Copyright (c) 2019 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { WebPDecoder } from \"../libs/WebPDecoder.js\";\n\n/**\n * jsPDF webp Support PlugIn\n *\n * @name webp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processWEBP = function(imageData, index, alias, compression) {\n    var reader = new WebPDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","/**\n * @license\n *\n * Copyright (c) 2021 Antti Palola, https://github.com/Pantura\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF RGBA array PlugIn\n * @name rgba_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name processRGBA\n   * @function\n   *\n   * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].\n   * RGBA array data can be obtained from DOM canvas getImageData.\n   * @ignore\n   */\n  jsPDFAPI.processRGBA = function(imageData, index, alias) {\n    \"use strict\";\n\n    var imagePixels = imageData.data;\n    var length = imagePixels.length;\n    // jsPDF takes alpha data separately so extract that.\n    var rgbOut = new Uint8Array((length / 4) * 3);\n    var alphaOut = new Uint8Array(length / 4);\n    var outIndex = 0;\n    var alphaIndex = 0;\n\n    for (var i = 0; i < length; i += 4) {\n      var r = imagePixels[i];\n      var g = imagePixels[i + 1];\n      var b = imagePixels[i + 2];\n      var alpha = imagePixels[i + 3];\n      rgbOut[outIndex++] = r;\n      rgbOut[outIndex++] = g;\n      rgbOut[outIndex++] = b;\n      alphaOut[alphaIndex++] = alpha;\n    }\n\n    var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);\n    var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);\n\n    return {\n      alpha: alphaData,\n      data: rgbData,\n      index: index,\n      alias: alias,\n      colorSpace: \"DeviceRGB\",\n      bitsPerComponent: 8,\n      width: imageData.width,\n      height: imageData.height\n    };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF setLanguage Plugin\n *\n * @name setLanguage\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Add Language Tag to the generated PDF\n   *\n   * @name setLanguage\n   * @function\n   * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF()\n   * doc.text(10, 10, 'This is a test')\n   * doc.setLanguage(\"en-US\")\n   * doc.save('english.pdf')\n   */\n  jsPDFAPI.setLanguage = function(langCode) {\n    \"use strict\";\n\n    var langCodes = {\n      af: \"Afrikaans\",\n      sq: \"Albanian\",\n      ar: \"Arabic (Standard)\",\n      \"ar-DZ\": \"Arabic (Algeria)\",\n      \"ar-BH\": \"Arabic (Bahrain)\",\n      \"ar-EG\": \"Arabic (Egypt)\",\n      \"ar-IQ\": \"Arabic (Iraq)\",\n      \"ar-JO\": \"Arabic (Jordan)\",\n      \"ar-KW\": \"Arabic (Kuwait)\",\n      \"ar-LB\": \"Arabic (Lebanon)\",\n      \"ar-LY\": \"Arabic (Libya)\",\n      \"ar-MA\": \"Arabic (Morocco)\",\n      \"ar-OM\": \"Arabic (Oman)\",\n      \"ar-QA\": \"Arabic (Qatar)\",\n      \"ar-SA\": \"Arabic (Saudi Arabia)\",\n      \"ar-SY\": \"Arabic (Syria)\",\n      \"ar-TN\": \"Arabic (Tunisia)\",\n      \"ar-AE\": \"Arabic (U.A.E.)\",\n      \"ar-YE\": \"Arabic (Yemen)\",\n      an: \"Aragonese\",\n      hy: \"Armenian\",\n      as: \"Assamese\",\n      ast: \"Asturian\",\n      az: \"Azerbaijani\",\n      eu: \"Basque\",\n      be: \"Belarusian\",\n      bn: \"Bengali\",\n      bs: \"Bosnian\",\n      br: \"Breton\",\n      bg: \"Bulgarian\",\n      my: \"Burmese\",\n      ca: \"Catalan\",\n      ch: \"Chamorro\",\n      ce: \"Chechen\",\n      zh: \"Chinese\",\n      \"zh-HK\": \"Chinese (Hong Kong)\",\n      \"zh-CN\": \"Chinese (PRC)\",\n      \"zh-SG\": \"Chinese (Singapore)\",\n      \"zh-TW\": \"Chinese (Taiwan)\",\n      cv: \"Chuvash\",\n      co: \"Corsican\",\n      cr: \"Cree\",\n      hr: \"Croatian\",\n      cs: \"Czech\",\n      da: \"Danish\",\n      nl: \"Dutch (Standard)\",\n      \"nl-BE\": \"Dutch (Belgian)\",\n      en: \"English\",\n      \"en-AU\": \"English (Australia)\",\n      \"en-BZ\": \"English (Belize)\",\n      \"en-CA\": \"English (Canada)\",\n      \"en-IE\": \"English (Ireland)\",\n      \"en-JM\": \"English (Jamaica)\",\n      \"en-NZ\": \"English (New Zealand)\",\n      \"en-PH\": \"English (Philippines)\",\n      \"en-ZA\": \"English (South Africa)\",\n      \"en-TT\": \"English (Trinidad & Tobago)\",\n      \"en-GB\": \"English (United Kingdom)\",\n      \"en-US\": \"English (United States)\",\n      \"en-ZW\": \"English (Zimbabwe)\",\n      eo: \"Esperanto\",\n      et: \"Estonian\",\n      fo: \"Faeroese\",\n      fj: \"Fijian\",\n      fi: \"Finnish\",\n      fr: \"French (Standard)\",\n      \"fr-BE\": \"French (Belgium)\",\n      \"fr-CA\": \"French (Canada)\",\n      \"fr-FR\": \"French (France)\",\n      \"fr-LU\": \"French (Luxembourg)\",\n      \"fr-MC\": \"French (Monaco)\",\n      \"fr-CH\": \"French (Switzerland)\",\n      fy: \"Frisian\",\n      fur: \"Friulian\",\n      gd: \"Gaelic (Scots)\",\n      \"gd-IE\": \"Gaelic (Irish)\",\n      gl: \"Galacian\",\n      ka: \"Georgian\",\n      de: \"German (Standard)\",\n      \"de-AT\": \"German (Austria)\",\n      \"de-DE\": \"German (Germany)\",\n      \"de-LI\": \"German (Liechtenstein)\",\n      \"de-LU\": \"German (Luxembourg)\",\n      \"de-CH\": \"German (Switzerland)\",\n      el: \"Greek\",\n      gu: \"Gujurati\",\n      ht: \"Haitian\",\n      he: \"Hebrew\",\n      hi: \"Hindi\",\n      hu: \"Hungarian\",\n      is: \"Icelandic\",\n      id: \"Indonesian\",\n      iu: \"Inuktitut\",\n      ga: \"Irish\",\n      it: \"Italian (Standard)\",\n      \"it-CH\": \"Italian (Switzerland)\",\n      ja: \"Japanese\",\n      kn: \"Kannada\",\n      ks: \"Kashmiri\",\n      kk: \"Kazakh\",\n      km: \"Khmer\",\n      ky: \"Kirghiz\",\n      tlh: \"Klingon\",\n      ko: \"Korean\",\n      \"ko-KP\": \"Korean (North Korea)\",\n      \"ko-KR\": \"Korean (South Korea)\",\n      la: \"Latin\",\n      lv: \"Latvian\",\n      lt: \"Lithuanian\",\n      lb: \"Luxembourgish\",\n      mk: \"North Macedonia\",\n      ms: \"Malay\",\n      ml: \"Malayalam\",\n      mt: \"Maltese\",\n      mi: \"Maori\",\n      mr: \"Marathi\",\n      mo: \"Moldavian\",\n      nv: \"Navajo\",\n      ng: \"Ndonga\",\n      ne: \"Nepali\",\n      no: \"Norwegian\",\n      nb: \"Norwegian (Bokmal)\",\n      nn: \"Norwegian (Nynorsk)\",\n      oc: \"Occitan\",\n      or: \"Oriya\",\n      om: \"Oromo\",\n      fa: \"Persian\",\n      \"fa-IR\": \"Persian/Iran\",\n      pl: \"Polish\",\n      pt: \"Portuguese\",\n      \"pt-BR\": \"Portuguese (Brazil)\",\n      pa: \"Punjabi\",\n      \"pa-IN\": \"Punjabi (India)\",\n      \"pa-PK\": \"Punjabi (Pakistan)\",\n      qu: \"Quechua\",\n      rm: \"Rhaeto-Romanic\",\n      ro: \"Romanian\",\n      \"ro-MO\": \"Romanian (Moldavia)\",\n      ru: \"Russian\",\n      \"ru-MO\": \"Russian (Moldavia)\",\n      sz: \"Sami (Lappish)\",\n      sg: \"Sango\",\n      sa: \"Sanskrit\",\n      sc: \"Sardinian\",\n      sd: \"Sindhi\",\n      si: \"Singhalese\",\n      sr: \"Serbian\",\n      sk: \"Slovak\",\n      sl: \"Slovenian\",\n      so: \"Somani\",\n      sb: \"Sorbian\",\n      es: \"Spanish\",\n      \"es-AR\": \"Spanish (Argentina)\",\n      \"es-BO\": \"Spanish (Bolivia)\",\n      \"es-CL\": \"Spanish (Chile)\",\n      \"es-CO\": \"Spanish (Colombia)\",\n      \"es-CR\": \"Spanish (Costa Rica)\",\n      \"es-DO\": \"Spanish (Dominican Republic)\",\n      \"es-EC\": \"Spanish (Ecuador)\",\n      \"es-SV\": \"Spanish (El Salvador)\",\n      \"es-GT\": \"Spanish (Guatemala)\",\n      \"es-HN\": \"Spanish (Honduras)\",\n      \"es-MX\": \"Spanish (Mexico)\",\n      \"es-NI\": \"Spanish (Nicaragua)\",\n      \"es-PA\": \"Spanish (Panama)\",\n      \"es-PY\": \"Spanish (Paraguay)\",\n      \"es-PE\": \"Spanish (Peru)\",\n      \"es-PR\": \"Spanish (Puerto Rico)\",\n      \"es-ES\": \"Spanish (Spain)\",\n      \"es-UY\": \"Spanish (Uruguay)\",\n      \"es-VE\": \"Spanish (Venezuela)\",\n      sx: \"Sutu\",\n      sw: \"Swahili\",\n      sv: \"Swedish\",\n      \"sv-FI\": \"Swedish (Finland)\",\n      \"sv-SV\": \"Swedish (Sweden)\",\n      ta: \"Tamil\",\n      tt: \"Tatar\",\n      te: \"Teluga\",\n      th: \"Thai\",\n      tig: \"Tigre\",\n      ts: \"Tsonga\",\n      tn: \"Tswana\",\n      tr: \"Turkish\",\n      tk: \"Turkmen\",\n      uk: \"Ukrainian\",\n      hsb: \"Upper Sorbian\",\n      ur: \"Urdu\",\n      ve: \"Venda\",\n      vi: \"Vietnamese\",\n      vo: \"Volapuk\",\n      wa: \"Walloon\",\n      cy: \"Welsh\",\n      xh: \"Xhosa\",\n      ji: \"Yiddish\",\n      zu: \"Zulu\"\n    };\n\n    if (this.internal.languageSettings === undefined) {\n      this.internal.languageSettings = {};\n      this.internal.languageSettings.isSubscribed = false;\n    }\n\n    if (langCodes[langCode] !== undefined) {\n      this.internal.languageSettings.languageCode = langCode;\n      if (this.internal.languageSettings.isSubscribed === false) {\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.write(\n            \"/Lang (\" + this.internal.languageSettings.languageCode + \")\"\n          );\n        });\n        this.internal.languageSettings.isSubscribed = true;\n      }\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/** @license\n * MIT license.\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF split_text_to_size plugin\n *\n * @name split_text_to_size\n * @module\n */\n(function(API) {\n  \"use strict\";\n  /**\n   * Returns an array of length matching length of the 'word' string, with each\n   * cell occupied by the width of the char in that position.\n   *\n   * @name getCharWidthsArray\n   * @function\n   * @param {string} text\n   * @param {Object} options\n   * @returns {Array}\n   */\n  var getCharWidthsArray = (API.getCharWidthsArray = function(text, options) {\n    options = options || {};\n\n    var activeFont = options.font || this.internal.getFont();\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n\n    var widths = options.widths\n      ? options.widths\n      : activeFont.metadata.Unicode.widths;\n    var widthsFractionOf = widths.fof ? widths.fof : 1;\n    var kerning = options.kerning\n      ? options.kerning\n      : activeFont.metadata.Unicode.kerning;\n    var kerningFractionOf = kerning.fof ? kerning.fof : 1;\n    var doKerning = options.doKerning === false ? false : true;\n    var kerningValue = 0;\n\n    var i;\n    var length = text.length;\n    var char_code;\n    var prior_char_code = 0; //for kerning\n    var default_char_width = widths[0] || widthsFractionOf;\n    var output = [];\n\n    for (i = 0; i < length; i++) {\n      char_code = text.charCodeAt(i);\n\n      if (typeof activeFont.metadata.widthOfString === \"function\") {\n        output.push(\n          (activeFont.metadata.widthOfGlyph(\n            activeFont.metadata.characterToGlyph(char_code)\n          ) +\n            charSpace * (1000 / fontSize) || 0) / 1000\n        );\n      } else {\n        if (\n          doKerning &&\n          typeof kerning[char_code] === \"object\" &&\n          !isNaN(parseInt(kerning[char_code][prior_char_code], 10))\n        ) {\n          kerningValue =\n            kerning[char_code][prior_char_code] / kerningFractionOf;\n        } else {\n          kerningValue = 0;\n        }\n        output.push(\n          (widths[char_code] || default_char_width) / widthsFractionOf +\n            kerningValue\n        );\n      }\n      prior_char_code = char_code;\n    }\n\n    return output;\n  });\n\n  /**\n   * Returns a widths of string in a given font, if the font size is set as 1 point.\n   *\n   * In other words, this is \"proportional\" value. For 1 unit of font size, the length\n   * of the string will be that much.\n   *\n   * Multiply by font size to get actual width in *points*\n   * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.\n   *\n   * @name getStringUnitWidth\n   * @public\n   * @function\n   * @param {string} text\n   * @param {string} options\n   * @returns {number} result\n   */\n  var getStringUnitWidth = (API.getStringUnitWidth = function(text, options) {\n    options = options || {};\n\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var font = options.font || this.internal.getFont();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n    var result = 0;\n\n    if (API.processArabic) {\n      text = API.processArabic(text);\n    }\n\n    if (typeof font.metadata.widthOfString === \"function\") {\n      result =\n        font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;\n    } else {\n      result = getCharWidthsArray\n        .apply(this, arguments)\n        .reduce(function(pv, cv) {\n          return pv + cv;\n        }, 0);\n    }\n    return result;\n  });\n\n  /**\n  returns array of lines\n  */\n  var splitLongWord = function(word, widths_array, firstLineMaxLen, maxLen) {\n    var answer = [];\n\n    // 1st, chop off the piece that can fit on the hanging line.\n    var i = 0,\n      l = word.length,\n      workingLen = 0;\n    while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {\n      workingLen += widths_array[i];\n      i++;\n    }\n    // this is first line.\n    answer.push(word.slice(0, i));\n\n    // 2nd. Split the rest into maxLen pieces.\n    var startOfLine = i;\n    workingLen = 0;\n    while (i !== l) {\n      if (workingLen + widths_array[i] > maxLen) {\n        answer.push(word.slice(startOfLine, i));\n        workingLen = 0;\n        startOfLine = i;\n      }\n      workingLen += widths_array[i];\n      i++;\n    }\n    if (startOfLine !== i) {\n      answer.push(word.slice(startOfLine, i));\n    }\n\n    return answer;\n  };\n\n  // Note, all sizing inputs for this function must be in \"font measurement units\"\n  // By default, for PDF, it's \"point\".\n  var splitParagraphIntoLines = function(text, maxlen, options) {\n    // at this time works only on Western scripts, ones with space char\n    // separating the words. Feel free to expand.\n\n    if (!options) {\n      options = {};\n    }\n\n    var line = [],\n      lines = [line],\n      line_length = options.textIndent || 0,\n      separator_length = 0,\n      current_word_length = 0,\n      word,\n      widths_array,\n      words = text.split(\" \"),\n      spaceCharWidth = getCharWidthsArray.apply(this, [\" \", options])[0],\n      i,\n      l,\n      tmp,\n      lineIndent;\n\n    if (options.lineIndent === -1) {\n      lineIndent = words[0].length + 2;\n    } else {\n      lineIndent = options.lineIndent || 0;\n    }\n    if (lineIndent) {\n      var pad = Array(lineIndent).join(\" \"),\n        wrds = [];\n      words.map(function(wrd) {\n        wrd = wrd.split(/\\s*\\n/);\n        if (wrd.length > 1) {\n          wrds = wrds.concat(\n            wrd.map(function(wrd, idx) {\n              return (idx && wrd.length ? \"\\n\" : \"\") + wrd;\n            })\n          );\n        } else {\n          wrds.push(wrd[0]);\n        }\n      });\n      words = wrds;\n      lineIndent = getStringUnitWidth.apply(this, [pad, options]);\n    }\n\n    for (i = 0, l = words.length; i < l; i++) {\n      var force = 0;\n\n      word = words[i];\n      if (lineIndent && word[0] == \"\\n\") {\n        word = word.substr(1);\n        force = 1;\n      }\n      widths_array = getCharWidthsArray.apply(this, [word, options]);\n      current_word_length = widths_array.reduce(function(pv, cv) {\n        return pv + cv;\n      }, 0);\n\n      if (\n        line_length + separator_length + current_word_length > maxlen ||\n        force\n      ) {\n        if (current_word_length > maxlen) {\n          // this happens when you have space-less long URLs for example.\n          // we just chop these to size. We do NOT insert hiphens\n          tmp = splitLongWord.apply(this, [\n            word,\n            widths_array,\n            maxlen - (line_length + separator_length),\n            maxlen\n          ]);\n          // first line we add to existing line object\n          line.push(tmp.shift()); // it's ok to have extra space indicator there\n          // last line we make into new line object\n          line = [tmp.pop()];\n          // lines in the middle we apped to lines object as whole lines\n          while (tmp.length) {\n            lines.push([tmp.shift()]); // single fragment occupies whole line\n          }\n          current_word_length = widths_array\n            .slice(word.length - (line[0] ? line[0].length : 0))\n            .reduce(function(pv, cv) {\n              return pv + cv;\n            }, 0);\n        } else {\n          // just put it on a new line\n          line = [word];\n        }\n\n        // now we attach new line to lines\n        lines.push(line);\n        line_length = current_word_length + lineIndent;\n        separator_length = spaceCharWidth;\n      } else {\n        line.push(word);\n\n        line_length += separator_length + current_word_length;\n        separator_length = spaceCharWidth;\n      }\n    }\n\n    var postProcess;\n    if (lineIndent) {\n      postProcess = function(ln, idx) {\n        return (idx ? pad : \"\") + ln.join(\" \");\n      };\n    } else {\n      postProcess = function(ln) {\n        return ln.join(\" \");\n      };\n    }\n\n    return lines.map(postProcess);\n  };\n\n  /**\n   * Splits a given string into an array of strings. Uses 'size' value\n   * (in measurement units declared as default for the jsPDF instance)\n   * and the font's \"widths\" and \"Kerning\" tables, where available, to\n   * determine display length of a given string for a given font.\n   *\n   * We use character's 100% of unit size (height) as width when Width\n   * table or other default width is not available.\n   *\n   * @name splitTextToSize\n   * @public\n   * @function\n   * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.\n   * @param {number} size Nominal number, measured in units default to this instance of jsPDF.\n   * @param {Object} options Optional flags needed for chopper to do the right thing.\n   * @returns {Array} array Array with strings chopped to size.\n   */\n  API.splitTextToSize = function(text, maxlen, options) {\n    \"use strict\";\n\n    options = options || {};\n\n    var fsize = options.fontSize || this.internal.getFontSize(),\n      newOptions = function(options) {\n        var widths = {\n            0: 1\n          },\n          kerning = {};\n\n        if (!options.widths || !options.kerning) {\n          var f = this.internal.getFont(options.fontName, options.fontStyle),\n            encoding = \"Unicode\";\n          // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE\n          // Actual JavaScript-native String's 16bit char codes used.\n          // no multi-byte logic here\n\n          if (f.metadata[encoding]) {\n            return {\n              widths: f.metadata[encoding].widths || widths,\n              kerning: f.metadata[encoding].kerning || kerning\n            };\n          } else {\n            return {\n              font: f.metadata,\n              fontSize: this.internal.getFontSize(),\n              charSpace: this.internal.getCharSpace()\n            };\n          }\n        } else {\n          return {\n            widths: options.widths,\n            kerning: options.kerning\n          };\n        }\n      }.call(this, options);\n\n    // first we split on end-of-line chars\n    var paragraphs;\n    if (Array.isArray(text)) {\n      paragraphs = text;\n    } else {\n      paragraphs = String(text).split(/\\r?\\n/);\n    }\n\n    // now we convert size (max length of line) into \"font size units\"\n    // at present time, the \"font size unit\" is always 'point'\n    // 'proportional' means, \"in proportion to font size\"\n    var fontUnit_maxLen = (1.0 * this.internal.scaleFactor * maxlen) / fsize;\n    // at this time, fsize is always in \"points\" regardless of the default measurement unit of the doc.\n    // this may change in the future?\n    // until then, proportional_maxlen is likely to be in 'points'\n\n    // If first line is to be indented (shorter or longer) than maxLen\n    // we indicate that by using CSS-style \"text-indent\" option.\n    // here it's in font units too (which is likely 'points')\n    // it can be negative (which makes the first line longer than maxLen)\n    newOptions.textIndent = options.textIndent\n      ? (options.textIndent * 1.0 * this.internal.scaleFactor) / fsize\n      : 0;\n    newOptions.lineIndent = options.lineIndent;\n\n    var i,\n      l,\n      output = [];\n    for (i = 0, l = paragraphs.length; i < l; i++) {\n      output = output.concat(\n        splitParagraphIntoLines.apply(this, [\n          paragraphs[i],\n          fontUnit_maxLen,\n          newOptions\n        ])\n      );\n    }\n\n    return output;\n  };\n})(jsPDF.API);\n","/** @license\n jsPDF standard_fonts_metrics plugin\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n * MIT license.\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * This file adds the standard font metrics to jsPDF.\n *\n * Font metrics data is reprocessed derivative of contents of\n * \"Font Metrics for PDF Core 14 Fonts\" package, which exhibits the following copyright and license:\n *\n * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.\n *\n * This file and the 14 PostScript(R) AFM files it accompanies may be used,\n * copied, and distributed for any purpose and without charge, with or without\n * modification, provided that all copyright notices are retained; that the AFM\n * files are not distributed without this file; that all modifications to this\n * file or any of the AFM files are prominently noted in the modified file(s);\n * and that this paragraph is not modified. Adobe Systems has no responsibility\n * or obligation to support the use of the AFM files.\n *\n * @name standard_fonts_metrics\n * @module\n */\n\n(function(API) {\n  \"use strict\";\n  API.__fontmetrics__ = API.__fontmetrics__ || {};\n\n  var decoded = \"0123456789abcdef\",\n    encoded = \"klmnopqrstuvwxyz\",\n    mappingUncompress = {},\n    mappingCompress = {};\n\n  for (var i = 0; i < encoded.length; i++) {\n    mappingUncompress[encoded[i]] = decoded[i];\n    mappingCompress[decoded[i]] = encoded[i];\n  }\n\n  var hex = function(value) {\n    return \"0x\" + parseInt(value, 10).toString(16);\n  };\n\n  var compress = (API.__fontmetrics__.compress = function(data) {\n    var vals = [\"{\"];\n    var value, keystring, valuestring, numberprefix;\n\n    for (var key in data) {\n      value = data[key];\n\n      if (!isNaN(parseInt(key, 10))) {\n        key = parseInt(key, 10);\n        keystring = hex(key).slice(2);\n        keystring =\n          keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];\n      } else {\n        keystring = \"'\" + key + \"'\";\n      }\n\n      if (typeof value == \"number\") {\n        if (value < 0) {\n          valuestring = hex(value).slice(3);\n          numberprefix = \"-\";\n        } else {\n          valuestring = hex(value).slice(2);\n          numberprefix = \"\";\n        }\n        valuestring =\n          numberprefix +\n          valuestring.slice(0, -1) +\n          mappingCompress[valuestring.slice(-1)];\n      } else {\n        if (typeof value === \"object\") {\n          valuestring = compress(value);\n        } else {\n          throw new Error(\n            \"Don't know what to do with value type \" + typeof value + \".\"\n          );\n        }\n      }\n      vals.push(keystring + valuestring);\n    }\n    vals.push(\"}\");\n    return vals.join(\"\");\n  });\n\n  /**\n   * Uncompresses data compressed into custom, base16-like format.\n   *\n   * @public\n   * @function\n   * @param\n   * @returns {Type}\n   */\n  var uncompress = (API.__fontmetrics__.uncompress = function(data) {\n    if (typeof data !== \"string\") {\n      throw new Error(\"Invalid argument passed to uncompress.\");\n    }\n\n    var output = {},\n      sign = 1,\n      stringparts, // undef. will be [] in string mode\n      activeobject = output,\n      parentchain = [],\n      parent_key_pair,\n      keyparts = \"\",\n      valueparts = \"\",\n      key, // undef. will be Truthy when Key is resolved.\n      datalen = data.length - 1, // stripping ending }\n      ch;\n\n    for (var i = 1; i < datalen; i += 1) {\n      // - { } ' are special.\n\n      ch = data[i];\n\n      if (ch == \"'\") {\n        if (stringparts) {\n          // end of string mode\n          key = stringparts.join(\"\");\n          stringparts = undefined;\n        } else {\n          // start of string mode\n          stringparts = [];\n        }\n      } else if (stringparts) {\n        stringparts.push(ch);\n      } else if (ch == \"{\") {\n        // start of object\n        parentchain.push([activeobject, key]);\n        activeobject = {};\n        key = undefined;\n      } else if (ch == \"}\") {\n        // end of object\n        parent_key_pair = parentchain.pop();\n        parent_key_pair[0][parent_key_pair[1]] = activeobject;\n        key = undefined;\n        activeobject = parent_key_pair[0];\n      } else if (ch == \"-\") {\n        sign = -1;\n      } else {\n        // must be number\n        if (key === undefined) {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            keyparts += mappingUncompress[ch];\n            key = parseInt(keyparts, 16) * sign;\n            sign = +1;\n            keyparts = \"\";\n          } else {\n            keyparts += ch;\n          }\n        } else {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            valueparts += mappingUncompress[ch];\n            activeobject[key] = parseInt(valueparts, 16) * sign;\n            sign = +1;\n            key = undefined;\n            valueparts = \"\";\n          } else {\n            valueparts += ch;\n          }\n        }\n      }\n    }\n    return output;\n  });\n\n  // encoding = 'Unicode'\n  // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior\n  // Actual 16bit char codes used.\n  // no multi-byte logic here\n\n  // Unicode characters to WinAnsiEncoding:\n  // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}\n  // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.\n  // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly\n  // as well as give strings with some (supported by these fonts) Unicode characters and\n  // these will be mapped to win cp1252\n  // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting \"Euro\" glyph displayed in both cases.\n\n  var encodingBlock = {\n    codePages: [\"WinAnsiEncoding\"],\n    WinAnsiEncoding: uncompress(\n      \"{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}\"\n    )\n  };\n  var encodings = {\n    Unicode: {\n      Courier: encodingBlock,\n      \"Courier-Bold\": encodingBlock,\n      \"Courier-BoldOblique\": encodingBlock,\n      \"Courier-Oblique\": encodingBlock,\n      Helvetica: encodingBlock,\n      \"Helvetica-Bold\": encodingBlock,\n      \"Helvetica-BoldOblique\": encodingBlock,\n      \"Helvetica-Oblique\": encodingBlock,\n      \"Times-Roman\": encodingBlock,\n      \"Times-Bold\": encodingBlock,\n      \"Times-BoldItalic\": encodingBlock,\n      \"Times-Italic\": encodingBlock\n      //\t, 'Symbol'\n      //\t, 'ZapfDingbats'\n    }\n  };\n\n  var fontMetrics = {\n    Unicode: {\n      // all sizing numbers are n/fontMetricsFractionOf = one font size unit\n      // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's\n      // width is 476/1000 or 47.6% of its height (regardless of font size)\n      // At this time this value applies to \"widths\" and \"kerning\" numbers.\n\n      // char code 0 represents \"default\" (average) width - use it for chars missing in this table.\n      // key 'fof' represents the \"fontMetricsFractionOf\" value\n\n      \"Courier-Oblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-BoldItalic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Courier: uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-BoldOblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Symbol: uncompress(\n        \"{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}\"\n      ),\n      Helvetica: uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-BoldOblique\": uncompress(\n        \"{'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}}}\"\n      ),\n      ZapfDingbats: uncompress(\"{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-Bold\": uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Times-Italic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Times-Roman\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Oblique\": uncompress(\n        \"{'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}}}\"\n      )\n    }\n  };\n\n  /*\n\tThis event handler is fired when a new jsPDF object is initialized\n\tThis event handler appends metrics data to standard fonts within\n\tthat jsPDF instance. The metrics are mapped over Unicode character\n\tcodes, NOT CIDs or other codes matching the StandardEncoding table of the\n\tstandard PDF fonts.\n\tFuture:\n\tAlso included is the encoding maping table, converting Unicode (UCS-2, UTF-16)\n\tchar codes to StandardEncoding character codes. The encoding table is to be used\n\tsomewhere around \"pdfEscape\" call.\n\t*/\n  API.events.push([\n    \"addFont\",\n    function(data) {\n      var font = data.font;\n\n      var metrics = fontMetrics[\"Unicode\"][font.postScriptName];\n      if (metrics) {\n        font.metadata[\"Unicode\"] = {};\n        font.metadata[\"Unicode\"].widths = metrics.widths;\n        font.metadata[\"Unicode\"].kerning = metrics.kerning;\n      }\n\n      var encodingBlock = encodings[\"Unicode\"][font.postScriptName];\n      if (encodingBlock) {\n        font.metadata[\"Unicode\"].encoding = encodingBlock;\n        font.encoding = encodingBlock.codePages[0];\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob } from \"../libs/AtobBtoa.js\";\n\n/**\n * @name ttfsupport\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n\n  var binaryStringToUint8Array = function(binary_string) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  };\n\n  var addFont = function(font, file) {\n    // eslint-disable-next-line no-control-regex\n    if (/^\\x00\\x01\\x00\\x00/.test(file)) {\n      file = binaryStringToUint8Array(file);\n    } else {\n      file = binaryStringToUint8Array(atob(file));\n    }\n    font.metadata = jsPDF.API.TTFFont.open(file);\n    font.metadata.Unicode = font.metadata.Unicode || {\n      encoding: {},\n      kerning: {},\n      widths: []\n    };\n    font.metadata.glyIdsUsed = [0];\n  };\n\n  jsPDF.API.events.push([\n    \"addFont\",\n    function(data) {\n      var file = undefined;\n      var font = data.font;\n      var instance = data.instance;\n      if (font.isStandardFont) {\n        return;\n      }\n      if (typeof instance !== \"undefined\") {\n        if (instance.existsFileInVFS(font.postScriptName) === false) {\n          file = instance.loadFile(font.postScriptName);\n        } else {\n          file = instance.getFileFromVFS(font.postScriptName);\n        }\n        if (typeof file !== \"string\") {\n          throw new Error(\n            \"Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('\" +\n              font.postScriptName +\n              \"').\"\n          );\n        }\n        addFont(font, file);\n      } else {\n        throw new Error(\n          \"Font does not exist in vFS, import fonts or remove declaration doc.addFont('\" +\n            font.postScriptName +\n            \"').\"\n        );\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF);\n","/** @license\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { console } from \"../libs/console.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF SVG plugin\n *\n * @name svg\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadCanvg() {\n    return (function() {\n      if (globalObject[\"canvg\"]) {\n        return Promise.resolve(globalObject[\"canvg\"]);\n      }\n\n      return import(\"canvg\");\n\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load canvg: \" + e));\n      })\n      .then(function(canvg) {\n        return canvg.default ? canvg.default : canvg;\n      });\n  }\n\n  /**\n   * Parses SVG XML and saves it as image into the PDF.\n   *\n   * Depends on canvas-element and canvg\n   *\n   * @name addSvgAsImage\n   * @public\n   * @function\n   * @param {string} SVG-Data as Text\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width of SVG-Image (in units declared at inception of PDF document)\n   * @param {number} height of SVG-Image (in units declared at inception of PDF document)\n   * @param {string} alias of SVG-Image (if used multiple times)\n   * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF jsPDF-instance\n   */\n  jsPDFAPI.addSvgAsImage = function(\n    svg,\n    x,\n    y,\n    w,\n    h,\n    alias,\n    compression,\n    rotation\n  ) {\n    if (isNaN(x) || isNaN(y)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid coordinates\", arguments);\n      throw new Error(\"Invalid coordinates passed to jsPDF.addSvgAsImage\");\n    }\n\n    if (isNaN(w) || isNaN(h)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid measurements\", arguments);\n      throw new Error(\n        \"Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage\"\n      );\n    }\n\n    var canvas = document.createElement(\"canvas\");\n    canvas.width = w;\n    canvas.height = h;\n    var ctx = canvas.getContext(\"2d\");\n    ctx.fillStyle = \"#fff\"; /// set white fill style\n    ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n    var options = {\n      ignoreMouse: true,\n      ignoreAnimation: true,\n      ignoreDimensions: true\n    };\n    var doc = this;\n    return loadCanvg()\n      .then(\n        function(canvg) {\n          return canvg.fromString(ctx, svg, options);\n        },\n        function() {\n          return Promise.reject(new Error(\"Could not load canvg.\"));\n        }\n      )\n      .then(function(instance) {\n        return instance.render(options);\n      })\n      .then(function() {\n        doc.addImage(\n          canvas.toDataURL(\"image/jpeg\", 1.0),\n          x,\n          y,\n          w,\n          h,\n          compression,\n          rotation\n        );\n      });\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF total_pages plugin\n * @name total_pages\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * @name putTotalPages\n   * @function\n   * @param {string} pageExpression Regular Expression\n   * @returns {jsPDF} jsPDF-instance\n   */\n\n  jsPDFAPI.putTotalPages = function(pageExpression) {\n    \"use strict\";\n\n    var replaceExpression;\n    var totalNumberOfPages = 0;\n    if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {\n      replaceExpression = new RegExp(pageExpression, \"g\");\n      totalNumberOfPages = this.internal.getNumberOfPages();\n    } else {\n      replaceExpression = new RegExp(\n        this.pdfEscape16(pageExpression, this.internal.getFont()),\n        \"g\"\n      );\n      totalNumberOfPages = this.pdfEscape16(\n        this.internal.getNumberOfPages() + \"\",\n        this.internal.getFont()\n      );\n    }\n\n    for (var n = 1; n <= this.internal.getNumberOfPages(); n++) {\n      for (var i = 0; i < this.internal.pages[n].length; i++) {\n        this.internal.pages[n][i] = this.internal.pages[n][i].replace(\n          replaceExpression,\n          totalNumberOfPages\n        );\n      }\n    }\n\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF viewerPreferences Plugin\n * @author Aras Abbasi (github.com/arasabbasi)\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Adds the ability to set ViewerPreferences and by thus\n * controlling the way the document is to be presented on the\n * screen or in print.\n * @name viewerpreferences\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * Set the ViewerPreferences of the generated PDF\n   *\n   * @name viewerPreferences\n   * @function\n   * @public\n   * @param {Object} options Array with the ViewerPreferences<br />\n   * Example: doc.viewerPreferences({\"FitWindow\":true});<br />\n   * <br />\n   * You can set following preferences:<br />\n   * <br/>\n   * <b>HideToolbar</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>HideMenubar</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>HideWindowUI</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>FitWindow</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>CenterWindow</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>DisplayDocTitle</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>NonFullScreenPageMode</b> <i>(string)</i><br />\n   * Possible values: UseNone, UseOutlines, UseThumbs, UseOC<br />\n   * Default value: UseNone<br/>\n   * <br />\n   * <b>Direction</b> <i>(string)</i><br />\n   * Possible values: L2R, R2L<br />\n   * Default value: L2R.<br />\n   * <br />\n   * <b>ViewArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>ViewClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>PrintScaling</b> <i>(string)</i><br />\n   * Possible values: AppDefault, None<br />\n   * Default value: AppDefault.<br />\n   * <br />\n   * <b>Duplex</b> <i>(string)</i><br />\n   * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge\n   * Default value: none<br />\n   * <br />\n   * <b>PickTrayByPDFSize</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>PrintPageRange</b> <i>(Array)</i><br />\n   * Example: [[1,5], [7,9]]<br />\n   * Default value: as defined by PDF viewer application<br />\n   * <br />\n   * <b>NumCopies</b> <i>(Number)</i><br />\n   * Possible values: 1, 2, 3, 4, 5<br />\n   * Default value: 1<br />\n   * <br />\n   * For more information see the PDF Reference, sixth edition on Page 577\n   * @param {boolean} doReset True to reset the settings\n   * @function\n   * @returns jsPDF jsPDF-instance\n   * @example\n   * var doc = new jsPDF()\n   * doc.text('This is a test', 10, 10)\n   * doc.viewerPreferences({'FitWindow': true}, true)\n   * doc.save(\"viewerPreferences.pdf\")\n   *\n   * // Example printing 10 copies, using cropbox, and hiding UI.\n   * doc.viewerPreferences({\n   *   'HideWindowUI': true,\n   *   'PrintArea': 'CropBox',\n   *   'NumCopies': 10\n   * })\n   */\n  jsPDFAPI.viewerPreferences = function(options, doReset) {\n    options = options || {};\n    doReset = doReset || false;\n\n    var configuration;\n    var configurationTemplate = {\n      HideToolbar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideMenubar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideWindowUI: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      FitWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      CenterWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      DisplayDocTitle: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.4\n      },\n      NonFullScreenPageMode: {\n        defaultValue: \"UseNone\",\n        value: \"UseNone\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"UseNone\", \"UseOutlines\", \"UseThumbs\", \"UseOC\"],\n        pdfVersion: 1.3\n      },\n      Direction: {\n        defaultValue: \"L2R\",\n        value: \"L2R\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"L2R\", \"R2L\"],\n        pdfVersion: 1.3\n      },\n      ViewArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      ViewClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintScaling: {\n        defaultValue: \"AppDefault\",\n        value: \"AppDefault\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"AppDefault\", \"None\"],\n        pdfVersion: 1.6\n      },\n      Duplex: {\n        defaultValue: \"\",\n        value: \"none\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\n          \"Simplex\",\n          \"DuplexFlipShortEdge\",\n          \"DuplexFlipLongEdge\",\n          \"none\"\n        ],\n        pdfVersion: 1.7\n      },\n      PickTrayByPDFSize: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.7\n      },\n      PrintPageRange: {\n        defaultValue: \"\",\n        value: \"\",\n        type: \"array\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      },\n      NumCopies: {\n        defaultValue: 1,\n        value: 1,\n        type: \"integer\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      }\n    };\n\n    var configurationKeys = Object.keys(configurationTemplate);\n\n    var rangeArray = [];\n    var i = 0;\n    var j = 0;\n    var k = 0;\n    var isValid;\n\n    var method;\n    var value;\n\n    function arrayContainsElement(array, element) {\n      var iterator;\n      var result = false;\n\n      for (iterator = 0; iterator < array.length; iterator += 1) {\n        if (array[iterator] === element) {\n          result = true;\n        }\n      }\n      return result;\n    }\n\n    if (this.internal.viewerpreferences === undefined) {\n      this.internal.viewerpreferences = {};\n      this.internal.viewerpreferences.configuration = JSON.parse(\n        JSON.stringify(configurationTemplate)\n      );\n      this.internal.viewerpreferences.isSubscribed = false;\n    }\n    configuration = this.internal.viewerpreferences.configuration;\n\n    if (options === \"reset\" || doReset === true) {\n      var len = configurationKeys.length;\n\n      for (k = 0; k < len; k += 1) {\n        configuration[configurationKeys[k]].value =\n          configuration[configurationKeys[k]].defaultValue;\n        configuration[configurationKeys[k]].explicitSet = false;\n      }\n    }\n\n    if (typeof options === \"object\") {\n      for (method in options) {\n        value = options[method];\n        if (\n          arrayContainsElement(configurationKeys, method) &&\n          value !== undefined\n        ) {\n          if (\n            configuration[method].type === \"boolean\" &&\n            typeof value === \"boolean\"\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"name\" &&\n            arrayContainsElement(configuration[method].valueSet, value)\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"integer\" &&\n            Number.isInteger(value)\n          ) {\n            configuration[method].value = value;\n          } else if (configuration[method].type === \"array\") {\n            for (i = 0; i < value.length; i += 1) {\n              isValid = true;\n              if (value[i].length === 1 && typeof value[i][0] === \"number\") {\n                rangeArray.push(String(value[i] - 1));\n              } else if (value[i].length > 1) {\n                for (j = 0; j < value[i].length; j += 1) {\n                  if (typeof value[i][j] !== \"number\") {\n                    isValid = false;\n                  }\n                }\n                if (isValid === true) {\n                  rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(\" \"));\n                }\n              }\n            }\n            configuration[method].value = \"[\" + rangeArray.join(\" \") + \"]\";\n          } else {\n            configuration[method].value = configuration[method].defaultValue;\n          }\n\n          configuration[method].explicitSet = true;\n        }\n      }\n    }\n\n    if (this.internal.viewerpreferences.isSubscribed === false) {\n      this.internal.events.subscribe(\"putCatalog\", function() {\n        var pdfDict = [];\n        var vPref;\n        for (vPref in configuration) {\n          if (configuration[vPref].explicitSet === true) {\n            if (configuration[vPref].type === \"name\") {\n              pdfDict.push(\"/\" + vPref + \" /\" + configuration[vPref].value);\n            } else {\n              pdfDict.push(\"/\" + vPref + \" \" + configuration[vPref].value);\n            }\n          }\n        }\n        if (pdfDict.length !== 0) {\n          this.internal.write(\n            \"/ViewerPreferences\\n<<\\n\" + pdfDict.join(\"\\n\") + \"\\n>>\"\n          );\n        }\n      });\n      this.internal.viewerpreferences.isSubscribed = true;\n    }\n\n    this.internal.viewerpreferences.configuration = configuration;\n    return this;\n  };\n})(jsPDF.API);\n","/** ====================================================================\n * @license\n * jsPDF XMP metadata plugin\n * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name xmp_metadata\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var postPutResources = function() {\n    var xmpmeta_beginning = '<x:xmpmeta xmlns:x=\"adobe:ns:meta/\">';\n    var rdf_beginning =\n      '<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\" xmlns:jspdf=\"' +\n      this.internal.__metadata__.namespaceuri +\n      '\"><jspdf:metadata>';\n    var rdf_ending = \"</jspdf:metadata></rdf:Description></rdf:RDF>\";\n    var xmpmeta_ending = \"</x:xmpmeta>\";\n    var utf8_xmpmeta_beginning = unescape(\n      encodeURIComponent(xmpmeta_beginning)\n    );\n    var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));\n    var utf8_metadata = unescape(\n      encodeURIComponent(this.internal.__metadata__.metadata)\n    );\n    var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));\n    var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));\n\n    var total_len =\n      utf8_rdf_beginning.length +\n      utf8_metadata.length +\n      utf8_rdf_ending.length +\n      utf8_xmpmeta_beginning.length +\n      utf8_xmpmeta_ending.length;\n\n    this.internal.__metadata__.metadata_object_number = this.internal.newObject();\n    this.internal.write(\n      \"<< /Type /Metadata /Subtype /XML /Length \" + total_len + \" >>\"\n    );\n    this.internal.write(\"stream\");\n    this.internal.write(\n      utf8_xmpmeta_beginning +\n        utf8_rdf_beginning +\n        utf8_metadata +\n        utf8_rdf_ending +\n        utf8_xmpmeta_ending\n    );\n    this.internal.write(\"endstream\");\n    this.internal.write(\"endobj\");\n  };\n\n  var putCatalog = function() {\n    if (this.internal.__metadata__.metadata_object_number) {\n      this.internal.write(\n        \"/Metadata \" +\n          this.internal.__metadata__.metadata_object_number +\n          \" 0 R\"\n      );\n    }\n  };\n\n  /**\n   * Adds XMP formatted metadata to PDF\n   *\n   * @name addMetadata\n   * @function\n   * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters \"<\", \">\" or \"&\", those characters should be written using XML entities.\n   * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.\n   * @returns {jsPDF} jsPDF-instance\n   */\n  jsPDFAPI.addMetadata = function(metadata, namespaceuri) {\n    if (typeof this.internal.__metadata__ === \"undefined\") {\n      this.internal.__metadata__ = {\n        metadata: metadata,\n        namespaceuri: namespaceuri || \"http://jspdf.default.namespaceuri/\"\n      };\n      this.internal.events.subscribe(\"putCatalog\", putCatalog);\n\n      this.internal.events.subscribe(\"postPutResources\", postPutResources);\n    }\n    return this;\n  };\n})(jsPDF.API);\n","import { jsPDF } from \"../jspdf.js\";\nimport { toPDFName } from \"../libs/pdfname.js\";\n\n/**\n * @name utf8\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n  var jsPDFAPI = jsPDF.API;\n\n  /***************************************************************************************************/\n  /* function : pdfEscape16                                                                          */\n  /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */\n  /*   the corresponding glyph id and width, and then adding padding to the string.                  */\n  /***************************************************************************************************/\n  var pdfEscape16 = (jsPDFAPI.pdfEscape16 = function(text, font) {\n    var widths = font.metadata.Unicode.widths;\n    var padz = [\"\", \"0\", \"00\", \"000\", \"0000\"];\n    var ar = [\"\"];\n    for (var i = 0, l = text.length, t; i < l; ++i) {\n      t = font.metadata.characterToGlyph(text.charCodeAt(i));\n      font.metadata.glyIdsUsed.push(t);\n      font.metadata.toUnicode[t] = text.charCodeAt(i);\n      if (widths.indexOf(t) == -1) {\n        widths.push(t);\n        widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);\n      }\n      if (t == \"0\") {\n        //Spaces are not allowed in cmap.\n        return ar.join(\"\");\n      } else {\n        t = t.toString(16);\n        ar.push(padz[4 - t.length], t);\n      }\n    }\n    return ar.join(\"\");\n  });\n\n  var toUnicodeCmap = function(map) {\n    var code, codes, range, unicode, unicodeMap, _i, _len;\n    unicodeMap =\n      \"/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    codes = Object.keys(map).sort(function(a, b) {\n      return a - b;\n    });\n\n    range = [];\n    for (_i = 0, _len = codes.length; _i < _len; _i++) {\n      code = codes[_i];\n      if (range.length >= 100) {\n        unicodeMap +=\n          \"\\n\" +\n          range.length +\n          \" beginbfchar\\n\" +\n          range.join(\"\\n\") +\n          \"\\nendbfchar\";\n        range = [];\n      }\n\n      if (\n        map[code] !== undefined &&\n        map[code] !== null &&\n        typeof map[code].toString === \"function\"\n      ) {\n        unicode = (\"0000\" + map[code].toString(16)).slice(-4);\n        code = (\"0000\" + (+code).toString(16)).slice(-4);\n        range.push(\"<\" + code + \"><\" + unicode + \">\");\n      }\n    }\n\n    if (range.length) {\n      unicodeMap +=\n        \"\\n\" +\n        range.length +\n        \" beginbfchar\\n\" +\n        range.join(\"\\n\") +\n        \"\\nendbfchar\\n\";\n    }\n    unicodeMap +=\n      \"endcmap\\nCMapName currentdict /CMap defineresource pop\\nend\\nend\";\n    return unicodeMap;\n  };\n\n  var identityHFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"Identity-H\"\n    ) {\n      //Tag with Identity-H\n      var widths = font.metadata.Unicode.widths;\n      var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/Flags \" + font.metadata.flags);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\">>\");\n      out(\"endobj\");\n\n      var DescendantFont = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/FontDescriptor \" + fontDescriptor + \" 0 R\");\n      out(\"/W \" + jsPDF.API.PDFObject.convert(widths));\n      out(\"/CIDToGIDMap /Identity\");\n      out(\"/DW 1000\");\n      out(\"/Subtype /CIDFontType2\");\n      out(\"/CIDSystemInfo\");\n      out(\"<<\");\n      out(\"/Supplement 0\");\n      out(\"/Registry (Adobe)\");\n      out(\"/Ordering (\" + font.encoding + \")\");\n      out(\">>\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.objectNumber = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/Subtype /Type0\");\n      out(\"/ToUnicode \" + cmap + \" 0 R\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/Encoding /\" + font.encoding);\n      out(\"/DescendantFonts [\" + DescendantFont + \" 0 R]\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      identityHFunction(args);\n    }\n  ]);\n\n  var winAnsiEncodingFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"WinAnsiEncoding\"\n    ) {\n      //Tag with WinAnsi encoding\n      var data = font.metadata.rawData;\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/Flags 96\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\">>\");\n      out(\"endobj\");\n      font.objectNumber = newObject();\n      for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {\n        font.metadata.hmtx.widths[j] = parseInt(\n          font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)\n        ); //Change the width of Em units to Point units.\n      }\n      out(\n        \"<</Subtype/TrueType/Type/Font/ToUnicode \" +\n          cmap +\n          \" 0 R/BaseFont/\" +\n          toPDFName(font.fontName) +\n          \"/FontDescriptor \" +\n          fontDescriptor +\n          \" 0 R\" +\n          \"/Encoding/\" +\n          font.encoding +\n          \" /FirstChar 29 /LastChar 255 /Widths \" +\n          jsPDF.API.PDFObject.convert(font.metadata.hmtx.widths) +\n          \">>\"\n      );\n      out(\"endobj\");\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      winAnsiEncodingFunction(args);\n    }\n  ]);\n\n  var utf8TextFunction = function(args) {\n    var text = args.text || \"\";\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n\n    var pdfEscape = mutex.pdfEscape;\n    var activeFontKey = mutex.activeFontKey;\n    var fonts = mutex.fonts;\n    var key = activeFontKey;\n\n    var str = \"\",\n      s = 0,\n      cmapConfirm;\n    var strText = \"\";\n    var encoding = fonts[key].encoding;\n\n    if (fonts[key].encoding !== \"Identity-H\") {\n      return {\n        text: text,\n        x: x,\n        y: y,\n        options: options,\n        mutex: mutex\n      };\n    }\n    strText = text;\n\n    key = activeFontKey;\n    if (Array.isArray(text)) {\n      strText = text[0];\n    }\n    for (s = 0; s < strText.length; s += 1) {\n      if (fonts[key].metadata.hasOwnProperty(\"cmap\")) {\n        cmapConfirm =\n          fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];\n        /*\n             if (Object.prototype.toString.call(text) === '[object Array]') {\n                var i = 0;\n               // for (i = 0; i < text.length; i += 1) {\n                    if (Object.prototype.toString.call(text[s]) === '[object Array]') {\n                        cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n                    } else {\n\n                    }\n                //}\n\n            } else {\n                cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n            }*/\n      }\n      if (!cmapConfirm) {\n        if (\n          strText[s].charCodeAt(0) < 256 &&\n          fonts[key].metadata.hasOwnProperty(\"Unicode\")\n        ) {\n          str += strText[s];\n        } else {\n          str += \"\";\n        }\n      } else {\n        str += strText[s];\n      }\n    }\n    var result = \"\";\n    if (parseInt(key.slice(1)) < 14 || encoding === \"WinAnsiEncoding\") {\n      //For the default 13 font\n      result = pdfEscape(str, key)\n        .split(\"\")\n        .map(function(cv) {\n          return cv.charCodeAt(0).toString(16);\n        })\n        .join(\"\");\n    } else if (encoding === \"Identity-H\") {\n      result = pdfEscape16(str, fonts[key]);\n    }\n    mutex.isHex = true;\n\n    return {\n      text: result,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n  };\n\n  var utf8EscapeFunction = function(parms) {\n    var text = parms.text || \"\",\n      x = parms.x,\n      y = parms.y,\n      options = parms.options,\n      mutex = parms.mutex;\n    var tmpText = [];\n    var args = {\n      text: text,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          if (text[i].length === 3) {\n            tmpText.push([\n              utf8TextFunction(Object.assign({}, args, { text: text[i][0] }))\n                .text,\n              text[i][1],\n              text[i][2]\n            ]);\n          } else {\n            tmpText.push(\n              utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n            );\n          }\n        } else {\n          tmpText.push(\n            utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n          );\n        }\n      }\n      parms.text = tmpText;\n    } else {\n      parms.text = utf8TextFunction(\n        Object.assign({}, args, { text: text })\n      ).text;\n    }\n  };\n\n  jsPDFAPI.events.push([\"postProcessText\", utf8EscapeFunction]);\n})(jsPDF);\n","/**\n * @license\n * jsPDF virtual FileSystem functionality\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Use the vFS to handle files\n *\n * @name vFS\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var _initializeVFS = function() {\n    if (typeof this.internal.vFS === \"undefined\") {\n      this.internal.vFS = {};\n    }\n    return true;\n  };\n\n  /**\n   * Check if the file exists in the vFS\n   *\n   * @name existsFileInVFS\n   * @function\n   * @param {string} Possible filename in the vFS.\n   * @returns {boolean}\n   * @example\n   * doc.existsFileInVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.existsFileInVFS = function(filename) {\n    _initializeVFS.call(this);\n    return typeof this.internal.vFS[filename] !== \"undefined\";\n  };\n\n  /**\n   * Add a file to the vFS\n   *\n   * @name addFileToVFS\n   * @function\n   * @param {string} filename The name of the file which should be added.\n   * @param {string} filecontent The content of the file.\n   * @returns {jsPDF}\n   * @example\n   * doc.addFileToVFS(\"someFile.txt\", \"BADFACE1\");\n   */\n  jsPDFAPI.addFileToVFS = function(filename, filecontent) {\n    _initializeVFS.call(this);\n    this.internal.vFS[filename] = filecontent;\n    return this;\n  };\n\n  /**\n   * Get the file from the vFS\n   *\n   * @name getFileFromVFS\n   * @function\n   * @param {string} The name of the file which gets requested.\n   * @returns {string}\n   * @example\n   * doc.getFileFromVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.getFileFromVFS = function(filename) {\n    _initializeVFS.call(this);\n\n    if (typeof this.internal.vFS[filename] !== \"undefined\") {\n      return this.internal.vFS[filename];\n    }\n    return null;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)\n * MIT License\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDF) {\n  \"use strict\";\n  /**\n   * Table of Unicode types.\n   *\n   * Generated by:\n   *\n   * var bidi = require(\"./bidi/index\");\n   * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).\n   * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).\n   * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));\n   *\n   * for( var i = 0; i < bidi_accumulate.length; i++) {\n   * \tif(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')\n   * \t\tbidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined\n   * }\n   * var bidiAccumulateStr = 'return [ \"' + bidi_accumulate.toString().replace(/,/g, '\", \"') + '\" ];';\n   * require(\"fs\").writeFile('unicode-types.js', bidiAccumulateStr);\n   *\n   * Based on:\n   * https://github.com/mathiasbynens/unicode-8.0.0\n   */\n  var bidiUnicodeTypes = [\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"S\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"B\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"CS\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"EN\",\n    \"EN\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"ET\",\n    \"ET\",\n    \"AL\",\n    \"CS\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"ET\",\n    \"AN\",\n    \"AN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\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    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"L\",\n    \"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\",\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\",\n    \"B\",\n    \"LRE\",\n    \"RLE\",\n    \"PDF\",\n    \"LRO\",\n    \"RLO\",\n    \"CS\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"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\",\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    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"N\",\n    \"LRI\",\n    \"RLI\",\n    \"FSI\",\n    \"PDI\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"ES\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\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\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\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\",\n    \"CS\",\n    \"N\",\n    \"CS\",\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    \"ET\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"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    \"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   * Unicode Bidi algorithm compliant Bidi engine.\n   * For reference see http://unicode.org/reports/tr9/\n   */\n\n  /**\n   * constructor ( options )\n   *\n   * Initializes Bidi engine\n   *\n   * @param {Object} See 'setOptions' below for detailed description.\n   * options are cashed between invocation of 'doBidiReorder' method\n   *\n   * sample usage pattern of BidiEngine:\n   * var opt = {\n   * \tisInputVisual: true,\n   * \tisInputRtl: false,\n   * \tisOutputVisual: false,\n   * \tisOutputRtl: false,\n   * \tisSymmetricSwapping: true\n   * }\n   * var sourceToTarget = [], levels = [];\n   * var bidiEng = Globalize.bidiEngine(opt);\n   * var src = \"text string to be reordered\";\n   * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);\n   */\n\n  jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function(options) {\n    var _UNICODE_TYPES = _bidiUnicodeTypes;\n\n    var _STATE_TABLE_LTR = [\n      [0, 3, 0, 1, 0, 0, 0],\n      [0, 3, 0, 1, 2, 2, 0],\n      [0, 3, 0, 0x11, 2, 0, 1],\n      [0, 3, 5, 5, 4, 1, 0],\n      [0, 3, 0x15, 0x15, 4, 0, 1],\n      [0, 3, 5, 5, 4, 2, 0]\n    ];\n\n    var _STATE_TABLE_RTL = [\n      [2, 0, 1, 1, 0, 1, 0],\n      [2, 0, 1, 1, 0, 2, 0],\n      [2, 0, 2, 1, 3, 2, 0],\n      [2, 0, 2, 0x21, 3, 1, 1]\n    ];\n\n    var _TYPE_NAMES_MAP = { L: 0, R: 1, EN: 2, AN: 3, N: 4, B: 5, S: 6 };\n\n    var _UNICODE_RANGES_MAP = {\n      0: 0,\n      5: 1,\n      6: 2,\n      7: 3,\n      0x20: 4,\n      0xfb: 5,\n      0xfe: 6,\n      0xff: 7\n    };\n\n    var _SWAP_TABLE = [\n      \"\\u0028\",\n      \"\\u0029\",\n      \"\\u0028\",\n      \"\\u003C\",\n      \"\\u003E\",\n      \"\\u003C\",\n      \"\\u005B\",\n      \"\\u005D\",\n      \"\\u005B\",\n      \"\\u007B\",\n      \"\\u007D\",\n      \"\\u007B\",\n      \"\\u00AB\",\n      \"\\u00BB\",\n      \"\\u00AB\",\n      \"\\u2039\",\n      \"\\u203A\",\n      \"\\u2039\",\n      \"\\u2045\",\n      \"\\u2046\",\n      \"\\u2045\",\n      \"\\u207D\",\n      \"\\u207E\",\n      \"\\u207D\",\n      \"\\u208D\",\n      \"\\u208E\",\n      \"\\u208D\",\n      \"\\u2264\",\n      \"\\u2265\",\n      \"\\u2264\",\n      \"\\u2329\",\n      \"\\u232A\",\n      \"\\u2329\",\n      \"\\uFE59\",\n      \"\\uFE5A\",\n      \"\\uFE59\",\n      \"\\uFE5B\",\n      \"\\uFE5C\",\n      \"\\uFE5B\",\n      \"\\uFE5D\",\n      \"\\uFE5E\",\n      \"\\uFE5D\",\n      \"\\uFE64\",\n      \"\\uFE65\",\n      \"\\uFE64\"\n    ];\n\n    var _LTR_RANGES_REG_EXPR = new RegExp(\n      /^([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)$/\n    );\n\n    var _lastArabic = false,\n      _hasUbatAl,\n      _hasUbatB,\n      _hasUbatS,\n      DIR_LTR = 0,\n      DIR_RTL = 1,\n      _isInVisual,\n      _isInRtl,\n      _isOutVisual,\n      _isOutRtl,\n      _isSymmetricSwapping,\n      _dir = DIR_LTR;\n\n    this.__bidiEngine__ = {};\n\n    var _init = function(text, sourceToTargetMap) {\n      if (sourceToTargetMap) {\n        for (var i = 0; i < text.length; i++) {\n          sourceToTargetMap[i] = i;\n        }\n      }\n      if (_isInRtl === undefined) {\n        _isInRtl = _isContextualDirRtl(text);\n      }\n      if (_isOutRtl === undefined) {\n        _isOutRtl = _isContextualDirRtl(text);\n      }\n    };\n\n    // for reference see 3.2 in http://unicode.org/reports/tr9/\n    //\n    var _getCharType = function(ch) {\n      var charCode = ch.charCodeAt(),\n        range = charCode >> 8,\n        rangeIdx = _UNICODE_RANGES_MAP[range];\n\n      if (rangeIdx !== undefined) {\n        return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];\n      } else if (range === 0xfc || range === 0xfd) {\n        return \"AL\";\n      } else if (_LTR_RANGES_REG_EXPR.test(range)) {\n        //unlikely case\n        return \"L\";\n      } else if (range === 8) {\n        // even less likely\n        return \"R\";\n      }\n      return \"N\"; //undefined type, mark as neutral\n    };\n\n    var _isContextualDirRtl = function(text) {\n      for (var i = 0, charType; i < text.length; i++) {\n        charType = _getCharType(text.charAt(i));\n        if (charType === \"L\") {\n          return false;\n        } else if (charType === \"R\") {\n          return true;\n        }\n      }\n      return false;\n    };\n\n    // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/\n    //\n    var _resolveCharType = function(chars, types, resolvedTypes, index) {\n      var cType = types[index],\n        wType,\n        nType,\n        i,\n        len;\n      switch (cType) {\n        case \"L\":\n        case \"R\":\n          _lastArabic = false;\n          break;\n        case \"N\":\n        case \"AN\":\n          break;\n\n        case \"EN\":\n          if (_lastArabic) {\n            cType = \"AN\";\n          }\n          break;\n\n        case \"AL\":\n          _lastArabic = true;\n          _hasUbatAl = true;\n          cType = \"R\";\n          break;\n\n        case \"WS\":\n          cType = \"N\";\n          break;\n\n        case \"CS\":\n          if (\n            index < 1 ||\n            index + 1 >= types.length ||\n            ((wType = resolvedTypes[index - 1]) !== \"EN\" && wType !== \"AN\") ||\n            ((nType = types[index + 1]) !== \"EN\" && nType !== \"AN\")\n          ) {\n            cType = \"N\";\n          } else if (_lastArabic) {\n            nType = \"AN\";\n          }\n          cType = nType === wType ? nType : \"N\";\n          break;\n\n        case \"ES\":\n          wType = index > 0 ? resolvedTypes[index - 1] : \"B\";\n          cType =\n            wType === \"EN\" &&\n            index + 1 < types.length &&\n            types[index + 1] === \"EN\"\n              ? \"EN\"\n              : \"N\";\n          break;\n\n        case \"ET\":\n          if (index > 0 && resolvedTypes[index - 1] === \"EN\") {\n            cType = \"EN\";\n            break;\n          } else if (_lastArabic) {\n            cType = \"N\";\n            break;\n          }\n          i = index + 1;\n          len = types.length;\n          while (i < len && types[i] === \"ET\") {\n            i++;\n          }\n          if (i < len && types[i] === \"EN\") {\n            cType = \"EN\";\n          } else {\n            cType = \"N\";\n          }\n          break;\n\n        case \"NSM\":\n          if (_isInVisual && !_isInRtl) {\n            //V->L\n            len = types.length;\n            i = index + 1;\n            while (i < len && types[i] === \"NSM\") {\n              i++;\n            }\n            if (i < len) {\n              var c = chars[index];\n              var rtlCandidate = (c >= 0x0591 && c <= 0x08ff) || c === 0xfb1e;\n              wType = types[i];\n              if (rtlCandidate && (wType === \"R\" || wType === \"AL\")) {\n                cType = \"R\";\n                break;\n              }\n            }\n          }\n          if (index < 1 || (wType = types[index - 1]) === \"B\") {\n            cType = \"N\";\n          } else {\n            cType = resolvedTypes[index - 1];\n          }\n          break;\n\n        case \"B\":\n          _lastArabic = false;\n          _hasUbatB = true;\n          cType = _dir;\n          break;\n\n        case \"S\":\n          _hasUbatS = true;\n          cType = \"N\";\n          break;\n\n        case \"LRE\":\n        case \"RLE\":\n        case \"LRO\":\n        case \"RLO\":\n        case \"PDF\":\n          _lastArabic = false;\n          break;\n        case \"BN\":\n          cType = \"N\";\n          break;\n      }\n      return cType;\n    };\n\n    var _handleUbatS = function(types, levels, length) {\n      for (var i = 0; i < length; i++) {\n        if (types[i] === \"S\") {\n          levels[i] = _dir;\n          for (var j = i - 1; j >= 0; j--) {\n            if (types[j] === \"WS\") {\n              levels[j] = _dir;\n            } else {\n              break;\n            }\n          }\n        }\n      }\n    };\n\n    var _invertString = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\");\n      if (levels) {\n        _computeLevels(charArray, levels, { hiLevel: _dir });\n      }\n      charArray.reverse();\n      sourceToTargetMap && sourceToTargetMap.reverse();\n      return charArray.join(\"\");\n    };\n\n    // For reference see 3.3 in http://unicode.org/reports/tr9/\n    //\n    var _computeLevels = function(chars, levels, params) {\n      var action,\n        condition,\n        i,\n        index,\n        newLevel,\n        prevState,\n        condPos = -1,\n        len = chars.length,\n        newState = 0,\n        resolvedTypes = [],\n        stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,\n        types = [];\n\n      _lastArabic = false;\n      _hasUbatAl = false;\n      _hasUbatB = false;\n      _hasUbatS = false;\n      for (i = 0; i < len; i++) {\n        types[i] = _getCharType(chars[i]);\n      }\n      for (index = 0; index < len; index++) {\n        prevState = newState;\n        resolvedTypes[index] = _resolveCharType(\n          chars,\n          types,\n          resolvedTypes,\n          index\n        );\n        newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];\n        action = newState & 0xf0;\n        newState &= 0x0f;\n        levels[index] = newLevel = stateTable[newState][5];\n        if (action > 0) {\n          if (action === 0x10) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = 1;\n            }\n            condPos = -1;\n          } else {\n            condPos = -1;\n          }\n        }\n        condition = stateTable[newState][6];\n        if (condition) {\n          if (condPos === -1) {\n            condPos = index;\n          }\n        } else {\n          if (condPos > -1) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = newLevel;\n            }\n            condPos = -1;\n          }\n        }\n        if (types[index] === \"B\") {\n          levels[index] = 0;\n        }\n        params.hiLevel |= newLevel;\n      }\n      if (_hasUbatS) {\n        _handleUbatS(types, levels, len);\n      }\n    };\n\n    // for reference see 3.4 in http://unicode.org/reports/tr9/\n    //\n    var _invertByLevel = function(\n      level,\n      charArray,\n      sourceToTargetMap,\n      levels,\n      params\n    ) {\n      if (params.hiLevel < level) {\n        return;\n      }\n      if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {\n        charArray.reverse();\n        sourceToTargetMap && sourceToTargetMap.reverse();\n        return;\n      }\n      var ch,\n        high,\n        end,\n        low,\n        len = charArray.length,\n        start = 0;\n\n      while (start < len) {\n        if (levels[start] >= level) {\n          end = start + 1;\n          while (end < len && levels[end] >= level) {\n            end++;\n          }\n          for (low = start, high = end - 1; low < high; low++, high--) {\n            ch = charArray[low];\n            charArray[low] = charArray[high];\n            charArray[high] = ch;\n            if (sourceToTargetMap) {\n              ch = sourceToTargetMap[low];\n              sourceToTargetMap[low] = sourceToTargetMap[high];\n              sourceToTargetMap[high] = ch;\n            }\n          }\n          start = end;\n        }\n        start++;\n      }\n    };\n\n    // for reference see 7 & BD16 in http://unicode.org/reports/tr9/\n    //\n    var _symmetricSwap = function(charArray, levels, params) {\n      if (params.hiLevel !== 0 && _isSymmetricSwapping) {\n        for (var i = 0, index; i < charArray.length; i++) {\n          if (levels[i] === 1) {\n            index = _SWAP_TABLE.indexOf(charArray[i]);\n            if (index >= 0) {\n              charArray[i] = _SWAP_TABLE[index + 1];\n            }\n          }\n        }\n      }\n    };\n\n    var _reorder = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\"),\n        params = { hiLevel: _dir };\n\n      if (!levels) {\n        levels = [];\n      }\n      _computeLevels(charArray, levels, params);\n      _symmetricSwap(charArray, levels, params);\n      _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);\n      _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);\n      return charArray.join(\"\");\n    };\n\n    // doBidiReorder( text, sourceToTargetMap, levels )\n    // Performs Bidi reordering by implementing Unicode Bidi algorithm.\n    // Returns reordered string\n    // @text [String]:\n    // - input string to be reordered, this is input parameter\n    // $sourceToTargetMap [Array] (optional)\n    // - resultant mapping between input and output strings, this is output parameter\n    // $levels [Array] (optional)\n    // - array of calculated Bidi levels, , this is output parameter\n    this.__bidiEngine__.doBidiReorder = function(\n      text,\n      sourceToTargetMap,\n      levels\n    ) {\n      _init(text, sourceToTargetMap);\n      if (!_isInVisual && _isOutVisual && !_isOutRtl) {\n        // LLTR->VLTR, LRTL->VLTR\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VRTL->VLTR, VLTR->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _invertString(text, sourceToTargetMap, levels);\n      } else if (!_isInVisual && _isOutVisual && _isOutRtl) {\n        // LLTR->VRTL, LRTL->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {\n        // VLTR->LLTR\n        _dir = DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VLTR->LRTL, VRTL->LLTR\n        text = _invertString(text, sourceToTargetMap);\n        if (_isInRtl) {\n          //LLTR -> VLTR\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n        } else {\n          //LRTL -> VRTL\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n        }\n      } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {\n        //  VRTL->LRTL\n        _dir = DIR_RTL;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // LRTL->LLTR, LLTR->LRTL\n        var isSymmetricSwappingOrig = _isSymmetricSwapping;\n        if (_isInRtl) {\n          //LRTL->LLTR\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _dir = DIR_LTR;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n        } else {\n          //LLTR->LRTL\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n          _dir = DIR_RTL;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n          text = _invertString(text, sourceToTargetMap);\n        }\n      }\n      return text;\n    };\n\n    /**\n     * @name setOptions( options )\n     * @function\n     * Sets options for Bidi conversion\n     * @param {Object}:\n     * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)\n     * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)\n     * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),\n     */\n    this.__bidiEngine__.setOptions = function(options) {\n      if (options) {\n        _isInVisual = options.isInputVisual;\n        _isOutVisual = options.isOutputVisual;\n        _isInRtl = options.isInputRtl;\n        _isOutRtl = options.isOutputRtl;\n        _isSymmetricSwapping = options.isSymmetricSwapping;\n      }\n    };\n\n    this.__bidiEngine__.setOptions(options);\n    return this.__bidiEngine__;\n  };\n\n  var _bidiUnicodeTypes = bidiUnicodeTypes;\n\n  var bidiEngine = new jsPDF.__bidiEngine__({ isInputVisual: true });\n\n  var bidiEngineFunction = function(args) {\n    var text = args.text;\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n    var lang = options.lang;\n    var tmpText = [];\n\n    options.isInputVisual =\n      typeof options.isInputVisual === \"boolean\" ? options.isInputVisual : true;\n    bidiEngine.setOptions(options);\n\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Object.prototype.toString.call(text[i]) === \"[object Array]\") {\n          tmpText.push([\n            bidiEngine.doBidiReorder(text[i][0]),\n            text[i][1],\n            text[i][2]\n          ]);\n        } else {\n          tmpText.push([bidiEngine.doBidiReorder(text[i])]);\n        }\n      }\n      args.text = tmpText;\n    } else {\n      args.text = bidiEngine.doBidiReorder(text);\n    }\n    bidiEngine.setOptions({ isInputVisual: true });\n  };\n\n  jsPDF.API.events.push([\"postProcessText\", bidiEngineFunction]);\n})(jsPDF);\n","/* eslint-disable no-control-regex */\n/************************************************\n * Title : custom font                          *\n * Start Data : 2017. 01. 22.                   *\n * Comment : TEXT API                           *\n ************************************************/\n\n/******************************\n * jsPDF extension API Design *\n * ****************************/\n\nimport { jsPDF } from \"../jspdf.js\";\n\njsPDF.API.TTFFont = (function() {\n  /************************************************************************/\n  /* function : open                                                       */\n  /* comment : Decode the encoded ttf content and create a TTFFont object. */\n  /************************************************************************/\n  TTFFont.open = function(file) {\n    return new TTFFont(file);\n  };\n  /***************************************************************/\n  /* function : TTFFont gernerator                               */\n  /* comment : Decode TTF contents are parsed, Data,             */\n  /* Subset object is created, and registerTTF function is called.*/\n  /***************************************************************/\n  function TTFFont(rawData) {\n    var data;\n    this.rawData = rawData;\n    data = this.contents = new Data(rawData);\n    this.contents.pos = 4;\n    if (data.readString(4) === \"ttcf\") {\n      throw new Error(\"TTCF not supported.\");\n    } else {\n      data.pos = 0;\n      this.parse();\n      this.subset = new Subset(this);\n      this.registerTTF();\n    }\n  }\n  /********************************************************/\n  /* function : parse                                     */\n  /* comment : TTF Parses the file contents by each table.*/\n  /********************************************************/\n  TTFFont.prototype.parse = function() {\n    this.directory = new Directory(this.contents);\n    this.head = new HeadTable(this);\n    this.name = new NameTable(this);\n    this.cmap = new CmapTable(this);\n    this.toUnicode = {};\n    this.hhea = new HheaTable(this);\n    this.maxp = new MaxpTable(this);\n    this.hmtx = new HmtxTable(this);\n    this.post = new PostTable(this);\n    this.os2 = new OS2Table(this);\n    this.loca = new LocaTable(this);\n    this.glyf = new GlyfTable(this);\n    this.ascender =\n      (this.os2.exists && this.os2.ascender) || this.hhea.ascender;\n    this.decender =\n      (this.os2.exists && this.os2.decender) || this.hhea.decender;\n    this.lineGap = (this.os2.exists && this.os2.lineGap) || this.hhea.lineGap;\n    return (this.bbox = [\n      this.head.xMin,\n      this.head.yMin,\n      this.head.xMax,\n      this.head.yMax\n    ]);\n  };\n  /***************************************************************/\n  /* function : registerTTF                                      */\n  /* comment : Get the value to assign pdf font descriptors.     */\n  /***************************************************************/\n  TTFFont.prototype.registerTTF = function() {\n    var e, hi, low, raw, _ref;\n    this.scaleFactor = 1000.0 / this.head.unitsPerEm;\n    this.bbox = function() {\n      var _i, _len, _ref, _results;\n      _ref = this.bbox;\n      _results = [];\n      for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n        e = _ref[_i];\n        _results.push(Math.round(e * this.scaleFactor));\n      }\n      return _results;\n    }.call(this);\n    this.stemV = 0;\n    if (this.post.exists) {\n      raw = this.post.italic_angle;\n      hi = raw >> 16;\n      low = raw & 0xff;\n      if ((hi & 0x8000) !== 0) {\n        hi = -((hi ^ 0xffff) + 1);\n      }\n      this.italicAngle = +(\"\" + hi + \".\" + low);\n    } else {\n      this.italicAngle = 0;\n    }\n    this.ascender = Math.round(this.ascender * this.scaleFactor);\n    this.decender = Math.round(this.decender * this.scaleFactor);\n    this.lineGap = Math.round(this.lineGap * this.scaleFactor);\n    this.capHeight = (this.os2.exists && this.os2.capHeight) || this.ascender;\n    this.xHeight = (this.os2.exists && this.os2.xHeight) || 0;\n    this.familyClass = ((this.os2.exists && this.os2.familyClass) || 0) >> 8;\n    this.isSerif =\n      (_ref = this.familyClass) === 1 ||\n      _ref === 2 ||\n      _ref === 3 ||\n      _ref === 4 ||\n      _ref === 5 ||\n      _ref === 7;\n    this.isScript = this.familyClass === 10;\n    this.flags = 0;\n    if (this.post.isFixedPitch) {\n      this.flags |= 1 << 0;\n    }\n    if (this.isSerif) {\n      this.flags |= 1 << 1;\n    }\n    if (this.isScript) {\n      this.flags |= 1 << 3;\n    }\n    if (this.italicAngle !== 0) {\n      this.flags |= 1 << 6;\n    }\n    this.flags |= 1 << 5;\n    if (!this.cmap.unicode) {\n      throw new Error(\"No unicode cmap for font\");\n    }\n  };\n  TTFFont.prototype.characterToGlyph = function(character) {\n    var _ref;\n    return (\n      ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) ||\n      0\n    );\n  };\n  TTFFont.prototype.widthOfGlyph = function(glyph) {\n    var scale;\n    scale = 1000.0 / this.head.unitsPerEm;\n    return this.hmtx.forGlyph(glyph).advance * scale;\n  };\n  TTFFont.prototype.widthOfString = function(string, size, charSpace) {\n    var charCode, i, scale, width, _ref;\n    string = \"\" + string;\n    width = 0;\n    for (\n      i = 0, _ref = string.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      charCode = string.charCodeAt(i);\n      width +=\n        this.widthOfGlyph(this.characterToGlyph(charCode)) +\n          charSpace * (1000 / size) || 0;\n    }\n    scale = size / 1000;\n    return width * scale;\n  };\n  TTFFont.prototype.lineHeight = function(size, includeGap) {\n    var gap;\n    if (includeGap == null) {\n      includeGap = false;\n    }\n    gap = includeGap ? this.lineGap : 0;\n    return ((this.ascender + gap - this.decender) / 1000) * size;\n  };\n  return TTFFont;\n})();\n\n/************************************************************************************************/\n/* function : Data                                                                              */\n/* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/\n/************************************************************************************************/\nvar Data = (function() {\n  function Data(data) {\n    this.data = data != null ? data : [];\n    this.pos = 0;\n    this.length = this.data.length;\n  }\n  Data.prototype.readByte = function() {\n    return this.data[this.pos++];\n  };\n  Data.prototype.writeByte = function(byte) {\n    return (this.data[this.pos++] = byte);\n  };\n  Data.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.readByte() * 0x1000000;\n    b2 = this.readByte() << 16;\n    b3 = this.readByte() << 8;\n    b4 = this.readByte();\n    return b1 + b2 + b3 + b4;\n  };\n  Data.prototype.writeUInt32 = function(val) {\n    this.writeByte((val >>> 24) & 0xff);\n    this.writeByte((val >> 16) & 0xff);\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt32 = function() {\n    var int;\n    int = this.readUInt32();\n    if (int >= 0x80000000) {\n      return int - 0x100000000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt32 = function(val) {\n    if (val < 0) {\n      val += 0x100000000;\n    }\n    return this.writeUInt32(val);\n  };\n  Data.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.readByte() << 8;\n    b2 = this.readByte();\n    return b1 | b2;\n  };\n  Data.prototype.writeUInt16 = function(val) {\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt16 = function() {\n    var int;\n    int = this.readUInt16();\n    if (int >= 0x8000) {\n      return int - 0x10000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt16 = function(val) {\n    if (val < 0) {\n      val += 0x10000;\n    }\n    return this.writeUInt16(val);\n  };\n  Data.prototype.readString = function(length) {\n    var i, ret;\n    ret = [];\n    for (\n      i = 0;\n      0 <= length ? i < length : i > length;\n      i = 0 <= length ? ++i : --i\n    ) {\n      ret[i] = String.fromCharCode(this.readByte());\n    }\n    return ret.join(\"\");\n  };\n  Data.prototype.writeString = function(val) {\n    var i, _ref, _results;\n    _results = [];\n    for (\n      i = 0, _ref = val.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      _results.push(this.writeByte(val.charCodeAt(i)));\n    }\n    return _results;\n  };\n  /*Data.prototype.stringAt = function (pos, length) {\n            this.pos = pos;\n            return this.readString(length);\n        };*/\n  Data.prototype.readShort = function() {\n    return this.readInt16();\n  };\n  Data.prototype.writeShort = function(val) {\n    return this.writeInt16(val);\n  };\n  Data.prototype.readLongLong = function() {\n    var b1, b2, b3, b4, b5, b6, b7, b8;\n    b1 = this.readByte();\n    b2 = this.readByte();\n    b3 = this.readByte();\n    b4 = this.readByte();\n    b5 = this.readByte();\n    b6 = this.readByte();\n    b7 = this.readByte();\n    b8 = this.readByte();\n    if (b1 & 0x80) {\n      return (\n        ((b1 ^ 0xff) * 0x100000000000000 +\n          (b2 ^ 0xff) * 0x1000000000000 +\n          (b3 ^ 0xff) * 0x10000000000 +\n          (b4 ^ 0xff) * 0x100000000 +\n          (b5 ^ 0xff) * 0x1000000 +\n          (b6 ^ 0xff) * 0x10000 +\n          (b7 ^ 0xff) * 0x100 +\n          (b8 ^ 0xff) +\n          1) *\n        -1\n      );\n    }\n    return (\n      b1 * 0x100000000000000 +\n      b2 * 0x1000000000000 +\n      b3 * 0x10000000000 +\n      b4 * 0x100000000 +\n      b5 * 0x1000000 +\n      b6 * 0x10000 +\n      b7 * 0x100 +\n      b8\n    );\n  };\n  Data.prototype.writeLongLong = function(val) {\n    var high, low;\n    high = Math.floor(val / 0x100000000);\n    low = val & 0xffffffff;\n    this.writeByte((high >> 24) & 0xff);\n    this.writeByte((high >> 16) & 0xff);\n    this.writeByte((high >> 8) & 0xff);\n    this.writeByte(high & 0xff);\n    this.writeByte((low >> 24) & 0xff);\n    this.writeByte((low >> 16) & 0xff);\n    this.writeByte((low >> 8) & 0xff);\n    return this.writeByte(low & 0xff);\n  };\n  Data.prototype.readInt = function() {\n    return this.readInt32();\n  };\n  Data.prototype.writeInt = function(val) {\n    return this.writeInt32(val);\n  };\n  /*Data.prototype.slice = function (start, end) {\n            return this.data.slice(start, end);\n        };*/\n  Data.prototype.read = function(bytes) {\n    var buf, i;\n    buf = [];\n    for (\n      i = 0;\n      0 <= bytes ? i < bytes : i > bytes;\n      i = 0 <= bytes ? ++i : --i\n    ) {\n      buf.push(this.readByte());\n    }\n    return buf;\n  };\n  Data.prototype.write = function(bytes) {\n    var byte, i, _len, _results;\n    _results = [];\n    for (i = 0, _len = bytes.length; i < _len; i++) {\n      byte = bytes[i];\n      _results.push(this.writeByte(byte));\n    }\n    return _results;\n  };\n  return Data;\n})();\n\nvar Directory = (function() {\n  var checksum;\n\n  /*****************************************************************************************************/\n  /* function : Directory generator                                                                    */\n  /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/\n  /*****************************************************************************************************/\n  function Directory(data) {\n    var entry, i, _ref;\n    this.scalarType = data.readInt();\n    this.tableCount = data.readShort();\n    this.searchRange = data.readShort();\n    this.entrySelector = data.readShort();\n    this.rangeShift = data.readShort();\n    this.tables = {};\n    for (\n      i = 0, _ref = this.tableCount;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      entry = {\n        tag: data.readString(4),\n        checksum: data.readInt(),\n        offset: data.readInt(),\n        length: data.readInt()\n      };\n      this.tables[entry.tag] = entry;\n    }\n  }\n  /********************************************************************************************************/\n  /* function : encode                                                                                    */\n  /* comment : It encodes and stores the font table object and information used for the directory object. */\n  /********************************************************************************************************/\n  Directory.prototype.encode = function(tables) {\n    var adjustment,\n      directory,\n      directoryLength,\n      entrySelector,\n      headOffset,\n      log2,\n      offset,\n      rangeShift,\n      searchRange,\n      sum,\n      table,\n      tableCount,\n      tableData,\n      tag;\n    tableCount = Object.keys(tables).length;\n    log2 = Math.log(2);\n    searchRange = Math.floor(Math.log(tableCount) / log2) * 16;\n    entrySelector = Math.floor(searchRange / log2);\n    rangeShift = tableCount * 16 - searchRange;\n    directory = new Data();\n    directory.writeInt(this.scalarType);\n    directory.writeShort(tableCount);\n    directory.writeShort(searchRange);\n    directory.writeShort(entrySelector);\n    directory.writeShort(rangeShift);\n    directoryLength = tableCount * 16;\n    offset = directory.pos + directoryLength;\n    headOffset = null;\n    tableData = [];\n    for (tag in tables) {\n      table = tables[tag];\n      directory.writeString(tag);\n      directory.writeInt(checksum(table));\n      directory.writeInt(offset);\n      directory.writeInt(table.length);\n      tableData = tableData.concat(table);\n      if (tag === \"head\") {\n        headOffset = offset;\n      }\n      offset += table.length;\n      while (offset % 4) {\n        tableData.push(0);\n        offset++;\n      }\n    }\n    directory.write(tableData);\n    sum = checksum(directory.data);\n    adjustment = 0xb1b0afba - sum;\n    directory.pos = headOffset + 8;\n    directory.writeUInt32(adjustment);\n    return directory.data;\n  };\n  /***************************************************************/\n  /* function : checksum                                         */\n  /* comment : Duplicate the table for the tag.                  */\n  /***************************************************************/\n  checksum = function(data) {\n    var i, sum, tmp, _ref;\n    data = __slice.call(data);\n    while (data.length % 4) {\n      data.push(0);\n    }\n    tmp = new Data(data);\n    sum = 0;\n    for (i = 0, _ref = data.length; i < _ref; i = i += 4) {\n      sum += tmp.readUInt32();\n    }\n    return sum & 0xffffffff;\n  };\n  return Directory;\n})();\n\nvar Table,\n  __hasProp = {}.hasOwnProperty,\n  __extends = function(child, parent) {\n    for (var key in parent) {\n      if (__hasProp.call(parent, key)) child[key] = parent[key];\n    }\n\n    function ctor() {\n      this.constructor = child;\n    }\n    ctor.prototype = parent.prototype;\n    child.prototype = new ctor();\n    child.__super__ = parent.prototype;\n    return child;\n  };\n\n/***************************************************************/\n/* function : Table                                            */\n/* comment : Save info for each table, and parse the table.    */\n/***************************************************************/\nTable = (function() {\n  function Table(file) {\n    var info;\n    this.file = file;\n    info = this.file.directory.tables[this.tag];\n    this.exists = !!info;\n    if (info) {\n      (this.offset = info.offset), (this.length = info.length);\n      this.parse(this.file.contents);\n    }\n  }\n  Table.prototype.parse = function() {};\n  Table.prototype.encode = function() {};\n  Table.prototype.raw = function() {\n    if (!this.exists) {\n      return null;\n    }\n    this.file.contents.pos = this.offset;\n    return this.file.contents.read(this.length);\n  };\n  return Table;\n})();\n\nvar HeadTable = (function(_super) {\n  __extends(HeadTable, _super);\n\n  function HeadTable() {\n    return HeadTable.__super__.constructor.apply(this, arguments);\n  }\n  HeadTable.prototype.tag = \"head\";\n  HeadTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.revision = data.readInt();\n    this.checkSumAdjustment = data.readInt();\n    this.magicNumber = data.readInt();\n    this.flags = data.readShort();\n    this.unitsPerEm = data.readShort();\n    this.created = data.readLongLong();\n    this.modified = data.readLongLong();\n    this.xMin = data.readShort();\n    this.yMin = data.readShort();\n    this.xMax = data.readShort();\n    this.yMax = data.readShort();\n    this.macStyle = data.readShort();\n    this.lowestRecPPEM = data.readShort();\n    this.fontDirectionHint = data.readShort();\n    this.indexToLocFormat = data.readShort();\n    return (this.glyphDataFormat = data.readShort());\n  };\n  HeadTable.prototype.encode = function(indexToLocFormat) {\n    var table;\n    table = new Data();\n    table.writeInt(this.version);\n    table.writeInt(this.revision);\n    table.writeInt(this.checkSumAdjustment);\n    table.writeInt(this.magicNumber);\n    table.writeShort(this.flags);\n    table.writeShort(this.unitsPerEm);\n    table.writeLongLong(this.created);\n    table.writeLongLong(this.modified);\n    table.writeShort(this.xMin);\n    table.writeShort(this.yMin);\n    table.writeShort(this.xMax);\n    table.writeShort(this.yMax);\n    table.writeShort(this.macStyle);\n    table.writeShort(this.lowestRecPPEM);\n    table.writeShort(this.fontDirectionHint);\n    table.writeShort(indexToLocFormat);\n    table.writeShort(this.glyphDataFormat);\n    return table.data;\n  };\n  return HeadTable;\n})(Table);\n\n/************************************************************************************/\n/* function : CmapEntry                                                             */\n/* comment : Cmap Initializes and encodes object information (required by pdf spec).*/\n/************************************************************************************/\nvar CmapEntry = (function() {\n  function CmapEntry(data, offset) {\n    var code,\n      count,\n      endCode,\n      glyphId,\n      glyphIds,\n      i,\n      idDelta,\n      idRangeOffset,\n      index,\n      saveOffset,\n      segCount,\n      segCountX2,\n      start,\n      startCode,\n      tail,\n      _j,\n      _k,\n      _len;\n    this.platformID = data.readUInt16();\n    this.encodingID = data.readShort();\n    this.offset = offset + data.readInt();\n    saveOffset = data.pos;\n    data.pos = this.offset;\n    this.format = data.readUInt16();\n    this.length = data.readUInt16();\n    this.language = data.readUInt16();\n    this.isUnicode =\n      (this.platformID === 3 && this.encodingID === 1 && this.format === 4) ||\n      (this.platformID === 0 && this.format === 4);\n    this.codeMap = {};\n    switch (this.format) {\n      case 0:\n        for (i = 0; i < 256; ++i) {\n          this.codeMap[i] = data.readByte();\n        }\n        break;\n      case 4:\n        segCountX2 = data.readUInt16();\n        segCount = segCountX2 / 2;\n        data.pos += 6;\n        endCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        data.pos += 2;\n        startCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idDelta = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idRangeOffset = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        count = (this.length - data.pos + this.offset) / 2;\n        glyphIds = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= count ? _j < count : _j > count;\n            i = 0 <= count ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {\n          tail = endCode[i];\n          start = startCode[i];\n          for (\n            code = _k = start;\n            start <= tail ? _k <= tail : _k >= tail;\n            code = start <= tail ? ++_k : --_k\n          ) {\n            if (idRangeOffset[i] === 0) {\n              glyphId = code + idDelta[i];\n            } else {\n              index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);\n              glyphId = glyphIds[index] || 0;\n              if (glyphId !== 0) {\n                glyphId += idDelta[i];\n              }\n            }\n            this.codeMap[code] = glyphId & 0xffff;\n          }\n        }\n    }\n    data.pos = saveOffset;\n  }\n  CmapEntry.encode = function(charmap, encoding) {\n    var charMap,\n      code,\n      codeMap,\n      codes,\n      delta,\n      deltas,\n      diff,\n      endCode,\n      endCodes,\n      entrySelector,\n      glyphIDs,\n      i,\n      id,\n      indexes,\n      last,\n      map,\n      nextID,\n      offset,\n      old,\n      rangeOffsets,\n      rangeShift,\n      searchRange,\n      segCount,\n      segCountX2,\n      startCode,\n      startCodes,\n      startGlyph,\n      subtable,\n      _i,\n      _j,\n      _k,\n      _l,\n      _len,\n      _len1,\n      _len2,\n      _len3,\n      _len4,\n      _len5,\n      _len6,\n      _len7,\n      _m,\n      _n,\n      _name,\n      _o,\n      _p,\n      _q;\n    subtable = new Data();\n    codes = Object.keys(charmap).sort(function(a, b) {\n      return a - b;\n    });\n    switch (encoding) {\n      case \"macroman\":\n        id = 0;\n        indexes = (function() {\n          var _results = [];\n          for (i = 0; i < 256; ++i) {\n            _results.push(0);\n          }\n          return _results;\n        })();\n        map = {\n          0: 0\n        };\n        codeMap = {};\n        for (_i = 0, _len = codes.length; _i < _len; _i++) {\n          code = codes[_i];\n          if (map[(_name = charmap[code])] == null) {\n            map[_name] = ++id;\n          }\n          codeMap[code] = {\n            old: charmap[code],\n            new: map[charmap[code]]\n          };\n          indexes[code] = map[charmap[code]];\n        }\n        subtable.writeUInt16(1);\n        subtable.writeUInt16(0);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(262);\n        subtable.writeUInt16(0);\n        subtable.write(indexes);\n        return {\n          charMap: codeMap,\n          subtable: subtable.data,\n          maxGlyphID: id + 1\n        };\n      case \"unicode\":\n        startCodes = [];\n        endCodes = [];\n        nextID = 0;\n        map = {};\n        charMap = {};\n        last = diff = null;\n        for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {\n          code = codes[_j];\n          old = charmap[code];\n          if (map[old] == null) {\n            map[old] = ++nextID;\n          }\n          charMap[code] = {\n            old: old,\n            new: map[old]\n          };\n          delta = map[old] - code;\n          if (last == null || delta !== diff) {\n            if (last) {\n              endCodes.push(last);\n            }\n            startCodes.push(code);\n            diff = delta;\n          }\n          last = code;\n        }\n        if (last) {\n          endCodes.push(last);\n        }\n        endCodes.push(0xffff);\n        startCodes.push(0xffff);\n        segCount = startCodes.length;\n        segCountX2 = segCount * 2;\n        searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);\n        entrySelector = Math.log(searchRange / 2) / Math.LN2;\n        rangeShift = 2 * segCount - searchRange;\n        deltas = [];\n        rangeOffsets = [];\n        glyphIDs = [];\n        for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {\n          startCode = startCodes[i];\n          endCode = endCodes[i];\n          if (startCode === 0xffff) {\n            deltas.push(0);\n            rangeOffsets.push(0);\n            break;\n          }\n          startGlyph = charMap[startCode][\"new\"];\n          if (startCode - startGlyph >= 0x8000) {\n            deltas.push(0);\n            rangeOffsets.push(2 * (glyphIDs.length + segCount - i));\n            for (\n              code = _l = startCode;\n              startCode <= endCode ? _l <= endCode : _l >= endCode;\n              code = startCode <= endCode ? ++_l : --_l\n            ) {\n              glyphIDs.push(charMap[code][\"new\"]);\n            }\n          } else {\n            deltas.push(startGlyph - startCode);\n            rangeOffsets.push(0);\n          }\n        }\n        subtable.writeUInt16(3);\n        subtable.writeUInt16(1);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(4);\n        subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(segCountX2);\n        subtable.writeUInt16(searchRange);\n        subtable.writeUInt16(entrySelector);\n        subtable.writeUInt16(rangeShift);\n        for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {\n          code = endCodes[_m];\n          subtable.writeUInt16(code);\n        }\n        subtable.writeUInt16(0);\n        for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {\n          code = startCodes[_n];\n          subtable.writeUInt16(code);\n        }\n        for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {\n          delta = deltas[_o];\n          subtable.writeUInt16(delta);\n        }\n        for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {\n          offset = rangeOffsets[_p];\n          subtable.writeUInt16(offset);\n        }\n        for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {\n          id = glyphIDs[_q];\n          subtable.writeUInt16(id);\n        }\n        return {\n          charMap: charMap,\n          subtable: subtable.data,\n          maxGlyphID: nextID + 1\n        };\n    }\n  };\n  return CmapEntry;\n})();\n\nvar CmapTable = (function(_super) {\n  __extends(CmapTable, _super);\n\n  function CmapTable() {\n    return CmapTable.__super__.constructor.apply(this, arguments);\n  }\n  CmapTable.prototype.tag = \"cmap\";\n  CmapTable.prototype.parse = function(data) {\n    var entry, i, tableCount;\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    tableCount = data.readUInt16();\n    this.tables = [];\n    this.unicode = null;\n    for (\n      i = 0;\n      0 <= tableCount ? i < tableCount : i > tableCount;\n      i = 0 <= tableCount ? ++i : --i\n    ) {\n      entry = new CmapEntry(data, this.offset);\n      this.tables.push(entry);\n      if (entry.isUnicode) {\n        if (this.unicode == null) {\n          this.unicode = entry;\n        }\n      }\n    }\n    return true;\n  };\n  /*************************************************************************/\n  /* function : encode                                                     */\n  /* comment : Encode the cmap table corresponding to the input character. */\n  /*************************************************************************/\n  CmapTable.encode = function(charmap, encoding) {\n    var result, table;\n    if (encoding == null) {\n      encoding = \"macroman\";\n    }\n    result = CmapEntry.encode(charmap, encoding);\n    table = new Data();\n    table.writeUInt16(0);\n    table.writeUInt16(1);\n    result.table = table.data.concat(result.subtable);\n    return result;\n  };\n  return CmapTable;\n})(Table);\n\nvar HheaTable = (function(_super) {\n  __extends(HheaTable, _super);\n\n  function HheaTable() {\n    return HheaTable.__super__.constructor.apply(this, arguments);\n  }\n  HheaTable.prototype.tag = \"hhea\";\n  HheaTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.ascender = data.readShort();\n    this.decender = data.readShort();\n    this.lineGap = data.readShort();\n    this.advanceWidthMax = data.readShort();\n    this.minLeftSideBearing = data.readShort();\n    this.minRightSideBearing = data.readShort();\n    this.xMaxExtent = data.readShort();\n    this.caretSlopeRise = data.readShort();\n    this.caretSlopeRun = data.readShort();\n    this.caretOffset = data.readShort();\n    data.pos += 4 * 2;\n    this.metricDataFormat = data.readShort();\n    return (this.numberOfMetrics = data.readUInt16());\n  };\n  /*HheaTable.prototype.encode = function (ids) {\n            var i, table, _i, _ref;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeShort(this.ascender);\n            table.writeShort(this.decender);\n            table.writeShort(this.lineGap);\n            table.writeShort(this.advanceWidthMax);\n            table.writeShort(this.minLeftSideBearing);\n            table.writeShort(this.minRightSideBearing);\n            table.writeShort(this.xMaxExtent);\n            table.writeShort(this.caretSlopeRise);\n            table.writeShort(this.caretSlopeRun);\n            table.writeShort(this.caretOffset);\n            for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                table.writeByte(0);\n            }\n            table.writeShort(this.metricDataFormat);\n            table.writeUInt16(ids.length);\n            return table.data;\n        };*/\n  return HheaTable;\n})(Table);\n\nvar OS2Table = (function(_super) {\n  __extends(OS2Table, _super);\n\n  function OS2Table() {\n    return OS2Table.__super__.constructor.apply(this, arguments);\n  }\n  OS2Table.prototype.tag = \"OS/2\";\n  OS2Table.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    this.averageCharWidth = data.readShort();\n    this.weightClass = data.readUInt16();\n    this.widthClass = data.readUInt16();\n    this.type = data.readShort();\n    this.ySubscriptXSize = data.readShort();\n    this.ySubscriptYSize = data.readShort();\n    this.ySubscriptXOffset = data.readShort();\n    this.ySubscriptYOffset = data.readShort();\n    this.ySuperscriptXSize = data.readShort();\n    this.ySuperscriptYSize = data.readShort();\n    this.ySuperscriptXOffset = data.readShort();\n    this.ySuperscriptYOffset = data.readShort();\n    this.yStrikeoutSize = data.readShort();\n    this.yStrikeoutPosition = data.readShort();\n    this.familyClass = data.readShort();\n    this.panose = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 10; ++i) {\n        _results.push(data.readByte());\n      }\n      return _results;\n    })();\n    this.charRange = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 4; ++i) {\n        _results.push(data.readInt());\n      }\n      return _results;\n    })();\n    this.vendorID = data.readString(4);\n    this.selection = data.readShort();\n    this.firstCharIndex = data.readShort();\n    this.lastCharIndex = data.readShort();\n    if (this.version > 0) {\n      this.ascent = data.readShort();\n      this.descent = data.readShort();\n      this.lineGap = data.readShort();\n      this.winAscent = data.readShort();\n      this.winDescent = data.readShort();\n      this.codePageRange = (function() {\n        var i, _results;\n        _results = [];\n        for (i = 0; i < 2; i = ++i) {\n          _results.push(data.readInt());\n        }\n        return _results;\n      })();\n      if (this.version > 1) {\n        this.xHeight = data.readShort();\n        this.capHeight = data.readShort();\n        this.defaultChar = data.readShort();\n        this.breakChar = data.readShort();\n        return (this.maxContext = data.readShort());\n      }\n    }\n  };\n  /*OS2Table.prototype.encode = function () {\n            return this.raw();\n        };*/\n  return OS2Table;\n})(Table);\n\nvar PostTable = (function(_super) {\n  var POSTSCRIPT_GLYPHS;\n  __extends(PostTable, _super);\n\n  function PostTable() {\n    return PostTable.__super__.constructor.apply(this, arguments);\n  }\n  PostTable.prototype.tag = \"post\";\n  PostTable.prototype.parse = function(data) {\n    var length, numberOfGlyphs, _results;\n    data.pos = this.offset;\n    this.format = data.readInt();\n    this.italicAngle = data.readInt();\n    this.underlinePosition = data.readShort();\n    this.underlineThickness = data.readShort();\n    this.isFixedPitch = data.readInt();\n    this.minMemType42 = data.readInt();\n    this.maxMemType42 = data.readInt();\n    this.minMemType1 = data.readInt();\n    this.maxMemType1 = data.readInt();\n    switch (this.format) {\n      case 0x00010000:\n        break;\n      case 0x00020000:\n        numberOfGlyphs = data.readUInt16();\n        this.glyphNameIndex = [];\n        var i;\n        for (\n          i = 0;\n          0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs;\n          i = 0 <= numberOfGlyphs ? ++i : --i\n        ) {\n          this.glyphNameIndex.push(data.readUInt16());\n        }\n        this.names = [];\n        _results = [];\n        while (data.pos < this.offset + this.length) {\n          length = data.readByte();\n          _results.push(this.names.push(data.readString(length)));\n        }\n        return _results;\n      case 0x00025000:\n        numberOfGlyphs = data.readUInt16();\n        return (this.offsets = data.read(numberOfGlyphs));\n      case 0x00030000:\n        break;\n      case 0x00040000:\n        return (this.map = function() {\n          var _j, _ref, _results1;\n          _results1 = [];\n          for (\n            i = _j = 0, _ref = this.file.maxp.numGlyphs;\n            0 <= _ref ? _j < _ref : _j > _ref;\n            i = 0 <= _ref ? ++_j : --_j\n          ) {\n            _results1.push(data.readUInt32());\n          }\n          return _results1;\n        }.call(this));\n    }\n  };\n  /*PostTable.prototype.glyphFor = function (code) {\n            var index;\n            switch (this.format) {\n            case 0x00010000:\n                return POSTSCRIPT_GLYPHS[code] || '.notdef';\n            case 0x00020000:\n                index = this.glyphNameIndex[code];\n                if (index <= 257) {\n                    return POSTSCRIPT_GLYPHS[index];\n                }\n                else {\n                    return this.names[index - 258] || '.notdef';\n                }\n                break;\n            case 0x00025000:\n                return POSTSCRIPT_GLYPHS[code + this.offsets[code]] || '.notdef';\n            case 0x00030000:\n                return '.notdef';\n            case 0x00040000:\n                return this.map[code] || 0xFFFF;\n            }\n        };*/\n  /*PostTable.prototype.encode = function (mapping) {\n            var id, index, indexes, position, post, raw, string, strings, table, _i, _j, _k, _len, _len1, _len2;\n            if (!this.exists) {\n                return null;\n            }\n            raw = this.raw();\n            if (this.format === 0x00030000) {\n                return raw;\n            }\n            table = new Data(raw.slice(0, 32));\n            table.writeUInt32(0x00020000);\n            table.pos = 32;\n            indexes = [];\n            strings = [];\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                post = this.glyphFor(id);\n                position = POSTSCRIPT_GLYPHS.indexOf(post);\n                if (position !== -1) {\n                    indexes.push(position);\n                }\n                else {\n                    indexes.push(257 + strings.length);\n                    strings.push(post);\n                }\n            }\n            table.writeUInt16(Object.keys(mapping).length);\n            for (_j = 0, _len1 = indexes.length; _j < _len1; _j++) {\n                index = indexes[_j];\n                table.writeUInt16(index);\n            }\n            for (_k = 0, _len2 = strings.length; _k < _len2; _k++) {\n                string = strings[_k];\n                table.writeByte(string.length);\n                table.writeString(string);\n            }\n            return table.data;\n        };*/\n  POSTSCRIPT_GLYPHS = \".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\\nzero one two three four five six seven eight nine colon semicolon less equal greater\\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\\nbracketleft backslash bracketright asciicircum underscore grave\\na b c d e f g h i j k l m n o p q r s t u v w x y z\\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\\nsterling section bullet paragraph germandbls registered copyright trademark acute\\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\\nCacute cacute Ccaron ccaron dcroat\".split(\n    /\\s+/g\n  );\n  return PostTable;\n})(Table);\n\n/*********************************************************************************************************/\n/* function : NameEntry                                                                                  */\n/* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/\n/*********************************************************************************************************/\nvar NameEntry = (function() {\n  function NameEntry(raw, entry) {\n    this.raw = raw;\n    this.length = raw.length;\n    this.platformID = entry.platformID;\n    this.encodingID = entry.encodingID;\n    this.languageID = entry.languageID;\n  }\n  return NameEntry;\n})();\n\nvar NameTable = (function(_super) {\n  var subsetTag;\n  __extends(NameTable, _super);\n\n  function NameTable() {\n    return NameTable.__super__.constructor.apply(this, arguments);\n  }\n  NameTable.prototype.tag = \"name\";\n  NameTable.prototype.parse = function(data) {\n    var count,\n      entries,\n      entry,\n      i,\n      name,\n      stringOffset,\n      strings,\n      text,\n      _j,\n      _len,\n      _name;\n    data.pos = this.offset;\n    data.readShort(); //format\n    count = data.readShort();\n    stringOffset = data.readShort();\n    entries = [];\n    for (\n      i = 0;\n      0 <= count ? i < count : i > count;\n      i = 0 <= count ? ++i : --i\n    ) {\n      entries.push({\n        platformID: data.readShort(),\n        encodingID: data.readShort(),\n        languageID: data.readShort(),\n        nameID: data.readShort(),\n        length: data.readShort(),\n        offset: this.offset + stringOffset + data.readShort()\n      });\n    }\n    strings = {};\n    for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {\n      entry = entries[i];\n      data.pos = entry.offset;\n      text = data.readString(entry.length);\n      name = new NameEntry(text, entry);\n      if (strings[(_name = entry.nameID)] == null) {\n        strings[_name] = [];\n      }\n      strings[entry.nameID].push(name);\n    }\n    this.strings = strings;\n    this.copyright = strings[0];\n    this.fontFamily = strings[1];\n    this.fontSubfamily = strings[2];\n    this.uniqueSubfamily = strings[3];\n    this.fontName = strings[4];\n    this.version = strings[5];\n    try {\n      this.postscriptName = strings[6][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    } catch (e) {\n      this.postscriptName = strings[4][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    }\n    this.trademark = strings[7];\n    this.manufacturer = strings[8];\n    this.designer = strings[9];\n    this.description = strings[10];\n    this.vendorUrl = strings[11];\n    this.designerUrl = strings[12];\n    this.license = strings[13];\n    this.licenseUrl = strings[14];\n    this.preferredFamily = strings[15];\n    this.preferredSubfamily = strings[17];\n    this.compatibleFull = strings[18];\n    return (this.sampleText = strings[19]);\n  };\n  subsetTag = \"AAAAAA\";\n  /*NameTable.prototype.encode = function () {\n            var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;\n            strings = {};\n            _ref = this.strings;\n            for (id in _ref) {\n                val = _ref[id];\n                strings[id] = val;\n            }\n            postscriptName = new NameEntry(\"\" + subsetTag + \"+\" + this.postscriptName, {\n                platformID: 1\n                , encodingID: 0\n                , languageID: 0\n            });\n            strings[6] = [postscriptName];\n            subsetTag = successorOf(subsetTag);\n            strCount = 0;\n            for (id in strings) {\n                list = strings[id];\n                if (list != null) {\n                    strCount += list.length;\n                }\n            }\n            table = new Data;\n            strTable = new Data;\n            table.writeShort(0);\n            table.writeShort(strCount);\n            table.writeShort(6 + 12 * strCount);\n            for (nameID in strings) {\n                list = strings[nameID];\n                if (list != null) {\n                    for (_i = 0, _len = list.length; _i < _len; _i++) {\n                        string = list[_i];\n                        table.writeShort(string.platformID);\n                        table.writeShort(string.encodingID);\n                        table.writeShort(string.languageID);\n                        table.writeShort(nameID);\n                        table.writeShort(string.length);\n                        table.writeShort(strTable.pos);\n                        strTable.writeString(string.raw);\n                    }\n                }\n            }\n            return nameTable = {\n                postscriptName: postscriptName.raw\n                , table: table.data.concat(strTable.data)\n            };\n        };*/\n  return NameTable;\n})(Table);\n\nvar MaxpTable = (function(_super) {\n  __extends(MaxpTable, _super);\n\n  function MaxpTable() {\n    return MaxpTable.__super__.constructor.apply(this, arguments);\n  }\n  MaxpTable.prototype.tag = \"maxp\";\n  MaxpTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.numGlyphs = data.readUInt16();\n    this.maxPoints = data.readUInt16();\n    this.maxContours = data.readUInt16();\n    this.maxCompositePoints = data.readUInt16();\n    this.maxComponentContours = data.readUInt16();\n    this.maxZones = data.readUInt16();\n    this.maxTwilightPoints = data.readUInt16();\n    this.maxStorage = data.readUInt16();\n    this.maxFunctionDefs = data.readUInt16();\n    this.maxInstructionDefs = data.readUInt16();\n    this.maxStackElements = data.readUInt16();\n    this.maxSizeOfInstructions = data.readUInt16();\n    this.maxComponentElements = data.readUInt16();\n    return (this.maxComponentDepth = data.readUInt16());\n  };\n  /*MaxpTable.prototype.encode = function (ids) {\n            var table;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeUInt16(ids.length);\n            table.writeUInt16(this.maxPoints);\n            table.writeUInt16(this.maxContours);\n            table.writeUInt16(this.maxCompositePoints);\n            table.writeUInt16(this.maxComponentContours);\n            table.writeUInt16(this.maxZones);\n            table.writeUInt16(this.maxTwilightPoints);\n            table.writeUInt16(this.maxStorage);\n            table.writeUInt16(this.maxFunctionDefs);\n            table.writeUInt16(this.maxInstructionDefs);\n            table.writeUInt16(this.maxStackElements);\n            table.writeUInt16(this.maxSizeOfInstructions);\n            table.writeUInt16(this.maxComponentElements);\n            table.writeUInt16(this.maxComponentDepth);\n            return table.data;\n        };*/\n  return MaxpTable;\n})(Table);\n\nvar HmtxTable = (function(_super) {\n  __extends(HmtxTable, _super);\n\n  function HmtxTable() {\n    return HmtxTable.__super__.constructor.apply(this, arguments);\n  }\n  HmtxTable.prototype.tag = \"hmtx\";\n  HmtxTable.prototype.parse = function(data) {\n    var i, last, lsbCount, m, _j, _ref, _results;\n    data.pos = this.offset;\n    this.metrics = [];\n    for (\n      i = 0, _ref = this.file.hhea.numberOfMetrics;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      this.metrics.push({\n        advance: data.readUInt16(),\n        lsb: data.readInt16()\n      });\n    }\n    lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;\n    this.leftSideBearings = (function() {\n      var _j, _results;\n      _results = [];\n      for (\n        i = _j = 0;\n        0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n        i = 0 <= lsbCount ? ++_j : --_j\n      ) {\n        _results.push(data.readInt16());\n      }\n      return _results;\n    })();\n    this.widths = function() {\n      var _j, _len, _ref1, _results;\n      _ref1 = this.metrics;\n      _results = [];\n      for (_j = 0, _len = _ref1.length; _j < _len; _j++) {\n        m = _ref1[_j];\n        _results.push(m.advance);\n      }\n      return _results;\n    }.call(this);\n    last = this.widths[this.widths.length - 1];\n    _results = [];\n    for (\n      i = _j = 0;\n      0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n      i = 0 <= lsbCount ? ++_j : --_j\n    ) {\n      _results.push(this.widths.push(last));\n    }\n    return _results;\n  };\n  /***************************************************************/\n  /* function : forGlyph                                         */\n  /* comment : Returns the advance width and lsb for this glyph. */\n  /***************************************************************/\n  HmtxTable.prototype.forGlyph = function(id) {\n    if (id in this.metrics) {\n      return this.metrics[id];\n    }\n    return {\n      advance: this.metrics[this.metrics.length - 1].advance,\n      lsb: this.leftSideBearings[id - this.metrics.length]\n    };\n  };\n  /*HmtxTable.prototype.encode = function (mapping) {\n            var id, metric, table, _i, _len;\n            table = new Data;\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                metric = this.forGlyph(id);\n                table.writeUInt16(metric.advance);\n                table.writeUInt16(metric.lsb);\n            }\n            return table.data;\n        };*/\n  return HmtxTable;\n})(Table);\n\nvar __slice = [].slice;\n\nvar GlyfTable = (function(_super) {\n  __extends(GlyfTable, _super);\n\n  function GlyfTable() {\n    return GlyfTable.__super__.constructor.apply(this, arguments);\n  }\n  GlyfTable.prototype.tag = \"glyf\";\n  GlyfTable.prototype.parse = function() {\n    return (this.cache = {});\n  };\n  GlyfTable.prototype.glyphFor = function(id) {\n    var data,\n      index,\n      length,\n      loca,\n      numberOfContours,\n      raw,\n      xMax,\n      xMin,\n      yMax,\n      yMin;\n    if (id in this.cache) {\n      return this.cache[id];\n    }\n    loca = this.file.loca;\n    data = this.file.contents;\n    index = loca.indexOf(id);\n    length = loca.lengthOf(id);\n    if (length === 0) {\n      return (this.cache[id] = null);\n    }\n    data.pos = this.offset + index;\n    raw = new Data(data.read(length));\n    numberOfContours = raw.readShort();\n    xMin = raw.readShort();\n    yMin = raw.readShort();\n    xMax = raw.readShort();\n    yMax = raw.readShort();\n    if (numberOfContours === -1) {\n      this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);\n    } else {\n      this.cache[id] = new SimpleGlyph(\n        raw,\n        numberOfContours,\n        xMin,\n        yMin,\n        xMax,\n        yMax\n      );\n    }\n    return this.cache[id];\n  };\n  GlyfTable.prototype.encode = function(glyphs, mapping, old2new) {\n    var glyph, id, offsets, table, _i, _len;\n    table = [];\n    offsets = [];\n    for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n      id = mapping[_i];\n      glyph = glyphs[id];\n      offsets.push(table.length);\n      if (glyph) {\n        table = table.concat(glyph.encode(old2new));\n      }\n    }\n    offsets.push(table.length);\n    return {\n      table: table,\n      offsets: offsets\n    };\n  };\n  return GlyfTable;\n})(Table);\n\nvar SimpleGlyph = (function() {\n  /**************************************************************************/\n  /* function : SimpleGlyph                                                 */\n  /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/\n  /**************************************************************************/\n  function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {\n    this.raw = raw;\n    this.numberOfContours = numberOfContours;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = false;\n  }\n  SimpleGlyph.prototype.encode = function() {\n    return this.raw.data;\n  };\n  return SimpleGlyph;\n})();\n\nvar CompoundGlyph = (function() {\n  var ARG_1_AND_2_ARE_WORDS,\n    MORE_COMPONENTS,\n    WE_HAVE_AN_X_AND_Y_SCALE,\n    WE_HAVE_A_SCALE,\n    WE_HAVE_A_TWO_BY_TWO,\n    WE_HAVE_INSTRUCTIONS;\n  ARG_1_AND_2_ARE_WORDS = 0x0001;\n  WE_HAVE_A_SCALE = 0x0008;\n  MORE_COMPONENTS = 0x0020;\n  WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;\n  WE_HAVE_A_TWO_BY_TWO = 0x0080;\n  WE_HAVE_INSTRUCTIONS = 0x0100;\n\n  /********************************************************************************************************************/\n  /* function : CompoundGlypg generator                                                                               */\n  /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/\n  /********************************************************************************************************************/\n  function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {\n    var data, flags;\n    this.raw = raw;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = true;\n    this.glyphIDs = [];\n    this.glyphOffsets = [];\n    data = this.raw;\n    while (true) {\n      flags = data.readShort();\n      this.glyphOffsets.push(data.pos);\n      this.glyphIDs.push(data.readUInt16());\n      if (!(flags & MORE_COMPONENTS)) {\n        break;\n      }\n      if (flags & ARG_1_AND_2_ARE_WORDS) {\n        data.pos += 4;\n      } else {\n        data.pos += 2;\n      }\n      if (flags & WE_HAVE_A_TWO_BY_TWO) {\n        data.pos += 8;\n      } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n        data.pos += 4;\n      } else if (flags & WE_HAVE_A_SCALE) {\n        data.pos += 2;\n      }\n    }\n  }\n  /****************************************************************************************************************/\n  /* function : CompoundGlypg encode                                                                              */\n  /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/\n  /****************************************************************************************************************/\n  CompoundGlyph.prototype.encode = function() {\n    var i, result, _len, _ref;\n    result = new Data(__slice.call(this.raw.data));\n    _ref = this.glyphIDs;\n    for (i = 0, _len = _ref.length; i < _len; ++i) {\n      result.pos = this.glyphOffsets[i];\n    }\n    return result.data;\n  };\n  return CompoundGlyph;\n})();\n\nvar LocaTable = (function(_super) {\n  __extends(LocaTable, _super);\n\n  function LocaTable() {\n    return LocaTable.__super__.constructor.apply(this, arguments);\n  }\n  LocaTable.prototype.tag = \"loca\";\n  LocaTable.prototype.parse = function(data) {\n    var format, i;\n    data.pos = this.offset;\n    format = this.file.head.indexToLocFormat;\n    if (format === 0) {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 2) {\n          _results.push(data.readUInt16() * 2);\n        }\n        return _results;\n      }.call(this));\n    } else {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 4) {\n          _results.push(data.readUInt32());\n        }\n        return _results;\n      }.call(this));\n    }\n  };\n  LocaTable.prototype.indexOf = function(id) {\n    return this.offsets[id];\n  };\n  LocaTable.prototype.lengthOf = function(id) {\n    return this.offsets[id + 1] - this.offsets[id];\n  };\n  LocaTable.prototype.encode = function(offsets, activeGlyphs) {\n    var LocaTable = new Uint32Array(this.offsets.length);\n    var glyfPtr = 0;\n    var listGlyf = 0;\n    for (var k = 0; k < LocaTable.length; ++k) {\n      LocaTable[k] = glyfPtr;\n      if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {\n        ++listGlyf;\n        LocaTable[k] = glyfPtr;\n        var start = this.offsets[k];\n        var len = this.offsets[k + 1] - start;\n        if (len > 0) {\n          glyfPtr += len;\n        }\n      }\n    }\n    var newLocaTable = new Array(LocaTable.length * 4);\n    for (var j = 0; j < LocaTable.length; ++j) {\n      newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;\n      newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;\n      newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;\n      newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;\n    }\n    return newLocaTable;\n  };\n  return LocaTable;\n})(Table);\n\n/************************************************************************************/\n/* function : invert                                                                */\n/* comment : Change the object's (key: value) to create an object with (value: key).*/\n/************************************************************************************/\nvar invert = function(object) {\n  var key, ret, val;\n  ret = {};\n  for (key in object) {\n    val = object[key];\n    ret[val] = key;\n  }\n  return ret;\n};\n\n/*var successorOf = function (input) {\n        var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;\n        alphabet = 'abcdefghijklmnopqrstuvwxyz';\n        length = alphabet.length;\n        result = input;\n        i = input.length;\n        while (i >= 0) {\n            last = input.charAt(--i);\n            if (isNaN(last)) {\n                index = alphabet.indexOf(last.toLowerCase());\n                if (index === -1) {\n                    next = last;\n                    carry = true;\n                }\n                else {\n                    next = alphabet.charAt((index + 1) % length);\n                    isUpperCase = last === last.toUpperCase();\n                    if (isUpperCase) {\n                        next = next.toUpperCase();\n                    }\n                    carry = index + 1 >= length;\n                    if (carry && i === 0) {\n                        added = isUpperCase ? 'A' : 'a';\n                        result = added + next + result.slice(1);\n                        break;\n                    }\n                }\n            }\n            else {\n                next = +last + 1;\n                carry = next > 9;\n                if (carry) {\n                    next = 0;\n                }\n                if (carry && i === 0) {\n                    result = '1' + next + result.slice(1);\n                    break;\n                }\n            }\n            result = result.slice(0, i) + next + result.slice(i + 1);\n            if (!carry) {\n                break;\n            }\n        }\n        return result;\n    };*/\n\nvar Subset = (function() {\n  function Subset(font) {\n    this.font = font;\n    this.subset = {};\n    this.unicodes = {};\n    this.next = 33;\n  }\n  /*Subset.prototype.use = function (character) {\n            var i, _i, _ref;\n            if (typeof character === 'string') {\n                for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                    this.use(character.charCodeAt(i));\n                }\n                return;\n            }\n            if (!this.unicodes[character]) {\n                this.subset[this.next] = character;\n                return this.unicodes[character] = this.next++;\n            }\n        };*/\n  /*Subset.prototype.encodeText = function (text) {\n            var char, i, string, _i, _ref;\n            string = '';\n            for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                char = this.unicodes[text.charCodeAt(i)];\n                string += String.fromCharCode(char);\n            }\n            return string;\n        };*/\n  /***************************************************************/\n  /* function : generateCmap                                     */\n  /* comment : Returns the unicode cmap for this font.         */\n  /***************************************************************/\n  Subset.prototype.generateCmap = function() {\n    var mapping, roman, unicode, unicodeCmap, _ref;\n    unicodeCmap = this.font.cmap.tables[0].codeMap;\n    mapping = {};\n    _ref = this.subset;\n    for (roman in _ref) {\n      unicode = _ref[roman];\n      mapping[roman] = unicodeCmap[unicode];\n    }\n    return mapping;\n  };\n  /*Subset.prototype.glyphIDs = function () {\n            var ret, roman, unicode, unicodeCmap, val, _ref;\n            unicodeCmap = this.font.cmap.tables[0].codeMap;\n            ret = [0];\n            _ref = this.subset;\n            for (roman in _ref) {\n                unicode = _ref[roman];\n                val = unicodeCmap[unicode];\n                if ((val != null) && __indexOf.call(ret, val) < 0) {\n                    ret.push(val);\n                }\n            }\n            return ret.sort();\n        };*/\n  /******************************************************************/\n  /* function : glyphsFor                                           */\n  /* comment : Returns simple glyph objects for the input character.*/\n  /******************************************************************/\n  Subset.prototype.glyphsFor = function(glyphIDs) {\n    var additionalIDs, glyph, glyphs, id, _i, _len, _ref;\n    glyphs = {};\n    for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {\n      id = glyphIDs[_i];\n      glyphs[id] = this.font.glyf.glyphFor(id);\n    }\n    additionalIDs = [];\n    for (id in glyphs) {\n      glyph = glyphs[id];\n      if (glyph != null ? glyph.compound : void 0) {\n        additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);\n      }\n    }\n    if (additionalIDs.length > 0) {\n      _ref = this.glyphsFor(additionalIDs);\n      for (id in _ref) {\n        glyph = _ref[id];\n        glyphs[id] = glyph;\n      }\n    }\n    return glyphs;\n  };\n  /***************************************************************/\n  /* function : encode                                           */\n  /* comment : Encode various tables for the characters you use. */\n  /***************************************************************/\n  Subset.prototype.encode = function(glyID, indexToLocFormat) {\n    var cmap,\n      code,\n      glyf,\n      glyphs,\n      id,\n      ids,\n      loca,\n      new2old,\n      newIDs,\n      nextGlyphID,\n      old2new,\n      oldID,\n      oldIDs,\n      tables,\n      _ref;\n    cmap = CmapTable.encode(this.generateCmap(), \"unicode\");\n    glyphs = this.glyphsFor(glyID);\n    old2new = {\n      0: 0\n    };\n    _ref = cmap.charMap;\n    for (code in _ref) {\n      ids = _ref[code];\n      old2new[ids.old] = ids[\"new\"];\n    }\n    nextGlyphID = cmap.maxGlyphID;\n    for (oldID in glyphs) {\n      if (!(oldID in old2new)) {\n        old2new[oldID] = nextGlyphID++;\n      }\n    }\n    new2old = invert(old2new);\n    newIDs = Object.keys(new2old).sort(function(a, b) {\n      return a - b;\n    });\n    oldIDs = (function() {\n      var _i, _len, _results;\n      _results = [];\n      for (_i = 0, _len = newIDs.length; _i < _len; _i++) {\n        id = newIDs[_i];\n        _results.push(new2old[id]);\n      }\n      return _results;\n    })();\n    glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);\n    loca = this.font.loca.encode(glyf.offsets, oldIDs);\n    tables = {\n      cmap: this.font.cmap.raw(),\n      glyf: glyf.table,\n      loca: loca,\n      hmtx: this.font.hmtx.raw(),\n      hhea: this.font.hhea.raw(),\n      maxp: this.font.maxp.raw(),\n      post: this.font.post.raw(),\n      name: this.font.name.raw(),\n      head: this.font.head.encode(indexToLocFormat)\n    };\n    if (this.font.os2.exists) {\n      tables[\"OS/2\"] = this.font.os2.raw();\n    }\n    return this.font.directory.encode(tables);\n  };\n  return Subset;\n})();\n\njsPDF.API.PDFObject = (function() {\n  var pad;\n\n  function PDFObject() {}\n  pad = function(str, length) {\n    return (Array(length + 1).join(\"0\") + str).slice(-length);\n  };\n  /*****************************************************************************/\n  /* function : convert                                                        */\n  /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */\n  /*****************************************************************************/\n  PDFObject.convert = function(object) {\n    var e, items, key, out, val;\n    if (Array.isArray(object)) {\n      items = (function() {\n        var _i, _len, _results;\n        _results = [];\n        for (_i = 0, _len = object.length; _i < _len; _i++) {\n          e = object[_i];\n          _results.push(PDFObject.convert(e));\n        }\n        return _results;\n      })().join(\" \");\n      return \"[\" + items + \"]\";\n    } else if (typeof object === \"string\") {\n      return \"/\" + object;\n    } else if (object != null ? object.isString : void 0) {\n      return \"(\" + object + \")\";\n    } else if (object instanceof Date) {\n      return (\n        \"(D:\" +\n        pad(object.getUTCFullYear(), 4) +\n        pad(object.getUTCMonth(), 2) +\n        pad(object.getUTCDate(), 2) +\n        pad(object.getUTCHours(), 2) +\n        pad(object.getUTCMinutes(), 2) +\n        pad(object.getUTCSeconds(), 2) +\n        \"Z)\"\n      );\n    } else if ({}.toString.call(object) === \"[object Object]\") {\n      out = [\"<<\"];\n      for (key in object) {\n        val = object[key];\n        out.push(\"/\" + key + \" \" + PDFObject.convert(val));\n      }\n      out.push(\">>\");\n      return out.join(\"\\n\");\n    } else {\n      return \"\" + object;\n    }\n  };\n  return PDFObject;\n})();\n"],"names":["globalObject","window","global","self","consoleLog","console","log","apply","arguments","consoleWarn","str","warn","call","consoleError","error","bom","blob","opts","autoBom","test","type","Blob","String","fromCharCode","download","url","name","xhr","XMLHttpRequest","open","responseType","onload","saveAs","response","onerror","send","corsEnabled","e","status","click","node","dispatchEvent","MouseEvent","evt","document","createEvent","initMouseEvent","_global","HTMLAnchorElement","prototype","URL","webkitURL","a","createElement","rel","href","origin","location","target","createObjectURL","setTimeout","revokeObjectURL","navigator","msSaveOrOpenBlob","popup","title","body","innerText","force","isSafari","HTMLElement","safari","isChromeIOS","userAgent","FileReader","reader","onloadend","result","replace","readAsDataURL","RGBColor","color_string","ok","charAt","substr","toLowerCase","channels","simple_colors","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","feldspar","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslateblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","violetred","wheat","white","whitesmoke","yellow","yellowgreen","color_defs","re","example","process","bits","parseInt","i","length","processor","exec","r","g","b","isNaN","toRGB","toHex","toString","atob","btoa","bind","md5cycle","x","k","c","d","ff","gg","hh","ii","add32","cmn","q","s","t","md51","n","state","md5blk","substring","tail","charCodeAt","md5blks","hex_chr","split","rhex","j","hex","join","singleToByteString","toByteString","map","md5Bin","md5","md5Check","lsw","msw","repeat","num","Array","rc4","key","data","lastKey","lastState","out","permissionOptions","print","modify","copy","PDFSecurity","permissions","userPassword","ownerPassword","fileId","v","protection","forEach","perm","Error","padding","paddedUserPassword","paddedOwnerPassword","O","processOwnerPassword","P","encryptionKey","lsbFirstWord","hexToBytes","U","toHexString","byteString","byte","slice","bytes","push","encryptor","objectId","generation","toPDFName","strLength","charCode","hexStr","paddingHexStr","PubSub","context","topics","subscribe","topic","callback","once","hasOwnProperty","token","Math","random","unsubscribe","Object","keys","publish","args","tokens","sub","ex","message","getTopics","GState","parameters","supported","p","indexOf","id","objectNumber","equals","other","ignore","count","Pattern","gState","matrix","ShadingPattern","coords","colors","TilingPattern","boundingBox","xStep","yStep","stream","cloneIndex","jsPDF","options","orientation","unit","format","compressPdf","filters","userUnit","precision","floatPrecision","defaultPathOperation","encryptionOptions","compress","encryption","userPermissions","abs","putOnlyUsedFonts","usedFonts","API","internal","__private__","pdfVersion","getPdfVersion","setPdfVersion","value","pageFormats","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","b10","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","dl","letter","legal","ledger","tabloid","getPageFormats","getPageFormat","ApiMode","COMPAT","ADVANCED","apiMode","advancedAPI","saveGraphicsState","Matrix","scaleFactor","getPageHeight","setFontSize","getFontSize","compatAPI","restoreGraphicsState","combineFontStyleAndFontWeight","fontStyle","fontWeight","doSwitch","isAdvancedAPI","advancedApiModeTrap","methodName","roundToPrecision","number","parmPrecision","tmpPrecision","toFixed","hpf","f2","f3","scale","transformY","y","transformScaleY","setPrecision","getFileId","setFileId","toUpperCase","floor","creationDate","convertDateToPDFDate","parmDate","tzoffset","getTimezoneOffset","tzsign","tzhour","tzmin","timeZoneString","padd2","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","convertPDFDateToDate","parmPDFDate","year","month","date","hour","minutes","seconds","resultingDate","Date","setCreationDate","tmpCreationDateString","regexPDFCreationDate","getCreationDate","padd2Hex","hexString","offsets","content","contentLength","additionalObjects","pages","currentPage","hasCustomDestination","outputDestination","resetDocument","rootDictionaryObjId","newObjectDeferred","resourceDictionaryObjId","setCustomOutputDestination","destination","setOutputDestination","resetCustomOutputDestination","string","write","getArrayBuffer","len","ab","ArrayBuffer","u8","Uint8Array","standardFonts","getStandardFonts","activeFontSize","fontSize","size","R2L","setR2L","getR2L","zoomMode","setZoomMode","zoom","validZoomModes","undefined","getZoomMode","pageMode","setPageMode","pmode","validPageModes","getPageMode","layoutMode","setLayoutMode","layout","validLayoutModes","getLayoutMode","setDisplayMode","documentProperties","subject","author","keywords","creator","getDocumentProperty","getDocumentProperties","setDocumentProperties","setProperties","properties","property","setDocumentProperty","fonts","fontmap","activeFontKey","fontStateStack","patterns","patternMap","gStates","gStatesMap","activeGState","page","pagesContext","events","hotfixes","renderTargets","renderTargetMap","renderTargetStack","pageX","pageY","pageMatrix","sx","shy","shx","sy","tx","ty","_matrix","defineProperty","get","set","atan2","decompose","separator","multiply","f","scaleX","sqrt","shear","scaleY","translate","rotate","skew","inversed","quot","aInv","bInv","cInv","dInv","eInv","fInv","applyToPoint","pt","Point","applyToRectangle","rect","pt1","pt2","w","h","Rectangle","clone","matrixMult","m1","m2","identityMatrix","unitMatrix","addPattern","pattern","prefix","patternKey","addShadingPattern","beginTilingPattern","beginNewRenderTarget","endTilingPattern","pop","restore","newObject","oid","newObjectDeferredBegin","doOutput","newAdditionalObject","objId","obj","decodeColorString","color","colorEncoded","floatVal","parseFloat","colorAsRGB","encodeColorString","ch1","ch2","ch3","ch4","letterArray","pdfColorType","rgbColor","getFilters","putStream","alreadyAppliedFilters","addLength1","valueOfLength1","processedData","keyValues","additionalKeyValues","processDataByFilters","reverseChain","filterAsString","isArray","decodeParmsArray","putPage","pageNumber","pageObjectNumber","pageContentsObjId","contentsObjId","mediaBox","bottomLeftX","bottomLeftY","topRightX","topRightY","cropBox","bleedBox","trimBox","artBox","pageContext","pageContent","putPages","pageObjectNumbers","kids","putFont","font","isAlreadyPutted","postScriptName","encoding","putFonts","fontKey","putXObject","xObject","width","height","putXObjects","xObjectKey","interpolateAndEncodeRGBStream","numberSamples","tValues","dT","offset","unshift","index","aColor","bColor","round","trim","putShadingPattern","funcObjectNumber","putTilingPattern","deferredResourceDictionaryIds","resourcesObjectId","patternObjectId","resourcesOid","objectOid","putPatterns","putGState","putGStates","gStateKey","putXobjectDict","putEncryptionDict","putFontDict","putShadingPatternDict","putTilingPatternDict","putGStatesDict","putResourceDictionary","objectIds","putResources","Number","MAX_SAFE_INTEGER","putAdditionalObjects","addFontToFontDictionary","fontName","addFont","isStandardFont","metadata","instance","addFonts","arrayOfFonts","l","parts","dictionary","SAFE","__safeCall","fn","foo","__safeCallWrapper","stack","m","alert","bar","to8bitStream","text","flags","sourceEncoding","encodingBlock","outputEncoding","newtext","isUnicode","ch","bch","autoencode","codePages","noBOM","pdfEscape","beginPage","_setPage","_addPage","parmFormat","parmOrientation","dimensions","min","setLineWidth","lineWidth","strokeColor","lineCapID","lineJoinID","_deletePage","splice","setPage","getNumberOfPages","getFont","fontNameLowerCase","disableWarning","noFallback","putInfo","version","putCatalog","tmpRootDictionaryObjId","pcn","putTrailer","putHeader","putXRef","buildDocument","offsetOfXRef","getBlob","output","filename","save","dataURI","pdfDocument","unescape","encodeURIComponent","pdfObjectUrl","integrity","htmlForNewWindow","JSON","stringify","nW","pdfJsUrl","htmlForPDFjsNewWindow","PDFjsNewWindow","scope","documentElement","querySelector","contentWindow","PDFViewerApplication","htmlForDataURLNewWindow","dataURLNewWindow","hasHotfix","hotfixName","getEncryptor","getPageInfo","pageNumberOneBased","getPageInfoByObjId","getCurrentPageInfo","addPage","insertPage","beforePage","movePage","targetPage","tmpPages","tmpPagesContext","deletePage","transform","payload","da","angle","align","charSpace","maxWidth","horizontalScale","tmp","transformationMatrix","xtra","isHex","lineHeight","lineHeightFactor","ESC","TabLen","transformTextToSpecialArray","sa","concat","curDa","shift","processTextByFunction","processingFunction","tmpResult","textIsOfTypeString","tmpTextIsOfTypeString","match","descent","baseline","splitTextToSize","reduce","acc","textLine","mutex","PI","rotationDirection","cos","sin","activeCharSpace","setCharSpace","getCharSpace","lang","renderingMode","parmRenderingMode","stroke","usedRenderingMode","leading","pageWidth","pageSize","getWidth","activeFont","lineWidths","assign","wordSpacingPerLine","findWidth","getStringUnitWidth","doKerning","newY","prevWidth","newX","getHorizontalCoordinate","getVerticalCoordinate","backToStartX","spacing","words","shiftAmount","doReversing","posX","posY","reverse","activeFontEncoding","STRING","ARRAY","variant","wordSpacing","generatePosition","parmPosX","parmPosY","parmTransformationMatrix","position","lineIndex","textColor","clip","rule","clipEvenOdd","discardPath","isValidStyle","style","validStyleVariants","setDefaultPathOperation","operator","getStyle","op","close","fill","fillWithOptionalPattern","fillEvenOdd","fillStroke","fillStrokeEvenOdd","fillWithPattern","putStyle","cloneTilingPattern","patternData","patternId","clipRuleFromStyle","setGState","moveTo","lineTo","curveTo","x1","y1","x2","y2","x3","y3","line","lines","closed","scalex","scaley","leg","x4","y4","path","triangle","roundedRect","rx","ry","MyArc","SQRT2","ellipse","lx","ly","circle","setFont","getFontEntry","getFontList","list","encodingOptions","getLineWidth","setLineDash","setLineDashPattern","dashArray","dashPhase","getLineHeight","setLineHeightFactor","getLineHeightFactor","pageHeight","getHorizontalCoordinateString","getVerticalCoordinateString","getStrokeColor","getDrawColor","setStrokeColor","setDrawColor","fillColor","getFillColor","setFillColor","getTextColor","setTextColor","CapJoinStyles","butt","but","miter","rounded","projecting","project","square","bevel","setLineCap","setLineJoin","setLineMiterLimit","setMiterLimit","addGState","duplicate","fontState","setCurrentTransformationMatrix","comment","_x","enumerable","_y","_type","_w","_h","RenderTarget","getPageWidth","setPageWidth","setPageHeight","endFormObject","newXObject","xObjectId","beginFormObject","doFormObject","getFormObject","returnPromise","unload","Promise","resolve","reject","plugin","newEvents","eventname","handler_and_args","getCoordinateString","collections","setWidth","getHeight","setHeight","getPDFVersion","configurable","jsPDFAPI","pdfUnescape","f5","__acroform__","inherit","child","parent","create","constructor","createFormXObject","formObject","xobj","AcroFormXObject","AcroFormAppearance","BBox","setBit","bitPosition","bitMask","clearBit","getBit","getBitForPdf","setBitForPdf","clearBitForPdf","calculateCoordinates","coordinates","lowerLeft_X","lowerLeft_Y","upperRight_X","upperRight_Y","calculateAppearanceStream","appearanceStreamContent","V","DV","_V","calcRes","calculateX","maxFontSize","returnValue","textSplit","multiline","word","lineSpacing","borderPadding","isSmallerThanWidth","lastLine","TextWidth","calculateFontSpace","FieldWidth","FontSize","textHeight","startY","startX","lastY","firstWordInLine","lastWordInLine","lastLength","currWord","lineCount","Line","isWithNewLine","nextLineIsSmaller","isLastWord","currLine","textAlign","acroformPluginTemplate","fields","xForms","acroFormDictionaryRoot","printedOut","isInitialized","annotReferenceCallback","acroformPlugin","Fields","hasAnnotation","createAnnotationReference","putForm","object","findEntry","entry","annotations","find","putCatalogCallback","AcroFormDictionaryCallback","_eventID","createFieldCallback","fieldArray","standardFields","Kids","fieldObject","keyValueList","oldRect","Rect","DA","createDefaultAppearanceStream","getKeyValueListForStream","hasAppearanceStream","appearance","appearanceStreamString","createXFormObjectCallback","initializeAcroForm","AcroFormField","FieldNum","parse","AcroFormDictionary","arrayToPdfArray","array","getMatches","regex","matches","pdfArrayToStringArray","toPdfString","AcroFormPDFObject","_objId","_scope","writable","getOwnPropertyNames","filter","getOwnPropertyDescriptor","_BBox","_stream","_Kids","_DA","_F","Boolean","F","_Ff","_Rect","_FT","_T","AcroFormChildClass","_fontName","_fontStyle","_fontSize","_maxFontSize","_color","AcroFormTextField","_DV","AcroFormButton","_hasAppearanceStream","_page","Ff","_Q","AcroFormChoiceField","FT","_TI","_Opt","getOptions","setOptions","sort","addOption","removeOption","allEntries","combo","AcroFormListBox","AcroFormComboBox","AcroFormEditBox","edit","_MK","CA","_AS","AcroFormPushButton","pushButton","AcroFormRadioButton","radio","_parent","_optionName","caption","appearanceState","_AppearanceType","RadioButton","Circle","createAppearanceStream","optionName","setAppearance","getCA","createOption","Parent","addField","AcroFormCheckBox","CheckBox","_MaxLen","isInteger","AcroFormPasswordField","password","N","On","YesNormal","D","YesPushDown","Off","OffPushDown","encodedColor","DotRadius","Bezier_C","DotRadiusBezier","kc","dc","Cross","cross","calculateCross","AcroForm","ChoiceField","ListBox","ComboBox","EditBox","Button","PushButton","TextField","PasswordField","Appearance","namespace","__addimage__","UNKNOWN","ARRAY_APPLY_BATCH","imageFileTypeHeaders","PNG","TIFF","JPEG","JPEG2000","GIF87a","GIF89a","WEBP","BMP","getImageFileTypeByImageData","imageData","fallbackFormat","headerSchemata","compareResult","fileType","Uint8ClampedArray","isArrayBufferView","putImage","image","colorSpace","color_spaces","INDEXED","palette","sMask","DEVICE_CMYK","bitsPerComponent","decodeParameters","transparency","predictor","arrayBufferToBinaryString","putResourcesCallback","images","putXObjectsDictCallback","checkCompressValue","image_compression","NONE","initialize","getImages","getImageIndex","notDefined","generateAliasFromImageData","sHashCode","isImageTypeSupported","isDOMElement","nodeType","getImageDataFromElement","element","nodeName","hasAttribute","src","getAttribute","tmpImageData","loadFile","mimeType","toDataURL","checkImagesForAlias","alias","determineWidthAndHeight","writeImageToPDF","rotation","dims","coord","vcoord","f4","rotationTransformationMatrix","DEVICE_RGB","DEVICE_GRAY","CAL_GREY","CAL_RGB","LAB","ICC_BASED","PATTERN","SEPARATION","DEVICE_N","decode","DCT_DECODE","FLATE_DECODE","LZW_DECODE","JPX_DECODE","JBIG2_DECODE","ASCII85_DECODE","ASCII_HEX_DECODE","RUN_LENGTH_DECODE","CCITT_FAX_DECODE","FAST","MEDIUM","SLOW","hash","byteLength","validateStringAsBase64","possibleBase64String","extractImageFromDataUrl","dataUrl","dataUrlParts","extractedInfo","charset","supportsArrayBuffer","isArrayBuffer","Uint32Array","Int8Array","Int16Array","Uint16Array","Int32Array","Float32Array","Float64Array","binaryStringToUint8Array","binary_string","buffer","buf","subarray","addImage","compression","processImageData","dataAsBinaryString","convertBase64ToBinaryString","stringData","throwError","base64Info","rawData","getImageProperties","notEmpty","addPageData","pageInfo","putPageData","pageAnnos","anno","found","escape","objText","objPopup","encryptorText","bounds","contents","popoff","loc","_nameMap","top","finalBounds","info","magFactor","left","createAnnotation","link","textWithLink","totalLineWidth","getTextWidth","linkHeight","linkWidth","numOfLines","ceil","txtWidth","arabicSubstitionA","ligatures","arabic_diacritics","alfletter","noChangeInForm","isolatedForm","finalForm","initialForm","medialForm","__arabicParser__","isInArabicSubstitutionA","isArabicLetter","isArabicEndLetter","isArabicAlfLetter","arabicLetterHasIsolatedForm","arabicLetterHasFinalForm","arabicLetterHasInitialForm","arabicLetterHasMedialForm","resolveLigatures","letters","tmpLigatures","effectedLetters","isArabicDiacritic","getCorrectForm","currentChar","beforeChar","nextChar","parseArabic","currentLetter","prevLetter","nextLetter","newWords","processArabic","tmpText","autoPrint","refAutoPrintTag","addJS","Canvas","jsPdfInstance","_width","getContext","pageWrapXEnabled","pageWrapX","_height","pageWrapYEnabled","pageWrapY","_childNodes","_style","contextType","contextAttributes","pdf","context2d","_canvas","canvas","NO_MARGINS","bottom","right","px2pt","printingHeaderRow","_initialize","__cell__","headerFunction","margins","_reset","lastCell","Cell","_text","_lineNumber","_align","lineNumber","toArray","setHeaderFunction","func","getTextDimensions","amountOfLines","tempWidth","max","cellAddPage","cell","currentCell","tableHeaderRow","printHeaders","printHeaderRow","table","headers","config","headerNames","headerLabels","headerAligns","columnMatrix","columnWidths","column","columnMinWidths","tableHeaderConfigs","autoSize","css","headerBackgroundColor","headerTextColor","table_font_size","header","prompt","headerName","rec","row","rowHeight","calculateLineHeight","setTableHeaderRow","pv","cv","rowStart","Function","cellData","cellStart","col","table_x","table_y","model","new_page","tableHeaderCell","tempHeaderConf","currentTextColor","toLookup","arr","lookup","fontStyleOrder","italic","oblique","normal","fontStretchOrder","fontStretchLookup","fontWeights","fontWeightsLookup","normalizeFontStretch","stretch","normalizeFontStyle","normalizeFontWeight","weight","normalizeFontFace","fontFace","family","ref","buildFontFaceMap","fontFaces","normalized","searchFromPivot","matchingSet","order","pivot","dir","resolveFontStretch","resolveFontStyle","ordering","resolveFontWeight","defaultGenericFontFamilies","fixed","monospace","terminal","cursive","fantasy","serif","systemFonts","icon","menu","ruleToString","resolveFontFace","fontFaceMap","rules","defaultFontFamily","genericFontFamilies","eatWhiteSpace","input","trimLeft","parseQuotedFontFamily","quote","current","parseNonQuotedFontFamily","defaultFont","parseFontFamily","parsed","remaining","ContextLayer","ctx","isStrokeTransparent","strokeOpacity","strokeStyle","fillStyle","isFillTransparent","fillOpacity","textBaseline","lineJoin","lineCap","globalCompositeOperation","globalAlpha","clip_path","currentPoint","miterLimit","lastPoint","lineDashOffset","lineDash","margin","prevPageLastElemOffset","ignoreClearRect","_ctx","Context2D","parentNode","_pdf","_pageWrapXEnabled","_pageWrapYEnabled","_posX","_posY","_autoPaging","lastBreak","pageBreaks","_ctxStack","rgba","getRGBA","_fontFaceMap","getFontFaceMap","fontMap","convertedFontFaces","convertToFontFaces","styles","_fontFaces","fontVariant","fontFamily","rxFontSize","fontSizeUnit","jsPdfFontName","fallbackFonts","arial","Arial","verdana","Verdana","helvetica","Helvetica","getLineDash","pathPreProcess","beginPath","closePath","pathBegin","quadraticCurveTo","cpx","cpy","pt0","bezierCurveTo","cp1x","cp1y","cp2x","cp2y","arc","radius","startAngle","endAngle","counterclockwise","isIdentity","xpt","x_radPt","x_radPt0","pow","arcTo","fillRect","strokeRect","clearRect","doStackPush","tmpPageNumber","ctxStack","doStackPop","rxRgb","rxRgba","rxTransparent","isCanvasGradient","getColor","fillText","degs","rad2deg","putText","strokeText","measureText","TextMetrics","scalewidth","scaleheight","setTransform","hasMargins","drawImage","img","swidth","sheight","imageProperties","factorX","factorY","clipFactorX","clipFactorY","decomposedTransformationMatrix","xRect","pageArray","getPagesByPath","sortPages","clipPath","autoPaging","pageWidthMinusMargins","topMargin","firstPageHeight","pageHeightMinusMargins","previousPageHeightSum","tmpPaths","pathPositionRedo","drawPaths","tmpRect","needsClipping","yOffset","rectOfQuadraticCurve","getQuadraticCurveBoundary","rectOfBezierCurve","getBezierCurveBoundary","paths","isClip","oldLineWidth","origPath","xPath","tmpPath","moves","delta","begin","start","deltas","iii","began","arcs","drawArc","drawLine","drawLines","doClip","getBaseline","getTextBottom","yBaseLine","createLinearGradient","canvasGradient","colorStops","addColorStop","createPattern","createRadialGradient","includeMove","curves","createArc","curve","doMove","drawCurve","textDimensions","yBottom","yTop","baselineRect","textBounds","oldSize","pageHeightMinusBottomMargin","pageWidthMinusRightMargin","textBoundsOnPage","doSlice","croppedText","baseLineRectOnPage","prevX","prevY","anticlockwise","EPSILON","twoPi","halfPi","totalAngle","sgn","remain","createSmallArc","q1","q2","k2","ar","cos_ar","sin_ar","ey","midX1","midY1","midX2","midY2","resultX1","resultX2","resultY1","resultY2","ax","ay","bx","by","cx","cy","dx","dy","tobx","toby","tocx","tocy","todx","tody","px","py","qx","qy","minx","miny","maxx","maxy","toqx","toqy","torx","tory","totx","toty","getPrevLineDashValue","prevLineDash","nextLineDash","ASCII85Encode","ASCII85Decode","z","ASCIIHexEncode","ASCIIHexDecode","regexCheckIfHex","RegExp","FlateEncode","zlibSync","origData","filterChain","sync","browserRequest","loadImageFile","request","sanitizeUnicode","dataLength","charArray","StringFromCharCode","overrideMimeType","responseText","loadHtml2Canvas","catch","then","html2canvas","default","loadDomPurify","dompurify","objType","tagName","opt","el","className","innerHTML","sanitize","cloneNode","javascriptEnabled","createTextNode","nodeValue","firstChild","nextSibling","appendChild","addEventListener","scrollTop","scrollLeft","Worker","root","convert","template","setProgress","promise","__proto__","prop","container","overlay","progress","val","enableLinks","backgroundColor","from","getType","from_main","to","toContainer","toCanvas","toImg","toPdf","prereqs","checkSrc","checkPageSize","setPageSize","thenList","toContainer_main","overlayCSS","overflow","zIndex","containerCSS","display","windowWidth","clientWidth","scrollWidth","offsetWidth","source","scrollHeight","offsetHeight","clientHeight","clear","border","float","checkContainer","contains","toCanvas_main","onrendered","toCanvas_post","onRendered","removeChild","toContext2d","toContext2d_main","async","allowTaint","scrollX","scrollY","imageTimeout","logging","proxy","removeContainer","foreignObjectRendering","useCORS","windowHeight","toContext2d_post","checkCanvas","toImg_main","imgData","quality","checkContext2d","toPdf_main","outputImg","outputPdf","checkPdf","outputPdf_main","checkImg","outputImg_main","save_main","doCallback","doCallback_main","fns","set_prop","setMargin","set_jsPDF","set_opt","set_main","cbk","get_main","setMargin_main","toPx","setPageSize_main","getPageSize","inner","ratio","updateProgress","onFulfilled","onRejected","thenCore","then_main","then_pre","then_post","thenBase","isNative","selfPromise","returnVal","thenExternal","thenList_forEach","catchExternal","msg","error_main","using","export","run","format_as_string","err","html","worker","jsNamesObj","jsJsObj","javascript","namesOid","outline","children","render","createNamedDestinations","totalPages","dests","names2Oid","makeRef","add","item","genIds_r","renderRoot","renderItems","objStart","count_r","objEnd","makeString","markers","getJpegInfo","numcomponents","blockLength","processJPEG","bpc","APNG_BLEND_OP_SOURCE","APNG_DISPOSE_OP_BACKGROUND","APNG_DISPOSE_OP_PREVIOUS","makeImage","scratchCanvas","scratchCtx","chunkSize","palLen","delayDen","delayNum","frame","section","palShort","_i","_j","_ref","pos","animation","readUInt32","_results","colorType","compressionMethod","filterMethod","interlaceMethod","numFrames","numPlays","Infinity","frames","read","xOffset","readUInt16","delay","disposeOp","blendOp","indexed","grayscale","rgb","hasAlphaChannel","pixelBitlength","decodePixels","pixelBytes","fullPixels","_this","unzlibSync","pass","x0","y0","abyte","pa","paeth","pb","pc","pixels","scanlineLength","upper","upperLeft","_k","_l","_m","isFull","fullPos","partPos","decodePalette","ret","_ref1","copyToImageData","alpha","_decodedPalette","hasBrowserCanvas","putImageData","Image","decodeFrames","_len","createImageData","renderFrame","prev","animate","doFrame","frameNumber","_timeout","stopAnimation","clearTimeout","_png","canCompress","hasCompressionJS","compressBytes","lineLength","colorsPerPixel","level","filter_method","filterUp","filterSub","filterAverage","filterPaeth","applyPngFilterMethod","dat","filter_methods","getFilterMethods","prevLine","results","ind","getIndexOfSmallestSum","filterNone","up","upLeft","paethPredictor","pLeft","pUp","pUpLeft","arrays","sum","getPredictorFromCompression","processPNG","trns","pal","smask","alphaData","hasColors","pixel","pDiff","pbl","trans","total","GifReader","pf0","global_palette_flag","num_global_colors_pow2","num_global_colors","background","global_palette_offset","global_palette_size","no_eof","transparent_index","disposal","loop_count","block_size","pf1","pf2","local_palette_flag","interlace_flag","num_local_colors_pow2","num_local_colors","palette_offset","palette_size","has_local_palette","data_offset","data_length","interlaced","loopCount","frameInfo","frame_num","decodeAndBlitFrameBGRA","num_pixels","index_stream","GifReaderLZWOutputIndexStream","framewidth","framestride","xleft","opbeg","opend","scanstride","interlaceskip","il","decodeAndBlitFrameRGBA","code_stream","output_length","min_code_size","clear_code","eoi_code","next_code","cur_code_size","code_mask","cur_shift","cur","subblock_size","code_table","prev_code","code","chase_code","chase_length","chase","op_end","JPEGEncoder","ffloor","YTable","UVTable","fdtbl_Y","fdtbl_UV","YDC_HT","UVDC_HT","YAC_HT","UVAC_HT","bitcode","category","outputfDCTQuant","DU","byteout","bytenew","bytepos","YDU","UDU","VDU","clt","RGB_YUV_TABLE","currentQuality","ZigZag","std_dc_luminance_nrcodes","std_dc_luminance_values","std_ac_luminance_nrcodes","std_ac_luminance_values","std_dc_chrominance_nrcodes","std_dc_chrominance_values","std_ac_chrominance_nrcodes","std_ac_chrominance_values","initQuantTables","sf","YQT","UVQT","u","aasf","computeHuffmanTbl","nrcodes","std_table","codevalue","pos_in_table","HT","initHuffmanTbl","initCategoryNumber","nrlower","nrupper","cat","nr","nrneg","initRGBYUVTable","writeBits","bs","posval","writeByte","writeWord","fDCTQuant","fdtbl","d0","d1","d2","d3","d4","d5","d6","d7","dataOff","I8","I64","tmp0","tmp7","tmp1","tmp6","tmp2","tmp5","tmp3","tmp4","tmp10","tmp13","tmp11","tmp12","z1","z5","z2","z4","z3","z11","z13","tmp0p2","tmp7p2","tmp1p2","tmp6p2","tmp2p2","tmp5p2","tmp3p2","tmp4p2","tmp10p2","tmp13p2","tmp11p2","tmp12p2","z1p2","z5p2","z2p2","z4p2","z3p2","z11p2","z13p2","writeAPP0","writeSOF0","writeDQT","writeDHT","o","writeSOS","processDU","CDU","DC","HTDC","HTAC","EOB","M16zeroes","I16","I63","DU_DCT","Diff","end0pos","lng","startpos","nrzeroes","nrmarker","initCharLookupTable","sfcc","encode","setQuality","DCY","DCU","DCV","displayName","quadWidth","fillbits","init","processGIF89A","qu","rawImageData","encoder","processGIF87A","BmpDecoder","is_with_alpha","datav","DataView","bottom_up","flag","parseHeader","parseBGR","fileSize","getUint32","reserved","headerSize","getInt32","planes","getUint16","bitPP","rawSize","hr","vr","importantColors","getUint8","quad","bitn","bit1","xlen","mode","bit4","before","after","bit8","bit15","dif_w","_11111","_1_5","B","bit16","_111111","_1_6","bit24","bit32","getData","processBMP","WebPDecoder","fa","L","J","H","I","Z","M","wa","wb","Ed","ma","_WebPDecoder","Fd","Ub","G","jc","Qb","qb","nd","pd","xb","Ca","Ka","oa","Jd","Yc","Zc","Qa","na","K","ca","cb","Sb","Ra","bb","Vb","ob","db","Gd","Hd","Wb","Sa","Xb","Id","ra","Ta","Yb","Ha","Zb","X","Mb","Xa","$b","ac","bc","xa","yb","ud","hd","jd","aa","eb","Ia","cc","Kd","Ld","ec","Ea","Md","Nd","Od","Pd","Qd","fb","gb","hb","zb","Ab","Ja","Bb","Rd","A","Sd","ea","Tc","Cd","lb","Db","W","Cb","S","RGBA","kb","sd","Td","Ud","fd","ib","bd","cd","Da","Vd","T","Wd","ba","ka","Mc","Nc","fc","Rc","Xd","ya","Kb","za","gc","Ua","Va","memory","Ib","Jb","hc","Oa","ic","Aa","Yd","Ba","Wa","Zd","$d","ae","ta","Eb","be","ga","ce","Dc","lc","mc","nc","de","ua","ub","ha","xc","vc","md","Ya","oc","C","ee","E","Q","fe","qc","Fb","rc","ge","va","Ma","sc","Gb","tc","uc","Hb","wc","yc","zc","qd","rd","ia","tb","he","$","Pb","wd","xd","vb","ie","Ac","Bc","je","Cc","VP8LMapColor32b","ke","VP8LMapColor8b","le","rb","Oc","R","me","qa","Y","la","ja","Fa","ne","sb","La","Za","$a","jb","mb","oe","pe","nb","qe","Pa","Ga","Na","Ec","se","Fc","te","ue","yd","td","Rb","ve","we","Lb","Gc","xe","Wc","Xc","ye","Pc","Tb","zd","vd","od","ld","dd","Hc","ze","Sc","Qc","ad","Ob","Ad","Dd","Ae","Nb","Ic","Be","Kc","ed","$c","Jc","Bd","gd","Uc","Vc","put","Ce","De","Ee","Fe","Ge","He","Ie","Lc","Je","Ke","Le","Me","Ne","Oe","Pe","Qe","Re","Se","Te","Ue","Ve","We","Xe","Ye","Ze","$e","af","bf","cf","df","ef","gf","hf","jf","kf","lf","mf","nf","of","pf","qf","rf","tf","uf","vf","wf","xf","yf","zf","Af","Bf","kd","Cf","Df","Ef","Gf","Hf","If","Jf","Kf","Lf","Mf","Nf","Of","Pf","Predictor0","Predictor1","Predictor2","Predictor3","Predictor4","Predictor5","Predictor6","Predictor7","Predictor8","Predictor9","Predictor10","Predictor11","Predictor12","Predictor13","PredictorAdd0","PredictorAdd1","PredictorAdd2","ColorIndexInverseTransform","MapARGB","VP8LColorIndexInverseTransformAlpha","MapAlpha","VP8LPredictorsAdd","VP8LPredictors","VP8LPredictorsAdd_C","VP8LPredictors_C","UpsampleRgbLinePair","UpsampleBgrLinePair","UpsampleRgbaLinePair","UpsampleBgraLinePair","UpsampleArgbLinePair","UpsampleRgba4444LinePair","UpsampleRgb565LinePair","Qf","WebPDecodeRGBA","memcmp","data_off","GetTag","GetLE16","GetLE24","GetLE32","WebPRiffParser","src_off","imagearray","alpha_chunk","alpha_size","alpha_offset","riff_size","fourcc","payload_size","payload_size_padded","feature_flags","src_off_","canvas_width","canvas_height","bgcolor","offset_x","offset_y","duration","blend","dispose","temp","webpdecoder","processWEBP","processRGBA","imagePixels","rgbOut","alphaOut","outIndex","alphaIndex","rgbData","setLanguage","langCode","langCodes","sq","an","hy","as","ast","az","eu","bn","br","bg","my","zh","co","cr","cs","nl","en","eo","et","fo","fj","fi","fr","fy","fur","gl","gu","ht","hi","hu","is","iu","it","kn","ks","kk","km","ky","tlh","ko","lv","lt","mk","ms","ml","mt","mi","mr","mo","nv","ng","no","nn","or","om","pl","rm","ro","ru","sz","sg","si","sr","sk","sl","so","es","sw","sv","tt","th","tig","ts","tn","tr","tk","uk","hsb","ur","vi","vo","xh","ji","zu","languageSettings","isSubscribed","languageCode","getCharWidthsArray","widths","Unicode","widthsFractionOf","fof","kerning","kerningFractionOf","kerningValue","char_code","prior_char_code","default_char_width","widthOfString","widthOfGlyph","characterToGlyph","splitLongWord","widths_array","firstLineMaxLen","maxLen","answer","workingLen","startOfLine","splitParagraphIntoLines","maxlen","line_length","textIndent","separator_length","current_word_length","spaceCharWidth","lineIndent","pad","wrds","wrd","idx","postProcess","ln","fsize","newOptions","paragraphs","fontUnit_maxLen","__fontmetrics__","decoded","encoded","mappingUncompress","mappingCompress","vals","keystring","valuestring","numberprefix","uncompress","sign","stringparts","activeobject","parentchain","parent_key_pair","keyparts","valueparts","datalen","WinAnsiEncoding","encodings","Courier","fontMetrics","Symbol","ZapfDingbats","metrics","file","TTFFont","glyIdsUsed","existsFileInVFS","getFileFromVFS","loadCanvg","canvg","addSvgAsImage","svg","ignoreMouse","ignoreAnimation","ignoreDimensions","doc","fromString","putTotalPages","pageExpression","replaceExpression","totalNumberOfPages","pdfEscape16","viewerPreferences","doReset","configuration","configurationTemplate","HideToolbar","defaultValue","explicitSet","valueSet","HideMenubar","HideWindowUI","FitWindow","CenterWindow","DisplayDocTitle","NonFullScreenPageMode","Direction","ViewArea","ViewClip","PrintArea","PrintClip","PrintScaling","Duplex","PickTrayByPDFSize","PrintPageRange","NumCopies","configurationKeys","rangeArray","isValid","method","arrayContainsElement","iterator","viewerpreferences","pdfDict","vPref","postPutResources","xmpmeta_beginning","rdf_beginning","__metadata__","namespaceuri","rdf_ending","xmpmeta_ending","utf8_xmpmeta_beginning","utf8_rdf_beginning","utf8_metadata","utf8_rdf_ending","utf8_xmpmeta_ending","total_len","metadata_object_number","addMetadata","padz","toUnicode","toUnicodeCmap","codes","range","unicode","unicodeMap","identityHFunction","subset","pdfOutput","pdfOutput2","fontTable","cmap","cmapData","fontDescriptor","PDFObject","bbox","stemV","italicAngle","ascender","decender","capHeight","DescendantFont","winAnsiEncodingFunction","hmtx","head","unitsPerEm","utf8TextFunction","cmapConfirm","strText","codeMap","utf8EscapeFunction","parms","_initializeVFS","vFS","addFileToVFS","filecontent","bidiUnicodeTypes","__bidiEngine__","_UNICODE_TYPES","_bidiUnicodeTypes","_STATE_TABLE_LTR","_STATE_TABLE_RTL","_TYPE_NAMES_MAP","EN","AN","_UNICODE_RANGES_MAP","_SWAP_TABLE","_LTR_RANGES_REG_EXPR","_lastArabic","_hasUbatB","_hasUbatS","DIR_LTR","DIR_RTL","_isInVisual","_isInRtl","_isOutVisual","_isOutRtl","_isSymmetricSwapping","_dir","_init","sourceToTargetMap","_isContextualDirRtl","_getCharType","rangeIdx","charType","_resolveCharType","chars","types","resolvedTypes","cType","wType","nType","rtlCandidate","_handleUbatS","levels","_invertString","_computeLevels","hiLevel","params","action","condition","newLevel","prevState","condPos","newState","stateTable","_invertByLevel","high","end","low","_symmetricSwap","_reorder","doBidiReorder","isSymmetricSwappingOrig","isInputVisual","isOutputVisual","isInputRtl","isOutputRtl","isSymmetricSwapping","bidiEngine","bidiEngineFunction","Data","readString","Subset","registerTTF","directory","Directory","HeadTable","NameTable","CmapTable","hhea","HheaTable","maxp","MaxpTable","HmtxTable","post","PostTable","os2","OS2Table","loca","LocaTable","glyf","GlyfTable","exists","lineGap","xMin","yMin","xMax","yMax","raw","italic_angle","xHeight","familyClass","isSerif","isScript","isFixedPitch","character","glyph","forGlyph","advance","includeGap","gap","readByte","writeUInt32","readInt32","int","writeInt32","writeUInt16","readInt16","writeInt16","writeString","readShort","writeShort","readLongLong","writeLongLong","readInt","writeInt","checksum","scalarType","tableCount","searchRange","entrySelector","rangeShift","tables","tag","adjustment","directoryLength","headOffset","log2","tableData","__slice","Table","__hasProp","__extends","ctor","__super__","_super","revision","checkSumAdjustment","magicNumber","created","modified","macStyle","lowestRecPPEM","fontDirectionHint","indexToLocFormat","glyphDataFormat","CmapEntry","endCode","glyphId","glyphIds","idDelta","idRangeOffset","saveOffset","segCount","segCountX2","startCode","platformID","encodingID","language","charmap","charMap","diff","endCodes","glyphIDs","indexes","last","nextID","old","rangeOffsets","startCodes","startGlyph","subtable","_len1","_len2","_len3","_len4","_len5","_len6","_len7","_n","_name","_o","_p","_q","new","maxGlyphID","LN2","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","metricDataFormat","numberOfMetrics","averageCharWidth","weightClass","widthClass","ySubscriptXSize","ySubscriptYSize","ySubscriptXOffset","ySubscriptYOffset","ySuperscriptXSize","ySuperscriptYSize","ySuperscriptXOffset","ySuperscriptYOffset","yStrikeoutSize","yStrikeoutPosition","panose","charRange","vendorID","selection","firstCharIndex","lastCharIndex","ascent","winAscent","winDescent","codePageRange","defaultChar","breakChar","maxContext","numberOfGlyphs","underlinePosition","underlineThickness","minMemType42","maxMemType42","minMemType1","maxMemType1","glyphNameIndex","names","_results1","numGlyphs","NameEntry","languageID","entries","stringOffset","strings","nameID","copyright","fontSubfamily","uniqueSubfamily","postscriptName","trademark","manufacturer","designer","description","vendorUrl","designerUrl","license","licenseUrl","preferredFamily","preferredSubfamily","compatibleFull","sampleText","maxPoints","maxContours","maxCompositePoints","maxComponentContours","maxZones","maxTwilightPoints","maxStorage","maxFunctionDefs","maxInstructionDefs","maxStackElements","maxSizeOfInstructions","maxComponentElements","maxComponentDepth","lsbCount","lsb","leftSideBearings","cache","glyphFor","numberOfContours","lengthOf","CompoundGlyph","SimpleGlyph","glyphs","mapping","old2new","compound","ARG_1_AND_2_ARE_WORDS","MORE_COMPONENTS","WE_HAVE_AN_X_AND_Y_SCALE","WE_HAVE_A_SCALE","WE_HAVE_A_TWO_BY_TWO","glyphOffsets","activeGlyphs","glyfPtr","listGlyf","newLocaTable","invert","unicodes","next","generateCmap","roman","unicodeCmap","glyphsFor","additionalIDs","glyID","ids","new2old","newIDs","nextGlyphID","oldID","oldIDs","items","isString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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A0B,CAA1B,CADH,GAEApc,GAAG,CAAC3uD,MAAM,CAACgrE,WAAP,EAAD,EAAuB,CAAvB,CAFH,GAGArc,GAAG,CAAC3uD,MAAM,CAACirE,UAAP,EAAD,EAAsB,CAAtB,CAHH,GAIAtc,GAAG,CAAC3uD,MAAM,CAACkrE,WAAP,EAAD,EAAuB,CAAvB,CAJH,GAKAvc,GAAG,CAAC3uD,MAAM,CAACmrE,aAAP,EAAD,EAAyB,CAAzB,CALH,GAMAxc,GAAG,CAAC3uD,MAAM,CAACorE,aAAP,EAAD,EAAyB,CAAzB,CANH,GAOA,IARF;AAUD,KAXM,MAWA,IAAI,GAAG/iG,QAAH,CAAY3O,IAAZ,CAAiBsmC,MAAjB,MAA6B,iBAAjC,EAAoD;AACzD30B,MAAAA,GAAG,GAAG,CAAC,IAAD,CAAN;;AACA,WAAKJ,GAAL,IAAY+0B,MAAZ,EAAoB;AAClBwvB,QAAAA,GAAG,GAAGxvB,MAAM,CAAC/0B,GAAD,CAAZ;AACAI,QAAAA,GAAG,CAAC8B,IAAJ,CAAS,MAAMlC,GAAN,GAAY,GAAZ,GAAkB+qF,SAAS,CAACjnC,OAAV,CAAkBS,GAAlB,CAA3B;AACD;;AACDnkD,MAAAA,GAAG,CAAC8B,IAAJ,CAAS,IAAT;AACA,aAAO9B,GAAG,CAACjB,IAAJ,CAAS,IAAT,CAAP;AACD,KARM,MAQA;AACL,aAAO,KAAK41B,MAAZ;AACD;AACF,GAvCD;;AAwCA,SAAOg2D,SAAP;AACD,CApDqB,EAAtB;;;"}
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.es.min.js
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.es.min.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.es.min.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,332 @@
+/** @license
+ *
+ * jsPDF - PDF Document creation from JavaScript
+ * Version 2.5.2 Built on 2024-09-17T13:29:57.859Z
+ *                      CommitID 00000000
+ *
+ * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
+ *               2015-2021 yWorks GmbH, http://www.yworks.com
+ *               2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
+ *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
+ *               2010 Aaron Spike, https://github.com/acspike
+ *               2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2012 Pablo Hess, https://github.com/pablohess
+ *               2012 Florian Jenett, https://github.com/fjenett
+ *               2013 Warren Weckesser, https://github.com/warrenweckesser
+ *               2013 Youssef Beddad, https://github.com/lifof
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2013 Stefan Slonevskiy, https://github.com/stefslon
+ *               2013 Jeremy Morel, https://github.com/jmorel
+ *               2013 Christoph Hartmann, https://github.com/chris-rock
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Makes, https://github.com/dollaruw
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 Steven Spungin, https://github.com/Flamenco
+ *               2014 Kenneth Glassey, https://github.com/Gavvers
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Contributor(s):
+ *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
+ *    kim3er, mfo, alnorth, Flamenco
+ */
+
+import t from"@babel/runtime/helpers/typeof";import{zlibSync as e,unzlibSync as r}from"fflate";var n=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function i(){n.console&&"function"==typeof n.console.log&&n.console.log.apply(n.console,arguments)}var a={log:i,warn:function(t){n.console&&("function"==typeof n.console.warn?n.console.warn.apply(n.console,arguments):i.call(null,arguments))},error:function(t){n.console&&("function"==typeof n.console.error?n.console.error.apply(n.console,arguments):i(t))}};function o(t,e,r){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){l(n.response,e,r)},n.onerror=function(){a.error("could not download file")},n.send()}function s(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function c(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 u,h,l=n.saveAs||("object"!==("undefined"==typeof window?"undefined":t(window))||window!==n?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,r){var i=n.URL||n.webkitURL,a=document.createElement("a");e=e||t.name||"download",a.download=e,a.rel="noopener","string"==typeof t?(a.href=t,a.origin!==location.origin?s(a.href)?o(t,e,r):c(a,a.target="_blank"):c(a)):(a.href=i.createObjectURL(t),setTimeout((function(){i.revokeObjectURL(a.href)}),4e4),setTimeout((function(){c(a)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,r,n){if(r=r||e.name||"download","string"==typeof e)if(s(e))o(e,r,n);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout((function(){c(i)}))}else navigator.msSaveOrOpenBlob(function(e,r){return void 0===r?r={autoBom:!1}:"object"!==t(r)&&(a.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,i,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return o(e,r,i);var s="application/octet-stream"===e.type,c=/constructor/i.test(n.HTMLElement)||n.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||s&&c)&&"object"===("undefined"==typeof FileReader?"undefined":t(FileReader))){var h=new FileReader;h.onloadend=function(){var t=h.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=t:location=t,a=null},h.readAsDataURL(e)}else{var l=n.URL||n.webkitURL,f=l.createObjectURL(e);a?a.location=f:location.href=f,a=null,setTimeout((function(){l.revokeObjectURL(f)}),4e4)}});
+/**
+ * A class to parse color values
+ * @author Stoyan Stefanov <sstoo@gmail.com>
+ * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
+ * @license Use it if you like it
+ */function f(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}}
+/**
+ * @license
+ * Joseph Myers does not specify a particular license for his work.
+ *
+ * Author: Joseph Myers
+ * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
+ *
+ * Modified by: Owen Leong
+ */
+function d(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];r=g(r,n,i,a,e[0],7,-680876936),a=g(a,r,n,i,e[1],12,-389564586),i=g(i,a,r,n,e[2],17,606105819),n=g(n,i,a,r,e[3],22,-1044525330),r=g(r,n,i,a,e[4],7,-176418897),a=g(a,r,n,i,e[5],12,1200080426),i=g(i,a,r,n,e[6],17,-1473231341),n=g(n,i,a,r,e[7],22,-45705983),r=g(r,n,i,a,e[8],7,1770035416),a=g(a,r,n,i,e[9],12,-1958414417),i=g(i,a,r,n,e[10],17,-42063),n=g(n,i,a,r,e[11],22,-1990404162),r=g(r,n,i,a,e[12],7,1804603682),a=g(a,r,n,i,e[13],12,-40341101),i=g(i,a,r,n,e[14],17,-1502002290),r=m(r,n=g(n,i,a,r,e[15],22,1236535329),i,a,e[1],5,-165796510),a=m(a,r,n,i,e[6],9,-1069501632),i=m(i,a,r,n,e[11],14,643717713),n=m(n,i,a,r,e[0],20,-373897302),r=m(r,n,i,a,e[5],5,-701558691),a=m(a,r,n,i,e[10],9,38016083),i=m(i,a,r,n,e[15],14,-660478335),n=m(n,i,a,r,e[4],20,-405537848),r=m(r,n,i,a,e[9],5,568446438),a=m(a,r,n,i,e[14],9,-1019803690),i=m(i,a,r,n,e[3],14,-187363961),n=m(n,i,a,r,e[8],20,1163531501),r=m(r,n,i,a,e[13],5,-1444681467),a=m(a,r,n,i,e[2],9,-51403784),i=m(i,a,r,n,e[7],14,1735328473),r=v(r,n=m(n,i,a,r,e[12],20,-1926607734),i,a,e[5],4,-378558),a=v(a,r,n,i,e[8],11,-2022574463),i=v(i,a,r,n,e[11],16,1839030562),n=v(n,i,a,r,e[14],23,-35309556),r=v(r,n,i,a,e[1],4,-1530992060),a=v(a,r,n,i,e[4],11,1272893353),i=v(i,a,r,n,e[7],16,-155497632),n=v(n,i,a,r,e[10],23,-1094730640),r=v(r,n,i,a,e[13],4,681279174),a=v(a,r,n,i,e[0],11,-358537222),i=v(i,a,r,n,e[3],16,-722521979),n=v(n,i,a,r,e[6],23,76029189),r=v(r,n,i,a,e[9],4,-640364487),a=v(a,r,n,i,e[12],11,-421815835),i=v(i,a,r,n,e[15],16,530742520),r=b(r,n=v(n,i,a,r,e[2],23,-995338651),i,a,e[0],6,-198630844),a=b(a,r,n,i,e[7],10,1126891415),i=b(i,a,r,n,e[14],15,-1416354905),n=b(n,i,a,r,e[5],21,-57434055),r=b(r,n,i,a,e[12],6,1700485571),a=b(a,r,n,i,e[3],10,-1894986606),i=b(i,a,r,n,e[10],15,-1051523),n=b(n,i,a,r,e[1],21,-2054922799),r=b(r,n,i,a,e[8],6,1873313359),a=b(a,r,n,i,e[15],10,-30611744),i=b(i,a,r,n,e[6],15,-1560198380),n=b(n,i,a,r,e[13],21,1309151649),r=b(r,n,i,a,e[4],6,-145523070),a=b(a,r,n,i,e[11],10,-1120210379),i=b(i,a,r,n,e[2],15,718787259),n=b(n,i,a,r,e[9],21,-343485551),t[0]=_(r,t[0]),t[1]=_(n,t[1]),t[2]=_(i,t[2]),t[3]=_(a,t[3])}function p(t,e,r,n,i,a){return e=_(_(e,t),_(n,a)),_(e<<i|e>>>32-i,r)}function g(t,e,r,n,i,a,o){return p(e&r|~e&n,t,e,i,a,o)}function m(t,e,r,n,i,a,o){return p(e&n|r&~n,t,e,i,a,o)}function v(t,e,r,n,i,a,o){return p(e^r^n,t,e,i,a,o)}function b(t,e,r,n,i,a,o){return p(r^(e|~n),t,e,i,a,o)}function y(t){var e,r=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)d(n,w(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(d(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*r,d(n,i),n}function w(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}u=n.atob.bind(n),h=n.btoa.bind(n);var N="0123456789abcdef".split("");function L(t){for(var e="",r=0;r<4;r++)e+=N[t>>8*r+4&15]+N[t>>8*r&15];return e}function A(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function x(t){return y(t).map(A).join("")}var S="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e<t.length;e++)t[e]=L(t[e]);return t.join("")}(y("hello"));function _(t,e){if(S){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}return t+e&4294967295}
+/**
+ * @license
+ * FPDF is released under a permissive license: there is no usage restriction.
+ * You may embed it freely in your application (commercial or not), with or
+ * without modifications.
+ *
+ * Reference: http://www.fpdf.org/en/script/script37.php
+ */function P(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=[],c=0;c<256;c++)s[c]=c;var u=0;for(c=0;c<256;c++){var h=s[c];u=(u+h+o.charCodeAt(c))%256,s[c]=s[u],s[u]=h}r=t,n=s}else s=n;var l=e.length,f=0,d=0,p="";for(c=0;c<l;c++)d=(d+(h=s[f=(f+1)%256]))%256,s[f]=s[d],s[d]=h,o=s[(s[f]+s[d])%256],p+=String.fromCharCode(e.charCodeAt(c)^o);return p}
+/**
+ * @license
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ * Author: Owen Leong (@owenl131)
+ * Date: 15 Oct 2020
+ * References:
+ * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
+ * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
+ * http://www.fpdf.org/en/script/script37.php
+ */var k={print:4,modify:8,copy:16,"annot-forms":32};function I(t,e,r,n){this.v=1,this.r=2;var i=192;t.forEach((function(t){if(void 0!==k.perm)throw new Error("Invalid permission: "+t);i+=k[t]})),this.padding="(¿N^NuAd\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=x(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=P(this.encryptionKey,this.padding)}function F(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);if(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)e+="#"+("0"+i.toString(16)).slice(-2);else e+=t[n]}return e}function C(e){if("object"!==t(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 i=Array.prototype.slice.call(arguments,1),o=[];for(var s in r[t]){var c=r[t][s];try{c[0].apply(e,i)}catch(t){n.console&&a.error("jsPDF PubSub Error",t.message,t)}c[1]&&o.push(s)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return r}}function j(t){if(!(this instanceof j))return new j(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 O(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function B(t,e,r,n,i){if(!(this instanceof B))return new B(t,e,r,n,i);this.type="axial"===t?2:3,this.coords=e,this.colors=r,O.call(this,n,i)}function M(t,e,r,n,i){if(!(this instanceof M))return new M(t,e,r,n,i);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,O.call(this,n,i)}function E(e){var r,i="string"==typeof arguments[0]?arguments[0]:"p",o=arguments[1],s=arguments[2],c=arguments[3],u=[],d=1,p=16,g="S",m=null;"object"===t(e=e||{})&&(i=e.orientation,o=e.unit||o,s=e.format||s,c=e.compress||e.compressPdf||c,null!==(m=e.encryption||null)&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),d="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(r=e.precision),void 0!==e.floatPrecision&&(p=e.floatPrecision),g=e.defaultPathOperation||"S"),u=e.filters||(!0===c?["FlateEncode"]:u),o=o||"mm",i=(""+(i||"P")).toLowerCase();var v=e.putOnlyUsedFonts||!1,b={},y={internal:{},__private__:{}};y.__private__.PubSub=C;var w="1.3",N=y.__private__.getPdfVersion=function(){return w};y.__private__.setPdfVersion=function(t){w=t};var L={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]};y.__private__.getPageFormats=function(){return L};var A=y.__private__.getPageFormat=function(t){return L[t]};s=s||"a4";var x={COMPAT:"compat",ADVANCED:"advanced"},S=x.COMPAT;function _(){this.saveGraphicsState(),lt(new Vt(_t,0,0,-_t,0,Rr()*_t).toString()+" cm"),this.setFontSize(this.getFontSize()/_t),g="n",S=x.ADVANCED}function P(){this.restoreGraphicsState(),g="S",S=x.COMPAT}var k=y.__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};y.advancedAPI=function(t){var e=S===x.COMPAT;return e&&_.call(this),"function"!=typeof t||(t(this),e&&P.call(this)),this},y.compatAPI=function(t){var e=S===x.ADVANCED;return e&&P.call(this),"function"!=typeof t||(t(this),e&&_.call(this)),this},y.isAdvancedAPI=function(){return S===x.ADVANCED};var O,q=function(t){if(S!==x.ADVANCED)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},D=y.roundToPrecision=y.__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+$/,"")};O=y.hpf=y.__private__.hpf="number"==typeof p?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return D(t,p)}:"smart"===p?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return D(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return D(t,16)};var R=y.f2=y.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return D(t,2)},T=y.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return D(t,3)},U=y.scale=y.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return S===x.COMPAT?t*_t:S===x.ADVANCED?t:void 0},z=function(t){return S===x.COMPAT?Rr()-t:S===x.ADVANCED?t:void 0},H=function(t){return U(z(t))};y.__private__.setPrecision=y.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(r=parseInt(t,10))};var W,V="00000000000000000000000000000000",G=y.__private__.getFileId=function(){return V},Y=y.__private__.setFileId=function(t){return V=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():V.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==m&&(Ye=new I(m.userPermissions,m.userPassword,m.ownerPassword,V)),V};y.setFileId=function(t){return Y(t),this},y.getFileId=function(){return G()};var J=y.__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,Q(n),"'",Q(i),"'"].join("");return["D:",t.getFullYear(),Q(t.getMonth()+1),Q(t.getDate()),Q(t.getHours()),Q(t.getMinutes()),Q(t.getSeconds()),a].join("")},X=y.__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)},K=y.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=J(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 W=e},Z=y.__private__.getCreationDate=function(t){var e=W;return"jsDate"===t&&(e=X(W)),e};y.setCreationDate=function(t){return K(t),this},y.getCreationDate=function(t){return Z(t)};var $,Q=y.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},tt=y.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},et=0,rt=[],nt=[],it=0,at=[],ot=[],st=!1,ct=nt,ut=function(){et=0,it=0,nt=[],rt=[],at=[],Qt=Kt(),te=Kt()};y.__private__.setCustomOutputDestination=function(t){st=!0,ct=t};var ht=function(t){st||(ct=t)};y.__private__.resetCustomOutputDestination=function(){st=!1,ct=nt};var lt=y.__private__.out=function(t){return t=t.toString(),it+=t.length+1,ct.push(t),ct},ft=y.__private__.write=function(t){return lt(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},dt=y.__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},pt=[["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]];y.__private__.getStandardFonts=function(){return pt};var gt=e.fontSize||16;y.__private__.setFontSize=y.setFontSize=function(t){return gt=S===x.ADVANCED?t/_t:t,this};var mt,vt=y.__private__.getFontSize=y.getFontSize=function(){return S===x.COMPAT?gt:gt*_t},bt=e.R2L||!1;y.__private__.setR2L=y.setR2L=function(t){return bt=t,this},y.__private__.getR2L=y.getR2L=function(){return bt};var yt,wt=y.__private__.setZoomMode=function(t){var e=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))mt=t;else if(isNaN(t)){if(-1===e.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.');mt=t}else mt=parseInt(t,10)};y.__private__.getZoomMode=function(){return mt};var Nt,Lt=y.__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.');yt=t};y.__private__.getPageMode=function(){return yt};var At=y.__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.');Nt=t};y.__private__.getLayoutMode=function(){return Nt},y.__private__.setDisplayMode=y.setDisplayMode=function(t,e,r){return wt(t),At(e),Lt(r),this};var xt={title:"",subject:"",author:"",keywords:"",creator:""};y.__private__.getDocumentProperty=function(t){if(-1===Object.keys(xt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return xt[t]},y.__private__.getDocumentProperties=function(){return xt},y.__private__.setDocumentProperties=y.setProperties=y.setDocumentProperties=function(t){for(var e in xt)xt.hasOwnProperty(e)&&t[e]&&(xt[e]=t[e]);return this},y.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(xt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return xt[t]=e};var St,_t,Pt,kt,It,Ft={},Ct={},jt=[],Ot={},Bt={},Mt={},Et={},qt=null,Dt=0,Rt=[],Tt=new C(y),Ut=e.hotfixes||[],zt={},Ht={},Wt=[],Vt=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(Vt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Vt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Vt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Vt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Vt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Vt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Vt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Vt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Vt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Vt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Vt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Vt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Vt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Vt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Vt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Vt.prototype,"isIdentity",{get:function(){return 1===this.sx&&(0===this.shy&&(0===this.shx&&(1===this.sy&&(0===this.tx&&0===this.ty))))}}),Vt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(O).join(t)},Vt.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 Vt(e,r,n,i,a,o)},Vt.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 c=Math.sqrt(r*r+n*n);return s/=c,t*(n/=c)<e*(r/=c)&&(t=-t,e=-e,s=-s,o=-o),{scale:new Vt(o,0,0,c,0,0),translate:new Vt(1,0,0,1,i,a),rotate:new Vt(t,e,-e,t,0,0),skew:new Vt(1,0,s,1,0,0)}},Vt.prototype.toString=function(t){return this.join(" ")},Vt.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,c=-e*o,u=-r*o,h=t*o;return new Vt(s,c,u,h,-s*i-u*a,-c*i-h*a)},Vt.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 Cr(e,r)},Vt.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),r=this.applyToPoint(new Cr(t.x+t.w,t.y+t.h));return new jr(e.x,e.y,r.x-e.x,r.y-e.y)},Vt.prototype.clone=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,a=this.ty;return new Vt(t,e,r,n,i,a)},y.Matrix=Vt;var Gt=y.matrixMult=function(t,e){return e.multiply(t)},Yt=new Vt(1,0,0,1,0,0);y.unitMatrix=y.identityMatrix=Yt;var Jt=function(t,e){if(!Bt[t]){var r=(e instanceof B?"Sh":"P")+(Object.keys(Ot).length+1).toString(10);e.id=r,Bt[t]=r,Ot[r]=e,Tt.publish("addPattern",e)}};y.ShadingPattern=B,y.TilingPattern=M,y.addShadingPattern=function(t,e){return q("addShadingPattern()"),Jt(t,e),this},y.beginTilingPattern=function(t){q("beginTilingPattern()"),Br(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},y.endTilingPattern=function(t,e){q("endTilingPattern()"),e.stream=ot[$].join("\n"),Jt(t,e),Tt.publish("endTilingPattern",e),Wt.pop().restore()};var Xt=y.__private__.newObject=function(){var t=Kt();return Zt(t,!0),t},Kt=y.__private__.newObjectDeferred=function(){return et++,rt[et]=function(){return it},et},Zt=function(t,e){return e="boolean"==typeof e&&e,rt[t]=it,e&&lt(t+" 0 obj"),t},$t=y.__private__.newAdditionalObject=function(){var t={objId:Kt(),content:""};return at.push(t),t},Qt=Kt(),te=Kt(),ee=y.__private__.decodeColorString=function(t){var e=t.split(" ");if(2!==e.length||"g"!==e[1]&&"G"!==e[1]){if(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=y.__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 c=new f(n);if(c.ok)n=c.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 u=parseInt(n.substr(1),16);n=u>>16&255,i=u>>8&255,a=255&u}if(void 0===i||void 0===o&&n===i&&i===a)if("string"==typeof n)r=n+" "+s[0];else switch(e.precision){case 2:r=R(n/255)+" "+s[0];break;case 3:default:r=T(n/255)+" "+s[0]}else if(void 0===o||"object"===t(o)){if(o&&!isNaN(o.a)&&0===o.a)return r=["1.","1.","1.",s[1]].join(" ");if("string"==typeof n)r=[n,i,a,s[1]].join(" ");else switch(e.precision){case 2:r=[R(n/255),R(i/255),R(a/255),s[1]].join(" ");break;default:case 3:r=[T(n/255),T(i/255),T(a/255),s[1]].join(" ")}}else if("string"==typeof n)r=[n,i,a,o,s[2]].join(" ");else switch(e.precision){case 2:r=[R(n),R(i),R(a),R(o),s[2]].join(" ");break;case 3:default:r=[T(n),T(i),T(a),T(o),s[2]].join(" ")}return r},ne=y.__private__.getFilters=function(){return u},ie=y.__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!==m&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==m&&(s=Ye.encryptor(o,0));var c={};!0===r&&(r=["FlateEncode"]);var u=t.additionalKeyValues||[],h=(c=void 0!==E.API.processDataByFilters?E.API.processDataByFilters(e,r):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==c.data.length&&(u.push({key:"Length",value:c.data.length}),!0===i&&u.push({key:"Length1",value:a})),0!=h.length)if(h.split("/").length-1==1)u.push({key:"Filter",value:h});else{u.push({key:"Filter",value:"["+h+"]"});for(var l=0;l<u.length;l+=1)if("DecodeParms"===u[l].key){for(var f=[],d=0;d<c.reverseChain.split("/").length-1;d+=1)f.push("null");f.push(u[l].value),u[l].value="["+f.join(" ")+"]"}}lt("<<");for(var p=0;p<u.length;p++)lt("/"+u[p].key+" "+u[p].value);lt(">>"),0!==c.data.length&&(lt("stream"),lt(s(c.data)),lt("endstream"))},ae=y.__private__.putPage=function(t){var e=t.number,r=t.data,n=t.objId,i=t.contentsObjId;Zt(n,!0),lt("<</Type /Page"),lt("/Parent "+t.rootDictionaryObjId+" 0 R"),lt("/Resources "+t.resourceDictionaryObjId+" 0 R"),lt("/MediaBox ["+parseFloat(O(t.mediaBox.bottomLeftX))+" "+parseFloat(O(t.mediaBox.bottomLeftY))+" "+O(t.mediaBox.topRightX)+" "+O(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&lt("/CropBox ["+O(t.cropBox.bottomLeftX)+" "+O(t.cropBox.bottomLeftY)+" "+O(t.cropBox.topRightX)+" "+O(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&lt("/BleedBox ["+O(t.bleedBox.bottomLeftX)+" "+O(t.bleedBox.bottomLeftY)+" "+O(t.bleedBox.topRightX)+" "+O(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&lt("/TrimBox ["+O(t.trimBox.bottomLeftX)+" "+O(t.trimBox.bottomLeftY)+" "+O(t.trimBox.topRightX)+" "+O(t.trimBox.topRightY)+"]"),null!==t.artBox&&lt("/ArtBox ["+O(t.artBox.bottomLeftX)+" "+O(t.artBox.bottomLeftY)+" "+O(t.artBox.topRightX)+" "+O(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&lt("/UserUnit "+t.userUnit),Tt.publish("putPage",{objId:n,pageContext:Rt[e],pageNumber:e,page:r}),lt("/Contents "+i+" 0 R"),lt(">>"),lt("endobj");var a=r.join("\n");return S===x.ADVANCED&&(a+="\nQ"),Zt(i,!0),ie({data:a,filters:ne(),objectId:i}),lt("endobj"),n},oe=y.__private__.putPages=function(){var t,e,r=[];for(t=1;t<=Dt;t++)Rt[t].objId=Kt(),Rt[t].contentsObjId=Kt();for(t=1;t<=Dt;t++)r.push(ae({number:t,data:ot[t],objId:Rt[t].objId,contentsObjId:Rt[t].contentsObjId,mediaBox:Rt[t].mediaBox,cropBox:Rt[t].cropBox,bleedBox:Rt[t].bleedBox,trimBox:Rt[t].trimBox,artBox:Rt[t].artBox,userUnit:Rt[t].userUnit,rootDictionaryObjId:Qt,resourceDictionaryObjId:te}));Zt(Qt,!0),lt("<</Type /Pages");var n="/Kids [";for(e=0;e<Dt;e++)n+=r[e]+" 0 R ";lt(n+"]"),lt("/Count "+Dt),lt(">>"),lt("endobj"),Tt.publish("postPutPages")},se=function(t){Tt.publish("putFont",{font:t,out:lt,newObject:Xt,putStream:ie}),!0!==t.isAlreadyPutted&&(t.objectNumber=Xt(),lt("<<"),lt("/Type /Font"),lt("/BaseFont /"+F(t.postScriptName)),lt("/Subtype /Type1"),"string"==typeof t.encoding&&lt("/Encoding /"+t.encoding),lt("/FirstChar 32"),lt("/LastChar 255"),lt(">>"),lt("endobj"))},ce=function(){for(var t in Ft)Ft.hasOwnProperty(t)&&(!1===v||!0===v&&b.hasOwnProperty(t))&&se(Ft[t])},ue=function(t){t.objectNumber=Xt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[O(t.x),O(t.y),O(t.x+t.width),O(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}),lt("endobj")},he=function(){for(var t in zt)zt.hasOwnProperty(t)&&ue(zt[t])},le=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="",c=0,u=0;u<n.length;u++){for(r=n[u];r>t[c+1].offset;)c++;var h=t[c].offset,l=(r-h)/(t[c+1].offset-h),f=t[c].color,d=t[c+1].color;s+=tt(Math.round((1-l)*f[0]+l*d[0]).toString(16))+tt(Math.round((1-l)*f[1]+l*d[1]).toString(16))+tt(Math.round((1-l)*f[2]+l*d[2]).toString(16))}return s.trim()},fe=function(t,e){e||(e=21);var r=Xt(),n=le(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}),lt("endobj"),t.objectNumber=Xt(),lt("<< /ShadingType "+t.type),lt("/ColorSpace /DeviceRGB");var a="/Coords ["+O(parseFloat(t.coords[0]))+" "+O(parseFloat(t.coords[1]))+" ";2===t.type?a+=O(parseFloat(t.coords[2]))+" "+O(parseFloat(t.coords[3])):a+=O(parseFloat(t.coords[2]))+" "+O(parseFloat(t.coords[3]))+" "+O(parseFloat(t.coords[4]))+" "+O(parseFloat(t.coords[5])),lt(a+="]"),t.matrix&&lt("/Matrix ["+t.matrix.toString()+"]"),lt("/Function "+r+" 0 R"),lt("/Extend [true true]"),lt(">>"),lt("endobj")},de=function(t,e){var r=Kt(),n=Xt();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(O).join(" ")+"]"}),i.push({key:"XStep",value:O(t.xStep)}),i.push({key:"YStep",value:O(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}),lt("endobj")},pe=function(t){var e;for(e in Ot)Ot.hasOwnProperty(e)&&(Ot[e]instanceof B?fe(Ot[e]):Ot[e]instanceof M&&de(Ot[e],t))},ge=function(t){for(var e in t.objectNumber=Xt(),lt("<<"),t)switch(e){case"opacity":lt("/ca "+R(t[e]));break;case"stroke-opacity":lt("/CA "+R(t[e]))}lt(">>"),lt("endobj")},me=function(){var t;for(t in Mt)Mt.hasOwnProperty(t)&&ge(Mt[t])},ve=function(){for(var t in lt("/XObject <<"),zt)zt.hasOwnProperty(t)&&zt[t].objectNumber>=0&&lt("/"+t+" "+zt[t].objectNumber+" 0 R");Tt.publish("putXobjectDict"),lt(">>")},be=function(){Ye.oid=Xt(),lt("<<"),lt("/Filter /Standard"),lt("/V "+Ye.v),lt("/R "+Ye.r),lt("/U <"+Ye.toHexString(Ye.U)+">"),lt("/O <"+Ye.toHexString(Ye.O)+">"),lt("/P "+Ye.P),lt(">>"),lt("endobj")},ye=function(){for(var t in lt("/Font <<"),Ft)Ft.hasOwnProperty(t)&&(!1===v||!0===v&&b.hasOwnProperty(t))&&lt("/"+t+" "+Ft[t].objectNumber+" 0 R");lt(">>")},we=function(){if(Object.keys(Ot).length>0){for(var t in lt("/Shading <<"),Ot)Ot.hasOwnProperty(t)&&Ot[t]instanceof B&&Ot[t].objectNumber>=0&&lt("/"+t+" "+Ot[t].objectNumber+" 0 R");Tt.publish("putShadingPatternDict"),lt(">>")}},Ne=function(t){if(Object.keys(Ot).length>0){for(var e in lt("/Pattern <<"),Ot)Ot.hasOwnProperty(e)&&Ot[e]instanceof y.TilingPattern&&Ot[e].objectNumber>=0&&Ot[e].objectNumber<t&&lt("/"+e+" "+Ot[e].objectNumber+" 0 R");Tt.publish("putTilingPatternDict"),lt(">>")}},Le=function(){if(Object.keys(Mt).length>0){var t;for(t in lt("/ExtGState <<"),Mt)Mt.hasOwnProperty(t)&&Mt[t].objectNumber>=0&&lt("/"+t+" "+Mt[t].objectNumber+" 0 R");Tt.publish("putGStateDict"),lt(">>")}},Ae=function(t){Zt(t.resourcesOid,!0),lt("<<"),lt("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ye(),we(),Ne(t.objectOid),Le(),ve(),lt(">>"),lt("endobj")},xe=function(){var t=[];ce(),me(),he(),pe(t),Tt.publish("putResources"),t.forEach(Ae),Ae({resourcesOid:te,objectOid:Number.MAX_SAFE_INTEGER}),Tt.publish("postPutResources")},Se=function(){Tt.publish("putAdditionalObjects");for(var t=0;t<at.length;t++){var e=at[t];Zt(e.objId,!0),lt(e.content),lt("endobj")}Tt.publish("postPutAdditionalObjects")},_e=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 Tt.publish("addFont",{font:a,instance:this}),Ft[a.id]=a,_e(a),a.id},ke=function(t){for(var e=0,r=pt.length;e<r;e++){var n=Pe.call(this,t[e][0],t[e][1],t[e][2],pt[e][3],!0);!1===v&&(b[n]=!0);var i=t[e][0].split("-");_e({id:n,fontName:i[0],fontStyle:i[1]||""})}Tt.publish("addFonts",{fonts:Ft,dictionary:Ct})},Ie=function(t){return t.foo=function(){try{return t.apply(this,arguments)}catch(t){var e=t.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var r="Error in function "+e.split("\n")[0].split("<")[0]+": "+t.message;if(!n.console)throw new Error(r);n.console.error(r,t),n.alert&&alert(r)}},t.foo.bar=t,t.foo},Fe=function(t,e){var r,n,i,a,o,s,c,u,h;if(i=(e=e||{}).sourceEncoding||"Unicode",o=e.outputEncoding,(e.autoencode||o)&&Ft[St].metadata&&Ft[St].metadata[i]&&Ft[St].metadata[i].encoding&&(a=Ft[St].metadata[i].encoding,!o&&Ft[St].encoding&&(o=Ft[St].encoding),!o&&a.codePages&&(o=a.codePages[0]),"string"==typeof o&&(o=a[o]),o)){for(c=!1,s=[],r=0,n=t.length;r<n;r++)(u=o[t.charCodeAt(r)])?s.push(String.fromCharCode(u)):s.push(t[r]),s[r].charCodeAt(0)>>8&&(c=!0);t=s.join("")}for(r=t.length;void 0===c&&0!==r;)t.charCodeAt(r-1)>>8&&(c=!0),r--;if(!c)return t;for(s=e.noBOM?[]:[254,255],r=0,n=t.length;r<n;r++){if((h=(u=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(h),s.push(u-(h<<8))}return String.fromCharCode.apply(void 0,s)},Ce=y.__private__.pdfEscape=y.pdfEscape=function(t,e){return Fe(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},je=y.__private__.beginPage=function(t){ot[++Dt]=[],Rt[Dt]={objId:0,contentsObjId:0,userUnit:Number(d),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},Me(Dt),ht(ot[$])},Oe=function(t,e){var r,n,o;switch(i=e||i,"string"==typeof t&&(r=A(t.toLowerCase()),Array.isArray(r)&&(n=r[0],o=r[1])),Array.isArray(t)&&(n=t[0]*_t,o=t[1]*_t),isNaN(n)&&(n=s[0],o=s[1]),(n>14400||o>14400)&&(a.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),n=Math.min(14400,n),o=Math.min(14400,o)),s=[n,o],i.substr(0,1)){case"l":o>n&&(s=[o,n]);break;case"p":n>o&&(s=[o,n])}je(s),pr(fr),lt(Lr),0!==kr&&lt(kr+" J"),0!==Ir&&lt(Ir+" j"),Tt.publish("addPage",{pageNumber:Dt})},Be=function(t){t>0&&t<=Dt&&(ot.splice(t,1),Rt.splice(t,1),Dt--,$>Dt&&($=Dt),this.setPage($))},Me=function(t){t>0&&t<=Dt&&($=t)},Ee=y.__private__.getNumberOfPages=y.getNumberOfPages=function(){return ot.length-1},qe=function(t,e,r){var n,i=void 0;return r=r||{},t=void 0!==t?t:Ft[St].fontName,e=void 0!==e?e:Ft[St].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&&a.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},De=y.__private__.putInfo=function(){var t=Xt(),e=function(t){return t};for(var r in null!==m&&(e=Ye.encryptor(t,0)),lt("<<"),lt("/Producer ("+Ce(e("jsPDF "+E.version))+")"),xt)xt.hasOwnProperty(r)&&xt[r]&&lt("/"+r.substr(0,1).toUpperCase()+r.substr(1)+" ("+Ce(e(xt[r]))+")");lt("/CreationDate ("+Ce(e(W))+")"),lt(">>"),lt("endobj")},Re=y.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||Qt;switch(Xt(),lt("<<"),lt("/Type /Catalog"),lt("/Pages "+e+" 0 R"),mt||(mt="fullwidth"),mt){case"fullwidth":lt("/OpenAction [3 0 R /FitH null]");break;case"fullheight":lt("/OpenAction [3 0 R /FitV null]");break;case"fullpage":lt("/OpenAction [3 0 R /Fit]");break;case"original":lt("/OpenAction [3 0 R /XYZ null null 1]");break;default:var r=""+mt;"%"===r.substr(r.length-1)&&(mt=parseInt(mt)/100),"number"==typeof mt&&lt("/OpenAction [3 0 R /XYZ null null "+R(mt)+"]")}switch(Nt||(Nt="continuous"),Nt){case"continuous":lt("/PageLayout /OneColumn");break;case"single":lt("/PageLayout /SinglePage");break;case"two":case"twoleft":lt("/PageLayout /TwoColumnLeft");break;case"tworight":lt("/PageLayout /TwoColumnRight")}yt&&lt("/PageMode /"+yt),Tt.publish("putCatalog"),lt(">>"),lt("endobj")},Te=y.__private__.putTrailer=function(){lt("trailer"),lt("<<"),lt("/Size "+(et+1)),lt("/Root "+et+" 0 R"),lt("/Info "+(et-1)+" 0 R"),null!==m&&lt("/Encrypt "+Ye.oid+" 0 R"),lt("/ID [ <"+V+"> <"+V+"> ]"),lt(">>")},Ue=y.__private__.putHeader=function(){lt("%PDF-"+w),lt("%ºß¬à")},ze=y.__private__.putXRef=function(){var t="0000000000";lt("xref"),lt("0 "+(et+1)),lt("0000000000 65535 f ");for(var e=1;e<=et;e++){"function"==typeof rt[e]?lt((t+rt[e]()).slice(-10)+" 00000 n "):void 0!==rt[e]?lt((t+rt[e]).slice(-10)+" 00000 n "):lt("0000000000 00000 n ")}},He=y.__private__.buildDocument=function(){ut(),ht(nt),Tt.publish("buildDocument"),Ue(),oe(),Se(),xe(),null!==m&&be(),De(),Re();var t=it;return ze(),Te(),lt("startxref"),lt(""+t),lt("%%EOF"),ht(ot[$]),nt.join("\n")},We=y.__private__.getBlob=function(t){return new Blob([dt(t)],{type:"application/pdf"})},Ve=y.output=y.__private__.output=Ie((function(t,e){switch("string"==typeof(e=e||{})?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return He();case"save":y.save(e.filename);break;case"arraybuffer":return dt(He());case"blob":return We(He());case"bloburi":case"bloburl":if(void 0!==n.URL&&"function"==typeof n.URL.createObjectURL)return n.URL&&n.URL.createObjectURL(We(He()))||void 0;a.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var r="",i=He();try{r=h(i)}catch(t){r=h(unescape(encodeURIComponent(i)))}return"data:application/pdf;filename="+e.filename+";base64,"+r;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(n)){var o="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",s=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';e.pdfObjectUrl&&(o=e.pdfObjectUrl,s="");var c='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+o+'"'+s+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(e)+");<\/script></body></html>",u=n.open();return null!==u&&u.document.write(c),u}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(n)){var l='<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>',f=n.open();if(null!==f){f.document.write(l);var d=this;f.document.documentElement.querySelector("#pdfViewer").onload=function(){f.document.title=e.filename,f.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(d.output("bloburl"))}}return f}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(n))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var p='<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>',g=n.open();if(null!==g&&(g.document.write(p),g.document.title=e.filename),g||"undefined"==typeof safari)return g;break;case"datauri":case"dataurl":return n.document.location.href=this.output("datauristring",e);default:return null}})),Ge=function(t){return!0===Array.isArray(Ut)&&Ut.indexOf(t)>-1};switch(o){case"pt":_t=1;break;case"mm":_t=72/25.4;break;case"cm":_t=72/2.54;break;case"in":_t=72;break;case"px":_t=1==Ge("px_scaling")?.75:96/72;break;case"pc":case"em":_t=12;break;case"ex":_t=6;break;default:if("number"!=typeof o)throw new Error("Invalid unit: "+o);_t=o}var Ye=null;K(),Y();var Je=function(t){return null!==m?Ye.encryptor(t,0):function(t){return t}},Xe=y.__private__.getPageInfo=y.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Rt[t].objId,pageNumber:t,pageContext:Rt[t]}},Ke=y.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var e in Rt)if(Rt[e].objId===t)break;return Xe(e)},Ze=y.__private__.getCurrentPageInfo=y.getCurrentPageInfo=function(){return{objId:Rt[$].objId,pageNumber:$,pageContext:Rt[$]}};y.addPage=function(){return Oe.apply(this,arguments),this},y.setPage=function(){return Me.apply(this,arguments),ht.call(this,ot[$]),this},y.insertPage=function(t){return this.addPage(),this.movePage($,t),this},y.movePage=function(t,e){var r,n;if(t>e){r=ot[t],n=Rt[t];for(var i=t;i>e;i--)ot[i]=ot[i-1],Rt[i]=Rt[i-1];ot[e]=r,Rt[e]=n,this.setPage(e)}else if(t<e){r=ot[t],n=Rt[t];for(var a=t;a<e;a++)ot[a]=ot[a+1],Rt[a]=Rt[a+1];ot[e]=r,Rt[e]=n,this.setPage(e)}return this},y.deletePage=function(){return Be.apply(this,arguments),this},y.__private__.text=y.text=function(e,r,n,i,a){var o,s,c,u,h,l,f,d,p,g=(i=i||{}).scope||this;if("number"==typeof e&&"number"==typeof r&&("string"==typeof n||Array.isArray(n))){var m=n;n=r,r=e,e=m}if(arguments[3]instanceof Vt==!1?(c=arguments[4],u=arguments[5],"object"===t(f=arguments[3])&&null!==f||("string"==typeof c&&(u=c,c=null),"string"==typeof f&&(u=f,f=null),"number"==typeof f&&(c=f,f=null),i={flags:f,angle:c,align:u})):(q("The transform parameter of text() with a Matrix value"),p=a),isNaN(r)||isNaN(n)||null==e)throw new Error("Invalid arguments passed to jsPDF.text");if(0===e.length)return g;var v="",y=!1,w="number"==typeof i.lineHeightFactor?i.lineHeightFactor:lr,N=g.internal.scaleFactor;function L(t){return t=t.split("\t").join(Array(i.TabLen||9).join(" ")),Ce(t,f)}function A(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 _(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 P=!1,k=!0;if("string"==typeof e)P=!0;else if(Array.isArray(e)){var I=e.concat();s=[];for(var F,C=I.length;C--;)("string"!=typeof(F=I.shift())||Array.isArray(F)&&"string"!=typeof F[0])&&(k=!1);P=k}if(!1===P)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 j=gt/g.internal.scaleFactor,B=j*(w-1);switch(i.baseline){case"bottom":n-=B;break;case"top":n+=j-B;break;case"hanging":n+=j-2*B;break;case"middle":n+=j/2-B}if((l=i.maxWidth||0)>0&&("string"==typeof e?e=g.splitTextToSize(e,l):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce((function(t,e){return t.concat(g.splitTextToSize(e,l))}),[]))),o={text:e,x:r,y:n,options:i,mutex:{pdfEscape:Ce,activeFontKey:St,fonts:Ft,activeFontSize:gt}},Tt.publish("preProcessText",o),e=o.text,c=(i=o.options).angle,p instanceof Vt==!1&&c&&"number"==typeof c){c*=Math.PI/180,0===i.rotationDirection&&(c=-c),S===x.ADVANCED&&(c=-c);var M=Math.cos(c),E=Math.sin(c);p=new Vt(M,E,-E,M,0,0)}else c&&c instanceof Vt&&(p=c);S!==x.ADVANCED||p||(p=Yt),void 0!==(h=i.charSpace||_r)&&(v+=O(U(h))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(d=i.horizontalScale)&&(v+=O(100*d)+" Tz\n");i.lang;var D=-1,R=void 0!==i.renderingMode?i.renderingMode:i.stroke,T=g.internal.getCurrentPageInfo().pageContext;switch(R){case 0:case!1:case"fill":D=0;break;case 1:case!0:case"stroke":D=1;break;case 2:case"fillThenStroke":D=2;break;case 3:case"invisible":D=3;break;case 4:case"fillAndAddForClipping":D=4;break;case 5:case"strokeAndAddPathForClipping":D=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":D=6;break;case 7:case"addToPathForClipping":D=7}var z=void 0!==T.usedRenderingMode?T.usedRenderingMode:-1;-1!==D?v+=D+" Tr\n":-1!==z&&(v+="0 Tr\n"),-1!==D&&(T.usedRenderingMode=D),u=i.align||"left";var H,W=gt*w,V=g.internal.pageSize.getWidth(),G=Ft[St];h=i.charSpace||_r,l=i.maxWidth||0,f=Object.assign({autoencode:!0,noBOM:!0},i.flags);var Y=[],J=function(t){return g.getStringUnitWidth(t,{font:G,charSpace:h,fontSize:gt,doKerning:!1})*gt/N};if("[object Array]"===Object.prototype.toString.call(e)){var X;s=A(e),"left"!==u&&(H=s.map(J));var K,Z=0;if("right"===u){r-=H[0],e=[],C=s.length;for(var $=0;$<C;$++)0===$?(K=br(r),X=yr(n)):(K=U(Z-H[$]),X=-W),e.push([s[$],K,X]),Z=H[$]}else if("center"===u){r-=H[0]/2,e=[],C=s.length;for(var Q=0;Q<C;Q++)0===Q?(K=br(r),X=yr(n)):(K=U((Z-H[Q])/2),X=-W),e.push([s[Q],K,X]),Z=H[Q]}else if("left"===u){e=[],C=s.length;for(var tt=0;tt<C;tt++)e.push(s[tt])}else if("justify"===u&&"Identity-H"===G.encoding){e=[],C=s.length,l=0!==l?l:V;for(var et=0,rt=0;rt<C;rt++)if(X=0===rt?yr(n):-W,K=0===rt?br(r):et,rt<C-1){var nt=U((l-H[rt])/(s[rt].split(" ").length-1)),it=s[rt].split(" ");e.push([it[0]+" ",K,X]),et=0;for(var at=1;at<it.length;at++){var ot=(J(it[at-1]+" "+it[at])-J(it[at]))*N+nt;at==it.length-1?e.push([it[at],ot,0]):e.push([it[at]+" ",ot,0]),et-=ot}}else e.push([s[rt],K,X]);e.push(["",et,0])}else{if("justify"!==u)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');e=[],C=s.length,l=0!==l?l:V;for(rt=0;rt<C;rt++)X=0===rt?yr(n):-W,K=0===rt?br(r):0,rt<C-1?Y.push(O(U((l-H[rt])/(s[rt].split(" ").length-1)))):Y.push(0),e.push([s[rt],K,X])}}var st="boolean"==typeof i.R2L?i.R2L:bt;!0===st&&(e=_(e,(function(t,e,r){return[t.split("").reverse().join(""),e,r]}))),o={text:e,x:r,y:n,options:i,mutex:{pdfEscape:Ce,activeFontKey:St,fonts:Ft,activeFontSize:gt}},Tt.publish("postProcessText",o),e=o.text,y=o.mutex.isHex||!1;var ct=Ft[St].encoding;"WinAnsiEncoding"!==ct&&"StandardEncoding"!==ct||(e=_(e,(function(t,e,r){return[L(t),e,r]}))),s=A(e),e=[];for(var ut,ht,ft,dt=0,pt=1,mt=Array.isArray(s[0])?pt:dt,vt="",yt=function(t,e,r){var n="";return r instanceof Vt?(r="number"==typeof i.angle?Gt(r,new Vt(1,0,0,1,t,e)):Gt(new Vt(1,0,0,1,t,e),r),S===x.ADVANCED&&(r=Gt(new Vt(1,0,0,-1,0,0),r)),n=r.join(" ")+" Tm\n"):n=O(t)+" "+O(e)+" Td\n",n},wt=0;wt<s.length;wt++){switch(vt="",mt){case pt:ft=(y?"<":"(")+s[wt][0]+(y?">":")"),ut=parseFloat(s[wt][1]),ht=parseFloat(s[wt][2]);break;case dt:ft=(y?"<":"(")+s[wt]+(y?">":")"),ut=br(r),ht=yr(n)}void 0!==Y&&void 0!==Y[wt]&&(vt=Y[wt]+" Tw\n"),0===wt?e.push(vt+yt(ut,ht,p)+ft):mt===dt?e.push(vt+ft):mt===pt&&e.push(vt+yt(ut,ht,p)+ft)}e=mt===dt?e.join(" Tj\nT* "):e.join(" Tj\n"),e+=" Tj\n";var Nt="BT\n/";return Nt+=St+" "+gt+" Tf\n",Nt+=O(gt*w)+" TL\n",Nt+=xr+"\n",Nt+=v,Nt+=e,lt(Nt+="ET"),b[St]=!0,g};var $e=y.__private__.clip=y.clip=function(t){return lt("evenodd"===t?"W*":"W"),this};y.clipEvenOdd=function(){return $e("evenodd")},y.__private__.discardPath=y.discardPath=function(){return lt("n"),this};var Qe=y.__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};y.__private__.setDefaultPathOperation=y.setDefaultPathOperation=function(t){return Qe(t)&&(g=t),this};var tr=y.__private__.getStyle=y.getStyle=function(t){var e=g;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},er=y.close=function(){return lt("h"),this};y.stroke=function(){return lt("S"),this},y.fill=function(t){return rr("f",t),this},y.fillEvenOdd=function(t){return rr("f*",t),this},y.fillStroke=function(t){return rr("B",t),this},y.fillStrokeEvenOdd=function(t){return rr("B*",t),this};var rr=function(e,r){"object"===t(r)?ar(r,e):lt(e)},nr=function(t){null===t||S===x.ADVANCED&&void 0===t||(t=tr(t),lt(t))};function ir(t,e,r,n,i){var a=new M(e||this.boundingBox,r||this.xStep,n||this.yStep,this.gState,i||this.matrix);a.stream=this.stream;var o=t+"$$"+this.cloneIndex+++"$$";return Jt(o,a),a}var ar=function(t,e){var r=Bt[t.key],n=Ot[r];if(n instanceof B)lt("q"),lt(or(e)),n.gState&&y.setGState(n.gState),lt(t.matrix.toString()+" cm"),lt("/"+r+" sh"),lt("Q");else if(n instanceof M){var i=new Vt(1,0,0,-1,0,Rr());t.matrix&&(i=i.multiply(t.matrix||Yt),r=ir.call(n,t.key,t.boundingBox,t.xStep,t.yStep,i).id),lt("q"),lt("/Pattern cs"),lt("/"+r+" scn"),n.gState&&y.setGState(n.gState),lt(e),lt("Q")}},or=function(t){switch(t){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},sr=y.moveTo=function(t,e){return lt(O(U(t))+" "+O(H(e))+" m"),this},cr=y.lineTo=function(t,e){return lt(O(U(t))+" "+O(H(e))+" l"),this},ur=y.curveTo=function(t,e,r,n,i,a){return lt([O(U(t)),O(H(e)),O(U(r)),O(H(n)),O(U(i)),O(H(a)),"c"].join(" ")),this};y.__private__.line=y.line=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Qe(i))throw new Error("Invalid arguments passed to jsPDF.line");return S===x.COMPAT?this.lines([[r-t,n-e]],t,e,[1,1],i||"S"):this.lines([[r-t,n-e]],t,e,[1,1]).stroke()},y.__private__.lines=y.lines=function(t,e,r,n,i,a){var o,s,c,u,h,l,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)||!Qe(i)||"boolean"!=typeof a)throw new Error("Invalid arguments passed to jsPDF.lines");for(sr(e,r),o=n[0],s=n[1],u=t.length,g=e,m=r,c=0;c<u;c++)2===(h=t[c]).length?(g=h[0]*o+g,m=h[1]*s+m,cr(g,m)):(l=h[0]*o+g,f=h[1]*s+m,d=h[2]*o+g,p=h[3]*s+m,g=h[4]*o+g,m=h[5]*s+m,ur(l,f,d,p,g,m));return a&&er(),nr(i),this},y.path=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r.c;switch(r.op){case"m":sr(n[0],n[1]);break;case"l":cr(n[0],n[1]);break;case"c":ur.apply(this,n);break;case"h":er()}}return this},y.__private__.rect=y.rect=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Qe(i))throw new Error("Invalid arguments passed to jsPDF.rect");return S===x.COMPAT&&(n=-n),lt([O(U(t)),O(H(e)),O(U(r)),O(U(n)),"re"].join(" ")),nr(i),this},y.__private__.triangle=y.triangle=function(t,e,r,n,i,a,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(a)||!Qe(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},y.__private__.roundedRect=y.roundedRect=function(t,e,r,n,i,a,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(a)||!Qe(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},y.__private__.ellipse=y.ellipse=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Qe(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 sr(t+r,e),ur(t+r,e-o,t+a,e-n,t,e-n),ur(t-a,e-n,t-r,e-o,t-r,e),ur(t-r,e+o,t-a,e+n,t,e+n),ur(t+a,e+n,t+r,e+o,t+r,e),nr(i),this},y.__private__.circle=y.circle=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||!Qe(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,e,r,r,n)},y.setFont=function(t,e,r){return r&&(e=k(e,r)),St=qe(t,e,{disableWarning:!1}),this};var hr=y.__private__.getFont=y.getFont=function(){return Ft[qe.apply(y,arguments)]};y.__private__.getFontList=y.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},y.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=k(r,n)),i=i||"Identity-H",Pe.call(this,t,e,r,i)};var lr,fr=e.lineWidth||.200025,dr=y.__private__.getLineWidth=y.getLineWidth=function(){return fr},pr=y.__private__.setLineWidth=y.setLineWidth=function(t){return fr=t,lt(O(U(t))+" w"),this};y.__private__.setLineDash=E.API.setLineDash=E.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 O(U(t))})).join(" "),e=O(U(e)),lt("["+t+"] "+e+" d"),this};var gr=y.__private__.getLineHeight=y.getLineHeight=function(){return gt*lr};y.__private__.getLineHeight=y.getLineHeight=function(){return gt*lr};var mr=y.__private__.setLineHeightFactor=y.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(lr=t),this},vr=y.__private__.getLineHeightFactor=y.getLineHeightFactor=function(){return lr};mr(e.lineHeight);var br=y.__private__.getHorizontalCoordinate=function(t){return U(t)},yr=y.__private__.getVerticalCoordinate=function(t){return S===x.ADVANCED?t:Rt[$].mediaBox.topRightY-Rt[$].mediaBox.bottomLeftY-U(t)},wr=y.__private__.getHorizontalCoordinateString=y.getHorizontalCoordinateString=function(t){return O(br(t))},Nr=y.__private__.getVerticalCoordinateString=y.getVerticalCoordinateString=function(t){return O(yr(t))},Lr=e.strokeColor||"0 G";y.__private__.getStrokeColor=y.getDrawColor=function(){return ee(Lr)},y.__private__.setStrokeColor=y.setDrawColor=function(t,e,r,n){return Lr=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"draw",precision:2}),lt(Lr),this};var Ar=e.fillColor||"0 g";y.__private__.getFillColor=y.getFillColor=function(){return ee(Ar)},y.__private__.setFillColor=y.setFillColor=function(t,e,r,n){return Ar=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"fill",precision:2}),lt(Ar),this};var xr=e.textColor||"0 g",Sr=y.__private__.getTextColor=y.getTextColor=function(){return ee(xr)};y.__private__.setTextColor=y.setTextColor=function(t,e,r,n){return xr=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"text",precision:3}),this};var _r=e.charSpace,Pr=y.__private__.getCharSpace=y.getCharSpace=function(){return parseFloat(_r||0)};y.__private__.setCharSpace=y.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return _r=t,this};var kr=0;y.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},y.__private__.setLineCap=y.setLineCap=function(t){var e=y.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 kr=e,lt(e+" J"),this};var Ir=0;y.__private__.setLineJoin=y.setLineJoin=function(t){var e=y.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 Ir=e,lt(e+" j"),this},y.__private__.setLineMiterLimit=y.__private__.setMiterLimit=y.setLineMiterLimit=y.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return lt(O(U(t))+" M"),this},y.GState=j,y.setGState=function(t){(t="string"==typeof t?Mt[Et[t]]:Fr(null,t)).equals(qt)||(lt("/"+t.id+" gs"),qt=t)};var Fr=function(t,e){if(!t||!Et[t]){var r=!1;for(var n in Mt)if(Mt.hasOwnProperty(n)&&Mt[n].equals(e)){r=!0;break}if(r)e=Mt[n];else{var i="GS"+(Object.keys(Mt).length+1).toString(10);Mt[i]=e,e.id=i}return t&&(Et[t]=e.id),Tt.publish("addGState",e),e}};y.addGState=function(t,e){return Fr(t,e),this},y.saveGraphicsState=function(){return lt("q"),jt.push({key:St,size:gt,color:xr}),this},y.restoreGraphicsState=function(){lt("Q");var t=jt.pop();return St=t.key,gt=t.size,xr=t.color,qt=null,this},y.setCurrentTransformationMatrix=function(t){return lt(t.toString()+" cm"),this},y.comment=function(t){return lt("#"+t),this};var Cr=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},jr=function(t,e,r,n){Cr.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},Or=function(){this.page=Dt,this.currentPage=$,this.pages=ot.slice(0),this.pagesContext=Rt.slice(0),this.x=Pt,this.y=kt,this.matrix=It,this.width=qr($),this.height=Rr($),this.outputDestination=ct,this.id="",this.objectNumber=-1};Or.prototype.restore=function(){Dt=this.page,$=this.currentPage,Rt=this.pagesContext,ot=this.pages,Pt=this.x,kt=this.y,It=this.matrix,Dr($,this.width),Tr($,this.height),ct=this.outputDestination};var Br=function(t,e,r,n,i){Wt.push(new Or),Dt=$=0,ot=[],Pt=t,kt=e,It=i,je([r,n])},Mr=function(t){if(Ht[t])Wt.pop().restore();else{var e=new Or,r="Xo"+(Object.keys(zt).length+1).toString(10);e.id=r,Ht[t]=r,zt[r]=e,Tt.publish("addFormObject",e),Wt.pop().restore()}};for(var Er in y.beginFormObject=function(t,e,r,n,i){return Br(t,e,r,n,i),this},y.endFormObject=function(t){return Mr(t),this},y.doFormObject=function(t,e){var r=zt[Ht[t]];return lt("q"),lt(e.toString()+" cm"),lt("/"+r.id+" Do"),lt("Q"),this},y.getFormObject=function(t){var e=zt[Ht[t]];return{x:e.x,y:e.y,width:e.width,height:e.height,matrix:e.matrix}},y.save=function(t,e){return t=t||"generated.pdf",(e=e||{}).returnPromise=e.returnPromise||!1,!1===e.returnPromise?(l(We(He()),t),"function"==typeof l.unload&&n.setTimeout&&setTimeout(l.unload,911),this):new Promise((function(e,r){try{var i=l(We(He()),t);"function"==typeof l.unload&&n.setTimeout&&setTimeout(l.unload,911),e(i)}catch(t){r(t.message)}}))},E.API)E.API.hasOwnProperty(Er)&&("events"===Er&&E.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))}(Tt,E.API.events):y[Er]=E.API[Er]);var qr=y.getPageWidth=function(t){return(Rt[t=t||$].mediaBox.topRightX-Rt[t].mediaBox.bottomLeftX)/_t},Dr=y.setPageWidth=function(t,e){Rt[t].mediaBox.topRightX=e*_t+Rt[t].mediaBox.bottomLeftX},Rr=y.getPageHeight=function(t){return(Rt[t=t||$].mediaBox.topRightY-Rt[t].mediaBox.bottomLeftY)/_t},Tr=y.setPageHeight=function(t,e){Rt[t].mediaBox.topRightY=e*_t+Rt[t].mediaBox.bottomLeftY};return y.internal={pdfEscape:Ce,getStyle:tr,getFont:hr,getFontSize:vt,getCharSpace:Pr,getTextColor:Sr,getLineHeight:gr,getLineHeightFactor:vr,getLineWidth:dr,write:ft,getHorizontalCoordinate:br,getVerticalCoordinate:yr,getCoordinateString:wr,getVerticalCoordinateString:Nr,collections:{},newObject:Xt,newAdditionalObject:$t,newObjectDeferred:Kt,newObjectDeferredBegin:Zt,getFilters:ne,putStream:ie,events:Tt,scaleFactor:_t,pageSize:{getWidth:function(){return qr($)},setWidth:function(t){Dr($,t)},getHeight:function(){return Rr($)},setHeight:function(t){Tr($,t)}},encryptionOptions:m,encryption:Ye,getEncryptor:Je,output:Ve,getNumberOfPages:Ee,pages:ot,out:lt,f2:R,f3:T,getPageInfo:Xe,getPageInfoByObjId:Ke,getCurrentPageInfo:Ze,getPDFVersion:N,Point:Cr,Rectangle:jr,Matrix:Vt,hasHotfix:Ge},Object.defineProperty(y.internal.pageSize,"width",{get:function(){return qr($)},set:function(t){Dr($,t)},enumerable:!0,configurable:!0}),Object.defineProperty(y.internal.pageSize,"height",{get:function(){return Rr($)},set:function(t){Tr($,t)},enumerable:!0,configurable:!0}),ke.call(y,pt),St="F1",Oe(s,i),Tt.publish("initialized"),y}I.prototype.lsbFirstWord=function(t){return String.fromCharCode(t>>0&255,t>>8&255,t>>16&255,t>>24&255)},I.prototype.toHexString=function(t){return t.split("").map((function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)})).join("")},I.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("")},I.prototype.processOwnerPassword=function(t,e){return P(x(e).substr(0,5),t)},I.prototype.encryptor=function(t,e){var r=x(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(t){return P(r,t)}},j.prototype.equals=function(e){var r,n="id,objectNumber,equals";if(!e||t(e)!==t(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},E.API={events:[]},E.version="2.5.2";var q=E.API,D=1,R=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},T=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},U=function(t){return t.toFixed(2)},z=function(t){return t.toFixed(5)};q.__acroform__={};var H=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},W=function(t){return t*D},V=function(t){var e=new ut,r=At.internal.getHeight(t)||0,n=At.internal.getWidth(t)||0;return e.BBox=[0,0,Number(U(n)),Number(U(r))],e},G=q.__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},Y=q.__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)},J=q.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(t&1<<e)?0:1},X=q.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return J(t,e-1)},K=q.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return G(t,e-1)},Z=q.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Y(t,e-1)},$=q.__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],c={};return c.lowerLeft_X=r(i)||0,c.lowerLeft_Y=n(a+s)||0,c.upperRight_X=r(i+o)||0,c.upperRight_Y=n(a)||0,[Number(U(c.lowerLeft_X)),Number(U(c.lowerLeft_Y)),Number(U(c.upperRight_X)),Number(U(c.upperRight_Y))]},Q=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],r=t._V||t.DV,n=tt(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+" "+U(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=V(t);return a.scope=t.scope,a.stream=e.join("\n"),a}},tt=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=At.internal.getHeight(t)||0;o=o<0?-o:o;var s=At.internal.getWidth(t)||0;s=s<0?-s:s;var c=function(e,r,n){if(e+1<i.length){var a=r+" "+i[e+1][0];return et(a,t,n).width<=s-4}return!1};a++;t:for(;a>0;){e="",a--;var u,h,l=et("3",t,a).height,f=t.multiline?o-a:(o-l)/2,d=f+=2,p=0,g=0,m=0;if(a<=0){e="(...) Tj\n",e+="% Width of Text: "+et(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((l+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 N=parseInt(y),L=c(N,v,a),A=y>=i.length-1;if(L&&!A){v+=" ",m=0;continue}if(L||A){if(A)g=N;else if(t.multiline&&(l+2)*(b+2)+2>o)continue t}else{if(!t.multiline)continue t;if((l+2)*(b+2)+2>o)continue t;g=N}}for(var x="",S=p;S<=g;S++){var _=i[S];if(t.multiline){if(S===g){x+=_[m]+" ",m=(m+1)%_.length;continue}if(S===p){x+=_[_.length-1]+" ";continue}}x+=_[0]+" "}switch(x=" "==x.substr(x.length-1)?x.substr(0,x.length-1):x,h=et(x,t,a).width,t.textAlign){case"right":u=s-h-2;break;case"center":u=(s-h)/2;break;case"left":default:u=2}e+=U(u)+" "+U(d)+" Td\n",e+="("+R(x)+") Tj\n",e+=-U(u)+" 0 Td\n",d=-(a+2),h=0,p=w?g:g+1,b++,v=""}else;break}return n.text=e,n.fontSize=a,n},et=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}},rt={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},nt=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)},it=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"===t(a)&&"function"==typeof a.putStream&&a.putStream(),delete e[i]}},at=function(e,r){if(r.scope=e,void 0!==e.internal&&(void 0===e.internal.acroformPlugin||!1===e.internal.acroformPlugin.isInitialized)){if(lt.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(rt)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");D=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new ht,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",(function(){!function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0}(e)})),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&&nt(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=$(a.Rect,r)),r.internal.newObjectDeferredBegin(a.objId,!0),a.DA=At.createDefaultAppearanceStream(a),"object"===t(a)&&"function"==typeof a.getKeyValueListForStream&&(o=a.getKeyValueListForStream()),a.Rect=s,a.hasAppearanceStream&&!a.appearanceStreamContent){var c=Q(a);o.push({key:"AP",value:"<</N "+c+">>"}),r.internal.acroformPlugin.xForms.push(c)}if(a.appearanceStreamContent){var u="";for(var h in a.appearanceStreamContent)if(a.appearanceStreamContent.hasOwnProperty(h)){var l=a.appearanceStreamContent[h];if(u+="/"+h+" ",u+="<<",Object.keys(l).length>=1||Array.isArray(l)){for(var i in l)if(l.hasOwnProperty(i)){var f=l[i];"function"==typeof f&&(f=f.call(r,a)),u+="/"+i+" "+f+" ",r.internal.acroformPlugin.xForms.indexOf(f)>=0||r.internal.acroformPlugin.xForms.push(f)}}else"function"==typeof(f=l)&&(f=f.call(r,a)),u+="/"+i+" "+f,r.internal.acroformPlugin.xForms.indexOf(f)>=0||r.internal.acroformPlugin.xForms.push(f);u+=">>"}o.push({key:"AP",value:"<<\n"+u+">>"})}r.internal.putStream({additionalKeyValues:o,objectId:a.objId}),r.internal.out("endobj")}n&&it(r.internal.acroformPlugin.xForms,r)}(r,e)})),e.internal.acroformPlugin.isInitialized=!0}},ot=q.__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+=" "),t(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+="("+R(i(e[o].toString()))+")"):a+=e[o].toString()}return a+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")};var st=function(t,e,r){var n=function(t){return t};return void 0!==e&&r&&(n=r.internal.getEncryptor(e)),(t=t||"").toString(),t="("+R(n(t))+")"},ct=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})};ct.prototype.toString=function(){return this.objId+" 0 R"},ct.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},ct.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:ot(i,this.objId,this.scope)}):i instanceof ct?(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 ut=function(){ct.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}})};H(ut,ct);var ht=function(){ct.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)),"("+R(e(t))+")"}},set:function(e){t=e}})};H(ht,ct);var lt=function t(){ct.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(X(e,3))},set:function(t){!0===Boolean(t)?this.F=K(e,3):this.F=Z(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 yt)return;a="FieldObject"+t.FieldNum++}var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+R(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 c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(t){c=t}});var u=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===u?50/D:u},set:function(t){u=t}});var h="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return h},set:function(t){h=t}});var l="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!l||this instanceof yt||this instanceof Nt))return st(l,this.objId,this.scope)},set:function(t){t=t.toString(),l=t}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof mt==!1?st(f,this.objId,this.scope):f},set:function(t){t=t.toString(),f=this instanceof mt==!1?"("===t.substr(0,1)?T(t.substr(1,t.length-2)):T(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof mt==!0?T(f.substr(1,f.length-1)):f},set:function(t){t=t.toString(),f=this instanceof mt==!0?"/"+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 mt==!1?st(d,this.objId,this.scope):d},set:function(t){t=t.toString(),d=this instanceof mt==!1?"("===t.substr(0,1)?T(t.substr(1,t.length-2)):T(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof mt==!0?T(d.substr(1,d.length-1)):d},set:function(t){t=t.toString(),d=this instanceof mt==!0?"/"+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(X(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,1):this.Ff=Z(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,2):this.Ff=Z(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,3):this.Ff=Z(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;case"left":case 0:default:m=0}}})};H(lt,ct);var ft=function(){lt.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 ot(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(X(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,18):this.Ff=Z(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=K(this.Ff,19):this.Ff=Z(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=K(this.Ff,20),e.sort()):this.Ff=Z(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,22):this.Ff=Z(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,23):this.Ff=Z(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,27):this.Ff=Z(this.Ff,27)}}),this.hasAppearanceStream=!1};H(ft,lt);var dt=function(){ft.call(this),this.fontName="helvetica",this.combo=!1};H(dt,ft);var pt=function(){dt.call(this),this.combo=!0};H(pt,dt);var gt=function(){pt.call(this),this.edit=!0};H(gt,pt);var mt=function(){lt.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,15):this.Ff=Z(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,16):this.Ff=Z(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,17):this.Ff=Z(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,26):this.Ff=Z(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+" ("+R(t(r[e]))+")");return n.push(">>"),n.join("\n")}},set:function(e){"object"===t(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}})};H(mt,lt);var vt=function(){mt.call(this),this.pushButton=!0};H(vt,mt);var bt=function(){mt.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:[]}})};H(bt,mt);var yt=function(){var e,r;lt.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+" ("+R(t(i[e]))+")");return r.push(">>"),r.join("\n")},set:function(e){"object"===t(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=At.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};H(yt,lt),bt.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()}},bt.prototype.createOption=function(t){var e=new yt;return e.Parent=this,e.optionName=t,this.Kids.push(e),xt.call(this.scope,e),e};var wt=function(){mt.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=At.CheckBox.createAppearanceStream()};H(wt,mt);var Nt=function(){lt.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,13):this.Ff=Z(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,21):this.Ff=Z(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,23):this.Ff=Z(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,24):this.Ff=Z(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,25):this.Ff=Z(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,26):this.Ff=Z(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}})};H(Nt,lt);var Lt=function(){Nt.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(X(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=K(this.Ff,14):this.Ff=Z(this.Ff,14)}}),this.password=!0};H(Lt,Nt);var At={CheckBox:{createAppearanceStream:function(){return{N:{On:At.CheckBox.YesNormal},D:{On:At.CheckBox.YesPushDown,Off:At.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=V(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=tt(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+U(At.internal.getWidth(t))+" "+U(At.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+U(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=V(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=At.internal.getHeight(t),o=At.internal.getWidth(t),s=tt(t,t.caption);return i.push("1 g"),i.push("0 0 "+U(o)+" "+U(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+U(o-1)+" "+U(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+U(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=V(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+U(At.internal.getWidth(t))+" "+U(At.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:At.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=At.RadioButton.Circle.YesNormal,e.D[t]=At.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=V(t);e.scope=t.scope;var r=[],n=At.internal.getWidth(t)<=At.internal.getHeight(t)?At.internal.getWidth(t)/4:At.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=At.internal.Bezier_C,a=Number((n*i).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+z(At.internal.getWidth(t)/2)+" "+z(At.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=V(t);e.scope=t.scope;var r=[],n=At.internal.getWidth(t)<=At.internal.getHeight(t)?At.internal.getWidth(t)/4:At.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*At.internal.Bezier_C).toFixed(5)),o=Number((n*At.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+z(At.internal.getWidth(t)/2)+" "+z(At.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 "+z(At.internal.getWidth(t)/2)+" "+z(At.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=V(t);e.scope=t.scope;var r=[],n=At.internal.getWidth(t)<=At.internal.getHeight(t)?At.internal.getWidth(t)/4:At.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*At.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+z(At.internal.getWidth(t)/2)+" "+z(At.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:At.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=At.RadioButton.Cross.YesNormal,e.D[t]=At.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=V(t);e.scope=t.scope;var r=[],n=At.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+U(At.internal.getWidth(t)-2)+" "+U(At.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(U(n.x1.x)+" "+U(n.x1.y)+" m"),r.push(U(n.x2.x)+" "+U(n.x2.y)+" l"),r.push(U(n.x4.x)+" "+U(n.x4.y)+" m"),r.push(U(n.x3.x)+" "+U(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=V(t);e.scope=t.scope;var r=At.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+U(At.internal.getWidth(t))+" "+U(At.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+U(At.internal.getWidth(t)-2)+" "+U(At.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(U(r.x1.x)+" "+U(r.x1.y)+" m"),n.push(U(r.x2.x)+" "+U(r.x2.y)+" l"),n.push(U(r.x4.x)+" "+U(r.x4.y)+" m"),n.push(U(r.x3.x)+" "+U(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=V(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+U(At.internal.getWidth(t))+" "+U(At.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}};At.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=At.internal.getWidth(t),r=At.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}}}},At.internal.getWidth=function(e){var r=0;return"object"===t(e)&&(r=W(e.Rect[2])),r},At.internal.getHeight=function(e){var r=0;return"object"===t(e)&&(r=W(e.Rect[3])),r};var xt=q.addField=function(t){if(at(this,t),!(t instanceof lt))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};q.AcroFormChoiceField=ft,q.AcroFormListBox=dt,q.AcroFormComboBox=pt,q.AcroFormEditBox=gt,q.AcroFormButton=mt,q.AcroFormPushButton=vt,q.AcroFormRadioButton=bt,q.AcroFormCheckBox=wt,q.AcroFormTextField=Nt,q.AcroFormPasswordField=Lt,q.AcroFormAppearance=At,q.AcroForm={ChoiceField:ft,ListBox:dt,ComboBox:pt,EditBox:gt,Button:mt,PushButton:vt,RadioButton:bt,CheckBox:wt,TextField:Nt,PasswordField:Lt,Appearance:At},E.AcroForm={ChoiceField:ft,ListBox:dt,ComboBox:pt,EditBox:gt,Button:mt,PushButton:vt,RadioButton:bt,CheckBox:wt,TextField:Nt,PasswordField:Lt,Appearance:At};var St=E.AcroForm;function _t(t){return t.reduce((function(t,e,r){return t[e]=r,t}),{})}!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,c,u=r;if("RGBA"===(e=e||r)||void 0!==t.data&&t.data instanceof Uint8ClampedArray&&"height"in t&&"width"in t)return"RGBA";if(x(t))for(c in n)for(o=n[c],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){u=c;break}}else for(c in n)for(o=n[c],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){u=c;break}}return u===r&&e!==r&&(u=e),u},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===b.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===b.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,c=e.transparency.length;s<c;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 u=void 0!==e.filter?["/"+e.filter]:void 0;if(n({data:e.data,additionalKeyValues:a,alreadyAppliedFilters:u,objectId:e.objectId}),r("endobj"),"sMask"in e&&void 0!==e.sMask){var h="/Predictor "+e.predictor+" /Colors 1 /BitsPerComponent "+e.bitsPerComponent+" /Columns "+e.width,l={width:e.width,height:e.height,colorSpace:"DeviceGray",bitsPerComponent:e.bitsPerComponent,decodeParameters:h,data:e.sMask};"filter"in e&&(l.filter=e.filter),t.call(this,l)}if(e.colorSpace===b.INDEXED){var f=this.internal.newObject();n({data:_(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")},c=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",s))},h=function(){var t=this.internal.collections.addImage_images;return c.call(this),t},l=function(){return Object.keys(this.internal.collections.addImage_images).length},f=function(t){return"function"==typeof e["process"+t.toUpperCase()]},d=function(e){return"object"===t(e)&&1===e.nodeType},p=function(t,r){if("IMG"===t.nodeName&&t.hasAttribute("src")){var n=""+t.getAttribute("src");if(0===n.indexOf("data:image/"))return u(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;case"JPEG":case"JPG":default:a="image/jpeg"}return u(t.toDataURL(a,1).split("base64,").pop())}},g=function(t){var e=this.internal.collections.addImage_images;if(e)for(var r in e)if(t===e[r].alias)return e[r]},m=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]},v=function(t,e,r,n,i,a){var o=m.call(this,r,n,i),s=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString,u=h.call(this);if(r=o[0],n=o[1],u[i.index]=i,a){a*=Math.PI/180;var l=Math.cos(a),f=Math.sin(a),d=function(t){return t.toFixed(4)},p=[d(l),d(f),d(-1*f),d(l),0,0,"cm"]}this.internal.write("q"),a?(this.internal.write([1,"0","0",1,s(t),c(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),c(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")},b=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 y=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},w=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(x(t))for(r=t.byteLength/2,e=0;e<r;e++)n=(n<<5)-n+t[e],n|=0;return n},N=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},L=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},A=e.__addimage__.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array};e.__addimage__.isArrayBuffer=function(t){return A()&&t instanceof ArrayBuffer};var x=e.__addimage__.isArrayBufferView=function(t){return A()&&"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)},S=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},_=e.__addimage__.arrayBufferToBinaryString=function(t){for(var e="",r=x(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,u,h,l;if("number"==typeof arguments[1]?(n=r,i=arguments[1],a=arguments[2],o=arguments[3],s=arguments[4],u=arguments[5],h=arguments[6],l=arguments[7]):(n=arguments[1],i=arguments[2],a=arguments[3],o=arguments[4],s=arguments[5],u=arguments[6],h=arguments[7],l=arguments[8]),"object"===t(e=arguments[0])&&!d(e)&&"imageData"in e){var f=e;e=f.imageData,n=f.format||n||r,i=f.x||i||0,a=f.y||a||0,o=f.w||f.width||o,s=f.h||f.height||s,u=f.alias||u,h=f.compression||h,l=f.rotation||f.angle||l}var p=this.internal.getFilters();if(void 0===h&&-1!==p.indexOf("FlateEncode")&&(h="SLOW"),isNaN(i)||isNaN(a))throw new Error("Invalid coordinates passed to jsPDF.addImage");c.call(this);var g=P.call(this,e,n,u,h);return v.call(this,i,a,o,s,g,l),this};var P=function(t,n,a,o){var s,c,u;if("string"==typeof t&&i(t)===r){t=unescape(t);var h=k(t,!1);(""!==h||void 0!==(h=e.loadFile(t,!0)))&&(t=h)}if(d(t)&&(t=p(t,n)),n=i(t,n),!f(n))throw new Error("addImage does not support files of type '"+n+"', please ensure that a plugin for '"+n+"' support is added.");if((null==(u=a)||0===u.length)&&(a=function(t){return"string"==typeof t||x(t)?w(t):x(t.data)?w(t.data):null}(t)),(s=g.call(this,a))||(A()&&(t instanceof Uint8Array||"RGBA"===n||(c=t,t=S(t))),s=this["process"+n.toUpperCase()](t,l.call(this),a,function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in e.image_compression?t:y.NONE}(o),c)),!s)throw new Error("An unknown error occurred whilst processing the image.");return s},k=e.__addimage__.convertBase64ToBinaryString=function(t,e){var r;e="boolean"!=typeof e||e;var n,i="";if("string"==typeof t){n=null!==(r=L(t))?r.data:t;try{i=u(n)}catch(t){if(e)throw N(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(d(t)&&(t=p(t)),"string"==typeof t&&i(t)===r&&(""===(o=k(t,!1))&&(o=e.loadFile(t)||""),t=o),a=i(t),!f(a))throw new Error("addImage does not support files of type '"+a+"', please ensure that a plugin for '"+a+"' support is added.");if(!A()||t instanceof Uint8Array||(t=S(t)),!(n=this["process"+a.toUpperCase()](t)))throw new Error("An unknown error occurred whilst processing the image");return n.fileType=a,n}}(E.API),
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){var e=function(t){if(void 0!==t&&""!=t)return!0};E.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(t){for(var r,n,i,a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,s=this.internal.getPageInfoByObjId(t.objId),c=t.pageContext.annotations,u=!1,h=0;h<c.length&&!u;h++)switch((r=c[h]).type){case"link":(e(r.options.url)||e(r.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(0!=u){this.internal.write("/Annots [");for(var l=0;l<c.length;l++){r=c[l];var f=this.internal.pdfEscape,d=this.internal.getEncryptor(t.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var p=this.internal.newAdditionalObject(),g=this.internal.newAdditionalObject(),m=this.internal.getEncryptor(p.objId),v=r.title||"Note";i="<</Type /Annot /Subtype /Text "+(n="/Rect ["+a(r.bounds.x)+" "+o(r.bounds.y+r.bounds.h)+" "+a(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y)+"] ")+"/Contents ("+f(m(r.contents))+")",i+=" /Popup "+g.objId+" 0 R",i+=" /P "+s.objId+" 0 R",i+=" /T ("+f(m(v))+") >>",p.content=i;var b=p.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+a(r.bounds.x+30)+" "+o(r.bounds.y+r.bounds.h)+" "+a(r.bounds.x+r.bounds.w+30)+" "+o(r.bounds.y)+"] ")+" /Parent "+b,r.open&&(i+=" /Open true"),i+=" >>",g.content=i,this.internal.write(p.objId,"0 R",g.objId,"0 R");break;case"freetext":n="/Rect ["+a(r.bounds.x)+" "+o(r.bounds.y)+" "+a(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y+r.bounds.h)+"] ";var y=r.color||"#000000";i="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+f(d(r.contents))+")",i+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+y+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(r.options.name){var w=this.annotations._nameMap[r.options.name];r.options.pageNumber=w.page,r.options.top=w.y}else r.options.top||(r.options.top=0);if(n="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",i="",r.options.url)i="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+f(d(r.options.url))+") >>";else if(r.options.pageNumber){switch(i="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,i+=" /FitV "+r.options.left+"]";break;case"XYZ":default:var N=o(r.options.top);r.options.left=r.options.left||0,void 0===r.options.zoom&&(r.options.zoom=0),i+=" /XYZ "+r.options.left+" "+N+" "+r.options.zoom+"]"}}""!=i&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),t.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)}},t.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"})},t.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 c=this.splitTextToSize(t,a).length;i=Math.ceil(s*c)}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},t.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor}}(E.API),
+/**
+ * @license
+ * Copyright (c) 2017 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+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},c=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 u=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 h=t.__arabicParser__.arabicLetterHasMedialForm=function(t){return o(t)&&a(t)&&4==e[t.charCodeAt(0)].length},l=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:!u(t)||!o(e)&&!o(r)||!o(r)&&s(e)||s(t)&&!o(e)||s(t)&&c(e)||s(t)&&s(e)?0:h(t)&&o(e)&&!s(e)&&o(r)&&u(r)?3:s(t)||!o(r)?1:2:-1},d=function(t){var r=0,n=0,i=0,a="",s="",c="",u=(t=t||"").split("\\s+"),h=[];for(r=0;r<u.length;r+=1){for(h.push(""),n=0;n<u[r].length;n+=1)a=u[r][n],s=u[r][n-1],c=u[r][n+1],o(a)?(i=f(a,s,c),h[r]+=-1!==i?String.fromCharCode(e[a.charCodeAt(0)][i]):a):h[r]+=a;h[r]=l(h[r])}return h.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])}(E.API),E.API.autoPrint=function(t){var e;switch((t=t||{}).variant=t.variant||"non-conform",t.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default: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")}))}return this},
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+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}])}(E.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,c=0,u=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 h=e.maxWidth;h>0?"string"==typeof t?t=this.splitTextToSize(t,h):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,e){return t.concat(u.splitTextToSize(e,h))}),[])):t=Array.isArray(t)?t:[t];for(var l=0;l<t.length;l++)o<(c=this.getStringUnitWidth(t[l],{font:n})*r)&&(o=c);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,c=this.internal.__cell__.tableHeaderRow,u=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,u&&c&&(this.printHeaderRow(t.lineNumber,!0),t.y+=c[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,u,h,l){if(i.call(this),!u)throw new Error("No data for PDF table.");var f,d,p,g,m=[],v=[],b=[],y={},w={},N=[],L=[],A=(l=l||{}).autoSize||!1,x=!1!==l.printHeaders,S=l.css&&void 0!==l.css["font-size"]?16*l.css["font-size"]:l.fontSize||12,_=l.margins||Object.assign({width:this.getPageWidth()},r),P="number"==typeof l.padding?l.padding:3,k=l.headerBackgroundColor||"#c8c8c8",I=l.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=x,this.internal.__cell__.margins=_,this.internal.__cell__.table_font_size=S,this.internal.__cell__.padding=P,this.internal.__cell__.headerBackgroundColor=k,this.internal.__cell__.headerTextColor=I,this.setFontSize(S),null==h)v=m=Object.keys(u[0]),b=m.map((function(){return"left"}));else if(Array.isArray(h)&&"object"===t(h[0]))for(m=h.map((function(t){return t.name})),v=h.map((function(t){return t.prompt||t.name||""})),b=h.map((function(t){return t.align||"left"})),f=0;f<h.length;f+=1)w[h[f].name]=h[f].width*(19.049976/25.4);else Array.isArray(h)&&"string"==typeof h[0]&&(v=m=h,b=m.map((function(){return"left"})));if(A||Array.isArray(h)&&"string"==typeof h[0])for(f=0;f<m.length;f+=1){for(y[g=m[f]]=u.map((function(t){return t[g]})),this.setFont(void 0,"bold"),N.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)N.push(this.getTextDimensions(d[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);w[g]=Math.max.apply(null,N)+P+P,N=[]}if(x){var F={};for(f=0;f<m.length;f+=1)F[m[f]]={},F[m[f]].text=v[f],F[m[f]].align=b[f];var C=c.call(this,F,w);L=m.map((function(t){return new o(e,n,w[t],C,F[t].text,void 0,F[t].align)})),this.setTableHeaderRow(L),this.printHeaderRow(1,!1)}var j=h.reduce((function(t,e){return t[e.name]=e.align,t}),{});for(f=0;f<u.length;f+=1){"rowStart"in l&&l.rowStart instanceof Function&&l.rowStart({row:f,data:u[f]},this);var O=c.call(this,u[f],w);for(p=0;p<m.length;p+=1){var B=u[f][m[p]];"cellStart"in l&&l.cellStart instanceof Function&&l.cellStart({row:f,col:p,data:B},this),s.call(this,new o(e,n,w[m[p]],O,B,f+2,j[m[p]]))}}return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=n,this};var c=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 c=[],u=0;u<this.internal.__cell__.tableHeaderRow.length;u+=1){r=this.internal.__cell__.tableHeaderRow[u].clone(),e&&(r.y=this.internal.__cell__.margins.top||0,c.push(r)),r.lineNumber=t;var h=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),s.call(this,r),this.setTextColor(h)}c.length>0&&this.setTableHeaderRow(c),this.setFont(void 0,"normal"),n=!1}}(E.API);var Pt={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},kt=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],It=_t(kt),Ft=[100,200,300,400,500,600,700,800,900],Ct=_t(Ft);function jt(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),r=function(t){return Pt[t=t||"normal"]?t:"normal"}(t.style),n=function(t){if(!t)return 400;if("number"==typeof t)return t>=100&&t<=900&&t%100==0?t:400;if(/^\d00$/.test(t))return parseInt(t);switch(t){case"bold":return 700;case"normal":default:return 400}}(t.weight),i=function(t){return"number"==typeof It[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 Ot(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 Bt={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Mt={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Et(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function qt(t,e,r){for(var n=(r=r||{}).defaultFontFamily||"times",i=Object.assign({},Bt,r.genericFontFamilies||{}),a=null,o=null,s=0;s<e.length;++s)if(i[(a=jt(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 '"+Et(a)+"' and default family '"+n+"'.");if(o=function(t,e){if(e[t])return e[t];var r=It[t],n=r<=It.normal?-1:1,i=Ot(e,kt,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=Pt[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=Ct[t],n=Ot(e,Ft,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 '"+Et(a)+"'.");return o}function Dt(t){return t.trimLeft()}function Rt(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 Tt(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 Ut,zt,Ht,Wt=["times"];!function(e){var r,n,i,o,s,c,u,h,l,d=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 h,this.globalCompositeOperation=t.globalCompositeOperation||"normal",this.globalAlpha=t.globalAlpha||1,this.clip_path=t.clip_path||[],this.currentPoint=t.currentPoint||new c,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new c,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 p(this),r=this.internal.f2,n=this.internal.getCoordinateString,i=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,c=this.internal.Point,u=this.internal.Rectangle,h=this.internal.Matrix,l=new d}]);var p=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 l.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]),l.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 c=[];Object.defineProperty(this,"pageBreaks",{get:function(){return c},set:function(t){c=t}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(t){t instanceof d&&(l=t)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(t){l.path=t}});var u=[];Object.defineProperty(this,"ctxStack",{get:function(){return u},set:function(t){u=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){var e;e=g(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=g(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 h=null;function f(t,e){if(null===h){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());h=function(t){for(var e={},r=0;r<t.length;++r){var n=jt(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 h}var p=null;Object.defineProperty(this,"fontFaces",{get:function(){return p},set:function(t){h=null,p=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 Wt;if(i in Mt)return[Mt[i]];for(;""!==i;){switch(r=null,e=(i=Dt(i)).charAt(0)){case'"':case"'":r=Rt(i.substring(1),e);break;default:r=Tt(i)}if(null===r)return Wt;if(n.push(r[0]),""!==(i=Dt(r[1]))&&","!==i.charAt(0))return Wt;i=i.replace(/^,/,"")}return n}(a);if(this.fontFaces){var c=qt(f(this.pdf,this.fontFaces),s.map((function(t){return{family:t,stretch:"normal",weight:n,style:r}})));this.pdf.setFont(c.ref.name,c.ref.style)}else{var u="";("bold"===n||parseInt(n,10)>=700||"bold"===r)&&(u="bold"),"italic"===r&&(u+="italic"),0===u.length&&(u="normal");for(var h="",l={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"},d=0;d<s.length;d++){if(void 0!==this.pdf.internal.getFont(s[d],u,{noFallback:!0,disableWarning:!0})){h=s[d];break}if("bolditalic"===u&&void 0!==this.pdf.internal.getFont(s[d],"bold",{noFallback:!0,disableWarning:!0}))h=s[d],u="bold";else if(void 0!==this.pdf.internal.getFont(s[d],"normal",{noFallback:!0,disableWarning:!0})){h=s[d],u="normal";break}}if(""===h)for(var p=0;p<s.length;p++)if(l[s[p]]){h=l[s[p]];break}h=""===h?"Times":h,this.pdf.setFont(h,u)}}}}),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,T.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(t){this.ctx.lineDash=t,T.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=Boolean(t)}})};p.prototype.setLineDash=function(t){this.lineDash=t},p.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},p.prototype.fill=function(){A.call(this,"fill",!1)},p.prototype.stroke=function(){A.call(this,"stroke",!1)},p.prototype.beginPath=function(){this.path=[{type:"begin"}]},p.prototype.moveTo=function(t,e){if(isNaN(t)||isNaN(e))throw a.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var r=this.ctx.transform.applyToPoint(new c(t,e));this.path.push({type:"mt",x:r.x,y:r.y}),this.ctx.lastPoint=new c(t,e)},p.prototype.closePath=function(){var e=new c(0,0),r=0;for(r=this.path.length-1;-1!==r;r--)if("begin"===this.path[r].type&&"object"===t(this.path[r+1])&&"number"==typeof this.path[r+1].x){e=new c(this.path[r+1].x,this.path[r+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new c(e.x,e.y)},p.prototype.lineTo=function(t,e){if(isNaN(t)||isNaN(e))throw a.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var r=this.ctx.transform.applyToPoint(new c(t,e));this.path.push({type:"lt",x:r.x,y:r.y}),this.ctx.lastPoint=new c(r.x,r.y)},p.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),A.call(this,null,!0)},p.prototype.quadraticCurveTo=function(t,e,r,n){if(isNaN(r)||isNaN(n)||isNaN(t)||isNaN(e))throw a.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var i=this.ctx.transform.applyToPoint(new c(r,n)),o=this.ctx.transform.applyToPoint(new c(t,e));this.path.push({type:"qct",x1:o.x,y1:o.y,x:i.x,y:i.y}),this.ctx.lastPoint=new c(i.x,i.y)},p.prototype.bezierCurveTo=function(t,e,r,n,i,o){if(isNaN(i)||isNaN(o)||isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw a.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var s=this.ctx.transform.applyToPoint(new c(i,o)),u=this.ctx.transform.applyToPoint(new c(t,e)),h=this.ctx.transform.applyToPoint(new c(r,n));this.path.push({type:"bct",x1:u.x,y1:u.y,x2:h.x,y2:h.y,x:s.x,y:s.y}),this.ctx.lastPoint=new c(s.x,s.y)},p.prototype.arc=function(t,e,r,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i))throw a.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(o=Boolean(o),!this.ctx.transform.isIdentity){var s=this.ctx.transform.applyToPoint(new c(t,e));t=s.x,e=s.y;var u=this.ctx.transform.applyToPoint(new c(0,r)),h=this.ctx.transform.applyToPoint(new c(0,0));r=Math.sqrt(Math.pow(u.x-h.x,2)+Math.pow(u.y-h.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:o})},p.prototype.arcTo=function(t,e,r,n,i){throw new Error("arcTo not implemented.")},p.prototype.rect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw a.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)},p.prototype.fillRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw a.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!m.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)}},p.prototype.strokeRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw a.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");v.call(this)||(this.beginPath(),this.rect(t,e,r,n),this.stroke())},p.prototype.clearRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw a.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))},p.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 d(this.ctx);this.ctxStack.push(this.ctx),this.ctx=n}},p.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)},p.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var g=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 f(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}},m=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},v=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};p.prototype.fillText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw a.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(n=isNaN(n)?void 0:n,!m.call(this)){var i=q(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;C.call(this,{text:t,x:e,y:r,scale:o,angle:i,align:this.textAlign,maxWidth:n})}},p.prototype.strokeText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw a.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!v.call(this)){n=isNaN(n)?void 0:n;var i=q(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;C.call(this,{text:t,x:e,y:r,scale:o,renderingMode:"stroke",angle:i,align:this.textAlign,maxWidth:n})}},p.prototype.measureText=function(t){if("string"!=typeof t)throw a.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,o=function(t){var e=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return e}}),this};return new o({width:i*=Math.round(96*r/72*1e4)/1e4})},p.prototype.scale=function(t,e){if(isNaN(t)||isNaN(e))throw a.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var r=new h(t,0,0,e,0,0);this.ctx.transform=this.ctx.transform.multiply(r)},p.prototype.rotate=function(t){if(isNaN(t))throw a.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var e=new h(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0);this.ctx.transform=this.ctx.transform.multiply(e)},p.prototype.translate=function(t,e){if(isNaN(t)||isNaN(e))throw a.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var r=new h(1,0,0,1,t,e);this.ctx.transform=this.ctx.transform.multiply(r)},p.prototype.transform=function(t,e,r,n,i,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(o))throw a.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var s=new h(t,e,r,n,i,o);this.ctx.transform=this.ctx.transform.multiply(s)},p.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 h(t,e,r,n,i,a)};var b=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};p.prototype.drawImage=function(t,e,r,n,i,a,o,s,c){var l=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=l.width/n*s/n,d=l.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=l.width,c=l.height);for(var m,v=this.ctx.transform.decompose(),w=q(v.rotate.shx),A=new h,S=(A=(A=(A=A.multiply(v.translate)).multiply(v.skew)).multiply(v.scale)).applyToRectangle(new u(a-e*p,o-r*g,n*f,i*d)),_=y.call(this,S),P=[],k=0;k<_.length;k+=1)-1===P.indexOf(_[k])&&P.push(_[k]);if(L(P),this.autoPaging)for(var I=P[0],F=P[P.length-1],C=I;C<F+1;C++){this.pdf.setPage(C);var j=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],O=1===C?this.posY+this.margin[0]:this.margin[0],B=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],M=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],E=1===C?0:B+(C-2)*M;if(0!==this.ctx.clip_path.length){var D=this.path;m=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=N(m,this.posX+this.margin[3],-E+O+this.ctx.prevPageLastElemOffset),x.call(this,"fill",!0),this.path=D}var R=JSON.parse(JSON.stringify(S));R=N([R],this.posX+this.margin[3],-E+O+this.ctx.prevPageLastElemOffset)[0];var T=(C>I||C<F)&&b.call(this);T&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],j,M,null).clip().discardPath()),this.pdf.addImage(t,"JPEG",R.x,R.y,R.w,R.h,null,null,w),T&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(t,"JPEG",S.x,S.y,S.w,S.h,null,null,w)};var y=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=D(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=R(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];)w.call(this);return n},w=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},N=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;case"mt":case"lt":case"arc":default:t[n].x+=e,t[n].y+=r}return t},L=function(t){return t.sort((function(t,e){return t-e}))},A=function(t,e){for(var r,n,i=this.fillStyle,a=this.strokeStyle,o=this.lineCap,s=this.lineWidth,c=Math.abs(s*this.ctx.transform.scaleX),u=this.lineJoin,h=JSON.parse(JSON.stringify(this.path)),l=JSON.parse(JSON.stringify(this.path)),f=[],d=0;d<l.length;d++)if(void 0!==l[d].x)for(var p=y.call(this,l[d]),g=0;g<p.length;g+=1)-1===f.indexOf(p[g])&&f.push(p[g]);for(var m=0;m<f.length;m++)for(;this.pdf.internal.getNumberOfPages()<f[m];)w.call(this);if(L(f),this.autoPaging)for(var v=f[0],A=f[f.length-1],S=v;S<A+1;S++){this.pdf.setPage(S),this.fillStyle=i,this.strokeStyle=a,this.lineCap=o,this.lineWidth=c,this.lineJoin=u;var _=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],P=1===S?this.posY+this.margin[0]:this.margin[0],k=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],I=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],F=1===S?0:k+(S-2)*I;if(0!==this.ctx.clip_path.length){var C=this.path;r=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=N(r,this.posX+this.margin[3],-F+P+this.ctx.prevPageLastElemOffset),x.call(this,t,!0),this.path=C}if(n=JSON.parse(JSON.stringify(h)),this.path=N(n,this.posX+this.margin[3],-F+P+this.ctx.prevPageLastElemOffset),!1===e||0===S){var j=(S>v||S<A)&&b.call(this);j&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],_,I,null).clip().discardPath()),x.call(this,t,e),j&&this.pdf.restoreGraphicsState()}this.lineWidth=s}else this.lineWidth=c,x.call(this,t,e),this.lineWidth=s;this.path=h},x=function(t,e){if(("stroke"!==t||e||!v.call(this))&&("stroke"===t||e||!m.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 c=i.length;if(a[o-1]&&!isNaN(a[o-1].x)&&(r=[s.x-a[o-1].x,s.y-a[o-1].y],c>0))for(;c>=0;c--)if(!0!==i[c-1].close&&!0!==i[c-1].begin){i[c-1].deltas.push(r),i[c-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 u=a[o-1].x+2/3*(s.x1-a[o-1].x),h=a[o-1].y+2/3*(s.y1-a[o-1].y),l=s.x+2/3*(s.x1-s.x),f=s.y+2/3*(s.y1-s.y),d=s.x,p=s.y;r=[u-a[o-1].x,h-a[o-1].y,l-a[o-1].x,f-a[o-1].y,d-a[o-1].x,p-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 g=!1,b=0;b<i.length;b++)if(i[b].arc)for(var y=i[b].abs,w=0;w<y.length;w++){var N=y[w];"arc"===N.type?P.call(this,N.x,N.y,N.radius,N.startAngle,N.endAngle,N.counterclockwise,void 0,e,!g):j.call(this,N.x,N.y),g=!0}else if(!0===i[b].close)this.pdf.internal.out("h"),g=!1;else if(!0!==i[b].begin){var L=i[b].start.x,A=i[b].start.y;O.call(this,i[b].deltas,L,A),g=!0}n&&k.call(this,n),e&&I.call(this)}},S=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;case"ideographic":return t;case"alphabetic":default:return t}},_=function(t){return t+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};p.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},p.prototype.createPattern=function(){return this.createLinearGradient()},p.prototype.createRadialGradient=function(){return this.createLinearGradient()};var P=function(t,e,r,n,i,a,o,s,c){for(var u=M.call(this,r,n,i,a),h=0;h<u.length;h++){var l=u[h];0===h&&(c?F.call(this,l.x1+t,l.y1+e):j.call(this,l.x1+t,l.y1+e)),B.call(this,t,e,l.x2,l.y2,l.x3,l.y3,l.x4,l.y4)}s?I.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")}},I=function(){this.pdf.clip(),this.pdf.discardPath()},F=function(t,e){this.pdf.internal.out(n(t)+" "+i(e)+" m")},C=function(t){var e;switch(t.align){case"right":case"end":e="right";break;case"center":e="center";break;case"left":case"start":default:e="left"}var r=this.pdf.getTextDimensions(t.text),n=S.call(this,t.y),i=_.call(this,n)-r.h,a=this.ctx.transform.applyToPoint(new c(t.x,n)),o=this.ctx.transform.decompose(),s=new h;s=(s=(s=s.multiply(o.translate)).multiply(o.skew)).multiply(o.scale);for(var l,f,d,p=this.ctx.transform.applyToRectangle(new u(t.x,n,r.w,r.h)),g=s.applyToRectangle(new u(t.x,i,r.w,r.h)),m=y.call(this,g),v=[],w=0;w<m.length;w+=1)-1===v.indexOf(m[w])&&v.push(m[w]);if(L(v),this.autoPaging)for(var A=v[0],P=v[v.length-1],k=A;k<P+1;k++){this.pdf.setPage(k);var I=1===k?this.posY+this.margin[0]:this.margin[0],F=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],C=this.pdf.internal.pageSize.height-this.margin[2],j=C-this.margin[0],O=this.pdf.internal.pageSize.width-this.margin[1],B=O-this.margin[3],M=1===k?0:F+(k-2)*j;if(0!==this.ctx.clip_path.length){var E=this.path;l=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=N(l,this.posX+this.margin[3],-1*M+I),x.call(this,"fill",!0),this.path=E}var q=N([JSON.parse(JSON.stringify(g))],this.posX+this.margin[3],-M+I+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 D="text"!==this.autoPaging;if(D||q.y+q.h<=C){if(D||q.y>=I&&q.x<=O){var R=D?t.text:this.pdf.splitTextToSize(t.text,t.maxWidth||O-q.x)[0],T=N([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-M+I+this.ctx.prevPageLastElemOffset)[0],U=D&&(k>A||k<P)&&b.call(this);U&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],B,j,null).clip().discardPath()),this.pdf.text(R,T.x,T.y,{angle:t.angle,align:e,renderingMode:t.renderingMode}),U&&this.pdf.restoreGraphicsState()}}else q.y<C&&(this.ctx.prevPageLastElemOffset+=C-q.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)},j=function(t,e,r,a){r=r||0,a=a||0,this.pdf.internal.out(n(t+r)+" "+i(e+a)+" l")},O=function(t,e,r){return this.pdf.lines(t,e,r,null,null)},B=function(t,e,n,i,a,c,u,h){this.pdf.internal.out([r(o(n+t)),r(s(i+e)),r(o(a+t)),r(s(c+e)),r(o(u+t)),r(s(h+e)),"c"].join(" "))},M=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=[],c=n?-1:1,u=e;o>1e-5;){var h=u+c*Math.min(o,a);s.push(E.call(this,t,u,h)),o-=Math.abs(h-u),u=h}return s},E=function(t,e,r){var n=(r-e)/2,i=t*Math.cos(n),a=t*Math.sin(n),o=i,s=-a,c=o*o+s*s,u=c+o*i+s*a,h=4/3*(Math.sqrt(2*c*u)-u)/(o*a-s*i),l=o-h*s,f=s+h*o,d=l,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:l*m-f*v,y2:l*v+f*m,x3:d*m-p*v,y3:d*v+p*m,x4:t*Math.cos(r),y4:t*Math.sin(r)}},q=function(t){return 180*t/Math.PI},D=function(t,e,r,n,i,a){var o=t+.5*(r-t),s=e+.5*(n-e),c=i+.5*(r-i),h=a+.5*(n-a),l=Math.min(t,i,o,c),f=Math.max(t,i,o,c),d=Math.min(e,a,s,h),p=Math.max(e,a,s,h);return new u(l,d,f-l,p-d)},R=function(t,e,r,n,i,a,o,s){var c,h,l,f,d,p,g,m,v,b,y,w,N,L,A=r-t,x=n-e,S=i-r,_=a-n,P=o-i,k=s-a;for(h=0;h<41;h++)v=(g=(l=t+(c=h/40)*A)+c*((d=r+c*S)-l))+c*(d+c*(i+c*P-d)-g),b=(m=(f=e+c*x)+c*((p=n+c*_)-f))+c*(p+c*(a+c*k-p)-m),0==h?(y=v,w=b,N=v,L=b):(y=Math.min(y,v),w=Math.min(w,b),N=Math.max(N,v),L=Math.max(L,b));return new u(Math.round(y),Math.round(w),Math.round(N-y),Math.round(L-w))},T=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)}}}(E.API),
+/**
+ * @license
+ * jsPDF filters PlugIn
+ * Copyright (c) 2014 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){var r=function(t){var e,r,n,i,a,o,s,c,u,h;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-(h=a%85))/85)-(u=a%85))/85)-(c=a%85))/85)-(s=a%85))/85)%85,r.push(o+33,s+33,c+33,u+33,h+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)+"~>"},n=function(t){var e,r,n,i,a,o=String,s="length",c=255,u="charCodeAt",h="slice",l="replace";for(t[h](-2),t=t[h](0,-2)[l](/\s/g,"")[l]("z","!!!!!"),n=[],i=0,a=(t+=e="uuuuu"[h](t[s]%5||5))[s];a>i;i+=5)r=52200625*(t[u](i)-33)+614125*(t[u](i+1)-33)+7225*(t[u](i+2)-33)+85*(t[u](i+3)-33)+(t[u](i+4)-33),n.push(c&r>>24,c&r>>16,c&r>>8,c&r);return function(t,e){for(var r=e;r>0;r--)t.pop()}(n,e[s]),o.fromCharCode.apply(o,n)},i=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},a=function(t){for(var r=new Uint8Array(t.length),n=t.length;n--;)r[n]=t.charCodeAt(n);return t=(r=e(r)).reduce((function(t,e){return t+String.fromCharCode(e)}),"")};t.processDataByFilters=function(t,e){var o=0,s=t||"",c=[];for("string"==typeof(e=e||[])&&(e=[e]),o=0;o<e.length;o+=1)switch(e[o]){case"ASCII85Decode":case"/ASCII85Decode":s=n(s),c.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":s=r(s),c.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":s=i(s),c.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":s=s.split("").map((function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)})).join("")+">",c.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":s=a(s),c.push("/FlateDecode");break;default:throw new Error('The filter: "'+e[o]+'" is not implemented')}return{data:s,reverseChain:c.reverse().join(" ")}}}(E.API),
+/**
+ * @license
+ * jsPDF fileloading PlugIn
+ * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+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}(E.API),function(e){function r(){return(n.html2canvas?Promise.resolve(n.html2canvas):import("html2canvas")).catch((function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))})).then((function(t){return t.default?t.default:t}))}function i(){return(n.DOMPurify?Promise.resolve(n.DOMPurify):import("dompurify")).catch((function(t){return Promise.reject(new Error("Could not load dompurify: "+t))})).then((function(t){return t.default?t.default:t}))}var a=function(e){var r=t(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"},o=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=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(a(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(t)){case"string":return this.then(i).then((function(e){return this.set({src:o("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=o("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=o("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(e),this.prop.container.firstChild.appendChild(o("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"!==a(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(a(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||E.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,E.getPageSize=function(e,r,n){if("object"===t(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 c,u=0,h=0;if(s.hasOwnProperty(o))u=s[o][1]/a,h=s[o][0]/a;else try{u=n[1],h=n[0]}catch(t){throw new Error("Invalid format: "+n)}if("p"===e||"portrait"===e)e="p",h>u&&(c=h,h=u,u=c);else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",u>h&&(c=h,h=u,u=c)}return{width:h,height:u,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(jt):null;var r=new s(e);return e.worker?r:r.from(t).doCallback()}}(E.API),E.API.addJS=function(t){return Ht=t,this.internal.events.subscribe("postPutResources",(function(){Ut=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Ut+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),zt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Ht+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==Ut&&void 0!==zt&&this.internal.out("/Names <</JavaScript "+Ut+" 0 R>>")})),this},
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+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 c=this.internal.pages.length,u=[];for(i=0;i<c;i++){var h=t.internal.newObject();u.push(h);var l=t.internal.getPageInfo(i+1);t.internal.write("<< /D["+l.objId+" 0 R /XYZ null null null]>> endobj")}var f=t.internal.newObject();t.internal.write("<< /Names [ ");for(i=0;i<u.length;i++)t.internal.write("(page_"+(i+1)+")"+u[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}}])}(E.API),
+/**
+ * @license
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(t,r,n,i,a,o){var s,c=this.decode.DCT_DECODE,u=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}u={data:t,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:c,index:r,alias:n}}return u}}(E.API);var Vt,Gt,Yt,Jt,Xt,Kt=function(){var t,e,i;function a(t){var e,r,n,i,a,o,s,c,u,h,l,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(),u=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"===u&&(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((h=n-this.transparency.indexed.length)>0)for(d=0;0<=h?d<h:d>h;0<=h?++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=(l=this.read(e)).indexOf(0),c=String.fromCharCode.apply(String,l.slice(0,s)),this.text[c]=String.fromCharCode.apply(String,l.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")}}a.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},a.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.decodePixels=function(t){var e=this.pixelBitlength/8,n=new Uint8Array(this.width*this.height*e),i=0,a=this;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);function o(r,o,s,c){var u,h,l,f,d,p,g,m,v,b,y,w,N,L,A,x,S,_,P,k,I,F=Math.ceil((a.width-r)/s),C=Math.ceil((a.height-o)/c),j=a.width==F&&a.height==C;for(L=e*F,w=j?n:new Uint8Array(L*C),p=t.length,N=0,h=0;N<C&&i<p;){switch(t[i++]){case 0:for(f=S=0;S<L;f=S+=1)w[h++]=t[i++];break;case 1:for(f=_=0;_<L;f=_+=1)u=t[i++],d=f<e?0:w[h-e],w[h++]=(u+d)%256;break;case 2:for(f=P=0;P<L;f=P+=1)u=t[i++],l=(f-f%e)/e,A=N&&w[(N-1)*L+l*e+f%e],w[h++]=(A+u)%256;break;case 3:for(f=k=0;k<L;f=k+=1)u=t[i++],l=(f-f%e)/e,d=f<e?0:w[h-e],A=N&&w[(N-1)*L+l*e+f%e],w[h++]=(u+Math.floor((d+A)/2))%256;break;case 4:for(f=I=0;I<L;f=I+=1)u=t[i++],l=(f-f%e)/e,d=f<e?0:w[h-e],0===N?A=x=0:(A=w[(N-1)*L+l*e+f%e],x=l&&w[(N-1)*L+(l-1)*e+f%e]),g=d+A-x,m=Math.abs(g-d),b=Math.abs(g-A),y=Math.abs(g-x),v=m<=b&&m<=y?d:b<=y?A:x,w[h++]=(u+v)%256;break;default:throw new Error("Invalid filter algorithm: "+t[i-1])}if(!j){var O=((o+N*c)*a.width+r)*e,B=N*L;for(f=0;f<F;f+=1){for(var M=0;M<e;M+=1)n[O++]=w[B++];O+=(s-1)*e}}N++}}return t=r(t),1==a.interlaceMethod?(o(0,0,8,8),o(4,0,8,8),o(0,4,4,8),o(2,0,4,4),o(0,2,2,4),o(1,0,2,2),o(0,1,1,2)):o(0,0,1,1),n},a.prototype.decodePalette=function(){var t,e,r,n,i,a,o,s,c;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!=(c=a[t++])?c:255;return i},a.prototype.copyToImageData=function(t,e){var r,n,i,a,o,s,c,u,h,l,f;if(n=this.colors,h=null,r=this.hasAlphaChannel,this.palette.length&&(h=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),u=(i=t.data||t).length,o=h||e,a=s=0,1===n)for(;a<u;)c=h?4*e[a/4]:s,l=o[c++],i[a++]=l,i[a++]=l,i[a++]=l,i[a++]=r?o[c++]:255,s=c;else for(;a<u;)c=h?4*e[a/4]:s,i[a++]=o[c++],i[a++]=o[c++],i[a++]=o[c++],i[a++]=r?o[c++]:255,s=c},a.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t};var o=function(){if("[object Window]"===Object.prototype.toString.call(n)){try{e=n.document.createElement("canvas"),i=e.getContext("2d")}catch(t){return!1}return!0}return!1};return o(),t=function(t){var r;if(!0===o())return i.width=t.width,i.height=t.height,i.clearRect(0,0,t.width,t.height),i.putImageData(t,0,0),(r=new Image).src=e.toDataURL(),r;throw new Error("This method requires a Browser with Canvas-capability.")},a.prototype.decodeFrames=function(e){var r,n,i,a,o,s,c,u;if(this.animation){for(u=[],n=o=0,s=(c=this.animation.frames).length;o<s;n=++o)r=c[n],i=e.createImageData(r.width,r.height),a=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(i,a),r.imageData=i,u.push(r.image=t(i));return u}},a.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)},a.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,c;if(o=r++%i,c=n[o],s.renderFrame(t,o),i>1&&r/i<a)return s.animation._timeout=setTimeout(e,c.delay)})()},a.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},a.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))},a}();
+/**
+ * @license
+ *
+ * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+/**
+ * @license
+ * (c) Dean McNamee <dean@gmail.com>, 2013.
+ *
+ * https://github.com/deanm/omggif
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
+ * including animation and compression.  It does not rely on any specific
+ * underlying system, so should run in the browser, Node, or Plask.
+ */
+function Zt(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<<(7&i)+1;t[e++];t[e++];var s=null,c=null;a&&(s=e,c=o,e+=3*o);var u=!0,h=[],l=0,f=null,d=0,p=null;for(this.width=r,this.height=n;u&&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(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}break;case 249:if(4!==t[e++]||0!==t[e+4])throw new Error("Invalid graphics extension block.");var g=t[e++];l=t[e++]|t[e++]<<8,f=t[e++],0==(1&g)&&(f=null),d=g>>2&7,e++;break;case 254:for(;;){if(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}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++],N=w>>6&1,L=1<<(7&w)+1,A=s,x=c,S=!1;if(w>>7){S=!0;A=e,x=L,e+=3*L}var _=e;for(e++;;){var P;if(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}h.push({x:m,y:v,width:b,height:y,has_local_palette:S,palette_offset:A,palette_size:x,data_offset:_,data_length:e-_,transparent_index:f,interlaced:!!N,delay:l,disposal:d});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return h.length},this.loopCount=function(){return p},this.frameInfo=function(t){if(t<0||t>=h.length)throw new Error("Frame index out of range.");return h[t]},this.decodeAndBlitFrameBGRA=function(e,n){var i=this.frameInfo(e),a=i.width*i.height,o=new Uint8Array(a);$t(t,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;null===c&&(c=256);var u=i.width,h=r-u,l=u,f=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=f,g=4*h;!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===l&&(l=u,(p+=g)>=d&&(g=4*h+4*r*(m-1),p=f+(u+h)*(m<<1),m>>=1)),y===c)p+=4;else{var w=t[s+3*y],N=t[s+3*y+1],L=t[s+3*y+2];n[p++]=L,n[p++]=N,n[p++]=w,n[p++]=255}--l}},this.decodeAndBlitFrameRGBA=function(e,n){var i=this.frameInfo(e),a=i.width*i.height,o=new Uint8Array(a);$t(t,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;null===c&&(c=256);var u=i.width,h=r-u,l=u,f=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=f,g=4*h;!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===l&&(l=u,(p+=g)>=d&&(g=4*h+4*r*(m-1),p=f+(u+h)*(m<<1),m>>=1)),y===c)p+=4;else{var w=t[s+3*y],N=t[s+3*y+1],L=t[s+3*y+2];n[p++]=w,n[p++]=N,n[p++]=L,n[p++]=255}--l}}}function $t(t,e,r,n){for(var i=t[e++],o=1<<i,s=o+1,c=s+1,u=i+1,h=(1<<u)-1,l=0,f=0,d=0,p=t[e++],g=new Int32Array(4096),m=null;;){for(;l<16&&0!==p;)f|=t[e++]<<l,l+=8,1===p?p=t[e++]:--p;if(l<u)break;var v=f&h;if(f>>=u,l-=u,v!==o){if(v===s)break;for(var b=v<c?v:m,y=0,w=b;w>o;)w=g[w]>>8,++y;var N=w;if(d+y+(b!==v?1:0)>n)return void a.log("Warning, gif stream longer than expected.");r[d++]=N;var L=d+=y;for(b!==v&&(r[d++]=N),w=b;y--;)w=g[w],r[--L]=255&w,w>>=8;null!==m&&c<4096&&(g[c++]=m<<8|N,c>=h+1&&u<12&&(++u,h=h<<1|1)),m=v}else c=s+1,h=(1<<(u=i+1))-1,m=null}return d!==n&&a.log("Warning, gif stream shorter than expected."),r}
+/**
+ * @license
+  Copyright (c) 2008, Adobe Systems Incorporated
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without 
+  modification, are permitted provided that the following conditions are
+  met:
+
+  * Redistributions of source code must retain the above copyright notice, 
+    this list of conditions and the following disclaimer.
+  
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the 
+    documentation and/or other materials provided with the distribution.
+  
+  * Neither the name of Adobe Systems Incorporated nor the names of its 
+    contributors may be used to endorse or promote products derived from 
+    this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/function Qt(t){var e,r,n,i,a,o=Math.floor,s=new Array(64),c=new Array(64),u=new Array(64),h=new Array(64),l=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),N=new Array(256),L=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],x=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],S=[0,1,2,3,4,5,6,7,8,9,10,11],_=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],P=[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],k=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],I=[0,1,2,3,4,5,6,7,8,9,10,11],F=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],C=[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 j(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 O(t){for(var e=t[0],r=t[1]-1;r>=0;)e&1<<r&&(m|=1<<v),r--,--v<0&&(255==m?(B(255),B(0)):B(m),v=7,m=0)}function B(t){g.push(t)}function M(t){B(t>>8&255),B(255&t)}function E(t,e,r,n,i){for(var a,o=i[0],s=i[240],c=function(t,e){var r,n,i,a,o,s,c,u,h,l,f=0;for(h=0;h<8;++h){r=t[f],n=t[f+1],i=t[f+2],a=t[f+3],o=t[f+4],s=t[f+5],c=t[f+6];var p=r+(u=t[f+7]),g=r-u,m=n+c,v=n-c,b=i+s,y=i-s,w=a+o,N=a-o,L=p+w,A=p-w,x=m+b,S=m-b;t[f]=L+x,t[f+4]=L-x;var _=.707106781*(S+A);t[f+2]=A+_,t[f+6]=A-_;var P=.382683433*((L=N+y)-(S=v+g)),k=.5411961*L+P,I=1.306562965*S+P,F=.707106781*(x=y+v),C=g+F,j=g-F;t[f+5]=j+k,t[f+3]=j-k,t[f+1]=C+I,t[f+7]=C-I,f+=8}for(f=0,h=0;h<8;++h){r=t[f],n=t[f+8],i=t[f+16],a=t[f+24],o=t[f+32],s=t[f+40],c=t[f+48];var O=r+(u=t[f+56]),B=r-u,M=n+c,E=n-c,q=i+s,D=i-s,R=a+o,T=a-o,U=O+R,z=O-R,H=M+q,W=M-q;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=T+D)-(W=E+B)),Y=.5411961*U+G,J=1.306562965*W+G,X=.707106781*(H=D+E),K=B+X,Z=B-X;t[f+40]=Z+Y,t[f+24]=Z-Y,t[f+8]=K+J,t[f+56]=K-J,f++}for(h=0;h<64;++h)l=t[h]*e[h],d[h]=l>0?l+.5|0:l-.5|0;return d}(t,e),u=0;u<64;++u)p[A[u]]=c[u];var h=p[0]-r;r=p[0],0==h?O(n[0]):(O(n[f[a=32767+h]]),O(l[a]));for(var g=63;g>0&&0==p[g];)g--;if(0==g)return O(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)O(s);y&=15}a=32767+p[v],O(i[(y<<4)+f[a]]),O(l[a]),v++}return 63!=g&&O(o),r}function q(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 l=o((i[a]*t+50)/100);l=Math.min(Math.max(l,1),255),c[A[a]]=l}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++)u[d]=1/(s[A[d]]*f[p]*f[g]*8),h[d]=1/(c[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&&q(a),g=new Array,m=0,v=7,M(65496),M(65504),M(16),B(74),B(70),B(73),B(70),B(0),B(1),B(1),B(0),M(1),M(1),B(0),B(0),function(){M(65499),M(132),B(0);for(var t=0;t<64;t++)B(s[t]);B(1);for(var e=0;e<64;e++)B(c[e])}(),function(t,e){M(65472),M(17),B(8),M(e),M(t),B(3),B(1),B(17),B(0),B(2),B(17),B(1),B(3),B(17),B(1)}(t.width,t.height),function(){M(65476),M(418),B(0);for(var t=0;t<16;t++)B(x[t+1]);for(var e=0;e<=11;e++)B(S[e]);B(16);for(var r=0;r<16;r++)B(_[r+1]);for(var n=0;n<=161;n++)B(P[n]);B(1);for(var i=0;i<16;i++)B(k[i+1]);for(var a=0;a<=11;a++)B(I[a]);B(17);for(var o=0;o<16;o++)B(F[o+1]);for(var s=0;s<=161;s++)B(C[s])}(),M(65498),M(12),B(3),B(1),B(0),B(2),B(17),B(3),B(17),B(0),B(63),B(0);var o=0,l=0,f=0;m=0,v=7,this.encode.displayName="_encode_";for(var d,p,N,A,j,D,R,T,U,z=t.data,H=t.width,W=t.height,V=4*H,G=0;G<W;){for(d=0;d<V;){for(j=V*G+d,R=-1,T=0,U=0;U<64;U++)D=j+(T=U>>3)*V+(R=4*(7&U)),G+T>=W&&(D-=V*(G+1+T-W)),d+R>=V&&(D-=d+R-V+4),p=z[D++],N=z[D++],A=z[D++],b[U]=(L[p]+L[N+256>>0]+L[A+512>>0]>>16)-128,y[U]=(L[p+768>>0]+L[N+1024>>0]+L[A+1280>>0]>>16)-128,w[U]=(L[p+1280>>0]+L[N+1536>>0]+L[A+1792>>0]>>16)-128;o=E(b,u,o,e,n),l=E(y,h,l,r,i),f=E(w,h,f,r,i),d+=32}G+=8}if(v>=0){var Y=[];Y[1]=v+1,Y[0]=(1<<v+1)-1,O(Y)}return M(65497),new Uint8Array(g)},t=t||50,function(){for(var t=String.fromCharCode,e=0;e<256;e++)N[e]=t(e)}(),e=j(x,S),r=j(k,I),n=j(_,P),i=j(F,C),function(){for(var t=1,e=2,r=1;r<=15;r++){for(var n=t;n<e;n++)f[32767+n]=r,l[32767+n]=[],l[32767+n][1]=r,l[32767+n][0]=n;for(var i=-(e-1);i<=-t;i++)f[32767+i]=r,l[32767+i]=[],l[32767+i][1]=r,l[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)L[t]=19595*t,L[t+256>>0]=38470*t,L[t+512>>0]=7471*t+32768,L[t+768>>0]=-11059*t,L[t+1024>>0]=-21709*t,L[t+1280>>0]=32768*t+8421375,L[t+1536>>0]=-27439*t,L[t+1792>>0]=-5329*t}(),q(t)}
+/**
+ * @license
+ * Copyright (c) 2017 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */function te(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 ee(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 c=function(){var t=this;function c(t,e){for(var r=1<<e-1>>>0;t&r;)r>>>=1;return r?(t&r-1)+r:t}function u(t,r,n,i,a){e(!(i%n));do{t[r+(i-=n)]=a}while(0<i)}function h(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 h,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,h=1;15>h;++h){if(g[h]>1<<h)return 0;m[h+1]=m[h]+g[h]}for(f=0;f<o;++f)h=i[f],0<i[f]&&(s[m[h]++]=f);if(1==m[15])return(i=new l).g=0,i.value=s[0],u(t,d,1,p,i),p;var v,b=-1,y=p-1,w=0,N=1,L=1,A=1<<n;for(f=0,h=1,o=2;h<=n;++h,o<<=1){if(N+=L<<=1,0>(L-=g[h]))return 0;for(;0<g[h];--g[h])(i=new l).g=h,i.value=s[f++],u(t,d+w,o,A,i),w=c(w,h)}for(h=n+1,o=2;15>=h;++h,o<<=1){if(N+=L<<=1,0>(L-=g[h]))return 0;for(;0<g[h];--g[h]){if(i=new l,(w&y)!=b){for(d+=A,v=1<<(b=h)-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=h-n,i.value=s[f++],u(t,d+(w>>n),o,A,i),w=c(w,h)}}return N!=2*m[15]-1?0:p}(t,r,n,i,o,s)}function l(){this.value=this.g=0}function f(){this.value=this.g=0}function d(){this.G=o(5,l),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Dr,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,_(t)}function g(t,e){for(var r=0;0<e--;)r|=k(t,128)<<e;return r}function m(t,e){var r=g(t,e);return P(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<=Tr){var n=L(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 N(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function L(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 x(t,e){t.u=e,t.h=A(t)}function S(t){t.u>=zr&&(e(t.u>=zr),b(t))}function _(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 P(t){return g(t,1)}function k(t,e){var r=t.Ca;0>t.b&&_(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 I(t,e,r){t[e+0]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=r>>0&255}function F(t,e){return t[e+0]<<0|t[e+1]<<8}function C(t,e){return F(t,e)|t[e+2]<<16}function j(t,e){return F(t,e)|F(t,e+2)<<16}function O(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 B(t,r){e(null!=t),e(null!=r),e(t.Xa==r.Xa),n(r.X,0,t.X,0,1<<r.Xa)}function M(){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 q(t,e){return t+(1<<e)-1>>>e}function D(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,c){var u;for(u=0;u<o;++u){var h=t[e](s[c+u-1],i,a+u);s[c+u]=D(r[n+u],h)}}}function T(){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=D(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,c=16711935&(c=(c=16711935&o)+((s<<16)+s));n[i+a]=(4278255360&o)+c>>>0}}function Y(t,e){e.jd=t>>0&255,e.hd=t>>8&255,e.ud=t>>16&255}function J(t,e,r,n,i,a){var o;for(o=0;o<n;++o){var s=e[r+o],c=s>>>8,u=s,h=255&(h=(h=s>>>16)+((t.jd<<24>>24)*(c<<24>>24)>>>5));u=255&(u=(u=u+((t.hd<<24>>24)*(c<<24>>24)>>>5))+((t.ud<<24>>24)*(h<<24>>24)>>>5));i[a+o]=(4278255360&s)+(h<<16)+u}}function X(e,r,n,i,a){t[r]=function(t,e,r,n,o,s,c,u,h){for(n=c;n<u;++n)for(c=0;c<h;++c)o[s++]=a(r[i(t[e++])])},t[e]=function(e,r,o,s,c,u,h){var l=8>>e.b,f=e.Ea,d=e.K[0],p=e.w;if(8>l)for(e=(1<<e.b)-1,p=(1<<l)-1;r<o;++r){var g,m=0;for(g=0;g<f;++g)g&e||(m=i(s[c++])),u[h++]=a(d[m&p]),m>>=l}else t["VP8LMapColor"+n](s,c,d,p,u,h,r,o,f)}}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++]=a>>0&255}}function Z(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++]=a>>0&255,n[i++]=a>>24&255}}function $(t,e,r,n,i){for(r=e+r;e<r;){var a=(o=t[e++])>>16&240|o>>12&15,o=o>>0&240|o>>28&15;n[i++]=a,n[i++]=o}}function Q(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++]=a>>0&255,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;)I(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 ct(){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 ut(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ht(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],c=t.y,u=t.O,h=t.f,l=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,N=w+1>>1;for(0==b?s(c,u,null,null,h,l,f,d,h,l,f,d,a,o,null,null,w):(s(e.ec,e.fc,c,u,p,g,m,v,h,l,f,d,a,o-i.A,a,o,w),++r);b+2<y;b+=2)p=h,g=l,m=f,v=d,l+=t.Rc,d+=t.Rc,o+=2*i.A,s(c,(u+=2*t.fa)-t.fa,c,u,p,g,m,v,h,l,f,d,a,o-i.A,a,o,w);return u+=t.fa,t.j+y<t.o?(n(e.ec,e.fc,c,u,w),n(e.cc,e.dc,h,l,N),n(e.Mc,e.Nc,f,d,N),r--):1&y||s(c,u,null,null,h,l,f,d,h,l,f,d,a,o+i.A,null,null,w),r}function lt(t,r,n){var i=t.F,a=[t.J];if(null!=i){var o=t.U,s=r.ba.S,c=s==Tn||s==Vn;r=r.ba.f.RGBA;var u=[0],h=t.ka;u[0]=t.T,t.Kb&&(0==h?--u[0]:(--h,a[0]-=t.width),t.j+t.ka+t.T==t.o&&(u[0]=t.o-t.j-h));var l=r.eb;h=r.fb+h*r.A;t=Sn(i,a[0],t.width,o,u,l,h+(c?0:3),r.A),e(n==u),t&&nt(s)&&An(l,h,c,o,u,r.A)}return 0}function ft(t){var e=t.ma,r=e.ba.S,n=11>r,i=r==qn||r==Rn||r==Tn||r==Un||12==r||nt(r);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!Mr(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=ut,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=ht,br()}}else alert("todo:EmitYUV");i&&(e.Jb=lt,n&&mr())}if(n&&!Ci){for(t=0;256>t;++t)ji[t]=89858*(t-128)+_i>>Si,Mi[t]=-22014*(t-128)+_i,Bi[t]=-45773*(t-128),Oi[t]=113618*(t-128)+_i>>Si;for(t=Pi;t<ki;++t)e=76283*(t-16)+_i>>Si,Ei[t-Pi]=Vt(e,255),qi[t-Pi]=Vt(e+8>>4,15);Ci=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=$n[e-1])>>4)*t+(8-(15&r)))?r:1;var r}function bt(t,e,r){var n=L(r),i=t[e+=255&n].g-8;return 0<i&&(x(r,r.u+8),n=L(r),e+=t[e].value,e+=n&(1<<i)-1),x(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 Nt(t,r,i,a){var o=t.ab,s=t.c*r,c=t.C;r=c+r;var u=i,h=a;for(a=t.Ta,i=t.Ua;0<o--;){var l=t.gc[o],f=c,d=r,p=u,g=h,m=(h=a,u=i,l.Ea);switch(e(f<d),e(d<=l.nc),l.hc){case 2:Gr(p,g,(d-f)*m,h,u);break;case 0:var v=f,b=d,y=h,w=u,N=(_=l).Ea;0==v&&(Wr(p,g,null,null,1,y,w),V(p,g+1,0,0,N-1,y,w+1),g+=N,w+=N,++v);for(var L=1<<_.b,A=L-1,x=q(N,_.b),S=_.K,_=_.w+(v>>_.b)*x;v<b;){var P=S,k=_,I=1;for(Vr(p,g,y,w-N,1,y,w);I<N;){var F=(I&~A)+L;F>N&&(F=N),(0,Zr[P[k++]>>8&15])(p,g+ +I,y,w+I-N,F-I,y,w+I),I=F}g+=N,w+=N,++v&A||(_+=x)}d!=l.nc&&n(h,u-m,h,u+(d-f-1)*m,m);break;case 1:for(m=p,b=g,N=(p=l.Ea)-(w=p&~(y=(g=1<<l.b)-1)),v=q(p,l.b),L=l.K,l=l.w+(f>>l.b)*v;f<d;){for(A=L,x=l,S=new T,_=b+w,P=b+p;b<_;)Y(A[x++],S),$r(S,m,b,g,h,u),b+=g,u+=g;b<P&&(Y(A[x++],S),$r(S,m,b,N,h,u),b+=N,u+=N),++f&y||(l+=v)}break;case 3:if(p==h&&g==u&&0<l.b){for(b=h,p=m=u+(d-f)*m-(w=(d-f)*q(l.Ea,l.b)),g=h,y=u,v=[],w=(N=w)-1;0<=w;--w)v[w]=g[y+w];for(w=N-1;0<=w;--w)b[p+w]=v[w];Yr(l,f,d,h,m,h,u)}else Yr(l,f,d,p,g,h,u)}u=a,h=i}h!=i&&n(a,i,u,h,s)}function Lt(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,c=t.Ua,u=o.width;if(Nt(t,a,n,i),a=c=[c],e((n=t.C)<(i=r)),e(o.v<o.va),i>o.o&&(i=o.o),n<o.j){var h=o.j-n;n=o.j;a[0]+=h*u}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(c=c[0],11>(n=t.ca).S){var l=n.f.RGBA,f=(i=n.S,a=o.U,o=o.T,h=l.eb,l.A),d=o;for(l=l.fb+t.Ma*l.A;0<d--;){var p=s,g=c,m=a,v=h,b=l;switch(i){case En:Qr(p,g,m,v,b);break;case qn:tn(p,g,m,v,b);break;case Hn:tn(p,g,m,v,b),An(v,b,0,m,1,0);break;case Dn: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 Tn: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),xn(v,b,m,1,0);break;case zn:rn(p,g,m,v,b);break;default:e(0)}c+=u,l+=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 xt(t,r,n,i,a,o){if(0!=t.Z){var s=t.qd,c=t.rd;for(e(null!=mi[t.Z]);r<n;++r)mi[t.Z](s,c,i,a,i,a,o),s=i,c=a,a+=o;t.qd=s,t.rd=c}}function St(t,r){var n=t.l.ma,i=0==n.Z||1==n.Z?t.l.j:t.C;i=t.C<i?i:t.C;if(e(r<=t.l.o),r>i){var a=t.l.width,o=n.ca,s=n.tb+a*i,c=t.V,u=t.Ba+t.c*i,h=t.gc;e(1==t.ab),e(3==h[0].hc),Xr(h[0],i,r,c,u,o,s),xt(n,i,r,o,s,a)}t.C=t.Ma=r}function _t(t,r,n,i,a,o,s){var c=t.$/i,u=t.$%i,h=t.m,l=t.s,f=n+t.$,d=f;a=n+i*a;var p=n+i*o,g=280+l.ua,m=t.Pb?c:16777216,v=0<l.ua?l.Wa:null,b=l.wc,y=f<p?wt(l,u,c):null;e(t.C<o),e(p<=a);var w=!1;t:for(;;){for(;w||f<p;){var N=0;if(c>=m){var _=f-n;e((m=t).Pb),m.wd=m.m,m.xd=_,0<m.s.ua&&B(m.s.Wa,m.s.vb),m=c+ti}if(u&b||(y=wt(l,u,c)),e(null!=y),y.Qb&&(r[f]=y.qb,w=!0),!w)if(S(h),y.jc){N=h,_=r;var P=f,k=y.pd[L(N)&Dr-1];e(y.jc),256>k.g?(x(N,N.u+k.g),_[P]=k.value,N=0):(x(N,N.u+k.g-256),e(256<=k.value),N=k.value),0==N&&(w=!0)}else N=bt(y.G[0],y.H[0],h);if(h.h)break;if(w||256>N){if(!w)if(y.nd)r[f]=(y.qb|N<<8)>>>0;else{if(S(h),w=bt(y.G[1],y.H[1],h),S(h),_=bt(y.G[2],y.H[2],h),P=bt(y.G[3],y.H[3],h),h.h)break;r[f]=(P<<24|w<<16|N<<8|_)>>>0}if(w=!1,++f,++u>=i&&(u=0,++c,null!=s&&c<=o&&!(c%16)&&s(t,c),null!=v))for(;d<f;)N=r[d++],v.X[(506832829*N&4294967295)>>>v.Mb]=N}else if(280>N){if(N=mt(N-256,h),_=bt(y.G[4],y.H[4],h),S(h),_=vt(i,_=mt(_,h)),h.h)break;if(f-n<_||a-f<N)break t;for(P=0;P<N;++P)r[f+P]=r[f+P-_];for(f+=N,u+=N;u>=i;)u-=i,++c,null!=s&&c<=o&&!(c%16)&&s(t,c);if(e(f<=a),u&b&&(y=wt(l,u,c)),null!=v)for(;d<f;)N=r[d++],v.X[(506832829*N&4294967295)>>>v.Mb]=N}else{if(!(N<g))break t;for(w=N-280,e(null!=v);d<f;)N=r[d++],v.X[(506832829*N&4294967295)>>>v.Mb]=N;N=f,e(!(w>>>(_=v).Xa)),r[N]=_.X[w],w=!0}w||e(h.h==A(h))}if(t.Pb&&h.h&&f<a)e(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&B(t.s.vb,t.s.Wa);else{if(h.h)break t;null!=s&&s(t,c>o?o:c),t.a=0,t.$=f-n}return 1}return t.a=3,0}function Pt(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 kt(){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,$r=J,Qr=K,tn=Z,en=$,rn=Q,nn=tt,t.VP8LMapColor32b=Jr,t.VP8LMapColor8b=Kr,e)}function It(t,r,n,s,c){var u=1,f=[t],p=[r],g=s.m,m=s.s,v=null,b=0;t:for(;;){if(n)for(;u&&y(g,1);){var w=f,N=p,A=s,_=1,P=A.m,k=A.gc[A.ab],I=y(P,2);if(A.Oc&1<<I)u=0;else{switch(A.Oc|=1<<I,k.hc=I,k.Ea=w[0],k.nc=N[0],k.K=[null],++A.ab,e(4>=A.ab),I){case 0:case 1:k.b=y(P,3)+2,_=It(q(k.Ea,k.b),q(k.nc,k.b),0,A,k.K),k.K=k.K[0];break;case 3:var F,C=y(P,8)+1,j=16<C?0:4<C?1:2<C?2:3;if(w[0]=q(k.Ea,j),k.b=j,F=_=It(C,1,0,A,k.K)){var B,M=C,E=k,R=1<<(8>>E.b),T=a(R);if(null==T)F=0;else{var U=E.K[0],z=E.w;for(T[0]=E.K[0][0],B=1;B<1*M;++B)T[B]=D(U[z+B],T[B-1]);for(;B<4*R;++B)T[B]=0;E.K[0]=null,E.K[0]=T,F=1}}_=F;break;case 2:break;default:e(0)}u=_}}if(f=f[0],p=p[0],u&&y(g,1)&&!(u=1<=(b=y(g,4))&&11>=b)){s.a=3;break t}var H;if(H=u)e:{var W,V,G,Y=s,J=f,X=p,K=b,Z=n,$=Y.m,Q=Y.s,tt=[null],et=1,rt=0,nt=Qn[K];r:for(;;){if(Z&&y($,1)){var it=y($,3)+2,at=q(J,it),ot=q(X,it),st=at*ot;if(!It(at,ot,0,Y,tt))break r;for(tt=tt[0],Q.xc=it,W=0;W<st;++W){var ct=tt[W]>>8&65535;tt[W]=ct,ct>=et&&(et=ct+1)}}if($.h)break r;for(V=0;5>V;++V){var ut=Xn[V];!V&&0<K&&(ut+=1<<K),rt<ut&&(rt=ut)}var ht=o(et*nt,l),lt=et,ft=o(lt,d);if(null==ft)var dt=null;else e(65536>=lt),dt=ft;var pt=a(rt);if(null==dt||null==pt||null==ht){Y.a=1;break r}var gt=ht;for(W=G=0;W<et;++W){var mt=dt[W],vt=mt.G,bt=mt.H,wt=0,Nt=1,Lt=0;for(V=0;5>V;++V){ut=Xn[V],vt[V]=gt,bt[V]=G,!V&&0<K&&(ut+=1<<K);n:{var At,xt=ut,St=Y,kt=pt,Ft=gt,Ct=G,jt=0,Ot=St.m,Bt=y(Ot,1);if(i(kt,0,0,xt),Bt){var Mt=y(Ot,1)+1,Et=y(Ot,1),qt=y(Ot,0==Et?1:8);kt[qt]=1,2==Mt&&(kt[qt=y(Ot,8)]=1);var Dt=1}else{var Rt=a(19),Tt=y(Ot,4)+4;if(19<Tt){St.a=3;var Ut=0;break n}for(At=0;At<Tt;++At)Rt[Zn[At]]=y(Ot,3);var zt=void 0,Ht=void 0,Wt=St,Vt=Rt,Gt=xt,Yt=kt,Jt=0,Xt=Wt.m,Kt=8,Zt=o(128,l);i:for(;h(Zt,0,7,Vt,19);){if(y(Xt,1)){var $t=2+2*y(Xt,3);if((zt=2+y(Xt,$t))>Gt)break i}else zt=Gt;for(Ht=0;Ht<Gt&&zt--;){S(Xt);var Qt=Zt[0+(127&L(Xt))];x(Xt,Xt.u+Qt.g);var te=Qt.value;if(16>te)Yt[Ht++]=te,0!=te&&(Kt=te);else{var ee=16==te,re=te-16,ne=Jn[re],ie=y(Xt,Yn[re])+ne;if(Ht+ie>Gt)break i;for(var ae=ee?Kt:0;0<ie--;)Yt[Ht++]=ae}}Jt=1;break i}Jt||(Wt.a=3),Dt=Jt}(Dt=Dt&&!Ot.h)&&(jt=h(Ft,Ct,8,kt,xt)),Dt&&0!=jt?Ut=jt:(St.a=3,Ut=0)}if(0==Ut)break r;if(Nt&&1==Kn[V]&&(Nt=0==gt[G].g),wt+=gt[G].g,G+=Ut,3>=V){var oe,se=pt[0];for(oe=1;oe<ut;++oe)pt[oe]>se&&(se=pt[oe]);Lt+=se}}if(mt.nd=Nt,mt.Qb=0,Nt&&(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>Lt,mt.jc){var ce,ue=mt;for(ce=0;ce<Dr;++ce){var he=ce,le=ue.pd[he],fe=ue.G[0][ue.H[0]+he];256<=fe.value?(le.g=fe.g+256,le.value=fe.value):(le.g=0,le.value=0,he>>=yt(fe,8,le),he>>=yt(ue.G[1][ue.H[1]+he],16,le),he>>=yt(ue.G[2][ue.H[2]+he],0,le),yt(ue.G[3][ue.H[3]+he],24,le))}}}Q.vc=tt,Q.Wb=et,Q.Ya=dt,Q.yc=ht,H=1;break e}H=0}if(!(u=H)){s.a=3;break t}if(0<b){if(m.ua=1<<b,!O(m.Wa,b)){s.a=1,u=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=q(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,u=0;break t}u=(u=_t(s,v,0,f,p,p,null))&&!g.h;break t}return u?(null!=c?c[0]=v:(e(null==v),e(n)),s.$=0,n||Pt(m)):Pt(m),u}function Ft(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 Ct(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,c=t.l.ma,u=t.l.width,h=u*s,l=c.ca,f=c.tb+u*n,d=t.Ta,p=t.Ua;Nt(t,s,a,o),_n(d,p,l,f,h),xt(c,n,n+s,l,f,u),i-=s,a+=s*t.c,n+=s}e(n==r),t.C=t.Ma=r}function jt(){this.ub=this.yd=this.td=this.Rb=0}function Ot(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Bt(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Mt(){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],Mt),this.Xc=s([4,17],Mt)}function qt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Dt(){this.ld=this.La=this.dd=this.tc=0}function Rt(){this.Na=this.la=0}function Tt(){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 Dt),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 jt,this.Kc=new Ot,this.ed=new qt,this.Qa=new Bt,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,Tt),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 Dt),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],Dt),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=Zt)),t}function Jt(t,e,r){return 0==t.a&&(t.a=e,t.sc=r,t.cb=0),0}function Xt(t,e,r){return 3<=r&&157==t[e+0]&&1==t[e+1]&&42==t[e+2]}function Kt(t,r){if(null==t)return 0;if(t.a=0,t.sc="OK",null==r)return Jt(t,2,"null VP8Io passed to VP8GetHeaders()");var n=r.data,a=r.w,o=r.ha;if(4>o)return Jt(t,7,"Truncated header.");var s=n[a+0]|n[a+1]<<8|n[a+2]<<16,c=t.Od;if(c.Rb=!(1&s),c.td=s>>1&7,c.yd=s>>4&1,c.ub=s>>5,3<c.td)return Jt(t,3,"Incorrect keyframe parameters.");if(!c.yd)return Jt(t,4,"Frame not displayable.");a+=3,o-=3;var u=t.Kc;if(c.Rb){if(7>o)return Jt(t,7,"cannot parse picture header");if(!Xt(n,a,o))return Jt(t,3,"Bad code word");u.c=16383&(n[a+4]<<8|n[a+3]),u.Td=n[a+4]>>6,u.i=16383&(n[a+6]<<8|n[a+5]),u.Ud=n[a+6]>>6,a+=7,o-=7,t.za=u.c+15>>4,t.Ub=u.i+15>>4,r.width=u.c,r.height=u.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(c.ub>o)return Jt(t,7,"bad partition length");p(s=t.m,n,a,c.ub),a+=c.ub,o-=c.ub,c.Rb&&(u.Ld=P(s),u.Kd=P(s)),u=t.Qa;var h,l=t.Pa;if(e(null!=s),e(null!=u),u.Cb=P(s),u.Cb){if(u.Bb=P(s),P(s)){for(u.Fb=P(s),h=0;4>h;++h)u.Zb[h]=P(s)?m(s,7):0;for(h=0;4>h;++h)u.Lb[h]=P(s)?m(s,6):0}if(u.Bb)for(h=0;3>h;++h)l.jb[h]=P(s)?g(s,8):255}else u.Bb=0;if(s.Ka)return Jt(t,3,"cannot parse segment header");if((u=t.ed).zd=P(s),u.Tb=g(s,6),u.wb=g(s,3),u.Pc=P(s),u.Pc&&P(s)){for(l=0;4>l;++l)P(s)&&(u.vd[l]=m(s,6));for(l=0;4>l;++l)P(s)&&(u.od[l]=m(s,6))}if(t.L=0==u.Tb?0:u.zd?1:2,s.Ka)return Jt(t,3,"cannot parse filter header");var f=o;if(o=h=a,a=h+f,u=f,t.Xb=(1<<g(t.m,2))-1,f<3*(l=t.Xb))n=7;else{for(h+=3*l,u-=3*l,f=0;f<l;++f){var d=n[o+0]|n[o+1]<<8|n[o+2]<<16;d>u&&(d=u),p(t.Jc[+f],n,h,d),h+=d,u-=d,o+=3}p(t.Jc[+l],n,h,u),n=h<a?0:5}if(0!=n)return Jt(t,n,"cannot parse partitions");for(n=g(h=t.m,7),o=P(h)?m(h,4):0,a=P(h)?m(h,4):0,u=P(h)?m(h,4):0,l=P(h)?m(h,4):0,h=P(h)?m(h,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+u,127)]>>16,8>b.Eb[1]&&(b.Eb[1]=8),b.Qc[0]=ei[Vt(v+l,117)],b.Qc[1]=ri[Vt(v+h,127)],b.lc=v+h}if(!c.Rb)return Jt(t,4,"Not a key frame.");for(P(s),c=t.Pa,n=0;4>n;++n){for(o=0;8>o;++o)for(a=0;3>a;++a)for(u=0;11>u;++u)l=k(s,ui[n][o][a][u])?g(s,8):si[n][o][a][u],c.Wc[n][o].Yb[a][u]=l;for(o=0;17>o;++o)c.Xc[n][o]=c.Wc[n][hi[o]]}return t.kc=P(s),t.kc&&(t.Bd=g(s,8)),t.cb=1}function Zt(t,e,r,n,i,a,o){var s=e[i].Yb[r];for(r=0;16>i;++i){if(!k(t,s[r+0]))return i;for(;!k(t,s[r+1]);)if(s=e[++i].Yb[0],r=0,16==i)return 16;var c=e[i+1].Yb;if(k(t,s[r+2])){var u=t,h=0;if(k(u,(f=s)[(l=r)+3]))if(k(u,f[l+6])){for(s=0,l=2*(h=k(u,f[l+8]))+(f=k(u,f[l+9+h])),h=0,f=ii[l];f[s];++s)h+=h+k(u,f[s]);h+=3+(8<<l)}else k(u,f[l+7])?(h=7+2*k(u,165),h+=k(u,145)):h=5+k(u,159);else h=k(u,f[l+4])?3+k(u,f[l+5]):2;s=c[2]}else h=1,s=c[1];c=o+ai[i],0>(u=t).b&&_(u);var l,f=u.b,d=(l=u.Ca>>1)-(u.I>>f)>>31;--u.b,u.Ca+=d,u.Ca|=1,u.I-=(l+1&d)<<f,a[c]=((h^d)-d)*n[(0<i)+0]}return 16}function $t(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 Qt(t,r){if(null==t)return 0;if(null==r)return Jt(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!Kt(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 c=t.ed;for(s=0;4>s;++s){var u;if(t.Qa.Cb){var h=t.Qa.Lb[s];t.Qa.Fb||(h+=c.Tb)}else h=c.Tb;for(u=0;1>=u;++u){var l=t.gd[s][u],f=h;if(c.Pc&&(f+=c.vd[0],u&&(f+=c.od[0])),0<(f=0>f?0:63<f?63:f)){var d=f;0<c.wb&&((d=4<c.wb?d>>2:d>>1)>9-c.wb&&(d=9-c.wb)),1>d&&(d=1),l.dd=d,l.tc=2*f+d,l.ld=40<=f?2:15<=f?1:0}else l.tc=0;l.La=u}}}s=0}else Jt(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;c=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((l=c+832+(u=3*(16*s+Ri[t.L])/2*p)+(h=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=l)s=0;else{if(l>t.Vb){if(t.Vb=0,t.Ec=a(l),t.Fc=0,null==t.Ec){s=Jt(t,1,"no memory during frame initialization.");break t}t.Vb=l}l=t.Ec,f=t.Fc,t.Ac=l,t.Bc=f,f+=c,t.Gd=o(p,Ht),t.Hd=0,t.rb=o(g+1,Rt),t.sb=1,t.wa=m?o(m,Dt):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=l,t.pc=f,f+=832,t.ya=o(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]):k(h,l.Pa.jb[1]):g.$b=0,l.kc&&(g.Ad=k(h,l.Bd)),g.Za=!k(h,145)+0,g.Za){var m=g.Ob,v=0;for(l=0;4>l;++l){var b,y=p[0+l];for(b=0;4>b;++b){y=ci[f[d+b]][y];for(var w=oi[k(h,y[0])];0<w;)w=oi[2*w+k(h,y[w])];y=-w,f[d+b]=y}n(m,v,f,d,4),v+=4,p[0+l]=y}}else y=k(h,156)?k(h,128)?1:3:k(h,163)?2:0,g.Ob[0]=y,i(f,d,y,4),i(p,0,y,4);g.Dd=k(h,142)?k(h,114)?k(h,183)?1:3:2:0}if(u.m.Ka)return Jt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(u=s,h=(c=t).rb[c.sb-1],f=c.rb[c.sb+c.ja],o=c.ya[c.aa+c.ja],d=c.kc?o.Ad:0)h.la=f.la=0,o.Za||(h.Na=f.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var N,L;h=f,f=u,d=c.Pa.Xc,p=c.ya[c.aa+c.ja],g=c.pb[p.$b];if(l=p.ad,m=0,v=c.rb[c.sb-1],y=b=0,i(l,m,0,384),p.Za)var A=0,x=d[3];else{w=a(16);var S=h.Na+v.Na;if(S=ni(f,d[1],S,g.Eb,0,w,0),h.Na=v.Na=(0<S)+0,1<S)an(w,0,l,m);else{var _=w[0]+3>>3;for(w=0;256>w;w+=16)l[m+w]=_}A=1,x=d[0]}var P=15&h.la,I=15&v.la;for(w=0;4>w;++w){var F=1&I;for(_=L=0;4>_;++_)P=P>>1|(F=(S=ni(f,x,S=F+(1&P),g.Sc,A,l,m))>A)<<7,L=L<<2|(3<S?3:1<S?2:0!=l[m+0]),m+=16;P>>=4,I=I>>1|F<<7,b=(b<<8|L)>>>0}for(x=P,A=I>>4,N=0;4>N;N+=2){for(L=0,P=h.la>>4+N,I=v.la>>4+N,w=0;2>w;++w){for(F=1&I,_=0;2>_;++_)S=F+(1&P),P=P>>1|(F=0<(S=ni(f,d[2],S,g.Qc,0,l,m)))<<3,L=L<<2|(3<S?3:1<S?2:0!=l[m+0]),m+=16;P>>=2,I=I>>1|F<<5}y|=L<<4*N,x|=P<<4<<N,A|=(240&I)<<N}h.la=x,v.la=A,p.Hc=b,p.Gc=y,p.ia=43690&y?0:g.ia,d=!(b|y)}if(0<c.L&&(c.wa[c.Y+c.ja]=c.gd[o.$b][o.Za],c.wa[c.Y+c.ja].La|=!d),u.Ka)return Jt(t,7,"Premature end-of-file encountered.")}if($t(t),c=r,u=1,o=(s=t).D,h=0<s.L&&s.M>=s.zb&&s.M<=s.Va,0==s.Aa)t:{if(o.M=s.M,o.uc=h,Or(s,o),u=1,o=(L=s.D).Nb,h=(y=Ri[s.L])*s.R,f=y/2*s.B,w=16*o*s.R,_=8*o*s.B,d=s.sa,p=s.ta-h+w,g=s.qa,l=s.ra-f+_,m=s.Ha,v=s.Ia-f+_,I=0==(P=L.M),b=P>=s.Va-1,2==s.Aa&&Or(s,L),L.uc)for(F=(S=s).D.M,e(S.D.uc),L=S.yb;L<S.Hb;++L){A=L,x=F;var C=(j=(U=S).D).Nb;N=U.R;var j=j.wa[j.Y+A],O=U.sa,B=U.ta+16*C*N+16*A,M=j.dd,E=j.tc;if(0!=E)if(e(3<=E),1==U.L)0<A&&wn(O,B,N,E+4),j.La&&Ln(O,B,N,E),0<x&&yn(O,B,N,E+4),j.La&&Nn(O,B,N,E);else{var q=U.B,D=U.qa,R=U.ra+8*C*q+8*A,T=U.Ha,U=U.Ia+8*C*q+8*A;C=j.ld;0<A&&(fn(O,B,N,E+4,M,C),pn(D,R,T,U,q,E+4,M,C)),j.La&&(mn(O,B,N,E,M,C),bn(D,R,T,U,q,E,M,C)),0<x&&(ln(O,B,N,E+4,M,C),dn(D,R,T,U,q,E+4,M,C)),j.La&&(gn(O,B,N,E,M,C),vn(D,R,T,U,q,E,M,C))}}if(s.ia&&alert("todo:DitherRow"),null!=c.put){if(L=16*P,P=16*(P+1),I?(c.y=s.sa,c.O=s.ta+w,c.f=s.qa,c.N=s.ra+_,c.ea=s.Ha,c.W=s.Ia+_):(L-=y,c.y=d,c.O=p,c.f=g,c.N=l,c.ea=m,c.W=v),b||(P-=y),P>c.o&&(P=c.o),c.F=null,c.J=null,null!=s.Fa&&0<s.Fa.length&&L<P&&(c.J=lr(s,c,L,P-L),c.F=s.mb,null==c.F&&0==c.F.length)){u=Jt(s,3,"Could not decode alpha data.");break t}L<c.j&&(y=c.j-L,L=c.j,e(!(1&y)),c.O+=s.R*y,c.N+=s.B*(y>>1),c.W+=s.B*(y>>1),null!=c.F&&(c.J+=c.width*y)),L<P&&(c.O+=c.v,c.N+=c.v>>1,c.W+=c.v>>1,null!=c.F&&(c.J+=c.v),c.ka=L-c.j,c.U=c.va-c.v,c.T=P-L,u=c.put(c))}o+1!=s.Ic||b||(n(s.sa,s.ta-h,d,p+16*s.R,h),n(s.qa,s.ra-f,g,l+8*s.B,f),n(s.Ha,s.Ia-f,m,v+8*s.B,f))}if(!u)return Jt(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 c=t[e+0]+t[e+8],u=t[e+0]-t[e+8],h=(35468*t[e+4]>>16)-re(t[e+12]),l=re(t[e+4])+(35468*t[e+12]>>16);s[o+0]=c+l,s[o+1]=u+h,s[o+2]=u-h,s[o+3]=c-l,o+=4,e++}for(i=o=0;4>i;++i)c=(t=s[o+0]+4)+s[o+8],u=t-s[o+8],h=(35468*s[o+4]>>16)-re(s[o+12]),te(r,n,0,0,c+(l=re(s[o+4])+(35468*s[o+12]>>16))),te(r,n,1,0,u+h),te(r,n,2,0,u-h),te(r,n,3,0,c-l),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 ce(t,e,r,n){t[e+0]&&un(t,e+0,r,n),t[e+16]&&un(t,e+16,r,n+4),t[e+32]&&un(t,e+32,r,n+128),t[e+48]&&un(t,e+48,r,n+128+4)}function ue(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],c=t[e+4+i]+t[e+8+i],u=t[e+4+i]-t[e+8+i],h=t[e+0+i]-t[e+12+i];o[0+i]=s+c,o[8+i]=s-c,o[4+i]=h+u,o[12+i]=h-u}for(i=0;4>i;++i)s=(t=o[0+4*i]+3)+o[3+4*i],c=o[1+4*i]+o[2+4*i],u=o[1+4*i]-o[2+4*i],h=t-o[3+4*i],r[n+0]=s+c>>3,r[n+16]=h+u>>3,r[n+32]=s-c>>3,r[n+48]=h-u>>3,n+=64}function he(t,e,r){var n,i=e-32,a=Bn,o=255-t[i-1];for(n=0;n<r;++n){var s,c=a,u=o+t[e-1];for(s=0;s<r;++s)t[e+s]=c[u+t[i+s]];e+=32}}function le(t,e){he(t,e,4)}function fe(t,e){he(t,e,8)}function de(t,e){he(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 Ne(t,e,r){return t+2*e+r+2>>2}function Le(t,e){var r,i=e-32;i=new Uint8Array([Ne(t[i-1],t[i+0],t[i+1]),Ne(t[i+0],t[i+1],t[i+2]),Ne(t[i+1],t[i+2],t[i+3]),Ne(t[i+2],t[i+3],t[i+4])]);for(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];I(t,e+0,16843009*Ne(t[e-1-32],r,n)),I(t,e+32,16843009*Ne(r,n,i)),I(t,e+64,16843009*Ne(n,i,a)),I(t,e+96,16843009*Ne(i,a,a))}function xe(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 Se(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],c=t[e+2-32],u=t[e+3-32];t[e+0+96]=Ne(n,i,t[e-1+96]),t[e+1+96]=t[e+0+64]=Ne(r,n,i),t[e+2+96]=t[e+1+64]=t[e+0+32]=Ne(a,r,n),t[e+3+96]=t[e+2+64]=t[e+1+32]=t[e+0+0]=Ne(o,a,r),t[e+3+64]=t[e+2+32]=t[e+1+0]=Ne(s,o,a),t[e+3+32]=t[e+2+0]=Ne(c,s,o),t[e+3+0]=Ne(u,c,s)}function _e(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],c=t[e+7-32];t[e+0+0]=Ne(t[e+0-32],r,n),t[e+1+0]=t[e+0+32]=Ne(r,n,i),t[e+2+0]=t[e+1+32]=t[e+0+64]=Ne(n,i,a),t[e+3+0]=t[e+2+32]=t[e+1+64]=t[e+0+96]=Ne(i,a,o),t[e+3+32]=t[e+2+64]=t[e+1+96]=Ne(a,o,s),t[e+3+64]=t[e+2+96]=Ne(o,s,c),t[e+3+96]=Ne(s,c,c)}function Pe(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],c=t[e+2-32],u=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+c+1>>1,t[e+3+0]=c+u+1>>1,t[e+0+96]=Ne(i,n,r),t[e+0+64]=Ne(n,r,a),t[e+0+32]=t[e+1+96]=Ne(r,a,o),t[e+1+32]=t[e+2+96]=Ne(a,o,s),t[e+2+32]=t[e+3+96]=Ne(o,s,c),t[e+3+32]=Ne(s,c,u)}function ke(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],c=t[e+6-32],u=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]=Ne(r,n,i),t[e+1+32]=t[e+0+96]=Ne(n,i,a),t[e+2+32]=t[e+1+96]=Ne(i,a,o),t[e+3+32]=t[e+2+96]=Ne(a,o,s),t[e+3+64]=Ne(o,s,c),t[e+3+96]=Ne(s,c,u)}function Ie(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]=Ne(r,n,i),t[e+3+0]=t[e+1+32]=Ne(n,i,a),t[e+3+32]=t[e+1+64]=Ne(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 Fe(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],c=t[e+1-32],u=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]=Ne(s,c,u),t[e+2+0]=Ne(o,s,c),t[e+1+0]=t[e+3+32]=Ne(r,o,s),t[e+1+32]=t[e+3+64]=Ne(n,r,o),t[e+1+64]=t[e+3+96]=Ne(i,n,r),t[e+1+96]=Ne(a,i,n)}function Ce(t,e){var r;for(r=0;8>r;++r)n(t,e+32*r,t,e-32,8)}function je(t,e){var r;for(r=0;8>r;++r)i(t,e,t[e-1],8),e+=32}function Oe(t,e,r){var n;for(n=0;8>n;++n)i(e,r+32*n,t,8)}function Be(t,e){var r,n=8;for(r=0;8>r;++r)n+=t[e+r-32]+t[e-1+32*r];Oe(n>>4,t,e)}function Me(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e+r-32];Oe(n>>3,t,e)}function Ee(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e-1+32*r];Oe(n>>3,t,e)}function qe(t,e){Oe(128,t,e)}function De(t,e,r){var n=t[e-r],i=t[e+0],a=3*(i-n)+jn[1020+t[e-2*r]-t[e+r]],o=On[112+(a+4>>3)];t[e-r]=Bn[255+n+On[112+(a+3>>3)]],t[e+0]=Bn[255+i-o]}function Re(t,e,r,n){var i=t[e+0],a=t[e+r];return Mn[255+t[e-2*r]-t[e-r]]>n||Mn[255+a-i]>n}function Te(t,e,r,n){return 4*Mn[255+t[e-r]-t[e+0]]+Mn[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],c=t[e+0],u=t[e+r],h=t[e+2*r],l=t[e+3*r];return 4*Mn[255+s-c]+Mn[255+o-u]>n?0:Mn[255+t[e-4*r]-a]<=i&&Mn[255+a-o]<=i&&Mn[255+o-s]<=i&&Mn[255+l-h]<=i&&Mn[255+h-u]<=i&&Mn[255+u-c]<=i}function ze(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)Te(t,e+n,r,i)&&De(t,e+n,r)}function He(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)Te(t,e+n*r,1,i)&&De(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))De(t,e,r);else{var c=t,u=e,h=r,l=c[u-2*h],f=c[u-h],d=c[u+0],p=c[u+h],g=c[u+2*h],m=27*(b=jn[1020+3*(d-f)+jn[1020+l-p]])+63>>7,v=18*b+63>>7,b=9*b+63>>7;c[u-3*h]=Bn[255+c[u-3*h]+b],c[u-2*h]=Bn[255+l+v],c[u-h]=Bn[255+f+m],c[u+0]=Bn[255+d-m],c[u+h]=Bn[255+p-v],c[u+2*h]=Bn[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))De(t,e,r);else{var c=t,u=e,h=r,l=c[u-h],f=c[u+0],d=c[u+h],p=On[112+((g=3*(f-l))+4>>3)],g=On[112+(g+3>>3)],m=p+1>>1;c[u-2*h]=Bn[255+c[u-2*h]+m],c[u-h]=Bn[255+l+g],c[u+0]=Bn[255+f-p],c[u+h]=Bn[255+d-m]}e+=n}}function Je(t,e,r,n,i,a){Ge(t,e,r,1,16,n,i,a)}function Xe(t,e,r,n,i,a){Ge(t,e,1,r,16,n,i,a)}function Ke(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 Ze(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 $e(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 Qe(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 ct,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 M,this.vb=new M,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new d,this.yc=new l}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 N,this.Pb=0,this.wd=new N,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 cr(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 ur(t,e,r,n,i,a,o){var s;if(null==t)cr(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 hr(t,e,r,n,i,a,o){if(null==t)cr(null,null,r,n,i,a,o);else{var s,c=t[e+0],u=c,h=c;for(s=0;s<o;++s)u=h+(c=t[e+s])-u,h=r[n+s]+(-256&u?0>u?0:255:u)&255,u=c,i[a+s]=h}}function lr(t,r,i,o){var s=r.width,c=r.o;if(e(null!=t&&null!=r),0>i||0>=o||i+o>c)return null;if(!t.Cc){if(null==t.ga){var u;if(t.ga=new sr,(u=null==t.ga)||(u=r.width*r.o,e(0==t.Gb.length),t.Gb=a(u),t.Uc=0,null==t.Gb?u=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,u=1),u=!u),!u){u=t.ga;var h=t.Fa,l=t.P,f=t.qc,d=t.mb,p=t.nb,g=l+1,m=f-1,b=u.l;if(e(null!=h&&null!=d&&null!=r),mi[0]=null,mi[1]=cr,mi[2]=ur,mi[3]=hr,u.ca=d,u.tb=p,u.c=r.width,u.i=r.height,e(0<u.c&&0<u.i),1>=f)r=0;else if(u.$a=h[l+0]>>0&3,u.Z=h[l+0]>>2&3,u.Lc=h[l+0]>>4&3,l=h[l+0]>>6&3,0>u.$a||1<u.$a||4<=u.Z||1<u.Lc||l)r=0;else if(b.put=dt,b.ac=ft,b.bc=pt,b.ma=u,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,u.$a)t:{e(1==u.$a),r=kt();e:for(;;){if(null==r){r=0;break t}if(e(null!=u),u.mc=r,r.c=u.c,r.i=u.i,r.l=u.l,r.l.ma=u,r.l.width=u.c,r.l.height=u.i,r.a=0,v(r.m,h,g,m),!It(u.c,u.i,1,r,null))break e;if(1==r.ab&&3==r.gc[0].hc&&At(r.s)?(u.ic=1,h=r.c*r.i,r.Ta=null,r.Ua=0,r.V=a(h),r.Ba=0,null==r.V?(r.a=1,r=0):r=1):(u.ic=0,r=Ft(r,u.c)),!r)break e;r=1;break t}u.mc=null,r=0}else r=m>=u.c*u.i;u=!r}if(u)return null;1!=t.ga.Lc?t.Ga=0:o=c-i}e(null!=t.ga),e(i+o<=c);t:{if(r=(h=t.ga).c,c=h.l.o,0==h.$a){if(g=t.rc,m=t.Vc,b=t.Fa,l=t.P+1+i*r,f=t.mb,d=t.nb+i*r,e(l<=t.P+t.qc),0!=h.Z)for(e(null!=mi[h.Z]),u=0;u<o;++u)mi[h.Z](g,m,b,l,f,d,r),g=f,m=d,d+=r,l+=r;else for(u=0;u<o;++u)n(f,d,b,l,r),g=f,m=d,d+=r,l+=r;t.rc=g,t.Vc=m}else{if(e(null!=h.mc),r=i+o,e(null!=(u=h.mc)),e(r<=u.i),u.C>=r)r=1;else if(h.ic||mr(),h.ic){h=u.V,g=u.Ba,m=u.c;var y=u.i,w=(b=1,l=u.$/m,f=u.$%m,d=u.m,p=u.s,u.$),N=m*y,L=m*r,x=p.wc,_=w<L?wt(p,f,l):null;e(w<=N),e(r<=y),e(At(p));e:for(;;){for(;!d.h&&w<L;){if(f&x||(_=wt(p,f,l)),e(null!=_),S(d),256>(y=bt(_.G[0],_.H[0],d)))h[g+w]=y,++w,++f>=m&&(f=0,++l<=r&&!(l%16)&&St(u,l));else{if(!(280>y)){b=0;break e}y=mt(y-256,d);var P,k=bt(_.G[4],_.H[4],d);if(S(d),!(w>=(k=vt(m,k=mt(k,d)))&&N-w>=y)){b=0;break e}for(P=0;P<y;++P)h[g+w+P]=h[g+w+P-k];for(w+=y,f+=y;f>=m;)f-=m,++l<=r&&!(l%16)&&St(u,l);w<L&&f&x&&(_=wt(p,f,l))}e(d.h==A(d))}St(u,l>r?r:l);break e}!b||d.h&&w<N?(b=0,u.a=d.h?5:3):u.$=w,r=b}else r=_t(u,u.V,u.Ba,u.c,u.i,r,Ct);if(!r){o=0;break t}}i+o>=c&&(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,c=e+(r?1:0),u=t,h=e+(r?0:3);for(o=0;o<n;++o){var l=u[h+4*o];255!=l&&(l*=32897,s[c+4*o+0]=s[c+4*o+0]*l>>23,s[c+4*o+1]=s[c+4*o+1]*l>>23,s[c+4*o+2]=s[c+4*o+2]*l>>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&(u=t[e+2*a+1]),c=4369*s,u=(240&u|u>>4)*c>>16;t[e+2*a+0]=(240&o|o>>4)*c>>16&240|(15&o|o<<4)*c>>16>>4&15,t[e+2*a+1]=240&u|s}e+=i}}function pr(t,e,r,n,i,a,o,s){var c,u,h=255;for(u=0;u<i;++u){for(c=0;c<n;++c){var l=t[e+c];a[o+4*c]=l,h&=l}e+=r,o+=s}return 255!=h}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,xn=dr,Sn=pr,_n=gr}function vr(r,n,i){t[r]=function(t,r,a,o,s,c,u,h,l,f,d,p,g,m,v,b,y){var w,N=y-1>>1,L=s[c+0]|u[h+0]<<16,A=l[f+0]|d[p+0]<<16;e(null!=t);var x=3*L+A+131074>>2;for(n(t[r+0],255&x,x>>16,g,m),null!=a&&(x=3*A+L+131074>>2,n(a[o+0],255&x,x>>16,v,b)),w=1;w<=N;++w){var S=s[c+w]|u[h+w]<<16,_=l[f+w]|d[p+w]<<16,P=L+S+A+_+524296,k=P+2*(S+A)>>3;x=k+L>>1,L=(P=P+2*(L+_)>>3)+S>>1,n(t[r+2*w-1],255&x,x>>16,g,m+(2*w-1)*i),n(t[r+2*w-0],255&L,L>>16,g,m+(2*w-0)*i),null!=a&&(x=P+A>>1,L=k+_>>1,n(a[o+2*w-1],255&x,x>>16,v,b+(2*w-1)*i),n(a[o+2*w+0],255&L,L>>16,v,b+(2*w+0)*i)),L=S,A=_}1&y||(x=3*L+A+131074>>2,n(t[r+y-1],255&x,x>>16,g,m+(y-1)*i),null!=a&&(x=3*A+L+131074>>2,n(a[o+y-1],255&x,x>>16,v,b+(y-1)*i)))}}function br(){vi[En]=bi,vi[qn]=wi,vi[Dn]=yi,vi[Rn]=Ni,vi[Tn]=Li,vi[Un]=Ai,vi[zn]=xi,vi[Hn]=wi,vi[Wn]=Ni,vi[Vn]=Li,vi[Gn]=Ai}function yr(t){return t&~Fi?0>t?0:255:t>>Ii}function wr(t,e){return yr((19077*t>>8)+(26149*e>>8)-14234)}function Nr(t,e,r){return yr((19077*t>>8)-(6419*e>>8)-(13320*r>>8)+8708)}function Lr(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]=Nr(t,e,r),n[i+2]=Lr(t,e)}function xr(t,e,r,n,i){n[i+0]=Lr(t,e),n[i+1]=Nr(t,e,r),n[i+2]=wr(t,r)}function Sr(t,e,r,n,i){var a=Nr(t,e,r);e=a<<3&224|Lr(t,e)>>3,n[i+0]=248&wr(t,r)|a>>5,n[i+1]=e}function _r(t,e,r,n,i){var a=240&Lr(t,e)|15;n[i+0]=240&wr(t,r)|Nr(t,e,r)>>4,n[i+1]=a}function Pr(t,e,r,n,i){n[i+0]=255,Ar(t,e,r,n,i+1)}function kr(t,e,r,n,i){xr(t,e,r,n,i),n[i+3]=255}function Ir(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 Fr(e,r,n){t[e]=function(t,e,i,a,o,s,c,u,h){for(var l=u+(-2&h)*n;u!=l;)r(t[e+0],i[a+0],o[s+0],c,u),r(t[e+1],i[a+0],o[s+0],c,u+n),e+=2,++a,++s,u+=2*n;1&h&&r(t[e+0],i[a+0],o[s+0],c,u)}}function Cr(t,e,r){return 0==r?0==t?0==e?6:5:0==e?4:0:r}function jr(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:un(e,r,n,i)}}function Or(t,e){var r,a,o=e.M,s=e.Nb,c=t.oc,u=t.pc+40,h=t.oc,l=t.pc+584,f=t.oc,d=t.pc+600;for(r=0;16>r;++r)c[u+32*r-1]=129;for(r=0;8>r;++r)h[l+32*r-1]=129,f[d+32*r-1]=129;for(0<o?c[u-1-32]=h[l-1-32]=f[d-1-32]=129:(i(c,u-32-1,127,21),i(h,l-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(c,u+32*r-4,c,u+32*r+12,4);for(r=-1;8>r;++r)n(h,l+32*r-4,h,l+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(c,u-32,g[m].y,0,16),n(h,l-32,g[m].f,0,8),n(f,d-32,g[m].ea,0,8)),p.Za){var y=c,w=u-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=c,w=u+Di[r],fi[p.Ob[r]](y,w),jr(b,v,16*+r,y,w)}else if(y=Cr(a,o,p.Ob[0]),li[y](c,u),0!=b)for(r=0;16>r;++r,b<<=2)jr(b,v,16*+r,c,u+Di[r]);for(r=p.Gc,y=Cr(a,o,p.Dd),di[y](h,l),di[y](f,d),b=v,y=h,w=l,255&(p=r>>0)&&(170&p?cn(b,256,y,w):hn(b,256,y,w)),p=f,b=d,255&(r>>=8)&&(170&r?cn(v,320,p,b):hn(v,320,p,b)),o<t.Ub-1&&(n(g[m].y,0,c,u+480,16),n(g[m].f,0,h,l+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,c,u+32*r,16);for(r=0;8>r;++r)n(v,p+r*t.B,h,l+32*r,8),n(b,y+r*t.B,f,d+32*r,8)}}function Br(t,n,i,a,o,s,c,u,h){var l=[0],f=[0],d=0,p=null!=h?h.kd:0,g=null!=h?h: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=j(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 L=t;b=n,y=i;var A=l,x=f,S=m=[0];if((k=d=[d])[0]=0,8>y[0])y=7;else{if(!r(L,b[0],"VP8X")){if(10!=j(L,b[0]+4)){y=3;break t}if(18>y[0]){y=7;break t}var _=j(L,b[0]+8),P=1+C(L,b[0]+12);if(2147483648<=P*(L=1+C(L,b[0]+15))){y=3;break t}null!=S&&(S[0]=_),null!=A&&(A[0]=P),null!=x&&(x[0]=L),b[0]+=18,y[0]-=18,k[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!=c&&(c[0]=b),null!=u&&(u[0]=0),c=l[0],m=f[0],d&&b&&null==h){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:{_=t,y=n,w=i;var k=g.gb;A=g.na,x=g.P,S=g.Sa;P=22,e(null!=_),e(null!=w),L=y[0];var I=w[0];for(e(null!=A),e(null!=S),A[0]=null,x[0]=null,S[0]=0;;){if(y[0]=L,w[0]=I,8>I){y=7;break t}var F=j(_,L+4);if(4294967286<F){y=3;break t}var O=8+F+1&-2;if(P+=O,0<k&&P>k){y=3;break t}if(!r(_,L,"VP8 ")||!r(_,L,"VP8L")){y=0;break t}if(I[0]<O){y=7;break t}r(_,L,"ALPH")||(A[0]=_,x[0]=L+8,S[0]=F),L+=O,I-=O}}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(k=t,y=n,w=i,A=g.gb[0],x=g.Ja,S=g.xa,_=y[0],L=!r(k,_,"VP8 "),P=!r(k,_,"VP8L"),e(null!=k),e(null!=w),e(null!=x),e(null!=S),8>w[0])y=7;else{if(L||P){if(k=j(k,_+4),12<=A&&k>A-12){y=3;break t}if(p&&k>w[0]-8){y=7;break t}x[0]=k,y[0]+=8,w[0]-=8,S[0]=P}else S[0]=5<=w[0]&&47==k[_+0]&&!(k[_+4]>>5),x[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==u||b||(u[0]=g.xa?2:1),c=[c],m=[m],g.xa){if(5>i){y=7;break}u=c,p=m,b=s,null==t||5>i?t=0:5<=i&&47==t[n+0]&&!(t[n+4]>>5)?(w=[0],k=[0],A=[0],v(x=new N,t,n,i),gt(x,w,k,A)?(null!=u&&(u[0]=w[0]),null!=p&&(p[0]=k[0]),null!=b&&(b[0]=A[0]),t=1):t=0):t=0}else{if(10>i){y=7;break}u=m,null==t||10>i||!Xt(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:(c&&(c[0]=b),u&&(u[0]=t),t=1))}if(!t)return 3;if(c=c[0],m=m[0],d&&(l[0]!=c||f[0]!=m))return 3;null!=h&&(h[0]=g,h.offset=n-h.w,e(4294967286>n-h.w),e(h.offset==h.ha-i));break}return 0==y||7==y&&d&&null==h?(null!=s&&(s[0]|=null!=g.na&&0<g.na.length),null!=a&&(a[0]=c),null!=o&&(o[0]=m),0):y}function Mr(t,e,r){var n=e.width,i=e.height,a=0,o=0,s=n,c=i;if(e.Da=null!=t&&0<t.Da,e.Da&&(s=t.cd,c=t.bd,a=t.v,o=t.j,11>r||(a&=-2,o&=-2),0>a||0>o||0>=s||0>=c||a+s>n||o+c>i))return 0;if(e.v=a,e.j=o,e.va=a+s,e.o=o+c,e.U=s,e.T=c,e.da=null!=t&&0<t.da,e.da){if(!E(s,c,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 qr(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,c=-2&r.j;if(0>s||0>c||0>=i||0>=o||s+i>t||c+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 u=n.width,h=n.height;if(t=n.S,0>=u||0>=h||!(t>=En&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){s=o=i=e=0;var l=(c=u*zi[t])*h;if(11>t||(o=(h+1)/2*(e=(u+1)/2),12==t&&(s=(i=u)*h)),null==(h=a(l+2*o+s))){t=1;break t}n.sd=h,11>t?((u=n.f.RGBA).eb=h,u.fb=0,u.A=c,u.size=l):((u=n.f.kb).y=h,u.O=0,u.fa=c,u.Fd=l,u.f=h,u.N=0+l,u.Ab=e,u.Cd=o,u.ea=h,u.W=0+l+o,u.Db=e,u.Ed=o,12==t&&(u.F=h,u.J=0+l+2*o),u.Tc=s,u.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&=(c=Math.abs(t.A))*(s-1)+o<=t.size,e&=c>=o*zi[i],e&=null!=t.eb;else{t=n.f.kb,c=(o+1)/2,l=(s+1)/2,u=Math.abs(t.fa);h=Math.abs(t.Ab);var f=Math.abs(t.Db),d=Math.abs(t.lb),p=d*(s-1)+o;e&=u*(s-1)+o<=t.Fd,e&=h*(l-1)+c<=t.Cd,e=(e&=f*(l-1)+c<=t.Ed)&u>=o&h>=c&f>=c,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 Dr=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],Tr=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(t>>0&255,n>>0&255))>>>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;X("ColorIndexInverseTransform","MapARGB","32b",(function(t){return t>>8&255}),(function(t){return t})),X("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(t){return t}),(function(t){return t>>8&255}));var Gr,Yr=t.ColorIndexInverseTransform,Jr=t.MapARGB,Xr=t.VP8LColorIndexInverseTransformAlpha,Kr=t.MapAlpha,Zr=t.VP8LPredictorsAdd=[];Zr.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var $r,Qr,tn,en,rn,nn,an,on,sn,cn,un,hn,ln,fn,dn,pn,gn,mn,vn,bn,yn,wn,Nn,Ln,An,xn,Sn,_n,Pn=a(511),kn=a(2041),In=a(225),Fn=a(767),Cn=0,jn=kn,On=In,Bn=Fn,Mn=Pn,En=0,qn=1,Dn=2,Rn=3,Tn=4,Un=5,zn=6,Hn=7,Wn=8,Vn=9,Gn=10,Yn=[2,3,7],Jn=[3,3,11],Xn=[280,256,256,256,40],Kn=[0,1,1,1,0],Zn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],$n=[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],Qn=[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]]]],ci=[[[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]]],ui=[[[[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]]]],hi=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],li=[],fi=[],di=[],pi=1,gi=2,mi=[],vi=[];vr("UpsampleRgbLinePair",Ar,3),vr("UpsampleBgrLinePair",xr,3),vr("UpsampleRgbaLinePair",Ir,4),vr("UpsampleBgraLinePair",kr,4),vr("UpsampleArgbLinePair",Pr,4),vr("UpsampleRgba4444LinePair",_r,2),vr("UpsampleRgb565LinePair",Sr,2);var bi=t.UpsampleRgbLinePair,yi=t.UpsampleBgrLinePair,wi=t.UpsampleRgbaLinePair,Ni=t.UpsampleBgraLinePair,Li=t.UpsampleArgbLinePair,Ai=t.UpsampleRgba4444LinePair,xi=t.UpsampleRgb565LinePair,Si=16,_i=1<<Si-1,Pi=-227,ki=482,Ii=6,Fi=(256<<Ii)-1,Ci=0,ji=a(256),Oi=a(256),Bi=a(256),Mi=a(256),Ei=a(ki-Pi),qi=a(ki-Pi);Fr("YuvToRgbRow",Ar,3),Fr("YuvToBgrRow",xr,3),Fr("YuvToRgbaRow",Ir,4),Fr("YuvToBgraRow",kr,4),Fr("YuvToArgbRow",Pr,4),Fr("YuvToRgba4444Row",_r,2),Fr("YuvToRgb565Row",Sr,2);var Di=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ri=[0,2,8],Ti=[8,7,6,4,4,2,2,2,1,1,1,1],Ui=1;this.WebPDecodeRGBA=function(t,r,n,i,a){var o=qn,s=new rr,c=new ot;s.ba=c,c.S=o,c.width=[c.width],c.height=[c.height];var u=c.width,h=c.height,l=new st;if(null==l||null==t)var f=2;else e(null!=l),f=Br(t,r,n,l.width,l.height,l.Pd,l.Qd,l.format,null);if(0!=f?u=0:(null!=u&&(u[0]=l.width[0]),null!=h&&(h[0]=l.height[0]),u=1),u){c.width=c.width[0],c.height=c.height[0],null!=i&&(i[0]=c.width),null!=a&&(a[0]=c.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=Br(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=kt())){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],!It(n[0],i[0],1,t,null))break e;return 1}return e(0!=t.a),0}(t,i)){if(i=0==(r=qr(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),!Mr(a.Oa,n,Rn)){i.a=2;break r}if(!Ft(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&&!O(i.s.vb,i.s.Wa.Xa)){i.a=1;break r}i.xb=0}if(!_t(i,i.V,i.Ba,i.c,i.i,n.o,Lt))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,Kt(t,i)){if(0==(r=qr(i.width,i.height,s.Oa,s.ba))){if(t.Aa=0,n=s.Oa,e(null!=(a=t)),null!=n){if(0<(u=0>(u=n.Md)?0:100<u?255:255*u/100)){for(h=l=0;4>h;++h)12>(f=a.pb[h]).lc&&(f.ia=u*Ti[0>f.lc?0:f.lc]>>3),l|=f.ia;l&&(alert("todo:VP8InitRandom"),a.ia=1)}a.Ga=n.Id,100<a.Ga?a.Ga=100:0>a.Ga&&(a.Ga=0)}Qt(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?c.f.RGBA.eb:c.f.kb.y}else o=null;return o};var zi=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(t,e){for(var r="",n=0;n<4;n++)r+=String.fromCharCode(t[e++]);return r}function h(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16)>>>0}function l(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}new c;var f=[0],d=[0],p=[],g=new c,m=t,v=function(t,e){var r={},n=0,i=!1,a=0,o=0;if(r.frames=[],!
+/** @license
+   * Copyright (c) 2017 Dominik Homberger
+  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+  https://webpjs.appspot.com
+  WebPRiffParser dominikhlbg@gmail.com
+  */
+function(t,e,r,n){for(var i=0;i<n;i++)if(t[e+i]!=r.charCodeAt(i))return!0;return!1}(t,e,"RIFF",4)){var s,c;l(t,e+=4);for(e+=8;e<t.length;){var f=u(t,e),d=l(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+h(t,g);g+=3;v.canvas_height=1+h(t,g);g+=3;break;case"ALPH":i=!0,a=p+8,o=e-8;break;case"ANIM":(v=r.header).bgcolor=l(t,e);g=e+4;v.loop_count=(s=t)[(c=g)+0]<<0|s[c+1]<<8;g+=2;break;case"ANMF":var m,v;(v=r.frames[n]={}).offset_x=2*h(t,e),e+=3,v.offset_y=2*h(t,e),e+=3,v.width=1+h(t,e),e+=3,v.height=1+h(t,e),e+=3,v.duration=h(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 N=y[0],L=g.WebPDecodeRGBA(m,N.src_off,N.src_size,d,f);N.rgba=L,N.imgwidth=d[0],N.imgheight=f[0];for(var A=0;A<d[0]*f[0]*4;A++)p[A]=L[A];return this.width=d,this.height=f,this.data=p,this}!function(t){var r=function(){return"function"==typeof e},n=function(r,n,a,h){var l=4,f=s;switch(h){case t.image_compression.FAST:l=1,f=o;break;case t.image_compression.MEDIUM:l=6,f=c;break;case t.image_compression.SLOW:l=9,f=u}r=i(r,n,a,f);var d=e(r,{level:l});return t.__addimage__.arrayBufferToBinaryString(d)},i=function(t,e,r,n){for(var i,a,o,s=t.length/e,c=new Uint8Array(t.length+s),u=l(),h=0;h<s;h+=1){if(o=h*e,i=t.subarray(o,o+e),n)c.set(n(i,r,a),o+h);else{for(var d,p=u.length,g=[];d<p;d+=1)g[d]=u[d](i,r,a);var m=f(g.concat());c.set(g[m],o+h)}a=i}return c},a=function(t){var e=Array.apply([],t);return e.unshift(0),e},o=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},s=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},c=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},u=function(t,e,r){var n,i,a,o,s=[],c=t.length;s[0]=4;for(var u=0;u<c;u+=1)n=t[u-e]||0,i=r&&r[u]||0,a=r&&r[u-e]||0,o=h(n,i,a),s[u+1]=t[u]-o+256&255;return s},h=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[a,o,s,c,u]},f=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(e,i,a,o){var s,c,u,h,l,f,d,p,g,m,v,b,y,w,N,L=this.decode.FLATE_DECODE,A="";if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){if(e=(u=new Kt(e)).imgData,c=u.bits,s=u.colorSpace,l=u.colors,-1!==[4,6].indexOf(u.colorType)){if(8===u.bits){g=(p=32==u.pixelBitlength?new Uint32Array(u.decodePixels().buffer):16==u.pixelBitlength?new Uint16Array(u.decodePixels().buffer):new Uint8Array(u.decodePixels().buffer)).length,v=new Uint8Array(g*u.colors),m=new Uint8Array(g);var x,S=u.pixelBitlength-u.bits;for(w=0,N=0;w<g;w++){for(y=p[w],x=0;x<S;)v[N++]=y>>>x&255,x+=u.bits;m[w]=y>>>x&255}}if(16===u.bits){g=(p=new Uint32Array(u.decodePixels().buffer)).length,v=new Uint8Array(g*(32/u.pixelBitlength)*u.colors),m=new Uint8Array(g*(32/u.pixelBitlength)),b=u.colors>1,w=0,N=0;for(var _=0;w<g;)y=p[w++],v[N++]=y>>>0&255,b&&(v[N++]=y>>>16&255,y=p[w++],v[N++]=y>>>0&255),m[_++]=y>>>16&255;c=8}o!==t.image_compression.NONE&&r()?(e=n(v,u.width*u.colors,u.colors,o),d=n(m,u.width,1,o)):(e=v,d=m,L=void 0)}if(3===u.colorType&&(s=this.color_spaces.INDEXED,f=u.palette,u.transparency.indexed)){var P=u.transparency.indexed,k=0;for(w=0,g=P.length;w<g;++w)k+=P[w];if((k/=255)===g-1&&-1!==P.indexOf(0))h=[P.indexOf(0)];else if(k!==g){for(p=u.decodePixels(),m=new Uint8Array(p.length),w=0,g=p.length;w<g;w++)m[w]=P[p[w]];d=n(m,u.width,1)}}var I=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}(o);return L===this.decode.FLATE_DECODE&&(A="/Predictor "+I+" "),A+="/Colors "+l+" /BitsPerComponent "+c+" /Columns "+u.width,(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(d&&this.__addimage__.isArrayBuffer(d)||this.__addimage__.isArrayBufferView(d))&&(d=this.__addimage__.arrayBufferToBinaryString(d)),{alias:a,data:e,index:i,filter:L,decodeParameters:A,transparency:h,palette:f,sMask:d,predictor:I,width:u.width,height:u.height,bitsPerComponent:c,colorSpace:s}}}}(E.API),function(t){t.processGIF89A=function(e,r,n,i){var a=new Zt(e),o=a.width,s=a.height,c=[];a.decodeAndBlitFrameRGBA(0,c);var u={data:c,width:o,height:s},h=new Qt(100).encode(u,100);return t.processJPEG.call(this,h,r,n,i)},t.processGIF87A=t.processGIF89A}(E.API),te.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)},te.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){a.log("bit decode error:"+t)}},te.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 c=this.palette[a>>7-s&1];this.data[o+4*s]=c.blue,this.data[o+4*s+1]=c.green,this.data[o+4*s+2]=c.red,this.data[o+4*s+3]=255}0!==r&&(this.pos+=4-r)}},te.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,c=15&a,u=this.palette[s];if(this.data[o]=u.blue,this.data[o+1]=u.green,this.data[o+2]=u.red,this.data[o+3]=255,2*i+1>=this.width)break;u=this.palette[c],this.data[o+4]=u.blue,this.data[o+4+1]=u.green,this.data[o+4+2]=u.red,this.data[o+4+3]=255}0!==e&&(this.pos+=4-e)}},te.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)}},te.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,c=(a>>10&e)/e*255|0,u=a>>15?255:0,h=n*this.width*4+4*i;this.data[h]=c,this.data[h+1]=s,this.data[h+2]=o,this.data[h+3]=u}this.pos+=t}},te.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,c=(o>>5&r)/r*255|0,u=(o>>11)/e*255|0,h=i*this.width*4+4*a;this.data[h]=u,this.data[h+1]=c,this.data[h+2]=s,this.data[h+3]=255}this.pos+=t}},te.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}},te.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}},te.prototype.getData=function(){return this.data},
+/**
+ * @license
+ * Copyright (c) 2018 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){t.processBMP=function(e,r,n,i){var a=new te(e,!1),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},u=new Qt(100).encode(c,100);return t.processJPEG.call(this,u,r,n,i)}}(E.API),ee.prototype.getData=function(){return this.data},
+/**
+ * @license
+ * Copyright (c) 2019 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){t.processWEBP=function(e,r,n,i){var a=new ee(e,!1),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},u=new Qt(100).encode(c,100);return t.processJPEG.call(this,u,r,n,i)}}(E.API),E.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,c=0,u=0;u<i;u+=4){var h=n[u],l=n[u+1],f=n[u+2],d=n[u+3];a[s++]=h,a[s++]=l,a[s++]=f,o[c++]=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}},E.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},Vt=E.API,Gt=Vt.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(),c=r.widths?r.widths:a.metadata.Unicode.widths,u=c.fof?c.fof:1,h=r.kerning?r.kerning:a.metadata.Unicode.kerning,l=h.fof?h.fof:1,f=!1!==r.doKerning,d=0,p=e.length,g=0,m=c[0]||u,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"===t(h[i])&&!isNaN(parseInt(h[i][g],10))?h[i][g]/l:0,v.push((c[i]||m)/u+d)),g=i;return v},Yt=Vt.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 Vt.processArabic&&(t=Vt.processArabic(t)),"function"==typeof n.metadata.widthOfString?n.metadata.widthOfString(t,r,i)/r:Gt.apply(this,arguments).reduce((function(t,e){return t+e}),0)},Jt=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 c=a;for(s=0;a!==o;)s+e[a]>n&&(i.push(t.slice(c,a)),s=0,c=a),s+=e[a],a++;return c!==a&&i.push(t.slice(c,a)),i},Xt=function(t,e,r){r||(r={});var n,i,a,o,s,c,u,h=[],l=[h],f=r.textIndent||0,d=0,p=0,g=t.split(" "),m=Gt.apply(this,[" ",r])[0];if(c=-1===r.lineIndent?g[0].length+2:r.lineIndent||0){var v=Array(c).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,c=Yt.apply(this,[v,r])}for(a=0,o=g.length;a<o;a++){var y=0;if(n=g[a],c&&"\n"==n[0]&&(n=n.substr(1),y=1),f+d+(p=(i=Gt.apply(this,[n,r])).reduce((function(t,e){return t+e}),0))>e||y){if(p>e){for(s=Jt.apply(this,[n,i,e-(f+d),e]),h.push(s.shift()),h=[s.pop()];s.length;)l.push([s.shift()]);p=i.slice(n.length-(h[0]?h[0].length:0)).reduce((function(t,e){return t+e}),0)}else h=[n];l.push(h),f=p+c,d=m}else h.push(n),f+=d+p,d=m}return u=c?function(t,e){return(e?v:"")+t.join(" ")}:function(t){return t.join(" ")},l.map(u)},Vt.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,c,u=[];for(s=0,c=n.length;s<c;s++)u=u.concat(Xt.apply(this,[n[s],o,a]));return u},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var r="klmnopqrstuvwxyz",n={},i={},a=0;a<r.length;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,c,u=["{"];for(var h in e){if(r=e[h],isNaN(parseInt(h,10))?n="'"+h+"'":(h=parseInt(h,10),n=(n=o(h).slice(2)).slice(0,-1)+i[n.slice(-1)]),"number"==typeof r)r<0?(a=o(r).slice(3),c="-"):(a=o(r).slice(2),c=""),a=c+a.slice(0,-1)+i[a.slice(-1)];else{if("object"!==t(r))throw new Error("Don't know what to do with value type "+t(r)+".");a=s(r)}u.push(n+a)}return u.push("}"),u.join("")},c=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,c=o,u=[],h="",l="",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?(u.push([c,i]),c={},i=void 0):"}"==a?((r=u.pop())[0][r[1]]=c,i=void 0,c=r[0]):"-"==a?s=-1:void 0===i?n.hasOwnProperty(a)?(h+=n[a],i=parseInt(h,16)*s,s=1,h=""):h+=a:n.hasOwnProperty(a)?(l+=n[a],c[i]=parseInt(l,16)*s,s=1,i=void 0,l=""):l+=a;return o},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:c("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},h={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},l={Unicode:{"Courier-Oblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":c("{'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":c("{'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:c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":c("{'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:c("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:c("{'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":c("{'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:c("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":c("{'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":c("{'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":c("{'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=l.Unicode[e.postScriptName];r&&(e.metadata.Unicode={},e.metadata.Unicode.widths=r.widths,e.metadata.Unicode.kerning=r.kerning);var n=h.Unicode[e.postScriptName];n&&(e.metadata.Unicode.encoding=n,e.encoding=n.codePages[0])}])}(E.API),
+/**
+ * @license
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+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(u(n)),r.metadata=t.API.TTFFont.open(n),r.metadata.Unicode=r.metadata.Unicode||{encoding:{},kerning:{},widths:[]},r.metadata.glyIdsUsed=[0]}(i,n)}}])}(E),
+/** @license
+ * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+function(t){function e(){return(n.canvg?Promise.resolve(n.canvg):import("canvg")).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}E.API.addSvgAsImage=function(t,r,n,i,o,s,c,u){if(isNaN(r)||isNaN(n))throw a.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(o))throw a.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=o;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,o,c,u)}))}}(),E.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},E.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}},c=Object.keys(s),u=[],h=0,l=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=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1}if("object"===t(e))for(a in e)if(o=e[a],d(c,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(h=0;h<o.length;h+=1)if(i=!0,1===o[h].length&&"number"==typeof o[h][0])u.push(String(o[h]-1));else if(o[h].length>1){for(l=0;l<o[h].length;l+=1)"number"!=typeof o[h][l]&&(i=!1);!0===i&&u.push([o[h][0]-1,o[h][1]-1].join(" "))}n[a].value="["+u.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},
+/** ====================================================================
+ * @license
+ * jsPDF XMP metadata plugin
+ * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+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}}(E.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,c=r.metadata.subset.encode(r.metadata.glyIdsUsed,1),u="",h=0;h<c.length;h++)u+=String.fromCharCode(c[h]);var l=a();o({data:u,addLength1:!0,objectId:l}),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 /"+F(r.fontName)),i("/FontFile2 "+l+" 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 /"+F(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 /"+F(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,c="",u=0;u<s.length;u++)c+=String.fromCharCode(s[u]);var h=a();o({data:c,addLength1:!0,objectId:h}),i("endobj");var l=a();o({data:n(r.metadata.toUnicode),addLength1:!0,objectId:l}),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 "+h+" 0 R"),i("/Flags 96"),i("/FontBBox "+t.API.PDFObject.convert(r.metadata.bbox)),i("/FontName /"+F(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 "+l+" 0 R/BaseFont/"+F(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||{},c=s.pdfEscape,u=s.activeFontKey,h=s.fonts,l=u,f="",d=0,p="",g=h[l].encoding;if("Identity-H"!==h[l].encoding)return{text:n,x:i,y:a,options:o,mutex:s};for(p=n,l=u,Array.isArray(n)&&(p=n[0]),d=0;d<p.length;d+=1)h[l].metadata.hasOwnProperty("cmap")&&(e=h[l].metadata.cmap.unicode.codeMap[p[d].charCodeAt(0)]),e||p[d].charCodeAt(0)<256&&h[l].metadata.hasOwnProperty("Unicode")?f+=p[d]:f+="";var m="";return parseInt(l.slice(1))<14||"WinAnsiEncoding"===g?m=c(f,l).split("").map((function(t){return t.charCodeAt(0).toString(16)})).join(""):"Identity-H"===g&&(m=r(f,h[l])),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}])}(E),
+/**
+ * @license
+ * jsPDF virtual FileSystem functionality
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+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}}(E.API),
+/**
+ * @license
+ * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
+ * MIT License
+ */
+function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var r,n,i,a,o,s,c,u=e,h=[[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]],l=[[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?u[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 c,u,h,l,f=e[s];switch(f){case"L":case"R":m=!1;break;case"N":case"AN":break;case"EN":m&&(f="AN");break;case"AL":m=!0,f="R";break;case"WS":f="N";break;case"CS":s<1||s+1>=e.length||"EN"!==(c=o[s-1])&&"AN"!==c||"EN"!==(u=e[s+1])&&"AN"!==u?f="N":m&&(u="AN"),f=u===c?u:"N";break;case"ES":f="EN"===(c=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(h=s+1,l=e.length;h<l&&"ET"===e[h];)h++;f=h<l&&"EN"===e[h]?"EN":"N";break;case"NSM":if(i&&!a){for(l=e.length,h=s+1;h<l&&"NSM"===e[h];)h++;if(h<l){var d=t[s],p=d>=1425&&d<=2303||64286===d;if(c=e[h],p&&("R"===c||"AL"===c)){f="R";break}}}f=s<1||"B"===(c=e[s-1])?"N":o[s-1];break;case"B":m=!1,r=!0,f=v;break;case"S":n=!0,f="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=!1;break;case"BN":f="N"}return f},N=function(t,e,r){var n=t.split("");return r&&L(n,r,{hiLevel:v}),n.reverse(),e&&e.reverse(),n.join("")},L=function(t,e,i){var a,o,s,c,u,d=-1,p=t.length,g=0,y=[],N=v?l:h,L=[];for(m=!1,r=!1,n=!1,o=0;o<p;o++)L[o]=b(t[o]);for(s=0;s<p;s++){if(u=g,y[s]=w(t,L,y,s),a=240&(g=N[u][f[y[s]]]),g&=15,e[s]=c=N[g][5],a>0)if(16===a){for(o=d;o<s;o++)e[o]=1;d=-1}else d=-1;if(N[g][6])-1===d&&(d=s);else if(d>-1){for(o=d;o<s;o++)e[o]=c;d=-1}"B"===L[s]&&(e[s]=0),i.hiLevel|=c}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}}(L,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,c,u,h=e.length,l=0;l<h;){if(i[l]>=t){for(c=l+1;c<h&&i[c]>=t;)c++;for(u=l,s=c-1;u<s;u++,s--)o=e[u],e[u]=e[s],e[s]=o,n&&(o=n[u],n[u]=n[s],n[s]=o);l=c}l++}}},x=function(t,e,r){var n=t.split(""),i={hiLevel:v};return r||(r=[]),L(n,r,i),function(t,e,r){if(0!==r.hiLevel&&c)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=N(t,e,r);else if(!i&&o&&s)v=a?1:0,t=x(t,e,r),t=N(t,e);else if(!i||a||o||s){if(i&&!o&&a^s)t=N(t,e),a?(v=0,t=x(t,e,r)):(v=1,t=x(t,e,r),t=N(t,e));else if(i&&a&&!o&&s)v=1,t=x(t,e,r),t=N(t,e);else if(!i&&!o&&a^s){var n=c;a?(v=1,t=x(t,e,r),v=0,c=!1,t=x(t,e,r),c=n):(v=0,t=x(t,e,r),t=N(t,e),v=1,c=!1,t=x(t,e,r),c=n,t=N(t,e))}}else v=0,t=x(t,e,r);else v=a?1:0,t=x(t,e,r);return t},this.__bidiEngine__.setOptions=function(t){t&&(i=t.isInputVisual,o=t.isOutputVisual,a=t.isInputRtl,s=t.isOutputRtl,c=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})}])}(E),E.API.TTFFont=function(){function t(t){var e;if(this.rawData=t,e=this.contents=new ne(t),this.contents.pos=4,"ttcf"===e.readString(4))throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new Le(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new ie(this.contents),this.head=new se(this),this.name=new pe(this),this.cmap=new ue(this),this.toUnicode={},this.hhea=new he(this),this.maxp=new ge(this),this.hmtx=new me(this),this.post=new fe(this),this.os2=new le(this),this.loca=new Ne(this),this.glyf=new be(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),0!=(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 re,ne=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}(),ie=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,c,u,h,l,f,d,p;for(p in f=Object.keys(e).length,s=Math.log(2),h=16*Math.floor(Math.log(f)/s),a=Math.floor(h/s),u=16*f-h,(n=new ne).writeInt(this.scalarType),n.writeShort(f),n.writeShort(h),n.writeShort(a),n.writeShort(u),i=16*f,c=n.pos+i,o=null,d=[],e)for(l=e[p],n.writeString(p),n.writeInt(t(l)),n.writeInt(c),n.writeInt(l.length),d=d.concat(l),"head"===p&&(o=c),c+=l.length;c%4;)d.push(0),c++;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=ve.call(t);t.length%4;)t.push(0);for(n=new ne(t),r=0,e=0,i=t.length;e<i;e=e+=4)r+=n.readUInt32();return 4294967295&r},e}(),ae={}.hasOwnProperty,oe=function(t,e){for(var r in e)ae.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};re=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 se=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return oe(e,re),e.prototype.tag="head",e.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()},e.prototype.encode=function(t){var e;return(e=new ne).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},e}(),ce=function(){function t(t,e){var r,n,i,a,o,s,c,u,h,l,f,d,p,g,m,v,b;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),h=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(),l=f/2,t.pos+=6,i=function(){var e,r;for(r=[],s=e=0;0<=l?e<l:e>l;s=0<=l?++e:--e)r.push(t.readUInt16());return r}(),t.pos+=2,p=function(){var e,r;for(r=[],s=e=0;0<=l?e<l:e>l;s=0<=l?++e:--e)r.push(t.readUInt16());return r}(),c=function(){var e,r;for(r=[],s=e=0;0<=l?e<l:e>l;s=0<=l?++e:--e)r.push(t.readUInt16());return r}(),u=function(){var e,r;for(r=[],s=e=0;0<=l?e<l:e>l;s=0<=l?++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===u[s]?a=r+c[s]:0!==(a=o[u[s]/2+(r-d)-(l-s)]||0)&&(a+=c[s]),this.codeMap[r]=65535&a}t.pos=h}return t.encode=function(t,e){var r,n,i,a,o,s,c,u,h,l,f,d,p,g,m,v,b,y,w,N,L,A,x,S,_,P,k,I,F,C,j,O,B,M,E,q,D,R,T,U,z,H,W,V,G,Y;switch(I=new ne,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={},F=0,B=a.length;F<B;F++)null==v[W=t[n=a[F]]]&&(v[W]=++p),i[n]={old:t[n],new:v[t[n]]},g[n]=v[t[n]];return I.writeUInt16(1),I.writeUInt16(0),I.writeUInt32(12),I.writeUInt16(0),I.writeUInt16(262),I.writeUInt16(0),I.write(g),{charMap:i,subtable:I.data,maxGlyphID:p+1};case"unicode":for(P=[],h=[],b=0,v={},r={},m=c=null,C=0,M=a.length;C<M;C++)null==v[w=t[n=a[C]]]&&(v[w]=++b),r[n]={old:w,new:v[w]},o=v[w]-n,null!=m&&o===c||(m&&h.push(m),P.push(n),c=o),m=n;for(m&&h.push(m),h.push(65535),P.push(65535),S=2*(x=P.length),A=2*Math.pow(Math.log(x)/Math.LN2,2),l=Math.log(A/2)/Math.LN2,L=2*x-A,s=[],N=[],f=[],d=j=0,E=P.length;j<E;d=++j){if(_=P[d],u=h[d],65535===_){s.push(0),N.push(0);break}if(_-(k=r[_].new)>=32768)for(s.push(0),N.push(2*(f.length+x-d)),n=O=_;_<=u?O<=u:O>=u;n=_<=u?++O:--O)f.push(r[n].new);else s.push(k-_),N.push(0)}for(I.writeUInt16(3),I.writeUInt16(1),I.writeUInt32(12),I.writeUInt16(4),I.writeUInt16(16+8*x+2*f.length),I.writeUInt16(0),I.writeUInt16(S),I.writeUInt16(A),I.writeUInt16(l),I.writeUInt16(L),z=0,q=h.length;z<q;z++)n=h[z],I.writeUInt16(n);for(I.writeUInt16(0),H=0,D=P.length;H<D;H++)n=P[H],I.writeUInt16(n);for(V=0,R=s.length;V<R;V++)o=s[V],I.writeUInt16(o);for(G=0,T=N.length;G<T;G++)y=N[G],I.writeUInt16(y);for(Y=0,U=f.length;Y<U;Y++)p=f[Y],I.writeUInt16(p);return{charMap:r,subtable:I.data,maxGlyphID:b+1}}},t}(),ue=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return oe(e,re),e.prototype.tag="cmap",e.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 ce(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},e.encode=function(t,e){var r,n;return null==e&&(e="macroman"),r=ce.encode(t,e),(n=new ne).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},e}(),he=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return oe(e,re),e.prototype.tag="hhea",e.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()},e}(),le=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return oe(e,re),e.prototype.tag="OS/2",e.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()},e}(),fe=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return oe(e,re),e.prototype.tag="post",e.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: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 196608:break;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)}},e}(),de=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},pe=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return oe(e,re),e.prototype.tag="name",e.prototype.parse=function(t){var e,r,n,i,a,o,s,c,u,h,l;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=u=0,h=r.length;u<h;i=++u)n=r[i],t.pos=n.offset,c=t.readString(n.length),a=new de(c,n),null==s[l=n.nameID]&&(s[l]=[]),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]},e}(),ge=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return oe(e,re),e.prototype.tag="maxp",e.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()},e}(),me=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return oe(e,re),e.prototype.tag="hmtx",e.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},e.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]}},e}(),ve=[].slice,be=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return oe(e,re),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var e,r,n,i,a,o,s,c,u,h;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 ne(e.read(n))).readShort(),c=o.readShort(),h=o.readShort(),s=o.readShort(),u=o.readShort(),this.cache[t]=-1===a?new we(o,c,h,s,u):new ye(o,a,c,h,s,u),this.cache[t]))},e.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}},e}(),ye=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}(),we=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 1,8,32,64,128,t.prototype.encode=function(){var t,e,r;for(e=new ne(ve.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)e.pos=this.glyphOffsets[t];return e.data},t}(),Ne=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return oe(e,re),e.prototype.tag="loca",e.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)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.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 c=new Array(4*r.length),u=0;u<r.length;++u)c[4*u+3]=255&r[u],c[4*u+2]=(65280&r[u])>>8,c[4*u+1]=(16711680&r[u])>>16,c[4*u]=(4278190080&r[u])>>24;return c},e}(),Le=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,c,u,h,l,f,d,p,g,m;for(n in r=ue.encode(this.generateCmap(),"unicode"),a=this.glyphsFor(t),f={0:0},m=r.charMap)f[(s=m[n]).old]=s.new;for(d in l=r.maxGlyphID,a)d in f||(f[d]=l++);return u=function(t){var e,r;for(e in r={},t)r[t[e]]=e;return r}(f),h=Object.keys(u).sort((function(t,e){return t-e})),p=function(){var t,e,r;for(r=[],t=0,e=h.length;t<e;t++)o=h[t],r.push(u[o]);return r}(),i=this.font.glyf.encode(a,p,f),c=this.font.loca.encode(i.offsets,p),g={cmap:this.font.cmap.raw(),glyf:i.table,loca:c,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}();E.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}();export default E;export{St as AcroForm,At as AcroFormAppearance,mt as AcroFormButton,wt as AcroFormCheckBox,ft as AcroFormChoiceField,pt as AcroFormComboBox,gt as AcroFormEditBox,dt as AcroFormListBox,Lt as AcroFormPasswordField,vt as AcroFormPushButton,bt as AcroFormRadioButton,Nt as AcroFormTextField,j as GState,B as ShadingPattern,M as TilingPattern,E as jsPDF};
+//# sourceMappingURL=jspdf.es.min.js.map
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.es.min.js.map
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.es.min.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.es.min.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"jspdf.es.min.js","sources":["../src/libs/globalObject.js","../src/libs/console.js","../src/libs/FileSaver.js","../src/libs/AtobBtoa.js","../src/libs/rgbcolor.js","../src/libs/md5.js","../src/libs/rc4.js","../src/libs/pdfsecurity.js","../src/libs/pdfname.js","../src/jspdf.js","../src/modules/acroform.js","../src/libs/fontFace.js","../src/modules/addimage.js","../src/modules/annotations.js","../src/modules/arabic.js","../src/modules/autoprint.js","../src/modules/canvas.js","../src/modules/cell.js","../src/modules/javascript.js","../src/modules/context2d.js","../src/modules/filters.js","../src/modules/fileloading.js","../src/modules/html.js","../src/modules/outline.js","../src/modules/jpeg_support.js","../src/libs/png.js","../src/modules/split_text_to_size.js","../src/libs/omggif.js","../src/libs/JPEGEncoder.js","../src/libs/BMPDecoder.js","../src/libs/WebPDecoder.js","../src/modules/png_support.js","../src/modules/gif_support.js","../src/modules/bmp_support.js","../src/modules/webp_support.js","../src/modules/rgba_support.js","../src/modules/setlanguage.js","../src/modules/standard_fonts_metrics.js","../src/modules/ttfsupport.js","../src/modules/svg.js","../src/modules/total_pages.js","../src/modules/viewerpreferences.js","../src/modules/xmp_metadata.js","../src/modules/utf8.js","../src/modules/vfs.js","../src/libs/bidiEngine.js","../src/libs/ttffont.js"],"sourcesContent":["export var globalObject = (function() {\n  return \"undefined\" !== typeof window\n    ? window\n    : \"undefined\" !== typeof global\n    ? global\n    : \"undefined\" !== typeof self\n    ? self\n    : this;\n})();\n","import { globalObject } from \"./globalObject.js\";\n\nfunction consoleLog() {\n  if (globalObject.console && typeof globalObject.console.log === \"function\") {\n    globalObject.console.log.apply(globalObject.console, arguments);\n  }\n}\n\nfunction consoleWarn(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.warn === \"function\") {\n      globalObject.console.warn.apply(globalObject.console, arguments);\n    } else {\n      consoleLog.call(null, arguments);\n    }\n  }\n}\n\nfunction consoleError(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.error === \"function\") {\n      globalObject.console.error.apply(globalObject.console, arguments);\n    } else {\n      consoleLog(str);\n    }\n  }\n}\nexport var console = {\n  log: consoleLog,\n  warn: consoleWarn,\n  error: consoleError\n};\n","/**\n * @license\n * FileSaver.js\n * A saveAs() FileSaver implementation.\n *\n * By Eli Grey, http://eligrey.com\n *\n * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)\n * source  : http://purl.eligrey.com/github/FileSaver.js\n */\n\nimport { globalObject as _global } from \"./globalObject.js\";\nimport { console } from \"./console.js\";\n\nfunction bom(blob, opts) {\n  if (typeof opts === \"undefined\") opts = { autoBom: false };\n  else if (typeof opts !== \"object\") {\n    console.warn(\"Deprecated: Expected third argument to be a object\");\n    opts = { autoBom: !opts };\n  }\n\n  // prepend BOM for UTF-8 XML and text/* types (including HTML)\n  // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n  if (\n    opts.autoBom &&\n    /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(\n      blob.type\n    )\n  ) {\n    return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n  }\n  return blob;\n}\n\nfunction download(url, name, opts) {\n  var xhr = new XMLHttpRequest();\n  xhr.open(\"GET\", url);\n  xhr.responseType = \"blob\";\n  xhr.onload = function() {\n    saveAs(xhr.response, name, opts);\n  };\n  xhr.onerror = function() {\n    console.error(\"could not download file\");\n  };\n  xhr.send();\n}\n\nfunction corsEnabled(url) {\n  var xhr = new XMLHttpRequest();\n  // use sync to avoid popup blocker\n  xhr.open(\"HEAD\", url, false);\n  try {\n    xhr.send();\n  } catch (e) {}\n  return xhr.status >= 200 && xhr.status <= 299;\n}\n\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n  try {\n    node.dispatchEvent(new MouseEvent(\"click\"));\n  } catch (e) {\n    var evt = document.createEvent(\"MouseEvents\");\n    evt.initMouseEvent(\n      \"click\",\n      true,\n      true,\n      window,\n      0,\n      0,\n      0,\n      80,\n      20,\n      false,\n      false,\n      false,\n      false,\n      0,\n      null\n    );\n    node.dispatchEvent(evt);\n  }\n}\n\nvar saveAs =\n  _global.saveAs ||\n  // probably in some web worker\n  (typeof window !== \"object\" || window !== _global\n    ? function saveAs() {\n        /* noop */\n      }\n    : // Use download attribute first if possible (#193 Lumia mobile) unless this is a native app\n    typeof HTMLAnchorElement !== \"undefined\" &&\n      \"download\" in HTMLAnchorElement.prototype\n    ? function saveAs(blob, name, opts) {\n        var URL = _global.URL || _global.webkitURL;\n        var a = document.createElement(\"a\");\n        name = name || blob.name || \"download\";\n\n        a.download = name;\n        a.rel = \"noopener\"; // tabnabbing\n\n        // TODO: detect chrome extensions & packaged apps\n        // a.target = '_blank'\n\n        if (typeof blob === \"string\") {\n          // Support regular links\n          a.href = blob;\n          if (a.origin !== location.origin) {\n            corsEnabled(a.href)\n              ? download(blob, name, opts)\n              : click(a, (a.target = \"_blank\"));\n          } else {\n            click(a);\n          }\n        } else {\n          // Support blobs\n          a.href = URL.createObjectURL(blob);\n          setTimeout(function() {\n            URL.revokeObjectURL(a.href);\n          }, 4e4); // 40s\n          setTimeout(function() {\n            click(a);\n          }, 0);\n        }\n      }\n    : // Use msSaveOrOpenBlob as a second approach\n    \"msSaveOrOpenBlob\" in navigator\n    ? function saveAs(blob, name, opts) {\n        name = name || blob.name || \"download\";\n\n        if (typeof blob === \"string\") {\n          if (corsEnabled(blob)) {\n            download(blob, name, opts);\n          } else {\n            var a = document.createElement(\"a\");\n            a.href = blob;\n            a.target = \"_blank\";\n            setTimeout(function() {\n              click(a);\n            });\n          }\n        } else {\n          navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n        }\n      }\n    : // Fallback to using FileReader and a popup\n      function saveAs(blob, name, opts, popup) {\n        // Open a popup immediately do go around popup blocker\n        // Mostly only available on user interaction and the fileReader is async so...\n        popup = popup || open(\"\", \"_blank\");\n        if (popup) {\n          popup.document.title = popup.document.body.innerText =\n            \"downloading...\";\n        }\n\n        if (typeof blob === \"string\") return download(blob, name, opts);\n\n        var force = blob.type === \"application/octet-stream\";\n        var isSafari =\n          /constructor/i.test(_global.HTMLElement) || _global.safari;\n        var isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n\n        if (\n          (isChromeIOS || (force && isSafari)) &&\n          typeof FileReader === \"object\"\n        ) {\n          // Safari doesn't allow downloading of blob URLs\n          var reader = new FileReader();\n          reader.onloadend = function() {\n            var url = reader.result;\n            url = isChromeIOS\n              ? url\n              : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n            if (popup) popup.location.href = url;\n            else location = url;\n            popup = null; // reverse-tabnabbing #460\n          };\n          reader.readAsDataURL(blob);\n        } else {\n          var URL = _global.URL || _global.webkitURL;\n          var url = URL.createObjectURL(blob);\n          if (popup) popup.location = url;\n          else location.href = url;\n          popup = null; // reverse-tabnabbing #460\n          setTimeout(function() {\n            URL.revokeObjectURL(url);\n          }, 4e4); // 40s\n        }\n      });\n\nexport { saveAs };\n","import { globalObject } from \"./globalObject.js\";\n\nvar atob, btoa;\n\n(function() {\n  atob = globalObject.atob.bind(globalObject);\n  btoa = globalObject.btoa.bind(globalObject);\n  return;\n\n})();\n\nexport { atob, btoa };\n","/**\n * A class to parse color values\n * @author Stoyan Stefanov <sstoo@gmail.com>\n * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}\n * @license Use it if you like it\n */\n\nfunction RGBColor(color_string) {\n  color_string = color_string || \"\";\n  this.ok = false;\n\n  // strip any leading #\n  if (color_string.charAt(0) == \"#\") {\n    // remove # if any\n    color_string = color_string.substr(1, 6);\n  }\n\n  color_string = color_string.replace(/ /g, \"\");\n  color_string = color_string.toLowerCase();\n\n  var channels;\n\n  // before getting into regexps, try simple matches\n  // and overwrite the input\n  var simple_colors = {\n    aliceblue: \"f0f8ff\",\n    antiquewhite: \"faebd7\",\n    aqua: \"00ffff\",\n    aquamarine: \"7fffd4\",\n    azure: \"f0ffff\",\n    beige: \"f5f5dc\",\n    bisque: \"ffe4c4\",\n    black: \"000000\",\n    blanchedalmond: \"ffebcd\",\n    blue: \"0000ff\",\n    blueviolet: \"8a2be2\",\n    brown: \"a52a2a\",\n    burlywood: \"deb887\",\n    cadetblue: \"5f9ea0\",\n    chartreuse: \"7fff00\",\n    chocolate: \"d2691e\",\n    coral: \"ff7f50\",\n    cornflowerblue: \"6495ed\",\n    cornsilk: \"fff8dc\",\n    crimson: \"dc143c\",\n    cyan: \"00ffff\",\n    darkblue: \"00008b\",\n    darkcyan: \"008b8b\",\n    darkgoldenrod: \"b8860b\",\n    darkgray: \"a9a9a9\",\n    darkgreen: \"006400\",\n    darkkhaki: \"bdb76b\",\n    darkmagenta: \"8b008b\",\n    darkolivegreen: \"556b2f\",\n    darkorange: \"ff8c00\",\n    darkorchid: \"9932cc\",\n    darkred: \"8b0000\",\n    darksalmon: \"e9967a\",\n    darkseagreen: \"8fbc8f\",\n    darkslateblue: \"483d8b\",\n    darkslategray: \"2f4f4f\",\n    darkturquoise: \"00ced1\",\n    darkviolet: \"9400d3\",\n    deeppink: \"ff1493\",\n    deepskyblue: \"00bfff\",\n    dimgray: \"696969\",\n    dodgerblue: \"1e90ff\",\n    feldspar: \"d19275\",\n    firebrick: \"b22222\",\n    floralwhite: \"fffaf0\",\n    forestgreen: \"228b22\",\n    fuchsia: \"ff00ff\",\n    gainsboro: \"dcdcdc\",\n    ghostwhite: \"f8f8ff\",\n    gold: \"ffd700\",\n    goldenrod: \"daa520\",\n    gray: \"808080\",\n    green: \"008000\",\n    greenyellow: \"adff2f\",\n    honeydew: \"f0fff0\",\n    hotpink: \"ff69b4\",\n    indianred: \"cd5c5c\",\n    indigo: \"4b0082\",\n    ivory: \"fffff0\",\n    khaki: \"f0e68c\",\n    lavender: \"e6e6fa\",\n    lavenderblush: \"fff0f5\",\n    lawngreen: \"7cfc00\",\n    lemonchiffon: \"fffacd\",\n    lightblue: \"add8e6\",\n    lightcoral: \"f08080\",\n    lightcyan: \"e0ffff\",\n    lightgoldenrodyellow: \"fafad2\",\n    lightgrey: \"d3d3d3\",\n    lightgreen: \"90ee90\",\n    lightpink: \"ffb6c1\",\n    lightsalmon: \"ffa07a\",\n    lightseagreen: \"20b2aa\",\n    lightskyblue: \"87cefa\",\n    lightslateblue: \"8470ff\",\n    lightslategray: \"778899\",\n    lightsteelblue: \"b0c4de\",\n    lightyellow: \"ffffe0\",\n    lime: \"00ff00\",\n    limegreen: \"32cd32\",\n    linen: \"faf0e6\",\n    magenta: \"ff00ff\",\n    maroon: \"800000\",\n    mediumaquamarine: \"66cdaa\",\n    mediumblue: \"0000cd\",\n    mediumorchid: \"ba55d3\",\n    mediumpurple: \"9370d8\",\n    mediumseagreen: \"3cb371\",\n    mediumslateblue: \"7b68ee\",\n    mediumspringgreen: \"00fa9a\",\n    mediumturquoise: \"48d1cc\",\n    mediumvioletred: \"c71585\",\n    midnightblue: \"191970\",\n    mintcream: \"f5fffa\",\n    mistyrose: \"ffe4e1\",\n    moccasin: \"ffe4b5\",\n    navajowhite: \"ffdead\",\n    navy: \"000080\",\n    oldlace: \"fdf5e6\",\n    olive: \"808000\",\n    olivedrab: \"6b8e23\",\n    orange: \"ffa500\",\n    orangered: \"ff4500\",\n    orchid: \"da70d6\",\n    palegoldenrod: \"eee8aa\",\n    palegreen: \"98fb98\",\n    paleturquoise: \"afeeee\",\n    palevioletred: \"d87093\",\n    papayawhip: \"ffefd5\",\n    peachpuff: \"ffdab9\",\n    peru: \"cd853f\",\n    pink: \"ffc0cb\",\n    plum: \"dda0dd\",\n    powderblue: \"b0e0e6\",\n    purple: \"800080\",\n    red: \"ff0000\",\n    rosybrown: \"bc8f8f\",\n    royalblue: \"4169e1\",\n    saddlebrown: \"8b4513\",\n    salmon: \"fa8072\",\n    sandybrown: \"f4a460\",\n    seagreen: \"2e8b57\",\n    seashell: \"fff5ee\",\n    sienna: \"a0522d\",\n    silver: \"c0c0c0\",\n    skyblue: \"87ceeb\",\n    slateblue: \"6a5acd\",\n    slategray: \"708090\",\n    snow: \"fffafa\",\n    springgreen: \"00ff7f\",\n    steelblue: \"4682b4\",\n    tan: \"d2b48c\",\n    teal: \"008080\",\n    thistle: \"d8bfd8\",\n    tomato: \"ff6347\",\n    turquoise: \"40e0d0\",\n    violet: \"ee82ee\",\n    violetred: \"d02090\",\n    wheat: \"f5deb3\",\n    white: \"ffffff\",\n    whitesmoke: \"f5f5f5\",\n    yellow: \"ffff00\",\n    yellowgreen: \"9acd32\"\n  };\n  color_string = simple_colors[color_string] || color_string;\n\n  // array of color definition objects\n  var color_defs = [\n    {\n      re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n      example: [\"rgb(123, 234, 45)\", \"rgb(255,234,245)\"],\n      process: function(bits) {\n        return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];\n      }\n    },\n    {\n      re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n      example: [\"#00ff00\", \"336699\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1], 16),\n          parseInt(bits[2], 16),\n          parseInt(bits[3], 16)\n        ];\n      }\n    },\n    {\n      re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n      example: [\"#fb0\", \"f0f\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1] + bits[1], 16),\n          parseInt(bits[2] + bits[2], 16),\n          parseInt(bits[3] + bits[3], 16)\n        ];\n      }\n    }\n  ];\n\n  // search through the definitions to find a match\n  for (var i = 0; i < color_defs.length; i++) {\n    var re = color_defs[i].re;\n    var processor = color_defs[i].process;\n    var bits = re.exec(color_string);\n    if (bits) {\n      channels = processor(bits);\n      this.r = channels[0];\n      this.g = channels[1];\n      this.b = channels[2];\n      this.ok = true;\n    }\n  }\n\n  // validate/cleanup values\n  this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r;\n  this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g;\n  this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b;\n\n  // some getters\n  this.toRGB = function() {\n    return \"rgb(\" + this.r + \", \" + this.g + \", \" + this.b + \")\";\n  };\n  this.toHex = function() {\n    var r = this.r.toString(16);\n    var g = this.g.toString(16);\n    var b = this.b.toString(16);\n    if (r.length == 1) r = \"0\" + r;\n    if (g.length == 1) g = \"0\" + g;\n    if (b.length == 1) b = \"0\" + b;\n    return \"#\" + r + g + b;\n  };\n}\n\nexport { RGBColor };\n","/**\n * @license\n * Joseph Myers does not specify a particular license for his work.\n *\n * Author: Joseph Myers\n * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js\n *\n * Modified by: Owen Leong\n */\n\nfunction md5cycle(x, k) {\n  var a = x[0],\n    b = x[1],\n    c = x[2],\n    d = x[3];\n\n  a = ff(a, b, c, d, k[0], 7, -680876936);\n  d = ff(d, a, b, c, k[1], 12, -389564586);\n  c = ff(c, d, a, b, k[2], 17, 606105819);\n  b = ff(b, c, d, a, k[3], 22, -1044525330);\n  a = ff(a, b, c, d, k[4], 7, -176418897);\n  d = ff(d, a, b, c, k[5], 12, 1200080426);\n  c = ff(c, d, a, b, k[6], 17, -1473231341);\n  b = ff(b, c, d, a, k[7], 22, -45705983);\n  a = ff(a, b, c, d, k[8], 7, 1770035416);\n  d = ff(d, a, b, c, k[9], 12, -1958414417);\n  c = ff(c, d, a, b, k[10], 17, -42063);\n  b = ff(b, c, d, a, k[11], 22, -1990404162);\n  a = ff(a, b, c, d, k[12], 7, 1804603682);\n  d = ff(d, a, b, c, k[13], 12, -40341101);\n  c = ff(c, d, a, b, k[14], 17, -1502002290);\n  b = ff(b, c, d, a, k[15], 22, 1236535329);\n\n  a = gg(a, b, c, d, k[1], 5, -165796510);\n  d = gg(d, a, b, c, k[6], 9, -1069501632);\n  c = gg(c, d, a, b, k[11], 14, 643717713);\n  b = gg(b, c, d, a, k[0], 20, -373897302);\n  a = gg(a, b, c, d, k[5], 5, -701558691);\n  d = gg(d, a, b, c, k[10], 9, 38016083);\n  c = gg(c, d, a, b, k[15], 14, -660478335);\n  b = gg(b, c, d, a, k[4], 20, -405537848);\n  a = gg(a, b, c, d, k[9], 5, 568446438);\n  d = gg(d, a, b, c, k[14], 9, -1019803690);\n  c = gg(c, d, a, b, k[3], 14, -187363961);\n  b = gg(b, c, d, a, k[8], 20, 1163531501);\n  a = gg(a, b, c, d, k[13], 5, -1444681467);\n  d = gg(d, a, b, c, k[2], 9, -51403784);\n  c = gg(c, d, a, b, k[7], 14, 1735328473);\n  b = gg(b, c, d, a, k[12], 20, -1926607734);\n\n  a = hh(a, b, c, d, k[5], 4, -378558);\n  d = hh(d, a, b, c, k[8], 11, -2022574463);\n  c = hh(c, d, a, b, k[11], 16, 1839030562);\n  b = hh(b, c, d, a, k[14], 23, -35309556);\n  a = hh(a, b, c, d, k[1], 4, -1530992060);\n  d = hh(d, a, b, c, k[4], 11, 1272893353);\n  c = hh(c, d, a, b, k[7], 16, -155497632);\n  b = hh(b, c, d, a, k[10], 23, -1094730640);\n  a = hh(a, b, c, d, k[13], 4, 681279174);\n  d = hh(d, a, b, c, k[0], 11, -358537222);\n  c = hh(c, d, a, b, k[3], 16, -722521979);\n  b = hh(b, c, d, a, k[6], 23, 76029189);\n  a = hh(a, b, c, d, k[9], 4, -640364487);\n  d = hh(d, a, b, c, k[12], 11, -421815835);\n  c = hh(c, d, a, b, k[15], 16, 530742520);\n  b = hh(b, c, d, a, k[2], 23, -995338651);\n\n  a = ii(a, b, c, d, k[0], 6, -198630844);\n  d = ii(d, a, b, c, k[7], 10, 1126891415);\n  c = ii(c, d, a, b, k[14], 15, -1416354905);\n  b = ii(b, c, d, a, k[5], 21, -57434055);\n  a = ii(a, b, c, d, k[12], 6, 1700485571);\n  d = ii(d, a, b, c, k[3], 10, -1894986606);\n  c = ii(c, d, a, b, k[10], 15, -1051523);\n  b = ii(b, c, d, a, k[1], 21, -2054922799);\n  a = ii(a, b, c, d, k[8], 6, 1873313359);\n  d = ii(d, a, b, c, k[15], 10, -30611744);\n  c = ii(c, d, a, b, k[6], 15, -1560198380);\n  b = ii(b, c, d, a, k[13], 21, 1309151649);\n  a = ii(a, b, c, d, k[4], 6, -145523070);\n  d = ii(d, a, b, c, k[11], 10, -1120210379);\n  c = ii(c, d, a, b, k[2], 15, 718787259);\n  b = ii(b, c, d, a, k[9], 21, -343485551);\n\n  x[0] = add32(a, x[0]);\n  x[1] = add32(b, x[1]);\n  x[2] = add32(c, x[2]);\n  x[3] = add32(d, x[3]);\n}\n\nfunction cmn(q, a, b, x, s, t) {\n  a = add32(add32(a, q), add32(x, t));\n  return add32((a << s) | (a >>> (32 - s)), b);\n}\n\nfunction ff(a, b, c, d, x, s, t) {\n  return cmn((b & c) | (~b & d), a, b, x, s, t);\n}\n\nfunction gg(a, b, c, d, x, s, t) {\n  return cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\n\nfunction hh(a, b, c, d, x, s, t) {\n  return cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction ii(a, b, c, d, x, s, t) {\n  return cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nfunction md51(s) {\n  // txt = '';\n  var n = s.length,\n    state = [1732584193, -271733879, -1732584194, 271733878],\n    i;\n  for (i = 64; i <= s.length; i += 64) {\n    md5cycle(state, md5blk(s.substring(i - 64, i)));\n  }\n  s = s.substring(i - 64);\n  var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n  for (i = 0; i < s.length; i++)\n    tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n  tail[i >> 2] |= 0x80 << (i % 4 << 3);\n  if (i > 55) {\n    md5cycle(state, tail);\n    for (i = 0; i < 16; i++) tail[i] = 0;\n  }\n  tail[14] = n * 8;\n  md5cycle(state, tail);\n  return state;\n}\n\n/* there needs to be support for Unicode here,\n * unless we pretend that we can redefine the MD-5\n * algorithm for multi-byte characters (perhaps\n * by adding every four 16-bit characters and\n * shortening the sum to 32 bits). Otherwise\n * I suggest performing MD-5 as if every character\n * was two bytes--e.g., 0040 0025 = @%--but then\n * how will an ordinary MD-5 sum be matched?\n * There is no way to standardize text to something\n * like UTF-8 before transformation; speed cost is\n * utterly prohibitive. The JavaScript standard\n * itself needs to look at this: it should start\n * providing access to strings as preformed UTF-8\n * 8-bit unsigned value arrays.\n */\nfunction md5blk(s) {\n  /* I figured global was faster.   */\n  var md5blks = [],\n    i; /* Andy King said do it this way. */\n  for (i = 0; i < 64; i += 4) {\n    md5blks[i >> 2] =\n      s.charCodeAt(i) +\n      (s.charCodeAt(i + 1) << 8) +\n      (s.charCodeAt(i + 2) << 16) +\n      (s.charCodeAt(i + 3) << 24);\n  }\n  return md5blks;\n}\n\nvar hex_chr = \"0123456789abcdef\".split(\"\");\n\nfunction rhex(n) {\n  var s = \"\",\n    j = 0;\n  for (; j < 4; j++)\n    s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];\n  return s;\n}\n\nfunction hex(x) {\n  for (var i = 0; i < x.length; i++) x[i] = rhex(x[i]);\n  return x.join(\"\");\n}\n\n// Converts a 4-byte number to byte string\nfunction singleToByteString(n) {\n  return String.fromCharCode(\n    (n & 0xff) >> 0,\n    (n & 0xff00) >> 8,\n    (n & 0xff0000) >> 16,\n    (n & 0xff000000) >> 24\n  );\n}\n\n// Converts an array of numbers to a byte string\nfunction toByteString(x) {\n  return x.map(singleToByteString).join(\"\");\n}\n\n// Returns the MD5 hash as a byte string\nfunction md5Bin(s) {\n  return toByteString(md51(s));\n}\n\n// Returns MD5 hash as a hex string\nfunction md5(s) {\n  return hex(md51(s));\n}\n\nvar md5Check = md5(\"hello\") != \"5d41402abc4b2a76b9719d911017c592\";\n\nfunction add32(a, b) {\n  if (md5Check) {\n    /* if the md5Check does not match\n     the expected value, we're dealing\n     with an old browser and need\n     this function. */\n    var lsw = (a & 0xffff) + (b & 0xffff),\n      msw = (a >> 16) + (b >> 16) + (lsw >> 16);\n    return (msw << 16) | (lsw & 0xffff);\n  } else {\n    /* this function is much faster,\n    so if possible we use it. Some IEs\n    are the only ones I know of that\n    need the idiotic second function,\n    generated by an if clause.  */\n    return (a + b) & 0xffffffff;\n  }\n}\n\nexport { md5, md5Bin };\n","/**\r\n * @license\r\n * FPDF is released under a permissive license: there is no usage restriction.\r\n * You may embed it freely in your application (commercial or not), with or\r\n * without modifications.\r\n *\r\n * Reference: http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nfunction repeat(str, num) {\r\n  return new Array(num + 1).join(str);\r\n}\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name rc4\r\n * @function\r\n * @param {string} key Byte string of encryption key\r\n * @param {string} data Byte string of data to be encrypted\r\n * @returns {string} Encrypted string\r\n */\r\nfunction rc4(key, data) {\r\n  var lastKey, lastState;\r\n  if (key !== lastKey) {\r\n    var k = repeat(key, ((256 / key.length) >> 0) + 1);\r\n    var state = [];\r\n    for (var i = 0; i < 256; i++) {\r\n      state[i] = i;\r\n    }\r\n    var j = 0;\r\n    for (var i = 0; i < 256; i++) {\r\n      var t = state[i];\r\n      j = (j + t + k.charCodeAt(i)) % 256;\r\n      state[i] = state[j];\r\n      state[j] = t;\r\n    }\r\n    lastKey = key;\r\n    lastState = state;\r\n  } else {\r\n    state = lastState;\r\n  }\r\n  var length = data.length;\r\n  var a = 0;\r\n  var b = 0;\r\n  var out = \"\";\r\n  for (var i = 0; i < length; i++) {\r\n    a = (a + 1) % 256;\r\n    t = state[a];\r\n    b = (b + t) % 256;\r\n    state[a] = state[b];\r\n    state[b] = t;\r\n    k = state[(state[a] + state[b]) % 256];\r\n    out += String.fromCharCode(data.charCodeAt(i) ^ k);\r\n  }\r\n  return out;\r\n}\r\n\r\nexport { rc4 };\r\n","/**\r\n * @license\r\n * Licensed under the MIT License.\r\n * http://opensource.org/licenses/mit-license\r\n * Author: Owen Leong (@owenl131)\r\n * Date: 15 Oct 2020\r\n * References:\r\n * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt\r\n * https://github.com/foliojs/pdfkit/blob/master/lib/security.js\r\n * http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nimport { md5Bin } from \"./md5.js\";\r\nimport { rc4 } from \"./rc4.js\";\r\n\r\nvar permissionOptions = {\r\n  print: 4,\r\n  modify: 8,\r\n  copy: 16,\r\n  \"annot-forms\": 32\r\n};\r\n\r\n/**\r\n * Initializes encryption settings\r\n *\r\n * @name constructor\r\n * @function\r\n * @param {Array} permissions Permissions allowed for user, \"print\", \"modify\", \"copy\" and \"annot-forms\".\r\n * @param {String} userPassword Permissions apply to this user. Leaving this empty means the document\r\n *                              is not password protected but viewer has the above permissions.\r\n * @param {String} ownerPassword Owner has full functionalities to the file.\r\n * @param {String} fileId As hex string, should be same as the file ID in the trailer.\r\n * @example\r\n * var security = new PDFSecurity([\"print\"])\r\n */\r\nfunction PDFSecurity(permissions, userPassword, ownerPassword, fileId) {\r\n  this.v = 1; // algorithm 1, future work can add in more recent encryption schemes\r\n  this.r = 2; // revision 2\r\n\r\n  // set flags for what functionalities the user can access\r\n  let protection = 192;\r\n  permissions.forEach(function(perm) {\r\n    if (typeof permissionOptions.perm !== \"undefined\") {\r\n      throw new Error(\"Invalid permission: \" + perm);\r\n    }\r\n    protection += permissionOptions[perm];\r\n  });\r\n\r\n  // padding is used to pad the passwords to 32 bytes, also is hashed and stored in the final PDF\r\n  this.padding =\r\n    \"\\x28\\xBF\\x4E\\x5E\\x4E\\x75\\x8A\\x41\\x64\\x00\\x4E\\x56\\xFF\\xFA\\x01\\x08\" +\r\n    \"\\x2E\\x2E\\x00\\xB6\\xD0\\x68\\x3E\\x80\\x2F\\x0C\\xA9\\xFE\\x64\\x53\\x69\\x7A\";\r\n  let paddedUserPassword = (userPassword + this.padding).substr(0, 32);\r\n  let paddedOwnerPassword = (ownerPassword + this.padding).substr(0, 32);\r\n\r\n  this.O = this.processOwnerPassword(paddedUserPassword, paddedOwnerPassword);\r\n  this.P = -((protection ^ 255) + 1);\r\n  this.encryptionKey = md5Bin(\r\n    paddedUserPassword +\r\n      this.O +\r\n      this.lsbFirstWord(this.P) +\r\n      this.hexToBytes(fileId)\r\n  ).substr(0, 5);\r\n  this.U = rc4(this.encryptionKey, this.padding);\r\n}\r\n\r\n/**\r\n * Breaks down a 4-byte number into its individual bytes, with the least significant bit first\r\n *\r\n * @name lsbFirstWord\r\n * @function\r\n * @param {number} data 32-bit number\r\n * @returns {Array}\r\n */\r\nPDFSecurity.prototype.lsbFirstWord = function(data) {\r\n  return String.fromCharCode(\r\n    (data >> 0) & 0xff,\r\n    (data >> 8) & 0xff,\r\n    (data >> 16) & 0xff,\r\n    (data >> 24) & 0xff\r\n  );\r\n};\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name toHexString\r\n * @function\r\n * @param {String} byteString Byte string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.toHexString = function(byteString) {\r\n  return byteString\r\n    .split(\"\")\r\n    .map(function(byte) {\r\n      return (\"0\" + (byte.charCodeAt(0) & 0xff).toString(16)).slice(-2);\r\n    })\r\n    .join(\"\");\r\n};\r\n\r\n/**\r\n * Converts a hex string to a byte string\r\n *\r\n * @name hexToBytes\r\n * @function\r\n * @param {String} hex Hex string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.hexToBytes = function(hex) {\r\n  for (var bytes = [], c = 0; c < hex.length; c += 2)\r\n    bytes.push(String.fromCharCode(parseInt(hex.substr(c, 2), 16)));\r\n  return bytes.join(\"\");\r\n};\r\n\r\n/**\r\n * Computes the 'O' field in the encryption dictionary\r\n *\r\n * @name processOwnerPassword\r\n * @function\r\n * @param {String} paddedUserPassword Byte string of padded user password\r\n * @param {String} paddedOwnerPassword Byte string of padded owner password\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.processOwnerPassword = function(\r\n  paddedUserPassword,\r\n  paddedOwnerPassword\r\n) {\r\n  let key = md5Bin(paddedOwnerPassword).substr(0, 5);\r\n  return rc4(key, paddedUserPassword);\r\n};\r\n\r\n/**\r\n * Returns an encryptor function which can take in a byte string and returns the encrypted version\r\n *\r\n * @name encryptor\r\n * @function\r\n * @param {number} objectId\r\n * @param {number} generation Not sure what this is for, you can set it to 0\r\n * @returns {Function}\r\n * @example\r\n * out(\"stream\");\r\n * encryptor = security.encryptor(object.id, 0);\r\n * out(encryptor(data));\r\n * out(\"endstream\");\r\n */\r\nPDFSecurity.prototype.encryptor = function(objectId, generation) {\r\n  let key = md5Bin(\r\n    this.encryptionKey +\r\n      String.fromCharCode(\r\n        objectId & 0xff,\r\n        (objectId >> 8) & 0xff,\r\n        (objectId >> 16) & 0xff,\r\n        generation & 0xff,\r\n        (generation >> 8) & 0xff\r\n      )\r\n  ).substr(0, 10);\r\n  return function(data) {\r\n    return rc4(key, data);\r\n  };\r\n};\r\n\r\nexport { PDFSecurity };\r\n","/**\n * Convert string to `PDF Name Object`.\n * Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object\n * @param str\n */\nfunction toPDFName(str) {\n  // eslint-disable-next-line no-control-regex\n  if (/[^\\u0000-\\u00ff]/.test(str)) {\n    // non ascii string\n    throw new Error(\n      \"Invalid PDF Name Object: \" + str + \", Only accept ASCII characters.\"\n    );\n  }\n  var result = \"\",\n    strLength = str.length;\n  for (var i = 0; i < strLength; i++) {\n    var charCode = str.charCodeAt(i);\n    if (\n      charCode < 0x21 ||\n      charCode === 0x23 /* # */ ||\n      charCode === 0x25 /* % */ ||\n      charCode === 0x28 /* ( */ ||\n      charCode === 0x29 /* ) */ ||\n      charCode === 0x2f /* / */ ||\n      charCode === 0x3c /* < */ ||\n      charCode === 0x3e /* > */ ||\n      charCode === 0x5b /* [ */ ||\n      charCode === 0x5d /* ] */ ||\n      charCode === 0x7b /* { */ ||\n      charCode === 0x7d /* } */ ||\n      charCode > 0x7e\n    ) {\n      // Char    CharCode    hexStr   paddingHexStr    Result\n      // \"\\t\"    9           9        09               #09\n      // \" \"     32          20       20               #20\n      // \"©\"     169         a9       a9               #a9\n      var hexStr = charCode.toString(16),\n        paddingHexStr = (\"0\" + hexStr).slice(-2);\n\n      result += \"#\" + paddingHexStr;\n    } else {\n      // Other ASCII printable characters between 0x21 <= X <= 0x7e\n      result += str[i];\n    }\n  }\n  return result;\n}\n\nexport { toPDFName };\n","/* eslint-disable no-console */\r\n\r\nimport { saveAs } from \"./libs/FileSaver.js\";\r\nimport { globalObject } from \"./libs/globalObject.js\";\r\nimport { RGBColor } from \"./libs/rgbcolor.js\";\r\nimport { btoa } from \"./libs/AtobBtoa.js\";\r\nimport { console } from \"./libs/console.js\";\r\nimport { PDFSecurity } from \"./libs/pdfsecurity.js\";\r\nimport { toPDFName } from \"./libs/pdfname.js\";\r\n/**\r\n * jsPDF's Internal PubSub Implementation.\r\n * Backward compatible rewritten on 2014 by\r\n * Diego Casorran, https://github.com/diegocr\r\n *\r\n * @class\r\n * @name PubSub\r\n * @ignore\r\n */\r\nfunction PubSub(context) {\r\n  if (typeof context !== \"object\") {\r\n    throw new Error(\r\n      \"Invalid Context passed to initialize PubSub (jsPDF-module)\"\r\n    );\r\n  }\r\n  var topics = {};\r\n\r\n  this.subscribe = function(topic, callback, once) {\r\n    once = once || false;\r\n    if (\r\n      typeof topic !== \"string\" ||\r\n      typeof callback !== \"function\" ||\r\n      typeof once !== \"boolean\"\r\n    ) {\r\n      throw new Error(\r\n        \"Invalid arguments passed to PubSub.subscribe (jsPDF-module)\"\r\n      );\r\n    }\r\n\r\n    if (!topics.hasOwnProperty(topic)) {\r\n      topics[topic] = {};\r\n    }\r\n\r\n    var token = Math.random().toString(35);\r\n    topics[topic][token] = [callback, !!once];\r\n\r\n    return token;\r\n  };\r\n\r\n  this.unsubscribe = function(token) {\r\n    for (var topic in topics) {\r\n      if (topics[topic][token]) {\r\n        delete topics[topic][token];\r\n        if (Object.keys(topics[topic]).length === 0) {\r\n          delete topics[topic];\r\n        }\r\n        return true;\r\n      }\r\n    }\r\n    return false;\r\n  };\r\n\r\n  this.publish = function(topic) {\r\n    if (topics.hasOwnProperty(topic)) {\r\n      var args = Array.prototype.slice.call(arguments, 1),\r\n        tokens = [];\r\n\r\n      for (var token in topics[topic]) {\r\n        var sub = topics[topic][token];\r\n        try {\r\n          sub[0].apply(context, args);\r\n        } catch (ex) {\r\n          if (globalObject.console) {\r\n            console.error(\"jsPDF PubSub Error\", ex.message, ex);\r\n          }\r\n        }\r\n        if (sub[1]) tokens.push(token);\r\n      }\r\n      if (tokens.length) tokens.forEach(this.unsubscribe);\r\n    }\r\n  };\r\n\r\n  this.getTopics = function() {\r\n    return topics;\r\n  };\r\n}\r\n\r\nfunction GState(parameters) {\r\n  if (!(this instanceof GState)) {\r\n    return new GState(parameters);\r\n  }\r\n\r\n  /**\r\n   * @name GState#opacity\r\n   * @type {any}\r\n   */\r\n  /**\r\n   * @name GState#stroke-opacity\r\n   * @type {any}\r\n   */\r\n  var supported = \"opacity,stroke-opacity\".split(\",\");\r\n  for (var p in parameters) {\r\n    if (parameters.hasOwnProperty(p) && supported.indexOf(p) >= 0) {\r\n      this[p] = parameters[p];\r\n    }\r\n  }\r\n  /**\r\n   * @name GState#id\r\n   * @type {string}\r\n   */\r\n  this.id = \"\"; // set by addGState()\r\n  /**\r\n   * @name GState#objectNumber\r\n   * @type {number}\r\n   */\r\n  this.objectNumber = -1; // will be set by putGState()\r\n}\r\n\r\nGState.prototype.equals = function equals(other) {\r\n  var ignore = \"id,objectNumber,equals\";\r\n  var p;\r\n  if (!other || typeof other !== typeof this) return false;\r\n  var count = 0;\r\n  for (p in this) {\r\n    if (ignore.indexOf(p) >= 0) continue;\r\n    if (this.hasOwnProperty(p) && !other.hasOwnProperty(p)) return false;\r\n    if (this[p] !== other[p]) return false;\r\n    count++;\r\n  }\r\n  for (p in other) {\r\n    if (other.hasOwnProperty(p) && ignore.indexOf(p) < 0) count--;\r\n  }\r\n  return count === 0;\r\n};\r\n\r\nfunction Pattern(gState, matrix) {\r\n  this.gState = gState;\r\n  this.matrix = matrix;\r\n\r\n  this.id = \"\"; // set by addPattern()\r\n  this.objectNumber = -1; // will be set by putPattern()\r\n}\r\n\r\nfunction ShadingPattern(type, coords, colors, gState, matrix) {\r\n  if (!(this instanceof ShadingPattern)) {\r\n    return new ShadingPattern(type, coords, colors, gState, matrix);\r\n  }\r\n\r\n  // see putPattern() for information how they are realized\r\n  this.type = type === \"axial\" ? 2 : 3;\r\n  this.coords = coords;\r\n  this.colors = colors;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\nfunction TilingPattern(boundingBox, xStep, yStep, gState, matrix) {\r\n  if (!(this instanceof TilingPattern)) {\r\n    return new TilingPattern(boundingBox, xStep, yStep, gState, matrix);\r\n  }\r\n\r\n  this.boundingBox = boundingBox;\r\n  this.xStep = xStep;\r\n  this.yStep = yStep;\r\n\r\n  this.stream = \"\"; // set by endTilingPattern();\r\n\r\n  this.cloneIndex = 0;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\n/**\r\n * Creates new jsPDF document object instance.\r\n * @name jsPDF\r\n * @class\r\n * @param {Object} [options] - Collection of settings initializing the jsPDF-instance\r\n * @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" or \"l\").<br />\r\n * @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />\r\n * Possible values are \"pt\" (points), \"mm\", \"cm\", \"in\", \"px\", \"pc\", \"em\" or \"ex\". Note that in order to get the correct scaling for \"px\"\r\n * units, you need to enable the hotfix \"px_scaling\" by setting options.hotfixes = [\"px_scaling\"].\r\n * @param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n * @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.\r\n * @param {boolean} [options.compress=false] Compress the generated PDF.\r\n * @param {number} [options.precision=16] Precision of the element-positions.\r\n * @param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.\r\n * @param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.\r\n * @param {Object} [options.encryption]\r\n * @param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.\r\n * @param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.\r\n * @param {string[]} [options.encryption.userPermissions] Array of permissions \"print\", \"modify\", \"copy\", \"annot-forms\", accessible by the user.\r\n * @param {number|\"smart\"} [options.floatPrecision=16]\r\n * @returns {jsPDF} jsPDF-instance\r\n * @description\r\n * ```\r\n * {\r\n *  orientation: 'p',\r\n *  unit: 'mm',\r\n *  format: 'a4',\r\n *  putOnlyUsedFonts:true,\r\n *  floatPrecision: 16 // or \"smart\", default is 16\r\n * }\r\n * ```\r\n *\r\n * @constructor\r\n */\r\nfunction jsPDF(options) {\r\n  var orientation = typeof arguments[0] === \"string\" ? arguments[0] : \"p\";\r\n  var unit = arguments[1];\r\n  var format = arguments[2];\r\n  var compressPdf = arguments[3];\r\n  var filters = [];\r\n  var userUnit = 1.0;\r\n  var precision;\r\n  var floatPrecision = 16;\r\n  var defaultPathOperation = \"S\";\r\n  var encryptionOptions = null;\r\n\r\n  options = options || {};\r\n\r\n  if (typeof options === \"object\") {\r\n    orientation = options.orientation;\r\n    unit = options.unit || unit;\r\n    format = options.format || format;\r\n    compressPdf = options.compress || options.compressPdf || compressPdf;\r\n    encryptionOptions = options.encryption || null;\r\n    if (encryptionOptions !== null) {\r\n      encryptionOptions.userPassword = encryptionOptions.userPassword || \"\";\r\n      encryptionOptions.ownerPassword = encryptionOptions.ownerPassword || \"\";\r\n      encryptionOptions.userPermissions =\r\n        encryptionOptions.userPermissions || [];\r\n    }\r\n    userUnit =\r\n      typeof options.userUnit === \"number\" ? Math.abs(options.userUnit) : 1.0;\r\n    if (typeof options.precision !== \"undefined\") {\r\n      precision = options.precision;\r\n    }\r\n    if (typeof options.floatPrecision !== \"undefined\") {\r\n      floatPrecision = options.floatPrecision;\r\n    }\r\n    defaultPathOperation = options.defaultPathOperation || \"S\";\r\n  }\r\n\r\n  filters =\r\n    options.filters || (compressPdf === true ? [\"FlateEncode\"] : filters);\r\n\r\n  unit = unit || \"mm\";\r\n  orientation = (\"\" + (orientation || \"P\")).toLowerCase();\r\n  var putOnlyUsedFonts = options.putOnlyUsedFonts || false;\r\n  var usedFonts = {};\r\n\r\n  var API = {\r\n    internal: {},\r\n    __private__: {}\r\n  };\r\n\r\n  API.__private__.PubSub = PubSub;\r\n\r\n  var pdfVersion = \"1.3\";\r\n  var getPdfVersion = (API.__private__.getPdfVersion = function() {\r\n    return pdfVersion;\r\n  });\r\n\r\n  API.__private__.setPdfVersion = function(value) {\r\n    pdfVersion = value;\r\n  };\r\n\r\n  // Size in pt of various paper formats\r\n  var pageFormats = {\r\n    a0: [2383.94, 3370.39],\r\n    a1: [1683.78, 2383.94],\r\n    a2: [1190.55, 1683.78],\r\n    a3: [841.89, 1190.55],\r\n    a4: [595.28, 841.89],\r\n    a5: [419.53, 595.28],\r\n    a6: [297.64, 419.53],\r\n    a7: [209.76, 297.64],\r\n    a8: [147.4, 209.76],\r\n    a9: [104.88, 147.4],\r\n    a10: [73.7, 104.88],\r\n    b0: [2834.65, 4008.19],\r\n    b1: [2004.09, 2834.65],\r\n    b2: [1417.32, 2004.09],\r\n    b3: [1000.63, 1417.32],\r\n    b4: [708.66, 1000.63],\r\n    b5: [498.9, 708.66],\r\n    b6: [354.33, 498.9],\r\n    b7: [249.45, 354.33],\r\n    b8: [175.75, 249.45],\r\n    b9: [124.72, 175.75],\r\n    b10: [87.87, 124.72],\r\n    c0: [2599.37, 3676.54],\r\n    c1: [1836.85, 2599.37],\r\n    c2: [1298.27, 1836.85],\r\n    c3: [918.43, 1298.27],\r\n    c4: [649.13, 918.43],\r\n    c5: [459.21, 649.13],\r\n    c6: [323.15, 459.21],\r\n    c7: [229.61, 323.15],\r\n    c8: [161.57, 229.61],\r\n    c9: [113.39, 161.57],\r\n    c10: [79.37, 113.39],\r\n    dl: [311.81, 623.62],\r\n    letter: [612, 792],\r\n    \"government-letter\": [576, 756],\r\n    legal: [612, 1008],\r\n    \"junior-legal\": [576, 360],\r\n    ledger: [1224, 792],\r\n    tabloid: [792, 1224],\r\n    \"credit-card\": [153, 243]\r\n  };\r\n\r\n  API.__private__.getPageFormats = function() {\r\n    return pageFormats;\r\n  };\r\n\r\n  var getPageFormat = (API.__private__.getPageFormat = function(value) {\r\n    return pageFormats[value];\r\n  });\r\n\r\n  format = format || \"a4\";\r\n\r\n  var ApiMode = {\r\n    COMPAT: \"compat\",\r\n    ADVANCED: \"advanced\"\r\n  };\r\n  var apiMode = ApiMode.COMPAT;\r\n\r\n  function advancedAPI() {\r\n    // prepend global change of basis matrix\r\n    // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix\r\n    // that does this job for us (however, texts, images and similar objects must be drawn bottom up))\r\n    this.saveGraphicsState();\r\n    out(\r\n      new Matrix(\r\n        scaleFactor,\r\n        0,\r\n        0,\r\n        -scaleFactor,\r\n        0,\r\n        getPageHeight() * scaleFactor\r\n      ).toString() + \" cm\"\r\n    );\r\n    this.setFontSize(this.getFontSize() / scaleFactor);\r\n\r\n    // The default in MrRio's implementation is \"S\" (stroke), whereas the default in the yWorks implementation\r\n    // was \"n\" (none). Although this has nothing to do with transforms, we should use the API switch here.\r\n    defaultPathOperation = \"n\";\r\n\r\n    apiMode = ApiMode.ADVANCED;\r\n  }\r\n\r\n  function compatAPI() {\r\n    this.restoreGraphicsState();\r\n    defaultPathOperation = \"S\";\r\n    apiMode = ApiMode.COMPAT;\r\n  }\r\n\r\n  /**\r\n   * @function combineFontStyleAndFontWeight\r\n   * @param {string} fontStyle Fontstyle or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @returns {string}\r\n   * @private\r\n   */\r\n  var combineFontStyleAndFontWeight = (API.__private__.combineFontStyleAndFontWeight = function(\r\n    fontStyle,\r\n    fontWeight\r\n  ) {\r\n    if (\r\n      (fontStyle == \"bold\" && fontWeight == \"normal\") ||\r\n      (fontStyle == \"bold\" && fontWeight == 400) ||\r\n      (fontStyle == \"normal\" && fontWeight == \"italic\") ||\r\n      (fontStyle == \"bold\" && fontWeight == \"italic\")\r\n    ) {\r\n      throw new Error(\"Invalid Combination of fontweight and fontstyle\");\r\n    }\r\n    if (fontWeight) {\r\n      fontStyle =\r\n        fontWeight == 400 || fontWeight === \"normal\"\r\n          ? fontStyle === \"italic\"\r\n            ? \"italic\"\r\n            : \"normal\"\r\n          : (fontWeight == 700 || fontWeight === \"bold\") &&\r\n            fontStyle === \"normal\"\r\n          ? \"bold\"\r\n          : (fontWeight == 700 ? \"bold\" : fontWeight) + \"\" + fontStyle;\r\n    }\r\n    return fontStyle;\r\n  });\r\n\r\n  /**\r\n   * @callback ApiSwitchBody\r\n   * @param {jsPDF} pdf\r\n   */\r\n\r\n  /**\r\n   * For compatibility reasons jsPDF offers two API modes which differ in the way they convert between the the usual\r\n   * screen coordinates and the PDF coordinate system.\r\n   *   - \"compat\": Offers full compatibility across all plugins but does not allow arbitrary transforms\r\n   *   - \"advanced\": Allows arbitrary transforms and more advanced features like pattern fills. Some plugins might\r\n   *     not support this mode, though.\r\n   * Initial mode is \"compat\".\r\n   *\r\n   * You can either provide a callback to the body argument, which means that jsPDF will automatically switch back to\r\n   * the original API mode afterwards; or you can omit the callback and switch back manually using {@link compatAPI}.\r\n   *\r\n   * Note, that the calls to {@link saveGraphicsState} and {@link restoreGraphicsState} need to be balanced within the\r\n   * callback or between calls of this method and its counterpart {@link compatAPI}. Calls to {@link beginFormObject}\r\n   * or {@link beginTilingPattern} need to be closed by their counterparts before switching back to \"compat\" API mode.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name advancedAPI\r\n   */\r\n  API.advancedAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.COMPAT;\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Switches to \"compat\" API mode. See {@link advancedAPI} for more details.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @return {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name compatApi\r\n   */\r\n  API.compatAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.ADVANCED;\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @return {boolean} True iff the current API mode is \"advanced\". See {@link advancedAPI}.\r\n   * @memberof jsPDF#\r\n   * @name isAdvancedAPI\r\n   */\r\n  API.isAdvancedAPI = function() {\r\n    return apiMode === ApiMode.ADVANCED;\r\n  };\r\n\r\n  var advancedApiModeTrap = function(methodName) {\r\n    if (apiMode !== ApiMode.ADVANCED) {\r\n      throw new Error(\r\n        methodName +\r\n          \" is only available in 'advanced' API mode. \" +\r\n          \"You need to call advancedAPI() first.\"\r\n      );\r\n    }\r\n  };\r\n\r\n  var roundToPrecision = (API.roundToPrecision = API.__private__.roundToPrecision = function(\r\n    number,\r\n    parmPrecision\r\n  ) {\r\n    var tmpPrecision = precision || parmPrecision;\r\n    if (isNaN(number) || isNaN(tmpPrecision)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.roundToPrecision\");\r\n    }\r\n    return number.toFixed(tmpPrecision).replace(/0+$/, \"\");\r\n  });\r\n\r\n  // high precision float\r\n  var hpf;\r\n  if (typeof floatPrecision === \"number\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, floatPrecision);\r\n    };\r\n  } else if (floatPrecision === \"smart\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      if (number > -1 && number < 1) {\r\n        return roundToPrecision(number, 16);\r\n      } else {\r\n        return roundToPrecision(number, 5);\r\n      }\r\n    };\r\n  } else {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, 16);\r\n    };\r\n  }\r\n  var f2 = (API.f2 = API.__private__.f2 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f2\");\r\n    }\r\n    return roundToPrecision(number, 2);\r\n  });\r\n\r\n  var f3 = (API.__private__.f3 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f3\");\r\n    }\r\n    return roundToPrecision(number, 3);\r\n  });\r\n\r\n  var scale = (API.scale = API.__private__.scale = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.scale\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return number * scaleFactor;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return number;\r\n    }\r\n  });\r\n\r\n  var transformY = function(y) {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return getPageHeight() - y;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return y;\r\n    }\r\n  };\r\n\r\n  var transformScaleY = function(y) {\r\n    return scale(transformY(y));\r\n  };\r\n\r\n  /**\r\n   * @name setPrecision\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} precision\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setPrecision = API.setPrecision = function(value) {\r\n    if (typeof parseInt(value, 10) === \"number\") {\r\n      precision = parseInt(value, 10);\r\n    }\r\n  };\r\n\r\n  var fileId = \"00000000000000000000000000000000\";\r\n\r\n  var getFileId = (API.__private__.getFileId = function() {\r\n    return fileId;\r\n  });\r\n\r\n  var setFileId = (API.__private__.setFileId = function(value) {\r\n    if (typeof value !== \"undefined\" && /^[a-fA-F0-9]{32}$/.test(value)) {\r\n      fileId = value.toUpperCase();\r\n    } else {\r\n      fileId = fileId\r\n        .split(\"\")\r\n        .map(function() {\r\n          return \"ABCDEF0123456789\".charAt(Math.floor(Math.random() * 16));\r\n        })\r\n        .join(\"\");\r\n    }\r\n\r\n    if (encryptionOptions !== null) {\r\n      encryption = new PDFSecurity(\r\n        encryptionOptions.userPermissions,\r\n        encryptionOptions.userPassword,\r\n        encryptionOptions.ownerPassword,\r\n        fileId\r\n      );\r\n    }\r\n    return fileId;\r\n  });\r\n\r\n  /**\r\n   * @name setFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} value GUID.\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setFileId = function(value) {\r\n    setFileId(value);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   *\r\n   * @returns {string} GUID.\r\n   */\r\n  API.getFileId = function() {\r\n    return getFileId();\r\n  };\r\n\r\n  var creationDate;\r\n\r\n  var convertDateToPDFDate = (API.__private__.convertDateToPDFDate = function(\r\n    parmDate\r\n  ) {\r\n    var result = \"\";\r\n    var tzoffset = parmDate.getTimezoneOffset(),\r\n      tzsign = tzoffset < 0 ? \"+\" : \"-\",\r\n      tzhour = Math.floor(Math.abs(tzoffset / 60)),\r\n      tzmin = Math.abs(tzoffset % 60),\r\n      timeZoneString = [tzsign, padd2(tzhour), \"'\", padd2(tzmin), \"'\"].join(\"\");\r\n\r\n    result = [\r\n      \"D:\",\r\n      parmDate.getFullYear(),\r\n      padd2(parmDate.getMonth() + 1),\r\n      padd2(parmDate.getDate()),\r\n      padd2(parmDate.getHours()),\r\n      padd2(parmDate.getMinutes()),\r\n      padd2(parmDate.getSeconds()),\r\n      timeZoneString\r\n    ].join(\"\");\r\n    return result;\r\n  });\r\n\r\n  var convertPDFDateToDate = (API.__private__.convertPDFDateToDate = function(\r\n    parmPDFDate\r\n  ) {\r\n    var year = parseInt(parmPDFDate.substr(2, 4), 10);\r\n    var month = parseInt(parmPDFDate.substr(6, 2), 10) - 1;\r\n    var date = parseInt(parmPDFDate.substr(8, 2), 10);\r\n    var hour = parseInt(parmPDFDate.substr(10, 2), 10);\r\n    var minutes = parseInt(parmPDFDate.substr(12, 2), 10);\r\n    var seconds = parseInt(parmPDFDate.substr(14, 2), 10);\r\n    // var timeZoneHour = parseInt(parmPDFDate.substr(16, 2), 10);\r\n    // var timeZoneMinutes = parseInt(parmPDFDate.substr(20, 2), 10);\r\n\r\n    var resultingDate = new Date(year, month, date, hour, minutes, seconds, 0);\r\n    return resultingDate;\r\n  });\r\n\r\n  var setCreationDate = (API.__private__.setCreationDate = function(date) {\r\n    var tmpCreationDateString;\r\n    var regexPDFCreationDate = /^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])'?$/;\r\n    if (typeof date === \"undefined\") {\r\n      date = new Date();\r\n    }\r\n\r\n    if (date instanceof Date) {\r\n      tmpCreationDateString = convertDateToPDFDate(date);\r\n    } else if (regexPDFCreationDate.test(date)) {\r\n      tmpCreationDateString = date;\r\n    } else {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCreationDate\");\r\n    }\r\n    creationDate = tmpCreationDateString;\r\n    return creationDate;\r\n  });\r\n\r\n  var getCreationDate = (API.__private__.getCreationDate = function(type) {\r\n    var result = creationDate;\r\n    if (type === \"jsDate\") {\r\n      result = convertPDFDateToDate(creationDate);\r\n    }\r\n    return result;\r\n  });\r\n\r\n  /**\r\n   * @name setCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} date\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setCreationDate = function(date) {\r\n    setCreationDate(date);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} type\r\n   * @returns {Object}\r\n   */\r\n  API.getCreationDate = function(type) {\r\n    return getCreationDate(type);\r\n  };\r\n\r\n  var padd2 = (API.__private__.padd2 = function(number) {\r\n    return (\"0\" + parseInt(number)).slice(-2);\r\n  });\r\n\r\n  var padd2Hex = (API.__private__.padd2Hex = function(hexString) {\r\n    hexString = hexString.toString();\r\n    return (\"00\" + hexString).substr(hexString.length);\r\n  });\r\n\r\n  var objectNumber = 0; // 'n' Current object number\r\n  var offsets = []; // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.\r\n  var content = [];\r\n  var contentLength = 0;\r\n  var additionalObjects = [];\r\n\r\n  var pages = [];\r\n  var currentPage;\r\n  var hasCustomDestination = false;\r\n  var outputDestination = content;\r\n\r\n  var resetDocument = function() {\r\n    //reset fields relevant for objectNumber generation and xref.\r\n    objectNumber = 0;\r\n    contentLength = 0;\r\n    content = [];\r\n    offsets = [];\r\n    additionalObjects = [];\r\n\r\n    rootDictionaryObjId = newObjectDeferred();\r\n    resourceDictionaryObjId = newObjectDeferred();\r\n  };\r\n\r\n  API.__private__.setCustomOutputDestination = function(destination) {\r\n    hasCustomDestination = true;\r\n    outputDestination = destination;\r\n  };\r\n  var setOutputDestination = function(destination) {\r\n    if (!hasCustomDestination) {\r\n      outputDestination = destination;\r\n    }\r\n  };\r\n\r\n  API.__private__.resetCustomOutputDestination = function() {\r\n    hasCustomDestination = false;\r\n    outputDestination = content;\r\n  };\r\n\r\n  var out = (API.__private__.out = function(string) {\r\n    string = string.toString();\r\n    contentLength += string.length + 1;\r\n    outputDestination.push(string);\r\n\r\n    return outputDestination;\r\n  });\r\n\r\n  var write = (API.__private__.write = function(value) {\r\n    return out(\r\n      arguments.length === 1\r\n        ? value.toString()\r\n        : Array.prototype.join.call(arguments, \" \")\r\n    );\r\n  });\r\n\r\n  var getArrayBuffer = (API.__private__.getArrayBuffer = function(data) {\r\n    var len = data.length,\r\n      ab = new ArrayBuffer(len),\r\n      u8 = new Uint8Array(ab);\r\n\r\n    while (len--) u8[len] = data.charCodeAt(len);\r\n    return ab;\r\n  });\r\n\r\n  var standardFonts = [\r\n    [\"Helvetica\", \"helvetica\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Bold\", \"helvetica\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Oblique\", \"helvetica\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-BoldOblique\", \"helvetica\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Courier\", \"courier\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Bold\", \"courier\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Oblique\", \"courier\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Courier-BoldOblique\", \"courier\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Times-Roman\", \"times\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Times-Bold\", \"times\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Times-Italic\", \"times\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Times-BoldItalic\", \"times\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"ZapfDingbats\", \"zapfdingbats\", \"normal\", null],\r\n    [\"Symbol\", \"symbol\", \"normal\", null]\r\n  ];\r\n\r\n  API.__private__.getStandardFonts = function() {\r\n    return standardFonts;\r\n  };\r\n\r\n  var activeFontSize = options.fontSize || 16;\r\n\r\n  /**\r\n   * Sets font size for upcoming text elements.\r\n   *\r\n   * @param {number} size Font size in points.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFontSize\r\n   */\r\n  API.__private__.setFontSize = API.setFontSize = function(size) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      activeFontSize = size / scaleFactor;\r\n    } else {\r\n      activeFontSize = size;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets the fontsize for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number}\r\n   * @memberof jsPDF#\r\n   * @name getFontSize\r\n   */\r\n  var getFontSize = (API.__private__.getFontSize = API.getFontSize = function() {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return activeFontSize;\r\n    } else {\r\n      return activeFontSize * scaleFactor;\r\n    }\r\n  });\r\n\r\n  var R2L = options.R2L || false;\r\n\r\n  /**\r\n   * Set value of R2L functionality.\r\n   *\r\n   * @param {boolean} value\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setR2L\r\n   */\r\n  API.__private__.setR2L = API.setR2L = function(value) {\r\n    R2L = value;\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Get value of R2L functionality.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {boolean} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name getR2L\r\n   */\r\n  API.__private__.getR2L = API.getR2L = function() {\r\n    return R2L;\r\n  };\r\n\r\n  var zoomMode; // default: 1;\r\n\r\n  var setZoomMode = (API.__private__.setZoomMode = function(zoom) {\r\n    var validZoomModes = [\r\n      undefined,\r\n      null,\r\n      \"fullwidth\",\r\n      \"fullheight\",\r\n      \"fullpage\",\r\n      \"original\"\r\n    ];\r\n\r\n    if (/^(?:\\d+\\.\\d*|\\d*\\.\\d+|\\d+)%$/.test(zoom)) {\r\n      zoomMode = zoom;\r\n    } else if (!isNaN(zoom)) {\r\n      zoomMode = parseInt(zoom, 10);\r\n    } else if (validZoomModes.indexOf(zoom) !== -1) {\r\n      zoomMode = zoom;\r\n    } else {\r\n      throw new Error(\r\n        'zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. \"' +\r\n          zoom +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n  });\r\n\r\n  API.__private__.getZoomMode = function() {\r\n    return zoomMode;\r\n  };\r\n\r\n  var pageMode; // default: 'UseOutlines';\r\n  var setPageMode = (API.__private__.setPageMode = function(pmode) {\r\n    var validPageModes = [\r\n      undefined,\r\n      null,\r\n      \"UseNone\",\r\n      \"UseOutlines\",\r\n      \"UseThumbs\",\r\n      \"FullScreen\"\r\n    ];\r\n\r\n    if (validPageModes.indexOf(pmode) == -1) {\r\n      throw new Error(\r\n        'Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. \"' +\r\n          pmode +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    pageMode = pmode;\r\n  });\r\n\r\n  API.__private__.getPageMode = function() {\r\n    return pageMode;\r\n  };\r\n\r\n  var layoutMode; // default: 'continuous';\r\n  var setLayoutMode = (API.__private__.setLayoutMode = function(layout) {\r\n    var validLayoutModes = [\r\n      undefined,\r\n      null,\r\n      \"continuous\",\r\n      \"single\",\r\n      \"twoleft\",\r\n      \"tworight\",\r\n      \"two\"\r\n    ];\r\n\r\n    if (validLayoutModes.indexOf(layout) == -1) {\r\n      throw new Error(\r\n        'Layout mode must be one of continuous, single, twoleft, tworight. \"' +\r\n          layout +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    layoutMode = layout;\r\n  });\r\n\r\n  API.__private__.getLayoutMode = function() {\r\n    return layoutMode;\r\n  };\r\n\r\n  /**\r\n   * Set the display mode options of the page like zoom and layout.\r\n   *\r\n   * @name setDisplayMode\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {integer|String} zoom   You can pass an integer or percentage as\r\n   * a string. 2 will scale the document up 2x, '200%' will scale up by the\r\n   * same amount. You can also set it to 'fullwidth', 'fullheight',\r\n   * 'fullpage', or 'original'.\r\n   *\r\n   * Only certain PDF readers support this, such as Adobe Acrobat.\r\n   *\r\n   * @param {string} layout Layout mode can be: 'continuous' - this is the\r\n   * default continuous scroll. 'single' - the single page mode only shows one\r\n   * page at a time. 'twoleft' - two column left mode, first page starts on\r\n   * the left, and 'tworight' - pages are laid out in two columns, with the\r\n   * first page on the right. This would be used for books.\r\n   * @param {string} pmode 'UseOutlines' - it shows the\r\n   * outline of the document on the left. 'UseThumbs' - shows thumbnails along\r\n   * the left. 'FullScreen' - prompts the user to enter fullscreen mode.\r\n   *\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setDisplayMode = API.setDisplayMode = function(\r\n    zoom,\r\n    layout,\r\n    pmode\r\n  ) {\r\n    setZoomMode(zoom);\r\n    setLayoutMode(layout);\r\n    setPageMode(pmode);\r\n    return this;\r\n  };\r\n\r\n  var documentProperties = {\r\n    title: \"\",\r\n    subject: \"\",\r\n    author: \"\",\r\n    keywords: \"\",\r\n    creator: \"\"\r\n  };\r\n\r\n  API.__private__.getDocumentProperty = function(key) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getDocumentProperty\");\r\n    }\r\n    return documentProperties[key];\r\n  };\r\n\r\n  API.__private__.getDocumentProperties = function() {\r\n    return documentProperties;\r\n  };\r\n\r\n  /**\r\n   * Adds a properties to the PDF document.\r\n   *\r\n   * @param {Object} A property_name-to-property_value object structure.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDocumentProperties\r\n   */\r\n  API.__private__.setDocumentProperties = API.setProperties = API.setDocumentProperties = function(\r\n    properties\r\n  ) {\r\n    // copying only those properties we can render.\r\n    for (var property in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(property) && properties[property]) {\r\n        documentProperties[property] = properties[property];\r\n      }\r\n    }\r\n    return this;\r\n  };\r\n\r\n  API.__private__.setDocumentProperty = function(key, value) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setDocumentProperty\");\r\n    }\r\n    return (documentProperties[key] = value);\r\n  };\r\n\r\n  var fonts = {}; // collection of font objects, where key is fontKey - a dynamically created label for a given font.\r\n  var fontmap = {}; // mapping structure fontName > fontStyle > font key - performance layer. See addFont()\r\n  var activeFontKey; // will be string representing the KEY of the font as combination of fontName + fontStyle\r\n  var fontStateStack = []; //\r\n  var patterns = {}; // collection of pattern objects\r\n  var patternMap = {}; // see fonts\r\n  var gStates = {}; // collection of graphic state objects\r\n  var gStatesMap = {}; // see fonts\r\n  var activeGState = null;\r\n  var scaleFactor; // Scale factor\r\n  var page = 0;\r\n  var pagesContext = [];\r\n  var events = new PubSub(API);\r\n  var hotfixes = options.hotfixes || [];\r\n\r\n  var renderTargets = {};\r\n  var renderTargetMap = {};\r\n  var renderTargetStack = [];\r\n  var pageX;\r\n  var pageY;\r\n  var pageMatrix; // only used for FormObjects\r\n\r\n  /**\r\n   * A matrix object for 2D homogenous transformations: <br>\r\n   * | a b 0 | <br>\r\n   * | c d 0 | <br>\r\n   * | e f 1 | <br>\r\n   * pdf multiplies matrices righthand: v' = v x m1 x m2 x ...\r\n   *\r\n   * @class\r\n   * @name Matrix\r\n   * @param {number} sx\r\n   * @param {number} shy\r\n   * @param {number} shx\r\n   * @param {number} sy\r\n   * @param {number} tx\r\n   * @param {number} ty\r\n   * @constructor\r\n   */\r\n  var Matrix = function(sx, shy, shx, sy, tx, ty) {\r\n    if (!(this instanceof Matrix)) {\r\n      return new Matrix(sx, shy, shx, sy, tx, ty);\r\n    }\r\n\r\n    if (isNaN(sx)) sx = 1;\r\n    if (isNaN(shy)) shy = 0;\r\n    if (isNaN(shx)) shx = 0;\r\n    if (isNaN(sy)) sy = 1;\r\n    if (isNaN(tx)) tx = 0;\r\n    if (isNaN(ty)) ty = 0;\r\n\r\n    this._matrix = [sx, shy, shx, sy, tx, ty];\r\n  };\r\n\r\n  /**\r\n   * @name sx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sx\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shy\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shx\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name sy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sy\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name tx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"tx\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name ty\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"ty\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"a\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"b\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"c\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"d\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"e\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"f\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name rotation\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"rotation\", {\r\n    get: function() {\r\n      return Math.atan2(this.shx, this.sx);\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleX\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleX\", {\r\n    get: function() {\r\n      return this.decompose().scale.sx;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleY\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleY\", {\r\n    get: function() {\r\n      return this.decompose().scale.sy;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name isIdentity\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"isIdentity\", {\r\n    get: function() {\r\n      if (this.sx !== 1) {\r\n        return false;\r\n      }\r\n      if (this.shy !== 0) {\r\n        return false;\r\n      }\r\n      if (this.shx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.sy !== 1) {\r\n        return false;\r\n      }\r\n      if (this.tx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.ty !== 0) {\r\n        return false;\r\n      }\r\n      return true;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * Join the Matrix Values to a String\r\n   *\r\n   * @function join\r\n   * @param {string} separator Specifies a string to separate each pair of adjacent elements of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma (\",\"). If separator is an empty string, all elements are joined without any characters in between them.\r\n   * @returns {string} A string with all array elements joined.\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.join = function(separator) {\r\n    return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty]\r\n      .map(hpf)\r\n      .join(separator);\r\n  };\r\n\r\n  /**\r\n   * Multiply the matrix with given Matrix\r\n   *\r\n   * @function multiply\r\n   * @param matrix\r\n   * @returns {Matrix}\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.multiply = function(matrix) {\r\n    var sx = matrix.sx * this.sx + matrix.shy * this.shx;\r\n    var shy = matrix.sx * this.shy + matrix.shy * this.sy;\r\n    var shx = matrix.shx * this.sx + matrix.sy * this.shx;\r\n    var sy = matrix.shx * this.shy + matrix.sy * this.sy;\r\n    var tx = matrix.tx * this.sx + matrix.ty * this.shx + this.tx;\r\n    var ty = matrix.tx * this.shy + matrix.ty * this.sy + this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  /**\r\n   * @function decompose\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.decompose = function() {\r\n    var a = this.sx;\r\n    var b = this.shy;\r\n    var c = this.shx;\r\n    var d = this.sy;\r\n    var e = this.tx;\r\n    var f = this.ty;\r\n\r\n    var scaleX = Math.sqrt(a * a + b * b);\r\n    a /= scaleX;\r\n    b /= scaleX;\r\n\r\n    var shear = a * c + b * d;\r\n    c -= a * shear;\r\n    d -= b * shear;\r\n\r\n    var scaleY = Math.sqrt(c * c + d * d);\r\n    c /= scaleY;\r\n    d /= scaleY;\r\n    shear /= scaleY;\r\n\r\n    if (a * d < b * c) {\r\n      a = -a;\r\n      b = -b;\r\n      shear = -shear;\r\n      scaleX = -scaleX;\r\n    }\r\n\r\n    return {\r\n      scale: new Matrix(scaleX, 0, 0, scaleY, 0, 0),\r\n      translate: new Matrix(1, 0, 0, 1, e, f),\r\n      rotate: new Matrix(a, b, -b, a, 0, 0),\r\n      skew: new Matrix(1, 0, shear, 1, 0, 0)\r\n    };\r\n  };\r\n\r\n  /**\r\n   * @function toString\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.toString = function(parmPrecision) {\r\n    return this.join(\" \");\r\n  };\r\n\r\n  /**\r\n   * @function inversed\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.inversed = function() {\r\n    var a = this.sx,\r\n      b = this.shy,\r\n      c = this.shx,\r\n      d = this.sy,\r\n      e = this.tx,\r\n      f = this.ty;\r\n\r\n    var quot = 1 / (a * d - b * c);\r\n\r\n    var aInv = d * quot;\r\n    var bInv = -b * quot;\r\n    var cInv = -c * quot;\r\n    var dInv = a * quot;\r\n    var eInv = -aInv * e - cInv * f;\r\n    var fInv = -bInv * e - dInv * f;\r\n\r\n    return new Matrix(aInv, bInv, cInv, dInv, eInv, fInv);\r\n  };\r\n\r\n  /**\r\n   * @function applyToPoint\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToPoint = function(pt) {\r\n    var x = pt.x * this.sx + pt.y * this.shx + this.tx;\r\n    var y = pt.x * this.shy + pt.y * this.sy + this.ty;\r\n    return new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * @function applyToRectangle\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToRectangle = function(rect) {\r\n    var pt1 = this.applyToPoint(rect);\r\n    var pt2 = this.applyToPoint(new Point(rect.x + rect.w, rect.y + rect.h));\r\n    return new Rectangle(pt1.x, pt1.y, pt2.x - pt1.x, pt2.y - pt1.y);\r\n  };\r\n\r\n  /**\r\n   * Clone the Matrix\r\n   *\r\n   * @function clone\r\n   * @memberof Matrix#\r\n   * @name clone\r\n   * @instance\r\n   */\r\n  Matrix.prototype.clone = function() {\r\n    var sx = this.sx;\r\n    var shy = this.shy;\r\n    var shx = this.shx;\r\n    var sy = this.sy;\r\n    var tx = this.tx;\r\n    var ty = this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  API.Matrix = Matrix;\r\n\r\n  /**\r\n   * Multiplies two matrices. (see {@link Matrix})\r\n   * @param {Matrix} m1\r\n   * @param {Matrix} m2\r\n   * @memberof jsPDF#\r\n   * @name matrixMult\r\n   */\r\n  var matrixMult = (API.matrixMult = function(m1, m2) {\r\n    return m2.multiply(m1);\r\n  });\r\n\r\n  /**\r\n   * The identity matrix (equivalent to new Matrix(1, 0, 0, 1, 0, 0)).\r\n   * @type {Matrix}\r\n   * @memberof! jsPDF#\r\n   * @name identityMatrix\r\n   */\r\n  var identityMatrix = new Matrix(1, 0, 0, 1, 0, 0);\r\n  API.unitMatrix = API.identityMatrix = identityMatrix;\r\n\r\n  /**\r\n   * Adds a new pattern for later use.\r\n   * @param {String} key The key by it can be referenced later. The keys must be unique!\r\n   * @param {API.Pattern} pattern The pattern\r\n   */\r\n  var addPattern = function(key, pattern) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (patternMap[key]) return;\r\n\r\n    var prefix = pattern instanceof ShadingPattern ? \"Sh\" : \"P\";\r\n    var patternKey = prefix + (Object.keys(patterns).length + 1).toString(10);\r\n    pattern.id = patternKey;\r\n\r\n    patternMap[key] = patternKey;\r\n    patterns[patternKey] = pattern;\r\n\r\n    events.publish(\"addPattern\", pattern);\r\n  };\r\n\r\n  /**\r\n   * A pattern describing a shading pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {String} type One of \"axial\" or \"radial\"\r\n   * @param {Array<Number>} coords Either [x1, y1, x2, y2] for \"axial\" type describing the two interpolation points\r\n   * or [x1, y1, r, x2, y2, r2] for \"radial\" describing inner and the outer circle.\r\n   * @param {Array<Object>} colors An array of objects with the fields \"offset\" and \"color\". \"offset\" describes\r\n   * the offset in parameter space [0, 1]. \"color\" is an array of length 3 describing RGB values in [0, 255].\r\n   * @param {GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.ShadingPattern = ShadingPattern;\r\n\r\n  /**\r\n   * A PDF Tiling pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {Array.<Number>} boundingBox The bounding box at which one pattern cell gets clipped.\r\n   * @param {Number} xStep Horizontal spacing between pattern cells.\r\n   * @param {Number} yStep Vertical spacing between pattern cells.\r\n   * @param {API.GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.TilingPattern = TilingPattern;\r\n\r\n  /**\r\n   * Adds a new {@link API.ShadingPattern} for later use. Only available in \"advanced\" API mode.\r\n   * @param {String} key\r\n   * @param {Pattern} pattern\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name addPattern\r\n   */\r\n  API.addShadingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"addShadingPattern()\");\r\n\r\n    addPattern(key, pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Begins a new tiling pattern. All subsequent render calls are drawn to this pattern until {@link API.endTilingPattern}\r\n   * gets called. Only available in \"advanced\" API mode.\r\n   * @param {API.Pattern} pattern\r\n   * @memberof jsPDF#\r\n   * @name beginTilingPattern\r\n   */\r\n  API.beginTilingPattern = function(pattern) {\r\n    advancedApiModeTrap(\"beginTilingPattern()\");\r\n\r\n    beginNewRenderTarget(\r\n      pattern.boundingBox[0],\r\n      pattern.boundingBox[1],\r\n      pattern.boundingBox[2] - pattern.boundingBox[0],\r\n      pattern.boundingBox[3] - pattern.boundingBox[1],\r\n      pattern.matrix\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Ends a tiling pattern and sets the render target to the one active before {@link API.beginTilingPattern} has been called.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {string} key A unique key that is used to reference this pattern at later use.\r\n   * @param {API.Pattern} pattern The pattern to end.\r\n   * @memberof jsPDF#\r\n   * @name endTilingPattern\r\n   */\r\n  API.endTilingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"endTilingPattern()\");\r\n\r\n    // retrieve the stream\r\n    pattern.stream = pages[currentPage].join(\"\\n\");\r\n\r\n    addPattern(key, pattern);\r\n\r\n    events.publish(\"endTilingPattern\", pattern);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  var newObject = (API.__private__.newObject = function() {\r\n    var oid = newObjectDeferred();\r\n    newObjectDeferredBegin(oid, true);\r\n    return oid;\r\n  });\r\n\r\n  // Does not output the object.  The caller must call newObjectDeferredBegin(oid) before outputing any data\r\n  var newObjectDeferred = (API.__private__.newObjectDeferred = function() {\r\n    objectNumber++;\r\n    offsets[objectNumber] = function() {\r\n      return contentLength;\r\n    };\r\n    return objectNumber;\r\n  });\r\n\r\n  var newObjectDeferredBegin = function(oid, doOutput) {\r\n    doOutput = typeof doOutput === \"boolean\" ? doOutput : false;\r\n    offsets[oid] = contentLength;\r\n    if (doOutput) {\r\n      out(oid + \" 0 obj\");\r\n    }\r\n    return oid;\r\n  };\r\n  // Does not output the object until after the pages have been output.\r\n  // Returns an object containing the objectId and content.\r\n  // All pages have been added so the object ID can be estimated to start right after.\r\n  // This does not modify the current objectNumber;  It must be updated after the newObjects are output.\r\n  var newAdditionalObject = (API.__private__.newAdditionalObject = function() {\r\n    var objId = newObjectDeferred();\r\n    var obj = {\r\n      objId: objId,\r\n      content: \"\"\r\n    };\r\n    additionalObjects.push(obj);\r\n    return obj;\r\n  });\r\n\r\n  var rootDictionaryObjId = newObjectDeferred();\r\n  var resourceDictionaryObjId = newObjectDeferred();\r\n\r\n  /////////////////////\r\n  // Private functions\r\n  /////////////////////\r\n\r\n  var decodeColorString = (API.__private__.decodeColorString = function(color) {\r\n    var colorEncoded = color.split(\" \");\r\n    if (\r\n      colorEncoded.length === 2 &&\r\n      (colorEncoded[1] === \"g\" || colorEncoded[1] === \"G\")\r\n    ) {\r\n      // convert grayscale value to rgb so that it can be converted to hex for consistency\r\n      var floatVal = parseFloat(colorEncoded[0]);\r\n      colorEncoded = [floatVal, floatVal, floatVal, \"r\"];\r\n    } else if (\r\n      colorEncoded.length === 5 &&\r\n      (colorEncoded[4] === \"k\" || colorEncoded[4] === \"K\")\r\n    ) {\r\n      // convert CMYK values to rbg so that it can be converted to hex for consistency\r\n      var red = (1.0 - colorEncoded[0]) * (1.0 - colorEncoded[3]);\r\n      var green = (1.0 - colorEncoded[1]) * (1.0 - colorEncoded[3]);\r\n      var blue = (1.0 - colorEncoded[2]) * (1.0 - colorEncoded[3]);\r\n\r\n      colorEncoded = [red, green, blue, \"r\"];\r\n    }\r\n    var colorAsRGB = \"#\";\r\n    for (var i = 0; i < 3; i++) {\r\n      colorAsRGB += (\r\n        \"0\" + Math.floor(parseFloat(colorEncoded[i]) * 255).toString(16)\r\n      ).slice(-2);\r\n    }\r\n    return colorAsRGB;\r\n  });\r\n\r\n  var encodeColorString = (API.__private__.encodeColorString = function(\r\n    options\r\n  ) {\r\n    var color;\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        ch1: options\r\n      };\r\n    }\r\n    var ch1 = options.ch1;\r\n    var ch2 = options.ch2;\r\n    var ch3 = options.ch3;\r\n    var ch4 = options.ch4;\r\n    var letterArray =\r\n      options.pdfColorType === \"draw\" ? [\"G\", \"RG\", \"K\"] : [\"g\", \"rg\", \"k\"];\r\n\r\n    if (typeof ch1 === \"string\" && ch1.charAt(0) !== \"#\") {\r\n      var rgbColor = new RGBColor(ch1);\r\n      if (rgbColor.ok) {\r\n        ch1 = rgbColor.toHex();\r\n      } else if (!/^\\d*\\.?\\d*$/.test(ch1)) {\r\n        throw new Error(\r\n          'Invalid color \"' + ch1 + '\" passed to jsPDF.encodeColorString.'\r\n        );\r\n      }\r\n    }\r\n    //convert short rgb to long form\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{3}$/.test(ch1)) {\r\n      ch1 = \"#\" + ch1[1] + ch1[1] + ch1[2] + ch1[2] + ch1[3] + ch1[3];\r\n    }\r\n\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{6}$/.test(ch1)) {\r\n      var hex = parseInt(ch1.substr(1), 16);\r\n      ch1 = (hex >> 16) & 255;\r\n      ch2 = (hex >> 8) & 255;\r\n      ch3 = hex & 255;\r\n    }\r\n\r\n    if (\r\n      typeof ch2 === \"undefined\" ||\r\n      (typeof ch4 === \"undefined\" && ch1 === ch2 && ch2 === ch3)\r\n    ) {\r\n      // Gray color space.\r\n      if (typeof ch1 === \"string\") {\r\n        color = ch1 + \" \" + letterArray[0];\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = f2(ch1 / 255) + \" \" + letterArray[0];\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = f3(ch1 / 255) + \" \" + letterArray[0];\r\n        }\r\n      }\r\n    } else if (typeof ch4 === \"undefined\" || typeof ch4 === \"object\") {\r\n      // assume RGBA\r\n      if (ch4 && !isNaN(ch4.a)) {\r\n        //TODO Implement transparency.\r\n        //WORKAROUND use white for now, if transparent, otherwise handle as rgb\r\n        if (ch4.a === 0) {\r\n          color = [\"1.\", \"1.\", \"1.\", letterArray[1]].join(\" \");\r\n          return color;\r\n        }\r\n      }\r\n      // assume RGB\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, letterArray[1]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [\r\n              f2(ch1 / 255),\r\n              f2(ch2 / 255),\r\n              f2(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n            break;\r\n          default:\r\n          case 3:\r\n            color = [\r\n              f3(ch1 / 255),\r\n              f3(ch2 / 255),\r\n              f3(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n        }\r\n      }\r\n    } else {\r\n      // assume CMYK\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, ch4, letterArray[2]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = [f3(ch1), f3(ch2), f3(ch3), f3(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n        }\r\n      }\r\n    }\r\n    return color;\r\n  });\r\n\r\n  var getFilters = (API.__private__.getFilters = function() {\r\n    return filters;\r\n  });\r\n\r\n  var putStream = (API.__private__.putStream = function(options) {\r\n    options = options || {};\r\n    var data = options.data || \"\";\r\n    var filters = options.filters || getFilters();\r\n    var alreadyAppliedFilters = options.alreadyAppliedFilters || [];\r\n    var addLength1 = options.addLength1 || false;\r\n    var valueOfLength1 = data.length;\r\n    var objectId = options.objectId;\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null && typeof objectId == \"undefined\") {\r\n      throw new Error(\r\n        \"ObjectId must be passed to putStream for file encryption\"\r\n      );\r\n    }\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n\r\n    var processedData = {};\r\n    if (filters === true) {\r\n      filters = [\"FlateEncode\"];\r\n    }\r\n    var keyValues = options.additionalKeyValues || [];\r\n    if (typeof jsPDF.API.processDataByFilters !== \"undefined\") {\r\n      processedData = jsPDF.API.processDataByFilters(data, filters);\r\n    } else {\r\n      processedData = { data: data, reverseChain: [] };\r\n    }\r\n    var filterAsString =\r\n      processedData.reverseChain +\r\n      (Array.isArray(alreadyAppliedFilters)\r\n        ? alreadyAppliedFilters.join(\" \")\r\n        : alreadyAppliedFilters.toString());\r\n\r\n    if (processedData.data.length !== 0) {\r\n      keyValues.push({\r\n        key: \"Length\",\r\n        value: processedData.data.length\r\n      });\r\n      if (addLength1 === true) {\r\n        keyValues.push({\r\n          key: \"Length1\",\r\n          value: valueOfLength1\r\n        });\r\n      }\r\n    }\r\n\r\n    if (filterAsString.length != 0) {\r\n      if (filterAsString.split(\"/\").length - 1 === 1) {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: filterAsString\r\n        });\r\n      } else {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: \"[\" + filterAsString + \"]\"\r\n        });\r\n\r\n        for (var j = 0; j < keyValues.length; j += 1) {\r\n          if (keyValues[j].key === \"DecodeParms\") {\r\n            var decodeParmsArray = [];\r\n\r\n            for (\r\n              var i = 0;\r\n              i < processedData.reverseChain.split(\"/\").length - 1;\r\n              i += 1\r\n            ) {\r\n              decodeParmsArray.push(\"null\");\r\n            }\r\n\r\n            decodeParmsArray.push(keyValues[j].value);\r\n            keyValues[j].value = \"[\" + decodeParmsArray.join(\" \") + \"]\";\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    out(\"<<\");\r\n    for (var k = 0; k < keyValues.length; k++) {\r\n      out(\"/\" + keyValues[k].key + \" \" + keyValues[k].value);\r\n    }\r\n    out(\">>\");\r\n    if (processedData.data.length !== 0) {\r\n      out(\"stream\");\r\n      out(encryptor(processedData.data));\r\n      out(\"endstream\");\r\n    }\r\n  });\r\n\r\n  var putPage = (API.__private__.putPage = function(page) {\r\n    var pageNumber = page.number;\r\n    var data = page.data;\r\n    var pageObjectNumber = page.objId;\r\n    var pageContentsObjId = page.contentsObjId;\r\n\r\n    newObjectDeferredBegin(pageObjectNumber, true);\r\n    out(\"<</Type /Page\");\r\n    out(\"/Parent \" + page.rootDictionaryObjId + \" 0 R\");\r\n    out(\"/Resources \" + page.resourceDictionaryObjId + \" 0 R\");\r\n    out(\r\n      \"/MediaBox [\" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftX)) +\r\n        \" \" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftY)) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightX) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightY) +\r\n        \"]\"\r\n    );\r\n    if (page.cropBox !== null) {\r\n      out(\r\n        \"/CropBox [\" +\r\n          hpf(page.cropBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.cropBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.bleedBox !== null) {\r\n      out(\r\n        \"/BleedBox [\" +\r\n          hpf(page.bleedBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.trimBox !== null) {\r\n      out(\r\n        \"/TrimBox [\" +\r\n          hpf(page.trimBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.trimBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.artBox !== null) {\r\n      out(\r\n        \"/ArtBox [\" +\r\n          hpf(page.artBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.artBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (typeof page.userUnit === \"number\" && page.userUnit !== 1.0) {\r\n      out(\"/UserUnit \" + page.userUnit);\r\n    }\r\n\r\n    events.publish(\"putPage\", {\r\n      objId: pageObjectNumber,\r\n      pageContext: pagesContext[pageNumber],\r\n      pageNumber: pageNumber,\r\n      page: data\r\n    });\r\n    out(\"/Contents \" + pageContentsObjId + \" 0 R\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    // Page content\r\n    var pageContent = data.join(\"\\n\");\r\n\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      // if the user forgot to switch back to COMPAT mode, we must balance the graphics stack again\r\n      pageContent += \"\\nQ\";\r\n    }\r\n\r\n    newObjectDeferredBegin(pageContentsObjId, true);\r\n    putStream({\r\n      data: pageContent,\r\n      filters: getFilters(),\r\n      objectId: pageContentsObjId\r\n    });\r\n    out(\"endobj\");\r\n    return pageObjectNumber;\r\n  });\r\n\r\n  var putPages = (API.__private__.putPages = function() {\r\n    var n,\r\n      i,\r\n      pageObjectNumbers = [];\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pagesContext[n].objId = newObjectDeferred();\r\n      pagesContext[n].contentsObjId = newObjectDeferred();\r\n    }\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pageObjectNumbers.push(\r\n        putPage({\r\n          number: n,\r\n          data: pages[n],\r\n          objId: pagesContext[n].objId,\r\n          contentsObjId: pagesContext[n].contentsObjId,\r\n          mediaBox: pagesContext[n].mediaBox,\r\n          cropBox: pagesContext[n].cropBox,\r\n          bleedBox: pagesContext[n].bleedBox,\r\n          trimBox: pagesContext[n].trimBox,\r\n          artBox: pagesContext[n].artBox,\r\n          userUnit: pagesContext[n].userUnit,\r\n          rootDictionaryObjId: rootDictionaryObjId,\r\n          resourceDictionaryObjId: resourceDictionaryObjId\r\n        })\r\n      );\r\n    }\r\n    newObjectDeferredBegin(rootDictionaryObjId, true);\r\n    out(\"<</Type /Pages\");\r\n    var kids = \"/Kids [\";\r\n    for (i = 0; i < page; i++) {\r\n      kids += pageObjectNumbers[i] + \" 0 R \";\r\n    }\r\n    out(kids + \"]\");\r\n    out(\"/Count \" + page);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    events.publish(\"postPutPages\");\r\n  });\r\n\r\n  var putFont = function(font) {\r\n    events.publish(\"putFont\", {\r\n      font: font,\r\n      out: out,\r\n      newObject: newObject,\r\n      putStream: putStream\r\n    });\r\n\r\n    if (font.isAlreadyPutted !== true) {\r\n      font.objectNumber = newObject();\r\n      out(\"<<\");\r\n      out(\"/Type /Font\");\r\n      out(\"/BaseFont /\" + toPDFName(font.postScriptName));\r\n      out(\"/Subtype /Type1\");\r\n      if (typeof font.encoding === \"string\") {\r\n        out(\"/Encoding /\" + font.encoding);\r\n      }\r\n      out(\"/FirstChar 32\");\r\n      out(\"/LastChar 255\");\r\n      out(\">>\");\r\n      out(\"endobj\");\r\n    }\r\n  };\r\n\r\n  var putFonts = function() {\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          putFont(fonts[fontKey]);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXObject = function(xObject) {\r\n    xObject.objectNumber = newObject();\r\n\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/XObject\" });\r\n    options.push({ key: \"Subtype\", value: \"/Form\" });\r\n    options.push({\r\n      key: \"BBox\",\r\n      value:\r\n        \"[\" +\r\n        [\r\n          hpf(xObject.x),\r\n          hpf(xObject.y),\r\n          hpf(xObject.x + xObject.width),\r\n          hpf(xObject.y + xObject.height)\r\n        ].join(\" \") +\r\n        \"]\"\r\n    });\r\n    options.push({\r\n      key: \"Matrix\",\r\n      value: \"[\" + xObject.matrix.toString() + \"]\"\r\n    });\r\n    // TODO: /Resources\r\n\r\n    var stream = xObject.pages[1].join(\"\\n\");\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      objectId: xObject.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putXObjects = function() {\r\n    for (var xObjectKey in renderTargets) {\r\n      if (renderTargets.hasOwnProperty(xObjectKey)) {\r\n        putXObject(renderTargets[xObjectKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var interpolateAndEncodeRGBStream = function(colors, numberSamples) {\r\n    var tValues = [];\r\n    var t;\r\n    var dT = 1.0 / (numberSamples - 1);\r\n    for (t = 0.0; t < 1.0; t += dT) {\r\n      tValues.push(t);\r\n    }\r\n    tValues.push(1.0);\r\n    // add first and last control point if not present\r\n    if (colors[0].offset != 0.0) {\r\n      var c0 = {\r\n        offset: 0.0,\r\n        color: colors[0].color\r\n      };\r\n      colors.unshift(c0);\r\n    }\r\n    if (colors[colors.length - 1].offset != 1.0) {\r\n      var c1 = {\r\n        offset: 1.0,\r\n        color: colors[colors.length - 1].color\r\n      };\r\n      colors.push(c1);\r\n    }\r\n    var out = \"\";\r\n    var index = 0;\r\n\r\n    for (var i = 0; i < tValues.length; i++) {\r\n      t = tValues[i];\r\n      while (t > colors[index + 1].offset) index++;\r\n      var a = colors[index].offset;\r\n      var b = colors[index + 1].offset;\r\n      var d = (t - a) / (b - a);\r\n\r\n      var aColor = colors[index].color;\r\n      var bColor = colors[index + 1].color;\r\n\r\n      out +=\r\n        padd2Hex(Math.round((1 - d) * aColor[0] + d * bColor[0]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[1] + d * bColor[1]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[2] + d * bColor[2]).toString(16));\r\n    }\r\n    return out.trim();\r\n  };\r\n\r\n  var putShadingPattern = function(pattern, numberSamples) {\r\n    /*\r\n       Axial patterns shade between the two points specified in coords, radial patterns between the inner\r\n       and outer circle.\r\n       The user can specify an array (colors) that maps t-Values in [0, 1] to RGB colors. These are now\r\n       interpolated to equidistant samples and written to pdf as a sample (type 0) function.\r\n       */\r\n    // The number of color samples that should be used to describe the shading.\r\n    // The higher, the more accurate the gradient will be.\r\n    numberSamples || (numberSamples = 21);\r\n    var funcObjectNumber = newObject();\r\n    var stream = interpolateAndEncodeRGBStream(pattern.colors, numberSamples);\r\n\r\n    var options = [];\r\n    options.push({ key: \"FunctionType\", value: \"0\" });\r\n    options.push({ key: \"Domain\", value: \"[0.0 1.0]\" });\r\n    options.push({ key: \"Size\", value: \"[\" + numberSamples + \"]\" });\r\n    options.push({ key: \"BitsPerSample\", value: \"8\" });\r\n    options.push({ key: \"Range\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n    options.push({ key: \"Decode\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      alreadyAppliedFilters: [\"/ASCIIHexDecode\"],\r\n      objectId: funcObjectNumber\r\n    });\r\n    out(\"endobj\");\r\n\r\n    pattern.objectNumber = newObject();\r\n    out(\"<< /ShadingType \" + pattern.type);\r\n    out(\"/ColorSpace /DeviceRGB\");\r\n    var coords =\r\n      \"/Coords [\" +\r\n      hpf(parseFloat(pattern.coords[0])) +\r\n      \" \" + // x1\r\n      hpf(parseFloat(pattern.coords[1])) +\r\n      \" \"; // y1\r\n    if (pattern.type === 2) {\r\n      // axial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[3])); // y2\r\n    } else {\r\n      // radial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // r1\r\n        hpf(parseFloat(pattern.coords[3])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[4])) +\r\n        \" \" + // y2\r\n        hpf(parseFloat(pattern.coords[5])); // r2\r\n    }\r\n    coords += \"]\";\r\n    out(coords);\r\n\r\n    if (pattern.matrix) {\r\n      out(\"/Matrix [\" + pattern.matrix.toString() + \"]\");\r\n    }\r\n    out(\"/Function \" + funcObjectNumber + \" 0 R\");\r\n    out(\"/Extend [true true]\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putTilingPattern = function(pattern, deferredResourceDictionaryIds) {\r\n    var resourcesObjectId = newObjectDeferred();\r\n    var patternObjectId = newObject();\r\n\r\n    deferredResourceDictionaryIds.push({\r\n      resourcesOid: resourcesObjectId,\r\n      objectOid: patternObjectId\r\n    });\r\n\r\n    pattern.objectNumber = patternObjectId;\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/Pattern\" });\r\n    options.push({ key: \"PatternType\", value: \"1\" }); // tiling pattern\r\n    options.push({ key: \"PaintType\", value: \"1\" }); // colored tiling pattern\r\n    options.push({ key: \"TilingType\", value: \"1\" }); // constant spacing\r\n    options.push({\r\n      key: \"BBox\",\r\n      value: \"[\" + pattern.boundingBox.map(hpf).join(\" \") + \"]\"\r\n    });\r\n    options.push({ key: \"XStep\", value: hpf(pattern.xStep) });\r\n    options.push({ key: \"YStep\", value: hpf(pattern.yStep) });\r\n    options.push({ key: \"Resources\", value: resourcesObjectId + \" 0 R\" });\r\n    if (pattern.matrix) {\r\n      options.push({\r\n        key: \"Matrix\",\r\n        value: \"[\" + pattern.matrix.toString() + \"]\"\r\n      });\r\n    }\r\n\r\n    putStream({\r\n      data: pattern.stream,\r\n      additionalKeyValues: options,\r\n      objectId: pattern.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putPatterns = function(deferredResourceDictionaryIds) {\r\n    var patternKey;\r\n    for (patternKey in patterns) {\r\n      if (patterns.hasOwnProperty(patternKey)) {\r\n        if (patterns[patternKey] instanceof ShadingPattern) {\r\n          putShadingPattern(patterns[patternKey]);\r\n        } else if (patterns[patternKey] instanceof TilingPattern) {\r\n          putTilingPattern(patterns[patternKey], deferredResourceDictionaryIds);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putGState = function(gState) {\r\n    gState.objectNumber = newObject();\r\n    out(\"<<\");\r\n    for (var p in gState) {\r\n      switch (p) {\r\n        case \"opacity\":\r\n          out(\"/ca \" + f2(gState[p]));\r\n          break;\r\n        case \"stroke-opacity\":\r\n          out(\"/CA \" + f2(gState[p]));\r\n          break;\r\n      }\r\n    }\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putGStates = function() {\r\n    var gStateKey;\r\n    for (gStateKey in gStates) {\r\n      if (gStates.hasOwnProperty(gStateKey)) {\r\n        putGState(gStates[gStateKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXobjectDict = function() {\r\n    out(\"/XObject <<\");\r\n    for (var xObjectKey in renderTargets) {\r\n      if (\r\n        renderTargets.hasOwnProperty(xObjectKey) &&\r\n        renderTargets[xObjectKey].objectNumber >= 0\r\n      ) {\r\n        out(\r\n          \"/\" +\r\n            xObjectKey +\r\n            \" \" +\r\n            renderTargets[xObjectKey].objectNumber +\r\n            \" 0 R\"\r\n        );\r\n      }\r\n    }\r\n\r\n    // Loop through images, or other data objects\r\n    events.publish(\"putXobjectDict\");\r\n    out(\">>\");\r\n  };\r\n\r\n  var putEncryptionDict = function() {\r\n    encryption.oid = newObject();\r\n    out(\"<<\");\r\n    out(\"/Filter /Standard\");\r\n    out(\"/V \" + encryption.v);\r\n    out(\"/R \" + encryption.r);\r\n    out(\"/U <\" + encryption.toHexString(encryption.U) + \">\");\r\n    out(\"/O <\" + encryption.toHexString(encryption.O) + \">\");\r\n    out(\"/P \" + encryption.P);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putFontDict = function() {\r\n    out(\"/Font <<\");\r\n\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          out(\"/\" + fontKey + \" \" + fonts[fontKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n    }\r\n    out(\">>\");\r\n  };\r\n\r\n  var putShadingPatternDict = function() {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Shading <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof ShadingPattern &&\r\n          patterns[patternKey].objectNumber >= 0\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n\r\n      events.publish(\"putShadingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putTilingPatternDict = function(objectOid) {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Pattern <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof API.TilingPattern &&\r\n          patterns[patternKey].objectNumber >= 0 &&\r\n          patterns[patternKey].objectNumber < objectOid // prevent cyclic dependencies\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n      events.publish(\"putTilingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putGStatesDict = function() {\r\n    if (Object.keys(gStates).length > 0) {\r\n      var gStateKey;\r\n      out(\"/ExtGState <<\");\r\n      for (gStateKey in gStates) {\r\n        if (\r\n          gStates.hasOwnProperty(gStateKey) &&\r\n          gStates[gStateKey].objectNumber >= 0\r\n        ) {\r\n          out(\"/\" + gStateKey + \" \" + gStates[gStateKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n\r\n      events.publish(\"putGStateDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putResourceDictionary = function(objectIds) {\r\n    newObjectDeferredBegin(objectIds.resourcesOid, true);\r\n    out(\"<<\");\r\n    out(\"/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\");\r\n    putFontDict();\r\n    putShadingPatternDict();\r\n    putTilingPatternDict(objectIds.objectOid);\r\n    putGStatesDict();\r\n    putXobjectDict();\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putResources = function() {\r\n    // FormObjects, Patterns etc. might use other FormObjects/Patterns/Images\r\n    // which means their resource dictionaries must contain the already resolved\r\n    // object ids. For this reason we defer the serialization of the resource\r\n    // dicts until all objects have been serialized and have object ids.\r\n    //\r\n    // In order to prevent cyclic dependencies (which Adobe Reader doesn't like),\r\n    // we only put all oids that are smaller than the oid of the object the\r\n    // resource dict belongs to. This is correct behavior, since the streams\r\n    // may only use other objects that have already been defined and thus appear\r\n    // earlier in their respective collection.\r\n    // Currently, this only affects tiling patterns, but a (more) correct\r\n    // implementation of FormObjects would also define their own resource dicts.\r\n    var deferredResourceDictionaryIds = [];\r\n\r\n    putFonts();\r\n    putGStates();\r\n    putXObjects();\r\n    putPatterns(deferredResourceDictionaryIds);\r\n\r\n    events.publish(\"putResources\");\r\n    deferredResourceDictionaryIds.forEach(putResourceDictionary);\r\n    putResourceDictionary({\r\n      resourcesOid: resourceDictionaryObjId,\r\n      objectOid: Number.MAX_SAFE_INTEGER // output all objects\r\n    });\r\n    events.publish(\"postPutResources\");\r\n  };\r\n\r\n  var putAdditionalObjects = function() {\r\n    events.publish(\"putAdditionalObjects\");\r\n    for (var i = 0; i < additionalObjects.length; i++) {\r\n      var obj = additionalObjects[i];\r\n      newObjectDeferredBegin(obj.objId, true);\r\n      out(obj.content);\r\n      out(\"endobj\");\r\n    }\r\n    events.publish(\"postPutAdditionalObjects\");\r\n  };\r\n\r\n  var addFontToFontDictionary = function(font) {\r\n    fontmap[font.fontName] = fontmap[font.fontName] || {};\r\n    fontmap[font.fontName][font.fontStyle] = font.id;\r\n  };\r\n\r\n  var addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    encoding,\r\n    isStandardFont\r\n  ) {\r\n    var font = {\r\n      id: \"F\" + (Object.keys(fonts).length + 1).toString(10),\r\n      postScriptName: postScriptName,\r\n      fontName: fontName,\r\n      fontStyle: fontStyle,\r\n      encoding: encoding,\r\n      isStandardFont: isStandardFont || false,\r\n      metadata: {}\r\n    };\r\n\r\n    events.publish(\"addFont\", {\r\n      font: font,\r\n      instance: this\r\n    });\r\n\r\n    fonts[font.id] = font;\r\n    addFontToFontDictionary(font);\r\n    return font.id;\r\n  };\r\n\r\n  var addFonts = function(arrayOfFonts) {\r\n    for (var i = 0, l = standardFonts.length; i < l; i++) {\r\n      var fontKey = addFont.call(\r\n        this,\r\n        arrayOfFonts[i][0],\r\n        arrayOfFonts[i][1],\r\n        arrayOfFonts[i][2],\r\n        standardFonts[i][3],\r\n        true\r\n      );\r\n\r\n      if (putOnlyUsedFonts === false) {\r\n        usedFonts[fontKey] = true;\r\n      }\r\n      // adding aliases for standard fonts, this time matching the capitalization\r\n      var parts = arrayOfFonts[i][0].split(\"-\");\r\n      addFontToFontDictionary({\r\n        id: fontKey,\r\n        fontName: parts[0],\r\n        fontStyle: parts[1] || \"\"\r\n      });\r\n    }\r\n    events.publish(\"addFonts\", {\r\n      fonts: fonts,\r\n      dictionary: fontmap\r\n    });\r\n  };\r\n\r\n  var SAFE = function __safeCall(fn) {\r\n    fn.foo = function __safeCallWrapper() {\r\n      try {\r\n        return fn.apply(this, arguments);\r\n      } catch (e) {\r\n        var stack = e.stack || \"\";\r\n        if (~stack.indexOf(\" at \")) stack = stack.split(\" at \")[1];\r\n        var m =\r\n          \"Error in function \" +\r\n          stack.split(\"\\n\")[0].split(\"<\")[0] +\r\n          \": \" +\r\n          e.message;\r\n        if (globalObject.console) {\r\n          globalObject.console.error(m, e);\r\n          if (globalObject.alert) alert(m);\r\n        } else {\r\n          throw new Error(m);\r\n        }\r\n      }\r\n    };\r\n    fn.foo.bar = fn;\r\n    return fn.foo;\r\n  };\r\n\r\n  var to8bitStream = function(text, flags) {\r\n    /**\r\n     * PDF 1.3 spec:\r\n     * \"For text strings encoded in Unicode, the first two bytes must be 254 followed by\r\n     * 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts\r\n     * with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely\r\n     * to be a meaningful beginning of a word or phrase.) The remainder of the\r\n     * string consists of Unicode character codes, according to the UTF-16 encoding\r\n     * specified in the Unicode standard, version 2.0. Commonly used Unicode values\r\n     * are represented as 2 bytes per character, with the high-order byte appearing first\r\n     * in the string.\"\r\n     *\r\n     * In other words, if there are chars in a string with char code above 255, we\r\n     * recode the string to UCS2 BE - string doubles in length and BOM is prepended.\r\n     *\r\n     * HOWEVER!\r\n     * Actual *content* (body) text (as opposed to strings used in document properties etc)\r\n     * does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)\r\n     *\r\n     * Because of Adobe's focus on \"you subset your fonts!\" you are not supposed to have\r\n     * a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could\r\n     * fudge it with \"Identity-H\" encoding and custom CIDtoGID map that mimics Unicode\r\n     * code page. There, however, all characters in the stream are treated as GIDs,\r\n     * including BOM, which is the reason we need to skip BOM in content text (i.e. that\r\n     * that is tied to a font).\r\n     *\r\n     * To signal this \"special\" PDFEscape / to8bitStream handling mode,\r\n     * API.text() function sets (unless you overwrite it with manual values\r\n     * given to API.text(.., flags) )\r\n     * flags.autoencode = true\r\n     * flags.noBOM = true\r\n     *\r\n     * ===================================================================================\r\n     * `flags` properties relied upon:\r\n     *   .sourceEncoding = string with encoding label.\r\n     *                     \"Unicode\" by default. = encoding of the incoming text.\r\n     *                     pass some non-existing encoding name\r\n     *                     (ex: 'Do not touch my strings! I know what I am doing.')\r\n     *                     to make encoding code skip the encoding step.\r\n     *   .outputEncoding = Either valid PDF encoding name\r\n     *                     (must be supported by jsPDF font metrics, otherwise no encoding)\r\n     *                     or a JS object, where key = sourceCharCode, value = outputCharCode\r\n     *                     missing keys will be treated as: sourceCharCode === outputCharCode\r\n     *   .noBOM\r\n     *       See comment higher above for explanation for why this is important\r\n     *   .autoencode\r\n     *       See comment higher above for explanation for why this is important\r\n     */\r\n\r\n    var i,\r\n      l,\r\n      sourceEncoding,\r\n      encodingBlock,\r\n      outputEncoding,\r\n      newtext,\r\n      isUnicode,\r\n      ch,\r\n      bch;\r\n\r\n    flags = flags || {};\r\n    sourceEncoding = flags.sourceEncoding || \"Unicode\";\r\n    outputEncoding = flags.outputEncoding;\r\n\r\n    // This 'encoding' section relies on font metrics format\r\n    // attached to font objects by, among others,\r\n    // \"Willow Systems' standard_font_metrics plugin\"\r\n    // see jspdf.plugin.standard_font_metrics.js for format\r\n    // of the font.metadata.encoding Object.\r\n    // It should be something like\r\n    //   .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}\r\n    //   .widths = {0:width, code:width, ..., 'fof':divisor}\r\n    //   .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}\r\n    if (\r\n      (flags.autoencode || outputEncoding) &&\r\n      fonts[activeFontKey].metadata &&\r\n      fonts[activeFontKey].metadata[sourceEncoding] &&\r\n      fonts[activeFontKey].metadata[sourceEncoding].encoding\r\n    ) {\r\n      encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding;\r\n\r\n      // each font has default encoding. Some have it clearly defined.\r\n      if (!outputEncoding && fonts[activeFontKey].encoding) {\r\n        outputEncoding = fonts[activeFontKey].encoding;\r\n      }\r\n\r\n      // Hmmm, the above did not work? Let's try again, in different place.\r\n      if (!outputEncoding && encodingBlock.codePages) {\r\n        outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default\r\n      }\r\n\r\n      if (typeof outputEncoding === \"string\") {\r\n        outputEncoding = encodingBlock[outputEncoding];\r\n      }\r\n      // we want output encoding to be a JS Object, where\r\n      // key = sourceEncoding's character code and\r\n      // value = outputEncoding's character code.\r\n      if (outputEncoding) {\r\n        isUnicode = false;\r\n        newtext = [];\r\n        for (i = 0, l = text.length; i < l; i++) {\r\n          ch = outputEncoding[text.charCodeAt(i)];\r\n          if (ch) {\r\n            newtext.push(String.fromCharCode(ch));\r\n          } else {\r\n            newtext.push(text[i]);\r\n          }\r\n\r\n          // since we are looping over chars anyway, might as well\r\n          // check for residual unicodeness\r\n          if (newtext[i].charCodeAt(0) >> 8) {\r\n            /* more than 255 */\r\n            isUnicode = true;\r\n          }\r\n        }\r\n        text = newtext.join(\"\");\r\n      }\r\n    }\r\n\r\n    i = text.length;\r\n    // isUnicode may be set to false above. Hence the triple-equal to undefined\r\n    while (isUnicode === undefined && i !== 0) {\r\n      if (text.charCodeAt(i - 1) >> 8) {\r\n        /* more than 255 */\r\n        isUnicode = true;\r\n      }\r\n      i--;\r\n    }\r\n    if (!isUnicode) {\r\n      return text;\r\n    }\r\n\r\n    newtext = flags.noBOM ? [] : [254, 255];\r\n    for (i = 0, l = text.length; i < l; i++) {\r\n      ch = text.charCodeAt(i);\r\n      bch = ch >> 8; // divide by 256\r\n      if (bch >> 8) {\r\n        /* something left after dividing by 256 second time */\r\n        throw new Error(\r\n          \"Character at position \" +\r\n            i +\r\n            \" of string '\" +\r\n            text +\r\n            \"' exceeds 16bits. Cannot be encoded into UCS-2 BE\"\r\n        );\r\n      }\r\n      newtext.push(bch);\r\n      newtext.push(ch - (bch << 8));\r\n    }\r\n    return String.fromCharCode.apply(undefined, newtext);\r\n  };\r\n\r\n  var pdfEscape = (API.__private__.pdfEscape = API.pdfEscape = function(\r\n    text,\r\n    flags\r\n  ) {\r\n    /**\r\n     * Replace '/', '(', and ')' with pdf-safe versions\r\n     *\r\n     * Doing to8bitStream does NOT make this PDF display unicode text. For that\r\n     * we also need to reference a unicode font and embed it - royal pain in the rear.\r\n     *\r\n     * There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,\r\n     * which JavaScript Strings are happy to provide. So, while we still cannot display\r\n     * 2-byte characters property, at least CONDITIONALLY converting (entire string containing)\r\n     * 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF\r\n     * is still parseable.\r\n     * This will allow immediate support for unicode in document properties strings.\r\n     */\r\n    return to8bitStream(text, flags)\r\n      .replace(/\\\\/g, \"\\\\\\\\\")\r\n      .replace(/\\(/g, \"\\\\(\")\r\n      .replace(/\\)/g, \"\\\\)\");\r\n  });\r\n\r\n  var beginPage = (API.__private__.beginPage = function(format) {\r\n    pages[++page] = [];\r\n    pagesContext[page] = {\r\n      objId: 0,\r\n      contentsObjId: 0,\r\n      userUnit: Number(userUnit),\r\n      artBox: null,\r\n      bleedBox: null,\r\n      cropBox: null,\r\n      trimBox: null,\r\n      mediaBox: {\r\n        bottomLeftX: 0,\r\n        bottomLeftY: 0,\r\n        topRightX: Number(format[0]),\r\n        topRightY: Number(format[1])\r\n      }\r\n    };\r\n    _setPage(page);\r\n    setOutputDestination(pages[currentPage]);\r\n  });\r\n\r\n  var _addPage = function(parmFormat, parmOrientation) {\r\n    var dimensions, width, height;\r\n\r\n    orientation = parmOrientation || orientation;\r\n\r\n    if (typeof parmFormat === \"string\") {\r\n      dimensions = getPageFormat(parmFormat.toLowerCase());\r\n      if (Array.isArray(dimensions)) {\r\n        width = dimensions[0];\r\n        height = dimensions[1];\r\n      }\r\n    }\r\n\r\n    if (Array.isArray(parmFormat)) {\r\n      width = parmFormat[0] * scaleFactor;\r\n      height = parmFormat[1] * scaleFactor;\r\n    }\r\n\r\n    if (isNaN(width)) {\r\n      width = format[0];\r\n      height = format[1];\r\n    }\r\n\r\n    if (width > 14400 || height > 14400) {\r\n      console.warn(\r\n        \"A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400\"\r\n      );\r\n      width = Math.min(14400, width);\r\n      height = Math.min(14400, height);\r\n    }\r\n\r\n    format = [width, height];\r\n\r\n    switch (orientation.substr(0, 1)) {\r\n      case \"l\":\r\n        if (height > width) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n      case \"p\":\r\n        if (width > height) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n    }\r\n\r\n    beginPage(format);\r\n\r\n    // Set line width\r\n    setLineWidth(lineWidth);\r\n    // Set draw color\r\n    out(strokeColor);\r\n    // resurrecting non-default line caps, joins\r\n    if (lineCapID !== 0) {\r\n      out(lineCapID + \" J\");\r\n    }\r\n    if (lineJoinID !== 0) {\r\n      out(lineJoinID + \" j\");\r\n    }\r\n    events.publish(\"addPage\", {\r\n      pageNumber: page\r\n    });\r\n  };\r\n\r\n  var _deletePage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      pages.splice(n, 1);\r\n      pagesContext.splice(n, 1);\r\n      page--;\r\n      if (currentPage > page) {\r\n        currentPage = page;\r\n      }\r\n      this.setPage(currentPage);\r\n    }\r\n  };\r\n\r\n  var _setPage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      currentPage = n;\r\n    }\r\n  };\r\n\r\n  var getNumberOfPages = (API.__private__.getNumberOfPages = API.getNumberOfPages = function() {\r\n    return pages.length - 1;\r\n  });\r\n\r\n  /**\r\n   * Returns a document-specific font key - a label assigned to a\r\n   * font name + font type combination at the time the font was added\r\n   * to the font inventory.\r\n   *\r\n   * Font key is used as label for the desired font for a block of text\r\n   * to be added to the PDF document stream.\r\n   * @private\r\n   * @function\r\n   * @param fontName {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @param fontStyle {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @returns {string} Font key.\r\n   * @ignore\r\n   */\r\n  var getFont = function(fontName, fontStyle, options) {\r\n    var key = undefined,\r\n      fontNameLowerCase;\r\n    options = options || {};\r\n\r\n    fontName =\r\n      fontName !== undefined ? fontName : fonts[activeFontKey].fontName;\r\n    fontStyle =\r\n      fontStyle !== undefined ? fontStyle : fonts[activeFontKey].fontStyle;\r\n    fontNameLowerCase = fontName.toLowerCase();\r\n\r\n    if (\r\n      fontmap[fontNameLowerCase] !== undefined &&\r\n      fontmap[fontNameLowerCase][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontNameLowerCase][fontStyle];\r\n    } else if (\r\n      fontmap[fontName] !== undefined &&\r\n      fontmap[fontName][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontName][fontStyle];\r\n    } else {\r\n      if (options.disableWarning === false) {\r\n        console.warn(\r\n          \"Unable to look up font label for font '\" +\r\n            fontName +\r\n            \"', '\" +\r\n            fontStyle +\r\n            \"'. Refer to getFontList() for available fonts.\"\r\n        );\r\n      }\r\n    }\r\n\r\n    if (!key && !options.noFallback) {\r\n      key = fontmap[\"times\"][fontStyle];\r\n      if (key == null) {\r\n        key = fontmap[\"times\"][\"normal\"];\r\n      }\r\n    }\r\n    return key;\r\n  };\r\n\r\n  var putInfo = (API.__private__.putInfo = function() {\r\n    var objectId = newObject();\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n    out(\"<<\");\r\n    out(\"/Producer (\" + pdfEscape(encryptor(\"jsPDF \" + jsPDF.version)) + \")\");\r\n    for (var key in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(key) && documentProperties[key]) {\r\n        out(\r\n          \"/\" +\r\n            key.substr(0, 1).toUpperCase() +\r\n            key.substr(1) +\r\n            \" (\" +\r\n            pdfEscape(encryptor(documentProperties[key])) +\r\n            \")\"\r\n        );\r\n      }\r\n    }\r\n    out(\"/CreationDate (\" + pdfEscape(encryptor(creationDate)) + \")\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putCatalog = (API.__private__.putCatalog = function(options) {\r\n    options = options || {};\r\n    var tmpRootDictionaryObjId =\r\n      options.rootDictionaryObjId || rootDictionaryObjId;\r\n    newObject();\r\n    out(\"<<\");\r\n    out(\"/Type /Catalog\");\r\n    out(\"/Pages \" + tmpRootDictionaryObjId + \" 0 R\");\r\n    // PDF13ref Section 7.2.1\r\n    if (!zoomMode) zoomMode = \"fullwidth\";\r\n    switch (zoomMode) {\r\n      case \"fullwidth\":\r\n        out(\"/OpenAction [3 0 R /FitH null]\");\r\n        break;\r\n      case \"fullheight\":\r\n        out(\"/OpenAction [3 0 R /FitV null]\");\r\n        break;\r\n      case \"fullpage\":\r\n        out(\"/OpenAction [3 0 R /Fit]\");\r\n        break;\r\n      case \"original\":\r\n        out(\"/OpenAction [3 0 R /XYZ null null 1]\");\r\n        break;\r\n      default:\r\n        var pcn = \"\" + zoomMode;\r\n        if (pcn.substr(pcn.length - 1) === \"%\")\r\n          zoomMode = parseInt(zoomMode) / 100;\r\n        if (typeof zoomMode === \"number\") {\r\n          out(\"/OpenAction [3 0 R /XYZ null null \" + f2(zoomMode) + \"]\");\r\n        }\r\n    }\r\n    if (!layoutMode) layoutMode = \"continuous\";\r\n    switch (layoutMode) {\r\n      case \"continuous\":\r\n        out(\"/PageLayout /OneColumn\");\r\n        break;\r\n      case \"single\":\r\n        out(\"/PageLayout /SinglePage\");\r\n        break;\r\n      case \"two\":\r\n      case \"twoleft\":\r\n        out(\"/PageLayout /TwoColumnLeft\");\r\n        break;\r\n      case \"tworight\":\r\n        out(\"/PageLayout /TwoColumnRight\");\r\n        break;\r\n    }\r\n    if (pageMode) {\r\n      /**\r\n       * A name object specifying how the document should be displayed when opened:\r\n       * UseNone      : Neither document outline nor thumbnail images visible -- DEFAULT\r\n       * UseOutlines  : Document outline visible\r\n       * UseThumbs    : Thumbnail images visible\r\n       * FullScreen   : Full-screen mode, with no menu bar, window controls, or any other window visible\r\n       */\r\n      out(\"/PageMode /\" + pageMode);\r\n    }\r\n    events.publish(\"putCatalog\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putTrailer = (API.__private__.putTrailer = function() {\r\n    out(\"trailer\");\r\n    out(\"<<\");\r\n    out(\"/Size \" + (objectNumber + 1));\r\n    // Root and Info must be the last and second last objects written respectively\r\n    out(\"/Root \" + objectNumber + \" 0 R\");\r\n    out(\"/Info \" + (objectNumber - 1) + \" 0 R\");\r\n    if (encryptionOptions !== null) {\r\n      out(\"/Encrypt \" + encryption.oid + \" 0 R\");\r\n    }\r\n    out(\"/ID [ <\" + fileId + \"> <\" + fileId + \"> ]\");\r\n    out(\">>\");\r\n  });\r\n\r\n  var putHeader = (API.__private__.putHeader = function() {\r\n    out(\"%PDF-\" + pdfVersion);\r\n    out(\"%\\xBA\\xDF\\xAC\\xE0\");\r\n  });\r\n\r\n  var putXRef = (API.__private__.putXRef = function() {\r\n    var p = \"0000000000\";\r\n\r\n    out(\"xref\");\r\n    out(\"0 \" + (objectNumber + 1));\r\n    out(\"0000000000 65535 f \");\r\n    for (var i = 1; i <= objectNumber; i++) {\r\n      var offset = offsets[i];\r\n      if (typeof offset === \"function\") {\r\n        out((p + offsets[i]()).slice(-10) + \" 00000 n \");\r\n      } else {\r\n        if (typeof offsets[i] !== \"undefined\") {\r\n          out((p + offsets[i]).slice(-10) + \" 00000 n \");\r\n        } else {\r\n          out(\"0000000000 00000 n \");\r\n        }\r\n      }\r\n    }\r\n  });\r\n\r\n  var buildDocument = (API.__private__.buildDocument = function() {\r\n    resetDocument();\r\n    setOutputDestination(content);\r\n\r\n    events.publish(\"buildDocument\");\r\n\r\n    putHeader();\r\n    putPages();\r\n    putAdditionalObjects();\r\n    putResources();\r\n    if (encryptionOptions !== null) putEncryptionDict();\r\n    putInfo();\r\n    putCatalog();\r\n\r\n    var offsetOfXRef = contentLength;\r\n    putXRef();\r\n    putTrailer();\r\n    out(\"startxref\");\r\n    out(\"\" + offsetOfXRef);\r\n    out(\"%%EOF\");\r\n\r\n    setOutputDestination(pages[currentPage]);\r\n\r\n    return content.join(\"\\n\");\r\n  });\r\n\r\n  var getBlob = (API.__private__.getBlob = function(data) {\r\n    return new Blob([getArrayBuffer(data)], {\r\n      type: \"application/pdf\"\r\n    });\r\n  });\r\n\r\n  /**\r\n   * Generates the PDF document.\r\n   *\r\n   * If `type` argument is undefined, output is raw body of resulting PDF returned as a string.\r\n   *\r\n   * @param {string} type A string identifying one of the possible output types.<br/>\r\n   *                      Possible values are: <br/>\r\n   *                          'arraybuffer' -> (ArrayBuffer)<br/>\r\n   *                          'blob' -> (Blob)<br/>\r\n   *                          'bloburi'/'bloburl' -> (string)<br/>\r\n   *                          'datauristring'/'dataurlstring' -> (string)<br/>\r\n   *                          'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>\r\n   *                          'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfjsnewwindow' -> (wind | null)\r\n   * @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>\r\n   *                                Possible options are 'filename'.<br/>\r\n   *                                A string can be passed instead of {filename:string} and defaults to 'generated.pdf'\r\n   * @function\r\n   * @instance\r\n   * @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}\r\n   * @memberof jsPDF#\r\n   * @name output\r\n   */\r\n  var output = (API.output = API.__private__.output = SAFE(function output(\r\n    type,\r\n    options\r\n  ) {\r\n    options = options || {};\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        filename: options\r\n      };\r\n    } else {\r\n      options.filename = options.filename || \"generated.pdf\";\r\n    }\r\n\r\n    switch (type) {\r\n      case undefined:\r\n        return buildDocument();\r\n      case \"save\":\r\n        API.save(options.filename);\r\n        break;\r\n      case \"arraybuffer\":\r\n        return getArrayBuffer(buildDocument());\r\n      case \"blob\":\r\n        return getBlob(buildDocument());\r\n      case \"bloburi\":\r\n      case \"bloburl\":\r\n        // Developer is responsible of calling revokeObjectURL\r\n        if (\r\n          typeof globalObject.URL !== \"undefined\" &&\r\n          typeof globalObject.URL.createObjectURL === \"function\"\r\n        ) {\r\n          return (\r\n            (globalObject.URL &&\r\n              globalObject.URL.createObjectURL(getBlob(buildDocument()))) ||\r\n            void 0\r\n          );\r\n        } else {\r\n          console.warn(\r\n            \"bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauristring\":\r\n      case \"dataurlstring\":\r\n        var dataURI = \"\";\r\n        var pdfDocument = buildDocument();\r\n        try {\r\n          dataURI = btoa(pdfDocument);\r\n        } catch (e) {\r\n          dataURI = btoa(unescape(encodeURIComponent(pdfDocument)));\r\n        }\r\n        return (\r\n          \"data:application/pdf;filename=\" +\r\n          options.filename +\r\n          \";base64,\" +\r\n          dataURI\r\n        );\r\n      case \"pdfobjectnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfObjectUrl =\r\n            \"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js\";\r\n          var integrity =\r\n            ' integrity=\"sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==\" crossorigin=\"anonymous\"';\r\n\r\n          if (options.pdfObjectUrl) {\r\n            pdfObjectUrl = options.pdfObjectUrl;\r\n            integrity = \"\";\r\n          }\r\n\r\n          var htmlForNewWindow =\r\n            \"<html>\" +\r\n            '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src=\"' +\r\n            pdfObjectUrl +\r\n            '\"' +\r\n            integrity +\r\n            '></script><script >PDFObject.embed(\"' +\r\n            this.output(\"dataurlstring\") +\r\n            '\", ' +\r\n            JSON.stringify(options) +\r\n            \");</script></body></html>\";\r\n          var nW = globalObject.open();\r\n\r\n          if (nW !== null) {\r\n            nW.document.write(htmlForNewWindow);\r\n          }\r\n          return nW;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfobjectnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"pdfjsnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfJsUrl = options.pdfJsUrl || \"examples/PDF.js/web/viewer.html\";\r\n          var htmlForPDFjsNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            '<body><iframe id=\"pdfViewer\" src=\"' +\r\n            pdfJsUrl +\r\n            \"?file=&downloadName=\" +\r\n            options.filename +\r\n            '\" width=\"500px\" height=\"400px\" />' +\r\n            \"</body></html>\";\r\n          var PDFjsNewWindow = globalObject.open();\r\n\r\n          if (PDFjsNewWindow !== null) {\r\n            PDFjsNewWindow.document.write(htmlForPDFjsNewWindow);\r\n            var scope = this;\r\n            PDFjsNewWindow.document.documentElement.querySelector(\r\n              \"#pdfViewer\"\r\n            ).onload = function() {\r\n              PDFjsNewWindow.document.title = options.filename;\r\n              PDFjsNewWindow.document.documentElement\r\n                .querySelector(\"#pdfViewer\")\r\n                .contentWindow.PDFViewerApplication.open(\r\n                  scope.output(\"bloburl\")\r\n                );\r\n            };\r\n          }\r\n          return PDFjsNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfjsnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"dataurlnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var htmlForDataURLNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            \"<body>\" +\r\n            '<iframe src=\"' +\r\n            this.output(\"datauristring\", options) +\r\n            '\"></iframe>' +\r\n            \"</body></html>\";\r\n          var dataURLNewWindow = globalObject.open();\r\n          if (dataURLNewWindow !== null) {\r\n            dataURLNewWindow.document.write(htmlForDataURLNewWindow);\r\n            dataURLNewWindow.document.title = options.filename;\r\n          }\r\n          if (dataURLNewWindow || typeof safari === \"undefined\")\r\n            return dataURLNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option dataurlnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauri\":\r\n      case \"dataurl\":\r\n        return (globalObject.document.location.href = this.output(\r\n          \"datauristring\",\r\n          options\r\n        ));\r\n      default:\r\n        return null;\r\n    }\r\n  }));\r\n\r\n  /**\r\n   * Used to see if a supplied hotfix was requested when the pdf instance was created.\r\n   * @param {string} hotfixName - The name of the hotfix to check.\r\n   * @returns {boolean}\r\n   */\r\n  var hasHotfix = function(hotfixName) {\r\n    return (\r\n      Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1\r\n    );\r\n  };\r\n\r\n  switch (unit) {\r\n    case \"pt\":\r\n      scaleFactor = 1;\r\n      break;\r\n    case \"mm\":\r\n      scaleFactor = 72 / 25.4;\r\n      break;\r\n    case \"cm\":\r\n      scaleFactor = 72 / 2.54;\r\n      break;\r\n    case \"in\":\r\n      scaleFactor = 72;\r\n      break;\r\n    case \"px\":\r\n      if (hasHotfix(\"px_scaling\") == true) {\r\n        scaleFactor = 72 / 96;\r\n      } else {\r\n        scaleFactor = 96 / 72;\r\n      }\r\n      break;\r\n    case \"pc\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"em\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"ex\":\r\n      scaleFactor = 6;\r\n      break;\r\n    default:\r\n      if (typeof unit === \"number\") {\r\n        scaleFactor = unit;\r\n      } else {\r\n        throw new Error(\"Invalid unit: \" + unit);\r\n      }\r\n  }\r\n\r\n  var encryption = null;\r\n  setCreationDate();\r\n  setFileId();\r\n\r\n  var getEncryptor = function(objectId) {\r\n    if (encryptionOptions !== null) {\r\n      return encryption.encryptor(objectId, 0);\r\n    }\r\n    return function(data) {\r\n      return data;\r\n    };\r\n  };\r\n\r\n  //---------------------------------------\r\n  // Public API\r\n\r\n  var getPageInfo = (API.__private__.getPageInfo = API.getPageInfo = function(\r\n    pageNumberOneBased\r\n  ) {\r\n    if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfo\");\r\n    }\r\n    var objId = pagesContext[pageNumberOneBased].objId;\r\n    return {\r\n      objId: objId,\r\n      pageNumber: pageNumberOneBased,\r\n      pageContext: pagesContext[pageNumberOneBased]\r\n    };\r\n  });\r\n\r\n  var getPageInfoByObjId = (API.__private__.getPageInfoByObjId = function(\r\n    objId\r\n  ) {\r\n    if (isNaN(objId) || objId % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfoByObjId\");\r\n    }\r\n    for (var pageNumber in pagesContext) {\r\n      if (pagesContext[pageNumber].objId === objId) {\r\n        break;\r\n      }\r\n    }\r\n    return getPageInfo(pageNumber);\r\n  });\r\n\r\n  var getCurrentPageInfo = (API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function() {\r\n    return {\r\n      objId: pagesContext[currentPage].objId,\r\n      pageNumber: currentPage,\r\n      pageContext: pagesContext[currentPage]\r\n    };\r\n  });\r\n\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @param format {String/Array} The format of the new page. Can be: <ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n   * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n   * @param orientation {string} Orientation of the new page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" (Default), \"l\").\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addPage\r\n   */\r\n  API.addPage = function() {\r\n    _addPage.apply(this, arguments);\r\n    return this;\r\n  };\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name setPage\r\n   * @param {number} page Switch the active page to the page number specified (indexed starting at 1).\r\n   * @example\r\n   * doc = jsPDF()\r\n   * doc.addPage()\r\n   * doc.addPage()\r\n   * doc.text('I am on page 3', 10, 10)\r\n   * doc.setPage(1)\r\n   * doc.text('I am on page 1', 10, 10)\r\n   */\r\n  API.setPage = function() {\r\n    _setPage.apply(this, arguments);\r\n    setOutputDestination.call(this, pages[currentPage]);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name insertPage\r\n   * @memberof jsPDF#\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {Object} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.insertPage = function(beforePage) {\r\n    this.addPage();\r\n    this.movePage(currentPage, beforePage);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name movePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {number} targetPage\r\n   * @param {number} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.movePage = function(targetPage, beforePage) {\r\n    var tmpPages, tmpPagesContext;\r\n    if (targetPage > beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var i = targetPage; i > beforePage; i--) {\r\n        pages[i] = pages[i - 1];\r\n        pagesContext[i] = pagesContext[i - 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    } else if (targetPage < beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var j = targetPage; j < beforePage; j++) {\r\n        pages[j] = pages[j + 1];\r\n        pagesContext[j] = pagesContext[j + 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Deletes a page from the PDF.\r\n   * @name deletePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @param {number} targetPage\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   */\r\n  API.deletePage = function() {\r\n    _deletePage.apply(this, arguments);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.\r\n   * @param {Object} [options] - Collection of settings signaling how the text must be encoded.\r\n   * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.\r\n   * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging\r\n   * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.\r\n   * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.\r\n   * @param {number} [options.charSpace=0] - The space between each letter.\r\n   * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.\r\n   * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.\r\n   * @param {Object} [options.flags] - Flags for to8bitStream.\r\n   * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.\r\n   * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.\r\n   * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.\r\n   * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.\r\n   * @param {boolean} [options.isInputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isInputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine\r\n   * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.\r\n   *\r\n   * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing\r\n   * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this\r\n   * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a\r\n   * DIFFERENT result. A matrix is only allowed in \"advanced\" API mode.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name text\r\n   */\r\n  API.__private__.text = API.text = function(text, x, y, options, transform) {\r\n    /*\r\n     * Inserts something like this into PDF\r\n     *   BT\r\n     *    /F1 16 Tf  % Font name + size\r\n     *    16 TL % How many units down for next line in multiline text\r\n     *    0 g % color\r\n     *    28.35 813.54 Td % position\r\n     *    (line one) Tj\r\n     *    T* (line two) Tj\r\n     *    T* (line three) Tj\r\n     *   ET\r\n     */\r\n    options = options || {};\r\n    var scope = options.scope || this;\r\n    var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, text, flags)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(data, coordinates... , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (\r\n      typeof text === \"number\" &&\r\n      typeof x === \"number\" &&\r\n      (typeof y === \"string\" || Array.isArray(y))\r\n    ) {\r\n      var tmp = y;\r\n      y = x;\r\n      x = text;\r\n      text = tmp;\r\n    }\r\n\r\n    var transformationMatrix;\r\n\r\n    if (arguments[3] instanceof Matrix === false) {\r\n      flags = arguments[3];\r\n      angle = arguments[4];\r\n      align = arguments[5];\r\n\r\n      if (typeof flags !== \"object\" || flags === null) {\r\n        if (typeof angle === \"string\") {\r\n          align = angle;\r\n          angle = null;\r\n        }\r\n        if (typeof flags === \"string\") {\r\n          align = flags;\r\n          flags = null;\r\n        }\r\n        if (typeof flags === \"number\") {\r\n          angle = flags;\r\n          flags = null;\r\n        }\r\n        options = {\r\n          flags: flags,\r\n          angle: angle,\r\n          align: align\r\n        };\r\n      }\r\n    } else {\r\n      advancedApiModeTrap(\r\n        \"The transform parameter of text() with a Matrix value\"\r\n      );\r\n      transformationMatrix = transform;\r\n    }\r\n\r\n    if (isNaN(x) || isNaN(y) || typeof text === \"undefined\" || text === null) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.text\");\r\n    }\r\n\r\n    if (text.length === 0) {\r\n      return scope;\r\n    }\r\n\r\n    var xtra = \"\";\r\n    var isHex = false;\r\n    var lineHeight =\r\n      typeof options.lineHeightFactor === \"number\"\r\n        ? options.lineHeightFactor\r\n        : lineHeightFactor;\r\n    var scaleFactor = scope.internal.scaleFactor;\r\n\r\n    function ESC(s) {\r\n      s = s.split(\"\\t\").join(Array(options.TabLen || 9).join(\" \"));\r\n      return pdfEscape(s, flags);\r\n    }\r\n\r\n    function transformTextToSpecialArray(text) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      var da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (typeof curDa === \"string\") {\r\n          da.push(curDa);\r\n        } else {\r\n          if (\r\n            Array.isArray(text) &&\r\n            (curDa.length === 1 ||\r\n              (curDa[1] === undefined && curDa[2] === undefined))\r\n          ) {\r\n            da.push(curDa[0]);\r\n          } else {\r\n            da.push([curDa[0], curDa[1], curDa[2]]);\r\n          }\r\n        }\r\n      }\r\n      return da;\r\n    }\r\n\r\n    function processTextByFunction(text, processingFunction) {\r\n      var result;\r\n      if (typeof text === \"string\") {\r\n        result = processingFunction(text)[0];\r\n      } else if (Array.isArray(text)) {\r\n        //we don't want to destroy original text array, so cloning it\r\n        var sa = text.concat();\r\n        var da = [];\r\n        var len = sa.length;\r\n        var curDa;\r\n        var tmpResult;\r\n        //we do array.join('text that must not be PDFescaped\")\r\n        //thus, pdfEscape each component separately\r\n        while (len--) {\r\n          curDa = sa.shift();\r\n          if (typeof curDa === \"string\") {\r\n            da.push(processingFunction(curDa)[0]);\r\n          } else if (Array.isArray(curDa) && typeof curDa[0] === \"string\") {\r\n            tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);\r\n            da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);\r\n          }\r\n        }\r\n        result = da;\r\n      }\r\n      return result;\r\n    }\r\n\r\n    //Check if text is of type String\r\n    var textIsOfTypeString = false;\r\n    var tmpTextIsOfTypeString = true;\r\n\r\n    if (typeof text === \"string\") {\r\n      textIsOfTypeString = true;\r\n    } else if (Array.isArray(text)) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (\r\n          typeof curDa !== \"string\" ||\r\n          (Array.isArray(curDa) && typeof curDa[0] !== \"string\")\r\n        ) {\r\n          tmpTextIsOfTypeString = false;\r\n        }\r\n      }\r\n      textIsOfTypeString = tmpTextIsOfTypeString;\r\n    }\r\n    if (textIsOfTypeString === false) {\r\n      throw new Error(\r\n        'Type of text must be string or Array. \"' +\r\n          text +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n\r\n    //If there are any newlines in text, we assume\r\n    //the user wanted to print multiple lines, so break the\r\n    //text up into an array. If the text is already an array,\r\n    //we assume the user knows what they are doing.\r\n    //Convert text into an array anyway to simplify\r\n    //later code.\r\n\r\n    if (typeof text === \"string\") {\r\n      if (text.match(/[\\r?\\n]/)) {\r\n        text = text.split(/\\r\\n|\\r|\\n/g);\r\n      } else {\r\n        text = [text];\r\n      }\r\n    }\r\n\r\n    //baseline\r\n    var height = activeFontSize / scope.internal.scaleFactor;\r\n    var descent = height * (lineHeight - 1);\r\n\r\n    switch (options.baseline) {\r\n      case \"bottom\":\r\n        y -= descent;\r\n        break;\r\n      case \"top\":\r\n        y += height - descent;\r\n        break;\r\n      case \"hanging\":\r\n        y += height - 2 * descent;\r\n        break;\r\n      case \"middle\":\r\n        y += height / 2 - descent;\r\n        break;\r\n      case \"ideographic\":\r\n      case \"alphabetic\":\r\n      default:\r\n        // do nothing, everything is fine\r\n        break;\r\n    }\r\n\r\n    //multiline\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    if (maxWidth > 0) {\r\n      if (typeof text === \"string\") {\r\n        text = scope.splitTextToSize(text, maxWidth);\r\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n        text = text.reduce(function(acc, textLine) {\r\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\r\n        }, []);\r\n      }\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"preProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    options = payload.options;\r\n\r\n    //angle\r\n    angle = options.angle;\r\n\r\n    if (\r\n      transformationMatrix instanceof Matrix === false &&\r\n      angle &&\r\n      typeof angle === \"number\"\r\n    ) {\r\n      angle *= Math.PI / 180;\r\n\r\n      if (options.rotationDirection === 0) {\r\n        angle = -angle;\r\n      }\r\n\r\n      if (apiMode === ApiMode.ADVANCED) {\r\n        angle = -angle;\r\n      }\r\n\r\n      var c = Math.cos(angle);\r\n      var s = Math.sin(angle);\r\n      transformationMatrix = new Matrix(c, s, -s, c, 0, 0);\r\n    } else if (angle && angle instanceof Matrix) {\r\n      transformationMatrix = angle;\r\n    }\r\n\r\n    if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {\r\n      transformationMatrix = identityMatrix;\r\n    }\r\n\r\n    //charSpace\r\n\r\n    charSpace = options.charSpace || activeCharSpace;\r\n\r\n    if (typeof charSpace !== \"undefined\") {\r\n      xtra += hpf(scale(charSpace)) + \" Tc\\n\";\r\n      this.setCharSpace(this.getCharSpace() || 0);\r\n    }\r\n\r\n    horizontalScale = options.horizontalScale;\r\n    if (typeof horizontalScale !== \"undefined\") {\r\n      xtra += hpf(horizontalScale * 100) + \" Tz\\n\";\r\n    }\r\n\r\n    //lang\r\n\r\n    var lang = options.lang;\r\n\r\n    if (lang) {\r\n      //    xtra += \"/Lang (\" + lang +\")\\n\";\r\n    }\r\n\r\n    //renderingMode\r\n    var renderingMode = -1;\r\n    var parmRenderingMode =\r\n      typeof options.renderingMode !== \"undefined\"\r\n        ? options.renderingMode\r\n        : options.stroke;\r\n    var pageContext = scope.internal.getCurrentPageInfo().pageContext;\r\n\r\n    switch (parmRenderingMode) {\r\n      case 0:\r\n      case false:\r\n      case \"fill\":\r\n        renderingMode = 0;\r\n        break;\r\n      case 1:\r\n      case true:\r\n      case \"stroke\":\r\n        renderingMode = 1;\r\n        break;\r\n      case 2:\r\n      case \"fillThenStroke\":\r\n        renderingMode = 2;\r\n        break;\r\n      case 3:\r\n      case \"invisible\":\r\n        renderingMode = 3;\r\n        break;\r\n      case 4:\r\n      case \"fillAndAddForClipping\":\r\n        renderingMode = 4;\r\n        break;\r\n      case 5:\r\n      case \"strokeAndAddPathForClipping\":\r\n        renderingMode = 5;\r\n        break;\r\n      case 6:\r\n      case \"fillThenStrokeAndAddToPathForClipping\":\r\n        renderingMode = 6;\r\n        break;\r\n      case 7:\r\n      case \"addToPathForClipping\":\r\n        renderingMode = 7;\r\n        break;\r\n    }\r\n\r\n    var usedRenderingMode =\r\n      typeof pageContext.usedRenderingMode !== \"undefined\"\r\n        ? pageContext.usedRenderingMode\r\n        : -1;\r\n\r\n    //if the coder wrote it explicitly to use a specific\r\n    //renderingMode, then use it\r\n    if (renderingMode !== -1) {\r\n      xtra += renderingMode + \" Tr\\n\";\r\n      //otherwise check if we used the rendering Mode already\r\n      //if so then set the rendering Mode...\r\n    } else if (usedRenderingMode !== -1) {\r\n      xtra += \"0 Tr\\n\";\r\n    }\r\n\r\n    if (renderingMode !== -1) {\r\n      pageContext.usedRenderingMode = renderingMode;\r\n    }\r\n\r\n    //align\r\n    align = options.align || \"left\";\r\n    var leading = activeFontSize * lineHeight;\r\n    var pageWidth = scope.internal.pageSize.getWidth();\r\n    var activeFont = fonts[activeFontKey];\r\n    charSpace = options.charSpace || activeCharSpace;\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    var lineWidths;\r\n    flags = Object.assign({ autoencode: true, noBOM: true }, options.flags);\r\n\r\n    var wordSpacingPerLine = [];\r\n    var findWidth = function(v) {\r\n      return (\r\n        (scope.getStringUnitWidth(v, {\r\n          font: activeFont,\r\n          charSpace: charSpace,\r\n          fontSize: activeFontSize,\r\n          doKerning: false\r\n        }) *\r\n          activeFontSize) /\r\n        scaleFactor\r\n      );\r\n    };\r\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n      da = transformTextToSpecialArray(text);\r\n      var newY;\r\n      if (align !== \"left\") {\r\n        lineWidths = da.map(findWidth);\r\n      }\r\n      //The first line uses the \"main\" Td setting,\r\n      //and the subsequent lines are offset by the\r\n      //previous line's x coordinate.\r\n      var prevWidth = 0;\r\n      var newX;\r\n      if (align === \"right\") {\r\n        //The passed in x coordinate defines the\r\n        //rightmost point of the text.\r\n        x -= lineWidths[0];\r\n        text = [];\r\n        len = da.length;\r\n        for (var i = 0; i < len; i++) {\r\n          if (i === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale(prevWidth - lineWidths[i]);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[i], newX, newY]);\r\n          prevWidth = lineWidths[i];\r\n        }\r\n      } else if (align === \"center\") {\r\n        //The passed in x coordinate defines\r\n        //the center point.\r\n        x -= lineWidths[0] / 2;\r\n        text = [];\r\n        len = da.length;\r\n        for (var j = 0; j < len; j++) {\r\n          if (j === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale((prevWidth - lineWidths[j]) / 2);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[j], newX, newY]);\r\n          prevWidth = lineWidths[j];\r\n        }\r\n      } else if (align === \"left\") {\r\n        text = [];\r\n        len = da.length;\r\n        for (var h = 0; h < len; h++) {\r\n          text.push(da[h]);\r\n        }\r\n      } else if (align === \"justify\" && activeFont.encoding === \"Identity-H\") {\r\n        // when using unicode fonts, wordSpacePerLine does not apply\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        let backToStartX = 0;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : backToStartX;\r\n          if (l < len - 1) {\r\n            let spacing = scale(\r\n              (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n            );\r\n            let words = da[l].split(\" \");\r\n            text.push([words[0] + \" \", newX, newY]);\r\n            backToStartX = 0; // distance to reset back to the left\r\n            for (let i = 1; i < words.length; i++) {\r\n              let shiftAmount =\r\n                (findWidth(words[i - 1] + \" \" + words[i]) -\r\n                  findWidth(words[i])) *\r\n                  scaleFactor +\r\n                spacing;\r\n              if (i == words.length - 1) text.push([words[i], shiftAmount, 0]);\r\n              else text.push([words[i] + \" \", shiftAmount, 0]);\r\n              backToStartX -= shiftAmount;\r\n            }\r\n          } else {\r\n            text.push([da[l], newX, newY]);\r\n          }\r\n        }\r\n        text.push([\"\", backToStartX, 0]);\r\n      } else if (align === \"justify\") {\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : 0;\r\n          if (l < len - 1) {\r\n            wordSpacingPerLine.push(\r\n              hpf(\r\n                scale(\r\n                  (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n                )\r\n              )\r\n            );\r\n          } else {\r\n            wordSpacingPerLine.push(0);\r\n          }\r\n          text.push([da[l], newX, newY]);\r\n        }\r\n      } else {\r\n        throw new Error(\r\n          'Unrecognized alignment option, use \"left\", \"center\", \"right\" or \"justify\".'\r\n        );\r\n      }\r\n    }\r\n\r\n    //R2L\r\n    var doReversing = typeof options.R2L === \"boolean\" ? options.R2L : R2L;\r\n    if (doReversing === true) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [\r\n          text\r\n            .split(\"\")\r\n            .reverse()\r\n            .join(\"\"),\r\n          posX,\r\n          posY\r\n        ];\r\n      });\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"postProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    isHex = payload.mutex.isHex || false;\r\n\r\n    //Escaping\r\n    var activeFontEncoding = fonts[activeFontKey].encoding;\r\n\r\n    if (\r\n      activeFontEncoding === \"WinAnsiEncoding\" ||\r\n      activeFontEncoding === \"StandardEncoding\"\r\n    ) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [ESC(text), posX, posY];\r\n      });\r\n    }\r\n\r\n    da = transformTextToSpecialArray(text);\r\n\r\n    text = [];\r\n    var STRING = 0;\r\n    var ARRAY = 1;\r\n    var variant = Array.isArray(da[0]) ? ARRAY : STRING;\r\n    var posX;\r\n    var posY;\r\n    var content;\r\n    var wordSpacing = \"\";\r\n\r\n    var generatePosition = function(\r\n      parmPosX,\r\n      parmPosY,\r\n      parmTransformationMatrix\r\n    ) {\r\n      var position = \"\";\r\n      if (parmTransformationMatrix instanceof Matrix) {\r\n        // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y\r\n        // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied\r\n        // in the coordinate system established by this matrix\r\n        if (typeof options.angle === \"number\") {\r\n          parmTransformationMatrix = matrixMult(\r\n            parmTransformationMatrix,\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY)\r\n          );\r\n        } else {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        if (apiMode === ApiMode.ADVANCED) {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, -1, 0, 0),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        position = parmTransformationMatrix.join(\" \") + \" Tm\\n\";\r\n      } else {\r\n        position = hpf(parmPosX) + \" \" + hpf(parmPosY) + \" Td\\n\";\r\n      }\r\n      return position;\r\n    };\r\n\r\n    for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {\r\n      wordSpacing = \"\";\r\n\r\n      switch (variant) {\r\n        case ARRAY:\r\n          content =\r\n            (isHex ? \"<\" : \"(\") + da[lineIndex][0] + (isHex ? \">\" : \")\");\r\n          posX = parseFloat(da[lineIndex][1]);\r\n          posY = parseFloat(da[lineIndex][2]);\r\n          break;\r\n        case STRING:\r\n          content = (isHex ? \"<\" : \"(\") + da[lineIndex] + (isHex ? \">\" : \")\");\r\n          posX = getHorizontalCoordinate(x);\r\n          posY = getVerticalCoordinate(y);\r\n          break;\r\n      }\r\n\r\n      if (\r\n        typeof wordSpacingPerLine !== \"undefined\" &&\r\n        typeof wordSpacingPerLine[lineIndex] !== \"undefined\"\r\n      ) {\r\n        wordSpacing = wordSpacingPerLine[lineIndex] + \" Tw\\n\";\r\n      }\r\n\r\n      if (lineIndex === 0) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      } else if (variant === STRING) {\r\n        text.push(wordSpacing + content);\r\n      } else if (variant === ARRAY) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      }\r\n    }\r\n\r\n    text = variant === STRING ? text.join(\" Tj\\nT* \") : text.join(\" Tj\\n\");\r\n    text += \" Tj\\n\";\r\n\r\n    var result = \"BT\\n/\";\r\n    result += activeFontKey + \" \" + activeFontSize + \" Tf\\n\"; // font face, style, size\r\n    result += hpf(activeFontSize * lineHeight) + \" TL\\n\"; // line spacing\r\n    result += textColor + \"\\n\";\r\n    result += xtra;\r\n    result += text;\r\n    result += \"ET\";\r\n\r\n    out(result);\r\n    usedFonts[activeFontKey] = true;\r\n    return scope;\r\n  };\r\n\r\n  // PDF supports these path painting and clip path operators:\r\n  //\r\n  // S - stroke\r\n  // s - close/stroke\r\n  // f (F) - fill non-zero\r\n  // f* - fill evenodd\r\n  // B - fill stroke nonzero\r\n  // B* - fill stroke evenodd\r\n  // b - close fill stroke nonzero\r\n  // b* - close fill stroke evenodd\r\n  // n - nothing (consume path)\r\n  // W - clip nonzero\r\n  // W* - clip evenodd\r\n  //\r\n  // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()\r\n  // method.\r\n  /**\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @instance\r\n   * @param {string} rule Only possible value is 'evenodd'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description All .clip() after calling drawing ops with a style argument of null.\r\n   */\r\n  var clip = (API.__private__.clip = API.clip = function(rule) {\r\n    // Call .clip() after calling drawing ops with a style argument of null\r\n    // W is the PDF clipping op\r\n    if (\"evenodd\" === rule) {\r\n      out(\"W*\");\r\n    } else {\r\n      out(\"W\");\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * @name clipEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note\r\n   * that this will NOT consume the current path. In order to only use this path for clipping call\r\n   * {@link API.discardPath} afterwards.\r\n   */\r\n  API.clipEvenOdd = function() {\r\n    return clip(\"evenodd\");\r\n  };\r\n\r\n  /**\r\n   * Consumes the current path without any effect. Mainly used in combination with {@link clip} or\r\n   * {@link clipEvenOdd}. The PDF \"n\" operator.\r\n   * @name discardPath\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.discardPath = API.discardPath = function() {\r\n    out(\"n\");\r\n    return this;\r\n  };\r\n\r\n  var isValidStyle = (API.__private__.isValidStyle = function(style) {\r\n    var validStyleVariants = [\r\n      undefined,\r\n      null,\r\n      \"S\",\r\n      \"D\",\r\n      \"F\",\r\n      \"DF\",\r\n      \"FD\",\r\n      \"f\",\r\n      \"f*\",\r\n      \"B\",\r\n      \"B*\",\r\n      \"n\"\r\n    ];\r\n    var result = false;\r\n    if (validStyleVariants.indexOf(style) !== -1) {\r\n      result = true;\r\n    }\r\n    return result;\r\n  });\r\n\r\n  API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function(\r\n    operator\r\n  ) {\r\n    if (isValidStyle(operator)) {\r\n      defaultPathOperation = operator;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  var getStyle = (API.__private__.getStyle = API.getStyle = function(style) {\r\n    // see path-painting operators in PDF spec\r\n    var op = defaultPathOperation; // stroke\r\n\r\n    switch (style) {\r\n      case \"D\":\r\n      case \"S\":\r\n        op = \"S\"; // stroke\r\n        break;\r\n      case \"F\":\r\n        op = \"f\"; // fill\r\n        break;\r\n      case \"FD\":\r\n      case \"DF\":\r\n        op = \"B\";\r\n        break;\r\n      case \"f\":\r\n      case \"f*\":\r\n      case \"B\":\r\n      case \"B*\":\r\n        /*\r\n               Allow direct use of these PDF path-painting operators:\r\n               - f    fill using nonzero winding number rule\r\n               - f*    fill using even-odd rule\r\n               - B    fill then stroke with fill using non-zero winding number rule\r\n               - B*    fill then stroke with fill using even-odd rule\r\n               */\r\n        op = style;\r\n        break;\r\n    }\r\n    return op;\r\n  });\r\n\r\n  /**\r\n   * Close the current path. The PDF \"h\" operator.\r\n   * @name close\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  var close = (API.close = function() {\r\n    out(\"h\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Stroke the path. The PDF \"S\" operator.\r\n   * @name stroke\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.stroke = function() {\r\n    out(\"S\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled\r\n   * with this pattern, otherwise with the current fill color. Equivalent to the PDF \"f\" operator.\r\n   * @name fill\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fill = function(pattern) {\r\n    fillWithOptionalPattern(\"f\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the even-odd rule. The PDF f* operator.\r\n   * @see API.fill\r\n   * @name fillEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"f*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the nonzero winding number rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStroke\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStroke = function(pattern) {\r\n    fillWithOptionalPattern(\"B\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the even-odd rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStrokeEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStrokeEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"B*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  var fillWithOptionalPattern = function(style, pattern) {\r\n    if (typeof pattern === \"object\") {\r\n      fillWithPattern(pattern, style);\r\n    } else {\r\n      out(style);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    if (\r\n      style === null ||\r\n      (apiMode === ApiMode.ADVANCED && style === undefined)\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    style = getStyle(style);\r\n\r\n    // stroking / filling / both the path\r\n    out(style);\r\n  };\r\n\r\n  function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {\r\n    var clone = new TilingPattern(\r\n      boundingBox || this.boundingBox,\r\n      xStep || this.xStep,\r\n      yStep || this.yStep,\r\n      this.gState,\r\n      matrix || this.matrix\r\n    );\r\n    clone.stream = this.stream;\r\n    var key = patternKey + \"$$\" + this.cloneIndex++ + \"$$\";\r\n    addPattern(key, clone);\r\n    return clone;\r\n  }\r\n\r\n  var fillWithPattern = function(patternData, style) {\r\n    var patternId = patternMap[patternData.key];\r\n    var pattern = patterns[patternId];\r\n\r\n    if (pattern instanceof ShadingPattern) {\r\n      out(\"q\");\r\n\r\n      out(clipRuleFromStyle(style));\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n      out(patternData.matrix.toString() + \" cm\");\r\n      out(\"/\" + patternId + \" sh\");\r\n      out(\"Q\");\r\n    } else if (pattern instanceof TilingPattern) {\r\n      // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,\r\n      // so we must flip them\r\n      var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());\r\n\r\n      if (patternData.matrix) {\r\n        matrix = matrix.multiply(patternData.matrix || identityMatrix);\r\n        // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances\r\n        // for each use\r\n        patternId = cloneTilingPattern.call(\r\n          pattern,\r\n          patternData.key,\r\n          patternData.boundingBox,\r\n          patternData.xStep,\r\n          patternData.yStep,\r\n          matrix\r\n        ).id;\r\n      }\r\n\r\n      out(\"q\");\r\n      out(\"/Pattern cs\");\r\n      out(\"/\" + patternId + \" scn\");\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n\r\n      out(style);\r\n      out(\"Q\");\r\n    }\r\n  };\r\n\r\n  var clipRuleFromStyle = function(style) {\r\n    switch (style) {\r\n      case \"f\":\r\n      case \"F\":\r\n        return \"W n\";\r\n      case \"f*\":\r\n        return \"W* n\";\r\n      case \"B\":\r\n        return \"W S\";\r\n      case \"B*\":\r\n        return \"W* S\";\r\n\r\n      // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern\r\n      // and \"n\"/\"S\" as style would still fill/fill and stroke the path)\r\n      case \"S\":\r\n        return \"W S\";\r\n      case \"n\":\r\n        return \"W n\";\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Begin a new subpath by moving the current point to coordinates (x, y). The PDF \"m\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @name moveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var moveTo = (API.moveTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" m\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a straight line segment from the current point to the point (x, y). The PDF \"l\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @memberof jsPDF#\r\n   * @name lineTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var lineTo = (API.lineTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" l\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point\r\n   * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {number} x3\r\n   * @param {number} y3\r\n   * @memberof jsPDF#\r\n   * @name curveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var curveTo = (API.curveTo = function(x1, y1, x2, y2, x3, y3) {\r\n    out(\r\n      [\r\n        hpf(scale(x1)),\r\n        hpf(transformScaleY(y1)),\r\n        hpf(scale(x2)),\r\n        hpf(transformScaleY(y2)),\r\n        hpf(scale(x3)),\r\n        hpf(transformScaleY(y3)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Draw a line on the current page.\r\n   *\r\n   * @name line\r\n   * @function\r\n   * @instance\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {string} style A string specifying the painting style or null.  Valid styles include: 'S' [default] - stroke, 'F' - fill,  and 'DF' (or 'FD') -  fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.line = API.line = function(x1, y1, x2, y2, style) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.line\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || \"S\");\r\n    } else {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @typedef {Object} PatternData\r\n   * {Matrix|undefined} matrix\r\n   * {Number|undefined} xStep\r\n   * {Number|undefined} yStep\r\n   * {Array.<Number>|undefined} boundingBox\r\n   */\r\n\r\n  /**\r\n   * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.\r\n   * All data points in `lines` are relative to last line origin.\r\n   * `x`, `y` become x1,y1 for first line / curve in the set.\r\n   * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.\r\n   * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.\r\n   *\r\n   * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line\r\n   * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name lines\r\n   */\r\n  API.__private__.lines = API.lines = function(\r\n    lines,\r\n    x,\r\n    y,\r\n    scale,\r\n    style,\r\n    closed\r\n  ) {\r\n    var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(content, coordinateX, coordinateY , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (typeof lines === \"number\") {\r\n      tmp = y;\r\n      y = x;\r\n      x = lines;\r\n      lines = tmp;\r\n    }\r\n\r\n    scale = scale || [1, 1];\r\n    closed = closed || false;\r\n\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      !Array.isArray(lines) ||\r\n      !Array.isArray(scale) ||\r\n      !isValidStyle(style) ||\r\n      typeof closed !== \"boolean\"\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.lines\");\r\n    }\r\n\r\n    // starting point\r\n    moveTo(x, y);\r\n\r\n    scalex = scale[0];\r\n    scaley = scale[1];\r\n    l = lines.length;\r\n    //, x2, y2 // bezier only. In page default measurement \"units\", *after* scaling\r\n    //, x3, y3 // bezier only. In page default measurement \"units\", *after* scaling\r\n    // ending point for all, lines and bezier. . In page default measurement \"units\", *after* scaling\r\n    x4 = x; // last / ending point = starting point for first item.\r\n    y4 = y; // last / ending point = starting point for first item.\r\n\r\n    for (i = 0; i < l; i++) {\r\n      leg = lines[i];\r\n      if (leg.length === 2) {\r\n        // simple line\r\n        x4 = leg[0] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[1] * scaley + y4; // here last y4 was prior ending point\r\n        lineTo(x4, y4);\r\n      } else {\r\n        // bezier curve\r\n        x2 = leg[0] * scalex + x4; // here last x4 is prior ending point\r\n        y2 = leg[1] * scaley + y4; // here last y4 is prior ending point\r\n        x3 = leg[2] * scalex + x4; // here last x4 is prior ending point\r\n        y3 = leg[3] * scaley + y4; // here last y4 is prior ending point\r\n        x4 = leg[4] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[5] * scaley + y4; // here last y4 was prior ending point\r\n        curveTo(x2, y2, x3, y3, x4, y4);\r\n      }\r\n    }\r\n\r\n    if (closed) {\r\n      close();\r\n    }\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.\r\n   * @param {Array<Object>} lines An array of {op: operator, c: coordinates} object, where op is one of \"m\" (move to), \"l\" (line to)\r\n   * \"c\" (cubic bezier curve) and \"h\" (close (sub)path)). c is an array of coordinates. \"m\" and \"l\" expect two, \"c\"\r\n   * six and \"h\" an empty array (or undefined).\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name path\r\n   */\r\n  API.path = function(lines) {\r\n    for (var i = 0; i < lines.length; i++) {\r\n      var leg = lines[i];\r\n      var coords = leg.c;\r\n      switch (leg.op) {\r\n        case \"m\":\r\n          moveTo(coords[0], coords[1]);\r\n          break;\r\n        case \"l\":\r\n          lineTo(coords[0], coords[1]);\r\n          break;\r\n        case \"c\":\r\n          curveTo.apply(this, coords);\r\n          break;\r\n        case \"h\":\r\n          close();\r\n          break;\r\n      }\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name rect\r\n   */\r\n  API.__private__.rect = API.rect = function(x, y, w, h, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.rect\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      h = -h;\r\n    }\r\n\r\n    out(\r\n      [\r\n        hpf(scale(x)),\r\n        hpf(transformScaleY(y)),\r\n        hpf(scale(w)),\r\n        hpf(scale(h)),\r\n        \"re\"\r\n      ].join(\" \")\r\n    );\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a triangle to PDF.\r\n   *\r\n   * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name triangle\r\n   */\r\n  API.__private__.triangle = API.triangle = function(\r\n    x1,\r\n    y1,\r\n    x2,\r\n    y2,\r\n    x3,\r\n    y3,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      isNaN(x3) ||\r\n      isNaN(y3) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.triangle\");\r\n    }\r\n    this.lines(\r\n      [\r\n        [x2 - x1, y2 - y1], // vector to point 2\r\n        [x3 - x2, y3 - y2], // vector to point 3\r\n        [x1 - x3, y1 - y3] // closing vector back to point 1\r\n      ],\r\n      x1,\r\n      y1, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle with rounded corners to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name roundedRect\r\n   */\r\n  API.__private__.roundedRect = API.roundedRect = function(\r\n    x,\r\n    y,\r\n    w,\r\n    h,\r\n    rx,\r\n    ry,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(w) ||\r\n      isNaN(h) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.roundedRect\");\r\n    }\r\n    var MyArc = (4 / 3) * (Math.SQRT2 - 1);\r\n\r\n    rx = Math.min(rx, w * 0.5);\r\n    ry = Math.min(ry, h * 0.5);\r\n\r\n    this.lines(\r\n      [\r\n        [w - 2 * rx, 0],\r\n        [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry],\r\n        [0, h - 2 * ry],\r\n        [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry],\r\n        [-w + 2 * rx, 0],\r\n        [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry],\r\n        [0, -h + 2 * ry],\r\n        [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]\r\n      ],\r\n      x + rx,\r\n      y, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an ellipse to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name ellipse\r\n   */\r\n  API.__private__.ellipse = API.ellipse = function(x, y, rx, ry, style) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.ellipse\");\r\n    }\r\n    var lx = (4 / 3) * (Math.SQRT2 - 1) * rx,\r\n      ly = (4 / 3) * (Math.SQRT2 - 1) * ry;\r\n\r\n    moveTo(x + rx, y);\r\n    curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);\r\n    curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);\r\n    curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);\r\n    curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an circle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} r Radius (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name circle\r\n   */\r\n  API.__private__.circle = API.circle = function(x, y, r, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.circle\");\r\n    }\r\n    return this.ellipse(x, y, r, r, style);\r\n  };\r\n\r\n  /**\r\n   * Sets text font face, variant for upcoming text elements.\r\n   * See output of jsPDF.getFontList() for possible font names, styles.\r\n   *\r\n   * @param {string} fontName Font name or family. Example: \"times\".\r\n   * @param {string} fontStyle Font style or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFont\r\n   */\r\n  API.setFont = function(fontName, fontStyle, fontWeight) {\r\n    if (fontWeight) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    activeFontKey = getFont(fontName, fontStyle, {\r\n      disableWarning: false\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets text font face, variant for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {Object}\r\n   * @memberof jsPDF#\r\n   * @name getFont\r\n   */\r\n  var getFontEntry = (API.__private__.getFont = API.getFont = function() {\r\n    return fonts[getFont.apply(API, arguments)];\r\n  });\r\n\r\n  /**\r\n   * Returns an object - a tree of fontName to fontStyle relationships available to\r\n   * active PDF document.\r\n   *\r\n   * @public\r\n   * @function\r\n   * @instance\r\n   * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }\r\n   * @memberof jsPDF#\r\n   * @name getFontList\r\n   */\r\n  API.__private__.getFontList = API.getFontList = function() {\r\n    var list = {},\r\n      fontName,\r\n      fontStyle;\r\n\r\n    for (fontName in fontmap) {\r\n      if (fontmap.hasOwnProperty(fontName)) {\r\n        list[fontName] = [];\r\n        for (fontStyle in fontmap[fontName]) {\r\n          if (fontmap[fontName].hasOwnProperty(fontStyle)) {\r\n            list[fontName].push(fontStyle);\r\n          }\r\n        }\r\n      }\r\n    }\r\n    return list;\r\n  };\r\n\r\n  /**\r\n   * Add a custom font to the current instance.\r\n   *\r\n   * @param {string} postScriptName PDF specification full name for the font.\r\n   * @param {string} id PDF-document-instance-specific label assinged to the font.\r\n   * @param {string} fontStyle Style of the Font.\r\n   * @param {number | string} fontWeight Weight of the Font.\r\n   * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @name addFont\r\n   * @returns {string} fontId\r\n   */\r\n  API.addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    fontWeight,\r\n    encoding\r\n  ) {\r\n    var encodingOptions = [\r\n      \"StandardEncoding\",\r\n      \"MacRomanEncoding\",\r\n      \"Identity-H\",\r\n      \"WinAnsiEncoding\"\r\n    ];\r\n    if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {\r\n      //IE 11 fix\r\n      encoding = arguments[3];\r\n    } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    encoding = encoding || \"Identity-H\";\r\n    return addFont.call(this, postScriptName, fontName, fontStyle, encoding);\r\n  };\r\n\r\n  var lineWidth = options.lineWidth || 0.200025; // 2mm\r\n  /**\r\n   * Gets the line width, default: 0.200025.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineWidth\r\n   * @memberof jsPDF#\r\n   * @name getLineWidth\r\n   */\r\n  var getLineWidth = (API.__private__.getLineWidth = API.getLineWidth = function() {\r\n    return lineWidth;\r\n  });\r\n\r\n  /**\r\n   * Sets line width for upcoming lines.\r\n   *\r\n   * @param {number} width Line width (in units declared at inception of PDF document).\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineWidth\r\n   */\r\n  var setLineWidth = (API.__private__.setLineWidth = API.setLineWidth = function(\r\n    width\r\n  ) {\r\n    lineWidth = width;\r\n    out(hpf(scale(width)) + \" w\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Sets the dash pattern for upcoming lines.\r\n   *\r\n   * To reset the settings simply call the method without any parameters.\r\n   * @param {Array<number>} dashArray An array containing 0-2 numbers. The first number sets the length of the\r\n   * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered\r\n   * to be as long as the dashes. An empty array means solid, unbroken lines.\r\n   * @param {number} dashPhase The phase lines start with.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineDashPattern\r\n   */\r\n  API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function(\r\n    dashArray,\r\n    dashPhase\r\n  ) {\r\n    dashArray = dashArray || [];\r\n    dashPhase = dashPhase || 0;\r\n\r\n    if (isNaN(dashPhase) || !Array.isArray(dashArray)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setLineDash\");\r\n    }\r\n\r\n    dashArray = dashArray\r\n      .map(function(x) {\r\n        return hpf(scale(x));\r\n      })\r\n      .join(\" \");\r\n    dashPhase = hpf(scale(dashPhase));\r\n\r\n    out(\"[\" + dashArray + \"] \" + dashPhase + \" d\");\r\n    return this;\r\n  };\r\n\r\n  var lineHeightFactor;\r\n\r\n  var getLineHeight = (API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  });\r\n\r\n  API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  };\r\n\r\n  /**\r\n   * Sets the LineHeightFactor of proportion.\r\n   *\r\n   * @param {number} value LineHeightFactor value. Default: 1.15.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineHeightFactor\r\n   */\r\n  var setLineHeightFactor = (API.__private__.setLineHeightFactor = API.setLineHeightFactor = function(\r\n    value\r\n  ) {\r\n    value = value || 1.15;\r\n    if (typeof value === \"number\") {\r\n      lineHeightFactor = value;\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Gets the LineHeightFactor, default: 1.15.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineHeightFactor\r\n   * @memberof jsPDF#\r\n   * @name getLineHeightFactor\r\n   */\r\n  var getLineHeightFactor = (API.__private__.getLineHeightFactor = API.getLineHeightFactor = function() {\r\n    return lineHeightFactor;\r\n  });\r\n\r\n  setLineHeightFactor(options.lineHeight);\r\n\r\n  var getHorizontalCoordinate = (API.__private__.getHorizontalCoordinate = function(\r\n    value\r\n  ) {\r\n    return scale(value);\r\n  });\r\n\r\n  var getVerticalCoordinate = (API.__private__.getVerticalCoordinate = function(\r\n    value\r\n  ) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      return value;\r\n    } else {\r\n      var pageHeight =\r\n        pagesContext[currentPage].mediaBox.topRightY -\r\n        pagesContext[currentPage].mediaBox.bottomLeftY;\r\n      return pageHeight - scale(value);\r\n    }\r\n  });\r\n\r\n  var getHorizontalCoordinateString = (API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getHorizontalCoordinate(value));\r\n  });\r\n\r\n  var getVerticalCoordinateString = (API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getVerticalCoordinate(value));\r\n  });\r\n\r\n  var strokeColor = options.strokeColor || \"0 G\";\r\n\r\n  /**\r\n   *  Gets the stroke color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getDrawColor\r\n   */\r\n  API.__private__.getStrokeColor = API.getDrawColor = function() {\r\n    return decodeColorString(strokeColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the stroke color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDrawColor\r\n   */\r\n  API.__private__.setStrokeColor = API.setDrawColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"draw\",\r\n      precision: 2\r\n    };\r\n\r\n    strokeColor = encodeColorString(options);\r\n    out(strokeColor);\r\n    return this;\r\n  };\r\n\r\n  var fillColor = options.fillColor || \"0 g\";\r\n\r\n  /**\r\n   * Gets the fill color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getFillColor\r\n   */\r\n  API.__private__.getFillColor = API.getFillColor = function() {\r\n    return decodeColorString(fillColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the fill color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFillColor\r\n   */\r\n  API.__private__.setFillColor = API.setFillColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"fill\",\r\n      precision: 2\r\n    };\r\n\r\n    fillColor = encodeColorString(options);\r\n    out(fillColor);\r\n    return this;\r\n  };\r\n\r\n  var textColor = options.textColor || \"0 g\";\r\n  /**\r\n   * Gets the text color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getTextColor\r\n   */\r\n  var getTextColor = (API.__private__.getTextColor = API.getTextColor = function() {\r\n    return decodeColorString(textColor);\r\n  });\r\n  /**\r\n   * Sets the text color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setTextColor\r\n   */\r\n  API.__private__.setTextColor = API.setTextColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"text\",\r\n      precision: 3\r\n    };\r\n    textColor = encodeColorString(options);\r\n\r\n    return this;\r\n  };\r\n\r\n  var activeCharSpace = options.charSpace;\r\n\r\n  /**\r\n   * Get global value of CharSpace.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} charSpace\r\n   * @memberof jsPDF#\r\n   * @name getCharSpace\r\n   */\r\n  var getCharSpace = (API.__private__.getCharSpace = API.getCharSpace = function() {\r\n    return parseFloat(activeCharSpace || 0);\r\n  });\r\n\r\n  /**\r\n   * Set global value of CharSpace.\r\n   *\r\n   * @param {number} charSpace\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setCharSpace\r\n   */\r\n  API.__private__.setCharSpace = API.setCharSpace = function(charSpace) {\r\n    if (isNaN(charSpace)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCharSpace\");\r\n    }\r\n    activeCharSpace = charSpace;\r\n    return this;\r\n  };\r\n\r\n  var lineCapID = 0;\r\n  /**\r\n   * Is an Object providing a mapping from human-readable to\r\n   * integer flag values designating the varieties of line cap\r\n   * and join styles.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name CapJoinStyles\r\n   */\r\n  API.CapJoinStyles = {\r\n    0: 0,\r\n    butt: 0,\r\n    but: 0,\r\n    miter: 0,\r\n    1: 1,\r\n    round: 1,\r\n    rounded: 1,\r\n    circle: 1,\r\n    2: 2,\r\n    projecting: 2,\r\n    project: 2,\r\n    square: 2,\r\n    bevel: 2\r\n  };\r\n\r\n  /**\r\n   * Sets the line cap styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line cap.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineCap\r\n   */\r\n  API.__private__.setLineCap = API.setLineCap = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line cap style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineCapID = id;\r\n    out(id + \" J\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var lineJoinID = 0;\r\n  /**\r\n   * Sets the line join styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line join.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineJoin\r\n   */\r\n  API.__private__.setLineJoin = API.setLineJoin = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line join style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineJoinID = id;\r\n    out(id + \" j\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var miterLimit;\r\n  /**\r\n   * Sets the miterLimit property, which effects the maximum miter length.\r\n   *\r\n   * @param {number} length The length of the miter\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineMiterLimit\r\n   */\r\n  API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function(\r\n    length\r\n  ) {\r\n    length = length || 0;\r\n    if (isNaN(length)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setLineMiterLimit\");\r\n    }\r\n    out(hpf(scale(length)) + \" M\");\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * An object representing a pdf graphics state.\r\n   * @class GState\r\n   */\r\n\r\n  /**\r\n   *\r\n   * @param parameters A parameter object that contains all properties this graphics state wants to set.\r\n   * Supported are: opacity, stroke-opacity\r\n   * @constructor\r\n   */\r\n  API.GState = GState;\r\n\r\n  /**\r\n   * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.\r\n   * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState\r\n   * it will be added before use.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setGState\r\n   */\r\n  API.setGState = function(gState) {\r\n    if (typeof gState === \"string\") {\r\n      gState = gStates[gStatesMap[gState]];\r\n    } else {\r\n      gState = addGState(null, gState);\r\n    }\r\n\r\n    if (!gState.equals(activeGState)) {\r\n      out(\"/\" + gState.id + \" gs\");\r\n      activeGState = gState;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Adds a new Graphics State. Duplicates are automatically eliminated.\r\n   * @param {String} key Might also be null, if no later reference to this gState is needed\r\n   * @param {Object} gState The gState object\r\n   */\r\n  var addGState = function(key, gState) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (key && gStatesMap[key]) return;\r\n    var duplicate = false;\r\n    for (var s in gStates) {\r\n      if (gStates.hasOwnProperty(s)) {\r\n        if (gStates[s].equals(gState)) {\r\n          duplicate = true;\r\n          break;\r\n        }\r\n      }\r\n    }\r\n\r\n    if (duplicate) {\r\n      gState = gStates[s];\r\n    } else {\r\n      var gStateKey = \"GS\" + (Object.keys(gStates).length + 1).toString(10);\r\n      gStates[gStateKey] = gState;\r\n      gState.id = gStateKey;\r\n    }\r\n\r\n    // several user keys may point to the same GState object\r\n    key && (gStatesMap[key] = gState.id);\r\n\r\n    events.publish(\"addGState\", gState);\r\n\r\n    return gState;\r\n  };\r\n\r\n  /**\r\n   * Adds a new {@link GState} for later use. See {@link setGState}.\r\n   * @param {String} key\r\n   * @param {GState} gState\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addGState\r\n   */\r\n  API.addGState = function(key, gState) {\r\n    addGState(key, gState);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Saves the current graphics state (\"pushes it on the stack\"). It can be restored by {@link restoreGraphicsState}\r\n   * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,\r\n   * fill and stroke colors etc.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name saveGraphicsState\r\n   */\r\n  API.saveGraphicsState = function() {\r\n    out(\"q\");\r\n    // as we cannot set font key and size independently we must keep track of both\r\n    fontStateStack.push({\r\n      key: activeFontKey,\r\n      size: activeFontSize,\r\n      color: textColor\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Restores a previously saved graphics state saved by {@link saveGraphicsState} (\"pops the stack\").\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name restoreGraphicsState\r\n   */\r\n  API.restoreGraphicsState = function() {\r\n    out(\"Q\");\r\n\r\n    // restore previous font state\r\n    var fontState = fontStateStack.pop();\r\n    activeFontKey = fontState.key;\r\n    activeFontSize = fontState.size;\r\n    textColor = fontState.color;\r\n\r\n    activeGState = null;\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Appends this matrix to the left of all previously applied matrices.\r\n   *\r\n   * @param {Matrix} matrix\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setCurrentTransformationMatrix\r\n   */\r\n  API.setCurrentTransformationMatrix = function(matrix) {\r\n    out(matrix.toString() + \" cm\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Inserts a debug comment into the generated pdf.\r\n   * @function\r\n   * @instance\r\n   * @param {String} text\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name comment\r\n   */\r\n  API.comment = function(text) {\r\n    out(\"#\" + text);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Point\r\n   */\r\n  var Point = function(x, y) {\r\n    var _x = x || 0;\r\n    Object.defineProperty(this, \"x\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _x;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _x = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _y = y || 0;\r\n    Object.defineProperty(this, \"y\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _y;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _y = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _type = \"pt\";\r\n    Object.defineProperty(this, \"type\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _type;\r\n      },\r\n      set: function(value) {\r\n        _type = value.toString();\r\n      }\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Rectangle\r\n   */\r\n  var Rectangle = function(x, y, w, h) {\r\n    Point.call(this, x, y);\r\n    this.type = \"rect\";\r\n\r\n    var _w = w || 0;\r\n    Object.defineProperty(this, \"w\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _w;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _w = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _h = h || 0;\r\n    Object.defineProperty(this, \"h\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _h;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _h = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * FormObject/RenderTarget\r\n   */\r\n\r\n  var RenderTarget = function() {\r\n    this.page = page;\r\n    this.currentPage = currentPage;\r\n    this.pages = pages.slice(0);\r\n    this.pagesContext = pagesContext.slice(0);\r\n    this.x = pageX;\r\n    this.y = pageY;\r\n    this.matrix = pageMatrix;\r\n    this.width = getPageWidth(currentPage);\r\n    this.height = getPageHeight(currentPage);\r\n    this.outputDestination = outputDestination;\r\n\r\n    this.id = \"\"; // set by endFormObject()\r\n    this.objectNumber = -1; // will be set by putXObject()\r\n  };\r\n\r\n  RenderTarget.prototype.restore = function() {\r\n    page = this.page;\r\n    currentPage = this.currentPage;\r\n    pagesContext = this.pagesContext;\r\n    pages = this.pages;\r\n    pageX = this.x;\r\n    pageY = this.y;\r\n    pageMatrix = this.matrix;\r\n    setPageWidth(currentPage, this.width);\r\n    setPageHeight(currentPage, this.height);\r\n    outputDestination = this.outputDestination;\r\n  };\r\n\r\n  var beginNewRenderTarget = function(x, y, width, height, matrix) {\r\n    // save current state\r\n    renderTargetStack.push(new RenderTarget());\r\n\r\n    // clear pages\r\n    page = currentPage = 0;\r\n    pages = [];\r\n    pageX = x;\r\n    pageY = y;\r\n\r\n    pageMatrix = matrix;\r\n\r\n    beginPage([width, height]);\r\n  };\r\n\r\n  var endFormObject = function(key) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (renderTargetMap[key]) {\r\n      renderTargetStack.pop().restore();\r\n      return;\r\n    }\r\n\r\n    // save the created xObject\r\n    var newXObject = new RenderTarget();\r\n\r\n    var xObjectId = \"Xo\" + (Object.keys(renderTargets).length + 1).toString(10);\r\n    newXObject.id = xObjectId;\r\n\r\n    renderTargetMap[key] = xObjectId;\r\n    renderTargets[xObjectId] = newXObject;\r\n\r\n    events.publish(\"addFormObject\", newXObject);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  /**\r\n   * Starts a new pdf form object, which means that all consequent draw calls target a new independent object\r\n   * until {@link endFormObject} is called. The created object can be referenced and drawn later using\r\n   * {@link doFormObject}. Nested form objects are possible.\r\n   * x, y, width, height set the bounding box that is used to clip the content.\r\n   *\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @param {number} width\r\n   * @param {number} height\r\n   * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to\r\n   * the parent's.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name beginFormObject\r\n   */\r\n  API.beginFormObject = function(x, y, width, height, matrix) {\r\n    // The user can set the output target to a new form object. Nested form objects are possible.\r\n    // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as\r\n    // the PDF-Spec states:\r\n    // \"In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which\r\n    // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,\r\n    // form XObjects may be independent of the content streams in which they appear, and this is strongly\r\n    // recommended although not required\"\r\n    beginNewRenderTarget(x, y, width, height, matrix);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Completes and saves the form object.\r\n   * @param {String} key The key by which this form object can be referenced.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name endFormObject\r\n   */\r\n  API.endFormObject = function(key) {\r\n    endFormObject(key);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Draws the specified form object by referencing to the respective pdf XObject created with\r\n   * {@link API.beginFormObject} and {@link endFormObject}.\r\n   * The location is determined by matrix.\r\n   *\r\n   * @param {String} key The key to the form object.\r\n   * @param {Matrix} matrix The matrix applied before drawing the form object.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name doFormObject\r\n   */\r\n  API.doFormObject = function(key, matrix) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    out(\"q\");\r\n    out(matrix.toString() + \" cm\");\r\n    out(\"/\" + xObject.id + \" Do\");\r\n    out(\"Q\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Returns the form object specified by key.\r\n   * @param key {String}\r\n   * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name getFormObject\r\n   */\r\n  API.getFormObject = function(key) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    return {\r\n      x: xObject.x,\r\n      y: xObject.y,\r\n      width: xObject.width,\r\n      height: xObject.height,\r\n      matrix: xObject.matrix\r\n    };\r\n  };\r\n\r\n  /**\r\n   * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').\r\n   * Uses FileSaver.js-method saveAs.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name save\r\n   * @function\r\n   * @instance\r\n   * @param  {string} filename The filename including extension.\r\n   * @param  {Object} options An Object with additional options, possible options: 'returnPromise'.\r\n   * @returns {jsPDF|Promise} jsPDF-instance     */\r\n  API.save = function(filename, options) {\r\n    filename = filename || \"generated.pdf\";\r\n\r\n    options = options || {};\r\n    options.returnPromise = options.returnPromise || false;\r\n\r\n    if (options.returnPromise === false) {\r\n      saveAs(getBlob(buildDocument()), filename);\r\n      if (typeof saveAs.unload === \"function\") {\r\n        if (globalObject.setTimeout) {\r\n          setTimeout(saveAs.unload, 911);\r\n        }\r\n      }\r\n      return this;\r\n    } else {\r\n      return new Promise(function(resolve, reject) {\r\n        try {\r\n          var result = saveAs(getBlob(buildDocument()), filename);\r\n          if (typeof saveAs.unload === \"function\") {\r\n            if (globalObject.setTimeout) {\r\n              setTimeout(saveAs.unload, 911);\r\n            }\r\n          }\r\n          resolve(result);\r\n        } catch (e) {\r\n          reject(e.message);\r\n        }\r\n      });\r\n    }\r\n\r\n  };\r\n\r\n  // applying plugins (more methods) ON TOP of built-in API.\r\n  // this is intentional as we allow plugins to override\r\n  // built-ins\r\n  for (var plugin in jsPDF.API) {\r\n    if (jsPDF.API.hasOwnProperty(plugin)) {\r\n      if (plugin === \"events\" && jsPDF.API.events.length) {\r\n        (function(events, newEvents) {\r\n          // jsPDF.API.events is a JS Array of Arrays\r\n          // where each Array is a pair of event name, handler\r\n          // Events were added by plugins to the jsPDF instantiator.\r\n          // These are always added to the new instance and some ran\r\n          // during instantiation.\r\n          var eventname, handler_and_args, i;\r\n\r\n          for (i = newEvents.length - 1; i !== -1; i--) {\r\n            // subscribe takes 3 args: 'topic', function, runonce_flag\r\n            // if undefined, runonce is false.\r\n            // users can attach callback directly,\r\n            // or they can attach an array with [callback, runonce_flag]\r\n            // that's what the \"apply\" magic is for below.\r\n            eventname = newEvents[i][0];\r\n            handler_and_args = newEvents[i][1];\r\n            events.subscribe.apply(\r\n              events,\r\n              [eventname].concat(\r\n                typeof handler_and_args === \"function\"\r\n                  ? [handler_and_args]\r\n                  : handler_and_args\r\n              )\r\n            );\r\n          }\r\n        })(events, jsPDF.API.events);\r\n      } else {\r\n        API[plugin] = jsPDF.API[plugin];\r\n      }\r\n    }\r\n  }\r\n\r\n  var getPageWidth = (API.getPageWidth = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightX -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftX) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageWidth = (API.setPageWidth = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightX =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;\r\n  });\r\n\r\n  var getPageHeight = (API.getPageHeight = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightY -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftY) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageHeight = (API.setPageHeight = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightY =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;\r\n  });\r\n\r\n  /**\r\n   * Object exposing internal API to plugins\r\n   * @public\r\n   * @ignore\r\n   */\r\n  API.internal = {\r\n    pdfEscape: pdfEscape,\r\n    getStyle: getStyle,\r\n    getFont: getFontEntry,\r\n    getFontSize: getFontSize,\r\n    getCharSpace: getCharSpace,\r\n    getTextColor: getTextColor,\r\n    getLineHeight: getLineHeight,\r\n    getLineHeightFactor: getLineHeightFactor,\r\n    getLineWidth: getLineWidth,\r\n    write: write,\r\n    getHorizontalCoordinate: getHorizontalCoordinate,\r\n    getVerticalCoordinate: getVerticalCoordinate,\r\n    getCoordinateString: getHorizontalCoordinateString,\r\n    getVerticalCoordinateString: getVerticalCoordinateString,\r\n    collections: {},\r\n    newObject: newObject,\r\n    newAdditionalObject: newAdditionalObject,\r\n    newObjectDeferred: newObjectDeferred,\r\n    newObjectDeferredBegin: newObjectDeferredBegin,\r\n    getFilters: getFilters,\r\n    putStream: putStream,\r\n    events: events,\r\n    scaleFactor: scaleFactor,\r\n    pageSize: {\r\n      getWidth: function() {\r\n        return getPageWidth(currentPage);\r\n      },\r\n      setWidth: function(value) {\r\n        setPageWidth(currentPage, value);\r\n      },\r\n      getHeight: function() {\r\n        return getPageHeight(currentPage);\r\n      },\r\n      setHeight: function(value) {\r\n        setPageHeight(currentPage, value);\r\n      }\r\n    },\r\n    encryptionOptions: encryptionOptions,\r\n    encryption: encryption,\r\n    getEncryptor: getEncryptor,\r\n    output: output,\r\n    getNumberOfPages: getNumberOfPages,\r\n    pages: pages,\r\n    out: out,\r\n    f2: f2,\r\n    f3: f3,\r\n    getPageInfo: getPageInfo,\r\n    getPageInfoByObjId: getPageInfoByObjId,\r\n    getCurrentPageInfo: getCurrentPageInfo,\r\n    getPDFVersion: getPdfVersion,\r\n    Point: Point,\r\n    Rectangle: Rectangle,\r\n    Matrix: Matrix,\r\n    hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.\r\n  };\r\n\r\n  Object.defineProperty(API.internal.pageSize, \"width\", {\r\n    get: function() {\r\n      return getPageWidth(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageWidth(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n  Object.defineProperty(API.internal.pageSize, \"height\", {\r\n    get: function() {\r\n      return getPageHeight(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageHeight(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n\r\n  //////////////////////////////////////////////////////\r\n  // continuing initialization of jsPDF Document object\r\n  //////////////////////////////////////////////////////\r\n  // Add the first page automatically\r\n  addFonts.call(API, standardFonts);\r\n  activeFontKey = \"F1\";\r\n  _addPage(format, orientation);\r\n\r\n  events.publish(\"initialized\");\r\n  return API;\r\n}\r\n\r\n/**\r\n * jsPDF.API is a STATIC property of jsPDF class.\r\n * jsPDF.API is an object you can add methods and properties to.\r\n * The methods / properties you add will show up in new jsPDF objects.\r\n *\r\n * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,\r\n * callbacks to this object. These will be reassigned to all new instances of jsPDF.\r\n *\r\n * @static\r\n * @public\r\n * @memberof jsPDF#\r\n * @name API\r\n *\r\n * @example\r\n * jsPDF.API.mymethod = function(){\r\n *   // 'this' will be ref to internal API object. see jsPDF source\r\n *   // , so you can refer to built-in methods like so:\r\n *   //     this.line(....)\r\n *   //     this.text(....)\r\n * }\r\n * var pdfdoc = new jsPDF()\r\n * pdfdoc.mymethod() // <- !!!!!!\r\n */\r\njsPDF.API = {\r\n  events: []\r\n};\r\n/**\r\n * The version of jsPDF.\r\n * @name version\r\n * @type {string}\r\n * @memberof jsPDF#\r\n */\r\njsPDF.version = \"0.0.0\";\r\n\r\nexport { jsPDF, ShadingPattern, TilingPattern, GState };\r\nexport default jsPDF;\r\n","/* global jsPDF */\n/**\n * @license\n * Copyright (c) 2016 Alexander Weidt,\n * https://github.com/BiggA94\n *\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF AcroForm Plugin\n * @module AcroForm\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\nvar jsPDFAPI = jsPDF.API;\nvar scaleFactor = 1;\n\nvar pdfEscape = function(value) {\n  return value\n    .replace(/\\\\/g, \"\\\\\\\\\")\n    .replace(/\\(/g, \"\\\\(\")\n    .replace(/\\)/g, \"\\\\)\");\n};\nvar pdfUnescape = function(value) {\n  return value\n    .replace(/\\\\\\\\/g, \"\\\\\")\n    .replace(/\\\\\\(/g, \"(\")\n    .replace(/\\\\\\)/g, \")\");\n};\n\nvar f2 = function(number) {\n  return number.toFixed(2); // Ie, %.2f\n};\n\nvar f5 = function(number) {\n  return number.toFixed(5); // Ie, %.2f\n};\n\njsPDFAPI.__acroform__ = {};\nvar inherit = function(child, parent) {\n  child.prototype = Object.create(parent.prototype);\n  child.prototype.constructor = child;\n};\n\nvar scale = function(x) {\n  return x * scaleFactor;\n};\n\nvar createFormXObject = function(formObject) {\n  var xobj = new AcroFormXObject();\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];\n  return xobj;\n};\n\n/**\n * Bit-Operations\n */\nvar setBit = (jsPDFAPI.__acroform__.setBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number |= bitMask;\n\n  return number;\n});\n\nvar clearBit = (jsPDFAPI.__acroform__.clearBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number &= ~bitMask;\n\n  return number;\n});\n\nvar getBit = (jsPDFAPI.__acroform__.getBit = function(number, bitPosition) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBit\"\n    );\n  }\n  return (number & (1 << bitPosition)) === 0 ? 0 : 1;\n});\n\n/*\n * Ff starts counting the bit position at 1 and not like javascript at 0\n */\nvar getBitForPdf = (jsPDFAPI.__acroform__.getBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf\"\n    );\n  }\n  return getBit(number, bitPosition - 1);\n});\n\nvar setBitForPdf = (jsPDFAPI.__acroform__.setBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf\"\n    );\n  }\n  return setBit(number, bitPosition - 1);\n});\n\nvar clearBitForPdf = (jsPDFAPI.__acroform__.clearBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf\"\n    );\n  }\n  return clearBit(number, bitPosition - 1);\n});\n\nvar calculateCoordinates = (jsPDFAPI.__acroform__.calculateCoordinates = function(\n  args,\n  scope\n) {\n  var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;\n  var getVerticalCoordinate = scope.internal.getVerticalCoordinate;\n  var x = args[0];\n  var y = args[1];\n  var w = args[2];\n  var h = args[3];\n\n  var coordinates = {};\n\n  coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;\n  coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;\n  coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;\n  coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;\n\n  return [\n    Number(f2(coordinates.lowerLeft_X)),\n    Number(f2(coordinates.lowerLeft_Y)),\n    Number(f2(coordinates.upperRight_X)),\n    Number(f2(coordinates.upperRight_Y))\n  ];\n});\n\nvar calculateAppearanceStream = function(formObject) {\n  if (formObject.appearanceStreamContent) {\n    return formObject.appearanceStreamContent;\n  }\n\n  if (!formObject.V && !formObject.DV) {\n    return;\n  }\n\n  // else calculate it\n\n  var stream = [];\n  var text = formObject._V || formObject.DV;\n  var calcRes = calculateX(formObject, text);\n  var fontKey = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  ).id;\n\n  //PDF 32000-1:2008, page 444\n  stream.push(\"/Tx BMC\");\n  stream.push(\"q\");\n  stream.push(\"BT\"); // Begin Text\n  stream.push(formObject.scope.__private__.encodeColorString(formObject.color));\n  stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf\");\n  stream.push(\"1 0 0 1 0 0 Tm\"); // Transformation Matrix\n  stream.push(calcRes.text);\n  stream.push(\"ET\"); // End Text\n  stream.push(\"Q\");\n  stream.push(\"EMC\");\n\n  var appearanceStreamContent = createFormXObject(formObject);\n  appearanceStreamContent.scope = formObject.scope;\n  appearanceStreamContent.stream = stream.join(\"\\n\");\n  return appearanceStreamContent;\n};\n\nvar calculateX = function(formObject, text) {\n  var maxFontSize =\n    formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;\n  var returnValue = {\n    text: \"\",\n    fontSize: \"\"\n  };\n  // Remove Brackets\n  text = text.substr(0, 1) == \"(\" ? text.substr(1) : text;\n  text =\n    text.substr(text.length - 1) == \")\"\n      ? text.substr(0, text.length - 1)\n      : text;\n  // split into array of words\n  var textSplit = text.split(\" \");\n  if (formObject.multiline) {\n    textSplit = textSplit.map(word => word.split(\"\\n\"));\n  } else {\n    textSplit = textSplit.map(word => [word]);\n  }\n\n  var fontSize = maxFontSize; // The Starting fontSize (The Maximum)\n  var lineSpacing = 2;\n  var borderPadding = 2;\n\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  height = height < 0 ? -height : height;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  width = width < 0 ? -width : width;\n\n  var isSmallerThanWidth = function(i, lastLine, fontSize) {\n    if (i + 1 < textSplit.length) {\n      var tmp = lastLine + \" \" + textSplit[i + 1][0];\n      var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;\n      var FieldWidth = width - 2 * borderPadding;\n      return TextWidth <= FieldWidth;\n    } else {\n      return false;\n    }\n  };\n\n  fontSize++;\n  FontSize: while (fontSize > 0) {\n    text = \"\";\n    fontSize--;\n    var textHeight = calculateFontSpace(\"3\", formObject, fontSize).height;\n    var startY = formObject.multiline\n      ? height - fontSize\n      : (height - textHeight) / 2;\n    startY += lineSpacing;\n    var startX;\n\n    var lastY = startY;\n    var firstWordInLine = 0,\n      lastWordInLine = 0;\n    var lastLength;\n    var currWord = 0;\n\n    if (fontSize <= 0) {\n      // In case, the Text doesn't fit at all\n      fontSize = 12;\n      text = \"(...) Tj\\n\";\n      text +=\n        \"% Width of Text: \" +\n        calculateFontSpace(text, formObject, fontSize).width +\n        \", FieldWidth:\" +\n        width +\n        \"\\n\";\n      break;\n    }\n\n    var lastLine = \"\";\n    var lineCount = 0;\n    Line: for (var i = 0; i < textSplit.length; i++) {\n      if (textSplit.hasOwnProperty(i)) {\n        let isWithNewLine = false;\n        if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {\n          if (\n            (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n            height\n          ) {\n            continue FontSize;\n          }\n\n          lastLine += textSplit[i][currWord];\n          isWithNewLine = true;\n          lastWordInLine = i;\n          i--;\n        } else {\n          lastLine += textSplit[i][currWord] + \" \";\n          lastLine =\n            lastLine.substr(lastLine.length - 1) == \" \"\n              ? lastLine.substr(0, lastLine.length - 1)\n              : lastLine;\n          var key = parseInt(i);\n          var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);\n          var isLastWord = i >= textSplit.length - 1;\n\n          if (nextLineIsSmaller && !isLastWord) {\n            lastLine += \" \";\n            currWord = 0;\n            continue; // Line\n          } else if (!nextLineIsSmaller && !isLastWord) {\n            if (!formObject.multiline) {\n              continue FontSize;\n            } else {\n              if (\n                (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n              ) {\n                // If the Text is higher than the\n                // FieldObject\n                continue FontSize;\n              }\n              lastWordInLine = key;\n              // go on\n            }\n          } else if (isLastWord) {\n            lastWordInLine = key;\n          } else {\n            if (\n              formObject.multiline &&\n              (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n            ) {\n              // If the Text is higher than the FieldObject\n              continue FontSize;\n            }\n          }\n        }\n        // Remove last blank\n\n        var line = \"\";\n\n        for (var x = firstWordInLine; x <= lastWordInLine; x++) {\n          var currLine = textSplit[x];\n          if (formObject.multiline) {\n            if (x === lastWordInLine) {\n              line += currLine[currWord] + \" \";\n              currWord = (currWord + 1) % currLine.length;\n              continue;\n            }\n            if (x === firstWordInLine) {\n              line += currLine[currLine.length - 1] + \" \";\n              continue;\n            }\n          }\n          line += currLine[0] + \" \";\n        }\n\n        // Remove last blank\n        line =\n          line.substr(line.length - 1) == \" \"\n            ? line.substr(0, line.length - 1)\n            : line;\n        // lastLength -= blankSpace.width;\n        lastLength = calculateFontSpace(line, formObject, fontSize).width;\n\n        // Calculate startX\n        switch (formObject.textAlign) {\n          case \"right\":\n            startX = width - lastLength - borderPadding;\n            break;\n          case \"center\":\n            startX = (width - lastLength) / 2;\n            break;\n          case \"left\":\n          default:\n            startX = borderPadding;\n            break;\n        }\n        text += f2(startX) + \" \" + f2(lastY) + \" Td\\n\";\n        text += \"(\" + pdfEscape(line) + \") Tj\\n\";\n        // reset X in PDF\n        text += -f2(startX) + \" 0 Td\\n\";\n\n        // After a Line, adjust y position\n        lastY = -(fontSize + lineSpacing);\n\n        // Reset for next iteration step\n        lastLength = 0;\n        firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;\n        lineCount++;\n\n        lastLine = \"\";\n        continue Line;\n      }\n    }\n    break;\n  }\n\n  returnValue.text = text;\n  returnValue.fontSize = fontSize;\n\n  return returnValue;\n};\n\n/**\n * Small workaround for calculating the TextMetric approximately.\n *\n * @param text\n * @param fontsize\n * @returns {TextMetrics} (Has Height and Width)\n */\nvar calculateFontSpace = function(text, formObject, fontSize) {\n  var font = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  );\n  var width =\n    formObject.scope.getStringUnitWidth(text, {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) * parseFloat(fontSize);\n  var height =\n    formObject.scope.getStringUnitWidth(\"3\", {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) *\n    parseFloat(fontSize) *\n    1.5;\n  return { height: height, width: width };\n};\n\nvar acroformPluginTemplate = {\n  fields: [],\n  xForms: [],\n  /**\n   * acroFormDictionaryRoot contains information about the AcroForm\n   * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has\n   * 1: The Object ID of the Root\n   */\n  acroFormDictionaryRoot: null,\n  /**\n   * After the PDF gets evaluated, the reference to the root has to be\n   * reset, this indicates, whether the root has already been printed\n   * out\n   */\n  printedOut: false,\n  internal: null,\n  isInitialized: false\n};\n\nvar annotReferenceCallback = function(scope) {\n  //set objId to undefined and force it to get a new objId on buildDocument\n  scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;\n  var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n  for (var i in fields) {\n    if (fields.hasOwnProperty(i)) {\n      var formObject = fields[i];\n      //set objId to undefined and force it to get a new objId on buildDocument\n      formObject.objId = undefined;\n      // add Annot Reference!\n      if (formObject.hasAnnotation) {\n        // If theres an Annotation Widget in the Form Object, put the\n        // Reference in the /Annot array\n        createAnnotationReference(formObject, scope);\n      }\n    }\n  }\n};\n\nvar putForm = function(formObject) {\n  if (formObject.scope.internal.acroformPlugin.printedOut) {\n    formObject.scope.internal.acroformPlugin.printedOut = false;\n    formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;\n  }\n  formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(\n    formObject\n  );\n};\n/**\n * Create the Reference to the widgetAnnotation, so that it gets referenced\n * in the Annot[] int the+ (Requires the Annotation Plugin)\n */\nvar createAnnotationReference = function(object, scope) {\n  var options = {\n    type: \"reference\",\n    object: object\n  };\n  var findEntry = function(entry) {\n    return entry.type === options.type && entry.object === options.object;\n  };\n  if (\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.find(findEntry) === undefined\n  ) {\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.push(options);\n  }\n};\n\n// Callbacks\n\nvar putCatalogCallback = function(scope) {\n  // Put reference to AcroForm to DocumentCatalog\n  if (\n    typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== \"undefined\"\n  ) {\n    // for safety, shouldn't normally be the case\n    scope.internal.write(\n      \"/AcroForm \" +\n        scope.internal.acroformPlugin.acroFormDictionaryRoot.objId +\n        \" \" +\n        0 +\n        \" R\"\n    );\n  } else {\n    throw new Error(\"putCatalogCallback: Root missing.\");\n  }\n};\n\n/**\n * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm\n * Dictionary\n */\nvar AcroFormDictionaryCallback = function(scope) {\n  // Remove event\n  scope.internal.events.unsubscribe(\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID\n  );\n  delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;\n  scope.internal.acroformPlugin.printedOut = true;\n};\n\n/**\n * Creates the single Fields and writes them into the Document\n *\n * If fieldArray is set, use the fields that are inside it instead of the\n * fields from the AcroRoot (for the FormXObjects...)\n */\nvar createFieldCallback = function(fieldArray, scope) {\n  var standardFields = !fieldArray;\n\n  if (!fieldArray) {\n    // in case there is no fieldArray specified, we want to print out\n    // the Fields of the AcroForm\n    // Print out Root\n    scope.internal.newObjectDeferredBegin(\n      scope.internal.acroformPlugin.acroFormDictionaryRoot.objId,\n      true\n    );\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();\n  }\n\n  fieldArray =\n    fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;\n\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var fieldObject = fieldArray[i];\n      var keyValueList = [];\n      var oldRect = fieldObject.Rect;\n\n      if (fieldObject.Rect) {\n        fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);\n      }\n\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(\n        fieldObject\n      );\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.getKeyValueListForStream === \"function\"\n      ) {\n        keyValueList = fieldObject.getKeyValueListForStream();\n      }\n\n      fieldObject.Rect = oldRect;\n\n      if (\n        fieldObject.hasAppearanceStream &&\n        !fieldObject.appearanceStreamContent\n      ) {\n        // Calculate Appearance\n        var appearance = calculateAppearanceStream(fieldObject);\n        keyValueList.push({ key: \"AP\", value: \"<</N \" + appearance + \">>\" });\n\n        scope.internal.acroformPlugin.xForms.push(appearance);\n      }\n\n      // Assume AppearanceStreamContent is a Array with N,R,D (at least\n      // one of them!)\n      if (fieldObject.appearanceStreamContent) {\n        var appearanceStreamString = \"\";\n        // Iterate over N,R and D\n        for (var k in fieldObject.appearanceStreamContent) {\n          if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {\n            var value = fieldObject.appearanceStreamContent[k];\n            appearanceStreamString += \"/\" + k + \" \";\n            appearanceStreamString += \"<<\";\n            if (Object.keys(value).length >= 1 || Array.isArray(value)) {\n              // appearanceStream is an Array or Object!\n              for (var i in value) {\n                if (value.hasOwnProperty(i)) {\n                  var obj = value[i];\n                  if (typeof obj === \"function\") {\n                    // if Function is referenced, call it in order\n                    // to get the FormXObject\n                    obj = obj.call(scope, fieldObject);\n                  }\n                  appearanceStreamString += \"/\" + i + \" \" + obj + \" \";\n\n                  // In case the XForm is already used, e.g. OffState\n                  // of CheckBoxes, don't add it\n                  if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                    scope.internal.acroformPlugin.xForms.push(obj);\n                }\n              }\n            } else {\n              obj = value;\n              if (typeof obj === \"function\") {\n                // if Function is referenced, call it in order to\n                // get the FormXObject\n                obj = obj.call(scope, fieldObject);\n              }\n              appearanceStreamString += \"/\" + i + \" \" + obj;\n              if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                scope.internal.acroformPlugin.xForms.push(obj);\n            }\n            appearanceStreamString += \">>\";\n          }\n        }\n\n        // appearance stream is a normal Object..\n        keyValueList.push({\n          key: \"AP\",\n          value: \"<<\\n\" + appearanceStreamString + \">>\"\n        });\n      }\n\n      scope.internal.putStream({\n        additionalKeyValues: keyValueList,\n        objectId: fieldObject.objId\n      });\n\n      scope.internal.out(\"endobj\");\n    }\n  }\n  if (standardFields) {\n    createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);\n  }\n};\n\nvar createXFormObjectCallback = function(fieldArray, scope) {\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var key = i;\n      var fieldObject = fieldArray[i];\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.putStream === \"function\"\n      ) {\n        fieldObject.putStream();\n      }\n      delete fieldArray[key];\n    }\n  }\n};\n\nvar initializeAcroForm = function(scope, formObject) {\n  formObject.scope = scope;\n  if (\n    scope.internal !== undefined &&\n    (scope.internal.acroformPlugin === undefined ||\n      scope.internal.acroformPlugin.isInitialized === false)\n  ) {\n    AcroFormField.FieldNum = 0;\n    scope.internal.acroformPlugin = JSON.parse(\n      JSON.stringify(acroformPluginTemplate)\n    );\n    if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {\n      throw new Error(\"Exception while creating AcroformDictionary\");\n    }\n    scaleFactor = scope.internal.scaleFactor;\n    // The Object Number of the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope;\n\n    // add Callback for creating the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe(\n      \"postPutResources\",\n      function() {\n        AcroFormDictionaryCallback(scope);\n      }\n    );\n\n    scope.internal.events.subscribe(\"buildDocument\", function() {\n      annotReferenceCallback(scope);\n    }); // buildDocument\n\n    // Register event, that is triggered when the DocumentCatalog is\n    // written, in order to add /AcroForm\n\n    scope.internal.events.subscribe(\"putCatalog\", function() {\n      putCatalogCallback(scope);\n    });\n\n    // Register event, that creates all Fields\n    scope.internal.events.subscribe(\"postPutPages\", function(fieldArray) {\n      createFieldCallback(fieldArray, scope);\n    });\n\n    scope.internal.acroformPlugin.isInitialized = true;\n  }\n};\n\n//PDF 32000-1:2008, page 26, 7.3.6\nvar arrayToPdfArray = (jsPDFAPI.__acroform__.arrayToPdfArray = function(\n  array,\n  objId,\n  scope\n) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (Array.isArray(array)) {\n    var content = \"[\";\n    for (var i = 0; i < array.length; i++) {\n      if (i !== 0) {\n        content += \" \";\n      }\n      switch (typeof array[i]) {\n        case \"boolean\":\n        case \"number\":\n        case \"object\":\n          content += array[i].toString();\n          break;\n        case \"string\":\n          if (array[i].substr(0, 1) !== \"/\") {\n            if (typeof objId !== \"undefined\" && scope)\n              encryptor = scope.internal.getEncryptor(objId);\n            content += \"(\" + pdfEscape(encryptor(array[i].toString())) + \")\";\n          } else {\n            content += array[i].toString();\n          }\n          break;\n      }\n    }\n    content += \"]\";\n    return content;\n  }\n  throw new Error(\n    \"Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray\"\n  );\n});\nfunction getMatches(string, regex, index) {\n  index || (index = 1); // default to the first capturing group\n  var matches = [];\n  var match;\n  while ((match = regex.exec(string))) {\n    matches.push(match[index]);\n  }\n  return matches;\n}\nvar pdfArrayToStringArray = function(array) {\n  var result = [];\n  if (typeof array === \"string\") {\n    result = getMatches(array, /\\((.*?)\\)/g);\n  }\n  return result;\n};\n\nvar toPdfString = function(string, objId, scope) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (typeof objId !== \"undefined\" && scope)\n    encryptor = scope.internal.getEncryptor(objId);\n  string = string || \"\";\n  string.toString();\n  string = \"(\" + pdfEscape(encryptor(string)) + \")\";\n  return string;\n};\n\n// ##########################\n// Classes\n// ##########################\n\n/**\n * @class AcroFormPDFObject\n * @classdesc A AcroFormPDFObject\n */\nvar AcroFormPDFObject = function() {\n  this._objId = undefined;\n  this._scope = undefined;\n\n  /**\n   * @name AcroFormPDFObject#objId\n   * @type {any}\n   */\n  Object.defineProperty(this, \"objId\", {\n    get: function() {\n      if (typeof this._objId === \"undefined\") {\n        if (typeof this.scope === \"undefined\") {\n          return undefined;\n        }\n        this._objId = this.scope.internal.newObjectDeferred();\n      }\n      return this._objId;\n    },\n    set: function(value) {\n      this._objId = value;\n    }\n  });\n  Object.defineProperty(this, \"scope\", {\n    value: this._scope,\n    writable: true\n  });\n};\n\n/**\n * @function AcroFormPDFObject.toString\n */\nAcroFormPDFObject.prototype.toString = function() {\n  return this.objId + \" 0 R\";\n};\n\nAcroFormPDFObject.prototype.putStream = function() {\n  var keyValueList = this.getKeyValueListForStream();\n  this.scope.internal.putStream({\n    data: this.stream,\n    additionalKeyValues: keyValueList,\n    objectId: this.objId\n  });\n  this.scope.internal.out(\"endobj\");\n};\n\n/**\n * Returns an key-value-List of all non-configurable Variables from the Object\n *\n * @name getKeyValueListForStream\n * @returns {string}\n */\nAcroFormPDFObject.prototype.getKeyValueListForStream = function() {\n  var keyValueList = [];\n  var keys = Object.getOwnPropertyNames(this).filter(function(key) {\n    return (\n      key != \"content\" &&\n      key != \"appearanceStreamContent\" &&\n      key != \"scope\" &&\n      key != \"objId\" &&\n      key.substring(0, 1) != \"_\"\n    );\n  });\n\n  for (var i in keys) {\n    if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {\n      var key = keys[i];\n      var value = this[key];\n\n      if (value) {\n        if (Array.isArray(value)) {\n          keyValueList.push({\n            key: key,\n            value: arrayToPdfArray(value, this.objId, this.scope)\n          });\n        } else if (value instanceof AcroFormPDFObject) {\n          // In case it is a reference to another PDFObject,\n          // take the reference number\n          value.scope = this.scope;\n          keyValueList.push({ key: key, value: value.objId + \" 0 R\" });\n        } else if (typeof value !== \"function\") {\n          keyValueList.push({ key: key, value: value });\n        }\n      }\n    }\n  }\n  return keyValueList;\n};\n\nvar AcroFormXObject = function() {\n  AcroFormPDFObject.call(this);\n\n  Object.defineProperty(this, \"Type\", {\n    value: \"/XObject\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    value: \"/Form\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"FormType\", {\n    value: 1,\n    configurable: false,\n    writable: true\n  });\n\n  var _BBox = [];\n  Object.defineProperty(this, \"BBox\", {\n    configurable: false,\n    get: function() {\n      return _BBox;\n    },\n    set: function(value) {\n      _BBox = value;\n    }\n  });\n\n  Object.defineProperty(this, \"Resources\", {\n    value: \"2 0 R\",\n    configurable: false,\n    writable: true\n  });\n\n  var _stream;\n  Object.defineProperty(this, \"stream\", {\n    enumerable: false,\n    configurable: true,\n    set: function(value) {\n      _stream = value.trim();\n    },\n    get: function() {\n      if (_stream) {\n        return _stream;\n      } else {\n        return null;\n      }\n    }\n  });\n};\n\ninherit(AcroFormXObject, AcroFormPDFObject);\n\nvar AcroFormDictionary = function() {\n  AcroFormPDFObject.call(this);\n\n  var _Kids = [];\n\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      if (_Kids.length > 0) {\n        return _Kids;\n      } else {\n        return undefined;\n      }\n    }\n  });\n  Object.defineProperty(this, \"Fields\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    }\n  });\n\n  // Default Appearance\n  var _DA;\n  Object.defineProperty(this, \"DA\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DA) {\n        return undefined;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_DA)) + \")\";\n    },\n    set: function(value) {\n      _DA = value;\n    }\n  });\n};\n\ninherit(AcroFormDictionary, AcroFormPDFObject);\n\n/**\n * The Field Object contains the Variables, that every Field needs\n *\n * @class AcroFormField\n * @classdesc An AcroForm FieldObject\n */\nvar AcroFormField = function() {\n  AcroFormPDFObject.call(this);\n\n  //Annotation-Flag See Table 165\n  var _F = 4;\n  Object.defineProperty(this, \"F\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _F;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _F = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute F supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.\n   * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.\n   *\n   * @name AcroFormField#showWhenPrinted\n   * @default true\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"showWhenPrinted\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(_F, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.F = setBitForPdf(_F, 3);\n      } else {\n        this.F = clearBitForPdf(_F, 3);\n      }\n    }\n  });\n\n  var _Ff = 0;\n  Object.defineProperty(this, \"Ff\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Ff;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _Ff = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Ff supplied.'\n        );\n      }\n    }\n  });\n\n  var _Rect = [];\n  Object.defineProperty(this, \"Rect\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (_Rect.length === 0) {\n        return undefined;\n      }\n      return _Rect;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Rect = value;\n      } else {\n        _Rect = [];\n      }\n    }\n  });\n\n  /**\n   * The x-position of the field.\n   *\n   * @name AcroFormField#x\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"x\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[0])) {\n        return 0;\n      }\n      return _Rect[0];\n    },\n    set: function(value) {\n      _Rect[0] = value;\n    }\n  });\n\n  /**\n   * The y-position of the field.\n   *\n   * @name AcroFormField#y\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"y\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[1])) {\n        return 0;\n      }\n      return _Rect[1];\n    },\n    set: function(value) {\n      _Rect[1] = value;\n    }\n  });\n\n  /**\n   * The width of the field.\n   *\n   * @name AcroFormField#width\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"width\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[2])) {\n        return 0;\n      }\n      return _Rect[2];\n    },\n    set: function(value) {\n      _Rect[2] = value;\n    }\n  });\n\n  /**\n   * The height of the field.\n   *\n   * @name AcroFormField#height\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"height\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[3])) {\n        return 0;\n      }\n      return _Rect[3];\n    },\n    set: function(value) {\n      _Rect[3] = value;\n    }\n  });\n\n  var _FT = \"\";\n  Object.defineProperty(this, \"FT\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _FT;\n    },\n    set: function(value) {\n      switch (value) {\n        case \"/Btn\":\n        case \"/Tx\":\n        case \"/Ch\":\n        case \"/Sig\":\n          _FT = value;\n          break;\n        default:\n          throw new Error(\n            'Invalid value \"' + value + '\" for attribute FT supplied.'\n          );\n      }\n    }\n  });\n\n  var _T = null;\n\n  Object.defineProperty(this, \"T\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (!_T || _T.length < 1) {\n        // In case of a Child from a Radio´Group, you don't need a FieldName\n        if (this instanceof AcroFormChildClass) {\n          return undefined;\n        }\n        _T = \"FieldObject\" + AcroFormField.FieldNum++;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_T)) + \")\";\n    },\n    set: function(value) {\n      _T = value.toString();\n    }\n  });\n\n  /**\n   * (Optional) The partial field name (see 12.7.3.2, “Field Names”).\n   *\n   * @name AcroFormField#fieldName\n   * @default null\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fieldName\", {\n    configurable: true,\n    enumerable: true,\n    get: function() {\n      return _T;\n    },\n    set: function(value) {\n      _T = value;\n    }\n  });\n\n  var _fontName = \"helvetica\";\n  /**\n   * The fontName of the font to be used.\n   *\n   * @name AcroFormField#fontName\n   * @default 'helvetica'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontName\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontName;\n    },\n    set: function(value) {\n      _fontName = value;\n    }\n  });\n\n  var _fontStyle = \"normal\";\n  /**\n   * The fontStyle of the font to be used.\n   *\n   * @name AcroFormField#fontStyle\n   * @default 'normal'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontStyle\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontStyle;\n    },\n    set: function(value) {\n      _fontStyle = value;\n    }\n  });\n\n  var _fontSize = 0;\n  /**\n   * The fontSize of the font to be used.\n   *\n   * @name AcroFormField#fontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"fontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontSize;\n    },\n    set: function(value) {\n      _fontSize = value;\n    }\n  });\n\n  var _maxFontSize = undefined;\n  /**\n   * The maximum fontSize of the font to be used.\n   *\n   * @name AcroFormField#maxFontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxFontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (_maxFontSize === undefined) {\n        // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)\n        // (\"50\" is transformed to the \"user space\" but then used in \"pdf space\")\n        return 50 / scaleFactor;\n      } else {\n        return _maxFontSize;\n      }\n    },\n    set: function(value) {\n      _maxFontSize = value;\n    }\n  });\n\n  var _color = \"black\";\n  /**\n   * The color of the text\n   *\n   * @name AcroFormField#color\n   * @default 'black'\n   * @type {string|rgba}\n   */\n  Object.defineProperty(this, \"color\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _color;\n    },\n    set: function(value) {\n      _color = value;\n    }\n  });\n\n  var _DA = \"/F1 0 Tf 0 g\";\n  // Defines the default appearance (Needed for variable Text)\n  Object.defineProperty(this, \"DA\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (\n        !_DA ||\n        this instanceof AcroFormChildClass ||\n        this instanceof AcroFormTextField\n      ) {\n        return undefined;\n      }\n      return toPdfString(_DA, this.objId, this.scope);\n    },\n    set: function(value) {\n      value = value.toString();\n      _DA = value;\n    }\n  });\n\n  var _DV = null;\n  Object.defineProperty(this, \"DV\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DV) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_DV, this.objId, this.scope);\n      }\n      return _DV;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _DV = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _DV = pdfUnescape(value);\n        }\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.\n   *\n   * @name AcroFormField#defaultValue\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"defaultValue\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_DV.substr(1, _DV.length - 1));\n      } else {\n        return _DV;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _DV = \"/\" + value;\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  var _V = null;\n  Object.defineProperty(this, \"_V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      return _V;\n    },\n    set: function(value) {\n      this.V = value;\n    }\n  });\n  Object.defineProperty(this, \"V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_V, this.objId, this.scope);\n      }\n      return _V;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _V = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _V = pdfUnescape(value);\n        }\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.\n   *\n   * @name AcroFormField#value\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"value\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_V.substr(1, _V.length - 1));\n      } else {\n        return _V;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _V = \"/\" + value;\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * Check if field has annotations\n   *\n   * @name AcroFormField#hasAnnotation\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAnnotation\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.Rect;\n    }\n  });\n\n  Object.defineProperty(this, \"Type\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Annot\" : null;\n    }\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Widget\" : null;\n    }\n  });\n\n  var _hasAppearanceStream = false;\n  /**\n   * true if field has an appearanceStream\n   *\n   * @name AcroFormField#hasAppearanceStream\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _hasAppearanceStream;\n    },\n    set: function(value) {\n      value = Boolean(value);\n      _hasAppearanceStream = value;\n    }\n  });\n\n  /**\n   * The page on which the AcroFormField is placed\n   *\n   * @name AcroFormField#page\n   * @type {number}\n   */\n  var _page;\n  Object.defineProperty(this, \"page\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_page) {\n        return undefined;\n      }\n      return _page;\n    },\n    set: function(value) {\n      _page = value;\n    }\n  });\n\n  /**\n   * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.\n   *\n   * @name AcroFormField#readOnly\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"readOnly\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 1));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 1);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 1);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).\n   *\n   * @name AcroFormField#required\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"required\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 2));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 2);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 2);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)\n   *\n   * @name AcroFormField#noExport\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noExport\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 3);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 3);\n      }\n    }\n  });\n\n  var _Q = null;\n  Object.defineProperty(this, \"Q\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (_Q === null) {\n        return undefined;\n      }\n      return _Q;\n    },\n    set: function(value) {\n      if ([0, 1, 2].indexOf(value) !== -1) {\n        _Q = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Q supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:\n   * 'left', 'center', 'right'\n   *\n   * @name AcroFormField#textAlign\n   * @default 'left'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"textAlign\", {\n    get: function() {\n      var result;\n      switch (_Q) {\n        case 0:\n        default:\n          result = \"left\";\n          break;\n        case 1:\n          result = \"center\";\n          break;\n        case 2:\n          result = \"right\";\n          break;\n      }\n      return result;\n    },\n    configurable: true,\n    enumerable: true,\n    set: function(value) {\n      switch (value) {\n        case \"right\":\n        case 2:\n          _Q = 2;\n          break;\n        case \"center\":\n        case 1:\n          _Q = 1;\n          break;\n        case \"left\":\n        case 0:\n        default:\n          _Q = 0;\n      }\n    }\n  });\n};\n\ninherit(AcroFormField, AcroFormPDFObject);\n\n/**\n * @class AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormChoiceField = function() {\n  AcroFormField.call(this);\n  // Field Type = Choice Field\n  this.FT = \"/Ch\";\n  // options\n  this.V = \"()\";\n\n  this.fontName = \"zapfdingbats\";\n  // Top Index\n  var _TI = 0;\n\n  Object.defineProperty(this, \"TI\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  /**\n   * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.\n   *\n   * @name AcroFormChoiceField#topIndex\n   * @default 0\n   * @type {number}\n   */\n  Object.defineProperty(this, \"topIndex\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  var _Opt = [];\n  Object.defineProperty(this, \"Opt\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return arrayToPdfArray(_Opt, this.objId, this.scope);\n    },\n    set: function(value) {\n      _Opt = pdfArrayToStringArray(value);\n    }\n  });\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name getOptions\n   * @function\n   * @instance\n   * @returns {array} array of Options\n   */\n  this.getOptions = function() {\n    return _Opt;\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name setOptions\n   * @function\n   * @instance\n   * @param {array} value\n   */\n  this.setOptions = function(value) {\n    _Opt = value;\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name addOption\n   * @function\n   * @instance\n   * @param {string} value\n   */\n  this.addOption = function(value) {\n    value = value || \"\";\n    value = value.toString();\n    _Opt.push(value);\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name removeOption\n   * @function\n   * @instance\n   * @param {string} value\n   * @param {boolean} allEntries (default: false)\n   */\n  this.removeOption = function(value, allEntries) {\n    allEntries = allEntries || false;\n    value = value || \"\";\n    value = value.toString();\n\n    while (_Opt.indexOf(value) !== -1) {\n      _Opt.splice(_Opt.indexOf(value), 1);\n      if (allEntries === false) {\n        break;\n      }\n    }\n  };\n\n  /**\n   * If set, the field is a combo box; if clear, the field is a list box.\n   *\n   * @name AcroFormChoiceField#combo\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"combo\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 18));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 18);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 18);\n      }\n    }\n  });\n\n  /**\n   * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.\n   *\n   * @name AcroFormChoiceField#edit\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"edit\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 19));\n    },\n    set: function(value) {\n      //PDF 32000-1:2008, page 444\n      if (this.combo === true) {\n        if (Boolean(value) === true) {\n          this.Ff = setBitForPdf(this.Ff, 19);\n        } else {\n          this.Ff = clearBitForPdf(this.Ff, 19);\n        }\n      }\n    }\n  });\n\n  /**\n   * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).\n   *\n   * @name AcroFormChoiceField#sort\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"sort\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 20));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 20);\n        _Opt.sort();\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 20);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected\n   *\n   * @name AcroFormChoiceField#multiSelect\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 22));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 22);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 22);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.\n   *\n   * @name AcroFormChoiceField#doNotSpellCheck\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.\n   * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.\n   *\n   * @name AcroFormChoiceField#commitOnSelChange\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"commitOnSelChange\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 27));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 27);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 27);\n      }\n    }\n  });\n\n  this.hasAppearanceStream = false;\n};\ninherit(AcroFormChoiceField, AcroFormField);\n\n/**\n * @class AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormListBox = function() {\n  AcroFormChoiceField.call(this);\n  this.fontName = \"helvetica\";\n\n  //PDF 32000-1:2008, page 444\n  this.combo = false;\n};\ninherit(AcroFormListBox, AcroFormChoiceField);\n\n/**\n * @class AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormComboBox = function() {\n  AcroFormListBox.call(this);\n  this.combo = true;\n};\ninherit(AcroFormComboBox, AcroFormListBox);\n\n/**\n * @class AcroFormEditBox\n * @extends AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormEditBox = function() {\n  AcroFormComboBox.call(this);\n  this.edit = true;\n};\ninherit(AcroFormEditBox, AcroFormComboBox);\n\n/**\n * @class AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormButton = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Btn\";\n\n  /**\n   * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.\n   *\n   * @name AcroFormButton#noToggleToOff\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noToggleToOff\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 15));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 15);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 15);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.\n   *\n   * @name AcroFormButton#radio\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radio\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 16));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 16);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 16);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a pushbutton that does not retain a permanent value.\n   *\n   * @name AcroFormButton#pushButton\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"pushButton\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 17));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 17);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 17);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).\n   *\n   * @name AcroFormButton#radioIsUnison\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radioIsUnison\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      if (Object.keys(_MK).length !== 0) {\n        var result = [];\n        result.push(\"<<\");\n        var key;\n        for (key in _MK) {\n          result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n        }\n        result.push(\">>\");\n        return result.join(\"\\n\");\n      }\n      return undefined;\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n};\ninherit(AcroFormButton, AcroFormField);\n\n/**\n * @class AcroFormPushButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormPushButton = function() {\n  AcroFormButton.call(this);\n  this.pushButton = true;\n};\ninherit(AcroFormPushButton, AcroFormButton);\n\n/**\n * @class AcroFormRadioButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormRadioButton = function() {\n  AcroFormButton.call(this);\n  this.radio = true;\n  this.pushButton = false;\n\n  var _Kids = [];\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Kids = value;\n      } else {\n        _Kids = [];\n      }\n    }\n  });\n};\ninherit(AcroFormRadioButton, AcroFormButton);\n\n/**\n * The Child class of a RadioButton (the radioGroup) -> The single Buttons\n *\n * @class AcroFormChildClass\n * @extends AcroFormField\n * @ignore\n */\nvar AcroFormChildClass = function() {\n  AcroFormField.call(this);\n\n  var _parent;\n  Object.defineProperty(this, \"Parent\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _parent;\n    },\n    set: function(value) {\n      _parent = value;\n    }\n  });\n\n  var _optionName;\n  Object.defineProperty(this, \"optionName\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      return _optionName;\n    },\n    set: function(value) {\n      _optionName = value;\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      var result = [];\n      result.push(\"<<\");\n      var key;\n      for (key in _MK) {\n        result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n      }\n      result.push(\">>\");\n      return result.join(\"\\n\");\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n  this.caption = \"l\";\n  this.appearanceState = \"Off\";\n  // todo: set AppearanceType as variable that can be set from the\n  // outside...\n  this._AppearanceType = AcroFormAppearance.RadioButton.Circle;\n  // The Default appearanceType is the Circle\n  this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(\n    this.optionName\n  );\n};\ninherit(AcroFormChildClass, AcroFormField);\n\nAcroFormRadioButton.prototype.setAppearance = function(appearance) {\n  if (!(\"createAppearanceStream\" in appearance && \"getCA\" in appearance)) {\n    throw new Error(\n      \"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\"\n    );\n  }\n  for (var objId in this.Kids) {\n    if (this.Kids.hasOwnProperty(objId)) {\n      var child = this.Kids[objId];\n      child.appearanceStreamContent = appearance.createAppearanceStream(\n        child.optionName\n      );\n      child.caption = appearance.getCA();\n    }\n  }\n};\n\nAcroFormRadioButton.prototype.createOption = function(name) {\n  // Create new Child for RadioGroup\n  var child = new AcroFormChildClass();\n  child.Parent = this;\n  child.optionName = name;\n  // Add to Parent\n  this.Kids.push(child);\n\n  addField.call(this.scope, child);\n\n  return child;\n};\n\n/**\n * @class AcroFormCheckBox\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormCheckBox = function() {\n  AcroFormButton.call(this);\n\n  this.fontName = \"zapfdingbats\";\n  this.caption = \"3\";\n  this.appearanceState = \"On\";\n  this.value = \"On\";\n  this.textAlign = \"center\";\n  this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();\n};\ninherit(AcroFormCheckBox, AcroFormButton);\n\n/**\n * @class AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormTextField = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Tx\";\n\n  /**\n   * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.\n   *\n   * @name AcroFormTextField#multiline\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiline\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 13));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 13);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 13);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.\n   *\n   * @name AcroFormTextField#fileSelect\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"fileSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 21));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 21);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 21);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spell-checked.\n   *\n   * @name AcroFormTextField#doNotSpellCheck\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.\n   *\n   * @name AcroFormTextField#doNotScroll\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotScroll\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 24));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 24);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 24);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.\n   *\n   * @name AcroFormTextField#comb\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"comb\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 25));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 25);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 25);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.\n   *\n   * @name AcroFormTextField#richText\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"richText\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MaxLen = null;\n  Object.defineProperty(this, \"MaxLen\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      _MaxLen = value;\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The maximum length of the field’s text, in characters.\n   *\n   * @name AcroFormTextField#maxLength\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxLength\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      if (Number.isInteger(value)) {\n        _MaxLen = value;\n      }\n    }\n  });\n\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.V || this.DV;\n    }\n  });\n};\ninherit(AcroFormTextField, AcroFormField);\n\n/**\n * @class AcroFormPasswordField\n * @extends AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormPasswordField = function() {\n  AcroFormTextField.call(this);\n\n  /**\n   * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.\n   * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.\n   *\n   * @name AcroFormTextField#password\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"password\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 14));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 14);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 14);\n      }\n    }\n  });\n  this.password = true;\n};\ninherit(AcroFormPasswordField, AcroFormTextField);\n\n// Contains Methods for creating standard appearances\nvar AcroFormAppearance = {\n  CheckBox: {\n    createAppearanceStream: function() {\n      var appearance = {\n        N: {\n          On: AcroFormAppearance.CheckBox.YesNormal\n        },\n        D: {\n          On: AcroFormAppearance.CheckBox.YesPushDown,\n          Off: AcroFormAppearance.CheckBox.OffPushDown\n        }\n      };\n\n      return appearance;\n    },\n    /**\n     * Returns the standard On Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    YesPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      stream.push(\"BMC\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(\"BT\");\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      stream.push(\"EMC\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    YesNormal: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var stream = [];\n      var height = AcroFormAppearance.internal.getHeight(formObject);\n      var width = AcroFormAppearance.internal.getWidth(formObject);\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"1 g\");\n      stream.push(\"0 0 \" + f2(width) + \" \" + f2(height) + \" re\");\n      stream.push(\"f\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\"0 0 \" + f2(width - 1) + \" \" + f2(height - 1) + \" re\");\n      stream.push(\"W\");\n      stream.push(\"n\");\n      stream.push(\"0 g\");\n      stream.push(\"BT\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    /**\n     * Returns the standard Off Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    OffPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    }\n  },\n\n  RadioButton: {\n    Circle: {\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Circle.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Circle.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Circle.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"l\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        // Make the Radius of the Circle relative to min(height, width) of formObject\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        var c = AcroFormAppearance.internal.Bezier_C;\n        var DotRadiusBezier = Number((DotRadius * c).toFixed(5));\n        /*\n         * The Following is a Circle created with Bezier-Curves.\n         */\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n        var dc = Number(\n          (DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5)\n        );\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        stream.push(\"0 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          \"\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" \" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" -\" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          dc +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    },\n\n    Cross: {\n      /**\n       * Creates the Actual AppearanceDictionary-References\n       *\n       * @param {string} name\n       * @returns {Object}\n       * @ignore\n       */\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Cross.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Cross.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Cross.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"8\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    }\n  },\n\n  /**\n   * Returns the standard Appearance\n   *\n   * @returns {AcroFormXObject}\n   */\n  createDefaultAppearanceStream: function(formObject) {\n    // Set Helvetica to Standard Font (size: auto)\n    // Color: Black\n    var fontKey = formObject.scope.internal.getFont(\n      formObject.fontName,\n      formObject.fontStyle\n    ).id;\n    var encodedColor = formObject.scope.__private__.encodeColorString(\n      formObject.color\n    );\n    var fontSize = formObject.fontSize;\n    var result = \"/\" + fontKey + \" \" + fontSize + \" Tf \" + encodedColor;\n    return result;\n  }\n};\n\nAcroFormAppearance.internal = {\n  Bezier_C: 0.551915024494,\n\n  calculateCross: function(formObject) {\n    var width = AcroFormAppearance.internal.getWidth(formObject);\n    var height = AcroFormAppearance.internal.getHeight(formObject);\n    var a = Math.min(width, height);\n\n    var cross = {\n      x1: {\n        // upperLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 + a // height - borderPadding\n      },\n      x2: {\n        // lowerRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 // borderPadding\n      },\n      x3: {\n        // lowerLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 // borderPadding\n      },\n      x4: {\n        // upperRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 + a // height - borderPadding\n      }\n    };\n\n    return cross;\n  }\n};\nAcroFormAppearance.internal.getWidth = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[2]);\n  }\n  return result;\n};\nAcroFormAppearance.internal.getHeight = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[3]);\n  }\n  return result;\n};\n\n// Public:\n\n/**\n * Add an AcroForm-Field to the jsPDF-instance\n *\n * @name addField\n * @function\n * @instance\n * @param {Object} fieldObject\n * @returns {jsPDF}\n */\nvar addField = (jsPDFAPI.addField = function(fieldObject) {\n  initializeAcroForm(this, fieldObject);\n\n  if (fieldObject instanceof AcroFormField) {\n    putForm(fieldObject);\n  } else {\n    throw new Error(\"Invalid argument passed to jsPDF.addField.\");\n  }\n  fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;\n  return this;\n});\n\njsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;\njsPDFAPI.AcroFormListBox = AcroFormListBox;\njsPDFAPI.AcroFormComboBox = AcroFormComboBox;\njsPDFAPI.AcroFormEditBox = AcroFormEditBox;\njsPDFAPI.AcroFormButton = AcroFormButton;\njsPDFAPI.AcroFormPushButton = AcroFormPushButton;\njsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;\njsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;\njsPDFAPI.AcroFormTextField = AcroFormTextField;\njsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;\njsPDFAPI.AcroFormAppearance = AcroFormAppearance;\n\njsPDFAPI.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\njsPDF.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\nvar AcroForm = jsPDF.AcroForm;\n\nexport {\n  AcroForm,\n  AcroFormChoiceField,\n  AcroFormListBox,\n  AcroFormComboBox,\n  AcroFormEditBox,\n  AcroFormButton,\n  AcroFormPushButton,\n  AcroFormRadioButton,\n  AcroFormCheckBox,\n  AcroFormTextField,\n  AcroFormPasswordField,\n  AcroFormAppearance\n};\n","function toLookup(arr) {\n  return arr.reduce(function(lookup, name, index) {\n    lookup[name] = index;\n\n    return lookup;\n  }, {});\n}\n\nvar fontStyleOrder = {\n  italic: [\"italic\", \"oblique\", \"normal\"],\n  oblique: [\"oblique\", \"italic\", \"normal\"],\n  normal: [\"normal\", \"oblique\", \"italic\"]\n};\n\nvar fontStretchOrder = [\n  \"ultra-condensed\",\n  \"extra-condensed\",\n  \"condensed\",\n  \"semi-condensed\",\n  \"normal\",\n  \"semi-expanded\",\n  \"expanded\",\n  \"extra-expanded\",\n  \"ultra-expanded\"\n];\n\n// For a given font-stretch value, we need to know where to start our search\n// from in the fontStretchOrder list.\nvar fontStretchLookup = toLookup(fontStretchOrder);\n\nvar fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];\nvar fontWeightsLookup = toLookup(fontWeights);\n\nfunction normalizeFontStretch(stretch) {\n  stretch = stretch || \"normal\";\n\n  return typeof fontStretchLookup[stretch] === \"number\" ? stretch : \"normal\";\n}\n\nfunction normalizeFontStyle(style) {\n  style = style || \"normal\";\n\n  return fontStyleOrder[style] ? style : \"normal\";\n}\n\nfunction normalizeFontWeight(weight) {\n  if (!weight) {\n    return 400;\n  }\n\n  if (typeof weight === \"number\") {\n    // Ignore values which aren't valid font-weights.\n    return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;\n  }\n\n  if (/^\\d00$/.test(weight)) {\n    return parseInt(weight);\n  }\n\n  switch (weight) {\n    case \"bold\":\n      return 700;\n\n    case \"normal\":\n    default:\n      return 400;\n  }\n}\n\nexport function normalizeFontFace(fontFace) {\n  var family = fontFace.family.replace(/\"|'/g, \"\").toLowerCase();\n\n  var style = normalizeFontStyle(fontFace.style);\n  var weight = normalizeFontWeight(fontFace.weight);\n  var stretch = normalizeFontStretch(fontFace.stretch);\n\n  return {\n    family: family,\n    style: style,\n    weight: weight,\n    stretch: stretch,\n    src: fontFace.src || [],\n\n    // The ref property maps this font-face to the font\n    // added by the .addFont() method.\n    ref: fontFace.ref || {\n      name: family,\n      style: [stretch, style, weight].join(\" \")\n    }\n  };\n}\n\n/**\n * Turns a list of font-faces into a map, for easier lookup when resolving\n * fonts.\n * @private\n */\nexport function buildFontFaceMap(fontFaces) {\n  var map = {};\n\n  for (var i = 0; i < fontFaces.length; ++i) {\n    var normalized = normalizeFontFace(fontFaces[i]);\n\n    var name = normalized.family;\n    var stretch = normalized.stretch;\n    var style = normalized.style;\n    var weight = normalized.weight;\n\n    map[name] = map[name] || {};\n\n    map[name][stretch] = map[name][stretch] || {};\n    map[name][stretch][style] = map[name][stretch][style] || {};\n    map[name][stretch][style][weight] = normalized;\n  }\n\n  return map;\n}\n\n/**\n * Searches a map of stretches, weights, etc. in the given direction and\n * then, if no match has been found, in the opposite directions.\n *\n * @param {Object.<string, any>} matchingSet A map of the various font variations.\n * @param {any[]} order The order of the different variations\n * @param {number} pivot The starting point of the search in the order list.\n * @param {number} dir The initial direction of the search (desc = -1, asc = 1)\n * @private\n */\n\nfunction searchFromPivot(matchingSet, order, pivot, dir) {\n  var i;\n\n  for (i = pivot; i >= 0 && i < order.length; i += dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n\n  for (i = pivot; i >= 0 && i < order.length; i -= dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n}\n\nfunction resolveFontStretch(stretch, matchingSet) {\n  if (matchingSet[stretch]) {\n    return matchingSet[stretch];\n  }\n\n  var pivot = fontStretchLookup[stretch];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = pivot <= fontStretchLookup[\"normal\"] ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-stretch value for \" + stretch\n    );\n  }\n\n  return match;\n}\n\nfunction resolveFontStyle(fontStyle, matchingSet) {\n  if (matchingSet[fontStyle]) {\n    return matchingSet[fontStyle];\n  }\n\n  var ordering = fontStyleOrder[fontStyle];\n\n  for (var i = 0; i < ordering.length; ++i) {\n    if (matchingSet[ordering[i]]) {\n      return matchingSet[ordering[i]];\n    }\n  }\n\n  // Since a font-family cannot exist without having at least one style value\n  // we should never reach this point.\n  throw new Error(\"Could not find a matching font-style for \" + fontStyle);\n}\n\nfunction resolveFontWeight(weight, matchingSet) {\n  if (matchingSet[weight]) {\n    return matchingSet[weight];\n  }\n\n  if (weight === 400 && matchingSet[500]) {\n    return matchingSet[500];\n  }\n\n  if (weight === 500 && matchingSet[400]) {\n    return matchingSet[400];\n  }\n\n  var pivot = fontWeightsLookup[weight];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = weight < 400 ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-weight for value \" + weight\n    );\n  }\n\n  return match;\n}\n\nvar defaultGenericFontFamilies = {\n  \"sans-serif\": \"helvetica\",\n  fixed: \"courier\",\n  monospace: \"courier\",\n  terminal: \"courier\",\n  cursive: \"times\",\n  fantasy: \"times\",\n  serif: \"times\"\n};\n\nvar systemFonts = {\n  caption: \"times\",\n  icon: \"times\",\n  menu: \"times\",\n  \"message-box\": \"times\",\n  \"small-caption\": \"times\",\n  \"status-bar\": \"times\"\n};\n\nfunction ruleToString(rule) {\n  return [rule.stretch, rule.style, rule.weight, rule.family].join(\" \");\n}\n\nexport function resolveFontFace(fontFaceMap, rules, opts) {\n  opts = opts || {};\n\n  var defaultFontFamily = opts.defaultFontFamily || \"times\";\n  var genericFontFamilies = Object.assign(\n    {},\n    defaultGenericFontFamilies,\n    opts.genericFontFamilies || {}\n  );\n\n  var rule = null;\n  var matches = null;\n\n  for (var i = 0; i < rules.length; ++i) {\n    rule = normalizeFontFace(rules[i]);\n\n    if (genericFontFamilies[rule.family]) {\n      rule.family = genericFontFamilies[rule.family];\n    }\n\n    if (fontFaceMap.hasOwnProperty(rule.family)) {\n      matches = fontFaceMap[rule.family];\n\n      break;\n    }\n  }\n\n  // Always fallback to a known font family.\n  matches = matches || fontFaceMap[defaultFontFamily];\n\n  if (!matches) {\n    // At this point we should definitiely have a font family, but if we\n    // don't there is something wrong with our configuration\n    throw new Error(\n      \"Could not find a font-family for the rule '\" +\n        ruleToString(rule) +\n        \"' and default family '\" +\n        defaultFontFamily +\n        \"'.\"\n    );\n  }\n\n  matches = resolveFontStretch(rule.stretch, matches);\n  matches = resolveFontStyle(rule.style, matches);\n  matches = resolveFontWeight(rule.weight, matches);\n\n  if (!matches) {\n    // We should've fount\n    throw new Error(\n      \"Failed to resolve a font for the rule '\" + ruleToString(rule) + \"'.\"\n    );\n  }\n\n  return matches;\n}\n\n/**\n * Builds a style id for use with the addFont() method.\n * @param {FontFace} font\n * @private\n */\nexport function toStyleName(font) {\n  return [font.weight, font.style, font.stretch].join(\" \");\n}\n\nfunction eatWhiteSpace(input) {\n  return input.trimLeft();\n}\n\nfunction parseQuotedFontFamily(input, quote) {\n  var index = 0;\n\n  while (index < input.length) {\n    var current = input.charAt(index);\n\n    if (current === quote) {\n      return [input.substring(0, index), input.substring(index + 1)];\n    }\n\n    index += 1;\n  }\n\n  // Unexpected end of input\n  return null;\n}\n\nfunction parseNonQuotedFontFamily(input) {\n  // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n  //\n  // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.\n  //\n  // Breakdown of regexp:\n  // -[a-z_]     - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit\n  // [a-z_]      - allow a-z and underscore at beginning of input\n  // [a-z0-9_-]* - after that, anything goes\n  var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);\n\n  // non quoted value contains illegal characters\n  if (match === null) {\n    return null;\n  }\n\n  return [match[0], input.substring(match[0].length)];\n}\n\nvar defaultFont = [\"times\"];\n\nexport function parseFontFamily(input) {\n  var result = [];\n  var ch, parsed;\n  var remaining = input.trim();\n\n  if (remaining === \"\") {\n    return defaultFont;\n  }\n\n  if (remaining in systemFonts) {\n    return [systemFonts[remaining]];\n  }\n\n  while (remaining !== \"\") {\n    parsed = null;\n    remaining = eatWhiteSpace(remaining);\n    ch = remaining.charAt(0);\n\n    switch (ch) {\n      case '\"':\n      case \"'\":\n        parsed = parseQuotedFontFamily(remaining.substring(1), ch);\n        break;\n\n      default:\n        parsed = parseNonQuotedFontFamily(remaining);\n        break;\n    }\n\n    if (parsed === null) {\n      return defaultFont;\n    }\n\n    result.push(parsed[0]);\n\n    remaining = eatWhiteSpace(parsed[1]);\n\n    // We expect end of input or a comma separator here\n    if (remaining !== \"\" && remaining.charAt(0) !== \",\") {\n      return defaultFont;\n    }\n\n    remaining = remaining.replace(/^,/, \"\");\n  }\n\n  return result;\n}\n","/** @license\n * jsPDF addImage plugin\n * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/\n *               2013 Chris Dowling, https://github.com/gingerchris\n *               2013 Trinh Ho, https://github.com/ineedfat\n *               2013 Edwin Alejandro Perez, https://github.com/eaparango\n *               2013 Norah Smith, https://github.com/burnburnrocket\n *               2014 Diego Casorran, https://github.com/diegocr\n *               2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * @name addImage\n * @module\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob, btoa } from \"../libs/AtobBtoa.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namespace = \"addImage_\";\n  jsPDFAPI.__addimage__ = {};\n\n  var UNKNOWN = \"UNKNOWN\";\n\n  // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.\n  // With too small batch iteration will be slow as more calls are made,\n  // higher values cause larger and slower garbage collection.\n  var ARRAY_APPLY_BATCH = 8192;\n\n  var imageFileTypeHeaders = {\n    PNG: [[0x89, 0x50, 0x4e, 0x47]],\n    TIFF: [\n      [0x4d, 0x4d, 0x00, 0x2a], //Motorola\n      [0x49, 0x49, 0x2a, 0x00] //Intel\n    ],\n    JPEG: [\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe0,\n        undefined,\n        undefined,\n        0x4a,\n        0x46,\n        0x49,\n        0x46,\n        0x00\n      ], //JFIF\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe1,\n        undefined,\n        undefined,\n        0x45,\n        0x78,\n        0x69,\n        0x66,\n        0x00,\n        0x00\n      ], //Exif\n      [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW\n      [0xff, 0xd8, 0xff, 0xee] //EXIF RAW\n    ],\n    JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],\n    GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],\n    GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],\n    WEBP: [\n      [\n        0x52,\n        0x49,\n        0x46,\n        0x46,\n        undefined,\n        undefined,\n        undefined,\n        undefined,\n        0x57,\n        0x45,\n        0x42,\n        0x50\n      ]\n    ],\n    BMP: [\n      [0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.\n      [0x42, 0x41], //BA - OS/2 struct bitmap array\n      [0x43, 0x49], //CI - OS/2 struct color icon\n      [0x43, 0x50], //CP - OS/2 const color pointer\n      [0x49, 0x43], //IC - OS/2 struct icon\n      [0x50, 0x54] //PT - OS/2 pointer\n    ]\n  };\n\n  /**\n   * Recognize filetype of Image by magic-bytes\n   *\n   * https://en.wikipedia.org/wiki/List_of_file_signatures\n   *\n   * @name getImageFileTypeByImageData\n   * @public\n   * @function\n   * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer\n   * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'\n   *\n   * @returns {string} filetype of Image\n   */\n  var getImageFileTypeByImageData = (jsPDFAPI.__addimage__.getImageFileTypeByImageData = function(\n    imageData,\n    fallbackFormat\n  ) {\n    fallbackFormat = fallbackFormat || UNKNOWN;\n    var i;\n    var j;\n    var result = UNKNOWN;\n    var headerSchemata;\n    var compareResult;\n    var fileType;\n\n    if (\n      fallbackFormat === \"RGBA\" ||\n      (imageData.data !== undefined &&\n        imageData.data instanceof Uint8ClampedArray &&\n        \"height\" in imageData &&\n        \"width\" in imageData)\n    ) {\n      return \"RGBA\";\n    }\n\n    if (isArrayBufferView(imageData)) {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData[j]) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    } else {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    }\n\n    if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {\n      result = fallbackFormat;\n    }\n    return result;\n  });\n\n  // Image functionality ported from pdf.js\n  var putImage = function(image) {\n    var out = this.internal.write;\n    var putStream = this.internal.putStream;\n    var getFilters = this.internal.getFilters;\n\n    var filter = getFilters();\n    while (filter.indexOf(\"FlateEncode\") !== -1) {\n      filter.splice(filter.indexOf(\"FlateEncode\"), 1);\n    }\n\n    image.objectId = this.internal.newObject();\n\n    var additionalKeyValues = [];\n    additionalKeyValues.push({ key: \"Type\", value: \"/XObject\" });\n    additionalKeyValues.push({ key: \"Subtype\", value: \"/Image\" });\n    additionalKeyValues.push({ key: \"Width\", value: image.width });\n    additionalKeyValues.push({ key: \"Height\", value: image.height });\n\n    if (image.colorSpace === color_spaces.INDEXED) {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value:\n          \"[/Indexed /DeviceRGB \" +\n          // if an indexed png defines more than one colour with transparency, we've created a sMask\n          (image.palette.length / 3 - 1) +\n          \" \" +\n          (\"sMask\" in image && typeof image.sMask !== \"undefined\"\n            ? image.objectId + 2\n            : image.objectId + 1) +\n          \" 0 R]\"\n      });\n    } else {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value: \"/\" + image.colorSpace\n      });\n      if (image.colorSpace === color_spaces.DEVICE_CMYK) {\n        additionalKeyValues.push({ key: \"Decode\", value: \"[1 0 1 0 1 0 1 0]\" });\n      }\n    }\n    additionalKeyValues.push({\n      key: \"BitsPerComponent\",\n      value: image.bitsPerComponent\n    });\n    if (\n      \"decodeParameters\" in image &&\n      typeof image.decodeParameters !== \"undefined\"\n    ) {\n      additionalKeyValues.push({\n        key: \"DecodeParms\",\n        value: \"<<\" + image.decodeParameters + \">>\"\n      });\n    }\n    if (\"transparency\" in image && Array.isArray(image.transparency)) {\n      var transparency = \"\",\n        i = 0,\n        len = image.transparency.length;\n      for (; i < len; i++)\n        transparency +=\n          image.transparency[i] + \" \" + image.transparency[i] + \" \";\n\n      additionalKeyValues.push({\n        key: \"Mask\",\n        value: \"[\" + transparency + \"]\"\n      });\n    }\n    if (typeof image.sMask !== \"undefined\") {\n      additionalKeyValues.push({\n        key: \"SMask\",\n        value: image.objectId + 1 + \" 0 R\"\n      });\n    }\n\n    var alreadyAppliedFilters =\n      typeof image.filter !== \"undefined\" ? [\"/\" + image.filter] : undefined;\n\n    putStream({\n      data: image.data,\n      additionalKeyValues: additionalKeyValues,\n      alreadyAppliedFilters: alreadyAppliedFilters,\n      objectId: image.objectId\n    });\n\n    out(\"endobj\");\n\n    // Soft mask\n    if (\"sMask\" in image && typeof image.sMask !== \"undefined\") {\n      var decodeParameters =\n        \"/Predictor \" +\n        image.predictor +\n        \" /Colors 1 /BitsPerComponent \" +\n        image.bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n      var sMask = {\n        width: image.width,\n        height: image.height,\n        colorSpace: \"DeviceGray\",\n        bitsPerComponent: image.bitsPerComponent,\n        decodeParameters: decodeParameters,\n        data: image.sMask\n      };\n      if (\"filter\" in image) {\n        sMask.filter = image.filter;\n      }\n      putImage.call(this, sMask);\n    }\n\n    //Palette\n    if (image.colorSpace === color_spaces.INDEXED) {\n      var objId = this.internal.newObject();\n      //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');\n      //putStream(zlib.compress(img['pal']));\n      putStream({\n        data: arrayBufferToBinaryString(new Uint8Array(image.palette)),\n        objectId: objId\n      });\n      out(\"endobj\");\n    }\n  };\n  var putResourcesCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    for (var i in images) {\n      putImage.call(this, images[i]);\n    }\n  };\n  var putXObjectsDictCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"],\n      out = this.internal.write,\n      image;\n    for (var i in images) {\n      image = images[i];\n      out(\"/I\" + image.index, image.objectId, \"0\", \"R\");\n    }\n  };\n\n  var checkCompressValue = function(value) {\n    if (value && typeof value === \"string\") value = value.toUpperCase();\n    return value in jsPDFAPI.image_compression ? value : image_compression.NONE;\n  };\n\n  var initialize = function() {\n    if (!this.internal.collections[namespace + \"images\"]) {\n      this.internal.collections[namespace + \"images\"] = {};\n      this.internal.events.subscribe(\"putResources\", putResourcesCallback);\n      this.internal.events.subscribe(\"putXobjectDict\", putXObjectsDictCallback);\n    }\n  };\n\n  var getImages = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    initialize.call(this);\n    return images;\n  };\n  var getImageIndex = function() {\n    return Object.keys(this.internal.collections[namespace + \"images\"]).length;\n  };\n  var notDefined = function(value) {\n    return typeof value === \"undefined\" || value === null || value.length === 0;\n  };\n  var generateAliasFromImageData = function(imageData) {\n    if (typeof imageData === \"string\" || isArrayBufferView(imageData)) {\n      return sHashCode(imageData);\n    } else if (isArrayBufferView(imageData.data)) {\n      return sHashCode(imageData.data);\n    }\n\n    return null;\n  };\n\n  var isImageTypeSupported = function(type) {\n    return typeof jsPDFAPI[\"process\" + type.toUpperCase()] === \"function\";\n  };\n\n  var isDOMElement = function(object) {\n    return typeof object === \"object\" && object.nodeType === 1;\n  };\n\n  var getImageDataFromElement = function(element, format) {\n    //if element is an image which uses data url definition, just return the dataurl\n    if (element.nodeName === \"IMG\" && element.hasAttribute(\"src\")) {\n      var src = \"\" + element.getAttribute(\"src\");\n\n      //is base64 encoded dataUrl, directly process it\n      if (src.indexOf(\"data:image/\") === 0) {\n        return atob(\n          unescape(src)\n            .split(\"base64,\")\n            .pop()\n        );\n      }\n\n      //it is probably an url, try to load it\n      var tmpImageData = jsPDFAPI.loadFile(src, true);\n      if (tmpImageData !== undefined) {\n        return tmpImageData;\n      }\n    }\n\n    if (element.nodeName === \"CANVAS\") {\n      if (element.width === 0 || element.height === 0) {\n        throw new Error(\n          \"Given canvas must have data. Canvas width: \" +\n            element.width +\n            \", height: \" +\n            element.height\n        );\n      }\n      var mimeType;\n      switch (format) {\n        case \"PNG\":\n          mimeType = \"image/png\";\n          break;\n        case \"WEBP\":\n          mimeType = \"image/webp\";\n          break;\n        case \"JPEG\":\n        case \"JPG\":\n        default:\n          mimeType = \"image/jpeg\";\n          break;\n      }\n      return atob(\n        element\n          .toDataURL(mimeType, 1.0)\n          .split(\"base64,\")\n          .pop()\n      );\n    }\n  };\n\n  var checkImagesForAlias = function(alias) {\n    var images = this.internal.collections[namespace + \"images\"];\n    if (images) {\n      for (var e in images) {\n        if (alias === images[e].alias) {\n          return images[e];\n        }\n      }\n    }\n  };\n\n  var determineWidthAndHeight = function(width, height, image) {\n    if (!width && !height) {\n      width = -96;\n      height = -96;\n    }\n    if (width < 0) {\n      width = (-1 * image.width * 72) / width / this.internal.scaleFactor;\n    }\n    if (height < 0) {\n      height = (-1 * image.height * 72) / height / this.internal.scaleFactor;\n    }\n    if (width === 0) {\n      width = (height * image.width) / image.height;\n    }\n    if (height === 0) {\n      height = (width * image.height) / image.width;\n    }\n\n    return [width, height];\n  };\n\n  var writeImageToPDF = function(x, y, width, height, image, rotation) {\n    var dims = determineWidthAndHeight.call(this, width, height, image),\n      coord = this.internal.getCoordinateString,\n      vcoord = this.internal.getVerticalCoordinateString;\n\n    var images = getImages.call(this);\n\n    width = dims[0];\n    height = dims[1];\n    images[image.index] = image;\n\n    if (rotation) {\n      rotation *= Math.PI / 180;\n      var c = Math.cos(rotation);\n      var s = Math.sin(rotation);\n      //like in pdf Reference do it 4 digits instead of 2\n      var f4 = function(number) {\n        return number.toFixed(4);\n      };\n      var rotationTransformationMatrix = [\n        f4(c),\n        f4(s),\n        f4(s * -1),\n        f4(c),\n        0,\n        0,\n        \"cm\"\n      ];\n    }\n    this.internal.write(\"q\"); //Save graphics state\n    if (rotation) {\n      this.internal.write(\n        [1, \"0\", \"0\", 1, coord(x), vcoord(y + height), \"cm\"].join(\" \")\n      ); //Translate\n      this.internal.write(rotationTransformationMatrix.join(\" \")); //Rotate\n      this.internal.write(\n        [coord(width), \"0\", \"0\", coord(height), \"0\", \"0\", \"cm\"].join(\" \")\n      ); //Scale\n    } else {\n      this.internal.write(\n        [\n          coord(width),\n          \"0\",\n          \"0\",\n          coord(height),\n          coord(x),\n          vcoord(y + height),\n          \"cm\"\n        ].join(\" \")\n      ); //Translate and Scale\n    }\n\n    if (this.isAdvancedAPI()) {\n      // draw image bottom up when in \"advanced\" API mode\n      this.internal.write([1, 0, 0, -1, 0, 0, \"cm\"].join(\" \"));\n    }\n\n    this.internal.write(\"/I\" + image.index + \" Do\"); //Paint Image\n    this.internal.write(\"Q\"); //Restore graphics state\n  };\n\n  /**\n   * COLOR SPACES\n   */\n  var color_spaces = (jsPDFAPI.color_spaces = {\n    DEVICE_RGB: \"DeviceRGB\",\n    DEVICE_GRAY: \"DeviceGray\",\n    DEVICE_CMYK: \"DeviceCMYK\",\n    CAL_GREY: \"CalGray\",\n    CAL_RGB: \"CalRGB\",\n    LAB: \"Lab\",\n    ICC_BASED: \"ICCBased\",\n    INDEXED: \"Indexed\",\n    PATTERN: \"Pattern\",\n    SEPARATION: \"Separation\",\n    DEVICE_N: \"DeviceN\"\n  });\n\n  /**\n   * DECODE METHODS\n   */\n  jsPDFAPI.decode = {\n    DCT_DECODE: \"DCTDecode\",\n    FLATE_DECODE: \"FlateDecode\",\n    LZW_DECODE: \"LZWDecode\",\n    JPX_DECODE: \"JPXDecode\",\n    JBIG2_DECODE: \"JBIG2Decode\",\n    ASCII85_DECODE: \"ASCII85Decode\",\n    ASCII_HEX_DECODE: \"ASCIIHexDecode\",\n    RUN_LENGTH_DECODE: \"RunLengthDecode\",\n    CCITT_FAX_DECODE: \"CCITTFaxDecode\"\n  };\n\n  /**\n   * IMAGE COMPRESSION TYPES\n   */\n  var image_compression = (jsPDFAPI.image_compression = {\n    NONE: \"NONE\",\n    FAST: \"FAST\",\n    MEDIUM: \"MEDIUM\",\n    SLOW: \"SLOW\"\n  });\n\n  /**\n   * @name sHashCode\n   * @function\n   * @param {string} data\n   * @returns {string}\n   */\n  var sHashCode = (jsPDFAPI.__addimage__.sHashCode = function(data) {\n    var hash = 0,\n      i,\n      len;\n\n    if (typeof data === \"string\") {\n      len = data.length;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data.charCodeAt(i);\n        hash |= 0; // Convert to 32bit integer\n      }\n    } else if (isArrayBufferView(data)) {\n      len = data.byteLength / 2;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data[i];\n        hash |= 0; // Convert to 32bit integer\n      }\n    }\n    return hash;\n  });\n\n  /**\n   * Validates if given String is a valid Base64-String\n   *\n   * @name validateStringAsBase64\n   * @public\n   * @function\n   * @param {String} possible Base64-String\n   *\n   * @returns {boolean}\n   */\n  var validateStringAsBase64 = (jsPDFAPI.__addimage__.validateStringAsBase64 = function(\n    possibleBase64String\n  ) {\n    possibleBase64String = possibleBase64String || \"\";\n    possibleBase64String.toString().trim();\n\n    var result = true;\n\n    if (possibleBase64String.length === 0) {\n      result = false;\n    }\n\n    if (possibleBase64String.length % 4 !== 0) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9+/]+$/.test(\n        possibleBase64String.substr(0, possibleBase64String.length - 2)\n      ) === false\n    ) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(\n        possibleBase64String.substr(-2)\n      ) === false\n    ) {\n      result = false;\n    }\n    return result;\n  });\n\n  /**\n   * Strips out and returns info from a valid base64 data URI\n   *\n   * @name extractImageFromDataUrl\n   * @function\n   * @param {string} dataUrl a valid data URI of format 'data:[<MIME-type>][;base64],<data>'\n   * @returns {Array}an Array containing the following\n   * [0] the complete data URI\n   * [1] <MIME-type>\n   * [2] format - the second part of the mime-type i.e 'png' in 'image/png'\n   * [4] <data>\n   */\n  var extractImageFromDataUrl = (jsPDFAPI.__addimage__.extractImageFromDataUrl = function(\n    dataUrl\n  ) {\n    dataUrl = dataUrl || \"\";\n    var dataUrlParts = dataUrl.split(\"base64,\");\n    var result = null;\n\n    if (dataUrlParts.length === 2) {\n      var extractedInfo = /^data:(\\w*\\/\\w*);*(charset=(?!charset=)[\\w=-]*)*;*$/.exec(\n        dataUrlParts[0]\n      );\n      if (Array.isArray(extractedInfo)) {\n        result = {\n          mimeType: extractedInfo[1],\n          charset: extractedInfo[2],\n          data: dataUrlParts[1]\n        };\n      }\n    }\n    return result;\n  });\n\n  /**\n   * Check to see if ArrayBuffer is supported\n   *\n   * @name supportsArrayBuffer\n   * @function\n   * @returns {boolean}\n   */\n  var supportsArrayBuffer = (jsPDFAPI.__addimage__.supportsArrayBuffer = function() {\n    return (\n      typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\"\n    );\n  });\n\n  /**\n   * Tests supplied object to determine if ArrayBuffer\n   *\n   * @name isArrayBuffer\n   * @function\n   * @param {Object} object an Object\n   *\n   * @returns {boolean}\n   */\n  jsPDFAPI.__addimage__.isArrayBuffer = function(object) {\n    return supportsArrayBuffer() && object instanceof ArrayBuffer;\n  };\n\n  /**\n   * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface\n   *\n   * @name isArrayBufferView\n   * @function\n   * @param {Object} object an Object\n   * @returns {boolean}\n   */\n  var isArrayBufferView = (jsPDFAPI.__addimage__.isArrayBufferView = function(\n    object\n  ) {\n    return (\n      supportsArrayBuffer() &&\n      typeof Uint32Array !== \"undefined\" &&\n      (object instanceof Int8Array ||\n        object instanceof Uint8Array ||\n        (typeof Uint8ClampedArray !== \"undefined\" &&\n          object instanceof Uint8ClampedArray) ||\n        object instanceof Int16Array ||\n        object instanceof Uint16Array ||\n        object instanceof Int32Array ||\n        object instanceof Uint32Array ||\n        object instanceof Float32Array ||\n        object instanceof Float64Array)\n    );\n  });\n\n  /**\n   * Convert Binary String to ArrayBuffer\n   *\n   * @name binaryStringToUint8Array\n   * @public\n   * @function\n   * @param {string} BinaryString with ImageData\n   * @returns {Uint8Array}\n   */\n  var binaryStringToUint8Array = (jsPDFAPI.__addimage__.binaryStringToUint8Array = function(\n    binary_string\n  ) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  });\n\n  /**\n   * Convert the Buffer to a Binary String\n   *\n   * @name arrayBufferToBinaryString\n   * @public\n   * @function\n   * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData\n   *\n   * @returns {String}\n   */\n  var arrayBufferToBinaryString = (jsPDFAPI.__addimage__.arrayBufferToBinaryString = function(\n    buffer\n  ) {\n    var out = \"\";\n    // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.\n    // Do not copy the array if input is already an array.\n    var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);\n    for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {\n      // Limit the amount of characters being parsed to prevent overflow.\n      // Note that while TextDecoder would be faster, it does not have the same\n      // functionality as fromCharCode with any provided encodings as of 3/2021.\n      out += String.fromCharCode.apply(\n        null,\n        buf.subarray(i, i + ARRAY_APPLY_BATCH)\n      );\n    }\n    return out;\n  });\n\n  /**\n   * Possible parameter for addImage, an RGBA buffer with size.\n   *\n   * @typedef {Object} RGBAData\n   * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.\n   * @property {number} width - Image width as the data does not carry this information in itself.\n   * @property {number} height - Image height as the data does not carry this information in itself.\n   */\n\n  /**\n   * Adds an Image to the PDF.\n   *\n   * @name addImage\n   * @public\n   * @function\n   * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).\n   * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'\n   * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width width of the image (in units declared at inception of PDF document)\n   * @param {number} height height of the Image (in units declared at inception of PDF document)\n   * @param {string} alias alias of the image (if used multiple times)\n   * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF\n   */\n  jsPDFAPI.addImage = function() {\n    var imageData, format, x, y, w, h, alias, compression, rotation;\n\n    imageData = arguments[0];\n    if (typeof arguments[1] === \"number\") {\n      format = UNKNOWN;\n      x = arguments[1];\n      y = arguments[2];\n      w = arguments[3];\n      h = arguments[4];\n      alias = arguments[5];\n      compression = arguments[6];\n      rotation = arguments[7];\n    } else {\n      format = arguments[1];\n      x = arguments[2];\n      y = arguments[3];\n      w = arguments[4];\n      h = arguments[5];\n      alias = arguments[6];\n      compression = arguments[7];\n      rotation = arguments[8];\n    }\n\n    if (\n      typeof imageData === \"object\" &&\n      !isDOMElement(imageData) &&\n      \"imageData\" in imageData\n    ) {\n      var options = imageData;\n\n      imageData = options.imageData;\n      format = options.format || format || UNKNOWN;\n      x = options.x || x || 0;\n      y = options.y || y || 0;\n      w = options.w || options.width || w;\n      h = options.h || options.height || h;\n      alias = options.alias || alias;\n      compression = options.compression || compression;\n      rotation = options.rotation || options.angle || rotation;\n    }\n\n    //If compression is not explicitly set, determine if we should use compression\n    var filter = this.internal.getFilters();\n    if (compression === undefined && filter.indexOf(\"FlateEncode\") !== -1) {\n      compression = \"SLOW\";\n    }\n\n    if (isNaN(x) || isNaN(y)) {\n      throw new Error(\"Invalid coordinates passed to jsPDF.addImage\");\n    }\n\n    initialize.call(this);\n\n    var image = processImageData.call(\n      this,\n      imageData,\n      format,\n      alias,\n      compression\n    );\n\n    writeImageToPDF.call(this, x, y, w, h, image, rotation);\n\n    return this;\n  };\n\n  var processImageData = function(imageData, format, alias, compression) {\n    var result, dataAsBinaryString;\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      imageData = unescape(imageData);\n      var tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData !== \"\") {\n        imageData = tmpImageData;\n      } else {\n        tmpImageData = jsPDFAPI.loadFile(imageData, true);\n        if (tmpImageData !== undefined) {\n          imageData = tmpImageData;\n        }\n      }\n    }\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData, format);\n    }\n\n    format = getImageFileTypeByImageData(imageData, format);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    // now do the heavy lifting\n\n    if (notDefined(alias)) {\n      alias = generateAliasFromImageData(imageData);\n    }\n    result = checkImagesForAlias.call(this, alias);\n\n    if (!result) {\n      if (supportsArrayBuffer()) {\n        // no need to convert if imageData is already uint8array\n        if (!(imageData instanceof Uint8Array) && format !== \"RGBA\") {\n          dataAsBinaryString = imageData;\n          imageData = binaryStringToUint8Array(imageData);\n        }\n      }\n\n      result = this[\"process\" + format.toUpperCase()](\n        imageData,\n        getImageIndex.call(this),\n        alias,\n        checkCompressValue(compression),\n        dataAsBinaryString\n      );\n    }\n\n    if (!result) {\n      throw new Error(\"An unknown error occurred whilst processing the image.\");\n    }\n    return result;\n  };\n\n  /**\n   * @name convertBase64ToBinaryString\n   * @function\n   * @param {string} stringData\n   * @returns {string} binary string\n   */\n  var convertBase64ToBinaryString = (jsPDFAPI.__addimage__.convertBase64ToBinaryString = function(\n    stringData,\n    throwError\n  ) {\n    throwError = typeof throwError === \"boolean\" ? throwError : true;\n    var base64Info;\n    var imageData = \"\";\n    var rawData;\n\n    if (typeof stringData === \"string\") {\n      base64Info = extractImageFromDataUrl(stringData);\n      rawData = base64Info !== null ? base64Info.data : stringData;\n\n      try {\n        imageData = atob(rawData);\n      } catch (e) {\n        if (throwError) {\n          if (!validateStringAsBase64(rawData)) {\n            throw new Error(\n              \"Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString \"\n            );\n          } else {\n            throw new Error(\n              \"atob-Error in jsPDF.convertBase64ToBinaryString \" + e.message\n            );\n          }\n        }\n      }\n    }\n    return imageData;\n  });\n\n  /**\n   * @name getImageProperties\n   * @function\n   * @param {Object} imageData\n   * @returns {Object}\n   */\n  jsPDFAPI.getImageProperties = function(imageData) {\n    var image;\n    var tmpImageData = \"\";\n    var format;\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData);\n    }\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData === \"\") {\n        tmpImageData = jsPDFAPI.loadFile(imageData) || \"\";\n      }\n      imageData = tmpImageData;\n    }\n\n    format = getImageFileTypeByImageData(imageData);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {\n      imageData = binaryStringToUint8Array(imageData);\n    }\n\n    image = this[\"process\" + format.toUpperCase()](imageData);\n\n    if (!image) {\n      throw new Error(\"An unknown error occurred whilst processing the image\");\n    }\n\n    image.fileType = format;\n\n    return image;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF Annotations PlugIn\n *\n * There are many types of annotations in a PDF document. Annotations are placed\n * on a page at a particular location. They are not 'attached' to an object.\n * <br />\n * This plugin current supports <br />\n * <li> Goto Page (set pageNumber and top in options)\n * <li> Goto Name (set name and top in options)\n * <li> Goto URL (set url in options)\n * <p>\n * \tThe destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below)\n *  (set magFactor in options).  XYZ is the default.\n * </p>\n * <p>\n *  Links, Text, Popup, and FreeText are supported.\n * </p>\n * <p>\n * Options In PDF spec Not Implemented Yet\n * <li> link border\n * <li> named target\n * <li> page coordinates\n * <li> destination page scaling and layout\n * <li> actions other than URL and GotoPage\n * <li> background / hover actions\n * </p>\n * @name annotations\n * @module\n */\n\n/*\n    Destination Magnification Factors\n    See PDF 1.3 Page 386 for meanings and options\n\n    [supported]\n\tXYZ (options; left top zoom)\n\tFit (no options)\n\tFitH (options: top)\n\tFitV (options: left)\n\n\t[not supported]\n\tFitR\n\tFitB\n\tFitBH\n\tFitBV\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var notEmpty = function(obj) {\n    if (typeof obj != \"undefined\") {\n      if (obj != \"\") {\n        return true;\n      }\n    }\n  };\n\n  jsPDF.API.events.push([\n    \"addPage\",\n    function(addPageData) {\n      var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);\n      pageInfo.pageContext.annotations = [];\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putPage\",\n    function(putPageData) {\n      var getHorizontalCoordinateString = this.internal.getCoordinateString;\n      var getVerticalCoordinateString = this.internal\n        .getVerticalCoordinateString;\n      var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);\n      var pageAnnos = putPageData.pageContext.annotations;\n\n      var anno, rect, line;\n      var found = false;\n      for (var a = 0; a < pageAnnos.length && !found; a++) {\n        anno = pageAnnos[a];\n        switch (anno.type) {\n          case \"link\":\n            if (\n              notEmpty(anno.options.url) ||\n              notEmpty(anno.options.pageNumber)\n            ) {\n              found = true;\n            }\n            break;\n          case \"reference\":\n          case \"text\":\n          case \"freetext\":\n            found = true;\n            break;\n        }\n      }\n      if (found == false) {\n        return;\n      }\n\n      this.internal.write(\"/Annots [\");\n      for (var i = 0; i < pageAnnos.length; i++) {\n        anno = pageAnnos[i];\n        var escape = this.internal.pdfEscape;\n        var encryptor = this.internal.getEncryptor(putPageData.objId);\n\n        switch (anno.type) {\n          case \"reference\":\n            // References to Widget Annotations (for AcroForm Fields)\n            this.internal.write(\" \" + anno.object.objId + \" 0 R \");\n            break;\n          case \"text\":\n            // Create a an object for both the text and the popup\n            var objText = this.internal.newAdditionalObject();\n            var objPopup = this.internal.newAdditionalObject();\n            var encryptorText = this.internal.getEncryptor(objText.objId);\n\n            var title = anno.title || \"Note\";\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Text\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptorText(anno.contents)) +\n              \")\";\n            line += \" /Popup \" + objPopup.objId + \" 0 R\";\n            line += \" /P \" + pageInfo.objId + \" 0 R\";\n            line += \" /T (\" + escape(encryptorText(title)) + \") >>\";\n            objText.content = line;\n\n            var parent = objText.objId + \" 0 R\";\n            var popoff = 30;\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x + popoff) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(\n                anno.bounds.x + anno.bounds.w + popoff\n              ) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Popup\" +\n              \" \" +\n              rect +\n              \" /Parent \" +\n              parent;\n            if (anno.open) {\n              line += \" /Open true\";\n            }\n            line += \" >>\";\n            objPopup.content = line;\n\n            this.internal.write(objText.objId, \"0 R\", objPopup.objId, \"0 R\");\n\n            break;\n          case \"freetext\":\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \"] \";\n            var color = anno.color || \"#000000\";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"FreeText\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptor(anno.contents)) +\n              \")\";\n            line +=\n              \" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#\" +\n              color +\n              \")\";\n            line += \" /Border [0 0 0]\";\n            line += \" >>\";\n            this.internal.write(line);\n            break;\n          case \"link\":\n            if (anno.options.name) {\n              var loc = this.annotations._nameMap[anno.options.name];\n              anno.options.pageNumber = loc.page;\n              anno.options.top = loc.y;\n            } else {\n              if (!anno.options.top) {\n                anno.options.top = 0;\n              }\n            }\n\n            rect =\n              \"/Rect [\" +\n              anno.finalBounds.x +\n              \" \" +\n              anno.finalBounds.y +\n              \" \" +\n              anno.finalBounds.w +\n              \" \" +\n              anno.finalBounds.h +\n              \"] \";\n\n            line = \"\";\n            if (anno.options.url) {\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /A <</S /URI /URI (\" +\n                escape(encryptor(anno.options.url)) +\n                \") >>\";\n            } else if (anno.options.pageNumber) {\n              // first page is 0\n              var info = this.internal.getPageInfo(anno.options.pageNumber);\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /Dest [\" +\n                info.objId +\n                \" 0 R\";\n              anno.options.magFactor = anno.options.magFactor || \"XYZ\";\n              switch (anno.options.magFactor) {\n                case \"Fit\":\n                  line += \" /Fit]\";\n                  break;\n                case \"FitH\":\n                  line += \" /FitH \" + anno.options.top + \"]\";\n                  break;\n                case \"FitV\":\n                  anno.options.left = anno.options.left || 0;\n                  line += \" /FitV \" + anno.options.left + \"]\";\n                  break;\n                case \"XYZ\":\n                default:\n                  var top = getVerticalCoordinateString(anno.options.top);\n                  anno.options.left = anno.options.left || 0;\n                  // 0 or null zoom will not change zoom factor\n                  if (typeof anno.options.zoom === \"undefined\") {\n                    anno.options.zoom = 0;\n                  }\n                  line +=\n                    \" /XYZ \" +\n                    anno.options.left +\n                    \" \" +\n                    top +\n                    \" \" +\n                    anno.options.zoom +\n                    \"]\";\n                  break;\n              }\n            }\n\n            if (line != \"\") {\n              line += \" >>\";\n              this.internal.write(line);\n            }\n            break;\n        }\n      }\n      this.internal.write(\"]\");\n    }\n  ]);\n\n  /**\n   * @name createAnnotation\n   * @function\n   * @param {Object} options\n   */\n  jsPDFAPI.createAnnotation = function(options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    switch (options.type) {\n      case \"link\":\n        this.link(\n          options.bounds.x,\n          options.bounds.y,\n          options.bounds.w,\n          options.bounds.h,\n          options\n        );\n        break;\n      case \"text\":\n      case \"freetext\":\n        pageInfo.pageContext.annotations.push(options);\n        break;\n    }\n  };\n\n  /**\n   * Create a link\n   *\n   * valid options\n   * <li> pageNumber or url [required]\n   * <p>If pageNumber is specified, top and zoom may also be specified</p>\n   * @name link\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} w\n   * @param {number} h\n   * @param {Object} options\n   */\n  jsPDFAPI.link = function(x, y, w, h, options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    var getHorizontalCoordinateString = this.internal.getCoordinateString;\n    var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\n\n    pageInfo.pageContext.annotations.push({\n      finalBounds: {\n        x: getHorizontalCoordinateString(x),\n        y: getVerticalCoordinateString(y),\n        w: getHorizontalCoordinateString(x + w),\n        h: getVerticalCoordinateString(y + h)\n      },\n      options: options,\n      type: \"link\"\n    });\n  };\n\n  /**\n   * Currently only supports single line text.\n   * Returns the width of the text/link\n   *\n   * @name textWithLink\n   * @function\n   * @param {string} text\n   * @param {number} x\n   * @param {number} y\n   * @param {Object} options\n   * @returns {number} width the width of the text/link\n   */\n  jsPDFAPI.textWithLink = function(text, x, y, options) {\n    var totalLineWidth = this.getTextWidth(text);\n    var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;\n    var linkHeight, linkWidth;\n\n    // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line\n    if (options.maxWidth !== undefined) {\n      var { maxWidth } = options;\n      linkWidth = maxWidth;\n      var numOfLines = this.splitTextToSize(text, linkWidth).length;\n      linkHeight = Math.ceil(lineHeight * numOfLines);\n    } else {\n      linkWidth = totalLineWidth;\n      linkHeight = lineHeight;\n    }\n\n    this.text(text, x, y, options);\n\n    //TODO We really need the text baseline height to do this correctly.\n    // Or ability to draw text on top, bottom, center, or baseline.\n    y += lineHeight * 0.2;\n    //handle x position based on the align option\n    if (options.align === \"center\") {\n      x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width\n    }\n    if (options.align === \"right\") {\n      x = x - totalLineWidth;\n    }\n    this.link(x, y - lineHeight, linkWidth, linkHeight, options);\n    return totalLineWidth;\n  };\n\n  //TODO move into external library\n  /**\n   * @name getTextWidth\n   * @function\n   * @param {string} text\n   * @returns {number} txtWidth\n   */\n  jsPDFAPI.getTextWidth = function(text) {\n    var fontSize = this.internal.getFontSize();\n    var txtWidth =\n      (this.getStringUnitWidth(text) * fontSize) / this.internal.scaleFactor;\n    return txtWidth;\n  };\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF arabic parser PlugIn\n *\n * @name arabic\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Arabic shape substitutions: char code => (isolated, final, initial, medial).\n   * Arabic Substition A\n   */\n  var arabicSubstitionA = {\n    0x0621: [0xfe80], // ARABIC LETTER HAMZA\n    0x0622: [0xfe81, 0xfe82], // ARABIC LETTER ALEF WITH MADDA ABOVE\n    0x0623: [0xfe83, 0xfe84], // ARABIC LETTER ALEF WITH HAMZA ABOVE\n    0x0624: [0xfe85, 0xfe86], // ARABIC LETTER WAW WITH HAMZA ABOVE\n    0x0625: [0xfe87, 0xfe88], // ARABIC LETTER ALEF WITH HAMZA BELOW\n    0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c], // ARABIC LETTER YEH WITH HAMZA ABOVE\n    0x0627: [0xfe8d, 0xfe8e], // ARABIC LETTER ALEF\n    0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92], // ARABIC LETTER BEH\n    0x0629: [0xfe93, 0xfe94], // ARABIC LETTER TEH MARBUTA\n    0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98], // ARABIC LETTER TEH\n    0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c], // ARABIC LETTER THEH\n    0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0], // ARABIC LETTER JEEM\n    0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4], // ARABIC LETTER HAH\n    0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8], // ARABIC LETTER KHAH\n    0x062f: [0xfea9, 0xfeaa], // ARABIC LETTER DAL\n    0x0630: [0xfeab, 0xfeac], // ARABIC LETTER THAL\n    0x0631: [0xfead, 0xfeae], // ARABIC LETTER REH\n    0x0632: [0xfeaf, 0xfeb0], // ARABIC LETTER ZAIN\n    0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4], // ARABIC LETTER SEEN\n    0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8], // ARABIC LETTER SHEEN\n    0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc], // ARABIC LETTER SAD\n    0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0], // ARABIC LETTER DAD\n    0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4], // ARABIC LETTER TAH\n    0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8], // ARABIC LETTER ZAH\n    0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc], // ARABIC LETTER AIN\n    0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0], // ARABIC LETTER GHAIN\n    0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4], // ARABIC LETTER FEH\n    0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8], // ARABIC LETTER QAF\n    0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc], // ARABIC LETTER KAF\n    0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0], // ARABIC LETTER LAM\n    0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], // ARABIC LETTER MEEM\n    0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], // ARABIC LETTER NOON\n    0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], // ARABIC LETTER HEH\n    0x0648: [0xfeed, 0xfeee], // ARABIC LETTER WAW\n    0x0649: [0xfeef, 0xfef0, 64488, 64489], // ARABIC LETTER ALEF MAKSURA\n    0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], // ARABIC LETTER YEH\n    0x0671: [0xfb50, 0xfb51], // ARABIC LETTER ALEF WASLA\n    0x0677: [0xfbdd], // ARABIC LETTER U WITH HAMZA ABOVE\n    0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], // ARABIC LETTER TTEH\n    0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], // ARABIC LETTER TTEHEH\n    0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], // ARABIC LETTER BEEH\n    0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], // ARABIC LETTER PEH\n    0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], // ARABIC LETTER TEHEH\n    0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], // ARABIC LETTER BEHEH\n    0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], // ARABIC LETTER NYEH\n    0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], // ARABIC LETTER DYEH\n    0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], // ARABIC LETTER TCHEH\n    0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], // ARABIC LETTER TCHEHEH\n    0x0688: [0xfb88, 0xfb89], // ARABIC LETTER DDAL\n    0x068c: [0xfb84, 0xfb85], // ARABIC LETTER DAHAL\n    0x068d: [0xfb82, 0xfb83], // ARABIC LETTER DDAHAL\n    0x068e: [0xfb86, 0xfb87], // ARABIC LETTER DUL\n    0x0691: [0xfb8c, 0xfb8d], // ARABIC LETTER RREH\n    0x0698: [0xfb8a, 0xfb8b], // ARABIC LETTER JEH\n    0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], // ARABIC LETTER VEH\n    0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], // ARABIC LETTER PEHEH\n    0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], // ARABIC LETTER KEHEH\n    0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], // ARABIC LETTER NG\n    0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], // ARABIC LETTER GAF\n    0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d], // ARABIC LETTER NGOEH\n    0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99], // ARABIC LETTER GUEH\n    0x06ba: [0xfb9e, 0xfb9f], // ARABIC LETTER NOON GHUNNA\n    0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3], // ARABIC LETTER RNOON\n    0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad], // ARABIC LETTER HEH DOACHASHMEE\n    0x06c0: [0xfba4, 0xfba5], // ARABIC LETTER HEH WITH YEH ABOVE\n    0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9], // ARABIC LETTER HEH GOAL\n    0x06c5: [0xfbe0, 0xfbe1], // ARABIC LETTER KIRGHIZ OE\n    0x06c6: [0xfbd9, 0xfbda], // ARABIC LETTER OE\n    0x06c7: [0xfbd7, 0xfbd8], // ARABIC LETTER U\n    0x06c8: [0xfbdb, 0xfbdc], // ARABIC LETTER YU\n    0x06c9: [0xfbe2, 0xfbe3], // ARABIC LETTER KIRGHIZ YU\n    0x06cb: [0xfbde, 0xfbdf], // ARABIC LETTER VE\n    0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff], // ARABIC LETTER FARSI YEH\n    0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7], //ARABIC LETTER E\n    0x06d2: [0xfbae, 0xfbaf], // ARABIC LETTER YEH BARREE\n    0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE\n  };\n\n  /*\n    var ligaturesSubstitutionA = {\n        0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM\n    };\n    */\n\n  var ligatures = {\n    0xfedf: {\n      0xfe82: 0xfef5, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM\n      0xfe84: 0xfef7, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM\n      0xfe88: 0xfef9, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM\n      0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM\n    },\n    0xfee0: {\n      0xfe82: 0xfef6, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM\n      0xfe84: 0xfef8, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM\n      0xfe88: 0xfefa, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM\n      0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM\n    },\n    0xfe8d: { 0xfedf: { 0xfee0: { 0xfeea: 0xfdf2 } } }, // ALLAH\n    0x0651: {\n      0x064c: 0xfc5e, // Shadda + Dammatan\n      0x064d: 0xfc5f, // Shadda + Kasratan\n      0x064e: 0xfc60, // Shadda + Fatha\n      0x064f: 0xfc61, // Shadda + Damma\n      0x0650: 0xfc62 // Shadda + Kasra\n    }\n  };\n\n  var arabic_diacritics = {\n    1612: 64606, // Shadda + Dammatan\n    1613: 64607, // Shadda + Kasratan\n    1614: 64608, // Shadda + Fatha\n    1615: 64609, // Shadda + Damma\n    1616: 64610 // Shadda + Kasra\n  };\n\n  var alfletter = [1570, 1571, 1573, 1575];\n\n  var noChangeInForm = -1;\n  var isolatedForm = 0;\n  var finalForm = 1;\n  var initialForm = 2;\n  var medialForm = 3;\n\n  jsPDFAPI.__arabicParser__ = {};\n\n  //private\n  var isInArabicSubstitutionA = (jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function(\n    letter\n  ) {\n    return typeof arabicSubstitionA[letter.charCodeAt(0)] !== \"undefined\";\n  });\n\n  var isArabicLetter = (jsPDFAPI.__arabicParser__.isArabicLetter = function(\n    letter\n  ) {\n    return (\n      typeof letter === \"string\" &&\n      /^[\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF\\uFB50-\\uFDFF\\uFE70-\\uFEFF]+$/.test(\n        letter\n      )\n    );\n  });\n\n  var isArabicEndLetter = (jsPDFAPI.__arabicParser__.isArabicEndLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length <= 2\n    );\n  });\n\n  var isArabicAlfLetter = (jsPDFAPI.__arabicParser__.isArabicAlfLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 1\n    );\n  };\n\n  var arabicLetterHasFinalForm = (jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 2\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 3\n    );\n  };\n\n  var arabicLetterHasMedialForm = (jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length == 4\n    );\n  });\n\n  var resolveLigatures = (jsPDFAPI.__arabicParser__.resolveLigatures = function(\n    letters\n  ) {\n    var i = 0;\n    var tmpLigatures = ligatures;\n    var result = \"\";\n    var effectedLetters = 0;\n\n    for (i = 0; i < letters.length; i += 1) {\n      if (typeof tmpLigatures[letters.charCodeAt(i)] !== \"undefined\") {\n        effectedLetters++;\n        tmpLigatures = tmpLigatures[letters.charCodeAt(i)];\n\n        if (typeof tmpLigatures === \"number\") {\n          result += String.fromCharCode(tmpLigatures);\n          tmpLigatures = ligatures;\n          effectedLetters = 0;\n        }\n        if (i === letters.length - 1) {\n          tmpLigatures = ligatures;\n          result += letters.charAt(i - (effectedLetters - 1));\n          i = i - (effectedLetters - 1);\n          effectedLetters = 0;\n        }\n      } else {\n        tmpLigatures = ligatures;\n        result += letters.charAt(i - effectedLetters);\n        i = i - effectedLetters;\n        effectedLetters = 0;\n      }\n    }\n\n    return result;\n  });\n\n  jsPDFAPI.__arabicParser__.isArabicDiacritic = function(letter) {\n    return (\n      letter !== undefined &&\n      arabic_diacritics[letter.charCodeAt(0)] !== undefined\n    );\n  };\n\n  var getCorrectForm = (jsPDFAPI.__arabicParser__.getCorrectForm = function(\n    currentChar,\n    beforeChar,\n    nextChar\n  ) {\n    if (!isArabicLetter(currentChar)) {\n      return -1;\n    }\n\n    if (isInArabicSubstitutionA(currentChar) === false) {\n      return noChangeInForm;\n    }\n    if (\n      !arabicLetterHasFinalForm(currentChar) ||\n      (!isArabicLetter(beforeChar) && !isArabicLetter(nextChar)) ||\n      (!isArabicLetter(nextChar) && isArabicEndLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar))\n    ) {\n      return isolatedForm;\n    }\n\n    if (\n      arabicLetterHasMedialForm(currentChar) &&\n      isArabicLetter(beforeChar) &&\n      !isArabicEndLetter(beforeChar) &&\n      isArabicLetter(nextChar) &&\n      arabicLetterHasFinalForm(nextChar)\n    ) {\n      return medialForm;\n    }\n\n    if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {\n      return finalForm;\n    }\n    return initialForm;\n  });\n\n  /**\n   * @name processArabic\n   * @function\n   * @param {string} text\n   * @returns {string}\n   */\n  var parseArabic = function(text) {\n    text = text || \"\";\n\n    var result = \"\";\n    var i = 0;\n    var j = 0;\n    var position = 0;\n    var currentLetter = \"\";\n    var prevLetter = \"\";\n    var nextLetter = \"\";\n\n    var words = text.split(\"\\\\s+\");\n    var newWords = [];\n    for (i = 0; i < words.length; i += 1) {\n      newWords.push(\"\");\n      for (j = 0; j < words[i].length; j += 1) {\n        currentLetter = words[i][j];\n        prevLetter = words[i][j - 1];\n        nextLetter = words[i][j + 1];\n        if (isArabicLetter(currentLetter)) {\n          position = getCorrectForm(currentLetter, prevLetter, nextLetter);\n          if (position !== -1) {\n            newWords[i] += String.fromCharCode(\n              arabicSubstitionA[currentLetter.charCodeAt(0)][position]\n            );\n          } else {\n            newWords[i] += currentLetter;\n          }\n        } else {\n          newWords[i] += currentLetter;\n        }\n      }\n\n      newWords[i] = resolveLigatures(newWords[i]);\n    }\n    result = newWords.join(\" \");\n\n    return result;\n  };\n\n  var processArabic = (jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function() {\n    var text =\n      typeof arguments[0] === \"string\" ? arguments[0] : arguments[0].text;\n    var tmpText = [];\n    var result;\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);\n        } else {\n          tmpText.push([parseArabic(text[i])]);\n        }\n      }\n      result = tmpText;\n    } else {\n      result = parseArabic(text);\n    }\n    if (typeof arguments[0] === \"string\") {\n      return result;\n    } else {\n      arguments[0].text = result;\n      return arguments[0];\n    }\n  });\n\n  jsPDFAPI.events.push([\"preProcessText\", processArabic]);\n})(jsPDF.API);\n","/** @license\n * jsPDF Autoprint Plugin\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name autoprint\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.\n   *\n   * @name autoPrint\n   * @function\n   * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF();\n   * doc.text(10, 10, 'This is a test');\n   * doc.autoPrint({variant: 'non-conform'});\n   * doc.save('autoprint.pdf');\n   */\n  jsPDFAPI.autoPrint = function(options) {\n    \"use strict\";\n    var refAutoPrintTag;\n    options = options || {};\n    options.variant = options.variant || \"non-conform\";\n\n    switch (options.variant) {\n      case \"javascript\":\n        //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb\n        this.addJS(\"print({});\");\n        break;\n      case \"non-conform\":\n      default:\n        this.internal.events.subscribe(\"postPutResources\", function() {\n          refAutoPrintTag = this.internal.newObject();\n          this.internal.out(\"<<\");\n          this.internal.out(\"/S /Named\");\n          this.internal.out(\"/Type /Action\");\n          this.internal.out(\"/N /Print\");\n          this.internal.out(\">>\");\n          this.internal.out(\"endobj\");\n        });\n\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.out(\"/OpenAction \" + refAutoPrintTag + \" 0 R\");\n        });\n        break;\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Canvas PlugIn\n * This plugin mimics the HTML5 Canvas\n *\n * The goal is to provide a way for current canvas users to print directly to a PDF.\n * @name canvas\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @class Canvas\n   * @classdesc A Canvas Wrapper for jsPDF\n   */\n  var Canvas = function() {\n    var jsPdfInstance = undefined;\n    Object.defineProperty(this, \"pdf\", {\n      get: function() {\n        return jsPdfInstance;\n      },\n      set: function(value) {\n        jsPdfInstance = value;\n      }\n    });\n\n    var _width = 150;\n    /**\n     * The height property is a positive integer reflecting the height HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.\n     * This is one of the two properties, the other being width, that controls the size of the canvas.\n     *\n     * @name width\n     */\n    Object.defineProperty(this, \"width\", {\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _width = 150;\n        } else {\n          _width = value;\n        }\n        if (this.getContext(\"2d\").pageWrapXEnabled) {\n          this.getContext(\"2d\").pageWrapX = _width + 1;\n        }\n      }\n    });\n\n    var _height = 300;\n    /**\n     * The width property is a positive integer reflecting the width HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.\n     * This is one of the two properties, the other being height, that controls the size of the canvas.\n     *\n     * @name height\n     */\n    Object.defineProperty(this, \"height\", {\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _height = 300;\n        } else {\n          _height = value;\n        }\n        if (this.getContext(\"2d\").pageWrapYEnabled) {\n          this.getContext(\"2d\").pageWrapY = _height + 1;\n        }\n      }\n    });\n\n    var _childNodes = [];\n    Object.defineProperty(this, \"childNodes\", {\n      get: function() {\n        return _childNodes;\n      },\n      set: function(value) {\n        _childNodes = value;\n      }\n    });\n\n    var _style = {};\n    Object.defineProperty(this, \"style\", {\n      get: function() {\n        return _style;\n      },\n      set: function(value) {\n        _style = value;\n      }\n    });\n\n    Object.defineProperty(this, \"parentNode\", {});\n  };\n\n  /**\n   * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\n   *\n   * @name getContext\n   * @function\n   * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is \"2d\", leading to the creation of a Context2D object representing a two-dimensional rendering context.\n   * @param {object} contextAttributes\n   */\n  Canvas.prototype.getContext = function(contextType, contextAttributes) {\n    contextType = contextType || \"2d\";\n    var key;\n\n    if (contextType !== \"2d\") {\n      return null;\n    }\n    for (key in contextAttributes) {\n      if (this.pdf.context2d.hasOwnProperty(key)) {\n        this.pdf.context2d[key] = contextAttributes[key];\n      }\n    }\n    this.pdf.context2d._canvas = this;\n    return this.pdf.context2d;\n  };\n\n  /**\n   * The toDataURL() method is just a stub to throw an error if accidently called.\n   *\n   * @name toDataURL\n   * @function\n   */\n  Canvas.prototype.toDataURL = function() {\n    throw new Error(\"toDataURL is not implemented.\");\n  };\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      this.canvas = new Canvas();\n      this.canvas.pdf = this;\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *               2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *               2013 Lee Driscoll, https://github.com/lsdriscoll\n *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n *               2014 James Hall, james@parall.ax\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name cell\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var NO_MARGINS = { left: 0, top: 0, bottom: 0, right: 0 };\n\n  var px2pt = (0.264583 * 72) / 25.4;\n  var printingHeaderRow = false;\n\n  var _initialize = function() {\n    if (typeof this.internal.__cell__ === \"undefined\") {\n      this.internal.__cell__ = {};\n      this.internal.__cell__.padding = 3;\n      this.internal.__cell__.headerFunction = undefined;\n      this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);\n      this.internal.__cell__.margins.width = this.getPageWidth();\n      _reset.call(this);\n    }\n  };\n\n  var _reset = function() {\n    this.internal.__cell__.lastCell = new Cell();\n    this.internal.__cell__.pages = 1;\n  };\n\n  var Cell = function() {\n    var _x = arguments[0];\n    Object.defineProperty(this, \"x\", {\n      enumerable: true,\n      get: function() {\n        return _x;\n      },\n      set: function(value) {\n        _x = value;\n      }\n    });\n    var _y = arguments[1];\n    Object.defineProperty(this, \"y\", {\n      enumerable: true,\n      get: function() {\n        return _y;\n      },\n      set: function(value) {\n        _y = value;\n      }\n    });\n    var _width = arguments[2];\n    Object.defineProperty(this, \"width\", {\n      enumerable: true,\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        _width = value;\n      }\n    });\n    var _height = arguments[3];\n    Object.defineProperty(this, \"height\", {\n      enumerable: true,\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        _height = value;\n      }\n    });\n    var _text = arguments[4];\n    Object.defineProperty(this, \"text\", {\n      enumerable: true,\n      get: function() {\n        return _text;\n      },\n      set: function(value) {\n        _text = value;\n      }\n    });\n    var _lineNumber = arguments[5];\n    Object.defineProperty(this, \"lineNumber\", {\n      enumerable: true,\n      get: function() {\n        return _lineNumber;\n      },\n      set: function(value) {\n        _lineNumber = value;\n      }\n    });\n    var _align = arguments[6];\n    Object.defineProperty(this, \"align\", {\n      enumerable: true,\n      get: function() {\n        return _align;\n      },\n      set: function(value) {\n        _align = value;\n      }\n    });\n\n    return this;\n  };\n\n  Cell.prototype.clone = function() {\n    return new Cell(\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    );\n  };\n\n  Cell.prototype.toArray = function() {\n    return [\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    ];\n  };\n\n  /**\n   * @name setHeaderFunction\n   * @function\n   * @param {function} func\n   */\n  jsPDFAPI.setHeaderFunction = function(func) {\n    _initialize.call(this);\n    this.internal.__cell__.headerFunction =\n      typeof func === \"function\" ? func : undefined;\n    return this;\n  };\n\n  /**\n   * @name getTextDimensions\n   * @function\n   * @param {string} txt\n   * @returns {Object} dimensions\n   */\n  jsPDFAPI.getTextDimensions = function(text, options) {\n    _initialize.call(this);\n    options = options || {};\n    var fontSize = options.fontSize || this.getFontSize();\n    var font = options.font || this.getFont();\n    var scaleFactor = options.scaleFactor || this.internal.scaleFactor;\n    var width = 0;\n    var amountOfLines = 0;\n    var height = 0;\n    var tempWidth = 0;\n    var scope = this;\n\n    if (!Array.isArray(text) && typeof text !== \"string\") {\n      if (typeof text === \"number\") {\n        text = String(text);\n      } else {\n        throw new Error(\n          \"getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.\"\n        );\n      }\n    }\n\n    const maxWidth = options.maxWidth;\n    if (maxWidth > 0) {\n      if (typeof text === \"string\") {\n        text = this.splitTextToSize(text, maxWidth);\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\n        text = text.reduce(function(acc, textLine) {\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\n        }, []);\n      }\n    } else {\n      // Without the else clause, it will not work if you do not pass along maxWidth\n      text = Array.isArray(text) ? text : [text];\n    }\n\n    for (var i = 0; i < text.length; i++) {\n      tempWidth = this.getStringUnitWidth(text[i], { font: font }) * fontSize;\n      if (width < tempWidth) {\n        width = tempWidth;\n      }\n    }\n\n    if (width !== 0) {\n      amountOfLines = text.length;\n    }\n\n    width = width / scaleFactor;\n    height = Math.max(\n      (amountOfLines * fontSize * this.getLineHeightFactor() -\n        fontSize * (this.getLineHeightFactor() - 1)) /\n        scaleFactor,\n      0\n    );\n    return { w: width, h: height };\n  };\n\n  /**\n   * @name cellAddPage\n   * @function\n   */\n  jsPDFAPI.cellAddPage = function() {\n    _initialize.call(this);\n\n    this.addPage();\n\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    this.internal.__cell__.lastCell = new Cell(\n      margins.left,\n      margins.top,\n      undefined,\n      undefined\n    );\n    this.internal.__cell__.pages += 1;\n\n    return this;\n  };\n\n  /**\n   * @name cell\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} width\n   * @param {number} height\n   * @param {string} text\n   * @param {number} lineNumber lineNumber\n   * @param {string} align\n   * @return {jsPDF} jsPDF-instance\n   */\n  var cell = (jsPDFAPI.cell = function() {\n    var currentCell;\n\n    if (arguments[0] instanceof Cell) {\n      currentCell = arguments[0];\n    } else {\n      currentCell = new Cell(\n        arguments[0],\n        arguments[1],\n        arguments[2],\n        arguments[3],\n        arguments[4],\n        arguments[5]\n      );\n    }\n    _initialize.call(this);\n    var lastCell = this.internal.__cell__.lastCell;\n    var padding = this.internal.__cell__.padding;\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    var tableHeaderRow = this.internal.__cell__.tableHeaderRow;\n    var printHeaders = this.internal.__cell__.printHeaders;\n    // If this is not the first cell, we must change its position\n    if (typeof lastCell.lineNumber !== \"undefined\") {\n      if (lastCell.lineNumber === currentCell.lineNumber) {\n        //Same line\n        currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);\n        currentCell.y = lastCell.y || 0;\n      } else {\n        //New line\n        if (\n          lastCell.y + lastCell.height + currentCell.height + margins.bottom >\n          this.getPageHeight()\n        ) {\n          this.cellAddPage();\n          currentCell.y = margins.top;\n          if (printHeaders && tableHeaderRow) {\n            this.printHeaderRow(currentCell.lineNumber, true);\n            currentCell.y += tableHeaderRow[0].height;\n          }\n        } else {\n          currentCell.y = lastCell.y + lastCell.height || currentCell.y;\n        }\n      }\n    }\n\n    if (typeof currentCell.text[0] !== \"undefined\") {\n      this.rect(\n        currentCell.x,\n        currentCell.y,\n        currentCell.width,\n        currentCell.height,\n        printingHeaderRow === true ? \"FD\" : undefined\n      );\n      if (currentCell.align === \"right\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width - padding,\n          currentCell.y + padding,\n          { align: \"right\", baseline: \"top\" }\n        );\n      } else if (currentCell.align === \"center\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width / 2,\n          currentCell.y + padding,\n          {\n            align: \"center\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      } else {\n        this.text(\n          currentCell.text,\n          currentCell.x + padding,\n          currentCell.y + padding,\n          {\n            align: \"left\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      }\n    }\n    this.internal.__cell__.lastCell = currentCell;\n    return this;\n  });\n\n  /**\n     * Create a table from a set of data.\n     * @name table\n     * @function\n     * @param {Integer} [x] : left-position for top-left corner of table\n     * @param {Integer} [y] top-position for top-left corner of table\n     * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.\n     * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost\n\n     * @param {Object} [config.printHeaders] True to print column headers at the top of every page\n     * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value\n     * @param {Object} [config.margins] margin values for left, top, bottom, and width\n     * @param {Object} [config.fontSize] Integer fontSize to use (optional)\n     * @param {Object} [config.padding] cell-padding in pt to use (optional)\n     * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)\n     * @param {Object} [config.headerTextColor] default is #000 (optional)\n     * @param {Object} [config.rowStart] callback to handle before print each row (optional)\n     * @param {Object} [config.cellStart] callback to handle before print each cell (optional)\n     * @returns {jsPDF} jsPDF-instance\n     */\n\n  jsPDFAPI.table = function(x, y, data, headers, config) {\n    _initialize.call(this);\n    if (!data) {\n      throw new Error(\"No data for PDF table.\");\n    }\n\n    config = config || {};\n\n    var headerNames = [],\n      headerLabels = [],\n      headerAligns = [],\n      i,\n      columnMatrix = {},\n      columnWidths = {},\n      column,\n      columnMinWidths = [],\n      j,\n      tableHeaderConfigs = [],\n      //set up defaults. If a value is provided in config, defaults will be overwritten:\n      autoSize = config.autoSize || false,\n      printHeaders = config.printHeaders === false ? false : true,\n      fontSize =\n        config.css && typeof config.css[\"font-size\"] !== \"undefined\"\n          ? config.css[\"font-size\"] * 16\n          : config.fontSize || 12,\n      margins =\n        config.margins ||\n        Object.assign({ width: this.getPageWidth() }, NO_MARGINS),\n      padding = typeof config.padding === \"number\" ? config.padding : 3,\n      headerBackgroundColor = config.headerBackgroundColor || \"#c8c8c8\",\n      headerTextColor = config.headerTextColor || \"#000\";\n\n    _reset.call(this);\n\n    this.internal.__cell__.printHeaders = printHeaders;\n    this.internal.__cell__.margins = margins;\n    this.internal.__cell__.table_font_size = fontSize;\n    this.internal.__cell__.padding = padding;\n    this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;\n    this.internal.__cell__.headerTextColor = headerTextColor;\n    this.setFontSize(fontSize);\n\n    // Set header values\n    if (headers === undefined || headers === null) {\n      // No headers defined so we derive from data\n      headerNames = Object.keys(data[0]);\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    } else if (Array.isArray(headers) && typeof headers[0] === \"object\") {\n      headerNames = headers.map(function(header) {\n        return header.name;\n      });\n      headerLabels = headers.map(function(header) {\n        return header.prompt || header.name || \"\";\n      });\n      headerAligns = headers.map(function(header) {\n        return header.align || \"left\";\n      });\n      // Split header configs into names and prompts\n      for (i = 0; i < headers.length; i += 1) {\n        columnWidths[headers[i].name] = headers[i].width * px2pt;\n      }\n    } else if (Array.isArray(headers) && typeof headers[0] === \"string\") {\n      headerNames = headers;\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    }\n\n    if (\n      autoSize ||\n      (Array.isArray(headers) && typeof headers[0] === \"string\")\n    ) {\n      var headerName;\n      for (i = 0; i < headerNames.length; i += 1) {\n        headerName = headerNames[i];\n\n        // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}\n\n        columnMatrix[headerName] = data.map(function(rec) {\n          return rec[headerName];\n        });\n\n        // get header width\n        this.setFont(undefined, \"bold\");\n        columnMinWidths.push(\n          this.getTextDimensions(headerLabels[i], {\n            fontSize: this.internal.__cell__.table_font_size,\n            scaleFactor: this.internal.scaleFactor\n          }).w\n        );\n        column = columnMatrix[headerName];\n\n        // get cell widths\n        this.setFont(undefined, \"normal\");\n        for (j = 0; j < column.length; j += 1) {\n          columnMinWidths.push(\n            this.getTextDimensions(column[j], {\n              fontSize: this.internal.__cell__.table_font_size,\n              scaleFactor: this.internal.scaleFactor\n            }).w\n          );\n        }\n\n        // get final column width\n        columnWidths[headerName] =\n          Math.max.apply(null, columnMinWidths) + padding + padding;\n\n        //have to reset\n        columnMinWidths = [];\n      }\n    }\n\n    // -- Construct the table\n\n    if (printHeaders) {\n      var row = {};\n      for (i = 0; i < headerNames.length; i += 1) {\n        row[headerNames[i]] = {};\n        row[headerNames[i]].text = headerLabels[i];\n        row[headerNames[i]].align = headerAligns[i];\n      }\n\n      var rowHeight = calculateLineHeight.call(this, row, columnWidths);\n\n      // Construct the header row\n      tableHeaderConfigs = headerNames.map(function(value) {\n        return new Cell(\n          x,\n          y,\n          columnWidths[value],\n          rowHeight,\n          row[value].text,\n          undefined,\n          row[value].align\n        );\n      });\n\n      // Store the table header config\n      this.setTableHeaderRow(tableHeaderConfigs);\n\n      // Print the header for the start of the table\n      this.printHeaderRow(1, false);\n    }\n\n    // Construct the data rows\n\n    var align = headers.reduce(function(pv, cv) {\n      pv[cv.name] = cv.align;\n      return pv;\n    }, {});\n    for (i = 0; i < data.length; i += 1) {\n      if (\"rowStart\" in config && config.rowStart instanceof Function) {\n        config.rowStart(\n          {\n            row: i,\n            data: data[i]\n          },\n          this\n        );\n      }\n      var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);\n\n      for (j = 0; j < headerNames.length; j += 1) {\n        var cellData = data[i][headerNames[j]];\n        if (\"cellStart\" in config && config.cellStart instanceof Function) {\n          config.cellStart(\n            {\n              row: i,\n              col: j,\n              data: cellData\n            },\n            this\n          );\n        }\n        cell.call(\n          this,\n          new Cell(\n            x,\n            y,\n            columnWidths[headerNames[j]],\n            lineHeight,\n            cellData,\n            i + 2,\n            align[headerNames[j]]\n          )\n        );\n      }\n    }\n    this.internal.__cell__.table_x = x;\n    this.internal.__cell__.table_y = y;\n    return this;\n  };\n\n  /**\n   * Calculate the height for containing the highest column\n   *\n   * @name calculateLineHeight\n   * @function\n   * @param {Object[]} model is the line of data we want to calculate the height of\n   * @param {Integer[]} columnWidths is size of each column\n   * @returns {number} lineHeight\n   * @private\n   */\n  var calculateLineHeight = function calculateLineHeight(model, columnWidths) {\n    var padding = this.internal.__cell__.padding;\n    var fontSize = this.internal.__cell__.table_font_size;\n    var scaleFactor = this.internal.scaleFactor;\n\n    return Object.keys(model)\n      .map(function(key) {\n        var value = model[key];\n        return this.splitTextToSize(\n          value.hasOwnProperty(\"text\") ? value.text : value,\n          columnWidths[key] - padding - padding\n        );\n      }, this)\n      .map(function(value) {\n        return (\n          (this.getLineHeightFactor() * value.length * fontSize) / scaleFactor +\n          padding +\n          padding\n        );\n      }, this)\n      .reduce(function(pv, cv) {\n        return Math.max(pv, cv);\n      }, 0);\n  };\n\n  /**\n   * Store the config for outputting a table header\n   *\n   * @name setTableHeaderRow\n   * @function\n   * @param {Object[]} config\n   * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell\n   * except the lineNumber parameter is excluded\n   */\n  jsPDFAPI.setTableHeaderRow = function(config) {\n    _initialize.call(this);\n    this.internal.__cell__.tableHeaderRow = config;\n  };\n\n  /**\n   * Output the store header row\n   *\n   * @name printHeaderRow\n   * @function\n   * @param {number} lineNumber The line number to output the header at\n   * @param {boolean} new_page\n   */\n  jsPDFAPI.printHeaderRow = function(lineNumber, new_page) {\n    _initialize.call(this);\n    if (!this.internal.__cell__.tableHeaderRow) {\n      throw new Error(\"Property tableHeaderRow does not exist.\");\n    }\n\n    var tableHeaderCell;\n\n    printingHeaderRow = true;\n    if (typeof this.internal.__cell__.headerFunction === \"function\") {\n      var position = this.internal.__cell__.headerFunction(\n        this,\n        this.internal.__cell__.pages\n      );\n      this.internal.__cell__.lastCell = new Cell(\n        position[0],\n        position[1],\n        position[2],\n        position[3],\n        undefined,\n        -1\n      );\n    }\n    this.setFont(undefined, \"bold\");\n\n    var tempHeaderConf = [];\n    for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {\n      tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();\n      if (new_page) {\n        tableHeaderCell.y = this.internal.__cell__.margins.top || 0;\n        tempHeaderConf.push(tableHeaderCell);\n      }\n      tableHeaderCell.lineNumber = lineNumber;\n      var currentTextColor = this.getTextColor();\n      this.setTextColor(this.internal.__cell__.headerTextColor);\n      this.setFillColor(this.internal.__cell__.headerBackgroundColor);\n      cell.call(this, tableHeaderCell);\n      this.setTextColor(currentTextColor);\n    }\n    if (tempHeaderConf.length > 0) {\n      this.setTableHeaderRow(tempHeaderConf);\n    }\n    this.setFont(undefined, \"normal\");\n    printingHeaderRow = false;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF JavaScript plugin\n *\n * @name javascript\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  var jsNamesObj, jsJsObj, text;\n  /**\n   * @name addJS\n   * @function\n   * @param {string} javascript The javascript to be embedded into the PDF-file.\n   * @returns {jsPDF}\n   */\n  jsPDFAPI.addJS = function(javascript) {\n    text = javascript;\n    this.internal.events.subscribe(\"postPutResources\", function() {\n      jsNamesObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/Names [(EmbeddedJS) \" + (jsNamesObj + 1) + \" 0 R]\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n\n      jsJsObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/S /JavaScript\");\n      this.internal.out(\"/JS (\" + text + \")\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n    });\n    this.internal.events.subscribe(\"putCatalog\", function() {\n      if (jsNamesObj !== undefined && jsJsObj !== undefined) {\n        this.internal.out(\"/Names <</JavaScript \" + jsNamesObj + \" 0 R>>\");\n      }\n    });\n    return this;\n  };\n})(jsPDF.API);\n","/* eslint-disable no-fallthrough */\r\n/* eslint-disable no-console */\r\n/**\r\n * @license\r\n * jsPDF Context2D PlugIn Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\r\n *\r\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\r\n */\r\n\r\nimport { jsPDF } from \"../jspdf.js\";\r\nimport { RGBColor } from \"../libs/rgbcolor.js\";\r\nimport { console } from \"../libs/console.js\";\r\nimport {\r\n  buildFontFaceMap,\r\n  parseFontFamily,\r\n  resolveFontFace\r\n} from \"../libs/fontFace.js\";\r\n\r\n/**\r\n * This plugin mimics the HTML5 CanvasRenderingContext2D.\r\n *\r\n * The goal is to provide a way for current canvas implementations to print directly to a PDF.\r\n *\r\n * @name context2d\r\n * @module\r\n */\r\n(function(jsPDFAPI) {\r\n  \"use strict\";\r\n  var ContextLayer = function(ctx) {\r\n    ctx = ctx || {};\r\n    this.isStrokeTransparent = ctx.isStrokeTransparent || false;\r\n    this.strokeOpacity = ctx.strokeOpacity || 1;\r\n    this.strokeStyle = ctx.strokeStyle || \"#000000\";\r\n    this.fillStyle = ctx.fillStyle || \"#000000\";\r\n    this.isFillTransparent = ctx.isFillTransparent || false;\r\n    this.fillOpacity = ctx.fillOpacity || 1;\r\n    this.font = ctx.font || \"10px sans-serif\";\r\n    this.textBaseline = ctx.textBaseline || \"alphabetic\";\r\n    this.textAlign = ctx.textAlign || \"left\";\r\n    this.lineWidth = ctx.lineWidth || 1;\r\n    this.lineJoin = ctx.lineJoin || \"miter\";\r\n    this.lineCap = ctx.lineCap || \"butt\";\r\n    this.path = ctx.path || [];\r\n    this.transform =\r\n      typeof ctx.transform !== \"undefined\"\r\n        ? ctx.transform.clone()\r\n        : new Matrix();\r\n    this.globalCompositeOperation = ctx.globalCompositeOperation || \"normal\";\r\n    this.globalAlpha = ctx.globalAlpha || 1.0;\r\n    this.clip_path = ctx.clip_path || [];\r\n    this.currentPoint = ctx.currentPoint || new Point();\r\n    this.miterLimit = ctx.miterLimit || 10.0;\r\n    this.lastPoint = ctx.lastPoint || new Point();\r\n    this.lineDashOffset = ctx.lineDashOffset || 0.0;\r\n    this.lineDash = ctx.lineDash || [];\r\n    this.margin = ctx.margin || [0, 0, 0, 0];\r\n    this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;\r\n\r\n    this.ignoreClearRect =\r\n      typeof ctx.ignoreClearRect === \"boolean\" ? ctx.ignoreClearRect : true;\r\n    return this;\r\n  };\r\n\r\n  //stub\r\n  var f2,\r\n    getHorizontalCoordinateString,\r\n    getVerticalCoordinateString,\r\n    getHorizontalCoordinate,\r\n    getVerticalCoordinate,\r\n    Point,\r\n    Rectangle,\r\n    Matrix,\r\n    _ctx;\r\n  jsPDFAPI.events.push([\r\n    \"initialized\",\r\n    function() {\r\n      this.context2d = new Context2D(this);\r\n\r\n      f2 = this.internal.f2;\r\n      getHorizontalCoordinateString = this.internal.getCoordinateString;\r\n      getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\r\n      getHorizontalCoordinate = this.internal.getHorizontalCoordinate;\r\n      getVerticalCoordinate = this.internal.getVerticalCoordinate;\r\n      Point = this.internal.Point;\r\n      Rectangle = this.internal.Rectangle;\r\n      Matrix = this.internal.Matrix;\r\n      _ctx = new ContextLayer();\r\n    }\r\n  ]);\r\n\r\n  var Context2D = function(pdf) {\r\n    Object.defineProperty(this, \"canvas\", {\r\n      get: function() {\r\n        return { parentNode: false, style: false };\r\n      }\r\n    });\r\n\r\n    var _pdf = pdf;\r\n    Object.defineProperty(this, \"pdf\", {\r\n      get: function() {\r\n        return _pdf;\r\n      }\r\n    });\r\n\r\n    var _pageWrapXEnabled = false;\r\n    /**\r\n     * @name pageWrapXEnabled\r\n     * @type {boolean}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"pageWrapXEnabled\", {\r\n      get: function() {\r\n        return _pageWrapXEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapXEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _pageWrapYEnabled = false;\r\n    /**\r\n     * @name pageWrapYEnabled\r\n     * @type {boolean}\r\n     * @default true\r\n     */\r\n    Object.defineProperty(this, \"pageWrapYEnabled\", {\r\n      get: function() {\r\n        return _pageWrapYEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapYEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _posX = 0;\r\n    /**\r\n     * @name posX\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posX\", {\r\n      get: function() {\r\n        return _posX;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posX = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _posY = 0;\r\n    /**\r\n     * @name posY\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posY\", {\r\n      get: function() {\r\n        return _posY;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posY = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.\r\n     * @name margin\r\n     * @type {number|number[]}\r\n     * @default [0, 0, 0, 0]\r\n     */\r\n    Object.defineProperty(this, \"margin\", {\r\n      get: function() {\r\n        return _ctx.margin;\r\n      },\r\n      set: function(value) {\r\n        var margin;\r\n        if (typeof value === \"number\") {\r\n          margin = [value, value, value, value];\r\n        } else {\r\n          margin = new Array(4);\r\n          margin[0] = value[0];\r\n          margin[1] = value.length >= 2 ? value[1] : margin[0];\r\n          margin[2] = value.length >= 3 ? value[2] : margin[0];\r\n          margin[3] = value.length >= 4 ? value[3] : margin[1];\r\n        }\r\n        _ctx.margin = margin;\r\n      }\r\n    });\r\n\r\n    var _autoPaging = false;\r\n    /**\r\n     * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the\r\n     * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new\r\n     * pages if required.\r\n     *\r\n     * Context2d supports different modes:\r\n     * <ul>\r\n     * <li>\r\n     *   <code>false</code>: Auto paging is disabled.\r\n     * </li>\r\n     * <li>\r\n     *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\r\n     *   slice text in half, making it difficult to read.\r\n     * </li>\r\n     * <li>\r\n     *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\r\n     *   mostly of a single column of text.\r\n     * </li>\r\n     * </ul>\r\n     * @name Context2D#autoPaging\r\n     * @type {boolean|\"slice\"|\"text\"}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"autoPaging\", {\r\n      get: function() {\r\n        return _autoPaging;\r\n      },\r\n      set: function(value) {\r\n        _autoPaging = value;\r\n      }\r\n    });\r\n\r\n    var lastBreak = 0;\r\n    /**\r\n     * @name lastBreak\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"lastBreak\", {\r\n      get: function() {\r\n        return lastBreak;\r\n      },\r\n      set: function(value) {\r\n        lastBreak = value;\r\n      }\r\n    });\r\n\r\n    var pageBreaks = [];\r\n    /**\r\n     * Y Position of page breaks.\r\n     * @name pageBreaks\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"pageBreaks\", {\r\n      get: function() {\r\n        return pageBreaks;\r\n      },\r\n      set: function(value) {\r\n        pageBreaks = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctx\r\n     * @type {object}\r\n     * @default {}\r\n     */\r\n    Object.defineProperty(this, \"ctx\", {\r\n      get: function() {\r\n        return _ctx;\r\n      },\r\n      set: function(value) {\r\n        if (value instanceof ContextLayer) {\r\n          _ctx = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name path\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    Object.defineProperty(this, \"path\", {\r\n      get: function() {\r\n        return _ctx.path;\r\n      },\r\n      set: function(value) {\r\n        _ctx.path = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctxStack\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    var _ctxStack = [];\r\n    Object.defineProperty(this, \"ctxStack\", {\r\n      get: function() {\r\n        return _ctxStack;\r\n      },\r\n      set: function(value) {\r\n        _ctxStack = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used to fill the drawing\r\n     *\r\n     * @name fillStyle\r\n     * @default #000000\r\n     * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />\r\n     * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />\r\n     * A pattern object to use to fill the drawing (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"fillStyle\", {\r\n      get: function() {\r\n        return this.ctx.fillStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba;\r\n        rgba = getRGBA(value);\r\n\r\n        this.ctx.fillStyle = rgba.style;\r\n        this.ctx.isFillTransparent = rgba.a === 0;\r\n        this.ctx.fillOpacity = rgba.a;\r\n\r\n        this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n        this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used for strokes\r\n     *\r\n     * @name strokeStyle\r\n     * @default #000000\r\n     * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)\r\n     * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)\r\n     * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"strokeStyle\", {\r\n      get: function() {\r\n        return this.ctx.strokeStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba = getRGBA(value);\r\n\r\n        this.ctx.strokeStyle = rgba.style;\r\n        this.ctx.isStrokeTransparent = rgba.a === 0;\r\n        this.ctx.strokeOpacity = rgba.a;\r\n\r\n        if (rgba.a === 0) {\r\n          this.pdf.setDrawColor(255, 255, 255);\r\n        } else if (rgba.a === 1) {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        } else {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the style of the end caps for a line\r\n     *\r\n     * @name lineCap\r\n     * @default butt\r\n     * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line <br/>\r\n     * round A rounded end cap is added to each end of the line<br/>\r\n     * square A square end cap is added to each end of the line<br/>\r\n     */\r\n    Object.defineProperty(this, \"lineCap\", {\r\n      get: function() {\r\n        return this.ctx.lineCap;\r\n      },\r\n      set: function(value) {\r\n        if ([\"butt\", \"round\", \"square\"].indexOf(value) !== -1) {\r\n          this.ctx.lineCap = value;\r\n          this.pdf.setLineCap(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the current line width\r\n     *\r\n     * @name lineWidth\r\n     * @default 1\r\n     * @property {number} lineWidth The current line width, in pixels\r\n     */\r\n    Object.defineProperty(this, \"lineWidth\", {\r\n      get: function() {\r\n        return this.ctx.lineWidth;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.lineWidth = value;\r\n          this.pdf.setLineWidth(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the type of corner created, when two lines meet\r\n     */\r\n    Object.defineProperty(this, \"lineJoin\", {\r\n      get: function() {\r\n        return this.ctx.lineJoin;\r\n      },\r\n      set: function(value) {\r\n        if ([\"bevel\", \"round\", \"miter\"].indexOf(value) !== -1) {\r\n          this.ctx.lineJoin = value;\r\n          this.pdf.setLineJoin(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.\r\n     *\r\n     * @name miterLimit\r\n     * @default 10\r\n     */\r\n    Object.defineProperty(this, \"miterLimit\", {\r\n      get: function() {\r\n        return this.ctx.miterLimit;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.miterLimit = value;\r\n          this.pdf.setMiterLimit(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textBaseline\", {\r\n      get: function() {\r\n        return this.ctx.textBaseline;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.textBaseline = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textAlign\", {\r\n      get: function() {\r\n        return this.ctx.textAlign;\r\n      },\r\n      set: function(value) {\r\n        if ([\"right\", \"end\", \"center\", \"left\", \"start\"].indexOf(value) !== -1) {\r\n          this.ctx.textAlign = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _fontFaceMap = null;\r\n\r\n    function getFontFaceMap(pdf, fontFaces) {\r\n      if (_fontFaceMap === null) {\r\n        var fontMap = pdf.getFontList();\r\n\r\n        var convertedFontFaces = convertToFontFaces(fontMap);\r\n\r\n        _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));\r\n      }\r\n\r\n      return _fontFaceMap;\r\n    }\r\n\r\n    function convertToFontFaces(fontMap) {\r\n      var fontFaces = [];\r\n\r\n      Object.keys(fontMap).forEach(function(family) {\r\n        var styles = fontMap[family];\r\n\r\n        styles.forEach(function(style) {\r\n          var fontFace = null;\r\n\r\n          switch (style) {\r\n            case \"bold\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\"\r\n              };\r\n              break;\r\n\r\n            case \"italic\":\r\n              fontFace = {\r\n                family: family,\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"bolditalic\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\",\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"\":\r\n            case \"normal\":\r\n              fontFace = {\r\n                family: family\r\n              };\r\n              break;\r\n          }\r\n\r\n          // If font-face is still null here, it is a font with some styling we don't recognize and\r\n          // cannot map or it is a font added via the fontFaces option of .html().\r\n          if (fontFace !== null) {\r\n            fontFace.ref = {\r\n              name: family,\r\n              style: style\r\n            };\r\n\r\n            fontFaces.push(fontFace);\r\n          }\r\n        });\r\n      });\r\n\r\n      return fontFaces;\r\n    }\r\n\r\n    var _fontFaces = null;\r\n    /**\r\n     * A map of available font-faces, as passed in the options of\r\n     * .html(). If set a limited implementation of the font style matching\r\n     * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm\r\n     * will be used. If not set it will fallback to previous behavior.\r\n     */\r\n\r\n    Object.defineProperty(this, \"fontFaces\", {\r\n      get: function() {\r\n        return _fontFaces;\r\n      },\r\n      set: function(value) {\r\n        _fontFaceMap = null;\r\n        _fontFaces = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"font\", {\r\n      get: function() {\r\n        return this.ctx.font;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.font = value;\r\n        var rx, matches;\r\n\r\n        //source: https://stackoverflow.com/a/10136041\r\n        // eslint-disable-next-line no-useless-escape\r\n        rx = /^\\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;\r\n        matches = rx.exec(value);\r\n        if (matches !== null) {\r\n          var fontStyle = matches[1];\r\n          var fontVariant = matches[2];\r\n          var fontWeight = matches[3];\r\n          var fontSize = matches[4];\r\n          var lineHeight = matches[5];\r\n          var fontFamily = matches[6];\r\n        } else {\r\n          return;\r\n        }\r\n        var rxFontSize = /^([.\\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;\r\n        var fontSizeUnit = rxFontSize.exec(fontSize)[2];\r\n\r\n        if (\"px\" === fontSizeUnit) {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        } else if (\"em\" === fontSizeUnit) {\r\n          fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());\r\n        } else {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        }\r\n\r\n        this.pdf.setFontSize(fontSize);\r\n        var parts = parseFontFamily(fontFamily);\r\n\r\n        if (this.fontFaces) {\r\n          var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);\r\n\r\n          var rules = parts.map(function(ff) {\r\n            return {\r\n              family: ff,\r\n              stretch: \"normal\", // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)\r\n              weight: fontWeight,\r\n              style: fontStyle\r\n            };\r\n          });\r\n\r\n          var font = resolveFontFace(fontFaceMap, rules);\r\n          this.pdf.setFont(font.ref.name, font.ref.style);\r\n          return;\r\n        }\r\n\r\n        var style = \"\";\r\n        if (\r\n          fontWeight === \"bold\" ||\r\n          parseInt(fontWeight, 10) >= 700 ||\r\n          fontStyle === \"bold\"\r\n        ) {\r\n          style = \"bold\";\r\n        }\r\n\r\n        if (fontStyle === \"italic\") {\r\n          style += \"italic\";\r\n        }\r\n\r\n        if (style.length === 0) {\r\n          style = \"normal\";\r\n        }\r\n        var jsPdfFontName = \"\";\r\n\r\n        var fallbackFonts = {\r\n          arial: \"Helvetica\",\r\n          Arial: \"Helvetica\",\r\n          verdana: \"Helvetica\",\r\n          Verdana: \"Helvetica\",\r\n          helvetica: \"Helvetica\",\r\n          Helvetica: \"Helvetica\",\r\n          \"sans-serif\": \"Helvetica\",\r\n          fixed: \"Courier\",\r\n          monospace: \"Courier\",\r\n          terminal: \"Courier\",\r\n          cursive: \"Times\",\r\n          fantasy: \"Times\",\r\n          serif: \"Times\"\r\n        };\r\n\r\n        for (var i = 0; i < parts.length; i++) {\r\n          if (\r\n            this.pdf.internal.getFont(parts[i], style, {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            break;\r\n          } else if (\r\n            style === \"bolditalic\" &&\r\n            this.pdf.internal.getFont(parts[i], \"bold\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"bold\";\r\n          } else if (\r\n            this.pdf.internal.getFont(parts[i], \"normal\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"normal\";\r\n            break;\r\n          }\r\n        }\r\n        if (jsPdfFontName === \"\") {\r\n          for (var j = 0; j < parts.length; j++) {\r\n            if (fallbackFonts[parts[j]]) {\r\n              jsPdfFontName = fallbackFonts[parts[j]];\r\n              break;\r\n            }\r\n          }\r\n        }\r\n        jsPdfFontName = jsPdfFontName === \"\" ? \"Times\" : jsPdfFontName;\r\n        this.pdf.setFont(jsPdfFontName, style);\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalCompositeOperation\", {\r\n      get: function() {\r\n        return this.ctx.globalCompositeOperation;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalCompositeOperation = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalAlpha\", {\r\n      get: function() {\r\n        return this.ctx.globalAlpha;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalAlpha = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A float specifying the amount of the line dash offset. The default value is 0.0.\r\n     *\r\n     * @name lineDashOffset\r\n     * @default 0.0\r\n     */\r\n    Object.defineProperty(this, \"lineDashOffset\", {\r\n      get: function() {\r\n        return this.ctx.lineDashOffset;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDashOffset = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"lineDash\", {\r\n      get: function() {\r\n        return this.ctx.lineDash;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDash = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"ignoreClearRect\", {\r\n      get: function() {\r\n        return this.ctx.ignoreClearRect;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.ignoreClearRect = Boolean(value);\r\n      }\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Sets the line dash pattern used when stroking lines.\r\n   * @name setLineDash\r\n   * @function\r\n   * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.\r\n   */\r\n  Context2D.prototype.setLineDash = function(dashArray) {\r\n    this.lineDash = dashArray;\r\n  };\r\n\r\n  /**\r\n   * gets the current line dash pattern.\r\n   * @name getLineDash\r\n   * @function\r\n   * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].\r\n   */\r\n  Context2D.prototype.getLineDash = function() {\r\n    if (this.lineDash.length % 2) {\r\n      // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value\r\n      return this.lineDash.concat(this.lineDash);\r\n    } else {\r\n      // The copied value is returned to prevent contamination from outside.\r\n      return this.lineDash.slice();\r\n    }\r\n  };\r\n\r\n  Context2D.prototype.fill = function() {\r\n    pathPreProcess.call(this, \"fill\", false);\r\n  };\r\n\r\n  /**\r\n   * Actually draws the path you have defined\r\n   *\r\n   * @name stroke\r\n   * @function\r\n   * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.\r\n   */\r\n  Context2D.prototype.stroke = function() {\r\n    pathPreProcess.call(this, \"stroke\", false);\r\n  };\r\n\r\n  /**\r\n   * Begins a path, or resets the current\r\n   *\r\n   * @name beginPath\r\n   * @function\r\n   * @description The beginPath() method begins a path, or resets the current path.\r\n   */\r\n  Context2D.prototype.beginPath = function() {\r\n    this.path = [\r\n      {\r\n        type: \"begin\"\r\n      }\r\n    ];\r\n  };\r\n\r\n  /**\r\n   * Moves the path to the specified point in the canvas, without creating a line\r\n   *\r\n   * @name moveTo\r\n   * @function\r\n   * @param x {Number} The x-coordinate of where to move the path to\r\n   * @param y {Number} The y-coordinate of where to move the path to\r\n   */\r\n  Context2D.prototype.moveTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.moveTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.moveTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"mt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * Creates a path from the current point back to the starting point\r\n   *\r\n   * @name closePath\r\n   * @function\r\n   * @description The closePath() method creates a path from the current point back to the starting point.\r\n   */\r\n  Context2D.prototype.closePath = function() {\r\n    var pathBegin = new Point(0, 0);\r\n    var i = 0;\r\n    for (i = this.path.length - 1; i !== -1; i--) {\r\n      if (this.path[i].type === \"begin\") {\r\n        if (\r\n          typeof this.path[i + 1] === \"object\" &&\r\n          typeof this.path[i + 1].x === \"number\"\r\n        ) {\r\n          pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);\r\n          break;\r\n        }\r\n      }\r\n    }\r\n    this.path.push({\r\n      type: \"close\"\r\n    });\r\n    this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);\r\n  };\r\n\r\n  /**\r\n   * Adds a new point and creates a line to that point from the last specified point in the canvas\r\n   *\r\n   * @name lineTo\r\n   * @function\r\n   * @param x The x-coordinate of where to create the line to\r\n   * @param y The y-coordinate of where to create the line to\r\n   * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).\r\n   */\r\n  Context2D.prototype.lineTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.lineTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.lineTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"lt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt.x, pt.y);\r\n  };\r\n\r\n  /**\r\n   * Clips a region of any shape and size from the original canvas\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @description The clip() method clips a region of any shape and size from the original canvas.\r\n   */\r\n  Context2D.prototype.clip = function() {\r\n    this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));\r\n    pathPreProcess.call(this, null, true);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name quadraticCurveTo\r\n   * @function\r\n   * @param cpx {Number} The x-coordinate of the Bézier control point\r\n   * @param cpy {Number} The y-coordinate of the Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.<br /><br /> A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {\r\n      console.error(\r\n        \"jsPDF.context2d.quadraticCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.quadraticCurveTo\"\r\n      );\r\n    }\r\n\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));\r\n\r\n    this.path.push({\r\n      type: \"qct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name bezierCurveTo\r\n   * @function\r\n   * @param cp1x {Number} The x-coordinate of the first Bézier control point\r\n   * @param cp1y {Number} The y-coordinate of the first Bézier control point\r\n   * @param cp2x {Number} The x-coordinate of the second Bézier control point\r\n   * @param cp2y {Number} The y-coordinate of the second Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve. <br /><br />A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve.  The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(cp1x) ||\r\n      isNaN(cp1y) ||\r\n      isNaN(cp2x) ||\r\n      isNaN(cp2y)\r\n    ) {\r\n      console.error(\r\n        \"jsPDF.context2d.bezierCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.bezierCurveTo\"\r\n      );\r\n    }\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));\r\n    var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));\r\n\r\n    this.path.push({\r\n      type: \"bct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x2: pt2.x,\r\n      y2: pt2.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve (used to create circles, or parts of circles)\r\n   *\r\n   * @name arc\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the center of the circle\r\n   * @param y {Number} The y-coordinate of the center of the circle\r\n   * @param radius {Number} The radius of the circle\r\n   * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)\r\n   * @param endAngle {Number} The ending angle, in radians\r\n   * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.\r\n   * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).\r\n   */\r\n  Context2D.prototype.arc = function(\r\n    x,\r\n    y,\r\n    radius,\r\n    startAngle,\r\n    endAngle,\r\n    counterclockwise\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(radius) ||\r\n      isNaN(startAngle) ||\r\n      isNaN(endAngle)\r\n    ) {\r\n      console.error(\"jsPDF.context2d.arc: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.arc\");\r\n    }\r\n    counterclockwise = Boolean(counterclockwise);\r\n\r\n    if (!this.ctx.transform.isIdentity) {\r\n      var xpt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n      x = xpt.x;\r\n      y = xpt.y;\r\n\r\n      var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));\r\n      var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));\r\n      radius = Math.sqrt(\r\n        Math.pow(x_radPt.x - x_radPt0.x, 2) +\r\n          Math.pow(x_radPt.y - x_radPt0.y, 2)\r\n      );\r\n    }\r\n    if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {\r\n      startAngle = 0;\r\n      endAngle = 2 * Math.PI;\r\n    }\r\n\r\n    this.path.push({\r\n      type: \"arc\",\r\n      x: x,\r\n      y: y,\r\n      radius: radius,\r\n      startAngle: startAngle,\r\n      endAngle: endAngle,\r\n      counterclockwise: counterclockwise\r\n    });\r\n    // this.ctx.lastPoint(new Point(pt.x,pt.y));\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve between two tangents\r\n   *\r\n   * @name arcTo\r\n   * @function\r\n   * @param x1 {Number} The x-coordinate of the first tangent\r\n   * @param y1 {Number} The y-coordinate of the first tangent\r\n   * @param x2 {Number} The x-coordinate of the second tangent\r\n   * @param y2 {Number} The y-coordinate of the second tangent\r\n   * @param radius The radius of the arc\r\n   * @description The arcTo() method creates an arc/curve between two tangents on the canvas.\r\n   */\r\n  // eslint-disable-next-line no-unused-vars\r\n  Context2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {\r\n    throw new Error(\"arcTo not implemented.\");\r\n  };\r\n\r\n  /**\r\n   * Creates a rectangle\r\n   *\r\n   * @name rect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The rect() method creates a rectangle.\r\n   */\r\n  Context2D.prototype.rect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.rect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rect\");\r\n    }\r\n    this.moveTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x + w, y + h);\r\n    this.lineTo(x, y + h);\r\n    this.lineTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x, y);\r\n  };\r\n\r\n  /**\r\n   * Draws a \"filled\" rectangle\r\n   *\r\n   * @name fillRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The fillRect() method draws a \"filled\" rectangle. The default color of the fill is black.\r\n   */\r\n  Context2D.prototype.fillRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.fillRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillRect\");\r\n    }\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n    var tmp = {};\r\n    if (this.lineCap !== \"butt\") {\r\n      tmp.lineCap = this.lineCap;\r\n      this.lineCap = \"butt\";\r\n    }\r\n    if (this.lineJoin !== \"miter\") {\r\n      tmp.lineJoin = this.lineJoin;\r\n      this.lineJoin = \"miter\";\r\n    }\r\n\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.fill();\r\n\r\n    if (tmp.hasOwnProperty(\"lineCap\")) {\r\n      this.lineCap = tmp.lineCap;\r\n    }\r\n    if (tmp.hasOwnProperty(\"lineJoin\")) {\r\n      this.lineJoin = tmp.lineJoin;\r\n    }\r\n  };\r\n\r\n  /**\r\n   *     Draws a rectangle (no fill)\r\n   *\r\n   * @name strokeRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.\r\n   */\r\n  Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.strokeRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeRect\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.stroke();\r\n  };\r\n\r\n  /**\r\n   * Clears the specified pixels within a given rectangle\r\n   *\r\n   * @name clearRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle to clear, in pixels\r\n   * @param h {Number} The height of the rectangle to clear, in pixels\r\n   * @description We cannot clear PDF commands that were already written to PDF, so we use white instead. <br />\r\n   * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.\r\n   * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.\r\n   * This flag is stored in the save/restore context and is managed the same way as other drawing states.\r\n   *\r\n   */\r\n  Context2D.prototype.clearRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.clearRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.clearRect\");\r\n    }\r\n    if (this.ignoreClearRect) {\r\n      return;\r\n    }\r\n\r\n    this.fillStyle = \"#ffffff\";\r\n    this.fillRect(x, y, w, h);\r\n  };\r\n\r\n  /**\r\n   * Saves the state of the current context\r\n   *\r\n   * @name save\r\n   * @function\r\n   */\r\n  Context2D.prototype.save = function(doStackPush) {\r\n    doStackPush = typeof doStackPush === \"boolean\" ? doStackPush : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPush) {\r\n      this.ctx.fontSize = this.pdf.internal.getFontSize();\r\n      var ctx = new ContextLayer(this.ctx);\r\n      this.ctxStack.push(this.ctx);\r\n      this.ctx = ctx;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Returns previously saved path state and attributes\r\n   *\r\n   * @name restore\r\n   * @function\r\n   */\r\n  Context2D.prototype.restore = function(doStackPop) {\r\n    doStackPop = typeof doStackPop === \"boolean\" ? doStackPop : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"Q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPop && this.ctxStack.length !== 0) {\r\n      this.ctx = this.ctxStack.pop();\r\n      this.fillStyle = this.ctx.fillStyle;\r\n      this.strokeStyle = this.ctx.strokeStyle;\r\n      this.font = this.ctx.font;\r\n      this.lineCap = this.ctx.lineCap;\r\n      this.lineWidth = this.ctx.lineWidth;\r\n      this.lineJoin = this.ctx.lineJoin;\r\n      this.lineDash = this.ctx.lineDash;\r\n      this.lineDashOffset = this.ctx.lineDashOffset;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @name toDataURL\r\n   * @function\r\n   */\r\n  Context2D.prototype.toDataURL = function() {\r\n    throw new Error(\"toDataUrl not implemented.\");\r\n  };\r\n\r\n  //helper functions\r\n\r\n  /**\r\n   * Get the decimal values of r, g, b and a\r\n   *\r\n   * @name getRGBA\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var getRGBA = function(style) {\r\n    var rxRgb = /rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/;\r\n    var rxRgba = /rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*([\\d.]+)\\s*\\)/;\r\n    var rxTransparent = /transparent|rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*0+\\s*\\)/;\r\n\r\n    var r, g, b, a;\r\n\r\n    if (style.isCanvasGradient === true) {\r\n      style = style.getColor();\r\n    }\r\n\r\n    if (!style) {\r\n      return { r: 0, g: 0, b: 0, a: 0, style: style };\r\n    }\r\n\r\n    if (rxTransparent.test(style)) {\r\n      r = 0;\r\n      g = 0;\r\n      b = 0;\r\n      a = 0;\r\n    } else {\r\n      var matches = rxRgb.exec(style);\r\n      if (matches !== null) {\r\n        r = parseInt(matches[1]);\r\n        g = parseInt(matches[2]);\r\n        b = parseInt(matches[3]);\r\n        a = 1;\r\n      } else {\r\n        matches = rxRgba.exec(style);\r\n        if (matches !== null) {\r\n          r = parseInt(matches[1]);\r\n          g = parseInt(matches[2]);\r\n          b = parseInt(matches[3]);\r\n          a = parseFloat(matches[4]);\r\n        } else {\r\n          a = 1;\r\n\r\n          if (typeof style === \"string\" && style.charAt(0) !== \"#\") {\r\n            var rgbColor = new RGBColor(style);\r\n            if (rgbColor.ok) {\r\n              style = rgbColor.toHex();\r\n            } else {\r\n              style = \"#000000\";\r\n            }\r\n          }\r\n\r\n          if (style.length === 4) {\r\n            r = style.substring(1, 2);\r\n            r += r;\r\n            g = style.substring(2, 3);\r\n            g += g;\r\n            b = style.substring(3, 4);\r\n            b += b;\r\n          } else {\r\n            r = style.substring(1, 3);\r\n            g = style.substring(3, 5);\r\n            b = style.substring(5, 7);\r\n          }\r\n          r = parseInt(r, 16);\r\n          g = parseInt(g, 16);\r\n          b = parseInt(b, 16);\r\n        }\r\n      }\r\n    }\r\n    return { r: r, g: g, b: b, a: a, style: style };\r\n  };\r\n\r\n  /**\r\n   * @name isFillTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isFillTransparent = function() {\r\n    return this.ctx.isFillTransparent || this.globalAlpha == 0;\r\n  };\r\n\r\n  /**\r\n   * @name isStrokeTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isStrokeTransparent = function() {\r\n    return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);\r\n  };\r\n\r\n  /**\r\n   * Draws \"filled\" text on the canvas\r\n   *\r\n   * @name fillText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The fillText() method draws filled text on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.fillText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.fillText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillText\");\r\n    }\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n\r\n    // We only use X axis as scale hint\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Draws text on the canvas (no fill)\r\n   *\r\n   * @name strokeText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.strokeText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.strokeText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeText\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      renderingMode: \"stroke\",\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Returns an object that contains the width of the specified text\r\n   *\r\n   * @name measureText\r\n   * @function\r\n   * @param text {String} The text to be measured\r\n   * @description The measureText() method returns an object that contains the width of the specified text, in pixels.\r\n   * @returns {Number}\r\n   */\r\n  Context2D.prototype.measureText = function(text) {\r\n    if (typeof text !== \"string\") {\r\n      console.error(\r\n        \"jsPDF.context2d.measureText: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.measureText\"\r\n      );\r\n    }\r\n    var pdf = this.pdf;\r\n    var k = this.pdf.internal.scaleFactor;\r\n\r\n    var fontSize = pdf.internal.getFontSize();\r\n    var txtWidth =\r\n      (pdf.getStringUnitWidth(text) * fontSize) / pdf.internal.scaleFactor;\r\n    txtWidth *= Math.round(((k * 96) / 72) * 10000) / 10000;\r\n\r\n    var TextMetrics = function(options) {\r\n      options = options || {};\r\n      var _width = options.width || 0;\r\n      Object.defineProperty(this, \"width\", {\r\n        get: function() {\r\n          return _width;\r\n        }\r\n      });\r\n      return this;\r\n    };\r\n    return new TextMetrics({ width: txtWidth });\r\n  };\r\n\r\n  //Transformations\r\n\r\n  /**\r\n   * Scales the current drawing bigger or smaller\r\n   *\r\n   * @name scale\r\n   * @function\r\n   * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @description The scale() method scales the current drawing, bigger or smaller.\r\n   */\r\n  Context2D.prototype.scale = function(scalewidth, scaleheight) {\r\n    if (isNaN(scalewidth) || isNaN(scaleheight)) {\r\n      console.error(\"jsPDF.context2d.scale: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.scale\");\r\n    }\r\n    var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Rotates the current drawing\r\n   *\r\n   * @name rotate\r\n   * @function\r\n   * @param angle {Number} The rotation angle, in radians.\r\n   * @description To calculate from degrees to radians: degrees*Math.PI/180. <br />\r\n   * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180\r\n   */\r\n  Context2D.prototype.rotate = function(angle) {\r\n    if (isNaN(angle)) {\r\n      console.error(\"jsPDF.context2d.rotate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rotate\");\r\n    }\r\n    var matrix = new Matrix(\r\n      Math.cos(angle),\r\n      Math.sin(angle),\r\n      -Math.sin(angle),\r\n      Math.cos(angle),\r\n      0.0,\r\n      0.0\r\n    );\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Remaps the (0,0) position on the canvas\r\n   *\r\n   * @name translate\r\n   * @function\r\n   * @param x {Number} The value to add to horizontal (x) coordinates\r\n   * @param y {Number} The value to add to vertical (y) coordinates\r\n   * @description The translate() method remaps the (0,0) position on the canvas.\r\n   */\r\n  Context2D.prototype.translate = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.translate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.translate\");\r\n    }\r\n    var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Replaces the current transformation matrix for the drawing\r\n   *\r\n   * @name transform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix.<br /><br />The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:<br /><br /><br /><br />a    c    e<br /><br />b    d    f<br /><br />0    0    1<br /><br />In other words, the transform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.transform = function(a, b, c, d, e, f) {\r\n    if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {\r\n      console.error(\"jsPDF.context2d.transform: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.transform\");\r\n    }\r\n    var matrix = new Matrix(a, b, c, d, e, f);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Resets the current transform to the identity matrix. Then runs transform()\r\n   *\r\n   * @name setTransform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix. <br /><br />The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.<br /><br />In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.setTransform = function(a, b, c, d, e, f) {\r\n    a = isNaN(a) ? 1 : a;\r\n    b = isNaN(b) ? 0 : b;\r\n    c = isNaN(c) ? 0 : c;\r\n    d = isNaN(d) ? 1 : d;\r\n    e = isNaN(e) ? 0 : e;\r\n    f = isNaN(f) ? 0 : f;\r\n    this.ctx.transform = new Matrix(a, b, c, d, e, f);\r\n  };\r\n\r\n  /**\r\n   * Should only be used if pageWrapYEnabled is true\r\n   *\r\n   * @name setPageByYPosition\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns One-based Page Number\r\n   */\r\n  var setPageByYPosition = function(y) {\r\n    if (this.pageWrapYEnabled) {\r\n      this.lastBreak = 0;\r\n      var manualBreaks = 0;\r\n      var autoBreaks = 0;\r\n      for (var i = 0; i < this.pageBreaks.length; i++) {\r\n        if (y >= this.pageBreaks[i]) {\r\n          manualBreaks++;\r\n          if (this.lastBreak === 0) {\r\n            autoBreaks++;\r\n          }\r\n          var spaceBetweenLastBreak = this.pageBreaks[i] - this.lastBreak;\r\n          this.lastBreak = this.pageBreaks[i];\r\n          var pagesSinceLastBreak = Math.floor(\r\n            spaceBetweenLastBreak / this.pageWrapY\r\n          );\r\n          autoBreaks += pagesSinceLastBreak;\r\n        }\r\n      }\r\n      if (this.lastBreak === 0) {\r\n        var pagesSinceLastBreak = Math.floor(y / this.pageWrapY) + 1;\r\n        autoBreaks += pagesSinceLastBreak;\r\n      }\r\n      return autoBreaks + manualBreaks;\r\n    } else {\r\n      return this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    }\r\n  };\r\n\r\n  var hasMargins = function() {\r\n    return (\r\n      this.margin[0] > 0 ||\r\n      this.margin[1] > 0 ||\r\n      this.margin[2] > 0 ||\r\n      this.margin[3] > 0\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Draws an image, canvas, or video onto the canvas\r\n   *\r\n   * @function\r\n   * @param img {} Specifies the image, canvas, or video element to use\r\n   * @param sx {Number} Optional. The x coordinate where to start clipping\r\n   * @param sy {Number} Optional. The y coordinate where to start clipping\r\n   * @param swidth {Number} Optional. The width of the clipped image\r\n   * @param sheight {Number} Optional. The height of the clipped image\r\n   * @param x {Number} The x coordinate where to place the image on the canvas\r\n   * @param y {Number} The y coordinate where to place the image on the canvas\r\n   * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)\r\n   * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)\r\n   */\r\n  Context2D.prototype.drawImage = function(\r\n    img,\r\n    sx,\r\n    sy,\r\n    swidth,\r\n    sheight,\r\n    x,\r\n    y,\r\n    width,\r\n    height\r\n  ) {\r\n    var imageProperties = this.pdf.getImageProperties(img);\r\n    var factorX = 1;\r\n    var factorY = 1;\r\n    var isClip;\r\n\r\n    var clipFactorX = 1;\r\n    var clipFactorY = 1;\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width !== \"undefined\") {\r\n      isClip = true;\r\n      clipFactorX = width / swidth;\r\n      clipFactorY = height / sheight;\r\n      factorX = ((imageProperties.width / swidth) * width) / swidth;\r\n      factorY = ((imageProperties.height / sheight) * height) / sheight;\r\n    }\r\n\r\n    //is sx and sy are set and x and y not, set x and y with values of sx and sy\r\n    if (typeof x === \"undefined\") {\r\n      x = sx;\r\n      y = sy;\r\n      sx = 0;\r\n      sy = 0;\r\n    }\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width === \"undefined\") {\r\n      width = swidth;\r\n      height = sheight;\r\n    }\r\n    if (typeof swidth === \"undefined\" && typeof width === \"undefined\") {\r\n      width = imageProperties.width;\r\n      height = imageProperties.height;\r\n    }\r\n\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n    var xRect = matrix.applyToRectangle(\r\n      new Rectangle(\r\n        x - sx * clipFactorX,\r\n        y - sy * clipFactorY,\r\n        swidth * factorX,\r\n        sheight * factorY\r\n      )\r\n    );\r\n    var pageArray = getPagesByPath.call(this, xRect);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var tmpRect = JSON.parse(JSON.stringify(xRect));\r\n        tmpRect = pathPositionRedo(\r\n          [tmpRect],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        const needsClipping = (i > min || i < max) && hasMargins.call(this);\r\n\r\n        if (needsClipping) {\r\n          this.pdf.saveGraphicsState();\r\n          this.pdf\r\n            .rect(\r\n              this.margin[3],\r\n              this.margin[0],\r\n              pageWidthMinusMargins,\r\n              pageHeightMinusMargins,\r\n              null\r\n            )\r\n            .clip()\r\n            .discardPath();\r\n        }\r\n        this.pdf.addImage(\r\n          img,\r\n          \"JPEG\",\r\n          tmpRect.x,\r\n          tmpRect.y,\r\n          tmpRect.w,\r\n          tmpRect.h,\r\n          null,\r\n          null,\r\n          angle\r\n        );\r\n        if (needsClipping) {\r\n          this.pdf.restoreGraphicsState();\r\n        }\r\n      }\r\n    } else {\r\n      this.pdf.addImage(\r\n        img,\r\n        \"JPEG\",\r\n        xRect.x,\r\n        xRect.y,\r\n        xRect.w,\r\n        xRect.h,\r\n        null,\r\n        null,\r\n        angle\r\n      );\r\n    }\r\n  };\r\n\r\n  var getPagesByPath = function(path, pageWrapX, pageWrapY) {\r\n    var result = [];\r\n    pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;\r\n    pageWrapY =\r\n      pageWrapY ||\r\n      this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n    var yOffset = this.posY + this.ctx.prevPageLastElemOffset;\r\n\r\n    switch (path.type) {\r\n      default:\r\n      case \"mt\":\r\n      case \"lt\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        break;\r\n      case \"arc\":\r\n        result.push(\r\n          Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1\r\n        );\r\n        break;\r\n      case \"qct\":\r\n        var rectOfQuadraticCurve = getQuadraticCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) /\r\n              pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"bct\":\r\n        var rectOfBezierCurve = getBezierCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x2,\r\n          path.y2,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"rect\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);\r\n    }\r\n\r\n    for (var i = 0; i < result.length; i += 1) {\r\n      while (this.pdf.internal.getNumberOfPages() < result[i]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    return result;\r\n  };\r\n\r\n  var addPage = function() {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var font = this.font;\r\n    var lineCap = this.lineCap;\r\n    var lineWidth = this.lineWidth;\r\n    var lineJoin = this.lineJoin;\r\n    this.pdf.addPage();\r\n    this.fillStyle = fillStyle;\r\n    this.strokeStyle = strokeStyle;\r\n    this.font = font;\r\n    this.lineCap = lineCap;\r\n    this.lineWidth = lineWidth;\r\n    this.lineJoin = lineJoin;\r\n  };\r\n\r\n  var pathPositionRedo = function(paths, x, y) {\r\n    for (var i = 0; i < paths.length; i++) {\r\n      switch (paths[i].type) {\r\n        case \"bct\":\r\n          paths[i].x2 += x;\r\n          paths[i].y2 += y;\r\n        case \"qct\":\r\n          paths[i].x1 += x;\r\n          paths[i].y1 += y;\r\n        case \"mt\":\r\n        case \"lt\":\r\n        case \"arc\":\r\n        default:\r\n          paths[i].x += x;\r\n          paths[i].y += y;\r\n      }\r\n    }\r\n    return paths;\r\n  };\r\n\r\n  var sortPages = function(pages) {\r\n    return pages.sort(function(a, b) {\r\n      return a - b;\r\n    });\r\n  };\r\n\r\n  var pathPreProcess = function(rule, isClip) {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var lineCap = this.lineCap;\r\n    var oldLineWidth = this.lineWidth;\r\n    var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);\r\n    var lineJoin = this.lineJoin;\r\n\r\n    var origPath = JSON.parse(JSON.stringify(this.path));\r\n    var xPath = JSON.parse(JSON.stringify(this.path));\r\n    var clipPath;\r\n    var tmpPath;\r\n    var pages = [];\r\n\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      if (typeof xPath[i].x !== \"undefined\") {\r\n        var page = getPagesByPath.call(this, xPath[i]);\r\n\r\n        for (var ii = 0; ii < page.length; ii += 1) {\r\n          if (pages.indexOf(page[ii]) === -1) {\r\n            pages.push(page[ii]);\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    for (var j = 0; j < pages.length; j++) {\r\n      while (this.pdf.internal.getNumberOfPages() < pages[j]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    sortPages(pages);\r\n\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var k = min; k < max + 1; k++) {\r\n        this.pdf.setPage(k);\r\n\r\n        this.fillStyle = fillStyle;\r\n        this.strokeStyle = strokeStyle;\r\n        this.lineCap = lineCap;\r\n        this.lineWidth = lineWidth;\r\n        this.lineJoin = lineJoin;\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, rule, true);\r\n          this.path = tmpPaths;\r\n        }\r\n        tmpPath = JSON.parse(JSON.stringify(origPath));\r\n        this.path = pathPositionRedo(\r\n          tmpPath,\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        );\r\n        if (isClip === false || k === 0) {\r\n          const needsClipping = (k > min || k < max) && hasMargins.call(this);\r\n          if (needsClipping) {\r\n            this.pdf.saveGraphicsState();\r\n            this.pdf\r\n              .rect(\r\n                this.margin[3],\r\n                this.margin[0],\r\n                pageWidthMinusMargins,\r\n                pageHeightMinusMargins,\r\n                null\r\n              )\r\n              .clip()\r\n              .discardPath();\r\n          }\r\n          drawPaths.call(this, rule, isClip);\r\n          if (needsClipping) {\r\n            this.pdf.restoreGraphicsState();\r\n          }\r\n        }\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    } else {\r\n      this.lineWidth = lineWidth;\r\n      drawPaths.call(this, rule, isClip);\r\n      this.lineWidth = oldLineWidth;\r\n    }\r\n    this.path = origPath;\r\n  };\r\n\r\n  /**\r\n   * Processes the paths\r\n   *\r\n   * @function\r\n   * @param rule {String}\r\n   * @param isClip {Boolean}\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var drawPaths = function(rule, isClip) {\r\n    if (rule === \"stroke\" && !isClip && isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    if (rule !== \"stroke\" && !isClip && isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var moves = [];\r\n\r\n    //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;\r\n    var delta;\r\n    var xPath = this.path;\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      var pt = xPath[i];\r\n\r\n      switch (pt.type) {\r\n        case \"begin\":\r\n          moves.push({\r\n            begin: true\r\n          });\r\n          break;\r\n\r\n        case \"close\":\r\n          moves.push({\r\n            close: true\r\n          });\r\n          break;\r\n\r\n        case \"mt\":\r\n          moves.push({\r\n            start: pt,\r\n            deltas: [],\r\n            abs: []\r\n          });\r\n          break;\r\n\r\n        case \"lt\":\r\n          var iii = moves.length;\r\n          if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {\r\n            delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];\r\n            if (iii > 0) {\r\n              for (iii; iii >= 0; iii--) {\r\n                if (\r\n                  moves[iii - 1].close !== true &&\r\n                  moves[iii - 1].begin !== true\r\n                ) {\r\n                  moves[iii - 1].deltas.push(delta);\r\n                  moves[iii - 1].abs.push(pt);\r\n                  break;\r\n                }\r\n              }\r\n            }\r\n          }\r\n          break;\r\n\r\n        case \"bct\":\r\n          delta = [\r\n            pt.x1 - xPath[i - 1].x,\r\n            pt.y1 - xPath[i - 1].y,\r\n            pt.x2 - xPath[i - 1].x,\r\n            pt.y2 - xPath[i - 1].y,\r\n            pt.x - xPath[i - 1].x,\r\n            pt.y - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"qct\":\r\n          var x1 = xPath[i - 1].x + (2.0 / 3.0) * (pt.x1 - xPath[i - 1].x);\r\n          var y1 = xPath[i - 1].y + (2.0 / 3.0) * (pt.y1 - xPath[i - 1].y);\r\n          var x2 = pt.x + (2.0 / 3.0) * (pt.x1 - pt.x);\r\n          var y2 = pt.y + (2.0 / 3.0) * (pt.y1 - pt.y);\r\n          var x3 = pt.x;\r\n          var y3 = pt.y;\r\n          delta = [\r\n            x1 - xPath[i - 1].x,\r\n            y1 - xPath[i - 1].y,\r\n            x2 - xPath[i - 1].x,\r\n            y2 - xPath[i - 1].y,\r\n            x3 - xPath[i - 1].x,\r\n            y3 - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"arc\":\r\n          moves.push({\r\n            deltas: [],\r\n            abs: [],\r\n            arc: true\r\n          });\r\n\r\n          if (Array.isArray(moves[moves.length - 1].abs)) {\r\n            moves[moves.length - 1].abs.push(pt);\r\n          }\r\n          break;\r\n      }\r\n    }\r\n    var style;\r\n    if (!isClip) {\r\n      if (rule === \"stroke\") {\r\n        style = \"stroke\";\r\n      } else {\r\n        style = \"fill\";\r\n      }\r\n    } else {\r\n      style = null;\r\n    }\r\n\r\n    var began = false;\r\n    for (var k = 0; k < moves.length; k++) {\r\n      if (moves[k].arc) {\r\n        var arcs = moves[k].abs;\r\n\r\n        for (var ii = 0; ii < arcs.length; ii++) {\r\n          var arc = arcs[ii];\r\n\r\n          if (arc.type === \"arc\") {\r\n            drawArc.call(\r\n              this,\r\n              arc.x,\r\n              arc.y,\r\n              arc.radius,\r\n              arc.startAngle,\r\n              arc.endAngle,\r\n              arc.counterclockwise,\r\n              undefined,\r\n              isClip,\r\n              !began\r\n            );\r\n          } else {\r\n            drawLine.call(this, arc.x, arc.y);\r\n          }\r\n          began = true;\r\n        }\r\n      } else if (moves[k].close === true) {\r\n        this.pdf.internal.out(\"h\");\r\n        began = false;\r\n      } else if (moves[k].begin !== true) {\r\n        var x = moves[k].start.x;\r\n        var y = moves[k].start.y;\r\n        drawLines.call(this, moves[k].deltas, x, y);\r\n        began = true;\r\n      }\r\n    }\r\n\r\n    if (style) {\r\n      putStyle.call(this, style);\r\n    }\r\n    if (isClip) {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var getBaseline = function(y) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    switch (this.ctx.textBaseline) {\r\n      case \"bottom\":\r\n        return y - descent;\r\n      case \"top\":\r\n        return y + height - descent;\r\n      case \"hanging\":\r\n        return y + height - 2 * descent;\r\n      case \"middle\":\r\n        return y + height / 2 - descent;\r\n      case \"ideographic\":\r\n        // TODO not implemented\r\n        return y;\r\n      case \"alphabetic\":\r\n      default:\r\n        return y;\r\n    }\r\n  };\r\n\r\n  var getTextBottom = function(yBaseLine) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    return yBaseLine + descent;\r\n  };\r\n\r\n  Context2D.prototype.createLinearGradient = function createLinearGradient() {\r\n    var canvasGradient = function canvasGradient() {};\r\n\r\n    canvasGradient.colorStops = [];\r\n    canvasGradient.addColorStop = function(offset, color) {\r\n      this.colorStops.push([offset, color]);\r\n    };\r\n\r\n    canvasGradient.getColor = function() {\r\n      if (this.colorStops.length === 0) {\r\n        return \"#000000\";\r\n      }\r\n\r\n      return this.colorStops[0][1];\r\n    };\r\n\r\n    canvasGradient.isCanvasGradient = true;\r\n    return canvasGradient;\r\n  };\r\n  Context2D.prototype.createPattern = function createPattern() {\r\n    return this.createLinearGradient();\r\n  };\r\n  Context2D.prototype.createRadialGradient = function createRadialGradient() {\r\n    return this.createLinearGradient();\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param x Edge point X\r\n   * @param y Edge point Y\r\n   * @param r Radius\r\n   * @param a1 start angle\r\n   * @param a2 end angle\r\n   * @param counterclockwise\r\n   * @param style\r\n   * @param isClip\r\n   */\r\n  var drawArc = function(\r\n    x,\r\n    y,\r\n    r,\r\n    a1,\r\n    a2,\r\n    counterclockwise,\r\n    style,\r\n    isClip,\r\n    includeMove\r\n  ) {\r\n    // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html\r\n    var curves = createArc.call(this, r, a1, a2, counterclockwise);\r\n\r\n    for (var i = 0; i < curves.length; i++) {\r\n      var curve = curves[i];\r\n      if (i === 0) {\r\n        if (includeMove) {\r\n          doMove.call(this, curve.x1 + x, curve.y1 + y);\r\n        } else {\r\n          drawLine.call(this, curve.x1 + x, curve.y1 + y);\r\n        }\r\n      }\r\n      drawCurve.call(\r\n        this,\r\n        x,\r\n        y,\r\n        curve.x2,\r\n        curve.y2,\r\n        curve.x3,\r\n        curve.y3,\r\n        curve.x4,\r\n        curve.y4\r\n      );\r\n    }\r\n\r\n    if (!isClip) {\r\n      putStyle.call(this, style);\r\n    } else {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    switch (style) {\r\n      case \"stroke\":\r\n        this.pdf.internal.out(\"S\");\r\n        break;\r\n      case \"fill\":\r\n        this.pdf.internal.out(\"f\");\r\n        break;\r\n    }\r\n  };\r\n\r\n  var doClip = function() {\r\n    this.pdf.clip();\r\n    this.pdf.discardPath();\r\n  };\r\n\r\n  var doMove = function(x, y) {\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y) +\r\n        \" m\"\r\n    );\r\n  };\r\n\r\n  var putText = function(options) {\r\n    var textAlign;\r\n    switch (options.align) {\r\n      case \"right\":\r\n      case \"end\":\r\n        textAlign = \"right\";\r\n        break;\r\n      case \"center\":\r\n        textAlign = \"center\";\r\n        break;\r\n      case \"left\":\r\n      case \"start\":\r\n      default:\r\n        textAlign = \"left\";\r\n        break;\r\n    }\r\n\r\n    var textDimensions = this.pdf.getTextDimensions(options.text);\r\n    var yBaseLine = getBaseline.call(this, options.y);\r\n    var yBottom = getTextBottom.call(this, yBaseLine);\r\n    var yTop = yBottom - textDimensions.h;\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n\r\n    var baselineRect = this.ctx.transform.applyToRectangle(\r\n      new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h)\r\n    );\r\n    var textBounds = matrix.applyToRectangle(\r\n      new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h)\r\n    );\r\n    var pageArray = getPagesByPath.call(this, textBounds);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath, oldSize, oldLineWidth;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusBottomMargin =\r\n          this.pdf.internal.pageSize.height - this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          pageHeightMinusBottomMargin - this.margin[0];\r\n        var pageWidthMinusRightMargin =\r\n          this.pdf.internal.pageSize.width - this.margin[1];\r\n        var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -1 * previousPageHeightSum + topMargin\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var textBoundsOnPage = pathPositionRedo(\r\n          [JSON.parse(JSON.stringify(textBounds))],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        if (options.scale >= 0.01) {\r\n          oldSize = this.pdf.internal.getFontSize();\r\n          this.pdf.setFontSize(oldSize * options.scale);\r\n          oldLineWidth = this.lineWidth;\r\n          this.lineWidth = oldLineWidth * options.scale;\r\n        }\r\n\r\n        var doSlice = this.autoPaging !== \"text\";\r\n\r\n        if (\r\n          doSlice ||\r\n          textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin\r\n        ) {\r\n          if (\r\n            doSlice ||\r\n            (textBoundsOnPage.y >= topMargin &&\r\n              textBoundsOnPage.x <= pageWidthMinusRightMargin)\r\n          ) {\r\n            var croppedText = doSlice\r\n              ? options.text\r\n              : this.pdf.splitTextToSize(\r\n                  options.text,\r\n                  options.maxWidth ||\r\n                    pageWidthMinusRightMargin - textBoundsOnPage.x\r\n                )[0];\r\n            var baseLineRectOnPage = pathPositionRedo(\r\n              [JSON.parse(JSON.stringify(baselineRect))],\r\n              this.posX + this.margin[3],\r\n              -previousPageHeightSum +\r\n                topMargin +\r\n                this.ctx.prevPageLastElemOffset\r\n            )[0];\r\n\r\n            const needsClipping =\r\n              doSlice && (i > min || i < max) && hasMargins.call(this);\r\n\r\n            if (needsClipping) {\r\n              this.pdf.saveGraphicsState();\r\n              this.pdf\r\n                .rect(\r\n                  this.margin[3],\r\n                  this.margin[0],\r\n                  pageWidthMinusMargins,\r\n                  pageHeightMinusMargins,\r\n                  null\r\n                )\r\n                .clip()\r\n                .discardPath();\r\n            }\r\n\r\n            this.pdf.text(\r\n              croppedText,\r\n              baseLineRectOnPage.x,\r\n              baseLineRectOnPage.y,\r\n              {\r\n                angle: options.angle,\r\n                align: textAlign,\r\n                renderingMode: options.renderingMode\r\n              }\r\n            );\r\n\r\n            if (needsClipping) {\r\n              this.pdf.restoreGraphicsState();\r\n            }\r\n          }\r\n        } else {\r\n          // This text is the last element of the page, but it got cut off due to the margin\r\n          // so we render it in the next page\r\n\r\n          if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {\r\n            // As a result, all other elements have their y offset increased\r\n            this.ctx.prevPageLastElemOffset +=\r\n              pageHeightMinusBottomMargin - textBoundsOnPage.y;\r\n          }\r\n        }\r\n\r\n        if (options.scale >= 0.01) {\r\n          this.pdf.setFontSize(oldSize);\r\n          this.lineWidth = oldLineWidth;\r\n        }\r\n      }\r\n    } else {\r\n      if (options.scale >= 0.01) {\r\n        oldSize = this.pdf.internal.getFontSize();\r\n        this.pdf.setFontSize(oldSize * options.scale);\r\n        oldLineWidth = this.lineWidth;\r\n        this.lineWidth = oldLineWidth * options.scale;\r\n      }\r\n      this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {\r\n        angle: options.angle,\r\n        align: textAlign,\r\n        renderingMode: options.renderingMode,\r\n        maxWidth: options.maxWidth\r\n      });\r\n\r\n      if (options.scale >= 0.01) {\r\n        this.pdf.setFontSize(oldSize);\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    }\r\n  };\r\n\r\n  var drawLine = function(x, y, prevX, prevY) {\r\n    prevX = prevX || 0;\r\n    prevY = prevY || 0;\r\n\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x + prevX) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y + prevY) +\r\n        \" l\"\r\n    );\r\n  };\r\n\r\n  var drawLines = function(lines, x, y) {\r\n    return this.pdf.lines(lines, x, y, null, null);\r\n  };\r\n\r\n  var drawCurve = function(x, y, x1, y1, x2, y2, x3, y3) {\r\n    this.pdf.internal.out(\r\n      [\r\n        f2(getHorizontalCoordinate(x1 + x)),\r\n        f2(getVerticalCoordinate(y1 + y)),\r\n        f2(getHorizontalCoordinate(x2 + x)),\r\n        f2(getVerticalCoordinate(y2 + y)),\r\n        f2(getHorizontalCoordinate(x3 + x)),\r\n        f2(getVerticalCoordinate(y3 + y)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.\r\n   *\r\n   * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   * @function createArc\r\n   */\r\n  var createArc = function(radius, startAngle, endAngle, anticlockwise) {\r\n    var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below\r\n    var twoPi = Math.PI * 2;\r\n    var halfPi = Math.PI / 2.0;\r\n\r\n    while (startAngle > endAngle) {\r\n      startAngle = startAngle - twoPi;\r\n    }\r\n    var totalAngle = Math.abs(endAngle - startAngle);\r\n    if (totalAngle < twoPi) {\r\n      if (anticlockwise) {\r\n        totalAngle = twoPi - totalAngle;\r\n      }\r\n    }\r\n\r\n    // Compute the sequence of arc curves, up to PI/2 at a time.\r\n    var curves = [];\r\n\r\n    // clockwise or counterclockwise\r\n    var sgn = anticlockwise ? -1 : +1;\r\n\r\n    var a1 = startAngle;\r\n    for (; totalAngle > EPSILON; ) {\r\n      var remain = sgn * Math.min(totalAngle, halfPi);\r\n      var a2 = a1 + remain;\r\n      curves.push(createSmallArc.call(this, radius, a1, a2));\r\n      totalAngle -= Math.abs(a2 - a1);\r\n      a1 = a2;\r\n    }\r\n\r\n    return curves;\r\n  };\r\n\r\n  /**\r\n   * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.\r\n   *\r\n   * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   *\r\n   * This algorithm is based on the approach described in: A. Riškus, \"Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa,\" Information Technology and Control, 35(4), 2006 pp. 371-378.\r\n   */\r\n  var createSmallArc = function(r, a1, a2) {\r\n    var a = (a2 - a1) / 2.0;\r\n\r\n    var x4 = r * Math.cos(a);\r\n    var y4 = r * Math.sin(a);\r\n    var x1 = x4;\r\n    var y1 = -y4;\r\n\r\n    var q1 = x1 * x1 + y1 * y1;\r\n    var q2 = q1 + x1 * x4 + y1 * y4;\r\n    var k2 = ((4 / 3) * (Math.sqrt(2 * q1 * q2) - q2)) / (x1 * y4 - y1 * x4);\r\n\r\n    var x2 = x1 - k2 * y1;\r\n    var y2 = y1 + k2 * x1;\r\n    var x3 = x2;\r\n    var y3 = -y2;\r\n\r\n    var ar = a + a1;\r\n    var cos_ar = Math.cos(ar);\r\n    var sin_ar = Math.sin(ar);\r\n\r\n    return {\r\n      x1: r * Math.cos(a1),\r\n      y1: r * Math.sin(a1),\r\n      x2: x2 * cos_ar - y2 * sin_ar,\r\n      y2: x2 * sin_ar + y2 * cos_ar,\r\n      x3: x3 * cos_ar - y3 * sin_ar,\r\n      y3: x3 * sin_ar + y3 * cos_ar,\r\n      x4: r * Math.cos(a2),\r\n      y4: r * Math.sin(a2)\r\n    };\r\n  };\r\n\r\n  var rad2deg = function(value) {\r\n    return (value * 180) / Math.PI;\r\n  };\r\n\r\n  var getQuadraticCurveBoundary = function(sx, sy, cpx, cpy, ex, ey) {\r\n    var midX1 = sx + (cpx - sx) * 0.5;\r\n    var midY1 = sy + (cpy - sy) * 0.5;\r\n    var midX2 = ex + (cpx - ex) * 0.5;\r\n    var midY2 = ey + (cpy - ey) * 0.5;\r\n    var resultX1 = Math.min(sx, ex, midX1, midX2);\r\n    var resultX2 = Math.max(sx, ex, midX1, midX2);\r\n    var resultY1 = Math.min(sy, ey, midY1, midY2);\r\n    var resultY2 = Math.max(sy, ey, midY1, midY2);\r\n    return new Rectangle(\r\n      resultX1,\r\n      resultY1,\r\n      resultX2 - resultX1,\r\n      resultY2 - resultY1\r\n    );\r\n  };\r\n\r\n  //De Casteljau algorithm\r\n  var getBezierCurveBoundary = function(ax, ay, bx, by, cx, cy, dx, dy) {\r\n    var tobx = bx - ax;\r\n    var toby = by - ay;\r\n    var tocx = cx - bx;\r\n    var tocy = cy - by;\r\n    var todx = dx - cx;\r\n    var tody = dy - cy;\r\n    var precision = 40;\r\n    var d,\r\n      i,\r\n      px,\r\n      py,\r\n      qx,\r\n      qy,\r\n      rx,\r\n      ry,\r\n      tx,\r\n      ty,\r\n      sx,\r\n      sy,\r\n      x,\r\n      y,\r\n      minx,\r\n      miny,\r\n      maxx,\r\n      maxy,\r\n      toqx,\r\n      toqy,\r\n      torx,\r\n      tory,\r\n      totx,\r\n      toty;\r\n    for (i = 0; i < precision + 1; i++) {\r\n      d = i / precision;\r\n      px = ax + d * tobx;\r\n      py = ay + d * toby;\r\n      qx = bx + d * tocx;\r\n      qy = by + d * tocy;\r\n      rx = cx + d * todx;\r\n      ry = cy + d * tody;\r\n      toqx = qx - px;\r\n      toqy = qy - py;\r\n      torx = rx - qx;\r\n      tory = ry - qy;\r\n\r\n      sx = px + d * toqx;\r\n      sy = py + d * toqy;\r\n      tx = qx + d * torx;\r\n      ty = qy + d * tory;\r\n      totx = tx - sx;\r\n      toty = ty - sy;\r\n\r\n      x = sx + d * totx;\r\n      y = sy + d * toty;\r\n      if (i == 0) {\r\n        minx = x;\r\n        miny = y;\r\n        maxx = x;\r\n        maxy = y;\r\n      } else {\r\n        minx = Math.min(minx, x);\r\n        miny = Math.min(miny, y);\r\n        maxx = Math.max(maxx, x);\r\n        maxy = Math.max(maxy, y);\r\n      }\r\n    }\r\n    return new Rectangle(\r\n      Math.round(minx),\r\n      Math.round(miny),\r\n      Math.round(maxx - minx),\r\n      Math.round(maxy - miny)\r\n    );\r\n  };\r\n\r\n  var getPrevLineDashValue = function(lineDash, lineDashOffset) {\r\n    return JSON.stringify({\r\n      lineDash: lineDash,\r\n      lineDashOffset: lineDashOffset\r\n    });\r\n  };\r\n\r\n  var setLineDash = function() {\r\n    // Avoid unnecessary line dash declarations.\r\n    if (\r\n      !this.prevLineDash &&\r\n      !this.ctx.lineDash.length &&\r\n      !this.ctx.lineDashOffset\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    // Avoid unnecessary line dash declarations.\r\n    const nextLineDash = getPrevLineDashValue(\r\n      this.ctx.lineDash,\r\n      this.ctx.lineDashOffset\r\n    );\r\n    if (this.prevLineDash !== nextLineDash) {\r\n      this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);\r\n      this.prevLineDash = nextLineDash;\r\n    }\r\n  };\r\n})(jsPDF.API);\r\n","/**\n * @license\n * jsPDF filters PlugIn\n * Copyright (c) 2014 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var ASCII85Encode = function(a) {\n    var b, c, d, e, f, g, h, i, j, k;\n    // eslint-disable-next-line no-control-regex\n    for (\n      !/[^\\x00-\\xFF]/.test(a),\n        b = \"\\x00\\x00\\x00\\x00\".slice(a.length % 4 || 4),\n        a += b,\n        c = [],\n        d = 0,\n        e = a.length;\n      e > d;\n      d += 4\n    )\n      (f =\n        (a.charCodeAt(d) << 24) +\n        (a.charCodeAt(d + 1) << 16) +\n        (a.charCodeAt(d + 2) << 8) +\n        a.charCodeAt(d + 3)),\n        0 !== f\n          ? ((k = f % 85),\n            (f = (f - k) / 85),\n            (j = f % 85),\n            (f = (f - j) / 85),\n            (i = f % 85),\n            (f = (f - i) / 85),\n            (h = f % 85),\n            (f = (f - h) / 85),\n            (g = f % 85),\n            c.push(g + 33, h + 33, i + 33, j + 33, k + 33))\n          : c.push(122);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(c, b.length),\n      String.fromCharCode.apply(String, c) + \"~>\"\n    );\n  };\n\n  var ASCII85Decode = function(a) {\n    var c,\n      d,\n      e,\n      f,\n      g,\n      h = String,\n      l = \"length\",\n      w = 255,\n      x = \"charCodeAt\",\n      y = \"slice\",\n      z = \"replace\";\n    for (\n      \"~>\" === a[y](-2),\n        a = a[y](0, -2)\n          [z](/\\s/g, \"\")\n          [z](\"z\", \"!!!!!\"),\n        c = \"uuuuu\"[y](a[l] % 5 || 5),\n        a += c,\n        e = [],\n        f = 0,\n        g = a[l];\n      g > f;\n      f += 5\n    )\n      (d =\n        52200625 * (a[x](f) - 33) +\n        614125 * (a[x](f + 1) - 33) +\n        7225 * (a[x](f + 2) - 33) +\n        85 * (a[x](f + 3) - 33) +\n        (a[x](f + 4) - 33)),\n        e.push(w & (d >> 24), w & (d >> 16), w & (d >> 8), w & d);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(e, c[l]),\n      h.fromCharCode.apply(h, e)\n    );\n  };\n\n  var ASCIIHexEncode = function(value) {\n    return (\n      value\n        .split(\"\")\n        .map(function(value) {\n          return (\"0\" + value.charCodeAt().toString(16)).slice(-2);\n        })\n        .join(\"\") + \">\"\n    );\n  };\n\n  var ASCIIHexDecode = function(value) {\n    var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);\n    value = value.replace(/\\s/g, \"\");\n    if (value.indexOf(\">\") !== -1) {\n      value = value.substr(0, value.indexOf(\">\"));\n    }\n    if (value.length % 2) {\n      value += \"0\";\n    }\n    if (regexCheckIfHex.test(value) === false) {\n      return \"\";\n    }\n    var result = \"\";\n    for (var i = 0; i < value.length; i += 2) {\n      result += String.fromCharCode(\"0x\" + (value[i] + value[i + 1]));\n    }\n    return result;\n  };\n  /*\n  var FlatePredictors = {\n      None: 1,\n      TIFF: 2,\n      PNG_None: 10,\n      PNG_Sub: 11,\n      PNG_Up: 12,\n      PNG_Average: 13,\n      PNG_Paeth: 14,\n      PNG_Optimum: 15\n  };\n  */\n\n  var FlateEncode = function(data) {\n    var arr = new Uint8Array(data.length);\n    var i = data.length;\n    while (i--) {\n      arr[i] = data.charCodeAt(i);\n    }\n    arr = zlibSync(arr);\n    data = arr.reduce(function(data, byte) {\n      return data + String.fromCharCode(byte);\n    }, \"\");\n    return data;\n  };\n\n  jsPDFAPI.processDataByFilters = function(origData, filterChain) {\n    \"use strict\";\n    var i = 0;\n    var data = origData || \"\";\n    var reverseChain = [];\n    filterChain = filterChain || [];\n\n    if (typeof filterChain === \"string\") {\n      filterChain = [filterChain];\n    }\n\n    for (i = 0; i < filterChain.length; i += 1) {\n      switch (filterChain[i]) {\n        case \"ASCII85Decode\":\n        case \"/ASCII85Decode\":\n          data = ASCII85Decode(data);\n          reverseChain.push(\"/ASCII85Encode\");\n          break;\n        case \"ASCII85Encode\":\n        case \"/ASCII85Encode\":\n          data = ASCII85Encode(data);\n          reverseChain.push(\"/ASCII85Decode\");\n          break;\n        case \"ASCIIHexDecode\":\n        case \"/ASCIIHexDecode\":\n          data = ASCIIHexDecode(data);\n          reverseChain.push(\"/ASCIIHexEncode\");\n          break;\n        case \"ASCIIHexEncode\":\n        case \"/ASCIIHexEncode\":\n          data = ASCIIHexEncode(data);\n          reverseChain.push(\"/ASCIIHexDecode\");\n          break;\n        case \"FlateEncode\":\n        case \"/FlateEncode\":\n          data = FlateEncode(data);\n          reverseChain.push(\"/FlateDecode\");\n          break;\n        default:\n          throw new Error(\n            'The filter: \"' + filterChain[i] + '\" is not implemented'\n          );\n      }\n    }\n\n    return { data: data, reverseChain: reverseChain.reverse().join(\" \") };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF fileloading PlugIn\n * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name fileloading\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name loadFile\n   * @function\n   * @param {string} url\n   * @param {boolean} sync\n   * @param {function} callback\n   * @returns {string|undefined} result\n   */\n  jsPDFAPI.loadFile = function(url, sync, callback) {\n    return browserRequest(url, sync, callback);\n\n  };\n\n  /**\n   * @name loadImageFile\n   * @function\n   * @param {string} path\n   * @param {boolean} sync\n   * @param {function} callback\n   */\n  jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;\n\n  function browserRequest(url, sync, callback) {\n    sync = sync === false ? false : true;\n    callback = typeof callback === \"function\" ? callback : function() {};\n    var result = undefined;\n\n    var xhr = function(url, sync, callback) {\n      var request = new XMLHttpRequest();\n      var i = 0;\n\n      var sanitizeUnicode = function(data) {\n        var dataLength = data.length;\n        var charArray = [];\n        var StringFromCharCode = String.fromCharCode;\n\n        //Transform Unicode to ASCII\n        for (i = 0; i < dataLength; i += 1) {\n          charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff));\n        }\n        return charArray.join(\"\");\n      };\n\n      request.open(\"GET\", url, !sync);\n      // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]\n      request.overrideMimeType(\"text/plain; charset=x-user-defined\");\n\n      if (sync === false) {\n        request.onload = function() {\n          if (request.status === 200) {\n            callback(sanitizeUnicode(this.responseText));\n          } else {\n            callback(undefined);\n          }\n        };\n      }\n      request.send(null);\n\n      if (sync && request.status === 200) {\n        return sanitizeUnicode(request.responseText);\n      }\n    };\n    try {\n      result = xhr(url, sync, callback);\n      // eslint-disable-next-line no-empty\n    } catch (e) {}\n    return result;\n  }\n\n  function nodeReadFile(url, sync, callback) {\n    sync = sync === false ? false : true;\n    var result = undefined;\n\n    var fs = require(\"fs\");\n    var path = require(\"path\");\n\n    url = path.resolve(url);\n    if (sync) {\n      try {\n        result = fs.readFileSync(url, { encoding: \"latin1\" });\n      } catch (e) {\n        return undefined;\n      }\n    } else {\n      fs.readFile(url, { encoding: \"latin1\" }, function(err, data) {\n        if (!callback) {\n          return;\n        }\n        if (err) {\n          callback(undefined);\n        }\n        callback(data);\n      });\n    }\n\n    return result;\n  }\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2018 Erik Koopmans\n * Released under the MIT License.\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { normalizeFontFace } from \"../libs/fontFace.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF html PlugIn\n *\n * @name html\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadHtml2Canvas() {\n    return (function() {\n      if (globalObject[\"html2canvas\"]) {\n        return Promise.resolve(globalObject[\"html2canvas\"]);\n      }\n\n      return import(\"html2canvas\");\n\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load html2canvas: \" + e));\n      })\n      .then(function(html2canvas) {\n        return html2canvas.default ? html2canvas.default : html2canvas;\n      });\n  }\n\n  function loadDomPurify() {\n    return (function() {\n      if (globalObject[\"DOMPurify\"]) {\n        return Promise.resolve(globalObject[\"DOMPurify\"]);\n      }\n\n      return import(\"dompurify\");\n\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load dompurify: \" + e));\n      })\n      .then(function(dompurify) {\n        return dompurify.default ? dompurify.default : dompurify;\n      });\n  }\n\n  /**\n   * Determine the type of a variable/object.\n   *\n   * @private\n   * @ignore\n   */\n  var objType = function(obj) {\n    var type = typeof obj;\n    if (type === \"undefined\") return \"undefined\";\n    else if (type === \"string\" || obj instanceof String) return \"string\";\n    else if (type === \"number\" || obj instanceof Number) return \"number\";\n    else if (type === \"function\" || obj instanceof Function) return \"function\";\n    else if (!!obj && obj.constructor === Array) return \"array\";\n    else if (obj && obj.nodeType === 1) return \"element\";\n    else if (type === \"object\") return \"object\";\n    else return \"unknown\";\n  };\n\n  /**\n   * Create an HTML element with optional className, innerHTML, and style.\n   *\n   * @private\n   * @ignore\n   */\n  var createElement = function(tagName, opt) {\n    var el = document.createElement(tagName);\n    if (opt.className) el.className = opt.className;\n    if (opt.innerHTML && opt.dompurify) {\n      el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);\n    }\n    for (var key in opt.style) {\n      el.style[key] = opt.style[key];\n    }\n    return el;\n  };\n\n  /**\n   * Deep-clone a node and preserve contents/properties.\n   *\n   * @private\n   * @ignore\n   */\n  var cloneNode = function(node, javascriptEnabled) {\n    // Recursively clone the node.\n    var clone =\n      node.nodeType === 3\n        ? document.createTextNode(node.nodeValue)\n        : node.cloneNode(false);\n    for (var child = node.firstChild; child; child = child.nextSibling) {\n      if (\n        javascriptEnabled === true ||\n        child.nodeType !== 1 ||\n        child.nodeName !== \"SCRIPT\"\n      ) {\n        clone.appendChild(cloneNode(child, javascriptEnabled));\n      }\n    }\n\n    if (node.nodeType === 1) {\n      // Preserve contents/properties of special nodes.\n      if (node.nodeName === \"CANVAS\") {\n        clone.width = node.width;\n        clone.height = node.height;\n        clone.getContext(\"2d\").drawImage(node, 0, 0);\n      } else if (node.nodeName === \"TEXTAREA\" || node.nodeName === \"SELECT\") {\n        clone.value = node.value;\n      }\n\n      // Preserve the node's scroll position when it loads.\n      clone.addEventListener(\n        \"load\",\n        function() {\n          clone.scrollTop = node.scrollTop;\n          clone.scrollLeft = node.scrollLeft;\n        },\n        true\n      );\n    }\n\n    // Return the cloned node.\n    return clone;\n  };\n\n  /* ----- CONSTRUCTOR ----- */\n\n  var Worker = function Worker(opt) {\n    // Create the root parent for the proto chain, and the starting Worker.\n    var root = Object.assign(\n      Worker.convert(Promise.resolve()),\n      JSON.parse(JSON.stringify(Worker.template))\n    );\n    var self = Worker.convert(Promise.resolve(), root);\n\n    // Set progress, optional settings, and return.\n    self = self.setProgress(1, Worker, 1, [Worker]);\n    self = self.set(opt);\n    return self;\n  };\n\n  // Boilerplate for subclassing Promise.\n  Worker.prototype = Object.create(Promise.prototype);\n  Worker.prototype.constructor = Worker;\n\n  // Converts/casts promises into Workers.\n  Worker.convert = function convert(promise, inherit) {\n    // Uses prototypal inheritance to receive changes made to ancestors' properties.\n    promise.__proto__ = inherit || Worker.prototype;\n    return promise;\n  };\n\n  Worker.template = {\n    prop: {\n      src: null,\n      container: null,\n      overlay: null,\n      canvas: null,\n      img: null,\n      pdf: null,\n      pageSize: null,\n      callback: function() {}\n    },\n    progress: {\n      val: 0,\n      state: null,\n      n: 0,\n      stack: []\n    },\n    opt: {\n      filename: \"file.pdf\",\n      margin: [0, 0, 0, 0],\n      enableLinks: true,\n      x: 0,\n      y: 0,\n      html2canvas: {},\n      jsPDF: {},\n      backgroundColor: \"transparent\"\n    }\n  };\n\n  /* ----- FROM / TO ----- */\n\n  Worker.prototype.from = function from(src, type) {\n    function getType(src) {\n      switch (objType(src)) {\n        case \"string\":\n          return \"string\";\n        case \"element\":\n          return src.nodeName.toLowerCase() === \"canvas\" ? \"canvas\" : \"element\";\n        default:\n          return \"unknown\";\n      }\n    }\n\n    return this.then(function from_main() {\n      type = type || getType(src);\n      switch (type) {\n        case \"string\":\n          return this.then(loadDomPurify).then(function(dompurify) {\n            return this.set({\n              src: createElement(\"div\", {\n                innerHTML: src,\n                dompurify: dompurify\n              })\n            });\n          });\n        case \"element\":\n          return this.set({ src: src });\n        case \"canvas\":\n          return this.set({ canvas: src });\n        case \"img\":\n          return this.set({ img: src });\n        default:\n          return this.error(\"Unknown source type.\");\n      }\n    });\n  };\n\n  Worker.prototype.to = function to(target) {\n    // Route the 'to' request to the appropriate method.\n    switch (target) {\n      case \"container\":\n        return this.toContainer();\n      case \"canvas\":\n        return this.toCanvas();\n      case \"img\":\n        return this.toImg();\n      case \"pdf\":\n        return this.toPdf();\n      default:\n        return this.error(\"Invalid target.\");\n    }\n  };\n\n  Worker.prototype.toContainer = function toContainer() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkSrc() {\n        return (\n          this.prop.src || this.error(\"Cannot duplicate - no source HTML.\")\n        );\n      },\n      function checkPageSize() {\n        return this.prop.pageSize || this.setPageSize();\n      }\n    ];\n    return this.thenList(prereqs).then(function toContainer_main() {\n      // Define the CSS styles for the container and its overlay parent.\n      var overlayCSS = {\n        position: \"fixed\",\n        overflow: \"hidden\",\n        zIndex: 1000,\n        left: \"-100000px\",\n        right: 0,\n        bottom: 0,\n        top: 0\n      };\n      var containerCSS = {\n        position: \"relative\",\n        display: \"inline-block\",\n        width:\n          (typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.windowWidth\n            : Math.max(\n                this.prop.src.clientWidth,\n                this.prop.src.scrollWidth,\n                this.prop.src.offsetWidth\n              )) + \"px\",\n        left: 0,\n        right: 0,\n        top: 0,\n        margin: \"auto\",\n        backgroundColor: this.opt.backgroundColor\n      }; // Set the overlay to hidden (could be changed in the future to provide a print preview).\n\n      var source = cloneNode(\n        this.prop.src,\n        this.opt.html2canvas.javascriptEnabled\n      );\n\n      if (source.tagName === \"BODY\") {\n        containerCSS.height =\n          Math.max(\n            document.body.scrollHeight,\n            document.body.offsetHeight,\n            document.documentElement.clientHeight,\n            document.documentElement.scrollHeight,\n            document.documentElement.offsetHeight\n          ) + \"px\";\n      }\n\n      this.prop.overlay = createElement(\"div\", {\n        className: \"html2pdf__overlay\",\n        style: overlayCSS\n      });\n      this.prop.container = createElement(\"div\", {\n        className: \"html2pdf__container\",\n        style: containerCSS\n      });\n      this.prop.container.appendChild(source);\n      this.prop.container.firstChild.appendChild(\n        createElement(\"div\", {\n          style: {\n            clear: \"both\",\n            border: \"0 none transparent\",\n            margin: 0,\n            padding: 0,\n            height: 0\n          }\n        })\n      );\n      this.prop.container.style.float = \"none\";\n      this.prop.overlay.appendChild(this.prop.container);\n      document.body.appendChild(this.prop.overlay);\n      this.prop.container.firstChild.style.position = \"relative\";\n      this.prop.container.height =\n        Math.max(\n          this.prop.container.firstChild.clientHeight,\n          this.prop.container.firstChild.scrollHeight,\n          this.prop.container.firstChild.offsetHeight\n        ) + \"px\";\n    });\n  };\n\n  Worker.prototype.toCanvas = function toCanvas() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toCanvas_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var options = Object.assign({}, this.opt.html2canvas);\n        delete options.onrendered;\n\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toCanvas_post(canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toContext2d = function toContext2d() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toContext2d_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n\n        var pdf = this.opt.jsPDF;\n        var fontFaces = this.opt.fontFaces;\n\n        var scale =\n          typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.width / this.opt.windowWidth\n            : 1;\n\n        var options = Object.assign(\n          {\n            async: true,\n            allowTaint: true,\n            scale: scale,\n            scrollX: this.opt.scrollX || 0,\n            scrollY: this.opt.scrollY || 0,\n            backgroundColor: \"#ffffff\",\n            imageTimeout: 15000,\n            logging: true,\n            proxy: null,\n            removeContainer: true,\n            foreignObjectRendering: false,\n            useCORS: false\n          },\n          this.opt.html2canvas\n        );\n        delete options.onrendered;\n\n        pdf.context2d.autoPaging =\n          typeof this.opt.autoPaging === \"undefined\"\n            ? true\n            : this.opt.autoPaging;\n        pdf.context2d.posX = this.opt.x;\n        pdf.context2d.posY = this.opt.y;\n        pdf.context2d.margin = this.opt.margin;\n        pdf.context2d.fontFaces = fontFaces;\n\n        if (fontFaces) {\n          for (var i = 0; i < fontFaces.length; ++i) {\n            var font = fontFaces[i];\n            var src = font.src.find(function(src) {\n              return src.format === \"truetype\";\n            });\n\n            if (src) {\n              pdf.addFont(src.url, font.ref.name, font.ref.style);\n            }\n          }\n        }\n\n        options.windowHeight = options.windowHeight || 0;\n        options.windowHeight =\n          options.windowHeight == 0\n            ? Math.max(\n                this.prop.container.clientHeight,\n                this.prop.container.scrollHeight,\n                this.prop.container.offsetHeight\n              )\n            : options.windowHeight;\n\n        pdf.context2d.save(true);\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toContext2d_post(canvas) {\n        this.opt.jsPDF.context2d.restore(true);\n\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toImg = function toImg() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkCanvas() {\n        return this.prop.canvas || this.toCanvas();\n      }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toImg_main() {\n      var imgData = this.prop.canvas.toDataURL(\n        \"image/\" + this.opt.image.type,\n        this.opt.image.quality\n      );\n      this.prop.img = document.createElement(\"img\");\n      this.prop.img.src = imgData;\n    });\n  };\n\n  Worker.prototype.toPdf = function toPdf() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContext2d() {\n        return this.toContext2d();\n      }\n      //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toPdf_main() {\n      // Create local copies of frequently used properties.\n      this.prop.pdf = this.prop.pdf || this.opt.jsPDF;\n    });\n  };\n\n  /* ----- OUTPUT / SAVE ----- */\n\n  Worker.prototype.output = function output(type, options, src) {\n    // Redirect requests to the correct function (outputPdf / outputImg).\n    src = src || \"pdf\";\n    if (src.toLowerCase() === \"img\" || src.toLowerCase() === \"image\") {\n      return this.outputImg(type, options);\n    } else {\n      return this.outputPdf(type, options);\n    }\n  };\n\n  Worker.prototype.outputPdf = function outputPdf(type, options) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputPdf_main() {\n      /* Currently implemented output types:\n       *    https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992\n       *  save(options), arraybuffer, blob, bloburi/bloburl,\n       *  datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl\n       */\n      return this.prop.pdf.output(type, options);\n    });\n  };\n\n  Worker.prototype.outputImg = function outputImg(type) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkImg() {\n        return this.prop.img || this.toImg();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputImg_main() {\n      switch (type) {\n        case undefined:\n        case \"img\":\n          return this.prop.img;\n        case \"datauristring\":\n        case \"dataurlstring\":\n          return this.prop.img.src;\n        case \"datauri\":\n        case \"dataurl\":\n          return (document.location.href = this.prop.img.src);\n        default:\n          throw 'Image output type \"' + type + '\" is not supported.';\n      }\n    });\n  };\n\n  Worker.prototype.save = function save(filename) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs)\n      .set(filename ? { filename: filename } : null)\n      .then(function save_main() {\n        this.prop.pdf.save(this.opt.filename);\n      });\n  };\n\n  Worker.prototype.doCallback = function doCallback() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs).then(function doCallback_main() {\n      this.prop.callback(this.prop.pdf);\n    });\n  };\n\n  /* ----- SET / GET ----- */\n\n  Worker.prototype.set = function set(opt) {\n    // TODO: Implement ordered pairs?\n\n    // Silently ignore invalid or empty input.\n    if (objType(opt) !== \"object\") {\n      return this;\n    }\n\n    // Build an array of setter functions to queue.\n    var fns = Object.keys(opt || {}).map(function(key) {\n      if (key in Worker.template.prop) {\n        // Set pre-defined properties.\n        return function set_prop() {\n          this.prop[key] = opt[key];\n        };\n      } else {\n        switch (key) {\n          case \"margin\":\n            return this.setMargin.bind(this, opt.margin);\n          case \"jsPDF\":\n            return function set_jsPDF() {\n              this.opt.jsPDF = opt.jsPDF;\n              return this.setPageSize();\n            };\n          case \"pageSize\":\n            return this.setPageSize.bind(this, opt.pageSize);\n          default:\n            // Set any other properties in opt.\n            return function set_opt() {\n              this.opt[key] = opt[key];\n            };\n        }\n      }\n    }, this);\n\n    // Set properties within the promise chain.\n    return this.then(function set_main() {\n      return this.thenList(fns);\n    });\n  };\n\n  Worker.prototype.get = function get(key, cbk) {\n    return this.then(function get_main() {\n      // Fetch the requested property, either as a predefined prop or in opt.\n      var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];\n      return cbk ? cbk(val) : val;\n    });\n  };\n\n  Worker.prototype.setMargin = function setMargin(margin) {\n    return this.then(function setMargin_main() {\n      // Parse the margin property.\n      switch (objType(margin)) {\n        case \"number\":\n          margin = [margin, margin, margin, margin];\n        // eslint-disable-next-line no-fallthrough\n        case \"array\":\n          if (margin.length === 2) {\n            margin = [margin[0], margin[1], margin[0], margin[1]];\n          }\n          if (margin.length === 4) {\n            break;\n          }\n        // eslint-disable-next-line no-fallthrough\n        default:\n          return this.error(\"Invalid margin array.\");\n      }\n\n      // Set the margin property, then update pageSize.\n      this.opt.margin = margin;\n    }).then(this.setPageSize);\n  };\n\n  Worker.prototype.setPageSize = function setPageSize(pageSize) {\n    function toPx(val, k) {\n      return Math.floor(((val * k) / 72) * 96);\n    }\n\n    return this.then(function setPageSize_main() {\n      // Retrieve page-size based on jsPDF settings, if not explicitly provided.\n      pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF);\n\n      // Add 'inner' field if not present.\n      if (!pageSize.hasOwnProperty(\"inner\")) {\n        pageSize.inner = {\n          width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],\n          height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]\n        };\n        pageSize.inner.px = {\n          width: toPx(pageSize.inner.width, pageSize.k),\n          height: toPx(pageSize.inner.height, pageSize.k)\n        };\n        pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;\n      }\n\n      // Attach pageSize to this.\n      this.prop.pageSize = pageSize;\n    });\n  };\n\n  Worker.prototype.setProgress = function setProgress(val, state, n, stack) {\n    // Immediately update all progress values.\n    if (val != null) this.progress.val = val;\n    if (state != null) this.progress.state = state;\n    if (n != null) this.progress.n = n;\n    if (stack != null) this.progress.stack = stack;\n    this.progress.ratio = this.progress.val / this.progress.state;\n\n    // Return this for command chaining.\n    return this;\n  };\n\n  Worker.prototype.updateProgress = function updateProgress(\n    val,\n    state,\n    n,\n    stack\n  ) {\n    // Immediately update all progress values, using setProgress.\n    return this.setProgress(\n      val ? this.progress.val + val : null,\n      state ? state : null,\n      n ? this.progress.n + n : null,\n      stack ? this.progress.stack.concat(stack) : null\n    );\n  };\n\n  /* ----- PROMISE MAPPING ----- */\n\n  Worker.prototype.then = function then(onFulfilled, onRejected) {\n    // Wrap `this` for encapsulation.\n    var self = this;\n\n    return this.thenCore(onFulfilled, onRejected, function then_main(\n      onFulfilled,\n      onRejected\n    ) {\n      // Update progress while queuing, calling, and resolving `then`.\n      self.updateProgress(null, null, 1, [onFulfilled]);\n      return Promise.prototype.then\n        .call(this, function then_pre(val) {\n          self.updateProgress(null, onFulfilled);\n          return val;\n        })\n        .then(onFulfilled, onRejected)\n        .then(function then_post(val) {\n          self.updateProgress(1);\n          return val;\n        });\n    });\n  };\n\n  Worker.prototype.thenCore = function thenCore(\n    onFulfilled,\n    onRejected,\n    thenBase\n  ) {\n    // Handle optional thenBase parameter.\n    thenBase = thenBase || Promise.prototype.then;\n\n    // Wrap `this` for encapsulation and bind it to the promise handlers.\n    var self = this;\n    if (onFulfilled) {\n      onFulfilled = onFulfilled.bind(self);\n    }\n    if (onRejected) {\n      onRejected = onRejected.bind(self);\n    }\n\n    // Cast self into a Promise to avoid polyfills recursively defining `then`.\n    var isNative =\n      Promise.toString().indexOf(\"[native code]\") !== -1 &&\n      Promise.name === \"Promise\";\n    var selfPromise = isNative\n      ? self\n      : Worker.convert(Object.assign({}, self), Promise.prototype);\n\n    // Return the promise, after casting it into a Worker and preserving props.\n    var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);\n    return Worker.convert(returnVal, self.__proto__);\n  };\n\n  Worker.prototype.thenExternal = function thenExternal(\n    onFulfilled,\n    onRejected\n  ) {\n    // Call `then` and return a standard promise (exits the Worker chain).\n    return Promise.prototype.then.call(this, onFulfilled, onRejected);\n  };\n\n  Worker.prototype.thenList = function thenList(fns) {\n    // Queue a series of promise 'factories' into the promise chain.\n    var self = this;\n    fns.forEach(function thenList_forEach(fn) {\n      self = self.thenCore(fn);\n    });\n    return self;\n  };\n\n  Worker.prototype[\"catch\"] = function(onRejected) {\n    // Bind `this` to the promise handler, call `catch`, and return a Worker.\n    if (onRejected) {\n      onRejected = onRejected.bind(this);\n    }\n    var returnVal = Promise.prototype[\"catch\"].call(this, onRejected);\n    return Worker.convert(returnVal, this);\n  };\n\n  Worker.prototype.catchExternal = function catchExternal(onRejected) {\n    // Call `catch` and return a standard promise (exits the Worker chain).\n    return Promise.prototype[\"catch\"].call(this, onRejected);\n  };\n\n  Worker.prototype.error = function error(msg) {\n    // Throw the error in the Promise chain.\n    return this.then(function error_main() {\n      throw new Error(msg);\n    });\n  };\n\n  /* ----- ALIASES ----- */\n\n  Worker.prototype.using = Worker.prototype.set;\n  Worker.prototype.saveAs = Worker.prototype.save;\n  Worker.prototype.export = Worker.prototype.output;\n  Worker.prototype.run = Worker.prototype.then;\n\n  // Get dimensions of a PDF page, as determined by jsPDF.\n  jsPDF.getPageSize = function(orientation, unit, format) {\n    // Decode options object\n    if (typeof orientation === \"object\") {\n      var options = orientation;\n      orientation = options.orientation;\n      unit = options.unit || unit;\n      format = options.format || format;\n    }\n\n    // Default options\n    unit = unit || \"mm\";\n    format = format || \"a4\";\n    orientation = (\"\" + (orientation || \"P\")).toLowerCase();\n    var format_as_string = (\"\" + format).toLowerCase();\n\n    // Size in pt of various paper formats\n    var pageFormats = {\n      a0: [2383.94, 3370.39],\n      a1: [1683.78, 2383.94],\n      a2: [1190.55, 1683.78],\n      a3: [841.89, 1190.55],\n      a4: [595.28, 841.89],\n      a5: [419.53, 595.28],\n      a6: [297.64, 419.53],\n      a7: [209.76, 297.64],\n      a8: [147.4, 209.76],\n      a9: [104.88, 147.4],\n      a10: [73.7, 104.88],\n      b0: [2834.65, 4008.19],\n      b1: [2004.09, 2834.65],\n      b2: [1417.32, 2004.09],\n      b3: [1000.63, 1417.32],\n      b4: [708.66, 1000.63],\n      b5: [498.9, 708.66],\n      b6: [354.33, 498.9],\n      b7: [249.45, 354.33],\n      b8: [175.75, 249.45],\n      b9: [124.72, 175.75],\n      b10: [87.87, 124.72],\n      c0: [2599.37, 3676.54],\n      c1: [1836.85, 2599.37],\n      c2: [1298.27, 1836.85],\n      c3: [918.43, 1298.27],\n      c4: [649.13, 918.43],\n      c5: [459.21, 649.13],\n      c6: [323.15, 459.21],\n      c7: [229.61, 323.15],\n      c8: [161.57, 229.61],\n      c9: [113.39, 161.57],\n      c10: [79.37, 113.39],\n      dl: [311.81, 623.62],\n      letter: [612, 792],\n      \"government-letter\": [576, 756],\n      legal: [612, 1008],\n      \"junior-legal\": [576, 360],\n      ledger: [1224, 792],\n      tabloid: [792, 1224],\n      \"credit-card\": [153, 243]\n    };\n\n    var k;\n    // Unit conversion\n    switch (unit) {\n      case \"pt\":\n        k = 1;\n        break;\n      case \"mm\":\n        k = 72 / 25.4;\n        break;\n      case \"cm\":\n        k = 72 / 2.54;\n        break;\n      case \"in\":\n        k = 72;\n        break;\n      case \"px\":\n        k = 72 / 96;\n        break;\n      case \"pc\":\n        k = 12;\n        break;\n      case \"em\":\n        k = 12;\n        break;\n      case \"ex\":\n        k = 6;\n        break;\n      default:\n        throw \"Invalid unit: \" + unit;\n    }\n    var pageHeight = 0;\n    var pageWidth = 0;\n\n    // Dimensions are stored as user units and converted to points on output\n    if (pageFormats.hasOwnProperty(format_as_string)) {\n      pageHeight = pageFormats[format_as_string][1] / k;\n      pageWidth = pageFormats[format_as_string][0] / k;\n    } else {\n      try {\n        pageHeight = format[1];\n        pageWidth = format[0];\n      } catch (err) {\n        throw new Error(\"Invalid format: \" + format);\n      }\n    }\n\n    var tmp;\n    // Handle page orientation\n    if (orientation === \"p\" || orientation === \"portrait\") {\n      orientation = \"p\";\n      if (pageWidth > pageHeight) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else if (orientation === \"l\" || orientation === \"landscape\") {\n      orientation = \"l\";\n      if (pageHeight > pageWidth) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else {\n      throw \"Invalid orientation: \" + orientation;\n    }\n\n    // Return information (k is the unit conversion ratio from pts)\n    var info = {\n      width: pageWidth,\n      height: pageHeight,\n      unit: unit,\n      k: k,\n      orientation: orientation\n    };\n    return info;\n  };\n\n  /**\n   * @typedef FontFace\n   *\n   * The font-face type implements an interface similar to that of the font-face CSS rule,\n   * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D\n   * is updated.\n   *\n   * All properties expect values similar to those in the font-face CSS rule. A difference\n   * is the font-family, which do not need to be enclosed in double-quotes when containing\n   * spaces like in CSS.\n   *\n   * @property {string} family The name of the font-family.\n   * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.\n   * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)\n   * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.\n   * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.\n   * @property {string} [src] url A URL to a font of a specific format.\n   * @property {string} [src] format Format of the font referenced by the URL.\n   */\n\n  /**\n   * Generate a PDF from an HTML element or string using.\n   *\n   * @name html\n   * @function\n   * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.\n   * @param {Object} [options] Collection of settings\n   * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance\n   * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.\n   * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.\n   * <ul>\n   * <li>\n   *   <code>false</code>: Auto paging is disabled.\n   * </li>\n   * <li>\n   *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\n   *   slice text in half, making it difficult to read.\n   * </li>\n   * <li>\n   *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\n   *   mostly of a single column of text.\n   * </li>\n   * </ul>\n   * Default is <code>true</code>.\n   * @param {string} [options.filename] name of the file\n   * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image\n   * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options\n   * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.\n   * @param {jsPDF} [options.jsPDF] jsPDF instance\n   * @param {number=} [options.x] x position on the PDF document in jsPDF units.\n   * @param {number=} [options.y] y position on the PDF document in jsPDF units.\n   * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be\n   * scaled such that it fits into the specified width. Has no effect if either the <code>html2canvas.scale<code> is\n   * specified or the <code>windowWidth</code> option is NOT specified.\n   * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the\n   * <code>html2canvas.windowWidth</code> option, this option affects the actual container size while rendering and\n   * does NOT affect CSS media queries. This option only has an effect, if the <code>width<code> option is also specified.\n   *\n   * @example\n   * var doc = new jsPDF();\n   *\n   * doc.html(document.body, {\n   *    callback: function (doc) {\n   *      doc.save();\n   *    },\n   *    x: 10,\n   *    y: 10\n   * });\n   */\n  jsPDFAPI.html = function(src, options) {\n    \"use strict\";\n\n    options = options || {};\n    options.callback = options.callback || function() {};\n    options.html2canvas = options.html2canvas || {};\n    options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;\n    options.jsPDF = options.jsPDF || this;\n    options.fontFaces = options.fontFaces\n      ? options.fontFaces.map(normalizeFontFace)\n      : null;\n\n    // Create a new worker with the given options.\n    var worker = new Worker(options);\n\n    if (!options.worker) {\n      // If worker is not set to true, perform the traditional 'simple' operation.\n      return worker.from(src).doCallback();\n    } else {\n      // Otherwise, return the worker for new Promise-based operation.\n      return worker;\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Outline PlugIn\n *\n * Generates a PDF Outline\n * @name outline\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namesOid;\n  //var destsGoto = [];\n\n  jsPDFAPI.events.push([\n    \"postPutResources\",\n    function() {\n      var pdf = this;\n      var rx = /^(\\d+) 0 obj$/;\n\n      // Write action goto objects for each page\n      // this.outline.destsGoto = [];\n      // for (var i = 0; i < totalPages; i++) {\n      // var id = pdf.internal.newObject();\n      // this.outline.destsGoto.push(id);\n      // pdf.internal.write(\"<</D[\" + (i * 2 + 3) + \" 0 R /XYZ null\n      // null null]/S/GoTo>> endobj\");\n      // }\n      //\n      // for (var i = 0; i < dests.length; i++) {\n      // pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0\n      // R\");\n      // }\n      //\n      if (this.outline.root.children.length > 0) {\n        var lines = pdf.outline.render().split(/\\r\\n/);\n        for (var i = 0; i < lines.length; i++) {\n          var line = lines[i];\n          var m = rx.exec(line);\n          if (m != null) {\n            var oid = m[1];\n            pdf.internal.newObjectDeferredBegin(oid, false);\n          }\n          pdf.internal.write(line);\n        }\n      }\n\n      // This code will write named destination for each page reference\n      // (page_1, etc)\n      if (this.outline.createNamedDestinations) {\n        var totalPages = this.internal.pages.length;\n        // WARNING: this assumes jsPDF starts on page 3 and pageIDs\n        // follow 5, 7, 9, etc\n        // Write destination objects for each page\n        var dests = [];\n        for (var i = 0; i < totalPages; i++) {\n          var id = pdf.internal.newObject();\n          dests.push(id);\n          var info = pdf.internal.getPageInfo(i + 1);\n          pdf.internal.write(\n            \"<< /D[\" + info.objId + \" 0 R /XYZ null null null]>> endobj\"\n          );\n        }\n\n        // assign a name for each destination\n        var names2Oid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Names [ \");\n        for (var i = 0; i < dests.length; i++) {\n          pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0 R\");\n        }\n        pdf.internal.write(\" ] >>\", \"endobj\");\n\n        // var kids = pdf.internal.newObject();\n        // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');\n        // pdf.internal.write(' ] >>', 'endobj');\n\n        namesOid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Dests \" + names2Oid + \" 0 R\");\n        pdf.internal.write(\">>\", \"endobj\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putCatalog\",\n    function() {\n      var pdf = this;\n      if (pdf.outline.root.children.length > 0) {\n        pdf.internal.write(\n          \"/Outlines\",\n          this.outline.makeRef(this.outline.root)\n        );\n        if (this.outline.createNamedDestinations) {\n          pdf.internal.write(\"/Names \" + namesOid + \" 0 R\");\n        }\n        // Open with Bookmarks showing\n        // pdf.internal.write(\"/PageMode /UseOutlines\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      var pdf = this;\n\n      pdf.outline = {\n        createNamedDestinations: false,\n        root: {\n          children: []\n        }\n      };\n\n      /**\n       * Options: pageNumber\n       */\n      pdf.outline.add = function(parent, title, options) {\n        var item = {\n          title: title,\n          options: options,\n          children: []\n        };\n        if (parent == null) {\n          parent = this.root;\n        }\n        parent.children.push(item);\n        return item;\n      };\n\n      pdf.outline.render = function() {\n        this.ctx = {};\n        this.ctx.val = \"\";\n        this.ctx.pdf = pdf;\n\n        this.genIds_r(this.root);\n        this.renderRoot(this.root);\n        this.renderItems(this.root);\n\n        return this.ctx.val;\n      };\n\n      pdf.outline.genIds_r = function(node) {\n        node.id = pdf.internal.newObjectDeferred();\n        for (var i = 0; i < node.children.length; i++) {\n          this.genIds_r(node.children[i]);\n        }\n      };\n\n      pdf.outline.renderRoot = function(node) {\n        this.objStart(node);\n        this.line(\"/Type /Outlines\");\n        if (node.children.length > 0) {\n          this.line(\"/First \" + this.makeRef(node.children[0]));\n          this.line(\n            \"/Last \" + this.makeRef(node.children[node.children.length - 1])\n          );\n        }\n        this.line(\n          \"/Count \" +\n            this.count_r(\n              {\n                count: 0\n              },\n              node\n            )\n        );\n        this.objEnd();\n      };\n\n      pdf.outline.renderItems = function(node) {\n        var getVerticalCoordinateString = this.ctx.pdf.internal\n          .getVerticalCoordinateString;\n        for (var i = 0; i < node.children.length; i++) {\n          var item = node.children[i];\n          this.objStart(item);\n\n          this.line(\"/Title \" + this.makeString(item.title));\n\n          this.line(\"/Parent \" + this.makeRef(node));\n          if (i > 0) {\n            this.line(\"/Prev \" + this.makeRef(node.children[i - 1]));\n          }\n          if (i < node.children.length - 1) {\n            this.line(\"/Next \" + this.makeRef(node.children[i + 1]));\n          }\n          if (item.children.length > 0) {\n            this.line(\"/First \" + this.makeRef(item.children[0]));\n            this.line(\n              \"/Last \" + this.makeRef(item.children[item.children.length - 1])\n            );\n          }\n\n          var count = (this.count = this.count_r(\n            {\n              count: 0\n            },\n            item\n          ));\n          if (count > 0) {\n            this.line(\"/Count \" + count);\n          }\n\n          if (item.options) {\n            if (item.options.pageNumber) {\n              // Explicit Destination\n              //WARNING this assumes page ids are 3,5,7, etc.\n              var info = pdf.internal.getPageInfo(item.options.pageNumber);\n              this.line(\n                \"/Dest \" +\n                  \"[\" +\n                  info.objId +\n                  \" 0 R /XYZ 0 \" +\n                  getVerticalCoordinateString(0) +\n                  \" 0]\"\n              );\n              // this line does not work on all clients (pageNumber instead of page ref)\n              //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');\n\n              // Named Destination\n              // this.line('/Dest (page_' + (item.options.pageNumber) + ')');\n\n              // Action Destination\n              // var id = pdf.internal.newObject();\n              // pdf.internal.write('<</D[' + (item.options.pageNumber - 1) + ' /XYZ null null null]/S/GoTo>> endobj');\n              // this.line('/A ' + id + ' 0 R' );\n            }\n          }\n          this.objEnd();\n        }\n        for (var z = 0; z < node.children.length; z++) {\n          this.renderItems(node.children[z]);\n        }\n      };\n\n      pdf.outline.line = function(text) {\n        this.ctx.val += text + \"\\r\\n\";\n      };\n\n      pdf.outline.makeRef = function(node) {\n        return node.id + \" 0 R\";\n      };\n\n      pdf.outline.makeString = function(val) {\n        return \"(\" + pdf.internal.pdfEscape(val) + \")\";\n      };\n\n      pdf.outline.objStart = function(node) {\n        this.ctx.val += \"\\r\\n\" + node.id + \" 0 obj\" + \"\\r\\n<<\\r\\n\";\n      };\n\n      pdf.outline.objEnd = function() {\n        this.ctx.val += \">> \\r\\n\" + \"endobj\" + \"\\r\\n\";\n      };\n\n      pdf.outline.count_r = function(ctx, node) {\n        for (var i = 0; i < node.children.length; i++) {\n          ctx.count++;\n          this.count_r(ctx, node.children[i]);\n        }\n        return ctx.count;\n      };\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF jpeg Support PlugIn\n *\n * @name jpeg_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * 0xc0 (SOF) Huffman  - Baseline DCT\n   * 0xc1 (SOF) Huffman  - Extended sequential DCT\n   * 0xc2 Progressive DCT (SOF2)\n   * 0xc3 Spatial (sequential) lossless (SOF3)\n   * 0xc4 Differential sequential DCT (SOF5)\n   * 0xc5 Differential progressive DCT (SOF6)\n   * 0xc6 Differential spatial (SOF7)\n   * 0xc7\n   */\n  var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];\n\n  //takes a string imgData containing the raw bytes of\n  //a jpeg image and returns [width, height]\n  //Algorithm from: http://www.64lines.com/jpeg-width-height\n  var getJpegInfo = function(imgData) {\n    var width, height, numcomponents;\n    var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);\n    var len = imgData.length;\n    var result = { width: 0, height: 0, numcomponents: 1 };\n    for (var i = 4; i < len; i += 2) {\n      i += blockLength;\n      if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {\n        height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);\n        width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);\n        numcomponents = imgData.charCodeAt(i + 9);\n        result = { width: width, height: height, numcomponents: numcomponents };\n        break;\n      } else {\n        blockLength =\n          imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);\n      }\n    }\n    return result;\n  };\n\n  /**\n   * @ignore\n   */\n  jsPDFAPI.processJPEG = function(\n    data,\n    index,\n    alias,\n    compression,\n    dataAsBinaryString,\n    colorSpace\n  ) {\n    var filter = this.decode.DCT_DECODE,\n      bpc = 8,\n      dims,\n      result = null;\n\n    if (\n      typeof data === \"string\" ||\n      this.__addimage__.isArrayBuffer(data) ||\n      this.__addimage__.isArrayBufferView(data)\n    ) {\n      // if we already have a stored binary string rep use that\n      data = dataAsBinaryString || data;\n      data = this.__addimage__.isArrayBuffer(data)\n        ? new Uint8Array(data)\n        : data;\n      data = this.__addimage__.isArrayBufferView(data)\n        ? this.__addimage__.arrayBufferToBinaryString(data)\n        : data;\n\n      dims = getJpegInfo(data);\n      switch (dims.numcomponents) {\n        case 1:\n          colorSpace = this.color_spaces.DEVICE_GRAY;\n          break;\n        case 4:\n          colorSpace = this.color_spaces.DEVICE_CMYK;\n          break;\n        case 3:\n          colorSpace = this.color_spaces.DEVICE_RGB;\n          break;\n      }\n\n      result = {\n        data: data,\n        width: dims.width,\n        height: dims.height,\n        colorSpace: colorSpace,\n        bitsPerComponent: bpc,\n        filter: filter,\n        index: index,\n        alias: alias\n      };\n    }\n    return result;\n  };\n})(jsPDF.API);\n","// Generated by CoffeeScript 1.4.0\n\n/**\n * @license\n * PNG.js\n * Copyright (c) 2011 Devon Govett\n * MIT LICENSE\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this\n * software and associated documentation files (the \"Software\"), to deal in the Software\n * without restriction, including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons\n * to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or\n * substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\n * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport { unzlibSync } from \"./fflate.js\";\nimport { globalObject } from \"./globalObject.js\";\n\nvar PNG = (function() {\n  var APNG_BLEND_OP_OVER,\n    APNG_BLEND_OP_SOURCE,\n    APNG_DISPOSE_OP_BACKGROUND,\n    APNG_DISPOSE_OP_NONE,\n    APNG_DISPOSE_OP_PREVIOUS,\n    makeImage,\n    scratchCanvas,\n    scratchCtx;\n\n  APNG_DISPOSE_OP_NONE = 0;\n\n  APNG_DISPOSE_OP_BACKGROUND = 1;\n\n  APNG_DISPOSE_OP_PREVIOUS = 2;\n\n  APNG_BLEND_OP_SOURCE = 0;\n\n  APNG_BLEND_OP_OVER = 1;\n\n  function PNG(data) {\n    var chunkSize,\n      colors,\n      palLen,\n      delayDen,\n      delayNum,\n      frame,\n      i,\n      index,\n      key,\n      section,\n      palShort,\n      text,\n      _i,\n      _j,\n      _ref;\n    this.data = data;\n    this.pos = 8;\n    this.palette = [];\n    this.imgData = [];\n    this.transparency = {};\n    this.animation = null;\n    this.text = {};\n    frame = null;\n    while (true) {\n      chunkSize = this.readUInt32();\n      section = function() {\n        var _i, _results;\n        _results = [];\n        for (i = _i = 0; _i < 4; i = ++_i) {\n          _results.push(String.fromCharCode(this.data[this.pos++]));\n        }\n        return _results;\n      }\n        .call(this)\n        .join(\"\");\n      switch (section) {\n        case \"IHDR\":\n          this.width = this.readUInt32();\n          this.height = this.readUInt32();\n          this.bits = this.data[this.pos++];\n          this.colorType = this.data[this.pos++];\n          this.compressionMethod = this.data[this.pos++];\n          this.filterMethod = this.data[this.pos++];\n          this.interlaceMethod = this.data[this.pos++];\n          break;\n        case \"acTL\":\n          this.animation = {\n            numFrames: this.readUInt32(),\n            numPlays: this.readUInt32() || Infinity,\n            frames: []\n          };\n          break;\n        case \"PLTE\":\n          this.palette = this.read(chunkSize);\n          break;\n        case \"fcTL\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.pos += 4;\n          frame = {\n            width: this.readUInt32(),\n            height: this.readUInt32(),\n            xOffset: this.readUInt32(),\n            yOffset: this.readUInt32()\n          };\n          delayNum = this.readUInt16();\n          delayDen = this.readUInt16() || 100;\n          frame.delay = (1000 * delayNum) / delayDen;\n          frame.disposeOp = this.data[this.pos++];\n          frame.blendOp = this.data[this.pos++];\n          frame.data = [];\n          break;\n        case \"IDAT\":\n        case \"fdAT\":\n          if (section === \"fdAT\") {\n            this.pos += 4;\n            chunkSize -= 4;\n          }\n          data = (frame != null ? frame.data : void 0) || this.imgData;\n          for (\n            i = _i = 0;\n            0 <= chunkSize ? _i < chunkSize : _i > chunkSize;\n            i = 0 <= chunkSize ? ++_i : --_i\n          ) {\n            data.push(this.data[this.pos++]);\n          }\n          break;\n        case \"tRNS\":\n          this.transparency = {};\n          switch (this.colorType) {\n            case 3:\n              palLen = this.palette.length / 3;\n              this.transparency.indexed = this.read(chunkSize);\n              if (this.transparency.indexed.length > palLen)\n                throw new Error(\"More transparent colors than palette size\");\n              /*\n               * According to the PNG spec trns should be increased to the same size as palette if shorter\n               */\n              //palShort = 255 - this.transparency.indexed.length;\n              palShort = palLen - this.transparency.indexed.length;\n              if (palShort > 0) {\n                for (\n                  i = _j = 0;\n                  0 <= palShort ? _j < palShort : _j > palShort;\n                  i = 0 <= palShort ? ++_j : --_j\n                ) {\n                  this.transparency.indexed.push(255);\n                }\n              }\n              break;\n            case 0:\n              this.transparency.grayscale = this.read(chunkSize)[0];\n              break;\n            case 2:\n              this.transparency.rgb = this.read(chunkSize);\n          }\n          break;\n        case \"tEXt\":\n          text = this.read(chunkSize);\n          index = text.indexOf(0);\n          key = String.fromCharCode.apply(String, text.slice(0, index));\n          this.text[key] = String.fromCharCode.apply(\n            String,\n            text.slice(index + 1)\n          );\n          break;\n        case \"IEND\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.colors = function() {\n            switch (this.colorType) {\n              case 0:\n              case 3:\n              case 4:\n                return 1;\n              case 2:\n              case 6:\n                return 3;\n            }\n          }.call(this);\n          this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;\n          colors = this.colors + (this.hasAlphaChannel ? 1 : 0);\n          this.pixelBitlength = this.bits * colors;\n          this.colorSpace = function() {\n            switch (this.colors) {\n              case 1:\n                return \"DeviceGray\";\n              case 3:\n                return \"DeviceRGB\";\n            }\n          }.call(this);\n          this.imgData = new Uint8Array(this.imgData);\n          return;\n        default:\n          this.pos += chunkSize;\n      }\n      this.pos += 4;\n      if (this.pos > this.data.length) {\n        throw new Error(\"Incomplete or corrupt PNG file\");\n      }\n    }\n  }\n\n  PNG.prototype.read = function(bytes) {\n    var i, _i, _results;\n    _results = [];\n    for (\n      i = _i = 0;\n      0 <= bytes ? _i < bytes : _i > bytes;\n      i = 0 <= bytes ? ++_i : --_i\n    ) {\n      _results.push(this.data[this.pos++]);\n    }\n    return _results;\n  };\n\n  PNG.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.data[this.pos++] << 24;\n    b2 = this.data[this.pos++] << 16;\n    b3 = this.data[this.pos++] << 8;\n    b4 = this.data[this.pos++];\n    return b1 | b2 | b3 | b4;\n  };\n\n  PNG.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.data[this.pos++] << 8;\n    b2 = this.data[this.pos++];\n    return b1 | b2;\n  };\n\n  PNG.prototype.decodePixels = function(data) {\n    var pixelBytes = this.pixelBitlength / 8;\n    var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);\n    var pos = 0;\n    var _this = this;\n\n    if (data == null) {\n      data = this.imgData;\n    }\n    if (data.length === 0) {\n      return new Uint8Array(0);\n    }\n\n    data = unzlibSync(data);\n    function pass(x0, y0, dx, dy) {\n      var abyte,\n        c,\n        col,\n        i,\n        left,\n        length,\n        p,\n        pa,\n        paeth,\n        pb,\n        pc,\n        pixels,\n        row,\n        scanlineLength,\n        upper,\n        upperLeft,\n        _i,\n        _j,\n        _k,\n        _l,\n        _m;\n      var w = Math.ceil((_this.width - x0) / dx),\n        h = Math.ceil((_this.height - y0) / dy);\n      var isFull = _this.width == w && _this.height == h;\n      scanlineLength = pixelBytes * w;\n      pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);\n      length = data.length;\n      row = 0;\n      c = 0;\n      while (row < h && pos < length) {\n        switch (data[pos++]) {\n          case 0:\n            for (i = _i = 0; _i < scanlineLength; i = _i += 1) {\n              pixels[c++] = data[pos++];\n            }\n            break;\n          case 1:\n            for (i = _j = 0; _j < scanlineLength; i = _j += 1) {\n              abyte = data[pos++];\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              pixels[c++] = (abyte + left) % 256;\n            }\n            break;\n          case 2:\n            for (i = _k = 0; _k < scanlineLength; i = _k += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (upper + abyte) % 256;\n            }\n            break;\n          case 3:\n            for (i = _l = 0; _l < scanlineLength; i = _l += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;\n            }\n            break;\n          case 4:\n            for (i = _m = 0; _m < scanlineLength; i = _m += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              if (row === 0) {\n                upper = upperLeft = 0;\n              } else {\n                upper =\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      col * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n                upperLeft =\n                  col &&\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      (col - 1) * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n              }\n              p = left + upper - upperLeft;\n              pa = Math.abs(p - left);\n              pb = Math.abs(p - upper);\n              pc = Math.abs(p - upperLeft);\n              if (pa <= pb && pa <= pc) {\n                paeth = left;\n              } else if (pb <= pc) {\n                paeth = upper;\n              } else {\n                paeth = upperLeft;\n              }\n              pixels[c++] = (abyte + paeth) % 256;\n            }\n            break;\n          default:\n            throw new Error(\"Invalid filter algorithm: \" + data[pos - 1]);\n        }\n        if (!isFull) {\n          var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;\n          var partPos = row * scanlineLength;\n          for (i = 0; i < w; i += 1) {\n            for (var j = 0; j < pixelBytes; j += 1)\n              fullPixels[fullPos++] = pixels[partPos++];\n            fullPos += (dx - 1) * pixelBytes;\n          }\n        }\n        row++;\n      }\n    }\n    if (_this.interlaceMethod == 1) {\n      /*\n          1 6 4 6 2 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n          3 6 4 6 3 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n        */\n      pass(0, 0, 8, 8); // 1\n      /* NOTE these seem to follow the pattern:\n       * pass(x, 0, 2*x, 2*x);\n       * pass(0, x,   x, 2*x);\n       * with x being 4, 2, 1.\n       */\n      pass(4, 0, 8, 8); // 2\n      pass(0, 4, 4, 8); // 3\n\n      pass(2, 0, 4, 4); // 4\n      pass(0, 2, 2, 4); // 5\n\n      pass(1, 0, 2, 2); // 6\n      pass(0, 1, 1, 2); // 7\n    } else {\n      pass(0, 0, 1, 1);\n    }\n    return fullPixels;\n  };\n\n  PNG.prototype.decodePalette = function() {\n    var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;\n    palette = this.palette;\n    transparency = this.transparency.indexed || [];\n    ret = new Uint8Array((transparency.length || 0) + palette.length);\n    pos = 0;\n    length = palette.length;\n    c = 0;\n    for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {\n      ret[pos++] = palette[i];\n      ret[pos++] = palette[i + 1];\n      ret[pos++] = palette[i + 2];\n      ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;\n    }\n    return ret;\n  };\n\n  PNG.prototype.copyToImageData = function(imageData, pixels) {\n    var alpha, colors, data, i, input, j, k, length, palette, v, _ref;\n    colors = this.colors;\n    palette = null;\n    alpha = this.hasAlphaChannel;\n    if (this.palette.length) {\n      palette =\n        (_ref = this._decodedPalette) != null\n          ? _ref\n          : (this._decodedPalette = this.decodePalette());\n      colors = 4;\n      alpha = true;\n    }\n    data = imageData.data || imageData;\n    length = data.length;\n    input = palette || pixels;\n    i = j = 0;\n    if (colors === 1) {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        v = input[k++];\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    } else {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    }\n  };\n\n  PNG.prototype.decode = function() {\n    var ret;\n    ret = new Uint8Array(this.width * this.height * 4);\n    this.copyToImageData(ret, this.decodePixels());\n    return ret;\n  };\n\n  var hasBrowserCanvas = function() {\n    if (Object.prototype.toString.call(globalObject) === \"[object Window]\") {\n      try {\n        scratchCanvas = globalObject.document.createElement(\"canvas\");\n        scratchCtx = scratchCanvas.getContext(\"2d\");\n      } catch (e) {\n        return false;\n      }\n      return true;\n    }\n    return false;\n  };\n\n  hasBrowserCanvas();\n\n  makeImage = function(imageData) {\n    if (hasBrowserCanvas() === true) {\n      var img;\n      scratchCtx.width = imageData.width;\n      scratchCtx.height = imageData.height;\n      scratchCtx.clearRect(0, 0, imageData.width, imageData.height);\n      scratchCtx.putImageData(imageData, 0, 0);\n      img = new Image();\n      img.src = scratchCanvas.toDataURL();\n      return img;\n    }\n    throw new Error(\"This method requires a Browser with Canvas-capability.\");\n  };\n\n  PNG.prototype.decodeFrames = function(ctx) {\n    var frame, i, imageData, pixels, _i, _len, _ref, _results;\n    if (!this.animation) {\n      return;\n    }\n    _ref = this.animation.frames;\n    _results = [];\n    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {\n      frame = _ref[i];\n      imageData = ctx.createImageData(frame.width, frame.height);\n      pixels = this.decodePixels(new Uint8Array(frame.data));\n      this.copyToImageData(imageData, pixels);\n      frame.imageData = imageData;\n      _results.push((frame.image = makeImage(imageData)));\n    }\n    return _results;\n  };\n\n  PNG.prototype.renderFrame = function(ctx, number) {\n    var frame, frames, prev;\n    frames = this.animation.frames;\n    frame = frames[number];\n    prev = frames[number - 1];\n    if (number === 0) {\n      ctx.clearRect(0, 0, this.width, this.height);\n    }\n    if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND\n    ) {\n      ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);\n    } else if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS\n    ) {\n      ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);\n    }\n    if (frame.blendOp === APNG_BLEND_OP_SOURCE) {\n      ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);\n    }\n    return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);\n  };\n\n  PNG.prototype.animate = function(ctx) {\n    var doFrame,\n      frameNumber,\n      frames,\n      numFrames,\n      numPlays,\n      _ref,\n      _this = this;\n    frameNumber = 0;\n    (_ref = this.animation),\n      (numFrames = _ref.numFrames),\n      (frames = _ref.frames),\n      (numPlays = _ref.numPlays);\n    return (doFrame = function() {\n      var f, frame;\n      f = frameNumber++ % numFrames;\n      frame = frames[f];\n      _this.renderFrame(ctx, f);\n      if (numFrames > 1 && frameNumber / numFrames < numPlays) {\n        return (_this.animation._timeout = setTimeout(doFrame, frame.delay));\n      }\n    })();\n  };\n\n  PNG.prototype.stopAnimation = function() {\n    var _ref;\n    return clearTimeout(\n      (_ref = this.animation) != null ? _ref._timeout : void 0\n    );\n  };\n\n  PNG.prototype.render = function(canvas) {\n    var ctx, data;\n    if (canvas._png) {\n      canvas._png.stopAnimation();\n    }\n    canvas._png = this;\n    canvas.width = this.width;\n    canvas.height = this.height;\n    ctx = canvas.getContext(\"2d\");\n    if (this.animation) {\n      this.decodeFrames(ctx);\n      return this.animate(ctx);\n    } else {\n      data = ctx.createImageData(this.width, this.height);\n      this.copyToImageData(data, this.decodePixels());\n      return ctx.putImageData(data, 0, 0);\n    }\n  };\n\n  return PNG;\n})();\n\nexport { PNG };\n","/** @license\n * MIT license.\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF split_text_to_size plugin\n *\n * @name split_text_to_size\n * @module\n */\n(function(API) {\n  \"use strict\";\n  /**\n   * Returns an array of length matching length of the 'word' string, with each\n   * cell occupied by the width of the char in that position.\n   *\n   * @name getCharWidthsArray\n   * @function\n   * @param {string} text\n   * @param {Object} options\n   * @returns {Array}\n   */\n  var getCharWidthsArray = (API.getCharWidthsArray = function(text, options) {\n    options = options || {};\n\n    var activeFont = options.font || this.internal.getFont();\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n\n    var widths = options.widths\n      ? options.widths\n      : activeFont.metadata.Unicode.widths;\n    var widthsFractionOf = widths.fof ? widths.fof : 1;\n    var kerning = options.kerning\n      ? options.kerning\n      : activeFont.metadata.Unicode.kerning;\n    var kerningFractionOf = kerning.fof ? kerning.fof : 1;\n    var doKerning = options.doKerning === false ? false : true;\n    var kerningValue = 0;\n\n    var i;\n    var length = text.length;\n    var char_code;\n    var prior_char_code = 0; //for kerning\n    var default_char_width = widths[0] || widthsFractionOf;\n    var output = [];\n\n    for (i = 0; i < length; i++) {\n      char_code = text.charCodeAt(i);\n\n      if (typeof activeFont.metadata.widthOfString === \"function\") {\n        output.push(\n          (activeFont.metadata.widthOfGlyph(\n            activeFont.metadata.characterToGlyph(char_code)\n          ) +\n            charSpace * (1000 / fontSize) || 0) / 1000\n        );\n      } else {\n        if (\n          doKerning &&\n          typeof kerning[char_code] === \"object\" &&\n          !isNaN(parseInt(kerning[char_code][prior_char_code], 10))\n        ) {\n          kerningValue =\n            kerning[char_code][prior_char_code] / kerningFractionOf;\n        } else {\n          kerningValue = 0;\n        }\n        output.push(\n          (widths[char_code] || default_char_width) / widthsFractionOf +\n            kerningValue\n        );\n      }\n      prior_char_code = char_code;\n    }\n\n    return output;\n  });\n\n  /**\n   * Returns a widths of string in a given font, if the font size is set as 1 point.\n   *\n   * In other words, this is \"proportional\" value. For 1 unit of font size, the length\n   * of the string will be that much.\n   *\n   * Multiply by font size to get actual width in *points*\n   * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.\n   *\n   * @name getStringUnitWidth\n   * @public\n   * @function\n   * @param {string} text\n   * @param {string} options\n   * @returns {number} result\n   */\n  var getStringUnitWidth = (API.getStringUnitWidth = function(text, options) {\n    options = options || {};\n\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var font = options.font || this.internal.getFont();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n    var result = 0;\n\n    if (API.processArabic) {\n      text = API.processArabic(text);\n    }\n\n    if (typeof font.metadata.widthOfString === \"function\") {\n      result =\n        font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;\n    } else {\n      result = getCharWidthsArray\n        .apply(this, arguments)\n        .reduce(function(pv, cv) {\n          return pv + cv;\n        }, 0);\n    }\n    return result;\n  });\n\n  /**\n  returns array of lines\n  */\n  var splitLongWord = function(word, widths_array, firstLineMaxLen, maxLen) {\n    var answer = [];\n\n    // 1st, chop off the piece that can fit on the hanging line.\n    var i = 0,\n      l = word.length,\n      workingLen = 0;\n    while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {\n      workingLen += widths_array[i];\n      i++;\n    }\n    // this is first line.\n    answer.push(word.slice(0, i));\n\n    // 2nd. Split the rest into maxLen pieces.\n    var startOfLine = i;\n    workingLen = 0;\n    while (i !== l) {\n      if (workingLen + widths_array[i] > maxLen) {\n        answer.push(word.slice(startOfLine, i));\n        workingLen = 0;\n        startOfLine = i;\n      }\n      workingLen += widths_array[i];\n      i++;\n    }\n    if (startOfLine !== i) {\n      answer.push(word.slice(startOfLine, i));\n    }\n\n    return answer;\n  };\n\n  // Note, all sizing inputs for this function must be in \"font measurement units\"\n  // By default, for PDF, it's \"point\".\n  var splitParagraphIntoLines = function(text, maxlen, options) {\n    // at this time works only on Western scripts, ones with space char\n    // separating the words. Feel free to expand.\n\n    if (!options) {\n      options = {};\n    }\n\n    var line = [],\n      lines = [line],\n      line_length = options.textIndent || 0,\n      separator_length = 0,\n      current_word_length = 0,\n      word,\n      widths_array,\n      words = text.split(\" \"),\n      spaceCharWidth = getCharWidthsArray.apply(this, [\" \", options])[0],\n      i,\n      l,\n      tmp,\n      lineIndent;\n\n    if (options.lineIndent === -1) {\n      lineIndent = words[0].length + 2;\n    } else {\n      lineIndent = options.lineIndent || 0;\n    }\n    if (lineIndent) {\n      var pad = Array(lineIndent).join(\" \"),\n        wrds = [];\n      words.map(function(wrd) {\n        wrd = wrd.split(/\\s*\\n/);\n        if (wrd.length > 1) {\n          wrds = wrds.concat(\n            wrd.map(function(wrd, idx) {\n              return (idx && wrd.length ? \"\\n\" : \"\") + wrd;\n            })\n          );\n        } else {\n          wrds.push(wrd[0]);\n        }\n      });\n      words = wrds;\n      lineIndent = getStringUnitWidth.apply(this, [pad, options]);\n    }\n\n    for (i = 0, l = words.length; i < l; i++) {\n      var force = 0;\n\n      word = words[i];\n      if (lineIndent && word[0] == \"\\n\") {\n        word = word.substr(1);\n        force = 1;\n      }\n      widths_array = getCharWidthsArray.apply(this, [word, options]);\n      current_word_length = widths_array.reduce(function(pv, cv) {\n        return pv + cv;\n      }, 0);\n\n      if (\n        line_length + separator_length + current_word_length > maxlen ||\n        force\n      ) {\n        if (current_word_length > maxlen) {\n          // this happens when you have space-less long URLs for example.\n          // we just chop these to size. We do NOT insert hiphens\n          tmp = splitLongWord.apply(this, [\n            word,\n            widths_array,\n            maxlen - (line_length + separator_length),\n            maxlen\n          ]);\n          // first line we add to existing line object\n          line.push(tmp.shift()); // it's ok to have extra space indicator there\n          // last line we make into new line object\n          line = [tmp.pop()];\n          // lines in the middle we apped to lines object as whole lines\n          while (tmp.length) {\n            lines.push([tmp.shift()]); // single fragment occupies whole line\n          }\n          current_word_length = widths_array\n            .slice(word.length - (line[0] ? line[0].length : 0))\n            .reduce(function(pv, cv) {\n              return pv + cv;\n            }, 0);\n        } else {\n          // just put it on a new line\n          line = [word];\n        }\n\n        // now we attach new line to lines\n        lines.push(line);\n        line_length = current_word_length + lineIndent;\n        separator_length = spaceCharWidth;\n      } else {\n        line.push(word);\n\n        line_length += separator_length + current_word_length;\n        separator_length = spaceCharWidth;\n      }\n    }\n\n    var postProcess;\n    if (lineIndent) {\n      postProcess = function(ln, idx) {\n        return (idx ? pad : \"\") + ln.join(\" \");\n      };\n    } else {\n      postProcess = function(ln) {\n        return ln.join(\" \");\n      };\n    }\n\n    return lines.map(postProcess);\n  };\n\n  /**\n   * Splits a given string into an array of strings. Uses 'size' value\n   * (in measurement units declared as default for the jsPDF instance)\n   * and the font's \"widths\" and \"Kerning\" tables, where available, to\n   * determine display length of a given string for a given font.\n   *\n   * We use character's 100% of unit size (height) as width when Width\n   * table or other default width is not available.\n   *\n   * @name splitTextToSize\n   * @public\n   * @function\n   * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.\n   * @param {number} size Nominal number, measured in units default to this instance of jsPDF.\n   * @param {Object} options Optional flags needed for chopper to do the right thing.\n   * @returns {Array} array Array with strings chopped to size.\n   */\n  API.splitTextToSize = function(text, maxlen, options) {\n    \"use strict\";\n\n    options = options || {};\n\n    var fsize = options.fontSize || this.internal.getFontSize(),\n      newOptions = function(options) {\n        var widths = {\n            0: 1\n          },\n          kerning = {};\n\n        if (!options.widths || !options.kerning) {\n          var f = this.internal.getFont(options.fontName, options.fontStyle),\n            encoding = \"Unicode\";\n          // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE\n          // Actual JavaScript-native String's 16bit char codes used.\n          // no multi-byte logic here\n\n          if (f.metadata[encoding]) {\n            return {\n              widths: f.metadata[encoding].widths || widths,\n              kerning: f.metadata[encoding].kerning || kerning\n            };\n          } else {\n            return {\n              font: f.metadata,\n              fontSize: this.internal.getFontSize(),\n              charSpace: this.internal.getCharSpace()\n            };\n          }\n        } else {\n          return {\n            widths: options.widths,\n            kerning: options.kerning\n          };\n        }\n      }.call(this, options);\n\n    // first we split on end-of-line chars\n    var paragraphs;\n    if (Array.isArray(text)) {\n      paragraphs = text;\n    } else {\n      paragraphs = String(text).split(/\\r?\\n/);\n    }\n\n    // now we convert size (max length of line) into \"font size units\"\n    // at present time, the \"font size unit\" is always 'point'\n    // 'proportional' means, \"in proportion to font size\"\n    var fontUnit_maxLen = (1.0 * this.internal.scaleFactor * maxlen) / fsize;\n    // at this time, fsize is always in \"points\" regardless of the default measurement unit of the doc.\n    // this may change in the future?\n    // until then, proportional_maxlen is likely to be in 'points'\n\n    // If first line is to be indented (shorter or longer) than maxLen\n    // we indicate that by using CSS-style \"text-indent\" option.\n    // here it's in font units too (which is likely 'points')\n    // it can be negative (which makes the first line longer than maxLen)\n    newOptions.textIndent = options.textIndent\n      ? (options.textIndent * 1.0 * this.internal.scaleFactor) / fsize\n      : 0;\n    newOptions.lineIndent = options.lineIndent;\n\n    var i,\n      l,\n      output = [];\n    for (i = 0, l = paragraphs.length; i < l; i++) {\n      output = output.concat(\n        splitParagraphIntoLines.apply(this, [\n          paragraphs[i],\n          fontUnit_maxLen,\n          newOptions\n        ])\n      );\n    }\n\n    return output;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * (c) Dean McNamee <dean@gmail.com>, 2013.\n *\n * https://github.com/deanm/omggif\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,\n * including animation and compression.  It does not rely on any specific\n * underlying system, so should run in the browser, Node, or Plask.\n */\n\n\"use strict\";\n\nimport { console } from \"./console.js\";\n\nfunction GifWriter(buf, width, height, gopts) {\n  var p = 0;\n\n  var gopts = gopts === undefined ? {} : gopts;\n  var loop_count = gopts.loop === undefined ? null : gopts.loop;\n  var global_palette = gopts.palette === undefined ? null : gopts.palette;\n\n  if (width <= 0 || height <= 0 || width > 65535 || height > 65535)\n    throw new Error(\"Width/Height invalid.\");\n\n  function check_palette_and_num_colors(palette) {\n    var num_colors = palette.length;\n    if (num_colors < 2 || num_colors > 256 || num_colors & (num_colors - 1)) {\n      throw new Error(\n        \"Invalid code/color length, must be power of 2 and 2 .. 256.\"\n      );\n    }\n    return num_colors;\n  }\n\n  // - Header.\n  buf[p++] = 0x47;\n  buf[p++] = 0x49;\n  buf[p++] = 0x46; // GIF\n  buf[p++] = 0x38;\n  buf[p++] = 0x39;\n  buf[p++] = 0x61; // 89a\n\n  // Handling of Global Color Table (palette) and background index.\n  var gp_num_colors_pow2 = 0;\n  var background = 0;\n  if (global_palette !== null) {\n    var gp_num_colors = check_palette_and_num_colors(global_palette);\n    while ((gp_num_colors >>= 1)) ++gp_num_colors_pow2;\n    gp_num_colors = 1 << gp_num_colors_pow2;\n    --gp_num_colors_pow2;\n    if (gopts.background !== undefined) {\n      background = gopts.background;\n      if (background >= gp_num_colors)\n        throw new Error(\"Background index out of range.\");\n      // The GIF spec states that a background index of 0 should be ignored, so\n      // this is probably a mistake and you really want to set it to another\n      // slot in the palette.  But actually in the end most browsers, etc end\n      // up ignoring this almost completely (including for dispose background).\n      if (background === 0)\n        throw new Error(\"Background index explicitly passed as 0.\");\n    }\n  }\n\n  // - Logical Screen Descriptor.\n  // NOTE(deanm): w/h apparently ignored by implementations, but set anyway.\n  buf[p++] = width & 0xff;\n  buf[p++] = (width >> 8) & 0xff;\n  buf[p++] = height & 0xff;\n  buf[p++] = (height >> 8) & 0xff;\n  // NOTE: Indicates 0-bpp original color resolution (unused?).\n  buf[p++] = (global_palette !== null ? 0x80 : 0) | gp_num_colors_pow2; // Global Color Table Flag. // NOTE: No sort flag (unused?).\n  buf[p++] = background; // Background Color Index.\n  buf[p++] = 0; // Pixel aspect ratio (unused?).\n\n  // - Global Color Table\n  if (global_palette !== null) {\n    for (var i = 0, il = global_palette.length; i < il; ++i) {\n      var rgb = global_palette[i];\n      buf[p++] = (rgb >> 16) & 0xff;\n      buf[p++] = (rgb >> 8) & 0xff;\n      buf[p++] = rgb & 0xff;\n    }\n  }\n\n  if (loop_count !== null) {\n    // Netscape block for looping.\n    if (loop_count < 0 || loop_count > 65535)\n      throw new Error(\"Loop count invalid.\");\n    // Extension code, label, and length.\n    buf[p++] = 0x21;\n    buf[p++] = 0xff;\n    buf[p++] = 0x0b;\n    // NETSCAPE2.0\n    buf[p++] = 0x4e;\n    buf[p++] = 0x45;\n    buf[p++] = 0x54;\n    buf[p++] = 0x53;\n    buf[p++] = 0x43;\n    buf[p++] = 0x41;\n    buf[p++] = 0x50;\n    buf[p++] = 0x45;\n    buf[p++] = 0x32;\n    buf[p++] = 0x2e;\n    buf[p++] = 0x30;\n    // Sub-block\n    buf[p++] = 0x03;\n    buf[p++] = 0x01;\n    buf[p++] = loop_count & 0xff;\n    buf[p++] = (loop_count >> 8) & 0xff;\n    buf[p++] = 0x00; // Terminator.\n  }\n\n  var ended = false;\n\n  this.addFrame = function(x, y, w, h, indexed_pixels, opts) {\n    if (ended === true) {\n      --p;\n      ended = false;\n    } // Un-end.\n\n    opts = opts === undefined ? {} : opts;\n\n    // TODO(deanm): Bounds check x, y.  Do they need to be within the virtual\n    // canvas width/height, I imagine?\n    if (x < 0 || y < 0 || x > 65535 || y > 65535)\n      throw new Error(\"x/y invalid.\");\n\n    if (w <= 0 || h <= 0 || w > 65535 || h > 65535)\n      throw new Error(\"Width/Height invalid.\");\n\n    if (indexed_pixels.length < w * h)\n      throw new Error(\"Not enough pixels for the frame size.\");\n\n    var using_local_palette = true;\n    var palette = opts.palette;\n    if (palette === undefined || palette === null) {\n      using_local_palette = false;\n      palette = global_palette;\n    }\n\n    if (palette === undefined || palette === null)\n      throw new Error(\"Must supply either a local or global palette.\");\n\n    var num_colors = check_palette_and_num_colors(palette);\n\n    // Compute the min_code_size (power of 2), destroying num_colors.\n    var min_code_size = 0;\n    while ((num_colors >>= 1)) ++min_code_size;\n    num_colors = 1 << min_code_size; // Now we can easily get it back.\n\n    var delay = opts.delay === undefined ? 0 : opts.delay;\n\n    // From the spec:\n    //     0 -   No disposal specified. The decoder is\n    //           not required to take any action.\n    //     1 -   Do not dispose. The graphic is to be left\n    //           in place.\n    //     2 -   Restore to background color. The area used by the\n    //           graphic must be restored to the background color.\n    //     3 -   Restore to previous. The decoder is required to\n    //           restore the area overwritten by the graphic with\n    //           what was there prior to rendering the graphic.\n    //  4-7 -    To be defined.\n    // NOTE(deanm): Dispose background doesn't really work, apparently most\n    // browsers ignore the background palette index and clear to transparency.\n    var disposal = opts.disposal === undefined ? 0 : opts.disposal;\n    if (disposal < 0 || disposal > 3)\n      // 4-7 is reserved.\n      throw new Error(\"Disposal out of range.\");\n\n    var use_transparency = false;\n    var transparent_index = 0;\n    if (opts.transparent !== undefined && opts.transparent !== null) {\n      use_transparency = true;\n      transparent_index = opts.transparent;\n      if (transparent_index < 0 || transparent_index >= num_colors)\n        throw new Error(\"Transparent color index.\");\n    }\n\n    if (disposal !== 0 || use_transparency || delay !== 0) {\n      // - Graphics Control Extension\n      buf[p++] = 0x21;\n      buf[p++] = 0xf9; // Extension / Label.\n      buf[p++] = 4; // Byte size.\n\n      buf[p++] = (disposal << 2) | (use_transparency === true ? 1 : 0);\n      buf[p++] = delay & 0xff;\n      buf[p++] = (delay >> 8) & 0xff;\n      buf[p++] = transparent_index; // Transparent color index.\n      buf[p++] = 0; // Block Terminator.\n    }\n\n    // - Image Descriptor\n    buf[p++] = 0x2c; // Image Seperator.\n    buf[p++] = x & 0xff;\n    buf[p++] = (x >> 8) & 0xff; // Left.\n    buf[p++] = y & 0xff;\n    buf[p++] = (y >> 8) & 0xff; // Top.\n    buf[p++] = w & 0xff;\n    buf[p++] = (w >> 8) & 0xff;\n    buf[p++] = h & 0xff;\n    buf[p++] = (h >> 8) & 0xff;\n    // NOTE: No sort flag (unused?).\n    // TODO(deanm): Support interlace.\n    buf[p++] = using_local_palette === true ? 0x80 | (min_code_size - 1) : 0;\n\n    // - Local Color Table\n    if (using_local_palette === true) {\n      for (var i = 0, il = palette.length; i < il; ++i) {\n        var rgb = palette[i];\n        buf[p++] = (rgb >> 16) & 0xff;\n        buf[p++] = (rgb >> 8) & 0xff;\n        buf[p++] = rgb & 0xff;\n      }\n    }\n\n    p = GifWriterOutputLZWCodeStream(\n      buf,\n      p,\n      min_code_size < 2 ? 2 : min_code_size,\n      indexed_pixels\n    );\n\n    return p;\n  };\n\n  this.end = function() {\n    if (ended === false) {\n      buf[p++] = 0x3b; // Trailer.\n      ended = true;\n    }\n    return p;\n  };\n\n  this.getOutputBuffer = function() {\n    return buf;\n  };\n  this.setOutputBuffer = function(v) {\n    buf = v;\n  };\n  this.getOutputBufferPosition = function() {\n    return p;\n  };\n  this.setOutputBufferPosition = function(v) {\n    p = v;\n  };\n}\n\n// Main compression routine, palette indexes -> LZW code stream.\n// |index_stream| must have at least one entry.\nfunction GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) {\n  buf[p++] = min_code_size;\n  var cur_subblock = p++; // Pointing at the length field.\n\n  var clear_code = 1 << min_code_size;\n  var code_mask = clear_code - 1;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  var cur_shift = 0;\n  // We have at most 12-bit codes, so we should have to hold a max of 19\n  // bits here (and then we would write out).\n  var cur = 0;\n\n  function emit_bytes_to_buffer(bit_block_size) {\n    while (cur_shift >= bit_block_size) {\n      buf[p++] = cur & 0xff;\n      cur >>= 8;\n      cur_shift -= 8;\n      if (p === cur_subblock + 256) {\n        // Finished a subblock.\n        buf[cur_subblock] = 255;\n        cur_subblock = p++;\n      }\n    }\n  }\n\n  function emit_code(c) {\n    cur |= c << cur_shift;\n    cur_shift += cur_code_size;\n    emit_bytes_to_buffer(8);\n  }\n\n  // I am not an expert on the topic, and I don't want to write a thesis.\n  // However, it is good to outline here the basic algorithm and the few data\n  // structures and optimizations here that make this implementation fast.\n  // The basic idea behind LZW is to build a table of previously seen runs\n  // addressed by a short id (herein called output code).  All data is\n  // referenced by a code, which represents one or more values from the\n  // original input stream.  All input bytes can be referenced as the same\n  // value as an output code.  So if you didn't want any compression, you\n  // could more or less just output the original bytes as codes (there are\n  // some details to this, but it is the idea).  In order to achieve\n  // compression, values greater then the input range (codes can be up to\n  // 12-bit while input only 8-bit) represent a sequence of previously seen\n  // inputs.  The decompressor is able to build the same mapping while\n  // decoding, so there is always a shared common knowledge between the\n  // encoding and decoder, which is also important for \"timing\" aspects like\n  // how to handle variable bit width code encoding.\n  //\n  // One obvious but very important consequence of the table system is there\n  // is always a unique id (at most 12-bits) to map the runs.  'A' might be\n  // 4, then 'AA' might be 10, 'AAA' 11, 'AAAA' 12, etc.  This relationship\n  // can be used for an effecient lookup strategy for the code mapping.  We\n  // need to know if a run has been seen before, and be able to map that run\n  // to the output code.  Since we start with known unique ids (input bytes),\n  // and then from those build more unique ids (table entries), we can\n  // continue this chain (almost like a linked list) to always have small\n  // integer values that represent the current byte chains in the encoder.\n  // This means instead of tracking the input bytes (AAAABCD) to know our\n  // current state, we can track the table entry for AAAABC (it is guaranteed\n  // to exist by the nature of the algorithm) and the next character D.\n  // Therefor the tuple of (table_entry, byte) is guaranteed to also be\n  // unique.  This allows us to create a simple lookup key for mapping input\n  // sequences to codes (table indices) without having to store or search\n  // any of the code sequences.  So if 'AAAA' has a table entry of 12, the\n  // tuple of ('AAAA', K) for any input byte K will be unique, and can be our\n  // key.  This leads to a integer value at most 20-bits, which can always\n  // fit in an SMI value and be used as a fast sparse array / object key.\n\n  // Output code for the current contents of the index buffer.\n  var ib_code = index_stream[0] & code_mask; // Load first input index.\n  var code_table = {}; // Key'd on our 20-bit \"tuple\".\n\n  emit_code(clear_code); // Spec says first code should be a clear code.\n\n  // First index already loaded, process the rest of the stream.\n  for (var i = 1, il = index_stream.length; i < il; ++i) {\n    var k = index_stream[i] & code_mask;\n    var cur_key = (ib_code << 8) | k; // (prev, k) unique tuple.\n    var cur_code = code_table[cur_key]; // buffer + k.\n\n    // Check if we have to create a new code table entry.\n    if (cur_code === undefined) {\n      // We don't have buffer + k.\n      // Emit index buffer (without k).\n      // This is an inline version of emit_code, because this is the core\n      // writing routine of the compressor (and V8 cannot inline emit_code\n      // because it is a closure here in a different context).  Additionally\n      // we can call emit_byte_to_buffer less often, because we can have\n      // 30-bits (from our 31-bit signed SMI), and we know our codes will only\n      // be 12-bits, so can safely have 18-bits there without overflow.\n      // emit_code(ib_code);\n      cur |= ib_code << cur_shift;\n      cur_shift += cur_code_size;\n      while (cur_shift >= 8) {\n        buf[p++] = cur & 0xff;\n        cur >>= 8;\n        cur_shift -= 8;\n        if (p === cur_subblock + 256) {\n          // Finished a subblock.\n          buf[cur_subblock] = 255;\n          cur_subblock = p++;\n        }\n      }\n\n      if (next_code === 4096) {\n        // Table full, need a clear.\n        emit_code(clear_code);\n        next_code = eoi_code + 1;\n        cur_code_size = min_code_size + 1;\n        code_table = {};\n      } else {\n        // Table not full, insert a new entry.\n        // Increase our variable bit code sizes if necessary.  This is a bit\n        // tricky as it is based on \"timing\" between the encoding and\n        // decoder.  From the encoders perspective this should happen after\n        // we've already emitted the index buffer and are about to create the\n        // first table entry that would overflow our current code bit size.\n        if (next_code >= 1 << cur_code_size) ++cur_code_size;\n        code_table[cur_key] = next_code++; // Insert into code table.\n      }\n\n      ib_code = k; // Index buffer to single input k.\n    } else {\n      ib_code = cur_code; // Index buffer to sequence in code table.\n    }\n  }\n\n  emit_code(ib_code); // There will still be something in the index buffer.\n  emit_code(eoi_code); // End Of Information.\n\n  // Flush / finalize the sub-blocks stream to the buffer.\n  emit_bytes_to_buffer(1);\n\n  // Finish the sub-blocks, writing out any unfinished lengths and\n  // terminating with a sub-block of length 0.  If we have already started\n  // but not yet used a sub-block it can just become the terminator.\n  if (cur_subblock + 1 === p) {\n    // Started but unused.\n    buf[cur_subblock] = 0;\n  } else {\n    // Started and used, write length and additional terminator block.\n    buf[cur_subblock] = p - cur_subblock - 1;\n    buf[p++] = 0;\n  }\n  return p;\n}\n\nfunction GifReader(buf) {\n  var p = 0;\n\n  // - Header (GIF87a or GIF89a).\n  if (\n    buf[p++] !== 0x47 ||\n    buf[p++] !== 0x49 ||\n    buf[p++] !== 0x46 ||\n    buf[p++] !== 0x38 ||\n    ((buf[p++] + 1) & 0xfd) !== 0x38 ||\n    buf[p++] !== 0x61\n  ) {\n    throw new Error(\"Invalid GIF 87a/89a header.\");\n  }\n\n  // - Logical Screen Descriptor.\n  var width = buf[p++] | (buf[p++] << 8);\n  var height = buf[p++] | (buf[p++] << 8);\n  var pf0 = buf[p++]; // <Packed Fields>.\n  var global_palette_flag = pf0 >> 7;\n  var num_global_colors_pow2 = pf0 & 0x7;\n  var num_global_colors = 1 << (num_global_colors_pow2 + 1);\n  var background = buf[p++];\n  buf[p++]; // Pixel aspect ratio (unused?).\n\n  var global_palette_offset = null;\n  var global_palette_size = null;\n\n  if (global_palette_flag) {\n    global_palette_offset = p;\n    global_palette_size = num_global_colors;\n    p += num_global_colors * 3; // Seek past palette.\n  }\n\n  var no_eof = true;\n\n  var frames = [];\n\n  var delay = 0;\n  var transparent_index = null;\n  var disposal = 0; // 0 - No disposal specified.\n  var loop_count = null;\n\n  this.width = width;\n  this.height = height;\n\n  while (no_eof && p < buf.length) {\n    switch (buf[p++]) {\n      case 0x21: // Graphics Control Extension Block\n        switch (buf[p++]) {\n          case 0xff: // Application specific block\n            // Try if it's a Netscape block (with animation loop counter).\n            if (\n              buf[p] !== 0x0b || // 21 FF already read, check block size.\n              // NETSCAPE2.0\n              (buf[p + 1] == 0x4e &&\n                buf[p + 2] == 0x45 &&\n                buf[p + 3] == 0x54 &&\n                buf[p + 4] == 0x53 &&\n                buf[p + 5] == 0x43 &&\n                buf[p + 6] == 0x41 &&\n                buf[p + 7] == 0x50 &&\n                buf[p + 8] == 0x45 &&\n                buf[p + 9] == 0x32 &&\n                buf[p + 10] == 0x2e &&\n                buf[p + 11] == 0x30 &&\n                // Sub-block\n                buf[p + 12] == 0x03 &&\n                buf[p + 13] == 0x01 &&\n                buf[p + 16] == 0)\n            ) {\n              p += 14;\n              loop_count = buf[p++] | (buf[p++] << 8);\n              p++; // Skip terminator.\n            } else {\n              // We don't know what it is, just try to get past it.\n              p += 12;\n              while (true) {\n                // Seek through subblocks.\n                var block_size = buf[p++];\n                // Bad block size (ex: undefined from an out of bounds read).\n                if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n                if (block_size === 0) break; // 0 size is terminator\n                p += block_size;\n              }\n            }\n            break;\n\n          case 0xf9: // Graphics Control Extension\n            if (buf[p++] !== 0x4 || buf[p + 4] !== 0)\n              throw new Error(\"Invalid graphics extension block.\");\n            var pf1 = buf[p++];\n            delay = buf[p++] | (buf[p++] << 8);\n            transparent_index = buf[p++];\n            if ((pf1 & 1) === 0) transparent_index = null;\n            disposal = (pf1 >> 2) & 0x7;\n            p++; // Skip terminator.\n            break;\n\n          case 0xfe: // Comment Extension.\n            while (true) {\n              // Seek through subblocks.\n              var block_size = buf[p++];\n              // Bad block size (ex: undefined from an out of bounds read).\n              if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n              if (block_size === 0) break; // 0 size is terminator\n              // console.log(buf.slice(p, p+block_size).toString('ascii'));\n              p += block_size;\n            }\n            break;\n\n          default:\n            throw new Error(\n              \"Unknown graphic control label: 0x\" + buf[p - 1].toString(16)\n            );\n        }\n        break;\n\n      case 0x2c: // Image Descriptor.\n        var x = buf[p++] | (buf[p++] << 8);\n        var y = buf[p++] | (buf[p++] << 8);\n        var w = buf[p++] | (buf[p++] << 8);\n        var h = buf[p++] | (buf[p++] << 8);\n        var pf2 = buf[p++];\n        var local_palette_flag = pf2 >> 7;\n        var interlace_flag = (pf2 >> 6) & 1;\n        var num_local_colors_pow2 = pf2 & 0x7;\n        var num_local_colors = 1 << (num_local_colors_pow2 + 1);\n        var palette_offset = global_palette_offset;\n        var palette_size = global_palette_size;\n        var has_local_palette = false;\n        if (local_palette_flag) {\n          var has_local_palette = true;\n          palette_offset = p; // Override with local palette.\n          palette_size = num_local_colors;\n          p += num_local_colors * 3; // Seek past palette.\n        }\n\n        var data_offset = p;\n\n        p++; // codesize\n        while (true) {\n          var block_size = buf[p++];\n          // Bad block size (ex: undefined from an out of bounds read).\n          if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n          if (block_size === 0) break; // 0 size is terminator\n          p += block_size;\n        }\n\n        frames.push({\n          x: x,\n          y: y,\n          width: w,\n          height: h,\n          has_local_palette: has_local_palette,\n          palette_offset: palette_offset,\n          palette_size: palette_size,\n          data_offset: data_offset,\n          data_length: p - data_offset,\n          transparent_index: transparent_index,\n          interlaced: !!interlace_flag,\n          delay: delay,\n          disposal: disposal\n        });\n        break;\n\n      case 0x3b: // Trailer Marker (end of file).\n        no_eof = false;\n        break;\n\n      default:\n        throw new Error(\"Unknown gif block: 0x\" + buf[p - 1].toString(16));\n        break;\n    }\n  }\n\n  this.numFrames = function() {\n    return frames.length;\n  };\n\n  this.loopCount = function() {\n    return loop_count;\n  };\n\n  this.frameInfo = function(frame_num) {\n    if (frame_num < 0 || frame_num >= frames.length)\n      throw new Error(\"Frame index out of range.\");\n    return frames[frame_num];\n  };\n\n  this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = b;\n        pixels[op++] = g;\n        pixels[op++] = r;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n\n  // I will go to copy and paste hell one day...\n  this.decodeAndBlitFrameRGBA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = r;\n        pixels[op++] = g;\n        pixels[op++] = b;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n}\n\nfunction GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {\n  var min_code_size = code_stream[p++];\n\n  var clear_code = 1 << min_code_size;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  // NOTE: This shares the same name as the encoder, but has a different\n  // meaning here.  Here this masks each code coming from the code stream.\n  var code_mask = (1 << cur_code_size) - 1;\n  var cur_shift = 0;\n  var cur = 0;\n\n  var op = 0; // Output pointer.\n\n  var subblock_size = code_stream[p++];\n\n  // TODO(deanm): Would using a TypedArray be any faster?  At least it would\n  // solve the fast mode / backing store uncertainty.\n  // var code_table = Array(4096);\n  var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.\n\n  var prev_code = null; // Track code-1.\n\n  while (true) {\n    // Read up to two bytes, making sure we always 12-bits for max sized code.\n    while (cur_shift < 16) {\n      if (subblock_size === 0) break; // No more data to be read.\n\n      cur |= code_stream[p++] << cur_shift;\n      cur_shift += 8;\n\n      if (subblock_size === 1) {\n        // Never let it get to 0 to hold logic above.\n        subblock_size = code_stream[p++]; // Next subblock.\n      } else {\n        --subblock_size;\n      }\n    }\n\n    // TODO(deanm): We should never really get here, we should have received\n    // and EOI.\n    if (cur_shift < cur_code_size) break;\n\n    var code = cur & code_mask;\n    cur >>= cur_code_size;\n    cur_shift -= cur_code_size;\n\n    // TODO(deanm): Maybe should check that the first code was a clear code,\n    // at least this is what you're supposed to do.  But actually our encoder\n    // now doesn't emit a clear code first anyway.\n    if (code === clear_code) {\n      // We don't actually have to clear the table.  This could be a good idea\n      // for greater error checking, but we don't really do any anyway.  We\n      // will just track it with next_code and overwrite old entries.\n\n      next_code = eoi_code + 1;\n      cur_code_size = min_code_size + 1;\n      code_mask = (1 << cur_code_size) - 1;\n\n      // Don't update prev_code ?\n      prev_code = null;\n      continue;\n    } else if (code === eoi_code) {\n      break;\n    }\n\n    // We have a similar situation as the decoder, where we want to store\n    // variable length entries (code table entries), but we want to do in a\n    // faster manner than an array of arrays.  The code below stores sort of a\n    // linked list within the code table, and then \"chases\" through it to\n    // construct the dictionary entries.  When a new entry is created, just the\n    // last byte is stored, and the rest (prefix) of the entry is only\n    // referenced by its table entry.  Then the code chases through the\n    // prefixes until it reaches a single byte code.  We have to chase twice,\n    // first to compute the length, and then to actually copy the data to the\n    // output (backwards, since we know the length).  The alternative would be\n    // storing something in an intermediate stack, but that doesn't make any\n    // more sense.  I implemented an approach where it also stored the length\n    // in the code table, although it's a bit tricky because you run out of\n    // bits (12 + 12 + 8), but I didn't measure much improvements (the table\n    // entries are generally not the long).  Even when I created benchmarks for\n    // very long table entries the complexity did not seem worth it.\n    // The code table stores the prefix entry in 12 bits and then the suffix\n    // byte in 8 bits, so each entry is 20 bits.\n\n    var chase_code = code < next_code ? code : prev_code;\n\n    // Chase what we will output, either {CODE} or {CODE-1}.\n    var chase_length = 0;\n    var chase = chase_code;\n    while (chase > clear_code) {\n      chase = code_table[chase] >> 8;\n      ++chase_length;\n    }\n\n    var k = chase;\n\n    var op_end = op + chase_length + (chase_code !== code ? 1 : 0);\n    if (op_end > output_length) {\n      console.log(\"Warning, gif stream longer than expected.\");\n      return;\n    }\n\n    // Already have the first byte from the chase, might as well write it fast.\n    output[op++] = k;\n\n    op += chase_length;\n    var b = op; // Track pointer, writing backwards.\n\n    if (chase_code !== code)\n      // The case of emitting {CODE-1} + k.\n      output[op++] = k;\n\n    chase = chase_code;\n    while (chase_length--) {\n      chase = code_table[chase];\n      output[--b] = chase & 0xff; // Write backwards.\n      chase >>= 8; // Pull down to the prefix code.\n    }\n\n    if (prev_code !== null && next_code < 4096) {\n      code_table[next_code++] = (prev_code << 8) | k;\n      // TODO(deanm): Figure out this clearing vs code growth logic better.  I\n      // have an feeling that it should just happen somewhere else, for now it\n      // is awkward between when we grow past the max and then hit a clear code.\n      // For now just check if we hit the max 12-bits (then a clear code should\n      // follow, also of course encoded in 12-bits).\n      if (next_code >= code_mask + 1 && cur_code_size < 12) {\n        ++cur_code_size;\n        code_mask = (code_mask << 1) | 1;\n      }\n    }\n\n    prev_code = code;\n  }\n\n  if (op !== output_length) {\n    console.log(\"Warning, gif stream shorter than expected.\");\n  }\n\n  return output;\n}\n\nexport { GifReader, GifWriter };\n","/**\n * @license\n  Copyright (c) 2008, Adobe Systems Incorporated\n  All rights reserved.\n\n  Redistribution and use in source and binary forms, with or without \n  modification, are permitted provided that the following conditions are\n  met:\n\n  * Redistributions of source code must retain the above copyright notice, \n    this list of conditions and the following disclaimer.\n  \n  * Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the \n    documentation and/or other materials provided with the distribution.\n  \n  * Neither the name of Adobe Systems Incorporated nor the names of its \n    contributors may be used to endorse or promote products derived from \n    this software without specific prior written permission.\n\n  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n  IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \n  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*\nJPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n\nBasic GUI blocking jpeg encoder\n*/\n\nfunction JPEGEncoder(quality) {\n  var ffloor = Math.floor;\n  var YTable = new Array(64);\n  var UVTable = new Array(64);\n  var fdtbl_Y = new Array(64);\n  var fdtbl_UV = new Array(64);\n  var YDC_HT;\n  var UVDC_HT;\n  var YAC_HT;\n  var UVAC_HT;\n\n  var bitcode = new Array(65535);\n  var category = new Array(65535);\n  var outputfDCTQuant = new Array(64);\n  var DU = new Array(64);\n  var byteout = [];\n  var bytenew = 0;\n  var bytepos = 7;\n\n  var YDU = new Array(64);\n  var UDU = new Array(64);\n  var VDU = new Array(64);\n  var clt = new Array(256);\n  var RGB_YUV_TABLE = new Array(2048);\n  var currentQuality;\n\n  var ZigZag = [\n    0,\n    1,\n    5,\n    6,\n    14,\n    15,\n    27,\n    28,\n    2,\n    4,\n    7,\n    13,\n    16,\n    26,\n    29,\n    42,\n    3,\n    8,\n    12,\n    17,\n    25,\n    30,\n    41,\n    43,\n    9,\n    11,\n    18,\n    24,\n    31,\n    40,\n    44,\n    53,\n    10,\n    19,\n    23,\n    32,\n    39,\n    45,\n    52,\n    54,\n    20,\n    22,\n    33,\n    38,\n    46,\n    51,\n    55,\n    60,\n    21,\n    34,\n    37,\n    47,\n    50,\n    56,\n    59,\n    61,\n    35,\n    36,\n    48,\n    49,\n    57,\n    58,\n    62,\n    63\n  ];\n\n  var std_dc_luminance_nrcodes = [\n    0,\n    0,\n    1,\n    5,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_luminance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    3,\n    3,\n    2,\n    4,\n    3,\n    5,\n    5,\n    4,\n    4,\n    0,\n    0,\n    1,\n    0x7d\n  ];\n  var std_ac_luminance_values = [\n    0x01,\n    0x02,\n    0x03,\n    0x00,\n    0x04,\n    0x11,\n    0x05,\n    0x12,\n    0x21,\n    0x31,\n    0x41,\n    0x06,\n    0x13,\n    0x51,\n    0x61,\n    0x07,\n    0x22,\n    0x71,\n    0x14,\n    0x32,\n    0x81,\n    0x91,\n    0xa1,\n    0x08,\n    0x23,\n    0x42,\n    0xb1,\n    0xc1,\n    0x15,\n    0x52,\n    0xd1,\n    0xf0,\n    0x24,\n    0x33,\n    0x62,\n    0x72,\n    0x82,\n    0x09,\n    0x0a,\n    0x16,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x25,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x34,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe1,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf1,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  var std_dc_chrominance_nrcodes = [\n    0,\n    0,\n    3,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_chrominance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    2,\n    4,\n    4,\n    3,\n    4,\n    7,\n    5,\n    4,\n    4,\n    0,\n    1,\n    2,\n    0x77\n  ];\n  var std_ac_chrominance_values = [\n    0x00,\n    0x01,\n    0x02,\n    0x03,\n    0x11,\n    0x04,\n    0x05,\n    0x21,\n    0x31,\n    0x06,\n    0x12,\n    0x41,\n    0x51,\n    0x07,\n    0x61,\n    0x71,\n    0x13,\n    0x22,\n    0x32,\n    0x81,\n    0x08,\n    0x14,\n    0x42,\n    0x91,\n    0xa1,\n    0xb1,\n    0xc1,\n    0x09,\n    0x23,\n    0x33,\n    0x52,\n    0xf0,\n    0x15,\n    0x62,\n    0x72,\n    0xd1,\n    0x0a,\n    0x16,\n    0x24,\n    0x34,\n    0xe1,\n    0x25,\n    0xf1,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x82,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  function initQuantTables(sf) {\n    var YQT = [\n      16,\n      11,\n      10,\n      16,\n      24,\n      40,\n      51,\n      61,\n      12,\n      12,\n      14,\n      19,\n      26,\n      58,\n      60,\n      55,\n      14,\n      13,\n      16,\n      24,\n      40,\n      57,\n      69,\n      56,\n      14,\n      17,\n      22,\n      29,\n      51,\n      87,\n      80,\n      62,\n      18,\n      22,\n      37,\n      56,\n      68,\n      109,\n      103,\n      77,\n      24,\n      35,\n      55,\n      64,\n      81,\n      104,\n      113,\n      92,\n      49,\n      64,\n      78,\n      87,\n      103,\n      121,\n      120,\n      101,\n      72,\n      92,\n      95,\n      98,\n      112,\n      100,\n      103,\n      99\n    ];\n\n    for (var i = 0; i < 64; i++) {\n      var t = ffloor((YQT[i] * sf + 50) / 100);\n      t = Math.min(Math.max(t, 1), 255);\n      YTable[ZigZag[i]] = t;\n    }\n    var UVQT = [\n      17,\n      18,\n      24,\n      47,\n      99,\n      99,\n      99,\n      99,\n      18,\n      21,\n      26,\n      66,\n      99,\n      99,\n      99,\n      99,\n      24,\n      26,\n      56,\n      99,\n      99,\n      99,\n      99,\n      99,\n      47,\n      66,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99\n    ];\n    for (var j = 0; j < 64; j++) {\n      var u = ffloor((UVQT[j] * sf + 50) / 100);\n      u = Math.min(Math.max(u, 1), 255);\n      UVTable[ZigZag[j]] = u;\n    }\n    var aasf = [\n      1.0,\n      1.387039845,\n      1.306562965,\n      1.175875602,\n      1.0,\n      0.785694958,\n      0.5411961,\n      0.275899379\n    ];\n    var k = 0;\n    for (var row = 0; row < 8; row++) {\n      for (var col = 0; col < 8; col++) {\n        fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        k++;\n      }\n    }\n  }\n\n  function computeHuffmanTbl(nrcodes, std_table) {\n    var codevalue = 0;\n    var pos_in_table = 0;\n    var HT = new Array();\n    for (var k = 1; k <= 16; k++) {\n      for (var j = 1; j <= nrcodes[k]; j++) {\n        HT[std_table[pos_in_table]] = [];\n        HT[std_table[pos_in_table]][0] = codevalue;\n        HT[std_table[pos_in_table]][1] = k;\n        pos_in_table++;\n        codevalue++;\n      }\n      codevalue *= 2;\n    }\n    return HT;\n  }\n\n  function initHuffmanTbl() {\n    YDC_HT = computeHuffmanTbl(\n      std_dc_luminance_nrcodes,\n      std_dc_luminance_values\n    );\n    UVDC_HT = computeHuffmanTbl(\n      std_dc_chrominance_nrcodes,\n      std_dc_chrominance_values\n    );\n    YAC_HT = computeHuffmanTbl(\n      std_ac_luminance_nrcodes,\n      std_ac_luminance_values\n    );\n    UVAC_HT = computeHuffmanTbl(\n      std_ac_chrominance_nrcodes,\n      std_ac_chrominance_values\n    );\n  }\n\n  function initCategoryNumber() {\n    var nrlower = 1;\n    var nrupper = 2;\n    for (var cat = 1; cat <= 15; cat++) {\n      //Positive numbers\n      for (var nr = nrlower; nr < nrupper; nr++) {\n        category[32767 + nr] = cat;\n        bitcode[32767 + nr] = [];\n        bitcode[32767 + nr][1] = cat;\n        bitcode[32767 + nr][0] = nr;\n      }\n      //Negative numbers\n      for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {\n        category[32767 + nrneg] = cat;\n        bitcode[32767 + nrneg] = [];\n        bitcode[32767 + nrneg][1] = cat;\n        bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;\n      }\n      nrlower <<= 1;\n      nrupper <<= 1;\n    }\n  }\n\n  function initRGBYUVTable() {\n    for (var i = 0; i < 256; i++) {\n      RGB_YUV_TABLE[i] = 19595 * i;\n      RGB_YUV_TABLE[(i + 256) >> 0] = 38470 * i;\n      RGB_YUV_TABLE[(i + 512) >> 0] = 7471 * i + 0x8000;\n      RGB_YUV_TABLE[(i + 768) >> 0] = -11059 * i;\n      RGB_YUV_TABLE[(i + 1024) >> 0] = -21709 * i;\n      RGB_YUV_TABLE[(i + 1280) >> 0] = 32768 * i + 0x807fff;\n      RGB_YUV_TABLE[(i + 1536) >> 0] = -27439 * i;\n      RGB_YUV_TABLE[(i + 1792) >> 0] = -5329 * i;\n    }\n  }\n\n  // IO functions\n  function writeBits(bs) {\n    var value = bs[0];\n    var posval = bs[1] - 1;\n    while (posval >= 0) {\n      if (value & (1 << posval)) {\n        bytenew |= 1 << bytepos;\n      }\n      posval--;\n      bytepos--;\n      if (bytepos < 0) {\n        if (bytenew == 0xff) {\n          writeByte(0xff);\n          writeByte(0);\n        } else {\n          writeByte(bytenew);\n        }\n        bytepos = 7;\n        bytenew = 0;\n      }\n    }\n  }\n\n  function writeByte(value) {\n    //byteout.push(clt[value]); // write char directly instead of converting later\n    byteout.push(value);\n  }\n\n  function writeWord(value) {\n    writeByte((value >> 8) & 0xff);\n    writeByte(value & 0xff);\n  }\n\n  // DCT & quantization core\n  function fDCTQuant(data, fdtbl) {\n    var d0, d1, d2, d3, d4, d5, d6, d7;\n    /* Pass 1: process rows. */\n    var dataOff = 0;\n    var i;\n    var I8 = 8;\n    var I64 = 64;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 1];\n      d2 = data[dataOff + 2];\n      d3 = data[dataOff + 3];\n      d4 = data[dataOff + 4];\n      d5 = data[dataOff + 5];\n      d6 = data[dataOff + 6];\n      d7 = data[dataOff + 7];\n\n      var tmp0 = d0 + d7;\n      var tmp7 = d0 - d7;\n      var tmp1 = d1 + d6;\n      var tmp6 = d1 - d6;\n      var tmp2 = d2 + d5;\n      var tmp5 = d2 - d5;\n      var tmp3 = d3 + d4;\n      var tmp4 = d3 - d4;\n\n      /* Even part */\n      var tmp10 = tmp0 + tmp3; /* phase 2 */\n      var tmp13 = tmp0 - tmp3;\n      var tmp11 = tmp1 + tmp2;\n      var tmp12 = tmp1 - tmp2;\n\n      data[dataOff] = tmp10 + tmp11; /* phase 3 */\n      data[dataOff + 4] = tmp10 - tmp11;\n\n      var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n      data[dataOff + 2] = tmp13 + z1; /* phase 5 */\n      data[dataOff + 6] = tmp13 - z1;\n\n      /* Odd part */\n      tmp10 = tmp4 + tmp5; /* phase 2 */\n      tmp11 = tmp5 + tmp6;\n      tmp12 = tmp6 + tmp7;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n      var z2 = 0.5411961 * tmp10 + z5; /* c2-c6 */\n      var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n      var z3 = tmp11 * 0.707106781; /* c4 */\n\n      var z11 = tmp7 + z3; /* phase 5 */\n      var z13 = tmp7 - z3;\n\n      data[dataOff + 5] = z13 + z2; /* phase 6 */\n      data[dataOff + 3] = z13 - z2;\n      data[dataOff + 1] = z11 + z4;\n      data[dataOff + 7] = z11 - z4;\n\n      dataOff += 8; /* advance pointer to next row */\n    }\n\n    /* Pass 2: process columns. */\n    dataOff = 0;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 8];\n      d2 = data[dataOff + 16];\n      d3 = data[dataOff + 24];\n      d4 = data[dataOff + 32];\n      d5 = data[dataOff + 40];\n      d6 = data[dataOff + 48];\n      d7 = data[dataOff + 56];\n\n      var tmp0p2 = d0 + d7;\n      var tmp7p2 = d0 - d7;\n      var tmp1p2 = d1 + d6;\n      var tmp6p2 = d1 - d6;\n      var tmp2p2 = d2 + d5;\n      var tmp5p2 = d2 - d5;\n      var tmp3p2 = d3 + d4;\n      var tmp4p2 = d3 - d4;\n\n      /* Even part */\n      var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n      var tmp13p2 = tmp0p2 - tmp3p2;\n      var tmp11p2 = tmp1p2 + tmp2p2;\n      var tmp12p2 = tmp1p2 - tmp2p2;\n\n      data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n      data[dataOff + 32] = tmp10p2 - tmp11p2;\n\n      var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n      data[dataOff + 16] = tmp13p2 + z1p2; /* phase 5 */\n      data[dataOff + 48] = tmp13p2 - z1p2;\n\n      /* Odd part */\n      tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n      tmp11p2 = tmp5p2 + tmp6p2;\n      tmp12p2 = tmp6p2 + tmp7p2;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n      var z2p2 = 0.5411961 * tmp10p2 + z5p2; /* c2-c6 */\n      var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n      var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\n      var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n      var z13p2 = tmp7p2 - z3p2;\n\n      data[dataOff + 40] = z13p2 + z2p2; /* phase 6 */\n      data[dataOff + 24] = z13p2 - z2p2;\n      data[dataOff + 8] = z11p2 + z4p2;\n      data[dataOff + 56] = z11p2 - z4p2;\n\n      dataOff++; /* advance pointer to next column */\n    }\n\n    // Quantize/descale the coefficients\n    var fDCTQuant;\n    for (i = 0; i < I64; ++i) {\n      // Apply the quantization and scaling factor & Round to nearest integer\n      fDCTQuant = data[i] * fdtbl[i];\n      outputfDCTQuant[i] =\n        fDCTQuant > 0.0 ? (fDCTQuant + 0.5) | 0 : (fDCTQuant - 0.5) | 0;\n      //outputfDCTQuant[i] = fround(fDCTQuant);\n    }\n    return outputfDCTQuant;\n  }\n\n  function writeAPP0() {\n    writeWord(0xffe0); // marker\n    writeWord(16); // length\n    writeByte(0x4a); // J\n    writeByte(0x46); // F\n    writeByte(0x49); // I\n    writeByte(0x46); // F\n    writeByte(0); // = \"JFIF\",'\\0'\n    writeByte(1); // versionhi\n    writeByte(1); // versionlo\n    writeByte(0); // xyunits\n    writeWord(1); // xdensity\n    writeWord(1); // ydensity\n    writeByte(0); // thumbnwidth\n    writeByte(0); // thumbnheight\n  }\n\n  function writeSOF0(width, height) {\n    writeWord(0xffc0); // marker\n    writeWord(17); // length, truecolor YUV JPG\n    writeByte(8); // precision\n    writeWord(height);\n    writeWord(width);\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0x11); // HVY\n    writeByte(0); // QTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HVU\n    writeByte(1); // QTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HVV\n    writeByte(1); // QTV\n  }\n\n  function writeDQT() {\n    writeWord(0xffdb); // marker\n    writeWord(132); // length\n    writeByte(0);\n    for (var i = 0; i < 64; i++) {\n      writeByte(YTable[i]);\n    }\n    writeByte(1);\n    for (var j = 0; j < 64; j++) {\n      writeByte(UVTable[j]);\n    }\n  }\n\n  function writeDHT() {\n    writeWord(0xffc4); // marker\n    writeWord(0x01a2); // length\n\n    writeByte(0); // HTYDCinfo\n    for (var i = 0; i < 16; i++) {\n      writeByte(std_dc_luminance_nrcodes[i + 1]);\n    }\n    for (var j = 0; j <= 11; j++) {\n      writeByte(std_dc_luminance_values[j]);\n    }\n\n    writeByte(0x10); // HTYACinfo\n    for (var k = 0; k < 16; k++) {\n      writeByte(std_ac_luminance_nrcodes[k + 1]);\n    }\n    for (var l = 0; l <= 161; l++) {\n      writeByte(std_ac_luminance_values[l]);\n    }\n\n    writeByte(1); // HTUDCinfo\n    for (var m = 0; m < 16; m++) {\n      writeByte(std_dc_chrominance_nrcodes[m + 1]);\n    }\n    for (var n = 0; n <= 11; n++) {\n      writeByte(std_dc_chrominance_values[n]);\n    }\n\n    writeByte(0x11); // HTUACinfo\n    for (var o = 0; o < 16; o++) {\n      writeByte(std_ac_chrominance_nrcodes[o + 1]);\n    }\n    for (var p = 0; p <= 161; p++) {\n      writeByte(std_ac_chrominance_values[p]);\n    }\n  }\n\n  function writeSOS() {\n    writeWord(0xffda); // marker\n    writeWord(12); // length\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0); // HTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HTV\n    writeByte(0); // Ss\n    writeByte(0x3f); // Se\n    writeByte(0); // Bf\n  }\n\n  function processDU(CDU, fdtbl, DC, HTDC, HTAC) {\n    var EOB = HTAC[0x00];\n    var M16zeroes = HTAC[0xf0];\n    var pos;\n    var I16 = 16;\n    var I63 = 63;\n    var I64 = 64;\n    var DU_DCT = fDCTQuant(CDU, fdtbl);\n    //ZigZag reorder\n    for (var j = 0; j < I64; ++j) {\n      DU[ZigZag[j]] = DU_DCT[j];\n    }\n    var Diff = DU[0] - DC;\n    DC = DU[0];\n    //Encode DC\n    if (Diff == 0) {\n      writeBits(HTDC[0]); // Diff might be 0\n    } else {\n      pos = 32767 + Diff;\n      writeBits(HTDC[category[pos]]);\n      writeBits(bitcode[pos]);\n    }\n    //Encode ACs\n    var end0pos = 63; // was const... which is crazy\n    while (end0pos > 0 && DU[end0pos] == 0) {\n      end0pos--;\n    }\n    //end0pos = first element in reverse order !=0\n    if (end0pos == 0) {\n      writeBits(EOB);\n      return DC;\n    }\n    var i = 1;\n    var lng;\n    while (i <= end0pos) {\n      var startpos = i;\n      while (DU[i] == 0 && i <= end0pos) {\n        ++i;\n      }\n      var nrzeroes = i - startpos;\n      if (nrzeroes >= I16) {\n        lng = nrzeroes >> 4;\n        for (var nrmarker = 1; nrmarker <= lng; ++nrmarker)\n          writeBits(M16zeroes);\n        nrzeroes = nrzeroes & 0xf;\n      }\n      pos = 32767 + DU[i];\n      writeBits(HTAC[(nrzeroes << 4) + category[pos]]);\n      writeBits(bitcode[pos]);\n      i++;\n    }\n    if (end0pos != I63) {\n      writeBits(EOB);\n    }\n    return DC;\n  }\n\n  function initCharLookupTable() {\n    var sfcc = String.fromCharCode;\n    for (var i = 0; i < 256; i++) {\n      ///// ACHTUNG // 255\n      clt[i] = sfcc(i);\n    }\n  }\n\n  this.encode = function(\n    image,\n    quality // image data object\n  ) {\n    if (quality) setQuality(quality);\n\n    // Initialize bit writer\n    byteout = new Array();\n    bytenew = 0;\n    bytepos = 7;\n\n    // Add JPEG headers\n    writeWord(0xffd8); // SOI\n    writeAPP0();\n    writeDQT();\n    writeSOF0(image.width, image.height);\n    writeDHT();\n    writeSOS();\n\n    // Encode 8x8 macroblocks\n    var DCY = 0;\n    var DCU = 0;\n    var DCV = 0;\n\n    bytenew = 0;\n    bytepos = 7;\n\n    this.encode.displayName = \"_encode_\";\n\n    var imageData = image.data;\n    var width = image.width;\n    var height = image.height;\n\n    var quadWidth = width * 4;\n\n    var x,\n      y = 0;\n    var r, g, b;\n    var start, p, col, row, pos;\n    while (y < height) {\n      x = 0;\n      while (x < quadWidth) {\n        start = quadWidth * y + x;\n        col = -1;\n        row = 0;\n\n        for (pos = 0; pos < 64; pos++) {\n          row = pos >> 3; // /8\n          col = (pos & 7) * 4; // %8\n          p = start + row * quadWidth + col;\n\n          if (y + row >= height) {\n            // padding bottom\n            p -= quadWidth * (y + 1 + row - height);\n          }\n\n          if (x + col >= quadWidth) {\n            // padding right\n            p -= x + col - quadWidth + 4;\n          }\n\n          r = imageData[p++];\n          g = imageData[p++];\n          b = imageData[p++];\n\n          /* // calculate YUV values dynamically\n\t\t\t\t\tYDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n\t\t\t\t\tUDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n\t\t\t\t\tVDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n\t\t\t\t\t*/\n\n          // use lookup table (slightly faster)\n          YDU[pos] =\n            ((RGB_YUV_TABLE[r] +\n              RGB_YUV_TABLE[(g + 256) >> 0] +\n              RGB_YUV_TABLE[(b + 512) >> 0]) >>\n              16) -\n            128;\n          UDU[pos] =\n            ((RGB_YUV_TABLE[(r + 768) >> 0] +\n              RGB_YUV_TABLE[(g + 1024) >> 0] +\n              RGB_YUV_TABLE[(b + 1280) >> 0]) >>\n              16) -\n            128;\n          VDU[pos] =\n            ((RGB_YUV_TABLE[(r + 1280) >> 0] +\n              RGB_YUV_TABLE[(g + 1536) >> 0] +\n              RGB_YUV_TABLE[(b + 1792) >> 0]) >>\n              16) -\n            128;\n        }\n\n        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n        x += 32;\n      }\n      y += 8;\n    }\n\n    ////////////////////////////////////////////////////////////////\n\n    // Do the bit alignment of the EOI marker\n    if (bytepos >= 0) {\n      var fillbits = [];\n      fillbits[1] = bytepos + 1;\n      fillbits[0] = (1 << (bytepos + 1)) - 1;\n      writeBits(fillbits);\n    }\n\n    writeWord(0xffd9); //EOI\n\n    return new Uint8Array(byteout);\n  };\n\n  function setQuality(quality) {\n    quality = Math.min(Math.max(quality, 1), 100);\n\n    if (currentQuality == quality) return; // don't recalc if unchanged\n\n    var sf =\n      quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);\n\n    initQuantTables(sf);\n    currentQuality = quality;\n    //console.log('Quality set to: '+quality +'%');\n  }\n\n  function init() {\n    quality = quality || 50;\n    // Create tables\n    initCharLookupTable();\n    initHuffmanTbl();\n    initCategoryNumber();\n    initRGBYUVTable();\n\n    setQuality(quality);\n  }\n  init();\n}\n\nexport { JPEGEncoder };\n","/**\n * @author shaozilee\n *\n * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp\n *\n */\n\nimport { console } from \"./console.js\";\n\nfunction BmpDecoder(buffer, is_with_alpha) {\n  this.pos = 0;\n  this.buffer = buffer;\n  this.datav = new DataView(buffer.buffer);\n  this.is_with_alpha = !!is_with_alpha;\n  this.bottom_up = true;\n  this.flag =\n    String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);\n  this.pos += 2;\n  if ([\"BM\", \"BA\", \"CI\", \"CP\", \"IC\", \"PT\"].indexOf(this.flag) === -1)\n    throw new Error(\"Invalid BMP File\");\n  this.parseHeader();\n  this.parseBGR();\n}\n\nBmpDecoder.prototype.parseHeader = function() {\n  this.fileSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.reserved = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.offset = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.headerSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.width = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.height = this.datav.getInt32(this.pos, true);\n  this.pos += 4;\n  this.planes = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.bitPP = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.compress = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.rawSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.hr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.vr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.colors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.importantColors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n\n  if (this.bitPP === 16 && this.is_with_alpha) {\n    this.bitPP = 15;\n  }\n  if (this.bitPP < 15) {\n    var len = this.colors === 0 ? 1 << this.bitPP : this.colors;\n    this.palette = new Array(len);\n    for (var i = 0; i < len; i++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var quad = this.datav.getUint8(this.pos++, true);\n      this.palette[i] = {\n        red: red,\n        green: green,\n        blue: blue,\n        quad: quad\n      };\n    }\n  }\n  if (this.height < 0) {\n    this.height *= -1;\n    this.bottom_up = false;\n  }\n};\n\nBmpDecoder.prototype.parseBGR = function() {\n  this.pos = this.offset;\n  try {\n    var bitn = \"bit\" + this.bitPP;\n    var len = this.width * this.height * 4;\n    this.data = new Uint8Array(len);\n\n    this[bitn]();\n  } catch (e) {\n    console.log(\"bit decode error:\" + e);\n  }\n};\n\nBmpDecoder.prototype.bit1 = function() {\n  var xlen = Math.ceil(this.width / 8);\n  var mode = xlen % 4;\n  var y;\n  for (y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 8 * 4;\n      for (var i = 0; i < 8; i++) {\n        if (x * 8 + i < this.width) {\n          var rgb = this.palette[(b >> (7 - i)) & 0x1];\n          this.data[location + i * 4] = rgb.blue;\n          this.data[location + i * 4 + 1] = rgb.green;\n          this.data[location + i * 4 + 2] = rgb.red;\n          this.data[location + i * 4 + 3] = 0xff;\n        } else {\n          break;\n        }\n      }\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit4 = function() {\n  var xlen = Math.ceil(this.width / 2);\n  var mode = xlen % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 2 * 4;\n\n      var before = b >> 4;\n      var after = b & 0x0f;\n\n      var rgb = this.palette[before];\n      this.data[location] = rgb.blue;\n      this.data[location + 1] = rgb.green;\n      this.data[location + 2] = rgb.red;\n      this.data[location + 3] = 0xff;\n\n      if (x * 2 + 1 >= this.width) break;\n\n      rgb = this.palette[after];\n      this.data[location + 4] = rgb.blue;\n      this.data[location + 4 + 1] = rgb.green;\n      this.data[location + 4 + 2] = rgb.red;\n      this.data[location + 4 + 3] = 0xff;\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit8 = function() {\n  var mode = this.width % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      if (b < this.palette.length) {\n        var rgb = this.palette[b];\n        this.data[location] = rgb.red;\n        this.data[location + 1] = rgb.green;\n        this.data[location + 2] = rgb.blue;\n        this.data[location + 3] = 0xff;\n      } else {\n        this.data[location] = 0xff;\n        this.data[location + 1] = 0xff;\n        this.data[location + 2] = 0xff;\n        this.data[location + 3] = 0xff;\n      }\n    }\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit15 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_5) / _1_5) * 255) | 0;\n      var red = ((((B >> 10) & _1_5) / _1_5) * 255) | 0;\n      var alpha = B >> 15 ? 0xff : 0x00;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit16 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  var _111111 = parseInt(\"111111\", 2),\n    _1_6 = _111111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var alpha = 0xff;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_6) / _1_6) * 255) | 0;\n      var red = (((B >> 11) / _1_5) * 255) | 0;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit24 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = 0xff;\n    }\n    //skip extra bytes\n    this.pos += this.width % 4;\n  }\n};\n\n/**\n * add 32bit decode func\n * @author soubok\n */\nBmpDecoder.prototype.bit32 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var alpha = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    //this.pos += (this.width % 4);\n  }\n};\n\nBmpDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { BmpDecoder };\n","function WebPDecoder(imageData) {\n  /** @license\n   * Copyright 2011 Google Inc.\n   *\n   * This code is licensed under the same terms as WebM:\n   *  Software License Agreement:  http://www.webmproject.org/license/software/\n   *  Additional IP Rights Grant:  http://www.webmproject.org/license/additional/\n   * -----------------------------------------------------------------------------\n   *\n   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n   * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n   * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n   * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n   *\n   * -----------------------------------------------------------------------------\n   *\n   * Copyright 2011-2017 Dominik Homberger\n   * Libwebp Javascript / libwebpjs - the libwebp implementation in javascript (v0.6.0)\n   *\n   * Author: Dominik Homberger (dominik.homberger@gmail.com)\n   */\n\n  var self = this;\n  var UpsampleRgbLinePair,\n    UpsampleBgrLinePair,\n    UpsampleRgbaLinePair,\n    UpsampleBgraLinePair,\n    UpsampleArgbLinePair,\n    UpsampleArgbLinePair,\n    UpsampleRgba4444LinePair,\n    UpsampleRgb565LinePair;\n\n  function x(F) {\n    if (!F) throw Error(\"assert :P\");\n  }\n  function fa(F, L, J) {\n    for (var H = 0; 4 > H; H++) if (F[L + H] != J.charCodeAt(H)) return !0;\n    return !1;\n  }\n  function I(F, L, J, H, Z) {\n    for (var O = 0; O < Z; O++) F[L + O] = J[H + O];\n  }\n  function M(F, L, J, H) {\n    for (var Z = 0; Z < H; Z++) F[L + Z] = J;\n  }\n  function V(F) {\n    return new Int32Array(F);\n  }\n  function wa(F, L) {\n    for (var J = [], H = 0; H < F; H++) J.push(new L());\n    return J;\n  }\n  function wb() {\n    function F(J, H, Z) {\n      for (var O = Z[H], L = 0; L < O; L++) {\n        J.push(Z.length > H + 1 ? [] : 0);\n        if (Z.length < H + 1) break;\n        F(J[L], H + 1, Z);\n      }\n    }\n    var L = [];\n    F(L, 0, [3, 11]);\n    return L;\n  }\n  function Ed(F, L) {\n    function J(H, O, F) {\n      for (var Z = F[O], ma = 0; ma < Z; ma++) {\n        H.push(F.length > O + 1 ? [] : new L());\n        if (F.length < O + 1) break;\n        J(H[ma], O + 1, F);\n      }\n    }\n    var H = [];\n    J(H, 0, F);\n    return H;\n  }\n  var _WebPDecoder = function() {\n    var self = this;\n    function F() {\n      V(55);\n    }\n    function L(a, b) {\n      for (var c = (1 << (b - 1)) >>> 0; a & c; ) c >>>= 1;\n      return c ? (a & (c - 1)) + c : a;\n    }\n    function J(a, b, c, d, e) {\n      x(!(d % c));\n      do (d -= c), (a[b + d] = e);\n      while (0 < d);\n    }\n    function H(a, b, c, d, e, f) {\n      var g = b,\n        h = 1 << c,\n        k,\n        l,\n        m = V(16),\n        n = V(16);\n      x(0 != e);\n      x(null != d);\n      x(null != a);\n      x(0 < c);\n      for (l = 0; l < e; ++l) {\n        if (15 < d[l]) return 0;\n        ++m[d[l]];\n      }\n      if (m[0] == e) return 0;\n      n[1] = 0;\n      for (k = 1; 15 > k; ++k) {\n        if (m[k] > 1 << k) return 0;\n        n[k + 1] = n[k] + m[k];\n      }\n      for (l = 0; l < e; ++l) (k = d[l]), 0 < d[l] && (f[n[k]++] = l);\n      if (1 == n[15])\n        return (d = new O()), (d.g = 0), (d.value = f[0]), J(a, g, 1, h, d), h;\n      var r = -1,\n        q = h - 1,\n        t = 0,\n        v = 1,\n        p = 1,\n        u,\n        w = 1 << c;\n      l = 0;\n      k = 1;\n      for (e = 2; k <= c; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k])\n          (d = new O()),\n            (d.g = k),\n            (d.value = f[l++]),\n            J(a, g + t, e, w, d),\n            (t = L(t, k));\n      }\n      k = c + 1;\n      for (e = 2; 15 >= k; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k]) {\n          d = new O();\n          if ((t & q) != r) {\n            g += w;\n            r = k;\n            for (u = 1 << (r - c); 15 > r; ) {\n              u -= m[r];\n              if (0 >= u) break;\n              ++r;\n              u <<= 1;\n            }\n            u = r - c;\n            w = 1 << u;\n            h += w;\n            r = t & q;\n            a[b + r].g = u + c;\n            a[b + r].value = g - b - r;\n          }\n          d.g = k - c;\n          d.value = f[l++];\n          J(a, g + (t >> c), e, w, d);\n          t = L(t, k);\n        }\n      }\n      return v != 2 * n[15] - 1 ? 0 : h;\n    }\n    function Z(a, b, c, d, e) {\n      x(2328 >= e);\n      if (512 >= e) var f = V(512);\n      else if (((f = V(e)), null == f)) return 0;\n      return H(a, b, c, d, e, f);\n    }\n    function O() {\n      this.value = this.g = 0;\n    }\n    function Fd() {\n      this.value = this.g = 0;\n    }\n    function Ub() {\n      this.G = wa(5, O);\n      this.H = V(5);\n      this.jc = this.Qb = this.qb = this.nd = 0;\n      this.pd = wa(xb, Fd);\n    }\n    function ma(a, b, c, d) {\n      x(null != a);\n      x(null != b);\n      x(2147483648 > d);\n      a.Ca = 254;\n      a.I = 0;\n      a.b = -8;\n      a.Ka = 0;\n      a.oa = b;\n      a.pa = c;\n      a.Jd = b;\n      a.Yc = c + d;\n      a.Zc = 4 <= d ? c + d - 4 + 1 : c;\n      Qa(a);\n    }\n    function na(a, b) {\n      for (var c = 0; 0 < b--; ) c |= K(a, 128) << b;\n      return c;\n    }\n    function ca(a, b) {\n      var c = na(a, b);\n      return G(a) ? -c : c;\n    }\n    function cb(a, b, c, d) {\n      var e,\n        f = 0;\n      x(null != a);\n      x(null != b);\n      x(4294967288 > d);\n      a.Sb = d;\n      a.Ra = 0;\n      a.u = 0;\n      a.h = 0;\n      4 < d && (d = 4);\n      for (e = 0; e < d; ++e) f += b[c + e] << (8 * e);\n      a.Ra = f;\n      a.bb = d;\n      a.oa = b;\n      a.pa = c;\n    }\n    function Vb(a) {\n      for (; 8 <= a.u && a.bb < a.Sb; )\n        (a.Ra >>>= 8),\n          (a.Ra += (a.oa[a.pa + a.bb] << (ob - 8)) >>> 0),\n          ++a.bb,\n          (a.u -= 8);\n      db(a) && ((a.h = 1), (a.u = 0));\n    }\n    function D(a, b) {\n      x(0 <= b);\n      if (!a.h && b <= Gd) {\n        var c = pb(a) & Hd[b];\n        a.u += b;\n        Vb(a);\n        return c;\n      }\n      a.h = 1;\n      return (a.u = 0);\n    }\n    function Wb() {\n      this.b = this.Ca = this.I = 0;\n      this.oa = [];\n      this.pa = 0;\n      this.Jd = [];\n      this.Yc = 0;\n      this.Zc = [];\n      this.Ka = 0;\n    }\n    function Ra() {\n      this.Ra = 0;\n      this.oa = [];\n      this.h = this.u = this.bb = this.Sb = this.pa = 0;\n    }\n    function pb(a) {\n      return (a.Ra >>> (a.u & (ob - 1))) >>> 0;\n    }\n    function db(a) {\n      x(a.bb <= a.Sb);\n      return a.h || (a.bb == a.Sb && a.u > ob);\n    }\n    function qb(a, b) {\n      a.u = b;\n      a.h = db(a);\n    }\n    function Sa(a) {\n      a.u >= Xb && (x(a.u >= Xb), Vb(a));\n    }\n    function Qa(a) {\n      x(null != a && null != a.oa);\n      a.pa < a.Zc\n        ? ((a.I = (a.oa[a.pa++] | (a.I << 8)) >>> 0), (a.b += 8))\n        : (x(null != a && null != a.oa),\n          a.pa < a.Yc\n            ? ((a.b += 8), (a.I = a.oa[a.pa++] | (a.I << 8)))\n            : a.Ka\n            ? (a.b = 0)\n            : ((a.I <<= 8), (a.b += 8), (a.Ka = 1)));\n    }\n    function G(a) {\n      return na(a, 1);\n    }\n    function K(a, b) {\n      var c = a.Ca;\n      0 > a.b && Qa(a);\n      var d = a.b,\n        e = (c * b) >>> 8,\n        f = (a.I >>> d > e) + 0;\n      f ? ((c -= e), (a.I -= ((e + 1) << d) >>> 0)) : (c = e + 1);\n      d = c;\n      for (e = 0; 256 <= d; ) (e += 8), (d >>= 8);\n      d = 7 ^ (e + Id[d]);\n      a.b -= d;\n      a.Ca = (c << d) - 1;\n      return f;\n    }\n    function ra(a, b, c) {\n      a[b + 0] = (c >> 24) & 255;\n      a[b + 1] = (c >> 16) & 255;\n      a[b + 2] = (c >> 8) & 255;\n      a[b + 3] = (c >> 0) & 255;\n    }\n    function Ta(a, b) {\n      return (a[b + 0] << 0) | (a[b + 1] << 8);\n    }\n    function Yb(a, b) {\n      return Ta(a, b) | (a[b + 2] << 16);\n    }\n    function Ha(a, b) {\n      return Ta(a, b) | (Ta(a, b + 2) << 16);\n    }\n    function Zb(a, b) {\n      var c = 1 << b;\n      x(null != a);\n      x(0 < b);\n      a.X = V(c);\n      if (null == a.X) return 0;\n      a.Mb = 32 - b;\n      a.Xa = b;\n      return 1;\n    }\n    function $b(a, b) {\n      x(null != a);\n      x(null != b);\n      x(a.Xa == b.Xa);\n      I(b.X, 0, a.X, 0, 1 << b.Xa);\n    }\n    function ac() {\n      this.X = [];\n      this.Xa = this.Mb = 0;\n    }\n    function bc(a, b, c, d) {\n      x(null != c);\n      x(null != d);\n      var e = c[0],\n        f = d[0];\n      0 == e && (e = (a * f + b / 2) / b);\n      0 == f && (f = (b * e + a / 2) / a);\n      if (0 >= e || 0 >= f) return 0;\n      c[0] = e;\n      d[0] = f;\n      return 1;\n    }\n    function xa(a, b) {\n      return (a + (1 << b) - 1) >>> b;\n    }\n    function yb(a, b) {\n      return (\n        (((((a & 4278255360) + (b & 4278255360)) >>> 0) & 4278255360) +\n          ((((a & 16711935) + (b & 16711935)) >>> 0) & 16711935)) >>>\n        0\n      );\n    }\n    function X(a, b) {\n      self[b] = function(b, d, e, f, g, h, k) {\n        var c;\n        for (c = 0; c < g; ++c) {\n          var m = self[a](h[k + c - 1], e, f + c);\n          h[k + c] = yb(b[d + c], m);\n        }\n      };\n    }\n    function Jd() {\n      this.ud = this.hd = this.jd = 0;\n    }\n    function aa(a, b) {\n      return ((((a ^ b) & 4278124286) >>> 1) + (a & b)) >>> 0;\n    }\n    function sa(a) {\n      if (0 <= a && 256 > a) return a;\n      if (0 > a) return 0;\n      if (255 < a) return 255;\n    }\n    function eb(a, b) {\n      return sa(a + ((a - b + 0.5) >> 1));\n    }\n    function Ia(a, b, c) {\n      return Math.abs(b - c) - Math.abs(a - c);\n    }\n    function cc(a, b, c, d, e, f, g) {\n      d = f[g - 1];\n      for (c = 0; c < e; ++c) f[g + c] = d = yb(a[b + c], d);\n    }\n    function Kd(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < c; ++f) {\n        var g = a[b + f],\n          h = (g >> 8) & 255,\n          k = g & 16711935,\n          k = k + ((h << 16) + h),\n          k = k & 16711935;\n        d[e + f] = ((g & 4278255360) + k) >>> 0;\n      }\n    }\n    function dc(a, b) {\n      b.jd = (a >> 0) & 255;\n      b.hd = (a >> 8) & 255;\n      b.ud = (a >> 16) & 255;\n    }\n    function Ld(a, b, c, d, e, f) {\n      var g;\n      for (g = 0; g < d; ++g) {\n        var h = b[c + g],\n          k = h >>> 8,\n          l = h >>> 16,\n          m = h,\n          l = l + ((((a.jd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          l = l & 255,\n          m = m + ((((a.hd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          m = m + ((((a.ud << 24) >> 24) * ((l << 24) >> 24)) >>> 5),\n          m = m & 255;\n        e[f + g] = (h & 4278255360) + (l << 16) + m;\n      }\n    }\n    function ec(a, b, c, d, e) {\n      self[b] = function(a, b, c, k, l, m, n, r, q) {\n        for (k = n; k < r; ++k)\n          for (n = 0; n < q; ++n) l[m++] = e(c[d(a[b++])]);\n      };\n      self[a] = function(a, b, h, k, l, m, n) {\n        var f = 8 >> a.b,\n          g = a.Ea,\n          t = a.K[0],\n          v = a.w;\n        if (8 > f)\n          for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {\n            var p = 0,\n              u;\n            for (u = 0; u < g; ++u)\n              u & a || (p = d(k[l++])), (m[n++] = e(t[p & v])), (p >>= f);\n          }\n        else self[\"VP8LMapColor\" + c](k, l, t, v, m, n, b, h, g);\n      };\n    }\n    function Md(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n      }\n    }\n    function Nd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 24) & 255;\n      }\n    }\n    function Od(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 240) | ((f >> 12) & 15),\n          f = ((f >> 0) & 240) | ((f >> 28) & 15);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Pd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 248) | ((f >> 13) & 7),\n          f = ((f >> 5) & 224) | ((f >> 3) & 31);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Qd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 16) & 255;\n      }\n    }\n    function fb(a, b, c, d, e, f) {\n      if (0 == f)\n        for (c = b + c; b < c; )\n          (f = a[b++]),\n            ra(\n              d,\n              ((f[0] >> 24) |\n                ((f[1] >> 8) & 65280) |\n                ((f[2] << 8) & 16711680) |\n                (f[3] << 24)) >>>\n                0\n            ),\n            (e += 32);\n      else I(d, e, a, b, c);\n    }\n    function gb(a, b) {\n      self[b][0] = self[a + \"0\"];\n      self[b][1] = self[a + \"1\"];\n      self[b][2] = self[a + \"2\"];\n      self[b][3] = self[a + \"3\"];\n      self[b][4] = self[a + \"4\"];\n      self[b][5] = self[a + \"5\"];\n      self[b][6] = self[a + \"6\"];\n      self[b][7] = self[a + \"7\"];\n      self[b][8] = self[a + \"8\"];\n      self[b][9] = self[a + \"9\"];\n      self[b][10] = self[a + \"10\"];\n      self[b][11] = self[a + \"11\"];\n      self[b][12] = self[a + \"12\"];\n      self[b][13] = self[a + \"13\"];\n      self[b][14] = self[a + \"0\"];\n      self[b][15] = self[a + \"0\"];\n    }\n    function hb(a) {\n      return a == zb || a == Ab || a == Ja || a == Bb;\n    }\n    function Rd() {\n      this.eb = [];\n      this.size = this.A = this.fb = 0;\n    }\n    function Sd() {\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.F = [];\n      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;\n    }\n    function Cb() {\n      this.Rd = this.height = this.width = this.S = 0;\n      this.f = {};\n      this.f.RGBA = new Rd();\n      this.f.kb = new Sd();\n      this.sd = null;\n    }\n    function Td() {\n      this.width = [0];\n      this.height = [0];\n      this.Pd = [0];\n      this.Qd = [0];\n      this.format = [0];\n    }\n    function Ud() {\n      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;\n    }\n    function Vd(a) {\n      alert(\"todo:WebPSamplerProcessPlane\");\n      return a.T;\n    }\n    function Wd(a, b) {\n      var c = a.T,\n        d = b.ba.f.RGBA,\n        e = d.eb,\n        f = d.fb + a.ka * d.A,\n        g = P[b.ba.S],\n        h = a.y,\n        k = a.O,\n        l = a.f,\n        m = a.N,\n        n = a.ea,\n        r = a.W,\n        q = b.cc,\n        t = b.dc,\n        v = b.Mc,\n        p = b.Nc,\n        u = a.ka,\n        w = a.ka + a.T,\n        y = a.U,\n        A = (y + 1) >> 1;\n      0 == u\n        ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y)\n        : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y),\n          ++c);\n      for (; u + 2 < w; u += 2)\n        (q = l),\n          (t = m),\n          (v = n),\n          (p = r),\n          (m += a.Rc),\n          (r += a.Rc),\n          (f += 2 * d.A),\n          (k += 2 * a.fa),\n          g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);\n      k += a.fa;\n      a.j + w < a.o\n        ? (I(b.ec, b.fc, h, k, y),\n          I(b.cc, b.dc, l, m, A),\n          I(b.Mc, b.Nc, n, r, A),\n          c--)\n        : w & 1 ||\n          g(\n            h,\n            k,\n            null,\n            null,\n            l,\n            m,\n            n,\n            r,\n            l,\n            m,\n            n,\n            r,\n            e,\n            f + d.A,\n            null,\n            null,\n            y\n          );\n      return c;\n    }\n    function Xd(a, b, c) {\n      var d = a.F,\n        e = [a.J];\n      if (null != d) {\n        var f = a.U,\n          g = b.ba.S,\n          h = g == ya || g == Ja;\n        b = b.ba.f.RGBA;\n        var k = [0],\n          l = a.ka;\n        k[0] = a.T;\n        a.Kb &&\n          (0 == l ? --k[0] : (--l, (e[0] -= a.width)),\n          a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));\n        var m = b.eb,\n          l = b.fb + l * b.A;\n        a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);\n        x(c == k);\n        a && hb(g) && za(m, l, h, f, k, b.A);\n      }\n      return 0;\n    }\n    function gc(a) {\n      var b = a.ma,\n        c = b.ba.S,\n        d = 11 > c,\n        e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);\n      b.memory = null;\n      b.Ib = null;\n      b.Jb = null;\n      b.Nd = null;\n      if (!hc(b.Oa, a, e ? 11 : 12)) return 0;\n      e && hb(c) && ic();\n      if (a.da) alert(\"todo:use_scaling\");\n      else {\n        if (d) {\n          if (((b.Ib = Vd), a.Kb)) {\n            c = (a.U + 1) >> 1;\n            b.memory = V(a.U + 2 * c);\n            if (null == b.memory) return 0;\n            b.ec = b.memory;\n            b.fc = 0;\n            b.cc = b.ec;\n            b.dc = b.fc + a.U;\n            b.Mc = b.cc;\n            b.Nc = b.dc + c;\n            b.Ib = Wd;\n            ic();\n          }\n        } else alert(\"todo:EmitYUV\");\n        e && ((b.Jb = Xd), d && Aa());\n      }\n      if (d && !jc) {\n        for (a = 0; 256 > a; ++a)\n          (Yd[a] = (89858 * (a - 128) + Ba) >> Wa),\n            (Zd[a] = -22014 * (a - 128) + Ba),\n            ($d[a] = -45773 * (a - 128)),\n            (ae[a] = (113618 * (a - 128) + Ba) >> Wa);\n        for (a = ta; a < Eb; ++a)\n          (b = (76283 * (a - 16) + Ba) >> Wa),\n            (be[a - ta] = ga(b, 255)),\n            (ce[a - ta] = ga((b + 8) >> 4, 15));\n        jc = 1;\n      }\n      return 1;\n    }\n    function kc(a) {\n      var b = a.ma,\n        c = a.U,\n        d = a.T;\n      x(!(a.ka & 1));\n      if (0 >= c || 0 >= d) return 0;\n      c = b.Ib(a, b);\n      null != b.Jb && b.Jb(a, b, c);\n      b.Dc += c;\n      return 1;\n    }\n    function lc(a) {\n      a.ma.memory = null;\n    }\n    function mc(a, b, c, d) {\n      if (47 != D(a, 8)) return 0;\n      b[0] = D(a, 14) + 1;\n      c[0] = D(a, 14) + 1;\n      d[0] = D(a, 1);\n      return 0 != D(a, 3) ? 0 : !a.h;\n    }\n    function ib(a, b) {\n      if (4 > a) return a + 1;\n      var c = (a - 2) >> 1;\n      return ((2 + (a & 1)) << c) + D(b, c) + 1;\n    }\n    function nc(a, b) {\n      if (120 < b) return b - 120;\n      var c = de[b - 1],\n        c = (c >> 4) * a + (8 - (c & 15));\n      return 1 <= c ? c : 1;\n    }\n    function ua(a, b, c) {\n      var d = pb(c);\n      b += d & 255;\n      var e = a[b].g - 8;\n      0 < e &&\n        (qb(c, c.u + 8),\n        (d = pb(c)),\n        (b += a[b].value),\n        (b += d & ((1 << e) - 1)));\n      qb(c, c.u + a[b].g);\n      return a[b].value;\n    }\n    function ub(a, b, c) {\n      c.g += a.g;\n      c.value += (a.value << b) >>> 0;\n      x(8 >= c.g);\n      return a.g;\n    }\n    function ha(a, b, c) {\n      var d = a.xc;\n      b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];\n      x(b < a.Wb);\n      return a.Ya[b];\n    }\n    function oc(a, b, c, d) {\n      var e = a.ab,\n        f = a.c * b,\n        g = a.C;\n      b = g + b;\n      var h = c,\n        k = d;\n      d = a.Ta;\n      for (c = a.Ua; 0 < e--; ) {\n        var l = a.gc[e],\n          m = g,\n          n = b,\n          r = h,\n          q = k,\n          k = d,\n          h = c,\n          t = l.Ea;\n        x(m < n);\n        x(n <= l.nc);\n        switch (l.hc) {\n          case 2:\n            pc(r, q, (n - m) * t, k, h);\n            break;\n          case 0:\n            var v = l,\n              p = m,\n              u = n,\n              w = k,\n              y = h,\n              A = v.Ea;\n            0 == p &&\n              (ee(r, q, null, null, 1, w, y),\n              cc(r, q + 1, 0, 0, A - 1, w, y + 1),\n              (q += A),\n              (y += A),\n              ++p);\n            for (\n              var E = 1 << v.b,\n                B = E - 1,\n                C = xa(A, v.b),\n                N = v.K,\n                v = v.w + (p >> v.b) * C;\n              p < u;\n\n            ) {\n              var z = N,\n                Q = v,\n                S = 1;\n              for (fe(r, q, w, y - A, 1, w, y); S < A; ) {\n                var K = qc[(z[Q++] >> 8) & 15],\n                  D = (S & ~B) + E;\n                D > A && (D = A);\n                K(r, q + +S, w, y + S - A, D - S, w, y + S);\n                S = D;\n              }\n              q += A;\n              y += A;\n              ++p;\n              p & B || (v += C);\n            }\n            n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);\n            break;\n          case 1:\n            t = r;\n            u = q;\n            r = l.Ea;\n            q = 1 << l.b;\n            w = q - 1;\n            y = r & ~w;\n            A = r - y;\n            p = xa(r, l.b);\n            E = l.K;\n            for (l = l.w + (m >> l.b) * p; m < n; ) {\n              B = E;\n              C = l;\n              N = new Jd();\n              v = u + y;\n              for (z = u + r; u < v; )\n                dc(B[C++], N), Fb(N, t, u, q, k, h), (u += q), (h += q);\n              u < z &&\n                (dc(B[C++], N), Fb(N, t, u, A, k, h), (u += A), (h += A));\n              ++m;\n              m & w || (l += p);\n            }\n            break;\n          case 3:\n            if (r == k && q == h && 0 < l.b) {\n              y = (n - m) * xa(l.Ea, l.b);\n              t = h + (n - m) * t - y;\n              u = k;\n              r = t;\n              q = k;\n              w = h;\n              A = y;\n              p = [];\n              for (y = A - 1; 0 <= y; --y) p[y] = q[w + y];\n              for (y = A - 1; 0 <= y; --y) u[r + y] = p[y];\n              rc(l, m, n, k, t, k, h);\n            } else rc(l, m, n, r, q, k, h);\n        }\n        h = d;\n        k = c;\n      }\n      k != c && I(d, c, h, k, f);\n    }\n    function ge(a, b) {\n      var c = a.V,\n        d = a.Ba + a.c * a.C,\n        e = b - a.C;\n      x(b <= a.l.o);\n      x(16 >= e);\n      if (0 < e) {\n        var f = a.l,\n          g = a.Ta,\n          h = a.Ua,\n          k = f.width;\n        oc(a, e, c, d);\n        h = [h];\n        c = a.C;\n        d = b;\n        e = h;\n        x(c < d);\n        x(f.v < f.va);\n        d > f.o && (d = f.o);\n        if (c < f.j) {\n          var l = f.j - c,\n            c = f.j;\n          e[0] += l * k;\n        }\n        c >= d\n          ? (c = 0)\n          : ((e[0] += 4 * f.v),\n            (f.ka = c - f.j),\n            (f.U = f.va - f.v),\n            (f.T = d - c),\n            (c = 1));\n        if (c) {\n          h = h[0];\n          c = a.ca;\n          if (11 > c.S) {\n            for (\n              var m = c.f.RGBA,\n                d = c.S,\n                e = f.U,\n                f = f.T,\n                l = m.eb,\n                n = m.A,\n                r = f,\n                m = m.fb + a.Ma * m.A;\n              0 < r--;\n\n            ) {\n              var q = g,\n                t = h,\n                v = e,\n                p = l,\n                u = m;\n              switch (d) {\n                case Ca:\n                  sc(q, t, v, p, u);\n                  break;\n                case Ua:\n                  Gb(q, t, v, p, u);\n                  break;\n                case zb:\n                  Gb(q, t, v, p, u);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case tc:\n                  uc(q, t, v, p, u);\n                  break;\n                case Va:\n                  fb(q, t, v, p, u, 1);\n                  break;\n                case Ab:\n                  fb(q, t, v, p, u, 1);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case ya:\n                  fb(q, t, v, p, u, 0);\n                  break;\n                case Ja:\n                  fb(q, t, v, p, u, 0);\n                  za(p, u, 1, v, 1, 0);\n                  break;\n                case Db:\n                  Hb(q, t, v, p, u);\n                  break;\n                case Bb:\n                  Hb(q, t, v, p, u);\n                  vc(p, u, v, 1, 0);\n                  break;\n                case wc:\n                  xc(q, t, v, p, u);\n                  break;\n                default:\n                  x(0);\n              }\n              h += k;\n              m += n;\n            }\n            a.Ma += f;\n          } else alert(\"todo:EmitRescaledRowsYUVA\");\n          x(a.Ma <= c.height);\n        }\n      }\n      a.C = b;\n      x(a.C <= a.i);\n    }\n    function yc(a) {\n      var b;\n      if (0 < a.ua) return 0;\n      for (b = 0; b < a.Wb; ++b) {\n        var c = a.Ya[b].G,\n          d = a.Ya[b].H;\n        if (\n          0 < c[1][d[1] + 0].g ||\n          0 < c[2][d[2] + 0].g ||\n          0 < c[3][d[3] + 0].g\n        )\n          return 0;\n      }\n      return 1;\n    }\n    function zc(a, b, c, d, e, f) {\n      if (0 != a.Z) {\n        var g = a.qd,\n          h = a.rd;\n        for (x(null != ia[a.Z]); b < c; ++b)\n          ia[a.Z](g, h, d, e, d, e, f), (g = d), (h = e), (e += f);\n        a.qd = g;\n        a.rd = h;\n      }\n    }\n    function Ib(a, b) {\n      var c = a.l.ma,\n        d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,\n        d = a.C < d ? d : a.C;\n      x(b <= a.l.o);\n      if (b > d) {\n        var e = a.l.width,\n          f = c.ca,\n          g = c.tb + e * d,\n          h = a.V,\n          k = a.Ba + a.c * d,\n          l = a.gc;\n        x(1 == a.ab);\n        x(3 == l[0].hc);\n        he(l[0], d, b, h, k, f, g);\n        zc(c, d, b, f, g, e);\n      }\n      a.C = a.Ma = b;\n    }\n    function Jb(a, b, c, d, e, f, g) {\n      var h = a.$ / d,\n        k = a.$ % d,\n        l = a.m,\n        m = a.s,\n        n = c + a.$,\n        r = n;\n      e = c + d * e;\n      var q = c + d * f,\n        t = 280 + m.ua,\n        v = a.Pb ? h : 16777216,\n        p = 0 < m.ua ? m.Wa : null,\n        u = m.wc,\n        w = n < q ? ha(m, k, h) : null;\n      x(a.C < f);\n      x(q <= e);\n      var y = !1;\n      a: for (;;) {\n        for (; y || n < q; ) {\n          var A = 0;\n          if (h >= v) {\n            var v = a,\n              E = n - c;\n            x(v.Pb);\n            v.wd = v.m;\n            v.xd = E;\n            0 < v.s.ua && $b(v.s.Wa, v.s.vb);\n            v = h + ie;\n          }\n          k & u || (w = ha(m, k, h));\n          x(null != w);\n          w.Qb && ((b[n] = w.qb), (y = !0));\n          if (!y)\n            if ((Sa(l), w.jc)) {\n              var A = l,\n                E = b,\n                B = n,\n                C = w.pd[pb(A) & (xb - 1)];\n              x(w.jc);\n              256 > C.g\n                ? (qb(A, A.u + C.g), (E[B] = C.value), (A = 0))\n                : (qb(A, A.u + C.g - 256), x(256 <= C.value), (A = C.value));\n              0 == A && (y = !0);\n            } else A = ua(w.G[0], w.H[0], l);\n          if (l.h) break;\n          if (y || 256 > A) {\n            if (!y)\n              if (w.nd) b[n] = (w.qb | (A << 8)) >>> 0;\n              else {\n                Sa(l);\n                y = ua(w.G[1], w.H[1], l);\n                Sa(l);\n                E = ua(w.G[2], w.H[2], l);\n                B = ua(w.G[3], w.H[3], l);\n                if (l.h) break;\n                b[n] = ((B << 24) | (y << 16) | (A << 8) | E) >>> 0;\n              }\n            y = !1;\n            ++n;\n            ++k;\n            if (\n              k >= d &&\n              ((k = 0),\n              ++h,\n              null != g && h <= f && !(h % 16) && g(a, h),\n              null != p)\n            )\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (280 > A) {\n            A = ib(A - 256, l);\n            E = ua(w.G[4], w.H[4], l);\n            Sa(l);\n            E = ib(E, l);\n            E = nc(d, E);\n            if (l.h) break;\n            if (n - c < E || e - n < A) break a;\n            else for (B = 0; B < A; ++B) b[n + B] = b[n + B - E];\n            n += A;\n            for (k += A; k >= d; )\n              (k -= d), ++h, null != g && h <= f && !(h % 16) && g(a, h);\n            x(n <= e);\n            k & u && (w = ha(m, k, h));\n            if (null != p)\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (A < t) {\n            y = A - 280;\n            for (x(null != p); r < n; )\n              (A = b[r++]), (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n            A = n;\n            E = p;\n            x(!(y >>> E.Xa));\n            b[A] = E.X[y];\n            y = !0;\n          } else break a;\n          y || x(l.h == db(l));\n        }\n        if (a.Pb && l.h && n < e)\n          x(a.m.h),\n            (a.a = 5),\n            (a.m = a.wd),\n            (a.$ = a.xd),\n            0 < a.s.ua && $b(a.s.vb, a.s.Wa);\n        else if (l.h) break a;\n        else null != g && g(a, h > f ? f : h), (a.a = 0), (a.$ = n - c);\n        return 1;\n      }\n      a.a = 3;\n      return 0;\n    }\n    function Ac(a) {\n      x(null != a);\n      a.vc = null;\n      a.yc = null;\n      a.Ya = null;\n      var b = a.Wa;\n      null != b && (b.X = null);\n      a.vb = null;\n      x(null != a);\n    }\n    function Bc() {\n      var a = new je();\n      if (null == a) return null;\n      a.a = 0;\n      a.xb = Cc;\n      gb(\"Predictor\", \"VP8LPredictors\");\n      gb(\"Predictor\", \"VP8LPredictors_C\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd_C\");\n      pc = Kd;\n      Fb = Ld;\n      sc = Md;\n      Gb = Nd;\n      Hb = Od;\n      xc = Pd;\n      uc = Qd;\n      self.VP8LMapColor32b = ke;\n      self.VP8LMapColor8b = le;\n      return a;\n    }\n    function rb(a, b, c, d, e) {\n      var f = 1,\n        g = [a],\n        h = [b],\n        k = d.m,\n        l = d.s,\n        m = null,\n        n = 0;\n      a: for (;;) {\n        if (c)\n          for (; f && D(k, 1); ) {\n            var r = g,\n              q = h,\n              t = d,\n              v = 1,\n              p = t.m,\n              u = t.gc[t.ab],\n              w = D(p, 2);\n            if (t.Oc & (1 << w)) f = 0;\n            else {\n              t.Oc |= 1 << w;\n              u.hc = w;\n              u.Ea = r[0];\n              u.nc = q[0];\n              u.K = [null];\n              ++t.ab;\n              x(4 >= t.ab);\n              switch (w) {\n                case 0:\n                case 1:\n                  u.b = D(p, 3) + 2;\n                  v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);\n                  u.K = u.K[0];\n                  break;\n                case 3:\n                  var y = D(p, 8) + 1,\n                    A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;\n                  r[0] = xa(u.Ea, A);\n                  u.b = A;\n                  var v = rb(y, 1, 0, t, u.K),\n                    E;\n                  if ((E = v)) {\n                    var B,\n                      C = y,\n                      N = u,\n                      z = 1 << (8 >> N.b),\n                      Q = V(z);\n                    if (null == Q) E = 0;\n                    else {\n                      var S = N.K[0],\n                        K = N.w;\n                      Q[0] = N.K[0][0];\n                      for (B = 1; B < 1 * C; ++B) Q[B] = yb(S[K + B], Q[B - 1]);\n                      for (; B < 4 * z; ++B) Q[B] = 0;\n                      N.K[0] = null;\n                      N.K[0] = Q;\n                      E = 1;\n                    }\n                  }\n                  v = E;\n                  break;\n                case 2:\n                  break;\n                default:\n                  x(0);\n              }\n              f = v;\n            }\n          }\n        g = g[0];\n        h = h[0];\n        if (f && D(k, 1) && ((n = D(k, 4)), (f = 1 <= n && 11 >= n), !f)) {\n          d.a = 3;\n          break a;\n        }\n        var H;\n        if ((H = f))\n          b: {\n            var F = d,\n              G = g,\n              L = h,\n              J = n,\n              T = c,\n              Da,\n              ba,\n              X = F.m,\n              R = F.s,\n              P = [null],\n              U,\n              W = 1,\n              aa = 0,\n              na = me[J];\n            c: for (;;) {\n              if (T && D(X, 1)) {\n                var ca = D(X, 3) + 2,\n                  ga = xa(G, ca),\n                  ka = xa(L, ca),\n                  qa = ga * ka;\n                if (!rb(ga, ka, 0, F, P)) break c;\n                P = P[0];\n                R.xc = ca;\n                for (Da = 0; Da < qa; ++Da) {\n                  var ia = (P[Da] >> 8) & 65535;\n                  P[Da] = ia;\n                  ia >= W && (W = ia + 1);\n                }\n              }\n              if (X.h) break c;\n              for (ba = 0; 5 > ba; ++ba) {\n                var Y = Dc[ba];\n                !ba && 0 < J && (Y += 1 << J);\n                aa < Y && (aa = Y);\n              }\n              var ma = wa(W * na, O);\n              var ua = W,\n                va = wa(ua, Ub);\n              if (null == va) var la = null;\n              else x(65536 >= ua), (la = va);\n              var ha = V(aa);\n              if (null == la || null == ha || null == ma) {\n                F.a = 1;\n                break c;\n              }\n              var pa = ma;\n              for (Da = U = 0; Da < W; ++Da) {\n                var ja = la[Da],\n                  da = ja.G,\n                  ea = ja.H,\n                  Fa = 0,\n                  ra = 1,\n                  Ha = 0;\n                for (ba = 0; 5 > ba; ++ba) {\n                  Y = Dc[ba];\n                  da[ba] = pa;\n                  ea[ba] = U;\n                  !ba && 0 < J && (Y += 1 << J);\n                  d: {\n                    var sa,\n                      za = Y,\n                      ta = F,\n                      oa = ha,\n                      db = pa,\n                      eb = U,\n                      Ia = 0,\n                      Ka = ta.m,\n                      fb = D(Ka, 1);\n                    M(oa, 0, 0, za);\n                    if (fb) {\n                      var gb = D(Ka, 1) + 1,\n                        hb = D(Ka, 1),\n                        Ja = D(Ka, 0 == hb ? 1 : 8);\n                      oa[Ja] = 1;\n                      2 == gb && ((Ja = D(Ka, 8)), (oa[Ja] = 1));\n                      var ya = 1;\n                    } else {\n                      var Ua = V(19),\n                        Va = D(Ka, 4) + 4;\n                      if (19 < Va) {\n                        ta.a = 3;\n                        var Aa = 0;\n                        break d;\n                      }\n                      for (sa = 0; sa < Va; ++sa) Ua[ne[sa]] = D(Ka, 3);\n                      var Ba = void 0,\n                        sb = void 0,\n                        Wa = ta,\n                        ib = Ua,\n                        Ca = za,\n                        Xa = oa,\n                        Oa = 0,\n                        La = Wa.m,\n                        Ya = 8,\n                        Za = wa(128, O);\n                      e: for (;;) {\n                        if (!Z(Za, 0, 7, ib, 19)) break e;\n                        if (D(La, 1)) {\n                          var kb = 2 + 2 * D(La, 3),\n                            Ba = 2 + D(La, kb);\n                          if (Ba > Ca) break e;\n                        } else Ba = Ca;\n                        for (sb = 0; sb < Ca && Ba--; ) {\n                          Sa(La);\n                          var $a = Za[0 + (pb(La) & 127)];\n                          qb(La, La.u + $a.g);\n                          var jb = $a.value;\n                          if (16 > jb) (Xa[sb++] = jb), 0 != jb && (Ya = jb);\n                          else {\n                            var lb = 16 == jb,\n                              ab = jb - 16,\n                              mb = oe[ab],\n                              bb = D(La, pe[ab]) + mb;\n                            if (sb + bb > Ca) break e;\n                            else\n                              for (var nb = lb ? Ya : 0; 0 < bb--; )\n                                Xa[sb++] = nb;\n                          }\n                        }\n                        Oa = 1;\n                        break e;\n                      }\n                      Oa || (Wa.a = 3);\n                      ya = Oa;\n                    }\n                    (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));\n                    ya && 0 != Ia ? (Aa = Ia) : ((ta.a = 3), (Aa = 0));\n                  }\n                  if (0 == Aa) break c;\n                  ra && 1 == qe[ba] && (ra = 0 == pa[U].g);\n                  Fa += pa[U].g;\n                  U += Aa;\n                  if (3 >= ba) {\n                    var Pa = ha[0],\n                      tb;\n                    for (tb = 1; tb < Y; ++tb) ha[tb] > Pa && (Pa = ha[tb]);\n                    Ha += Pa;\n                  }\n                }\n                ja.nd = ra;\n                ja.Qb = 0;\n                ra &&\n                  ((ja.qb =\n                    ((da[3][ea[3] + 0].value << 24) |\n                      (da[1][ea[1] + 0].value << 16) |\n                      da[2][ea[2] + 0].value) >>>\n                    0),\n                  0 == Fa &&\n                    256 > da[0][ea[0] + 0].value &&\n                    ((ja.Qb = 1), (ja.qb += da[0][ea[0] + 0].value << 8)));\n                ja.jc = !ja.Qb && 6 > Ha;\n                if (ja.jc) {\n                  var Ga,\n                    Ea = ja;\n                  for (Ga = 0; Ga < xb; ++Ga) {\n                    var Ma = Ga,\n                      Na = Ea.pd[Ma],\n                      vb = Ea.G[0][Ea.H[0] + Ma];\n                    256 <= vb.value\n                      ? ((Na.g = vb.g + 256), (Na.value = vb.value))\n                      : ((Na.g = 0),\n                        (Na.value = 0),\n                        (Ma >>= ub(vb, 8, Na)),\n                        (Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na)),\n                        (Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na)),\n                        ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));\n                  }\n                }\n              }\n              R.vc = P;\n              R.Wb = W;\n              R.Ya = la;\n              R.yc = ma;\n              H = 1;\n              break b;\n            }\n            H = 0;\n          }\n        f = H;\n        if (!f) {\n          d.a = 3;\n          break a;\n        }\n        if (0 < n) {\n          if (((l.ua = 1 << n), !Zb(l.Wa, n))) {\n            d.a = 1;\n            f = 0;\n            break a;\n          }\n        } else l.ua = 0;\n        var Qa = d,\n          cb = g,\n          ob = h,\n          Ra = Qa.s,\n          Ta = Ra.xc;\n        Qa.c = cb;\n        Qa.i = ob;\n        Ra.md = xa(cb, Ta);\n        Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;\n        if (c) {\n          d.xb = re;\n          break a;\n        }\n        m = V(g * h);\n        if (null == m) {\n          d.a = 1;\n          f = 0;\n          break a;\n        }\n        f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;\n        break a;\n      }\n      f\n        ? (null != e ? (e[0] = m) : (x(null == m), x(c)), (d.$ = 0), c || Ac(l))\n        : Ac(l);\n      return f;\n    }\n    function Ec(a, b) {\n      var c = a.c * a.i,\n        d = c + b + 16 * b;\n      x(a.c <= b);\n      a.V = V(d);\n      if (null == a.V) return (a.Ta = null), (a.Ua = 0), (a.a = 1), 0;\n      a.Ta = a.V;\n      a.Ua = a.Ba + c + b;\n      return 1;\n    }\n    function se(a, b) {\n      var c = a.C,\n        d = b - c,\n        e = a.V,\n        f = a.Ba + a.c * c;\n      for (x(b <= a.l.o); 0 < d; ) {\n        var g = 16 < d ? 16 : d,\n          h = a.l.ma,\n          k = a.l.width,\n          l = k * g,\n          m = h.ca,\n          n = h.tb + k * c,\n          r = a.Ta,\n          q = a.Ua;\n        oc(a, g, e, f);\n        Fc(r, q, m, n, l);\n        zc(h, c, c + g, m, n, k);\n        d -= g;\n        e += g * a.c;\n        c += g;\n      }\n      x(c == b);\n      a.C = a.Ma = b;\n    }\n    function te(a, b) {\n      var c = [0],\n        d = [0],\n        e = [0];\n      a: for (;;) {\n        if (null == a) return 0;\n        if (null == b) return (a.a = 2), 0;\n        a.l = b;\n        a.a = 0;\n        cb(a.m, b.data, b.w, b.ha);\n        if (!mc(a.m, c, d, e)) {\n          a.a = 3;\n          break a;\n        }\n        a.xb = Cc;\n        b.width = c[0];\n        b.height = d[0];\n        if (!rb(c[0], d[0], 1, a, null)) break a;\n        return 1;\n      }\n      x(0 != a.a);\n      return 0;\n    }\n    function ue() {\n      this.ub = this.yd = this.td = this.Rb = 0;\n    }\n    function ve() {\n      this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;\n    }\n    function we() {\n      this.Fb = this.Bb = this.Cb = 0;\n      this.Zb = V(4);\n      this.Lb = V(4);\n    }\n    function Gc() {\n      this.Yb = wb();\n    }\n    function xe() {\n      this.jb = V(3);\n      this.Wc = Ed([4, 8], Gc);\n      this.Xc = Ed([4, 17], Gc);\n    }\n    function ye() {\n      this.Pc = this.wb = this.Tb = this.zd = 0;\n      this.vd = new V(4);\n      this.od = new V(4);\n    }\n    function Xa() {\n      this.ld = this.La = this.dd = this.tc = 0;\n    }\n    function Hc() {\n      this.Na = this.la = 0;\n    }\n    function ze() {\n      this.Sc = [0, 0];\n      this.Eb = [0, 0];\n      this.Qc = [0, 0];\n      this.ia = this.lc = 0;\n    }\n    function Kb() {\n      this.ad = V(384);\n      this.Za = 0;\n      this.Ob = V(16);\n      this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;\n    }\n    function Ae() {\n      this.uc = this.M = this.Nb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.ya = Array(new Kb());\n      this.aa = 0;\n      this.l = new Oa();\n    }\n    function Ic() {\n      this.y = V(16);\n      this.f = V(8);\n      this.ea = V(8);\n    }\n    function Be() {\n      this.cb = this.a = 0;\n      this.sc = \"\";\n      this.m = new Wb();\n      this.Od = new ue();\n      this.Kc = new ve();\n      this.ed = new ye();\n      this.Qa = new we();\n      this.Ic = this.$c = this.Aa = 0;\n      this.D = new Ae();\n      this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;\n      this.Jc = wa(8, Wb);\n      this.ia = 0;\n      new F();\n      this.pb = wa(4, ze);\n      this.Pa = new xe();\n      this.Bd = this.kc = 0;\n      this.Ac = [];\n      this.Bc = 0;\n      this.zc = [0, 0, 0, 0];\n      this.Gd = Array(new Ic());\n      this.Hd = 0;\n      this.rb = Array(new Hc());\n      this.sb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.oc = [];\n      this.pc = 0;\n      this.sa = [];\n      this.ta = 0;\n      this.qa = [];\n      this.ra = 0;\n      this.Ha = [];\n      this.B = this.R = this.Ia = 0;\n      this.Ec = [];\n      this.M = this.ja = this.Vb = this.Fc = 0;\n      this.ya = Array(new Kb());\n      this.L = this.aa = 0;\n      this.gd = Ed([4, 2], Xa);\n      this.ga = null;\n      this.Fa = [];\n      this.Cc = this.qc = this.P = 0;\n      this.Gb = [];\n      this.Uc = 0;\n      this.mb = [];\n      this.nb = 0;\n      this.rc = [];\n      this.Ga = this.Vc = 0;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function Oa() {\n      this.T = this.U = this.ka = this.height = this.width = 0;\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.Rc = this.fa = this.W = this.N = this.O = 0;\n      this.ma = \"void\";\n      this.put = \"VP8IoPutHook\";\n      this.ac = \"VP8IoSetupHook\";\n      this.bc = \"VP8IoTeardownHook\";\n      this.ha = this.Kb = 0;\n      this.data = [];\n      this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0;\n      this.F = [];\n      this.J = 0;\n    }\n    function Ce() {\n      var a = new Be();\n      null != a &&\n        ((a.a = 0), (a.sc = \"OK\"), (a.cb = 0), (a.Xb = 0), oa || (oa = De));\n      return a;\n    }\n    function T(a, b, c) {\n      0 == a.a && ((a.a = b), (a.sc = c), (a.cb = 0));\n      return 0;\n    }\n    function Jc(a, b, c) {\n      return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];\n    }\n    function Kc(a, b) {\n      if (null == a) return 0;\n      a.a = 0;\n      a.sc = \"OK\";\n      if (null == b) return T(a, 2, \"null VP8Io passed to VP8GetHeaders()\");\n      var c = b.data;\n      var d = b.w;\n      var e = b.ha;\n      if (4 > e) return T(a, 7, \"Truncated header.\");\n      var f = c[d + 0] | (c[d + 1] << 8) | (c[d + 2] << 16);\n      var g = a.Od;\n      g.Rb = !(f & 1);\n      g.td = (f >> 1) & 7;\n      g.yd = (f >> 4) & 1;\n      g.ub = f >> 5;\n      if (3 < g.td) return T(a, 3, \"Incorrect keyframe parameters.\");\n      if (!g.yd) return T(a, 4, \"Frame not displayable.\");\n      d += 3;\n      e -= 3;\n      var h = a.Kc;\n      if (g.Rb) {\n        if (7 > e) return T(a, 7, \"cannot parse picture header\");\n        if (!Jc(c, d, e)) return T(a, 3, \"Bad code word\");\n        h.c = ((c[d + 4] << 8) | c[d + 3]) & 16383;\n        h.Td = c[d + 4] >> 6;\n        h.i = ((c[d + 6] << 8) | c[d + 5]) & 16383;\n        h.Ud = c[d + 6] >> 6;\n        d += 7;\n        e -= 7;\n        a.za = (h.c + 15) >> 4;\n        a.Ub = (h.i + 15) >> 4;\n        b.width = h.c;\n        b.height = h.i;\n        b.Da = 0;\n        b.j = 0;\n        b.v = 0;\n        b.va = b.width;\n        b.o = b.height;\n        b.da = 0;\n        b.ib = b.width;\n        b.hb = b.height;\n        b.U = b.width;\n        b.T = b.height;\n        f = a.Pa;\n        M(f.jb, 0, 255, f.jb.length);\n        f = a.Qa;\n        x(null != f);\n        f.Cb = 0;\n        f.Bb = 0;\n        f.Fb = 1;\n        M(f.Zb, 0, 0, f.Zb.length);\n        M(f.Lb, 0, 0, f.Lb);\n      }\n      if (g.ub > e) return T(a, 7, \"bad partition length\");\n      f = a.m;\n      ma(f, c, d, g.ub);\n      d += g.ub;\n      e -= g.ub;\n      g.Rb && ((h.Ld = G(f)), (h.Kd = G(f)));\n      h = a.Qa;\n      var k = a.Pa,\n        l;\n      x(null != f);\n      x(null != h);\n      h.Cb = G(f);\n      if (h.Cb) {\n        h.Bb = G(f);\n        if (G(f)) {\n          h.Fb = G(f);\n          for (l = 0; 4 > l; ++l) h.Zb[l] = G(f) ? ca(f, 7) : 0;\n          for (l = 0; 4 > l; ++l) h.Lb[l] = G(f) ? ca(f, 6) : 0;\n        }\n        if (h.Bb) for (l = 0; 3 > l; ++l) k.jb[l] = G(f) ? na(f, 8) : 255;\n      } else h.Bb = 0;\n      if (f.Ka) return T(a, 3, \"cannot parse segment header\");\n      h = a.ed;\n      h.zd = G(f);\n      h.Tb = na(f, 6);\n      h.wb = na(f, 3);\n      h.Pc = G(f);\n      if (h.Pc && G(f)) {\n        for (k = 0; 4 > k; ++k) G(f) && (h.vd[k] = ca(f, 6));\n        for (k = 0; 4 > k; ++k) G(f) && (h.od[k] = ca(f, 6));\n      }\n      a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;\n      if (f.Ka) return T(a, 3, \"cannot parse filter header\");\n      l = d;\n      var m = e;\n      e = l;\n      d = l + m;\n      h = m;\n      a.Xb = (1 << na(a.m, 2)) - 1;\n      k = a.Xb;\n      if (m < 3 * k) c = 7;\n      else {\n        l += 3 * k;\n        h -= 3 * k;\n        for (m = 0; m < k; ++m) {\n          var n = c[e + 0] | (c[e + 1] << 8) | (c[e + 2] << 16);\n          n > h && (n = h);\n          ma(a.Jc[+m], c, l, n);\n          l += n;\n          h -= n;\n          e += 3;\n        }\n        ma(a.Jc[+k], c, l, h);\n        c = l < d ? 0 : 5;\n      }\n      if (0 != c) return T(a, c, \"cannot parse partitions\");\n      l = a.m;\n      c = na(l, 7);\n      e = G(l) ? ca(l, 4) : 0;\n      d = G(l) ? ca(l, 4) : 0;\n      h = G(l) ? ca(l, 4) : 0;\n      k = G(l) ? ca(l, 4) : 0;\n      l = G(l) ? ca(l, 4) : 0;\n      m = a.Qa;\n      for (n = 0; 4 > n; ++n) {\n        if (m.Cb) {\n          var r = m.Zb[n];\n          m.Fb || (r += c);\n        } else if (0 < n) {\n          a.pb[n] = a.pb[0];\n          continue;\n        } else r = c;\n        var q = a.pb[n];\n        q.Sc[0] = Lb[ga(r + e, 127)];\n        q.Sc[1] = Mb[ga(r + 0, 127)];\n        q.Eb[0] = 2 * Lb[ga(r + d, 127)];\n        q.Eb[1] = (101581 * Mb[ga(r + h, 127)]) >> 16;\n        8 > q.Eb[1] && (q.Eb[1] = 8);\n        q.Qc[0] = Lb[ga(r + k, 117)];\n        q.Qc[1] = Mb[ga(r + l, 127)];\n        q.lc = r + l;\n      }\n      if (!g.Rb) return T(a, 4, \"Not a key frame.\");\n      G(f);\n      g = a.Pa;\n      for (c = 0; 4 > c; ++c) {\n        for (e = 0; 8 > e; ++e)\n          for (d = 0; 3 > d; ++d)\n            for (h = 0; 11 > h; ++h)\n              (k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h]),\n                (g.Wc[c][e].Yb[d][h] = k);\n        for (e = 0; 17 > e; ++e) g.Xc[c][e] = g.Wc[c][Ge[e]];\n      }\n      a.kc = G(f);\n      a.kc && (a.Bd = na(f, 8));\n      return (a.cb = 1);\n    }\n    function De(a, b, c, d, e, f, g) {\n      var h = b[e].Yb[c];\n      for (c = 0; 16 > e; ++e) {\n        if (!K(a, h[c + 0])) return e;\n        for (; !K(a, h[c + 1]); )\n          if (((h = b[++e].Yb[0]), (c = 0), 16 == e)) return 16;\n        var k = b[e + 1].Yb;\n        if (K(a, h[c + 2])) {\n          var l = a,\n            m = h,\n            n = c;\n          var r = 0;\n          if (K(l, m[n + 3]))\n            if (K(l, m[n + 6])) {\n              h = 0;\n              r = K(l, m[n + 8]);\n              m = K(l, m[n + 9 + r]);\n              n = 2 * r + m;\n              r = 0;\n              for (m = He[n]; m[h]; ++h) r += r + K(l, m[h]);\n              r += 3 + (8 << n);\n            } else\n              K(l, m[n + 7])\n                ? ((r = 7 + 2 * K(l, 165)), (r += K(l, 145)))\n                : (r = 5 + K(l, 159));\n          else K(l, m[n + 4]) ? (r = 3 + K(l, m[n + 5])) : (r = 2);\n          h = k[2];\n        } else (r = 1), (h = k[1]);\n        k = g + Ie[e];\n        l = a;\n        0 > l.b && Qa(l);\n        var m = l.b,\n          n = l.Ca >> 1,\n          q = (n - (l.I >> m)) >> 31;\n        --l.b;\n        l.Ca += q;\n        l.Ca |= 1;\n        l.I -= ((n + 1) & q) << m;\n        f[k] = ((r ^ q) - q) * d[(0 < e) + 0];\n      }\n      return 16;\n    }\n    function Lc(a) {\n      var b = a.rb[a.sb - 1];\n      b.la = 0;\n      b.Na = 0;\n      M(a.zc, 0, 0, a.zc.length);\n      a.ja = 0;\n    }\n    function Je(a, b) {\n      for (a.M = 0; a.M < a.Va; ++a.M) {\n        var c = a.Jc[a.M & a.Xb],\n          d = a.m,\n          e = a,\n          f;\n        for (f = 0; f < e.za; ++f) {\n          var g = d;\n          var h = e;\n          var k = h.Ac,\n            l = h.Bc + 4 * f,\n            m = h.zc,\n            n = h.ya[h.aa + f];\n          h.Qa.Bb\n            ? (n.$b = K(g, h.Pa.jb[0])\n                ? 2 + K(g, h.Pa.jb[2])\n                : K(g, h.Pa.jb[1]))\n            : (n.$b = 0);\n          h.kc && (n.Ad = K(g, h.Bd));\n          n.Za = !K(g, 145) + 0;\n          if (n.Za) {\n            var r = n.Ob,\n              q = 0;\n            for (h = 0; 4 > h; ++h) {\n              var t = m[0 + h];\n              var v;\n              for (v = 0; 4 > v; ++v) {\n                t = Ke[k[l + v]][t];\n                for (var p = Mc[K(g, t[0])]; 0 < p; )\n                  p = Mc[2 * p + K(g, t[p])];\n                t = -p;\n                k[l + v] = t;\n              }\n              I(r, q, k, l, 4);\n              q += 4;\n              m[0 + h] = t;\n            }\n          } else\n            (t = K(g, 156) ? (K(g, 128) ? 1 : 3) : K(g, 163) ? 2 : 0),\n              (n.Ob[0] = t),\n              M(k, l, t, 4),\n              M(m, 0, t, 4);\n          n.Dd = K(g, 142) ? (K(g, 114) ? (K(g, 183) ? 1 : 3) : 2) : 0;\n        }\n        if (e.m.Ka) return T(a, 7, \"Premature end-of-partition0 encountered.\");\n        for (; a.ja < a.za; ++a.ja) {\n          d = a;\n          e = c;\n          g = d.rb[d.sb - 1];\n          k = d.rb[d.sb + d.ja];\n          f = d.ya[d.aa + d.ja];\n          if ((l = d.kc ? f.Ad : 0))\n            (g.la = k.la = 0),\n              f.Za || (g.Na = k.Na = 0),\n              (f.Hc = 0),\n              (f.Gc = 0),\n              (f.ia = 0);\n          else {\n            var u,\n              w,\n              g = k,\n              k = e,\n              l = d.Pa.Xc,\n              m = d.ya[d.aa + d.ja],\n              n = d.pb[m.$b];\n            h = m.ad;\n            r = 0;\n            q = d.rb[d.sb - 1];\n            t = v = 0;\n            M(h, r, 0, 384);\n            if (m.Za) {\n              var y = 0;\n              var A = l[3];\n            } else {\n              p = V(16);\n              var E = g.Na + q.Na;\n              E = oa(k, l[1], E, n.Eb, 0, p, 0);\n              g.Na = q.Na = (0 < E) + 0;\n              if (1 < E) Nc(p, 0, h, r);\n              else {\n                var B = (p[0] + 3) >> 3;\n                for (p = 0; 256 > p; p += 16) h[r + p] = B;\n              }\n              y = 1;\n              A = l[0];\n            }\n            var C = g.la & 15;\n            var N = q.la & 15;\n            for (p = 0; 4 > p; ++p) {\n              var z = N & 1;\n              for (B = w = 0; 4 > B; ++B)\n                (E = z + (C & 1)),\n                  (E = oa(k, A, E, n.Sc, y, h, r)),\n                  (z = E > y),\n                  (C = (C >> 1) | (z << 7)),\n                  (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                  (r += 16);\n              C >>= 4;\n              N = (N >> 1) | (z << 7);\n              v = ((v << 8) | w) >>> 0;\n            }\n            A = C;\n            y = N >> 4;\n            for (u = 0; 4 > u; u += 2) {\n              w = 0;\n              C = g.la >> (4 + u);\n              N = q.la >> (4 + u);\n              for (p = 0; 2 > p; ++p) {\n                z = N & 1;\n                for (B = 0; 2 > B; ++B)\n                  (E = z + (C & 1)),\n                    (E = oa(k, l[2], E, n.Qc, 0, h, r)),\n                    (z = 0 < E),\n                    (C = (C >> 1) | (z << 3)),\n                    (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                    (r += 16);\n                C >>= 2;\n                N = (N >> 1) | (z << 5);\n              }\n              t |= w << (4 * u);\n              A |= (C << 4) << u;\n              y |= (N & 240) << u;\n            }\n            g.la = A;\n            q.la = y;\n            m.Hc = v;\n            m.Gc = t;\n            m.ia = t & 43690 ? 0 : n.ia;\n            l = !(v | t);\n          }\n          0 < d.L &&\n            ((d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za]),\n            (d.wa[d.Y + d.ja].La |= !l));\n          if (e.Ka) return T(a, 7, \"Premature end-of-file encountered.\");\n        }\n        Lc(a);\n        c = a;\n        d = b;\n        e = 1;\n        f = c.D;\n        g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;\n        if (0 == c.Aa)\n          a: {\n            (f.M = c.M), (f.uc = g), Oc(c, f), (e = 1);\n            w = c.D;\n            f = w.Nb;\n            t = Ya[c.L];\n            g = t * c.R;\n            k = (t / 2) * c.B;\n            p = 16 * f * c.R;\n            B = 8 * f * c.B;\n            l = c.sa;\n            m = c.ta - g + p;\n            n = c.qa;\n            h = c.ra - k + B;\n            r = c.Ha;\n            q = c.Ia - k + B;\n            C = w.M;\n            N = 0 == C;\n            v = C >= c.Va - 1;\n            2 == c.Aa && Oc(c, w);\n            if (w.uc)\n              for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {\n                var Q = E;\n                y = w;\n                A = z;\n                var S = Q.D,\n                  D = S.Nb;\n                u = Q.R;\n                var S = S.wa[S.Y + y],\n                  F = Q.sa,\n                  H = Q.ta + 16 * D * u + 16 * y,\n                  J = S.dd,\n                  G = S.tc;\n                if (0 != G)\n                  if ((x(3 <= G), 1 == Q.L))\n                    0 < y && Pc(F, H, u, G + 4),\n                      S.La && Qc(F, H, u, G),\n                      0 < A && Rc(F, H, u, G + 4),\n                      S.La && Sc(F, H, u, G);\n                  else {\n                    var L = Q.B,\n                      O = Q.qa,\n                      P = Q.ra + 8 * D * L + 8 * y,\n                      R = Q.Ha,\n                      Q = Q.Ia + 8 * D * L + 8 * y,\n                      D = S.ld;\n                    0 < y &&\n                      (Tc(F, H, u, G + 4, J, D),\n                      Uc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));\n                    0 < A &&\n                      (Xc(F, H, u, G + 4, J, D),\n                      Yc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));\n                  }\n              }\n            c.ia && alert(\"todo:DitherRow\");\n            if (null != d.put) {\n              w = 16 * C;\n              C = 16 * (C + 1);\n              N\n                ? ((d.y = c.sa),\n                  (d.O = c.ta + p),\n                  (d.f = c.qa),\n                  (d.N = c.ra + B),\n                  (d.ea = c.Ha),\n                  (d.W = c.Ia + B))\n                : ((w -= t),\n                  (d.y = l),\n                  (d.O = m),\n                  (d.f = n),\n                  (d.N = h),\n                  (d.ea = r),\n                  (d.W = q));\n              v || (C -= t);\n              C > d.o && (C = d.o);\n              d.F = null;\n              d.J = null;\n              if (\n                null != c.Fa &&\n                0 < c.Fa.length &&\n                w < C &&\n                ((d.J = Le(c, d, w, C - w)),\n                (d.F = c.mb),\n                null == d.F && 0 == d.F.length)\n              ) {\n                e = T(c, 3, \"Could not decode alpha data.\");\n                break a;\n              }\n              w < d.j &&\n                ((t = d.j - w),\n                (w = d.j),\n                x(!(t & 1)),\n                (d.O += c.R * t),\n                (d.N += c.B * (t >> 1)),\n                (d.W += c.B * (t >> 1)),\n                null != d.F && (d.J += d.width * t));\n              w < C &&\n                ((d.O += d.v),\n                (d.N += d.v >> 1),\n                (d.W += d.v >> 1),\n                null != d.F && (d.J += d.v),\n                (d.ka = w - d.j),\n                (d.U = d.va - d.v),\n                (d.T = C - w),\n                (e = d.put(d)));\n            }\n            f + 1 != c.Ic ||\n              v ||\n              (I(c.sa, c.ta - g, l, m + 16 * c.R, g),\n              I(c.qa, c.ra - k, n, h + 8 * c.B, k),\n              I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));\n          }\n        if (!e) return T(a, 6, \"Output aborted.\");\n      }\n      return 1;\n    }\n    function Me(a, b) {\n      if (null == a) return 0;\n      if (null == b) return T(a, 2, \"NULL VP8Io parameter in VP8Decode().\");\n      if (!a.cb && !Kc(a, b)) return 0;\n      x(a.cb);\n      if (null == b.ac || b.ac(b)) {\n        b.ob && (a.L = 0);\n        var c = Ya[a.L];\n        2 == a.L\n          ? ((a.yb = 0), (a.zb = 0))\n          : ((a.yb = (b.v - c) >> 4),\n            (a.zb = (b.j - c) >> 4),\n            0 > a.yb && (a.yb = 0),\n            0 > a.zb && (a.zb = 0));\n        a.Va = (b.o + 15 + c) >> 4;\n        a.Hb = (b.va + 15 + c) >> 4;\n        a.Hb > a.za && (a.Hb = a.za);\n        a.Va > a.Ub && (a.Va = a.Ub);\n        if (0 < a.L) {\n          var d = a.ed;\n          for (c = 0; 4 > c; ++c) {\n            var e;\n            if (a.Qa.Cb) {\n              var f = a.Qa.Lb[c];\n              a.Qa.Fb || (f += d.Tb);\n            } else f = d.Tb;\n            for (e = 0; 1 >= e; ++e) {\n              var g = a.gd[c][e],\n                h = f;\n              d.Pc && ((h += d.vd[0]), e && (h += d.od[0]));\n              h = 0 > h ? 0 : 63 < h ? 63 : h;\n              if (0 < h) {\n                var k = h;\n                0 < d.wb &&\n                  ((k = 4 < d.wb ? k >> 2 : k >> 1),\n                  k > 9 - d.wb && (k = 9 - d.wb));\n                1 > k && (k = 1);\n                g.dd = k;\n                g.tc = 2 * h + k;\n                g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;\n              } else g.tc = 0;\n              g.La = e;\n            }\n          }\n        }\n        c = 0;\n      } else T(a, 6, \"Frame setup failed\"), (c = a.a);\n      if ((c = 0 == c)) {\n        if (c) {\n          a.$c = 0;\n          0 < a.Aa || (a.Ic = Ne);\n          b: {\n            c = a.Ic;\n            var k = a.za,\n              d = 4 * k,\n              l = 32 * k,\n              m = k + 1,\n              n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,\n              r = (2 == a.Aa ? 2 : 1) * k;\n            e = ((3 * (16 * c + Ya[a.L])) / 2) * l;\n            f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;\n            g = d + 832 + e + f;\n            if (g != g) c = 0;\n            else {\n              if (g > a.Vb) {\n                a.Vb = 0;\n                a.Ec = V(g);\n                a.Fc = 0;\n                if (null == a.Ec) {\n                  c = T(a, 1, \"no memory during frame initialization.\");\n                  break b;\n                }\n                a.Vb = g;\n              }\n              g = a.Ec;\n              h = a.Fc;\n              a.Ac = g;\n              a.Bc = h;\n              h += d;\n              a.Gd = wa(l, Ic);\n              a.Hd = 0;\n              a.rb = wa(m + 1, Hc);\n              a.sb = 1;\n              a.wa = n ? wa(n, Xa) : null;\n              a.Y = 0;\n              a.D.Nb = 0;\n              a.D.wa = a.wa;\n              a.D.Y = a.Y;\n              0 < a.Aa && (a.D.Y += k);\n              x(!0);\n              a.oc = g;\n              a.pc = h;\n              h += 832;\n              a.ya = wa(r, Kb);\n              a.aa = 0;\n              a.D.ya = a.ya;\n              a.D.aa = a.aa;\n              2 == a.Aa && (a.D.aa += k);\n              a.R = 16 * k;\n              a.B = 8 * k;\n              l = Ya[a.L];\n              k = l * a.R;\n              l = (l / 2) * a.B;\n              a.sa = g;\n              a.ta = h + k;\n              a.qa = a.sa;\n              a.ra = a.ta + 16 * c * a.R + l;\n              a.Ha = a.qa;\n              a.Ia = a.ra + 8 * c * a.B + l;\n              a.$c = 0;\n              h += e;\n              a.mb = f ? g : null;\n              a.nb = f ? h : null;\n              x(h + f <= a.Fc + a.Vb);\n              Lc(a);\n              M(a.Ac, a.Bc, 0, d);\n              c = 1;\n            }\n          }\n          if (c) {\n            b.ka = 0;\n            b.y = a.sa;\n            b.O = a.ta;\n            b.f = a.qa;\n            b.N = a.ra;\n            b.ea = a.Ha;\n            b.Vd = a.Ia;\n            b.fa = a.R;\n            b.Rc = a.B;\n            b.F = null;\n            b.J = 0;\n            if (!ad) {\n              for (c = -255; 255 >= c; ++c) bd[255 + c] = 0 > c ? -c : c;\n              for (c = -1020; 1020 >= c; ++c)\n                cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;\n              for (c = -112; 112 >= c; ++c)\n                dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;\n              for (c = -255; 510 >= c; ++c)\n                ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;\n              ad = 1;\n            }\n            Nc = Oe;\n            Za = Pe;\n            Nb = Qe;\n            pa = Re;\n            Ob = Se;\n            fd = Te;\n            Xc = Ue;\n            Tc = Ve;\n            Yc = We;\n            Uc = Xe;\n            Zc = Ye;\n            Vc = Ze;\n            $c = $e;\n            Wc = af;\n            Rc = gd;\n            Pc = hd;\n            Sc = bf;\n            Qc = cf;\n            W[0] = df;\n            W[1] = ef;\n            W[2] = ff;\n            W[3] = gf;\n            W[4] = hf;\n            W[5] = jf;\n            W[6] = kf;\n            W[7] = lf;\n            W[8] = mf;\n            W[9] = nf;\n            Y[0] = of;\n            Y[1] = pf;\n            Y[2] = qf;\n            Y[3] = rf;\n            Y[4] = sf;\n            Y[5] = tf;\n            Y[6] = uf;\n            ka[0] = vf;\n            ka[1] = wf;\n            ka[2] = xf;\n            ka[3] = yf;\n            ka[4] = zf;\n            ka[5] = Af;\n            ka[6] = Bf;\n            c = 1;\n          } else c = 0;\n        }\n        c && (c = Je(a, b));\n        null != b.bc && b.bc(b);\n        c &= 1;\n      }\n      if (!c) return 0;\n      a.cb = 0;\n      return c;\n    }\n    function qa(a, b, c, d, e) {\n      e = a[b + c + 32 * d] + (e >> 3);\n      a[b + c + 32 * d] = e & -256 ? (0 > e ? 0 : 255) : e;\n    }\n    function kb(a, b, c, d, e, f) {\n      qa(a, b, 0, c, d + e);\n      qa(a, b, 1, c, d + f);\n      qa(a, b, 2, c, d - f);\n      qa(a, b, 3, c, d - e);\n    }\n    function da(a) {\n      return ((20091 * a) >> 16) + a;\n    }\n    function id(a, b, c, d) {\n      var e = 0,\n        f;\n      var g = V(16);\n      for (f = 0; 4 > f; ++f) {\n        var h = a[b + 0] + a[b + 8];\n        var k = a[b + 0] - a[b + 8];\n        var l = ((35468 * a[b + 4]) >> 16) - da(a[b + 12]);\n        var m = da(a[b + 4]) + ((35468 * a[b + 12]) >> 16);\n        g[e + 0] = h + m;\n        g[e + 1] = k + l;\n        g[e + 2] = k - l;\n        g[e + 3] = h - m;\n        e += 4;\n        b++;\n      }\n      for (f = e = 0; 4 > f; ++f)\n        (a = g[e + 0] + 4),\n          (h = a + g[e + 8]),\n          (k = a - g[e + 8]),\n          (l = ((35468 * g[e + 4]) >> 16) - da(g[e + 12])),\n          (m = da(g[e + 4]) + ((35468 * g[e + 12]) >> 16)),\n          qa(c, d, 0, 0, h + m),\n          qa(c, d, 1, 0, k + l),\n          qa(c, d, 2, 0, k - l),\n          qa(c, d, 3, 0, h - m),\n          e++,\n          (d += 32);\n    }\n    function Te(a, b, c, d) {\n      var e = a[b + 0] + 4,\n        f = (35468 * a[b + 4]) >> 16,\n        g = da(a[b + 4]),\n        h = (35468 * a[b + 1]) >> 16;\n      a = da(a[b + 1]);\n      kb(c, d, 0, e + g, a, h);\n      kb(c, d, 1, e + f, a, h);\n      kb(c, d, 2, e - f, a, h);\n      kb(c, d, 3, e - g, a, h);\n    }\n    function Pe(a, b, c, d, e) {\n      id(a, b, c, d);\n      e && id(a, b + 16, c, d + 4);\n    }\n    function Qe(a, b, c, d) {\n      Za(a, b + 0, c, d, 1);\n      Za(a, b + 32, c, d + 128, 1);\n    }\n    function Re(a, b, c, d) {\n      a = a[b + 0] + 4;\n      var e;\n      for (e = 0; 4 > e; ++e) for (b = 0; 4 > b; ++b) qa(c, d, b, e, a);\n    }\n    function Se(a, b, c, d) {\n      a[b + 0] && pa(a, b + 0, c, d);\n      a[b + 16] && pa(a, b + 16, c, d + 4);\n      a[b + 32] && pa(a, b + 32, c, d + 128);\n      a[b + 48] && pa(a, b + 48, c, d + 128 + 4);\n    }\n    function Oe(a, b, c, d) {\n      var e = V(16),\n        f;\n      for (f = 0; 4 > f; ++f) {\n        var g = a[b + 0 + f] + a[b + 12 + f];\n        var h = a[b + 4 + f] + a[b + 8 + f];\n        var k = a[b + 4 + f] - a[b + 8 + f];\n        var l = a[b + 0 + f] - a[b + 12 + f];\n        e[0 + f] = g + h;\n        e[8 + f] = g - h;\n        e[4 + f] = l + k;\n        e[12 + f] = l - k;\n      }\n      for (f = 0; 4 > f; ++f)\n        (a = e[0 + 4 * f] + 3),\n          (g = a + e[3 + 4 * f]),\n          (h = e[1 + 4 * f] + e[2 + 4 * f]),\n          (k = e[1 + 4 * f] - e[2 + 4 * f]),\n          (l = a - e[3 + 4 * f]),\n          (c[d + 0] = (g + h) >> 3),\n          (c[d + 16] = (l + k) >> 3),\n          (c[d + 32] = (g - h) >> 3),\n          (c[d + 48] = (l - k) >> 3),\n          (d += 64);\n    }\n    function Pb(a, b, c) {\n      var d = b - 32,\n        e = R,\n        f = 255 - a[d - 1],\n        g;\n      for (g = 0; g < c; ++g) {\n        var h = e,\n          k = f + a[b - 1],\n          l;\n        for (l = 0; l < c; ++l) a[b + l] = h[k + a[d + l]];\n        b += 32;\n      }\n    }\n    function ef(a, b) {\n      Pb(a, b, 4);\n    }\n    function wf(a, b) {\n      Pb(a, b, 8);\n    }\n    function pf(a, b) {\n      Pb(a, b, 16);\n    }\n    function qf(a, b) {\n      var c;\n      for (c = 0; 16 > c; ++c) I(a, b + 32 * c, a, b - 32, 16);\n    }\n    function rf(a, b) {\n      var c;\n      for (c = 16; 0 < c; --c) M(a, b, a[b - 1], 16), (b += 32);\n    }\n    function $a(a, b, c) {\n      var d;\n      for (d = 0; 16 > d; ++d) M(b, c + 32 * d, a, 16);\n    }\n    function of(a, b) {\n      var c = 16,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d] + a[b + d - 32];\n      $a(c >> 5, a, b);\n    }\n    function sf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d];\n      $a(c >> 4, a, b);\n    }\n    function tf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b + d - 32];\n      $a(c >> 4, a, b);\n    }\n    function uf(a, b) {\n      $a(128, a, b);\n    }\n    function z(a, b, c) {\n      return (a + 2 * b + c + 2) >> 2;\n    }\n    function ff(a, b) {\n      var c = b - 32,\n        c = new Uint8Array([\n          z(a[c - 1], a[c + 0], a[c + 1]),\n          z(a[c + 0], a[c + 1], a[c + 2]),\n          z(a[c + 1], a[c + 2], a[c + 3]),\n          z(a[c + 2], a[c + 3], a[c + 4])\n        ]),\n        d;\n      for (d = 0; 4 > d; ++d) I(a, b + 32 * d, c, 0, c.length);\n    }\n    function gf(a, b) {\n      var c = a[b - 1],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));\n      ra(a, b + 32, 16843009 * z(c, d, e));\n      ra(a, b + 64, 16843009 * z(d, e, f));\n      ra(a, b + 96, 16843009 * z(e, f, f));\n    }\n    function df(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 4 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      c >>= 3;\n      for (d = 0; 4 > d; ++d) M(a, b + 32 * d, c, 4);\n    }\n    function hf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);\n      a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);\n      a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);\n      a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);\n      a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);\n      a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);\n      a[b + 3 + 0] = z(l, k, h);\n    }\n    function kf(a, b) {\n      var c = a[b + 1 - 32],\n        d = a[b + 2 - 32],\n        e = a[b + 3 - 32],\n        f = a[b + 4 - 32],\n        g = a[b + 5 - 32],\n        h = a[b + 6 - 32],\n        k = a[b + 7 - 32];\n      a[b + 0 + 0] = z(a[b + 0 - 32], c, d);\n      a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);\n      a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);\n      a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);\n      a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, k);\n    }\n    function jf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 0] = a[b + 1 + 64] = (f + g + 1) >> 1;\n      a[b + 1 + 0] = a[b + 2 + 64] = (g + h + 1) >> 1;\n      a[b + 2 + 0] = a[b + 3 + 64] = (h + k + 1) >> 1;\n      a[b + 3 + 0] = (k + l + 1) >> 1;\n      a[b + 0 + 96] = z(e, d, c);\n      a[b + 0 + 64] = z(d, c, f);\n      a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);\n      a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);\n      a[b + 3 + 32] = z(h, k, l);\n    }\n    function lf(a, b) {\n      var c = a[b + 0 - 32],\n        d = a[b + 1 - 32],\n        e = a[b + 2 - 32],\n        f = a[b + 3 - 32],\n        g = a[b + 4 - 32],\n        h = a[b + 5 - 32],\n        k = a[b + 6 - 32],\n        l = a[b + 7 - 32];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 1 + 0] = a[b + 0 + 64] = (d + e + 1) >> 1;\n      a[b + 2 + 0] = a[b + 1 + 64] = (e + f + 1) >> 1;\n      a[b + 3 + 0] = a[b + 2 + 64] = (f + g + 1) >> 1;\n      a[b + 0 + 32] = z(c, d, e);\n      a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);\n      a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 3 + 64] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, l);\n    }\n    function nf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 2 + 0] = a[b + 0 + 32] = (d + e + 1) >> 1;\n      a[b + 2 + 32] = a[b + 0 + 64] = (e + f + 1) >> 1;\n      a[b + 1 + 0] = z(c, d, e);\n      a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);\n      a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);\n      a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[\n        b + 2 + 96\n      ] = a[b + 3 + 96] = f;\n    }\n    function mf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96],\n        g = a[b - 1 - 32],\n        h = a[b + 0 - 32],\n        k = a[b + 1 - 32],\n        l = a[b + 2 - 32];\n      a[b + 0 + 0] = a[b + 2 + 32] = (c + g + 1) >> 1;\n      a[b + 0 + 32] = a[b + 2 + 64] = (d + c + 1) >> 1;\n      a[b + 0 + 64] = a[b + 2 + 96] = (e + d + 1) >> 1;\n      a[b + 0 + 96] = (f + e + 1) >> 1;\n      a[b + 3 + 0] = z(h, k, l);\n      a[b + 2 + 0] = z(g, h, k);\n      a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);\n      a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);\n      a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);\n      a[b + 1 + 96] = z(f, e, d);\n    }\n    function xf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) I(a, b + 32 * c, a, b - 32, 8);\n    }\n    function yf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) M(a, b, a[b - 1], 8), (b += 32);\n    }\n    function lb(a, b, c) {\n      var d;\n      for (d = 0; 8 > d; ++d) M(b, c + 32 * d, a, 8);\n    }\n    function vf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      lb(c >> 4, a, b);\n    }\n    function Af(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32];\n      lb(c >> 3, a, b);\n    }\n    function zf(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b - 1 + 32 * d];\n      lb(c >> 3, a, b);\n    }\n    function Bf(a, b) {\n      lb(128, a, b);\n    }\n    function ab(a, b, c) {\n      var d = a[b - c],\n        e = a[b + 0],\n        f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],\n        g = mb[112 + ((f + 4) >> 3)];\n      a[b - c] = R[255 + d + mb[112 + ((f + 3) >> 3)]];\n      a[b + 0] = R[255 + e - g];\n    }\n    function jd(a, b, c, d) {\n      var e = a[b + 0],\n        f = a[b + c];\n      return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;\n    }\n    function kd(a, b, c, d) {\n      return (\n        4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d\n      );\n    }\n    function ld(a, b, c, d, e) {\n      var f = a[b - 3 * c],\n        g = a[b - 2 * c],\n        h = a[b - c],\n        k = a[b + 0],\n        l = a[b + c],\n        m = a[b + 2 * c],\n        n = a[b + 3 * c];\n      return 4 * U[255 + h - k] + U[255 + g - l] > d\n        ? 0\n        : U[255 + a[b - 4 * c] - f] <= e &&\n            U[255 + f - g] <= e &&\n            U[255 + g - h] <= e &&\n            U[255 + n - m] <= e &&\n            U[255 + m - l] <= e &&\n            U[255 + l - k] <= e;\n    }\n    function gd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d, c, e) && ab(a, b + d, c);\n    }\n    function hd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);\n    }\n    function bf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4 * c), gd(a, b, c, d);\n    }\n    function cf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4), hd(a, b, c, d);\n    }\n    function ea(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - 2 * m],\n              r = k[l - m],\n              q = k[l + 0],\n              t = k[l + m],\n              v = k[l + 2 * m],\n              p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],\n              u = (27 * p + 63) >> 7,\n              w = (18 * p + 63) >> 7,\n              p = (9 * p + 63) >> 7;\n            k[l - 3 * m] = R[255 + k[l - 3 * m] + p];\n            k[l - 2 * m] = R[255 + n + w];\n            k[l - m] = R[255 + r + u];\n            k[l + 0] = R[255 + q - u];\n            k[l + m] = R[255 + t - w];\n            k[l + 2 * m] = R[255 + v - p];\n          }\n        b += d;\n      }\n    }\n    function Fa(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - m],\n              r = k[l + 0],\n              q = k[l + m],\n              t = 3 * (r - n),\n              v = mb[112 + ((t + 4) >> 3)],\n              t = mb[112 + ((t + 3) >> 3)],\n              p = (v + 1) >> 1;\n            k[l - 2 * m] = R[255 + k[l - 2 * m] + p];\n            k[l - m] = R[255 + n + t];\n            k[l + 0] = R[255 + r - v];\n            k[l + m] = R[255 + q - p];\n          }\n        b += d;\n      }\n    }\n    function Ue(a, b, c, d, e, f) {\n      ea(a, b, c, 1, 16, d, e, f);\n    }\n    function Ve(a, b, c, d, e, f) {\n      ea(a, b, 1, c, 16, d, e, f);\n    }\n    function Ye(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4 * c), Fa(a, b, c, 1, 16, d, e, f);\n    }\n    function Ze(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4), Fa(a, b, 1, c, 16, d, e, f);\n    }\n    function We(a, b, c, d, e, f, g, h) {\n      ea(a, b, e, 1, 8, f, g, h);\n      ea(c, d, e, 1, 8, f, g, h);\n    }\n    function Xe(a, b, c, d, e, f, g, h) {\n      ea(a, b, 1, e, 8, f, g, h);\n      ea(c, d, 1, e, 8, f, g, h);\n    }\n    function $e(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4 * e, e, 1, 8, f, g, h);\n      Fa(c, d + 4 * e, e, 1, 8, f, g, h);\n    }\n    function af(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4, 1, e, 8, f, g, h);\n      Fa(c, d + 4, 1, e, 8, f, g, h);\n    }\n    function Cf() {\n      this.ba = new Cb();\n      this.ec = [];\n      this.cc = [];\n      this.Mc = [];\n      this.Dc = this.Nc = this.dc = this.fc = 0;\n      this.Oa = new Ud();\n      this.memory = 0;\n      this.Ib = \"OutputFunc\";\n      this.Jb = \"OutputAlphaFunc\";\n      this.Nd = \"OutputRowFunc\";\n    }\n    function md() {\n      this.data = [];\n      this.offset = this.kd = this.ha = this.w = 0;\n      this.na = [];\n      this.xa = this.gb = this.Ja = this.Sa = this.P = 0;\n    }\n    function Df() {\n      this.nc = this.Ea = this.b = this.hc = 0;\n      this.K = [];\n      this.w = 0;\n    }\n    function Ef() {\n      this.ua = 0;\n      this.Wa = new ac();\n      this.vb = new ac();\n      this.md = this.xc = this.wc = 0;\n      this.vc = [];\n      this.Wb = 0;\n      this.Ya = new Ub();\n      this.yc = new O();\n    }\n    function je() {\n      this.xb = this.a = 0;\n      this.l = new Oa();\n      this.ca = new Cb();\n      this.V = [];\n      this.Ba = 0;\n      this.Ta = [];\n      this.Ua = 0;\n      this.m = new Ra();\n      this.Pb = 0;\n      this.wd = new Ra();\n      this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;\n      this.s = new Ef();\n      this.ab = 0;\n      this.gc = wa(4, Df);\n      this.Oc = 0;\n    }\n    function Ff() {\n      this.Lc = this.Z = this.$a = this.i = this.c = 0;\n      this.l = new Oa();\n      this.ic = 0;\n      this.ca = [];\n      this.tb = 0;\n      this.qd = null;\n      this.rd = 0;\n    }\n    function Rb(a, b, c, d, e, f, g) {\n      a = null == a ? 0 : a[b + 0];\n      for (b = 0; b < g; ++b) (e[f + b] = (a + c[d + b]) & 255), (a = e[f + b]);\n    }\n    function Gf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h;\n        for (h = 0; h < g; ++h) e[f + h] = (a[b + h] + c[d + h]) & 255;\n      }\n    }\n    function Hf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h = a[b + 0],\n          k = h,\n          l = h,\n          m;\n        for (m = 0; m < g; ++m)\n          (h = a[b + m]),\n            (k = l + h - k),\n            (l = (c[d + m] + (k & -256 ? (0 > k ? 0 : 255) : k)) & 255),\n            (k = h),\n            (e[f + m] = l);\n      }\n    }\n    function Le(a, b, c, d) {\n      var e = b.width,\n        f = b.o;\n      x(null != a && null != b);\n      if (0 > c || 0 >= d || c + d > f) return null;\n      if (!a.Cc) {\n        if (null == a.ga) {\n          a.ga = new Ff();\n          var g;\n          (g = null == a.ga) ||\n            ((g = b.width * b.o),\n            x(0 == a.Gb.length),\n            (a.Gb = V(g)),\n            (a.Uc = 0),\n            null == a.Gb\n              ? (g = 0)\n              : ((a.mb = a.Gb), (a.nb = a.Uc), (a.rc = null), (g = 1)),\n            (g = !g));\n          if (!g) {\n            g = a.ga;\n            var h = a.Fa,\n              k = a.P,\n              l = a.qc,\n              m = a.mb,\n              n = a.nb,\n              r = k + 1,\n              q = l - 1,\n              t = g.l;\n            x(null != h && null != m && null != b);\n            ia[0] = null;\n            ia[1] = Rb;\n            ia[2] = Gf;\n            ia[3] = Hf;\n            g.ca = m;\n            g.tb = n;\n            g.c = b.width;\n            g.i = b.height;\n            x(0 < g.c && 0 < g.i);\n            if (1 >= l) b = 0;\n            else if (\n              ((g.$a = (h[k + 0] >> 0) & 3),\n              (g.Z = (h[k + 0] >> 2) & 3),\n              (g.Lc = (h[k + 0] >> 4) & 3),\n              (k = (h[k + 0] >> 6) & 3),\n              0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k)\n            )\n              b = 0;\n            else if (\n              ((t.put = kc),\n              (t.ac = gc),\n              (t.bc = lc),\n              (t.ma = g),\n              (t.width = b.width),\n              (t.height = b.height),\n              (t.Da = b.Da),\n              (t.v = b.v),\n              (t.va = b.va),\n              (t.j = b.j),\n              (t.o = b.o),\n              g.$a)\n            )\n              b: {\n                x(1 == g.$a), (b = Bc());\n                c: for (;;) {\n                  if (null == b) {\n                    b = 0;\n                    break b;\n                  }\n                  x(null != g);\n                  g.mc = b;\n                  b.c = g.c;\n                  b.i = g.i;\n                  b.l = g.l;\n                  b.l.ma = g;\n                  b.l.width = g.c;\n                  b.l.height = g.i;\n                  b.a = 0;\n                  cb(b.m, h, r, q);\n                  if (!rb(g.c, g.i, 1, b, null)) break c;\n                  1 == b.ab && 3 == b.gc[0].hc && yc(b.s)\n                    ? ((g.ic = 1),\n                      (h = b.c * b.i),\n                      (b.Ta = null),\n                      (b.Ua = 0),\n                      (b.V = V(h)),\n                      (b.Ba = 0),\n                      null == b.V ? ((b.a = 1), (b = 0)) : (b = 1))\n                    : ((g.ic = 0), (b = Ec(b, g.c)));\n                  if (!b) break c;\n                  b = 1;\n                  break b;\n                }\n                g.mc = null;\n                b = 0;\n              }\n            else b = q >= g.c * g.i;\n            g = !b;\n          }\n          if (g) return null;\n          1 != a.ga.Lc ? (a.Ga = 0) : (d = f - c);\n        }\n        x(null != a.ga);\n        x(c + d <= f);\n        a: {\n          h = a.ga;\n          b = h.c;\n          f = h.l.o;\n          if (0 == h.$a) {\n            r = a.rc;\n            q = a.Vc;\n            t = a.Fa;\n            k = a.P + 1 + c * b;\n            l = a.mb;\n            m = a.nb + c * b;\n            x(k <= a.P + a.qc);\n            if (0 != h.Z)\n              for (x(null != ia[h.Z]), g = 0; g < d; ++g)\n                ia[h.Z](r, q, t, k, l, m, b),\n                  (r = l),\n                  (q = m),\n                  (m += b),\n                  (k += b);\n            else\n              for (g = 0; g < d; ++g)\n                I(l, m, t, k, b), (r = l), (q = m), (m += b), (k += b);\n            a.rc = r;\n            a.Vc = q;\n          } else {\n            x(null != h.mc);\n            b = c + d;\n            g = h.mc;\n            x(null != g);\n            x(b <= g.i);\n            if (g.C >= b) b = 1;\n            else if ((h.ic || Aa(), h.ic)) {\n              var h = g.V,\n                r = g.Ba,\n                q = g.c,\n                v = g.i,\n                t = 1,\n                k = g.$ / q,\n                l = g.$ % q,\n                m = g.m,\n                n = g.s,\n                p = g.$,\n                u = q * v,\n                w = q * b,\n                y = n.wc,\n                A = p < w ? ha(n, l, k) : null;\n              x(p <= u);\n              x(b <= v);\n              x(yc(n));\n              c: for (;;) {\n                for (; !m.h && p < w; ) {\n                  l & y || (A = ha(n, l, k));\n                  x(null != A);\n                  Sa(m);\n                  v = ua(A.G[0], A.H[0], m);\n                  if (256 > v)\n                    (h[r + p] = v),\n                      ++p,\n                      ++l,\n                      l >= q && ((l = 0), ++k, k <= b && !(k % 16) && Ib(g, k));\n                  else if (280 > v) {\n                    var v = ib(v - 256, m);\n                    var E = ua(A.G[4], A.H[4], m);\n                    Sa(m);\n                    E = ib(E, m);\n                    E = nc(q, E);\n                    if (p >= E && u - p >= v) {\n                      var B;\n                      for (B = 0; B < v; ++B) h[r + p + B] = h[r + p + B - E];\n                    } else {\n                      t = 0;\n                      break c;\n                    }\n                    p += v;\n                    for (l += v; l >= q; )\n                      (l -= q), ++k, k <= b && !(k % 16) && Ib(g, k);\n                    p < w && l & y && (A = ha(n, l, k));\n                  } else {\n                    t = 0;\n                    break c;\n                  }\n                  x(m.h == db(m));\n                }\n                Ib(g, k > b ? b : k);\n                break c;\n              }\n              !t || (m.h && p < u) ? ((t = 0), (g.a = m.h ? 5 : 3)) : (g.$ = p);\n              b = t;\n            } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);\n            if (!b) {\n              d = 0;\n              break a;\n            }\n          }\n          c + d >= f && (a.Cc = 1);\n          d = 1;\n        }\n        if (!d) return null;\n        if (\n          a.Cc &&\n          ((d = a.ga), null != d && (d.mc = null), (a.ga = null), 0 < a.Ga)\n        )\n          return alert(\"todo:WebPDequantizeLevels\"), null;\n      }\n      return a.nb + c * e;\n    }\n    function If(a, b, c, d, e, f) {\n      for (; 0 < e--; ) {\n        var g = a,\n          h = b + (c ? 1 : 0),\n          k = a,\n          l = b + (c ? 0 : 3),\n          m;\n        for (m = 0; m < d; ++m) {\n          var n = k[l + 4 * m];\n          255 != n &&\n            ((n *= 32897),\n            (g[h + 4 * m + 0] = (g[h + 4 * m + 0] * n) >> 23),\n            (g[h + 4 * m + 1] = (g[h + 4 * m + 1] * n) >> 23),\n            (g[h + 4 * m + 2] = (g[h + 4 * m + 2] * n) >> 23));\n        }\n        b += f;\n      }\n    }\n    function Jf(a, b, c, d, e) {\n      for (; 0 < d--; ) {\n        var f;\n        for (f = 0; f < c; ++f) {\n          var g = a[b + 2 * f + 0],\n            h = a[b + 2 * f + 1],\n            k = h & 15,\n            l = 4369 * k,\n            h = (((h & 240) | (h >> 4)) * l) >> 16;\n          a[b + 2 * f + 0] =\n            (((((g & 240) | (g >> 4)) * l) >> 16) & 240) |\n            ((((((g & 15) | (g << 4)) * l) >> 16) >> 4) & 15);\n          a[b + 2 * f + 1] = (h & 240) | k;\n        }\n        b += e;\n      }\n    }\n    function Kf(a, b, c, d, e, f, g, h) {\n      var k = 255,\n        l,\n        m;\n      for (m = 0; m < e; ++m) {\n        for (l = 0; l < d; ++l) {\n          var n = a[b + l];\n          f[g + 4 * l] = n;\n          k &= n;\n        }\n        b += c;\n        g += h;\n      }\n      return 255 != k;\n    }\n    function Lf(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < e; ++f) c[d + f] = a[b + f] >> 8;\n    }\n    function Aa() {\n      za = If;\n      vc = Jf;\n      fc = Kf;\n      Fc = Lf;\n    }\n    function va(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {\n        var d,\n          E = (y - 1) >> 1;\n        var B = h[k + 0] | (l[m + 0] << 16);\n        var C = n[r + 0] | (q[t + 0] << 16);\n        x(null != a);\n        var z = (3 * B + C + 131074) >> 2;\n        b(a[e + 0], z & 255, z >> 16, v, p);\n        null != f &&\n          ((z = (3 * C + B + 131074) >> 2),\n          b(f[g + 0], z & 255, z >> 16, u, w));\n        for (d = 1; d <= E; ++d) {\n          var D = h[k + d] | (l[m + d] << 16);\n          var G = n[r + d] | (q[t + d] << 16);\n          var F = B + D + C + G + 524296;\n          var H = (F + 2 * (D + C)) >> 3;\n          F = (F + 2 * (B + G)) >> 3;\n          z = (H + B) >> 1;\n          B = (F + D) >> 1;\n          b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);\n          b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);\n          null != f &&\n            ((z = (F + C) >> 1),\n            (B = (H + G) >> 1),\n            b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c),\n            b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));\n          B = D;\n          C = G;\n        }\n        y & 1 ||\n          ((z = (3 * B + C + 131074) >> 2),\n          b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c),\n          null != f &&\n            ((z = (3 * C + B + 131074) >> 2),\n            b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));\n      };\n    }\n    function ic() {\n      P[Ca] = Mf;\n      P[Ua] = nd;\n      P[tc] = Nf;\n      P[Va] = od;\n      P[ya] = pd;\n      P[Db] = qd;\n      P[wc] = Of;\n      P[zb] = nd;\n      P[Ab] = od;\n      P[Ja] = pd;\n      P[Bb] = qd;\n    }\n    function Sb(a) {\n      return a & ~Pf ? (0 > a ? 0 : 255) : a >> rd;\n    }\n    function bb(a, b) {\n      return Sb(((19077 * a) >> 8) + ((26149 * b) >> 8) - 14234);\n    }\n    function nb(a, b, c) {\n      return Sb(\n        ((19077 * a) >> 8) - ((6419 * b) >> 8) - ((13320 * c) >> 8) + 8708\n      );\n    }\n    function Pa(a, b) {\n      return Sb(((19077 * a) >> 8) + ((33050 * b) >> 8) - 17685);\n    }\n    function Ga(a, b, c, d, e) {\n      d[e + 0] = bb(a, c);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = Pa(a, b);\n    }\n    function Tb(a, b, c, d, e) {\n      d[e + 0] = Pa(a, b);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = bb(a, c);\n    }\n    function sd(a, b, c, d, e) {\n      var f = nb(a, b, c);\n      b = ((f << 3) & 224) | (Pa(a, b) >> 3);\n      d[e + 0] = (bb(a, c) & 248) | (f >> 5);\n      d[e + 1] = b;\n    }\n    function td(a, b, c, d, e) {\n      var f = (Pa(a, b) & 240) | 15;\n      d[e + 0] = (bb(a, c) & 240) | (nb(a, b, c) >> 4);\n      d[e + 1] = f;\n    }\n    function ud(a, b, c, d, e) {\n      d[e + 0] = 255;\n      Ga(a, b, c, d, e + 1);\n    }\n    function vd(a, b, c, d, e) {\n      Tb(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function wd(a, b, c, d, e) {\n      Ga(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function la(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n) {\n        for (var d = m + (n & -2) * c; m != d; )\n          b(a[e + 0], f[g + 0], h[k + 0], l, m),\n            b(a[e + 1], f[g + 0], h[k + 0], l, m + c),\n            (e += 2),\n            ++g,\n            ++k,\n            (m += 2 * c);\n        n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);\n      };\n    }\n    function xd(a, b, c) {\n      return 0 == c ? (0 == a ? (0 == b ? 6 : 5) : 0 == b ? 4 : 0) : c;\n    }\n    function yd(a, b, c, d, e) {\n      switch (a >>> 30) {\n        case 3:\n          Za(b, c, d, e, 0);\n          break;\n        case 2:\n          fd(b, c, d, e);\n          break;\n        case 1:\n          pa(b, c, d, e);\n      }\n    }\n    function Oc(a, b) {\n      var c,\n        d,\n        e = b.M,\n        f = b.Nb,\n        g = a.oc,\n        h = a.pc + 40,\n        k = a.oc,\n        l = a.pc + 584,\n        m = a.oc,\n        n = a.pc + 600;\n      for (c = 0; 16 > c; ++c) g[h + 32 * c - 1] = 129;\n      for (c = 0; 8 > c; ++c)\n        (k[l + 32 * c - 1] = 129), (m[n + 32 * c - 1] = 129);\n      0 < e\n        ? (g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129)\n        : (M(g, h - 32 - 1, 127, 21),\n          M(k, l - 32 - 1, 127, 9),\n          M(m, n - 32 - 1, 127, 9));\n      for (d = 0; d < a.za; ++d) {\n        var r = b.ya[b.aa + d];\n        if (0 < d) {\n          for (c = -1; 16 > c; ++c) I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);\n          for (c = -1; 8 > c; ++c)\n            I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4),\n              I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);\n        }\n        var q = a.Gd,\n          t = a.Hd + d,\n          v = r.ad,\n          p = r.Hc;\n        0 < e &&\n          (I(g, h - 32, q[t].y, 0, 16),\n          I(k, l - 32, q[t].f, 0, 8),\n          I(m, n - 32, q[t].ea, 0, 8));\n        if (r.Za) {\n          var u = g;\n          var w = h - 32 + 16;\n          0 < e &&\n            (d >= a.za - 1\n              ? M(u, w, q[t].y[15], 4)\n              : I(u, w, q[t + 1].y, 0, 4));\n          for (c = 0; 4 > c; c++)\n            u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];\n          for (c = 0; 16 > c; ++c, p <<= 2)\n            (u = g), (w = h + zd[c]), W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);\n        } else if (((u = xd(d, e, r.Ob[0])), Y[u](g, h), 0 != p))\n          for (c = 0; 16 > c; ++c, p <<= 2) yd(p, v, 16 * +c, g, h + zd[c]);\n        c = r.Gc;\n        u = xd(d, e, r.Dd);\n        ka[u](k, l);\n        ka[u](m, n);\n        r = c >> 0;\n        p = v;\n        u = k;\n        w = l;\n        r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));\n        c >>= 8;\n        r = m;\n        p = n;\n        c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));\n        e < a.Ub - 1 &&\n          (I(q[t].y, 0, g, h + 480, 16),\n          I(q[t].f, 0, k, l + 224, 8),\n          I(q[t].ea, 0, m, n + 224, 8));\n        c = 8 * f * a.B;\n        q = a.sa;\n        t = a.ta + 16 * d + 16 * f * a.R;\n        v = a.qa;\n        r = a.ra + 8 * d + c;\n        p = a.Ha;\n        u = a.Ia + 8 * d + c;\n        for (c = 0; 16 > c; ++c) I(q, t + c * a.R, g, h + 32 * c, 16);\n        for (c = 0; 8 > c; ++c)\n          I(v, r + c * a.B, k, l + 32 * c, 8),\n            I(p, u + c * a.B, m, n + 32 * c, 8);\n      }\n    }\n    function Ad(a, b, c, d, e, f, g, h, k) {\n      var l = [0],\n        m = [0],\n        n = 0,\n        r = null != k ? k.kd : 0,\n        q = null != k ? k : new md();\n      if (null == a || 12 > c) return 7;\n      q.data = a;\n      q.w = b;\n      q.ha = c;\n      b = [b];\n      c = [c];\n      q.gb = [q.gb];\n      a: {\n        var t = b;\n        var v = c;\n        var p = q.gb;\n        x(null != a);\n        x(null != v);\n        x(null != p);\n        p[0] = 0;\n        if (12 <= v[0] && !fa(a, t[0], \"RIFF\")) {\n          if (fa(a, t[0] + 8, \"WEBP\")) {\n            p = 3;\n            break a;\n          }\n          var u = Ha(a, t[0] + 4);\n          if (12 > u || 4294967286 < u) {\n            p = 3;\n            break a;\n          }\n          if (r && u > v[0] - 8) {\n            p = 7;\n            break a;\n          }\n          p[0] = u;\n          t[0] += 12;\n          v[0] -= 12;\n        }\n        p = 0;\n      }\n      if (0 != p) return p;\n      u = 0 < q.gb[0];\n      for (c = c[0]; ; ) {\n        t = [0];\n        n = [n];\n        a: {\n          var w = a;\n          v = b;\n          p = c;\n          var y = n,\n            A = l,\n            z = m,\n            B = t;\n          y[0] = 0;\n          if (8 > p[0]) p = 7;\n          else {\n            if (!fa(w, v[0], \"VP8X\")) {\n              if (10 != Ha(w, v[0] + 4)) {\n                p = 3;\n                break a;\n              }\n              if (18 > p[0]) {\n                p = 7;\n                break a;\n              }\n              var C = Ha(w, v[0] + 8);\n              var D = 1 + Yb(w, v[0] + 12);\n              w = 1 + Yb(w, v[0] + 15);\n              if (2147483648 <= D * w) {\n                p = 3;\n                break a;\n              }\n              null != B && (B[0] = C);\n              null != A && (A[0] = D);\n              null != z && (z[0] = w);\n              v[0] += 18;\n              p[0] -= 18;\n              y[0] = 1;\n            }\n            p = 0;\n          }\n        }\n        n = n[0];\n        t = t[0];\n        if (0 != p) return p;\n        v = !!(t & 2);\n        if (!u && n) return 3;\n        null != f && (f[0] = !!(t & 16));\n        null != g && (g[0] = v);\n        null != h && (h[0] = 0);\n        g = l[0];\n        t = m[0];\n        if (n && v && null == k) {\n          p = 0;\n          break;\n        }\n        if (4 > c) {\n          p = 7;\n          break;\n        }\n        if ((u && n) || (!u && !n && !fa(a, b[0], \"ALPH\"))) {\n          c = [c];\n          q.na = [q.na];\n          q.P = [q.P];\n          q.Sa = [q.Sa];\n          a: {\n            C = a;\n            p = b;\n            u = c;\n            var y = q.gb,\n              A = q.na,\n              z = q.P,\n              B = q.Sa;\n            D = 22;\n            x(null != C);\n            x(null != u);\n            w = p[0];\n            var F = u[0];\n            x(null != A);\n            x(null != B);\n            A[0] = null;\n            z[0] = null;\n            for (B[0] = 0; ; ) {\n              p[0] = w;\n              u[0] = F;\n              if (8 > F) {\n                p = 7;\n                break a;\n              }\n              var G = Ha(C, w + 4);\n              if (4294967286 < G) {\n                p = 3;\n                break a;\n              }\n              var H = (8 + G + 1) & -2;\n              D += H;\n              if (0 < y && D > y) {\n                p = 3;\n                break a;\n              }\n              if (!fa(C, w, \"VP8 \") || !fa(C, w, \"VP8L\")) {\n                p = 0;\n                break a;\n              }\n              if (F[0] < H) {\n                p = 7;\n                break a;\n              }\n              fa(C, w, \"ALPH\") || ((A[0] = C), (z[0] = w + 8), (B[0] = G));\n              w += H;\n              F -= H;\n            }\n          }\n          c = c[0];\n          q.na = q.na[0];\n          q.P = q.P[0];\n          q.Sa = q.Sa[0];\n          if (0 != p) break;\n        }\n        c = [c];\n        q.Ja = [q.Ja];\n        q.xa = [q.xa];\n        a: if (\n          ((y = a),\n          (p = b),\n          (u = c),\n          (A = q.gb[0]),\n          (z = q.Ja),\n          (B = q.xa),\n          (C = p[0]),\n          (w = !fa(y, C, \"VP8 \")),\n          (D = !fa(y, C, \"VP8L\")),\n          x(null != y),\n          x(null != u),\n          x(null != z),\n          x(null != B),\n          8 > u[0])\n        )\n          p = 7;\n        else {\n          if (w || D) {\n            y = Ha(y, C + 4);\n            if (12 <= A && y > A - 12) {\n              p = 3;\n              break a;\n            }\n            if (r && y > u[0] - 8) {\n              p = 7;\n              break a;\n            }\n            z[0] = y;\n            p[0] += 8;\n            u[0] -= 8;\n            B[0] = D;\n          } else\n            (B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5)),\n              (z[0] = u[0]);\n          p = 0;\n        }\n        c = c[0];\n        q.Ja = q.Ja[0];\n        q.xa = q.xa[0];\n        b = b[0];\n        if (0 != p) break;\n        if (4294967286 < q.Ja) return 3;\n        null == h || v || (h[0] = q.xa ? 2 : 1);\n        g = [g];\n        t = [t];\n        if (q.xa) {\n          if (5 > c) {\n            p = 7;\n            break;\n          }\n          h = g;\n          r = t;\n          v = f;\n          null == a || 5 > c\n            ? (a = 0)\n            : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5)\n            ? ((u = [0]),\n              (y = [0]),\n              (A = [0]),\n              (z = new Ra()),\n              cb(z, a, b, c),\n              mc(z, u, y, A)\n                ? (null != h && (h[0] = u[0]),\n                  null != r && (r[0] = y[0]),\n                  null != v && (v[0] = A[0]),\n                  (a = 1))\n                : (a = 0))\n            : (a = 0);\n        } else {\n          if (10 > c) {\n            p = 7;\n            break;\n          }\n          h = t;\n          null == a || 10 > c || !Jc(a, b + 3, c - 3)\n            ? (a = 0)\n            : ((r = a[b + 0] | (a[b + 1] << 8) | (a[b + 2] << 16)),\n              (v = ((a[b + 7] << 8) | a[b + 6]) & 16383),\n              (a = ((a[b + 9] << 8) | a[b + 8]) & 16383),\n              r & 1 ||\n              3 < ((r >> 1) & 7) ||\n              !((r >> 4) & 1) ||\n              r >> 5 >= q.Ja ||\n              !v ||\n              !a\n                ? (a = 0)\n                : (g && (g[0] = v), h && (h[0] = a), (a = 1)));\n        }\n        if (!a) return 3;\n        g = g[0];\n        t = t[0];\n        if (n && (l[0] != g || m[0] != t)) return 3;\n        null != k &&\n          ((k[0] = q),\n          (k.offset = b - k.w),\n          x(4294967286 > b - k.w),\n          x(k.offset == k.ha - c));\n        break;\n      }\n      return 0 == p || (7 == p && n && null == k)\n        ? (null != f && (f[0] |= null != q.na && 0 < q.na.length),\n          null != d && (d[0] = g),\n          null != e && (e[0] = t),\n          0)\n        : p;\n    }\n    function hc(a, b, c) {\n      var d = b.width,\n        e = b.height,\n        f = 0,\n        g = 0,\n        h = d,\n        k = e;\n      b.Da = null != a && 0 < a.Da;\n      if (\n        b.Da &&\n        ((h = a.cd),\n        (k = a.bd),\n        (f = a.v),\n        (g = a.j),\n        11 > c || ((f &= -2), (g &= -2)),\n        0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)\n      )\n        return 0;\n      b.v = f;\n      b.j = g;\n      b.va = f + h;\n      b.o = g + k;\n      b.U = h;\n      b.T = k;\n      b.da = null != a && 0 < a.da;\n      if (b.da) {\n        c = [a.ib];\n        f = [a.hb];\n        if (!bc(h, k, c, f)) return 0;\n        b.ib = c[0];\n        b.hb = f[0];\n      }\n      b.ob = null != a && a.ob;\n      b.Kb = null == a || !a.Sd;\n      b.da && ((b.ob = b.ib < (3 * d) / 4 && b.hb < (3 * e) / 4), (b.Kb = 0));\n      return 1;\n    }\n    function Bd(a) {\n      if (null == a) return 2;\n      if (11 > a.S) {\n        var b = a.f.RGBA;\n        b.fb += (a.height - 1) * b.A;\n        b.A = -b.A;\n      } else\n        (b = a.f.kb),\n          (a = a.height),\n          (b.O += (a - 1) * b.fa),\n          (b.fa = -b.fa),\n          (b.N += ((a - 1) >> 1) * b.Ab),\n          (b.Ab = -b.Ab),\n          (b.W += ((a - 1) >> 1) * b.Db),\n          (b.Db = -b.Db),\n          null != b.F && ((b.J += (a - 1) * b.lb), (b.lb = -b.lb));\n      return 0;\n    }\n    function Cd(a, b, c, d) {\n      if (null == d || 0 >= a || 0 >= b) return 2;\n      if (null != c) {\n        if (c.Da) {\n          var e = c.cd,\n            f = c.bd,\n            g = c.v & -2,\n            h = c.j & -2;\n          if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b)\n            return 2;\n          a = e;\n          b = f;\n        }\n        if (c.da) {\n          e = [c.ib];\n          f = [c.hb];\n          if (!bc(a, b, e, f)) return 2;\n          a = e[0];\n          b = f[0];\n        }\n      }\n      d.width = a;\n      d.height = b;\n      a: {\n        var k = d.width;\n        var l = d.height;\n        a = d.S;\n        if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;\n        else {\n          if (0 >= d.Rd && null == d.sd) {\n            var g = (f = e = b = 0),\n              h = k * Dd[a],\n              m = h * l;\n            11 > a ||\n              ((b = (k + 1) / 2),\n              (f = ((l + 1) / 2) * b),\n              12 == a && ((e = k), (g = e * l)));\n            l = V(m + 2 * f + g);\n            if (null == l) {\n              a = 1;\n              break a;\n            }\n            d.sd = l;\n            11 > a\n              ? ((k = d.f.RGBA),\n                (k.eb = l),\n                (k.fb = 0),\n                (k.A = h),\n                (k.size = m))\n              : ((k = d.f.kb),\n                (k.y = l),\n                (k.O = 0),\n                (k.fa = h),\n                (k.Fd = m),\n                (k.f = l),\n                (k.N = 0 + m),\n                (k.Ab = b),\n                (k.Cd = f),\n                (k.ea = l),\n                (k.W = 0 + m + f),\n                (k.Db = b),\n                (k.Ed = f),\n                12 == a && ((k.F = l), (k.J = 0 + m + 2 * f)),\n                (k.Tc = g),\n                (k.lb = e));\n          }\n          b = 1;\n          e = d.S;\n          f = d.width;\n          g = d.height;\n          if (e >= Ca && 13 > e)\n            if (11 > e)\n              (a = d.f.RGBA),\n                (h = Math.abs(a.A)),\n                (b &= h * (g - 1) + f <= a.size),\n                (b &= h >= f * Dd[e]),\n                (b &= null != a.eb);\n            else {\n              a = d.f.kb;\n              h = (f + 1) / 2;\n              m = (g + 1) / 2;\n              k = Math.abs(a.fa);\n              var l = Math.abs(a.Ab),\n                n = Math.abs(a.Db),\n                r = Math.abs(a.lb),\n                q = r * (g - 1) + f;\n              b &= k * (g - 1) + f <= a.Fd;\n              b &= l * (m - 1) + h <= a.Cd;\n              b &= n * (m - 1) + h <= a.Ed;\n              b = b & (k >= f) & (l >= h) & (n >= h);\n              b &= null != a.y;\n              b &= null != a.f;\n              b &= null != a.ea;\n              12 == e && ((b &= r >= f), (b &= q <= a.Tc), (b &= null != a.F));\n            }\n          else b = 0;\n          a = b ? 0 : 2;\n        }\n      }\n      if (0 != a) return a;\n      null != c && c.fd && (a = Bd(d));\n      return a;\n    }\n    var xb = 64,\n      Hd = [\n        0,\n        1,\n        3,\n        7,\n        15,\n        31,\n        63,\n        127,\n        255,\n        511,\n        1023,\n        2047,\n        4095,\n        8191,\n        16383,\n        32767,\n        65535,\n        131071,\n        262143,\n        524287,\n        1048575,\n        2097151,\n        4194303,\n        8388607,\n        16777215\n      ],\n      Gd = 24,\n      ob = 32,\n      Xb = 8,\n      Id = [\n        0,\n        0,\n        1,\n        1,\n        2,\n        2,\n        2,\n        2,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7\n      ];\n    X(\"Predictor0\", \"PredictorAdd0\");\n    self.Predictor0 = function() {\n      return 4278190080;\n    };\n    self.Predictor1 = function(a) {\n      return a;\n    };\n    self.Predictor2 = function(a, b, c) {\n      return b[c + 0];\n    };\n    self.Predictor3 = function(a, b, c) {\n      return b[c + 1];\n    };\n    self.Predictor4 = function(a, b, c) {\n      return b[c - 1];\n    };\n    self.Predictor5 = function(a, b, c) {\n      return aa(aa(a, b[c + 1]), b[c + 0]);\n    };\n    self.Predictor6 = function(a, b, c) {\n      return aa(a, b[c - 1]);\n    };\n    self.Predictor7 = function(a, b, c) {\n      return aa(a, b[c + 0]);\n    };\n    self.Predictor8 = function(a, b, c) {\n      return aa(b[c - 1], b[c + 0]);\n    };\n    self.Predictor9 = function(a, b, c) {\n      return aa(b[c + 0], b[c + 1]);\n    };\n    self.Predictor10 = function(a, b, c) {\n      return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));\n    };\n    self.Predictor11 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return 0 >=\n        Ia((d >> 24) & 255, (a >> 24) & 255, (b >> 24) & 255) +\n          Ia((d >> 16) & 255, (a >> 16) & 255, (b >> 16) & 255) +\n          Ia((d >> 8) & 255, (a >> 8) & 255, (b >> 8) & 255) +\n          Ia(d & 255, a & 255, b & 255)\n        ? d\n        : a;\n    };\n    self.Predictor12 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return (\n        ((sa(((a >> 24) & 255) + ((d >> 24) & 255) - ((b >> 24) & 255)) << 24) |\n          (sa(((a >> 16) & 255) + ((d >> 16) & 255) - ((b >> 16) & 255)) <<\n            16) |\n          (sa(((a >> 8) & 255) + ((d >> 8) & 255) - ((b >> 8) & 255)) << 8) |\n          sa((a & 255) + (d & 255) - (b & 255))) >>>\n        0\n      );\n    };\n    self.Predictor13 = function(a, b, c) {\n      var d = b[c - 1];\n      a = aa(a, b[c + 0]);\n      return (\n        ((eb((a >> 24) & 255, (d >> 24) & 255) << 24) |\n          (eb((a >> 16) & 255, (d >> 16) & 255) << 16) |\n          (eb((a >> 8) & 255, (d >> 8) & 255) << 8) |\n          eb((a >> 0) & 255, (d >> 0) & 255)) >>>\n        0\n      );\n    };\n    var ee = self.PredictorAdd0;\n    self.PredictorAdd1 = cc;\n    X(\"Predictor2\", \"PredictorAdd2\");\n    X(\"Predictor3\", \"PredictorAdd3\");\n    X(\"Predictor4\", \"PredictorAdd4\");\n    X(\"Predictor5\", \"PredictorAdd5\");\n    X(\"Predictor6\", \"PredictorAdd6\");\n    X(\"Predictor7\", \"PredictorAdd7\");\n    X(\"Predictor8\", \"PredictorAdd8\");\n    X(\"Predictor9\", \"PredictorAdd9\");\n    X(\"Predictor10\", \"PredictorAdd10\");\n    X(\"Predictor11\", \"PredictorAdd11\");\n    X(\"Predictor12\", \"PredictorAdd12\");\n    X(\"Predictor13\", \"PredictorAdd13\");\n    var fe = self.PredictorAdd2;\n    ec(\n      \"ColorIndexInverseTransform\",\n      \"MapARGB\",\n      \"32b\",\n      function(a) {\n        return (a >> 8) & 255;\n      },\n      function(a) {\n        return a;\n      }\n    );\n    ec(\n      \"VP8LColorIndexInverseTransformAlpha\",\n      \"MapAlpha\",\n      \"8b\",\n      function(a) {\n        return a;\n      },\n      function(a) {\n        return (a >> 8) & 255;\n      }\n    );\n    var rc = self.ColorIndexInverseTransform,\n      ke = self.MapARGB,\n      he = self.VP8LColorIndexInverseTransformAlpha,\n      le = self.MapAlpha,\n      pc,\n      qc = (self.VP8LPredictorsAdd = []);\n    qc.length = 16;\n    (self.VP8LPredictors = []).length = 16;\n    (self.VP8LPredictorsAdd_C = []).length = 16;\n    (self.VP8LPredictors_C = []).length = 16;\n    var Fb,\n      sc,\n      Gb,\n      Hb,\n      xc,\n      uc,\n      bd = V(511),\n      cd = V(2041),\n      dd = V(225),\n      ed = V(767),\n      ad = 0,\n      Qb = cd,\n      mb = dd,\n      R = ed,\n      U = bd,\n      Ca = 0,\n      Ua = 1,\n      tc = 2,\n      Va = 3,\n      ya = 4,\n      Db = 5,\n      wc = 6,\n      zb = 7,\n      Ab = 8,\n      Ja = 9,\n      Bb = 10,\n      pe = [2, 3, 7],\n      oe = [3, 3, 11],\n      Dc = [280, 256, 256, 256, 40],\n      qe = [0, 1, 1, 1, 0],\n      ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n      de = [\n        24,\n        7,\n        23,\n        25,\n        40,\n        6,\n        39,\n        41,\n        22,\n        26,\n        38,\n        42,\n        56,\n        5,\n        55,\n        57,\n        21,\n        27,\n        54,\n        58,\n        37,\n        43,\n        72,\n        4,\n        71,\n        73,\n        20,\n        28,\n        53,\n        59,\n        70,\n        74,\n        36,\n        44,\n        88,\n        69,\n        75,\n        52,\n        60,\n        3,\n        87,\n        89,\n        19,\n        29,\n        86,\n        90,\n        35,\n        45,\n        68,\n        76,\n        85,\n        91,\n        51,\n        61,\n        104,\n        2,\n        103,\n        105,\n        18,\n        30,\n        102,\n        106,\n        34,\n        46,\n        84,\n        92,\n        67,\n        77,\n        101,\n        107,\n        50,\n        62,\n        120,\n        1,\n        119,\n        121,\n        83,\n        93,\n        17,\n        31,\n        100,\n        108,\n        66,\n        78,\n        118,\n        122,\n        33,\n        47,\n        117,\n        123,\n        49,\n        63,\n        99,\n        109,\n        82,\n        94,\n        0,\n        116,\n        124,\n        65,\n        79,\n        16,\n        32,\n        98,\n        110,\n        48,\n        115,\n        125,\n        81,\n        95,\n        64,\n        114,\n        126,\n        97,\n        111,\n        80,\n        113,\n        127,\n        96,\n        112\n      ],\n      me = [\n        2954,\n        2956,\n        2958,\n        2962,\n        2970,\n        2986,\n        3018,\n        3082,\n        3212,\n        3468,\n        3980,\n        5004\n      ],\n      ie = 8,\n      Lb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        17,\n        18,\n        19,\n        20,\n        20,\n        21,\n        21,\n        22,\n        22,\n        23,\n        23,\n        24,\n        25,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        59,\n        60,\n        61,\n        62,\n        63,\n        64,\n        65,\n        66,\n        67,\n        68,\n        69,\n        70,\n        71,\n        72,\n        73,\n        74,\n        75,\n        76,\n        76,\n        77,\n        78,\n        79,\n        80,\n        81,\n        82,\n        83,\n        84,\n        85,\n        86,\n        87,\n        88,\n        89,\n        91,\n        93,\n        95,\n        96,\n        98,\n        100,\n        101,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        118,\n        122,\n        124,\n        126,\n        128,\n        130,\n        132,\n        134,\n        136,\n        138,\n        140,\n        143,\n        145,\n        148,\n        151,\n        154,\n        157\n      ],\n      Mb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        18,\n        19,\n        20,\n        21,\n        22,\n        23,\n        24,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        60,\n        62,\n        64,\n        66,\n        68,\n        70,\n        72,\n        74,\n        76,\n        78,\n        80,\n        82,\n        84,\n        86,\n        88,\n        90,\n        92,\n        94,\n        96,\n        98,\n        100,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        119,\n        122,\n        125,\n        128,\n        131,\n        134,\n        137,\n        140,\n        143,\n        146,\n        149,\n        152,\n        155,\n        158,\n        161,\n        164,\n        167,\n        170,\n        173,\n        177,\n        181,\n        185,\n        189,\n        193,\n        197,\n        201,\n        205,\n        209,\n        213,\n        217,\n        221,\n        225,\n        229,\n        234,\n        239,\n        245,\n        249,\n        254,\n        259,\n        264,\n        269,\n        274,\n        279,\n        284\n      ],\n      oa = null,\n      He = [\n        [173, 148, 140, 0],\n        [176, 155, 140, 135, 0],\n        [180, 157, 141, 134, 130, 0],\n        [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]\n      ],\n      Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],\n      Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],\n      Fe = [\n        [\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],\n            [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128],\n            [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],\n            [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],\n            [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]\n          ],\n          [\n            [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],\n            [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],\n            [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],\n            [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],\n            [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128],\n            [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],\n            [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],\n            [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],\n            [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],\n            [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],\n            [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]\n          ],\n          [\n            [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],\n            [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],\n            [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]\n          ],\n          [\n            [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],\n            [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],\n            [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]\n          ],\n          [\n            [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],\n            [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],\n            [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],\n            [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],\n            [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]\n          ],\n          [\n            [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],\n            [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],\n            [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],\n            [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],\n            [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]\n          ],\n          [\n            [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],\n            [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],\n            [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128],\n            [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]\n          ],\n          [\n            [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],\n            [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],\n            [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],\n            [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],\n            [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]\n          ],\n          [\n            [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],\n            [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],\n            [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],\n            [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],\n            [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],\n            [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],\n            [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],\n            [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]\n          ],\n          [\n            [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],\n            [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],\n            [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]\n          ],\n          [\n            [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],\n            [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],\n            [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]\n          ],\n          [\n            [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],\n            [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128],\n            [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]\n          ],\n          [\n            [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],\n            [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],\n            [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]\n          ],\n          [\n            [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],\n            [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],\n            [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],\n            [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],\n            [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ]\n      ],\n      Ke = [\n        [\n          [231, 120, 48, 89, 115, 113, 120, 152, 112],\n          [152, 179, 64, 126, 170, 118, 46, 70, 95],\n          [175, 69, 143, 80, 85, 82, 72, 155, 103],\n          [56, 58, 10, 171, 218, 189, 17, 13, 152],\n          [114, 26, 17, 163, 44, 195, 21, 10, 173],\n          [121, 24, 80, 195, 26, 62, 44, 64, 85],\n          [144, 71, 10, 38, 171, 213, 144, 34, 26],\n          [170, 46, 55, 19, 136, 160, 33, 206, 71],\n          [63, 20, 8, 114, 114, 208, 12, 9, 226],\n          [81, 40, 11, 96, 182, 84, 29, 16, 36]\n        ],\n        [\n          [134, 183, 89, 137, 98, 101, 106, 165, 148],\n          [72, 187, 100, 130, 157, 111, 32, 75, 80],\n          [66, 102, 167, 99, 74, 62, 40, 234, 128],\n          [41, 53, 9, 178, 241, 141, 26, 8, 107],\n          [74, 43, 26, 146, 73, 166, 49, 23, 157],\n          [65, 38, 105, 160, 51, 52, 31, 115, 128],\n          [104, 79, 12, 27, 217, 255, 87, 17, 7],\n          [87, 68, 71, 44, 114, 51, 15, 186, 23],\n          [47, 41, 14, 110, 182, 183, 21, 17, 194],\n          [66, 45, 25, 102, 197, 189, 23, 18, 22]\n        ],\n        [\n          [88, 88, 147, 150, 42, 46, 45, 196, 205],\n          [43, 97, 183, 117, 85, 38, 35, 179, 61],\n          [39, 53, 200, 87, 26, 21, 43, 232, 171],\n          [56, 34, 51, 104, 114, 102, 29, 93, 77],\n          [39, 28, 85, 171, 58, 165, 90, 98, 64],\n          [34, 22, 116, 206, 23, 34, 43, 166, 73],\n          [107, 54, 32, 26, 51, 1, 81, 43, 31],\n          [68, 25, 106, 22, 64, 171, 36, 225, 114],\n          [34, 19, 21, 102, 132, 188, 16, 76, 124],\n          [62, 18, 78, 95, 85, 57, 50, 48, 51]\n        ],\n        [\n          [193, 101, 35, 159, 215, 111, 89, 46, 111],\n          [60, 148, 31, 172, 219, 228, 21, 18, 111],\n          [112, 113, 77, 85, 179, 255, 38, 120, 114],\n          [40, 42, 1, 196, 245, 209, 10, 25, 109],\n          [88, 43, 29, 140, 166, 213, 37, 43, 154],\n          [61, 63, 30, 155, 67, 45, 68, 1, 209],\n          [100, 80, 8, 43, 154, 1, 51, 26, 71],\n          [142, 78, 78, 16, 255, 128, 34, 197, 171],\n          [41, 40, 5, 102, 211, 183, 4, 1, 221],\n          [51, 50, 17, 168, 209, 192, 23, 25, 82]\n        ],\n        [\n          [138, 31, 36, 171, 27, 166, 38, 44, 229],\n          [67, 87, 58, 169, 82, 115, 26, 59, 179],\n          [63, 59, 90, 180, 59, 166, 93, 73, 154],\n          [40, 40, 21, 116, 143, 209, 34, 39, 175],\n          [47, 15, 16, 183, 34, 223, 49, 45, 183],\n          [46, 17, 33, 183, 6, 98, 15, 32, 183],\n          [57, 46, 22, 24, 128, 1, 54, 17, 37],\n          [65, 32, 73, 115, 28, 128, 23, 128, 205],\n          [40, 3, 9, 115, 51, 192, 18, 6, 223],\n          [87, 37, 9, 115, 59, 77, 64, 21, 47]\n        ],\n        [\n          [104, 55, 44, 218, 9, 54, 53, 130, 226],\n          [64, 90, 70, 205, 40, 41, 23, 26, 57],\n          [54, 57, 112, 184, 5, 41, 38, 166, 213],\n          [30, 34, 26, 133, 152, 116, 10, 32, 134],\n          [39, 19, 53, 221, 26, 114, 32, 73, 255],\n          [31, 9, 65, 234, 2, 15, 1, 118, 73],\n          [75, 32, 12, 51, 192, 255, 160, 43, 51],\n          [88, 31, 35, 67, 102, 85, 55, 186, 85],\n          [56, 21, 23, 111, 59, 205, 45, 37, 192],\n          [55, 38, 70, 124, 73, 102, 1, 34, 98]\n        ],\n        [\n          [125, 98, 42, 88, 104, 85, 117, 175, 82],\n          [95, 84, 53, 89, 128, 100, 113, 101, 45],\n          [75, 79, 123, 47, 51, 128, 81, 171, 1],\n          [57, 17, 5, 71, 102, 57, 53, 41, 49],\n          [38, 33, 13, 121, 57, 73, 26, 1, 85],\n          [41, 10, 67, 138, 77, 110, 90, 47, 114],\n          [115, 21, 2, 10, 102, 255, 166, 23, 6],\n          [101, 29, 16, 10, 85, 128, 101, 196, 26],\n          [57, 18, 10, 102, 102, 213, 34, 20, 43],\n          [117, 20, 15, 36, 163, 128, 68, 1, 26]\n        ],\n        [\n          [102, 61, 71, 37, 34, 53, 31, 243, 192],\n          [69, 60, 71, 38, 73, 119, 28, 222, 37],\n          [68, 45, 128, 34, 1, 47, 11, 245, 171],\n          [62, 17, 19, 70, 146, 85, 55, 62, 70],\n          [37, 43, 37, 154, 100, 163, 85, 160, 1],\n          [63, 9, 92, 136, 28, 64, 32, 201, 85],\n          [75, 15, 9, 9, 64, 255, 184, 119, 16],\n          [86, 6, 28, 5, 64, 255, 25, 248, 1],\n          [56, 8, 17, 132, 137, 255, 55, 116, 128],\n          [58, 15, 20, 82, 135, 57, 26, 121, 40]\n        ],\n        [\n          [164, 50, 31, 137, 154, 133, 25, 35, 218],\n          [51, 103, 44, 131, 131, 123, 31, 6, 158],\n          [86, 40, 64, 135, 148, 224, 45, 183, 128],\n          [22, 26, 17, 131, 240, 154, 14, 1, 209],\n          [45, 16, 21, 91, 64, 222, 7, 1, 197],\n          [56, 21, 39, 155, 60, 138, 23, 102, 213],\n          [83, 12, 13, 54, 192, 255, 68, 47, 28],\n          [85, 26, 85, 85, 128, 128, 32, 146, 171],\n          [18, 11, 7, 63, 144, 171, 4, 4, 246],\n          [35, 27, 10, 146, 174, 171, 12, 26, 128]\n        ],\n        [\n          [190, 80, 35, 99, 180, 80, 126, 54, 45],\n          [85, 126, 47, 87, 176, 51, 41, 20, 32],\n          [101, 75, 128, 139, 118, 146, 116, 128, 85],\n          [56, 41, 15, 176, 236, 85, 37, 9, 62],\n          [71, 30, 17, 119, 118, 255, 17, 18, 138],\n          [101, 38, 60, 138, 55, 70, 43, 26, 142],\n          [146, 36, 19, 30, 171, 255, 97, 27, 20],\n          [138, 45, 61, 62, 219, 1, 81, 188, 64],\n          [32, 41, 20, 117, 151, 142, 20, 21, 163],\n          [112, 19, 12, 61, 195, 128, 48, 4, 24]\n        ]\n      ],\n      Ee = [\n        [\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],\n            [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255],\n            [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],\n            [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ]\n      ],\n      Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],\n      Nc,\n      Y = [],\n      W = [],\n      ka = [],\n      Za,\n      fd,\n      Nb,\n      pa,\n      Ob,\n      Xc,\n      Tc,\n      Yc,\n      Uc,\n      Zc,\n      Vc,\n      $c,\n      Wc,\n      Rc,\n      Pc,\n      Sc,\n      Qc,\n      re = 1,\n      Cc = 2,\n      ia = [],\n      za,\n      vc,\n      fc,\n      Fc,\n      P = [];\n    va(\"UpsampleRgbLinePair\", Ga, 3);\n    va(\"UpsampleBgrLinePair\", Tb, 3);\n    va(\"UpsampleRgbaLinePair\", wd, 4);\n    va(\"UpsampleBgraLinePair\", vd, 4);\n    va(\"UpsampleArgbLinePair\", ud, 4);\n    va(\"UpsampleRgba4444LinePair\", td, 2);\n    va(\"UpsampleRgb565LinePair\", sd, 2);\n    var Mf = self.UpsampleRgbLinePair,\n      Nf = self.UpsampleBgrLinePair,\n      nd = self.UpsampleRgbaLinePair,\n      od = self.UpsampleBgraLinePair,\n      pd = self.UpsampleArgbLinePair,\n      qd = self.UpsampleRgba4444LinePair,\n      Of = self.UpsampleRgb565LinePair,\n      Wa = 16,\n      Ba = 1 << (Wa - 1),\n      ta = -227,\n      Eb = 482,\n      rd = 6,\n      Pf = (256 << rd) - 1,\n      jc = 0,\n      Yd = V(256),\n      ae = V(256),\n      $d = V(256),\n      Zd = V(256),\n      be = V(Eb - ta),\n      ce = V(Eb - ta);\n    la(\"YuvToRgbRow\", Ga, 3);\n    la(\"YuvToBgrRow\", Tb, 3);\n    la(\"YuvToRgbaRow\", wd, 4);\n    la(\"YuvToBgraRow\", vd, 4);\n    la(\"YuvToArgbRow\", ud, 4);\n    la(\"YuvToRgba4444Row\", td, 2);\n    la(\"YuvToRgb565Row\", sd, 2);\n    var zd = [\n        0,\n        4,\n        8,\n        12,\n        128,\n        132,\n        136,\n        140,\n        256,\n        260,\n        264,\n        268,\n        384,\n        388,\n        392,\n        396\n      ],\n      Ya = [0, 2, 8],\n      Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],\n      Ne = 1;\n    this.WebPDecodeRGBA = function(a, b, c, d, e) {\n      var f = Ua;\n      var g = new Cf(),\n        h = new Cb();\n      g.ba = h;\n      h.S = f;\n      h.width = [h.width];\n      h.height = [h.height];\n      var k = h.width;\n      var l = h.height,\n        m = new Td();\n      if (null == m || null == a) var n = 2;\n      else\n        x(null != m),\n          (n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null));\n      0 != n\n        ? (k = 0)\n        : (null != k && (k[0] = m.width[0]),\n          null != l && (l[0] = m.height[0]),\n          (k = 1));\n      if (k) {\n        h.width = h.width[0];\n        h.height = h.height[0];\n        null != d && (d[0] = h.width);\n        null != e && (e[0] = h.height);\n        b: {\n          d = new Oa();\n          e = new md();\n          e.data = a;\n          e.w = b;\n          e.ha = c;\n          e.kd = 1;\n          b = [0];\n          x(null != e);\n          a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);\n          (0 == a || 7 == a) && b[0] && (a = 4);\n          b = a;\n          if (0 == b) {\n            x(null != g);\n            d.data = e.data;\n            d.w = e.w + e.offset;\n            d.ha = e.ha - e.offset;\n            d.put = kc;\n            d.ac = gc;\n            d.bc = lc;\n            d.ma = g;\n            if (e.xa) {\n              a = Bc();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              if (te(a, d)) {\n                b = Cd(d.width, d.height, g.Oa, g.ba);\n                if ((d = 0 == b)) {\n                  c: {\n                    d = a;\n                    d: for (;;) {\n                      if (null == d) {\n                        d = 0;\n                        break c;\n                      }\n                      x(null != d.s.yc);\n                      x(null != d.s.Ya);\n                      x(0 < d.s.Wb);\n                      c = d.l;\n                      x(null != c);\n                      e = c.ma;\n                      x(null != e);\n                      if (0 != d.xb) {\n                        d.ca = e.ba;\n                        d.tb = e.tb;\n                        x(null != d.ca);\n                        if (!hc(e.Oa, c, Va)) {\n                          d.a = 2;\n                          break d;\n                        }\n                        if (!Ec(d, c.width)) break d;\n                        if (c.da) break d;\n                        (c.da || hb(d.ca.S)) && Aa();\n                        11 > d.ca.S ||\n                          (alert(\"todo:WebPInitConvertARGBToYUV\"),\n                          null != d.ca.f.kb.F && Aa());\n                        if (\n                          d.Pb &&\n                          0 < d.s.ua &&\n                          null == d.s.vb.X &&\n                          !Zb(d.s.vb, d.s.Wa.Xa)\n                        ) {\n                          d.a = 1;\n                          break d;\n                        }\n                        d.xb = 0;\n                      }\n                      if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;\n                      e.Dc = d.Ma;\n                      d = 1;\n                      break c;\n                    }\n                    x(0 != d.a);\n                    d = 0;\n                  }\n                  d = !d;\n                }\n                d && (b = a.a);\n              } else b = a.a;\n            } else {\n              a = new Ce();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              a.Fa = e.na;\n              a.P = e.P;\n              a.qc = e.Sa;\n              if (Kc(a, d)) {\n                if (((b = Cd(d.width, d.height, g.Oa, g.ba)), 0 == b)) {\n                  a.Aa = 0;\n                  c = g.Oa;\n                  e = a;\n                  x(null != e);\n                  if (null != c) {\n                    k = c.Md;\n                    k = 0 > k ? 0 : 100 < k ? 255 : (255 * k) / 100;\n                    if (0 < k) {\n                      for (l = m = 0; 4 > l; ++l)\n                        (n = e.pb[l]),\n                          12 > n.lc &&\n                            (n.ia = (k * Qf[0 > n.lc ? 0 : n.lc]) >> 3),\n                          (m |= n.ia);\n                      m && (alert(\"todo:VP8InitRandom\"), (e.ia = 1));\n                    }\n                    e.Ga = c.Id;\n                    100 < e.Ga ? (e.Ga = 100) : 0 > e.Ga && (e.Ga = 0);\n                  }\n                  Me(a, d) || (b = a.a);\n                }\n              } else b = a.a;\n            }\n            0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));\n          }\n          g = b;\n        }\n        f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;\n      } else f = null;\n      return f;\n    };\n    var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];\n  };\n  new _WebPDecoder();\n\n  /** @license\n   * Copyright (c) 2017 Dominik Homberger\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nhttps://webpjs.appspot.com\nWebPRiffParser dominikhlbg@gmail.com\n*/\n\n  function memcmp(data, data_off, str, size) {\n    for (var i = 0; i < size; i++)\n      if (data[data_off + i] != str.charCodeAt(i)) return true;\n    return false;\n  }\n\n  function GetTag(data, data_off) {\n    var str = \"\";\n    for (var i = 0; i < 4; i++) str += String.fromCharCode(data[data_off++]);\n    return str;\n  }\n\n  function GetLE16(data, data_off) {\n    return (data[data_off + 0] << 0) | (data[data_off + 1] << 8);\n  }\n\n  function GetLE24(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16)) >>>\n      0\n    );\n  }\n\n  function GetLE32(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16) |\n        (data[data_off + 3] << 24)) >>>\n      0\n    );\n  }\n\n  function WebPRiffParser(src, src_off) {\n    var imagearray = {};\n    var i = 0;\n    var alpha_chunk = false;\n    var alpha_size = 0;\n    var alpha_offset = 0;\n    imagearray[\"frames\"] = [];\n    if (memcmp(src, src_off, \"RIFF\", 4)) return;\n    src_off += 4;\n    var riff_size = GetLE32(src, src_off) + 8;\n    src_off += 8;\n\n    while (src_off < src.length) {\n      var fourcc = GetTag(src, src_off);\n      src_off += 4;\n\n      var payload_size = GetLE32(src, src_off);\n      src_off += 4;\n      var payload_size_padded = payload_size + (payload_size & 1);\n\n      switch (fourcc) {\n        case \"VP8 \":\n        case \"VP8L\":\n          if (typeof imagearray[\"frames\"][i] === \"undefined\")\n            imagearray[\"frames\"][i] = {};\n          var obj = imagearray[\"frames\"][i];\n          var height = [0];\n          var width = [0];\n          obj[\"src_off\"] = alpha_chunk ? alpha_offset : src_off - 8;\n          obj[\"src_size\"] = alpha_size + payload_size + 8;\n          //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);\n          //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};\n          i++;\n          if (alpha_chunk) {\n            alpha_chunk = false;\n            alpha_size = 0;\n            alpha_offset = 0;\n          }\n          break;\n        case \"VP8X\":\n          var obj = (imagearray[\"header\"] = {});\n          var feature_flags = (obj[\"feature_flags\"] = src[src_off]);\n          var src_off_ = src_off + 4;\n          var canvas_width = (obj[\"canvas_width\"] = 1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          var canvas_height = (obj[\"canvas_height\"] =\n            1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          break;\n        case \"ALPH\":\n          alpha_chunk = true;\n          alpha_size = payload_size_padded + 8;\n          alpha_offset = src_off - 8;\n          break;\n\n        case \"ANIM\":\n          var obj = imagearray[\"header\"];\n          var bgcolor = (obj[\"bgcolor\"] = GetLE32(src, src_off));\n          src_off_ = src_off + 4;\n\n          var loop_count = (obj[\"loop_count\"] = GetLE16(src, src_off_));\n          src_off_ += 2;\n          break;\n        case \"ANMF\":\n          var offset_x = 0,\n            offset_y = 0,\n            width = 0,\n            height = 0,\n            duration = 0,\n            blend = 0,\n            dispose = 0,\n            temp = 0;\n          var obj = (imagearray[\"frames\"][i] = {});\n          obj[\"offset_x\"] = offset_x = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"offset_y\"] = offset_y = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"width\"] = width = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"height\"] = height = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"duration\"] = duration = GetLE24(src, src_off);\n          src_off += 3;\n          temp = src[src_off++];\n          obj[\"dispose\"] = dispose = temp & 1;\n          obj[\"blend\"] = blend = (temp >> 1) & 1;\n          break;\n        default:\n      }\n      if (fourcc != \"ANMF\") src_off += payload_size_padded;\n    }\n    return imagearray;\n  }\n\n  var height = [0];\n  var width = [0];\n  var pixels = [];\n  var webpdecoder = new _WebPDecoder();\n\n  var response = imageData;\n  var imagearray = WebPRiffParser(response, 0);\n  imagearray[\"response\"] = response;\n  imagearray[\"rgbaoutput\"] = true;\n  imagearray[\"dataurl\"] = false;\n\n  var header = imagearray[\"header\"] ? imagearray[\"header\"] : null;\n  var frames = imagearray[\"frames\"] ? imagearray[\"frames\"] : null;\n\n  if (header) {\n    header[\"loop_counter\"] = header[\"loop_count\"];\n    height = [header[\"canvas_height\"]];\n    width = [header[\"canvas_width\"]];\n\n    var blend = false;\n    for (var f = 0; f < frames.length; f++)\n      if (frames[f][\"blend\"] == 0) {\n        blend = true;\n        break;\n      }\n  }\n\n  var frame = frames[0];\n  var rgba = webpdecoder.WebPDecodeRGBA(\n    response,\n    frame[\"src_off\"],\n    frame[\"src_size\"],\n    width,\n    height\n  );\n  frame[\"rgba\"] = rgba;\n  frame[\"imgwidth\"] = width[0];\n  frame[\"imgheight\"] = height[0];\n\n  for (var i = 0; i < width[0] * height[0] * 4; i++) {\n    pixels[i] = rgba[i];\n  }\n\n  this.width = width;\n  this.height = height;\n  this.data = pixels;\n  return this;\n}\n\nWebPDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { WebPDecoder };\n","/**\n * @license\n *\n * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\nimport { PNG } from \"../libs/png.js\";\n\n/**\n * jsPDF PNG PlugIn\n * @name png_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /*\n   * @see http://www.w3.org/TR/PNG-Chunks.html\n   *\n   Color    Allowed      Interpretation\n   Type     Bit Depths\n\n     0       1,2,4,8,16  Each pixel is a grayscale sample.\n\n     2       8,16        Each pixel is an R,G,B triple.\n\n     3       1,2,4,8     Each pixel is a palette index;\n                         a PLTE chunk must appear.\n\n     4       8,16        Each pixel is a grayscale sample,\n                         followed by an alpha sample.\n\n     6       8,16        Each pixel is an R,G,B triple,\n                         followed by an alpha sample.\n  */\n\n  /*\n   * PNG filter method types\n   *\n   * @see http://www.w3.org/TR/PNG-Filters.html\n   * @see http://www.libpng.org/pub/png/book/chapter09.html\n   *\n   * This is what the value 'Predictor' in decode params relates to\n   *\n   * 15 is \"optimal prediction\", which means the prediction algorithm can change from line to line.\n   * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.\n   *\n     0       None\n     1       Sub\n     2       Up\n     3       Average\n     4       Paeth\n   */\n\n  var canCompress = function(value) {\n    return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();\n  };\n\n  var hasCompressionJS = function() {\n    return typeof zlibSync === \"function\";\n  };\n  var compressBytes = function(bytes, lineLength, colorsPerPixel, compression) {\n    var level = 4;\n    var filter_method = filterUp;\n\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        level = 1;\n        filter_method = filterSub;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        level = 6;\n        filter_method = filterAverage;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        level = 9;\n        filter_method = filterPaeth;\n        break;\n    }\n\n    bytes = applyPngFilterMethod(\n      bytes,\n      lineLength,\n      colorsPerPixel,\n      filter_method\n    );\n    var dat = zlibSync(bytes, { level: level });\n    return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);\n  };\n\n  var applyPngFilterMethod = function(\n    bytes,\n    lineLength,\n    colorsPerPixel,\n    filter_method\n  ) {\n    var lines = bytes.length / lineLength,\n      result = new Uint8Array(bytes.length + lines),\n      filter_methods = getFilterMethods(),\n      line,\n      prevLine,\n      offset;\n\n    for (var i = 0; i < lines; i += 1) {\n      offset = i * lineLength;\n      line = bytes.subarray(offset, offset + lineLength);\n\n      if (filter_method) {\n        result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);\n      } else {\n        var len = filter_methods.length,\n          results = [];\n\n        for (var j; j < len; j += 1) {\n          results[j] = filter_methods[j](line, colorsPerPixel, prevLine);\n        }\n\n        var ind = getIndexOfSmallestSum(results.concat());\n\n        result.set(results[ind], offset + i);\n      }\n\n      prevLine = line;\n    }\n\n    return result;\n  };\n\n  var filterNone = function(line) {\n    /*var result = new Uint8Array(line.length + 1);\n    result[0] = 0;\n    result.set(line, 1);*/\n\n    var result = Array.apply([], line);\n    result.unshift(0);\n\n    return result;\n  };\n\n  var filterSub = function(line, colorsPerPixel) {\n    var result = [],\n      len = line.length,\n      left;\n\n    result[0] = 1;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      result[i + 1] = (line[i] - left + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterUp = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      up;\n\n    result[0] = 2;\n\n    for (var i = 0; i < len; i += 1) {\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] - up + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterAverage = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up;\n\n    result[0] = 3;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] + 0x0100 - ((left + up) >>> 1)) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterPaeth = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up,\n      upLeft,\n      paeth;\n\n    result[0] = 4;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      upLeft = (prevLine && prevLine[i - colorsPerPixel]) || 0;\n      paeth = paethPredictor(left, up, upLeft);\n      result[i + 1] = (line[i] - paeth + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var paethPredictor = function(left, up, upLeft) {\n    if (left === up && up === upLeft) {\n      return left;\n    }\n    var pLeft = Math.abs(up - upLeft),\n      pUp = Math.abs(left - upLeft),\n      pUpLeft = Math.abs(left + up - upLeft - upLeft);\n    return pLeft <= pUp && pLeft <= pUpLeft\n      ? left\n      : pUp <= pUpLeft\n      ? up\n      : upLeft;\n  };\n\n  var getFilterMethods = function() {\n    return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];\n  };\n\n  var getIndexOfSmallestSum = function(arrays) {\n    var sum = arrays.map(function(value) {\n      return value.reduce(function(pv, cv) {\n        return pv + Math.abs(cv);\n      }, 0);\n    });\n    return sum.indexOf(Math.min.apply(null, sum));\n  };\n\n  var getPredictorFromCompression = function(compression) {\n    var predictor;\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        predictor = 11;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        predictor = 13;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        predictor = 14;\n        break;\n\n      default:\n        predictor = 12;\n        break;\n    }\n    return predictor;\n  };\n\n  /**\n   * @name processPNG\n   * @function\n   * @ignore\n   */\n  jsPDFAPI.processPNG = function(imageData, index, alias, compression) {\n    \"use strict\";\n\n    var colorSpace,\n      filter = this.decode.FLATE_DECODE,\n      bitsPerComponent,\n      image,\n      decodeParameters = \"\",\n      trns,\n      colors,\n      pal,\n      smask,\n      pixels,\n      len,\n      alphaData,\n      imgData,\n      hasColors,\n      pixel,\n      i,\n      n;\n\n    if (this.__addimage__.isArrayBuffer(imageData))\n      imageData = new Uint8Array(imageData);\n\n    if (this.__addimage__.isArrayBufferView(imageData)) {\n      image = new PNG(imageData);\n      imageData = image.imgData;\n      bitsPerComponent = image.bits;\n      colorSpace = image.colorSpace;\n      colors = image.colors;\n\n      /*\n       * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.\n       *\n       * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.\n       *\n       * Extract alpha to create two separate images, using the alpha as a sMask\n       */\n      if ([4, 6].indexOf(image.colorType) !== -1) {\n        /*\n         * processes 8 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 8) {\n          pixels =\n            image.pixelBitlength == 32\n              ? new Uint32Array(image.decodePixels().buffer)\n              : image.pixelBitlength == 16\n              ? new Uint16Array(image.decodePixels().buffer)\n              : new Uint8Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(len * image.colors);\n          alphaData = new Uint8Array(len);\n          var pDiff = image.pixelBitlength - image.bits;\n          i = 0;\n          n = 0;\n          var pbl;\n\n          for (; i < len; i++) {\n            pixel = pixels[i];\n            pbl = 0;\n\n            while (pbl < pDiff) {\n              imgData[n++] = (pixel >>> pbl) & 0xff;\n              pbl = pbl + image.bits;\n            }\n\n            alphaData[i] = (pixel >>> pbl) & 0xff;\n          }\n        }\n\n        /*\n         * processes 16 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 16) {\n          pixels = new Uint32Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(\n            len * (32 / image.pixelBitlength) * image.colors\n          );\n          alphaData = new Uint8Array(len * (32 / image.pixelBitlength));\n          hasColors = image.colors > 1;\n          i = 0;\n          n = 0;\n          var a = 0;\n\n          while (i < len) {\n            pixel = pixels[i++];\n\n            imgData[n++] = (pixel >>> 0) & 0xff;\n\n            if (hasColors) {\n              imgData[n++] = (pixel >>> 16) & 0xff;\n\n              pixel = pixels[i++];\n              imgData[n++] = (pixel >>> 0) & 0xff;\n            }\n\n            alphaData[a++] = (pixel >>> 16) & 0xff;\n          }\n          bitsPerComponent = 8;\n        }\n\n        if (canCompress(compression)) {\n          imageData = compressBytes(\n            imgData,\n            image.width * image.colors,\n            image.colors,\n            compression\n          );\n          smask = compressBytes(alphaData, image.width, 1, compression);\n        } else {\n          imageData = imgData;\n          smask = alphaData;\n          filter = undefined;\n        }\n      }\n\n      /*\n       * Indexed png. Each pixel is a palette index.\n       */\n      if (image.colorType === 3) {\n        colorSpace = this.color_spaces.INDEXED;\n        pal = image.palette;\n\n        if (image.transparency.indexed) {\n          var trans = image.transparency.indexed;\n          var total = 0;\n          i = 0;\n          len = trans.length;\n\n          for (; i < len; ++i) {\n            total += trans[i];\n          }\n\n          total = total / 255;\n\n          /*\n           * a single color is specified as 100% transparent (0),\n           * so we set trns to use a /Mask with that index\n           */\n          if (total === len - 1 && trans.indexOf(0) !== -1) {\n            trns = [trans.indexOf(0)];\n\n            /*\n             * there's more than one colour within the palette that specifies\n             * a transparency value less than 255, so we unroll the pixels to create an image sMask\n             */\n          } else if (total !== len) {\n            pixels = image.decodePixels();\n            alphaData = new Uint8Array(pixels.length);\n            i = 0;\n            len = pixels.length;\n\n            for (; i < len; i++) {\n              alphaData[i] = trans[pixels[i]];\n            }\n\n            smask = compressBytes(alphaData, image.width, 1);\n          }\n        }\n      }\n\n      var predictor = getPredictorFromCompression(compression);\n\n      if (filter === this.decode.FLATE_DECODE) {\n        decodeParameters = \"/Predictor \" + predictor + \" \";\n      }\n      decodeParameters +=\n        \"/Colors \" +\n        colors +\n        \" /BitsPerComponent \" +\n        bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n\n      if (\n        this.__addimage__.isArrayBuffer(imageData) ||\n        this.__addimage__.isArrayBufferView(imageData)\n      ) {\n        imageData = this.__addimage__.arrayBufferToBinaryString(imageData);\n      }\n\n      if (\n        (smask && this.__addimage__.isArrayBuffer(smask)) ||\n        this.__addimage__.isArrayBufferView(smask)\n      ) {\n        smask = this.__addimage__.arrayBufferToBinaryString(smask);\n      }\n\n      return {\n        alias: alias,\n        data: imageData,\n        index: index,\n        filter: filter,\n        decodeParameters: decodeParameters,\n        transparency: trns,\n        palette: pal,\n        sMask: smask,\n        predictor: predictor,\n        width: image.width,\n        height: image.height,\n        bitsPerComponent: bitsPerComponent,\n        colorSpace: colorSpace\n      };\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { GifReader } from \"../libs/omggif.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\n\n/**\n * jsPDF Gif Support PlugIn\n *\n * @name gif_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processGIF89A = function(imageData, index, alias, compression) {\n    var reader = new GifReader(imageData);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = [];\n\n    reader.decodeAndBlitFrameRGBA(0, pixels);\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n\n  jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;\n})(jsPDF.API);\n","import { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { BmpDecoder } from \"../libs/BMPDecoder.js\";\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @license\n * Copyright (c) 2018 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF bmp Support PlugIn\n * @name bmp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processBMP = function(imageData, index, alias, compression) {\n    var reader = new BmpDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2019 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { WebPDecoder } from \"../libs/WebPDecoder.js\";\n\n/**\n * jsPDF webp Support PlugIn\n *\n * @name webp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processWEBP = function(imageData, index, alias, compression) {\n    var reader = new WebPDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","/**\n * @license\n *\n * Copyright (c) 2021 Antti Palola, https://github.com/Pantura\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF RGBA array PlugIn\n * @name rgba_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name processRGBA\n   * @function\n   *\n   * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].\n   * RGBA array data can be obtained from DOM canvas getImageData.\n   * @ignore\n   */\n  jsPDFAPI.processRGBA = function(imageData, index, alias) {\n    \"use strict\";\n\n    var imagePixels = imageData.data;\n    var length = imagePixels.length;\n    // jsPDF takes alpha data separately so extract that.\n    var rgbOut = new Uint8Array((length / 4) * 3);\n    var alphaOut = new Uint8Array(length / 4);\n    var outIndex = 0;\n    var alphaIndex = 0;\n\n    for (var i = 0; i < length; i += 4) {\n      var r = imagePixels[i];\n      var g = imagePixels[i + 1];\n      var b = imagePixels[i + 2];\n      var alpha = imagePixels[i + 3];\n      rgbOut[outIndex++] = r;\n      rgbOut[outIndex++] = g;\n      rgbOut[outIndex++] = b;\n      alphaOut[alphaIndex++] = alpha;\n    }\n\n    var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);\n    var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);\n\n    return {\n      alpha: alphaData,\n      data: rgbData,\n      index: index,\n      alias: alias,\n      colorSpace: \"DeviceRGB\",\n      bitsPerComponent: 8,\n      width: imageData.width,\n      height: imageData.height\n    };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF setLanguage Plugin\n *\n * @name setLanguage\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Add Language Tag to the generated PDF\n   *\n   * @name setLanguage\n   * @function\n   * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF()\n   * doc.text(10, 10, 'This is a test')\n   * doc.setLanguage(\"en-US\")\n   * doc.save('english.pdf')\n   */\n  jsPDFAPI.setLanguage = function(langCode) {\n    \"use strict\";\n\n    var langCodes = {\n      af: \"Afrikaans\",\n      sq: \"Albanian\",\n      ar: \"Arabic (Standard)\",\n      \"ar-DZ\": \"Arabic (Algeria)\",\n      \"ar-BH\": \"Arabic (Bahrain)\",\n      \"ar-EG\": \"Arabic (Egypt)\",\n      \"ar-IQ\": \"Arabic (Iraq)\",\n      \"ar-JO\": \"Arabic (Jordan)\",\n      \"ar-KW\": \"Arabic (Kuwait)\",\n      \"ar-LB\": \"Arabic (Lebanon)\",\n      \"ar-LY\": \"Arabic (Libya)\",\n      \"ar-MA\": \"Arabic (Morocco)\",\n      \"ar-OM\": \"Arabic (Oman)\",\n      \"ar-QA\": \"Arabic (Qatar)\",\n      \"ar-SA\": \"Arabic (Saudi Arabia)\",\n      \"ar-SY\": \"Arabic (Syria)\",\n      \"ar-TN\": \"Arabic (Tunisia)\",\n      \"ar-AE\": \"Arabic (U.A.E.)\",\n      \"ar-YE\": \"Arabic (Yemen)\",\n      an: \"Aragonese\",\n      hy: \"Armenian\",\n      as: \"Assamese\",\n      ast: \"Asturian\",\n      az: \"Azerbaijani\",\n      eu: \"Basque\",\n      be: \"Belarusian\",\n      bn: \"Bengali\",\n      bs: \"Bosnian\",\n      br: \"Breton\",\n      bg: \"Bulgarian\",\n      my: \"Burmese\",\n      ca: \"Catalan\",\n      ch: \"Chamorro\",\n      ce: \"Chechen\",\n      zh: \"Chinese\",\n      \"zh-HK\": \"Chinese (Hong Kong)\",\n      \"zh-CN\": \"Chinese (PRC)\",\n      \"zh-SG\": \"Chinese (Singapore)\",\n      \"zh-TW\": \"Chinese (Taiwan)\",\n      cv: \"Chuvash\",\n      co: \"Corsican\",\n      cr: \"Cree\",\n      hr: \"Croatian\",\n      cs: \"Czech\",\n      da: \"Danish\",\n      nl: \"Dutch (Standard)\",\n      \"nl-BE\": \"Dutch (Belgian)\",\n      en: \"English\",\n      \"en-AU\": \"English (Australia)\",\n      \"en-BZ\": \"English (Belize)\",\n      \"en-CA\": \"English (Canada)\",\n      \"en-IE\": \"English (Ireland)\",\n      \"en-JM\": \"English (Jamaica)\",\n      \"en-NZ\": \"English (New Zealand)\",\n      \"en-PH\": \"English (Philippines)\",\n      \"en-ZA\": \"English (South Africa)\",\n      \"en-TT\": \"English (Trinidad & Tobago)\",\n      \"en-GB\": \"English (United Kingdom)\",\n      \"en-US\": \"English (United States)\",\n      \"en-ZW\": \"English (Zimbabwe)\",\n      eo: \"Esperanto\",\n      et: \"Estonian\",\n      fo: \"Faeroese\",\n      fj: \"Fijian\",\n      fi: \"Finnish\",\n      fr: \"French (Standard)\",\n      \"fr-BE\": \"French (Belgium)\",\n      \"fr-CA\": \"French (Canada)\",\n      \"fr-FR\": \"French (France)\",\n      \"fr-LU\": \"French (Luxembourg)\",\n      \"fr-MC\": \"French (Monaco)\",\n      \"fr-CH\": \"French (Switzerland)\",\n      fy: \"Frisian\",\n      fur: \"Friulian\",\n      gd: \"Gaelic (Scots)\",\n      \"gd-IE\": \"Gaelic (Irish)\",\n      gl: \"Galacian\",\n      ka: \"Georgian\",\n      de: \"German (Standard)\",\n      \"de-AT\": \"German (Austria)\",\n      \"de-DE\": \"German (Germany)\",\n      \"de-LI\": \"German (Liechtenstein)\",\n      \"de-LU\": \"German (Luxembourg)\",\n      \"de-CH\": \"German (Switzerland)\",\n      el: \"Greek\",\n      gu: \"Gujurati\",\n      ht: \"Haitian\",\n      he: \"Hebrew\",\n      hi: \"Hindi\",\n      hu: \"Hungarian\",\n      is: \"Icelandic\",\n      id: \"Indonesian\",\n      iu: \"Inuktitut\",\n      ga: \"Irish\",\n      it: \"Italian (Standard)\",\n      \"it-CH\": \"Italian (Switzerland)\",\n      ja: \"Japanese\",\n      kn: \"Kannada\",\n      ks: \"Kashmiri\",\n      kk: \"Kazakh\",\n      km: \"Khmer\",\n      ky: \"Kirghiz\",\n      tlh: \"Klingon\",\n      ko: \"Korean\",\n      \"ko-KP\": \"Korean (North Korea)\",\n      \"ko-KR\": \"Korean (South Korea)\",\n      la: \"Latin\",\n      lv: \"Latvian\",\n      lt: \"Lithuanian\",\n      lb: \"Luxembourgish\",\n      mk: \"North Macedonia\",\n      ms: \"Malay\",\n      ml: \"Malayalam\",\n      mt: \"Maltese\",\n      mi: \"Maori\",\n      mr: \"Marathi\",\n      mo: \"Moldavian\",\n      nv: \"Navajo\",\n      ng: \"Ndonga\",\n      ne: \"Nepali\",\n      no: \"Norwegian\",\n      nb: \"Norwegian (Bokmal)\",\n      nn: \"Norwegian (Nynorsk)\",\n      oc: \"Occitan\",\n      or: \"Oriya\",\n      om: \"Oromo\",\n      fa: \"Persian\",\n      \"fa-IR\": \"Persian/Iran\",\n      pl: \"Polish\",\n      pt: \"Portuguese\",\n      \"pt-BR\": \"Portuguese (Brazil)\",\n      pa: \"Punjabi\",\n      \"pa-IN\": \"Punjabi (India)\",\n      \"pa-PK\": \"Punjabi (Pakistan)\",\n      qu: \"Quechua\",\n      rm: \"Rhaeto-Romanic\",\n      ro: \"Romanian\",\n      \"ro-MO\": \"Romanian (Moldavia)\",\n      ru: \"Russian\",\n      \"ru-MO\": \"Russian (Moldavia)\",\n      sz: \"Sami (Lappish)\",\n      sg: \"Sango\",\n      sa: \"Sanskrit\",\n      sc: \"Sardinian\",\n      sd: \"Sindhi\",\n      si: \"Singhalese\",\n      sr: \"Serbian\",\n      sk: \"Slovak\",\n      sl: \"Slovenian\",\n      so: \"Somani\",\n      sb: \"Sorbian\",\n      es: \"Spanish\",\n      \"es-AR\": \"Spanish (Argentina)\",\n      \"es-BO\": \"Spanish (Bolivia)\",\n      \"es-CL\": \"Spanish (Chile)\",\n      \"es-CO\": \"Spanish (Colombia)\",\n      \"es-CR\": \"Spanish (Costa Rica)\",\n      \"es-DO\": \"Spanish (Dominican Republic)\",\n      \"es-EC\": \"Spanish (Ecuador)\",\n      \"es-SV\": \"Spanish (El Salvador)\",\n      \"es-GT\": \"Spanish (Guatemala)\",\n      \"es-HN\": \"Spanish (Honduras)\",\n      \"es-MX\": \"Spanish (Mexico)\",\n      \"es-NI\": \"Spanish (Nicaragua)\",\n      \"es-PA\": \"Spanish (Panama)\",\n      \"es-PY\": \"Spanish (Paraguay)\",\n      \"es-PE\": \"Spanish (Peru)\",\n      \"es-PR\": \"Spanish (Puerto Rico)\",\n      \"es-ES\": \"Spanish (Spain)\",\n      \"es-UY\": \"Spanish (Uruguay)\",\n      \"es-VE\": \"Spanish (Venezuela)\",\n      sx: \"Sutu\",\n      sw: \"Swahili\",\n      sv: \"Swedish\",\n      \"sv-FI\": \"Swedish (Finland)\",\n      \"sv-SV\": \"Swedish (Sweden)\",\n      ta: \"Tamil\",\n      tt: \"Tatar\",\n      te: \"Teluga\",\n      th: \"Thai\",\n      tig: \"Tigre\",\n      ts: \"Tsonga\",\n      tn: \"Tswana\",\n      tr: \"Turkish\",\n      tk: \"Turkmen\",\n      uk: \"Ukrainian\",\n      hsb: \"Upper Sorbian\",\n      ur: \"Urdu\",\n      ve: \"Venda\",\n      vi: \"Vietnamese\",\n      vo: \"Volapuk\",\n      wa: \"Walloon\",\n      cy: \"Welsh\",\n      xh: \"Xhosa\",\n      ji: \"Yiddish\",\n      zu: \"Zulu\"\n    };\n\n    if (this.internal.languageSettings === undefined) {\n      this.internal.languageSettings = {};\n      this.internal.languageSettings.isSubscribed = false;\n    }\n\n    if (langCodes[langCode] !== undefined) {\n      this.internal.languageSettings.languageCode = langCode;\n      if (this.internal.languageSettings.isSubscribed === false) {\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.write(\n            \"/Lang (\" + this.internal.languageSettings.languageCode + \")\"\n          );\n        });\n        this.internal.languageSettings.isSubscribed = true;\n      }\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/** @license\n jsPDF standard_fonts_metrics plugin\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n * MIT license.\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * This file adds the standard font metrics to jsPDF.\n *\n * Font metrics data is reprocessed derivative of contents of\n * \"Font Metrics for PDF Core 14 Fonts\" package, which exhibits the following copyright and license:\n *\n * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.\n *\n * This file and the 14 PostScript(R) AFM files it accompanies may be used,\n * copied, and distributed for any purpose and without charge, with or without\n * modification, provided that all copyright notices are retained; that the AFM\n * files are not distributed without this file; that all modifications to this\n * file or any of the AFM files are prominently noted in the modified file(s);\n * and that this paragraph is not modified. Adobe Systems has no responsibility\n * or obligation to support the use of the AFM files.\n *\n * @name standard_fonts_metrics\n * @module\n */\n\n(function(API) {\n  \"use strict\";\n  API.__fontmetrics__ = API.__fontmetrics__ || {};\n\n  var decoded = \"0123456789abcdef\",\n    encoded = \"klmnopqrstuvwxyz\",\n    mappingUncompress = {},\n    mappingCompress = {};\n\n  for (var i = 0; i < encoded.length; i++) {\n    mappingUncompress[encoded[i]] = decoded[i];\n    mappingCompress[decoded[i]] = encoded[i];\n  }\n\n  var hex = function(value) {\n    return \"0x\" + parseInt(value, 10).toString(16);\n  };\n\n  var compress = (API.__fontmetrics__.compress = function(data) {\n    var vals = [\"{\"];\n    var value, keystring, valuestring, numberprefix;\n\n    for (var key in data) {\n      value = data[key];\n\n      if (!isNaN(parseInt(key, 10))) {\n        key = parseInt(key, 10);\n        keystring = hex(key).slice(2);\n        keystring =\n          keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];\n      } else {\n        keystring = \"'\" + key + \"'\";\n      }\n\n      if (typeof value == \"number\") {\n        if (value < 0) {\n          valuestring = hex(value).slice(3);\n          numberprefix = \"-\";\n        } else {\n          valuestring = hex(value).slice(2);\n          numberprefix = \"\";\n        }\n        valuestring =\n          numberprefix +\n          valuestring.slice(0, -1) +\n          mappingCompress[valuestring.slice(-1)];\n      } else {\n        if (typeof value === \"object\") {\n          valuestring = compress(value);\n        } else {\n          throw new Error(\n            \"Don't know what to do with value type \" + typeof value + \".\"\n          );\n        }\n      }\n      vals.push(keystring + valuestring);\n    }\n    vals.push(\"}\");\n    return vals.join(\"\");\n  });\n\n  /**\n   * Uncompresses data compressed into custom, base16-like format.\n   *\n   * @public\n   * @function\n   * @param\n   * @returns {Type}\n   */\n  var uncompress = (API.__fontmetrics__.uncompress = function(data) {\n    if (typeof data !== \"string\") {\n      throw new Error(\"Invalid argument passed to uncompress.\");\n    }\n\n    var output = {},\n      sign = 1,\n      stringparts, // undef. will be [] in string mode\n      activeobject = output,\n      parentchain = [],\n      parent_key_pair,\n      keyparts = \"\",\n      valueparts = \"\",\n      key, // undef. will be Truthy when Key is resolved.\n      datalen = data.length - 1, // stripping ending }\n      ch;\n\n    for (var i = 1; i < datalen; i += 1) {\n      // - { } ' are special.\n\n      ch = data[i];\n\n      if (ch == \"'\") {\n        if (stringparts) {\n          // end of string mode\n          key = stringparts.join(\"\");\n          stringparts = undefined;\n        } else {\n          // start of string mode\n          stringparts = [];\n        }\n      } else if (stringparts) {\n        stringparts.push(ch);\n      } else if (ch == \"{\") {\n        // start of object\n        parentchain.push([activeobject, key]);\n        activeobject = {};\n        key = undefined;\n      } else if (ch == \"}\") {\n        // end of object\n        parent_key_pair = parentchain.pop();\n        parent_key_pair[0][parent_key_pair[1]] = activeobject;\n        key = undefined;\n        activeobject = parent_key_pair[0];\n      } else if (ch == \"-\") {\n        sign = -1;\n      } else {\n        // must be number\n        if (key === undefined) {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            keyparts += mappingUncompress[ch];\n            key = parseInt(keyparts, 16) * sign;\n            sign = +1;\n            keyparts = \"\";\n          } else {\n            keyparts += ch;\n          }\n        } else {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            valueparts += mappingUncompress[ch];\n            activeobject[key] = parseInt(valueparts, 16) * sign;\n            sign = +1;\n            key = undefined;\n            valueparts = \"\";\n          } else {\n            valueparts += ch;\n          }\n        }\n      }\n    }\n    return output;\n  });\n\n  // encoding = 'Unicode'\n  // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior\n  // Actual 16bit char codes used.\n  // no multi-byte logic here\n\n  // Unicode characters to WinAnsiEncoding:\n  // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}\n  // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.\n  // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly\n  // as well as give strings with some (supported by these fonts) Unicode characters and\n  // these will be mapped to win cp1252\n  // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting \"Euro\" glyph displayed in both cases.\n\n  var encodingBlock = {\n    codePages: [\"WinAnsiEncoding\"],\n    WinAnsiEncoding: uncompress(\n      \"{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}\"\n    )\n  };\n  var encodings = {\n    Unicode: {\n      Courier: encodingBlock,\n      \"Courier-Bold\": encodingBlock,\n      \"Courier-BoldOblique\": encodingBlock,\n      \"Courier-Oblique\": encodingBlock,\n      Helvetica: encodingBlock,\n      \"Helvetica-Bold\": encodingBlock,\n      \"Helvetica-BoldOblique\": encodingBlock,\n      \"Helvetica-Oblique\": encodingBlock,\n      \"Times-Roman\": encodingBlock,\n      \"Times-Bold\": encodingBlock,\n      \"Times-BoldItalic\": encodingBlock,\n      \"Times-Italic\": encodingBlock\n      //\t, 'Symbol'\n      //\t, 'ZapfDingbats'\n    }\n  };\n\n  var fontMetrics = {\n    Unicode: {\n      // all sizing numbers are n/fontMetricsFractionOf = one font size unit\n      // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's\n      // width is 476/1000 or 47.6% of its height (regardless of font size)\n      // At this time this value applies to \"widths\" and \"kerning\" numbers.\n\n      // char code 0 represents \"default\" (average) width - use it for chars missing in this table.\n      // key 'fof' represents the \"fontMetricsFractionOf\" value\n\n      \"Courier-Oblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-BoldItalic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Courier: uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-BoldOblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Symbol: uncompress(\n        \"{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}\"\n      ),\n      Helvetica: uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-BoldOblique\": uncompress(\n        \"{'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}}}\"\n      ),\n      ZapfDingbats: uncompress(\"{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-Bold\": uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Times-Italic\": uncompress(\n        \"{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3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5ru17su5tu}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}}}\"\n      ),\n      \"Times-Roman\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Oblique\": uncompress(\n        \"{'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}}}\"\n      )\n    }\n  };\n\n  /*\n\tThis event handler is fired when a new jsPDF object is initialized\n\tThis event handler appends metrics data to standard fonts within\n\tthat jsPDF instance. The metrics are mapped over Unicode character\n\tcodes, NOT CIDs or other codes matching the StandardEncoding table of the\n\tstandard PDF fonts.\n\tFuture:\n\tAlso included is the encoding maping table, converting Unicode (UCS-2, UTF-16)\n\tchar codes to StandardEncoding character codes. The encoding table is to be used\n\tsomewhere around \"pdfEscape\" call.\n\t*/\n  API.events.push([\n    \"addFont\",\n    function(data) {\n      var font = data.font;\n\n      var metrics = fontMetrics[\"Unicode\"][font.postScriptName];\n      if (metrics) {\n        font.metadata[\"Unicode\"] = {};\n        font.metadata[\"Unicode\"].widths = metrics.widths;\n        font.metadata[\"Unicode\"].kerning = metrics.kerning;\n      }\n\n      var encodingBlock = encodings[\"Unicode\"][font.postScriptName];\n      if (encodingBlock) {\n        font.metadata[\"Unicode\"].encoding = encodingBlock;\n        font.encoding = encodingBlock.codePages[0];\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob } from \"../libs/AtobBtoa.js\";\n\n/**\n * @name ttfsupport\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n\n  var binaryStringToUint8Array = function(binary_string) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  };\n\n  var addFont = function(font, file) {\n    // eslint-disable-next-line no-control-regex\n    if (/^\\x00\\x01\\x00\\x00/.test(file)) {\n      file = binaryStringToUint8Array(file);\n    } else {\n      file = binaryStringToUint8Array(atob(file));\n    }\n    font.metadata = jsPDF.API.TTFFont.open(file);\n    font.metadata.Unicode = font.metadata.Unicode || {\n      encoding: {},\n      kerning: {},\n      widths: []\n    };\n    font.metadata.glyIdsUsed = [0];\n  };\n\n  jsPDF.API.events.push([\n    \"addFont\",\n    function(data) {\n      var file = undefined;\n      var font = data.font;\n      var instance = data.instance;\n      if (font.isStandardFont) {\n        return;\n      }\n      if (typeof instance !== \"undefined\") {\n        if (instance.existsFileInVFS(font.postScriptName) === false) {\n          file = instance.loadFile(font.postScriptName);\n        } else {\n          file = instance.getFileFromVFS(font.postScriptName);\n        }\n        if (typeof file !== \"string\") {\n          throw new Error(\n            \"Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('\" +\n              font.postScriptName +\n              \"').\"\n          );\n        }\n        addFont(font, file);\n      } else {\n        throw new Error(\n          \"Font does not exist in vFS, import fonts or remove declaration doc.addFont('\" +\n            font.postScriptName +\n            \"').\"\n        );\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF);\n","/** @license\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { console } from \"../libs/console.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF SVG plugin\n *\n * @name svg\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadCanvg() {\n    return (function() {\n      if (globalObject[\"canvg\"]) {\n        return Promise.resolve(globalObject[\"canvg\"]);\n      }\n\n      return import(\"canvg\");\n\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load canvg: \" + e));\n      })\n      .then(function(canvg) {\n        return canvg.default ? canvg.default : canvg;\n      });\n  }\n\n  /**\n   * Parses SVG XML and saves it as image into the PDF.\n   *\n   * Depends on canvas-element and canvg\n   *\n   * @name addSvgAsImage\n   * @public\n   * @function\n   * @param {string} SVG-Data as Text\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width of SVG-Image (in units declared at inception of PDF document)\n   * @param {number} height of SVG-Image (in units declared at inception of PDF document)\n   * @param {string} alias of SVG-Image (if used multiple times)\n   * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF jsPDF-instance\n   */\n  jsPDFAPI.addSvgAsImage = function(\n    svg,\n    x,\n    y,\n    w,\n    h,\n    alias,\n    compression,\n    rotation\n  ) {\n    if (isNaN(x) || isNaN(y)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid coordinates\", arguments);\n      throw new Error(\"Invalid coordinates passed to jsPDF.addSvgAsImage\");\n    }\n\n    if (isNaN(w) || isNaN(h)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid measurements\", arguments);\n      throw new Error(\n        \"Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage\"\n      );\n    }\n\n    var canvas = document.createElement(\"canvas\");\n    canvas.width = w;\n    canvas.height = h;\n    var ctx = canvas.getContext(\"2d\");\n    ctx.fillStyle = \"#fff\"; /// set white fill style\n    ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n    var options = {\n      ignoreMouse: true,\n      ignoreAnimation: true,\n      ignoreDimensions: true\n    };\n    var doc = this;\n    return loadCanvg()\n      .then(\n        function(canvg) {\n          return canvg.fromString(ctx, svg, options);\n        },\n        function() {\n          return Promise.reject(new Error(\"Could not load canvg.\"));\n        }\n      )\n      .then(function(instance) {\n        return instance.render(options);\n      })\n      .then(function() {\n        doc.addImage(\n          canvas.toDataURL(\"image/jpeg\", 1.0),\n          x,\n          y,\n          w,\n          h,\n          compression,\n          rotation\n        );\n      });\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF total_pages plugin\n * @name total_pages\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * @name putTotalPages\n   * @function\n   * @param {string} pageExpression Regular Expression\n   * @returns {jsPDF} jsPDF-instance\n   */\n\n  jsPDFAPI.putTotalPages = function(pageExpression) {\n    \"use strict\";\n\n    var replaceExpression;\n    var totalNumberOfPages = 0;\n    if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {\n      replaceExpression = new RegExp(pageExpression, \"g\");\n      totalNumberOfPages = this.internal.getNumberOfPages();\n    } else {\n      replaceExpression = new RegExp(\n        this.pdfEscape16(pageExpression, this.internal.getFont()),\n        \"g\"\n      );\n      totalNumberOfPages = this.pdfEscape16(\n        this.internal.getNumberOfPages() + \"\",\n        this.internal.getFont()\n      );\n    }\n\n    for (var n = 1; n <= this.internal.getNumberOfPages(); n++) {\n      for (var i = 0; i < this.internal.pages[n].length; i++) {\n        this.internal.pages[n][i] = this.internal.pages[n][i].replace(\n          replaceExpression,\n          totalNumberOfPages\n        );\n      }\n    }\n\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF viewerPreferences Plugin\n * @author Aras Abbasi (github.com/arasabbasi)\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Adds the ability to set ViewerPreferences and by thus\n * controlling the way the document is to be presented on the\n * screen or in print.\n * @name viewerpreferences\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * Set the ViewerPreferences of the generated PDF\n   *\n   * @name viewerPreferences\n   * @function\n   * @public\n   * @param {Object} options Array with the ViewerPreferences<br />\n   * Example: doc.viewerPreferences({\"FitWindow\":true});<br />\n   * <br />\n   * You can set following preferences:<br />\n   * <br/>\n   * <b>HideToolbar</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>HideMenubar</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>HideWindowUI</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>FitWindow</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>CenterWindow</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>DisplayDocTitle</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>NonFullScreenPageMode</b> <i>(string)</i><br />\n   * Possible values: UseNone, UseOutlines, UseThumbs, UseOC<br />\n   * Default value: UseNone<br/>\n   * <br />\n   * <b>Direction</b> <i>(string)</i><br />\n   * Possible values: L2R, R2L<br />\n   * Default value: L2R.<br />\n   * <br />\n   * <b>ViewArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>ViewClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>PrintScaling</b> <i>(string)</i><br />\n   * Possible values: AppDefault, None<br />\n   * Default value: AppDefault.<br />\n   * <br />\n   * <b>Duplex</b> <i>(string)</i><br />\n   * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge\n   * Default value: none<br />\n   * <br />\n   * <b>PickTrayByPDFSize</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>PrintPageRange</b> <i>(Array)</i><br />\n   * Example: [[1,5], [7,9]]<br />\n   * Default value: as defined by PDF viewer application<br />\n   * <br />\n   * <b>NumCopies</b> <i>(Number)</i><br />\n   * Possible values: 1, 2, 3, 4, 5<br />\n   * Default value: 1<br />\n   * <br />\n   * For more information see the PDF Reference, sixth edition on Page 577\n   * @param {boolean} doReset True to reset the settings\n   * @function\n   * @returns jsPDF jsPDF-instance\n   * @example\n   * var doc = new jsPDF()\n   * doc.text('This is a test', 10, 10)\n   * doc.viewerPreferences({'FitWindow': true}, true)\n   * doc.save(\"viewerPreferences.pdf\")\n   *\n   * // Example printing 10 copies, using cropbox, and hiding UI.\n   * doc.viewerPreferences({\n   *   'HideWindowUI': true,\n   *   'PrintArea': 'CropBox',\n   *   'NumCopies': 10\n   * })\n   */\n  jsPDFAPI.viewerPreferences = function(options, doReset) {\n    options = options || {};\n    doReset = doReset || false;\n\n    var configuration;\n    var configurationTemplate = {\n      HideToolbar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideMenubar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideWindowUI: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      FitWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      CenterWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      DisplayDocTitle: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.4\n      },\n      NonFullScreenPageMode: {\n        defaultValue: \"UseNone\",\n        value: \"UseNone\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"UseNone\", \"UseOutlines\", \"UseThumbs\", \"UseOC\"],\n        pdfVersion: 1.3\n      },\n      Direction: {\n        defaultValue: \"L2R\",\n        value: \"L2R\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"L2R\", \"R2L\"],\n        pdfVersion: 1.3\n      },\n      ViewArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      ViewClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintScaling: {\n        defaultValue: \"AppDefault\",\n        value: \"AppDefault\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"AppDefault\", \"None\"],\n        pdfVersion: 1.6\n      },\n      Duplex: {\n        defaultValue: \"\",\n        value: \"none\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\n          \"Simplex\",\n          \"DuplexFlipShortEdge\",\n          \"DuplexFlipLongEdge\",\n          \"none\"\n        ],\n        pdfVersion: 1.7\n      },\n      PickTrayByPDFSize: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.7\n      },\n      PrintPageRange: {\n        defaultValue: \"\",\n        value: \"\",\n        type: \"array\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      },\n      NumCopies: {\n        defaultValue: 1,\n        value: 1,\n        type: \"integer\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      }\n    };\n\n    var configurationKeys = Object.keys(configurationTemplate);\n\n    var rangeArray = [];\n    var i = 0;\n    var j = 0;\n    var k = 0;\n    var isValid;\n\n    var method;\n    var value;\n\n    function arrayContainsElement(array, element) {\n      var iterator;\n      var result = false;\n\n      for (iterator = 0; iterator < array.length; iterator += 1) {\n        if (array[iterator] === element) {\n          result = true;\n        }\n      }\n      return result;\n    }\n\n    if (this.internal.viewerpreferences === undefined) {\n      this.internal.viewerpreferences = {};\n      this.internal.viewerpreferences.configuration = JSON.parse(\n        JSON.stringify(configurationTemplate)\n      );\n      this.internal.viewerpreferences.isSubscribed = false;\n    }\n    configuration = this.internal.viewerpreferences.configuration;\n\n    if (options === \"reset\" || doReset === true) {\n      var len = configurationKeys.length;\n\n      for (k = 0; k < len; k += 1) {\n        configuration[configurationKeys[k]].value =\n          configuration[configurationKeys[k]].defaultValue;\n        configuration[configurationKeys[k]].explicitSet = false;\n      }\n    }\n\n    if (typeof options === \"object\") {\n      for (method in options) {\n        value = options[method];\n        if (\n          arrayContainsElement(configurationKeys, method) &&\n          value !== undefined\n        ) {\n          if (\n            configuration[method].type === \"boolean\" &&\n            typeof value === \"boolean\"\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"name\" &&\n            arrayContainsElement(configuration[method].valueSet, value)\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"integer\" &&\n            Number.isInteger(value)\n          ) {\n            configuration[method].value = value;\n          } else if (configuration[method].type === \"array\") {\n            for (i = 0; i < value.length; i += 1) {\n              isValid = true;\n              if (value[i].length === 1 && typeof value[i][0] === \"number\") {\n                rangeArray.push(String(value[i] - 1));\n              } else if (value[i].length > 1) {\n                for (j = 0; j < value[i].length; j += 1) {\n                  if (typeof value[i][j] !== \"number\") {\n                    isValid = false;\n                  }\n                }\n                if (isValid === true) {\n                  rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(\" \"));\n                }\n              }\n            }\n            configuration[method].value = \"[\" + rangeArray.join(\" \") + \"]\";\n          } else {\n            configuration[method].value = configuration[method].defaultValue;\n          }\n\n          configuration[method].explicitSet = true;\n        }\n      }\n    }\n\n    if (this.internal.viewerpreferences.isSubscribed === false) {\n      this.internal.events.subscribe(\"putCatalog\", function() {\n        var pdfDict = [];\n        var vPref;\n        for (vPref in configuration) {\n          if (configuration[vPref].explicitSet === true) {\n            if (configuration[vPref].type === \"name\") {\n              pdfDict.push(\"/\" + vPref + \" /\" + configuration[vPref].value);\n            } else {\n              pdfDict.push(\"/\" + vPref + \" \" + configuration[vPref].value);\n            }\n          }\n        }\n        if (pdfDict.length !== 0) {\n          this.internal.write(\n            \"/ViewerPreferences\\n<<\\n\" + pdfDict.join(\"\\n\") + \"\\n>>\"\n          );\n        }\n      });\n      this.internal.viewerpreferences.isSubscribed = true;\n    }\n\n    this.internal.viewerpreferences.configuration = configuration;\n    return this;\n  };\n})(jsPDF.API);\n","/** ====================================================================\n * @license\n * jsPDF XMP metadata plugin\n * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name xmp_metadata\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var postPutResources = function() {\n    var xmpmeta_beginning = '<x:xmpmeta xmlns:x=\"adobe:ns:meta/\">';\n    var rdf_beginning =\n      '<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\" xmlns:jspdf=\"' +\n      this.internal.__metadata__.namespaceuri +\n      '\"><jspdf:metadata>';\n    var rdf_ending = \"</jspdf:metadata></rdf:Description></rdf:RDF>\";\n    var xmpmeta_ending = \"</x:xmpmeta>\";\n    var utf8_xmpmeta_beginning = unescape(\n      encodeURIComponent(xmpmeta_beginning)\n    );\n    var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));\n    var utf8_metadata = unescape(\n      encodeURIComponent(this.internal.__metadata__.metadata)\n    );\n    var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));\n    var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));\n\n    var total_len =\n      utf8_rdf_beginning.length +\n      utf8_metadata.length +\n      utf8_rdf_ending.length +\n      utf8_xmpmeta_beginning.length +\n      utf8_xmpmeta_ending.length;\n\n    this.internal.__metadata__.metadata_object_number = this.internal.newObject();\n    this.internal.write(\n      \"<< /Type /Metadata /Subtype /XML /Length \" + total_len + \" >>\"\n    );\n    this.internal.write(\"stream\");\n    this.internal.write(\n      utf8_xmpmeta_beginning +\n        utf8_rdf_beginning +\n        utf8_metadata +\n        utf8_rdf_ending +\n        utf8_xmpmeta_ending\n    );\n    this.internal.write(\"endstream\");\n    this.internal.write(\"endobj\");\n  };\n\n  var putCatalog = function() {\n    if (this.internal.__metadata__.metadata_object_number) {\n      this.internal.write(\n        \"/Metadata \" +\n          this.internal.__metadata__.metadata_object_number +\n          \" 0 R\"\n      );\n    }\n  };\n\n  /**\n   * Adds XMP formatted metadata to PDF\n   *\n   * @name addMetadata\n   * @function\n   * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters \"<\", \">\" or \"&\", those characters should be written using XML entities.\n   * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.\n   * @returns {jsPDF} jsPDF-instance\n   */\n  jsPDFAPI.addMetadata = function(metadata, namespaceuri) {\n    if (typeof this.internal.__metadata__ === \"undefined\") {\n      this.internal.__metadata__ = {\n        metadata: metadata,\n        namespaceuri: namespaceuri || \"http://jspdf.default.namespaceuri/\"\n      };\n      this.internal.events.subscribe(\"putCatalog\", putCatalog);\n\n      this.internal.events.subscribe(\"postPutResources\", postPutResources);\n    }\n    return this;\n  };\n})(jsPDF.API);\n","import { jsPDF } from \"../jspdf.js\";\nimport { toPDFName } from \"../libs/pdfname.js\";\n\n/**\n * @name utf8\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n  var jsPDFAPI = jsPDF.API;\n\n  /***************************************************************************************************/\n  /* function : pdfEscape16                                                                          */\n  /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */\n  /*   the corresponding glyph id and width, and then adding padding to the string.                  */\n  /***************************************************************************************************/\n  var pdfEscape16 = (jsPDFAPI.pdfEscape16 = function(text, font) {\n    var widths = font.metadata.Unicode.widths;\n    var padz = [\"\", \"0\", \"00\", \"000\", \"0000\"];\n    var ar = [\"\"];\n    for (var i = 0, l = text.length, t; i < l; ++i) {\n      t = font.metadata.characterToGlyph(text.charCodeAt(i));\n      font.metadata.glyIdsUsed.push(t);\n      font.metadata.toUnicode[t] = text.charCodeAt(i);\n      if (widths.indexOf(t) == -1) {\n        widths.push(t);\n        widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);\n      }\n      if (t == \"0\") {\n        //Spaces are not allowed in cmap.\n        return ar.join(\"\");\n      } else {\n        t = t.toString(16);\n        ar.push(padz[4 - t.length], t);\n      }\n    }\n    return ar.join(\"\");\n  });\n\n  var toUnicodeCmap = function(map) {\n    var code, codes, range, unicode, unicodeMap, _i, _len;\n    unicodeMap =\n      \"/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    codes = Object.keys(map).sort(function(a, b) {\n      return a - b;\n    });\n\n    range = [];\n    for (_i = 0, _len = codes.length; _i < _len; _i++) {\n      code = codes[_i];\n      if (range.length >= 100) {\n        unicodeMap +=\n          \"\\n\" +\n          range.length +\n          \" beginbfchar\\n\" +\n          range.join(\"\\n\") +\n          \"\\nendbfchar\";\n        range = [];\n      }\n\n      if (\n        map[code] !== undefined &&\n        map[code] !== null &&\n        typeof map[code].toString === \"function\"\n      ) {\n        unicode = (\"0000\" + map[code].toString(16)).slice(-4);\n        code = (\"0000\" + (+code).toString(16)).slice(-4);\n        range.push(\"<\" + code + \"><\" + unicode + \">\");\n      }\n    }\n\n    if (range.length) {\n      unicodeMap +=\n        \"\\n\" +\n        range.length +\n        \" beginbfchar\\n\" +\n        range.join(\"\\n\") +\n        \"\\nendbfchar\\n\";\n    }\n    unicodeMap +=\n      \"endcmap\\nCMapName currentdict /CMap defineresource pop\\nend\\nend\";\n    return unicodeMap;\n  };\n\n  var identityHFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"Identity-H\"\n    ) {\n      //Tag with Identity-H\n      var widths = font.metadata.Unicode.widths;\n      var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/Flags \" + font.metadata.flags);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\">>\");\n      out(\"endobj\");\n\n      var DescendantFont = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/FontDescriptor \" + fontDescriptor + \" 0 R\");\n      out(\"/W \" + jsPDF.API.PDFObject.convert(widths));\n      out(\"/CIDToGIDMap /Identity\");\n      out(\"/DW 1000\");\n      out(\"/Subtype /CIDFontType2\");\n      out(\"/CIDSystemInfo\");\n      out(\"<<\");\n      out(\"/Supplement 0\");\n      out(\"/Registry (Adobe)\");\n      out(\"/Ordering (\" + font.encoding + \")\");\n      out(\">>\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.objectNumber = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/Subtype /Type0\");\n      out(\"/ToUnicode \" + cmap + \" 0 R\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/Encoding /\" + font.encoding);\n      out(\"/DescendantFonts [\" + DescendantFont + \" 0 R]\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      identityHFunction(args);\n    }\n  ]);\n\n  var winAnsiEncodingFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"WinAnsiEncoding\"\n    ) {\n      //Tag with WinAnsi encoding\n      var data = font.metadata.rawData;\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/Flags 96\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\">>\");\n      out(\"endobj\");\n      font.objectNumber = newObject();\n      for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {\n        font.metadata.hmtx.widths[j] = parseInt(\n          font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)\n        ); //Change the width of Em units to Point units.\n      }\n      out(\n        \"<</Subtype/TrueType/Type/Font/ToUnicode \" +\n          cmap +\n          \" 0 R/BaseFont/\" +\n          toPDFName(font.fontName) +\n          \"/FontDescriptor \" +\n          fontDescriptor +\n          \" 0 R\" +\n          \"/Encoding/\" +\n          font.encoding +\n          \" /FirstChar 29 /LastChar 255 /Widths \" +\n          jsPDF.API.PDFObject.convert(font.metadata.hmtx.widths) +\n          \">>\"\n      );\n      out(\"endobj\");\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      winAnsiEncodingFunction(args);\n    }\n  ]);\n\n  var utf8TextFunction = function(args) {\n    var text = args.text || \"\";\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n\n    var pdfEscape = mutex.pdfEscape;\n    var activeFontKey = mutex.activeFontKey;\n    var fonts = mutex.fonts;\n    var key = activeFontKey;\n\n    var str = \"\",\n      s = 0,\n      cmapConfirm;\n    var strText = \"\";\n    var encoding = fonts[key].encoding;\n\n    if (fonts[key].encoding !== \"Identity-H\") {\n      return {\n        text: text,\n        x: x,\n        y: y,\n        options: options,\n        mutex: mutex\n      };\n    }\n    strText = text;\n\n    key = activeFontKey;\n    if (Array.isArray(text)) {\n      strText = text[0];\n    }\n    for (s = 0; s < strText.length; s += 1) {\n      if (fonts[key].metadata.hasOwnProperty(\"cmap\")) {\n        cmapConfirm =\n          fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];\n        /*\n             if (Object.prototype.toString.call(text) === '[object Array]') {\n                var i = 0;\n               // for (i = 0; i < text.length; i += 1) {\n                    if (Object.prototype.toString.call(text[s]) === '[object Array]') {\n                        cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n                    } else {\n\n                    }\n                //}\n\n            } else {\n                cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n            }*/\n      }\n      if (!cmapConfirm) {\n        if (\n          strText[s].charCodeAt(0) < 256 &&\n          fonts[key].metadata.hasOwnProperty(\"Unicode\")\n        ) {\n          str += strText[s];\n        } else {\n          str += \"\";\n        }\n      } else {\n        str += strText[s];\n      }\n    }\n    var result = \"\";\n    if (parseInt(key.slice(1)) < 14 || encoding === \"WinAnsiEncoding\") {\n      //For the default 13 font\n      result = pdfEscape(str, key)\n        .split(\"\")\n        .map(function(cv) {\n          return cv.charCodeAt(0).toString(16);\n        })\n        .join(\"\");\n    } else if (encoding === \"Identity-H\") {\n      result = pdfEscape16(str, fonts[key]);\n    }\n    mutex.isHex = true;\n\n    return {\n      text: result,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n  };\n\n  var utf8EscapeFunction = function(parms) {\n    var text = parms.text || \"\",\n      x = parms.x,\n      y = parms.y,\n      options = parms.options,\n      mutex = parms.mutex;\n    var tmpText = [];\n    var args = {\n      text: text,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          if (text[i].length === 3) {\n            tmpText.push([\n              utf8TextFunction(Object.assign({}, args, { text: text[i][0] }))\n                .text,\n              text[i][1],\n              text[i][2]\n            ]);\n          } else {\n            tmpText.push(\n              utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n            );\n          }\n        } else {\n          tmpText.push(\n            utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n          );\n        }\n      }\n      parms.text = tmpText;\n    } else {\n      parms.text = utf8TextFunction(\n        Object.assign({}, args, { text: text })\n      ).text;\n    }\n  };\n\n  jsPDFAPI.events.push([\"postProcessText\", utf8EscapeFunction]);\n})(jsPDF);\n","/**\n * @license\n * jsPDF virtual FileSystem functionality\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Use the vFS to handle files\n *\n * @name vFS\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var _initializeVFS = function() {\n    if (typeof this.internal.vFS === \"undefined\") {\n      this.internal.vFS = {};\n    }\n    return true;\n  };\n\n  /**\n   * Check if the file exists in the vFS\n   *\n   * @name existsFileInVFS\n   * @function\n   * @param {string} Possible filename in the vFS.\n   * @returns {boolean}\n   * @example\n   * doc.existsFileInVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.existsFileInVFS = function(filename) {\n    _initializeVFS.call(this);\n    return typeof this.internal.vFS[filename] !== \"undefined\";\n  };\n\n  /**\n   * Add a file to the vFS\n   *\n   * @name addFileToVFS\n   * @function\n   * @param {string} filename The name of the file which should be added.\n   * @param {string} filecontent The content of the file.\n   * @returns {jsPDF}\n   * @example\n   * doc.addFileToVFS(\"someFile.txt\", \"BADFACE1\");\n   */\n  jsPDFAPI.addFileToVFS = function(filename, filecontent) {\n    _initializeVFS.call(this);\n    this.internal.vFS[filename] = filecontent;\n    return this;\n  };\n\n  /**\n   * Get the file from the vFS\n   *\n   * @name getFileFromVFS\n   * @function\n   * @param {string} The name of the file which gets requested.\n   * @returns {string}\n   * @example\n   * doc.getFileFromVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.getFileFromVFS = function(filename) {\n    _initializeVFS.call(this);\n\n    if (typeof this.internal.vFS[filename] !== \"undefined\") {\n      return this.internal.vFS[filename];\n    }\n    return null;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)\n * MIT License\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDF) {\n  \"use strict\";\n  /**\n   * Table of Unicode types.\n   *\n   * Generated by:\n   *\n   * var bidi = require(\"./bidi/index\");\n   * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).\n   * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).\n   * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));\n   *\n   * for( var i = 0; i < bidi_accumulate.length; i++) {\n   * \tif(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')\n   * \t\tbidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined\n   * }\n   * var bidiAccumulateStr = 'return [ \"' + bidi_accumulate.toString().replace(/,/g, '\", \"') + '\" ];';\n   * require(\"fs\").writeFile('unicode-types.js', bidiAccumulateStr);\n   *\n   * Based on:\n   * https://github.com/mathiasbynens/unicode-8.0.0\n   */\n  var bidiUnicodeTypes = [\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"S\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"B\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"CS\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"EN\",\n    \"EN\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"ET\",\n    \"ET\",\n    \"AL\",\n    \"CS\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"ET\",\n    \"AN\",\n    \"AN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\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    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"L\",\n    \"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\",\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\",\n    \"B\",\n    \"LRE\",\n    \"RLE\",\n    \"PDF\",\n    \"LRO\",\n    \"RLO\",\n    \"CS\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"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\",\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    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"N\",\n    \"LRI\",\n    \"RLI\",\n    \"FSI\",\n    \"PDI\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"ES\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\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\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\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\",\n    \"CS\",\n    \"N\",\n    \"CS\",\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    \"ET\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"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    \"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   * Unicode Bidi algorithm compliant Bidi engine.\n   * For reference see http://unicode.org/reports/tr9/\n   */\n\n  /**\n   * constructor ( options )\n   *\n   * Initializes Bidi engine\n   *\n   * @param {Object} See 'setOptions' below for detailed description.\n   * options are cashed between invocation of 'doBidiReorder' method\n   *\n   * sample usage pattern of BidiEngine:\n   * var opt = {\n   * \tisInputVisual: true,\n   * \tisInputRtl: false,\n   * \tisOutputVisual: false,\n   * \tisOutputRtl: false,\n   * \tisSymmetricSwapping: true\n   * }\n   * var sourceToTarget = [], levels = [];\n   * var bidiEng = Globalize.bidiEngine(opt);\n   * var src = \"text string to be reordered\";\n   * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);\n   */\n\n  jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function(options) {\n    var _UNICODE_TYPES = _bidiUnicodeTypes;\n\n    var _STATE_TABLE_LTR = [\n      [0, 3, 0, 1, 0, 0, 0],\n      [0, 3, 0, 1, 2, 2, 0],\n      [0, 3, 0, 0x11, 2, 0, 1],\n      [0, 3, 5, 5, 4, 1, 0],\n      [0, 3, 0x15, 0x15, 4, 0, 1],\n      [0, 3, 5, 5, 4, 2, 0]\n    ];\n\n    var _STATE_TABLE_RTL = [\n      [2, 0, 1, 1, 0, 1, 0],\n      [2, 0, 1, 1, 0, 2, 0],\n      [2, 0, 2, 1, 3, 2, 0],\n      [2, 0, 2, 0x21, 3, 1, 1]\n    ];\n\n    var _TYPE_NAMES_MAP = { L: 0, R: 1, EN: 2, AN: 3, N: 4, B: 5, S: 6 };\n\n    var _UNICODE_RANGES_MAP = {\n      0: 0,\n      5: 1,\n      6: 2,\n      7: 3,\n      0x20: 4,\n      0xfb: 5,\n      0xfe: 6,\n      0xff: 7\n    };\n\n    var _SWAP_TABLE = [\n      \"\\u0028\",\n      \"\\u0029\",\n      \"\\u0028\",\n      \"\\u003C\",\n      \"\\u003E\",\n      \"\\u003C\",\n      \"\\u005B\",\n      \"\\u005D\",\n      \"\\u005B\",\n      \"\\u007B\",\n      \"\\u007D\",\n      \"\\u007B\",\n      \"\\u00AB\",\n      \"\\u00BB\",\n      \"\\u00AB\",\n      \"\\u2039\",\n      \"\\u203A\",\n      \"\\u2039\",\n      \"\\u2045\",\n      \"\\u2046\",\n      \"\\u2045\",\n      \"\\u207D\",\n      \"\\u207E\",\n      \"\\u207D\",\n      \"\\u208D\",\n      \"\\u208E\",\n      \"\\u208D\",\n      \"\\u2264\",\n      \"\\u2265\",\n      \"\\u2264\",\n      \"\\u2329\",\n      \"\\u232A\",\n      \"\\u2329\",\n      \"\\uFE59\",\n      \"\\uFE5A\",\n      \"\\uFE59\",\n      \"\\uFE5B\",\n      \"\\uFE5C\",\n      \"\\uFE5B\",\n      \"\\uFE5D\",\n      \"\\uFE5E\",\n      \"\\uFE5D\",\n      \"\\uFE64\",\n      \"\\uFE65\",\n      \"\\uFE64\"\n    ];\n\n    var _LTR_RANGES_REG_EXPR = new RegExp(\n      /^([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)$/\n    );\n\n    var _lastArabic = false,\n      _hasUbatAl,\n      _hasUbatB,\n      _hasUbatS,\n      DIR_LTR = 0,\n      DIR_RTL = 1,\n      _isInVisual,\n      _isInRtl,\n      _isOutVisual,\n      _isOutRtl,\n      _isSymmetricSwapping,\n      _dir = DIR_LTR;\n\n    this.__bidiEngine__ = {};\n\n    var _init = function(text, sourceToTargetMap) {\n      if (sourceToTargetMap) {\n        for (var i = 0; i < text.length; i++) {\n          sourceToTargetMap[i] = i;\n        }\n      }\n      if (_isInRtl === undefined) {\n        _isInRtl = _isContextualDirRtl(text);\n      }\n      if (_isOutRtl === undefined) {\n        _isOutRtl = _isContextualDirRtl(text);\n      }\n    };\n\n    // for reference see 3.2 in http://unicode.org/reports/tr9/\n    //\n    var _getCharType = function(ch) {\n      var charCode = ch.charCodeAt(),\n        range = charCode >> 8,\n        rangeIdx = _UNICODE_RANGES_MAP[range];\n\n      if (rangeIdx !== undefined) {\n        return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];\n      } else if (range === 0xfc || range === 0xfd) {\n        return \"AL\";\n      } else if (_LTR_RANGES_REG_EXPR.test(range)) {\n        //unlikely case\n        return \"L\";\n      } else if (range === 8) {\n        // even less likely\n        return \"R\";\n      }\n      return \"N\"; //undefined type, mark as neutral\n    };\n\n    var _isContextualDirRtl = function(text) {\n      for (var i = 0, charType; i < text.length; i++) {\n        charType = _getCharType(text.charAt(i));\n        if (charType === \"L\") {\n          return false;\n        } else if (charType === \"R\") {\n          return true;\n        }\n      }\n      return false;\n    };\n\n    // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/\n    //\n    var _resolveCharType = function(chars, types, resolvedTypes, index) {\n      var cType = types[index],\n        wType,\n        nType,\n        i,\n        len;\n      switch (cType) {\n        case \"L\":\n        case \"R\":\n          _lastArabic = false;\n          break;\n        case \"N\":\n        case \"AN\":\n          break;\n\n        case \"EN\":\n          if (_lastArabic) {\n            cType = \"AN\";\n          }\n          break;\n\n        case \"AL\":\n          _lastArabic = true;\n          _hasUbatAl = true;\n          cType = \"R\";\n          break;\n\n        case \"WS\":\n          cType = \"N\";\n          break;\n\n        case \"CS\":\n          if (\n            index < 1 ||\n            index + 1 >= types.length ||\n            ((wType = resolvedTypes[index - 1]) !== \"EN\" && wType !== \"AN\") ||\n            ((nType = types[index + 1]) !== \"EN\" && nType !== \"AN\")\n          ) {\n            cType = \"N\";\n          } else if (_lastArabic) {\n            nType = \"AN\";\n          }\n          cType = nType === wType ? nType : \"N\";\n          break;\n\n        case \"ES\":\n          wType = index > 0 ? resolvedTypes[index - 1] : \"B\";\n          cType =\n            wType === \"EN\" &&\n            index + 1 < types.length &&\n            types[index + 1] === \"EN\"\n              ? \"EN\"\n              : \"N\";\n          break;\n\n        case \"ET\":\n          if (index > 0 && resolvedTypes[index - 1] === \"EN\") {\n            cType = \"EN\";\n            break;\n          } else if (_lastArabic) {\n            cType = \"N\";\n            break;\n          }\n          i = index + 1;\n          len = types.length;\n          while (i < len && types[i] === \"ET\") {\n            i++;\n          }\n          if (i < len && types[i] === \"EN\") {\n            cType = \"EN\";\n          } else {\n            cType = \"N\";\n          }\n          break;\n\n        case \"NSM\":\n          if (_isInVisual && !_isInRtl) {\n            //V->L\n            len = types.length;\n            i = index + 1;\n            while (i < len && types[i] === \"NSM\") {\n              i++;\n            }\n            if (i < len) {\n              var c = chars[index];\n              var rtlCandidate = (c >= 0x0591 && c <= 0x08ff) || c === 0xfb1e;\n              wType = types[i];\n              if (rtlCandidate && (wType === \"R\" || wType === \"AL\")) {\n                cType = \"R\";\n                break;\n              }\n            }\n          }\n          if (index < 1 || (wType = types[index - 1]) === \"B\") {\n            cType = \"N\";\n          } else {\n            cType = resolvedTypes[index - 1];\n          }\n          break;\n\n        case \"B\":\n          _lastArabic = false;\n          _hasUbatB = true;\n          cType = _dir;\n          break;\n\n        case \"S\":\n          _hasUbatS = true;\n          cType = \"N\";\n          break;\n\n        case \"LRE\":\n        case \"RLE\":\n        case \"LRO\":\n        case \"RLO\":\n        case \"PDF\":\n          _lastArabic = false;\n          break;\n        case \"BN\":\n          cType = \"N\";\n          break;\n      }\n      return cType;\n    };\n\n    var _handleUbatS = function(types, levels, length) {\n      for (var i = 0; i < length; i++) {\n        if (types[i] === \"S\") {\n          levels[i] = _dir;\n          for (var j = i - 1; j >= 0; j--) {\n            if (types[j] === \"WS\") {\n              levels[j] = _dir;\n            } else {\n              break;\n            }\n          }\n        }\n      }\n    };\n\n    var _invertString = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\");\n      if (levels) {\n        _computeLevels(charArray, levels, { hiLevel: _dir });\n      }\n      charArray.reverse();\n      sourceToTargetMap && sourceToTargetMap.reverse();\n      return charArray.join(\"\");\n    };\n\n    // For reference see 3.3 in http://unicode.org/reports/tr9/\n    //\n    var _computeLevels = function(chars, levels, params) {\n      var action,\n        condition,\n        i,\n        index,\n        newLevel,\n        prevState,\n        condPos = -1,\n        len = chars.length,\n        newState = 0,\n        resolvedTypes = [],\n        stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,\n        types = [];\n\n      _lastArabic = false;\n      _hasUbatAl = false;\n      _hasUbatB = false;\n      _hasUbatS = false;\n      for (i = 0; i < len; i++) {\n        types[i] = _getCharType(chars[i]);\n      }\n      for (index = 0; index < len; index++) {\n        prevState = newState;\n        resolvedTypes[index] = _resolveCharType(\n          chars,\n          types,\n          resolvedTypes,\n          index\n        );\n        newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];\n        action = newState & 0xf0;\n        newState &= 0x0f;\n        levels[index] = newLevel = stateTable[newState][5];\n        if (action > 0) {\n          if (action === 0x10) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = 1;\n            }\n            condPos = -1;\n          } else {\n            condPos = -1;\n          }\n        }\n        condition = stateTable[newState][6];\n        if (condition) {\n          if (condPos === -1) {\n            condPos = index;\n          }\n        } else {\n          if (condPos > -1) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = newLevel;\n            }\n            condPos = -1;\n          }\n        }\n        if (types[index] === \"B\") {\n          levels[index] = 0;\n        }\n        params.hiLevel |= newLevel;\n      }\n      if (_hasUbatS) {\n        _handleUbatS(types, levels, len);\n      }\n    };\n\n    // for reference see 3.4 in http://unicode.org/reports/tr9/\n    //\n    var _invertByLevel = function(\n      level,\n      charArray,\n      sourceToTargetMap,\n      levels,\n      params\n    ) {\n      if (params.hiLevel < level) {\n        return;\n      }\n      if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {\n        charArray.reverse();\n        sourceToTargetMap && sourceToTargetMap.reverse();\n        return;\n      }\n      var ch,\n        high,\n        end,\n        low,\n        len = charArray.length,\n        start = 0;\n\n      while (start < len) {\n        if (levels[start] >= level) {\n          end = start + 1;\n          while (end < len && levels[end] >= level) {\n            end++;\n          }\n          for (low = start, high = end - 1; low < high; low++, high--) {\n            ch = charArray[low];\n            charArray[low] = charArray[high];\n            charArray[high] = ch;\n            if (sourceToTargetMap) {\n              ch = sourceToTargetMap[low];\n              sourceToTargetMap[low] = sourceToTargetMap[high];\n              sourceToTargetMap[high] = ch;\n            }\n          }\n          start = end;\n        }\n        start++;\n      }\n    };\n\n    // for reference see 7 & BD16 in http://unicode.org/reports/tr9/\n    //\n    var _symmetricSwap = function(charArray, levels, params) {\n      if (params.hiLevel !== 0 && _isSymmetricSwapping) {\n        for (var i = 0, index; i < charArray.length; i++) {\n          if (levels[i] === 1) {\n            index = _SWAP_TABLE.indexOf(charArray[i]);\n            if (index >= 0) {\n              charArray[i] = _SWAP_TABLE[index + 1];\n            }\n          }\n        }\n      }\n    };\n\n    var _reorder = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\"),\n        params = { hiLevel: _dir };\n\n      if (!levels) {\n        levels = [];\n      }\n      _computeLevels(charArray, levels, params);\n      _symmetricSwap(charArray, levels, params);\n      _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);\n      _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);\n      return charArray.join(\"\");\n    };\n\n    // doBidiReorder( text, sourceToTargetMap, levels )\n    // Performs Bidi reordering by implementing Unicode Bidi algorithm.\n    // Returns reordered string\n    // @text [String]:\n    // - input string to be reordered, this is input parameter\n    // $sourceToTargetMap [Array] (optional)\n    // - resultant mapping between input and output strings, this is output parameter\n    // $levels [Array] (optional)\n    // - array of calculated Bidi levels, , this is output parameter\n    this.__bidiEngine__.doBidiReorder = function(\n      text,\n      sourceToTargetMap,\n      levels\n    ) {\n      _init(text, sourceToTargetMap);\n      if (!_isInVisual && _isOutVisual && !_isOutRtl) {\n        // LLTR->VLTR, LRTL->VLTR\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VRTL->VLTR, VLTR->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _invertString(text, sourceToTargetMap, levels);\n      } else if (!_isInVisual && _isOutVisual && _isOutRtl) {\n        // LLTR->VRTL, LRTL->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {\n        // VLTR->LLTR\n        _dir = DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VLTR->LRTL, VRTL->LLTR\n        text = _invertString(text, sourceToTargetMap);\n        if (_isInRtl) {\n          //LLTR -> VLTR\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n        } else {\n          //LRTL -> VRTL\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n        }\n      } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {\n        //  VRTL->LRTL\n        _dir = DIR_RTL;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // LRTL->LLTR, LLTR->LRTL\n        var isSymmetricSwappingOrig = _isSymmetricSwapping;\n        if (_isInRtl) {\n          //LRTL->LLTR\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _dir = DIR_LTR;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n        } else {\n          //LLTR->LRTL\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n          _dir = DIR_RTL;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n          text = _invertString(text, sourceToTargetMap);\n        }\n      }\n      return text;\n    };\n\n    /**\n     * @name setOptions( options )\n     * @function\n     * Sets options for Bidi conversion\n     * @param {Object}:\n     * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)\n     * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)\n     * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),\n     */\n    this.__bidiEngine__.setOptions = function(options) {\n      if (options) {\n        _isInVisual = options.isInputVisual;\n        _isOutVisual = options.isOutputVisual;\n        _isInRtl = options.isInputRtl;\n        _isOutRtl = options.isOutputRtl;\n        _isSymmetricSwapping = options.isSymmetricSwapping;\n      }\n    };\n\n    this.__bidiEngine__.setOptions(options);\n    return this.__bidiEngine__;\n  };\n\n  var _bidiUnicodeTypes = bidiUnicodeTypes;\n\n  var bidiEngine = new jsPDF.__bidiEngine__({ isInputVisual: true });\n\n  var bidiEngineFunction = function(args) {\n    var text = args.text;\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n    var lang = options.lang;\n    var tmpText = [];\n\n    options.isInputVisual =\n      typeof options.isInputVisual === \"boolean\" ? options.isInputVisual : true;\n    bidiEngine.setOptions(options);\n\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Object.prototype.toString.call(text[i]) === \"[object Array]\") {\n          tmpText.push([\n            bidiEngine.doBidiReorder(text[i][0]),\n            text[i][1],\n            text[i][2]\n          ]);\n        } else {\n          tmpText.push([bidiEngine.doBidiReorder(text[i])]);\n        }\n      }\n      args.text = tmpText;\n    } else {\n      args.text = bidiEngine.doBidiReorder(text);\n    }\n    bidiEngine.setOptions({ isInputVisual: true });\n  };\n\n  jsPDF.API.events.push([\"postProcessText\", bidiEngineFunction]);\n})(jsPDF);\n","/* eslint-disable no-control-regex */\n/************************************************\n * Title : custom font                          *\n * Start Data : 2017. 01. 22.                   *\n * Comment : TEXT API                           *\n ************************************************/\n\n/******************************\n * jsPDF extension API Design *\n * ****************************/\n\nimport { jsPDF } from \"../jspdf.js\";\n\njsPDF.API.TTFFont = (function() {\n  /************************************************************************/\n  /* function : open                                                       */\n  /* comment : Decode the encoded ttf content and create a TTFFont object. */\n  /************************************************************************/\n  TTFFont.open = function(file) {\n    return new TTFFont(file);\n  };\n  /***************************************************************/\n  /* function : TTFFont gernerator                               */\n  /* comment : Decode TTF contents are parsed, Data,             */\n  /* Subset object is created, and registerTTF function is called.*/\n  /***************************************************************/\n  function TTFFont(rawData) {\n    var data;\n    this.rawData = rawData;\n    data = this.contents = new Data(rawData);\n    this.contents.pos = 4;\n    if (data.readString(4) === \"ttcf\") {\n      throw new Error(\"TTCF not supported.\");\n    } else {\n      data.pos = 0;\n      this.parse();\n      this.subset = new Subset(this);\n      this.registerTTF();\n    }\n  }\n  /********************************************************/\n  /* function : parse                                     */\n  /* comment : TTF Parses the file contents by each table.*/\n  /********************************************************/\n  TTFFont.prototype.parse = function() {\n    this.directory = new Directory(this.contents);\n    this.head = new HeadTable(this);\n    this.name = new NameTable(this);\n    this.cmap = new CmapTable(this);\n    this.toUnicode = {};\n    this.hhea = new HheaTable(this);\n    this.maxp = new MaxpTable(this);\n    this.hmtx = new HmtxTable(this);\n    this.post = new PostTable(this);\n    this.os2 = new OS2Table(this);\n    this.loca = new LocaTable(this);\n    this.glyf = new GlyfTable(this);\n    this.ascender =\n      (this.os2.exists && this.os2.ascender) || this.hhea.ascender;\n    this.decender =\n      (this.os2.exists && this.os2.decender) || this.hhea.decender;\n    this.lineGap = (this.os2.exists && this.os2.lineGap) || this.hhea.lineGap;\n    return (this.bbox = [\n      this.head.xMin,\n      this.head.yMin,\n      this.head.xMax,\n      this.head.yMax\n    ]);\n  };\n  /***************************************************************/\n  /* function : registerTTF                                      */\n  /* comment : Get the value to assign pdf font descriptors.     */\n  /***************************************************************/\n  TTFFont.prototype.registerTTF = function() {\n    var e, hi, low, raw, _ref;\n    this.scaleFactor = 1000.0 / this.head.unitsPerEm;\n    this.bbox = function() {\n      var _i, _len, _ref, _results;\n      _ref = this.bbox;\n      _results = [];\n      for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n        e = _ref[_i];\n        _results.push(Math.round(e * this.scaleFactor));\n      }\n      return _results;\n    }.call(this);\n    this.stemV = 0;\n    if (this.post.exists) {\n      raw = this.post.italic_angle;\n      hi = raw >> 16;\n      low = raw & 0xff;\n      if ((hi & 0x8000) !== 0) {\n        hi = -((hi ^ 0xffff) + 1);\n      }\n      this.italicAngle = +(\"\" + hi + \".\" + low);\n    } else {\n      this.italicAngle = 0;\n    }\n    this.ascender = Math.round(this.ascender * this.scaleFactor);\n    this.decender = Math.round(this.decender * this.scaleFactor);\n    this.lineGap = Math.round(this.lineGap * this.scaleFactor);\n    this.capHeight = (this.os2.exists && this.os2.capHeight) || this.ascender;\n    this.xHeight = (this.os2.exists && this.os2.xHeight) || 0;\n    this.familyClass = ((this.os2.exists && this.os2.familyClass) || 0) >> 8;\n    this.isSerif =\n      (_ref = this.familyClass) === 1 ||\n      _ref === 2 ||\n      _ref === 3 ||\n      _ref === 4 ||\n      _ref === 5 ||\n      _ref === 7;\n    this.isScript = this.familyClass === 10;\n    this.flags = 0;\n    if (this.post.isFixedPitch) {\n      this.flags |= 1 << 0;\n    }\n    if (this.isSerif) {\n      this.flags |= 1 << 1;\n    }\n    if (this.isScript) {\n      this.flags |= 1 << 3;\n    }\n    if (this.italicAngle !== 0) {\n      this.flags |= 1 << 6;\n    }\n    this.flags |= 1 << 5;\n    if (!this.cmap.unicode) {\n      throw new Error(\"No unicode cmap for font\");\n    }\n  };\n  TTFFont.prototype.characterToGlyph = function(character) {\n    var _ref;\n    return (\n      ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) ||\n      0\n    );\n  };\n  TTFFont.prototype.widthOfGlyph = function(glyph) {\n    var scale;\n    scale = 1000.0 / this.head.unitsPerEm;\n    return this.hmtx.forGlyph(glyph).advance * scale;\n  };\n  TTFFont.prototype.widthOfString = function(string, size, charSpace) {\n    var charCode, i, scale, width, _ref;\n    string = \"\" + string;\n    width = 0;\n    for (\n      i = 0, _ref = string.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      charCode = string.charCodeAt(i);\n      width +=\n        this.widthOfGlyph(this.characterToGlyph(charCode)) +\n          charSpace * (1000 / size) || 0;\n    }\n    scale = size / 1000;\n    return width * scale;\n  };\n  TTFFont.prototype.lineHeight = function(size, includeGap) {\n    var gap;\n    if (includeGap == null) {\n      includeGap = false;\n    }\n    gap = includeGap ? this.lineGap : 0;\n    return ((this.ascender + gap - this.decender) / 1000) * size;\n  };\n  return TTFFont;\n})();\n\n/************************************************************************************************/\n/* function : Data                                                                              */\n/* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/\n/************************************************************************************************/\nvar Data = (function() {\n  function Data(data) {\n    this.data = data != null ? data : [];\n    this.pos = 0;\n    this.length = this.data.length;\n  }\n  Data.prototype.readByte = function() {\n    return this.data[this.pos++];\n  };\n  Data.prototype.writeByte = function(byte) {\n    return (this.data[this.pos++] = byte);\n  };\n  Data.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.readByte() * 0x1000000;\n    b2 = this.readByte() << 16;\n    b3 = this.readByte() << 8;\n    b4 = this.readByte();\n    return b1 + b2 + b3 + b4;\n  };\n  Data.prototype.writeUInt32 = function(val) {\n    this.writeByte((val >>> 24) & 0xff);\n    this.writeByte((val >> 16) & 0xff);\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt32 = function() {\n    var int;\n    int = this.readUInt32();\n    if (int >= 0x80000000) {\n      return int - 0x100000000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt32 = function(val) {\n    if (val < 0) {\n      val += 0x100000000;\n    }\n    return this.writeUInt32(val);\n  };\n  Data.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.readByte() << 8;\n    b2 = this.readByte();\n    return b1 | b2;\n  };\n  Data.prototype.writeUInt16 = function(val) {\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt16 = function() {\n    var int;\n    int = this.readUInt16();\n    if (int >= 0x8000) {\n      return int - 0x10000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt16 = function(val) {\n    if (val < 0) {\n      val += 0x10000;\n    }\n    return this.writeUInt16(val);\n  };\n  Data.prototype.readString = function(length) {\n    var i, ret;\n    ret = [];\n    for (\n      i = 0;\n      0 <= length ? i < length : i > length;\n      i = 0 <= length ? ++i : --i\n    ) {\n      ret[i] = String.fromCharCode(this.readByte());\n    }\n    return ret.join(\"\");\n  };\n  Data.prototype.writeString = function(val) {\n    var i, _ref, _results;\n    _results = [];\n    for (\n      i = 0, _ref = val.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      _results.push(this.writeByte(val.charCodeAt(i)));\n    }\n    return _results;\n  };\n  /*Data.prototype.stringAt = function (pos, length) {\n            this.pos = pos;\n            return this.readString(length);\n        };*/\n  Data.prototype.readShort = function() {\n    return this.readInt16();\n  };\n  Data.prototype.writeShort = function(val) {\n    return this.writeInt16(val);\n  };\n  Data.prototype.readLongLong = function() {\n    var b1, b2, b3, b4, b5, b6, b7, b8;\n    b1 = this.readByte();\n    b2 = this.readByte();\n    b3 = this.readByte();\n    b4 = this.readByte();\n    b5 = this.readByte();\n    b6 = this.readByte();\n    b7 = this.readByte();\n    b8 = this.readByte();\n    if (b1 & 0x80) {\n      return (\n        ((b1 ^ 0xff) * 0x100000000000000 +\n          (b2 ^ 0xff) * 0x1000000000000 +\n          (b3 ^ 0xff) * 0x10000000000 +\n          (b4 ^ 0xff) * 0x100000000 +\n          (b5 ^ 0xff) * 0x1000000 +\n          (b6 ^ 0xff) * 0x10000 +\n          (b7 ^ 0xff) * 0x100 +\n          (b8 ^ 0xff) +\n          1) *\n        -1\n      );\n    }\n    return (\n      b1 * 0x100000000000000 +\n      b2 * 0x1000000000000 +\n      b3 * 0x10000000000 +\n      b4 * 0x100000000 +\n      b5 * 0x1000000 +\n      b6 * 0x10000 +\n      b7 * 0x100 +\n      b8\n    );\n  };\n  Data.prototype.writeLongLong = function(val) {\n    var high, low;\n    high = Math.floor(val / 0x100000000);\n    low = val & 0xffffffff;\n    this.writeByte((high >> 24) & 0xff);\n    this.writeByte((high >> 16) & 0xff);\n    this.writeByte((high >> 8) & 0xff);\n    this.writeByte(high & 0xff);\n    this.writeByte((low >> 24) & 0xff);\n    this.writeByte((low >> 16) & 0xff);\n    this.writeByte((low >> 8) & 0xff);\n    return this.writeByte(low & 0xff);\n  };\n  Data.prototype.readInt = function() {\n    return this.readInt32();\n  };\n  Data.prototype.writeInt = function(val) {\n    return this.writeInt32(val);\n  };\n  /*Data.prototype.slice = function (start, end) {\n            return this.data.slice(start, end);\n        };*/\n  Data.prototype.read = function(bytes) {\n    var buf, i;\n    buf = [];\n    for (\n      i = 0;\n      0 <= bytes ? i < bytes : i > bytes;\n      i = 0 <= bytes ? ++i : --i\n    ) {\n      buf.push(this.readByte());\n    }\n    return buf;\n  };\n  Data.prototype.write = function(bytes) {\n    var byte, i, _len, _results;\n    _results = [];\n    for (i = 0, _len = bytes.length; i < _len; i++) {\n      byte = bytes[i];\n      _results.push(this.writeByte(byte));\n    }\n    return _results;\n  };\n  return Data;\n})();\n\nvar Directory = (function() {\n  var checksum;\n\n  /*****************************************************************************************************/\n  /* function : Directory generator                                                                    */\n  /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/\n  /*****************************************************************************************************/\n  function Directory(data) {\n    var entry, i, _ref;\n    this.scalarType = data.readInt();\n    this.tableCount = data.readShort();\n    this.searchRange = data.readShort();\n    this.entrySelector = data.readShort();\n    this.rangeShift = data.readShort();\n    this.tables = {};\n    for (\n      i = 0, _ref = this.tableCount;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      entry = {\n        tag: data.readString(4),\n        checksum: data.readInt(),\n        offset: data.readInt(),\n        length: data.readInt()\n      };\n      this.tables[entry.tag] = entry;\n    }\n  }\n  /********************************************************************************************************/\n  /* function : encode                                                                                    */\n  /* comment : It encodes and stores the font table object and information used for the directory object. */\n  /********************************************************************************************************/\n  Directory.prototype.encode = function(tables) {\n    var adjustment,\n      directory,\n      directoryLength,\n      entrySelector,\n      headOffset,\n      log2,\n      offset,\n      rangeShift,\n      searchRange,\n      sum,\n      table,\n      tableCount,\n      tableData,\n      tag;\n    tableCount = Object.keys(tables).length;\n    log2 = Math.log(2);\n    searchRange = Math.floor(Math.log(tableCount) / log2) * 16;\n    entrySelector = Math.floor(searchRange / log2);\n    rangeShift = tableCount * 16 - searchRange;\n    directory = new Data();\n    directory.writeInt(this.scalarType);\n    directory.writeShort(tableCount);\n    directory.writeShort(searchRange);\n    directory.writeShort(entrySelector);\n    directory.writeShort(rangeShift);\n    directoryLength = tableCount * 16;\n    offset = directory.pos + directoryLength;\n    headOffset = null;\n    tableData = [];\n    for (tag in tables) {\n      table = tables[tag];\n      directory.writeString(tag);\n      directory.writeInt(checksum(table));\n      directory.writeInt(offset);\n      directory.writeInt(table.length);\n      tableData = tableData.concat(table);\n      if (tag === \"head\") {\n        headOffset = offset;\n      }\n      offset += table.length;\n      while (offset % 4) {\n        tableData.push(0);\n        offset++;\n      }\n    }\n    directory.write(tableData);\n    sum = checksum(directory.data);\n    adjustment = 0xb1b0afba - sum;\n    directory.pos = headOffset + 8;\n    directory.writeUInt32(adjustment);\n    return directory.data;\n  };\n  /***************************************************************/\n  /* function : checksum                                         */\n  /* comment : Duplicate the table for the tag.                  */\n  /***************************************************************/\n  checksum = function(data) {\n    var i, sum, tmp, _ref;\n    data = __slice.call(data);\n    while (data.length % 4) {\n      data.push(0);\n    }\n    tmp = new Data(data);\n    sum = 0;\n    for (i = 0, _ref = data.length; i < _ref; i = i += 4) {\n      sum += tmp.readUInt32();\n    }\n    return sum & 0xffffffff;\n  };\n  return Directory;\n})();\n\nvar Table,\n  __hasProp = {}.hasOwnProperty,\n  __extends = function(child, parent) {\n    for (var key in parent) {\n      if (__hasProp.call(parent, key)) child[key] = parent[key];\n    }\n\n    function ctor() {\n      this.constructor = child;\n    }\n    ctor.prototype = parent.prototype;\n    child.prototype = new ctor();\n    child.__super__ = parent.prototype;\n    return child;\n  };\n\n/***************************************************************/\n/* function : Table                                            */\n/* comment : Save info for each table, and parse the table.    */\n/***************************************************************/\nTable = (function() {\n  function Table(file) {\n    var info;\n    this.file = file;\n    info = this.file.directory.tables[this.tag];\n    this.exists = !!info;\n    if (info) {\n      (this.offset = info.offset), (this.length = info.length);\n      this.parse(this.file.contents);\n    }\n  }\n  Table.prototype.parse = function() {};\n  Table.prototype.encode = function() {};\n  Table.prototype.raw = function() {\n    if (!this.exists) {\n      return null;\n    }\n    this.file.contents.pos = this.offset;\n    return this.file.contents.read(this.length);\n  };\n  return Table;\n})();\n\nvar HeadTable = (function(_super) {\n  __extends(HeadTable, _super);\n\n  function HeadTable() {\n    return HeadTable.__super__.constructor.apply(this, arguments);\n  }\n  HeadTable.prototype.tag = \"head\";\n  HeadTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.revision = data.readInt();\n    this.checkSumAdjustment = data.readInt();\n    this.magicNumber = data.readInt();\n    this.flags = data.readShort();\n    this.unitsPerEm = data.readShort();\n    this.created = data.readLongLong();\n    this.modified = data.readLongLong();\n    this.xMin = data.readShort();\n    this.yMin = data.readShort();\n    this.xMax = data.readShort();\n    this.yMax = data.readShort();\n    this.macStyle = data.readShort();\n    this.lowestRecPPEM = data.readShort();\n    this.fontDirectionHint = data.readShort();\n    this.indexToLocFormat = data.readShort();\n    return (this.glyphDataFormat = data.readShort());\n  };\n  HeadTable.prototype.encode = function(indexToLocFormat) {\n    var table;\n    table = new Data();\n    table.writeInt(this.version);\n    table.writeInt(this.revision);\n    table.writeInt(this.checkSumAdjustment);\n    table.writeInt(this.magicNumber);\n    table.writeShort(this.flags);\n    table.writeShort(this.unitsPerEm);\n    table.writeLongLong(this.created);\n    table.writeLongLong(this.modified);\n    table.writeShort(this.xMin);\n    table.writeShort(this.yMin);\n    table.writeShort(this.xMax);\n    table.writeShort(this.yMax);\n    table.writeShort(this.macStyle);\n    table.writeShort(this.lowestRecPPEM);\n    table.writeShort(this.fontDirectionHint);\n    table.writeShort(indexToLocFormat);\n    table.writeShort(this.glyphDataFormat);\n    return table.data;\n  };\n  return HeadTable;\n})(Table);\n\n/************************************************************************************/\n/* function : CmapEntry                                                             */\n/* comment : Cmap Initializes and encodes object information (required by pdf spec).*/\n/************************************************************************************/\nvar CmapEntry = (function() {\n  function CmapEntry(data, offset) {\n    var code,\n      count,\n      endCode,\n      glyphId,\n      glyphIds,\n      i,\n      idDelta,\n      idRangeOffset,\n      index,\n      saveOffset,\n      segCount,\n      segCountX2,\n      start,\n      startCode,\n      tail,\n      _j,\n      _k,\n      _len;\n    this.platformID = data.readUInt16();\n    this.encodingID = data.readShort();\n    this.offset = offset + data.readInt();\n    saveOffset = data.pos;\n    data.pos = this.offset;\n    this.format = data.readUInt16();\n    this.length = data.readUInt16();\n    this.language = data.readUInt16();\n    this.isUnicode =\n      (this.platformID === 3 && this.encodingID === 1 && this.format === 4) ||\n      (this.platformID === 0 && this.format === 4);\n    this.codeMap = {};\n    switch (this.format) {\n      case 0:\n        for (i = 0; i < 256; ++i) {\n          this.codeMap[i] = data.readByte();\n        }\n        break;\n      case 4:\n        segCountX2 = data.readUInt16();\n        segCount = segCountX2 / 2;\n        data.pos += 6;\n        endCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        data.pos += 2;\n        startCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idDelta = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idRangeOffset = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        count = (this.length - data.pos + this.offset) / 2;\n        glyphIds = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= count ? _j < count : _j > count;\n            i = 0 <= count ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {\n          tail = endCode[i];\n          start = startCode[i];\n          for (\n            code = _k = start;\n            start <= tail ? _k <= tail : _k >= tail;\n            code = start <= tail ? ++_k : --_k\n          ) {\n            if (idRangeOffset[i] === 0) {\n              glyphId = code + idDelta[i];\n            } else {\n              index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);\n              glyphId = glyphIds[index] || 0;\n              if (glyphId !== 0) {\n                glyphId += idDelta[i];\n              }\n            }\n            this.codeMap[code] = glyphId & 0xffff;\n          }\n        }\n    }\n    data.pos = saveOffset;\n  }\n  CmapEntry.encode = function(charmap, encoding) {\n    var charMap,\n      code,\n      codeMap,\n      codes,\n      delta,\n      deltas,\n      diff,\n      endCode,\n      endCodes,\n      entrySelector,\n      glyphIDs,\n      i,\n      id,\n      indexes,\n      last,\n      map,\n      nextID,\n      offset,\n      old,\n      rangeOffsets,\n      rangeShift,\n      searchRange,\n      segCount,\n      segCountX2,\n      startCode,\n      startCodes,\n      startGlyph,\n      subtable,\n      _i,\n      _j,\n      _k,\n      _l,\n      _len,\n      _len1,\n      _len2,\n      _len3,\n      _len4,\n      _len5,\n      _len6,\n      _len7,\n      _m,\n      _n,\n      _name,\n      _o,\n      _p,\n      _q;\n    subtable = new Data();\n    codes = Object.keys(charmap).sort(function(a, b) {\n      return a - b;\n    });\n    switch (encoding) {\n      case \"macroman\":\n        id = 0;\n        indexes = (function() {\n          var _results = [];\n          for (i = 0; i < 256; ++i) {\n            _results.push(0);\n          }\n          return _results;\n        })();\n        map = {\n          0: 0\n        };\n        codeMap = {};\n        for (_i = 0, _len = codes.length; _i < _len; _i++) {\n          code = codes[_i];\n          if (map[(_name = charmap[code])] == null) {\n            map[_name] = ++id;\n          }\n          codeMap[code] = {\n            old: charmap[code],\n            new: map[charmap[code]]\n          };\n          indexes[code] = map[charmap[code]];\n        }\n        subtable.writeUInt16(1);\n        subtable.writeUInt16(0);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(262);\n        subtable.writeUInt16(0);\n        subtable.write(indexes);\n        return {\n          charMap: codeMap,\n          subtable: subtable.data,\n          maxGlyphID: id + 1\n        };\n      case \"unicode\":\n        startCodes = [];\n        endCodes = [];\n        nextID = 0;\n        map = {};\n        charMap = {};\n        last = diff = null;\n        for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {\n          code = codes[_j];\n          old = charmap[code];\n          if (map[old] == null) {\n            map[old] = ++nextID;\n          }\n          charMap[code] = {\n            old: old,\n            new: map[old]\n          };\n          delta = map[old] - code;\n          if (last == null || delta !== diff) {\n            if (last) {\n              endCodes.push(last);\n            }\n            startCodes.push(code);\n            diff = delta;\n          }\n          last = code;\n        }\n        if (last) {\n          endCodes.push(last);\n        }\n        endCodes.push(0xffff);\n        startCodes.push(0xffff);\n        segCount = startCodes.length;\n        segCountX2 = segCount * 2;\n        searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);\n        entrySelector = Math.log(searchRange / 2) / Math.LN2;\n        rangeShift = 2 * segCount - searchRange;\n        deltas = [];\n        rangeOffsets = [];\n        glyphIDs = [];\n        for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {\n          startCode = startCodes[i];\n          endCode = endCodes[i];\n          if (startCode === 0xffff) {\n            deltas.push(0);\n            rangeOffsets.push(0);\n            break;\n          }\n          startGlyph = charMap[startCode][\"new\"];\n          if (startCode - startGlyph >= 0x8000) {\n            deltas.push(0);\n            rangeOffsets.push(2 * (glyphIDs.length + segCount - i));\n            for (\n              code = _l = startCode;\n              startCode <= endCode ? _l <= endCode : _l >= endCode;\n              code = startCode <= endCode ? ++_l : --_l\n            ) {\n              glyphIDs.push(charMap[code][\"new\"]);\n            }\n          } else {\n            deltas.push(startGlyph - startCode);\n            rangeOffsets.push(0);\n          }\n        }\n        subtable.writeUInt16(3);\n        subtable.writeUInt16(1);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(4);\n        subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(segCountX2);\n        subtable.writeUInt16(searchRange);\n        subtable.writeUInt16(entrySelector);\n        subtable.writeUInt16(rangeShift);\n        for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {\n          code = endCodes[_m];\n          subtable.writeUInt16(code);\n        }\n        subtable.writeUInt16(0);\n        for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {\n          code = startCodes[_n];\n          subtable.writeUInt16(code);\n        }\n        for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {\n          delta = deltas[_o];\n          subtable.writeUInt16(delta);\n        }\n        for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {\n          offset = rangeOffsets[_p];\n          subtable.writeUInt16(offset);\n        }\n        for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {\n          id = glyphIDs[_q];\n          subtable.writeUInt16(id);\n        }\n        return {\n          charMap: charMap,\n          subtable: subtable.data,\n          maxGlyphID: nextID + 1\n        };\n    }\n  };\n  return CmapEntry;\n})();\n\nvar CmapTable = (function(_super) {\n  __extends(CmapTable, _super);\n\n  function CmapTable() {\n    return CmapTable.__super__.constructor.apply(this, arguments);\n  }\n  CmapTable.prototype.tag = \"cmap\";\n  CmapTable.prototype.parse = function(data) {\n    var entry, i, tableCount;\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    tableCount = data.readUInt16();\n    this.tables = [];\n    this.unicode = null;\n    for (\n      i = 0;\n      0 <= tableCount ? i < tableCount : i > tableCount;\n      i = 0 <= tableCount ? ++i : --i\n    ) {\n      entry = new CmapEntry(data, this.offset);\n      this.tables.push(entry);\n      if (entry.isUnicode) {\n        if (this.unicode == null) {\n          this.unicode = entry;\n        }\n      }\n    }\n    return true;\n  };\n  /*************************************************************************/\n  /* function : encode                                                     */\n  /* comment : Encode the cmap table corresponding to the input character. */\n  /*************************************************************************/\n  CmapTable.encode = function(charmap, encoding) {\n    var result, table;\n    if (encoding == null) {\n      encoding = \"macroman\";\n    }\n    result = CmapEntry.encode(charmap, encoding);\n    table = new Data();\n    table.writeUInt16(0);\n    table.writeUInt16(1);\n    result.table = table.data.concat(result.subtable);\n    return result;\n  };\n  return CmapTable;\n})(Table);\n\nvar HheaTable = (function(_super) {\n  __extends(HheaTable, _super);\n\n  function HheaTable() {\n    return HheaTable.__super__.constructor.apply(this, arguments);\n  }\n  HheaTable.prototype.tag = \"hhea\";\n  HheaTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.ascender = data.readShort();\n    this.decender = data.readShort();\n    this.lineGap = data.readShort();\n    this.advanceWidthMax = data.readShort();\n    this.minLeftSideBearing = data.readShort();\n    this.minRightSideBearing = data.readShort();\n    this.xMaxExtent = data.readShort();\n    this.caretSlopeRise = data.readShort();\n    this.caretSlopeRun = data.readShort();\n    this.caretOffset = data.readShort();\n    data.pos += 4 * 2;\n    this.metricDataFormat = data.readShort();\n    return (this.numberOfMetrics = data.readUInt16());\n  };\n  /*HheaTable.prototype.encode = function (ids) {\n            var i, table, _i, _ref;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeShort(this.ascender);\n            table.writeShort(this.decender);\n            table.writeShort(this.lineGap);\n            table.writeShort(this.advanceWidthMax);\n            table.writeShort(this.minLeftSideBearing);\n            table.writeShort(this.minRightSideBearing);\n            table.writeShort(this.xMaxExtent);\n            table.writeShort(this.caretSlopeRise);\n            table.writeShort(this.caretSlopeRun);\n            table.writeShort(this.caretOffset);\n            for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                table.writeByte(0);\n            }\n            table.writeShort(this.metricDataFormat);\n            table.writeUInt16(ids.length);\n            return table.data;\n        };*/\n  return HheaTable;\n})(Table);\n\nvar OS2Table = (function(_super) {\n  __extends(OS2Table, _super);\n\n  function OS2Table() {\n    return OS2Table.__super__.constructor.apply(this, arguments);\n  }\n  OS2Table.prototype.tag = \"OS/2\";\n  OS2Table.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    this.averageCharWidth = data.readShort();\n    this.weightClass = data.readUInt16();\n    this.widthClass = data.readUInt16();\n    this.type = data.readShort();\n    this.ySubscriptXSize = data.readShort();\n    this.ySubscriptYSize = data.readShort();\n    this.ySubscriptXOffset = data.readShort();\n    this.ySubscriptYOffset = data.readShort();\n    this.ySuperscriptXSize = data.readShort();\n    this.ySuperscriptYSize = data.readShort();\n    this.ySuperscriptXOffset = data.readShort();\n    this.ySuperscriptYOffset = data.readShort();\n    this.yStrikeoutSize = data.readShort();\n    this.yStrikeoutPosition = data.readShort();\n    this.familyClass = data.readShort();\n    this.panose = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 10; ++i) {\n        _results.push(data.readByte());\n      }\n      return _results;\n    })();\n    this.charRange = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 4; ++i) {\n        _results.push(data.readInt());\n      }\n      return _results;\n    })();\n    this.vendorID = data.readString(4);\n    this.selection = data.readShort();\n    this.firstCharIndex = data.readShort();\n    this.lastCharIndex = data.readShort();\n    if (this.version > 0) {\n      this.ascent = data.readShort();\n      this.descent = data.readShort();\n      this.lineGap = data.readShort();\n      this.winAscent = data.readShort();\n      this.winDescent = data.readShort();\n      this.codePageRange = (function() {\n        var i, _results;\n        _results = [];\n        for (i = 0; i < 2; i = ++i) {\n          _results.push(data.readInt());\n        }\n        return _results;\n      })();\n      if (this.version > 1) {\n        this.xHeight = data.readShort();\n        this.capHeight = data.readShort();\n        this.defaultChar = data.readShort();\n        this.breakChar = data.readShort();\n        return (this.maxContext = data.readShort());\n      }\n    }\n  };\n  /*OS2Table.prototype.encode = function () {\n            return this.raw();\n        };*/\n  return OS2Table;\n})(Table);\n\nvar PostTable = (function(_super) {\n  var POSTSCRIPT_GLYPHS;\n  __extends(PostTable, _super);\n\n  function PostTable() {\n    return PostTable.__super__.constructor.apply(this, arguments);\n  }\n  PostTable.prototype.tag = \"post\";\n  PostTable.prototype.parse = function(data) {\n    var length, numberOfGlyphs, _results;\n    data.pos = this.offset;\n    this.format = data.readInt();\n    this.italicAngle = data.readInt();\n    this.underlinePosition = data.readShort();\n    this.underlineThickness = data.readShort();\n    this.isFixedPitch = data.readInt();\n    this.minMemType42 = data.readInt();\n    this.maxMemType42 = data.readInt();\n    this.minMemType1 = data.readInt();\n    this.maxMemType1 = data.readInt();\n    switch (this.format) {\n      case 0x00010000:\n        break;\n      case 0x00020000:\n        numberOfGlyphs = data.readUInt16();\n        this.glyphNameIndex = [];\n        var i;\n        for (\n          i = 0;\n          0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs;\n          i = 0 <= numberOfGlyphs ? ++i : --i\n        ) {\n          this.glyphNameIndex.push(data.readUInt16());\n        }\n        this.names = [];\n        _results = [];\n        while (data.pos < this.offset + this.length) {\n          length = data.readByte();\n          _results.push(this.names.push(data.readString(length)));\n        }\n        return _results;\n      case 0x00025000:\n        numberOfGlyphs = data.readUInt16();\n        return (this.offsets = data.read(numberOfGlyphs));\n      case 0x00030000:\n        break;\n      case 0x00040000:\n        return (this.map = function() {\n          var _j, _ref, _results1;\n          _results1 = [];\n          for (\n            i = _j = 0, _ref = this.file.maxp.numGlyphs;\n            0 <= _ref ? _j < _ref : _j > _ref;\n            i = 0 <= _ref ? ++_j : --_j\n          ) {\n            _results1.push(data.readUInt32());\n          }\n          return _results1;\n        }.call(this));\n    }\n  };\n  /*PostTable.prototype.glyphFor = function (code) {\n            var index;\n            switch (this.format) {\n            case 0x00010000:\n                return POSTSCRIPT_GLYPHS[code] || '.notdef';\n            case 0x00020000:\n                index = this.glyphNameIndex[code];\n                if (index <= 257) {\n                    return POSTSCRIPT_GLYPHS[index];\n                }\n                else {\n                    return this.names[index - 258] || '.notdef';\n                }\n                break;\n            case 0x00025000:\n                return POSTSCRIPT_GLYPHS[code + this.offsets[code]] || '.notdef';\n            case 0x00030000:\n                return '.notdef';\n            case 0x00040000:\n                return this.map[code] || 0xFFFF;\n            }\n        };*/\n  /*PostTable.prototype.encode = function (mapping) {\n            var id, index, indexes, position, post, raw, string, strings, table, _i, _j, _k, _len, _len1, _len2;\n            if (!this.exists) {\n                return null;\n            }\n            raw = this.raw();\n            if (this.format === 0x00030000) {\n                return raw;\n            }\n            table = new Data(raw.slice(0, 32));\n            table.writeUInt32(0x00020000);\n            table.pos = 32;\n            indexes = [];\n            strings = [];\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                post = this.glyphFor(id);\n                position = POSTSCRIPT_GLYPHS.indexOf(post);\n                if (position !== -1) {\n                    indexes.push(position);\n                }\n                else {\n                    indexes.push(257 + strings.length);\n                    strings.push(post);\n                }\n            }\n            table.writeUInt16(Object.keys(mapping).length);\n            for (_j = 0, _len1 = indexes.length; _j < _len1; _j++) {\n                index = indexes[_j];\n                table.writeUInt16(index);\n            }\n            for (_k = 0, _len2 = strings.length; _k < _len2; _k++) {\n                string = strings[_k];\n                table.writeByte(string.length);\n                table.writeString(string);\n            }\n            return table.data;\n        };*/\n  POSTSCRIPT_GLYPHS = \".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\\nzero one two three four five six seven eight nine colon semicolon less equal greater\\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\\nbracketleft backslash bracketright asciicircum underscore grave\\na b c d e f g h i j k l m n o p q r s t u v w x y z\\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\\nsterling section bullet paragraph germandbls registered copyright trademark acute\\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\\nCacute cacute Ccaron ccaron dcroat\".split(\n    /\\s+/g\n  );\n  return PostTable;\n})(Table);\n\n/*********************************************************************************************************/\n/* function : NameEntry                                                                                  */\n/* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/\n/*********************************************************************************************************/\nvar NameEntry = (function() {\n  function NameEntry(raw, entry) {\n    this.raw = raw;\n    this.length = raw.length;\n    this.platformID = entry.platformID;\n    this.encodingID = entry.encodingID;\n    this.languageID = entry.languageID;\n  }\n  return NameEntry;\n})();\n\nvar NameTable = (function(_super) {\n  var subsetTag;\n  __extends(NameTable, _super);\n\n  function NameTable() {\n    return NameTable.__super__.constructor.apply(this, arguments);\n  }\n  NameTable.prototype.tag = \"name\";\n  NameTable.prototype.parse = function(data) {\n    var count,\n      entries,\n      entry,\n      i,\n      name,\n      stringOffset,\n      strings,\n      text,\n      _j,\n      _len,\n      _name;\n    data.pos = this.offset;\n    data.readShort(); //format\n    count = data.readShort();\n    stringOffset = data.readShort();\n    entries = [];\n    for (\n      i = 0;\n      0 <= count ? i < count : i > count;\n      i = 0 <= count ? ++i : --i\n    ) {\n      entries.push({\n        platformID: data.readShort(),\n        encodingID: data.readShort(),\n        languageID: data.readShort(),\n        nameID: data.readShort(),\n        length: data.readShort(),\n        offset: this.offset + stringOffset + data.readShort()\n      });\n    }\n    strings = {};\n    for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {\n      entry = entries[i];\n      data.pos = entry.offset;\n      text = data.readString(entry.length);\n      name = new NameEntry(text, entry);\n      if (strings[(_name = entry.nameID)] == null) {\n        strings[_name] = [];\n      }\n      strings[entry.nameID].push(name);\n    }\n    this.strings = strings;\n    this.copyright = strings[0];\n    this.fontFamily = strings[1];\n    this.fontSubfamily = strings[2];\n    this.uniqueSubfamily = strings[3];\n    this.fontName = strings[4];\n    this.version = strings[5];\n    try {\n      this.postscriptName = strings[6][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    } catch (e) {\n      this.postscriptName = strings[4][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    }\n    this.trademark = strings[7];\n    this.manufacturer = strings[8];\n    this.designer = strings[9];\n    this.description = strings[10];\n    this.vendorUrl = strings[11];\n    this.designerUrl = strings[12];\n    this.license = strings[13];\n    this.licenseUrl = strings[14];\n    this.preferredFamily = strings[15];\n    this.preferredSubfamily = strings[17];\n    this.compatibleFull = strings[18];\n    return (this.sampleText = strings[19]);\n  };\n  subsetTag = \"AAAAAA\";\n  /*NameTable.prototype.encode = function () {\n            var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;\n            strings = {};\n            _ref = this.strings;\n            for (id in _ref) {\n                val = _ref[id];\n                strings[id] = val;\n            }\n            postscriptName = new NameEntry(\"\" + subsetTag + \"+\" + this.postscriptName, {\n                platformID: 1\n                , encodingID: 0\n                , languageID: 0\n            });\n            strings[6] = [postscriptName];\n            subsetTag = successorOf(subsetTag);\n            strCount = 0;\n            for (id in strings) {\n                list = strings[id];\n                if (list != null) {\n                    strCount += list.length;\n                }\n            }\n            table = new Data;\n            strTable = new Data;\n            table.writeShort(0);\n            table.writeShort(strCount);\n            table.writeShort(6 + 12 * strCount);\n            for (nameID in strings) {\n                list = strings[nameID];\n                if (list != null) {\n                    for (_i = 0, _len = list.length; _i < _len; _i++) {\n                        string = list[_i];\n                        table.writeShort(string.platformID);\n                        table.writeShort(string.encodingID);\n                        table.writeShort(string.languageID);\n                        table.writeShort(nameID);\n                        table.writeShort(string.length);\n                        table.writeShort(strTable.pos);\n                        strTable.writeString(string.raw);\n                    }\n                }\n            }\n            return nameTable = {\n                postscriptName: postscriptName.raw\n                , table: table.data.concat(strTable.data)\n            };\n        };*/\n  return NameTable;\n})(Table);\n\nvar MaxpTable = (function(_super) {\n  __extends(MaxpTable, _super);\n\n  function MaxpTable() {\n    return MaxpTable.__super__.constructor.apply(this, arguments);\n  }\n  MaxpTable.prototype.tag = \"maxp\";\n  MaxpTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.numGlyphs = data.readUInt16();\n    this.maxPoints = data.readUInt16();\n    this.maxContours = data.readUInt16();\n    this.maxCompositePoints = data.readUInt16();\n    this.maxComponentContours = data.readUInt16();\n    this.maxZones = data.readUInt16();\n    this.maxTwilightPoints = data.readUInt16();\n    this.maxStorage = data.readUInt16();\n    this.maxFunctionDefs = data.readUInt16();\n    this.maxInstructionDefs = data.readUInt16();\n    this.maxStackElements = data.readUInt16();\n    this.maxSizeOfInstructions = data.readUInt16();\n    this.maxComponentElements = data.readUInt16();\n    return (this.maxComponentDepth = data.readUInt16());\n  };\n  /*MaxpTable.prototype.encode = function (ids) {\n            var table;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeUInt16(ids.length);\n            table.writeUInt16(this.maxPoints);\n            table.writeUInt16(this.maxContours);\n            table.writeUInt16(this.maxCompositePoints);\n            table.writeUInt16(this.maxComponentContours);\n            table.writeUInt16(this.maxZones);\n            table.writeUInt16(this.maxTwilightPoints);\n            table.writeUInt16(this.maxStorage);\n            table.writeUInt16(this.maxFunctionDefs);\n            table.writeUInt16(this.maxInstructionDefs);\n            table.writeUInt16(this.maxStackElements);\n            table.writeUInt16(this.maxSizeOfInstructions);\n            table.writeUInt16(this.maxComponentElements);\n            table.writeUInt16(this.maxComponentDepth);\n            return table.data;\n        };*/\n  return MaxpTable;\n})(Table);\n\nvar HmtxTable = (function(_super) {\n  __extends(HmtxTable, _super);\n\n  function HmtxTable() {\n    return HmtxTable.__super__.constructor.apply(this, arguments);\n  }\n  HmtxTable.prototype.tag = \"hmtx\";\n  HmtxTable.prototype.parse = function(data) {\n    var i, last, lsbCount, m, _j, _ref, _results;\n    data.pos = this.offset;\n    this.metrics = [];\n    for (\n      i = 0, _ref = this.file.hhea.numberOfMetrics;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      this.metrics.push({\n        advance: data.readUInt16(),\n        lsb: data.readInt16()\n      });\n    }\n    lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;\n    this.leftSideBearings = (function() {\n      var _j, _results;\n      _results = [];\n      for (\n        i = _j = 0;\n        0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n        i = 0 <= lsbCount ? ++_j : --_j\n      ) {\n        _results.push(data.readInt16());\n      }\n      return _results;\n    })();\n    this.widths = function() {\n      var _j, _len, _ref1, _results;\n      _ref1 = this.metrics;\n      _results = [];\n      for (_j = 0, _len = _ref1.length; _j < _len; _j++) {\n        m = _ref1[_j];\n        _results.push(m.advance);\n      }\n      return _results;\n    }.call(this);\n    last = this.widths[this.widths.length - 1];\n    _results = [];\n    for (\n      i = _j = 0;\n      0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n      i = 0 <= lsbCount ? ++_j : --_j\n    ) {\n      _results.push(this.widths.push(last));\n    }\n    return _results;\n  };\n  /***************************************************************/\n  /* function : forGlyph                                         */\n  /* comment : Returns the advance width and lsb for this glyph. */\n  /***************************************************************/\n  HmtxTable.prototype.forGlyph = function(id) {\n    if (id in this.metrics) {\n      return this.metrics[id];\n    }\n    return {\n      advance: this.metrics[this.metrics.length - 1].advance,\n      lsb: this.leftSideBearings[id - this.metrics.length]\n    };\n  };\n  /*HmtxTable.prototype.encode = function (mapping) {\n            var id, metric, table, _i, _len;\n            table = new Data;\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                metric = this.forGlyph(id);\n                table.writeUInt16(metric.advance);\n                table.writeUInt16(metric.lsb);\n            }\n            return table.data;\n        };*/\n  return HmtxTable;\n})(Table);\n\nvar __slice = [].slice;\n\nvar GlyfTable = (function(_super) {\n  __extends(GlyfTable, _super);\n\n  function GlyfTable() {\n    return GlyfTable.__super__.constructor.apply(this, arguments);\n  }\n  GlyfTable.prototype.tag = \"glyf\";\n  GlyfTable.prototype.parse = function() {\n    return (this.cache = {});\n  };\n  GlyfTable.prototype.glyphFor = function(id) {\n    var data,\n      index,\n      length,\n      loca,\n      numberOfContours,\n      raw,\n      xMax,\n      xMin,\n      yMax,\n      yMin;\n    if (id in this.cache) {\n      return this.cache[id];\n    }\n    loca = this.file.loca;\n    data = this.file.contents;\n    index = loca.indexOf(id);\n    length = loca.lengthOf(id);\n    if (length === 0) {\n      return (this.cache[id] = null);\n    }\n    data.pos = this.offset + index;\n    raw = new Data(data.read(length));\n    numberOfContours = raw.readShort();\n    xMin = raw.readShort();\n    yMin = raw.readShort();\n    xMax = raw.readShort();\n    yMax = raw.readShort();\n    if (numberOfContours === -1) {\n      this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);\n    } else {\n      this.cache[id] = new SimpleGlyph(\n        raw,\n        numberOfContours,\n        xMin,\n        yMin,\n        xMax,\n        yMax\n      );\n    }\n    return this.cache[id];\n  };\n  GlyfTable.prototype.encode = function(glyphs, mapping, old2new) {\n    var glyph, id, offsets, table, _i, _len;\n    table = [];\n    offsets = [];\n    for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n      id = mapping[_i];\n      glyph = glyphs[id];\n      offsets.push(table.length);\n      if (glyph) {\n        table = table.concat(glyph.encode(old2new));\n      }\n    }\n    offsets.push(table.length);\n    return {\n      table: table,\n      offsets: offsets\n    };\n  };\n  return GlyfTable;\n})(Table);\n\nvar SimpleGlyph = (function() {\n  /**************************************************************************/\n  /* function : SimpleGlyph                                                 */\n  /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/\n  /**************************************************************************/\n  function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {\n    this.raw = raw;\n    this.numberOfContours = numberOfContours;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = false;\n  }\n  SimpleGlyph.prototype.encode = function() {\n    return this.raw.data;\n  };\n  return SimpleGlyph;\n})();\n\nvar CompoundGlyph = (function() {\n  var ARG_1_AND_2_ARE_WORDS,\n    MORE_COMPONENTS,\n    WE_HAVE_AN_X_AND_Y_SCALE,\n    WE_HAVE_A_SCALE,\n    WE_HAVE_A_TWO_BY_TWO,\n    WE_HAVE_INSTRUCTIONS;\n  ARG_1_AND_2_ARE_WORDS = 0x0001;\n  WE_HAVE_A_SCALE = 0x0008;\n  MORE_COMPONENTS = 0x0020;\n  WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;\n  WE_HAVE_A_TWO_BY_TWO = 0x0080;\n  WE_HAVE_INSTRUCTIONS = 0x0100;\n\n  /********************************************************************************************************************/\n  /* function : CompoundGlypg generator                                                                               */\n  /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/\n  /********************************************************************************************************************/\n  function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {\n    var data, flags;\n    this.raw = raw;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = true;\n    this.glyphIDs = [];\n    this.glyphOffsets = [];\n    data = this.raw;\n    while (true) {\n      flags = data.readShort();\n      this.glyphOffsets.push(data.pos);\n      this.glyphIDs.push(data.readUInt16());\n      if (!(flags & MORE_COMPONENTS)) {\n        break;\n      }\n      if (flags & ARG_1_AND_2_ARE_WORDS) {\n        data.pos += 4;\n      } else {\n        data.pos += 2;\n      }\n      if (flags & WE_HAVE_A_TWO_BY_TWO) {\n        data.pos += 8;\n      } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n        data.pos += 4;\n      } else if (flags & WE_HAVE_A_SCALE) {\n        data.pos += 2;\n      }\n    }\n  }\n  /****************************************************************************************************************/\n  /* function : CompoundGlypg encode                                                                              */\n  /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/\n  /****************************************************************************************************************/\n  CompoundGlyph.prototype.encode = function() {\n    var i, result, _len, _ref;\n    result = new Data(__slice.call(this.raw.data));\n    _ref = this.glyphIDs;\n    for (i = 0, _len = _ref.length; i < _len; ++i) {\n      result.pos = this.glyphOffsets[i];\n    }\n    return result.data;\n  };\n  return CompoundGlyph;\n})();\n\nvar LocaTable = (function(_super) {\n  __extends(LocaTable, _super);\n\n  function LocaTable() {\n    return LocaTable.__super__.constructor.apply(this, arguments);\n  }\n  LocaTable.prototype.tag = \"loca\";\n  LocaTable.prototype.parse = function(data) {\n    var format, i;\n    data.pos = this.offset;\n    format = this.file.head.indexToLocFormat;\n    if (format === 0) {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 2) {\n          _results.push(data.readUInt16() * 2);\n        }\n        return _results;\n      }.call(this));\n    } else {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 4) {\n          _results.push(data.readUInt32());\n        }\n        return _results;\n      }.call(this));\n    }\n  };\n  LocaTable.prototype.indexOf = function(id) {\n    return this.offsets[id];\n  };\n  LocaTable.prototype.lengthOf = function(id) {\n    return this.offsets[id + 1] - this.offsets[id];\n  };\n  LocaTable.prototype.encode = function(offsets, activeGlyphs) {\n    var LocaTable = new Uint32Array(this.offsets.length);\n    var glyfPtr = 0;\n    var listGlyf = 0;\n    for (var k = 0; k < LocaTable.length; ++k) {\n      LocaTable[k] = glyfPtr;\n      if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {\n        ++listGlyf;\n        LocaTable[k] = glyfPtr;\n        var start = this.offsets[k];\n        var len = this.offsets[k + 1] - start;\n        if (len > 0) {\n          glyfPtr += len;\n        }\n      }\n    }\n    var newLocaTable = new Array(LocaTable.length * 4);\n    for (var j = 0; j < LocaTable.length; ++j) {\n      newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;\n      newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;\n      newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;\n      newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;\n    }\n    return newLocaTable;\n  };\n  return LocaTable;\n})(Table);\n\n/************************************************************************************/\n/* function : invert                                                                */\n/* comment : Change the object's (key: value) to create an object with (value: key).*/\n/************************************************************************************/\nvar invert = function(object) {\n  var key, ret, val;\n  ret = {};\n  for (key in object) {\n    val = object[key];\n    ret[val] = key;\n  }\n  return ret;\n};\n\n/*var successorOf = function (input) {\n        var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;\n        alphabet = 'abcdefghijklmnopqrstuvwxyz';\n        length = alphabet.length;\n        result = input;\n        i = input.length;\n        while (i >= 0) {\n            last = input.charAt(--i);\n            if (isNaN(last)) {\n                index = alphabet.indexOf(last.toLowerCase());\n                if (index === -1) {\n                    next = last;\n                    carry = true;\n                }\n                else {\n                    next = alphabet.charAt((index + 1) % length);\n                    isUpperCase = last === last.toUpperCase();\n                    if (isUpperCase) {\n                        next = next.toUpperCase();\n                    }\n                    carry = index + 1 >= length;\n                    if (carry && i === 0) {\n                        added = isUpperCase ? 'A' : 'a';\n                        result = added + next + result.slice(1);\n                        break;\n                    }\n                }\n            }\n            else {\n                next = +last + 1;\n                carry = next > 9;\n                if (carry) {\n                    next = 0;\n                }\n                if (carry && i === 0) {\n                    result = '1' + next + result.slice(1);\n                    break;\n                }\n            }\n            result = result.slice(0, i) + next + result.slice(i + 1);\n            if (!carry) {\n                break;\n            }\n        }\n        return result;\n    };*/\n\nvar Subset = (function() {\n  function Subset(font) {\n    this.font = font;\n    this.subset = {};\n    this.unicodes = {};\n    this.next = 33;\n  }\n  /*Subset.prototype.use = function (character) {\n            var i, _i, _ref;\n            if (typeof character === 'string') {\n                for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                    this.use(character.charCodeAt(i));\n                }\n                return;\n            }\n            if (!this.unicodes[character]) {\n                this.subset[this.next] = character;\n                return this.unicodes[character] = this.next++;\n            }\n        };*/\n  /*Subset.prototype.encodeText = function (text) {\n            var char, i, string, _i, _ref;\n            string = '';\n            for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                char = this.unicodes[text.charCodeAt(i)];\n                string += String.fromCharCode(char);\n            }\n            return string;\n        };*/\n  /***************************************************************/\n  /* function : generateCmap                                     */\n  /* comment : Returns the unicode cmap for this font.         */\n  /***************************************************************/\n  Subset.prototype.generateCmap = function() {\n    var mapping, roman, unicode, unicodeCmap, _ref;\n    unicodeCmap = this.font.cmap.tables[0].codeMap;\n    mapping = {};\n    _ref = this.subset;\n    for (roman in _ref) {\n      unicode = _ref[roman];\n      mapping[roman] = unicodeCmap[unicode];\n    }\n    return mapping;\n  };\n  /*Subset.prototype.glyphIDs = function () {\n            var ret, roman, unicode, unicodeCmap, val, _ref;\n            unicodeCmap = this.font.cmap.tables[0].codeMap;\n            ret = [0];\n            _ref = this.subset;\n            for (roman in _ref) {\n                unicode = _ref[roman];\n                val = unicodeCmap[unicode];\n                if ((val != null) && __indexOf.call(ret, val) < 0) {\n                    ret.push(val);\n                }\n            }\n            return ret.sort();\n        };*/\n  /******************************************************************/\n  /* function : glyphsFor                                           */\n  /* comment : Returns simple glyph objects for the input character.*/\n  /******************************************************************/\n  Subset.prototype.glyphsFor = function(glyphIDs) {\n    var additionalIDs, glyph, glyphs, id, _i, _len, _ref;\n    glyphs = {};\n    for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {\n      id = glyphIDs[_i];\n      glyphs[id] = this.font.glyf.glyphFor(id);\n    }\n    additionalIDs = [];\n    for (id in glyphs) {\n      glyph = glyphs[id];\n      if (glyph != null ? glyph.compound : void 0) {\n        additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);\n      }\n    }\n    if (additionalIDs.length > 0) {\n      _ref = this.glyphsFor(additionalIDs);\n      for (id in _ref) {\n        glyph = _ref[id];\n        glyphs[id] = glyph;\n      }\n    }\n    return glyphs;\n  };\n  /***************************************************************/\n  /* function : encode                                           */\n  /* comment : Encode various tables for the characters you use. */\n  /***************************************************************/\n  Subset.prototype.encode = function(glyID, indexToLocFormat) {\n    var cmap,\n      code,\n      glyf,\n      glyphs,\n      id,\n      ids,\n      loca,\n      new2old,\n      newIDs,\n      nextGlyphID,\n      old2new,\n      oldID,\n      oldIDs,\n      tables,\n      _ref;\n    cmap = CmapTable.encode(this.generateCmap(), \"unicode\");\n    glyphs = this.glyphsFor(glyID);\n    old2new = {\n      0: 0\n    };\n    _ref = cmap.charMap;\n    for (code in _ref) {\n      ids = _ref[code];\n      old2new[ids.old] = ids[\"new\"];\n    }\n    nextGlyphID = cmap.maxGlyphID;\n    for (oldID in glyphs) {\n      if (!(oldID in old2new)) {\n        old2new[oldID] = nextGlyphID++;\n      }\n    }\n    new2old = invert(old2new);\n    newIDs = Object.keys(new2old).sort(function(a, b) {\n      return a - b;\n    });\n    oldIDs = (function() {\n      var _i, _len, _results;\n      _results = [];\n      for (_i = 0, _len = newIDs.length; _i < _len; _i++) {\n        id = newIDs[_i];\n        _results.push(new2old[id]);\n      }\n      return _results;\n    })();\n    glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);\n    loca = this.font.loca.encode(glyf.offsets, oldIDs);\n    tables = {\n      cmap: this.font.cmap.raw(),\n      glyf: glyf.table,\n      loca: loca,\n      hmtx: this.font.hmtx.raw(),\n      hhea: this.font.hhea.raw(),\n      maxp: this.font.maxp.raw(),\n      post: this.font.post.raw(),\n      name: this.font.name.raw(),\n      head: this.font.head.encode(indexToLocFormat)\n    };\n    if (this.font.os2.exists) {\n      tables[\"OS/2\"] = this.font.os2.raw();\n    }\n    return this.font.directory.encode(tables);\n  };\n  return Subset;\n})();\n\njsPDF.API.PDFObject = (function() {\n  var pad;\n\n  function PDFObject() {}\n  pad = function(str, length) {\n    return (Array(length + 1).join(\"0\") + str).slice(-length);\n  };\n  /*****************************************************************************/\n  /* function : convert                                                        */\n  /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */\n  /*****************************************************************************/\n  PDFObject.convert = function(object) {\n    var e, items, key, out, val;\n    if (Array.isArray(object)) {\n      items = (function() {\n        var _i, _len, _results;\n        _results = [];\n        for (_i = 0, _len = object.length; _i < _len; _i++) {\n          e = object[_i];\n          _results.push(PDFObject.convert(e));\n        }\n        return _results;\n      })().join(\" \");\n      return \"[\" + items + \"]\";\n    } else if (typeof object === \"string\") {\n      return \"/\" + object;\n    } else if (object != null ? object.isString : void 0) {\n      return \"(\" + object + \")\";\n    } else if (object instanceof Date) {\n      return (\n        \"(D:\" +\n        pad(object.getUTCFullYear(), 4) +\n        pad(object.getUTCMonth(), 2) +\n        pad(object.getUTCDate(), 2) +\n        pad(object.getUTCHours(), 2) +\n        pad(object.getUTCMinutes(), 2) +\n        pad(object.getUTCSeconds(), 2) +\n        \"Z)\"\n      );\n    } else if ({}.toString.call(object) === \"[object Object]\") {\n      out = [\"<<\"];\n      for (key in object) {\n        val = object[key];\n        out.push(\"/\" + key + \" \" + PDFObject.convert(val));\n      }\n      out.push(\">>\");\n      return out.join(\"\\n\");\n    } else {\n      return \"\" + object;\n    }\n  };\n  return PDFObject;\n})();\n"],"names":["globalObject","window","global","self","this","consoleLog","console","log","apply","arguments","warn","str","call","error","download","url","name","opts","xhr","XMLHttpRequest","open","responseType","onload","saveAs","response","onerror","send","corsEnabled","e","status","click","node","dispatchEvent","MouseEvent","evt","document","createEvent","initMouseEvent","atob","btoa","_global","HTMLAnchorElement","prototype","blob","URL","webkitURL","a","createElement","rel","href","origin","location","target","createObjectURL","setTimeout","revokeObjectURL","navigator","msSaveOrOpenBlob","autoBom","_typeof","test","type","Blob","String","fromCharCode","bom","popup","title","body","innerText","force","isSafari","HTMLElement","safari","isChromeIOS","userAgent","FileReader","reader","onloadend","result","replace","readAsDataURL","RGBColor","color_string","channels","ok","charAt","substr","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","feldspar","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslateblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","violetred","wheat","white","whitesmoke","yellow","yellowgreen","toLowerCase","color_defs","re","example","process","bits","parseInt","i","length","processor","exec","r","g","b","isNaN","toRGB","toHex","toString","md5cycle","x","k","c","d","ff","gg","hh","ii","add32","cmn","q","s","t","md51","n","state","md5blk","substring","tail","charCodeAt","md5blks","bind","hex_chr","split","rhex","j","singleToByteString","md5Bin","map","join","md5Check","hex","lsw","rc4","key","data","lastKey","lastState","num","Array","out","permissionOptions","print","modify","copy","PDFSecurity","permissions","userPassword","ownerPassword","fileId","v","protection","forEach","perm","Error","padding","paddedUserPassword","paddedOwnerPassword","O","processOwnerPassword","P","encryptionKey","lsbFirstWord","hexToBytes","U","toPDFName","strLength","charCode","slice","PubSub","context","topics","subscribe","topic","callback","once","hasOwnProperty","token","Math","random","unsubscribe","Object","keys","publish","args","tokens","sub","ex","message","push","getTopics","GState","parameters","supported","p","indexOf","id","objectNumber","Pattern","gState","matrix","ShadingPattern","coords","colors","TilingPattern","boundingBox","xStep","yStep","stream","cloneIndex","jsPDF","options","precision","orientation","unit","format","compressPdf","filters","userUnit","floatPrecision","defaultPathOperation","encryptionOptions","compress","encryption","userPermissions","abs","putOnlyUsedFonts","usedFonts","API","internal","__private__","pdfVersion","getPdfVersion","setPdfVersion","value","pageFormats","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","b10","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","dl","letter","legal","ledger","tabloid","getPageFormats","getPageFormat","ApiMode","COMPAT","ADVANCED","apiMode","advancedAPI","saveGraphicsState","Matrix","scaleFactor","getPageHeight","setFontSize","getFontSize","compatAPI","restoreGraphicsState","combineFontStyleAndFontWeight","fontStyle","fontWeight","doSwitch","isAdvancedAPI","hpf","advancedApiModeTrap","methodName","roundToPrecision","number","parmPrecision","tmpPrecision","toFixed","f2","f3","scale","transformY","y","transformScaleY","setPrecision","creationDate","getFileId","setFileId","toUpperCase","floor","convertDateToPDFDate","parmDate","tzoffset","getTimezoneOffset","tzsign","tzhour","tzmin","timeZoneString","padd2","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","convertPDFDateToDate","parmPDFDate","year","month","date","hour","minutes","seconds","Date","setCreationDate","tmpCreationDateString","getCreationDate","currentPage","padd2Hex","hexString","offsets","content","contentLength","additionalObjects","pages","hasCustomDestination","outputDestination","resetDocument","rootDictionaryObjId","newObjectDeferred","resourceDictionaryObjId","setCustomOutputDestination","destination","setOutputDestination","resetCustomOutputDestination","string","write","getArrayBuffer","len","ab","ArrayBuffer","u8","Uint8Array","standardFonts","getStandardFonts","activeFontSize","fontSize","size","zoomMode","R2L","setR2L","getR2L","pageMode","setZoomMode","zoom","validZoomModes","undefined","getZoomMode","layoutMode","setPageMode","pmode","getPageMode","setLayoutMode","layout","getLayoutMode","setDisplayMode","documentProperties","subject","author","keywords","creator","getDocumentProperty","getDocumentProperties","setDocumentProperties","setProperties","properties","property","setDocumentProperty","activeFontKey","pageX","pageY","pageMatrix","fonts","fontmap","fontStateStack","patterns","patternMap","gStates","gStatesMap","activeGState","page","pagesContext","events","hotfixes","renderTargets","renderTargetMap","renderTargetStack","sx","shy","shx","sy","tx","ty","_matrix","defineProperty","get","set","atan2","decompose","separator","multiply","f","scaleX","sqrt","shear","scaleY","translate","rotate","skew","inversed","quot","aInv","bInv","cInv","dInv","applyToPoint","pt","Point","applyToRectangle","rect","pt1","pt2","w","h","Rectangle","clone","matrixMult","m1","m2","identityMatrix","unitMatrix","addPattern","pattern","patternKey","addShadingPattern","beginTilingPattern","beginNewRenderTarget","endTilingPattern","pop","restore","newObject","oid","newObjectDeferredBegin","doOutput","newAdditionalObject","obj","objId","decodeColorString","color","colorEncoded","floatVal","parseFloat","colorAsRGB","encodeColorString","ch1","ch2","ch3","ch4","letterArray","pdfColorType","rgbColor","getFilters","putStream","alreadyAppliedFilters","addLength1","valueOfLength1","objectId","encryptor","processedData","keyValues","additionalKeyValues","filterAsString","processDataByFilters","reverseChain","isArray","decodeParmsArray","putPage","pageNumber","pageObjectNumber","pageContentsObjId","contentsObjId","mediaBox","bottomLeftX","bottomLeftY","topRightX","topRightY","cropBox","bleedBox","trimBox","artBox","pageContext","pageContent","putPages","pageObjectNumbers","kids","putFont","font","isAlreadyPutted","postScriptName","encoding","putFonts","fontKey","putXObject","xObject","width","height","putXObjects","xObjectKey","interpolateAndEncodeRGBStream","numberSamples","tValues","dT","offset","unshift","index","aColor","bColor","round","trim","putShadingPattern","funcObjectNumber","putTilingPattern","deferredResourceDictionaryIds","resourcesObjectId","patternObjectId","resourcesOid","objectOid","putPatterns","putGState","putGStates","gStateKey","putXobjectDict","putEncryptionDict","toHexString","putFontDict","putShadingPatternDict","putTilingPatternDict","putGStatesDict","putResourceDictionary","objectIds","putResources","Number","MAX_SAFE_INTEGER","putAdditionalObjects","addFontToFontDictionary","fontName","addFont","isStandardFont","metadata","instance","addFonts","arrayOfFonts","l","parts","dictionary","SAFE","fn","foo","stack","m","alert","bar","to8bitStream","text","flags","sourceEncoding","encodingBlock","outputEncoding","newtext","isUnicode","ch","bch","autoencode","codePages","noBOM","pdfEscape","beginPage","_setPage","_addPage","parmFormat","parmOrientation","dimensions","min","setLineWidth","lineWidth","strokeColor","lineCapID","lineJoinID","_deletePage","splice","setPage","getNumberOfPages","getFont","fontNameLowerCase","disableWarning","noFallback","putInfo","version","putCatalog","tmpRootDictionaryObjId","pcn","putTrailer","putHeader","putXRef","buildDocument","offsetOfXRef","getBlob","output","filename","save","dataURI","pdfDocument","unescape","encodeURIComponent","pdfObjectUrl","integrity","htmlForNewWindow","JSON","stringify","nW","htmlForPDFjsNewWindow","pdfJsUrl","PDFjsNewWindow","scope","documentElement","querySelector","contentWindow","PDFViewerApplication","htmlForDataURLNewWindow","dataURLNewWindow","hasHotfix","hotfixName","getEncryptor","getPageInfo","pageNumberOneBased","getPageInfoByObjId","getCurrentPageInfo","addPage","insertPage","beforePage","movePage","targetPage","tmpPages","tmpPagesContext","deletePage","transform","payload","da","angle","align","charSpace","maxWidth","horizontalScale","transformationMatrix","tmp","xtra","isHex","lineHeight","lineHeightFactor","ESC","TabLen","transformTextToSpecialArray","curDa","sa","concat","shift","processTextByFunction","processingFunction","tmpResult","textIsOfTypeString","tmpTextIsOfTypeString","match","descent","baseline","splitTextToSize","reduce","acc","textLine","mutex","PI","rotationDirection","cos","sin","activeCharSpace","setCharSpace","getCharSpace","lang","renderingMode","parmRenderingMode","stroke","usedRenderingMode","lineWidths","leading","pageWidth","pageSize","getWidth","activeFont","assign","wordSpacingPerLine","findWidth","getStringUnitWidth","doKerning","newY","newX","prevWidth","getHorizontalCoordinate","getVerticalCoordinate","backToStartX","spacing","words","shiftAmount","doReversing","posX","posY","reverse","activeFontEncoding","STRING","ARRAY","variant","wordSpacing","generatePosition","parmPosX","parmPosY","parmTransformationMatrix","position","lineIndex","textColor","clip","rule","clipEvenOdd","discardPath","isValidStyle","style","setDefaultPathOperation","operator","getStyle","op","close","fill","fillWithOptionalPattern","fillEvenOdd","fillStroke","fillStrokeEvenOdd","fillWithPattern","putStyle","cloneTilingPattern","patternData","patternId","clipRuleFromStyle","setGState","moveTo","lineTo","curveTo","x1","y1","x2","y2","x3","y3","line","lines","closed","scalex","scaley","leg","x4","y4","path","triangle","roundedRect","rx","ry","MyArc","SQRT2","ellipse","lx","ly","circle","setFont","getFontEntry","getFontList","list","encodingOptions","getLineWidth","setLineDash","setLineDashPattern","dashArray","dashPhase","getLineHeight","setLineHeightFactor","getLineHeightFactor","getHorizontalCoordinateString","getVerticalCoordinateString","getStrokeColor","getDrawColor","setStrokeColor","setDrawColor","fillColor","getFillColor","setFillColor","getTextColor","setTextColor","CapJoinStyles","butt","but","miter","rounded","projecting","project","square","bevel","setLineCap","setLineJoin","setLineMiterLimit","setMiterLimit","addGState","equals","duplicate","fontState","setCurrentTransformationMatrix","comment","_x","enumerable","_y","_type","_w","_h","RenderTarget","getPageWidth","setPageWidth","setPageHeight","endFormObject","newXObject","xObjectId","plugin","beginFormObject","doFormObject","getFormObject","returnPromise","unload","Promise","resolve","reject","newEvents","eventname","handler_and_args","getCoordinateString","collections","setWidth","getHeight","setHeight","getPDFVersion","configurable","byteString","byte","bytes","generation","other","ignore","count","jsPDFAPI","pdfUnescape","f5","__acroform__","inherit","child","parent","create","constructor","createFormXObject","formObject","xobj","AcroFormXObject","AcroFormAppearance","BBox","setBit","bitPosition","clearBit","getBit","getBitForPdf","setBitForPdf","clearBitForPdf","calculateCoordinates","coordinates","lowerLeft_X","lowerLeft_Y","upperRight_X","upperRight_Y","calculateAppearanceStream","appearanceStreamContent","V","DV","_V","calcRes","calculateX","maxFontSize","returnValue","textSplit","multiline","word","isSmallerThanWidth","lastLine","calculateFontSpace","FontSize","startX","lastLength","textHeight","startY","lastY","firstWordInLine","lastWordInLine","currWord","lineCount","isWithNewLine","nextLineIsSmaller","isLastWord","currLine","textAlign","acroformPluginTemplate","fields","xForms","acroFormDictionaryRoot","printedOut","isInitialized","createAnnotationReference","object","annotations","find","entry","createXFormObjectCallback","fieldArray","fieldObject","initializeAcroForm","acroformPlugin","AcroFormField","FieldNum","parse","AcroFormDictionary","_eventID","AcroFormDictionaryCallback","Fields","hasAnnotation","annotReferenceCallback","putCatalogCallback","standardFields","Kids","keyValueList","oldRect","Rect","DA","createDefaultAppearanceStream","getKeyValueListForStream","hasAppearanceStream","appearance","appearanceStreamString","createFieldCallback","arrayToPdfArray","array","toPdfString","AcroFormPDFObject","_objId","_scope","writable","getOwnPropertyNames","filter","getOwnPropertyDescriptor","_stream","_BBox","_DA","_Kids","_F","Boolean","F","_Ff","_Rect","_FT","_T","AcroFormChildClass","_fontName","_fontStyle","_fontSize","_maxFontSize","_color","AcroFormTextField","_DV","AcroFormButton","_page","_hasAppearanceStream","Ff","_Q","AcroFormChoiceField","FT","_TI","_Opt","regex","matches","getMatches","getOptions","setOptions","sort","addOption","removeOption","allEntries","combo","AcroFormListBox","AcroFormComboBox","AcroFormEditBox","edit","_AS","_MK","CA","AcroFormPushButton","pushButton","AcroFormRadioButton","radio","_parent","_optionName","caption","appearanceState","_AppearanceType","RadioButton","Circle","createAppearanceStream","optionName","setAppearance","getCA","createOption","Parent","addField","AcroFormCheckBox","CheckBox","_MaxLen","isInteger","AcroFormPasswordField","password","N","On","YesNormal","D","YesPushDown","Off","OffPushDown","encodedColor","DotRadius","Bezier_C","DotRadiusBezier","kc","dc","Cross","cross","calculateCross","AcroForm","ChoiceField","ListBox","ComboBox","EditBox","Button","PushButton","TextField","PasswordField","Appearance","toLookup","arr","lookup","__addimage__","UNKNOWN","imageFileTypeHeaders","PNG","TIFF","JPEG","JPEG2000","GIF87a","GIF89a","WEBP","BMP","getImageFileTypeByImageData","imageData","fallbackFormat","headerSchemata","compareResult","fileType","Uint8ClampedArray","isArrayBufferView","putImage","image","colorSpace","color_spaces","INDEXED","palette","sMask","DEVICE_CMYK","bitsPerComponent","decodeParameters","transparency","predictor","arrayBufferToBinaryString","putResourcesCallback","images","putXObjectsDictCallback","initialize","getImages","getImageIndex","isImageTypeSupported","isDOMElement","nodeType","getImageDataFromElement","element","nodeName","hasAttribute","src","getAttribute","tmpImageData","loadFile","mimeType","toDataURL","checkImagesForAlias","alias","determineWidthAndHeight","writeImageToPDF","rotation","dims","coord","vcoord","f4","rotationTransformationMatrix","DEVICE_RGB","DEVICE_GRAY","CAL_GREY","CAL_RGB","LAB","ICC_BASED","PATTERN","SEPARATION","DEVICE_N","decode","DCT_DECODE","FLATE_DECODE","LZW_DECODE","JPX_DECODE","JBIG2_DECODE","ASCII85_DECODE","ASCII_HEX_DECODE","RUN_LENGTH_DECODE","CCITT_FAX_DECODE","image_compression","NONE","FAST","MEDIUM","SLOW","sHashCode","hash","byteLength","validateStringAsBase64","possibleBase64String","extractImageFromDataUrl","dataUrl","dataUrlParts","extractedInfo","charset","supportsArrayBuffer","isArrayBuffer","Uint32Array","Int8Array","Int16Array","Uint16Array","Int32Array","Float32Array","Float64Array","binaryStringToUint8Array","binary_string","buffer","buf","subarray","addImage","compression","processImageData","dataAsBinaryString","convertBase64ToBinaryString","generateAliasFromImageData","checkCompressValue","stringData","throwError","base64Info","rawData","getImageProperties","notEmpty","addPageData","putPageData","anno","pageInfo","pageAnnos","found","escape","objText","objPopup","encryptorText","bounds","contents","loc","_nameMap","top","finalBounds","magFactor","left","createAnnotation","link","textWithLink","linkHeight","linkWidth","totalLineWidth","getTextWidth","numOfLines","ceil","arabicSubstitionA","ligatures","arabic_diacritics","alfletter","__arabicParser__","isInArabicSubstitutionA","isArabicLetter","isArabicEndLetter","isArabicAlfLetter","arabicLetterHasIsolatedForm","arabicLetterHasFinalForm","arabicLetterHasInitialForm","arabicLetterHasMedialForm","resolveLigatures","letters","tmpLigatures","effectedLetters","isArabicDiacritic","getCorrectForm","currentChar","beforeChar","nextChar","parseArabic","currentLetter","prevLetter","nextLetter","newWords","processArabic","tmpText","autoPrint","refAutoPrintTag","addJS","Canvas","jsPdfInstance","_width","getContext","pageWrapXEnabled","pageWrapX","_height","pageWrapYEnabled","pageWrapY","_childNodes","_style","contextType","contextAttributes","pdf","context2d","_canvas","canvas","NO_MARGINS","bottom","right","printingHeaderRow","_initialize","__cell__","headerFunction","margins","_reset","lastCell","Cell","_text","_lineNumber","_align","lineNumber","toArray","setHeaderFunction","func","getTextDimensions","amountOfLines","tempWidth","max","cellAddPage","cell","currentCell","tableHeaderRow","printHeaders","printHeaderRow","table","headers","config","column","headerName","headerNames","headerLabels","headerAligns","columnMatrix","columnWidths","columnMinWidths","tableHeaderConfigs","autoSize","css","headerBackgroundColor","headerTextColor","table_font_size","header","prompt","rec","row","rowHeight","calculateLineHeight","setTableHeaderRow","pv","cv","rowStart","Function","cellData","cellStart","col","table_x","table_y","model","new_page","tableHeaderCell","tempHeaderConf","currentTextColor","fontStyleOrder","italic","oblique","normal","fontStretchOrder","fontStretchLookup","fontWeights","fontWeightsLookup","normalizeFontFace","fontFace","family","normalizeFontStyle","weight","normalizeFontWeight","stretch","normalizeFontStretch","ref","searchFromPivot","matchingSet","order","pivot","dir","defaultGenericFontFamilies","fixed","monospace","terminal","cursive","fantasy","serif","systemFonts","icon","menu","ruleToString","resolveFontFace","fontFaceMap","rules","defaultFontFamily","genericFontFamilies","resolveFontStretch","ordering","resolveFontStyle","resolveFontWeight","eatWhiteSpace","input","trimLeft","parseQuotedFontFamily","quote","parseNonQuotedFontFamily","jsNamesObj","jsJsObj","defaultFont","_ctx","ContextLayer","ctx","isStrokeTransparent","strokeOpacity","strokeStyle","fillStyle","isFillTransparent","fillOpacity","textBaseline","lineJoin","lineCap","globalCompositeOperation","globalAlpha","clip_path","currentPoint","miterLimit","lastPoint","lineDashOffset","lineDash","margin","prevPageLastElemOffset","ignoreClearRect","Context2D","parentNode","_pdf","_pageWrapXEnabled","_pageWrapYEnabled","_posX","_posY","_autoPaging","lastBreak","pageBreaks","_ctxStack","rgba","getRGBA","_fontFaceMap","getFontFaceMap","fontFaces","convertedFontFaces","fontMap","convertToFontFaces","normalized","buildFontFaceMap","_fontFaces","fontFamily","fontSizeUnit","parsed","remaining","parseFontFamily","jsPdfFontName","fallbackFonts","arial","Arial","verdana","Verdana","helvetica","Helvetica","getLineDash","pathPreProcess","beginPath","closePath","pathBegin","quadraticCurveTo","cpx","cpy","pt0","bezierCurveTo","cp1x","cp1y","cp2x","cp2y","arc","radius","startAngle","endAngle","counterclockwise","isIdentity","xpt","x_radPt","x_radPt0","pow","arcTo","fillRect","strokeRect","clearRect","doStackPush","tmpPageNumber","ctxStack","doStackPop","isCanvasGradient","getColor","fillText","degs","rad2deg","putText","strokeText","measureText","txtWidth","TextMetrics","scalewidth","scaleheight","setTransform","hasMargins","drawImage","img","swidth","sheight","imageProperties","factorX","factorY","clipFactorX","clipFactorY","clipPath","decomposedTransformationMatrix","xRect","pageArray","getPagesByPath","sortPages","autoPaging","pageWidthMinusMargins","topMargin","firstPageHeight","pageHeightMinusMargins","previousPageHeightSum","tmpPaths","pathPositionRedo","drawPaths","tmpRect","needsClipping","yOffset","rectOfQuadraticCurve","getQuadraticCurveBoundary","rectOfBezierCurve","getBezierCurveBoundary","paths","isClip","tmpPath","oldLineWidth","origPath","xPath","delta","moves","begin","start","deltas","iii","began","arcs","drawArc","drawLine","drawLines","doClip","getBaseline","getTextBottom","yBaseLine","createLinearGradient","canvasGradient","colorStops","addColorStop","createPattern","createRadialGradient","includeMove","curves","createArc","curve","doMove","drawCurve","textDimensions","yTop","oldSize","baselineRect","textBounds","pageHeightMinusBottomMargin","pageWidthMinusRightMargin","textBoundsOnPage","doSlice","croppedText","baseLineRectOnPage","prevX","prevY","anticlockwise","twoPi","halfPi","totalAngle","sgn","createSmallArc","q1","q2","k2","ar","cos_ar","sin_ar","ey","midX1","midY1","midX2","midY2","resultX1","resultX2","resultY1","resultY2","ax","ay","bx","by","cx","cy","dx","dy","px","py","qx","qy","minx","miny","maxx","maxy","tobx","toby","tocx","tocy","todx","tody","prevLineDash","nextLineDash","ASCII85Encode","ASCII85Decode","z","ASCIIHexDecode","regexCheckIfHex","RegExp","FlateEncode","zlibSync","origData","filterChain","sync","request","sanitizeUnicode","dataLength","charArray","StringFromCharCode","overrideMimeType","responseText","browserRequest","loadImageFile","loadHtml2Canvas","import","catch","then","html2canvas","default","loadDomPurify","dompurify","objType","tagName","opt","el","className","innerHTML","sanitize","Worker","root","convert","template","setProgress","promise","__proto__","prop","container","overlay","progress","val","enableLinks","backgroundColor","from","getType","to","toContainer","toCanvas","toImg","toPdf","thenList","setPageSize","containerCSS","display","windowWidth","clientWidth","scrollWidth","offsetWidth","source","cloneNode","javascriptEnabled","createTextNode","nodeValue","firstChild","nextSibling","appendChild","addEventListener","scrollTop","scrollLeft","scrollHeight","offsetHeight","clientHeight","overflow","zIndex","clear","border","float","prereqs","contains","onrendered","removeChild","toContext2d","async","allowTaint","scrollX","scrollY","imageTimeout","logging","proxy","removeContainer","foreignObjectRendering","useCORS","windowHeight","imgData","quality","outputImg","outputPdf","doCallback","fns","setMargin","cbk","toPx","getPageSize","inner","ratio","updateProgress","onFulfilled","onRejected","thenCore","thenBase","selfPromise","returnVal","thenExternal","catchExternal","msg","using","export","run","format_as_string","pageHeight","err","html","worker","javascript","namesOid","outline","children","render","createNamedDestinations","totalPages","dests","info","names2Oid","makeRef","add","item","genIds_r","renderRoot","renderItems","objStart","count_r","objEnd","makeString","markers","processJPEG","blockLength","numcomponents","getJpegInfo","getCharWidthsArray","splitLongWord","splitParagraphIntoLines","makeImage","scratchCanvas","scratchCtx","chunkSize","palLen","delayDen","delayNum","frame","section","palShort","_i","_j","_ref","pos","animation","readUInt32","_results","colorType","compressionMethod","filterMethod","interlaceMethod","numFrames","numPlays","Infinity","frames","read","xOffset","readUInt16","delay","disposeOp","blendOp","indexed","grayscale","rgb","hasAlphaChannel","pixelBitlength","decodePixels","pixelBytes","fullPixels","_this","pass","x0","y0","abyte","pa","paeth","pb","pc","pixels","scanlineLength","upper","upperLeft","_k","_l","_m","isFull","fullPos","partPos","unzlibSync","decodePalette","ret","_ref1","copyToImageData","alpha","_decodedPalette","hasBrowserCanvas","putImageData","Image","decodeFrames","_len","createImageData","renderFrame","prev","animate","doFrame","frameNumber","_timeout","stopAnimation","clearTimeout","_png","GifReader","pf0","global_palette_flag","num_global_colors","global_palette_offset","global_palette_size","no_eof","transparent_index","disposal","loop_count","block_size","pf1","pf2","interlace_flag","num_local_colors","palette_offset","palette_size","has_local_palette","data_offset","data_length","interlaced","loopCount","frameInfo","frame_num","decodeAndBlitFrameBGRA","num_pixels","index_stream","GifReaderLZWOutputIndexStream","trans","framewidth","framestride","xleft","opbeg","opend","scanstride","interlaceskip","il","decodeAndBlitFrameRGBA","code_stream","output_length","min_code_size","clear_code","eoi_code","next_code","cur_code_size","code_mask","cur_shift","cur","subblock_size","code_table","prev_code","code","chase_code","chase_length","chase","JPEGEncoder","YDC_HT","UVDC_HT","YAC_HT","UVAC_HT","currentQuality","ffloor","YTable","UVTable","fdtbl_Y","fdtbl_UV","bitcode","category","outputfDCTQuant","DU","byteout","bytenew","bytepos","YDU","UDU","VDU","clt","RGB_YUV_TABLE","ZigZag","std_dc_luminance_nrcodes","std_dc_luminance_values","std_ac_luminance_nrcodes","std_ac_luminance_values","std_dc_chrominance_nrcodes","std_dc_chrominance_values","std_ac_chrominance_nrcodes","std_ac_chrominance_values","computeHuffmanTbl","nrcodes","std_table","codevalue","pos_in_table","HT","writeBits","bs","posval","writeByte","writeWord","processDU","CDU","fdtbl","DC","HTDC","HTAC","EOB","M16zeroes","DU_DCT","d0","d1","d2","d3","d4","d5","d6","d7","fDCTQuant","dataOff","tmp0","tmp7","tmp1","tmp6","tmp2","tmp5","tmp3","tmp4","tmp10","tmp13","tmp11","tmp12","z1","z5","z2","z4","z3","z11","z13","tmp0p2","tmp7p2","tmp1p2","tmp6p2","tmp2p2","tmp5p2","tmp3p2","tmp4p2","tmp10p2","tmp13p2","tmp11p2","tmp12p2","z1p2","z5p2","z2p2","z4p2","z3p2","z11p2","z13p2","Diff","end0pos","lng","startpos","nrzeroes","nrmarker","setQuality","sf","YQT","UVQT","u","aasf","initQuantTables","encode","writeDQT","writeSOF0","o","writeDHT","DCY","DCU","DCV","displayName","quadWidth","fillbits","sfcc","initCharLookupTable","nrlower","nrupper","cat","nr","nrneg","initCategoryNumber","initRGBYUVTable","BmpDecoder","is_with_alpha","datav","DataView","bottom_up","flag","parseHeader","parseBGR","WebPDecoder","fa","L","J","H","I","Z","M","wa","Ed","ma","_WebPDecoder","Fd","Ub","G","jc","Qb","qb","nd","pd","xb","Ca","Ka","oa","Jd","Yc","Zc","Qa","na","K","ca","cb","Sb","Ra","bb","Vb","ob","db","Gd","Hd","Wb","Sa","Xb","Id","ra","Ta","Yb","Ha","Zb","X","Mb","Xa","$b","ac","bc","xa","yb","ud","hd","jd","aa","eb","Ia","cc","Kd","Ld","ec","Ea","Md","Nd","Od","Pd","Qd","fb","gb","hb","zb","Ab","Ja","Bb","Rd","A","Sd","ea","Tc","Cd","lb","Db","W","Cb","S","RGBA","kb","sd","Td","Ud","fd","ib","bd","cd","Da","Vd","T","Wd","ba","ka","Mc","Nc","fc","Rc","Xd","ya","Kb","za","gc","Ua","Va","memory","Ib","Jb","hc","Oa","ic","Aa","Yd","Ba","Wa","Zd","$d","ae","ta","Eb","be","ga","ce","Dc","lc","mc","nc","de","ua","ub","ha","xc","vc","md","Ya","oc","C","ee","E","B","Q","fe","qc","Fb","rc","ge","va","Ma","sc","Gb","tc","uc","Hb","wc","yc","zc","qd","rd","ia","tb","he","$","Pb","wd","xd","vb","ie","Ac","Bc","je","Cc","VP8LMapColor32b","ke","VP8LMapColor8b","le","rb","Oc","R","me","qa","Y","la","ja","Fa","ne","sb","La","Za","$a","jb","mb","oe","pe","nb","qe","Pa","Ga","Na","Ec","se","Fc","ue","yd","td","Rb","ve","we","Lb","Gc","wb","xe","Wc","Xc","ye","Pc","Tb","zd","vd","od","ld","dd","Hc","ze","Sc","Qc","ad","Ob","Ad","Dd","Ae","Nb","Ic","Be","Kc","ed","$c","Jc","Bd","gd","Uc","Vc","put","Ce","De","Ee","Fe","Ge","He","Ie","Lc","Me","Ne","Oe","Pe","Qe","Re","Se","Te","Ue","Ve","We","Xe","Ye","Ze","$e","af","bf","cf","df","ef","gf","hf","jf","kf","lf","mf","nf","of","pf","qf","rf","tf","uf","vf","wf","xf","yf","zf","Af","Bf","Ke","Le","Je","kd","Cf","Df","Ef","Gf","Hf","If","Jf","Kf","Lf","Mf","Nf","Of","Pf","Predictor0","Predictor1","Predictor2","Predictor3","Predictor4","Predictor5","Predictor6","Predictor7","Predictor8","Predictor9","Predictor10","Predictor11","Predictor12","Predictor13","PredictorAdd0","PredictorAdd1","PredictorAdd2","ColorIndexInverseTransform","MapARGB","VP8LColorIndexInverseTransformAlpha","MapAlpha","VP8LPredictorsAdd","VP8LPredictors","VP8LPredictorsAdd_C","VP8LPredictors_C","UpsampleRgbLinePair","UpsampleBgrLinePair","UpsampleRgbaLinePair","UpsampleBgraLinePair","UpsampleArgbLinePair","UpsampleRgba4444LinePair","UpsampleRgb565LinePair","Qf","WebPDecodeRGBA","te","GetTag","data_off","GetLE24","GetLE32","webpdecoder","imagearray","src_off","alpha_chunk","alpha_size","alpha_offset","memcmp","fourcc","payload_size","payload_size_padded","src_off_","temp","WebPRiffParser","hasCompressionJS","compressBytes","lineLength","colorsPerPixel","level","filter_method","filterUp","filterSub","filterAverage","filterPaeth","applyPngFilterMethod","dat","prevLine","filter_methods","getFilterMethods","results","ind","getIndexOfSmallestSum","filterNone","up","upLeft","paethPredictor","pLeft","pUp","pUpLeft","arrays","sum","processPNG","trns","pal","smask","alphaData","hasColors","pixel","pbl","pDiff","total","getPredictorFromCompression","processGIF89A","rawImageData","processGIF87A","fileSize","getUint32","reserved","headerSize","getInt32","planes","getUint16","bitPP","rawSize","hr","vr","importantColors","getUint8","quad","bitn","bit1","xlen","mode","bit4","before","after","bit8","bit15","dif_w","_1_5","bit16","_1_6","bit24","bit32","getData","processBMP","processWEBP","processRGBA","imagePixels","rgbOut","alphaOut","outIndex","alphaIndex","rgbData","setLanguage","langCode","languageSettings","isSubscribed","sq","an","hy","as","ast","az","eu","bn","br","bg","my","zh","co","cr","cs","nl","en","eo","et","fo","fj","fi","fr","fy","fur","gl","gu","ht","hi","hu","is","iu","it","kn","ks","kk","km","ky","tlh","ko","lv","lt","mk","ms","ml","mt","mi","mr","mo","nv","ng","no","nn","or","om","pl","qu","rm","ro","ru","sz","sg","si","sr","sk","sl","so","es","sw","sv","tt","th","tig","ts","tn","tr","tk","uk","hsb","ur","vi","vo","xh","ji","zu","languageCode","char_code","widths","Unicode","widthsFractionOf","fof","kerning","kerningFractionOf","kerningValue","prior_char_code","default_char_width","widthOfString","widthOfGlyph","characterToGlyph","widths_array","firstLineMaxLen","maxLen","answer","workingLen","startOfLine","maxlen","lineIndent","postProcess","line_length","textIndent","separator_length","current_word_length","spaceCharWidth","pad","wrds","wrd","idx","ln","paragraphs","fsize","newOptions","fontUnit_maxLen","__fontmetrics__","encoded","mappingUncompress","mappingCompress","keystring","valuestring","numberprefix","vals","uncompress","stringparts","parent_key_pair","sign","activeobject","parentchain","keyparts","valueparts","datalen","WinAnsiEncoding","encodings","Courier","fontMetrics","Symbol","ZapfDingbats","metrics","file","existsFileInVFS","getFileFromVFS","TTFFont","glyIdsUsed","loadCanvg","canvg","addSvgAsImage","svg","ignoreMouse","ignoreAnimation","ignoreDimensions","doc","fromString","putTotalPages","pageExpression","replaceExpression","totalNumberOfPages","pdfEscape16","viewerPreferences","doReset","configuration","isValid","method","configurationTemplate","HideToolbar","defaultValue","explicitSet","valueSet","HideMenubar","HideWindowUI","FitWindow","CenterWindow","DisplayDocTitle","NonFullScreenPageMode","Direction","ViewArea","ViewClip","PrintArea","PrintClip","PrintScaling","Duplex","PickTrayByPDFSize","PrintPageRange","NumCopies","configurationKeys","rangeArray","arrayContainsElement","iterator","viewerpreferences","vPref","pdfDict","postPutResources","rdf_beginning","__metadata__","namespaceuri","utf8_xmpmeta_beginning","utf8_rdf_beginning","utf8_metadata","utf8_rdf_ending","utf8_xmpmeta_ending","total_len","metadata_object_number","addMetadata","padz","toUnicode","toUnicodeCmap","codes","range","unicode","unicodeMap","pdfOutput","subset","pdfOutput2","fontTable","cmap","fontDescriptor","PDFObject","bbox","stemV","italicAngle","ascender","decender","capHeight","DescendantFont","identityHFunction","hmtx","head","unitsPerEm","winAnsiEncodingFunction","utf8TextFunction","cmapConfirm","strText","codeMap","parms","_initializeVFS","vFS","addFileToVFS","filecontent","__bidiEngine__","_hasUbatB","_hasUbatS","_isInVisual","_isInRtl","_isOutVisual","_isOutRtl","_isSymmetricSwapping","_UNICODE_TYPES","_bidiUnicodeTypes","_STATE_TABLE_LTR","_STATE_TABLE_RTL","_TYPE_NAMES_MAP","EN","AN","_UNICODE_RANGES_MAP","_SWAP_TABLE","_LTR_RANGES_REG_EXPR","_lastArabic","_dir","_getCharType","rangeIdx","_isContextualDirRtl","charType","_resolveCharType","chars","types","resolvedTypes","wType","nType","cType","rtlCandidate","_invertString","sourceToTargetMap","levels","_computeLevels","hiLevel","params","action","newLevel","prevState","condPos","newState","stateTable","_handleUbatS","_invertByLevel","high","end","low","_reorder","_symmetricSwap","DIR_RTL","doBidiReorder","_init","isSymmetricSwappingOrig","isInputVisual","isOutputVisual","isInputRtl","isOutputRtl","isSymmetricSwapping","bidiEngine","Data","readString","Subset","registerTTF","directory","Directory","HeadTable","NameTable","CmapTable","hhea","HheaTable","maxp","MaxpTable","HmtxTable","post","PostTable","os2","OS2Table","loca","LocaTable","glyf","GlyfTable","exists","lineGap","xMin","yMin","xMax","yMax","raw","italic_angle","xHeight","familyClass","isSerif","isScript","isFixedPitch","character","glyph","forGlyph","advance","includeGap","gap","Table","readByte","writeUInt32","readInt32","int","writeInt32","writeUInt16","readInt16","writeInt16","writeString","readShort","writeShort","readLongLong","writeLongLong","readInt","writeInt","checksum","scalarType","tableCount","searchRange","entrySelector","rangeShift","tables","tag","adjustment","directoryLength","headOffset","log2","tableData","__slice","__hasProp","__extends","ctor","__super__","_super","revision","checkSumAdjustment","magicNumber","created","modified","macStyle","lowestRecPPEM","fontDirectionHint","indexToLocFormat","glyphDataFormat","CmapEntry","endCode","glyphId","glyphIds","idDelta","idRangeOffset","saveOffset","segCount","segCountX2","startCode","platformID","encodingID","language","charmap","charMap","diff","endCodes","glyphIDs","indexes","last","nextID","old","rangeOffsets","startCodes","startGlyph","subtable","_len1","_len2","_len3","_len4","_len5","_len6","_len7","_n","_name","_o","_p","_q","new","maxGlyphID","LN2","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","metricDataFormat","numberOfMetrics","averageCharWidth","weightClass","widthClass","ySubscriptXSize","ySubscriptYSize","ySubscriptXOffset","ySubscriptYOffset","ySuperscriptXSize","ySuperscriptYSize","ySuperscriptXOffset","ySuperscriptYOffset","yStrikeoutSize","yStrikeoutPosition","panose","charRange","vendorID","selection","firstCharIndex","lastCharIndex","ascent","winAscent","winDescent","codePageRange","defaultChar","breakChar","maxContext","numberOfGlyphs","underlinePosition","underlineThickness","minMemType42","maxMemType42","minMemType1","maxMemType1","glyphNameIndex","names","_results1","numGlyphs","NameEntry","languageID","entries","stringOffset","strings","nameID","copyright","fontSubfamily","uniqueSubfamily","postscriptName","trademark","manufacturer","designer","description","vendorUrl","designerUrl","license","licenseUrl","preferredFamily","preferredSubfamily","compatibleFull","sampleText","maxPoints","maxContours","maxCompositePoints","maxComponentContours","maxZones","maxTwilightPoints","maxStorage","maxFunctionDefs","maxInstructionDefs","maxStackElements","maxSizeOfInstructions","maxComponentElements","maxComponentDepth","lsbCount","lsb","leftSideBearings","cache","glyphFor","numberOfContours","lengthOf","CompoundGlyph","SimpleGlyph","glyphs","mapping","old2new","compound","glyphOffsets","activeGlyphs","glyfPtr","listGlyf","newLocaTable","unicodes","next","generateCmap","roman","unicodeCmap","glyphsFor","additionalIDs","glyID","ids","new2old","newIDs","nextGlyphID","oldID","oldIDs","invert","isString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+FAAO,IAAIA,EAAgB,iBAClB,oBAAuBC,OAC1BA,OACA,oBAAuBC,OACvBA,OACA,oBAAuBC,KACvBA,KACAC,KAPqB,GCE3B,SAASC,IACHL,EAAaM,SAA+C,mBAA7BN,EAAaM,QAAQC,KACtDP,EAAaM,QAAQC,IAAIC,MAAMR,EAAaM,QAASG,WAuBlD,IAAIH,EAAU,CACnBC,IAAKF,EACLK,KArBF,SAAqBC,GACfX,EAAaM,UAC0B,mBAA9BN,EAAaM,QAAQI,KAC9BV,EAAaM,QAAQI,KAAKF,MAAMR,EAAaM,QAASG,WAEtDJ,EAAWO,KAAK,KAAMH,aAiB1BI,MAZF,SAAsBF,GAChBX,EAAaM,UAC2B,mBAA/BN,EAAaM,QAAQO,MAC9Bb,EAAaM,QAAQO,MAAML,MAAMR,EAAaM,QAASG,WAEvDJ,EAAWM,MCWjB,SAASG,EAASC,EAAKC,EAAMC,OACvBC,EAAM,IAAIC,eACdD,EAAIE,KAAK,MAAOL,GAChBG,EAAIG,aAAe,OACnBH,EAAII,OAAS,WACXC,EAAOL,EAAIM,SAAUR,EAAMC,IAE7BC,EAAIO,QA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GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IAGEC,EAA2B,CAC7B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEEC,EAA0B,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,IAC7DC,EAA2B,CAC7B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KAEEC,EAA0B,CAC5B,EACA,EACA,EACA,EACA,EACA,GACA,EACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,EACA,GACA,IACA,GACA,GACA,IACA,IACA,IACA,EACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,IACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAGEC,EAA6B,CAC/B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEEC,EAA4B,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,IAC/DC,EAA6B,CAC/B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KAEEC,EAA4B,CAC9B,EACA,EACA,EACA,EACA,GACA,EACA,EACA,GACA,GACA,EACA,GACA,GACA,GACA,EACA,GACA,IACA,GACA,GACA,GACA,IACA,EACA,GACA,GACA,IACA,IACA,IACA,IACA,EACA,GACA,GACA,GACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,GACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,cAuKOC,EAAkBC,EAASC,WAC9BC,EAAY,EACZC,EAAe,EACfC,EAAK,IAAIryD,MACJtC,EAAI,EAAGA,GAAK,GAAIA,IAAK,KACvB,IAAIwB,EAAI,EAAGA,GAAK+yD,EAAQv0D,GAAIwB,IAC/BmzD,EAAGH,EAAUE,IAAiB,GAC9BC,EAAGH,EAAUE,IAAe,GAAKD,EACjC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,EAAUU,GAAMwD,GAAY,GAAK5F,EAAStI,KAC1CgK,EAAU3B,EAAQrI,IAClBzrD,WA5CQ,IA8CNw5D,GACF/D,EAAUW,GAELH,WA8HA4D,EAAW1S,IAClBA,EAAUzhD,KAAKsb,IAAItb,KAAKmnC,IAAIsa,EAAS,GAAI,KAErCqM,GAAkBrM,eA1qBC2S,WACnBC,EAAM,CACR,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IAGO/5D,EAAI,EAAGA,EAAI,GAAIA,IAAK,KACvBwB,EAAIiyD,GAAQsG,EAAI/5D,GAAK85D,EAAK,IAAM,KACpCt4D,EAAIkE,KAAKsb,IAAItb,KAAKmnC,IAAIrrC,EAAG,GAAI,KAC7BkyD,EAAOgB,EAAO10D,IAAMwB,UAElBw4D,EAAO,CACT,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IAEO33D,EAAI,EAAGA,EAAI,GAAIA,IAAK,KACvB43D,EAAIxG,GAAQuG,EAAK33D,GAAKy3D,EAAK,IAAM,KACrCG,EAAIv0D,KAAKsb,IAAItb,KAAKmnC,IAAIotB,EAAG,GAAI,KAC7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OACA,OACA,QACA,QACA,QACA,QACA,UAEFD,GAAK,GACLF,GAAK,GACLM,GAAK,EACLC,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA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,EAAG,EAAG,EAAG,EAAG,GAAI,EAAG,EAAG,EAAG,EAAG,GAAI,GAAI,GAAI,GAAI,GAAI,IACpEzD,GAAK,CACH,GACA,EACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,EACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,EACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,GACA,GACA,EACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,IACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,IACA,GACA,IACA,GACA,IACA,IACA,GACA,KAEFmD,GAAK,CACH,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MAEFZ,GAAK,EACLyC,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAEFzK,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAEF3B,GAAK,KACL4O,GAAK,CACH,CAAC,IAAK,IAAK,IAAK,GAChB,CAAC,IAAK,IAAK,IAAK,IAAK,GACrB,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,GAC1B,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAE1DC,GAAK,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,GAAI,GAAI,EAAG,GAAI,GAAI,IACxD1J,GAAK,EAAE,EAAG,GAAI,EAAG,GAAI,EAAG,EAAG,EAAG,GAAI,EAAG,GAAI,GAAI,GAAI,EAAG,GAAI,EAAG,GAAI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A,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,MACA,IACA,MACA,MACA,IACA,MACA,MACA,IACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,IACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KA8jBEmD,EAAa,IAAI9jF,EAAMkgF,eAAe,CAAEuD,eAAe,IAoC3DzjF,EAAMkB,IAAI4L,OAAOnO,KAAK,CAAC,kBAlCE,SAASL,OAC5B6Z,EAAO7Z,EAAK6Z,KAGZlY,GAFI3B,EAAKpF,EACLoF,EAAK0H,EACC1H,EAAK2B,SAAW,IAG1BwiC,GAFQnkC,EAAKghB,MACNrf,EAAQ6f,KACL,OAEd7f,EAAQwjF,cAC2B,kBAA1BxjF,EAAQwjF,eAA8BxjF,EAAQwjF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AK8zB,GAGT+vD,EAnDc"}
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.node.js
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.node.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.node.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,32871 @@
+/** @license
+ *
+ * jsPDF - PDF Document creation from JavaScript
+ * Version 2.5.2 Built on 2024-09-17T13:29:57.860Z
+ *                      CommitID 00000000
+ *
+ * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
+ *               2015-2021 yWorks GmbH, http://www.yworks.com
+ *               2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
+ *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
+ *               2010 Aaron Spike, https://github.com/acspike
+ *               2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2012 Pablo Hess, https://github.com/pablohess
+ *               2012 Florian Jenett, https://github.com/fjenett
+ *               2013 Warren Weckesser, https://github.com/warrenweckesser
+ *               2013 Youssef Beddad, https://github.com/lifof
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2013 Stefan Slonevskiy, https://github.com/stefslon
+ *               2013 Jeremy Morel, https://github.com/jmorel
+ *               2013 Christoph Hartmann, https://github.com/chris-rock
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Makes, https://github.com/dollaruw
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 Steven Spungin, https://github.com/Flamenco
+ *               2014 Kenneth Glassey, https://github.com/Gavvers
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Contributor(s):
+ *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
+ *    kim3er, mfo, alnorth, Flamenco
+ */
+
+'use strict';
+
+Object.defineProperty(exports, '__esModule', { value: true });
+
+var fflate = require('fflate');
+
+var globalObject = (function() {
+  return "undefined" !== typeof window
+    ? window
+    : "undefined" !== typeof global
+    ? global
+    : "undefined" !== typeof self
+    ? self
+    : this;
+})();
+
+/**
+ * A class to parse color values
+ * @author Stoyan Stefanov <sstoo@gmail.com>
+ * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
+ * @license Use it if you like it
+ */
+
+function RGBColor(color_string) {
+  color_string = color_string || "";
+  this.ok = false;
+
+  // strip any leading #
+  if (color_string.charAt(0) == "#") {
+    // remove # if any
+    color_string = color_string.substr(1, 6);
+  }
+
+  color_string = color_string.replace(/ /g, "");
+  color_string = color_string.toLowerCase();
+
+  var channels;
+
+  // before getting into regexps, try simple matches
+  // and overwrite the input
+  var simple_colors = {
+    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"
+  };
+  color_string = simple_colors[color_string] || color_string;
+
+  // array of color definition objects
+  var color_defs = [
+    {
+      re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
+      example: ["rgb(123, 234, 45)", "rgb(255,234,245)"],
+      process: function(bits) {
+        return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];
+      }
+    },
+    {
+      re: /^(\w{2})(\w{2})(\w{2})$/,
+      example: ["#00ff00", "336699"],
+      process: function(bits) {
+        return [
+          parseInt(bits[1], 16),
+          parseInt(bits[2], 16),
+          parseInt(bits[3], 16)
+        ];
+      }
+    },
+    {
+      re: /^(\w{1})(\w{1})(\w{1})$/,
+      example: ["#fb0", "f0f"],
+      process: function(bits) {
+        return [
+          parseInt(bits[1] + bits[1], 16),
+          parseInt(bits[2] + bits[2], 16),
+          parseInt(bits[3] + bits[3], 16)
+        ];
+      }
+    }
+  ];
+
+  // search through the definitions to find a match
+  for (var i = 0; i < color_defs.length; i++) {
+    var re = color_defs[i].re;
+    var processor = color_defs[i].process;
+    var bits = re.exec(color_string);
+    if (bits) {
+      channels = processor(bits);
+      this.r = channels[0];
+      this.g = channels[1];
+      this.b = channels[2];
+      this.ok = true;
+    }
+  }
+
+  // validate/cleanup values
+  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;
+
+  // some getters
+  this.toRGB = function() {
+    return "rgb(" + this.r + ", " + this.g + ", " + this.b + ")";
+  };
+  this.toHex = function() {
+    var r = this.r.toString(16);
+    var g = this.g.toString(16);
+    var b = this.b.toString(16);
+    if (r.length == 1) r = "0" + r;
+    if (g.length == 1) g = "0" + g;
+    if (b.length == 1) b = "0" + b;
+    return "#" + r + g + b;
+  };
+}
+
+var atob, btoa;
+
+(function() {
+
+  atob = require("atob");
+  btoa = require("btoa");
+})();
+
+function consoleLog() {
+  if (globalObject.console && typeof globalObject.console.log === "function") {
+    globalObject.console.log.apply(globalObject.console, arguments);
+  }
+}
+
+function consoleWarn(str) {
+  if (globalObject.console) {
+    if (typeof globalObject.console.warn === "function") {
+      globalObject.console.warn.apply(globalObject.console, arguments);
+    } else {
+      consoleLog.call(null, arguments);
+    }
+  }
+}
+
+function consoleError(str) {
+  if (globalObject.console) {
+    if (typeof globalObject.console.error === "function") {
+      globalObject.console.error.apply(globalObject.console, arguments);
+    } else {
+      consoleLog(str);
+    }
+  }
+}
+var console = {
+  log: consoleLog,
+  warn: consoleWarn,
+  error: consoleError
+};
+
+/**
+ * @license
+ * Joseph Myers does not specify a particular license for his work.
+ *
+ * Author: Joseph Myers
+ * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
+ *
+ * Modified by: Owen Leong
+ */
+
+function md5cycle(x, k) {
+  var a = x[0],
+    b = x[1],
+    c = x[2],
+    d = x[3];
+
+  a = ff(a, b, c, d, k[0], 7, -680876936);
+  d = ff(d, a, b, c, k[1], 12, -389564586);
+  c = ff(c, d, a, b, k[2], 17, 606105819);
+  b = ff(b, c, d, a, k[3], 22, -1044525330);
+  a = ff(a, b, c, d, k[4], 7, -176418897);
+  d = ff(d, a, b, c, k[5], 12, 1200080426);
+  c = ff(c, d, a, b, k[6], 17, -1473231341);
+  b = ff(b, c, d, a, k[7], 22, -45705983);
+  a = ff(a, b, c, d, k[8], 7, 1770035416);
+  d = ff(d, a, b, c, k[9], 12, -1958414417);
+  c = ff(c, d, a, b, k[10], 17, -42063);
+  b = ff(b, c, d, a, k[11], 22, -1990404162);
+  a = ff(a, b, c, d, k[12], 7, 1804603682);
+  d = ff(d, a, b, c, k[13], 12, -40341101);
+  c = ff(c, d, a, b, k[14], 17, -1502002290);
+  b = ff(b, c, d, a, k[15], 22, 1236535329);
+
+  a = gg(a, b, c, d, k[1], 5, -165796510);
+  d = gg(d, a, b, c, k[6], 9, -1069501632);
+  c = gg(c, d, a, b, k[11], 14, 643717713);
+  b = gg(b, c, d, a, k[0], 20, -373897302);
+  a = gg(a, b, c, d, k[5], 5, -701558691);
+  d = gg(d, a, b, c, k[10], 9, 38016083);
+  c = gg(c, d, a, b, k[15], 14, -660478335);
+  b = gg(b, c, d, a, k[4], 20, -405537848);
+  a = gg(a, b, c, d, k[9], 5, 568446438);
+  d = gg(d, a, b, c, k[14], 9, -1019803690);
+  c = gg(c, d, a, b, k[3], 14, -187363961);
+  b = gg(b, c, d, a, k[8], 20, 1163531501);
+  a = gg(a, b, c, d, k[13], 5, -1444681467);
+  d = gg(d, a, b, c, k[2], 9, -51403784);
+  c = gg(c, d, a, b, k[7], 14, 1735328473);
+  b = gg(b, c, d, a, k[12], 20, -1926607734);
+
+  a = hh(a, b, c, d, k[5], 4, -378558);
+  d = hh(d, a, b, c, k[8], 11, -2022574463);
+  c = hh(c, d, a, b, k[11], 16, 1839030562);
+  b = hh(b, c, d, a, k[14], 23, -35309556);
+  a = hh(a, b, c, d, k[1], 4, -1530992060);
+  d = hh(d, a, b, c, k[4], 11, 1272893353);
+  c = hh(c, d, a, b, k[7], 16, -155497632);
+  b = hh(b, c, d, a, k[10], 23, -1094730640);
+  a = hh(a, b, c, d, k[13], 4, 681279174);
+  d = hh(d, a, b, c, k[0], 11, -358537222);
+  c = hh(c, d, a, b, k[3], 16, -722521979);
+  b = hh(b, c, d, a, k[6], 23, 76029189);
+  a = hh(a, b, c, d, k[9], 4, -640364487);
+  d = hh(d, a, b, c, k[12], 11, -421815835);
+  c = hh(c, d, a, b, k[15], 16, 530742520);
+  b = hh(b, c, d, a, k[2], 23, -995338651);
+
+  a = ii(a, b, c, d, k[0], 6, -198630844);
+  d = ii(d, a, b, c, k[7], 10, 1126891415);
+  c = ii(c, d, a, b, k[14], 15, -1416354905);
+  b = ii(b, c, d, a, k[5], 21, -57434055);
+  a = ii(a, b, c, d, k[12], 6, 1700485571);
+  d = ii(d, a, b, c, k[3], 10, -1894986606);
+  c = ii(c, d, a, b, k[10], 15, -1051523);
+  b = ii(b, c, d, a, k[1], 21, -2054922799);
+  a = ii(a, b, c, d, k[8], 6, 1873313359);
+  d = ii(d, a, b, c, k[15], 10, -30611744);
+  c = ii(c, d, a, b, k[6], 15, -1560198380);
+  b = ii(b, c, d, a, k[13], 21, 1309151649);
+  a = ii(a, b, c, d, k[4], 6, -145523070);
+  d = ii(d, a, b, c, k[11], 10, -1120210379);
+  c = ii(c, d, a, b, k[2], 15, 718787259);
+  b = ii(b, c, d, a, k[9], 21, -343485551);
+
+  x[0] = add32(a, x[0]);
+  x[1] = add32(b, x[1]);
+  x[2] = add32(c, x[2]);
+  x[3] = add32(d, x[3]);
+}
+
+function cmn(q, a, b, x, s, t) {
+  a = add32(add32(a, q), add32(x, t));
+  return add32((a << s) | (a >>> (32 - s)), b);
+}
+
+function ff(a, b, c, d, x, s, t) {
+  return cmn((b & c) | (~b & d), a, b, x, s, t);
+}
+
+function gg(a, b, c, d, x, s, t) {
+  return cmn((b & d) | (c & ~d), a, b, x, s, t);
+}
+
+function hh(a, b, c, d, x, s, t) {
+  return cmn(b ^ c ^ d, a, b, x, s, t);
+}
+
+function ii(a, b, c, d, x, s, t) {
+  return cmn(c ^ (b | ~d), a, b, x, s, t);
+}
+
+function md51(s) {
+  // txt = '';
+  var n = s.length,
+    state = [1732584193, -271733879, -1732584194, 271733878],
+    i;
+  for (i = 64; i <= s.length; i += 64) {
+    md5cycle(state, md5blk(s.substring(i - 64, i)));
+  }
+  s = s.substring(i - 64);
+  var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+  for (i = 0; i < s.length; i++)
+    tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);
+  tail[i >> 2] |= 0x80 << (i % 4 << 3);
+  if (i > 55) {
+    md5cycle(state, tail);
+    for (i = 0; i < 16; i++) tail[i] = 0;
+  }
+  tail[14] = n * 8;
+  md5cycle(state, tail);
+  return state;
+}
+
+/* there needs to be support for Unicode here,
+ * unless we pretend that we can redefine the MD-5
+ * algorithm for multi-byte characters (perhaps
+ * by adding every four 16-bit characters and
+ * shortening the sum to 32 bits). Otherwise
+ * I suggest performing MD-5 as if every character
+ * was two bytes--e.g., 0040 0025 = @%--but then
+ * how will an ordinary MD-5 sum be matched?
+ * There is no way to standardize text to something
+ * like UTF-8 before transformation; speed cost is
+ * utterly prohibitive. The JavaScript standard
+ * itself needs to look at this: it should start
+ * providing access to strings as preformed UTF-8
+ * 8-bit unsigned value arrays.
+ */
+function md5blk(s) {
+  /* I figured global was faster.   */
+  var md5blks = [],
+    i; /* Andy King said do it this way. */
+  for (i = 0; i < 64; i += 4) {
+    md5blks[i >> 2] =
+      s.charCodeAt(i) +
+      (s.charCodeAt(i + 1) << 8) +
+      (s.charCodeAt(i + 2) << 16) +
+      (s.charCodeAt(i + 3) << 24);
+  }
+  return md5blks;
+}
+
+var hex_chr = "0123456789abcdef".split("");
+
+function rhex(n) {
+  var s = "",
+    j = 0;
+  for (; j < 4; j++)
+    s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];
+  return s;
+}
+
+function hex(x) {
+  for (var i = 0; i < x.length; i++) x[i] = rhex(x[i]);
+  return x.join("");
+}
+
+// Converts a 4-byte number to byte string
+function singleToByteString(n) {
+  return String.fromCharCode(
+    (n & 0xff) >> 0,
+    (n & 0xff00) >> 8,
+    (n & 0xff0000) >> 16,
+    (n & 0xff000000) >> 24
+  );
+}
+
+// Converts an array of numbers to a byte string
+function toByteString(x) {
+  return x.map(singleToByteString).join("");
+}
+
+// Returns the MD5 hash as a byte string
+function md5Bin(s) {
+  return toByteString(md51(s));
+}
+
+// Returns MD5 hash as a hex string
+function md5(s) {
+  return hex(md51(s));
+}
+
+var md5Check = md5("hello") != "5d41402abc4b2a76b9719d911017c592";
+
+function add32(a, b) {
+  if (md5Check) {
+    /* if the md5Check does not match
+     the expected value, we're dealing
+     with an old browser and need
+     this function. */
+    var lsw = (a & 0xffff) + (b & 0xffff),
+      msw = (a >> 16) + (b >> 16) + (lsw >> 16);
+    return (msw << 16) | (lsw & 0xffff);
+  } else {
+    /* this function is much faster,
+    so if possible we use it. Some IEs
+    are the only ones I know of that
+    need the idiotic second function,
+    generated by an if clause.  */
+    return (a + b) & 0xffffffff;
+  }
+}
+
+/**
+ * @license
+ * FPDF is released under a permissive license: there is no usage restriction.
+ * You may embed it freely in your application (commercial or not), with or
+ * without modifications.
+ *
+ * Reference: http://www.fpdf.org/en/script/script37.php
+ */
+
+function repeat(str, num) {
+  return new Array(num + 1).join(str);
+}
+
+/**
+ * Converts a byte string to a hex string
+ *
+ * @name rc4
+ * @function
+ * @param {string} key Byte string of encryption key
+ * @param {string} data Byte string of data to be encrypted
+ * @returns {string} Encrypted string
+ */
+function rc4(key, data) {
+  var lastKey, lastState;
+  if (key !== lastKey) {
+    var k = repeat(key, ((256 / key.length) >> 0) + 1);
+    var state = [];
+    for (var i = 0; i < 256; i++) {
+      state[i] = i;
+    }
+    var j = 0;
+    for (var i = 0; i < 256; i++) {
+      var t = state[i];
+      j = (j + t + k.charCodeAt(i)) % 256;
+      state[i] = state[j];
+      state[j] = t;
+    }
+    lastKey = key;
+    lastState = state;
+  } else {
+    state = lastState;
+  }
+  var length = data.length;
+  var a = 0;
+  var b = 0;
+  var out = "";
+  for (var i = 0; i < length; i++) {
+    a = (a + 1) % 256;
+    t = state[a];
+    b = (b + t) % 256;
+    state[a] = state[b];
+    state[b] = t;
+    k = state[(state[a] + state[b]) % 256];
+    out += String.fromCharCode(data.charCodeAt(i) ^ k);
+  }
+  return out;
+}
+
+/**
+ * @license
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ * Author: Owen Leong (@owenl131)
+ * Date: 15 Oct 2020
+ * References:
+ * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
+ * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
+ * http://www.fpdf.org/en/script/script37.php
+ */
+
+var permissionOptions = {
+  print: 4,
+  modify: 8,
+  copy: 16,
+  "annot-forms": 32
+};
+
+/**
+ * Initializes encryption settings
+ *
+ * @name constructor
+ * @function
+ * @param {Array} permissions Permissions allowed for user, "print", "modify", "copy" and "annot-forms".
+ * @param {String} userPassword Permissions apply to this user. Leaving this empty means the document
+ *                              is not password protected but viewer has the above permissions.
+ * @param {String} ownerPassword Owner has full functionalities to the file.
+ * @param {String} fileId As hex string, should be same as the file ID in the trailer.
+ * @example
+ * var security = new PDFSecurity(["print"])
+ */
+function PDFSecurity(permissions, userPassword, ownerPassword, fileId) {
+  this.v = 1; // algorithm 1, future work can add in more recent encryption schemes
+  this.r = 2; // revision 2
+
+  // set flags for what functionalities the user can access
+  let protection = 192;
+  permissions.forEach(function(perm) {
+    if (typeof permissionOptions.perm !== "undefined") {
+      throw new Error("Invalid permission: " + perm);
+    }
+    protection += permissionOptions[perm];
+  });
+
+  // padding is used to pad the passwords to 32 bytes, also is hashed and stored in the final PDF
+  this.padding =
+    "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08" +
+    "\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A";
+  let paddedUserPassword = (userPassword + this.padding).substr(0, 32);
+  let paddedOwnerPassword = (ownerPassword + this.padding).substr(0, 32);
+
+  this.O = this.processOwnerPassword(paddedUserPassword, paddedOwnerPassword);
+  this.P = -((protection ^ 255) + 1);
+  this.encryptionKey = md5Bin(
+    paddedUserPassword +
+      this.O +
+      this.lsbFirstWord(this.P) +
+      this.hexToBytes(fileId)
+  ).substr(0, 5);
+  this.U = rc4(this.encryptionKey, this.padding);
+}
+
+/**
+ * Breaks down a 4-byte number into its individual bytes, with the least significant bit first
+ *
+ * @name lsbFirstWord
+ * @function
+ * @param {number} data 32-bit number
+ * @returns {Array}
+ */
+PDFSecurity.prototype.lsbFirstWord = function(data) {
+  return String.fromCharCode(
+    (data >> 0) & 0xff,
+    (data >> 8) & 0xff,
+    (data >> 16) & 0xff,
+    (data >> 24) & 0xff
+  );
+};
+
+/**
+ * Converts a byte string to a hex string
+ *
+ * @name toHexString
+ * @function
+ * @param {String} byteString Byte string
+ * @returns {String}
+ */
+PDFSecurity.prototype.toHexString = function(byteString) {
+  return byteString
+    .split("")
+    .map(function(byte) {
+      return ("0" + (byte.charCodeAt(0) & 0xff).toString(16)).slice(-2);
+    })
+    .join("");
+};
+
+/**
+ * Converts a hex string to a byte string
+ *
+ * @name hexToBytes
+ * @function
+ * @param {String} hex Hex string
+ * @returns {String}
+ */
+PDFSecurity.prototype.hexToBytes = function(hex) {
+  for (var bytes = [], c = 0; c < hex.length; c += 2)
+    bytes.push(String.fromCharCode(parseInt(hex.substr(c, 2), 16)));
+  return bytes.join("");
+};
+
+/**
+ * Computes the 'O' field in the encryption dictionary
+ *
+ * @name processOwnerPassword
+ * @function
+ * @param {String} paddedUserPassword Byte string of padded user password
+ * @param {String} paddedOwnerPassword Byte string of padded owner password
+ * @returns {String}
+ */
+PDFSecurity.prototype.processOwnerPassword = function(
+  paddedUserPassword,
+  paddedOwnerPassword
+) {
+  let key = md5Bin(paddedOwnerPassword).substr(0, 5);
+  return rc4(key, paddedUserPassword);
+};
+
+/**
+ * Returns an encryptor function which can take in a byte string and returns the encrypted version
+ *
+ * @name encryptor
+ * @function
+ * @param {number} objectId
+ * @param {number} generation Not sure what this is for, you can set it to 0
+ * @returns {Function}
+ * @example
+ * out("stream");
+ * encryptor = security.encryptor(object.id, 0);
+ * out(encryptor(data));
+ * out("endstream");
+ */
+PDFSecurity.prototype.encryptor = function(objectId, generation) {
+  let key = md5Bin(
+    this.encryptionKey +
+      String.fromCharCode(
+        objectId & 0xff,
+        (objectId >> 8) & 0xff,
+        (objectId >> 16) & 0xff,
+        generation & 0xff,
+        (generation >> 8) & 0xff
+      )
+  ).substr(0, 10);
+  return function(data) {
+    return rc4(key, data);
+  };
+};
+
+/**
+ * Convert string to `PDF Name Object`.
+ * Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object
+ * @param str
+ */
+function toPDFName(str) {
+  // eslint-disable-next-line no-control-regex
+  if (/[^\u0000-\u00ff]/.test(str)) {
+    // non ascii string
+    throw new Error(
+      "Invalid PDF Name Object: " + str + ", Only accept ASCII characters."
+    );
+  }
+  var result = "",
+    strLength = str.length;
+  for (var i = 0; i < strLength; i++) {
+    var charCode = str.charCodeAt(i);
+    if (
+      charCode < 0x21 ||
+      charCode === 0x23 /* # */ ||
+      charCode === 0x25 /* % */ ||
+      charCode === 0x28 /* ( */ ||
+      charCode === 0x29 /* ) */ ||
+      charCode === 0x2f /* / */ ||
+      charCode === 0x3c /* < */ ||
+      charCode === 0x3e /* > */ ||
+      charCode === 0x5b /* [ */ ||
+      charCode === 0x5d /* ] */ ||
+      charCode === 0x7b /* { */ ||
+      charCode === 0x7d /* } */ ||
+      charCode > 0x7e
+    ) {
+      // Char    CharCode    hexStr   paddingHexStr    Result
+      // "\t"    9           9        09               #09
+      // " "     32          20       20               #20
+      // "©"     169         a9       a9               #a9
+      var hexStr = charCode.toString(16),
+        paddingHexStr = ("0" + hexStr).slice(-2);
+
+      result += "#" + paddingHexStr;
+    } else {
+      // Other ASCII printable characters between 0x21 <= X <= 0x7e
+      result += str[i];
+    }
+  }
+  return result;
+}
+
+/* eslint-disable no-console */
+/**
+ * jsPDF's Internal PubSub Implementation.
+ * Backward compatible rewritten on 2014 by
+ * Diego Casorran, https://github.com/diegocr
+ *
+ * @class
+ * @name PubSub
+ * @ignore
+ */
+function PubSub(context) {
+  if (typeof context !== "object") {
+    throw new Error(
+      "Invalid Context passed to initialize PubSub (jsPDF-module)"
+    );
+  }
+  var topics = {};
+
+  this.subscribe = function(topic, callback, once) {
+    once = once || false;
+    if (
+      typeof topic !== "string" ||
+      typeof callback !== "function" ||
+      typeof once !== "boolean"
+    ) {
+      throw new Error(
+        "Invalid arguments passed to PubSub.subscribe (jsPDF-module)"
+      );
+    }
+
+    if (!topics.hasOwnProperty(topic)) {
+      topics[topic] = {};
+    }
+
+    var token = Math.random().toString(35);
+    topics[topic][token] = [callback, !!once];
+
+    return token;
+  };
+
+  this.unsubscribe = function(token) {
+    for (var topic in topics) {
+      if (topics[topic][token]) {
+        delete topics[topic][token];
+        if (Object.keys(topics[topic]).length === 0) {
+          delete topics[topic];
+        }
+        return true;
+      }
+    }
+    return false;
+  };
+
+  this.publish = function(topic) {
+    if (topics.hasOwnProperty(topic)) {
+      var args = Array.prototype.slice.call(arguments, 1),
+        tokens = [];
+
+      for (var token in topics[topic]) {
+        var sub = topics[topic][token];
+        try {
+          sub[0].apply(context, args);
+        } catch (ex) {
+          if (globalObject.console) {
+            console.error("jsPDF PubSub Error", ex.message, ex);
+          }
+        }
+        if (sub[1]) tokens.push(token);
+      }
+      if (tokens.length) tokens.forEach(this.unsubscribe);
+    }
+  };
+
+  this.getTopics = function() {
+    return topics;
+  };
+}
+
+function GState(parameters) {
+  if (!(this instanceof GState)) {
+    return new GState(parameters);
+  }
+
+  /**
+   * @name GState#opacity
+   * @type {any}
+   */
+  /**
+   * @name GState#stroke-opacity
+   * @type {any}
+   */
+  var supported = "opacity,stroke-opacity".split(",");
+  for (var p in parameters) {
+    if (parameters.hasOwnProperty(p) && supported.indexOf(p) >= 0) {
+      this[p] = parameters[p];
+    }
+  }
+  /**
+   * @name GState#id
+   * @type {string}
+   */
+  this.id = ""; // set by addGState()
+  /**
+   * @name GState#objectNumber
+   * @type {number}
+   */
+  this.objectNumber = -1; // will be set by putGState()
+}
+
+GState.prototype.equals = function equals(other) {
+  var ignore = "id,objectNumber,equals";
+  var p;
+  if (!other || typeof other !== typeof this) return false;
+  var count = 0;
+  for (p in this) {
+    if (ignore.indexOf(p) >= 0) continue;
+    if (this.hasOwnProperty(p) && !other.hasOwnProperty(p)) return false;
+    if (this[p] !== other[p]) return false;
+    count++;
+  }
+  for (p in other) {
+    if (other.hasOwnProperty(p) && ignore.indexOf(p) < 0) count--;
+  }
+  return count === 0;
+};
+
+function Pattern(gState, matrix) {
+  this.gState = gState;
+  this.matrix = matrix;
+
+  this.id = ""; // set by addPattern()
+  this.objectNumber = -1; // will be set by putPattern()
+}
+
+function ShadingPattern(type, coords, colors, gState, matrix) {
+  if (!(this instanceof ShadingPattern)) {
+    return new ShadingPattern(type, coords, colors, gState, matrix);
+  }
+
+  // see putPattern() for information how they are realized
+  this.type = type === "axial" ? 2 : 3;
+  this.coords = coords;
+  this.colors = colors;
+
+  Pattern.call(this, gState, matrix);
+}
+
+function TilingPattern(boundingBox, xStep, yStep, gState, matrix) {
+  if (!(this instanceof TilingPattern)) {
+    return new TilingPattern(boundingBox, xStep, yStep, gState, matrix);
+  }
+
+  this.boundingBox = boundingBox;
+  this.xStep = xStep;
+  this.yStep = yStep;
+
+  this.stream = ""; // set by endTilingPattern();
+
+  this.cloneIndex = 0;
+
+  Pattern.call(this, gState, matrix);
+}
+
+/**
+ * Creates new jsPDF document object instance.
+ * @name jsPDF
+ * @class
+ * @param {Object} [options] - Collection of settings initializing the jsPDF-instance
+ * @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are "portrait" or "landscape" (or shortcuts "p" or "l").<br />
+ * @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />
+ * Possible values are "pt" (points), "mm", "cm", "in", "px", "pc", "em" or "ex". Note that in order to get the correct scaling for "px"
+ * units, you need to enable the hotfix "px_scaling" by setting options.hotfixes = ["px_scaling"].
+ * @param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />
+ * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
+ * @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.
+ * @param {boolean} [options.compress=false] Compress the generated PDF.
+ * @param {number} [options.precision=16] Precision of the element-positions.
+ * @param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.
+ * @param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.
+ * @param {Object} [options.encryption]
+ * @param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.
+ * @param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.
+ * @param {string[]} [options.encryption.userPermissions] Array of permissions "print", "modify", "copy", "annot-forms", accessible by the user.
+ * @param {number|"smart"} [options.floatPrecision=16]
+ * @returns {jsPDF} jsPDF-instance
+ * @description
+ * ```
+ * {
+ *  orientation: 'p',
+ *  unit: 'mm',
+ *  format: 'a4',
+ *  putOnlyUsedFonts:true,
+ *  floatPrecision: 16 // or "smart", default is 16
+ * }
+ * ```
+ *
+ * @constructor
+ */
+function jsPDF(options) {
+  var orientation = typeof arguments[0] === "string" ? arguments[0] : "p";
+  var unit = arguments[1];
+  var format = arguments[2];
+  var compressPdf = arguments[3];
+  var filters = [];
+  var userUnit = 1.0;
+  var precision;
+  var floatPrecision = 16;
+  var defaultPathOperation = "S";
+  var encryptionOptions = null;
+
+  options = options || {};
+
+  if (typeof options === "object") {
+    orientation = options.orientation;
+    unit = options.unit || unit;
+    format = options.format || format;
+    compressPdf = options.compress || options.compressPdf || compressPdf;
+    encryptionOptions = options.encryption || null;
+    if (encryptionOptions !== null) {
+      encryptionOptions.userPassword = encryptionOptions.userPassword || "";
+      encryptionOptions.ownerPassword = encryptionOptions.ownerPassword || "";
+      encryptionOptions.userPermissions =
+        encryptionOptions.userPermissions || [];
+    }
+    userUnit =
+      typeof options.userUnit === "number" ? Math.abs(options.userUnit) : 1.0;
+    if (typeof options.precision !== "undefined") {
+      precision = options.precision;
+    }
+    if (typeof options.floatPrecision !== "undefined") {
+      floatPrecision = options.floatPrecision;
+    }
+    defaultPathOperation = options.defaultPathOperation || "S";
+  }
+
+  filters =
+    options.filters || (compressPdf === true ? ["FlateEncode"] : filters);
+
+  unit = unit || "mm";
+  orientation = ("" + (orientation || "P")).toLowerCase();
+  var putOnlyUsedFonts = options.putOnlyUsedFonts || false;
+  var usedFonts = {};
+
+  var API = {
+    internal: {},
+    __private__: {}
+  };
+
+  API.__private__.PubSub = PubSub;
+
+  var pdfVersion = "1.3";
+  var getPdfVersion = (API.__private__.getPdfVersion = function() {
+    return pdfVersion;
+  });
+
+  API.__private__.setPdfVersion = function(value) {
+    pdfVersion = value;
+  };
+
+  // Size in pt of various paper formats
+  var pageFormats = {
+    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]
+  };
+
+  API.__private__.getPageFormats = function() {
+    return pageFormats;
+  };
+
+  var getPageFormat = (API.__private__.getPageFormat = function(value) {
+    return pageFormats[value];
+  });
+
+  format = format || "a4";
+
+  var ApiMode = {
+    COMPAT: "compat",
+    ADVANCED: "advanced"
+  };
+  var apiMode = ApiMode.COMPAT;
+
+  function advancedAPI() {
+    // prepend global change of basis matrix
+    // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix
+    // that does this job for us (however, texts, images and similar objects must be drawn bottom up))
+    this.saveGraphicsState();
+    out(
+      new Matrix(
+        scaleFactor,
+        0,
+        0,
+        -scaleFactor,
+        0,
+        getPageHeight() * scaleFactor
+      ).toString() + " cm"
+    );
+    this.setFontSize(this.getFontSize() / scaleFactor);
+
+    // The default in MrRio's implementation is "S" (stroke), whereas the default in the yWorks implementation
+    // was "n" (none). Although this has nothing to do with transforms, we should use the API switch here.
+    defaultPathOperation = "n";
+
+    apiMode = ApiMode.ADVANCED;
+  }
+
+  function compatAPI() {
+    this.restoreGraphicsState();
+    defaultPathOperation = "S";
+    apiMode = ApiMode.COMPAT;
+  }
+
+  /**
+   * @function combineFontStyleAndFontWeight
+   * @param {string} fontStyle Fontstyle or variant. Example: "italic".
+   * @param {number | string} fontWeight Weight of the Font. Example: "normal" | 400
+   * @returns {string}
+   * @private
+   */
+  var combineFontStyleAndFontWeight = (API.__private__.combineFontStyleAndFontWeight = function(
+    fontStyle,
+    fontWeight
+  ) {
+    if (
+      (fontStyle == "bold" && fontWeight == "normal") ||
+      (fontStyle == "bold" && fontWeight == 400) ||
+      (fontStyle == "normal" && fontWeight == "italic") ||
+      (fontStyle == "bold" && fontWeight == "italic")
+    ) {
+      throw new Error("Invalid Combination of fontweight and fontstyle");
+    }
+    if (fontWeight) {
+      fontStyle =
+        fontWeight == 400 || fontWeight === "normal"
+          ? fontStyle === "italic"
+            ? "italic"
+            : "normal"
+          : (fontWeight == 700 || fontWeight === "bold") &&
+            fontStyle === "normal"
+          ? "bold"
+          : (fontWeight == 700 ? "bold" : fontWeight) + "" + fontStyle;
+    }
+    return fontStyle;
+  });
+
+  /**
+   * @callback ApiSwitchBody
+   * @param {jsPDF} pdf
+   */
+
+  /**
+   * For compatibility reasons jsPDF offers two API modes which differ in the way they convert between the the usual
+   * screen coordinates and the PDF coordinate system.
+   *   - "compat": Offers full compatibility across all plugins but does not allow arbitrary transforms
+   *   - "advanced": Allows arbitrary transforms and more advanced features like pattern fills. Some plugins might
+   *     not support this mode, though.
+   * Initial mode is "compat".
+   *
+   * You can either provide a callback to the body argument, which means that jsPDF will automatically switch back to
+   * the original API mode afterwards; or you can omit the callback and switch back manually using {@link compatAPI}.
+   *
+   * Note, that the calls to {@link saveGraphicsState} and {@link restoreGraphicsState} need to be balanced within the
+   * callback or between calls of this method and its counterpart {@link compatAPI}. Calls to {@link beginFormObject}
+   * or {@link beginTilingPattern} need to be closed by their counterparts before switching back to "compat" API mode.
+   *
+   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.
+   * The API mode will be switched back automatically afterwards.
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name advancedAPI
+   */
+  API.advancedAPI = function(body) {
+    var doSwitch = apiMode === ApiMode.COMPAT;
+
+    if (doSwitch) {
+      advancedAPI.call(this);
+    }
+
+    if (typeof body !== "function") {
+      return this;
+    }
+
+    body(this);
+
+    if (doSwitch) {
+      compatAPI.call(this);
+    }
+
+    return this;
+  };
+
+  /**
+   * Switches to "compat" API mode. See {@link advancedAPI} for more details.
+   *
+   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.
+   * The API mode will be switched back automatically afterwards.
+   * @return {jsPDF}
+   * @memberof jsPDF#
+   * @name compatApi
+   */
+  API.compatAPI = function(body) {
+    var doSwitch = apiMode === ApiMode.ADVANCED;
+
+    if (doSwitch) {
+      compatAPI.call(this);
+    }
+
+    if (typeof body !== "function") {
+      return this;
+    }
+
+    body(this);
+
+    if (doSwitch) {
+      advancedAPI.call(this);
+    }
+
+    return this;
+  };
+
+  /**
+   * @return {boolean} True iff the current API mode is "advanced". See {@link advancedAPI}.
+   * @memberof jsPDF#
+   * @name isAdvancedAPI
+   */
+  API.isAdvancedAPI = function() {
+    return apiMode === ApiMode.ADVANCED;
+  };
+
+  var advancedApiModeTrap = function(methodName) {
+    if (apiMode !== ApiMode.ADVANCED) {
+      throw new Error(
+        methodName +
+          " is only available in 'advanced' API mode. " +
+          "You need to call advancedAPI() first."
+      );
+    }
+  };
+
+  var roundToPrecision = (API.roundToPrecision = API.__private__.roundToPrecision = function(
+    number,
+    parmPrecision
+  ) {
+    var tmpPrecision = precision || parmPrecision;
+    if (isNaN(number) || isNaN(tmpPrecision)) {
+      throw new Error("Invalid argument passed to jsPDF.roundToPrecision");
+    }
+    return number.toFixed(tmpPrecision).replace(/0+$/, "");
+  });
+
+  // high precision float
+  var hpf;
+  if (typeof floatPrecision === "number") {
+    hpf = API.hpf = API.__private__.hpf = function(number) {
+      if (isNaN(number)) {
+        throw new Error("Invalid argument passed to jsPDF.hpf");
+      }
+      return roundToPrecision(number, floatPrecision);
+    };
+  } else if (floatPrecision === "smart") {
+    hpf = API.hpf = API.__private__.hpf = function(number) {
+      if (isNaN(number)) {
+        throw new Error("Invalid argument passed to jsPDF.hpf");
+      }
+      if (number > -1 && number < 1) {
+        return roundToPrecision(number, 16);
+      } else {
+        return roundToPrecision(number, 5);
+      }
+    };
+  } else {
+    hpf = API.hpf = API.__private__.hpf = function(number) {
+      if (isNaN(number)) {
+        throw new Error("Invalid argument passed to jsPDF.hpf");
+      }
+      return roundToPrecision(number, 16);
+    };
+  }
+  var f2 = (API.f2 = API.__private__.f2 = function(number) {
+    if (isNaN(number)) {
+      throw new Error("Invalid argument passed to jsPDF.f2");
+    }
+    return roundToPrecision(number, 2);
+  });
+
+  var f3 = (API.__private__.f3 = function(number) {
+    if (isNaN(number)) {
+      throw new Error("Invalid argument passed to jsPDF.f3");
+    }
+    return roundToPrecision(number, 3);
+  });
+
+  var scale = (API.scale = API.__private__.scale = function(number) {
+    if (isNaN(number)) {
+      throw new Error("Invalid argument passed to jsPDF.scale");
+    }
+    if (apiMode === ApiMode.COMPAT) {
+      return number * scaleFactor;
+    } else if (apiMode === ApiMode.ADVANCED) {
+      return number;
+    }
+  });
+
+  var transformY = function(y) {
+    if (apiMode === ApiMode.COMPAT) {
+      return getPageHeight() - y;
+    } else if (apiMode === ApiMode.ADVANCED) {
+      return y;
+    }
+  };
+
+  var transformScaleY = function(y) {
+    return scale(transformY(y));
+  };
+
+  /**
+   * @name setPrecision
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {string} precision
+   * @returns {jsPDF}
+   */
+  API.__private__.setPrecision = API.setPrecision = function(value) {
+    if (typeof parseInt(value, 10) === "number") {
+      precision = parseInt(value, 10);
+    }
+  };
+
+  var fileId = "00000000000000000000000000000000";
+
+  var getFileId = (API.__private__.getFileId = function() {
+    return fileId;
+  });
+
+  var setFileId = (API.__private__.setFileId = function(value) {
+    if (typeof value !== "undefined" && /^[a-fA-F0-9]{32}$/.test(value)) {
+      fileId = value.toUpperCase();
+    } else {
+      fileId = fileId
+        .split("")
+        .map(function() {
+          return "ABCDEF0123456789".charAt(Math.floor(Math.random() * 16));
+        })
+        .join("");
+    }
+
+    if (encryptionOptions !== null) {
+      encryption = new PDFSecurity(
+        encryptionOptions.userPermissions,
+        encryptionOptions.userPassword,
+        encryptionOptions.ownerPassword,
+        fileId
+      );
+    }
+    return fileId;
+  });
+
+  /**
+   * @name setFileId
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {string} value GUID.
+   * @returns {jsPDF}
+   */
+  API.setFileId = function(value) {
+    setFileId(value);
+    return this;
+  };
+
+  /**
+   * @name getFileId
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   *
+   * @returns {string} GUID.
+   */
+  API.getFileId = function() {
+    return getFileId();
+  };
+
+  var creationDate;
+
+  var convertDateToPDFDate = (API.__private__.convertDateToPDFDate = function(
+    parmDate
+  ) {
+    var result = "";
+    var tzoffset = parmDate.getTimezoneOffset(),
+      tzsign = tzoffset < 0 ? "+" : "-",
+      tzhour = Math.floor(Math.abs(tzoffset / 60)),
+      tzmin = Math.abs(tzoffset % 60),
+      timeZoneString = [tzsign, padd2(tzhour), "'", padd2(tzmin), "'"].join("");
+
+    result = [
+      "D:",
+      parmDate.getFullYear(),
+      padd2(parmDate.getMonth() + 1),
+      padd2(parmDate.getDate()),
+      padd2(parmDate.getHours()),
+      padd2(parmDate.getMinutes()),
+      padd2(parmDate.getSeconds()),
+      timeZoneString
+    ].join("");
+    return result;
+  });
+
+  var convertPDFDateToDate = (API.__private__.convertPDFDateToDate = function(
+    parmPDFDate
+  ) {
+    var year = parseInt(parmPDFDate.substr(2, 4), 10);
+    var month = parseInt(parmPDFDate.substr(6, 2), 10) - 1;
+    var date = parseInt(parmPDFDate.substr(8, 2), 10);
+    var hour = parseInt(parmPDFDate.substr(10, 2), 10);
+    var minutes = parseInt(parmPDFDate.substr(12, 2), 10);
+    var seconds = parseInt(parmPDFDate.substr(14, 2), 10);
+    // var timeZoneHour = parseInt(parmPDFDate.substr(16, 2), 10);
+    // var timeZoneMinutes = parseInt(parmPDFDate.substr(20, 2), 10);
+
+    var resultingDate = new Date(year, month, date, hour, minutes, seconds, 0);
+    return resultingDate;
+  });
+
+  var setCreationDate = (API.__private__.setCreationDate = function(date) {
+    var tmpCreationDateString;
+    var regexPDFCreationDate = /^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])'?$/;
+    if (typeof date === "undefined") {
+      date = new Date();
+    }
+
+    if (date instanceof Date) {
+      tmpCreationDateString = convertDateToPDFDate(date);
+    } else if (regexPDFCreationDate.test(date)) {
+      tmpCreationDateString = date;
+    } else {
+      throw new Error("Invalid argument passed to jsPDF.setCreationDate");
+    }
+    creationDate = tmpCreationDateString;
+    return creationDate;
+  });
+
+  var getCreationDate = (API.__private__.getCreationDate = function(type) {
+    var result = creationDate;
+    if (type === "jsDate") {
+      result = convertPDFDateToDate(creationDate);
+    }
+    return result;
+  });
+
+  /**
+   * @name setCreationDate
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {Object} date
+   * @returns {jsPDF}
+   */
+  API.setCreationDate = function(date) {
+    setCreationDate(date);
+    return this;
+  };
+
+  /**
+   * @name getCreationDate
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {Object} type
+   * @returns {Object}
+   */
+  API.getCreationDate = function(type) {
+    return getCreationDate(type);
+  };
+
+  var padd2 = (API.__private__.padd2 = function(number) {
+    return ("0" + parseInt(number)).slice(-2);
+  });
+
+  var padd2Hex = (API.__private__.padd2Hex = function(hexString) {
+    hexString = hexString.toString();
+    return ("00" + hexString).substr(hexString.length);
+  });
+
+  var objectNumber = 0; // 'n' Current object number
+  var offsets = []; // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.
+  var content = [];
+  var contentLength = 0;
+  var additionalObjects = [];
+
+  var pages = [];
+  var currentPage;
+  var hasCustomDestination = false;
+  var outputDestination = content;
+
+  var resetDocument = function() {
+    //reset fields relevant for objectNumber generation and xref.
+    objectNumber = 0;
+    contentLength = 0;
+    content = [];
+    offsets = [];
+    additionalObjects = [];
+
+    rootDictionaryObjId = newObjectDeferred();
+    resourceDictionaryObjId = newObjectDeferred();
+  };
+
+  API.__private__.setCustomOutputDestination = function(destination) {
+    hasCustomDestination = true;
+    outputDestination = destination;
+  };
+  var setOutputDestination = function(destination) {
+    if (!hasCustomDestination) {
+      outputDestination = destination;
+    }
+  };
+
+  API.__private__.resetCustomOutputDestination = function() {
+    hasCustomDestination = false;
+    outputDestination = content;
+  };
+
+  var out = (API.__private__.out = function(string) {
+    string = string.toString();
+    contentLength += string.length + 1;
+    outputDestination.push(string);
+
+    return outputDestination;
+  });
+
+  var write = (API.__private__.write = function(value) {
+    return out(
+      arguments.length === 1
+        ? value.toString()
+        : Array.prototype.join.call(arguments, " ")
+    );
+  });
+
+  var getArrayBuffer = (API.__private__.getArrayBuffer = function(data) {
+    var len = data.length,
+      ab = new ArrayBuffer(len),
+      u8 = new Uint8Array(ab);
+
+    while (len--) u8[len] = data.charCodeAt(len);
+    return ab;
+  });
+
+  var standardFonts = [
+    ["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]
+  ];
+
+  API.__private__.getStandardFonts = function() {
+    return standardFonts;
+  };
+
+  var activeFontSize = options.fontSize || 16;
+
+  /**
+   * Sets font size for upcoming text elements.
+   *
+   * @param {number} size Font size in points.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setFontSize
+   */
+  API.__private__.setFontSize = API.setFontSize = function(size) {
+    if (apiMode === ApiMode.ADVANCED) {
+      activeFontSize = size / scaleFactor;
+    } else {
+      activeFontSize = size;
+    }
+    return this;
+  };
+
+  /**
+   * Gets the fontsize for upcoming text elements.
+   *
+   * @function
+   * @instance
+   * @returns {number}
+   * @memberof jsPDF#
+   * @name getFontSize
+   */
+  var getFontSize = (API.__private__.getFontSize = API.getFontSize = function() {
+    if (apiMode === ApiMode.COMPAT) {
+      return activeFontSize;
+    } else {
+      return activeFontSize * scaleFactor;
+    }
+  });
+
+  var R2L = options.R2L || false;
+
+  /**
+   * Set value of R2L functionality.
+   *
+   * @param {boolean} value
+   * @function
+   * @instance
+   * @returns {jsPDF} jsPDF-instance
+   * @memberof jsPDF#
+   * @name setR2L
+   */
+  API.__private__.setR2L = API.setR2L = function(value) {
+    R2L = value;
+    return this;
+  };
+
+  /**
+   * Get value of R2L functionality.
+   *
+   * @function
+   * @instance
+   * @returns {boolean} jsPDF-instance
+   * @memberof jsPDF#
+   * @name getR2L
+   */
+  API.__private__.getR2L = API.getR2L = function() {
+    return R2L;
+  };
+
+  var zoomMode; // default: 1;
+
+  var setZoomMode = (API.__private__.setZoomMode = function(zoom) {
+    var validZoomModes = [
+      undefined,
+      null,
+      "fullwidth",
+      "fullheight",
+      "fullpage",
+      "original"
+    ];
+
+    if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(zoom)) {
+      zoomMode = zoom;
+    } else if (!isNaN(zoom)) {
+      zoomMode = parseInt(zoom, 10);
+    } else if (validZoomModes.indexOf(zoom) !== -1) {
+      zoomMode = zoom;
+    } else {
+      throw new Error(
+        'zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "' +
+          zoom +
+          '" is not recognized.'
+      );
+    }
+  });
+
+  API.__private__.getZoomMode = function() {
+    return zoomMode;
+  };
+
+  var pageMode; // default: 'UseOutlines';
+  var setPageMode = (API.__private__.setPageMode = function(pmode) {
+    var validPageModes = [
+      undefined,
+      null,
+      "UseNone",
+      "UseOutlines",
+      "UseThumbs",
+      "FullScreen"
+    ];
+
+    if (validPageModes.indexOf(pmode) == -1) {
+      throw new Error(
+        'Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "' +
+          pmode +
+          '" is not recognized.'
+      );
+    }
+    pageMode = pmode;
+  });
+
+  API.__private__.getPageMode = function() {
+    return pageMode;
+  };
+
+  var layoutMode; // default: 'continuous';
+  var setLayoutMode = (API.__private__.setLayoutMode = function(layout) {
+    var validLayoutModes = [
+      undefined,
+      null,
+      "continuous",
+      "single",
+      "twoleft",
+      "tworight",
+      "two"
+    ];
+
+    if (validLayoutModes.indexOf(layout) == -1) {
+      throw new Error(
+        'Layout mode must be one of continuous, single, twoleft, tworight. "' +
+          layout +
+          '" is not recognized.'
+      );
+    }
+    layoutMode = layout;
+  });
+
+  API.__private__.getLayoutMode = function() {
+    return layoutMode;
+  };
+
+  /**
+   * Set the display mode options of the page like zoom and layout.
+   *
+   * @name setDisplayMode
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {integer|String} zoom   You can pass an integer or percentage as
+   * a string. 2 will scale the document up 2x, '200%' will scale up by the
+   * same amount. You can also set it to 'fullwidth', 'fullheight',
+   * 'fullpage', or 'original'.
+   *
+   * Only certain PDF readers support this, such as Adobe Acrobat.
+   *
+   * @param {string} layout Layout mode can be: 'continuous' - this is the
+   * default continuous scroll. 'single' - the single page mode only shows one
+   * page at a time. 'twoleft' - two column left mode, first page starts on
+   * the left, and 'tworight' - pages are laid out in two columns, with the
+   * first page on the right. This would be used for books.
+   * @param {string} pmode 'UseOutlines' - it shows the
+   * outline of the document on the left. 'UseThumbs' - shows thumbnails along
+   * the left. 'FullScreen' - prompts the user to enter fullscreen mode.
+   *
+   * @returns {jsPDF}
+   */
+  API.__private__.setDisplayMode = API.setDisplayMode = function(
+    zoom,
+    layout,
+    pmode
+  ) {
+    setZoomMode(zoom);
+    setLayoutMode(layout);
+    setPageMode(pmode);
+    return this;
+  };
+
+  var documentProperties = {
+    title: "",
+    subject: "",
+    author: "",
+    keywords: "",
+    creator: ""
+  };
+
+  API.__private__.getDocumentProperty = function(key) {
+    if (Object.keys(documentProperties).indexOf(key) === -1) {
+      throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");
+    }
+    return documentProperties[key];
+  };
+
+  API.__private__.getDocumentProperties = function() {
+    return documentProperties;
+  };
+
+  /**
+   * Adds a properties to the PDF document.
+   *
+   * @param {Object} A property_name-to-property_value object structure.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setDocumentProperties
+   */
+  API.__private__.setDocumentProperties = API.setProperties = API.setDocumentProperties = function(
+    properties
+  ) {
+    // copying only those properties we can render.
+    for (var property in documentProperties) {
+      if (documentProperties.hasOwnProperty(property) && properties[property]) {
+        documentProperties[property] = properties[property];
+      }
+    }
+    return this;
+  };
+
+  API.__private__.setDocumentProperty = function(key, value) {
+    if (Object.keys(documentProperties).indexOf(key) === -1) {
+      throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");
+    }
+    return (documentProperties[key] = value);
+  };
+
+  var fonts = {}; // collection of font objects, where key is fontKey - a dynamically created label for a given font.
+  var fontmap = {}; // mapping structure fontName > fontStyle > font key - performance layer. See addFont()
+  var activeFontKey; // will be string representing the KEY of the font as combination of fontName + fontStyle
+  var fontStateStack = []; //
+  var patterns = {}; // collection of pattern objects
+  var patternMap = {}; // see fonts
+  var gStates = {}; // collection of graphic state objects
+  var gStatesMap = {}; // see fonts
+  var activeGState = null;
+  var scaleFactor; // Scale factor
+  var page = 0;
+  var pagesContext = [];
+  var events = new PubSub(API);
+  var hotfixes = options.hotfixes || [];
+
+  var renderTargets = {};
+  var renderTargetMap = {};
+  var renderTargetStack = [];
+  var pageX;
+  var pageY;
+  var pageMatrix; // only used for FormObjects
+
+  /**
+   * A matrix object for 2D homogenous transformations: <br>
+   * | a b 0 | <br>
+   * | c d 0 | <br>
+   * | e f 1 | <br>
+   * pdf multiplies matrices righthand: v' = v x m1 x m2 x ...
+   *
+   * @class
+   * @name Matrix
+   * @param {number} sx
+   * @param {number} shy
+   * @param {number} shx
+   * @param {number} sy
+   * @param {number} tx
+   * @param {number} ty
+   * @constructor
+   */
+  var Matrix = function(sx, shy, shx, sy, tx, ty) {
+    if (!(this instanceof Matrix)) {
+      return new Matrix(sx, shy, shx, sy, tx, ty);
+    }
+
+    if (isNaN(sx)) sx = 1;
+    if (isNaN(shy)) shy = 0;
+    if (isNaN(shx)) shx = 0;
+    if (isNaN(sy)) sy = 1;
+    if (isNaN(tx)) tx = 0;
+    if (isNaN(ty)) ty = 0;
+
+    this._matrix = [sx, shy, shx, sy, tx, ty];
+  };
+
+  /**
+   * @name sx
+   * @memberof Matrix#
+   */
+  Object.defineProperty(Matrix.prototype, "sx", {
+    get: function() {
+      return this._matrix[0];
+    },
+    set: function(value) {
+      this._matrix[0] = value;
+    }
+  });
+
+  /**
+   * @name shy
+   * @memberof Matrix#
+   */
+  Object.defineProperty(Matrix.prototype, "shy", {
+    get: function() {
+      return this._matrix[1];
+    },
+    set: function(value) {
+      this._matrix[1] = value;
+    }
+  });
+
+  /**
+   * @name shx
+   * @memberof Matrix#
+   */
+  Object.defineProperty(Matrix.prototype, "shx", {
+    get: function() {
+      return this._matrix[2];
+    },
+    set: function(value) {
+      this._matrix[2] = value;
+    }
+  });
+
+  /**
+   * @name sy
+   * @memberof Matrix#
+   */
+  Object.defineProperty(Matrix.prototype, "sy", {
+    get: function() {
+      return this._matrix[3];
+    },
+    set: function(value) {
+      this._matrix[3] = value;
+    }
+  });
+
+  /**
+   * @name tx
+   * @memberof Matrix#
+   */
+  Object.defineProperty(Matrix.prototype, "tx", {
+    get: function() {
+      return this._matrix[4];
+    },
+    set: function(value) {
+      this._matrix[4] = value;
+    }
+  });
+
+  /**
+   * @name ty
+   * @memberof Matrix#
+   */
+  Object.defineProperty(Matrix.prototype, "ty", {
+    get: function() {
+      return this._matrix[5];
+    },
+    set: function(value) {
+      this._matrix[5] = value;
+    }
+  });
+
+  Object.defineProperty(Matrix.prototype, "a", {
+    get: function() {
+      return this._matrix[0];
+    },
+    set: function(value) {
+      this._matrix[0] = value;
+    }
+  });
+
+  Object.defineProperty(Matrix.prototype, "b", {
+    get: function() {
+      return this._matrix[1];
+    },
+    set: function(value) {
+      this._matrix[1] = value;
+    }
+  });
+
+  Object.defineProperty(Matrix.prototype, "c", {
+    get: function() {
+      return this._matrix[2];
+    },
+    set: function(value) {
+      this._matrix[2] = value;
+    }
+  });
+
+  Object.defineProperty(Matrix.prototype, "d", {
+    get: function() {
+      return this._matrix[3];
+    },
+    set: function(value) {
+      this._matrix[3] = value;
+    }
+  });
+
+  Object.defineProperty(Matrix.prototype, "e", {
+    get: function() {
+      return this._matrix[4];
+    },
+    set: function(value) {
+      this._matrix[4] = value;
+    }
+  });
+
+  Object.defineProperty(Matrix.prototype, "f", {
+    get: function() {
+      return this._matrix[5];
+    },
+    set: function(value) {
+      this._matrix[5] = value;
+    }
+  });
+
+  /**
+   * @name rotation
+   * @memberof Matrix#
+   */
+  Object.defineProperty(Matrix.prototype, "rotation", {
+    get: function() {
+      return Math.atan2(this.shx, this.sx);
+    }
+  });
+
+  /**
+   * @name scaleX
+   * @memberof Matrix#
+   */
+  Object.defineProperty(Matrix.prototype, "scaleX", {
+    get: function() {
+      return this.decompose().scale.sx;
+    }
+  });
+
+  /**
+   * @name scaleY
+   * @memberof Matrix#
+   */
+  Object.defineProperty(Matrix.prototype, "scaleY", {
+    get: function() {
+      return this.decompose().scale.sy;
+    }
+  });
+
+  /**
+   * @name isIdentity
+   * @memberof Matrix#
+   */
+  Object.defineProperty(Matrix.prototype, "isIdentity", {
+    get: function() {
+      if (this.sx !== 1) {
+        return false;
+      }
+      if (this.shy !== 0) {
+        return false;
+      }
+      if (this.shx !== 0) {
+        return false;
+      }
+      if (this.sy !== 1) {
+        return false;
+      }
+      if (this.tx !== 0) {
+        return false;
+      }
+      if (this.ty !== 0) {
+        return false;
+      }
+      return true;
+    }
+  });
+
+  /**
+   * Join the Matrix Values to a String
+   *
+   * @function join
+   * @param {string} separator Specifies a string to separate each pair of adjacent elements of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma (","). If separator is an empty string, all elements are joined without any characters in between them.
+   * @returns {string} A string with all array elements joined.
+   * @memberof Matrix#
+   */
+  Matrix.prototype.join = function(separator) {
+    return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty]
+      .map(hpf)
+      .join(separator);
+  };
+
+  /**
+   * Multiply the matrix with given Matrix
+   *
+   * @function multiply
+   * @param matrix
+   * @returns {Matrix}
+   * @memberof Matrix#
+   */
+  Matrix.prototype.multiply = function(matrix) {
+    var sx = matrix.sx * this.sx + matrix.shy * this.shx;
+    var shy = matrix.sx * this.shy + matrix.shy * this.sy;
+    var shx = matrix.shx * this.sx + matrix.sy * this.shx;
+    var sy = matrix.shx * this.shy + matrix.sy * this.sy;
+    var tx = matrix.tx * this.sx + matrix.ty * this.shx + this.tx;
+    var ty = matrix.tx * this.shy + matrix.ty * this.sy + this.ty;
+
+    return new Matrix(sx, shy, shx, sy, tx, ty);
+  };
+
+  /**
+   * @function decompose
+   * @memberof Matrix#
+   */
+  Matrix.prototype.decompose = function() {
+    var a = this.sx;
+    var b = this.shy;
+    var c = this.shx;
+    var d = this.sy;
+    var e = this.tx;
+    var f = this.ty;
+
+    var scaleX = Math.sqrt(a * a + b * b);
+    a /= scaleX;
+    b /= scaleX;
+
+    var shear = a * c + b * d;
+    c -= a * shear;
+    d -= b * shear;
+
+    var scaleY = Math.sqrt(c * c + d * d);
+    c /= scaleY;
+    d /= scaleY;
+    shear /= scaleY;
+
+    if (a * d < b * c) {
+      a = -a;
+      b = -b;
+      shear = -shear;
+      scaleX = -scaleX;
+    }
+
+    return {
+      scale: new Matrix(scaleX, 0, 0, scaleY, 0, 0),
+      translate: new Matrix(1, 0, 0, 1, e, f),
+      rotate: new Matrix(a, b, -b, a, 0, 0),
+      skew: new Matrix(1, 0, shear, 1, 0, 0)
+    };
+  };
+
+  /**
+   * @function toString
+   * @memberof Matrix#
+   */
+  Matrix.prototype.toString = function(parmPrecision) {
+    return this.join(" ");
+  };
+
+  /**
+   * @function inversed
+   * @memberof Matrix#
+   */
+  Matrix.prototype.inversed = function() {
+    var a = this.sx,
+      b = this.shy,
+      c = this.shx,
+      d = this.sy,
+      e = this.tx,
+      f = this.ty;
+
+    var quot = 1 / (a * d - b * c);
+
+    var aInv = d * quot;
+    var bInv = -b * quot;
+    var cInv = -c * quot;
+    var dInv = a * quot;
+    var eInv = -aInv * e - cInv * f;
+    var fInv = -bInv * e - dInv * f;
+
+    return new Matrix(aInv, bInv, cInv, dInv, eInv, fInv);
+  };
+
+  /**
+   * @function applyToPoint
+   * @memberof Matrix#
+   */
+  Matrix.prototype.applyToPoint = function(pt) {
+    var x = pt.x * this.sx + pt.y * this.shx + this.tx;
+    var y = pt.x * this.shy + pt.y * this.sy + this.ty;
+    return new Point(x, y);
+  };
+
+  /**
+   * @function applyToRectangle
+   * @memberof Matrix#
+   */
+  Matrix.prototype.applyToRectangle = function(rect) {
+    var pt1 = this.applyToPoint(rect);
+    var pt2 = this.applyToPoint(new Point(rect.x + rect.w, rect.y + rect.h));
+    return new Rectangle(pt1.x, pt1.y, pt2.x - pt1.x, pt2.y - pt1.y);
+  };
+
+  /**
+   * Clone the Matrix
+   *
+   * @function clone
+   * @memberof Matrix#
+   * @name clone
+   * @instance
+   */
+  Matrix.prototype.clone = function() {
+    var sx = this.sx;
+    var shy = this.shy;
+    var shx = this.shx;
+    var sy = this.sy;
+    var tx = this.tx;
+    var ty = this.ty;
+
+    return new Matrix(sx, shy, shx, sy, tx, ty);
+  };
+
+  API.Matrix = Matrix;
+
+  /**
+   * Multiplies two matrices. (see {@link Matrix})
+   * @param {Matrix} m1
+   * @param {Matrix} m2
+   * @memberof jsPDF#
+   * @name matrixMult
+   */
+  var matrixMult = (API.matrixMult = function(m1, m2) {
+    return m2.multiply(m1);
+  });
+
+  /**
+   * The identity matrix (equivalent to new Matrix(1, 0, 0, 1, 0, 0)).
+   * @type {Matrix}
+   * @memberof! jsPDF#
+   * @name identityMatrix
+   */
+  var identityMatrix = new Matrix(1, 0, 0, 1, 0, 0);
+  API.unitMatrix = API.identityMatrix = identityMatrix;
+
+  /**
+   * Adds a new pattern for later use.
+   * @param {String} key The key by it can be referenced later. The keys must be unique!
+   * @param {API.Pattern} pattern The pattern
+   */
+  var addPattern = function(key, pattern) {
+    // only add it if it is not already present (the keys provided by the user must be unique!)
+    if (patternMap[key]) return;
+
+    var prefix = pattern instanceof ShadingPattern ? "Sh" : "P";
+    var patternKey = prefix + (Object.keys(patterns).length + 1).toString(10);
+    pattern.id = patternKey;
+
+    patternMap[key] = patternKey;
+    patterns[patternKey] = pattern;
+
+    events.publish("addPattern", pattern);
+  };
+
+  /**
+   * A pattern describing a shading pattern.
+   *
+   * Only available in "advanced" API mode.
+   *
+   * @param {String} type One of "axial" or "radial"
+   * @param {Array<Number>} coords Either [x1, y1, x2, y2] for "axial" type describing the two interpolation points
+   * or [x1, y1, r, x2, y2, r2] for "radial" describing inner and the outer circle.
+   * @param {Array<Object>} colors An array of objects with the fields "offset" and "color". "offset" describes
+   * the offset in parameter space [0, 1]. "color" is an array of length 3 describing RGB values in [0, 255].
+   * @param {GState=} gState An additional graphics state that gets applied to the pattern (optional).
+   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system
+   * and the use coordinate system (optional).
+   * @constructor
+   * @extends API.Pattern
+   */
+  API.ShadingPattern = ShadingPattern;
+
+  /**
+   * A PDF Tiling pattern.
+   *
+   * Only available in "advanced" API mode.
+   *
+   * @param {Array.<Number>} boundingBox The bounding box at which one pattern cell gets clipped.
+   * @param {Number} xStep Horizontal spacing between pattern cells.
+   * @param {Number} yStep Vertical spacing between pattern cells.
+   * @param {API.GState=} gState An additional graphics state that gets applied to the pattern (optional).
+   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system
+   * and the use coordinate system (optional).
+   * @constructor
+   * @extends API.Pattern
+   */
+  API.TilingPattern = TilingPattern;
+
+  /**
+   * Adds a new {@link API.ShadingPattern} for later use. Only available in "advanced" API mode.
+   * @param {String} key
+   * @param {Pattern} pattern
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name addPattern
+   */
+  API.addShadingPattern = function(key, pattern) {
+    advancedApiModeTrap("addShadingPattern()");
+
+    addPattern(key, pattern);
+    return this;
+  };
+
+  /**
+   * Begins a new tiling pattern. All subsequent render calls are drawn to this pattern until {@link API.endTilingPattern}
+   * gets called. Only available in "advanced" API mode.
+   * @param {API.Pattern} pattern
+   * @memberof jsPDF#
+   * @name beginTilingPattern
+   */
+  API.beginTilingPattern = function(pattern) {
+    advancedApiModeTrap("beginTilingPattern()");
+
+    beginNewRenderTarget(
+      pattern.boundingBox[0],
+      pattern.boundingBox[1],
+      pattern.boundingBox[2] - pattern.boundingBox[0],
+      pattern.boundingBox[3] - pattern.boundingBox[1],
+      pattern.matrix
+    );
+  };
+
+  /**
+   * Ends a tiling pattern and sets the render target to the one active before {@link API.beginTilingPattern} has been called.
+   *
+   * Only available in "advanced" API mode.
+   *
+   * @param {string} key A unique key that is used to reference this pattern at later use.
+   * @param {API.Pattern} pattern The pattern to end.
+   * @memberof jsPDF#
+   * @name endTilingPattern
+   */
+  API.endTilingPattern = function(key, pattern) {
+    advancedApiModeTrap("endTilingPattern()");
+
+    // retrieve the stream
+    pattern.stream = pages[currentPage].join("\n");
+
+    addPattern(key, pattern);
+
+    events.publish("endTilingPattern", pattern);
+
+    // restore state from stack
+    renderTargetStack.pop().restore();
+  };
+
+  var newObject = (API.__private__.newObject = function() {
+    var oid = newObjectDeferred();
+    newObjectDeferredBegin(oid, true);
+    return oid;
+  });
+
+  // Does not output the object.  The caller must call newObjectDeferredBegin(oid) before outputing any data
+  var newObjectDeferred = (API.__private__.newObjectDeferred = function() {
+    objectNumber++;
+    offsets[objectNumber] = function() {
+      return contentLength;
+    };
+    return objectNumber;
+  });
+
+  var newObjectDeferredBegin = function(oid, doOutput) {
+    doOutput = typeof doOutput === "boolean" ? doOutput : false;
+    offsets[oid] = contentLength;
+    if (doOutput) {
+      out(oid + " 0 obj");
+    }
+    return oid;
+  };
+  // Does not output the object until after the pages have been output.
+  // Returns an object containing the objectId and content.
+  // All pages have been added so the object ID can be estimated to start right after.
+  // This does not modify the current objectNumber;  It must be updated after the newObjects are output.
+  var newAdditionalObject = (API.__private__.newAdditionalObject = function() {
+    var objId = newObjectDeferred();
+    var obj = {
+      objId: objId,
+      content: ""
+    };
+    additionalObjects.push(obj);
+    return obj;
+  });
+
+  var rootDictionaryObjId = newObjectDeferred();
+  var resourceDictionaryObjId = newObjectDeferred();
+
+  /////////////////////
+  // Private functions
+  /////////////////////
+
+  var decodeColorString = (API.__private__.decodeColorString = function(color) {
+    var colorEncoded = color.split(" ");
+    if (
+      colorEncoded.length === 2 &&
+      (colorEncoded[1] === "g" || colorEncoded[1] === "G")
+    ) {
+      // convert grayscale value to rgb so that it can be converted to hex for consistency
+      var floatVal = parseFloat(colorEncoded[0]);
+      colorEncoded = [floatVal, floatVal, floatVal, "r"];
+    } else if (
+      colorEncoded.length === 5 &&
+      (colorEncoded[4] === "k" || colorEncoded[4] === "K")
+    ) {
+      // convert CMYK values to rbg so that it can be converted to hex for consistency
+      var red = (1.0 - colorEncoded[0]) * (1.0 - colorEncoded[3]);
+      var green = (1.0 - colorEncoded[1]) * (1.0 - colorEncoded[3]);
+      var blue = (1.0 - colorEncoded[2]) * (1.0 - colorEncoded[3]);
+
+      colorEncoded = [red, green, blue, "r"];
+    }
+    var colorAsRGB = "#";
+    for (var i = 0; i < 3; i++) {
+      colorAsRGB += (
+        "0" + Math.floor(parseFloat(colorEncoded[i]) * 255).toString(16)
+      ).slice(-2);
+    }
+    return colorAsRGB;
+  });
+
+  var encodeColorString = (API.__private__.encodeColorString = function(
+    options
+  ) {
+    var color;
+
+    if (typeof options === "string") {
+      options = {
+        ch1: options
+      };
+    }
+    var ch1 = options.ch1;
+    var ch2 = options.ch2;
+    var ch3 = options.ch3;
+    var ch4 = options.ch4;
+    var letterArray =
+      options.pdfColorType === "draw" ? ["G", "RG", "K"] : ["g", "rg", "k"];
+
+    if (typeof ch1 === "string" && ch1.charAt(0) !== "#") {
+      var rgbColor = new RGBColor(ch1);
+      if (rgbColor.ok) {
+        ch1 = rgbColor.toHex();
+      } else if (!/^\d*\.?\d*$/.test(ch1)) {
+        throw new Error(
+          'Invalid color "' + ch1 + '" passed to jsPDF.encodeColorString.'
+        );
+      }
+    }
+    //convert short rgb to long form
+    if (typeof ch1 === "string" && /^#[0-9A-Fa-f]{3}$/.test(ch1)) {
+      ch1 = "#" + ch1[1] + ch1[1] + ch1[2] + ch1[2] + ch1[3] + ch1[3];
+    }
+
+    if (typeof ch1 === "string" && /^#[0-9A-Fa-f]{6}$/.test(ch1)) {
+      var hex = parseInt(ch1.substr(1), 16);
+      ch1 = (hex >> 16) & 255;
+      ch2 = (hex >> 8) & 255;
+      ch3 = hex & 255;
+    }
+
+    if (
+      typeof ch2 === "undefined" ||
+      (typeof ch4 === "undefined" && ch1 === ch2 && ch2 === ch3)
+    ) {
+      // Gray color space.
+      if (typeof ch1 === "string") {
+        color = ch1 + " " + letterArray[0];
+      } else {
+        switch (options.precision) {
+          case 2:
+            color = f2(ch1 / 255) + " " + letterArray[0];
+            break;
+          case 3:
+          default:
+            color = f3(ch1 / 255) + " " + letterArray[0];
+        }
+      }
+    } else if (typeof ch4 === "undefined" || typeof ch4 === "object") {
+      // assume RGBA
+      if (ch4 && !isNaN(ch4.a)) {
+        //TODO Implement transparency.
+        //WORKAROUND use white for now, if transparent, otherwise handle as rgb
+        if (ch4.a === 0) {
+          color = ["1.", "1.", "1.", letterArray[1]].join(" ");
+          return color;
+        }
+      }
+      // assume RGB
+      if (typeof ch1 === "string") {
+        color = [ch1, ch2, ch3, letterArray[1]].join(" ");
+      } else {
+        switch (options.precision) {
+          case 2:
+            color = [
+              f2(ch1 / 255),
+              f2(ch2 / 255),
+              f2(ch3 / 255),
+              letterArray[1]
+            ].join(" ");
+            break;
+          default:
+          case 3:
+            color = [
+              f3(ch1 / 255),
+              f3(ch2 / 255),
+              f3(ch3 / 255),
+              letterArray[1]
+            ].join(" ");
+        }
+      }
+    } else {
+      // assume CMYK
+      if (typeof ch1 === "string") {
+        color = [ch1, ch2, ch3, ch4, letterArray[2]].join(" ");
+      } else {
+        switch (options.precision) {
+          case 2:
+            color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), letterArray[2]].join(
+              " "
+            );
+            break;
+          case 3:
+          default:
+            color = [f3(ch1), f3(ch2), f3(ch3), f3(ch4), letterArray[2]].join(
+              " "
+            );
+        }
+      }
+    }
+    return color;
+  });
+
+  var getFilters = (API.__private__.getFilters = function() {
+    return filters;
+  });
+
+  var putStream = (API.__private__.putStream = function(options) {
+    options = options || {};
+    var data = options.data || "";
+    var filters = options.filters || getFilters();
+    var alreadyAppliedFilters = options.alreadyAppliedFilters || [];
+    var addLength1 = options.addLength1 || false;
+    var valueOfLength1 = data.length;
+    var objectId = options.objectId;
+    var encryptor = function(data) {
+      return data;
+    };
+    if (encryptionOptions !== null && typeof objectId == "undefined") {
+      throw new Error(
+        "ObjectId must be passed to putStream for file encryption"
+      );
+    }
+    if (encryptionOptions !== null) {
+      encryptor = encryption.encryptor(objectId, 0);
+    }
+
+    var processedData = {};
+    if (filters === true) {
+      filters = ["FlateEncode"];
+    }
+    var keyValues = options.additionalKeyValues || [];
+    if (typeof jsPDF.API.processDataByFilters !== "undefined") {
+      processedData = jsPDF.API.processDataByFilters(data, filters);
+    } else {
+      processedData = { data: data, reverseChain: [] };
+    }
+    var filterAsString =
+      processedData.reverseChain +
+      (Array.isArray(alreadyAppliedFilters)
+        ? alreadyAppliedFilters.join(" ")
+        : alreadyAppliedFilters.toString());
+
+    if (processedData.data.length !== 0) {
+      keyValues.push({
+        key: "Length",
+        value: processedData.data.length
+      });
+      if (addLength1 === true) {
+        keyValues.push({
+          key: "Length1",
+          value: valueOfLength1
+        });
+      }
+    }
+
+    if (filterAsString.length != 0) {
+      if (filterAsString.split("/").length - 1 === 1) {
+        keyValues.push({
+          key: "Filter",
+          value: filterAsString
+        });
+      } else {
+        keyValues.push({
+          key: "Filter",
+          value: "[" + filterAsString + "]"
+        });
+
+        for (var j = 0; j < keyValues.length; j += 1) {
+          if (keyValues[j].key === "DecodeParms") {
+            var decodeParmsArray = [];
+
+            for (
+              var i = 0;
+              i < processedData.reverseChain.split("/").length - 1;
+              i += 1
+            ) {
+              decodeParmsArray.push("null");
+            }
+
+            decodeParmsArray.push(keyValues[j].value);
+            keyValues[j].value = "[" + decodeParmsArray.join(" ") + "]";
+          }
+        }
+      }
+    }
+
+    out("<<");
+    for (var k = 0; k < keyValues.length; k++) {
+      out("/" + keyValues[k].key + " " + keyValues[k].value);
+    }
+    out(">>");
+    if (processedData.data.length !== 0) {
+      out("stream");
+      out(encryptor(processedData.data));
+      out("endstream");
+    }
+  });
+
+  var putPage = (API.__private__.putPage = function(page) {
+    var pageNumber = page.number;
+    var data = page.data;
+    var pageObjectNumber = page.objId;
+    var pageContentsObjId = page.contentsObjId;
+
+    newObjectDeferredBegin(pageObjectNumber, true);
+    out("<</Type /Page");
+    out("/Parent " + page.rootDictionaryObjId + " 0 R");
+    out("/Resources " + page.resourceDictionaryObjId + " 0 R");
+    out(
+      "/MediaBox [" +
+        parseFloat(hpf(page.mediaBox.bottomLeftX)) +
+        " " +
+        parseFloat(hpf(page.mediaBox.bottomLeftY)) +
+        " " +
+        hpf(page.mediaBox.topRightX) +
+        " " +
+        hpf(page.mediaBox.topRightY) +
+        "]"
+    );
+    if (page.cropBox !== null) {
+      out(
+        "/CropBox [" +
+          hpf(page.cropBox.bottomLeftX) +
+          " " +
+          hpf(page.cropBox.bottomLeftY) +
+          " " +
+          hpf(page.cropBox.topRightX) +
+          " " +
+          hpf(page.cropBox.topRightY) +
+          "]"
+      );
+    }
+
+    if (page.bleedBox !== null) {
+      out(
+        "/BleedBox [" +
+          hpf(page.bleedBox.bottomLeftX) +
+          " " +
+          hpf(page.bleedBox.bottomLeftY) +
+          " " +
+          hpf(page.bleedBox.topRightX) +
+          " " +
+          hpf(page.bleedBox.topRightY) +
+          "]"
+      );
+    }
+
+    if (page.trimBox !== null) {
+      out(
+        "/TrimBox [" +
+          hpf(page.trimBox.bottomLeftX) +
+          " " +
+          hpf(page.trimBox.bottomLeftY) +
+          " " +
+          hpf(page.trimBox.topRightX) +
+          " " +
+          hpf(page.trimBox.topRightY) +
+          "]"
+      );
+    }
+
+    if (page.artBox !== null) {
+      out(
+        "/ArtBox [" +
+          hpf(page.artBox.bottomLeftX) +
+          " " +
+          hpf(page.artBox.bottomLeftY) +
+          " " +
+          hpf(page.artBox.topRightX) +
+          " " +
+          hpf(page.artBox.topRightY) +
+          "]"
+      );
+    }
+
+    if (typeof page.userUnit === "number" && page.userUnit !== 1.0) {
+      out("/UserUnit " + page.userUnit);
+    }
+
+    events.publish("putPage", {
+      objId: pageObjectNumber,
+      pageContext: pagesContext[pageNumber],
+      pageNumber: pageNumber,
+      page: data
+    });
+    out("/Contents " + pageContentsObjId + " 0 R");
+    out(">>");
+    out("endobj");
+    // Page content
+    var pageContent = data.join("\n");
+
+    if (apiMode === ApiMode.ADVANCED) {
+      // if the user forgot to switch back to COMPAT mode, we must balance the graphics stack again
+      pageContent += "\nQ";
+    }
+
+    newObjectDeferredBegin(pageContentsObjId, true);
+    putStream({
+      data: pageContent,
+      filters: getFilters(),
+      objectId: pageContentsObjId
+    });
+    out("endobj");
+    return pageObjectNumber;
+  });
+
+  var putPages = (API.__private__.putPages = function() {
+    var n,
+      i,
+      pageObjectNumbers = [];
+
+    for (n = 1; n <= page; n++) {
+      pagesContext[n].objId = newObjectDeferred();
+      pagesContext[n].contentsObjId = newObjectDeferred();
+    }
+
+    for (n = 1; n <= page; n++) {
+      pageObjectNumbers.push(
+        putPage({
+          number: n,
+          data: pages[n],
+          objId: pagesContext[n].objId,
+          contentsObjId: pagesContext[n].contentsObjId,
+          mediaBox: pagesContext[n].mediaBox,
+          cropBox: pagesContext[n].cropBox,
+          bleedBox: pagesContext[n].bleedBox,
+          trimBox: pagesContext[n].trimBox,
+          artBox: pagesContext[n].artBox,
+          userUnit: pagesContext[n].userUnit,
+          rootDictionaryObjId: rootDictionaryObjId,
+          resourceDictionaryObjId: resourceDictionaryObjId
+        })
+      );
+    }
+    newObjectDeferredBegin(rootDictionaryObjId, true);
+    out("<</Type /Pages");
+    var kids = "/Kids [";
+    for (i = 0; i < page; i++) {
+      kids += pageObjectNumbers[i] + " 0 R ";
+    }
+    out(kids + "]");
+    out("/Count " + page);
+    out(">>");
+    out("endobj");
+    events.publish("postPutPages");
+  });
+
+  var putFont = function(font) {
+    events.publish("putFont", {
+      font: font,
+      out: out,
+      newObject: newObject,
+      putStream: putStream
+    });
+
+    if (font.isAlreadyPutted !== true) {
+      font.objectNumber = newObject();
+      out("<<");
+      out("/Type /Font");
+      out("/BaseFont /" + toPDFName(font.postScriptName));
+      out("/Subtype /Type1");
+      if (typeof font.encoding === "string") {
+        out("/Encoding /" + font.encoding);
+      }
+      out("/FirstChar 32");
+      out("/LastChar 255");
+      out(">>");
+      out("endobj");
+    }
+  };
+
+  var putFonts = function() {
+    for (var fontKey in fonts) {
+      if (fonts.hasOwnProperty(fontKey)) {
+        if (
+          putOnlyUsedFonts === false ||
+          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))
+        ) {
+          putFont(fonts[fontKey]);
+        }
+      }
+    }
+  };
+
+  var putXObject = function(xObject) {
+    xObject.objectNumber = newObject();
+
+    var options = [];
+    options.push({ key: "Type", value: "/XObject" });
+    options.push({ key: "Subtype", value: "/Form" });
+    options.push({
+      key: "BBox",
+      value:
+        "[" +
+        [
+          hpf(xObject.x),
+          hpf(xObject.y),
+          hpf(xObject.x + xObject.width),
+          hpf(xObject.y + xObject.height)
+        ].join(" ") +
+        "]"
+    });
+    options.push({
+      key: "Matrix",
+      value: "[" + xObject.matrix.toString() + "]"
+    });
+    // TODO: /Resources
+
+    var stream = xObject.pages[1].join("\n");
+    putStream({
+      data: stream,
+      additionalKeyValues: options,
+      objectId: xObject.objectNumber
+    });
+    out("endobj");
+  };
+
+  var putXObjects = function() {
+    for (var xObjectKey in renderTargets) {
+      if (renderTargets.hasOwnProperty(xObjectKey)) {
+        putXObject(renderTargets[xObjectKey]);
+      }
+    }
+  };
+
+  var interpolateAndEncodeRGBStream = function(colors, numberSamples) {
+    var tValues = [];
+    var t;
+    var dT = 1.0 / (numberSamples - 1);
+    for (t = 0.0; t < 1.0; t += dT) {
+      tValues.push(t);
+    }
+    tValues.push(1.0);
+    // add first and last control point if not present
+    if (colors[0].offset != 0.0) {
+      var c0 = {
+        offset: 0.0,
+        color: colors[0].color
+      };
+      colors.unshift(c0);
+    }
+    if (colors[colors.length - 1].offset != 1.0) {
+      var c1 = {
+        offset: 1.0,
+        color: colors[colors.length - 1].color
+      };
+      colors.push(c1);
+    }
+    var out = "";
+    var index = 0;
+
+    for (var i = 0; i < tValues.length; i++) {
+      t = tValues[i];
+      while (t > colors[index + 1].offset) index++;
+      var a = colors[index].offset;
+      var b = colors[index + 1].offset;
+      var d = (t - a) / (b - a);
+
+      var aColor = colors[index].color;
+      var bColor = colors[index + 1].color;
+
+      out +=
+        padd2Hex(Math.round((1 - d) * aColor[0] + d * bColor[0]).toString(16)) +
+        padd2Hex(Math.round((1 - d) * aColor[1] + d * bColor[1]).toString(16)) +
+        padd2Hex(Math.round((1 - d) * aColor[2] + d * bColor[2]).toString(16));
+    }
+    return out.trim();
+  };
+
+  var putShadingPattern = function(pattern, numberSamples) {
+    /*
+       Axial patterns shade between the two points specified in coords, radial patterns between the inner
+       and outer circle.
+       The user can specify an array (colors) that maps t-Values in [0, 1] to RGB colors. These are now
+       interpolated to equidistant samples and written to pdf as a sample (type 0) function.
+       */
+    // The number of color samples that should be used to describe the shading.
+    // The higher, the more accurate the gradient will be.
+    numberSamples || (numberSamples = 21);
+    var funcObjectNumber = newObject();
+    var stream = interpolateAndEncodeRGBStream(pattern.colors, numberSamples);
+
+    var options = [];
+    options.push({ key: "FunctionType", value: "0" });
+    options.push({ key: "Domain", value: "[0.0 1.0]" });
+    options.push({ key: "Size", value: "[" + numberSamples + "]" });
+    options.push({ key: "BitsPerSample", value: "8" });
+    options.push({ key: "Range", value: "[0.0 1.0 0.0 1.0 0.0 1.0]" });
+    options.push({ key: "Decode", value: "[0.0 1.0 0.0 1.0 0.0 1.0]" });
+
+    putStream({
+      data: stream,
+      additionalKeyValues: options,
+      alreadyAppliedFilters: ["/ASCIIHexDecode"],
+      objectId: funcObjectNumber
+    });
+    out("endobj");
+
+    pattern.objectNumber = newObject();
+    out("<< /ShadingType " + pattern.type);
+    out("/ColorSpace /DeviceRGB");
+    var coords =
+      "/Coords [" +
+      hpf(parseFloat(pattern.coords[0])) +
+      " " + // x1
+      hpf(parseFloat(pattern.coords[1])) +
+      " "; // y1
+    if (pattern.type === 2) {
+      // axial
+      coords +=
+        hpf(parseFloat(pattern.coords[2])) +
+        " " + // x2
+        hpf(parseFloat(pattern.coords[3])); // y2
+    } else {
+      // radial
+      coords +=
+        hpf(parseFloat(pattern.coords[2])) +
+        " " + // r1
+        hpf(parseFloat(pattern.coords[3])) +
+        " " + // x2
+        hpf(parseFloat(pattern.coords[4])) +
+        " " + // y2
+        hpf(parseFloat(pattern.coords[5])); // r2
+    }
+    coords += "]";
+    out(coords);
+
+    if (pattern.matrix) {
+      out("/Matrix [" + pattern.matrix.toString() + "]");
+    }
+    out("/Function " + funcObjectNumber + " 0 R");
+    out("/Extend [true true]");
+    out(">>");
+    out("endobj");
+  };
+
+  var putTilingPattern = function(pattern, deferredResourceDictionaryIds) {
+    var resourcesObjectId = newObjectDeferred();
+    var patternObjectId = newObject();
+
+    deferredResourceDictionaryIds.push({
+      resourcesOid: resourcesObjectId,
+      objectOid: patternObjectId
+    });
+
+    pattern.objectNumber = patternObjectId;
+    var options = [];
+    options.push({ key: "Type", value: "/Pattern" });
+    options.push({ key: "PatternType", value: "1" }); // tiling pattern
+    options.push({ key: "PaintType", value: "1" }); // colored tiling pattern
+    options.push({ key: "TilingType", value: "1" }); // constant spacing
+    options.push({
+      key: "BBox",
+      value: "[" + pattern.boundingBox.map(hpf).join(" ") + "]"
+    });
+    options.push({ key: "XStep", value: hpf(pattern.xStep) });
+    options.push({ key: "YStep", value: hpf(pattern.yStep) });
+    options.push({ key: "Resources", value: resourcesObjectId + " 0 R" });
+    if (pattern.matrix) {
+      options.push({
+        key: "Matrix",
+        value: "[" + pattern.matrix.toString() + "]"
+      });
+    }
+
+    putStream({
+      data: pattern.stream,
+      additionalKeyValues: options,
+      objectId: pattern.objectNumber
+    });
+    out("endobj");
+  };
+
+  var putPatterns = function(deferredResourceDictionaryIds) {
+    var patternKey;
+    for (patternKey in patterns) {
+      if (patterns.hasOwnProperty(patternKey)) {
+        if (patterns[patternKey] instanceof ShadingPattern) {
+          putShadingPattern(patterns[patternKey]);
+        } else if (patterns[patternKey] instanceof TilingPattern) {
+          putTilingPattern(patterns[patternKey], deferredResourceDictionaryIds);
+        }
+      }
+    }
+  };
+
+  var putGState = function(gState) {
+    gState.objectNumber = newObject();
+    out("<<");
+    for (var p in gState) {
+      switch (p) {
+        case "opacity":
+          out("/ca " + f2(gState[p]));
+          break;
+        case "stroke-opacity":
+          out("/CA " + f2(gState[p]));
+          break;
+      }
+    }
+    out(">>");
+    out("endobj");
+  };
+
+  var putGStates = function() {
+    var gStateKey;
+    for (gStateKey in gStates) {
+      if (gStates.hasOwnProperty(gStateKey)) {
+        putGState(gStates[gStateKey]);
+      }
+    }
+  };
+
+  var putXobjectDict = function() {
+    out("/XObject <<");
+    for (var xObjectKey in renderTargets) {
+      if (
+        renderTargets.hasOwnProperty(xObjectKey) &&
+        renderTargets[xObjectKey].objectNumber >= 0
+      ) {
+        out(
+          "/" +
+            xObjectKey +
+            " " +
+            renderTargets[xObjectKey].objectNumber +
+            " 0 R"
+        );
+      }
+    }
+
+    // Loop through images, or other data objects
+    events.publish("putXobjectDict");
+    out(">>");
+  };
+
+  var putEncryptionDict = function() {
+    encryption.oid = newObject();
+    out("<<");
+    out("/Filter /Standard");
+    out("/V " + encryption.v);
+    out("/R " + encryption.r);
+    out("/U <" + encryption.toHexString(encryption.U) + ">");
+    out("/O <" + encryption.toHexString(encryption.O) + ">");
+    out("/P " + encryption.P);
+    out(">>");
+    out("endobj");
+  };
+
+  var putFontDict = function() {
+    out("/Font <<");
+
+    for (var fontKey in fonts) {
+      if (fonts.hasOwnProperty(fontKey)) {
+        if (
+          putOnlyUsedFonts === false ||
+          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))
+        ) {
+          out("/" + fontKey + " " + fonts[fontKey].objectNumber + " 0 R");
+        }
+      }
+    }
+    out(">>");
+  };
+
+  var putShadingPatternDict = function() {
+    if (Object.keys(patterns).length > 0) {
+      out("/Shading <<");
+      for (var patternKey in patterns) {
+        if (
+          patterns.hasOwnProperty(patternKey) &&
+          patterns[patternKey] instanceof ShadingPattern &&
+          patterns[patternKey].objectNumber >= 0
+        ) {
+          out(
+            "/" + patternKey + " " + patterns[patternKey].objectNumber + " 0 R"
+          );
+        }
+      }
+
+      events.publish("putShadingPatternDict");
+      out(">>");
+    }
+  };
+
+  var putTilingPatternDict = function(objectOid) {
+    if (Object.keys(patterns).length > 0) {
+      out("/Pattern <<");
+      for (var patternKey in patterns) {
+        if (
+          patterns.hasOwnProperty(patternKey) &&
+          patterns[patternKey] instanceof API.TilingPattern &&
+          patterns[patternKey].objectNumber >= 0 &&
+          patterns[patternKey].objectNumber < objectOid // prevent cyclic dependencies
+        ) {
+          out(
+            "/" + patternKey + " " + patterns[patternKey].objectNumber + " 0 R"
+          );
+        }
+      }
+      events.publish("putTilingPatternDict");
+      out(">>");
+    }
+  };
+
+  var putGStatesDict = function() {
+    if (Object.keys(gStates).length > 0) {
+      var gStateKey;
+      out("/ExtGState <<");
+      for (gStateKey in gStates) {
+        if (
+          gStates.hasOwnProperty(gStateKey) &&
+          gStates[gStateKey].objectNumber >= 0
+        ) {
+          out("/" + gStateKey + " " + gStates[gStateKey].objectNumber + " 0 R");
+        }
+      }
+
+      events.publish("putGStateDict");
+      out(">>");
+    }
+  };
+
+  var putResourceDictionary = function(objectIds) {
+    newObjectDeferredBegin(objectIds.resourcesOid, true);
+    out("<<");
+    out("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]");
+    putFontDict();
+    putShadingPatternDict();
+    putTilingPatternDict(objectIds.objectOid);
+    putGStatesDict();
+    putXobjectDict();
+    out(">>");
+    out("endobj");
+  };
+
+  var putResources = function() {
+    // FormObjects, Patterns etc. might use other FormObjects/Patterns/Images
+    // which means their resource dictionaries must contain the already resolved
+    // object ids. For this reason we defer the serialization of the resource
+    // dicts until all objects have been serialized and have object ids.
+    //
+    // In order to prevent cyclic dependencies (which Adobe Reader doesn't like),
+    // we only put all oids that are smaller than the oid of the object the
+    // resource dict belongs to. This is correct behavior, since the streams
+    // may only use other objects that have already been defined and thus appear
+    // earlier in their respective collection.
+    // Currently, this only affects tiling patterns, but a (more) correct
+    // implementation of FormObjects would also define their own resource dicts.
+    var deferredResourceDictionaryIds = [];
+
+    putFonts();
+    putGStates();
+    putXObjects();
+    putPatterns(deferredResourceDictionaryIds);
+
+    events.publish("putResources");
+    deferredResourceDictionaryIds.forEach(putResourceDictionary);
+    putResourceDictionary({
+      resourcesOid: resourceDictionaryObjId,
+      objectOid: Number.MAX_SAFE_INTEGER // output all objects
+    });
+    events.publish("postPutResources");
+  };
+
+  var putAdditionalObjects = function() {
+    events.publish("putAdditionalObjects");
+    for (var i = 0; i < additionalObjects.length; i++) {
+      var obj = additionalObjects[i];
+      newObjectDeferredBegin(obj.objId, true);
+      out(obj.content);
+      out("endobj");
+    }
+    events.publish("postPutAdditionalObjects");
+  };
+
+  var addFontToFontDictionary = function(font) {
+    fontmap[font.fontName] = fontmap[font.fontName] || {};
+    fontmap[font.fontName][font.fontStyle] = font.id;
+  };
+
+  var addFont = function(
+    postScriptName,
+    fontName,
+    fontStyle,
+    encoding,
+    isStandardFont
+  ) {
+    var font = {
+      id: "F" + (Object.keys(fonts).length + 1).toString(10),
+      postScriptName: postScriptName,
+      fontName: fontName,
+      fontStyle: fontStyle,
+      encoding: encoding,
+      isStandardFont: isStandardFont || false,
+      metadata: {}
+    };
+
+    events.publish("addFont", {
+      font: font,
+      instance: this
+    });
+
+    fonts[font.id] = font;
+    addFontToFontDictionary(font);
+    return font.id;
+  };
+
+  var addFonts = function(arrayOfFonts) {
+    for (var i = 0, l = standardFonts.length; i < l; i++) {
+      var fontKey = addFont.call(
+        this,
+        arrayOfFonts[i][0],
+        arrayOfFonts[i][1],
+        arrayOfFonts[i][2],
+        standardFonts[i][3],
+        true
+      );
+
+      if (putOnlyUsedFonts === false) {
+        usedFonts[fontKey] = true;
+      }
+      // adding aliases for standard fonts, this time matching the capitalization
+      var parts = arrayOfFonts[i][0].split("-");
+      addFontToFontDictionary({
+        id: fontKey,
+        fontName: parts[0],
+        fontStyle: parts[1] || ""
+      });
+    }
+    events.publish("addFonts", {
+      fonts: fonts,
+      dictionary: fontmap
+    });
+  };
+
+  var SAFE = function __safeCall(fn) {
+    fn.foo = function __safeCallWrapper() {
+      try {
+        return fn.apply(this, arguments);
+      } catch (e) {
+        var stack = e.stack || "";
+        if (~stack.indexOf(" at ")) stack = stack.split(" at ")[1];
+        var m =
+          "Error in function " +
+          stack.split("\n")[0].split("<")[0] +
+          ": " +
+          e.message;
+        if (globalObject.console) {
+          globalObject.console.error(m, e);
+          if (globalObject.alert) alert(m);
+        } else {
+          throw new Error(m);
+        }
+      }
+    };
+    fn.foo.bar = fn;
+    return fn.foo;
+  };
+
+  var to8bitStream = function(text, flags) {
+    /**
+     * PDF 1.3 spec:
+     * "For text strings encoded in Unicode, the first two bytes must be 254 followed by
+     * 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts
+     * with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely
+     * to be a meaningful beginning of a word or phrase.) The remainder of the
+     * string consists of Unicode character codes, according to the UTF-16 encoding
+     * specified in the Unicode standard, version 2.0. Commonly used Unicode values
+     * are represented as 2 bytes per character, with the high-order byte appearing first
+     * in the string."
+     *
+     * In other words, if there are chars in a string with char code above 255, we
+     * recode the string to UCS2 BE - string doubles in length and BOM is prepended.
+     *
+     * HOWEVER!
+     * Actual *content* (body) text (as opposed to strings used in document properties etc)
+     * does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)
+     *
+     * Because of Adobe's focus on "you subset your fonts!" you are not supposed to have
+     * a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could
+     * fudge it with "Identity-H" encoding and custom CIDtoGID map that mimics Unicode
+     * code page. There, however, all characters in the stream are treated as GIDs,
+     * including BOM, which is the reason we need to skip BOM in content text (i.e. that
+     * that is tied to a font).
+     *
+     * To signal this "special" PDFEscape / to8bitStream handling mode,
+     * API.text() function sets (unless you overwrite it with manual values
+     * given to API.text(.., flags) )
+     * flags.autoencode = true
+     * flags.noBOM = true
+     *
+     * ===================================================================================
+     * `flags` properties relied upon:
+     *   .sourceEncoding = string with encoding label.
+     *                     "Unicode" by default. = encoding of the incoming text.
+     *                     pass some non-existing encoding name
+     *                     (ex: 'Do not touch my strings! I know what I am doing.')
+     *                     to make encoding code skip the encoding step.
+     *   .outputEncoding = Either valid PDF encoding name
+     *                     (must be supported by jsPDF font metrics, otherwise no encoding)
+     *                     or a JS object, where key = sourceCharCode, value = outputCharCode
+     *                     missing keys will be treated as: sourceCharCode === outputCharCode
+     *   .noBOM
+     *       See comment higher above for explanation for why this is important
+     *   .autoencode
+     *       See comment higher above for explanation for why this is important
+     */
+
+    var i,
+      l,
+      sourceEncoding,
+      encodingBlock,
+      outputEncoding,
+      newtext,
+      isUnicode,
+      ch,
+      bch;
+
+    flags = flags || {};
+    sourceEncoding = flags.sourceEncoding || "Unicode";
+    outputEncoding = flags.outputEncoding;
+
+    // This 'encoding' section relies on font metrics format
+    // attached to font objects by, among others,
+    // "Willow Systems' standard_font_metrics plugin"
+    // see jspdf.plugin.standard_font_metrics.js for format
+    // of the font.metadata.encoding Object.
+    // It should be something like
+    //   .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}
+    //   .widths = {0:width, code:width, ..., 'fof':divisor}
+    //   .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}
+    if (
+      (flags.autoencode || outputEncoding) &&
+      fonts[activeFontKey].metadata &&
+      fonts[activeFontKey].metadata[sourceEncoding] &&
+      fonts[activeFontKey].metadata[sourceEncoding].encoding
+    ) {
+      encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding;
+
+      // each font has default encoding. Some have it clearly defined.
+      if (!outputEncoding && fonts[activeFontKey].encoding) {
+        outputEncoding = fonts[activeFontKey].encoding;
+      }
+
+      // Hmmm, the above did not work? Let's try again, in different place.
+      if (!outputEncoding && encodingBlock.codePages) {
+        outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default
+      }
+
+      if (typeof outputEncoding === "string") {
+        outputEncoding = encodingBlock[outputEncoding];
+      }
+      // we want output encoding to be a JS Object, where
+      // key = sourceEncoding's character code and
+      // value = outputEncoding's character code.
+      if (outputEncoding) {
+        isUnicode = false;
+        newtext = [];
+        for (i = 0, l = text.length; i < l; i++) {
+          ch = outputEncoding[text.charCodeAt(i)];
+          if (ch) {
+            newtext.push(String.fromCharCode(ch));
+          } else {
+            newtext.push(text[i]);
+          }
+
+          // since we are looping over chars anyway, might as well
+          // check for residual unicodeness
+          if (newtext[i].charCodeAt(0) >> 8) {
+            /* more than 255 */
+            isUnicode = true;
+          }
+        }
+        text = newtext.join("");
+      }
+    }
+
+    i = text.length;
+    // isUnicode may be set to false above. Hence the triple-equal to undefined
+    while (isUnicode === undefined && i !== 0) {
+      if (text.charCodeAt(i - 1) >> 8) {
+        /* more than 255 */
+        isUnicode = true;
+      }
+      i--;
+    }
+    if (!isUnicode) {
+      return text;
+    }
+
+    newtext = flags.noBOM ? [] : [254, 255];
+    for (i = 0, l = text.length; i < l; i++) {
+      ch = text.charCodeAt(i);
+      bch = ch >> 8; // divide by 256
+      if (bch >> 8) {
+        /* something left after dividing by 256 second time */
+        throw new Error(
+          "Character at position " +
+            i +
+            " of string '" +
+            text +
+            "' exceeds 16bits. Cannot be encoded into UCS-2 BE"
+        );
+      }
+      newtext.push(bch);
+      newtext.push(ch - (bch << 8));
+    }
+    return String.fromCharCode.apply(undefined, newtext);
+  };
+
+  var pdfEscape = (API.__private__.pdfEscape = API.pdfEscape = function(
+    text,
+    flags
+  ) {
+    /**
+     * Replace '/', '(', and ')' with pdf-safe versions
+     *
+     * Doing to8bitStream does NOT make this PDF display unicode text. For that
+     * we also need to reference a unicode font and embed it - royal pain in the rear.
+     *
+     * There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,
+     * which JavaScript Strings are happy to provide. So, while we still cannot display
+     * 2-byte characters property, at least CONDITIONALLY converting (entire string containing)
+     * 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF
+     * is still parseable.
+     * This will allow immediate support for unicode in document properties strings.
+     */
+    return to8bitStream(text, flags)
+      .replace(/\\/g, "\\\\")
+      .replace(/\(/g, "\\(")
+      .replace(/\)/g, "\\)");
+  });
+
+  var beginPage = (API.__private__.beginPage = function(format) {
+    pages[++page] = [];
+    pagesContext[page] = {
+      objId: 0,
+      contentsObjId: 0,
+      userUnit: Number(userUnit),
+      artBox: null,
+      bleedBox: null,
+      cropBox: null,
+      trimBox: null,
+      mediaBox: {
+        bottomLeftX: 0,
+        bottomLeftY: 0,
+        topRightX: Number(format[0]),
+        topRightY: Number(format[1])
+      }
+    };
+    _setPage(page);
+    setOutputDestination(pages[currentPage]);
+  });
+
+  var _addPage = function(parmFormat, parmOrientation) {
+    var dimensions, width, height;
+
+    orientation = parmOrientation || orientation;
+
+    if (typeof parmFormat === "string") {
+      dimensions = getPageFormat(parmFormat.toLowerCase());
+      if (Array.isArray(dimensions)) {
+        width = dimensions[0];
+        height = dimensions[1];
+      }
+    }
+
+    if (Array.isArray(parmFormat)) {
+      width = parmFormat[0] * scaleFactor;
+      height = parmFormat[1] * scaleFactor;
+    }
+
+    if (isNaN(width)) {
+      width = format[0];
+      height = format[1];
+    }
+
+    if (width > 14400 || height > 14400) {
+      console.warn(
+        "A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"
+      );
+      width = Math.min(14400, width);
+      height = Math.min(14400, height);
+    }
+
+    format = [width, height];
+
+    switch (orientation.substr(0, 1)) {
+      case "l":
+        if (height > width) {
+          format = [height, width];
+        }
+        break;
+      case "p":
+        if (width > height) {
+          format = [height, width];
+        }
+        break;
+    }
+
+    beginPage(format);
+
+    // Set line width
+    setLineWidth(lineWidth);
+    // Set draw color
+    out(strokeColor);
+    // resurrecting non-default line caps, joins
+    if (lineCapID !== 0) {
+      out(lineCapID + " J");
+    }
+    if (lineJoinID !== 0) {
+      out(lineJoinID + " j");
+    }
+    events.publish("addPage", {
+      pageNumber: page
+    });
+  };
+
+  var _deletePage = function(n) {
+    if (n > 0 && n <= page) {
+      pages.splice(n, 1);
+      pagesContext.splice(n, 1);
+      page--;
+      if (currentPage > page) {
+        currentPage = page;
+      }
+      this.setPage(currentPage);
+    }
+  };
+
+  var _setPage = function(n) {
+    if (n > 0 && n <= page) {
+      currentPage = n;
+    }
+  };
+
+  var getNumberOfPages = (API.__private__.getNumberOfPages = API.getNumberOfPages = function() {
+    return pages.length - 1;
+  });
+
+  /**
+   * Returns a document-specific font key - a label assigned to a
+   * font name + font type combination at the time the font was added
+   * to the font inventory.
+   *
+   * Font key is used as label for the desired font for a block of text
+   * to be added to the PDF document stream.
+   * @private
+   * @function
+   * @param fontName {string} can be undefined on "falthy" to indicate "use current"
+   * @param fontStyle {string} can be undefined on "falthy" to indicate "use current"
+   * @returns {string} Font key.
+   * @ignore
+   */
+  var getFont = function(fontName, fontStyle, options) {
+    var key = undefined,
+      fontNameLowerCase;
+    options = options || {};
+
+    fontName =
+      fontName !== undefined ? fontName : fonts[activeFontKey].fontName;
+    fontStyle =
+      fontStyle !== undefined ? fontStyle : fonts[activeFontKey].fontStyle;
+    fontNameLowerCase = fontName.toLowerCase();
+
+    if (
+      fontmap[fontNameLowerCase] !== undefined &&
+      fontmap[fontNameLowerCase][fontStyle] !== undefined
+    ) {
+      key = fontmap[fontNameLowerCase][fontStyle];
+    } else if (
+      fontmap[fontName] !== undefined &&
+      fontmap[fontName][fontStyle] !== undefined
+    ) {
+      key = fontmap[fontName][fontStyle];
+    } else {
+      if (options.disableWarning === false) {
+        console.warn(
+          "Unable to look up font label for font '" +
+            fontName +
+            "', '" +
+            fontStyle +
+            "'. Refer to getFontList() for available fonts."
+        );
+      }
+    }
+
+    if (!key && !options.noFallback) {
+      key = fontmap["times"][fontStyle];
+      if (key == null) {
+        key = fontmap["times"]["normal"];
+      }
+    }
+    return key;
+  };
+
+  var putInfo = (API.__private__.putInfo = function() {
+    var objectId = newObject();
+    var encryptor = function(data) {
+      return data;
+    };
+    if (encryptionOptions !== null) {
+      encryptor = encryption.encryptor(objectId, 0);
+    }
+    out("<<");
+    out("/Producer (" + pdfEscape(encryptor("jsPDF " + jsPDF.version)) + ")");
+    for (var key in documentProperties) {
+      if (documentProperties.hasOwnProperty(key) && documentProperties[key]) {
+        out(
+          "/" +
+            key.substr(0, 1).toUpperCase() +
+            key.substr(1) +
+            " (" +
+            pdfEscape(encryptor(documentProperties[key])) +
+            ")"
+        );
+      }
+    }
+    out("/CreationDate (" + pdfEscape(encryptor(creationDate)) + ")");
+    out(">>");
+    out("endobj");
+  });
+
+  var putCatalog = (API.__private__.putCatalog = function(options) {
+    options = options || {};
+    var tmpRootDictionaryObjId =
+      options.rootDictionaryObjId || rootDictionaryObjId;
+    newObject();
+    out("<<");
+    out("/Type /Catalog");
+    out("/Pages " + tmpRootDictionaryObjId + " 0 R");
+    // PDF13ref Section 7.2.1
+    if (!zoomMode) zoomMode = "fullwidth";
+    switch (zoomMode) {
+      case "fullwidth":
+        out("/OpenAction [3 0 R /FitH null]");
+        break;
+      case "fullheight":
+        out("/OpenAction [3 0 R /FitV null]");
+        break;
+      case "fullpage":
+        out("/OpenAction [3 0 R /Fit]");
+        break;
+      case "original":
+        out("/OpenAction [3 0 R /XYZ null null 1]");
+        break;
+      default:
+        var pcn = "" + zoomMode;
+        if (pcn.substr(pcn.length - 1) === "%")
+          zoomMode = parseInt(zoomMode) / 100;
+        if (typeof zoomMode === "number") {
+          out("/OpenAction [3 0 R /XYZ null null " + f2(zoomMode) + "]");
+        }
+    }
+    if (!layoutMode) layoutMode = "continuous";
+    switch (layoutMode) {
+      case "continuous":
+        out("/PageLayout /OneColumn");
+        break;
+      case "single":
+        out("/PageLayout /SinglePage");
+        break;
+      case "two":
+      case "twoleft":
+        out("/PageLayout /TwoColumnLeft");
+        break;
+      case "tworight":
+        out("/PageLayout /TwoColumnRight");
+        break;
+    }
+    if (pageMode) {
+      /**
+       * A name object specifying how the document should be displayed when opened:
+       * UseNone      : Neither document outline nor thumbnail images visible -- DEFAULT
+       * UseOutlines  : Document outline visible
+       * UseThumbs    : Thumbnail images visible
+       * FullScreen   : Full-screen mode, with no menu bar, window controls, or any other window visible
+       */
+      out("/PageMode /" + pageMode);
+    }
+    events.publish("putCatalog");
+    out(">>");
+    out("endobj");
+  });
+
+  var putTrailer = (API.__private__.putTrailer = function() {
+    out("trailer");
+    out("<<");
+    out("/Size " + (objectNumber + 1));
+    // Root and Info must be the last and second last objects written respectively
+    out("/Root " + objectNumber + " 0 R");
+    out("/Info " + (objectNumber - 1) + " 0 R");
+    if (encryptionOptions !== null) {
+      out("/Encrypt " + encryption.oid + " 0 R");
+    }
+    out("/ID [ <" + fileId + "> <" + fileId + "> ]");
+    out(">>");
+  });
+
+  var putHeader = (API.__private__.putHeader = function() {
+    out("%PDF-" + pdfVersion);
+    out("%\xBA\xDF\xAC\xE0");
+  });
+
+  var putXRef = (API.__private__.putXRef = function() {
+    var p = "0000000000";
+
+    out("xref");
+    out("0 " + (objectNumber + 1));
+    out("0000000000 65535 f ");
+    for (var i = 1; i <= objectNumber; i++) {
+      var offset = offsets[i];
+      if (typeof offset === "function") {
+        out((p + offsets[i]()).slice(-10) + " 00000 n ");
+      } else {
+        if (typeof offsets[i] !== "undefined") {
+          out((p + offsets[i]).slice(-10) + " 00000 n ");
+        } else {
+          out("0000000000 00000 n ");
+        }
+      }
+    }
+  });
+
+  var buildDocument = (API.__private__.buildDocument = function() {
+    resetDocument();
+    setOutputDestination(content);
+
+    events.publish("buildDocument");
+
+    putHeader();
+    putPages();
+    putAdditionalObjects();
+    putResources();
+    if (encryptionOptions !== null) putEncryptionDict();
+    putInfo();
+    putCatalog();
+
+    var offsetOfXRef = contentLength;
+    putXRef();
+    putTrailer();
+    out("startxref");
+    out("" + offsetOfXRef);
+    out("%%EOF");
+
+    setOutputDestination(pages[currentPage]);
+
+    return content.join("\n");
+  });
+
+  var getBlob = (API.__private__.getBlob = function(data) {
+    return new Blob([getArrayBuffer(data)], {
+      type: "application/pdf"
+    });
+  });
+
+  /**
+   * Generates the PDF document.
+   *
+   * If `type` argument is undefined, output is raw body of resulting PDF returned as a string.
+   *
+   * @param {string} type A string identifying one of the possible output types.<br/>
+   *                      Possible values are: <br/>
+   *                          'arraybuffer' -> (ArrayBuffer)<br/>
+   *                          'blob' -> (Blob)<br/>
+   *                          'bloburi'/'bloburl' -> (string)<br/>
+   *                          'datauristring'/'dataurlstring' -> (string)<br/>
+   *                          'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>
+   *                          'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>
+   *                          'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>
+   *                          'pdfjsnewwindow' -> (wind | null)
+   * @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>
+   *                                Possible options are 'filename'.<br/>
+   *                                A string can be passed instead of {filename:string} and defaults to 'generated.pdf'
+   * @function
+   * @instance
+   * @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}
+   * @memberof jsPDF#
+   * @name output
+   */
+  var output = (API.output = API.__private__.output = SAFE(function output(
+    type,
+    options
+  ) {
+    options = options || {};
+
+    if (typeof options === "string") {
+      options = {
+        filename: options
+      };
+    } else {
+      options.filename = options.filename || "generated.pdf";
+    }
+
+    switch (type) {
+      case undefined:
+        return buildDocument();
+      case "save":
+        API.save(options.filename);
+        break;
+      case "arraybuffer":
+        return getArrayBuffer(buildDocument());
+      case "blob":
+        return getBlob(buildDocument());
+      case "bloburi":
+      case "bloburl":
+        // Developer is responsible of calling revokeObjectURL
+        if (
+          typeof globalObject.URL !== "undefined" &&
+          typeof globalObject.URL.createObjectURL === "function"
+        ) {
+          return (
+            (globalObject.URL &&
+              globalObject.URL.createObjectURL(getBlob(buildDocument()))) ||
+            void 0
+          );
+        } else {
+          console.warn(
+            "bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser."
+          );
+        }
+        break;
+      case "datauristring":
+      case "dataurlstring":
+        var dataURI = "";
+        var pdfDocument = buildDocument();
+        try {
+          dataURI = btoa(pdfDocument);
+        } catch (e) {
+          dataURI = btoa(unescape(encodeURIComponent(pdfDocument)));
+        }
+        return (
+          "data:application/pdf;filename=" +
+          options.filename +
+          ";base64," +
+          dataURI
+        );
+      case "pdfobjectnewwindow":
+        if (
+          Object.prototype.toString.call(globalObject) === "[object Window]"
+        ) {
+          var pdfObjectUrl =
+            "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js";
+          var integrity =
+            ' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';
+
+          if (options.pdfObjectUrl) {
+            pdfObjectUrl = options.pdfObjectUrl;
+            integrity = "";
+          }
+
+          var htmlForNewWindow =
+            "<html>" +
+            '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="' +
+            pdfObjectUrl +
+            '"' +
+            integrity +
+            '></script><script >PDFObject.embed("' +
+            this.output("dataurlstring") +
+            '", ' +
+            JSON.stringify(options) +
+            ");</script></body></html>";
+          var nW = globalObject.open();
+
+          if (nW !== null) {
+            nW.document.write(htmlForNewWindow);
+          }
+          return nW;
+        } else {
+          throw new Error(
+            "The option pdfobjectnewwindow just works in a browser-environment."
+          );
+        }
+      case "pdfjsnewwindow":
+        if (
+          Object.prototype.toString.call(globalObject) === "[object Window]"
+        ) {
+          var pdfJsUrl = options.pdfJsUrl || "examples/PDF.js/web/viewer.html";
+          var htmlForPDFjsNewWindow =
+            "<html>" +
+            "<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>" +
+            '<body><iframe id="pdfViewer" src="' +
+            pdfJsUrl +
+            "?file=&downloadName=" +
+            options.filename +
+            '" width="500px" height="400px" />' +
+            "</body></html>";
+          var PDFjsNewWindow = globalObject.open();
+
+          if (PDFjsNewWindow !== null) {
+            PDFjsNewWindow.document.write(htmlForPDFjsNewWindow);
+            var scope = this;
+            PDFjsNewWindow.document.documentElement.querySelector(
+              "#pdfViewer"
+            ).onload = function() {
+              PDFjsNewWindow.document.title = options.filename;
+              PDFjsNewWindow.document.documentElement
+                .querySelector("#pdfViewer")
+                .contentWindow.PDFViewerApplication.open(
+                  scope.output("bloburl")
+                );
+            };
+          }
+          return PDFjsNewWindow;
+        } else {
+          throw new Error(
+            "The option pdfjsnewwindow just works in a browser-environment."
+          );
+        }
+      case "dataurlnewwindow":
+        if (
+          Object.prototype.toString.call(globalObject) === "[object Window]"
+        ) {
+          var htmlForDataURLNewWindow =
+            "<html>" +
+            "<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>" +
+            "<body>" +
+            '<iframe src="' +
+            this.output("datauristring", options) +
+            '"></iframe>' +
+            "</body></html>";
+          var dataURLNewWindow = globalObject.open();
+          if (dataURLNewWindow !== null) {
+            dataURLNewWindow.document.write(htmlForDataURLNewWindow);
+            dataURLNewWindow.document.title = options.filename;
+          }
+          if (dataURLNewWindow || typeof safari === "undefined")
+            return dataURLNewWindow;
+        } else {
+          throw new Error(
+            "The option dataurlnewwindow just works in a browser-environment."
+          );
+        }
+        break;
+      case "datauri":
+      case "dataurl":
+        return (globalObject.document.location.href = this.output(
+          "datauristring",
+          options
+        ));
+      default:
+        return null;
+    }
+  }));
+
+  /**
+   * Used to see if a supplied hotfix was requested when the pdf instance was created.
+   * @param {string} hotfixName - The name of the hotfix to check.
+   * @returns {boolean}
+   */
+  var hasHotfix = function(hotfixName) {
+    return (
+      Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1
+    );
+  };
+
+  switch (unit) {
+    case "pt":
+      scaleFactor = 1;
+      break;
+    case "mm":
+      scaleFactor = 72 / 25.4;
+      break;
+    case "cm":
+      scaleFactor = 72 / 2.54;
+      break;
+    case "in":
+      scaleFactor = 72;
+      break;
+    case "px":
+      if (hasHotfix("px_scaling") == true) {
+        scaleFactor = 72 / 96;
+      } else {
+        scaleFactor = 96 / 72;
+      }
+      break;
+    case "pc":
+      scaleFactor = 12;
+      break;
+    case "em":
+      scaleFactor = 12;
+      break;
+    case "ex":
+      scaleFactor = 6;
+      break;
+    default:
+      if (typeof unit === "number") {
+        scaleFactor = unit;
+      } else {
+        throw new Error("Invalid unit: " + unit);
+      }
+  }
+
+  var encryption = null;
+  setCreationDate();
+  setFileId();
+
+  var getEncryptor = function(objectId) {
+    if (encryptionOptions !== null) {
+      return encryption.encryptor(objectId, 0);
+    }
+    return function(data) {
+      return data;
+    };
+  };
+
+  //---------------------------------------
+  // Public API
+
+  var getPageInfo = (API.__private__.getPageInfo = API.getPageInfo = function(
+    pageNumberOneBased
+  ) {
+    if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {
+      throw new Error("Invalid argument passed to jsPDF.getPageInfo");
+    }
+    var objId = pagesContext[pageNumberOneBased].objId;
+    return {
+      objId: objId,
+      pageNumber: pageNumberOneBased,
+      pageContext: pagesContext[pageNumberOneBased]
+    };
+  });
+
+  var getPageInfoByObjId = (API.__private__.getPageInfoByObjId = function(
+    objId
+  ) {
+    if (isNaN(objId) || objId % 1 !== 0) {
+      throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");
+    }
+    for (var pageNumber in pagesContext) {
+      if (pagesContext[pageNumber].objId === objId) {
+        break;
+      }
+    }
+    return getPageInfo(pageNumber);
+  });
+
+  var getCurrentPageInfo = (API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function() {
+    return {
+      objId: pagesContext[currentPage].objId,
+      pageNumber: currentPage,
+      pageContext: pagesContext[currentPage]
+    };
+  });
+
+  /**
+   * Adds (and transfers the focus to) new page to the PDF document.
+   * @param format {String/Array} The format of the new page. Can be: <ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />
+   * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
+   * @param orientation {string} Orientation of the new page. Possible values are "portrait" or "landscape" (or shortcuts "p" (Default), "l").
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   *
+   * @memberof jsPDF#
+   * @name addPage
+   */
+  API.addPage = function() {
+    _addPage.apply(this, arguments);
+    return this;
+  };
+  /**
+   * Adds (and transfers the focus to) new page to the PDF document.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   *
+   * @memberof jsPDF#
+   * @name setPage
+   * @param {number} page Switch the active page to the page number specified (indexed starting at 1).
+   * @example
+   * doc = jsPDF()
+   * doc.addPage()
+   * doc.addPage()
+   * doc.text('I am on page 3', 10, 10)
+   * doc.setPage(1)
+   * doc.text('I am on page 1', 10, 10)
+   */
+  API.setPage = function() {
+    _setPage.apply(this, arguments);
+    setOutputDestination.call(this, pages[currentPage]);
+    return this;
+  };
+
+  /**
+   * @name insertPage
+   * @memberof jsPDF#
+   *
+   * @function
+   * @instance
+   * @param {Object} beforePage
+   * @returns {jsPDF}
+   */
+  API.insertPage = function(beforePage) {
+    this.addPage();
+    this.movePage(currentPage, beforePage);
+    return this;
+  };
+
+  /**
+   * @name movePage
+   * @memberof jsPDF#
+   * @function
+   * @instance
+   * @param {number} targetPage
+   * @param {number} beforePage
+   * @returns {jsPDF}
+   */
+  API.movePage = function(targetPage, beforePage) {
+    var tmpPages, tmpPagesContext;
+    if (targetPage > beforePage) {
+      tmpPages = pages[targetPage];
+      tmpPagesContext = pagesContext[targetPage];
+      for (var i = targetPage; i > beforePage; i--) {
+        pages[i] = pages[i - 1];
+        pagesContext[i] = pagesContext[i - 1];
+      }
+      pages[beforePage] = tmpPages;
+      pagesContext[beforePage] = tmpPagesContext;
+      this.setPage(beforePage);
+    } else if (targetPage < beforePage) {
+      tmpPages = pages[targetPage];
+      tmpPagesContext = pagesContext[targetPage];
+      for (var j = targetPage; j < beforePage; j++) {
+        pages[j] = pages[j + 1];
+        pagesContext[j] = pagesContext[j + 1];
+      }
+      pages[beforePage] = tmpPages;
+      pagesContext[beforePage] = tmpPagesContext;
+      this.setPage(beforePage);
+    }
+    return this;
+  };
+
+  /**
+   * Deletes a page from the PDF.
+   * @name deletePage
+   * @memberof jsPDF#
+   * @function
+   * @param {number} targetPage
+   * @instance
+   * @returns {jsPDF}
+   */
+  API.deletePage = function() {
+    _deletePage.apply(this, arguments);
+    return this;
+  };
+
+  /**
+   * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.
+   *
+   * @function
+   * @instance
+   * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+   * @param {Object} [options] - Collection of settings signaling how the text must be encoded.
+   * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.
+   * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging
+   * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.
+   * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.
+   * @param {number} [options.charSpace=0] - The space between each letter.
+   * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.
+   * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.
+   * @param {Object} [options.flags] - Flags for to8bitStream.
+   * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.
+   * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.
+   * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.
+   * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.
+   * @param {boolean} [options.isInputVisual] - Option for the BidiEngine
+   * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine
+   * @param {boolean} [options.isInputRtl] - Option for the BidiEngine
+   * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine
+   * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine
+   * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.
+   *
+   * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing
+   * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this
+   * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a
+   * DIFFERENT result. A matrix is only allowed in "advanced" API mode.
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name text
+   */
+  API.__private__.text = API.text = function(text, x, y, options, transform) {
+    /*
+     * Inserts something like this into PDF
+     *   BT
+     *    /F1 16 Tf  % Font name + size
+     *    16 TL % How many units down for next line in multiline text
+     *    0 g % color
+     *    28.35 813.54 Td % position
+     *    (line one) Tj
+     *    T* (line two) Tj
+     *    T* (line three) Tj
+     *   ET
+     */
+    options = options || {};
+    var scope = options.scope || this;
+    var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale;
+
+    // Pre-August-2012 the order of arguments was function(x, y, text, flags)
+    // in effort to make all calls have similar signature like
+    //   function(data, coordinates... , miscellaneous)
+    // this method had its args flipped.
+    // code below allows backward compatibility with old arg order.
+    if (
+      typeof text === "number" &&
+      typeof x === "number" &&
+      (typeof y === "string" || Array.isArray(y))
+    ) {
+      var tmp = y;
+      y = x;
+      x = text;
+      text = tmp;
+    }
+
+    var transformationMatrix;
+
+    if (arguments[3] instanceof Matrix === false) {
+      flags = arguments[3];
+      angle = arguments[4];
+      align = arguments[5];
+
+      if (typeof flags !== "object" || flags === null) {
+        if (typeof angle === "string") {
+          align = angle;
+          angle = null;
+        }
+        if (typeof flags === "string") {
+          align = flags;
+          flags = null;
+        }
+        if (typeof flags === "number") {
+          angle = flags;
+          flags = null;
+        }
+        options = {
+          flags: flags,
+          angle: angle,
+          align: align
+        };
+      }
+    } else {
+      advancedApiModeTrap(
+        "The transform parameter of text() with a Matrix value"
+      );
+      transformationMatrix = transform;
+    }
+
+    if (isNaN(x) || isNaN(y) || typeof text === "undefined" || text === null) {
+      throw new Error("Invalid arguments passed to jsPDF.text");
+    }
+
+    if (text.length === 0) {
+      return scope;
+    }
+
+    var xtra = "";
+    var isHex = false;
+    var lineHeight =
+      typeof options.lineHeightFactor === "number"
+        ? options.lineHeightFactor
+        : lineHeightFactor;
+    var scaleFactor = scope.internal.scaleFactor;
+
+    function ESC(s) {
+      s = s.split("\t").join(Array(options.TabLen || 9).join(" "));
+      return pdfEscape(s, flags);
+    }
+
+    function transformTextToSpecialArray(text) {
+      //we don't want to destroy original text array, so cloning it
+      var sa = text.concat();
+      var da = [];
+      var len = sa.length;
+      var curDa;
+      //we do array.join('text that must not be PDFescaped")
+      //thus, pdfEscape each component separately
+      while (len--) {
+        curDa = sa.shift();
+        if (typeof curDa === "string") {
+          da.push(curDa);
+        } else {
+          if (
+            Array.isArray(text) &&
+            (curDa.length === 1 ||
+              (curDa[1] === undefined && curDa[2] === undefined))
+          ) {
+            da.push(curDa[0]);
+          } else {
+            da.push([curDa[0], curDa[1], curDa[2]]);
+          }
+        }
+      }
+      return da;
+    }
+
+    function processTextByFunction(text, processingFunction) {
+      var result;
+      if (typeof text === "string") {
+        result = processingFunction(text)[0];
+      } else if (Array.isArray(text)) {
+        //we don't want to destroy original text array, so cloning it
+        var sa = text.concat();
+        var da = [];
+        var len = sa.length;
+        var curDa;
+        var tmpResult;
+        //we do array.join('text that must not be PDFescaped")
+        //thus, pdfEscape each component separately
+        while (len--) {
+          curDa = sa.shift();
+          if (typeof curDa === "string") {
+            da.push(processingFunction(curDa)[0]);
+          } else if (Array.isArray(curDa) && typeof curDa[0] === "string") {
+            tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);
+            da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);
+          }
+        }
+        result = da;
+      }
+      return result;
+    }
+
+    //Check if text is of type String
+    var textIsOfTypeString = false;
+    var tmpTextIsOfTypeString = true;
+
+    if (typeof text === "string") {
+      textIsOfTypeString = true;
+    } else if (Array.isArray(text)) {
+      //we don't want to destroy original text array, so cloning it
+      var sa = text.concat();
+      da = [];
+      var len = sa.length;
+      var curDa;
+      //we do array.join('text that must not be PDFescaped")
+      //thus, pdfEscape each component separately
+      while (len--) {
+        curDa = sa.shift();
+        if (
+          typeof curDa !== "string" ||
+          (Array.isArray(curDa) && typeof curDa[0] !== "string")
+        ) {
+          tmpTextIsOfTypeString = false;
+        }
+      }
+      textIsOfTypeString = tmpTextIsOfTypeString;
+    }
+    if (textIsOfTypeString === false) {
+      throw new Error(
+        'Type of text must be string or Array. "' +
+          text +
+          '" is not recognized.'
+      );
+    }
+
+    //If there are any newlines in text, we assume
+    //the user wanted to print multiple lines, so break the
+    //text up into an array. If the text is already an array,
+    //we assume the user knows what they are doing.
+    //Convert text into an array anyway to simplify
+    //later code.
+
+    if (typeof text === "string") {
+      if (text.match(/[\r?\n]/)) {
+        text = text.split(/\r\n|\r|\n/g);
+      } else {
+        text = [text];
+      }
+    }
+
+    //baseline
+    var height = activeFontSize / scope.internal.scaleFactor;
+    var descent = height * (lineHeight - 1);
+
+    switch (options.baseline) {
+      case "bottom":
+        y -= descent;
+        break;
+      case "top":
+        y += height - descent;
+        break;
+      case "hanging":
+        y += height - 2 * descent;
+        break;
+      case "middle":
+        y += height / 2 - descent;
+        break;
+    }
+
+    //multiline
+    maxWidth = options.maxWidth || 0;
+
+    if (maxWidth > 0) {
+      if (typeof text === "string") {
+        text = scope.splitTextToSize(text, maxWidth);
+      } else if (Object.prototype.toString.call(text) === "[object Array]") {
+        text = text.reduce(function(acc, textLine) {
+          return acc.concat(scope.splitTextToSize(textLine, maxWidth));
+        }, []);
+      }
+    }
+
+    //creating Payload-Object to make text byRef
+    payload = {
+      text: text,
+      x: x,
+      y: y,
+      options: options,
+      mutex: {
+        pdfEscape: pdfEscape,
+        activeFontKey: activeFontKey,
+        fonts: fonts,
+        activeFontSize: activeFontSize
+      }
+    };
+    events.publish("preProcessText", payload);
+
+    text = payload.text;
+    options = payload.options;
+
+    //angle
+    angle = options.angle;
+
+    if (
+      transformationMatrix instanceof Matrix === false &&
+      angle &&
+      typeof angle === "number"
+    ) {
+      angle *= Math.PI / 180;
+
+      if (options.rotationDirection === 0) {
+        angle = -angle;
+      }
+
+      if (apiMode === ApiMode.ADVANCED) {
+        angle = -angle;
+      }
+
+      var c = Math.cos(angle);
+      var s = Math.sin(angle);
+      transformationMatrix = new Matrix(c, s, -s, c, 0, 0);
+    } else if (angle && angle instanceof Matrix) {
+      transformationMatrix = angle;
+    }
+
+    if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {
+      transformationMatrix = identityMatrix;
+    }
+
+    //charSpace
+
+    charSpace = options.charSpace || activeCharSpace;
+
+    if (typeof charSpace !== "undefined") {
+      xtra += hpf(scale(charSpace)) + " Tc\n";
+      this.setCharSpace(this.getCharSpace() || 0);
+    }
+
+    horizontalScale = options.horizontalScale;
+    if (typeof horizontalScale !== "undefined") {
+      xtra += hpf(horizontalScale * 100) + " Tz\n";
+    }
+
+    //lang
+
+    var lang = options.lang;
+
+    //renderingMode
+    var renderingMode = -1;
+    var parmRenderingMode =
+      typeof options.renderingMode !== "undefined"
+        ? options.renderingMode
+        : options.stroke;
+    var pageContext = scope.internal.getCurrentPageInfo().pageContext;
+
+    switch (parmRenderingMode) {
+      case 0:
+      case false:
+      case "fill":
+        renderingMode = 0;
+        break;
+      case 1:
+      case true:
+      case "stroke":
+        renderingMode = 1;
+        break;
+      case 2:
+      case "fillThenStroke":
+        renderingMode = 2;
+        break;
+      case 3:
+      case "invisible":
+        renderingMode = 3;
+        break;
+      case 4:
+      case "fillAndAddForClipping":
+        renderingMode = 4;
+        break;
+      case 5:
+      case "strokeAndAddPathForClipping":
+        renderingMode = 5;
+        break;
+      case 6:
+      case "fillThenStrokeAndAddToPathForClipping":
+        renderingMode = 6;
+        break;
+      case 7:
+      case "addToPathForClipping":
+        renderingMode = 7;
+        break;
+    }
+
+    var usedRenderingMode =
+      typeof pageContext.usedRenderingMode !== "undefined"
+        ? pageContext.usedRenderingMode
+        : -1;
+
+    //if the coder wrote it explicitly to use a specific
+    //renderingMode, then use it
+    if (renderingMode !== -1) {
+      xtra += renderingMode + " Tr\n";
+      //otherwise check if we used the rendering Mode already
+      //if so then set the rendering Mode...
+    } else if (usedRenderingMode !== -1) {
+      xtra += "0 Tr\n";
+    }
+
+    if (renderingMode !== -1) {
+      pageContext.usedRenderingMode = renderingMode;
+    }
+
+    //align
+    align = options.align || "left";
+    var leading = activeFontSize * lineHeight;
+    var pageWidth = scope.internal.pageSize.getWidth();
+    var activeFont = fonts[activeFontKey];
+    charSpace = options.charSpace || activeCharSpace;
+    maxWidth = options.maxWidth || 0;
+
+    var lineWidths;
+    flags = Object.assign({ autoencode: true, noBOM: true }, options.flags);
+
+    var wordSpacingPerLine = [];
+    var findWidth = function(v) {
+      return (
+        (scope.getStringUnitWidth(v, {
+          font: activeFont,
+          charSpace: charSpace,
+          fontSize: activeFontSize,
+          doKerning: false
+        }) *
+          activeFontSize) /
+        scaleFactor
+      );
+    };
+    if (Object.prototype.toString.call(text) === "[object Array]") {
+      da = transformTextToSpecialArray(text);
+      var newY;
+      if (align !== "left") {
+        lineWidths = da.map(findWidth);
+      }
+      //The first line uses the "main" Td setting,
+      //and the subsequent lines are offset by the
+      //previous line's x coordinate.
+      var prevWidth = 0;
+      var newX;
+      if (align === "right") {
+        //The passed in x coordinate defines the
+        //rightmost point of the text.
+        x -= lineWidths[0];
+        text = [];
+        len = da.length;
+        for (var i = 0; i < len; i++) {
+          if (i === 0) {
+            newX = getHorizontalCoordinate(x);
+            newY = getVerticalCoordinate(y);
+          } else {
+            newX = scale(prevWidth - lineWidths[i]);
+            newY = -leading;
+          }
+          text.push([da[i], newX, newY]);
+          prevWidth = lineWidths[i];
+        }
+      } else if (align === "center") {
+        //The passed in x coordinate defines
+        //the center point.
+        x -= lineWidths[0] / 2;
+        text = [];
+        len = da.length;
+        for (var j = 0; j < len; j++) {
+          if (j === 0) {
+            newX = getHorizontalCoordinate(x);
+            newY = getVerticalCoordinate(y);
+          } else {
+            newX = scale((prevWidth - lineWidths[j]) / 2);
+            newY = -leading;
+          }
+          text.push([da[j], newX, newY]);
+          prevWidth = lineWidths[j];
+        }
+      } else if (align === "left") {
+        text = [];
+        len = da.length;
+        for (var h = 0; h < len; h++) {
+          text.push(da[h]);
+        }
+      } else if (align === "justify" && activeFont.encoding === "Identity-H") {
+        // when using unicode fonts, wordSpacePerLine does not apply
+        text = [];
+        len = da.length;
+        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;
+        let backToStartX = 0;
+        for (var l = 0; l < len; l++) {
+          newY = l === 0 ? getVerticalCoordinate(y) : -leading;
+          newX = l === 0 ? getHorizontalCoordinate(x) : backToStartX;
+          if (l < len - 1) {
+            let spacing = scale(
+              (maxWidth - lineWidths[l]) / (da[l].split(" ").length - 1)
+            );
+            let words = da[l].split(" ");
+            text.push([words[0] + " ", newX, newY]);
+            backToStartX = 0; // distance to reset back to the left
+            for (let i = 1; i < words.length; i++) {
+              let shiftAmount =
+                (findWidth(words[i - 1] + " " + words[i]) -
+                  findWidth(words[i])) *
+                  scaleFactor +
+                spacing;
+              if (i == words.length - 1) text.push([words[i], shiftAmount, 0]);
+              else text.push([words[i] + " ", shiftAmount, 0]);
+              backToStartX -= shiftAmount;
+            }
+          } else {
+            text.push([da[l], newX, newY]);
+          }
+        }
+        text.push(["", backToStartX, 0]);
+      } else if (align === "justify") {
+        text = [];
+        len = da.length;
+        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;
+        for (var l = 0; l < len; l++) {
+          newY = l === 0 ? getVerticalCoordinate(y) : -leading;
+          newX = l === 0 ? getHorizontalCoordinate(x) : 0;
+          if (l < len - 1) {
+            wordSpacingPerLine.push(
+              hpf(
+                scale(
+                  (maxWidth - lineWidths[l]) / (da[l].split(" ").length - 1)
+                )
+              )
+            );
+          } else {
+            wordSpacingPerLine.push(0);
+          }
+          text.push([da[l], newX, newY]);
+        }
+      } else {
+        throw new Error(
+          'Unrecognized alignment option, use "left", "center", "right" or "justify".'
+        );
+      }
+    }
+
+    //R2L
+    var doReversing = typeof options.R2L === "boolean" ? options.R2L : R2L;
+    if (doReversing === true) {
+      text = processTextByFunction(text, function(text, posX, posY) {
+        return [
+          text
+            .split("")
+            .reverse()
+            .join(""),
+          posX,
+          posY
+        ];
+      });
+    }
+
+    //creating Payload-Object to make text byRef
+    payload = {
+      text: text,
+      x: x,
+      y: y,
+      options: options,
+      mutex: {
+        pdfEscape: pdfEscape,
+        activeFontKey: activeFontKey,
+        fonts: fonts,
+        activeFontSize: activeFontSize
+      }
+    };
+    events.publish("postProcessText", payload);
+
+    text = payload.text;
+    isHex = payload.mutex.isHex || false;
+
+    //Escaping
+    var activeFontEncoding = fonts[activeFontKey].encoding;
+
+    if (
+      activeFontEncoding === "WinAnsiEncoding" ||
+      activeFontEncoding === "StandardEncoding"
+    ) {
+      text = processTextByFunction(text, function(text, posX, posY) {
+        return [ESC(text), posX, posY];
+      });
+    }
+
+    da = transformTextToSpecialArray(text);
+
+    text = [];
+    var STRING = 0;
+    var ARRAY = 1;
+    var variant = Array.isArray(da[0]) ? ARRAY : STRING;
+    var posX;
+    var posY;
+    var content;
+    var wordSpacing = "";
+
+    var generatePosition = function(
+      parmPosX,
+      parmPosY,
+      parmTransformationMatrix
+    ) {
+      var position = "";
+      if (parmTransformationMatrix instanceof Matrix) {
+        // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y
+        // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied
+        // in the coordinate system established by this matrix
+        if (typeof options.angle === "number") {
+          parmTransformationMatrix = matrixMult(
+            parmTransformationMatrix,
+            new Matrix(1, 0, 0, 1, parmPosX, parmPosY)
+          );
+        } else {
+          parmTransformationMatrix = matrixMult(
+            new Matrix(1, 0, 0, 1, parmPosX, parmPosY),
+            parmTransformationMatrix
+          );
+        }
+
+        if (apiMode === ApiMode.ADVANCED) {
+          parmTransformationMatrix = matrixMult(
+            new Matrix(1, 0, 0, -1, 0, 0),
+            parmTransformationMatrix
+          );
+        }
+
+        position = parmTransformationMatrix.join(" ") + " Tm\n";
+      } else {
+        position = hpf(parmPosX) + " " + hpf(parmPosY) + " Td\n";
+      }
+      return position;
+    };
+
+    for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {
+      wordSpacing = "";
+
+      switch (variant) {
+        case ARRAY:
+          content =
+            (isHex ? "<" : "(") + da[lineIndex][0] + (isHex ? ">" : ")");
+          posX = parseFloat(da[lineIndex][1]);
+          posY = parseFloat(da[lineIndex][2]);
+          break;
+        case STRING:
+          content = (isHex ? "<" : "(") + da[lineIndex] + (isHex ? ">" : ")");
+          posX = getHorizontalCoordinate(x);
+          posY = getVerticalCoordinate(y);
+          break;
+      }
+
+      if (
+        typeof wordSpacingPerLine !== "undefined" &&
+        typeof wordSpacingPerLine[lineIndex] !== "undefined"
+      ) {
+        wordSpacing = wordSpacingPerLine[lineIndex] + " Tw\n";
+      }
+
+      if (lineIndex === 0) {
+        text.push(
+          wordSpacing +
+            generatePosition(posX, posY, transformationMatrix) +
+            content
+        );
+      } else if (variant === STRING) {
+        text.push(wordSpacing + content);
+      } else if (variant === ARRAY) {
+        text.push(
+          wordSpacing +
+            generatePosition(posX, posY, transformationMatrix) +
+            content
+        );
+      }
+    }
+
+    text = variant === STRING ? text.join(" Tj\nT* ") : text.join(" Tj\n");
+    text += " Tj\n";
+
+    var result = "BT\n/";
+    result += activeFontKey + " " + activeFontSize + " Tf\n"; // font face, style, size
+    result += hpf(activeFontSize * lineHeight) + " TL\n"; // line spacing
+    result += textColor + "\n";
+    result += xtra;
+    result += text;
+    result += "ET";
+
+    out(result);
+    usedFonts[activeFontKey] = true;
+    return scope;
+  };
+
+  // PDF supports these path painting and clip path operators:
+  //
+  // S - stroke
+  // s - close/stroke
+  // f (F) - fill non-zero
+  // f* - fill evenodd
+  // B - fill stroke nonzero
+  // B* - fill stroke evenodd
+  // b - close fill stroke nonzero
+  // b* - close fill stroke evenodd
+  // n - nothing (consume path)
+  // W - clip nonzero
+  // W* - clip evenodd
+  //
+  // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()
+  // method.
+  /**
+   *
+   * @name clip
+   * @function
+   * @instance
+   * @param {string} rule Only possible value is 'evenodd'
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @description All .clip() after calling drawing ops with a style argument of null.
+   */
+  var clip = (API.__private__.clip = API.clip = function(rule) {
+    // Call .clip() after calling drawing ops with a style argument of null
+    // W is the PDF clipping op
+    if ("evenodd" === rule) {
+      out("W*");
+    } else {
+      out("W");
+    }
+    return this;
+  });
+
+  /**
+   * @name clipEvenOdd
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note
+   * that this will NOT consume the current path. In order to only use this path for clipping call
+   * {@link API.discardPath} afterwards.
+   */
+  API.clipEvenOdd = function() {
+    return clip("evenodd");
+  };
+
+  /**
+   * Consumes the current path without any effect. Mainly used in combination with {@link clip} or
+   * {@link clipEvenOdd}. The PDF "n" operator.
+   * @name discardPath
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+  API.__private__.discardPath = API.discardPath = function() {
+    out("n");
+    return this;
+  };
+
+  var isValidStyle = (API.__private__.isValidStyle = function(style) {
+    var validStyleVariants = [
+      undefined,
+      null,
+      "S",
+      "D",
+      "F",
+      "DF",
+      "FD",
+      "f",
+      "f*",
+      "B",
+      "B*",
+      "n"
+    ];
+    var result = false;
+    if (validStyleVariants.indexOf(style) !== -1) {
+      result = true;
+    }
+    return result;
+  });
+
+  API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function(
+    operator
+  ) {
+    if (isValidStyle(operator)) {
+      defaultPathOperation = operator;
+    }
+    return this;
+  };
+
+  var getStyle = (API.__private__.getStyle = API.getStyle = function(style) {
+    // see path-painting operators in PDF spec
+    var op = defaultPathOperation; // stroke
+
+    switch (style) {
+      case "D":
+      case "S":
+        op = "S"; // stroke
+        break;
+      case "F":
+        op = "f"; // fill
+        break;
+      case "FD":
+      case "DF":
+        op = "B";
+        break;
+      case "f":
+      case "f*":
+      case "B":
+      case "B*":
+        /*
+               Allow direct use of these PDF path-painting operators:
+               - f    fill using nonzero winding number rule
+               - f*    fill using even-odd rule
+               - B    fill then stroke with fill using non-zero winding number rule
+               - B*    fill then stroke with fill using even-odd rule
+               */
+        op = style;
+        break;
+    }
+    return op;
+  });
+
+  /**
+   * Close the current path. The PDF "h" operator.
+   * @name close
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+  var close = (API.close = function() {
+    out("h");
+    return this;
+  });
+
+  /**
+   * Stroke the path. The PDF "S" operator.
+   * @name stroke
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+  API.stroke = function() {
+    out("S");
+    return this;
+  };
+
+  /**
+   * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled
+   * with this pattern, otherwise with the current fill color. Equivalent to the PDF "f" operator.
+   * @name fill
+   * @function
+   * @instance
+   * @param {PatternData=} pattern If provided the path will be filled with this pattern
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+  API.fill = function(pattern) {
+    fillWithOptionalPattern("f", pattern);
+    return this;
+  };
+
+  /**
+   * Fill the current path using the even-odd rule. The PDF f* operator.
+   * @see API.fill
+   * @name fillEvenOdd
+   * @function
+   * @instance
+   * @param {PatternData=} pattern If provided the path will be filled with this pattern
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+  API.fillEvenOdd = function(pattern) {
+    fillWithOptionalPattern("f*", pattern);
+    return this;
+  };
+
+  /**
+   * Fill using the nonzero winding number rule and then stroke the current Path. The PDF "B" operator.
+   * @see API.fill
+   * @name fillStroke
+   * @function
+   * @instance
+   * @param {PatternData=} pattern If provided the path will be stroked with this pattern
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+  API.fillStroke = function(pattern) {
+    fillWithOptionalPattern("B", pattern);
+    return this;
+  };
+
+  /**
+   * Fill using the even-odd rule and then stroke the current Path. The PDF "B" operator.
+   * @see API.fill
+   * @name fillStrokeEvenOdd
+   * @function
+   * @instance
+   * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+  API.fillStrokeEvenOdd = function(pattern) {
+    fillWithOptionalPattern("B*", pattern);
+    return this;
+  };
+
+  var fillWithOptionalPattern = function(style, pattern) {
+    if (typeof pattern === "object") {
+      fillWithPattern(pattern, style);
+    } else {
+      out(style);
+    }
+  };
+
+  var putStyle = function(style) {
+    if (
+      style === null ||
+      (apiMode === ApiMode.ADVANCED && style === undefined)
+    ) {
+      return;
+    }
+
+    style = getStyle(style);
+
+    // stroking / filling / both the path
+    out(style);
+  };
+
+  function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {
+    var clone = new TilingPattern(
+      boundingBox || this.boundingBox,
+      xStep || this.xStep,
+      yStep || this.yStep,
+      this.gState,
+      matrix || this.matrix
+    );
+    clone.stream = this.stream;
+    var key = patternKey + "$$" + this.cloneIndex++ + "$$";
+    addPattern(key, clone);
+    return clone;
+  }
+
+  var fillWithPattern = function(patternData, style) {
+    var patternId = patternMap[patternData.key];
+    var pattern = patterns[patternId];
+
+    if (pattern instanceof ShadingPattern) {
+      out("q");
+
+      out(clipRuleFromStyle(style));
+
+      if (pattern.gState) {
+        API.setGState(pattern.gState);
+      }
+      out(patternData.matrix.toString() + " cm");
+      out("/" + patternId + " sh");
+      out("Q");
+    } else if (pattern instanceof TilingPattern) {
+      // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,
+      // so we must flip them
+      var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());
+
+      if (patternData.matrix) {
+        matrix = matrix.multiply(patternData.matrix || identityMatrix);
+        // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances
+        // for each use
+        patternId = cloneTilingPattern.call(
+          pattern,
+          patternData.key,
+          patternData.boundingBox,
+          patternData.xStep,
+          patternData.yStep,
+          matrix
+        ).id;
+      }
+
+      out("q");
+      out("/Pattern cs");
+      out("/" + patternId + " scn");
+
+      if (pattern.gState) {
+        API.setGState(pattern.gState);
+      }
+
+      out(style);
+      out("Q");
+    }
+  };
+
+  var clipRuleFromStyle = function(style) {
+    switch (style) {
+      case "f":
+      case "F":
+        return "W n";
+      case "f*":
+        return "W* n";
+      case "B":
+        return "W S";
+      case "B*":
+        return "W* S";
+
+      // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern
+      // and "n"/"S" as style would still fill/fill and stroke the path)
+      case "S":
+        return "W S";
+      case "n":
+        return "W n";
+    }
+  };
+
+  /**
+   * Begin a new subpath by moving the current point to coordinates (x, y). The PDF "m" operator.
+   * @param {number} x
+   * @param {number} y
+   * @name moveTo
+   * @function
+   * @instance
+   * @memberof jsPDF#
+   * @returns {jsPDF}
+   */
+  var moveTo = (API.moveTo = function(x, y) {
+    out(hpf(scale(x)) + " " + hpf(transformScaleY(y)) + " m");
+    return this;
+  });
+
+  /**
+   * Append a straight line segment from the current point to the point (x, y). The PDF "l" operator.
+   * @param {number} x
+   * @param {number} y
+   * @memberof jsPDF#
+   * @name lineTo
+   * @function
+   * @instance
+   * @memberof jsPDF#
+   * @returns {jsPDF}
+   */
+  var lineTo = (API.lineTo = function(x, y) {
+    out(hpf(scale(x)) + " " + hpf(transformScaleY(y)) + " l");
+    return this;
+  });
+
+  /**
+   * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point
+   * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).
+   * @param {number} x1
+   * @param {number} y1
+   * @param {number} x2
+   * @param {number} y2
+   * @param {number} x3
+   * @param {number} y3
+   * @memberof jsPDF#
+   * @name curveTo
+   * @function
+   * @instance
+   * @memberof jsPDF#
+   * @returns {jsPDF}
+   */
+  var curveTo = (API.curveTo = function(x1, y1, x2, y2, x3, y3) {
+    out(
+      [
+        hpf(scale(x1)),
+        hpf(transformScaleY(y1)),
+        hpf(scale(x2)),
+        hpf(transformScaleY(y2)),
+        hpf(scale(x3)),
+        hpf(transformScaleY(y3)),
+        "c"
+      ].join(" ")
+    );
+    return this;
+  });
+
+  /**
+   * Draw a line on the current page.
+   *
+   * @name line
+   * @function
+   * @instance
+   * @param {number} x1
+   * @param {number} y1
+   * @param {number} x2
+   * @param {number} y2
+   * @param {string} style A string specifying the painting style or null.  Valid styles include: 'S' [default] - stroke, 'F' - fill,  and 'DF' (or 'FD') -  fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   */
+  API.__private__.line = API.line = function(x1, y1, x2, y2, style) {
+    if (
+      isNaN(x1) ||
+      isNaN(y1) ||
+      isNaN(x2) ||
+      isNaN(y2) ||
+      !isValidStyle(style)
+    ) {
+      throw new Error("Invalid arguments passed to jsPDF.line");
+    }
+    if (apiMode === ApiMode.COMPAT) {
+      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || "S");
+    } else {
+      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();
+    }
+  };
+
+  /**
+   * @typedef {Object} PatternData
+   * {Matrix|undefined} matrix
+   * {Number|undefined} xStep
+   * {Number|undefined} yStep
+   * {Array.<Number>|undefined} boundingBox
+   */
+
+  /**
+   * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.
+   * All data points in `lines` are relative to last line origin.
+   * `x`, `y` become x1,y1 for first line / curve in the set.
+   * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.
+   * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.
+   *
+   * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line
+   * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name lines
+   */
+  API.__private__.lines = API.lines = function(
+    lines,
+    x,
+    y,
+    scale,
+    style,
+    closed
+  ) {
+    var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp;
+
+    // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)
+    // in effort to make all calls have similar signature like
+    //   function(content, coordinateX, coordinateY , miscellaneous)
+    // this method had its args flipped.
+    // code below allows backward compatibility with old arg order.
+    if (typeof lines === "number") {
+      tmp = y;
+      y = x;
+      x = lines;
+      lines = tmp;
+    }
+
+    scale = scale || [1, 1];
+    closed = closed || false;
+
+    if (
+      isNaN(x) ||
+      isNaN(y) ||
+      !Array.isArray(lines) ||
+      !Array.isArray(scale) ||
+      !isValidStyle(style) ||
+      typeof closed !== "boolean"
+    ) {
+      throw new Error("Invalid arguments passed to jsPDF.lines");
+    }
+
+    // starting point
+    moveTo(x, y);
+
+    scalex = scale[0];
+    scaley = scale[1];
+    l = lines.length;
+    //, x2, y2 // bezier only. In page default measurement "units", *after* scaling
+    //, x3, y3 // bezier only. In page default measurement "units", *after* scaling
+    // ending point for all, lines and bezier. . In page default measurement "units", *after* scaling
+    x4 = x; // last / ending point = starting point for first item.
+    y4 = y; // last / ending point = starting point for first item.
+
+    for (i = 0; i < l; i++) {
+      leg = lines[i];
+      if (leg.length === 2) {
+        // simple line
+        x4 = leg[0] * scalex + x4; // here last x4 was prior ending point
+        y4 = leg[1] * scaley + y4; // here last y4 was prior ending point
+        lineTo(x4, y4);
+      } else {
+        // bezier curve
+        x2 = leg[0] * scalex + x4; // here last x4 is prior ending point
+        y2 = leg[1] * scaley + y4; // here last y4 is prior ending point
+        x3 = leg[2] * scalex + x4; // here last x4 is prior ending point
+        y3 = leg[3] * scaley + y4; // here last y4 is prior ending point
+        x4 = leg[4] * scalex + x4; // here last x4 was prior ending point
+        y4 = leg[5] * scaley + y4; // here last y4 was prior ending point
+        curveTo(x2, y2, x3, y3, x4, y4);
+      }
+    }
+
+    if (closed) {
+      close();
+    }
+
+    putStyle(style);
+    return this;
+  };
+
+  /**
+   * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.
+   * @param {Array<Object>} lines An array of {op: operator, c: coordinates} object, where op is one of "m" (move to), "l" (line to)
+   * "c" (cubic bezier curve) and "h" (close (sub)path)). c is an array of coordinates. "m" and "l" expect two, "c"
+   * six and "h" an empty array (or undefined).
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name path
+   */
+  API.path = function(lines) {
+    for (var i = 0; i < lines.length; i++) {
+      var leg = lines[i];
+      var coords = leg.c;
+      switch (leg.op) {
+        case "m":
+          moveTo(coords[0], coords[1]);
+          break;
+        case "l":
+          lineTo(coords[0], coords[1]);
+          break;
+        case "c":
+          curveTo.apply(this, coords);
+          break;
+        case "h":
+          close();
+          break;
+      }
+    }
+
+    return this;
+  };
+
+  /**
+   * Adds a rectangle to PDF.
+   *
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} w Width (in units declared at inception of PDF document)
+   * @param {number} h Height (in units declared at inception of PDF document)
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name rect
+   */
+  API.__private__.rect = API.rect = function(x, y, w, h, style) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {
+      throw new Error("Invalid arguments passed to jsPDF.rect");
+    }
+    if (apiMode === ApiMode.COMPAT) {
+      h = -h;
+    }
+
+    out(
+      [
+        hpf(scale(x)),
+        hpf(transformScaleY(y)),
+        hpf(scale(w)),
+        hpf(scale(h)),
+        "re"
+      ].join(" ")
+    );
+
+    putStyle(style);
+    return this;
+  };
+
+  /**
+   * Adds a triangle to PDF.
+   *
+   * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name triangle
+   */
+  API.__private__.triangle = API.triangle = function(
+    x1,
+    y1,
+    x2,
+    y2,
+    x3,
+    y3,
+    style
+  ) {
+    if (
+      isNaN(x1) ||
+      isNaN(y1) ||
+      isNaN(x2) ||
+      isNaN(y2) ||
+      isNaN(x3) ||
+      isNaN(y3) ||
+      !isValidStyle(style)
+    ) {
+      throw new Error("Invalid arguments passed to jsPDF.triangle");
+    }
+    this.lines(
+      [
+        [x2 - x1, y2 - y1], // vector to point 2
+        [x3 - x2, y3 - y2], // vector to point 3
+        [x1 - x3, y1 - y3] // closing vector back to point 1
+      ],
+      x1,
+      y1, // start of path
+      [1, 1],
+      style,
+      true
+    );
+    return this;
+  };
+
+  /**
+   * Adds a rectangle with rounded corners to PDF.
+   *
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} w Width (in units declared at inception of PDF document)
+   * @param {number} h Height (in units declared at inception of PDF document)
+   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)
+   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name roundedRect
+   */
+  API.__private__.roundedRect = API.roundedRect = function(
+    x,
+    y,
+    w,
+    h,
+    rx,
+    ry,
+    style
+  ) {
+    if (
+      isNaN(x) ||
+      isNaN(y) ||
+      isNaN(w) ||
+      isNaN(h) ||
+      isNaN(rx) ||
+      isNaN(ry) ||
+      !isValidStyle(style)
+    ) {
+      throw new Error("Invalid arguments passed to jsPDF.roundedRect");
+    }
+    var MyArc = (4 / 3) * (Math.SQRT2 - 1);
+
+    rx = Math.min(rx, w * 0.5);
+    ry = Math.min(ry, h * 0.5);
+
+    this.lines(
+      [
+        [w - 2 * rx, 0],
+        [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry],
+        [0, h - 2 * ry],
+        [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry],
+        [-w + 2 * rx, 0],
+        [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry],
+        [0, -h + 2 * ry],
+        [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]
+      ],
+      x + rx,
+      y, // start of path
+      [1, 1],
+      style,
+      true
+    );
+    return this;
+  };
+
+  /**
+   * Adds an ellipse to PDF.
+   *
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)
+   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name ellipse
+   */
+  API.__private__.ellipse = API.ellipse = function(x, y, rx, ry, style) {
+    if (
+      isNaN(x) ||
+      isNaN(y) ||
+      isNaN(rx) ||
+      isNaN(ry) ||
+      !isValidStyle(style)
+    ) {
+      throw new Error("Invalid arguments passed to jsPDF.ellipse");
+    }
+    var lx = (4 / 3) * (Math.SQRT2 - 1) * rx,
+      ly = (4 / 3) * (Math.SQRT2 - 1) * ry;
+
+    moveTo(x + rx, y);
+    curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);
+    curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);
+    curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);
+    curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);
+
+    putStyle(style);
+    return this;
+  };
+
+  /**
+   * Adds an circle to PDF.
+   *
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} r Radius (in units declared at inception of PDF document)
+   * @param {string=} style A string specifying the painting style or null. Valid styles include:
+   * 'S' [default] - stroke,
+   * 'F' - fill,
+   * and 'DF' (or 'FD') -  fill then stroke.
+   * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+   * method calls. The last drawing method call used to define the shape should not have a null style argument.
+   *
+   * In "advanced" API mode this parameter is deprecated.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name circle
+   */
+  API.__private__.circle = API.circle = function(x, y, r, style) {
+    if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {
+      throw new Error("Invalid arguments passed to jsPDF.circle");
+    }
+    return this.ellipse(x, y, r, r, style);
+  };
+
+  /**
+   * Sets text font face, variant for upcoming text elements.
+   * See output of jsPDF.getFontList() for possible font names, styles.
+   *
+   * @param {string} fontName Font name or family. Example: "times".
+   * @param {string} fontStyle Font style or variant. Example: "italic".
+   * @param {number | string} fontWeight Weight of the Font. Example: "normal" | 400
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setFont
+   */
+  API.setFont = function(fontName, fontStyle, fontWeight) {
+    if (fontWeight) {
+      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);
+    }
+    activeFontKey = getFont(fontName, fontStyle, {
+      disableWarning: false
+    });
+    return this;
+  };
+
+  /**
+   * Gets text font face, variant for upcoming text elements.
+   *
+   * @function
+   * @instance
+   * @returns {Object}
+   * @memberof jsPDF#
+   * @name getFont
+   */
+  var getFontEntry = (API.__private__.getFont = API.getFont = function() {
+    return fonts[getFont.apply(API, arguments)];
+  });
+
+  /**
+   * Returns an object - a tree of fontName to fontStyle relationships available to
+   * active PDF document.
+   *
+   * @public
+   * @function
+   * @instance
+   * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }
+   * @memberof jsPDF#
+   * @name getFontList
+   */
+  API.__private__.getFontList = API.getFontList = function() {
+    var list = {},
+      fontName,
+      fontStyle;
+
+    for (fontName in fontmap) {
+      if (fontmap.hasOwnProperty(fontName)) {
+        list[fontName] = [];
+        for (fontStyle in fontmap[fontName]) {
+          if (fontmap[fontName].hasOwnProperty(fontStyle)) {
+            list[fontName].push(fontStyle);
+          }
+        }
+      }
+    }
+    return list;
+  };
+
+  /**
+   * Add a custom font to the current instance.
+   *
+   * @param {string} postScriptName PDF specification full name for the font.
+   * @param {string} id PDF-document-instance-specific label assinged to the font.
+   * @param {string} fontStyle Style of the Font.
+   * @param {number | string} fontWeight Weight of the Font.
+   * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.
+   * @function
+   * @instance
+   * @memberof jsPDF#
+   * @name addFont
+   * @returns {string} fontId
+   */
+  API.addFont = function(
+    postScriptName,
+    fontName,
+    fontStyle,
+    fontWeight,
+    encoding
+  ) {
+    var encodingOptions = [
+      "StandardEncoding",
+      "MacRomanEncoding",
+      "Identity-H",
+      "WinAnsiEncoding"
+    ];
+    if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {
+      //IE 11 fix
+      encoding = arguments[3];
+    } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {
+      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);
+    }
+    encoding = encoding || "Identity-H";
+    return addFont.call(this, postScriptName, fontName, fontStyle, encoding);
+  };
+
+  var lineWidth = options.lineWidth || 0.200025; // 2mm
+  /**
+   * Gets the line width, default: 0.200025.
+   *
+   * @function
+   * @instance
+   * @returns {number} lineWidth
+   * @memberof jsPDF#
+   * @name getLineWidth
+   */
+  var getLineWidth = (API.__private__.getLineWidth = API.getLineWidth = function() {
+    return lineWidth;
+  });
+
+  /**
+   * Sets line width for upcoming lines.
+   *
+   * @param {number} width Line width (in units declared at inception of PDF document).
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineWidth
+   */
+  var setLineWidth = (API.__private__.setLineWidth = API.setLineWidth = function(
+    width
+  ) {
+    lineWidth = width;
+    out(hpf(scale(width)) + " w");
+    return this;
+  });
+
+  /**
+   * Sets the dash pattern for upcoming lines.
+   *
+   * To reset the settings simply call the method without any parameters.
+   * @param {Array<number>} dashArray An array containing 0-2 numbers. The first number sets the length of the
+   * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered
+   * to be as long as the dashes. An empty array means solid, unbroken lines.
+   * @param {number} dashPhase The phase lines start with.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineDashPattern
+   */
+  API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function(
+    dashArray,
+    dashPhase
+  ) {
+    dashArray = dashArray || [];
+    dashPhase = dashPhase || 0;
+
+    if (isNaN(dashPhase) || !Array.isArray(dashArray)) {
+      throw new Error("Invalid arguments passed to jsPDF.setLineDash");
+    }
+
+    dashArray = dashArray
+      .map(function(x) {
+        return hpf(scale(x));
+      })
+      .join(" ");
+    dashPhase = hpf(scale(dashPhase));
+
+    out("[" + dashArray + "] " + dashPhase + " d");
+    return this;
+  };
+
+  var lineHeightFactor;
+
+  var getLineHeight = (API.__private__.getLineHeight = API.getLineHeight = function() {
+    return activeFontSize * lineHeightFactor;
+  });
+
+  API.__private__.getLineHeight = API.getLineHeight = function() {
+    return activeFontSize * lineHeightFactor;
+  };
+
+  /**
+   * Sets the LineHeightFactor of proportion.
+   *
+   * @param {number} value LineHeightFactor value. Default: 1.15.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineHeightFactor
+   */
+  var setLineHeightFactor = (API.__private__.setLineHeightFactor = API.setLineHeightFactor = function(
+    value
+  ) {
+    value = value || 1.15;
+    if (typeof value === "number") {
+      lineHeightFactor = value;
+    }
+    return this;
+  });
+
+  /**
+   * Gets the LineHeightFactor, default: 1.15.
+   *
+   * @function
+   * @instance
+   * @returns {number} lineHeightFactor
+   * @memberof jsPDF#
+   * @name getLineHeightFactor
+   */
+  var getLineHeightFactor = (API.__private__.getLineHeightFactor = API.getLineHeightFactor = function() {
+    return lineHeightFactor;
+  });
+
+  setLineHeightFactor(options.lineHeight);
+
+  var getHorizontalCoordinate = (API.__private__.getHorizontalCoordinate = function(
+    value
+  ) {
+    return scale(value);
+  });
+
+  var getVerticalCoordinate = (API.__private__.getVerticalCoordinate = function(
+    value
+  ) {
+    if (apiMode === ApiMode.ADVANCED) {
+      return value;
+    } else {
+      var pageHeight =
+        pagesContext[currentPage].mediaBox.topRightY -
+        pagesContext[currentPage].mediaBox.bottomLeftY;
+      return pageHeight - scale(value);
+    }
+  });
+
+  var getHorizontalCoordinateString = (API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function(
+    value
+  ) {
+    return hpf(getHorizontalCoordinate(value));
+  });
+
+  var getVerticalCoordinateString = (API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function(
+    value
+  ) {
+    return hpf(getVerticalCoordinate(value));
+  });
+
+  var strokeColor = options.strokeColor || "0 G";
+
+  /**
+   *  Gets the stroke color for upcoming elements.
+   *
+   * @function
+   * @instance
+   * @returns {string} colorAsHex
+   * @memberof jsPDF#
+   * @name getDrawColor
+   */
+  API.__private__.getStrokeColor = API.getDrawColor = function() {
+    return decodeColorString(strokeColor);
+  };
+
+  /**
+   * Sets the stroke color for upcoming elements.
+   *
+   * Depending on the number of arguments given, Gray, RGB, or CMYK
+   * color space is implied.
+   *
+   * When only ch1 is given, "Gray" color space is implied and it
+   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+   * if values are communicated as String types, or in range from 0 (black)
+   * to 255 (white) if communicated as Number type.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+   * value must be in the range from 0.00 (minimum intensity) to to 1.00
+   * (max intensity) if values are communicated as String types, or
+   * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+   * as Number types.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+   * value must be a in the range from 0.00 (0% concentration) to to
+   * 1.00 (100% concentration)
+   *
+   * Because JavaScript treats fixed point numbers badly (rounds to
+   * floating point nearest to binary representation) it is highly advised to
+   * communicate the fractional numbers as String types, not JavaScript Number type.
+   *
+   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+   * @param {Number} ch2 Color channel value.
+   * @param {Number} ch3 Color channel value.
+   * @param {Number} ch4 Color channel value.
+   *
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setDrawColor
+   */
+  API.__private__.setStrokeColor = API.setDrawColor = function(
+    ch1,
+    ch2,
+    ch3,
+    ch4
+  ) {
+    var options = {
+      ch1: ch1,
+      ch2: ch2,
+      ch3: ch3,
+      ch4: ch4,
+      pdfColorType: "draw",
+      precision: 2
+    };
+
+    strokeColor = encodeColorString(options);
+    out(strokeColor);
+    return this;
+  };
+
+  var fillColor = options.fillColor || "0 g";
+
+  /**
+   * Gets the fill color for upcoming elements.
+   *
+   * @function
+   * @instance
+   * @returns {string} colorAsHex
+   * @memberof jsPDF#
+   * @name getFillColor
+   */
+  API.__private__.getFillColor = API.getFillColor = function() {
+    return decodeColorString(fillColor);
+  };
+
+  /**
+   * Sets the fill color for upcoming elements.
+   *
+   * Depending on the number of arguments given, Gray, RGB, or CMYK
+   * color space is implied.
+   *
+   * When only ch1 is given, "Gray" color space is implied and it
+   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+   * if values are communicated as String types, or in range from 0 (black)
+   * to 255 (white) if communicated as Number type.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+   * value must be in the range from 0.00 (minimum intensity) to to 1.00
+   * (max intensity) if values are communicated as String types, or
+   * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+   * as Number types.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+   * value must be a in the range from 0.00 (0% concentration) to to
+   * 1.00 (100% concentration)
+   *
+   * Because JavaScript treats fixed point numbers badly (rounds to
+   * floating point nearest to binary representation) it is highly advised to
+   * communicate the fractional numbers as String types, not JavaScript Number type.
+   *
+   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+   * @param {Number} ch2 Color channel value.
+   * @param {Number} ch3 Color channel value.
+   * @param {Number} ch4 Color channel value.
+   *
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setFillColor
+   */
+  API.__private__.setFillColor = API.setFillColor = function(
+    ch1,
+    ch2,
+    ch3,
+    ch4
+  ) {
+    var options = {
+      ch1: ch1,
+      ch2: ch2,
+      ch3: ch3,
+      ch4: ch4,
+      pdfColorType: "fill",
+      precision: 2
+    };
+
+    fillColor = encodeColorString(options);
+    out(fillColor);
+    return this;
+  };
+
+  var textColor = options.textColor || "0 g";
+  /**
+   * Gets the text color for upcoming elements.
+   *
+   * @function
+   * @instance
+   * @returns {string} colorAsHex
+   * @memberof jsPDF#
+   * @name getTextColor
+   */
+  var getTextColor = (API.__private__.getTextColor = API.getTextColor = function() {
+    return decodeColorString(textColor);
+  });
+  /**
+   * Sets the text color for upcoming elements.
+   *
+   * Depending on the number of arguments given, Gray, RGB, or CMYK
+   * color space is implied.
+   *
+   * When only ch1 is given, "Gray" color space is implied and it
+   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+   * if values are communicated as String types, or in range from 0 (black)
+   * to 255 (white) if communicated as Number type.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+   * value must be in the range from 0.00 (minimum intensity) to to 1.00
+   * (max intensity) if values are communicated as String types, or
+   * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+   * as Number types.
+   * The RGB-like 0-255 range is provided for backward compatibility.
+   *
+   * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+   * value must be a in the range from 0.00 (0% concentration) to to
+   * 1.00 (100% concentration)
+   *
+   * Because JavaScript treats fixed point numbers badly (rounds to
+   * floating point nearest to binary representation) it is highly advised to
+   * communicate the fractional numbers as String types, not JavaScript Number type.
+   *
+   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+   * @param {Number} ch2 Color channel value.
+   * @param {Number} ch3 Color channel value.
+   * @param {Number} ch4 Color channel value.
+   *
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setTextColor
+   */
+  API.__private__.setTextColor = API.setTextColor = function(
+    ch1,
+    ch2,
+    ch3,
+    ch4
+  ) {
+    var options = {
+      ch1: ch1,
+      ch2: ch2,
+      ch3: ch3,
+      ch4: ch4,
+      pdfColorType: "text",
+      precision: 3
+    };
+    textColor = encodeColorString(options);
+
+    return this;
+  };
+
+  var activeCharSpace = options.charSpace;
+
+  /**
+   * Get global value of CharSpace.
+   *
+   * @function
+   * @instance
+   * @returns {number} charSpace
+   * @memberof jsPDF#
+   * @name getCharSpace
+   */
+  var getCharSpace = (API.__private__.getCharSpace = API.getCharSpace = function() {
+    return parseFloat(activeCharSpace || 0);
+  });
+
+  /**
+   * Set global value of CharSpace.
+   *
+   * @param {number} charSpace
+   * @function
+   * @instance
+   * @returns {jsPDF} jsPDF-instance
+   * @memberof jsPDF#
+   * @name setCharSpace
+   */
+  API.__private__.setCharSpace = API.setCharSpace = function(charSpace) {
+    if (isNaN(charSpace)) {
+      throw new Error("Invalid argument passed to jsPDF.setCharSpace");
+    }
+    activeCharSpace = charSpace;
+    return this;
+  };
+
+  var lineCapID = 0;
+  /**
+   * Is an Object providing a mapping from human-readable to
+   * integer flag values designating the varieties of line cap
+   * and join styles.
+   *
+   * @memberof jsPDF#
+   * @name CapJoinStyles
+   */
+  API.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
+  };
+
+  /**
+   * Sets the line cap styles.
+   * See {jsPDF.CapJoinStyles} for variants.
+   *
+   * @param {String|Number} style A string or number identifying the type of line cap.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineCap
+   */
+  API.__private__.setLineCap = API.setLineCap = function(style) {
+    var id = API.CapJoinStyles[style];
+    if (id === undefined) {
+      throw new Error(
+        "Line cap style of '" +
+          style +
+          "' is not recognized. See or extend .CapJoinStyles property for valid styles"
+      );
+    }
+    lineCapID = id;
+    out(id + " J");
+
+    return this;
+  };
+
+  var lineJoinID = 0;
+  /**
+   * Sets the line join styles.
+   * See {jsPDF.CapJoinStyles} for variants.
+   *
+   * @param {String|Number} style A string or number identifying the type of line join.
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineJoin
+   */
+  API.__private__.setLineJoin = API.setLineJoin = function(style) {
+    var id = API.CapJoinStyles[style];
+    if (id === undefined) {
+      throw new Error(
+        "Line join style of '" +
+          style +
+          "' is not recognized. See or extend .CapJoinStyles property for valid styles"
+      );
+    }
+    lineJoinID = id;
+    out(id + " j");
+
+    return this;
+  };
+  /**
+   * Sets the miterLimit property, which effects the maximum miter length.
+   *
+   * @param {number} length The length of the miter
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setLineMiterLimit
+   */
+  API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function(
+    length
+  ) {
+    length = length || 0;
+    if (isNaN(length)) {
+      throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");
+    }
+    out(hpf(scale(length)) + " M");
+
+    return this;
+  };
+
+  /**
+   * An object representing a pdf graphics state.
+   * @class GState
+   */
+
+  /**
+   *
+   * @param parameters A parameter object that contains all properties this graphics state wants to set.
+   * Supported are: opacity, stroke-opacity
+   * @constructor
+   */
+  API.GState = GState;
+
+  /**
+   * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.
+   * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState
+   * it will be added before use.
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setGState
+   */
+  API.setGState = function(gState) {
+    if (typeof gState === "string") {
+      gState = gStates[gStatesMap[gState]];
+    } else {
+      gState = addGState(null, gState);
+    }
+
+    if (!gState.equals(activeGState)) {
+      out("/" + gState.id + " gs");
+      activeGState = gState;
+    }
+  };
+
+  /**
+   * Adds a new Graphics State. Duplicates are automatically eliminated.
+   * @param {String} key Might also be null, if no later reference to this gState is needed
+   * @param {Object} gState The gState object
+   */
+  var addGState = function(key, gState) {
+    // only add it if it is not already present (the keys provided by the user must be unique!)
+    if (key && gStatesMap[key]) return;
+    var duplicate = false;
+    for (var s in gStates) {
+      if (gStates.hasOwnProperty(s)) {
+        if (gStates[s].equals(gState)) {
+          duplicate = true;
+          break;
+        }
+      }
+    }
+
+    if (duplicate) {
+      gState = gStates[s];
+    } else {
+      var gStateKey = "GS" + (Object.keys(gStates).length + 1).toString(10);
+      gStates[gStateKey] = gState;
+      gState.id = gStateKey;
+    }
+
+    // several user keys may point to the same GState object
+    key && (gStatesMap[key] = gState.id);
+
+    events.publish("addGState", gState);
+
+    return gState;
+  };
+
+  /**
+   * Adds a new {@link GState} for later use. See {@link setGState}.
+   * @param {String} key
+   * @param {GState} gState
+   * @function
+   * @instance
+   * @returns {jsPDF}
+   *
+   * @memberof jsPDF#
+   * @name addGState
+   */
+  API.addGState = function(key, gState) {
+    addGState(key, gState);
+    return this;
+  };
+
+  /**
+   * Saves the current graphics state ("pushes it on the stack"). It can be restored by {@link restoreGraphicsState}
+   * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,
+   * fill and stroke colors etc.
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name saveGraphicsState
+   */
+  API.saveGraphicsState = function() {
+    out("q");
+    // as we cannot set font key and size independently we must keep track of both
+    fontStateStack.push({
+      key: activeFontKey,
+      size: activeFontSize,
+      color: textColor
+    });
+    return this;
+  };
+
+  /**
+   * Restores a previously saved graphics state saved by {@link saveGraphicsState} ("pops the stack").
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name restoreGraphicsState
+   */
+  API.restoreGraphicsState = function() {
+    out("Q");
+
+    // restore previous font state
+    var fontState = fontStateStack.pop();
+    activeFontKey = fontState.key;
+    activeFontSize = fontState.size;
+    textColor = fontState.color;
+
+    activeGState = null;
+
+    return this;
+  };
+
+  /**
+   * Appends this matrix to the left of all previously applied matrices.
+   *
+   * @param {Matrix} matrix
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name setCurrentTransformationMatrix
+   */
+  API.setCurrentTransformationMatrix = function(matrix) {
+    out(matrix.toString() + " cm");
+    return this;
+  };
+
+  /**
+   * Inserts a debug comment into the generated pdf.
+   * @function
+   * @instance
+   * @param {String} text
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name comment
+   */
+  API.comment = function(text) {
+    out("#" + text);
+    return this;
+  };
+
+  /**
+   * Point
+   */
+  var Point = function(x, y) {
+    var _x = x || 0;
+    Object.defineProperty(this, "x", {
+      enumerable: true,
+      get: function() {
+        return _x;
+      },
+      set: function(value) {
+        if (!isNaN(value)) {
+          _x = parseFloat(value);
+        }
+      }
+    });
+
+    var _y = y || 0;
+    Object.defineProperty(this, "y", {
+      enumerable: true,
+      get: function() {
+        return _y;
+      },
+      set: function(value) {
+        if (!isNaN(value)) {
+          _y = parseFloat(value);
+        }
+      }
+    });
+
+    var _type = "pt";
+    Object.defineProperty(this, "type", {
+      enumerable: true,
+      get: function() {
+        return _type;
+      },
+      set: function(value) {
+        _type = value.toString();
+      }
+    });
+    return this;
+  };
+
+  /**
+   * Rectangle
+   */
+  var Rectangle = function(x, y, w, h) {
+    Point.call(this, x, y);
+    this.type = "rect";
+
+    var _w = w || 0;
+    Object.defineProperty(this, "w", {
+      enumerable: true,
+      get: function() {
+        return _w;
+      },
+      set: function(value) {
+        if (!isNaN(value)) {
+          _w = parseFloat(value);
+        }
+      }
+    });
+
+    var _h = h || 0;
+    Object.defineProperty(this, "h", {
+      enumerable: true,
+      get: function() {
+        return _h;
+      },
+      set: function(value) {
+        if (!isNaN(value)) {
+          _h = parseFloat(value);
+        }
+      }
+    });
+
+    return this;
+  };
+
+  /**
+   * FormObject/RenderTarget
+   */
+
+  var RenderTarget = function() {
+    this.page = page;
+    this.currentPage = currentPage;
+    this.pages = pages.slice(0);
+    this.pagesContext = pagesContext.slice(0);
+    this.x = pageX;
+    this.y = pageY;
+    this.matrix = pageMatrix;
+    this.width = getPageWidth(currentPage);
+    this.height = getPageHeight(currentPage);
+    this.outputDestination = outputDestination;
+
+    this.id = ""; // set by endFormObject()
+    this.objectNumber = -1; // will be set by putXObject()
+  };
+
+  RenderTarget.prototype.restore = function() {
+    page = this.page;
+    currentPage = this.currentPage;
+    pagesContext = this.pagesContext;
+    pages = this.pages;
+    pageX = this.x;
+    pageY = this.y;
+    pageMatrix = this.matrix;
+    setPageWidth(currentPage, this.width);
+    setPageHeight(currentPage, this.height);
+    outputDestination = this.outputDestination;
+  };
+
+  var beginNewRenderTarget = function(x, y, width, height, matrix) {
+    // save current state
+    renderTargetStack.push(new RenderTarget());
+
+    // clear pages
+    page = currentPage = 0;
+    pages = [];
+    pageX = x;
+    pageY = y;
+
+    pageMatrix = matrix;
+
+    beginPage([width, height]);
+  };
+
+  var endFormObject = function(key) {
+    // only add it if it is not already present (the keys provided by the user must be unique!)
+    if (renderTargetMap[key]) {
+      renderTargetStack.pop().restore();
+      return;
+    }
+
+    // save the created xObject
+    var newXObject = new RenderTarget();
+
+    var xObjectId = "Xo" + (Object.keys(renderTargets).length + 1).toString(10);
+    newXObject.id = xObjectId;
+
+    renderTargetMap[key] = xObjectId;
+    renderTargets[xObjectId] = newXObject;
+
+    events.publish("addFormObject", newXObject);
+
+    // restore state from stack
+    renderTargetStack.pop().restore();
+  };
+
+  /**
+   * Starts a new pdf form object, which means that all consequent draw calls target a new independent object
+   * until {@link endFormObject} is called. The created object can be referenced and drawn later using
+   * {@link doFormObject}. Nested form objects are possible.
+   * x, y, width, height set the bounding box that is used to clip the content.
+   *
+   * @param {number} x
+   * @param {number} y
+   * @param {number} width
+   * @param {number} height
+   * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to
+   * the parent's.
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name beginFormObject
+   */
+  API.beginFormObject = function(x, y, width, height, matrix) {
+    // The user can set the output target to a new form object. Nested form objects are possible.
+    // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as
+    // the PDF-Spec states:
+    // "In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which
+    // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,
+    // form XObjects may be independent of the content streams in which they appear, and this is strongly
+    // recommended although not required"
+    beginNewRenderTarget(x, y, width, height, matrix);
+    return this;
+  };
+
+  /**
+   * Completes and saves the form object.
+   * @param {String} key The key by which this form object can be referenced.
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name endFormObject
+   */
+  API.endFormObject = function(key) {
+    endFormObject(key);
+    return this;
+  };
+
+  /**
+   * Draws the specified form object by referencing to the respective pdf XObject created with
+   * {@link API.beginFormObject} and {@link endFormObject}.
+   * The location is determined by matrix.
+   *
+   * @param {String} key The key to the form object.
+   * @param {Matrix} matrix The matrix applied before drawing the form object.
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name doFormObject
+   */
+  API.doFormObject = function(key, matrix) {
+    var xObject = renderTargets[renderTargetMap[key]];
+    out("q");
+    out(matrix.toString() + " cm");
+    out("/" + xObject.id + " Do");
+    out("Q");
+    return this;
+  };
+
+  /**
+   * Returns the form object specified by key.
+   * @param key {String}
+   * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}
+   * @function
+   * @returns {jsPDF}
+   * @memberof jsPDF#
+   * @name getFormObject
+   */
+  API.getFormObject = function(key) {
+    var xObject = renderTargets[renderTargetMap[key]];
+    return {
+      x: xObject.x,
+      y: xObject.y,
+      width: xObject.width,
+      height: xObject.height,
+      matrix: xObject.matrix
+    };
+  };
+
+  /**
+   * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').
+   * Uses FileSaver.js-method saveAs.
+   *
+   * @memberof jsPDF#
+   * @name save
+   * @function
+   * @instance
+   * @param  {string} filename The filename including extension.
+   * @param  {Object} options An Object with additional options, possible options: 'returnPromise'.
+   * @returns {jsPDF|Promise} jsPDF-instance     */
+  API.save = function(filename, options) {
+    filename = filename || "generated.pdf";
+
+    options = options || {};
+    options.returnPromise = options.returnPromise || false;
+
+
+    // eslint-disable-next-line no-unreachable
+    var fs = require("fs");
+    var buffer = Buffer.from(getArrayBuffer(buildDocument()));
+    if (options.returnPromise === false) {
+      fs.writeFileSync(filename, buffer);
+    } else {
+      return new Promise(function(resolve, reject) {
+        fs.writeFile(filename, buffer, function(err) {
+          if (err) {
+            reject(err);
+          } else {
+            resolve();
+          }
+        });
+      });
+    }
+  };
+
+  // applying plugins (more methods) ON TOP of built-in API.
+  // this is intentional as we allow plugins to override
+  // built-ins
+  for (var plugin in jsPDF.API) {
+    if (jsPDF.API.hasOwnProperty(plugin)) {
+      if (plugin === "events" && jsPDF.API.events.length) {
+        (function(events, newEvents) {
+          // jsPDF.API.events is a JS Array of Arrays
+          // where each Array is a pair of event name, handler
+          // Events were added by plugins to the jsPDF instantiator.
+          // These are always added to the new instance and some ran
+          // during instantiation.
+          var eventname, handler_and_args, i;
+
+          for (i = newEvents.length - 1; i !== -1; i--) {
+            // subscribe takes 3 args: 'topic', function, runonce_flag
+            // if undefined, runonce is false.
+            // users can attach callback directly,
+            // or they can attach an array with [callback, runonce_flag]
+            // that's what the "apply" magic is for below.
+            eventname = newEvents[i][0];
+            handler_and_args = newEvents[i][1];
+            events.subscribe.apply(
+              events,
+              [eventname].concat(
+                typeof handler_and_args === "function"
+                  ? [handler_and_args]
+                  : handler_and_args
+              )
+            );
+          }
+        })(events, jsPDF.API.events);
+      } else {
+        API[plugin] = jsPDF.API[plugin];
+      }
+    }
+  }
+
+  var getPageWidth = (API.getPageWidth = function(pageNumber) {
+    pageNumber = pageNumber || currentPage;
+    return (
+      (pagesContext[pageNumber].mediaBox.topRightX -
+        pagesContext[pageNumber].mediaBox.bottomLeftX) /
+      scaleFactor
+    );
+  });
+
+  var setPageWidth = (API.setPageWidth = function(pageNumber, value) {
+    pagesContext[pageNumber].mediaBox.topRightX =
+      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;
+  });
+
+  var getPageHeight = (API.getPageHeight = function(pageNumber) {
+    pageNumber = pageNumber || currentPage;
+    return (
+      (pagesContext[pageNumber].mediaBox.topRightY -
+        pagesContext[pageNumber].mediaBox.bottomLeftY) /
+      scaleFactor
+    );
+  });
+
+  var setPageHeight = (API.setPageHeight = function(pageNumber, value) {
+    pagesContext[pageNumber].mediaBox.topRightY =
+      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;
+  });
+
+  /**
+   * Object exposing internal API to plugins
+   * @public
+   * @ignore
+   */
+  API.internal = {
+    pdfEscape: pdfEscape,
+    getStyle: getStyle,
+    getFont: getFontEntry,
+    getFontSize: getFontSize,
+    getCharSpace: getCharSpace,
+    getTextColor: getTextColor,
+    getLineHeight: getLineHeight,
+    getLineHeightFactor: getLineHeightFactor,
+    getLineWidth: getLineWidth,
+    write: write,
+    getHorizontalCoordinate: getHorizontalCoordinate,
+    getVerticalCoordinate: getVerticalCoordinate,
+    getCoordinateString: getHorizontalCoordinateString,
+    getVerticalCoordinateString: getVerticalCoordinateString,
+    collections: {},
+    newObject: newObject,
+    newAdditionalObject: newAdditionalObject,
+    newObjectDeferred: newObjectDeferred,
+    newObjectDeferredBegin: newObjectDeferredBegin,
+    getFilters: getFilters,
+    putStream: putStream,
+    events: events,
+    scaleFactor: scaleFactor,
+    pageSize: {
+      getWidth: function() {
+        return getPageWidth(currentPage);
+      },
+      setWidth: function(value) {
+        setPageWidth(currentPage, value);
+      },
+      getHeight: function() {
+        return getPageHeight(currentPage);
+      },
+      setHeight: function(value) {
+        setPageHeight(currentPage, value);
+      }
+    },
+    encryptionOptions: encryptionOptions,
+    encryption: encryption,
+    getEncryptor: getEncryptor,
+    output: output,
+    getNumberOfPages: getNumberOfPages,
+    pages: pages,
+    out: out,
+    f2: f2,
+    f3: f3,
+    getPageInfo: getPageInfo,
+    getPageInfoByObjId: getPageInfoByObjId,
+    getCurrentPageInfo: getCurrentPageInfo,
+    getPDFVersion: getPdfVersion,
+    Point: Point,
+    Rectangle: Rectangle,
+    Matrix: Matrix,
+    hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.
+  };
+
+  Object.defineProperty(API.internal.pageSize, "width", {
+    get: function() {
+      return getPageWidth(currentPage);
+    },
+    set: function(value) {
+      setPageWidth(currentPage, value);
+    },
+    enumerable: true,
+    configurable: true
+  });
+  Object.defineProperty(API.internal.pageSize, "height", {
+    get: function() {
+      return getPageHeight(currentPage);
+    },
+    set: function(value) {
+      setPageHeight(currentPage, value);
+    },
+    enumerable: true,
+    configurable: true
+  });
+
+  //////////////////////////////////////////////////////
+  // continuing initialization of jsPDF Document object
+  //////////////////////////////////////////////////////
+  // Add the first page automatically
+  addFonts.call(API, standardFonts);
+  activeFontKey = "F1";
+  _addPage(format, orientation);
+
+  events.publish("initialized");
+  return API;
+}
+
+/**
+ * jsPDF.API is a STATIC property of jsPDF class.
+ * jsPDF.API is an object you can add methods and properties to.
+ * The methods / properties you add will show up in new jsPDF objects.
+ *
+ * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,
+ * callbacks to this object. These will be reassigned to all new instances of jsPDF.
+ *
+ * @static
+ * @public
+ * @memberof jsPDF#
+ * @name API
+ *
+ * @example
+ * jsPDF.API.mymethod = function(){
+ *   // 'this' will be ref to internal API object. see jsPDF source
+ *   // , so you can refer to built-in methods like so:
+ *   //     this.line(....)
+ *   //     this.text(....)
+ * }
+ * var pdfdoc = new jsPDF()
+ * pdfdoc.mymethod() // <- !!!!!!
+ */
+jsPDF.API = {
+  events: []
+};
+/**
+ * The version of jsPDF.
+ * @name version
+ * @type {string}
+ * @memberof jsPDF#
+ */
+jsPDF.version = "2.5.2";
+
+/* global jsPDF */
+
+var jsPDFAPI = jsPDF.API;
+var scaleFactor = 1;
+
+var pdfEscape = function(value) {
+  return value
+    .replace(/\\/g, "\\\\")
+    .replace(/\(/g, "\\(")
+    .replace(/\)/g, "\\)");
+};
+var pdfUnescape = function(value) {
+  return value
+    .replace(/\\\\/g, "\\")
+    .replace(/\\\(/g, "(")
+    .replace(/\\\)/g, ")");
+};
+
+var f2 = function(number) {
+  return number.toFixed(2); // Ie, %.2f
+};
+
+var f5 = function(number) {
+  return number.toFixed(5); // Ie, %.2f
+};
+
+jsPDFAPI.__acroform__ = {};
+var inherit = function(child, parent) {
+  child.prototype = Object.create(parent.prototype);
+  child.prototype.constructor = child;
+};
+
+var scale = function(x) {
+  return x * scaleFactor;
+};
+
+var createFormXObject = function(formObject) {
+  var xobj = new AcroFormXObject();
+  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;
+  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;
+  xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];
+  return xobj;
+};
+
+/**
+ * Bit-Operations
+ */
+var setBit = (jsPDFAPI.__acroform__.setBit = function(number, bitPosition) {
+  number = number || 0;
+  bitPosition = bitPosition || 0;
+
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error(
+      "Invalid arguments passed to jsPDF.API.__acroform__.setBit"
+    );
+  }
+  var bitMask = 1 << bitPosition;
+
+  number |= bitMask;
+
+  return number;
+});
+
+var clearBit = (jsPDFAPI.__acroform__.clearBit = function(number, bitPosition) {
+  number = number || 0;
+  bitPosition = bitPosition || 0;
+
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error(
+      "Invalid arguments passed to jsPDF.API.__acroform__.clearBit"
+    );
+  }
+  var bitMask = 1 << bitPosition;
+
+  number &= ~bitMask;
+
+  return number;
+});
+
+var getBit = (jsPDFAPI.__acroform__.getBit = function(number, bitPosition) {
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error(
+      "Invalid arguments passed to jsPDF.API.__acroform__.getBit"
+    );
+  }
+  return (number & (1 << bitPosition)) === 0 ? 0 : 1;
+});
+
+/*
+ * Ff starts counting the bit position at 1 and not like javascript at 0
+ */
+var getBitForPdf = (jsPDFAPI.__acroform__.getBitForPdf = function(
+  number,
+  bitPosition
+) {
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error(
+      "Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf"
+    );
+  }
+  return getBit(number, bitPosition - 1);
+});
+
+var setBitForPdf = (jsPDFAPI.__acroform__.setBitForPdf = function(
+  number,
+  bitPosition
+) {
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error(
+      "Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf"
+    );
+  }
+  return setBit(number, bitPosition - 1);
+});
+
+var clearBitForPdf = (jsPDFAPI.__acroform__.clearBitForPdf = function(
+  number,
+  bitPosition
+) {
+  if (isNaN(number) || isNaN(bitPosition)) {
+    throw new Error(
+      "Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf"
+    );
+  }
+  return clearBit(number, bitPosition - 1);
+});
+
+var calculateCoordinates = (jsPDFAPI.__acroform__.calculateCoordinates = function(
+  args,
+  scope
+) {
+  var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;
+  var getVerticalCoordinate = scope.internal.getVerticalCoordinate;
+  var x = args[0];
+  var y = args[1];
+  var w = args[2];
+  var h = args[3];
+
+  var coordinates = {};
+
+  coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;
+  coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;
+  coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;
+  coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;
+
+  return [
+    Number(f2(coordinates.lowerLeft_X)),
+    Number(f2(coordinates.lowerLeft_Y)),
+    Number(f2(coordinates.upperRight_X)),
+    Number(f2(coordinates.upperRight_Y))
+  ];
+});
+
+var calculateAppearanceStream = function(formObject) {
+  if (formObject.appearanceStreamContent) {
+    return formObject.appearanceStreamContent;
+  }
+
+  if (!formObject.V && !formObject.DV) {
+    return;
+  }
+
+  // else calculate it
+
+  var stream = [];
+  var text = formObject._V || formObject.DV;
+  var calcRes = calculateX(formObject, text);
+  var fontKey = formObject.scope.internal.getFont(
+    formObject.fontName,
+    formObject.fontStyle
+  ).id;
+
+  //PDF 32000-1:2008, page 444
+  stream.push("/Tx BMC");
+  stream.push("q");
+  stream.push("BT"); // Begin Text
+  stream.push(formObject.scope.__private__.encodeColorString(formObject.color));
+  stream.push("/" + fontKey + " " + f2(calcRes.fontSize) + " Tf");
+  stream.push("1 0 0 1 0 0 Tm"); // Transformation Matrix
+  stream.push(calcRes.text);
+  stream.push("ET"); // End Text
+  stream.push("Q");
+  stream.push("EMC");
+
+  var appearanceStreamContent = createFormXObject(formObject);
+  appearanceStreamContent.scope = formObject.scope;
+  appearanceStreamContent.stream = stream.join("\n");
+  return appearanceStreamContent;
+};
+
+var calculateX = function(formObject, text) {
+  var maxFontSize =
+    formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;
+  var returnValue = {
+    text: "",
+    fontSize: ""
+  };
+  // Remove Brackets
+  text = text.substr(0, 1) == "(" ? text.substr(1) : text;
+  text =
+    text.substr(text.length - 1) == ")"
+      ? text.substr(0, text.length - 1)
+      : text;
+  // split into array of words
+  var textSplit = text.split(" ");
+  if (formObject.multiline) {
+    textSplit = textSplit.map(word => word.split("\n"));
+  } else {
+    textSplit = textSplit.map(word => [word]);
+  }
+
+  var fontSize = maxFontSize; // The Starting fontSize (The Maximum)
+  var lineSpacing = 2;
+  var borderPadding = 2;
+
+  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;
+  height = height < 0 ? -height : height;
+  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;
+  width = width < 0 ? -width : width;
+
+  var isSmallerThanWidth = function(i, lastLine, fontSize) {
+    if (i + 1 < textSplit.length) {
+      var tmp = lastLine + " " + textSplit[i + 1][0];
+      var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;
+      var FieldWidth = width - 2 * borderPadding;
+      return TextWidth <= FieldWidth;
+    } else {
+      return false;
+    }
+  };
+
+  fontSize++;
+  FontSize: while (fontSize > 0) {
+    text = "";
+    fontSize--;
+    var textHeight = calculateFontSpace("3", formObject, fontSize).height;
+    var startY = formObject.multiline
+      ? height - fontSize
+      : (height - textHeight) / 2;
+    startY += lineSpacing;
+    var startX;
+
+    var lastY = startY;
+    var firstWordInLine = 0,
+      lastWordInLine = 0;
+    var lastLength;
+    var currWord = 0;
+
+    if (fontSize <= 0) {
+      // In case, the Text doesn't fit at all
+      fontSize = 12;
+      text = "(...) Tj\n";
+      text +=
+        "% Width of Text: " +
+        calculateFontSpace(text, formObject, fontSize).width +
+        ", FieldWidth:" +
+        width +
+        "\n";
+      break;
+    }
+
+    var lastLine = "";
+    var lineCount = 0;
+    Line: for (var i = 0; i < textSplit.length; i++) {
+      if (textSplit.hasOwnProperty(i)) {
+        let isWithNewLine = false;
+        if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {
+          if (
+            (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >
+            height
+          ) {
+            continue FontSize;
+          }
+
+          lastLine += textSplit[i][currWord];
+          isWithNewLine = true;
+          lastWordInLine = i;
+          i--;
+        } else {
+          lastLine += textSplit[i][currWord] + " ";
+          lastLine =
+            lastLine.substr(lastLine.length - 1) == " "
+              ? lastLine.substr(0, lastLine.length - 1)
+              : lastLine;
+          var key = parseInt(i);
+          var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);
+          var isLastWord = i >= textSplit.length - 1;
+
+          if (nextLineIsSmaller && !isLastWord) {
+            lastLine += " ";
+            currWord = 0;
+            continue; // Line
+          } else if (!nextLineIsSmaller && !isLastWord) {
+            if (!formObject.multiline) {
+              continue FontSize;
+            } else {
+              if (
+                (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >
+                height
+              ) {
+                // If the Text is higher than the
+                // FieldObject
+                continue FontSize;
+              }
+              lastWordInLine = key;
+              // go on
+            }
+          } else if (isLastWord) {
+            lastWordInLine = key;
+          } else {
+            if (
+              formObject.multiline &&
+              (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >
+                height
+            ) {
+              // If the Text is higher than the FieldObject
+              continue FontSize;
+            }
+          }
+        }
+        // Remove last blank
+
+        var line = "";
+
+        for (var x = firstWordInLine; x <= lastWordInLine; x++) {
+          var currLine = textSplit[x];
+          if (formObject.multiline) {
+            if (x === lastWordInLine) {
+              line += currLine[currWord] + " ";
+              currWord = (currWord + 1) % currLine.length;
+              continue;
+            }
+            if (x === firstWordInLine) {
+              line += currLine[currLine.length - 1] + " ";
+              continue;
+            }
+          }
+          line += currLine[0] + " ";
+        }
+
+        // Remove last blank
+        line =
+          line.substr(line.length - 1) == " "
+            ? line.substr(0, line.length - 1)
+            : line;
+        // lastLength -= blankSpace.width;
+        lastLength = calculateFontSpace(line, formObject, fontSize).width;
+
+        // Calculate startX
+        switch (formObject.textAlign) {
+          case "right":
+            startX = width - lastLength - borderPadding;
+            break;
+          case "center":
+            startX = (width - lastLength) / 2;
+            break;
+          case "left":
+          default:
+            startX = borderPadding;
+            break;
+        }
+        text += f2(startX) + " " + f2(lastY) + " Td\n";
+        text += "(" + pdfEscape(line) + ") Tj\n";
+        // reset X in PDF
+        text += -f2(startX) + " 0 Td\n";
+
+        // After a Line, adjust y position
+        lastY = -(fontSize + lineSpacing);
+
+        // Reset for next iteration step
+        lastLength = 0;
+        firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;
+        lineCount++;
+
+        lastLine = "";
+        continue Line;
+      }
+    }
+    break;
+  }
+
+  returnValue.text = text;
+  returnValue.fontSize = fontSize;
+
+  return returnValue;
+};
+
+/**
+ * Small workaround for calculating the TextMetric approximately.
+ *
+ * @param text
+ * @param fontsize
+ * @returns {TextMetrics} (Has Height and Width)
+ */
+var calculateFontSpace = function(text, formObject, fontSize) {
+  var font = formObject.scope.internal.getFont(
+    formObject.fontName,
+    formObject.fontStyle
+  );
+  var width =
+    formObject.scope.getStringUnitWidth(text, {
+      font: font,
+      fontSize: parseFloat(fontSize),
+      charSpace: 0
+    }) * parseFloat(fontSize);
+  var height =
+    formObject.scope.getStringUnitWidth("3", {
+      font: font,
+      fontSize: parseFloat(fontSize),
+      charSpace: 0
+    }) *
+    parseFloat(fontSize) *
+    1.5;
+  return { height: height, width: width };
+};
+
+var acroformPluginTemplate = {
+  fields: [],
+  xForms: [],
+  /**
+   * acroFormDictionaryRoot contains information about the AcroForm
+   * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has
+   * 1: The Object ID of the Root
+   */
+  acroFormDictionaryRoot: null,
+  /**
+   * After the PDF gets evaluated, the reference to the root has to be
+   * reset, this indicates, whether the root has already been printed
+   * out
+   */
+  printedOut: false,
+  internal: null,
+  isInitialized: false
+};
+
+var annotReferenceCallback = function(scope) {
+  //set objId to undefined and force it to get a new objId on buildDocument
+  scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;
+  var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;
+  for (var i in fields) {
+    if (fields.hasOwnProperty(i)) {
+      var formObject = fields[i];
+      //set objId to undefined and force it to get a new objId on buildDocument
+      formObject.objId = undefined;
+      // add Annot Reference!
+      if (formObject.hasAnnotation) {
+        // If theres an Annotation Widget in the Form Object, put the
+        // Reference in the /Annot array
+        createAnnotationReference(formObject, scope);
+      }
+    }
+  }
+};
+
+var putForm = function(formObject) {
+  if (formObject.scope.internal.acroformPlugin.printedOut) {
+    formObject.scope.internal.acroformPlugin.printedOut = false;
+    formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;
+  }
+  formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(
+    formObject
+  );
+};
+/**
+ * Create the Reference to the widgetAnnotation, so that it gets referenced
+ * in the Annot[] int the+ (Requires the Annotation Plugin)
+ */
+var createAnnotationReference = function(object, scope) {
+  var options = {
+    type: "reference",
+    object: object
+  };
+  var findEntry = function(entry) {
+    return entry.type === options.type && entry.object === options.object;
+  };
+  if (
+    scope.internal
+      .getPageInfo(object.page)
+      .pageContext.annotations.find(findEntry) === undefined
+  ) {
+    scope.internal
+      .getPageInfo(object.page)
+      .pageContext.annotations.push(options);
+  }
+};
+
+// Callbacks
+
+var putCatalogCallback = function(scope) {
+  // Put reference to AcroForm to DocumentCatalog
+  if (
+    typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== "undefined"
+  ) {
+    // for safety, shouldn't normally be the case
+    scope.internal.write(
+      "/AcroForm " +
+        scope.internal.acroformPlugin.acroFormDictionaryRoot.objId +
+        " " +
+        0 +
+        " R"
+    );
+  } else {
+    throw new Error("putCatalogCallback: Root missing.");
+  }
+};
+
+/**
+ * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm
+ * Dictionary
+ */
+var AcroFormDictionaryCallback = function(scope) {
+  // Remove event
+  scope.internal.events.unsubscribe(
+    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID
+  );
+  delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;
+  scope.internal.acroformPlugin.printedOut = true;
+};
+
+/**
+ * Creates the single Fields and writes them into the Document
+ *
+ * If fieldArray is set, use the fields that are inside it instead of the
+ * fields from the AcroRoot (for the FormXObjects...)
+ */
+var createFieldCallback = function(fieldArray, scope) {
+  var standardFields = !fieldArray;
+
+  if (!fieldArray) {
+    // in case there is no fieldArray specified, we want to print out
+    // the Fields of the AcroForm
+    // Print out Root
+    scope.internal.newObjectDeferredBegin(
+      scope.internal.acroformPlugin.acroFormDictionaryRoot.objId,
+      true
+    );
+    scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();
+  }
+
+  fieldArray =
+    fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;
+
+  for (var i in fieldArray) {
+    if (fieldArray.hasOwnProperty(i)) {
+      var fieldObject = fieldArray[i];
+      var keyValueList = [];
+      var oldRect = fieldObject.Rect;
+
+      if (fieldObject.Rect) {
+        fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);
+      }
+
+      // Start Writing the Object
+      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);
+
+      fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(
+        fieldObject
+      );
+
+      if (
+        typeof fieldObject === "object" &&
+        typeof fieldObject.getKeyValueListForStream === "function"
+      ) {
+        keyValueList = fieldObject.getKeyValueListForStream();
+      }
+
+      fieldObject.Rect = oldRect;
+
+      if (
+        fieldObject.hasAppearanceStream &&
+        !fieldObject.appearanceStreamContent
+      ) {
+        // Calculate Appearance
+        var appearance = calculateAppearanceStream(fieldObject);
+        keyValueList.push({ key: "AP", value: "<</N " + appearance + ">>" });
+
+        scope.internal.acroformPlugin.xForms.push(appearance);
+      }
+
+      // Assume AppearanceStreamContent is a Array with N,R,D (at least
+      // one of them!)
+      if (fieldObject.appearanceStreamContent) {
+        var appearanceStreamString = "";
+        // Iterate over N,R and D
+        for (var k in fieldObject.appearanceStreamContent) {
+          if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {
+            var value = fieldObject.appearanceStreamContent[k];
+            appearanceStreamString += "/" + k + " ";
+            appearanceStreamString += "<<";
+            if (Object.keys(value).length >= 1 || Array.isArray(value)) {
+              // appearanceStream is an Array or Object!
+              for (var i in value) {
+                if (value.hasOwnProperty(i)) {
+                  var obj = value[i];
+                  if (typeof obj === "function") {
+                    // if Function is referenced, call it in order
+                    // to get the FormXObject
+                    obj = obj.call(scope, fieldObject);
+                  }
+                  appearanceStreamString += "/" + i + " " + obj + " ";
+
+                  // In case the XForm is already used, e.g. OffState
+                  // of CheckBoxes, don't add it
+                  if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))
+                    scope.internal.acroformPlugin.xForms.push(obj);
+                }
+              }
+            } else {
+              obj = value;
+              if (typeof obj === "function") {
+                // if Function is referenced, call it in order to
+                // get the FormXObject
+                obj = obj.call(scope, fieldObject);
+              }
+              appearanceStreamString += "/" + i + " " + obj;
+              if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))
+                scope.internal.acroformPlugin.xForms.push(obj);
+            }
+            appearanceStreamString += ">>";
+          }
+        }
+
+        // appearance stream is a normal Object..
+        keyValueList.push({
+          key: "AP",
+          value: "<<\n" + appearanceStreamString + ">>"
+        });
+      }
+
+      scope.internal.putStream({
+        additionalKeyValues: keyValueList,
+        objectId: fieldObject.objId
+      });
+
+      scope.internal.out("endobj");
+    }
+  }
+  if (standardFields) {
+    createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);
+  }
+};
+
+var createXFormObjectCallback = function(fieldArray, scope) {
+  for (var i in fieldArray) {
+    if (fieldArray.hasOwnProperty(i)) {
+      var key = i;
+      var fieldObject = fieldArray[i];
+      // Start Writing the Object
+      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);
+
+      if (
+        typeof fieldObject === "object" &&
+        typeof fieldObject.putStream === "function"
+      ) {
+        fieldObject.putStream();
+      }
+      delete fieldArray[key];
+    }
+  }
+};
+
+var initializeAcroForm = function(scope, formObject) {
+  formObject.scope = scope;
+  if (
+    scope.internal !== undefined &&
+    (scope.internal.acroformPlugin === undefined ||
+      scope.internal.acroformPlugin.isInitialized === false)
+  ) {
+    AcroFormField.FieldNum = 0;
+    scope.internal.acroformPlugin = JSON.parse(
+      JSON.stringify(acroformPluginTemplate)
+    );
+    if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {
+      throw new Error("Exception while creating AcroformDictionary");
+    }
+    scaleFactor = scope.internal.scaleFactor;
+    // The Object Number of the AcroForm Dictionary
+    scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();
+    scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope;
+
+    // add Callback for creating the AcroForm Dictionary
+    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe(
+      "postPutResources",
+      function() {
+        AcroFormDictionaryCallback(scope);
+      }
+    );
+
+    scope.internal.events.subscribe("buildDocument", function() {
+      annotReferenceCallback(scope);
+    }); // buildDocument
+
+    // Register event, that is triggered when the DocumentCatalog is
+    // written, in order to add /AcroForm
+
+    scope.internal.events.subscribe("putCatalog", function() {
+      putCatalogCallback(scope);
+    });
+
+    // Register event, that creates all Fields
+    scope.internal.events.subscribe("postPutPages", function(fieldArray) {
+      createFieldCallback(fieldArray, scope);
+    });
+
+    scope.internal.acroformPlugin.isInitialized = true;
+  }
+};
+
+//PDF 32000-1:2008, page 26, 7.3.6
+var arrayToPdfArray = (jsPDFAPI.__acroform__.arrayToPdfArray = function(
+  array,
+  objId,
+  scope
+) {
+  var encryptor = function(data) {
+    return data;
+  };
+  if (Array.isArray(array)) {
+    var content = "[";
+    for (var i = 0; i < array.length; i++) {
+      if (i !== 0) {
+        content += " ";
+      }
+      switch (typeof array[i]) {
+        case "boolean":
+        case "number":
+        case "object":
+          content += array[i].toString();
+          break;
+        case "string":
+          if (array[i].substr(0, 1) !== "/") {
+            if (typeof objId !== "undefined" && scope)
+              encryptor = scope.internal.getEncryptor(objId);
+            content += "(" + pdfEscape(encryptor(array[i].toString())) + ")";
+          } else {
+            content += array[i].toString();
+          }
+          break;
+      }
+    }
+    content += "]";
+    return content;
+  }
+  throw new Error(
+    "Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray"
+  );
+});
+function getMatches(string, regex, index) {
+  index || (index = 1); // default to the first capturing group
+  var matches = [];
+  var match;
+  while ((match = regex.exec(string))) {
+    matches.push(match[index]);
+  }
+  return matches;
+}
+var pdfArrayToStringArray = function(array) {
+  var result = [];
+  if (typeof array === "string") {
+    result = getMatches(array, /\((.*?)\)/g);
+  }
+  return result;
+};
+
+var toPdfString = function(string, objId, scope) {
+  var encryptor = function(data) {
+    return data;
+  };
+  if (typeof objId !== "undefined" && scope)
+    encryptor = scope.internal.getEncryptor(objId);
+  string = string || "";
+  string.toString();
+  string = "(" + pdfEscape(encryptor(string)) + ")";
+  return string;
+};
+
+// ##########################
+// Classes
+// ##########################
+
+/**
+ * @class AcroFormPDFObject
+ * @classdesc A AcroFormPDFObject
+ */
+var AcroFormPDFObject = function() {
+  this._objId = undefined;
+  this._scope = undefined;
+
+  /**
+   * @name AcroFormPDFObject#objId
+   * @type {any}
+   */
+  Object.defineProperty(this, "objId", {
+    get: function() {
+      if (typeof this._objId === "undefined") {
+        if (typeof this.scope === "undefined") {
+          return undefined;
+        }
+        this._objId = this.scope.internal.newObjectDeferred();
+      }
+      return this._objId;
+    },
+    set: function(value) {
+      this._objId = value;
+    }
+  });
+  Object.defineProperty(this, "scope", {
+    value: this._scope,
+    writable: true
+  });
+};
+
+/**
+ * @function AcroFormPDFObject.toString
+ */
+AcroFormPDFObject.prototype.toString = function() {
+  return this.objId + " 0 R";
+};
+
+AcroFormPDFObject.prototype.putStream = function() {
+  var keyValueList = this.getKeyValueListForStream();
+  this.scope.internal.putStream({
+    data: this.stream,
+    additionalKeyValues: keyValueList,
+    objectId: this.objId
+  });
+  this.scope.internal.out("endobj");
+};
+
+/**
+ * Returns an key-value-List of all non-configurable Variables from the Object
+ *
+ * @name getKeyValueListForStream
+ * @returns {string}
+ */
+AcroFormPDFObject.prototype.getKeyValueListForStream = function() {
+  var keyValueList = [];
+  var keys = Object.getOwnPropertyNames(this).filter(function(key) {
+    return (
+      key != "content" &&
+      key != "appearanceStreamContent" &&
+      key != "scope" &&
+      key != "objId" &&
+      key.substring(0, 1) != "_"
+    );
+  });
+
+  for (var i in keys) {
+    if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {
+      var key = keys[i];
+      var value = this[key];
+
+      if (value) {
+        if (Array.isArray(value)) {
+          keyValueList.push({
+            key: key,
+            value: arrayToPdfArray(value, this.objId, this.scope)
+          });
+        } else if (value instanceof AcroFormPDFObject) {
+          // In case it is a reference to another PDFObject,
+          // take the reference number
+          value.scope = this.scope;
+          keyValueList.push({ key: key, value: value.objId + " 0 R" });
+        } else if (typeof value !== "function") {
+          keyValueList.push({ key: key, value: value });
+        }
+      }
+    }
+  }
+  return keyValueList;
+};
+
+var AcroFormXObject = function() {
+  AcroFormPDFObject.call(this);
+
+  Object.defineProperty(this, "Type", {
+    value: "/XObject",
+    configurable: false,
+    writable: true
+  });
+
+  Object.defineProperty(this, "Subtype", {
+    value: "/Form",
+    configurable: false,
+    writable: true
+  });
+
+  Object.defineProperty(this, "FormType", {
+    value: 1,
+    configurable: false,
+    writable: true
+  });
+
+  var _BBox = [];
+  Object.defineProperty(this, "BBox", {
+    configurable: false,
+    get: function() {
+      return _BBox;
+    },
+    set: function(value) {
+      _BBox = value;
+    }
+  });
+
+  Object.defineProperty(this, "Resources", {
+    value: "2 0 R",
+    configurable: false,
+    writable: true
+  });
+
+  var _stream;
+  Object.defineProperty(this, "stream", {
+    enumerable: false,
+    configurable: true,
+    set: function(value) {
+      _stream = value.trim();
+    },
+    get: function() {
+      if (_stream) {
+        return _stream;
+      } else {
+        return null;
+      }
+    }
+  });
+};
+
+inherit(AcroFormXObject, AcroFormPDFObject);
+
+var AcroFormDictionary = function() {
+  AcroFormPDFObject.call(this);
+
+  var _Kids = [];
+
+  Object.defineProperty(this, "Kids", {
+    enumerable: false,
+    configurable: true,
+    get: function() {
+      if (_Kids.length > 0) {
+        return _Kids;
+      } else {
+        return undefined;
+      }
+    }
+  });
+  Object.defineProperty(this, "Fields", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      return _Kids;
+    }
+  });
+
+  // Default Appearance
+  var _DA;
+  Object.defineProperty(this, "DA", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      if (!_DA) {
+        return undefined;
+      }
+      var encryptor = function(data) {
+        return data;
+      };
+      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+      return "(" + pdfEscape(encryptor(_DA)) + ")";
+    },
+    set: function(value) {
+      _DA = value;
+    }
+  });
+};
+
+inherit(AcroFormDictionary, AcroFormPDFObject);
+
+/**
+ * The Field Object contains the Variables, that every Field needs
+ *
+ * @class AcroFormField
+ * @classdesc An AcroForm FieldObject
+ */
+var AcroFormField = function() {
+  AcroFormPDFObject.call(this);
+
+  //Annotation-Flag See Table 165
+  var _F = 4;
+  Object.defineProperty(this, "F", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      return _F;
+    },
+    set: function(value) {
+      if (!isNaN(value)) {
+        _F = value;
+      } else {
+        throw new Error(
+          'Invalid value "' + value + '" for attribute F supplied.'
+        );
+      }
+    }
+  });
+
+  /**
+   * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.
+   * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.
+   *
+   * @name AcroFormField#showWhenPrinted
+   * @default true
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "showWhenPrinted", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(_F, 3));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.F = setBitForPdf(_F, 3);
+      } else {
+        this.F = clearBitForPdf(_F, 3);
+      }
+    }
+  });
+
+  var _Ff = 0;
+  Object.defineProperty(this, "Ff", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      return _Ff;
+    },
+    set: function(value) {
+      if (!isNaN(value)) {
+        _Ff = value;
+      } else {
+        throw new Error(
+          'Invalid value "' + value + '" for attribute Ff supplied.'
+        );
+      }
+    }
+  });
+
+  var _Rect = [];
+  Object.defineProperty(this, "Rect", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      if (_Rect.length === 0) {
+        return undefined;
+      }
+      return _Rect;
+    },
+    set: function(value) {
+      if (typeof value !== "undefined") {
+        _Rect = value;
+      } else {
+        _Rect = [];
+      }
+    }
+  });
+
+  /**
+   * The x-position of the field.
+   *
+   * @name AcroFormField#x
+   * @default null
+   * @type {number}
+   */
+  Object.defineProperty(this, "x", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      if (!_Rect || isNaN(_Rect[0])) {
+        return 0;
+      }
+      return _Rect[0];
+    },
+    set: function(value) {
+      _Rect[0] = value;
+    }
+  });
+
+  /**
+   * The y-position of the field.
+   *
+   * @name AcroFormField#y
+   * @default null
+   * @type {number}
+   */
+  Object.defineProperty(this, "y", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      if (!_Rect || isNaN(_Rect[1])) {
+        return 0;
+      }
+      return _Rect[1];
+    },
+    set: function(value) {
+      _Rect[1] = value;
+    }
+  });
+
+  /**
+   * The width of the field.
+   *
+   * @name AcroFormField#width
+   * @default null
+   * @type {number}
+   */
+  Object.defineProperty(this, "width", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      if (!_Rect || isNaN(_Rect[2])) {
+        return 0;
+      }
+      return _Rect[2];
+    },
+    set: function(value) {
+      _Rect[2] = value;
+    }
+  });
+
+  /**
+   * The height of the field.
+   *
+   * @name AcroFormField#height
+   * @default null
+   * @type {number}
+   */
+  Object.defineProperty(this, "height", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      if (!_Rect || isNaN(_Rect[3])) {
+        return 0;
+      }
+      return _Rect[3];
+    },
+    set: function(value) {
+      _Rect[3] = value;
+    }
+  });
+
+  var _FT = "";
+  Object.defineProperty(this, "FT", {
+    enumerable: true,
+    configurable: false,
+    get: function() {
+      return _FT;
+    },
+    set: function(value) {
+      switch (value) {
+        case "/Btn":
+        case "/Tx":
+        case "/Ch":
+        case "/Sig":
+          _FT = value;
+          break;
+        default:
+          throw new Error(
+            'Invalid value "' + value + '" for attribute FT supplied.'
+          );
+      }
+    }
+  });
+
+  var _T = null;
+
+  Object.defineProperty(this, "T", {
+    enumerable: true,
+    configurable: false,
+    get: function() {
+      if (!_T || _T.length < 1) {
+        // In case of a Child from a Radio´Group, you don't need a FieldName
+        if (this instanceof AcroFormChildClass) {
+          return undefined;
+        }
+        _T = "FieldObject" + AcroFormField.FieldNum++;
+      }
+      var encryptor = function(data) {
+        return data;
+      };
+      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+      return "(" + pdfEscape(encryptor(_T)) + ")";
+    },
+    set: function(value) {
+      _T = value.toString();
+    }
+  });
+
+  /**
+   * (Optional) The partial field name (see 12.7.3.2, “Field Names”).
+   *
+   * @name AcroFormField#fieldName
+   * @default null
+   * @type {string}
+   */
+  Object.defineProperty(this, "fieldName", {
+    configurable: true,
+    enumerable: true,
+    get: function() {
+      return _T;
+    },
+    set: function(value) {
+      _T = value;
+    }
+  });
+
+  var _fontName = "helvetica";
+  /**
+   * The fontName of the font to be used.
+   *
+   * @name AcroFormField#fontName
+   * @default 'helvetica'
+   * @type {string}
+   */
+  Object.defineProperty(this, "fontName", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _fontName;
+    },
+    set: function(value) {
+      _fontName = value;
+    }
+  });
+
+  var _fontStyle = "normal";
+  /**
+   * The fontStyle of the font to be used.
+   *
+   * @name AcroFormField#fontStyle
+   * @default 'normal'
+   * @type {string}
+   */
+  Object.defineProperty(this, "fontStyle", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _fontStyle;
+    },
+    set: function(value) {
+      _fontStyle = value;
+    }
+  });
+
+  var _fontSize = 0;
+  /**
+   * The fontSize of the font to be used.
+   *
+   * @name AcroFormField#fontSize
+   * @default 0 (for auto)
+   * @type {number}
+   */
+  Object.defineProperty(this, "fontSize", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _fontSize;
+    },
+    set: function(value) {
+      _fontSize = value;
+    }
+  });
+
+  var _maxFontSize = undefined;
+  /**
+   * The maximum fontSize of the font to be used.
+   *
+   * @name AcroFormField#maxFontSize
+   * @default 0 (for auto)
+   * @type {number}
+   */
+  Object.defineProperty(this, "maxFontSize", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      if (_maxFontSize === undefined) {
+        // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)
+        // ("50" is transformed to the "user space" but then used in "pdf space")
+        return 50 / scaleFactor;
+      } else {
+        return _maxFontSize;
+      }
+    },
+    set: function(value) {
+      _maxFontSize = value;
+    }
+  });
+
+  var _color = "black";
+  /**
+   * The color of the text
+   *
+   * @name AcroFormField#color
+   * @default 'black'
+   * @type {string|rgba}
+   */
+  Object.defineProperty(this, "color", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _color;
+    },
+    set: function(value) {
+      _color = value;
+    }
+  });
+
+  var _DA = "/F1 0 Tf 0 g";
+  // Defines the default appearance (Needed for variable Text)
+  Object.defineProperty(this, "DA", {
+    enumerable: true,
+    configurable: false,
+    get: function() {
+      if (
+        !_DA ||
+        this instanceof AcroFormChildClass ||
+        this instanceof AcroFormTextField
+      ) {
+        return undefined;
+      }
+      return toPdfString(_DA, this.objId, this.scope);
+    },
+    set: function(value) {
+      value = value.toString();
+      _DA = value;
+    }
+  });
+
+  var _DV = null;
+  Object.defineProperty(this, "DV", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      if (!_DV) {
+        return undefined;
+      }
+      if (this instanceof AcroFormButton === false) {
+        return toPdfString(_DV, this.objId, this.scope);
+      }
+      return _DV;
+    },
+    set: function(value) {
+      value = value.toString();
+      if (this instanceof AcroFormButton === false) {
+        if (value.substr(0, 1) === "(") {
+          _DV = pdfUnescape(value.substr(1, value.length - 2));
+        } else {
+          _DV = pdfUnescape(value);
+        }
+      } else {
+        _DV = value;
+      }
+    }
+  });
+
+  /**
+   * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.
+   *
+   * @name AcroFormField#defaultValue
+   * @default null
+   * @type {any}
+   */
+  Object.defineProperty(this, "defaultValue", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      if (this instanceof AcroFormButton === true) {
+        return pdfUnescape(_DV.substr(1, _DV.length - 1));
+      } else {
+        return _DV;
+      }
+    },
+    set: function(value) {
+      value = value.toString();
+      if (this instanceof AcroFormButton === true) {
+        _DV = "/" + value;
+      } else {
+        _DV = value;
+      }
+    }
+  });
+
+  var _V = null;
+  Object.defineProperty(this, "_V", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      if (!_V) {
+        return undefined;
+      }
+      return _V;
+    },
+    set: function(value) {
+      this.V = value;
+    }
+  });
+  Object.defineProperty(this, "V", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      if (!_V) {
+        return undefined;
+      }
+      if (this instanceof AcroFormButton === false) {
+        return toPdfString(_V, this.objId, this.scope);
+      }
+      return _V;
+    },
+    set: function(value) {
+      value = value.toString();
+      if (this instanceof AcroFormButton === false) {
+        if (value.substr(0, 1) === "(") {
+          _V = pdfUnescape(value.substr(1, value.length - 2));
+        } else {
+          _V = pdfUnescape(value);
+        }
+      } else {
+        _V = value;
+      }
+    }
+  });
+
+  /**
+   * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.
+   *
+   * @name AcroFormField#value
+   * @default null
+   * @type {any}
+   */
+  Object.defineProperty(this, "value", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      if (this instanceof AcroFormButton === true) {
+        return pdfUnescape(_V.substr(1, _V.length - 1));
+      } else {
+        return _V;
+      }
+    },
+    set: function(value) {
+      value = value.toString();
+      if (this instanceof AcroFormButton === true) {
+        _V = "/" + value;
+      } else {
+        _V = value;
+      }
+    }
+  });
+
+  /**
+   * Check if field has annotations
+   *
+   * @name AcroFormField#hasAnnotation
+   * @readonly
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "hasAnnotation", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return this.Rect;
+    }
+  });
+
+  Object.defineProperty(this, "Type", {
+    enumerable: true,
+    configurable: false,
+    get: function() {
+      return this.hasAnnotation ? "/Annot" : null;
+    }
+  });
+
+  Object.defineProperty(this, "Subtype", {
+    enumerable: true,
+    configurable: false,
+    get: function() {
+      return this.hasAnnotation ? "/Widget" : null;
+    }
+  });
+
+  var _hasAppearanceStream = false;
+  /**
+   * true if field has an appearanceStream
+   *
+   * @name AcroFormField#hasAppearanceStream
+   * @readonly
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "hasAppearanceStream", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _hasAppearanceStream;
+    },
+    set: function(value) {
+      value = Boolean(value);
+      _hasAppearanceStream = value;
+    }
+  });
+
+  /**
+   * The page on which the AcroFormField is placed
+   *
+   * @name AcroFormField#page
+   * @type {number}
+   */
+  var _page;
+  Object.defineProperty(this, "page", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      if (!_page) {
+        return undefined;
+      }
+      return _page;
+    },
+    set: function(value) {
+      _page = value;
+    }
+  });
+
+  /**
+   * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.
+   *
+   * @name AcroFormField#readOnly
+   * @default false
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "readOnly", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 1));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 1);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 1);
+      }
+    }
+  });
+
+  /**
+   * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).
+   *
+   * @name AcroFormField#required
+   * @default false
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "required", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 2));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 2);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 2);
+      }
+    }
+  });
+
+  /**
+   * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)
+   *
+   * @name AcroFormField#noExport
+   * @default false
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "noExport", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 3));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 3);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 3);
+      }
+    }
+  });
+
+  var _Q = null;
+  Object.defineProperty(this, "Q", {
+    enumerable: true,
+    configurable: false,
+    get: function() {
+      if (_Q === null) {
+        return undefined;
+      }
+      return _Q;
+    },
+    set: function(value) {
+      if ([0, 1, 2].indexOf(value) !== -1) {
+        _Q = value;
+      } else {
+        throw new Error(
+          'Invalid value "' + value + '" for attribute Q supplied.'
+        );
+      }
+    }
+  });
+
+  /**
+   * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:
+   * 'left', 'center', 'right'
+   *
+   * @name AcroFormField#textAlign
+   * @default 'left'
+   * @type {string}
+   */
+  Object.defineProperty(this, "textAlign", {
+    get: function() {
+      var result;
+      switch (_Q) {
+        case 0:
+        default:
+          result = "left";
+          break;
+        case 1:
+          result = "center";
+          break;
+        case 2:
+          result = "right";
+          break;
+      }
+      return result;
+    },
+    configurable: true,
+    enumerable: true,
+    set: function(value) {
+      switch (value) {
+        case "right":
+        case 2:
+          _Q = 2;
+          break;
+        case "center":
+        case 1:
+          _Q = 1;
+          break;
+        case "left":
+        case 0:
+        default:
+          _Q = 0;
+      }
+    }
+  });
+};
+
+inherit(AcroFormField, AcroFormPDFObject);
+
+/**
+ * @class AcroFormChoiceField
+ * @extends AcroFormField
+ */
+var AcroFormChoiceField = function() {
+  AcroFormField.call(this);
+  // Field Type = Choice Field
+  this.FT = "/Ch";
+  // options
+  this.V = "()";
+
+  this.fontName = "zapfdingbats";
+  // Top Index
+  var _TI = 0;
+
+  Object.defineProperty(this, "TI", {
+    enumerable: true,
+    configurable: false,
+    get: function() {
+      return _TI;
+    },
+    set: function(value) {
+      _TI = value;
+    }
+  });
+
+  /**
+   * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.
+   *
+   * @name AcroFormChoiceField#topIndex
+   * @default 0
+   * @type {number}
+   */
+  Object.defineProperty(this, "topIndex", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _TI;
+    },
+    set: function(value) {
+      _TI = value;
+    }
+  });
+
+  var _Opt = [];
+  Object.defineProperty(this, "Opt", {
+    enumerable: true,
+    configurable: false,
+    get: function() {
+      return arrayToPdfArray(_Opt, this.objId, this.scope);
+    },
+    set: function(value) {
+      _Opt = pdfArrayToStringArray(value);
+    }
+  });
+
+  /**
+   * @memberof AcroFormChoiceField
+   * @name getOptions
+   * @function
+   * @instance
+   * @returns {array} array of Options
+   */
+  this.getOptions = function() {
+    return _Opt;
+  };
+
+  /**
+   * @memberof AcroFormChoiceField
+   * @name setOptions
+   * @function
+   * @instance
+   * @param {array} value
+   */
+  this.setOptions = function(value) {
+    _Opt = value;
+    if (this.sort) {
+      _Opt.sort();
+    }
+  };
+
+  /**
+   * @memberof AcroFormChoiceField
+   * @name addOption
+   * @function
+   * @instance
+   * @param {string} value
+   */
+  this.addOption = function(value) {
+    value = value || "";
+    value = value.toString();
+    _Opt.push(value);
+    if (this.sort) {
+      _Opt.sort();
+    }
+  };
+
+  /**
+   * @memberof AcroFormChoiceField
+   * @name removeOption
+   * @function
+   * @instance
+   * @param {string} value
+   * @param {boolean} allEntries (default: false)
+   */
+  this.removeOption = function(value, allEntries) {
+    allEntries = allEntries || false;
+    value = value || "";
+    value = value.toString();
+
+    while (_Opt.indexOf(value) !== -1) {
+      _Opt.splice(_Opt.indexOf(value), 1);
+      if (allEntries === false) {
+        break;
+      }
+    }
+  };
+
+  /**
+   * If set, the field is a combo box; if clear, the field is a list box.
+   *
+   * @name AcroFormChoiceField#combo
+   * @default false
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "combo", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 18));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 18);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 18);
+      }
+    }
+  });
+
+  /**
+   * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.
+   *
+   * @name AcroFormChoiceField#edit
+   * @default false
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "edit", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 19));
+    },
+    set: function(value) {
+      //PDF 32000-1:2008, page 444
+      if (this.combo === true) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 19);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 19);
+        }
+      }
+    }
+  });
+
+  /**
+   * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).
+   *
+   * @name AcroFormChoiceField#sort
+   * @default false
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "sort", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 20));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 20);
+        _Opt.sort();
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 20);
+      }
+    }
+  });
+
+  /**
+   * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected
+   *
+   * @name AcroFormChoiceField#multiSelect
+   * @default false
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "multiSelect", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 22));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 22);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 22);
+      }
+    }
+  });
+
+  /**
+   * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.
+   *
+   * @name AcroFormChoiceField#doNotSpellCheck
+   * @default false
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "doNotSpellCheck", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 23));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 23);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 23);
+      }
+    }
+  });
+
+  /**
+   * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.
+   * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.
+   *
+   * @name AcroFormChoiceField#commitOnSelChange
+   * @default false
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "commitOnSelChange", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 27));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 27);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 27);
+      }
+    }
+  });
+
+  this.hasAppearanceStream = false;
+};
+inherit(AcroFormChoiceField, AcroFormField);
+
+/**
+ * @class AcroFormListBox
+ * @extends AcroFormChoiceField
+ * @extends AcroFormField
+ */
+var AcroFormListBox = function() {
+  AcroFormChoiceField.call(this);
+  this.fontName = "helvetica";
+
+  //PDF 32000-1:2008, page 444
+  this.combo = false;
+};
+inherit(AcroFormListBox, AcroFormChoiceField);
+
+/**
+ * @class AcroFormComboBox
+ * @extends AcroFormListBox
+ * @extends AcroFormChoiceField
+ * @extends AcroFormField
+ */
+var AcroFormComboBox = function() {
+  AcroFormListBox.call(this);
+  this.combo = true;
+};
+inherit(AcroFormComboBox, AcroFormListBox);
+
+/**
+ * @class AcroFormEditBox
+ * @extends AcroFormComboBox
+ * @extends AcroFormListBox
+ * @extends AcroFormChoiceField
+ * @extends AcroFormField
+ */
+var AcroFormEditBox = function() {
+  AcroFormComboBox.call(this);
+  this.edit = true;
+};
+inherit(AcroFormEditBox, AcroFormComboBox);
+
+/**
+ * @class AcroFormButton
+ * @extends AcroFormField
+ */
+var AcroFormButton = function() {
+  AcroFormField.call(this);
+  this.FT = "/Btn";
+
+  /**
+   * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.
+   *
+   * @name AcroFormButton#noToggleToOff
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "noToggleToOff", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 15));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 15);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 15);
+      }
+    }
+  });
+
+  /**
+   * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.
+   *
+   * @name AcroFormButton#radio
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "radio", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 16));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 16);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 16);
+      }
+    }
+  });
+
+  /**
+   * If set, the field is a pushbutton that does not retain a permanent value.
+   *
+   * @name AcroFormButton#pushButton
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "pushButton", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 17));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 17);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 17);
+      }
+    }
+  });
+
+  /**
+   * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).
+   *
+   * @name AcroFormButton#radioIsUnison
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "radioIsUnison", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 26));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 26);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 26);
+      }
+    }
+  });
+
+  var _MK = {};
+  Object.defineProperty(this, "MK", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      var encryptor = function(data) {
+        return data;
+      };
+      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+      if (Object.keys(_MK).length !== 0) {
+        var result = [];
+        result.push("<<");
+        var key;
+        for (key in _MK) {
+          result.push("/" + key + " (" + pdfEscape(encryptor(_MK[key])) + ")");
+        }
+        result.push(">>");
+        return result.join("\n");
+      }
+      return undefined;
+    },
+    set: function(value) {
+      if (typeof value === "object") {
+        _MK = value;
+      }
+    }
+  });
+
+  /**
+   * From the PDF reference:
+   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.
+   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields").
+   *
+   * - '8' = Cross,
+   * - 'l' =  Circle,
+   * - '' = nothing
+   * @name AcroFormButton#caption
+   * @type {string}
+   */
+  Object.defineProperty(this, "caption", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _MK.CA || "";
+    },
+    set: function(value) {
+      if (typeof value === "string") {
+        _MK.CA = value;
+      }
+    }
+  });
+
+  var _AS;
+  Object.defineProperty(this, "AS", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      return _AS;
+    },
+    set: function(value) {
+      _AS = value;
+    }
+  });
+
+  /**
+   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams")
+   *
+   * @name AcroFormButton#appearanceState
+   * @type {any}
+   */
+  Object.defineProperty(this, "appearanceState", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _AS.substr(1, _AS.length - 1);
+    },
+    set: function(value) {
+      _AS = "/" + value;
+    }
+  });
+};
+inherit(AcroFormButton, AcroFormField);
+
+/**
+ * @class AcroFormPushButton
+ * @extends AcroFormButton
+ * @extends AcroFormField
+ */
+var AcroFormPushButton = function() {
+  AcroFormButton.call(this);
+  this.pushButton = true;
+};
+inherit(AcroFormPushButton, AcroFormButton);
+
+/**
+ * @class AcroFormRadioButton
+ * @extends AcroFormButton
+ * @extends AcroFormField
+ */
+var AcroFormRadioButton = function() {
+  AcroFormButton.call(this);
+  this.radio = true;
+  this.pushButton = false;
+
+  var _Kids = [];
+  Object.defineProperty(this, "Kids", {
+    enumerable: true,
+    configurable: false,
+    get: function() {
+      return _Kids;
+    },
+    set: function(value) {
+      if (typeof value !== "undefined") {
+        _Kids = value;
+      } else {
+        _Kids = [];
+      }
+    }
+  });
+};
+inherit(AcroFormRadioButton, AcroFormButton);
+
+/**
+ * The Child class of a RadioButton (the radioGroup) -> The single Buttons
+ *
+ * @class AcroFormChildClass
+ * @extends AcroFormField
+ * @ignore
+ */
+var AcroFormChildClass = function() {
+  AcroFormField.call(this);
+
+  var _parent;
+  Object.defineProperty(this, "Parent", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      return _parent;
+    },
+    set: function(value) {
+      _parent = value;
+    }
+  });
+
+  var _optionName;
+  Object.defineProperty(this, "optionName", {
+    enumerable: false,
+    configurable: true,
+    get: function() {
+      return _optionName;
+    },
+    set: function(value) {
+      _optionName = value;
+    }
+  });
+
+  var _MK = {};
+  Object.defineProperty(this, "MK", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      var encryptor = function(data) {
+        return data;
+      };
+      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+      var result = [];
+      result.push("<<");
+      var key;
+      for (key in _MK) {
+        result.push("/" + key + " (" + pdfEscape(encryptor(_MK[key])) + ")");
+      }
+      result.push(">>");
+      return result.join("\n");
+    },
+    set: function(value) {
+      if (typeof value === "object") {
+        _MK = value;
+      }
+    }
+  });
+
+  /**
+   * From the PDF reference:
+   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.
+   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields").
+   *
+   * - '8' = Cross,
+   * - 'l' =  Circle,
+   * - '' = nothing
+   * @name AcroFormButton#caption
+   * @type {string}
+   */
+  Object.defineProperty(this, "caption", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _MK.CA || "";
+    },
+    set: function(value) {
+      if (typeof value === "string") {
+        _MK.CA = value;
+      }
+    }
+  });
+
+  var _AS;
+  Object.defineProperty(this, "AS", {
+    enumerable: false,
+    configurable: false,
+    get: function() {
+      return _AS;
+    },
+    set: function(value) {
+      _AS = value;
+    }
+  });
+
+  /**
+   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams")
+   *
+   * @name AcroFormButton#appearanceState
+   * @type {any}
+   */
+  Object.defineProperty(this, "appearanceState", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _AS.substr(1, _AS.length - 1);
+    },
+    set: function(value) {
+      _AS = "/" + value;
+    }
+  });
+  this.caption = "l";
+  this.appearanceState = "Off";
+  // todo: set AppearanceType as variable that can be set from the
+  // outside...
+  this._AppearanceType = AcroFormAppearance.RadioButton.Circle;
+  // The Default appearanceType is the Circle
+  this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(
+    this.optionName
+  );
+};
+inherit(AcroFormChildClass, AcroFormField);
+
+AcroFormRadioButton.prototype.setAppearance = function(appearance) {
+  if (!("createAppearanceStream" in appearance && "getCA" in appearance)) {
+    throw new Error(
+      "Couldn't assign Appearance to RadioButton. Appearance was Invalid!"
+    );
+  }
+  for (var objId in this.Kids) {
+    if (this.Kids.hasOwnProperty(objId)) {
+      var child = this.Kids[objId];
+      child.appearanceStreamContent = appearance.createAppearanceStream(
+        child.optionName
+      );
+      child.caption = appearance.getCA();
+    }
+  }
+};
+
+AcroFormRadioButton.prototype.createOption = function(name) {
+  // Create new Child for RadioGroup
+  var child = new AcroFormChildClass();
+  child.Parent = this;
+  child.optionName = name;
+  // Add to Parent
+  this.Kids.push(child);
+
+  addField.call(this.scope, child);
+
+  return child;
+};
+
+/**
+ * @class AcroFormCheckBox
+ * @extends AcroFormButton
+ * @extends AcroFormField
+ */
+var AcroFormCheckBox = function() {
+  AcroFormButton.call(this);
+
+  this.fontName = "zapfdingbats";
+  this.caption = "3";
+  this.appearanceState = "On";
+  this.value = "On";
+  this.textAlign = "center";
+  this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();
+};
+inherit(AcroFormCheckBox, AcroFormButton);
+
+/**
+ * @class AcroFormTextField
+ * @extends AcroFormField
+ */
+var AcroFormTextField = function() {
+  AcroFormField.call(this);
+  this.FT = "/Tx";
+
+  /**
+   * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.
+   *
+   * @name AcroFormTextField#multiline
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "multiline", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 13));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 13);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 13);
+      }
+    }
+  });
+
+  /**
+   * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.
+   *
+   * @name AcroFormTextField#fileSelect
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "fileSelect", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 21));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 21);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 21);
+      }
+    }
+  });
+
+  /**
+   * (PDF 1.4) If set, text entered in the field shall not be spell-checked.
+   *
+   * @name AcroFormTextField#doNotSpellCheck
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "doNotSpellCheck", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 23));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 23);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 23);
+      }
+    }
+  });
+
+  /**
+   * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.
+   *
+   * @name AcroFormTextField#doNotScroll
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "doNotScroll", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 24));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 24);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 24);
+      }
+    }
+  });
+
+  /**
+   * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.
+   *
+   * @name AcroFormTextField#comb
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "comb", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 25));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 25);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 25);
+      }
+    }
+  });
+
+  /**
+   * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.
+   *
+   * @name AcroFormTextField#richText
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "richText", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 26));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 26);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 26);
+      }
+    }
+  });
+
+  var _MaxLen = null;
+  Object.defineProperty(this, "MaxLen", {
+    enumerable: true,
+    configurable: false,
+    get: function() {
+      return _MaxLen;
+    },
+    set: function(value) {
+      _MaxLen = value;
+    }
+  });
+
+  /**
+   * (Optional; inheritable) The maximum length of the field’s text, in characters.
+   *
+   * @name AcroFormTextField#maxLength
+   * @type {number}
+   */
+  Object.defineProperty(this, "maxLength", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return _MaxLen;
+    },
+    set: function(value) {
+      if (Number.isInteger(value)) {
+        _MaxLen = value;
+      }
+    }
+  });
+
+  Object.defineProperty(this, "hasAppearanceStream", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return this.V || this.DV;
+    }
+  });
+};
+inherit(AcroFormTextField, AcroFormField);
+
+/**
+ * @class AcroFormPasswordField
+ * @extends AcroFormTextField
+ * @extends AcroFormField
+ */
+var AcroFormPasswordField = function() {
+  AcroFormTextField.call(this);
+
+  /**
+   * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.
+   * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.
+   *
+   * @name AcroFormTextField#password
+   * @type {boolean}
+   */
+  Object.defineProperty(this, "password", {
+    enumerable: true,
+    configurable: true,
+    get: function() {
+      return Boolean(getBitForPdf(this.Ff, 14));
+    },
+    set: function(value) {
+      if (Boolean(value) === true) {
+        this.Ff = setBitForPdf(this.Ff, 14);
+      } else {
+        this.Ff = clearBitForPdf(this.Ff, 14);
+      }
+    }
+  });
+  this.password = true;
+};
+inherit(AcroFormPasswordField, AcroFormTextField);
+
+// Contains Methods for creating standard appearances
+var AcroFormAppearance = {
+  CheckBox: {
+    createAppearanceStream: function() {
+      var appearance = {
+        N: {
+          On: AcroFormAppearance.CheckBox.YesNormal
+        },
+        D: {
+          On: AcroFormAppearance.CheckBox.YesPushDown,
+          Off: AcroFormAppearance.CheckBox.OffPushDown
+        }
+      };
+
+      return appearance;
+    },
+    /**
+     * Returns the standard On Appearance for a CheckBox
+     *
+     * @returns {AcroFormXObject}
+     */
+    YesPushDown: function(formObject) {
+      var xobj = createFormXObject(formObject);
+      xobj.scope = formObject.scope;
+      var stream = [];
+      var fontKey = formObject.scope.internal.getFont(
+        formObject.fontName,
+        formObject.fontStyle
+      ).id;
+      var encodedColor = formObject.scope.__private__.encodeColorString(
+        formObject.color
+      );
+      var calcRes = calculateX(formObject, formObject.caption);
+      stream.push("0.749023 g");
+      stream.push(
+        "0 0 " +
+          f2(AcroFormAppearance.internal.getWidth(formObject)) +
+          " " +
+          f2(AcroFormAppearance.internal.getHeight(formObject)) +
+          " re"
+      );
+      stream.push("f");
+      stream.push("BMC");
+      stream.push("q");
+      stream.push("0 0 1 rg");
+      stream.push(
+        "/" + fontKey + " " + f2(calcRes.fontSize) + " Tf " + encodedColor
+      );
+      stream.push("BT");
+      stream.push(calcRes.text);
+      stream.push("ET");
+      stream.push("Q");
+      stream.push("EMC");
+      xobj.stream = stream.join("\n");
+      return xobj;
+    },
+
+    YesNormal: function(formObject) {
+      var xobj = createFormXObject(formObject);
+      xobj.scope = formObject.scope;
+      var fontKey = formObject.scope.internal.getFont(
+        formObject.fontName,
+        formObject.fontStyle
+      ).id;
+      var encodedColor = formObject.scope.__private__.encodeColorString(
+        formObject.color
+      );
+      var stream = [];
+      var height = AcroFormAppearance.internal.getHeight(formObject);
+      var width = AcroFormAppearance.internal.getWidth(formObject);
+      var calcRes = calculateX(formObject, formObject.caption);
+      stream.push("1 g");
+      stream.push("0 0 " + f2(width) + " " + f2(height) + " re");
+      stream.push("f");
+      stream.push("q");
+      stream.push("0 0 1 rg");
+      stream.push("0 0 " + f2(width - 1) + " " + f2(height - 1) + " re");
+      stream.push("W");
+      stream.push("n");
+      stream.push("0 g");
+      stream.push("BT");
+      stream.push(
+        "/" + fontKey + " " + f2(calcRes.fontSize) + " Tf " + encodedColor
+      );
+      stream.push(calcRes.text);
+      stream.push("ET");
+      stream.push("Q");
+      xobj.stream = stream.join("\n");
+      return xobj;
+    },
+
+    /**
+     * Returns the standard Off Appearance for a CheckBox
+     *
+     * @returns {AcroFormXObject}
+     */
+    OffPushDown: function(formObject) {
+      var xobj = createFormXObject(formObject);
+      xobj.scope = formObject.scope;
+      var stream = [];
+      stream.push("0.749023 g");
+      stream.push(
+        "0 0 " +
+          f2(AcroFormAppearance.internal.getWidth(formObject)) +
+          " " +
+          f2(AcroFormAppearance.internal.getHeight(formObject)) +
+          " re"
+      );
+      stream.push("f");
+      xobj.stream = stream.join("\n");
+      return xobj;
+    }
+  },
+
+  RadioButton: {
+    Circle: {
+      createAppearanceStream: function(name) {
+        var appearanceStreamContent = {
+          D: {
+            Off: AcroFormAppearance.RadioButton.Circle.OffPushDown
+          },
+          N: {}
+        };
+        appearanceStreamContent.N[name] =
+          AcroFormAppearance.RadioButton.Circle.YesNormal;
+        appearanceStreamContent.D[name] =
+          AcroFormAppearance.RadioButton.Circle.YesPushDown;
+        return appearanceStreamContent;
+      },
+      getCA: function() {
+        return "l";
+      },
+
+      YesNormal: function(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        // Make the Radius of the Circle relative to min(height, width) of formObject
+        var DotRadius =
+          AcroFormAppearance.internal.getWidth(formObject) <=
+          AcroFormAppearance.internal.getHeight(formObject)
+            ? AcroFormAppearance.internal.getWidth(formObject) / 4
+            : AcroFormAppearance.internal.getHeight(formObject) / 4;
+        // The Borderpadding...
+        DotRadius = Number((DotRadius * 0.9).toFixed(5));
+        var c = AcroFormAppearance.internal.Bezier_C;
+        var DotRadiusBezier = Number((DotRadius * c).toFixed(5));
+        /*
+         * The Following is a Circle created with Bezier-Curves.
+         */
+        stream.push("q");
+        stream.push(
+          "1 0 0 1 " +
+            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +
+            " " +
+            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +
+            " cm"
+        );
+        stream.push(DotRadius + " 0 m");
+        stream.push(
+          DotRadius +
+            " " +
+            DotRadiusBezier +
+            " " +
+            DotRadiusBezier +
+            " " +
+            DotRadius +
+            " 0 " +
+            DotRadius +
+            " c"
+        );
+        stream.push(
+          "-" +
+            DotRadiusBezier +
+            " " +
+            DotRadius +
+            " -" +
+            DotRadius +
+            " " +
+            DotRadiusBezier +
+            " -" +
+            DotRadius +
+            " 0 c"
+        );
+        stream.push(
+          "-" +
+            DotRadius +
+            " -" +
+            DotRadiusBezier +
+            " -" +
+            DotRadiusBezier +
+            " -" +
+            DotRadius +
+            " 0 -" +
+            DotRadius +
+            " c"
+        );
+        stream.push(
+          DotRadiusBezier +
+            " -" +
+            DotRadius +
+            " " +
+            DotRadius +
+            " -" +
+            DotRadiusBezier +
+            " " +
+            DotRadius +
+            " 0 c"
+        );
+        stream.push("f");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      },
+      YesPushDown: function(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        var DotRadius =
+          AcroFormAppearance.internal.getWidth(formObject) <=
+          AcroFormAppearance.internal.getHeight(formObject)
+            ? AcroFormAppearance.internal.getWidth(formObject) / 4
+            : AcroFormAppearance.internal.getHeight(formObject) / 4;
+        // The Borderpadding...
+        DotRadius = Number((DotRadius * 0.9).toFixed(5));
+        // Save results for later use; no need to waste
+        // processor ticks on doing math
+        var k = Number((DotRadius * 2).toFixed(5));
+        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));
+        var dc = Number(
+          (DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5)
+        );
+
+        stream.push("0.749023 g");
+        stream.push("q");
+        stream.push(
+          "1 0 0 1 " +
+            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +
+            " " +
+            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +
+            " cm"
+        );
+        stream.push(k + " 0 m");
+        stream.push(k + " " + kc + " " + kc + " " + k + " 0 " + k + " c");
+        stream.push(
+          "-" + kc + " " + k + " -" + k + " " + kc + " -" + k + " 0 c"
+        );
+        stream.push(
+          "-" + k + " -" + kc + " -" + kc + " -" + k + " 0 -" + k + " c"
+        );
+        stream.push(kc + " -" + k + " " + k + " -" + kc + " " + k + " 0 c");
+        stream.push("f");
+        stream.push("Q");
+        stream.push("0 g");
+        stream.push("q");
+        stream.push(
+          "1 0 0 1 " +
+            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +
+            " " +
+            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +
+            " cm"
+        );
+        stream.push(DotRadius + " 0 m");
+        stream.push(
+          "" +
+            DotRadius +
+            " " +
+            dc +
+            " " +
+            dc +
+            " " +
+            DotRadius +
+            " 0 " +
+            DotRadius +
+            " c"
+        );
+        stream.push(
+          "-" +
+            dc +
+            " " +
+            DotRadius +
+            " -" +
+            DotRadius +
+            " " +
+            dc +
+            " -" +
+            DotRadius +
+            " 0 c"
+        );
+        stream.push(
+          "-" +
+            DotRadius +
+            " -" +
+            dc +
+            " -" +
+            dc +
+            " -" +
+            DotRadius +
+            " 0 -" +
+            DotRadius +
+            " c"
+        );
+        stream.push(
+          dc +
+            " -" +
+            DotRadius +
+            " " +
+            DotRadius +
+            " -" +
+            dc +
+            " " +
+            DotRadius +
+            " 0 c"
+        );
+        stream.push("f");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      },
+      OffPushDown: function(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        var DotRadius =
+          AcroFormAppearance.internal.getWidth(formObject) <=
+          AcroFormAppearance.internal.getHeight(formObject)
+            ? AcroFormAppearance.internal.getWidth(formObject) / 4
+            : AcroFormAppearance.internal.getHeight(formObject) / 4;
+        // The Borderpadding...
+        DotRadius = Number((DotRadius * 0.9).toFixed(5));
+        // Save results for later use; no need to waste
+        // processor ticks on doing math
+        var k = Number((DotRadius * 2).toFixed(5));
+        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));
+
+        stream.push("0.749023 g");
+        stream.push("q");
+        stream.push(
+          "1 0 0 1 " +
+            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +
+            " " +
+            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +
+            " cm"
+        );
+        stream.push(k + " 0 m");
+        stream.push(k + " " + kc + " " + kc + " " + k + " 0 " + k + " c");
+        stream.push(
+          "-" + kc + " " + k + " -" + k + " " + kc + " -" + k + " 0 c"
+        );
+        stream.push(
+          "-" + k + " -" + kc + " -" + kc + " -" + k + " 0 -" + k + " c"
+        );
+        stream.push(kc + " -" + k + " " + k + " -" + kc + " " + k + " 0 c");
+        stream.push("f");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      }
+    },
+
+    Cross: {
+      /**
+       * Creates the Actual AppearanceDictionary-References
+       *
+       * @param {string} name
+       * @returns {Object}
+       * @ignore
+       */
+      createAppearanceStream: function(name) {
+        var appearanceStreamContent = {
+          D: {
+            Off: AcroFormAppearance.RadioButton.Cross.OffPushDown
+          },
+          N: {}
+        };
+        appearanceStreamContent.N[name] =
+          AcroFormAppearance.RadioButton.Cross.YesNormal;
+        appearanceStreamContent.D[name] =
+          AcroFormAppearance.RadioButton.Cross.YesPushDown;
+        return appearanceStreamContent;
+      },
+      getCA: function() {
+        return "8";
+      },
+
+      YesNormal: function(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        var cross = AcroFormAppearance.internal.calculateCross(formObject);
+        stream.push("q");
+        stream.push(
+          "1 1 " +
+            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +
+            " " +
+            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +
+            " re"
+        );
+        stream.push("W");
+        stream.push("n");
+        stream.push(f2(cross.x1.x) + " " + f2(cross.x1.y) + " m");
+        stream.push(f2(cross.x2.x) + " " + f2(cross.x2.y) + " l");
+        stream.push(f2(cross.x4.x) + " " + f2(cross.x4.y) + " m");
+        stream.push(f2(cross.x3.x) + " " + f2(cross.x3.y) + " l");
+        stream.push("s");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      },
+      YesPushDown: function(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var cross = AcroFormAppearance.internal.calculateCross(formObject);
+        var stream = [];
+        stream.push("0.749023 g");
+        stream.push(
+          "0 0 " +
+            f2(AcroFormAppearance.internal.getWidth(formObject)) +
+            " " +
+            f2(AcroFormAppearance.internal.getHeight(formObject)) +
+            " re"
+        );
+        stream.push("f");
+        stream.push("q");
+        stream.push(
+          "1 1 " +
+            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +
+            " " +
+            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +
+            " re"
+        );
+        stream.push("W");
+        stream.push("n");
+        stream.push(f2(cross.x1.x) + " " + f2(cross.x1.y) + " m");
+        stream.push(f2(cross.x2.x) + " " + f2(cross.x2.y) + " l");
+        stream.push(f2(cross.x4.x) + " " + f2(cross.x4.y) + " m");
+        stream.push(f2(cross.x3.x) + " " + f2(cross.x3.y) + " l");
+        stream.push("s");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      },
+      OffPushDown: function(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        stream.push("0.749023 g");
+        stream.push(
+          "0 0 " +
+            f2(AcroFormAppearance.internal.getWidth(formObject)) +
+            " " +
+            f2(AcroFormAppearance.internal.getHeight(formObject)) +
+            " re"
+        );
+        stream.push("f");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      }
+    }
+  },
+
+  /**
+   * Returns the standard Appearance
+   *
+   * @returns {AcroFormXObject}
+   */
+  createDefaultAppearanceStream: function(formObject) {
+    // Set Helvetica to Standard Font (size: auto)
+    // Color: Black
+    var fontKey = formObject.scope.internal.getFont(
+      formObject.fontName,
+      formObject.fontStyle
+    ).id;
+    var encodedColor = formObject.scope.__private__.encodeColorString(
+      formObject.color
+    );
+    var fontSize = formObject.fontSize;
+    var result = "/" + fontKey + " " + fontSize + " Tf " + encodedColor;
+    return result;
+  }
+};
+
+AcroFormAppearance.internal = {
+  Bezier_C: 0.551915024494,
+
+  calculateCross: function(formObject) {
+    var width = AcroFormAppearance.internal.getWidth(formObject);
+    var height = AcroFormAppearance.internal.getHeight(formObject);
+    var a = Math.min(width, height);
+
+    var cross = {
+      x1: {
+        // upperLeft
+        x: (width - a) / 2,
+        y: (height - a) / 2 + a // height - borderPadding
+      },
+      x2: {
+        // lowerRight
+        x: (width - a) / 2 + a,
+        y: (height - a) / 2 // borderPadding
+      },
+      x3: {
+        // lowerLeft
+        x: (width - a) / 2,
+        y: (height - a) / 2 // borderPadding
+      },
+      x4: {
+        // upperRight
+        x: (width - a) / 2 + a,
+        y: (height - a) / 2 + a // height - borderPadding
+      }
+    };
+
+    return cross;
+  }
+};
+AcroFormAppearance.internal.getWidth = function(formObject) {
+  var result = 0;
+  if (typeof formObject === "object") {
+    result = scale(formObject.Rect[2]);
+  }
+  return result;
+};
+AcroFormAppearance.internal.getHeight = function(formObject) {
+  var result = 0;
+  if (typeof formObject === "object") {
+    result = scale(formObject.Rect[3]);
+  }
+  return result;
+};
+
+// Public:
+
+/**
+ * Add an AcroForm-Field to the jsPDF-instance
+ *
+ * @name addField
+ * @function
+ * @instance
+ * @param {Object} fieldObject
+ * @returns {jsPDF}
+ */
+var addField = (jsPDFAPI.addField = function(fieldObject) {
+  initializeAcroForm(this, fieldObject);
+
+  if (fieldObject instanceof AcroFormField) {
+    putForm(fieldObject);
+  } else {
+    throw new Error("Invalid argument passed to jsPDF.addField.");
+  }
+  fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;
+  return this;
+});
+
+jsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;
+jsPDFAPI.AcroFormListBox = AcroFormListBox;
+jsPDFAPI.AcroFormComboBox = AcroFormComboBox;
+jsPDFAPI.AcroFormEditBox = AcroFormEditBox;
+jsPDFAPI.AcroFormButton = AcroFormButton;
+jsPDFAPI.AcroFormPushButton = AcroFormPushButton;
+jsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;
+jsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;
+jsPDFAPI.AcroFormTextField = AcroFormTextField;
+jsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;
+jsPDFAPI.AcroFormAppearance = AcroFormAppearance;
+
+jsPDFAPI.AcroForm = {
+  ChoiceField: AcroFormChoiceField,
+  ListBox: AcroFormListBox,
+  ComboBox: AcroFormComboBox,
+  EditBox: AcroFormEditBox,
+  Button: AcroFormButton,
+  PushButton: AcroFormPushButton,
+  RadioButton: AcroFormRadioButton,
+  CheckBox: AcroFormCheckBox,
+  TextField: AcroFormTextField,
+  PasswordField: AcroFormPasswordField,
+  Appearance: AcroFormAppearance
+};
+
+jsPDF.AcroForm = {
+  ChoiceField: AcroFormChoiceField,
+  ListBox: AcroFormListBox,
+  ComboBox: AcroFormComboBox,
+  EditBox: AcroFormEditBox,
+  Button: AcroFormButton,
+  PushButton: AcroFormPushButton,
+  RadioButton: AcroFormRadioButton,
+  CheckBox: AcroFormCheckBox,
+  TextField: AcroFormTextField,
+  PasswordField: AcroFormPasswordField,
+  Appearance: AcroFormAppearance
+};
+
+var AcroForm = jsPDF.AcroForm;
+
+/** @license
+ * jsPDF addImage plugin
+ * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/
+ *               2013 Chris Dowling, https://github.com/gingerchris
+ *               2013 Trinh Ho, https://github.com/ineedfat
+ *               2013 Edwin Alejandro Perez, https://github.com/eaparango
+ *               2013 Norah Smith, https://github.com/burnburnrocket
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 James Robb, https://github.com/jamesbrobb
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+(function(jsPDFAPI) {
+
+  var namespace = "addImage_";
+  jsPDFAPI.__addimage__ = {};
+
+  var UNKNOWN = "UNKNOWN";
+
+  // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.
+  // With too small batch iteration will be slow as more calls are made,
+  // higher values cause larger and slower garbage collection.
+  var ARRAY_APPLY_BATCH = 8192;
+
+  var imageFileTypeHeaders = {
+    PNG: [[0x89, 0x50, 0x4e, 0x47]],
+    TIFF: [
+      [0x4d, 0x4d, 0x00, 0x2a], //Motorola
+      [0x49, 0x49, 0x2a, 0x00] //Intel
+    ],
+    JPEG: [
+      [
+        0xff,
+        0xd8,
+        0xff,
+        0xe0,
+        undefined,
+        undefined,
+        0x4a,
+        0x46,
+        0x49,
+        0x46,
+        0x00
+      ], //JFIF
+      [
+        0xff,
+        0xd8,
+        0xff,
+        0xe1,
+        undefined,
+        undefined,
+        0x45,
+        0x78,
+        0x69,
+        0x66,
+        0x00,
+        0x00
+      ], //Exif
+      [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW
+      [0xff, 0xd8, 0xff, 0xee] //EXIF RAW
+    ],
+    JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],
+    GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],
+    GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],
+    WEBP: [
+      [
+        0x52,
+        0x49,
+        0x46,
+        0x46,
+        undefined,
+        undefined,
+        undefined,
+        undefined,
+        0x57,
+        0x45,
+        0x42,
+        0x50
+      ]
+    ],
+    BMP: [
+      [0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.
+      [0x42, 0x41], //BA - OS/2 struct bitmap array
+      [0x43, 0x49], //CI - OS/2 struct color icon
+      [0x43, 0x50], //CP - OS/2 const color pointer
+      [0x49, 0x43], //IC - OS/2 struct icon
+      [0x50, 0x54] //PT - OS/2 pointer
+    ]
+  };
+
+  /**
+   * Recognize filetype of Image by magic-bytes
+   *
+   * https://en.wikipedia.org/wiki/List_of_file_signatures
+   *
+   * @name getImageFileTypeByImageData
+   * @public
+   * @function
+   * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer
+   * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'
+   *
+   * @returns {string} filetype of Image
+   */
+  var getImageFileTypeByImageData = (jsPDFAPI.__addimage__.getImageFileTypeByImageData = function(
+    imageData,
+    fallbackFormat
+  ) {
+    fallbackFormat = fallbackFormat || UNKNOWN;
+    var i;
+    var j;
+    var result = UNKNOWN;
+    var headerSchemata;
+    var compareResult;
+    var fileType;
+
+    if (
+      fallbackFormat === "RGBA" ||
+      (imageData.data !== undefined &&
+        imageData.data instanceof Uint8ClampedArray &&
+        "height" in imageData &&
+        "width" in imageData)
+    ) {
+      return "RGBA";
+    }
+
+    if (isArrayBufferView(imageData)) {
+      for (fileType in imageFileTypeHeaders) {
+        headerSchemata = imageFileTypeHeaders[fileType];
+        for (i = 0; i < headerSchemata.length; i += 1) {
+          compareResult = true;
+          for (j = 0; j < headerSchemata[i].length; j += 1) {
+            if (headerSchemata[i][j] === undefined) {
+              continue;
+            }
+            if (headerSchemata[i][j] !== imageData[j]) {
+              compareResult = false;
+              break;
+            }
+          }
+          if (compareResult === true) {
+            result = fileType;
+            break;
+          }
+        }
+      }
+    } else {
+      for (fileType in imageFileTypeHeaders) {
+        headerSchemata = imageFileTypeHeaders[fileType];
+        for (i = 0; i < headerSchemata.length; i += 1) {
+          compareResult = true;
+          for (j = 0; j < headerSchemata[i].length; j += 1) {
+            if (headerSchemata[i][j] === undefined) {
+              continue;
+            }
+            if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {
+              compareResult = false;
+              break;
+            }
+          }
+          if (compareResult === true) {
+            result = fileType;
+            break;
+          }
+        }
+      }
+    }
+
+    if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {
+      result = fallbackFormat;
+    }
+    return result;
+  });
+
+  // Image functionality ported from pdf.js
+  var putImage = function(image) {
+    var out = this.internal.write;
+    var putStream = this.internal.putStream;
+    var getFilters = this.internal.getFilters;
+
+    var filter = getFilters();
+    while (filter.indexOf("FlateEncode") !== -1) {
+      filter.splice(filter.indexOf("FlateEncode"), 1);
+    }
+
+    image.objectId = this.internal.newObject();
+
+    var additionalKeyValues = [];
+    additionalKeyValues.push({ key: "Type", value: "/XObject" });
+    additionalKeyValues.push({ key: "Subtype", value: "/Image" });
+    additionalKeyValues.push({ key: "Width", value: image.width });
+    additionalKeyValues.push({ key: "Height", value: image.height });
+
+    if (image.colorSpace === color_spaces.INDEXED) {
+      additionalKeyValues.push({
+        key: "ColorSpace",
+        value:
+          "[/Indexed /DeviceRGB " +
+          // if an indexed png defines more than one colour with transparency, we've created a sMask
+          (image.palette.length / 3 - 1) +
+          " " +
+          ("sMask" in image && typeof image.sMask !== "undefined"
+            ? image.objectId + 2
+            : image.objectId + 1) +
+          " 0 R]"
+      });
+    } else {
+      additionalKeyValues.push({
+        key: "ColorSpace",
+        value: "/" + image.colorSpace
+      });
+      if (image.colorSpace === color_spaces.DEVICE_CMYK) {
+        additionalKeyValues.push({ key: "Decode", value: "[1 0 1 0 1 0 1 0]" });
+      }
+    }
+    additionalKeyValues.push({
+      key: "BitsPerComponent",
+      value: image.bitsPerComponent
+    });
+    if (
+      "decodeParameters" in image &&
+      typeof image.decodeParameters !== "undefined"
+    ) {
+      additionalKeyValues.push({
+        key: "DecodeParms",
+        value: "<<" + image.decodeParameters + ">>"
+      });
+    }
+    if ("transparency" in image && Array.isArray(image.transparency)) {
+      var transparency = "",
+        i = 0,
+        len = image.transparency.length;
+      for (; i < len; i++)
+        transparency +=
+          image.transparency[i] + " " + image.transparency[i] + " ";
+
+      additionalKeyValues.push({
+        key: "Mask",
+        value: "[" + transparency + "]"
+      });
+    }
+    if (typeof image.sMask !== "undefined") {
+      additionalKeyValues.push({
+        key: "SMask",
+        value: image.objectId + 1 + " 0 R"
+      });
+    }
+
+    var alreadyAppliedFilters =
+      typeof image.filter !== "undefined" ? ["/" + image.filter] : undefined;
+
+    putStream({
+      data: image.data,
+      additionalKeyValues: additionalKeyValues,
+      alreadyAppliedFilters: alreadyAppliedFilters,
+      objectId: image.objectId
+    });
+
+    out("endobj");
+
+    // Soft mask
+    if ("sMask" in image && typeof image.sMask !== "undefined") {
+      var decodeParameters =
+        "/Predictor " +
+        image.predictor +
+        " /Colors 1 /BitsPerComponent " +
+        image.bitsPerComponent +
+        " /Columns " +
+        image.width;
+      var sMask = {
+        width: image.width,
+        height: image.height,
+        colorSpace: "DeviceGray",
+        bitsPerComponent: image.bitsPerComponent,
+        decodeParameters: decodeParameters,
+        data: image.sMask
+      };
+      if ("filter" in image) {
+        sMask.filter = image.filter;
+      }
+      putImage.call(this, sMask);
+    }
+
+    //Palette
+    if (image.colorSpace === color_spaces.INDEXED) {
+      var objId = this.internal.newObject();
+      //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');
+      //putStream(zlib.compress(img['pal']));
+      putStream({
+        data: arrayBufferToBinaryString(new Uint8Array(image.palette)),
+        objectId: objId
+      });
+      out("endobj");
+    }
+  };
+  var putResourcesCallback = function() {
+    var images = this.internal.collections[namespace + "images"];
+    for (var i in images) {
+      putImage.call(this, images[i]);
+    }
+  };
+  var putXObjectsDictCallback = function() {
+    var images = this.internal.collections[namespace + "images"],
+      out = this.internal.write,
+      image;
+    for (var i in images) {
+      image = images[i];
+      out("/I" + image.index, image.objectId, "0", "R");
+    }
+  };
+
+  var checkCompressValue = function(value) {
+    if (value && typeof value === "string") value = value.toUpperCase();
+    return value in jsPDFAPI.image_compression ? value : image_compression.NONE;
+  };
+
+  var initialize = function() {
+    if (!this.internal.collections[namespace + "images"]) {
+      this.internal.collections[namespace + "images"] = {};
+      this.internal.events.subscribe("putResources", putResourcesCallback);
+      this.internal.events.subscribe("putXobjectDict", putXObjectsDictCallback);
+    }
+  };
+
+  var getImages = function() {
+    var images = this.internal.collections[namespace + "images"];
+    initialize.call(this);
+    return images;
+  };
+  var getImageIndex = function() {
+    return Object.keys(this.internal.collections[namespace + "images"]).length;
+  };
+  var notDefined = function(value) {
+    return typeof value === "undefined" || value === null || value.length === 0;
+  };
+  var generateAliasFromImageData = function(imageData) {
+    if (typeof imageData === "string" || isArrayBufferView(imageData)) {
+      return sHashCode(imageData);
+    } else if (isArrayBufferView(imageData.data)) {
+      return sHashCode(imageData.data);
+    }
+
+    return null;
+  };
+
+  var isImageTypeSupported = function(type) {
+    return typeof jsPDFAPI["process" + type.toUpperCase()] === "function";
+  };
+
+  var isDOMElement = function(object) {
+    return typeof object === "object" && object.nodeType === 1;
+  };
+
+  var getImageDataFromElement = function(element, format) {
+    //if element is an image which uses data url definition, just return the dataurl
+    if (element.nodeName === "IMG" && element.hasAttribute("src")) {
+      var src = "" + element.getAttribute("src");
+
+      //is base64 encoded dataUrl, directly process it
+      if (src.indexOf("data:image/") === 0) {
+        return atob(
+          unescape(src)
+            .split("base64,")
+            .pop()
+        );
+      }
+
+      //it is probably an url, try to load it
+      var tmpImageData = jsPDFAPI.loadFile(src, true);
+      if (tmpImageData !== undefined) {
+        return tmpImageData;
+      }
+    }
+
+    if (element.nodeName === "CANVAS") {
+      if (element.width === 0 || element.height === 0) {
+        throw new Error(
+          "Given canvas must have data. Canvas width: " +
+            element.width +
+            ", height: " +
+            element.height
+        );
+      }
+      var mimeType;
+      switch (format) {
+        case "PNG":
+          mimeType = "image/png";
+          break;
+        case "WEBP":
+          mimeType = "image/webp";
+          break;
+        case "JPEG":
+        case "JPG":
+        default:
+          mimeType = "image/jpeg";
+          break;
+      }
+      return atob(
+        element
+          .toDataURL(mimeType, 1.0)
+          .split("base64,")
+          .pop()
+      );
+    }
+  };
+
+  var checkImagesForAlias = function(alias) {
+    var images = this.internal.collections[namespace + "images"];
+    if (images) {
+      for (var e in images) {
+        if (alias === images[e].alias) {
+          return images[e];
+        }
+      }
+    }
+  };
+
+  var determineWidthAndHeight = function(width, height, image) {
+    if (!width && !height) {
+      width = -96;
+      height = -96;
+    }
+    if (width < 0) {
+      width = (-1 * image.width * 72) / width / this.internal.scaleFactor;
+    }
+    if (height < 0) {
+      height = (-1 * image.height * 72) / height / this.internal.scaleFactor;
+    }
+    if (width === 0) {
+      width = (height * image.width) / image.height;
+    }
+    if (height === 0) {
+      height = (width * image.height) / image.width;
+    }
+
+    return [width, height];
+  };
+
+  var writeImageToPDF = function(x, y, width, height, image, rotation) {
+    var dims = determineWidthAndHeight.call(this, width, height, image),
+      coord = this.internal.getCoordinateString,
+      vcoord = this.internal.getVerticalCoordinateString;
+
+    var images = getImages.call(this);
+
+    width = dims[0];
+    height = dims[1];
+    images[image.index] = image;
+
+    if (rotation) {
+      rotation *= Math.PI / 180;
+      var c = Math.cos(rotation);
+      var s = Math.sin(rotation);
+      //like in pdf Reference do it 4 digits instead of 2
+      var f4 = function(number) {
+        return number.toFixed(4);
+      };
+      var rotationTransformationMatrix = [
+        f4(c),
+        f4(s),
+        f4(s * -1),
+        f4(c),
+        0,
+        0,
+        "cm"
+      ];
+    }
+    this.internal.write("q"); //Save graphics state
+    if (rotation) {
+      this.internal.write(
+        [1, "0", "0", 1, coord(x), vcoord(y + height), "cm"].join(" ")
+      ); //Translate
+      this.internal.write(rotationTransformationMatrix.join(" ")); //Rotate
+      this.internal.write(
+        [coord(width), "0", "0", coord(height), "0", "0", "cm"].join(" ")
+      ); //Scale
+    } else {
+      this.internal.write(
+        [
+          coord(width),
+          "0",
+          "0",
+          coord(height),
+          coord(x),
+          vcoord(y + height),
+          "cm"
+        ].join(" ")
+      ); //Translate and Scale
+    }
+
+    if (this.isAdvancedAPI()) {
+      // draw image bottom up when in "advanced" API mode
+      this.internal.write([1, 0, 0, -1, 0, 0, "cm"].join(" "));
+    }
+
+    this.internal.write("/I" + image.index + " Do"); //Paint Image
+    this.internal.write("Q"); //Restore graphics state
+  };
+
+  /**
+   * COLOR SPACES
+   */
+  var color_spaces = (jsPDFAPI.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"
+  });
+
+  /**
+   * DECODE METHODS
+   */
+  jsPDFAPI.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"
+  };
+
+  /**
+   * IMAGE COMPRESSION TYPES
+   */
+  var image_compression = (jsPDFAPI.image_compression = {
+    NONE: "NONE",
+    FAST: "FAST",
+    MEDIUM: "MEDIUM",
+    SLOW: "SLOW"
+  });
+
+  /**
+   * @name sHashCode
+   * @function
+   * @param {string} data
+   * @returns {string}
+   */
+  var sHashCode = (jsPDFAPI.__addimage__.sHashCode = function(data) {
+    var hash = 0,
+      i,
+      len;
+
+    if (typeof data === "string") {
+      len = data.length;
+      for (i = 0; i < len; i++) {
+        hash = (hash << 5) - hash + data.charCodeAt(i);
+        hash |= 0; // Convert to 32bit integer
+      }
+    } else if (isArrayBufferView(data)) {
+      len = data.byteLength / 2;
+      for (i = 0; i < len; i++) {
+        hash = (hash << 5) - hash + data[i];
+        hash |= 0; // Convert to 32bit integer
+      }
+    }
+    return hash;
+  });
+
+  /**
+   * Validates if given String is a valid Base64-String
+   *
+   * @name validateStringAsBase64
+   * @public
+   * @function
+   * @param {String} possible Base64-String
+   *
+   * @returns {boolean}
+   */
+  var validateStringAsBase64 = (jsPDFAPI.__addimage__.validateStringAsBase64 = function(
+    possibleBase64String
+  ) {
+    possibleBase64String = possibleBase64String || "";
+    possibleBase64String.toString().trim();
+
+    var result = true;
+
+    if (possibleBase64String.length === 0) {
+      result = false;
+    }
+
+    if (possibleBase64String.length % 4 !== 0) {
+      result = false;
+    }
+
+    if (
+      /^[A-Za-z0-9+/]+$/.test(
+        possibleBase64String.substr(0, possibleBase64String.length - 2)
+      ) === false
+    ) {
+      result = false;
+    }
+
+    if (
+      /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(
+        possibleBase64String.substr(-2)
+      ) === false
+    ) {
+      result = false;
+    }
+    return result;
+  });
+
+  /**
+   * Strips out and returns info from a valid base64 data URI
+   *
+   * @name extractImageFromDataUrl
+   * @function
+   * @param {string} dataUrl a valid data URI of format 'data:[<MIME-type>][;base64],<data>'
+   * @returns {Array}an Array containing the following
+   * [0] the complete data URI
+   * [1] <MIME-type>
+   * [2] format - the second part of the mime-type i.e 'png' in 'image/png'
+   * [4] <data>
+   */
+  var extractImageFromDataUrl = (jsPDFAPI.__addimage__.extractImageFromDataUrl = function(
+    dataUrl
+  ) {
+    dataUrl = dataUrl || "";
+    var dataUrlParts = dataUrl.split("base64,");
+    var result = null;
+
+    if (dataUrlParts.length === 2) {
+      var extractedInfo = /^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(
+        dataUrlParts[0]
+      );
+      if (Array.isArray(extractedInfo)) {
+        result = {
+          mimeType: extractedInfo[1],
+          charset: extractedInfo[2],
+          data: dataUrlParts[1]
+        };
+      }
+    }
+    return result;
+  });
+
+  /**
+   * Check to see if ArrayBuffer is supported
+   *
+   * @name supportsArrayBuffer
+   * @function
+   * @returns {boolean}
+   */
+  var supportsArrayBuffer = (jsPDFAPI.__addimage__.supportsArrayBuffer = function() {
+    return (
+      typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined"
+    );
+  });
+
+  /**
+   * Tests supplied object to determine if ArrayBuffer
+   *
+   * @name isArrayBuffer
+   * @function
+   * @param {Object} object an Object
+   *
+   * @returns {boolean}
+   */
+  jsPDFAPI.__addimage__.isArrayBuffer = function(object) {
+    return supportsArrayBuffer() && object instanceof ArrayBuffer;
+  };
+
+  /**
+   * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface
+   *
+   * @name isArrayBufferView
+   * @function
+   * @param {Object} object an Object
+   * @returns {boolean}
+   */
+  var isArrayBufferView = (jsPDFAPI.__addimage__.isArrayBufferView = function(
+    object
+  ) {
+    return (
+      supportsArrayBuffer() &&
+      typeof Uint32Array !== "undefined" &&
+      (object instanceof Int8Array ||
+        object instanceof Uint8Array ||
+        (typeof Uint8ClampedArray !== "undefined" &&
+          object instanceof Uint8ClampedArray) ||
+        object instanceof Int16Array ||
+        object instanceof Uint16Array ||
+        object instanceof Int32Array ||
+        object instanceof Uint32Array ||
+        object instanceof Float32Array ||
+        object instanceof Float64Array)
+    );
+  });
+
+  /**
+   * Convert Binary String to ArrayBuffer
+   *
+   * @name binaryStringToUint8Array
+   * @public
+   * @function
+   * @param {string} BinaryString with ImageData
+   * @returns {Uint8Array}
+   */
+  var binaryStringToUint8Array = (jsPDFAPI.__addimage__.binaryStringToUint8Array = function(
+    binary_string
+  ) {
+    var len = binary_string.length;
+    var bytes = new Uint8Array(len);
+    for (var i = 0; i < len; i++) {
+      bytes[i] = binary_string.charCodeAt(i);
+    }
+    return bytes;
+  });
+
+  /**
+   * Convert the Buffer to a Binary String
+   *
+   * @name arrayBufferToBinaryString
+   * @public
+   * @function
+   * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData
+   *
+   * @returns {String}
+   */
+  var arrayBufferToBinaryString = (jsPDFAPI.__addimage__.arrayBufferToBinaryString = function(
+    buffer
+  ) {
+    var out = "";
+    // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.
+    // Do not copy the array if input is already an array.
+    var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);
+    for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {
+      // Limit the amount of characters being parsed to prevent overflow.
+      // Note that while TextDecoder would be faster, it does not have the same
+      // functionality as fromCharCode with any provided encodings as of 3/2021.
+      out += String.fromCharCode.apply(
+        null,
+        buf.subarray(i, i + ARRAY_APPLY_BATCH)
+      );
+    }
+    return out;
+  });
+
+  /**
+   * Possible parameter for addImage, an RGBA buffer with size.
+   *
+   * @typedef {Object} RGBAData
+   * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.
+   * @property {number} width - Image width as the data does not carry this information in itself.
+   * @property {number} height - Image height as the data does not carry this information in itself.
+   */
+
+  /**
+   * Adds an Image to the PDF.
+   *
+   * @name addImage
+   * @public
+   * @function
+   * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).
+   * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'
+   * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} width width of the image (in units declared at inception of PDF document)
+   * @param {number} height height of the Image (in units declared at inception of PDF document)
+   * @param {string} alias alias of the image (if used multiple times)
+   * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'
+   * @param {number} rotation rotation of the image in degrees (0-359)
+   *
+   * @returns jsPDF
+   */
+  jsPDFAPI.addImage = function() {
+    var imageData, format, x, y, w, h, alias, compression, rotation;
+
+    imageData = arguments[0];
+    if (typeof arguments[1] === "number") {
+      format = UNKNOWN;
+      x = arguments[1];
+      y = arguments[2];
+      w = arguments[3];
+      h = arguments[4];
+      alias = arguments[5];
+      compression = arguments[6];
+      rotation = arguments[7];
+    } else {
+      format = arguments[1];
+      x = arguments[2];
+      y = arguments[3];
+      w = arguments[4];
+      h = arguments[5];
+      alias = arguments[6];
+      compression = arguments[7];
+      rotation = arguments[8];
+    }
+
+    if (
+      typeof imageData === "object" &&
+      !isDOMElement(imageData) &&
+      "imageData" in imageData
+    ) {
+      var options = imageData;
+
+      imageData = options.imageData;
+      format = options.format || format || UNKNOWN;
+      x = options.x || x || 0;
+      y = options.y || y || 0;
+      w = options.w || options.width || w;
+      h = options.h || options.height || h;
+      alias = options.alias || alias;
+      compression = options.compression || compression;
+      rotation = options.rotation || options.angle || rotation;
+    }
+
+    //If compression is not explicitly set, determine if we should use compression
+    var filter = this.internal.getFilters();
+    if (compression === undefined && filter.indexOf("FlateEncode") !== -1) {
+      compression = "SLOW";
+    }
+
+    if (isNaN(x) || isNaN(y)) {
+      throw new Error("Invalid coordinates passed to jsPDF.addImage");
+    }
+
+    initialize.call(this);
+
+    var image = processImageData.call(
+      this,
+      imageData,
+      format,
+      alias,
+      compression
+    );
+
+    writeImageToPDF.call(this, x, y, w, h, image, rotation);
+
+    return this;
+  };
+
+  var processImageData = function(imageData, format, alias, compression) {
+    var result, dataAsBinaryString;
+
+    if (
+      typeof imageData === "string" &&
+      getImageFileTypeByImageData(imageData) === UNKNOWN
+    ) {
+      imageData = unescape(imageData);
+      var tmpImageData = convertBase64ToBinaryString(imageData, false);
+
+      if (tmpImageData !== "") {
+        imageData = tmpImageData;
+      } else {
+        tmpImageData = jsPDFAPI.loadFile(imageData, true);
+        if (tmpImageData !== undefined) {
+          imageData = tmpImageData;
+        }
+      }
+    }
+
+    if (isDOMElement(imageData)) {
+      imageData = getImageDataFromElement(imageData, format);
+    }
+
+    format = getImageFileTypeByImageData(imageData, format);
+    if (!isImageTypeSupported(format)) {
+      throw new Error(
+        "addImage does not support files of type '" +
+          format +
+          "', please ensure that a plugin for '" +
+          format +
+          "' support is added."
+      );
+    }
+
+    // now do the heavy lifting
+
+    if (notDefined(alias)) {
+      alias = generateAliasFromImageData(imageData);
+    }
+    result = checkImagesForAlias.call(this, alias);
+
+    if (!result) {
+      if (supportsArrayBuffer()) {
+        // no need to convert if imageData is already uint8array
+        if (!(imageData instanceof Uint8Array) && format !== "RGBA") {
+          dataAsBinaryString = imageData;
+          imageData = binaryStringToUint8Array(imageData);
+        }
+      }
+
+      result = this["process" + format.toUpperCase()](
+        imageData,
+        getImageIndex.call(this),
+        alias,
+        checkCompressValue(compression),
+        dataAsBinaryString
+      );
+    }
+
+    if (!result) {
+      throw new Error("An unknown error occurred whilst processing the image.");
+    }
+    return result;
+  };
+
+  /**
+   * @name convertBase64ToBinaryString
+   * @function
+   * @param {string} stringData
+   * @returns {string} binary string
+   */
+  var convertBase64ToBinaryString = (jsPDFAPI.__addimage__.convertBase64ToBinaryString = function(
+    stringData,
+    throwError
+  ) {
+    throwError = typeof throwError === "boolean" ? throwError : true;
+    var base64Info;
+    var imageData = "";
+    var rawData;
+
+    if (typeof stringData === "string") {
+      base64Info = extractImageFromDataUrl(stringData);
+      rawData = base64Info !== null ? base64Info.data : stringData;
+
+      try {
+        imageData = atob(rawData);
+      } catch (e) {
+        if (throwError) {
+          if (!validateStringAsBase64(rawData)) {
+            throw new Error(
+              "Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString "
+            );
+          } else {
+            throw new Error(
+              "atob-Error in jsPDF.convertBase64ToBinaryString " + e.message
+            );
+          }
+        }
+      }
+    }
+    return imageData;
+  });
+
+  /**
+   * @name getImageProperties
+   * @function
+   * @param {Object} imageData
+   * @returns {Object}
+   */
+  jsPDFAPI.getImageProperties = function(imageData) {
+    var image;
+    var tmpImageData = "";
+    var format;
+
+    if (isDOMElement(imageData)) {
+      imageData = getImageDataFromElement(imageData);
+    }
+
+    if (
+      typeof imageData === "string" &&
+      getImageFileTypeByImageData(imageData) === UNKNOWN
+    ) {
+      tmpImageData = convertBase64ToBinaryString(imageData, false);
+
+      if (tmpImageData === "") {
+        tmpImageData = jsPDFAPI.loadFile(imageData) || "";
+      }
+      imageData = tmpImageData;
+    }
+
+    format = getImageFileTypeByImageData(imageData);
+    if (!isImageTypeSupported(format)) {
+      throw new Error(
+        "addImage does not support files of type '" +
+          format +
+          "', please ensure that a plugin for '" +
+          format +
+          "' support is added."
+      );
+    }
+
+    if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {
+      imageData = binaryStringToUint8Array(imageData);
+    }
+
+    image = this["process" + format.toUpperCase()](imageData);
+
+    if (!image) {
+      throw new Error("An unknown error occurred whilst processing the image");
+    }
+
+    image.fileType = format;
+
+    return image;
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+(function(jsPDFAPI) {
+
+  var notEmpty = function(obj) {
+    if (typeof obj != "undefined") {
+      if (obj != "") {
+        return true;
+      }
+    }
+  };
+
+  jsPDF.API.events.push([
+    "addPage",
+    function(addPageData) {
+      var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);
+      pageInfo.pageContext.annotations = [];
+    }
+  ]);
+
+  jsPDFAPI.events.push([
+    "putPage",
+    function(putPageData) {
+      var getHorizontalCoordinateString = this.internal.getCoordinateString;
+      var getVerticalCoordinateString = this.internal
+        .getVerticalCoordinateString;
+      var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);
+      var pageAnnos = putPageData.pageContext.annotations;
+
+      var anno, rect, line;
+      var found = false;
+      for (var a = 0; a < pageAnnos.length && !found; a++) {
+        anno = pageAnnos[a];
+        switch (anno.type) {
+          case "link":
+            if (
+              notEmpty(anno.options.url) ||
+              notEmpty(anno.options.pageNumber)
+            ) {
+              found = true;
+            }
+            break;
+          case "reference":
+          case "text":
+          case "freetext":
+            found = true;
+            break;
+        }
+      }
+      if (found == false) {
+        return;
+      }
+
+      this.internal.write("/Annots [");
+      for (var i = 0; i < pageAnnos.length; i++) {
+        anno = pageAnnos[i];
+        var escape = this.internal.pdfEscape;
+        var encryptor = this.internal.getEncryptor(putPageData.objId);
+
+        switch (anno.type) {
+          case "reference":
+            // References to Widget Annotations (for AcroForm Fields)
+            this.internal.write(" " + anno.object.objId + " 0 R ");
+            break;
+          case "text":
+            // Create a an object for both the text and the popup
+            var objText = this.internal.newAdditionalObject();
+            var objPopup = this.internal.newAdditionalObject();
+            var encryptorText = this.internal.getEncryptor(objText.objId);
+
+            var title = anno.title || "Note";
+            rect =
+              "/Rect [" +
+              getHorizontalCoordinateString(anno.bounds.x) +
+              " " +
+              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +
+              " " +
+              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +
+              " " +
+              getVerticalCoordinateString(anno.bounds.y) +
+              "] ";
+
+            line =
+              "<</Type /Annot /Subtype /" +
+              "Text" +
+              " " +
+              rect +
+              "/Contents (" +
+              escape(encryptorText(anno.contents)) +
+              ")";
+            line += " /Popup " + objPopup.objId + " 0 R";
+            line += " /P " + pageInfo.objId + " 0 R";
+            line += " /T (" + escape(encryptorText(title)) + ") >>";
+            objText.content = line;
+
+            var parent = objText.objId + " 0 R";
+            var popoff = 30;
+            rect =
+              "/Rect [" +
+              getHorizontalCoordinateString(anno.bounds.x + popoff) +
+              " " +
+              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +
+              " " +
+              getHorizontalCoordinateString(
+                anno.bounds.x + anno.bounds.w + popoff
+              ) +
+              " " +
+              getVerticalCoordinateString(anno.bounds.y) +
+              "] ";
+            line =
+              "<</Type /Annot /Subtype /" +
+              "Popup" +
+              " " +
+              rect +
+              " /Parent " +
+              parent;
+            if (anno.open) {
+              line += " /Open true";
+            }
+            line += " >>";
+            objPopup.content = line;
+
+            this.internal.write(objText.objId, "0 R", objPopup.objId, "0 R");
+
+            break;
+          case "freetext":
+            rect =
+              "/Rect [" +
+              getHorizontalCoordinateString(anno.bounds.x) +
+              " " +
+              getVerticalCoordinateString(anno.bounds.y) +
+              " " +
+              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +
+              " " +
+              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +
+              "] ";
+            var color = anno.color || "#000000";
+            line =
+              "<</Type /Annot /Subtype /" +
+              "FreeText" +
+              " " +
+              rect +
+              "/Contents (" +
+              escape(encryptor(anno.contents)) +
+              ")";
+            line +=
+              " /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#" +
+              color +
+              ")";
+            line += " /Border [0 0 0]";
+            line += " >>";
+            this.internal.write(line);
+            break;
+          case "link":
+            if (anno.options.name) {
+              var loc = this.annotations._nameMap[anno.options.name];
+              anno.options.pageNumber = loc.page;
+              anno.options.top = loc.y;
+            } else {
+              if (!anno.options.top) {
+                anno.options.top = 0;
+              }
+            }
+
+            rect =
+              "/Rect [" +
+              anno.finalBounds.x +
+              " " +
+              anno.finalBounds.y +
+              " " +
+              anno.finalBounds.w +
+              " " +
+              anno.finalBounds.h +
+              "] ";
+
+            line = "";
+            if (anno.options.url) {
+              line =
+                "<</Type /Annot /Subtype /Link " +
+                rect +
+                "/Border [0 0 0] /A <</S /URI /URI (" +
+                escape(encryptor(anno.options.url)) +
+                ") >>";
+            } else if (anno.options.pageNumber) {
+              // first page is 0
+              var info = this.internal.getPageInfo(anno.options.pageNumber);
+              line =
+                "<</Type /Annot /Subtype /Link " +
+                rect +
+                "/Border [0 0 0] /Dest [" +
+                info.objId +
+                " 0 R";
+              anno.options.magFactor = anno.options.magFactor || "XYZ";
+              switch (anno.options.magFactor) {
+                case "Fit":
+                  line += " /Fit]";
+                  break;
+                case "FitH":
+                  line += " /FitH " + anno.options.top + "]";
+                  break;
+                case "FitV":
+                  anno.options.left = anno.options.left || 0;
+                  line += " /FitV " + anno.options.left + "]";
+                  break;
+                case "XYZ":
+                default:
+                  var top = getVerticalCoordinateString(anno.options.top);
+                  anno.options.left = anno.options.left || 0;
+                  // 0 or null zoom will not change zoom factor
+                  if (typeof anno.options.zoom === "undefined") {
+                    anno.options.zoom = 0;
+                  }
+                  line +=
+                    " /XYZ " +
+                    anno.options.left +
+                    " " +
+                    top +
+                    " " +
+                    anno.options.zoom +
+                    "]";
+                  break;
+              }
+            }
+
+            if (line != "") {
+              line += " >>";
+              this.internal.write(line);
+            }
+            break;
+        }
+      }
+      this.internal.write("]");
+    }
+  ]);
+
+  /**
+   * @name createAnnotation
+   * @function
+   * @param {Object} options
+   */
+  jsPDFAPI.createAnnotation = function(options) {
+    var pageInfo = this.internal.getCurrentPageInfo();
+    switch (options.type) {
+      case "link":
+        this.link(
+          options.bounds.x,
+          options.bounds.y,
+          options.bounds.w,
+          options.bounds.h,
+          options
+        );
+        break;
+      case "text":
+      case "freetext":
+        pageInfo.pageContext.annotations.push(options);
+        break;
+    }
+  };
+
+  /**
+   * Create a link
+   *
+   * valid options
+   * <li> pageNumber or url [required]
+   * <p>If pageNumber is specified, top and zoom may also be specified</p>
+   * @name link
+   * @function
+   * @param {number} x
+   * @param {number} y
+   * @param {number} w
+   * @param {number} h
+   * @param {Object} options
+   */
+  jsPDFAPI.link = function(x, y, w, h, options) {
+    var pageInfo = this.internal.getCurrentPageInfo();
+    var getHorizontalCoordinateString = this.internal.getCoordinateString;
+    var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;
+
+    pageInfo.pageContext.annotations.push({
+      finalBounds: {
+        x: getHorizontalCoordinateString(x),
+        y: getVerticalCoordinateString(y),
+        w: getHorizontalCoordinateString(x + w),
+        h: getVerticalCoordinateString(y + h)
+      },
+      options: options,
+      type: "link"
+    });
+  };
+
+  /**
+   * Currently only supports single line text.
+   * Returns the width of the text/link
+   *
+   * @name textWithLink
+   * @function
+   * @param {string} text
+   * @param {number} x
+   * @param {number} y
+   * @param {Object} options
+   * @returns {number} width the width of the text/link
+   */
+  jsPDFAPI.textWithLink = function(text, x, y, options) {
+    var totalLineWidth = this.getTextWidth(text);
+    var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;
+    var linkHeight, linkWidth;
+
+    // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line
+    if (options.maxWidth !== undefined) {
+      var { maxWidth } = options;
+      linkWidth = maxWidth;
+      var numOfLines = this.splitTextToSize(text, linkWidth).length;
+      linkHeight = Math.ceil(lineHeight * numOfLines);
+    } else {
+      linkWidth = totalLineWidth;
+      linkHeight = lineHeight;
+    }
+
+    this.text(text, x, y, options);
+
+    //TODO We really need the text baseline height to do this correctly.
+    // Or ability to draw text on top, bottom, center, or baseline.
+    y += lineHeight * 0.2;
+    //handle x position based on the align option
+    if (options.align === "center") {
+      x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width
+    }
+    if (options.align === "right") {
+      x = x - totalLineWidth;
+    }
+    this.link(x, y - lineHeight, linkWidth, linkHeight, options);
+    return totalLineWidth;
+  };
+
+  //TODO move into external library
+  /**
+   * @name getTextWidth
+   * @function
+   * @param {string} text
+   * @returns {number} txtWidth
+   */
+  jsPDFAPI.getTextWidth = function(text) {
+    var fontSize = this.internal.getFontSize();
+    var txtWidth =
+      (this.getStringUnitWidth(text) * fontSize) / this.internal.scaleFactor;
+    return txtWidth;
+  };
+
+  return this;
+})(jsPDF.API);
+
+/**
+ * @license
+ * Copyright (c) 2017 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * jsPDF arabic parser PlugIn
+ *
+ * @name arabic
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  /**
+   * Arabic shape substitutions: char code => (isolated, final, initial, medial).
+   * Arabic Substition A
+   */
+  var arabicSubstitionA = {
+    0x0621: [0xfe80], // ARABIC LETTER HAMZA
+    0x0622: [0xfe81, 0xfe82], // ARABIC LETTER ALEF WITH MADDA ABOVE
+    0x0623: [0xfe83, 0xfe84], // ARABIC LETTER ALEF WITH HAMZA ABOVE
+    0x0624: [0xfe85, 0xfe86], // ARABIC LETTER WAW WITH HAMZA ABOVE
+    0x0625: [0xfe87, 0xfe88], // ARABIC LETTER ALEF WITH HAMZA BELOW
+    0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c], // ARABIC LETTER YEH WITH HAMZA ABOVE
+    0x0627: [0xfe8d, 0xfe8e], // ARABIC LETTER ALEF
+    0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92], // ARABIC LETTER BEH
+    0x0629: [0xfe93, 0xfe94], // ARABIC LETTER TEH MARBUTA
+    0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98], // ARABIC LETTER TEH
+    0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c], // ARABIC LETTER THEH
+    0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0], // ARABIC LETTER JEEM
+    0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4], // ARABIC LETTER HAH
+    0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8], // ARABIC LETTER KHAH
+    0x062f: [0xfea9, 0xfeaa], // ARABIC LETTER DAL
+    0x0630: [0xfeab, 0xfeac], // ARABIC LETTER THAL
+    0x0631: [0xfead, 0xfeae], // ARABIC LETTER REH
+    0x0632: [0xfeaf, 0xfeb0], // ARABIC LETTER ZAIN
+    0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4], // ARABIC LETTER SEEN
+    0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8], // ARABIC LETTER SHEEN
+    0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc], // ARABIC LETTER SAD
+    0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0], // ARABIC LETTER DAD
+    0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4], // ARABIC LETTER TAH
+    0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8], // ARABIC LETTER ZAH
+    0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc], // ARABIC LETTER AIN
+    0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0], // ARABIC LETTER GHAIN
+    0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4], // ARABIC LETTER FEH
+    0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8], // ARABIC LETTER QAF
+    0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc], // ARABIC LETTER KAF
+    0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0], // ARABIC LETTER LAM
+    0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], // ARABIC LETTER MEEM
+    0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], // ARABIC LETTER NOON
+    0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], // ARABIC LETTER HEH
+    0x0648: [0xfeed, 0xfeee], // ARABIC LETTER WAW
+    0x0649: [0xfeef, 0xfef0, 64488, 64489], // ARABIC LETTER ALEF MAKSURA
+    0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], // ARABIC LETTER YEH
+    0x0671: [0xfb50, 0xfb51], // ARABIC LETTER ALEF WASLA
+    0x0677: [0xfbdd], // ARABIC LETTER U WITH HAMZA ABOVE
+    0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], // ARABIC LETTER TTEH
+    0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], // ARABIC LETTER TTEHEH
+    0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], // ARABIC LETTER BEEH
+    0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], // ARABIC LETTER PEH
+    0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], // ARABIC LETTER TEHEH
+    0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], // ARABIC LETTER BEHEH
+    0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], // ARABIC LETTER NYEH
+    0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], // ARABIC LETTER DYEH
+    0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], // ARABIC LETTER TCHEH
+    0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], // ARABIC LETTER TCHEHEH
+    0x0688: [0xfb88, 0xfb89], // ARABIC LETTER DDAL
+    0x068c: [0xfb84, 0xfb85], // ARABIC LETTER DAHAL
+    0x068d: [0xfb82, 0xfb83], // ARABIC LETTER DDAHAL
+    0x068e: [0xfb86, 0xfb87], // ARABIC LETTER DUL
+    0x0691: [0xfb8c, 0xfb8d], // ARABIC LETTER RREH
+    0x0698: [0xfb8a, 0xfb8b], // ARABIC LETTER JEH
+    0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], // ARABIC LETTER VEH
+    0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], // ARABIC LETTER PEHEH
+    0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], // ARABIC LETTER KEHEH
+    0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], // ARABIC LETTER NG
+    0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], // ARABIC LETTER GAF
+    0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d], // ARABIC LETTER NGOEH
+    0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99], // ARABIC LETTER GUEH
+    0x06ba: [0xfb9e, 0xfb9f], // ARABIC LETTER NOON GHUNNA
+    0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3], // ARABIC LETTER RNOON
+    0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad], // ARABIC LETTER HEH DOACHASHMEE
+    0x06c0: [0xfba4, 0xfba5], // ARABIC LETTER HEH WITH YEH ABOVE
+    0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9], // ARABIC LETTER HEH GOAL
+    0x06c5: [0xfbe0, 0xfbe1], // ARABIC LETTER KIRGHIZ OE
+    0x06c6: [0xfbd9, 0xfbda], // ARABIC LETTER OE
+    0x06c7: [0xfbd7, 0xfbd8], // ARABIC LETTER U
+    0x06c8: [0xfbdb, 0xfbdc], // ARABIC LETTER YU
+    0x06c9: [0xfbe2, 0xfbe3], // ARABIC LETTER KIRGHIZ YU
+    0x06cb: [0xfbde, 0xfbdf], // ARABIC LETTER VE
+    0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff], // ARABIC LETTER FARSI YEH
+    0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7], //ARABIC LETTER E
+    0x06d2: [0xfbae, 0xfbaf], // ARABIC LETTER YEH BARREE
+    0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
+  };
+
+  /*
+    var ligaturesSubstitutionA = {
+        0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM
+    };
+    */
+
+  var ligatures = {
+    0xfedf: {
+      0xfe82: 0xfef5, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
+      0xfe84: 0xfef7, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
+      0xfe88: 0xfef9, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM
+      0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
+    },
+    0xfee0: {
+      0xfe82: 0xfef6, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM
+      0xfe84: 0xfef8, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM
+      0xfe88: 0xfefa, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM
+      0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+    },
+    0xfe8d: { 0xfedf: { 0xfee0: { 0xfeea: 0xfdf2 } } }, // ALLAH
+    0x0651: {
+      0x064c: 0xfc5e, // Shadda + Dammatan
+      0x064d: 0xfc5f, // Shadda + Kasratan
+      0x064e: 0xfc60, // Shadda + Fatha
+      0x064f: 0xfc61, // Shadda + Damma
+      0x0650: 0xfc62 // Shadda + Kasra
+    }
+  };
+
+  var arabic_diacritics = {
+    1612: 64606, // Shadda + Dammatan
+    1613: 64607, // Shadda + Kasratan
+    1614: 64608, // Shadda + Fatha
+    1615: 64609, // Shadda + Damma
+    1616: 64610 // Shadda + Kasra
+  };
+
+  var alfletter = [1570, 1571, 1573, 1575];
+
+  var noChangeInForm = -1;
+  var isolatedForm = 0;
+  var finalForm = 1;
+  var initialForm = 2;
+  var medialForm = 3;
+
+  jsPDFAPI.__arabicParser__ = {};
+
+  //private
+  var isInArabicSubstitutionA = (jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function(
+    letter
+  ) {
+    return typeof arabicSubstitionA[letter.charCodeAt(0)] !== "undefined";
+  });
+
+  var isArabicLetter = (jsPDFAPI.__arabicParser__.isArabicLetter = function(
+    letter
+  ) {
+    return (
+      typeof letter === "string" &&
+      /^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(
+        letter
+      )
+    );
+  });
+
+  var isArabicEndLetter = (jsPDFAPI.__arabicParser__.isArabicEndLetter = function(
+    letter
+  ) {
+    return (
+      isArabicLetter(letter) &&
+      isInArabicSubstitutionA(letter) &&
+      arabicSubstitionA[letter.charCodeAt(0)].length <= 2
+    );
+  });
+
+  var isArabicAlfLetter = (jsPDFAPI.__arabicParser__.isArabicAlfLetter = function(
+    letter
+  ) {
+    return (
+      isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0
+    );
+  });
+
+  jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function(letter) {
+    return (
+      isArabicLetter(letter) &&
+      isInArabicSubstitutionA(letter) &&
+      arabicSubstitionA[letter.charCodeAt(0)].length >= 1
+    );
+  };
+
+  var arabicLetterHasFinalForm = (jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function(
+    letter
+  ) {
+    return (
+      isArabicLetter(letter) &&
+      isInArabicSubstitutionA(letter) &&
+      arabicSubstitionA[letter.charCodeAt(0)].length >= 2
+    );
+  });
+
+  jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function(letter) {
+    return (
+      isArabicLetter(letter) &&
+      isInArabicSubstitutionA(letter) &&
+      arabicSubstitionA[letter.charCodeAt(0)].length >= 3
+    );
+  };
+
+  var arabicLetterHasMedialForm = (jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function(
+    letter
+  ) {
+    return (
+      isArabicLetter(letter) &&
+      isInArabicSubstitutionA(letter) &&
+      arabicSubstitionA[letter.charCodeAt(0)].length == 4
+    );
+  });
+
+  var resolveLigatures = (jsPDFAPI.__arabicParser__.resolveLigatures = function(
+    letters
+  ) {
+    var i = 0;
+    var tmpLigatures = ligatures;
+    var result = "";
+    var effectedLetters = 0;
+
+    for (i = 0; i < letters.length; i += 1) {
+      if (typeof tmpLigatures[letters.charCodeAt(i)] !== "undefined") {
+        effectedLetters++;
+        tmpLigatures = tmpLigatures[letters.charCodeAt(i)];
+
+        if (typeof tmpLigatures === "number") {
+          result += String.fromCharCode(tmpLigatures);
+          tmpLigatures = ligatures;
+          effectedLetters = 0;
+        }
+        if (i === letters.length - 1) {
+          tmpLigatures = ligatures;
+          result += letters.charAt(i - (effectedLetters - 1));
+          i = i - (effectedLetters - 1);
+          effectedLetters = 0;
+        }
+      } else {
+        tmpLigatures = ligatures;
+        result += letters.charAt(i - effectedLetters);
+        i = i - effectedLetters;
+        effectedLetters = 0;
+      }
+    }
+
+    return result;
+  });
+
+  jsPDFAPI.__arabicParser__.isArabicDiacritic = function(letter) {
+    return (
+      letter !== undefined &&
+      arabic_diacritics[letter.charCodeAt(0)] !== undefined
+    );
+  };
+
+  var getCorrectForm = (jsPDFAPI.__arabicParser__.getCorrectForm = function(
+    currentChar,
+    beforeChar,
+    nextChar
+  ) {
+    if (!isArabicLetter(currentChar)) {
+      return -1;
+    }
+
+    if (isInArabicSubstitutionA(currentChar) === false) {
+      return noChangeInForm;
+    }
+    if (
+      !arabicLetterHasFinalForm(currentChar) ||
+      (!isArabicLetter(beforeChar) && !isArabicLetter(nextChar)) ||
+      (!isArabicLetter(nextChar) && isArabicEndLetter(beforeChar)) ||
+      (isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar)) ||
+      (isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar)) ||
+      (isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar))
+    ) {
+      return isolatedForm;
+    }
+
+    if (
+      arabicLetterHasMedialForm(currentChar) &&
+      isArabicLetter(beforeChar) &&
+      !isArabicEndLetter(beforeChar) &&
+      isArabicLetter(nextChar) &&
+      arabicLetterHasFinalForm(nextChar)
+    ) {
+      return medialForm;
+    }
+
+    if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {
+      return finalForm;
+    }
+    return initialForm;
+  });
+
+  /**
+   * @name processArabic
+   * @function
+   * @param {string} text
+   * @returns {string}
+   */
+  var parseArabic = function(text) {
+    text = text || "";
+
+    var result = "";
+    var i = 0;
+    var j = 0;
+    var position = 0;
+    var currentLetter = "";
+    var prevLetter = "";
+    var nextLetter = "";
+
+    var words = text.split("\\s+");
+    var newWords = [];
+    for (i = 0; i < words.length; i += 1) {
+      newWords.push("");
+      for (j = 0; j < words[i].length; j += 1) {
+        currentLetter = words[i][j];
+        prevLetter = words[i][j - 1];
+        nextLetter = words[i][j + 1];
+        if (isArabicLetter(currentLetter)) {
+          position = getCorrectForm(currentLetter, prevLetter, nextLetter);
+          if (position !== -1) {
+            newWords[i] += String.fromCharCode(
+              arabicSubstitionA[currentLetter.charCodeAt(0)][position]
+            );
+          } else {
+            newWords[i] += currentLetter;
+          }
+        } else {
+          newWords[i] += currentLetter;
+        }
+      }
+
+      newWords[i] = resolveLigatures(newWords[i]);
+    }
+    result = newWords.join(" ");
+
+    return result;
+  };
+
+  var processArabic = (jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function() {
+    var text =
+      typeof arguments[0] === "string" ? arguments[0] : arguments[0].text;
+    var tmpText = [];
+    var result;
+
+    if (Array.isArray(text)) {
+      var i = 0;
+      tmpText = [];
+      for (i = 0; i < text.length; i += 1) {
+        if (Array.isArray(text[i])) {
+          tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);
+        } else {
+          tmpText.push([parseArabic(text[i])]);
+        }
+      }
+      result = tmpText;
+    } else {
+      result = parseArabic(text);
+    }
+    if (typeof arguments[0] === "string") {
+      return result;
+    } else {
+      arguments[0].text = result;
+      return arguments[0];
+    }
+  });
+
+  jsPDFAPI.events.push(["preProcessText", processArabic]);
+})(jsPDF.API);
+
+/** @license
+ * jsPDF Autoprint Plugin
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * @name autoprint
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  /**
+   * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.
+   *
+   * @name autoPrint
+   * @function
+   * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .
+   * @returns {jsPDF}
+   * @example
+   * var doc = new jsPDF();
+   * doc.text(10, 10, 'This is a test');
+   * doc.autoPrint({variant: 'non-conform'});
+   * doc.save('autoprint.pdf');
+   */
+  jsPDFAPI.autoPrint = function(options) {
+    var refAutoPrintTag;
+    options = options || {};
+    options.variant = options.variant || "non-conform";
+
+    switch (options.variant) {
+      case "javascript":
+        //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb
+        this.addJS("print({});");
+        break;
+      case "non-conform":
+      default:
+        this.internal.events.subscribe("postPutResources", function() {
+          refAutoPrintTag = 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 " + refAutoPrintTag + " 0 R");
+        });
+        break;
+    }
+    return this;
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * jsPDF Canvas PlugIn
+ * This plugin mimics the HTML5 Canvas
+ *
+ * The goal is to provide a way for current canvas users to print directly to a PDF.
+ * @name canvas
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  /**
+   * @class Canvas
+   * @classdesc A Canvas Wrapper for jsPDF
+   */
+  var Canvas = function() {
+    var jsPdfInstance = undefined;
+    Object.defineProperty(this, "pdf", {
+      get: function() {
+        return jsPdfInstance;
+      },
+      set: function(value) {
+        jsPdfInstance = value;
+      }
+    });
+
+    var _width = 150;
+    /**
+     * The height property is a positive integer reflecting the height HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.
+     * This is one of the two properties, the other being width, that controls the size of the canvas.
+     *
+     * @name width
+     */
+    Object.defineProperty(this, "width", {
+      get: function() {
+        return _width;
+      },
+      set: function(value) {
+        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {
+          _width = 150;
+        } else {
+          _width = value;
+        }
+        if (this.getContext("2d").pageWrapXEnabled) {
+          this.getContext("2d").pageWrapX = _width + 1;
+        }
+      }
+    });
+
+    var _height = 300;
+    /**
+     * The width property is a positive integer reflecting the width HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.
+     * This is one of the two properties, the other being height, that controls the size of the canvas.
+     *
+     * @name height
+     */
+    Object.defineProperty(this, "height", {
+      get: function() {
+        return _height;
+      },
+      set: function(value) {
+        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {
+          _height = 300;
+        } else {
+          _height = value;
+        }
+        if (this.getContext("2d").pageWrapYEnabled) {
+          this.getContext("2d").pageWrapY = _height + 1;
+        }
+      }
+    });
+
+    var _childNodes = [];
+    Object.defineProperty(this, "childNodes", {
+      get: function() {
+        return _childNodes;
+      },
+      set: function(value) {
+        _childNodes = value;
+      }
+    });
+
+    var _style = {};
+    Object.defineProperty(this, "style", {
+      get: function() {
+        return _style;
+      },
+      set: function(value) {
+        _style = value;
+      }
+    });
+
+    Object.defineProperty(this, "parentNode", {});
+  };
+
+  /**
+   * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.
+   *
+   * @name getContext
+   * @function
+   * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is "2d", leading to the creation of a Context2D object representing a two-dimensional rendering context.
+   * @param {object} contextAttributes
+   */
+  Canvas.prototype.getContext = function(contextType, contextAttributes) {
+    contextType = contextType || "2d";
+    var key;
+
+    if (contextType !== "2d") {
+      return null;
+    }
+    for (key in contextAttributes) {
+      if (this.pdf.context2d.hasOwnProperty(key)) {
+        this.pdf.context2d[key] = contextAttributes[key];
+      }
+    }
+    this.pdf.context2d._canvas = this;
+    return this.pdf.context2d;
+  };
+
+  /**
+   * The toDataURL() method is just a stub to throw an error if accidently called.
+   *
+   * @name toDataURL
+   * @function
+   */
+  Canvas.prototype.toDataURL = function() {
+    throw new Error("toDataURL is not implemented.");
+  };
+
+  jsPDFAPI.events.push([
+    "initialized",
+    function() {
+      this.canvas = new Canvas();
+      this.canvas.pdf = this;
+    }
+  ]);
+
+  return this;
+})(jsPDF.API);
+
+/**
+ * @license
+ * ====================================================================
+ * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
+ *               2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Hall, james@parall.ax
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+
+/**
+ * @name cell
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  var NO_MARGINS = { left: 0, top: 0, bottom: 0, right: 0 };
+
+  var px2pt = (0.264583 * 72) / 25.4;
+  var printingHeaderRow = false;
+
+  var _initialize = function() {
+    if (typeof this.internal.__cell__ === "undefined") {
+      this.internal.__cell__ = {};
+      this.internal.__cell__.padding = 3;
+      this.internal.__cell__.headerFunction = undefined;
+      this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);
+      this.internal.__cell__.margins.width = this.getPageWidth();
+      _reset.call(this);
+    }
+  };
+
+  var _reset = function() {
+    this.internal.__cell__.lastCell = new Cell();
+    this.internal.__cell__.pages = 1;
+  };
+
+  var Cell = function() {
+    var _x = arguments[0];
+    Object.defineProperty(this, "x", {
+      enumerable: true,
+      get: function() {
+        return _x;
+      },
+      set: function(value) {
+        _x = value;
+      }
+    });
+    var _y = arguments[1];
+    Object.defineProperty(this, "y", {
+      enumerable: true,
+      get: function() {
+        return _y;
+      },
+      set: function(value) {
+        _y = value;
+      }
+    });
+    var _width = arguments[2];
+    Object.defineProperty(this, "width", {
+      enumerable: true,
+      get: function() {
+        return _width;
+      },
+      set: function(value) {
+        _width = value;
+      }
+    });
+    var _height = arguments[3];
+    Object.defineProperty(this, "height", {
+      enumerable: true,
+      get: function() {
+        return _height;
+      },
+      set: function(value) {
+        _height = value;
+      }
+    });
+    var _text = arguments[4];
+    Object.defineProperty(this, "text", {
+      enumerable: true,
+      get: function() {
+        return _text;
+      },
+      set: function(value) {
+        _text = value;
+      }
+    });
+    var _lineNumber = arguments[5];
+    Object.defineProperty(this, "lineNumber", {
+      enumerable: true,
+      get: function() {
+        return _lineNumber;
+      },
+      set: function(value) {
+        _lineNumber = value;
+      }
+    });
+    var _align = arguments[6];
+    Object.defineProperty(this, "align", {
+      enumerable: true,
+      get: function() {
+        return _align;
+      },
+      set: function(value) {
+        _align = value;
+      }
+    });
+
+    return this;
+  };
+
+  Cell.prototype.clone = function() {
+    return new Cell(
+      this.x,
+      this.y,
+      this.width,
+      this.height,
+      this.text,
+      this.lineNumber,
+      this.align
+    );
+  };
+
+  Cell.prototype.toArray = function() {
+    return [
+      this.x,
+      this.y,
+      this.width,
+      this.height,
+      this.text,
+      this.lineNumber,
+      this.align
+    ];
+  };
+
+  /**
+   * @name setHeaderFunction
+   * @function
+   * @param {function} func
+   */
+  jsPDFAPI.setHeaderFunction = function(func) {
+    _initialize.call(this);
+    this.internal.__cell__.headerFunction =
+      typeof func === "function" ? func : undefined;
+    return this;
+  };
+
+  /**
+   * @name getTextDimensions
+   * @function
+   * @param {string} txt
+   * @returns {Object} dimensions
+   */
+  jsPDFAPI.getTextDimensions = function(text, options) {
+    _initialize.call(this);
+    options = options || {};
+    var fontSize = options.fontSize || this.getFontSize();
+    var font = options.font || this.getFont();
+    var scaleFactor = options.scaleFactor || this.internal.scaleFactor;
+    var width = 0;
+    var amountOfLines = 0;
+    var height = 0;
+    var tempWidth = 0;
+    var scope = this;
+
+    if (!Array.isArray(text) && typeof text !== "string") {
+      if (typeof text === "number") {
+        text = String(text);
+      } else {
+        throw new Error(
+          "getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings."
+        );
+      }
+    }
+
+    const maxWidth = options.maxWidth;
+    if (maxWidth > 0) {
+      if (typeof text === "string") {
+        text = this.splitTextToSize(text, maxWidth);
+      } else if (Object.prototype.toString.call(text) === "[object Array]") {
+        text = text.reduce(function(acc, textLine) {
+          return acc.concat(scope.splitTextToSize(textLine, maxWidth));
+        }, []);
+      }
+    } else {
+      // Without the else clause, it will not work if you do not pass along maxWidth
+      text = Array.isArray(text) ? text : [text];
+    }
+
+    for (var i = 0; i < text.length; i++) {
+      tempWidth = this.getStringUnitWidth(text[i], { font: font }) * fontSize;
+      if (width < tempWidth) {
+        width = tempWidth;
+      }
+    }
+
+    if (width !== 0) {
+      amountOfLines = text.length;
+    }
+
+    width = width / scaleFactor;
+    height = Math.max(
+      (amountOfLines * fontSize * this.getLineHeightFactor() -
+        fontSize * (this.getLineHeightFactor() - 1)) /
+        scaleFactor,
+      0
+    );
+    return { w: width, h: height };
+  };
+
+  /**
+   * @name cellAddPage
+   * @function
+   */
+  jsPDFAPI.cellAddPage = function() {
+    _initialize.call(this);
+
+    this.addPage();
+
+    var margins = this.internal.__cell__.margins || NO_MARGINS;
+    this.internal.__cell__.lastCell = new Cell(
+      margins.left,
+      margins.top,
+      undefined,
+      undefined
+    );
+    this.internal.__cell__.pages += 1;
+
+    return this;
+  };
+
+  /**
+   * @name cell
+   * @function
+   * @param {number} x
+   * @param {number} y
+   * @param {number} width
+   * @param {number} height
+   * @param {string} text
+   * @param {number} lineNumber lineNumber
+   * @param {string} align
+   * @return {jsPDF} jsPDF-instance
+   */
+  var cell = (jsPDFAPI.cell = function() {
+    var currentCell;
+
+    if (arguments[0] instanceof Cell) {
+      currentCell = arguments[0];
+    } else {
+      currentCell = new Cell(
+        arguments[0],
+        arguments[1],
+        arguments[2],
+        arguments[3],
+        arguments[4],
+        arguments[5]
+      );
+    }
+    _initialize.call(this);
+    var lastCell = this.internal.__cell__.lastCell;
+    var padding = this.internal.__cell__.padding;
+    var margins = this.internal.__cell__.margins || NO_MARGINS;
+    var tableHeaderRow = this.internal.__cell__.tableHeaderRow;
+    var printHeaders = this.internal.__cell__.printHeaders;
+    // If this is not the first cell, we must change its position
+    if (typeof lastCell.lineNumber !== "undefined") {
+      if (lastCell.lineNumber === currentCell.lineNumber) {
+        //Same line
+        currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);
+        currentCell.y = lastCell.y || 0;
+      } else {
+        //New line
+        if (
+          lastCell.y + lastCell.height + currentCell.height + margins.bottom >
+          this.getPageHeight()
+        ) {
+          this.cellAddPage();
+          currentCell.y = margins.top;
+          if (printHeaders && tableHeaderRow) {
+            this.printHeaderRow(currentCell.lineNumber, true);
+            currentCell.y += tableHeaderRow[0].height;
+          }
+        } else {
+          currentCell.y = lastCell.y + lastCell.height || currentCell.y;
+        }
+      }
+    }
+
+    if (typeof currentCell.text[0] !== "undefined") {
+      this.rect(
+        currentCell.x,
+        currentCell.y,
+        currentCell.width,
+        currentCell.height,
+        printingHeaderRow === true ? "FD" : undefined
+      );
+      if (currentCell.align === "right") {
+        this.text(
+          currentCell.text,
+          currentCell.x + currentCell.width - padding,
+          currentCell.y + padding,
+          { align: "right", baseline: "top" }
+        );
+      } else if (currentCell.align === "center") {
+        this.text(
+          currentCell.text,
+          currentCell.x + currentCell.width / 2,
+          currentCell.y + padding,
+          {
+            align: "center",
+            baseline: "top",
+            maxWidth: currentCell.width - padding - padding
+          }
+        );
+      } else {
+        this.text(
+          currentCell.text,
+          currentCell.x + padding,
+          currentCell.y + padding,
+          {
+            align: "left",
+            baseline: "top",
+            maxWidth: currentCell.width - padding - padding
+          }
+        );
+      }
+    }
+    this.internal.__cell__.lastCell = currentCell;
+    return this;
+  });
+
+  /**
+     * Create a table from a set of data.
+     * @name table
+     * @function
+     * @param {Integer} [x] : left-position for top-left corner of table
+     * @param {Integer} [y] top-position for top-left corner of table
+     * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.
+     * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost
+
+     * @param {Object} [config.printHeaders] True to print column headers at the top of every page
+     * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value
+     * @param {Object} [config.margins] margin values for left, top, bottom, and width
+     * @param {Object} [config.fontSize] Integer fontSize to use (optional)
+     * @param {Object} [config.padding] cell-padding in pt to use (optional)
+     * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)
+     * @param {Object} [config.headerTextColor] default is #000 (optional)
+     * @param {Object} [config.rowStart] callback to handle before print each row (optional)
+     * @param {Object} [config.cellStart] callback to handle before print each cell (optional)
+     * @returns {jsPDF} jsPDF-instance
+     */
+
+  jsPDFAPI.table = function(x, y, data, headers, config) {
+    _initialize.call(this);
+    if (!data) {
+      throw new Error("No data for PDF table.");
+    }
+
+    config = config || {};
+
+    var headerNames = [],
+      headerLabels = [],
+      headerAligns = [],
+      i,
+      columnMatrix = {},
+      columnWidths = {},
+      column,
+      columnMinWidths = [],
+      j,
+      tableHeaderConfigs = [],
+      //set up defaults. If a value is provided in config, defaults will be overwritten:
+      autoSize = config.autoSize || false,
+      printHeaders = config.printHeaders === false ? false : true,
+      fontSize =
+        config.css && typeof config.css["font-size"] !== "undefined"
+          ? config.css["font-size"] * 16
+          : config.fontSize || 12,
+      margins =
+        config.margins ||
+        Object.assign({ width: this.getPageWidth() }, NO_MARGINS),
+      padding = typeof config.padding === "number" ? config.padding : 3,
+      headerBackgroundColor = config.headerBackgroundColor || "#c8c8c8",
+      headerTextColor = config.headerTextColor || "#000";
+
+    _reset.call(this);
+
+    this.internal.__cell__.printHeaders = printHeaders;
+    this.internal.__cell__.margins = margins;
+    this.internal.__cell__.table_font_size = fontSize;
+    this.internal.__cell__.padding = padding;
+    this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;
+    this.internal.__cell__.headerTextColor = headerTextColor;
+    this.setFontSize(fontSize);
+
+    // Set header values
+    if (headers === undefined || headers === null) {
+      // No headers defined so we derive from data
+      headerNames = Object.keys(data[0]);
+      headerLabels = headerNames;
+      headerAligns = headerNames.map(function() {
+        return "left";
+      });
+    } else if (Array.isArray(headers) && typeof headers[0] === "object") {
+      headerNames = headers.map(function(header) {
+        return header.name;
+      });
+      headerLabels = headers.map(function(header) {
+        return header.prompt || header.name || "";
+      });
+      headerAligns = headers.map(function(header) {
+        return header.align || "left";
+      });
+      // Split header configs into names and prompts
+      for (i = 0; i < headers.length; i += 1) {
+        columnWidths[headers[i].name] = headers[i].width * px2pt;
+      }
+    } else if (Array.isArray(headers) && typeof headers[0] === "string") {
+      headerNames = headers;
+      headerLabels = headerNames;
+      headerAligns = headerNames.map(function() {
+        return "left";
+      });
+    }
+
+    if (
+      autoSize ||
+      (Array.isArray(headers) && typeof headers[0] === "string")
+    ) {
+      var headerName;
+      for (i = 0; i < headerNames.length; i += 1) {
+        headerName = headerNames[i];
+
+        // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}
+
+        columnMatrix[headerName] = data.map(function(rec) {
+          return rec[headerName];
+        });
+
+        // get header width
+        this.setFont(undefined, "bold");
+        columnMinWidths.push(
+          this.getTextDimensions(headerLabels[i], {
+            fontSize: this.internal.__cell__.table_font_size,
+            scaleFactor: this.internal.scaleFactor
+          }).w
+        );
+        column = columnMatrix[headerName];
+
+        // get cell widths
+        this.setFont(undefined, "normal");
+        for (j = 0; j < column.length; j += 1) {
+          columnMinWidths.push(
+            this.getTextDimensions(column[j], {
+              fontSize: this.internal.__cell__.table_font_size,
+              scaleFactor: this.internal.scaleFactor
+            }).w
+          );
+        }
+
+        // get final column width
+        columnWidths[headerName] =
+          Math.max.apply(null, columnMinWidths) + padding + padding;
+
+        //have to reset
+        columnMinWidths = [];
+      }
+    }
+
+    // -- Construct the table
+
+    if (printHeaders) {
+      var row = {};
+      for (i = 0; i < headerNames.length; i += 1) {
+        row[headerNames[i]] = {};
+        row[headerNames[i]].text = headerLabels[i];
+        row[headerNames[i]].align = headerAligns[i];
+      }
+
+      var rowHeight = calculateLineHeight.call(this, row, columnWidths);
+
+      // Construct the header row
+      tableHeaderConfigs = headerNames.map(function(value) {
+        return new Cell(
+          x,
+          y,
+          columnWidths[value],
+          rowHeight,
+          row[value].text,
+          undefined,
+          row[value].align
+        );
+      });
+
+      // Store the table header config
+      this.setTableHeaderRow(tableHeaderConfigs);
+
+      // Print the header for the start of the table
+      this.printHeaderRow(1, false);
+    }
+
+    // Construct the data rows
+
+    var align = headers.reduce(function(pv, cv) {
+      pv[cv.name] = cv.align;
+      return pv;
+    }, {});
+    for (i = 0; i < data.length; i += 1) {
+      if ("rowStart" in config && config.rowStart instanceof Function) {
+        config.rowStart(
+          {
+            row: i,
+            data: data[i]
+          },
+          this
+        );
+      }
+      var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);
+
+      for (j = 0; j < headerNames.length; j += 1) {
+        var cellData = data[i][headerNames[j]];
+        if ("cellStart" in config && config.cellStart instanceof Function) {
+          config.cellStart(
+            {
+              row: i,
+              col: j,
+              data: cellData
+            },
+            this
+          );
+        }
+        cell.call(
+          this,
+          new Cell(
+            x,
+            y,
+            columnWidths[headerNames[j]],
+            lineHeight,
+            cellData,
+            i + 2,
+            align[headerNames[j]]
+          )
+        );
+      }
+    }
+    this.internal.__cell__.table_x = x;
+    this.internal.__cell__.table_y = y;
+    return this;
+  };
+
+  /**
+   * Calculate the height for containing the highest column
+   *
+   * @name calculateLineHeight
+   * @function
+   * @param {Object[]} model is the line of data we want to calculate the height of
+   * @param {Integer[]} columnWidths is size of each column
+   * @returns {number} lineHeight
+   * @private
+   */
+  var calculateLineHeight = function calculateLineHeight(model, columnWidths) {
+    var padding = this.internal.__cell__.padding;
+    var fontSize = this.internal.__cell__.table_font_size;
+    var scaleFactor = this.internal.scaleFactor;
+
+    return Object.keys(model)
+      .map(function(key) {
+        var value = model[key];
+        return this.splitTextToSize(
+          value.hasOwnProperty("text") ? value.text : value,
+          columnWidths[key] - padding - padding
+        );
+      }, this)
+      .map(function(value) {
+        return (
+          (this.getLineHeightFactor() * value.length * fontSize) / scaleFactor +
+          padding +
+          padding
+        );
+      }, this)
+      .reduce(function(pv, cv) {
+        return Math.max(pv, cv);
+      }, 0);
+  };
+
+  /**
+   * Store the config for outputting a table header
+   *
+   * @name setTableHeaderRow
+   * @function
+   * @param {Object[]} config
+   * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell
+   * except the lineNumber parameter is excluded
+   */
+  jsPDFAPI.setTableHeaderRow = function(config) {
+    _initialize.call(this);
+    this.internal.__cell__.tableHeaderRow = config;
+  };
+
+  /**
+   * Output the store header row
+   *
+   * @name printHeaderRow
+   * @function
+   * @param {number} lineNumber The line number to output the header at
+   * @param {boolean} new_page
+   */
+  jsPDFAPI.printHeaderRow = function(lineNumber, new_page) {
+    _initialize.call(this);
+    if (!this.internal.__cell__.tableHeaderRow) {
+      throw new Error("Property tableHeaderRow does not exist.");
+    }
+
+    var tableHeaderCell;
+
+    printingHeaderRow = true;
+    if (typeof this.internal.__cell__.headerFunction === "function") {
+      var position = this.internal.__cell__.headerFunction(
+        this,
+        this.internal.__cell__.pages
+      );
+      this.internal.__cell__.lastCell = new Cell(
+        position[0],
+        position[1],
+        position[2],
+        position[3],
+        undefined,
+        -1
+      );
+    }
+    this.setFont(undefined, "bold");
+
+    var tempHeaderConf = [];
+    for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {
+      tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();
+      if (new_page) {
+        tableHeaderCell.y = this.internal.__cell__.margins.top || 0;
+        tempHeaderConf.push(tableHeaderCell);
+      }
+      tableHeaderCell.lineNumber = lineNumber;
+      var currentTextColor = this.getTextColor();
+      this.setTextColor(this.internal.__cell__.headerTextColor);
+      this.setFillColor(this.internal.__cell__.headerBackgroundColor);
+      cell.call(this, tableHeaderCell);
+      this.setTextColor(currentTextColor);
+    }
+    if (tempHeaderConf.length > 0) {
+      this.setTableHeaderRow(tempHeaderConf);
+    }
+    this.setFont(undefined, "normal");
+    printingHeaderRow = false;
+  };
+})(jsPDF.API);
+
+function toLookup(arr) {
+  return arr.reduce(function(lookup, name, index) {
+    lookup[name] = index;
+
+    return lookup;
+  }, {});
+}
+
+var fontStyleOrder = {
+  italic: ["italic", "oblique", "normal"],
+  oblique: ["oblique", "italic", "normal"],
+  normal: ["normal", "oblique", "italic"]
+};
+
+var fontStretchOrder = [
+  "ultra-condensed",
+  "extra-condensed",
+  "condensed",
+  "semi-condensed",
+  "normal",
+  "semi-expanded",
+  "expanded",
+  "extra-expanded",
+  "ultra-expanded"
+];
+
+// For a given font-stretch value, we need to know where to start our search
+// from in the fontStretchOrder list.
+var fontStretchLookup = toLookup(fontStretchOrder);
+
+var fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];
+var fontWeightsLookup = toLookup(fontWeights);
+
+function normalizeFontStretch(stretch) {
+  stretch = stretch || "normal";
+
+  return typeof fontStretchLookup[stretch] === "number" ? stretch : "normal";
+}
+
+function normalizeFontStyle(style) {
+  style = style || "normal";
+
+  return fontStyleOrder[style] ? style : "normal";
+}
+
+function normalizeFontWeight(weight) {
+  if (!weight) {
+    return 400;
+  }
+
+  if (typeof weight === "number") {
+    // Ignore values which aren't valid font-weights.
+    return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;
+  }
+
+  if (/^\d00$/.test(weight)) {
+    return parseInt(weight);
+  }
+
+  switch (weight) {
+    case "bold":
+      return 700;
+
+    case "normal":
+    default:
+      return 400;
+  }
+}
+
+function normalizeFontFace(fontFace) {
+  var family = fontFace.family.replace(/"|'/g, "").toLowerCase();
+
+  var style = normalizeFontStyle(fontFace.style);
+  var weight = normalizeFontWeight(fontFace.weight);
+  var stretch = normalizeFontStretch(fontFace.stretch);
+
+  return {
+    family: family,
+    style: style,
+    weight: weight,
+    stretch: stretch,
+    src: fontFace.src || [],
+
+    // The ref property maps this font-face to the font
+    // added by the .addFont() method.
+    ref: fontFace.ref || {
+      name: family,
+      style: [stretch, style, weight].join(" ")
+    }
+  };
+}
+
+/**
+ * Turns a list of font-faces into a map, for easier lookup when resolving
+ * fonts.
+ * @private
+ */
+function buildFontFaceMap(fontFaces) {
+  var map = {};
+
+  for (var i = 0; i < fontFaces.length; ++i) {
+    var normalized = normalizeFontFace(fontFaces[i]);
+
+    var name = normalized.family;
+    var stretch = normalized.stretch;
+    var style = normalized.style;
+    var weight = normalized.weight;
+
+    map[name] = map[name] || {};
+
+    map[name][stretch] = map[name][stretch] || {};
+    map[name][stretch][style] = map[name][stretch][style] || {};
+    map[name][stretch][style][weight] = normalized;
+  }
+
+  return map;
+}
+
+/**
+ * Searches a map of stretches, weights, etc. in the given direction and
+ * then, if no match has been found, in the opposite directions.
+ *
+ * @param {Object.<string, any>} matchingSet A map of the various font variations.
+ * @param {any[]} order The order of the different variations
+ * @param {number} pivot The starting point of the search in the order list.
+ * @param {number} dir The initial direction of the search (desc = -1, asc = 1)
+ * @private
+ */
+
+function searchFromPivot(matchingSet, order, pivot, dir) {
+  var i;
+
+  for (i = pivot; i >= 0 && i < order.length; i += dir) {
+    if (matchingSet[order[i]]) {
+      return matchingSet[order[i]];
+    }
+  }
+
+  for (i = pivot; i >= 0 && i < order.length; i -= dir) {
+    if (matchingSet[order[i]]) {
+      return matchingSet[order[i]];
+    }
+  }
+}
+
+function resolveFontStretch(stretch, matchingSet) {
+  if (matchingSet[stretch]) {
+    return matchingSet[stretch];
+  }
+
+  var pivot = fontStretchLookup[stretch];
+
+  // If the font-stretch value is normal or more condensed, we want to
+  // start with a descending search, otherwise we should do ascending.
+  var dir = pivot <= fontStretchLookup["normal"] ? -1 : 1;
+  var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);
+
+  if (!match) {
+    // Since a font-family cannot exist without having at least one stretch value
+    // we should never reach this point.
+    throw new Error(
+      "Could not find a matching font-stretch value for " + stretch
+    );
+  }
+
+  return match;
+}
+
+function resolveFontStyle(fontStyle, matchingSet) {
+  if (matchingSet[fontStyle]) {
+    return matchingSet[fontStyle];
+  }
+
+  var ordering = fontStyleOrder[fontStyle];
+
+  for (var i = 0; i < ordering.length; ++i) {
+    if (matchingSet[ordering[i]]) {
+      return matchingSet[ordering[i]];
+    }
+  }
+
+  // Since a font-family cannot exist without having at least one style value
+  // we should never reach this point.
+  throw new Error("Could not find a matching font-style for " + fontStyle);
+}
+
+function resolveFontWeight(weight, matchingSet) {
+  if (matchingSet[weight]) {
+    return matchingSet[weight];
+  }
+
+  if (weight === 400 && matchingSet[500]) {
+    return matchingSet[500];
+  }
+
+  if (weight === 500 && matchingSet[400]) {
+    return matchingSet[400];
+  }
+
+  var pivot = fontWeightsLookup[weight];
+
+  // If the font-stretch value is normal or more condensed, we want to
+  // start with a descending search, otherwise we should do ascending.
+  var dir = weight < 400 ? -1 : 1;
+  var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);
+
+  if (!match) {
+    // Since a font-family cannot exist without having at least one stretch value
+    // we should never reach this point.
+    throw new Error(
+      "Could not find a matching font-weight for value " + weight
+    );
+  }
+
+  return match;
+}
+
+var defaultGenericFontFamilies = {
+  "sans-serif": "helvetica",
+  fixed: "courier",
+  monospace: "courier",
+  terminal: "courier",
+  cursive: "times",
+  fantasy: "times",
+  serif: "times"
+};
+
+var systemFonts = {
+  caption: "times",
+  icon: "times",
+  menu: "times",
+  "message-box": "times",
+  "small-caption": "times",
+  "status-bar": "times"
+};
+
+function ruleToString(rule) {
+  return [rule.stretch, rule.style, rule.weight, rule.family].join(" ");
+}
+
+function resolveFontFace(fontFaceMap, rules, opts) {
+  opts = opts || {};
+
+  var defaultFontFamily = opts.defaultFontFamily || "times";
+  var genericFontFamilies = Object.assign(
+    {},
+    defaultGenericFontFamilies,
+    opts.genericFontFamilies || {}
+  );
+
+  var rule = null;
+  var matches = null;
+
+  for (var i = 0; i < rules.length; ++i) {
+    rule = normalizeFontFace(rules[i]);
+
+    if (genericFontFamilies[rule.family]) {
+      rule.family = genericFontFamilies[rule.family];
+    }
+
+    if (fontFaceMap.hasOwnProperty(rule.family)) {
+      matches = fontFaceMap[rule.family];
+
+      break;
+    }
+  }
+
+  // Always fallback to a known font family.
+  matches = matches || fontFaceMap[defaultFontFamily];
+
+  if (!matches) {
+    // At this point we should definitiely have a font family, but if we
+    // don't there is something wrong with our configuration
+    throw new Error(
+      "Could not find a font-family for the rule '" +
+        ruleToString(rule) +
+        "' and default family '" +
+        defaultFontFamily +
+        "'."
+    );
+  }
+
+  matches = resolveFontStretch(rule.stretch, matches);
+  matches = resolveFontStyle(rule.style, matches);
+  matches = resolveFontWeight(rule.weight, matches);
+
+  if (!matches) {
+    // We should've fount
+    throw new Error(
+      "Failed to resolve a font for the rule '" + ruleToString(rule) + "'."
+    );
+  }
+
+  return matches;
+}
+
+function eatWhiteSpace(input) {
+  return input.trimLeft();
+}
+
+function parseQuotedFontFamily(input, quote) {
+  var index = 0;
+
+  while (index < input.length) {
+    var current = input.charAt(index);
+
+    if (current === quote) {
+      return [input.substring(0, index), input.substring(index + 1)];
+    }
+
+    index += 1;
+  }
+
+  // Unexpected end of input
+  return null;
+}
+
+function parseNonQuotedFontFamily(input) {
+  // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+  //
+  // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.
+  //
+  // Breakdown of regexp:
+  // -[a-z_]     - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit
+  // [a-z_]      - allow a-z and underscore at beginning of input
+  // [a-z0-9_-]* - after that, anything goes
+  var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);
+
+  // non quoted value contains illegal characters
+  if (match === null) {
+    return null;
+  }
+
+  return [match[0], input.substring(match[0].length)];
+}
+
+var defaultFont = ["times"];
+
+function parseFontFamily(input) {
+  var result = [];
+  var ch, parsed;
+  var remaining = input.trim();
+
+  if (remaining === "") {
+    return defaultFont;
+  }
+
+  if (remaining in systemFonts) {
+    return [systemFonts[remaining]];
+  }
+
+  while (remaining !== "") {
+    parsed = null;
+    remaining = eatWhiteSpace(remaining);
+    ch = remaining.charAt(0);
+
+    switch (ch) {
+      case '"':
+      case "'":
+        parsed = parseQuotedFontFamily(remaining.substring(1), ch);
+        break;
+
+      default:
+        parsed = parseNonQuotedFontFamily(remaining);
+        break;
+    }
+
+    if (parsed === null) {
+      return defaultFont;
+    }
+
+    result.push(parsed[0]);
+
+    remaining = eatWhiteSpace(parsed[1]);
+
+    // We expect end of input or a comma separator here
+    if (remaining !== "" && remaining.charAt(0) !== ",") {
+      return defaultFont;
+    }
+
+    remaining = remaining.replace(/^,/, "");
+  }
+
+  return result;
+}
+
+/* eslint-disable no-fallthrough */
+
+/**
+ * This plugin mimics the HTML5 CanvasRenderingContext2D.
+ *
+ * The goal is to provide a way for current canvas implementations to print directly to a PDF.
+ *
+ * @name context2d
+ * @module
+ */
+(function(jsPDFAPI) {
+  var ContextLayer = function(ctx) {
+    ctx = ctx || {};
+    this.isStrokeTransparent = ctx.isStrokeTransparent || false;
+    this.strokeOpacity = ctx.strokeOpacity || 1;
+    this.strokeStyle = ctx.strokeStyle || "#000000";
+    this.fillStyle = ctx.fillStyle || "#000000";
+    this.isFillTransparent = ctx.isFillTransparent || false;
+    this.fillOpacity = ctx.fillOpacity || 1;
+    this.font = ctx.font || "10px sans-serif";
+    this.textBaseline = ctx.textBaseline || "alphabetic";
+    this.textAlign = ctx.textAlign || "left";
+    this.lineWidth = ctx.lineWidth || 1;
+    this.lineJoin = ctx.lineJoin || "miter";
+    this.lineCap = ctx.lineCap || "butt";
+    this.path = ctx.path || [];
+    this.transform =
+      typeof ctx.transform !== "undefined"
+        ? ctx.transform.clone()
+        : new Matrix();
+    this.globalCompositeOperation = ctx.globalCompositeOperation || "normal";
+    this.globalAlpha = ctx.globalAlpha || 1.0;
+    this.clip_path = ctx.clip_path || [];
+    this.currentPoint = ctx.currentPoint || new Point();
+    this.miterLimit = ctx.miterLimit || 10.0;
+    this.lastPoint = ctx.lastPoint || new Point();
+    this.lineDashOffset = ctx.lineDashOffset || 0.0;
+    this.lineDash = ctx.lineDash || [];
+    this.margin = ctx.margin || [0, 0, 0, 0];
+    this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;
+
+    this.ignoreClearRect =
+      typeof ctx.ignoreClearRect === "boolean" ? ctx.ignoreClearRect : true;
+    return this;
+  };
+
+  //stub
+  var f2,
+    getHorizontalCoordinateString,
+    getVerticalCoordinateString,
+    getHorizontalCoordinate,
+    getVerticalCoordinate,
+    Point,
+    Rectangle,
+    Matrix,
+    _ctx;
+  jsPDFAPI.events.push([
+    "initialized",
+    function() {
+      this.context2d = new Context2D(this);
+
+      f2 = this.internal.f2;
+      getHorizontalCoordinateString = this.internal.getCoordinateString;
+      getVerticalCoordinateString = this.internal.getVerticalCoordinateString;
+      getHorizontalCoordinate = this.internal.getHorizontalCoordinate;
+      getVerticalCoordinate = this.internal.getVerticalCoordinate;
+      Point = this.internal.Point;
+      Rectangle = this.internal.Rectangle;
+      Matrix = this.internal.Matrix;
+      _ctx = new ContextLayer();
+    }
+  ]);
+
+  var Context2D = function(pdf) {
+    Object.defineProperty(this, "canvas", {
+      get: function() {
+        return { parentNode: false, style: false };
+      }
+    });
+
+    var _pdf = pdf;
+    Object.defineProperty(this, "pdf", {
+      get: function() {
+        return _pdf;
+      }
+    });
+
+    var _pageWrapXEnabled = false;
+    /**
+     * @name pageWrapXEnabled
+     * @type {boolean}
+     * @default false
+     */
+    Object.defineProperty(this, "pageWrapXEnabled", {
+      get: function() {
+        return _pageWrapXEnabled;
+      },
+      set: function(value) {
+        _pageWrapXEnabled = Boolean(value);
+      }
+    });
+
+    var _pageWrapYEnabled = false;
+    /**
+     * @name pageWrapYEnabled
+     * @type {boolean}
+     * @default true
+     */
+    Object.defineProperty(this, "pageWrapYEnabled", {
+      get: function() {
+        return _pageWrapYEnabled;
+      },
+      set: function(value) {
+        _pageWrapYEnabled = Boolean(value);
+      }
+    });
+
+    var _posX = 0;
+    /**
+     * @name posX
+     * @type {number}
+     * @default 0
+     */
+    Object.defineProperty(this, "posX", {
+      get: function() {
+        return _posX;
+      },
+      set: function(value) {
+        if (!isNaN(value)) {
+          _posX = value;
+        }
+      }
+    });
+
+    var _posY = 0;
+    /**
+     * @name posY
+     * @type {number}
+     * @default 0
+     */
+    Object.defineProperty(this, "posY", {
+      get: function() {
+        return _posY;
+      },
+      set: function(value) {
+        if (!isNaN(value)) {
+          _posY = value;
+        }
+      }
+    });
+
+    /**
+     * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.
+     * @name margin
+     * @type {number|number[]}
+     * @default [0, 0, 0, 0]
+     */
+    Object.defineProperty(this, "margin", {
+      get: function() {
+        return _ctx.margin;
+      },
+      set: function(value) {
+        var margin;
+        if (typeof value === "number") {
+          margin = [value, value, value, value];
+        } else {
+          margin = new Array(4);
+          margin[0] = value[0];
+          margin[1] = value.length >= 2 ? value[1] : margin[0];
+          margin[2] = value.length >= 3 ? value[2] : margin[0];
+          margin[3] = value.length >= 4 ? value[3] : margin[1];
+        }
+        _ctx.margin = margin;
+      }
+    });
+
+    var _autoPaging = false;
+    /**
+     * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the
+     * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new
+     * pages if required.
+     *
+     * Context2d supports different modes:
+     * <ul>
+     * <li>
+     *   <code>false</code>: Auto paging is disabled.
+     * </li>
+     * <li>
+     *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly
+     *   slice text in half, making it difficult to read.
+     * </li>
+     * <li>
+     *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting
+     *   mostly of a single column of text.
+     * </li>
+     * </ul>
+     * @name Context2D#autoPaging
+     * @type {boolean|"slice"|"text"}
+     * @default false
+     */
+    Object.defineProperty(this, "autoPaging", {
+      get: function() {
+        return _autoPaging;
+      },
+      set: function(value) {
+        _autoPaging = value;
+      }
+    });
+
+    var lastBreak = 0;
+    /**
+     * @name lastBreak
+     * @type {number}
+     * @default 0
+     */
+    Object.defineProperty(this, "lastBreak", {
+      get: function() {
+        return lastBreak;
+      },
+      set: function(value) {
+        lastBreak = value;
+      }
+    });
+
+    var pageBreaks = [];
+    /**
+     * Y Position of page breaks.
+     * @name pageBreaks
+     * @type {number}
+     * @default 0
+     */
+    Object.defineProperty(this, "pageBreaks", {
+      get: function() {
+        return pageBreaks;
+      },
+      set: function(value) {
+        pageBreaks = value;
+      }
+    });
+
+    /**
+     * @name ctx
+     * @type {object}
+     * @default {}
+     */
+    Object.defineProperty(this, "ctx", {
+      get: function() {
+        return _ctx;
+      },
+      set: function(value) {
+        if (value instanceof ContextLayer) {
+          _ctx = value;
+        }
+      }
+    });
+
+    /**
+     * @name path
+     * @type {array}
+     * @default []
+     */
+    Object.defineProperty(this, "path", {
+      get: function() {
+        return _ctx.path;
+      },
+      set: function(value) {
+        _ctx.path = value;
+      }
+    });
+
+    /**
+     * @name ctxStack
+     * @type {array}
+     * @default []
+     */
+    var _ctxStack = [];
+    Object.defineProperty(this, "ctxStack", {
+      get: function() {
+        return _ctxStack;
+      },
+      set: function(value) {
+        _ctxStack = value;
+      }
+    });
+
+    /**
+     * Sets or returns the color, gradient, or pattern used to fill the drawing
+     *
+     * @name fillStyle
+     * @default #000000
+     * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />
+     * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />
+     * A pattern object to use to fill the drawing (not supported by context2d)
+     */
+    Object.defineProperty(this, "fillStyle", {
+      get: function() {
+        return this.ctx.fillStyle;
+      },
+      set: function(value) {
+        var rgba;
+        rgba = getRGBA(value);
+
+        this.ctx.fillStyle = rgba.style;
+        this.ctx.isFillTransparent = rgba.a === 0;
+        this.ctx.fillOpacity = rgba.a;
+
+        this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });
+        this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });
+      }
+    });
+
+    /**
+     * Sets or returns the color, gradient, or pattern used for strokes
+     *
+     * @name strokeStyle
+     * @default #000000
+     * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)
+     * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)
+     * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)
+     */
+    Object.defineProperty(this, "strokeStyle", {
+      get: function() {
+        return this.ctx.strokeStyle;
+      },
+      set: function(value) {
+        var rgba = getRGBA(value);
+
+        this.ctx.strokeStyle = rgba.style;
+        this.ctx.isStrokeTransparent = rgba.a === 0;
+        this.ctx.strokeOpacity = rgba.a;
+
+        if (rgba.a === 0) {
+          this.pdf.setDrawColor(255, 255, 255);
+        } else if (rgba.a === 1) {
+          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);
+        } else {
+          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);
+        }
+      }
+    });
+
+    /**
+     * Sets or returns the style of the end caps for a line
+     *
+     * @name lineCap
+     * @default butt
+     * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line <br/>
+     * round A rounded end cap is added to each end of the line<br/>
+     * square A square end cap is added to each end of the line<br/>
+     */
+    Object.defineProperty(this, "lineCap", {
+      get: function() {
+        return this.ctx.lineCap;
+      },
+      set: function(value) {
+        if (["butt", "round", "square"].indexOf(value) !== -1) {
+          this.ctx.lineCap = value;
+          this.pdf.setLineCap(value);
+        }
+      }
+    });
+
+    /**
+     * Sets or returns the current line width
+     *
+     * @name lineWidth
+     * @default 1
+     * @property {number} lineWidth The current line width, in pixels
+     */
+    Object.defineProperty(this, "lineWidth", {
+      get: function() {
+        return this.ctx.lineWidth;
+      },
+      set: function(value) {
+        if (!isNaN(value)) {
+          this.ctx.lineWidth = value;
+          this.pdf.setLineWidth(value);
+        }
+      }
+    });
+
+    /**
+     * Sets or returns the type of corner created, when two lines meet
+     */
+    Object.defineProperty(this, "lineJoin", {
+      get: function() {
+        return this.ctx.lineJoin;
+      },
+      set: function(value) {
+        if (["bevel", "round", "miter"].indexOf(value) !== -1) {
+          this.ctx.lineJoin = value;
+          this.pdf.setLineJoin(value);
+        }
+      }
+    });
+
+    /**
+     * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.
+     *
+     * @name miterLimit
+     * @default 10
+     */
+    Object.defineProperty(this, "miterLimit", {
+      get: function() {
+        return this.ctx.miterLimit;
+      },
+      set: function(value) {
+        if (!isNaN(value)) {
+          this.ctx.miterLimit = value;
+          this.pdf.setMiterLimit(value);
+        }
+      }
+    });
+
+    Object.defineProperty(this, "textBaseline", {
+      get: function() {
+        return this.ctx.textBaseline;
+      },
+      set: function(value) {
+        this.ctx.textBaseline = value;
+      }
+    });
+
+    Object.defineProperty(this, "textAlign", {
+      get: function() {
+        return this.ctx.textAlign;
+      },
+      set: function(value) {
+        if (["right", "end", "center", "left", "start"].indexOf(value) !== -1) {
+          this.ctx.textAlign = value;
+        }
+      }
+    });
+
+    var _fontFaceMap = null;
+
+    function getFontFaceMap(pdf, fontFaces) {
+      if (_fontFaceMap === null) {
+        var fontMap = pdf.getFontList();
+
+        var convertedFontFaces = convertToFontFaces(fontMap);
+
+        _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));
+      }
+
+      return _fontFaceMap;
+    }
+
+    function convertToFontFaces(fontMap) {
+      var fontFaces = [];
+
+      Object.keys(fontMap).forEach(function(family) {
+        var styles = fontMap[family];
+
+        styles.forEach(function(style) {
+          var fontFace = null;
+
+          switch (style) {
+            case "bold":
+              fontFace = {
+                family: family,
+                weight: "bold"
+              };
+              break;
+
+            case "italic":
+              fontFace = {
+                family: family,
+                style: "italic"
+              };
+              break;
+
+            case "bolditalic":
+              fontFace = {
+                family: family,
+                weight: "bold",
+                style: "italic"
+              };
+              break;
+
+            case "":
+            case "normal":
+              fontFace = {
+                family: family
+              };
+              break;
+          }
+
+          // If font-face is still null here, it is a font with some styling we don't recognize and
+          // cannot map or it is a font added via the fontFaces option of .html().
+          if (fontFace !== null) {
+            fontFace.ref = {
+              name: family,
+              style: style
+            };
+
+            fontFaces.push(fontFace);
+          }
+        });
+      });
+
+      return fontFaces;
+    }
+
+    var _fontFaces = null;
+    /**
+     * A map of available font-faces, as passed in the options of
+     * .html(). If set a limited implementation of the font style matching
+     * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm
+     * will be used. If not set it will fallback to previous behavior.
+     */
+
+    Object.defineProperty(this, "fontFaces", {
+      get: function() {
+        return _fontFaces;
+      },
+      set: function(value) {
+        _fontFaceMap = null;
+        _fontFaces = value;
+      }
+    });
+
+    Object.defineProperty(this, "font", {
+      get: function() {
+        return this.ctx.font;
+      },
+      set: function(value) {
+        this.ctx.font = value;
+        var rx, matches;
+
+        //source: https://stackoverflow.com/a/10136041
+        // eslint-disable-next-line no-useless-escape
+        rx = /^\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;
+        matches = rx.exec(value);
+        if (matches !== null) {
+          var fontStyle = matches[1];
+          var fontVariant = matches[2];
+          var fontWeight = matches[3];
+          var fontSize = matches[4];
+          var lineHeight = matches[5];
+          var fontFamily = matches[6];
+        } else {
+          return;
+        }
+        var rxFontSize = /^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;
+        var fontSizeUnit = rxFontSize.exec(fontSize)[2];
+
+        if ("px" === fontSizeUnit) {
+          fontSize = Math.floor(
+            parseFloat(fontSize) * this.pdf.internal.scaleFactor
+          );
+        } else if ("em" === fontSizeUnit) {
+          fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());
+        } else {
+          fontSize = Math.floor(
+            parseFloat(fontSize) * this.pdf.internal.scaleFactor
+          );
+        }
+
+        this.pdf.setFontSize(fontSize);
+        var parts = parseFontFamily(fontFamily);
+
+        if (this.fontFaces) {
+          var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);
+
+          var rules = parts.map(function(ff) {
+            return {
+              family: ff,
+              stretch: "normal", // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)
+              weight: fontWeight,
+              style: fontStyle
+            };
+          });
+
+          var font = resolveFontFace(fontFaceMap, rules);
+          this.pdf.setFont(font.ref.name, font.ref.style);
+          return;
+        }
+
+        var style = "";
+        if (
+          fontWeight === "bold" ||
+          parseInt(fontWeight, 10) >= 700 ||
+          fontStyle === "bold"
+        ) {
+          style = "bold";
+        }
+
+        if (fontStyle === "italic") {
+          style += "italic";
+        }
+
+        if (style.length === 0) {
+          style = "normal";
+        }
+        var jsPdfFontName = "";
+
+        var fallbackFonts = {
+          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"
+        };
+
+        for (var i = 0; i < parts.length; i++) {
+          if (
+            this.pdf.internal.getFont(parts[i], style, {
+              noFallback: true,
+              disableWarning: true
+            }) !== undefined
+          ) {
+            jsPdfFontName = parts[i];
+            break;
+          } else if (
+            style === "bolditalic" &&
+            this.pdf.internal.getFont(parts[i], "bold", {
+              noFallback: true,
+              disableWarning: true
+            }) !== undefined
+          ) {
+            jsPdfFontName = parts[i];
+            style = "bold";
+          } else if (
+            this.pdf.internal.getFont(parts[i], "normal", {
+              noFallback: true,
+              disableWarning: true
+            }) !== undefined
+          ) {
+            jsPdfFontName = parts[i];
+            style = "normal";
+            break;
+          }
+        }
+        if (jsPdfFontName === "") {
+          for (var j = 0; j < parts.length; j++) {
+            if (fallbackFonts[parts[j]]) {
+              jsPdfFontName = fallbackFonts[parts[j]];
+              break;
+            }
+          }
+        }
+        jsPdfFontName = jsPdfFontName === "" ? "Times" : jsPdfFontName;
+        this.pdf.setFont(jsPdfFontName, style);
+      }
+    });
+
+    Object.defineProperty(this, "globalCompositeOperation", {
+      get: function() {
+        return this.ctx.globalCompositeOperation;
+      },
+      set: function(value) {
+        this.ctx.globalCompositeOperation = value;
+      }
+    });
+
+    Object.defineProperty(this, "globalAlpha", {
+      get: function() {
+        return this.ctx.globalAlpha;
+      },
+      set: function(value) {
+        this.ctx.globalAlpha = value;
+      }
+    });
+
+    /**
+     * A float specifying the amount of the line dash offset. The default value is 0.0.
+     *
+     * @name lineDashOffset
+     * @default 0.0
+     */
+    Object.defineProperty(this, "lineDashOffset", {
+      get: function() {
+        return this.ctx.lineDashOffset;
+      },
+      set: function(value) {
+        this.ctx.lineDashOffset = value;
+        setLineDash.call(this);
+      }
+    });
+
+    // Not HTML API
+    Object.defineProperty(this, "lineDash", {
+      get: function() {
+        return this.ctx.lineDash;
+      },
+      set: function(value) {
+        this.ctx.lineDash = value;
+        setLineDash.call(this);
+      }
+    });
+
+    // Not HTML API
+    Object.defineProperty(this, "ignoreClearRect", {
+      get: function() {
+        return this.ctx.ignoreClearRect;
+      },
+      set: function(value) {
+        this.ctx.ignoreClearRect = Boolean(value);
+      }
+    });
+  };
+
+  /**
+   * Sets the line dash pattern used when stroking lines.
+   * @name setLineDash
+   * @function
+   * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.
+   */
+  Context2D.prototype.setLineDash = function(dashArray) {
+    this.lineDash = dashArray;
+  };
+
+  /**
+   * gets the current line dash pattern.
+   * @name getLineDash
+   * @function
+   * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].
+   */
+  Context2D.prototype.getLineDash = function() {
+    if (this.lineDash.length % 2) {
+      // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value
+      return this.lineDash.concat(this.lineDash);
+    } else {
+      // The copied value is returned to prevent contamination from outside.
+      return this.lineDash.slice();
+    }
+  };
+
+  Context2D.prototype.fill = function() {
+    pathPreProcess.call(this, "fill", false);
+  };
+
+  /**
+   * Actually draws the path you have defined
+   *
+   * @name stroke
+   * @function
+   * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.
+   */
+  Context2D.prototype.stroke = function() {
+    pathPreProcess.call(this, "stroke", false);
+  };
+
+  /**
+   * Begins a path, or resets the current
+   *
+   * @name beginPath
+   * @function
+   * @description The beginPath() method begins a path, or resets the current path.
+   */
+  Context2D.prototype.beginPath = function() {
+    this.path = [
+      {
+        type: "begin"
+      }
+    ];
+  };
+
+  /**
+   * Moves the path to the specified point in the canvas, without creating a line
+   *
+   * @name moveTo
+   * @function
+   * @param x {Number} The x-coordinate of where to move the path to
+   * @param y {Number} The y-coordinate of where to move the path to
+   */
+  Context2D.prototype.moveTo = function(x, y) {
+    if (isNaN(x) || isNaN(y)) {
+      console.error("jsPDF.context2d.moveTo: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.moveTo");
+    }
+
+    var pt = this.ctx.transform.applyToPoint(new Point(x, y));
+
+    this.path.push({
+      type: "mt",
+      x: pt.x,
+      y: pt.y
+    });
+    this.ctx.lastPoint = new Point(x, y);
+  };
+
+  /**
+   * Creates a path from the current point back to the starting point
+   *
+   * @name closePath
+   * @function
+   * @description The closePath() method creates a path from the current point back to the starting point.
+   */
+  Context2D.prototype.closePath = function() {
+    var pathBegin = new Point(0, 0);
+    var i = 0;
+    for (i = this.path.length - 1; i !== -1; i--) {
+      if (this.path[i].type === "begin") {
+        if (
+          typeof this.path[i + 1] === "object" &&
+          typeof this.path[i + 1].x === "number"
+        ) {
+          pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);
+          break;
+        }
+      }
+    }
+    this.path.push({
+      type: "close"
+    });
+    this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);
+  };
+
+  /**
+   * Adds a new point and creates a line to that point from the last specified point in the canvas
+   *
+   * @name lineTo
+   * @function
+   * @param x The x-coordinate of where to create the line to
+   * @param y The y-coordinate of where to create the line to
+   * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).
+   */
+  Context2D.prototype.lineTo = function(x, y) {
+    if (isNaN(x) || isNaN(y)) {
+      console.error("jsPDF.context2d.lineTo: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.lineTo");
+    }
+
+    var pt = this.ctx.transform.applyToPoint(new Point(x, y));
+
+    this.path.push({
+      type: "lt",
+      x: pt.x,
+      y: pt.y
+    });
+    this.ctx.lastPoint = new Point(pt.x, pt.y);
+  };
+
+  /**
+   * Clips a region of any shape and size from the original canvas
+   *
+   * @name clip
+   * @function
+   * @description The clip() method clips a region of any shape and size from the original canvas.
+   */
+  Context2D.prototype.clip = function() {
+    this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));
+    pathPreProcess.call(this, null, true);
+  };
+
+  /**
+   * Creates a cubic Bézier curve
+   *
+   * @name quadraticCurveTo
+   * @function
+   * @param cpx {Number} The x-coordinate of the Bézier control point
+   * @param cpy {Number} The y-coordinate of the Bézier control point
+   * @param x {Number} The x-coordinate of the ending point
+   * @param y {Number} The y-coordinate of the ending point
+   * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.<br /><br /> A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.
+   */
+  Context2D.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {
+    if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {
+      console.error(
+        "jsPDF.context2d.quadraticCurveTo: Invalid arguments",
+        arguments
+      );
+      throw new Error(
+        "Invalid arguments passed to jsPDF.context2d.quadraticCurveTo"
+      );
+    }
+
+    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));
+    var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));
+
+    this.path.push({
+      type: "qct",
+      x1: pt1.x,
+      y1: pt1.y,
+      x: pt0.x,
+      y: pt0.y
+    });
+    this.ctx.lastPoint = new Point(pt0.x, pt0.y);
+  };
+
+  /**
+   * Creates a cubic Bézier curve
+   *
+   * @name bezierCurveTo
+   * @function
+   * @param cp1x {Number} The x-coordinate of the first Bézier control point
+   * @param cp1y {Number} The y-coordinate of the first Bézier control point
+   * @param cp2x {Number} The x-coordinate of the second Bézier control point
+   * @param cp2y {Number} The y-coordinate of the second Bézier control point
+   * @param x {Number} The x-coordinate of the ending point
+   * @param y {Number} The y-coordinate of the ending point
+   * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve. <br /><br />A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve.  The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.
+   */
+  Context2D.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {
+    if (
+      isNaN(x) ||
+      isNaN(y) ||
+      isNaN(cp1x) ||
+      isNaN(cp1y) ||
+      isNaN(cp2x) ||
+      isNaN(cp2y)
+    ) {
+      console.error(
+        "jsPDF.context2d.bezierCurveTo: Invalid arguments",
+        arguments
+      );
+      throw new Error(
+        "Invalid arguments passed to jsPDF.context2d.bezierCurveTo"
+      );
+    }
+    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));
+    var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));
+    var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));
+
+    this.path.push({
+      type: "bct",
+      x1: pt1.x,
+      y1: pt1.y,
+      x2: pt2.x,
+      y2: pt2.y,
+      x: pt0.x,
+      y: pt0.y
+    });
+    this.ctx.lastPoint = new Point(pt0.x, pt0.y);
+  };
+
+  /**
+   * Creates an arc/curve (used to create circles, or parts of circles)
+   *
+   * @name arc
+   * @function
+   * @param x {Number} The x-coordinate of the center of the circle
+   * @param y {Number} The y-coordinate of the center of the circle
+   * @param radius {Number} The radius of the circle
+   * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)
+   * @param endAngle {Number} The ending angle, in radians
+   * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.
+   * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).
+   */
+  Context2D.prototype.arc = function(
+    x,
+    y,
+    radius,
+    startAngle,
+    endAngle,
+    counterclockwise
+  ) {
+    if (
+      isNaN(x) ||
+      isNaN(y) ||
+      isNaN(radius) ||
+      isNaN(startAngle) ||
+      isNaN(endAngle)
+    ) {
+      console.error("jsPDF.context2d.arc: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.arc");
+    }
+    counterclockwise = Boolean(counterclockwise);
+
+    if (!this.ctx.transform.isIdentity) {
+      var xpt = this.ctx.transform.applyToPoint(new Point(x, y));
+      x = xpt.x;
+      y = xpt.y;
+
+      var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));
+      var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));
+      radius = Math.sqrt(
+        Math.pow(x_radPt.x - x_radPt0.x, 2) +
+          Math.pow(x_radPt.y - x_radPt0.y, 2)
+      );
+    }
+    if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {
+      startAngle = 0;
+      endAngle = 2 * Math.PI;
+    }
+
+    this.path.push({
+      type: "arc",
+      x: x,
+      y: y,
+      radius: radius,
+      startAngle: startAngle,
+      endAngle: endAngle,
+      counterclockwise: counterclockwise
+    });
+    // this.ctx.lastPoint(new Point(pt.x,pt.y));
+  };
+
+  /**
+   * Creates an arc/curve between two tangents
+   *
+   * @name arcTo
+   * @function
+   * @param x1 {Number} The x-coordinate of the first tangent
+   * @param y1 {Number} The y-coordinate of the first tangent
+   * @param x2 {Number} The x-coordinate of the second tangent
+   * @param y2 {Number} The y-coordinate of the second tangent
+   * @param radius The radius of the arc
+   * @description The arcTo() method creates an arc/curve between two tangents on the canvas.
+   */
+  // eslint-disable-next-line no-unused-vars
+  Context2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {
+    throw new Error("arcTo not implemented.");
+  };
+
+  /**
+   * Creates a rectangle
+   *
+   * @name rect
+   * @function
+   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+   * @param w {Number} The width of the rectangle, in pixels
+   * @param h {Number} The height of the rectangle, in pixels
+   * @description The rect() method creates a rectangle.
+   */
+  Context2D.prototype.rect = function(x, y, w, h) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+      console.error("jsPDF.context2d.rect: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.rect");
+    }
+    this.moveTo(x, y);
+    this.lineTo(x + w, y);
+    this.lineTo(x + w, y + h);
+    this.lineTo(x, y + h);
+    this.lineTo(x, y);
+    this.lineTo(x + w, y);
+    this.lineTo(x, y);
+  };
+
+  /**
+   * Draws a "filled" rectangle
+   *
+   * @name fillRect
+   * @function
+   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+   * @param w {Number} The width of the rectangle, in pixels
+   * @param h {Number} The height of the rectangle, in pixels
+   * @description The fillRect() method draws a "filled" rectangle. The default color of the fill is black.
+   */
+  Context2D.prototype.fillRect = function(x, y, w, h) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+      console.error("jsPDF.context2d.fillRect: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.fillRect");
+    }
+    if (isFillTransparent.call(this)) {
+      return;
+    }
+    var tmp = {};
+    if (this.lineCap !== "butt") {
+      tmp.lineCap = this.lineCap;
+      this.lineCap = "butt";
+    }
+    if (this.lineJoin !== "miter") {
+      tmp.lineJoin = this.lineJoin;
+      this.lineJoin = "miter";
+    }
+
+    this.beginPath();
+    this.rect(x, y, w, h);
+    this.fill();
+
+    if (tmp.hasOwnProperty("lineCap")) {
+      this.lineCap = tmp.lineCap;
+    }
+    if (tmp.hasOwnProperty("lineJoin")) {
+      this.lineJoin = tmp.lineJoin;
+    }
+  };
+
+  /**
+   *     Draws a rectangle (no fill)
+   *
+   * @name strokeRect
+   * @function
+   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+   * @param w {Number} The width of the rectangle, in pixels
+   * @param h {Number} The height of the rectangle, in pixels
+   * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.
+   */
+  Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+      console.error("jsPDF.context2d.strokeRect: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");
+    }
+    if (isStrokeTransparent.call(this)) {
+      return;
+    }
+    this.beginPath();
+    this.rect(x, y, w, h);
+    this.stroke();
+  };
+
+  /**
+   * Clears the specified pixels within a given rectangle
+   *
+   * @name clearRect
+   * @function
+   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+   * @param w {Number} The width of the rectangle to clear, in pixels
+   * @param h {Number} The height of the rectangle to clear, in pixels
+   * @description We cannot clear PDF commands that were already written to PDF, so we use white instead. <br />
+   * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.
+   * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.
+   * This flag is stored in the save/restore context and is managed the same way as other drawing states.
+   *
+   */
+  Context2D.prototype.clearRect = function(x, y, w, h) {
+    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+      console.error("jsPDF.context2d.clearRect: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.clearRect");
+    }
+    if (this.ignoreClearRect) {
+      return;
+    }
+
+    this.fillStyle = "#ffffff";
+    this.fillRect(x, y, w, h);
+  };
+
+  /**
+   * Saves the state of the current context
+   *
+   * @name save
+   * @function
+   */
+  Context2D.prototype.save = function(doStackPush) {
+    doStackPush = typeof doStackPush === "boolean" ? doStackPush : true;
+    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;
+    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {
+      this.pdf.setPage(i + 1);
+      this.pdf.internal.out("q");
+    }
+    this.pdf.setPage(tmpPageNumber);
+
+    if (doStackPush) {
+      this.ctx.fontSize = this.pdf.internal.getFontSize();
+      var ctx = new ContextLayer(this.ctx);
+      this.ctxStack.push(this.ctx);
+      this.ctx = ctx;
+    }
+  };
+
+  /**
+   * Returns previously saved path state and attributes
+   *
+   * @name restore
+   * @function
+   */
+  Context2D.prototype.restore = function(doStackPop) {
+    doStackPop = typeof doStackPop === "boolean" ? doStackPop : true;
+    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;
+    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {
+      this.pdf.setPage(i + 1);
+      this.pdf.internal.out("Q");
+    }
+    this.pdf.setPage(tmpPageNumber);
+
+    if (doStackPop && this.ctxStack.length !== 0) {
+      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;
+    }
+  };
+
+  /**
+   * @name toDataURL
+   * @function
+   */
+  Context2D.prototype.toDataURL = function() {
+    throw new Error("toDataUrl not implemented.");
+  };
+
+  //helper functions
+
+  /**
+   * Get the decimal values of r, g, b and a
+   *
+   * @name getRGBA
+   * @function
+   * @private
+   * @ignore
+   */
+  var getRGBA = function(style) {
+    var rxRgb = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/;
+    var rxRgba = /rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/;
+    var rxTransparent = /transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/;
+
+    var r, g, b, a;
+
+    if (style.isCanvasGradient === true) {
+      style = style.getColor();
+    }
+
+    if (!style) {
+      return { r: 0, g: 0, b: 0, a: 0, style: style };
+    }
+
+    if (rxTransparent.test(style)) {
+      r = 0;
+      g = 0;
+      b = 0;
+      a = 0;
+    } else {
+      var matches = rxRgb.exec(style);
+      if (matches !== null) {
+        r = parseInt(matches[1]);
+        g = parseInt(matches[2]);
+        b = parseInt(matches[3]);
+        a = 1;
+      } else {
+        matches = rxRgba.exec(style);
+        if (matches !== null) {
+          r = parseInt(matches[1]);
+          g = parseInt(matches[2]);
+          b = parseInt(matches[3]);
+          a = parseFloat(matches[4]);
+        } else {
+          a = 1;
+
+          if (typeof style === "string" && style.charAt(0) !== "#") {
+            var rgbColor = new RGBColor(style);
+            if (rgbColor.ok) {
+              style = rgbColor.toHex();
+            } else {
+              style = "#000000";
+            }
+          }
+
+          if (style.length === 4) {
+            r = style.substring(1, 2);
+            r += r;
+            g = style.substring(2, 3);
+            g += g;
+            b = style.substring(3, 4);
+            b += b;
+          } else {
+            r = style.substring(1, 3);
+            g = style.substring(3, 5);
+            b = style.substring(5, 7);
+          }
+          r = parseInt(r, 16);
+          g = parseInt(g, 16);
+          b = parseInt(b, 16);
+        }
+      }
+    }
+    return { r: r, g: g, b: b, a: a, style: style };
+  };
+
+  /**
+   * @name isFillTransparent
+   * @function
+   * @private
+   * @ignore
+   * @returns {Boolean}
+   */
+  var isFillTransparent = function() {
+    return this.ctx.isFillTransparent || this.globalAlpha == 0;
+  };
+
+  /**
+   * @name isStrokeTransparent
+   * @function
+   * @private
+   * @ignore
+   * @returns {Boolean}
+   */
+  var isStrokeTransparent = function() {
+    return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);
+  };
+
+  /**
+   * Draws "filled" text on the canvas
+   *
+   * @name fillText
+   * @function
+   * @param text {String} Specifies the text that will be written on the canvas
+   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)
+   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
+   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
+   * @description The fillText() method draws filled text on the canvas. The default color of the text is black.
+   */
+  Context2D.prototype.fillText = function(text, x, y, maxWidth) {
+    if (isNaN(x) || isNaN(y) || typeof text !== "string") {
+      console.error("jsPDF.context2d.fillText: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.fillText");
+    }
+    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;
+    if (isFillTransparent.call(this)) {
+      return;
+    }
+
+    var degs = rad2deg(this.ctx.transform.rotation);
+
+    // We only use X axis as scale hint
+    var scale = this.ctx.transform.scaleX;
+
+    putText.call(this, {
+      text: text,
+      x: x,
+      y: y,
+      scale: scale,
+      angle: degs,
+      align: this.textAlign,
+      maxWidth: maxWidth
+    });
+  };
+
+  /**
+   * Draws text on the canvas (no fill)
+   *
+   * @name strokeText
+   * @function
+   * @param text {String} Specifies the text that will be written on the canvas
+   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)
+   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
+   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
+   * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.
+   */
+  Context2D.prototype.strokeText = function(text, x, y, maxWidth) {
+    if (isNaN(x) || isNaN(y) || typeof text !== "string") {
+      console.error("jsPDF.context2d.strokeText: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.strokeText");
+    }
+    if (isStrokeTransparent.call(this)) {
+      return;
+    }
+
+    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;
+
+    var degs = rad2deg(this.ctx.transform.rotation);
+    var scale = this.ctx.transform.scaleX;
+
+    putText.call(this, {
+      text: text,
+      x: x,
+      y: y,
+      scale: scale,
+      renderingMode: "stroke",
+      angle: degs,
+      align: this.textAlign,
+      maxWidth: maxWidth
+    });
+  };
+
+  /**
+   * Returns an object that contains the width of the specified text
+   *
+   * @name measureText
+   * @function
+   * @param text {String} The text to be measured
+   * @description The measureText() method returns an object that contains the width of the specified text, in pixels.
+   * @returns {Number}
+   */
+  Context2D.prototype.measureText = function(text) {
+    if (typeof text !== "string") {
+      console.error(
+        "jsPDF.context2d.measureText: Invalid arguments",
+        arguments
+      );
+      throw new Error(
+        "Invalid arguments passed to jsPDF.context2d.measureText"
+      );
+    }
+    var pdf = this.pdf;
+    var k = this.pdf.internal.scaleFactor;
+
+    var fontSize = pdf.internal.getFontSize();
+    var txtWidth =
+      (pdf.getStringUnitWidth(text) * fontSize) / pdf.internal.scaleFactor;
+    txtWidth *= Math.round(((k * 96) / 72) * 10000) / 10000;
+
+    var TextMetrics = function(options) {
+      options = options || {};
+      var _width = options.width || 0;
+      Object.defineProperty(this, "width", {
+        get: function() {
+          return _width;
+        }
+      });
+      return this;
+    };
+    return new TextMetrics({ width: txtWidth });
+  };
+
+  //Transformations
+
+  /**
+   * Scales the current drawing bigger or smaller
+   *
+   * @name scale
+   * @function
+   * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)
+   * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)
+   * @description The scale() method scales the current drawing, bigger or smaller.
+   */
+  Context2D.prototype.scale = function(scalewidth, scaleheight) {
+    if (isNaN(scalewidth) || isNaN(scaleheight)) {
+      console.error("jsPDF.context2d.scale: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.scale");
+    }
+    var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);
+    this.ctx.transform = this.ctx.transform.multiply(matrix);
+  };
+
+  /**
+   * Rotates the current drawing
+   *
+   * @name rotate
+   * @function
+   * @param angle {Number} The rotation angle, in radians.
+   * @description To calculate from degrees to radians: degrees*Math.PI/180. <br />
+   * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180
+   */
+  Context2D.prototype.rotate = function(angle) {
+    if (isNaN(angle)) {
+      console.error("jsPDF.context2d.rotate: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.rotate");
+    }
+    var matrix = new Matrix(
+      Math.cos(angle),
+      Math.sin(angle),
+      -Math.sin(angle),
+      Math.cos(angle),
+      0.0,
+      0.0
+    );
+    this.ctx.transform = this.ctx.transform.multiply(matrix);
+  };
+
+  /**
+   * Remaps the (0,0) position on the canvas
+   *
+   * @name translate
+   * @function
+   * @param x {Number} The value to add to horizontal (x) coordinates
+   * @param y {Number} The value to add to vertical (y) coordinates
+   * @description The translate() method remaps the (0,0) position on the canvas.
+   */
+  Context2D.prototype.translate = function(x, y) {
+    if (isNaN(x) || isNaN(y)) {
+      console.error("jsPDF.context2d.translate: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.translate");
+    }
+    var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);
+    this.ctx.transform = this.ctx.transform.multiply(matrix);
+  };
+
+  /**
+   * Replaces the current transformation matrix for the drawing
+   *
+   * @name transform
+   * @function
+   * @param a {Number} Horizontal scaling
+   * @param b {Number} Horizontal skewing
+   * @param c {Number} Vertical skewing
+   * @param d {Number} Vertical scaling
+   * @param e {Number} Horizontal moving
+   * @param f {Number} Vertical moving
+   * @description Each object on the canvas has a current transformation matrix.<br /><br />The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:<br /><br /><br /><br />a    c    e<br /><br />b    d    f<br /><br />0    0    1<br /><br />In other words, the transform() method lets you scale, rotate, move, and skew the current context.
+   */
+  Context2D.prototype.transform = function(a, b, c, d, e, f) {
+    if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {
+      console.error("jsPDF.context2d.transform: Invalid arguments", arguments);
+      throw new Error("Invalid arguments passed to jsPDF.context2d.transform");
+    }
+    var matrix = new Matrix(a, b, c, d, e, f);
+    this.ctx.transform = this.ctx.transform.multiply(matrix);
+  };
+
+  /**
+   * Resets the current transform to the identity matrix. Then runs transform()
+   *
+   * @name setTransform
+   * @function
+   * @param a {Number} Horizontal scaling
+   * @param b {Number} Horizontal skewing
+   * @param c {Number} Vertical skewing
+   * @param d {Number} Vertical scaling
+   * @param e {Number} Horizontal moving
+   * @param f {Number} Vertical moving
+   * @description Each object on the canvas has a current transformation matrix. <br /><br />The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.<br /><br />In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.
+   */
+  Context2D.prototype.setTransform = function(a, b, c, d, e, f) {
+    a = isNaN(a) ? 1 : a;
+    b = isNaN(b) ? 0 : b;
+    c = isNaN(c) ? 0 : c;
+    d = isNaN(d) ? 1 : d;
+    e = isNaN(e) ? 0 : e;
+    f = isNaN(f) ? 0 : f;
+    this.ctx.transform = new Matrix(a, b, c, d, e, f);
+  };
+
+  var hasMargins = function() {
+    return (
+      this.margin[0] > 0 ||
+      this.margin[1] > 0 ||
+      this.margin[2] > 0 ||
+      this.margin[3] > 0
+    );
+  };
+
+  /**
+   * Draws an image, canvas, or video onto the canvas
+   *
+   * @function
+   * @param img {} Specifies the image, canvas, or video element to use
+   * @param sx {Number} Optional. The x coordinate where to start clipping
+   * @param sy {Number} Optional. The y coordinate where to start clipping
+   * @param swidth {Number} Optional. The width of the clipped image
+   * @param sheight {Number} Optional. The height of the clipped image
+   * @param x {Number} The x coordinate where to place the image on the canvas
+   * @param y {Number} The y coordinate where to place the image on the canvas
+   * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)
+   * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
+   */
+  Context2D.prototype.drawImage = function(
+    img,
+    sx,
+    sy,
+    swidth,
+    sheight,
+    x,
+    y,
+    width,
+    height
+  ) {
+    var imageProperties = this.pdf.getImageProperties(img);
+    var factorX = 1;
+    var factorY = 1;
+
+    var clipFactorX = 1;
+    var clipFactorY = 1;
+
+    if (typeof swidth !== "undefined" && typeof width !== "undefined") {
+      clipFactorX = width / swidth;
+      clipFactorY = height / sheight;
+      factorX = ((imageProperties.width / swidth) * width) / swidth;
+      factorY = ((imageProperties.height / sheight) * height) / sheight;
+    }
+
+    //is sx and sy are set and x and y not, set x and y with values of sx and sy
+    if (typeof x === "undefined") {
+      x = sx;
+      y = sy;
+      sx = 0;
+      sy = 0;
+    }
+
+    if (typeof swidth !== "undefined" && typeof width === "undefined") {
+      width = swidth;
+      height = sheight;
+    }
+    if (typeof swidth === "undefined" && typeof width === "undefined") {
+      width = imageProperties.width;
+      height = imageProperties.height;
+    }
+
+    var decomposedTransformationMatrix = this.ctx.transform.decompose();
+    var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);
+    var matrix = new Matrix();
+    matrix = matrix.multiply(decomposedTransformationMatrix.translate);
+    matrix = matrix.multiply(decomposedTransformationMatrix.skew);
+    matrix = matrix.multiply(decomposedTransformationMatrix.scale);
+    var xRect = matrix.applyToRectangle(
+      new Rectangle(
+        x - sx * clipFactorX,
+        y - sy * clipFactorY,
+        swidth * factorX,
+        sheight * factorY
+      )
+    );
+    var pageArray = getPagesByPath.call(this, xRect);
+    var pages = [];
+    for (var ii = 0; ii < pageArray.length; ii += 1) {
+      if (pages.indexOf(pageArray[ii]) === -1) {
+        pages.push(pageArray[ii]);
+      }
+    }
+
+    sortPages(pages);
+
+    var clipPath;
+    if (this.autoPaging) {
+      var min = pages[0];
+      var max = pages[pages.length - 1];
+      for (var i = min; i < max + 1; i++) {
+        this.pdf.setPage(i);
+
+        var pageWidthMinusMargins =
+          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];
+        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];
+        var firstPageHeight =
+          this.pdf.internal.pageSize.height -
+          this.posY -
+          this.margin[0] -
+          this.margin[2];
+        var pageHeightMinusMargins =
+          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
+        var previousPageHeightSum =
+          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;
+
+        if (this.ctx.clip_path.length !== 0) {
+          var tmpPaths = this.path;
+          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));
+          this.path = pathPositionRedo(
+            clipPath,
+            this.posX + this.margin[3],
+            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset
+          );
+          drawPaths.call(this, "fill", true);
+          this.path = tmpPaths;
+        }
+        var tmpRect = JSON.parse(JSON.stringify(xRect));
+        tmpRect = pathPositionRedo(
+          [tmpRect],
+          this.posX + this.margin[3],
+          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset
+        )[0];
+
+        const needsClipping = (i > min || i < max) && hasMargins.call(this);
+
+        if (needsClipping) {
+          this.pdf.saveGraphicsState();
+          this.pdf
+            .rect(
+              this.margin[3],
+              this.margin[0],
+              pageWidthMinusMargins,
+              pageHeightMinusMargins,
+              null
+            )
+            .clip()
+            .discardPath();
+        }
+        this.pdf.addImage(
+          img,
+          "JPEG",
+          tmpRect.x,
+          tmpRect.y,
+          tmpRect.w,
+          tmpRect.h,
+          null,
+          null,
+          angle
+        );
+        if (needsClipping) {
+          this.pdf.restoreGraphicsState();
+        }
+      }
+    } else {
+      this.pdf.addImage(
+        img,
+        "JPEG",
+        xRect.x,
+        xRect.y,
+        xRect.w,
+        xRect.h,
+        null,
+        null,
+        angle
+      );
+    }
+  };
+
+  var getPagesByPath = function(path, pageWrapX, pageWrapY) {
+    var result = [];
+    pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;
+    pageWrapY =
+      pageWrapY ||
+      this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
+    var yOffset = this.posY + this.ctx.prevPageLastElemOffset;
+
+    switch (path.type) {
+      default:
+      case "mt":
+      case "lt":
+        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);
+        break;
+      case "arc":
+        result.push(
+          Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1
+        );
+        result.push(
+          Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1
+        );
+        break;
+      case "qct":
+        var rectOfQuadraticCurve = getQuadraticCurveBoundary(
+          this.ctx.lastPoint.x,
+          this.ctx.lastPoint.y,
+          path.x1,
+          path.y1,
+          path.x,
+          path.y
+        );
+        result.push(
+          Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1
+        );
+        result.push(
+          Math.floor(
+            (rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) /
+              pageWrapY
+          ) + 1
+        );
+        break;
+      case "bct":
+        var rectOfBezierCurve = getBezierCurveBoundary(
+          this.ctx.lastPoint.x,
+          this.ctx.lastPoint.y,
+          path.x1,
+          path.y1,
+          path.x2,
+          path.y2,
+          path.x,
+          path.y
+        );
+        result.push(
+          Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1
+        );
+        result.push(
+          Math.floor(
+            (rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY
+          ) + 1
+        );
+        break;
+      case "rect":
+        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);
+        result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);
+    }
+
+    for (var i = 0; i < result.length; i += 1) {
+      while (this.pdf.internal.getNumberOfPages() < result[i]) {
+        addPage.call(this);
+      }
+    }
+    return result;
+  };
+
+  var addPage = function() {
+    var fillStyle = this.fillStyle;
+    var strokeStyle = this.strokeStyle;
+    var font = this.font;
+    var lineCap = this.lineCap;
+    var lineWidth = this.lineWidth;
+    var lineJoin = this.lineJoin;
+    this.pdf.addPage();
+    this.fillStyle = fillStyle;
+    this.strokeStyle = strokeStyle;
+    this.font = font;
+    this.lineCap = lineCap;
+    this.lineWidth = lineWidth;
+    this.lineJoin = lineJoin;
+  };
+
+  var pathPositionRedo = function(paths, x, y) {
+    for (var i = 0; i < paths.length; i++) {
+      switch (paths[i].type) {
+        case "bct":
+          paths[i].x2 += x;
+          paths[i].y2 += y;
+        case "qct":
+          paths[i].x1 += x;
+          paths[i].y1 += y;
+        case "mt":
+        case "lt":
+        case "arc":
+        default:
+          paths[i].x += x;
+          paths[i].y += y;
+      }
+    }
+    return paths;
+  };
+
+  var sortPages = function(pages) {
+    return pages.sort(function(a, b) {
+      return a - b;
+    });
+  };
+
+  var pathPreProcess = function(rule, isClip) {
+    var fillStyle = this.fillStyle;
+    var strokeStyle = this.strokeStyle;
+    var lineCap = this.lineCap;
+    var oldLineWidth = this.lineWidth;
+    var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);
+    var lineJoin = this.lineJoin;
+
+    var origPath = JSON.parse(JSON.stringify(this.path));
+    var xPath = JSON.parse(JSON.stringify(this.path));
+    var clipPath;
+    var tmpPath;
+    var pages = [];
+
+    for (var i = 0; i < xPath.length; i++) {
+      if (typeof xPath[i].x !== "undefined") {
+        var page = getPagesByPath.call(this, xPath[i]);
+
+        for (var ii = 0; ii < page.length; ii += 1) {
+          if (pages.indexOf(page[ii]) === -1) {
+            pages.push(page[ii]);
+          }
+        }
+      }
+    }
+
+    for (var j = 0; j < pages.length; j++) {
+      while (this.pdf.internal.getNumberOfPages() < pages[j]) {
+        addPage.call(this);
+      }
+    }
+    sortPages(pages);
+
+    if (this.autoPaging) {
+      var min = pages[0];
+      var max = pages[pages.length - 1];
+      for (var k = min; k < max + 1; k++) {
+        this.pdf.setPage(k);
+
+        this.fillStyle = fillStyle;
+        this.strokeStyle = strokeStyle;
+        this.lineCap = lineCap;
+        this.lineWidth = lineWidth;
+        this.lineJoin = lineJoin;
+
+        var pageWidthMinusMargins =
+          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];
+        var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];
+        var firstPageHeight =
+          this.pdf.internal.pageSize.height -
+          this.posY -
+          this.margin[0] -
+          this.margin[2];
+        var pageHeightMinusMargins =
+          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
+        var previousPageHeightSum =
+          k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;
+
+        if (this.ctx.clip_path.length !== 0) {
+          var tmpPaths = this.path;
+          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));
+          this.path = pathPositionRedo(
+            clipPath,
+            this.posX + this.margin[3],
+            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset
+          );
+          drawPaths.call(this, rule, true);
+          this.path = tmpPaths;
+        }
+        tmpPath = JSON.parse(JSON.stringify(origPath));
+        this.path = pathPositionRedo(
+          tmpPath,
+          this.posX + this.margin[3],
+          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset
+        );
+        if (isClip === false || k === 0) {
+          const needsClipping = (k > min || k < max) && hasMargins.call(this);
+          if (needsClipping) {
+            this.pdf.saveGraphicsState();
+            this.pdf
+              .rect(
+                this.margin[3],
+                this.margin[0],
+                pageWidthMinusMargins,
+                pageHeightMinusMargins,
+                null
+              )
+              .clip()
+              .discardPath();
+          }
+          drawPaths.call(this, rule, isClip);
+          if (needsClipping) {
+            this.pdf.restoreGraphicsState();
+          }
+        }
+        this.lineWidth = oldLineWidth;
+      }
+    } else {
+      this.lineWidth = lineWidth;
+      drawPaths.call(this, rule, isClip);
+      this.lineWidth = oldLineWidth;
+    }
+    this.path = origPath;
+  };
+
+  /**
+   * Processes the paths
+   *
+   * @function
+   * @param rule {String}
+   * @param isClip {Boolean}
+   * @private
+   * @ignore
+   */
+  var drawPaths = function(rule, isClip) {
+    if (rule === "stroke" && !isClip && isStrokeTransparent.call(this)) {
+      return;
+    }
+
+    if (rule !== "stroke" && !isClip && isFillTransparent.call(this)) {
+      return;
+    }
+
+    var moves = [];
+
+    //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;
+    var delta;
+    var xPath = this.path;
+    for (var i = 0; i < xPath.length; i++) {
+      var pt = xPath[i];
+
+      switch (pt.type) {
+        case "begin":
+          moves.push({
+            begin: true
+          });
+          break;
+
+        case "close":
+          moves.push({
+            close: true
+          });
+          break;
+
+        case "mt":
+          moves.push({
+            start: pt,
+            deltas: [],
+            abs: []
+          });
+          break;
+
+        case "lt":
+          var iii = moves.length;
+          if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {
+            delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];
+            if (iii > 0) {
+              for (iii; iii >= 0; iii--) {
+                if (
+                  moves[iii - 1].close !== true &&
+                  moves[iii - 1].begin !== true
+                ) {
+                  moves[iii - 1].deltas.push(delta);
+                  moves[iii - 1].abs.push(pt);
+                  break;
+                }
+              }
+            }
+          }
+          break;
+
+        case "bct":
+          delta = [
+            pt.x1 - xPath[i - 1].x,
+            pt.y1 - xPath[i - 1].y,
+            pt.x2 - xPath[i - 1].x,
+            pt.y2 - xPath[i - 1].y,
+            pt.x - xPath[i - 1].x,
+            pt.y - xPath[i - 1].y
+          ];
+          moves[moves.length - 1].deltas.push(delta);
+          break;
+
+        case "qct":
+          var x1 = xPath[i - 1].x + (2.0 / 3.0) * (pt.x1 - xPath[i - 1].x);
+          var y1 = xPath[i - 1].y + (2.0 / 3.0) * (pt.y1 - xPath[i - 1].y);
+          var x2 = pt.x + (2.0 / 3.0) * (pt.x1 - pt.x);
+          var y2 = pt.y + (2.0 / 3.0) * (pt.y1 - pt.y);
+          var x3 = pt.x;
+          var y3 = pt.y;
+          delta = [
+            x1 - xPath[i - 1].x,
+            y1 - xPath[i - 1].y,
+            x2 - xPath[i - 1].x,
+            y2 - xPath[i - 1].y,
+            x3 - xPath[i - 1].x,
+            y3 - xPath[i - 1].y
+          ];
+          moves[moves.length - 1].deltas.push(delta);
+          break;
+
+        case "arc":
+          moves.push({
+            deltas: [],
+            abs: [],
+            arc: true
+          });
+
+          if (Array.isArray(moves[moves.length - 1].abs)) {
+            moves[moves.length - 1].abs.push(pt);
+          }
+          break;
+      }
+    }
+    var style;
+    if (!isClip) {
+      if (rule === "stroke") {
+        style = "stroke";
+      } else {
+        style = "fill";
+      }
+    } else {
+      style = null;
+    }
+
+    var began = false;
+    for (var k = 0; k < moves.length; k++) {
+      if (moves[k].arc) {
+        var arcs = moves[k].abs;
+
+        for (var ii = 0; ii < arcs.length; ii++) {
+          var arc = arcs[ii];
+
+          if (arc.type === "arc") {
+            drawArc.call(
+              this,
+              arc.x,
+              arc.y,
+              arc.radius,
+              arc.startAngle,
+              arc.endAngle,
+              arc.counterclockwise,
+              undefined,
+              isClip,
+              !began
+            );
+          } else {
+            drawLine.call(this, arc.x, arc.y);
+          }
+          began = true;
+        }
+      } else if (moves[k].close === true) {
+        this.pdf.internal.out("h");
+        began = false;
+      } else if (moves[k].begin !== true) {
+        var x = moves[k].start.x;
+        var y = moves[k].start.y;
+        drawLines.call(this, moves[k].deltas, x, y);
+        began = true;
+      }
+    }
+
+    if (style) {
+      putStyle.call(this, style);
+    }
+    if (isClip) {
+      doClip.call(this);
+    }
+  };
+
+  var getBaseline = function(y) {
+    var height =
+      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;
+    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);
+    switch (this.ctx.textBaseline) {
+      case "bottom":
+        return y - descent;
+      case "top":
+        return y + height - descent;
+      case "hanging":
+        return y + height - 2 * descent;
+      case "middle":
+        return y + height / 2 - descent;
+      case "ideographic":
+        // TODO not implemented
+        return y;
+      case "alphabetic":
+      default:
+        return y;
+    }
+  };
+
+  var getTextBottom = function(yBaseLine) {
+    var height =
+      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;
+    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);
+    return yBaseLine + descent;
+  };
+
+  Context2D.prototype.createLinearGradient = function createLinearGradient() {
+    var canvasGradient = function canvasGradient() {};
+
+    canvasGradient.colorStops = [];
+    canvasGradient.addColorStop = function(offset, color) {
+      this.colorStops.push([offset, color]);
+    };
+
+    canvasGradient.getColor = function() {
+      if (this.colorStops.length === 0) {
+        return "#000000";
+      }
+
+      return this.colorStops[0][1];
+    };
+
+    canvasGradient.isCanvasGradient = true;
+    return canvasGradient;
+  };
+  Context2D.prototype.createPattern = function createPattern() {
+    return this.createLinearGradient();
+  };
+  Context2D.prototype.createRadialGradient = function createRadialGradient() {
+    return this.createLinearGradient();
+  };
+
+  /**
+   *
+   * @param x Edge point X
+   * @param y Edge point Y
+   * @param r Radius
+   * @param a1 start angle
+   * @param a2 end angle
+   * @param counterclockwise
+   * @param style
+   * @param isClip
+   */
+  var drawArc = function(
+    x,
+    y,
+    r,
+    a1,
+    a2,
+    counterclockwise,
+    style,
+    isClip,
+    includeMove
+  ) {
+    // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html
+    var curves = createArc.call(this, r, a1, a2, counterclockwise);
+
+    for (var i = 0; i < curves.length; i++) {
+      var curve = curves[i];
+      if (i === 0) {
+        if (includeMove) {
+          doMove.call(this, curve.x1 + x, curve.y1 + y);
+        } else {
+          drawLine.call(this, curve.x1 + x, curve.y1 + y);
+        }
+      }
+      drawCurve.call(
+        this,
+        x,
+        y,
+        curve.x2,
+        curve.y2,
+        curve.x3,
+        curve.y3,
+        curve.x4,
+        curve.y4
+      );
+    }
+
+    if (!isClip) {
+      putStyle.call(this, style);
+    } else {
+      doClip.call(this);
+    }
+  };
+
+  var putStyle = function(style) {
+    switch (style) {
+      case "stroke":
+        this.pdf.internal.out("S");
+        break;
+      case "fill":
+        this.pdf.internal.out("f");
+        break;
+    }
+  };
+
+  var doClip = function() {
+    this.pdf.clip();
+    this.pdf.discardPath();
+  };
+
+  var doMove = function(x, y) {
+    this.pdf.internal.out(
+      getHorizontalCoordinateString(x) +
+        " " +
+        getVerticalCoordinateString(y) +
+        " m"
+    );
+  };
+
+  var putText = function(options) {
+    var textAlign;
+    switch (options.align) {
+      case "right":
+      case "end":
+        textAlign = "right";
+        break;
+      case "center":
+        textAlign = "center";
+        break;
+      case "left":
+      case "start":
+      default:
+        textAlign = "left";
+        break;
+    }
+
+    var textDimensions = this.pdf.getTextDimensions(options.text);
+    var yBaseLine = getBaseline.call(this, options.y);
+    var yBottom = getTextBottom.call(this, yBaseLine);
+    var yTop = yBottom - textDimensions.h;
+
+    var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));
+    var decomposedTransformationMatrix = this.ctx.transform.decompose();
+    var matrix = new Matrix();
+    matrix = matrix.multiply(decomposedTransformationMatrix.translate);
+    matrix = matrix.multiply(decomposedTransformationMatrix.skew);
+    matrix = matrix.multiply(decomposedTransformationMatrix.scale);
+
+    var baselineRect = this.ctx.transform.applyToRectangle(
+      new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h)
+    );
+    var textBounds = matrix.applyToRectangle(
+      new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h)
+    );
+    var pageArray = getPagesByPath.call(this, textBounds);
+    var pages = [];
+    for (var ii = 0; ii < pageArray.length; ii += 1) {
+      if (pages.indexOf(pageArray[ii]) === -1) {
+        pages.push(pageArray[ii]);
+      }
+    }
+
+    sortPages(pages);
+
+    var clipPath, oldSize, oldLineWidth;
+    if (this.autoPaging) {
+      var min = pages[0];
+      var max = pages[pages.length - 1];
+      for (var i = min; i < max + 1; i++) {
+        this.pdf.setPage(i);
+
+        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];
+        var firstPageHeight =
+          this.pdf.internal.pageSize.height -
+          this.posY -
+          this.margin[0] -
+          this.margin[2];
+        var pageHeightMinusBottomMargin =
+          this.pdf.internal.pageSize.height - this.margin[2];
+        var pageHeightMinusMargins =
+          pageHeightMinusBottomMargin - this.margin[0];
+        var pageWidthMinusRightMargin =
+          this.pdf.internal.pageSize.width - this.margin[1];
+        var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];
+        var previousPageHeightSum =
+          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;
+
+        if (this.ctx.clip_path.length !== 0) {
+          var tmpPaths = this.path;
+          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));
+          this.path = pathPositionRedo(
+            clipPath,
+            this.posX + this.margin[3],
+            -1 * previousPageHeightSum + topMargin
+          );
+          drawPaths.call(this, "fill", true);
+          this.path = tmpPaths;
+        }
+        var textBoundsOnPage = pathPositionRedo(
+          [JSON.parse(JSON.stringify(textBounds))],
+          this.posX + this.margin[3],
+          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset
+        )[0];
+
+        if (options.scale >= 0.01) {
+          oldSize = this.pdf.internal.getFontSize();
+          this.pdf.setFontSize(oldSize * options.scale);
+          oldLineWidth = this.lineWidth;
+          this.lineWidth = oldLineWidth * options.scale;
+        }
+
+        var doSlice = this.autoPaging !== "text";
+
+        if (
+          doSlice ||
+          textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin
+        ) {
+          if (
+            doSlice ||
+            (textBoundsOnPage.y >= topMargin &&
+              textBoundsOnPage.x <= pageWidthMinusRightMargin)
+          ) {
+            var croppedText = doSlice
+              ? options.text
+              : this.pdf.splitTextToSize(
+                  options.text,
+                  options.maxWidth ||
+                    pageWidthMinusRightMargin - textBoundsOnPage.x
+                )[0];
+            var baseLineRectOnPage = pathPositionRedo(
+              [JSON.parse(JSON.stringify(baselineRect))],
+              this.posX + this.margin[3],
+              -previousPageHeightSum +
+                topMargin +
+                this.ctx.prevPageLastElemOffset
+            )[0];
+
+            const needsClipping =
+              doSlice && (i > min || i < max) && hasMargins.call(this);
+
+            if (needsClipping) {
+              this.pdf.saveGraphicsState();
+              this.pdf
+                .rect(
+                  this.margin[3],
+                  this.margin[0],
+                  pageWidthMinusMargins,
+                  pageHeightMinusMargins,
+                  null
+                )
+                .clip()
+                .discardPath();
+            }
+
+            this.pdf.text(
+              croppedText,
+              baseLineRectOnPage.x,
+              baseLineRectOnPage.y,
+              {
+                angle: options.angle,
+                align: textAlign,
+                renderingMode: options.renderingMode
+              }
+            );
+
+            if (needsClipping) {
+              this.pdf.restoreGraphicsState();
+            }
+          }
+        } else {
+          // This text is the last element of the page, but it got cut off due to the margin
+          // so we render it in the next page
+
+          if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {
+            // As a result, all other elements have their y offset increased
+            this.ctx.prevPageLastElemOffset +=
+              pageHeightMinusBottomMargin - textBoundsOnPage.y;
+          }
+        }
+
+        if (options.scale >= 0.01) {
+          this.pdf.setFontSize(oldSize);
+          this.lineWidth = oldLineWidth;
+        }
+      }
+    } else {
+      if (options.scale >= 0.01) {
+        oldSize = this.pdf.internal.getFontSize();
+        this.pdf.setFontSize(oldSize * options.scale);
+        oldLineWidth = this.lineWidth;
+        this.lineWidth = oldLineWidth * options.scale;
+      }
+      this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {
+        angle: options.angle,
+        align: textAlign,
+        renderingMode: options.renderingMode,
+        maxWidth: options.maxWidth
+      });
+
+      if (options.scale >= 0.01) {
+        this.pdf.setFontSize(oldSize);
+        this.lineWidth = oldLineWidth;
+      }
+    }
+  };
+
+  var drawLine = function(x, y, prevX, prevY) {
+    prevX = prevX || 0;
+    prevY = prevY || 0;
+
+    this.pdf.internal.out(
+      getHorizontalCoordinateString(x + prevX) +
+        " " +
+        getVerticalCoordinateString(y + prevY) +
+        " l"
+    );
+  };
+
+  var drawLines = function(lines, x, y) {
+    return this.pdf.lines(lines, x, y, null, null);
+  };
+
+  var drawCurve = function(x, y, x1, y1, x2, y2, x3, y3) {
+    this.pdf.internal.out(
+      [
+        f2(getHorizontalCoordinate(x1 + x)),
+        f2(getVerticalCoordinate(y1 + y)),
+        f2(getHorizontalCoordinate(x2 + x)),
+        f2(getVerticalCoordinate(y2 + y)),
+        f2(getHorizontalCoordinate(x3 + x)),
+        f2(getVerticalCoordinate(y3 + y)),
+        "c"
+      ].join(" ")
+    );
+  };
+
+  /**
+   * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.
+   *
+   * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.
+   * @function createArc
+   */
+  var createArc = function(radius, startAngle, endAngle, anticlockwise) {
+    var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below
+    var twoPi = Math.PI * 2;
+    var halfPi = Math.PI / 2.0;
+
+    while (startAngle > endAngle) {
+      startAngle = startAngle - twoPi;
+    }
+    var totalAngle = Math.abs(endAngle - startAngle);
+    if (totalAngle < twoPi) {
+      if (anticlockwise) {
+        totalAngle = twoPi - totalAngle;
+      }
+    }
+
+    // Compute the sequence of arc curves, up to PI/2 at a time.
+    var curves = [];
+
+    // clockwise or counterclockwise
+    var sgn = anticlockwise ? -1 : +1;
+
+    var a1 = startAngle;
+    for (; totalAngle > EPSILON; ) {
+      var remain = sgn * Math.min(totalAngle, halfPi);
+      var a2 = a1 + remain;
+      curves.push(createSmallArc.call(this, radius, a1, a2));
+      totalAngle -= Math.abs(a2 - a1);
+      a1 = a2;
+    }
+
+    return curves;
+  };
+
+  /**
+   * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.
+   *
+   * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.
+   *
+   * This algorithm is based on the approach described in: A. Riškus, "Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa," Information Technology and Control, 35(4), 2006 pp. 371-378.
+   */
+  var createSmallArc = function(r, a1, a2) {
+    var a = (a2 - a1) / 2.0;
+
+    var x4 = r * Math.cos(a);
+    var y4 = r * Math.sin(a);
+    var x1 = x4;
+    var y1 = -y4;
+
+    var q1 = x1 * x1 + y1 * y1;
+    var q2 = q1 + x1 * x4 + y1 * y4;
+    var k2 = ((4 / 3) * (Math.sqrt(2 * q1 * q2) - q2)) / (x1 * y4 - y1 * x4);
+
+    var x2 = x1 - k2 * y1;
+    var y2 = y1 + k2 * x1;
+    var x3 = x2;
+    var y3 = -y2;
+
+    var ar = a + a1;
+    var cos_ar = Math.cos(ar);
+    var sin_ar = Math.sin(ar);
+
+    return {
+      x1: r * Math.cos(a1),
+      y1: r * Math.sin(a1),
+      x2: x2 * cos_ar - y2 * sin_ar,
+      y2: x2 * sin_ar + y2 * cos_ar,
+      x3: x3 * cos_ar - y3 * sin_ar,
+      y3: x3 * sin_ar + y3 * cos_ar,
+      x4: r * Math.cos(a2),
+      y4: r * Math.sin(a2)
+    };
+  };
+
+  var rad2deg = function(value) {
+    return (value * 180) / Math.PI;
+  };
+
+  var getQuadraticCurveBoundary = function(sx, sy, cpx, cpy, ex, ey) {
+    var midX1 = sx + (cpx - sx) * 0.5;
+    var midY1 = sy + (cpy - sy) * 0.5;
+    var midX2 = ex + (cpx - ex) * 0.5;
+    var midY2 = ey + (cpy - ey) * 0.5;
+    var resultX1 = Math.min(sx, ex, midX1, midX2);
+    var resultX2 = Math.max(sx, ex, midX1, midX2);
+    var resultY1 = Math.min(sy, ey, midY1, midY2);
+    var resultY2 = Math.max(sy, ey, midY1, midY2);
+    return new Rectangle(
+      resultX1,
+      resultY1,
+      resultX2 - resultX1,
+      resultY2 - resultY1
+    );
+  };
+
+  //De Casteljau algorithm
+  var getBezierCurveBoundary = function(ax, ay, bx, by, cx, cy, dx, dy) {
+    var tobx = bx - ax;
+    var toby = by - ay;
+    var tocx = cx - bx;
+    var tocy = cy - by;
+    var todx = dx - cx;
+    var tody = dy - cy;
+    var precision = 40;
+    var d,
+      i,
+      px,
+      py,
+      qx,
+      qy,
+      rx,
+      ry,
+      tx,
+      ty,
+      sx,
+      sy,
+      x,
+      y,
+      minx,
+      miny,
+      maxx,
+      maxy,
+      toqx,
+      toqy,
+      torx,
+      tory,
+      totx,
+      toty;
+    for (i = 0; i < precision + 1; i++) {
+      d = i / precision;
+      px = ax + d * tobx;
+      py = ay + d * toby;
+      qx = bx + d * tocx;
+      qy = by + d * tocy;
+      rx = cx + d * todx;
+      ry = cy + d * tody;
+      toqx = qx - px;
+      toqy = qy - py;
+      torx = rx - qx;
+      tory = ry - qy;
+
+      sx = px + d * toqx;
+      sy = py + d * toqy;
+      tx = qx + d * torx;
+      ty = qy + d * tory;
+      totx = tx - sx;
+      toty = ty - sy;
+
+      x = sx + d * totx;
+      y = sy + d * toty;
+      if (i == 0) {
+        minx = x;
+        miny = y;
+        maxx = x;
+        maxy = y;
+      } else {
+        minx = Math.min(minx, x);
+        miny = Math.min(miny, y);
+        maxx = Math.max(maxx, x);
+        maxy = Math.max(maxy, y);
+      }
+    }
+    return new Rectangle(
+      Math.round(minx),
+      Math.round(miny),
+      Math.round(maxx - minx),
+      Math.round(maxy - miny)
+    );
+  };
+
+  var getPrevLineDashValue = function(lineDash, lineDashOffset) {
+    return JSON.stringify({
+      lineDash: lineDash,
+      lineDashOffset: lineDashOffset
+    });
+  };
+
+  var setLineDash = function() {
+    // Avoid unnecessary line dash declarations.
+    if (
+      !this.prevLineDash &&
+      !this.ctx.lineDash.length &&
+      !this.ctx.lineDashOffset
+    ) {
+      return;
+    }
+
+    // Avoid unnecessary line dash declarations.
+    const nextLineDash = getPrevLineDashValue(
+      this.ctx.lineDash,
+      this.ctx.lineDashOffset
+    );
+    if (this.prevLineDash !== nextLineDash) {
+      this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);
+      this.prevLineDash = nextLineDash;
+    }
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * jsPDF filters PlugIn
+ * Copyright (c) 2014 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+(function(jsPDFAPI) {
+
+  var ASCII85Encode = function(a) {
+    var b, c, d, e, f, g, h, i, j, k;
+    // eslint-disable-next-line no-control-regex
+    for (
+      !/[^\x00-\xFF]/.test(a),
+        b = "\x00\x00\x00\x00".slice(a.length % 4 || 4),
+        a += b,
+        c = [],
+        d = 0,
+        e = a.length;
+      e > d;
+      d += 4
+    )
+      (f =
+        (a.charCodeAt(d) << 24) +
+        (a.charCodeAt(d + 1) << 16) +
+        (a.charCodeAt(d + 2) << 8) +
+        a.charCodeAt(d + 3)),
+        0 !== f
+          ? ((k = f % 85),
+            (f = (f - k) / 85),
+            (j = f % 85),
+            (f = (f - j) / 85),
+            (i = f % 85),
+            (f = (f - i) / 85),
+            (h = f % 85),
+            (f = (f - h) / 85),
+            (g = f % 85),
+            c.push(g + 33, h + 33, i + 33, j + 33, k + 33))
+          : c.push(122);
+    return (
+      (function(a, b) {
+        for (var c = b; c > 0; c--) a.pop();
+      })(c, b.length),
+      String.fromCharCode.apply(String, c) + "~>"
+    );
+  };
+
+  var ASCII85Decode = function(a) {
+    var c,
+      d,
+      e,
+      f,
+      g,
+      h = String,
+      l = "length",
+      w = 255,
+      x = "charCodeAt",
+      y = "slice",
+      z = "replace";
+    for (
+      "~>" === a[y](-2),
+        a = a[y](0, -2)
+          [z](/\s/g, "")
+          [z]("z", "!!!!!"),
+        c = "uuuuu"[y](a[l] % 5 || 5),
+        a += c,
+        e = [],
+        f = 0,
+        g = a[l];
+      g > f;
+      f += 5
+    )
+      (d =
+        52200625 * (a[x](f) - 33) +
+        614125 * (a[x](f + 1) - 33) +
+        7225 * (a[x](f + 2) - 33) +
+        85 * (a[x](f + 3) - 33) +
+        (a[x](f + 4) - 33)),
+        e.push(w & (d >> 24), w & (d >> 16), w & (d >> 8), w & d);
+    return (
+      (function(a, b) {
+        for (var c = b; c > 0; c--) a.pop();
+      })(e, c[l]),
+      h.fromCharCode.apply(h, e)
+    );
+  };
+
+  var ASCIIHexEncode = function(value) {
+    return (
+      value
+        .split("")
+        .map(function(value) {
+          return ("0" + value.charCodeAt().toString(16)).slice(-2);
+        })
+        .join("") + ">"
+    );
+  };
+
+  var ASCIIHexDecode = function(value) {
+    var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);
+    value = value.replace(/\s/g, "");
+    if (value.indexOf(">") !== -1) {
+      value = value.substr(0, value.indexOf(">"));
+    }
+    if (value.length % 2) {
+      value += "0";
+    }
+    if (regexCheckIfHex.test(value) === false) {
+      return "";
+    }
+    var result = "";
+    for (var i = 0; i < value.length; i += 2) {
+      result += String.fromCharCode("0x" + (value[i] + value[i + 1]));
+    }
+    return result;
+  };
+  /*
+  var FlatePredictors = {
+      None: 1,
+      TIFF: 2,
+      PNG_None: 10,
+      PNG_Sub: 11,
+      PNG_Up: 12,
+      PNG_Average: 13,
+      PNG_Paeth: 14,
+      PNG_Optimum: 15
+  };
+  */
+
+  var FlateEncode = function(data) {
+    var arr = new Uint8Array(data.length);
+    var i = data.length;
+    while (i--) {
+      arr[i] = data.charCodeAt(i);
+    }
+    arr = fflate.zlibSync(arr);
+    data = arr.reduce(function(data, byte) {
+      return data + String.fromCharCode(byte);
+    }, "");
+    return data;
+  };
+
+  jsPDFAPI.processDataByFilters = function(origData, filterChain) {
+    var i = 0;
+    var data = origData || "";
+    var reverseChain = [];
+    filterChain = filterChain || [];
+
+    if (typeof filterChain === "string") {
+      filterChain = [filterChain];
+    }
+
+    for (i = 0; i < filterChain.length; i += 1) {
+      switch (filterChain[i]) {
+        case "ASCII85Decode":
+        case "/ASCII85Decode":
+          data = ASCII85Decode(data);
+          reverseChain.push("/ASCII85Encode");
+          break;
+        case "ASCII85Encode":
+        case "/ASCII85Encode":
+          data = ASCII85Encode(data);
+          reverseChain.push("/ASCII85Decode");
+          break;
+        case "ASCIIHexDecode":
+        case "/ASCIIHexDecode":
+          data = ASCIIHexDecode(data);
+          reverseChain.push("/ASCIIHexEncode");
+          break;
+        case "ASCIIHexEncode":
+        case "/ASCIIHexEncode":
+          data = ASCIIHexEncode(data);
+          reverseChain.push("/ASCIIHexDecode");
+          break;
+        case "FlateEncode":
+        case "/FlateEncode":
+          data = FlateEncode(data);
+          reverseChain.push("/FlateDecode");
+          break;
+        default:
+          throw new Error(
+            'The filter: "' + filterChain[i] + '" is not implemented'
+          );
+      }
+    }
+
+    return { data: data, reverseChain: reverseChain.reverse().join(" ") };
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * jsPDF fileloading PlugIn
+ * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * @name fileloading
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  /**
+   * @name loadFile
+   * @function
+   * @param {string} url
+   * @param {boolean} sync
+   * @param {function} callback
+   * @returns {string|undefined} result
+   */
+  jsPDFAPI.loadFile = function(url, sync, callback) {
+
+    // eslint-disable-next-line no-unreachable
+    return nodeReadFile(url, sync, callback);
+  };
+
+  /**
+   * @name loadImageFile
+   * @function
+   * @param {string} path
+   * @param {boolean} sync
+   * @param {function} callback
+   */
+  jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;
+
+  function nodeReadFile(url, sync, callback) {
+    sync = sync === false ? false : true;
+    var result = undefined;
+
+    var fs = require("fs");
+    var path = require("path");
+
+    url = path.resolve(url);
+    if (sync) {
+      try {
+        result = fs.readFileSync(url, { encoding: "latin1" });
+      } catch (e) {
+        return undefined;
+      }
+    } else {
+      fs.readFile(url, { encoding: "latin1" }, function(err, data) {
+        if (!callback) {
+          return;
+        }
+        if (err) {
+          callback(undefined);
+        }
+        callback(data);
+      });
+    }
+
+    return result;
+  }
+})(jsPDF.API);
+
+/**
+ * @license
+ * Copyright (c) 2018 Erik Koopmans
+ * Released under the MIT License.
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * jsPDF html PlugIn
+ *
+ * @name html
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  function loadHtml2Canvas() {
+    return (function() {
+      if (globalObject["html2canvas"]) {
+        return Promise.resolve(globalObject["html2canvas"]);
+      }
+
+
+      if (typeof exports === "object" && typeof module !== "undefined") {
+        return new Promise(function(resolve, reject) {
+          try {
+            resolve(require("html2canvas"));
+          } catch (e) {
+            reject(e);
+          }
+        });
+      }
+      if (typeof define === "function" && define.amd) {
+        return new Promise(function(resolve, reject) {
+          try {
+            require(["html2canvas"], resolve);
+          } catch (e) {
+            reject(e);
+          }
+        });
+      }
+      return Promise.reject(new Error("Could not load html2canvas"));
+    })()
+      .catch(function(e) {
+        return Promise.reject(new Error("Could not load html2canvas: " + e));
+      })
+      .then(function(html2canvas) {
+        return html2canvas.default ? html2canvas.default : html2canvas;
+      });
+  }
+
+  function loadDomPurify() {
+    return (function() {
+      if (globalObject["DOMPurify"]) {
+        return Promise.resolve(globalObject["DOMPurify"]);
+      }
+
+
+      if (typeof exports === "object" && typeof module !== "undefined") {
+        return new Promise(function(resolve, reject) {
+          try {
+            resolve(require("dompurify"));
+          } catch (e) {
+            reject(e);
+          }
+        });
+      }
+      if (typeof define === "function" && define.amd) {
+        return new Promise(function(resolve, reject) {
+          try {
+            require(["dompurify"], resolve);
+          } catch (e) {
+            reject(e);
+          }
+        });
+      }
+      return Promise.reject(new Error("Could not load dompurify"));
+    })()
+      .catch(function(e) {
+        return Promise.reject(new Error("Could not load dompurify: " + e));
+      })
+      .then(function(dompurify) {
+        return dompurify.default ? dompurify.default : dompurify;
+      });
+  }
+
+  /**
+   * Determine the type of a variable/object.
+   *
+   * @private
+   * @ignore
+   */
+  var objType = function(obj) {
+    var type = typeof obj;
+    if (type === "undefined") return "undefined";
+    else if (type === "string" || obj instanceof String) return "string";
+    else if (type === "number" || obj instanceof Number) return "number";
+    else if (type === "function" || obj instanceof Function) return "function";
+    else if (!!obj && obj.constructor === Array) return "array";
+    else if (obj && obj.nodeType === 1) return "element";
+    else if (type === "object") return "object";
+    else return "unknown";
+  };
+
+  /**
+   * Create an HTML element with optional className, innerHTML, and style.
+   *
+   * @private
+   * @ignore
+   */
+  var createElement = function(tagName, opt) {
+    var el = document.createElement(tagName);
+    if (opt.className) el.className = opt.className;
+    if (opt.innerHTML && opt.dompurify) {
+      el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);
+    }
+    for (var key in opt.style) {
+      el.style[key] = opt.style[key];
+    }
+    return el;
+  };
+
+  /**
+   * Deep-clone a node and preserve contents/properties.
+   *
+   * @private
+   * @ignore
+   */
+  var cloneNode = function(node, javascriptEnabled) {
+    // Recursively clone the node.
+    var clone =
+      node.nodeType === 3
+        ? document.createTextNode(node.nodeValue)
+        : node.cloneNode(false);
+    for (var child = node.firstChild; child; child = child.nextSibling) {
+      if (
+        javascriptEnabled === true ||
+        child.nodeType !== 1 ||
+        child.nodeName !== "SCRIPT"
+      ) {
+        clone.appendChild(cloneNode(child, javascriptEnabled));
+      }
+    }
+
+    if (node.nodeType === 1) {
+      // Preserve contents/properties of special nodes.
+      if (node.nodeName === "CANVAS") {
+        clone.width = node.width;
+        clone.height = node.height;
+        clone.getContext("2d").drawImage(node, 0, 0);
+      } else if (node.nodeName === "TEXTAREA" || node.nodeName === "SELECT") {
+        clone.value = node.value;
+      }
+
+      // Preserve the node's scroll position when it loads.
+      clone.addEventListener(
+        "load",
+        function() {
+          clone.scrollTop = node.scrollTop;
+          clone.scrollLeft = node.scrollLeft;
+        },
+        true
+      );
+    }
+
+    // Return the cloned node.
+    return clone;
+  };
+
+  /* ----- CONSTRUCTOR ----- */
+
+  var Worker = function Worker(opt) {
+    // Create the root parent for the proto chain, and the starting Worker.
+    var root = Object.assign(
+      Worker.convert(Promise.resolve()),
+      JSON.parse(JSON.stringify(Worker.template))
+    );
+    var self = Worker.convert(Promise.resolve(), root);
+
+    // Set progress, optional settings, and return.
+    self = self.setProgress(1, Worker, 1, [Worker]);
+    self = self.set(opt);
+    return self;
+  };
+
+  // Boilerplate for subclassing Promise.
+  Worker.prototype = Object.create(Promise.prototype);
+  Worker.prototype.constructor = Worker;
+
+  // Converts/casts promises into Workers.
+  Worker.convert = function convert(promise, inherit) {
+    // Uses prototypal inheritance to receive changes made to ancestors' properties.
+    promise.__proto__ = inherit || Worker.prototype;
+    return promise;
+  };
+
+  Worker.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: true,
+      x: 0,
+      y: 0,
+      html2canvas: {},
+      jsPDF: {},
+      backgroundColor: "transparent"
+    }
+  };
+
+  /* ----- FROM / TO ----- */
+
+  Worker.prototype.from = function from(src, type) {
+    function getType(src) {
+      switch (objType(src)) {
+        case "string":
+          return "string";
+        case "element":
+          return src.nodeName.toLowerCase() === "canvas" ? "canvas" : "element";
+        default:
+          return "unknown";
+      }
+    }
+
+    return this.then(function from_main() {
+      type = type || getType(src);
+      switch (type) {
+        case "string":
+          return this.then(loadDomPurify).then(function(dompurify) {
+            return this.set({
+              src: createElement("div", {
+                innerHTML: src,
+                dompurify: dompurify
+              })
+            });
+          });
+        case "element":
+          return this.set({ src: src });
+        case "canvas":
+          return this.set({ canvas: src });
+        case "img":
+          return this.set({ img: src });
+        default:
+          return this.error("Unknown source type.");
+      }
+    });
+  };
+
+  Worker.prototype.to = function to(target) {
+    // Route the 'to' request to the appropriate method.
+    switch (target) {
+      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.");
+    }
+  };
+
+  Worker.prototype.toContainer = function toContainer() {
+    // Set up function prerequisites.
+    var prereqs = [
+      function checkSrc() {
+        return (
+          this.prop.src || this.error("Cannot duplicate - no source HTML.")
+        );
+      },
+      function checkPageSize() {
+        return this.prop.pageSize || this.setPageSize();
+      }
+    ];
+    return this.thenList(prereqs).then(function toContainer_main() {
+      // Define the CSS styles for the container and its overlay parent.
+      var overlayCSS = {
+        position: "fixed",
+        overflow: "hidden",
+        zIndex: 1000,
+        left: "-100000px",
+        right: 0,
+        bottom: 0,
+        top: 0
+      };
+      var containerCSS = {
+        position: "relative",
+        display: "inline-block",
+        width:
+          (typeof this.opt.width === "number" &&
+          !isNaN(this.opt.width) &&
+          typeof this.opt.windowWidth === "number" &&
+          !isNaN(this.opt.windowWidth)
+            ? this.opt.windowWidth
+            : Math.max(
+                this.prop.src.clientWidth,
+                this.prop.src.scrollWidth,
+                this.prop.src.offsetWidth
+              )) + "px",
+        left: 0,
+        right: 0,
+        top: 0,
+        margin: "auto",
+        backgroundColor: this.opt.backgroundColor
+      }; // Set the overlay to hidden (could be changed in the future to provide a print preview).
+
+      var source = cloneNode(
+        this.prop.src,
+        this.opt.html2canvas.javascriptEnabled
+      );
+
+      if (source.tagName === "BODY") {
+        containerCSS.height =
+          Math.max(
+            document.body.scrollHeight,
+            document.body.offsetHeight,
+            document.documentElement.clientHeight,
+            document.documentElement.scrollHeight,
+            document.documentElement.offsetHeight
+          ) + "px";
+      }
+
+      this.prop.overlay = createElement("div", {
+        className: "html2pdf__overlay",
+        style: overlayCSS
+      });
+      this.prop.container = createElement("div", {
+        className: "html2pdf__container",
+        style: containerCSS
+      });
+      this.prop.container.appendChild(source);
+      this.prop.container.firstChild.appendChild(
+        createElement("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";
+    });
+  };
+
+  Worker.prototype.toCanvas = function toCanvas() {
+    // Set up function prerequisites.
+    var prereqs = [
+      function checkContainer() {
+        return (
+          document.body.contains(this.prop.container) || this.toContainer()
+        );
+      }
+    ];
+
+    // Fulfill prereqs then create the canvas.
+    return this.thenList(prereqs)
+      .then(loadHtml2Canvas)
+      .then(function toCanvas_main(html2canvas) {
+        // Handle old-fashioned 'onrendered' argument.
+        var options = Object.assign({}, this.opt.html2canvas);
+        delete options.onrendered;
+
+        return html2canvas(this.prop.container, options);
+      })
+      .then(function toCanvas_post(canvas) {
+        // Handle old-fashioned 'onrendered' argument.
+        var onRendered = this.opt.html2canvas.onrendered || function() {};
+        onRendered(canvas);
+
+        this.prop.canvas = canvas;
+        document.body.removeChild(this.prop.overlay);
+      });
+  };
+
+  Worker.prototype.toContext2d = function toContext2d() {
+    // Set up function prerequisites.
+    var prereqs = [
+      function checkContainer() {
+        return (
+          document.body.contains(this.prop.container) || this.toContainer()
+        );
+      }
+    ];
+
+    // Fulfill prereqs then create the canvas.
+    return this.thenList(prereqs)
+      .then(loadHtml2Canvas)
+      .then(function toContext2d_main(html2canvas) {
+        // Handle old-fashioned 'onrendered' argument.
+
+        var pdf = this.opt.jsPDF;
+        var fontFaces = this.opt.fontFaces;
+
+        var scale =
+          typeof this.opt.width === "number" &&
+          !isNaN(this.opt.width) &&
+          typeof this.opt.windowWidth === "number" &&
+          !isNaN(this.opt.windowWidth)
+            ? this.opt.width / this.opt.windowWidth
+            : 1;
+
+        var options = Object.assign(
+          {
+            async: true,
+            allowTaint: true,
+            scale: scale,
+            scrollX: this.opt.scrollX || 0,
+            scrollY: this.opt.scrollY || 0,
+            backgroundColor: "#ffffff",
+            imageTimeout: 15000,
+            logging: true,
+            proxy: null,
+            removeContainer: true,
+            foreignObjectRendering: false,
+            useCORS: false
+          },
+          this.opt.html2canvas
+        );
+        delete options.onrendered;
+
+        pdf.context2d.autoPaging =
+          typeof this.opt.autoPaging === "undefined"
+            ? true
+            : this.opt.autoPaging;
+        pdf.context2d.posX = this.opt.x;
+        pdf.context2d.posY = this.opt.y;
+        pdf.context2d.margin = this.opt.margin;
+        pdf.context2d.fontFaces = fontFaces;
+
+        if (fontFaces) {
+          for (var i = 0; i < fontFaces.length; ++i) {
+            var font = fontFaces[i];
+            var src = font.src.find(function(src) {
+              return src.format === "truetype";
+            });
+
+            if (src) {
+              pdf.addFont(src.url, font.ref.name, font.ref.style);
+            }
+          }
+        }
+
+        options.windowHeight = options.windowHeight || 0;
+        options.windowHeight =
+          options.windowHeight == 0
+            ? Math.max(
+                this.prop.container.clientHeight,
+                this.prop.container.scrollHeight,
+                this.prop.container.offsetHeight
+              )
+            : options.windowHeight;
+
+        pdf.context2d.save(true);
+        return html2canvas(this.prop.container, options);
+      })
+      .then(function toContext2d_post(canvas) {
+        this.opt.jsPDF.context2d.restore(true);
+
+        // Handle old-fashioned 'onrendered' argument.
+        var onRendered = this.opt.html2canvas.onrendered || function() {};
+        onRendered(canvas);
+
+        this.prop.canvas = canvas;
+        document.body.removeChild(this.prop.overlay);
+      });
+  };
+
+  Worker.prototype.toImg = function toImg() {
+    // Set up function prerequisites.
+    var prereqs = [
+      function checkCanvas() {
+        return this.prop.canvas || this.toCanvas();
+      }
+    ];
+
+    // Fulfill prereqs then create the image.
+    return this.thenList(prereqs).then(function toImg_main() {
+      var imgData = this.prop.canvas.toDataURL(
+        "image/" + this.opt.image.type,
+        this.opt.image.quality
+      );
+      this.prop.img = document.createElement("img");
+      this.prop.img.src = imgData;
+    });
+  };
+
+  Worker.prototype.toPdf = function toPdf() {
+    // Set up function prerequisites.
+    var prereqs = [
+      function checkContext2d() {
+        return this.toContext2d();
+      }
+      //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }
+    ];
+
+    // Fulfill prereqs then create the image.
+    return this.thenList(prereqs).then(function toPdf_main() {
+      // Create local copies of frequently used properties.
+      this.prop.pdf = this.prop.pdf || this.opt.jsPDF;
+    });
+  };
+
+  /* ----- OUTPUT / SAVE ----- */
+
+  Worker.prototype.output = function output(type, options, src) {
+    // Redirect requests to the correct function (outputPdf / outputImg).
+    src = src || "pdf";
+    if (src.toLowerCase() === "img" || src.toLowerCase() === "image") {
+      return this.outputImg(type, options);
+    } else {
+      return this.outputPdf(type, options);
+    }
+  };
+
+  Worker.prototype.outputPdf = function outputPdf(type, options) {
+    // Set up function prerequisites.
+    var prereqs = [
+      function checkPdf() {
+        return this.prop.pdf || this.toPdf();
+      }
+    ];
+
+    // Fulfill prereqs then perform the appropriate output.
+    return this.thenList(prereqs).then(function outputPdf_main() {
+      /* Currently implemented output types:
+       *    https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992
+       *  save(options), arraybuffer, blob, bloburi/bloburl,
+       *  datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl
+       */
+      return this.prop.pdf.output(type, options);
+    });
+  };
+
+  Worker.prototype.outputImg = function outputImg(type) {
+    // Set up function prerequisites.
+    var prereqs = [
+      function checkImg() {
+        return this.prop.img || this.toImg();
+      }
+    ];
+
+    // Fulfill prereqs then perform the appropriate output.
+    return this.thenList(prereqs).then(function outputImg_main() {
+      switch (type) {
+        case undefined:
+        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 "' + type + '" is not supported.';
+      }
+    });
+  };
+
+  Worker.prototype.save = function save(filename) {
+    // Set up function prerequisites.
+    var prereqs = [
+      function checkPdf() {
+        return this.prop.pdf || this.toPdf();
+      }
+    ];
+
+    // Fulfill prereqs, update the filename (if provided), and save the PDF.
+    return this.thenList(prereqs)
+      .set(filename ? { filename: filename } : null)
+      .then(function save_main() {
+        this.prop.pdf.save(this.opt.filename);
+      });
+  };
+
+  Worker.prototype.doCallback = function doCallback() {
+    // Set up function prerequisites.
+    var prereqs = [
+      function checkPdf() {
+        return this.prop.pdf || this.toPdf();
+      }
+    ];
+
+    // Fulfill prereqs, update the filename (if provided), and save the PDF.
+    return this.thenList(prereqs).then(function doCallback_main() {
+      this.prop.callback(this.prop.pdf);
+    });
+  };
+
+  /* ----- SET / GET ----- */
+
+  Worker.prototype.set = function set(opt) {
+    // TODO: Implement ordered pairs?
+
+    // Silently ignore invalid or empty input.
+    if (objType(opt) !== "object") {
+      return this;
+    }
+
+    // Build an array of setter functions to queue.
+    var fns = Object.keys(opt || {}).map(function(key) {
+      if (key in Worker.template.prop) {
+        // Set pre-defined properties.
+        return function set_prop() {
+          this.prop[key] = opt[key];
+        };
+      } else {
+        switch (key) {
+          case "margin":
+            return this.setMargin.bind(this, opt.margin);
+          case "jsPDF":
+            return function set_jsPDF() {
+              this.opt.jsPDF = opt.jsPDF;
+              return this.setPageSize();
+            };
+          case "pageSize":
+            return this.setPageSize.bind(this, opt.pageSize);
+          default:
+            // Set any other properties in opt.
+            return function set_opt() {
+              this.opt[key] = opt[key];
+            };
+        }
+      }
+    }, this);
+
+    // Set properties within the promise chain.
+    return this.then(function set_main() {
+      return this.thenList(fns);
+    });
+  };
+
+  Worker.prototype.get = function get(key, cbk) {
+    return this.then(function get_main() {
+      // Fetch the requested property, either as a predefined prop or in opt.
+      var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];
+      return cbk ? cbk(val) : val;
+    });
+  };
+
+  Worker.prototype.setMargin = function setMargin(margin) {
+    return this.then(function setMargin_main() {
+      // Parse the margin property.
+      switch (objType(margin)) {
+        case "number":
+          margin = [margin, margin, margin, margin];
+        // eslint-disable-next-line no-fallthrough
+        case "array":
+          if (margin.length === 2) {
+            margin = [margin[0], margin[1], margin[0], margin[1]];
+          }
+          if (margin.length === 4) {
+            break;
+          }
+        // eslint-disable-next-line no-fallthrough
+        default:
+          return this.error("Invalid margin array.");
+      }
+
+      // Set the margin property, then update pageSize.
+      this.opt.margin = margin;
+    }).then(this.setPageSize);
+  };
+
+  Worker.prototype.setPageSize = function setPageSize(pageSize) {
+    function toPx(val, k) {
+      return Math.floor(((val * k) / 72) * 96);
+    }
+
+    return this.then(function setPageSize_main() {
+      // Retrieve page-size based on jsPDF settings, if not explicitly provided.
+      pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF);
+
+      // Add 'inner' field if not present.
+      if (!pageSize.hasOwnProperty("inner")) {
+        pageSize.inner = {
+          width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],
+          height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]
+        };
+        pageSize.inner.px = {
+          width: toPx(pageSize.inner.width, pageSize.k),
+          height: toPx(pageSize.inner.height, pageSize.k)
+        };
+        pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;
+      }
+
+      // Attach pageSize to this.
+      this.prop.pageSize = pageSize;
+    });
+  };
+
+  Worker.prototype.setProgress = function setProgress(val, state, n, stack) {
+    // Immediately update all progress values.
+    if (val != null) this.progress.val = val;
+    if (state != null) this.progress.state = state;
+    if (n != null) this.progress.n = n;
+    if (stack != null) this.progress.stack = stack;
+    this.progress.ratio = this.progress.val / this.progress.state;
+
+    // Return this for command chaining.
+    return this;
+  };
+
+  Worker.prototype.updateProgress = function updateProgress(
+    val,
+    state,
+    n,
+    stack
+  ) {
+    // Immediately update all progress values, using setProgress.
+    return this.setProgress(
+      val ? this.progress.val + val : null,
+      state ? state : null,
+      n ? this.progress.n + n : null,
+      stack ? this.progress.stack.concat(stack) : null
+    );
+  };
+
+  /* ----- PROMISE MAPPING ----- */
+
+  Worker.prototype.then = function then(onFulfilled, onRejected) {
+    // Wrap `this` for encapsulation.
+    var self = this;
+
+    return this.thenCore(onFulfilled, onRejected, function then_main(
+      onFulfilled,
+      onRejected
+    ) {
+      // Update progress while queuing, calling, and resolving `then`.
+      self.updateProgress(null, null, 1, [onFulfilled]);
+      return Promise.prototype.then
+        .call(this, function then_pre(val) {
+          self.updateProgress(null, onFulfilled);
+          return val;
+        })
+        .then(onFulfilled, onRejected)
+        .then(function then_post(val) {
+          self.updateProgress(1);
+          return val;
+        });
+    });
+  };
+
+  Worker.prototype.thenCore = function thenCore(
+    onFulfilled,
+    onRejected,
+    thenBase
+  ) {
+    // Handle optional thenBase parameter.
+    thenBase = thenBase || Promise.prototype.then;
+
+    // Wrap `this` for encapsulation and bind it to the promise handlers.
+    var self = this;
+    if (onFulfilled) {
+      onFulfilled = onFulfilled.bind(self);
+    }
+    if (onRejected) {
+      onRejected = onRejected.bind(self);
+    }
+
+    // Cast self into a Promise to avoid polyfills recursively defining `then`.
+    var isNative =
+      Promise.toString().indexOf("[native code]") !== -1 &&
+      Promise.name === "Promise";
+    var selfPromise = isNative
+      ? self
+      : Worker.convert(Object.assign({}, self), Promise.prototype);
+
+    // Return the promise, after casting it into a Worker and preserving props.
+    var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);
+    return Worker.convert(returnVal, self.__proto__);
+  };
+
+  Worker.prototype.thenExternal = function thenExternal(
+    onFulfilled,
+    onRejected
+  ) {
+    // Call `then` and return a standard promise (exits the Worker chain).
+    return Promise.prototype.then.call(this, onFulfilled, onRejected);
+  };
+
+  Worker.prototype.thenList = function thenList(fns) {
+    // Queue a series of promise 'factories' into the promise chain.
+    var self = this;
+    fns.forEach(function thenList_forEach(fn) {
+      self = self.thenCore(fn);
+    });
+    return self;
+  };
+
+  Worker.prototype["catch"] = function(onRejected) {
+    // Bind `this` to the promise handler, call `catch`, and return a Worker.
+    if (onRejected) {
+      onRejected = onRejected.bind(this);
+    }
+    var returnVal = Promise.prototype["catch"].call(this, onRejected);
+    return Worker.convert(returnVal, this);
+  };
+
+  Worker.prototype.catchExternal = function catchExternal(onRejected) {
+    // Call `catch` and return a standard promise (exits the Worker chain).
+    return Promise.prototype["catch"].call(this, onRejected);
+  };
+
+  Worker.prototype.error = function error(msg) {
+    // Throw the error in the Promise chain.
+    return this.then(function error_main() {
+      throw new Error(msg);
+    });
+  };
+
+  /* ----- ALIASES ----- */
+
+  Worker.prototype.using = Worker.prototype.set;
+  Worker.prototype.saveAs = Worker.prototype.save;
+  Worker.prototype.export = Worker.prototype.output;
+  Worker.prototype.run = Worker.prototype.then;
+
+  // Get dimensions of a PDF page, as determined by jsPDF.
+  jsPDF.getPageSize = function(orientation, unit, format) {
+    // Decode options object
+    if (typeof orientation === "object") {
+      var options = orientation;
+      orientation = options.orientation;
+      unit = options.unit || unit;
+      format = options.format || format;
+    }
+
+    // Default options
+    unit = unit || "mm";
+    format = format || "a4";
+    orientation = ("" + (orientation || "P")).toLowerCase();
+    var format_as_string = ("" + format).toLowerCase();
+
+    // Size in pt of various paper formats
+    var pageFormats = {
+      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]
+    };
+
+    var k;
+    // Unit conversion
+    switch (unit) {
+      case "pt":
+        k = 1;
+        break;
+      case "mm":
+        k = 72 / 25.4;
+        break;
+      case "cm":
+        k = 72 / 2.54;
+        break;
+      case "in":
+        k = 72;
+        break;
+      case "px":
+        k = 72 / 96;
+        break;
+      case "pc":
+        k = 12;
+        break;
+      case "em":
+        k = 12;
+        break;
+      case "ex":
+        k = 6;
+        break;
+      default:
+        throw "Invalid unit: " + unit;
+    }
+    var pageHeight = 0;
+    var pageWidth = 0;
+
+    // Dimensions are stored as user units and converted to points on output
+    if (pageFormats.hasOwnProperty(format_as_string)) {
+      pageHeight = pageFormats[format_as_string][1] / k;
+      pageWidth = pageFormats[format_as_string][0] / k;
+    } else {
+      try {
+        pageHeight = format[1];
+        pageWidth = format[0];
+      } catch (err) {
+        throw new Error("Invalid format: " + format);
+      }
+    }
+
+    var tmp;
+    // Handle page orientation
+    if (orientation === "p" || orientation === "portrait") {
+      orientation = "p";
+      if (pageWidth > pageHeight) {
+        tmp = pageWidth;
+        pageWidth = pageHeight;
+        pageHeight = tmp;
+      }
+    } else if (orientation === "l" || orientation === "landscape") {
+      orientation = "l";
+      if (pageHeight > pageWidth) {
+        tmp = pageWidth;
+        pageWidth = pageHeight;
+        pageHeight = tmp;
+      }
+    } else {
+      throw "Invalid orientation: " + orientation;
+    }
+
+    // Return information (k is the unit conversion ratio from pts)
+    var info = {
+      width: pageWidth,
+      height: pageHeight,
+      unit: unit,
+      k: k,
+      orientation: orientation
+    };
+    return info;
+  };
+
+  /**
+   * @typedef FontFace
+   *
+   * The font-face type implements an interface similar to that of the font-face CSS rule,
+   * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D
+   * is updated.
+   *
+   * All properties expect values similar to those in the font-face CSS rule. A difference
+   * is the font-family, which do not need to be enclosed in double-quotes when containing
+   * spaces like in CSS.
+   *
+   * @property {string} family The name of the font-family.
+   * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.
+   * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)
+   * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.
+   * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.
+   * @property {string} [src] url A URL to a font of a specific format.
+   * @property {string} [src] format Format of the font referenced by the URL.
+   */
+
+  /**
+   * Generate a PDF from an HTML element or string using.
+   *
+   * @name html
+   * @function
+   * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.
+   * @param {Object} [options] Collection of settings
+   * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance
+   * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.
+   * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.
+   * <ul>
+   * <li>
+   *   <code>false</code>: Auto paging is disabled.
+   * </li>
+   * <li>
+   *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly
+   *   slice text in half, making it difficult to read.
+   * </li>
+   * <li>
+   *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting
+   *   mostly of a single column of text.
+   * </li>
+   * </ul>
+   * Default is <code>true</code>.
+   * @param {string} [options.filename] name of the file
+   * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image
+   * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options
+   * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.
+   * @param {jsPDF} [options.jsPDF] jsPDF instance
+   * @param {number=} [options.x] x position on the PDF document in jsPDF units.
+   * @param {number=} [options.y] y position on the PDF document in jsPDF units.
+   * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be
+   * scaled such that it fits into the specified width. Has no effect if either the <code>html2canvas.scale<code> is
+   * specified or the <code>windowWidth</code> option is NOT specified.
+   * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the
+   * <code>html2canvas.windowWidth</code> option, this option affects the actual container size while rendering and
+   * does NOT affect CSS media queries. This option only has an effect, if the <code>width<code> option is also specified.
+   *
+   * @example
+   * var doc = new jsPDF();
+   *
+   * doc.html(document.body, {
+   *    callback: function (doc) {
+   *      doc.save();
+   *    },
+   *    x: 10,
+   *    y: 10
+   * });
+   */
+  jsPDFAPI.html = function(src, options) {
+
+    options = options || {};
+    options.callback = options.callback || function() {};
+    options.html2canvas = options.html2canvas || {};
+    options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;
+    options.jsPDF = options.jsPDF || this;
+    options.fontFaces = options.fontFaces
+      ? options.fontFaces.map(normalizeFontFace)
+      : null;
+
+    // Create a new worker with the given options.
+    var worker = new Worker(options);
+
+    if (!options.worker) {
+      // If worker is not set to true, perform the traditional 'simple' operation.
+      return worker.from(src).doCallback();
+    } else {
+      // Otherwise, return the worker for new Promise-based operation.
+      return worker;
+    }
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * ====================================================================
+ * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+
+/**
+ * jsPDF JavaScript plugin
+ *
+ * @name javascript
+ * @module
+ */
+(function(jsPDFAPI) {
+  var jsNamesObj, jsJsObj, text;
+  /**
+   * @name addJS
+   * @function
+   * @param {string} javascript The javascript to be embedded into the PDF-file.
+   * @returns {jsPDF}
+   */
+  jsPDFAPI.addJS = function(javascript) {
+    text = javascript;
+    this.internal.events.subscribe("postPutResources", function() {
+      jsNamesObj = this.internal.newObject();
+      this.internal.out("<<");
+      this.internal.out("/Names [(EmbeddedJS) " + (jsNamesObj + 1) + " 0 R]");
+      this.internal.out(">>");
+      this.internal.out("endobj");
+
+      jsJsObj = this.internal.newObject();
+      this.internal.out("<<");
+      this.internal.out("/S /JavaScript");
+      this.internal.out("/JS (" + text + ")");
+      this.internal.out(">>");
+      this.internal.out("endobj");
+    });
+    this.internal.events.subscribe("putCatalog", function() {
+      if (jsNamesObj !== undefined && jsJsObj !== undefined) {
+        this.internal.out("/Names <</JavaScript " + jsNamesObj + " 0 R>>");
+      }
+    });
+    return this;
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * jsPDF Outline PlugIn
+ *
+ * Generates a PDF Outline
+ * @name outline
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  var namesOid;
+  //var destsGoto = [];
+
+  jsPDFAPI.events.push([
+    "postPutResources",
+    function() {
+      var pdf = this;
+      var rx = /^(\d+) 0 obj$/;
+
+      // Write action goto objects for each page
+      // this.outline.destsGoto = [];
+      // for (var i = 0; i < totalPages; i++) {
+      // var id = pdf.internal.newObject();
+      // this.outline.destsGoto.push(id);
+      // pdf.internal.write("<</D[" + (i * 2 + 3) + " 0 R /XYZ null
+      // null null]/S/GoTo>> endobj");
+      // }
+      //
+      // for (var i = 0; i < dests.length; i++) {
+      // pdf.internal.write("(page_" + (i + 1) + ")" + dests[i] + " 0
+      // R");
+      // }
+      //
+      if (this.outline.root.children.length > 0) {
+        var lines = pdf.outline.render().split(/\r\n/);
+        for (var i = 0; i < lines.length; i++) {
+          var line = lines[i];
+          var m = rx.exec(line);
+          if (m != null) {
+            var oid = m[1];
+            pdf.internal.newObjectDeferredBegin(oid, false);
+          }
+          pdf.internal.write(line);
+        }
+      }
+
+      // This code will write named destination for each page reference
+      // (page_1, etc)
+      if (this.outline.createNamedDestinations) {
+        var totalPages = this.internal.pages.length;
+        // WARNING: this assumes jsPDF starts on page 3 and pageIDs
+        // follow 5, 7, 9, etc
+        // Write destination objects for each page
+        var dests = [];
+        for (var i = 0; i < totalPages; i++) {
+          var id = pdf.internal.newObject();
+          dests.push(id);
+          var info = pdf.internal.getPageInfo(i + 1);
+          pdf.internal.write(
+            "<< /D[" + info.objId + " 0 R /XYZ null null null]>> endobj"
+          );
+        }
+
+        // assign a name for each destination
+        var names2Oid = pdf.internal.newObject();
+        pdf.internal.write("<< /Names [ ");
+        for (var i = 0; i < dests.length; i++) {
+          pdf.internal.write("(page_" + (i + 1) + ")" + dests[i] + " 0 R");
+        }
+        pdf.internal.write(" ] >>", "endobj");
+
+        // var kids = pdf.internal.newObject();
+        // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');
+        // pdf.internal.write(' ] >>', 'endobj');
+
+        namesOid = pdf.internal.newObject();
+        pdf.internal.write("<< /Dests " + names2Oid + " 0 R");
+        pdf.internal.write(">>", "endobj");
+      }
+    }
+  ]);
+
+  jsPDFAPI.events.push([
+    "putCatalog",
+    function() {
+      var pdf = this;
+      if (pdf.outline.root.children.length > 0) {
+        pdf.internal.write(
+          "/Outlines",
+          this.outline.makeRef(this.outline.root)
+        );
+        if (this.outline.createNamedDestinations) {
+          pdf.internal.write("/Names " + namesOid + " 0 R");
+        }
+        // Open with Bookmarks showing
+        // pdf.internal.write("/PageMode /UseOutlines");
+      }
+    }
+  ]);
+
+  jsPDFAPI.events.push([
+    "initialized",
+    function() {
+      var pdf = this;
+
+      pdf.outline = {
+        createNamedDestinations: false,
+        root: {
+          children: []
+        }
+      };
+
+      /**
+       * Options: pageNumber
+       */
+      pdf.outline.add = function(parent, title, options) {
+        var item = {
+          title: title,
+          options: options,
+          children: []
+        };
+        if (parent == null) {
+          parent = this.root;
+        }
+        parent.children.push(item);
+        return item;
+      };
+
+      pdf.outline.render = function() {
+        this.ctx = {};
+        this.ctx.val = "";
+        this.ctx.pdf = pdf;
+
+        this.genIds_r(this.root);
+        this.renderRoot(this.root);
+        this.renderItems(this.root);
+
+        return this.ctx.val;
+      };
+
+      pdf.outline.genIds_r = function(node) {
+        node.id = pdf.internal.newObjectDeferred();
+        for (var i = 0; i < node.children.length; i++) {
+          this.genIds_r(node.children[i]);
+        }
+      };
+
+      pdf.outline.renderRoot = function(node) {
+        this.objStart(node);
+        this.line("/Type /Outlines");
+        if (node.children.length > 0) {
+          this.line("/First " + this.makeRef(node.children[0]));
+          this.line(
+            "/Last " + this.makeRef(node.children[node.children.length - 1])
+          );
+        }
+        this.line(
+          "/Count " +
+            this.count_r(
+              {
+                count: 0
+              },
+              node
+            )
+        );
+        this.objEnd();
+      };
+
+      pdf.outline.renderItems = function(node) {
+        var getVerticalCoordinateString = this.ctx.pdf.internal
+          .getVerticalCoordinateString;
+        for (var i = 0; i < node.children.length; i++) {
+          var item = node.children[i];
+          this.objStart(item);
+
+          this.line("/Title " + this.makeString(item.title));
+
+          this.line("/Parent " + this.makeRef(node));
+          if (i > 0) {
+            this.line("/Prev " + this.makeRef(node.children[i - 1]));
+          }
+          if (i < node.children.length - 1) {
+            this.line("/Next " + this.makeRef(node.children[i + 1]));
+          }
+          if (item.children.length > 0) {
+            this.line("/First " + this.makeRef(item.children[0]));
+            this.line(
+              "/Last " + this.makeRef(item.children[item.children.length - 1])
+            );
+          }
+
+          var count = (this.count = this.count_r(
+            {
+              count: 0
+            },
+            item
+          ));
+          if (count > 0) {
+            this.line("/Count " + count);
+          }
+
+          if (item.options) {
+            if (item.options.pageNumber) {
+              // Explicit Destination
+              //WARNING this assumes page ids are 3,5,7, etc.
+              var info = pdf.internal.getPageInfo(item.options.pageNumber);
+              this.line(
+                "/Dest " +
+                  "[" +
+                  info.objId +
+                  " 0 R /XYZ 0 " +
+                  getVerticalCoordinateString(0) +
+                  " 0]"
+              );
+              // this line does not work on all clients (pageNumber instead of page ref)
+              //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');
+
+              // Named Destination
+              // this.line('/Dest (page_' + (item.options.pageNumber) + ')');
+
+              // Action Destination
+              // var id = pdf.internal.newObject();
+              // pdf.internal.write('<</D[' + (item.options.pageNumber - 1) + ' /XYZ null null null]/S/GoTo>> endobj');
+              // this.line('/A ' + id + ' 0 R' );
+            }
+          }
+          this.objEnd();
+        }
+        for (var z = 0; z < node.children.length; z++) {
+          this.renderItems(node.children[z]);
+        }
+      };
+
+      pdf.outline.line = function(text) {
+        this.ctx.val += text + "\r\n";
+      };
+
+      pdf.outline.makeRef = function(node) {
+        return node.id + " 0 R";
+      };
+
+      pdf.outline.makeString = function(val) {
+        return "(" + pdf.internal.pdfEscape(val) + ")";
+      };
+
+      pdf.outline.objStart = function(node) {
+        this.ctx.val += "\r\n" + node.id + " 0 obj" + "\r\n<<\r\n";
+      };
+
+      pdf.outline.objEnd = function() {
+        this.ctx.val += ">> \r\n" + "endobj" + "\r\n";
+      };
+
+      pdf.outline.count_r = function(ctx, node) {
+        for (var i = 0; i < node.children.length; i++) {
+          ctx.count++;
+          this.count_r(ctx, node.children[i]);
+        }
+        return ctx.count;
+      };
+    }
+  ]);
+
+  return this;
+})(jsPDF.API);
+
+/**
+ * @license
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * jsPDF jpeg Support PlugIn
+ *
+ * @name jpeg_support
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  /**
+   * 0xc0 (SOF) Huffman  - Baseline DCT
+   * 0xc1 (SOF) Huffman  - Extended sequential DCT
+   * 0xc2 Progressive DCT (SOF2)
+   * 0xc3 Spatial (sequential) lossless (SOF3)
+   * 0xc4 Differential sequential DCT (SOF5)
+   * 0xc5 Differential progressive DCT (SOF6)
+   * 0xc6 Differential spatial (SOF7)
+   * 0xc7
+   */
+  var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];
+
+  //takes a string imgData containing the raw bytes of
+  //a jpeg image and returns [width, height]
+  //Algorithm from: http://www.64lines.com/jpeg-width-height
+  var getJpegInfo = function(imgData) {
+    var width, height, numcomponents;
+    var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);
+    var len = imgData.length;
+    var result = { width: 0, height: 0, numcomponents: 1 };
+    for (var i = 4; i < len; i += 2) {
+      i += blockLength;
+      if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {
+        height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);
+        width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);
+        numcomponents = imgData.charCodeAt(i + 9);
+        result = { width: width, height: height, numcomponents: numcomponents };
+        break;
+      } else {
+        blockLength =
+          imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);
+      }
+    }
+    return result;
+  };
+
+  /**
+   * @ignore
+   */
+  jsPDFAPI.processJPEG = function(
+    data,
+    index,
+    alias,
+    compression,
+    dataAsBinaryString,
+    colorSpace
+  ) {
+    var filter = this.decode.DCT_DECODE,
+      bpc = 8,
+      dims,
+      result = null;
+
+    if (
+      typeof data === "string" ||
+      this.__addimage__.isArrayBuffer(data) ||
+      this.__addimage__.isArrayBufferView(data)
+    ) {
+      // if we already have a stored binary string rep use that
+      data = dataAsBinaryString || data;
+      data = this.__addimage__.isArrayBuffer(data)
+        ? new Uint8Array(data)
+        : data;
+      data = this.__addimage__.isArrayBufferView(data)
+        ? this.__addimage__.arrayBufferToBinaryString(data)
+        : data;
+
+      dims = getJpegInfo(data);
+      switch (dims.numcomponents) {
+        case 1:
+          colorSpace = this.color_spaces.DEVICE_GRAY;
+          break;
+        case 4:
+          colorSpace = this.color_spaces.DEVICE_CMYK;
+          break;
+        case 3:
+          colorSpace = this.color_spaces.DEVICE_RGB;
+          break;
+      }
+
+      result = {
+        data: data,
+        width: dims.width,
+        height: dims.height,
+        colorSpace: colorSpace,
+        bitsPerComponent: bpc,
+        filter: filter,
+        index: index,
+        alias: alias
+      };
+    }
+    return result;
+  };
+})(jsPDF.API);
+
+// Generated by CoffeeScript 1.4.0
+
+var PNG = (function() {
+  var APNG_BLEND_OP_SOURCE,
+    APNG_DISPOSE_OP_BACKGROUND,
+    APNG_DISPOSE_OP_PREVIOUS,
+    makeImage,
+    scratchCanvas,
+    scratchCtx;
+
+  APNG_DISPOSE_OP_BACKGROUND = 1;
+
+  APNG_DISPOSE_OP_PREVIOUS = 2;
+
+  APNG_BLEND_OP_SOURCE = 0;
+
+  function PNG(data) {
+    var chunkSize,
+      colors,
+      palLen,
+      delayDen,
+      delayNum,
+      frame,
+      i,
+      index,
+      key,
+      section,
+      palShort,
+      text,
+      _i,
+      _j,
+      _ref;
+    this.data = data;
+    this.pos = 8;
+    this.palette = [];
+    this.imgData = [];
+    this.transparency = {};
+    this.animation = null;
+    this.text = {};
+    frame = null;
+    while (true) {
+      chunkSize = this.readUInt32();
+      section = function() {
+        var _i, _results;
+        _results = [];
+        for (i = _i = 0; _i < 4; i = ++_i) {
+          _results.push(String.fromCharCode(this.data[this.pos++]));
+        }
+        return _results;
+      }
+        .call(this)
+        .join("");
+      switch (section) {
+        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() || Infinity,
+            frames: []
+          };
+          break;
+        case "PLTE":
+          this.palette = this.read(chunkSize);
+          break;
+        case "fcTL":
+          if (frame) {
+            this.animation.frames.push(frame);
+          }
+          this.pos += 4;
+          frame = {
+            width: this.readUInt32(),
+            height: this.readUInt32(),
+            xOffset: this.readUInt32(),
+            yOffset: this.readUInt32()
+          };
+          delayNum = this.readUInt16();
+          delayDen = this.readUInt16() || 100;
+          frame.delay = (1000 * delayNum) / delayDen;
+          frame.disposeOp = this.data[this.pos++];
+          frame.blendOp = this.data[this.pos++];
+          frame.data = [];
+          break;
+        case "IDAT":
+        case "fdAT":
+          if (section === "fdAT") {
+            this.pos += 4;
+            chunkSize -= 4;
+          }
+          data = (frame != null ? frame.data : void 0) || this.imgData;
+          for (
+            i = _i = 0;
+            0 <= chunkSize ? _i < chunkSize : _i > chunkSize;
+            i = 0 <= chunkSize ? ++_i : --_i
+          ) {
+            data.push(this.data[this.pos++]);
+          }
+          break;
+        case "tRNS":
+          this.transparency = {};
+          switch (this.colorType) {
+            case 3:
+              palLen = this.palette.length / 3;
+              this.transparency.indexed = this.read(chunkSize);
+              if (this.transparency.indexed.length > palLen)
+                throw new Error("More transparent colors than palette size");
+              /*
+               * According to the PNG spec trns should be increased to the same size as palette if shorter
+               */
+              //palShort = 255 - this.transparency.indexed.length;
+              palShort = palLen - this.transparency.indexed.length;
+              if (palShort > 0) {
+                for (
+                  i = _j = 0;
+                  0 <= palShort ? _j < palShort : _j > palShort;
+                  i = 0 <= palShort ? ++_j : --_j
+                ) {
+                  this.transparency.indexed.push(255);
+                }
+              }
+              break;
+            case 0:
+              this.transparency.grayscale = this.read(chunkSize)[0];
+              break;
+            case 2:
+              this.transparency.rgb = this.read(chunkSize);
+          }
+          break;
+        case "tEXt":
+          text = this.read(chunkSize);
+          index = text.indexOf(0);
+          key = String.fromCharCode.apply(String, text.slice(0, index));
+          this.text[key] = String.fromCharCode.apply(
+            String,
+            text.slice(index + 1)
+          );
+          break;
+        case "IEND":
+          if (frame) {
+            this.animation.frames.push(frame);
+          }
+          this.colors = function() {
+            switch (this.colorType) {
+              case 0:
+              case 3:
+              case 4:
+                return 1;
+              case 2:
+              case 6:
+                return 3;
+            }
+          }.call(this);
+          this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;
+          colors = this.colors + (this.hasAlphaChannel ? 1 : 0);
+          this.pixelBitlength = this.bits * colors;
+          this.colorSpace = function() {
+            switch (this.colors) {
+              case 1:
+                return "DeviceGray";
+              case 3:
+                return "DeviceRGB";
+            }
+          }.call(this);
+          this.imgData = new Uint8Array(this.imgData);
+          return;
+        default:
+          this.pos += chunkSize;
+      }
+      this.pos += 4;
+      if (this.pos > this.data.length) {
+        throw new Error("Incomplete or corrupt PNG file");
+      }
+    }
+  }
+
+  PNG.prototype.read = function(bytes) {
+    var i, _i, _results;
+    _results = [];
+    for (
+      i = _i = 0;
+      0 <= bytes ? _i < bytes : _i > bytes;
+      i = 0 <= bytes ? ++_i : --_i
+    ) {
+      _results.push(this.data[this.pos++]);
+    }
+    return _results;
+  };
+
+  PNG.prototype.readUInt32 = function() {
+    var b1, b2, b3, b4;
+    b1 = this.data[this.pos++] << 24;
+    b2 = this.data[this.pos++] << 16;
+    b3 = this.data[this.pos++] << 8;
+    b4 = this.data[this.pos++];
+    return b1 | b2 | b3 | b4;
+  };
+
+  PNG.prototype.readUInt16 = function() {
+    var b1, b2;
+    b1 = this.data[this.pos++] << 8;
+    b2 = this.data[this.pos++];
+    return b1 | b2;
+  };
+
+  PNG.prototype.decodePixels = function(data) {
+    var pixelBytes = this.pixelBitlength / 8;
+    var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);
+    var pos = 0;
+    var _this = this;
+
+    if (data == null) {
+      data = this.imgData;
+    }
+    if (data.length === 0) {
+      return new Uint8Array(0);
+    }
+
+    data = fflate.unzlibSync(data);
+    function pass(x0, y0, dx, dy) {
+      var abyte,
+        c,
+        col,
+        i,
+        left,
+        length,
+        p,
+        pa,
+        paeth,
+        pb,
+        pc,
+        pixels,
+        row,
+        scanlineLength,
+        upper,
+        upperLeft,
+        _i,
+        _j,
+        _k,
+        _l,
+        _m;
+      var w = Math.ceil((_this.width - x0) / dx),
+        h = Math.ceil((_this.height - y0) / dy);
+      var isFull = _this.width == w && _this.height == h;
+      scanlineLength = pixelBytes * w;
+      pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);
+      length = data.length;
+      row = 0;
+      c = 0;
+      while (row < h && pos < length) {
+        switch (data[pos++]) {
+          case 0:
+            for (i = _i = 0; _i < scanlineLength; i = _i += 1) {
+              pixels[c++] = data[pos++];
+            }
+            break;
+          case 1:
+            for (i = _j = 0; _j < scanlineLength; i = _j += 1) {
+              abyte = data[pos++];
+              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];
+              pixels[c++] = (abyte + left) % 256;
+            }
+            break;
+          case 2:
+            for (i = _k = 0; _k < scanlineLength; i = _k += 1) {
+              abyte = data[pos++];
+              col = (i - (i % pixelBytes)) / pixelBytes;
+              upper =
+                row &&
+                pixels[
+                  (row - 1) * scanlineLength +
+                    col * pixelBytes +
+                    (i % pixelBytes)
+                ];
+              pixels[c++] = (upper + abyte) % 256;
+            }
+            break;
+          case 3:
+            for (i = _l = 0; _l < scanlineLength; i = _l += 1) {
+              abyte = data[pos++];
+              col = (i - (i % pixelBytes)) / pixelBytes;
+              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];
+              upper =
+                row &&
+                pixels[
+                  (row - 1) * scanlineLength +
+                    col * pixelBytes +
+                    (i % pixelBytes)
+                ];
+              pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;
+            }
+            break;
+          case 4:
+            for (i = _m = 0; _m < scanlineLength; i = _m += 1) {
+              abyte = data[pos++];
+              col = (i - (i % pixelBytes)) / pixelBytes;
+              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];
+              if (row === 0) {
+                upper = upperLeft = 0;
+              } else {
+                upper =
+                  pixels[
+                    (row - 1) * scanlineLength +
+                      col * pixelBytes +
+                      (i % pixelBytes)
+                  ];
+                upperLeft =
+                  col &&
+                  pixels[
+                    (row - 1) * scanlineLength +
+                      (col - 1) * pixelBytes +
+                      (i % pixelBytes)
+                  ];
+              }
+              p = left + upper - upperLeft;
+              pa = Math.abs(p - left);
+              pb = Math.abs(p - upper);
+              pc = Math.abs(p - upperLeft);
+              if (pa <= pb && pa <= pc) {
+                paeth = left;
+              } else if (pb <= pc) {
+                paeth = upper;
+              } else {
+                paeth = upperLeft;
+              }
+              pixels[c++] = (abyte + paeth) % 256;
+            }
+            break;
+          default:
+            throw new Error("Invalid filter algorithm: " + data[pos - 1]);
+        }
+        if (!isFull) {
+          var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;
+          var partPos = row * scanlineLength;
+          for (i = 0; i < w; i += 1) {
+            for (var j = 0; j < pixelBytes; j += 1)
+              fullPixels[fullPos++] = pixels[partPos++];
+            fullPos += (dx - 1) * pixelBytes;
+          }
+        }
+        row++;
+      }
+    }
+    if (_this.interlaceMethod == 1) {
+      /*
+          1 6 4 6 2 6 4 6
+          7 7 7 7 7 7 7 7
+          5 6 5 6 5 6 5 6
+          7 7 7 7 7 7 7 7
+          3 6 4 6 3 6 4 6
+          7 7 7 7 7 7 7 7
+          5 6 5 6 5 6 5 6
+          7 7 7 7 7 7 7 7
+        */
+      pass(0, 0, 8, 8); // 1
+      /* NOTE these seem to follow the pattern:
+       * pass(x, 0, 2*x, 2*x);
+       * pass(0, x,   x, 2*x);
+       * with x being 4, 2, 1.
+       */
+      pass(4, 0, 8, 8); // 2
+      pass(0, 4, 4, 8); // 3
+
+      pass(2, 0, 4, 4); // 4
+      pass(0, 2, 2, 4); // 5
+
+      pass(1, 0, 2, 2); // 6
+      pass(0, 1, 1, 2); // 7
+    } else {
+      pass(0, 0, 1, 1);
+    }
+    return fullPixels;
+  };
+
+  PNG.prototype.decodePalette = function() {
+    var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;
+    palette = this.palette;
+    transparency = this.transparency.indexed || [];
+    ret = new Uint8Array((transparency.length || 0) + palette.length);
+    pos = 0;
+    length = palette.length;
+    c = 0;
+    for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {
+      ret[pos++] = palette[i];
+      ret[pos++] = palette[i + 1];
+      ret[pos++] = palette[i + 2];
+      ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;
+    }
+    return ret;
+  };
+
+  PNG.prototype.copyToImageData = function(imageData, pixels) {
+    var alpha, colors, data, i, input, j, k, length, palette, v, _ref;
+    colors = this.colors;
+    palette = null;
+    alpha = this.hasAlphaChannel;
+    if (this.palette.length) {
+      palette =
+        (_ref = this._decodedPalette) != null
+          ? _ref
+          : (this._decodedPalette = this.decodePalette());
+      colors = 4;
+      alpha = true;
+    }
+    data = imageData.data || imageData;
+    length = data.length;
+    input = palette || pixels;
+    i = j = 0;
+    if (colors === 1) {
+      while (i < length) {
+        k = palette ? pixels[i / 4] * 4 : j;
+        v = input[k++];
+        data[i++] = v;
+        data[i++] = v;
+        data[i++] = v;
+        data[i++] = alpha ? input[k++] : 255;
+        j = k;
+      }
+    } else {
+      while (i < length) {
+        k = palette ? pixels[i / 4] * 4 : j;
+        data[i++] = input[k++];
+        data[i++] = input[k++];
+        data[i++] = input[k++];
+        data[i++] = alpha ? input[k++] : 255;
+        j = k;
+      }
+    }
+  };
+
+  PNG.prototype.decode = function() {
+    var ret;
+    ret = new Uint8Array(this.width * this.height * 4);
+    this.copyToImageData(ret, this.decodePixels());
+    return ret;
+  };
+
+  var hasBrowserCanvas = function() {
+    if (Object.prototype.toString.call(globalObject) === "[object Window]") {
+      try {
+        scratchCanvas = globalObject.document.createElement("canvas");
+        scratchCtx = scratchCanvas.getContext("2d");
+      } catch (e) {
+        return false;
+      }
+      return true;
+    }
+    return false;
+  };
+
+  hasBrowserCanvas();
+
+  makeImage = function(imageData) {
+    if (hasBrowserCanvas() === true) {
+      var img;
+      scratchCtx.width = imageData.width;
+      scratchCtx.height = imageData.height;
+      scratchCtx.clearRect(0, 0, imageData.width, imageData.height);
+      scratchCtx.putImageData(imageData, 0, 0);
+      img = new Image();
+      img.src = scratchCanvas.toDataURL();
+      return img;
+    }
+    throw new Error("This method requires a Browser with Canvas-capability.");
+  };
+
+  PNG.prototype.decodeFrames = function(ctx) {
+    var frame, i, imageData, pixels, _i, _len, _ref, _results;
+    if (!this.animation) {
+      return;
+    }
+    _ref = this.animation.frames;
+    _results = [];
+    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
+      frame = _ref[i];
+      imageData = ctx.createImageData(frame.width, frame.height);
+      pixels = this.decodePixels(new Uint8Array(frame.data));
+      this.copyToImageData(imageData, pixels);
+      frame.imageData = imageData;
+      _results.push((frame.image = makeImage(imageData)));
+    }
+    return _results;
+  };
+
+  PNG.prototype.renderFrame = function(ctx, number) {
+    var frame, frames, prev;
+    frames = this.animation.frames;
+    frame = frames[number];
+    prev = frames[number - 1];
+    if (number === 0) {
+      ctx.clearRect(0, 0, this.width, this.height);
+    }
+    if (
+      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND
+    ) {
+      ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);
+    } else if (
+      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS
+    ) {
+      ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);
+    }
+    if (frame.blendOp === APNG_BLEND_OP_SOURCE) {
+      ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);
+    }
+    return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);
+  };
+
+  PNG.prototype.animate = function(ctx) {
+    var doFrame,
+      frameNumber,
+      frames,
+      numFrames,
+      numPlays,
+      _ref,
+      _this = this;
+    frameNumber = 0;
+    (_ref = this.animation),
+      (numFrames = _ref.numFrames),
+      (frames = _ref.frames),
+      (numPlays = _ref.numPlays);
+    return (doFrame = function() {
+      var f, frame;
+      f = frameNumber++ % numFrames;
+      frame = frames[f];
+      _this.renderFrame(ctx, f);
+      if (numFrames > 1 && frameNumber / numFrames < numPlays) {
+        return (_this.animation._timeout = setTimeout(doFrame, frame.delay));
+      }
+    })();
+  };
+
+  PNG.prototype.stopAnimation = function() {
+    var _ref;
+    return clearTimeout(
+      (_ref = this.animation) != null ? _ref._timeout : void 0
+    );
+  };
+
+  PNG.prototype.render = function(canvas) {
+    var ctx, data;
+    if (canvas._png) {
+      canvas._png.stopAnimation();
+    }
+    canvas._png = this;
+    canvas.width = this.width;
+    canvas.height = this.height;
+    ctx = canvas.getContext("2d");
+    if (this.animation) {
+      this.decodeFrames(ctx);
+      return this.animate(ctx);
+    } else {
+      data = ctx.createImageData(this.width, this.height);
+      this.copyToImageData(data, this.decodePixels());
+      return ctx.putImageData(data, 0, 0);
+    }
+  };
+
+  return PNG;
+})();
+
+/**
+ * @license
+ *
+ * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+
+/**
+ * jsPDF PNG PlugIn
+ * @name png_support
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  /*
+   * @see http://www.w3.org/TR/PNG-Chunks.html
+   *
+   Color    Allowed      Interpretation
+   Type     Bit Depths
+
+     0       1,2,4,8,16  Each pixel is a grayscale sample.
+
+     2       8,16        Each pixel is an R,G,B triple.
+
+     3       1,2,4,8     Each pixel is a palette index;
+                         a PLTE chunk must appear.
+
+     4       8,16        Each pixel is a grayscale sample,
+                         followed by an alpha sample.
+
+     6       8,16        Each pixel is an R,G,B triple,
+                         followed by an alpha sample.
+  */
+
+  /*
+   * PNG filter method types
+   *
+   * @see http://www.w3.org/TR/PNG-Filters.html
+   * @see http://www.libpng.org/pub/png/book/chapter09.html
+   *
+   * This is what the value 'Predictor' in decode params relates to
+   *
+   * 15 is "optimal prediction", which means the prediction algorithm can change from line to line.
+   * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.
+   *
+     0       None
+     1       Sub
+     2       Up
+     3       Average
+     4       Paeth
+   */
+
+  var canCompress = function(value) {
+    return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();
+  };
+
+  var hasCompressionJS = function() {
+    return typeof fflate.zlibSync === "function";
+  };
+  var compressBytes = function(bytes, lineLength, colorsPerPixel, compression) {
+    var level = 4;
+    var filter_method = filterUp;
+
+    switch (compression) {
+      case jsPDFAPI.image_compression.FAST:
+        level = 1;
+        filter_method = filterSub;
+        break;
+
+      case jsPDFAPI.image_compression.MEDIUM:
+        level = 6;
+        filter_method = filterAverage;
+        break;
+
+      case jsPDFAPI.image_compression.SLOW:
+        level = 9;
+        filter_method = filterPaeth;
+        break;
+    }
+
+    bytes = applyPngFilterMethod(
+      bytes,
+      lineLength,
+      colorsPerPixel,
+      filter_method
+    );
+    var dat = fflate.zlibSync(bytes, { level: level });
+    return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);
+  };
+
+  var applyPngFilterMethod = function(
+    bytes,
+    lineLength,
+    colorsPerPixel,
+    filter_method
+  ) {
+    var lines = bytes.length / lineLength,
+      result = new Uint8Array(bytes.length + lines),
+      filter_methods = getFilterMethods(),
+      line,
+      prevLine,
+      offset;
+
+    for (var i = 0; i < lines; i += 1) {
+      offset = i * lineLength;
+      line = bytes.subarray(offset, offset + lineLength);
+
+      if (filter_method) {
+        result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);
+      } else {
+        var len = filter_methods.length,
+          results = [];
+
+        for (var j; j < len; j += 1) {
+          results[j] = filter_methods[j](line, colorsPerPixel, prevLine);
+        }
+
+        var ind = getIndexOfSmallestSum(results.concat());
+
+        result.set(results[ind], offset + i);
+      }
+
+      prevLine = line;
+    }
+
+    return result;
+  };
+
+  var filterNone = function(line) {
+    /*var result = new Uint8Array(line.length + 1);
+    result[0] = 0;
+    result.set(line, 1);*/
+
+    var result = Array.apply([], line);
+    result.unshift(0);
+
+    return result;
+  };
+
+  var filterSub = function(line, colorsPerPixel) {
+    var result = [],
+      len = line.length,
+      left;
+
+    result[0] = 1;
+
+    for (var i = 0; i < len; i += 1) {
+      left = line[i - colorsPerPixel] || 0;
+      result[i + 1] = (line[i] - left + 0x0100) & 0xff;
+    }
+
+    return result;
+  };
+
+  var filterUp = function(line, colorsPerPixel, prevLine) {
+    var result = [],
+      len = line.length,
+      up;
+
+    result[0] = 2;
+
+    for (var i = 0; i < len; i += 1) {
+      up = (prevLine && prevLine[i]) || 0;
+      result[i + 1] = (line[i] - up + 0x0100) & 0xff;
+    }
+
+    return result;
+  };
+
+  var filterAverage = function(line, colorsPerPixel, prevLine) {
+    var result = [],
+      len = line.length,
+      left,
+      up;
+
+    result[0] = 3;
+
+    for (var i = 0; i < len; i += 1) {
+      left = line[i - colorsPerPixel] || 0;
+      up = (prevLine && prevLine[i]) || 0;
+      result[i + 1] = (line[i] + 0x0100 - ((left + up) >>> 1)) & 0xff;
+    }
+
+    return result;
+  };
+
+  var filterPaeth = function(line, colorsPerPixel, prevLine) {
+    var result = [],
+      len = line.length,
+      left,
+      up,
+      upLeft,
+      paeth;
+
+    result[0] = 4;
+
+    for (var i = 0; i < len; i += 1) {
+      left = line[i - colorsPerPixel] || 0;
+      up = (prevLine && prevLine[i]) || 0;
+      upLeft = (prevLine && prevLine[i - colorsPerPixel]) || 0;
+      paeth = paethPredictor(left, up, upLeft);
+      result[i + 1] = (line[i] - paeth + 0x0100) & 0xff;
+    }
+
+    return result;
+  };
+
+  var paethPredictor = function(left, up, upLeft) {
+    if (left === up && up === upLeft) {
+      return left;
+    }
+    var pLeft = Math.abs(up - upLeft),
+      pUp = Math.abs(left - upLeft),
+      pUpLeft = Math.abs(left + up - upLeft - upLeft);
+    return pLeft <= pUp && pLeft <= pUpLeft
+      ? left
+      : pUp <= pUpLeft
+      ? up
+      : upLeft;
+  };
+
+  var getFilterMethods = function() {
+    return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];
+  };
+
+  var getIndexOfSmallestSum = function(arrays) {
+    var sum = arrays.map(function(value) {
+      return value.reduce(function(pv, cv) {
+        return pv + Math.abs(cv);
+      }, 0);
+    });
+    return sum.indexOf(Math.min.apply(null, sum));
+  };
+
+  var getPredictorFromCompression = function(compression) {
+    var predictor;
+    switch (compression) {
+      case jsPDFAPI.image_compression.FAST:
+        predictor = 11;
+        break;
+
+      case jsPDFAPI.image_compression.MEDIUM:
+        predictor = 13;
+        break;
+
+      case jsPDFAPI.image_compression.SLOW:
+        predictor = 14;
+        break;
+
+      default:
+        predictor = 12;
+        break;
+    }
+    return predictor;
+  };
+
+  /**
+   * @name processPNG
+   * @function
+   * @ignore
+   */
+  jsPDFAPI.processPNG = function(imageData, index, alias, compression) {
+
+    var colorSpace,
+      filter = this.decode.FLATE_DECODE,
+      bitsPerComponent,
+      image,
+      decodeParameters = "",
+      trns,
+      colors,
+      pal,
+      smask,
+      pixels,
+      len,
+      alphaData,
+      imgData,
+      hasColors,
+      pixel,
+      i,
+      n;
+
+    if (this.__addimage__.isArrayBuffer(imageData))
+      imageData = new Uint8Array(imageData);
+
+    if (this.__addimage__.isArrayBufferView(imageData)) {
+      image = new PNG(imageData);
+      imageData = image.imgData;
+      bitsPerComponent = image.bits;
+      colorSpace = image.colorSpace;
+      colors = image.colors;
+
+      /*
+       * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.
+       *
+       * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.
+       *
+       * Extract alpha to create two separate images, using the alpha as a sMask
+       */
+      if ([4, 6].indexOf(image.colorType) !== -1) {
+        /*
+         * processes 8 bit RGBA and grayscale + alpha images
+         */
+        if (image.bits === 8) {
+          pixels =
+            image.pixelBitlength == 32
+              ? new Uint32Array(image.decodePixels().buffer)
+              : image.pixelBitlength == 16
+              ? new Uint16Array(image.decodePixels().buffer)
+              : new Uint8Array(image.decodePixels().buffer);
+          len = pixels.length;
+          imgData = new Uint8Array(len * image.colors);
+          alphaData = new Uint8Array(len);
+          var pDiff = image.pixelBitlength - image.bits;
+          i = 0;
+          n = 0;
+          var pbl;
+
+          for (; i < len; i++) {
+            pixel = pixels[i];
+            pbl = 0;
+
+            while (pbl < pDiff) {
+              imgData[n++] = (pixel >>> pbl) & 0xff;
+              pbl = pbl + image.bits;
+            }
+
+            alphaData[i] = (pixel >>> pbl) & 0xff;
+          }
+        }
+
+        /*
+         * processes 16 bit RGBA and grayscale + alpha images
+         */
+        if (image.bits === 16) {
+          pixels = new Uint32Array(image.decodePixels().buffer);
+          len = pixels.length;
+          imgData = new Uint8Array(
+            len * (32 / image.pixelBitlength) * image.colors
+          );
+          alphaData = new Uint8Array(len * (32 / image.pixelBitlength));
+          hasColors = image.colors > 1;
+          i = 0;
+          n = 0;
+          var a = 0;
+
+          while (i < len) {
+            pixel = pixels[i++];
+
+            imgData[n++] = (pixel >>> 0) & 0xff;
+
+            if (hasColors) {
+              imgData[n++] = (pixel >>> 16) & 0xff;
+
+              pixel = pixels[i++];
+              imgData[n++] = (pixel >>> 0) & 0xff;
+            }
+
+            alphaData[a++] = (pixel >>> 16) & 0xff;
+          }
+          bitsPerComponent = 8;
+        }
+
+        if (canCompress(compression)) {
+          imageData = compressBytes(
+            imgData,
+            image.width * image.colors,
+            image.colors,
+            compression
+          );
+          smask = compressBytes(alphaData, image.width, 1, compression);
+        } else {
+          imageData = imgData;
+          smask = alphaData;
+          filter = undefined;
+        }
+      }
+
+      /*
+       * Indexed png. Each pixel is a palette index.
+       */
+      if (image.colorType === 3) {
+        colorSpace = this.color_spaces.INDEXED;
+        pal = image.palette;
+
+        if (image.transparency.indexed) {
+          var trans = image.transparency.indexed;
+          var total = 0;
+          i = 0;
+          len = trans.length;
+
+          for (; i < len; ++i) {
+            total += trans[i];
+          }
+
+          total = total / 255;
+
+          /*
+           * a single color is specified as 100% transparent (0),
+           * so we set trns to use a /Mask with that index
+           */
+          if (total === len - 1 && trans.indexOf(0) !== -1) {
+            trns = [trans.indexOf(0)];
+
+            /*
+             * there's more than one colour within the palette that specifies
+             * a transparency value less than 255, so we unroll the pixels to create an image sMask
+             */
+          } else if (total !== len) {
+            pixels = image.decodePixels();
+            alphaData = new Uint8Array(pixels.length);
+            i = 0;
+            len = pixels.length;
+
+            for (; i < len; i++) {
+              alphaData[i] = trans[pixels[i]];
+            }
+
+            smask = compressBytes(alphaData, image.width, 1);
+          }
+        }
+      }
+
+      var predictor = getPredictorFromCompression(compression);
+
+      if (filter === this.decode.FLATE_DECODE) {
+        decodeParameters = "/Predictor " + predictor + " ";
+      }
+      decodeParameters +=
+        "/Colors " +
+        colors +
+        " /BitsPerComponent " +
+        bitsPerComponent +
+        " /Columns " +
+        image.width;
+
+      if (
+        this.__addimage__.isArrayBuffer(imageData) ||
+        this.__addimage__.isArrayBufferView(imageData)
+      ) {
+        imageData = this.__addimage__.arrayBufferToBinaryString(imageData);
+      }
+
+      if (
+        (smask && this.__addimage__.isArrayBuffer(smask)) ||
+        this.__addimage__.isArrayBufferView(smask)
+      ) {
+        smask = this.__addimage__.arrayBufferToBinaryString(smask);
+      }
+
+      return {
+        alias: alias,
+        data: imageData,
+        index: index,
+        filter: filter,
+        decodeParameters: decodeParameters,
+        transparency: trns,
+        palette: pal,
+        sMask: smask,
+        predictor: predictor,
+        width: image.width,
+        height: image.height,
+        bitsPerComponent: bitsPerComponent,
+        colorSpace: colorSpace
+      };
+    }
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * (c) Dean McNamee <dean@gmail.com>, 2013.
+ *
+ * https://github.com/deanm/omggif
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
+ * including animation and compression.  It does not rely on any specific
+ * underlying system, so should run in the browser, Node, or Plask.
+ */
+
+function GifReader(buf) {
+  var p = 0;
+
+  // - Header (GIF87a or GIF89a).
+  if (
+    buf[p++] !== 0x47 ||
+    buf[p++] !== 0x49 ||
+    buf[p++] !== 0x46 ||
+    buf[p++] !== 0x38 ||
+    ((buf[p++] + 1) & 0xfd) !== 0x38 ||
+    buf[p++] !== 0x61
+  ) {
+    throw new Error("Invalid GIF 87a/89a header.");
+  }
+
+  // - Logical Screen Descriptor.
+  var width = buf[p++] | (buf[p++] << 8);
+  var height = buf[p++] | (buf[p++] << 8);
+  var pf0 = buf[p++]; // <Packed Fields>.
+  var global_palette_flag = pf0 >> 7;
+  var num_global_colors_pow2 = pf0 & 0x7;
+  var num_global_colors = 1 << (num_global_colors_pow2 + 1);
+  var background = buf[p++];
+  buf[p++]; // Pixel aspect ratio (unused?).
+
+  var global_palette_offset = null;
+  var global_palette_size = null;
+
+  if (global_palette_flag) {
+    global_palette_offset = p;
+    global_palette_size = num_global_colors;
+    p += num_global_colors * 3; // Seek past palette.
+  }
+
+  var no_eof = true;
+
+  var frames = [];
+
+  var delay = 0;
+  var transparent_index = null;
+  var disposal = 0; // 0 - No disposal specified.
+  var loop_count = null;
+
+  this.width = width;
+  this.height = height;
+
+  while (no_eof && p < buf.length) {
+    switch (buf[p++]) {
+      case 0x21: // Graphics Control Extension Block
+        switch (buf[p++]) {
+          case 0xff: // Application specific block
+            // Try if it's a Netscape block (with animation loop counter).
+            if (
+              buf[p] !== 0x0b || // 21 FF already read, check block size.
+              // NETSCAPE2.0
+              (buf[p + 1] == 0x4e &&
+                buf[p + 2] == 0x45 &&
+                buf[p + 3] == 0x54 &&
+                buf[p + 4] == 0x53 &&
+                buf[p + 5] == 0x43 &&
+                buf[p + 6] == 0x41 &&
+                buf[p + 7] == 0x50 &&
+                buf[p + 8] == 0x45 &&
+                buf[p + 9] == 0x32 &&
+                buf[p + 10] == 0x2e &&
+                buf[p + 11] == 0x30 &&
+                // Sub-block
+                buf[p + 12] == 0x03 &&
+                buf[p + 13] == 0x01 &&
+                buf[p + 16] == 0)
+            ) {
+              p += 14;
+              loop_count = buf[p++] | (buf[p++] << 8);
+              p++; // Skip terminator.
+            } else {
+              // We don't know what it is, just try to get past it.
+              p += 12;
+              while (true) {
+                // Seek through subblocks.
+                var block_size = buf[p++];
+                // Bad block size (ex: undefined from an out of bounds read).
+                if (!(block_size >= 0)) throw Error("Invalid block size");
+                if (block_size === 0) break; // 0 size is terminator
+                p += block_size;
+              }
+            }
+            break;
+
+          case 0xf9: // Graphics Control Extension
+            if (buf[p++] !== 0x4 || buf[p + 4] !== 0)
+              throw new Error("Invalid graphics extension block.");
+            var pf1 = buf[p++];
+            delay = buf[p++] | (buf[p++] << 8);
+            transparent_index = buf[p++];
+            if ((pf1 & 1) === 0) transparent_index = null;
+            disposal = (pf1 >> 2) & 0x7;
+            p++; // Skip terminator.
+            break;
+
+          case 0xfe: // Comment Extension.
+            while (true) {
+              // Seek through subblocks.
+              var block_size = buf[p++];
+              // Bad block size (ex: undefined from an out of bounds read).
+              if (!(block_size >= 0)) throw Error("Invalid block size");
+              if (block_size === 0) break; // 0 size is terminator
+              // console.log(buf.slice(p, p+block_size).toString('ascii'));
+              p += block_size;
+            }
+            break;
+
+          default:
+            throw new Error(
+              "Unknown graphic control label: 0x" + buf[p - 1].toString(16)
+            );
+        }
+        break;
+
+      case 0x2c: // Image Descriptor.
+        var x = buf[p++] | (buf[p++] << 8);
+        var y = buf[p++] | (buf[p++] << 8);
+        var w = buf[p++] | (buf[p++] << 8);
+        var h = buf[p++] | (buf[p++] << 8);
+        var pf2 = buf[p++];
+        var local_palette_flag = pf2 >> 7;
+        var interlace_flag = (pf2 >> 6) & 1;
+        var num_local_colors_pow2 = pf2 & 0x7;
+        var num_local_colors = 1 << (num_local_colors_pow2 + 1);
+        var palette_offset = global_palette_offset;
+        var palette_size = global_palette_size;
+        var has_local_palette = false;
+        if (local_palette_flag) {
+          var has_local_palette = true;
+          palette_offset = p; // Override with local palette.
+          palette_size = num_local_colors;
+          p += num_local_colors * 3; // Seek past palette.
+        }
+
+        var data_offset = p;
+
+        p++; // codesize
+        while (true) {
+          var block_size = buf[p++];
+          // Bad block size (ex: undefined from an out of bounds read).
+          if (!(block_size >= 0)) throw Error("Invalid block size");
+          if (block_size === 0) break; // 0 size is terminator
+          p += block_size;
+        }
+
+        frames.push({
+          x: x,
+          y: y,
+          width: w,
+          height: h,
+          has_local_palette: has_local_palette,
+          palette_offset: palette_offset,
+          palette_size: palette_size,
+          data_offset: data_offset,
+          data_length: p - data_offset,
+          transparent_index: transparent_index,
+          interlaced: !!interlace_flag,
+          delay: delay,
+          disposal: disposal
+        });
+        break;
+
+      case 0x3b: // Trailer Marker (end of file).
+        no_eof = false;
+        break;
+
+      default:
+        throw new Error("Unknown gif block: 0x" + buf[p - 1].toString(16));
+    }
+  }
+
+  this.numFrames = function() {
+    return frames.length;
+  };
+
+  this.loopCount = function() {
+    return loop_count;
+  };
+
+  this.frameInfo = function(frame_num) {
+    if (frame_num < 0 || frame_num >= frames.length)
+      throw new Error("Frame index out of range.");
+    return frames[frame_num];
+  };
+
+  this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {
+    var frame = this.frameInfo(frame_num);
+    var num_pixels = frame.width * frame.height;
+    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.
+    GifReaderLZWOutputIndexStream(
+      buf,
+      frame.data_offset,
+      index_stream,
+      num_pixels
+    );
+    var palette_offset = frame.palette_offset;
+
+    // NOTE(deanm): It seems to be much faster to compare index to 256 than
+    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in
+    // the profile, not sure if it's related to using a Uint8Array.
+    var trans = frame.transparent_index;
+    if (trans === null) trans = 256;
+
+    // We are possibly just blitting to a portion of the entire frame.
+    // That is a subrect within the framerect, so the additional pixels
+    // must be skipped over after we finished a scanline.
+    var framewidth = frame.width;
+    var framestride = width - framewidth;
+    var xleft = framewidth; // Number of subrect pixels left in scanline.
+
+    // Output indices of the top left and bottom right corners of the subrect.
+    var opbeg = (frame.y * width + frame.x) * 4;
+    var opend = ((frame.y + frame.height) * width + frame.x) * 4;
+    var op = opbeg;
+
+    var scanstride = framestride * 4;
+
+    // Use scanstride to skip past the rows when interlacing.  This is skipping
+    // 7 rows for the first two passes, then 3 then 1.
+    if (frame.interlaced === true) {
+      scanstride += width * 4 * 7; // Pass 1.
+    }
+
+    var interlaceskip = 8; // Tracking the row interval in the current pass.
+
+    for (var i = 0, il = index_stream.length; i < il; ++i) {
+      var index = index_stream[i];
+
+      if (xleft === 0) {
+        // Beginning of new scan line
+        op += scanstride;
+        xleft = framewidth;
+        if (op >= opend) {
+          // Catch the wrap to switch passes when interlacing.
+          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);
+          // interlaceskip / 2 * 4 is interlaceskip << 1.
+          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);
+          interlaceskip >>= 1;
+        }
+      }
+
+      if (index === trans) {
+        op += 4;
+      } else {
+        var r = buf[palette_offset + index * 3];
+        var g = buf[palette_offset + index * 3 + 1];
+        var b = buf[palette_offset + index * 3 + 2];
+        pixels[op++] = b;
+        pixels[op++] = g;
+        pixels[op++] = r;
+        pixels[op++] = 255;
+      }
+      --xleft;
+    }
+  };
+
+  // I will go to copy and paste hell one day...
+  this.decodeAndBlitFrameRGBA = function(frame_num, pixels) {
+    var frame = this.frameInfo(frame_num);
+    var num_pixels = frame.width * frame.height;
+    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.
+    GifReaderLZWOutputIndexStream(
+      buf,
+      frame.data_offset,
+      index_stream,
+      num_pixels
+    );
+    var palette_offset = frame.palette_offset;
+
+    // NOTE(deanm): It seems to be much faster to compare index to 256 than
+    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in
+    // the profile, not sure if it's related to using a Uint8Array.
+    var trans = frame.transparent_index;
+    if (trans === null) trans = 256;
+
+    // We are possibly just blitting to a portion of the entire frame.
+    // That is a subrect within the framerect, so the additional pixels
+    // must be skipped over after we finished a scanline.
+    var framewidth = frame.width;
+    var framestride = width - framewidth;
+    var xleft = framewidth; // Number of subrect pixels left in scanline.
+
+    // Output indices of the top left and bottom right corners of the subrect.
+    var opbeg = (frame.y * width + frame.x) * 4;
+    var opend = ((frame.y + frame.height) * width + frame.x) * 4;
+    var op = opbeg;
+
+    var scanstride = framestride * 4;
+
+    // Use scanstride to skip past the rows when interlacing.  This is skipping
+    // 7 rows for the first two passes, then 3 then 1.
+    if (frame.interlaced === true) {
+      scanstride += width * 4 * 7; // Pass 1.
+    }
+
+    var interlaceskip = 8; // Tracking the row interval in the current pass.
+
+    for (var i = 0, il = index_stream.length; i < il; ++i) {
+      var index = index_stream[i];
+
+      if (xleft === 0) {
+        // Beginning of new scan line
+        op += scanstride;
+        xleft = framewidth;
+        if (op >= opend) {
+          // Catch the wrap to switch passes when interlacing.
+          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);
+          // interlaceskip / 2 * 4 is interlaceskip << 1.
+          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);
+          interlaceskip >>= 1;
+        }
+      }
+
+      if (index === trans) {
+        op += 4;
+      } else {
+        var r = buf[palette_offset + index * 3];
+        var g = buf[palette_offset + index * 3 + 1];
+        var b = buf[palette_offset + index * 3 + 2];
+        pixels[op++] = r;
+        pixels[op++] = g;
+        pixels[op++] = b;
+        pixels[op++] = 255;
+      }
+      --xleft;
+    }
+  };
+}
+
+function GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {
+  var min_code_size = code_stream[p++];
+
+  var clear_code = 1 << min_code_size;
+  var eoi_code = clear_code + 1;
+  var next_code = eoi_code + 1;
+
+  var cur_code_size = min_code_size + 1; // Number of bits per code.
+  // NOTE: This shares the same name as the encoder, but has a different
+  // meaning here.  Here this masks each code coming from the code stream.
+  var code_mask = (1 << cur_code_size) - 1;
+  var cur_shift = 0;
+  var cur = 0;
+
+  var op = 0; // Output pointer.
+
+  var subblock_size = code_stream[p++];
+
+  // TODO(deanm): Would using a TypedArray be any faster?  At least it would
+  // solve the fast mode / backing store uncertainty.
+  // var code_table = Array(4096);
+  var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.
+
+  var prev_code = null; // Track code-1.
+
+  while (true) {
+    // Read up to two bytes, making sure we always 12-bits for max sized code.
+    while (cur_shift < 16) {
+      if (subblock_size === 0) break; // No more data to be read.
+
+      cur |= code_stream[p++] << cur_shift;
+      cur_shift += 8;
+
+      if (subblock_size === 1) {
+        // Never let it get to 0 to hold logic above.
+        subblock_size = code_stream[p++]; // Next subblock.
+      } else {
+        --subblock_size;
+      }
+    }
+
+    // TODO(deanm): We should never really get here, we should have received
+    // and EOI.
+    if (cur_shift < cur_code_size) break;
+
+    var code = cur & code_mask;
+    cur >>= cur_code_size;
+    cur_shift -= cur_code_size;
+
+    // TODO(deanm): Maybe should check that the first code was a clear code,
+    // at least this is what you're supposed to do.  But actually our encoder
+    // now doesn't emit a clear code first anyway.
+    if (code === clear_code) {
+      // We don't actually have to clear the table.  This could be a good idea
+      // for greater error checking, but we don't really do any anyway.  We
+      // will just track it with next_code and overwrite old entries.
+
+      next_code = eoi_code + 1;
+      cur_code_size = min_code_size + 1;
+      code_mask = (1 << cur_code_size) - 1;
+
+      // Don't update prev_code ?
+      prev_code = null;
+      continue;
+    } else if (code === eoi_code) {
+      break;
+    }
+
+    // We have a similar situation as the decoder, where we want to store
+    // variable length entries (code table entries), but we want to do in a
+    // faster manner than an array of arrays.  The code below stores sort of a
+    // linked list within the code table, and then "chases" through it to
+    // construct the dictionary entries.  When a new entry is created, just the
+    // last byte is stored, and the rest (prefix) of the entry is only
+    // referenced by its table entry.  Then the code chases through the
+    // prefixes until it reaches a single byte code.  We have to chase twice,
+    // first to compute the length, and then to actually copy the data to the
+    // output (backwards, since we know the length).  The alternative would be
+    // storing something in an intermediate stack, but that doesn't make any
+    // more sense.  I implemented an approach where it also stored the length
+    // in the code table, although it's a bit tricky because you run out of
+    // bits (12 + 12 + 8), but I didn't measure much improvements (the table
+    // entries are generally not the long).  Even when I created benchmarks for
+    // very long table entries the complexity did not seem worth it.
+    // The code table stores the prefix entry in 12 bits and then the suffix
+    // byte in 8 bits, so each entry is 20 bits.
+
+    var chase_code = code < next_code ? code : prev_code;
+
+    // Chase what we will output, either {CODE} or {CODE-1}.
+    var chase_length = 0;
+    var chase = chase_code;
+    while (chase > clear_code) {
+      chase = code_table[chase] >> 8;
+      ++chase_length;
+    }
+
+    var k = chase;
+
+    var op_end = op + chase_length + (chase_code !== code ? 1 : 0);
+    if (op_end > output_length) {
+      console.log("Warning, gif stream longer than expected.");
+      return;
+    }
+
+    // Already have the first byte from the chase, might as well write it fast.
+    output[op++] = k;
+
+    op += chase_length;
+    var b = op; // Track pointer, writing backwards.
+
+    if (chase_code !== code)
+      // The case of emitting {CODE-1} + k.
+      output[op++] = k;
+
+    chase = chase_code;
+    while (chase_length--) {
+      chase = code_table[chase];
+      output[--b] = chase & 0xff; // Write backwards.
+      chase >>= 8; // Pull down to the prefix code.
+    }
+
+    if (prev_code !== null && next_code < 4096) {
+      code_table[next_code++] = (prev_code << 8) | k;
+      // TODO(deanm): Figure out this clearing vs code growth logic better.  I
+      // have an feeling that it should just happen somewhere else, for now it
+      // is awkward between when we grow past the max and then hit a clear code.
+      // For now just check if we hit the max 12-bits (then a clear code should
+      // follow, also of course encoded in 12-bits).
+      if (next_code >= code_mask + 1 && cur_code_size < 12) {
+        ++cur_code_size;
+        code_mask = (code_mask << 1) | 1;
+      }
+    }
+
+    prev_code = code;
+  }
+
+  if (op !== output_length) {
+    console.log("Warning, gif stream shorter than expected.");
+  }
+
+  return output;
+}
+
+/**
+ * @license
+  Copyright (c) 2008, Adobe Systems Incorporated
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without 
+  modification, are permitted provided that the following conditions are
+  met:
+
+  * Redistributions of source code must retain the above copyright notice, 
+    this list of conditions and the following disclaimer.
+  
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the 
+    documentation and/or other materials provided with the distribution.
+  
+  * Neither the name of Adobe Systems Incorporated nor the names of its 
+    contributors may be used to endorse or promote products derived from 
+    this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+/*
+JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009
+
+Basic GUI blocking jpeg encoder
+*/
+
+function JPEGEncoder(quality) {
+  var ffloor = Math.floor;
+  var YTable = new Array(64);
+  var UVTable = new Array(64);
+  var fdtbl_Y = new Array(64);
+  var fdtbl_UV = new Array(64);
+  var YDC_HT;
+  var UVDC_HT;
+  var YAC_HT;
+  var UVAC_HT;
+
+  var bitcode = new Array(65535);
+  var category = new Array(65535);
+  var outputfDCTQuant = new Array(64);
+  var DU = new Array(64);
+  var byteout = [];
+  var bytenew = 0;
+  var bytepos = 7;
+
+  var YDU = new Array(64);
+  var UDU = new Array(64);
+  var VDU = new Array(64);
+  var clt = new Array(256);
+  var RGB_YUV_TABLE = new Array(2048);
+  var currentQuality;
+
+  var ZigZag = [
+    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
+  ];
+
+  var std_dc_luminance_nrcodes = [
+    0,
+    0,
+    1,
+    5,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0,
+    0
+  ];
+  var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
+  var std_ac_luminance_nrcodes = [
+    0,
+    0,
+    2,
+    1,
+    3,
+    3,
+    2,
+    4,
+    3,
+    5,
+    5,
+    4,
+    4,
+    0,
+    0,
+    1,
+    0x7d
+  ];
+  var std_ac_luminance_values = [
+    0x01,
+    0x02,
+    0x03,
+    0x00,
+    0x04,
+    0x11,
+    0x05,
+    0x12,
+    0x21,
+    0x31,
+    0x41,
+    0x06,
+    0x13,
+    0x51,
+    0x61,
+    0x07,
+    0x22,
+    0x71,
+    0x14,
+    0x32,
+    0x81,
+    0x91,
+    0xa1,
+    0x08,
+    0x23,
+    0x42,
+    0xb1,
+    0xc1,
+    0x15,
+    0x52,
+    0xd1,
+    0xf0,
+    0x24,
+    0x33,
+    0x62,
+    0x72,
+    0x82,
+    0x09,
+    0x0a,
+    0x16,
+    0x17,
+    0x18,
+    0x19,
+    0x1a,
+    0x25,
+    0x26,
+    0x27,
+    0x28,
+    0x29,
+    0x2a,
+    0x34,
+    0x35,
+    0x36,
+    0x37,
+    0x38,
+    0x39,
+    0x3a,
+    0x43,
+    0x44,
+    0x45,
+    0x46,
+    0x47,
+    0x48,
+    0x49,
+    0x4a,
+    0x53,
+    0x54,
+    0x55,
+    0x56,
+    0x57,
+    0x58,
+    0x59,
+    0x5a,
+    0x63,
+    0x64,
+    0x65,
+    0x66,
+    0x67,
+    0x68,
+    0x69,
+    0x6a,
+    0x73,
+    0x74,
+    0x75,
+    0x76,
+    0x77,
+    0x78,
+    0x79,
+    0x7a,
+    0x83,
+    0x84,
+    0x85,
+    0x86,
+    0x87,
+    0x88,
+    0x89,
+    0x8a,
+    0x92,
+    0x93,
+    0x94,
+    0x95,
+    0x96,
+    0x97,
+    0x98,
+    0x99,
+    0x9a,
+    0xa2,
+    0xa3,
+    0xa4,
+    0xa5,
+    0xa6,
+    0xa7,
+    0xa8,
+    0xa9,
+    0xaa,
+    0xb2,
+    0xb3,
+    0xb4,
+    0xb5,
+    0xb6,
+    0xb7,
+    0xb8,
+    0xb9,
+    0xba,
+    0xc2,
+    0xc3,
+    0xc4,
+    0xc5,
+    0xc6,
+    0xc7,
+    0xc8,
+    0xc9,
+    0xca,
+    0xd2,
+    0xd3,
+    0xd4,
+    0xd5,
+    0xd6,
+    0xd7,
+    0xd8,
+    0xd9,
+    0xda,
+    0xe1,
+    0xe2,
+    0xe3,
+    0xe4,
+    0xe5,
+    0xe6,
+    0xe7,
+    0xe8,
+    0xe9,
+    0xea,
+    0xf1,
+    0xf2,
+    0xf3,
+    0xf4,
+    0xf5,
+    0xf6,
+    0xf7,
+    0xf8,
+    0xf9,
+    0xfa
+  ];
+
+  var std_dc_chrominance_nrcodes = [
+    0,
+    0,
+    3,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    1,
+    0,
+    0,
+    0,
+    0,
+    0
+  ];
+  var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
+  var std_ac_chrominance_nrcodes = [
+    0,
+    0,
+    2,
+    1,
+    2,
+    4,
+    4,
+    3,
+    4,
+    7,
+    5,
+    4,
+    4,
+    0,
+    1,
+    2,
+    0x77
+  ];
+  var std_ac_chrominance_values = [
+    0x00,
+    0x01,
+    0x02,
+    0x03,
+    0x11,
+    0x04,
+    0x05,
+    0x21,
+    0x31,
+    0x06,
+    0x12,
+    0x41,
+    0x51,
+    0x07,
+    0x61,
+    0x71,
+    0x13,
+    0x22,
+    0x32,
+    0x81,
+    0x08,
+    0x14,
+    0x42,
+    0x91,
+    0xa1,
+    0xb1,
+    0xc1,
+    0x09,
+    0x23,
+    0x33,
+    0x52,
+    0xf0,
+    0x15,
+    0x62,
+    0x72,
+    0xd1,
+    0x0a,
+    0x16,
+    0x24,
+    0x34,
+    0xe1,
+    0x25,
+    0xf1,
+    0x17,
+    0x18,
+    0x19,
+    0x1a,
+    0x26,
+    0x27,
+    0x28,
+    0x29,
+    0x2a,
+    0x35,
+    0x36,
+    0x37,
+    0x38,
+    0x39,
+    0x3a,
+    0x43,
+    0x44,
+    0x45,
+    0x46,
+    0x47,
+    0x48,
+    0x49,
+    0x4a,
+    0x53,
+    0x54,
+    0x55,
+    0x56,
+    0x57,
+    0x58,
+    0x59,
+    0x5a,
+    0x63,
+    0x64,
+    0x65,
+    0x66,
+    0x67,
+    0x68,
+    0x69,
+    0x6a,
+    0x73,
+    0x74,
+    0x75,
+    0x76,
+    0x77,
+    0x78,
+    0x79,
+    0x7a,
+    0x82,
+    0x83,
+    0x84,
+    0x85,
+    0x86,
+    0x87,
+    0x88,
+    0x89,
+    0x8a,
+    0x92,
+    0x93,
+    0x94,
+    0x95,
+    0x96,
+    0x97,
+    0x98,
+    0x99,
+    0x9a,
+    0xa2,
+    0xa3,
+    0xa4,
+    0xa5,
+    0xa6,
+    0xa7,
+    0xa8,
+    0xa9,
+    0xaa,
+    0xb2,
+    0xb3,
+    0xb4,
+    0xb5,
+    0xb6,
+    0xb7,
+    0xb8,
+    0xb9,
+    0xba,
+    0xc2,
+    0xc3,
+    0xc4,
+    0xc5,
+    0xc6,
+    0xc7,
+    0xc8,
+    0xc9,
+    0xca,
+    0xd2,
+    0xd3,
+    0xd4,
+    0xd5,
+    0xd6,
+    0xd7,
+    0xd8,
+    0xd9,
+    0xda,
+    0xe2,
+    0xe3,
+    0xe4,
+    0xe5,
+    0xe6,
+    0xe7,
+    0xe8,
+    0xe9,
+    0xea,
+    0xf2,
+    0xf3,
+    0xf4,
+    0xf5,
+    0xf6,
+    0xf7,
+    0xf8,
+    0xf9,
+    0xfa
+  ];
+
+  function initQuantTables(sf) {
+    var YQT = [
+      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
+    ];
+
+    for (var i = 0; i < 64; i++) {
+      var t = ffloor((YQT[i] * sf + 50) / 100);
+      t = Math.min(Math.max(t, 1), 255);
+      YTable[ZigZag[i]] = t;
+    }
+    var UVQT = [
+      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
+    ];
+    for (var j = 0; j < 64; j++) {
+      var u = ffloor((UVQT[j] * sf + 50) / 100);
+      u = Math.min(Math.max(u, 1), 255);
+      UVTable[ZigZag[j]] = u;
+    }
+    var aasf = [
+      1.0,
+      1.387039845,
+      1.306562965,
+      1.175875602,
+      1.0,
+      0.785694958,
+      0.5411961,
+      0.275899379
+    ];
+    var k = 0;
+    for (var row = 0; row < 8; row++) {
+      for (var col = 0; col < 8; col++) {
+        fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);
+        fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);
+        k++;
+      }
+    }
+  }
+
+  function computeHuffmanTbl(nrcodes, std_table) {
+    var codevalue = 0;
+    var pos_in_table = 0;
+    var HT = new Array();
+    for (var k = 1; k <= 16; k++) {
+      for (var j = 1; j <= nrcodes[k]; j++) {
+        HT[std_table[pos_in_table]] = [];
+        HT[std_table[pos_in_table]][0] = codevalue;
+        HT[std_table[pos_in_table]][1] = k;
+        pos_in_table++;
+        codevalue++;
+      }
+      codevalue *= 2;
+    }
+    return HT;
+  }
+
+  function initHuffmanTbl() {
+    YDC_HT = computeHuffmanTbl(
+      std_dc_luminance_nrcodes,
+      std_dc_luminance_values
+    );
+    UVDC_HT = computeHuffmanTbl(
+      std_dc_chrominance_nrcodes,
+      std_dc_chrominance_values
+    );
+    YAC_HT = computeHuffmanTbl(
+      std_ac_luminance_nrcodes,
+      std_ac_luminance_values
+    );
+    UVAC_HT = computeHuffmanTbl(
+      std_ac_chrominance_nrcodes,
+      std_ac_chrominance_values
+    );
+  }
+
+  function initCategoryNumber() {
+    var nrlower = 1;
+    var nrupper = 2;
+    for (var cat = 1; cat <= 15; cat++) {
+      //Positive numbers
+      for (var nr = nrlower; nr < nrupper; nr++) {
+        category[32767 + nr] = cat;
+        bitcode[32767 + nr] = [];
+        bitcode[32767 + nr][1] = cat;
+        bitcode[32767 + nr][0] = nr;
+      }
+      //Negative numbers
+      for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {
+        category[32767 + nrneg] = cat;
+        bitcode[32767 + nrneg] = [];
+        bitcode[32767 + nrneg][1] = cat;
+        bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;
+      }
+      nrlower <<= 1;
+      nrupper <<= 1;
+    }
+  }
+
+  function initRGBYUVTable() {
+    for (var i = 0; i < 256; i++) {
+      RGB_YUV_TABLE[i] = 19595 * i;
+      RGB_YUV_TABLE[(i + 256) >> 0] = 38470 * i;
+      RGB_YUV_TABLE[(i + 512) >> 0] = 7471 * i + 0x8000;
+      RGB_YUV_TABLE[(i + 768) >> 0] = -11059 * i;
+      RGB_YUV_TABLE[(i + 1024) >> 0] = -21709 * i;
+      RGB_YUV_TABLE[(i + 1280) >> 0] = 32768 * i + 0x807fff;
+      RGB_YUV_TABLE[(i + 1536) >> 0] = -27439 * i;
+      RGB_YUV_TABLE[(i + 1792) >> 0] = -5329 * i;
+    }
+  }
+
+  // IO functions
+  function writeBits(bs) {
+    var value = bs[0];
+    var posval = bs[1] - 1;
+    while (posval >= 0) {
+      if (value & (1 << posval)) {
+        bytenew |= 1 << bytepos;
+      }
+      posval--;
+      bytepos--;
+      if (bytepos < 0) {
+        if (bytenew == 0xff) {
+          writeByte(0xff);
+          writeByte(0);
+        } else {
+          writeByte(bytenew);
+        }
+        bytepos = 7;
+        bytenew = 0;
+      }
+    }
+  }
+
+  function writeByte(value) {
+    //byteout.push(clt[value]); // write char directly instead of converting later
+    byteout.push(value);
+  }
+
+  function writeWord(value) {
+    writeByte((value >> 8) & 0xff);
+    writeByte(value & 0xff);
+  }
+
+  // DCT & quantization core
+  function fDCTQuant(data, fdtbl) {
+    var d0, d1, d2, d3, d4, d5, d6, d7;
+    /* Pass 1: process rows. */
+    var dataOff = 0;
+    var i;
+    var I8 = 8;
+    var I64 = 64;
+    for (i = 0; i < I8; ++i) {
+      d0 = data[dataOff];
+      d1 = data[dataOff + 1];
+      d2 = data[dataOff + 2];
+      d3 = data[dataOff + 3];
+      d4 = data[dataOff + 4];
+      d5 = data[dataOff + 5];
+      d6 = data[dataOff + 6];
+      d7 = data[dataOff + 7];
+
+      var tmp0 = d0 + d7;
+      var tmp7 = d0 - d7;
+      var tmp1 = d1 + d6;
+      var tmp6 = d1 - d6;
+      var tmp2 = d2 + d5;
+      var tmp5 = d2 - d5;
+      var tmp3 = d3 + d4;
+      var tmp4 = d3 - d4;
+
+      /* Even part */
+      var tmp10 = tmp0 + tmp3; /* phase 2 */
+      var tmp13 = tmp0 - tmp3;
+      var tmp11 = tmp1 + tmp2;
+      var tmp12 = tmp1 - tmp2;
+
+      data[dataOff] = tmp10 + tmp11; /* phase 3 */
+      data[dataOff + 4] = tmp10 - tmp11;
+
+      var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */
+      data[dataOff + 2] = tmp13 + z1; /* phase 5 */
+      data[dataOff + 6] = tmp13 - z1;
+
+      /* Odd part */
+      tmp10 = tmp4 + tmp5; /* phase 2 */
+      tmp11 = tmp5 + tmp6;
+      tmp12 = tmp6 + tmp7;
+
+      /* The rotator is modified from fig 4-8 to avoid extra negations. */
+      var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */
+      var z2 = 0.5411961 * tmp10 + z5; /* c2-c6 */
+      var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */
+      var z3 = tmp11 * 0.707106781; /* c4 */
+
+      var z11 = tmp7 + z3; /* phase 5 */
+      var z13 = tmp7 - z3;
+
+      data[dataOff + 5] = z13 + z2; /* phase 6 */
+      data[dataOff + 3] = z13 - z2;
+      data[dataOff + 1] = z11 + z4;
+      data[dataOff + 7] = z11 - z4;
+
+      dataOff += 8; /* advance pointer to next row */
+    }
+
+    /* Pass 2: process columns. */
+    dataOff = 0;
+    for (i = 0; i < I8; ++i) {
+      d0 = data[dataOff];
+      d1 = data[dataOff + 8];
+      d2 = data[dataOff + 16];
+      d3 = data[dataOff + 24];
+      d4 = data[dataOff + 32];
+      d5 = data[dataOff + 40];
+      d6 = data[dataOff + 48];
+      d7 = data[dataOff + 56];
+
+      var tmp0p2 = d0 + d7;
+      var tmp7p2 = d0 - d7;
+      var tmp1p2 = d1 + d6;
+      var tmp6p2 = d1 - d6;
+      var tmp2p2 = d2 + d5;
+      var tmp5p2 = d2 - d5;
+      var tmp3p2 = d3 + d4;
+      var tmp4p2 = d3 - d4;
+
+      /* Even part */
+      var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */
+      var tmp13p2 = tmp0p2 - tmp3p2;
+      var tmp11p2 = tmp1p2 + tmp2p2;
+      var tmp12p2 = tmp1p2 - tmp2p2;
+
+      data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */
+      data[dataOff + 32] = tmp10p2 - tmp11p2;
+
+      var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */
+      data[dataOff + 16] = tmp13p2 + z1p2; /* phase 5 */
+      data[dataOff + 48] = tmp13p2 - z1p2;
+
+      /* Odd part */
+      tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */
+      tmp11p2 = tmp5p2 + tmp6p2;
+      tmp12p2 = tmp6p2 + tmp7p2;
+
+      /* The rotator is modified from fig 4-8 to avoid extra negations. */
+      var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */
+      var z2p2 = 0.5411961 * tmp10p2 + z5p2; /* c2-c6 */
+      var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */
+      var z3p2 = tmp11p2 * 0.707106781; /* c4 */
+
+      var z11p2 = tmp7p2 + z3p2; /* phase 5 */
+      var z13p2 = tmp7p2 - z3p2;
+
+      data[dataOff + 40] = z13p2 + z2p2; /* phase 6 */
+      data[dataOff + 24] = z13p2 - z2p2;
+      data[dataOff + 8] = z11p2 + z4p2;
+      data[dataOff + 56] = z11p2 - z4p2;
+
+      dataOff++; /* advance pointer to next column */
+    }
+
+    // Quantize/descale the coefficients
+    var fDCTQuant;
+    for (i = 0; i < I64; ++i) {
+      // Apply the quantization and scaling factor & Round to nearest integer
+      fDCTQuant = data[i] * fdtbl[i];
+      outputfDCTQuant[i] =
+        fDCTQuant > 0.0 ? (fDCTQuant + 0.5) | 0 : (fDCTQuant - 0.5) | 0;
+      //outputfDCTQuant[i] = fround(fDCTQuant);
+    }
+    return outputfDCTQuant;
+  }
+
+  function writeAPP0() {
+    writeWord(0xffe0); // marker
+    writeWord(16); // length
+    writeByte(0x4a); // J
+    writeByte(0x46); // F
+    writeByte(0x49); // I
+    writeByte(0x46); // F
+    writeByte(0); // = "JFIF",'\0'
+    writeByte(1); // versionhi
+    writeByte(1); // versionlo
+    writeByte(0); // xyunits
+    writeWord(1); // xdensity
+    writeWord(1); // ydensity
+    writeByte(0); // thumbnwidth
+    writeByte(0); // thumbnheight
+  }
+
+  function writeSOF0(width, height) {
+    writeWord(0xffc0); // marker
+    writeWord(17); // length, truecolor YUV JPG
+    writeByte(8); // precision
+    writeWord(height);
+    writeWord(width);
+    writeByte(3); // nrofcomponents
+    writeByte(1); // IdY
+    writeByte(0x11); // HVY
+    writeByte(0); // QTY
+    writeByte(2); // IdU
+    writeByte(0x11); // HVU
+    writeByte(1); // QTU
+    writeByte(3); // IdV
+    writeByte(0x11); // HVV
+    writeByte(1); // QTV
+  }
+
+  function writeDQT() {
+    writeWord(0xffdb); // marker
+    writeWord(132); // length
+    writeByte(0);
+    for (var i = 0; i < 64; i++) {
+      writeByte(YTable[i]);
+    }
+    writeByte(1);
+    for (var j = 0; j < 64; j++) {
+      writeByte(UVTable[j]);
+    }
+  }
+
+  function writeDHT() {
+    writeWord(0xffc4); // marker
+    writeWord(0x01a2); // length
+
+    writeByte(0); // HTYDCinfo
+    for (var i = 0; i < 16; i++) {
+      writeByte(std_dc_luminance_nrcodes[i + 1]);
+    }
+    for (var j = 0; j <= 11; j++) {
+      writeByte(std_dc_luminance_values[j]);
+    }
+
+    writeByte(0x10); // HTYACinfo
+    for (var k = 0; k < 16; k++) {
+      writeByte(std_ac_luminance_nrcodes[k + 1]);
+    }
+    for (var l = 0; l <= 161; l++) {
+      writeByte(std_ac_luminance_values[l]);
+    }
+
+    writeByte(1); // HTUDCinfo
+    for (var m = 0; m < 16; m++) {
+      writeByte(std_dc_chrominance_nrcodes[m + 1]);
+    }
+    for (var n = 0; n <= 11; n++) {
+      writeByte(std_dc_chrominance_values[n]);
+    }
+
+    writeByte(0x11); // HTUACinfo
+    for (var o = 0; o < 16; o++) {
+      writeByte(std_ac_chrominance_nrcodes[o + 1]);
+    }
+    for (var p = 0; p <= 161; p++) {
+      writeByte(std_ac_chrominance_values[p]);
+    }
+  }
+
+  function writeSOS() {
+    writeWord(0xffda); // marker
+    writeWord(12); // length
+    writeByte(3); // nrofcomponents
+    writeByte(1); // IdY
+    writeByte(0); // HTY
+    writeByte(2); // IdU
+    writeByte(0x11); // HTU
+    writeByte(3); // IdV
+    writeByte(0x11); // HTV
+    writeByte(0); // Ss
+    writeByte(0x3f); // Se
+    writeByte(0); // Bf
+  }
+
+  function processDU(CDU, fdtbl, DC, HTDC, HTAC) {
+    var EOB = HTAC[0x00];
+    var M16zeroes = HTAC[0xf0];
+    var pos;
+    var I16 = 16;
+    var I63 = 63;
+    var I64 = 64;
+    var DU_DCT = fDCTQuant(CDU, fdtbl);
+    //ZigZag reorder
+    for (var j = 0; j < I64; ++j) {
+      DU[ZigZag[j]] = DU_DCT[j];
+    }
+    var Diff = DU[0] - DC;
+    DC = DU[0];
+    //Encode DC
+    if (Diff == 0) {
+      writeBits(HTDC[0]); // Diff might be 0
+    } else {
+      pos = 32767 + Diff;
+      writeBits(HTDC[category[pos]]);
+      writeBits(bitcode[pos]);
+    }
+    //Encode ACs
+    var end0pos = 63; // was const... which is crazy
+    while (end0pos > 0 && DU[end0pos] == 0) {
+      end0pos--;
+    }
+    //end0pos = first element in reverse order !=0
+    if (end0pos == 0) {
+      writeBits(EOB);
+      return DC;
+    }
+    var i = 1;
+    var lng;
+    while (i <= end0pos) {
+      var startpos = i;
+      while (DU[i] == 0 && i <= end0pos) {
+        ++i;
+      }
+      var nrzeroes = i - startpos;
+      if (nrzeroes >= I16) {
+        lng = nrzeroes >> 4;
+        for (var nrmarker = 1; nrmarker <= lng; ++nrmarker)
+          writeBits(M16zeroes);
+        nrzeroes = nrzeroes & 0xf;
+      }
+      pos = 32767 + DU[i];
+      writeBits(HTAC[(nrzeroes << 4) + category[pos]]);
+      writeBits(bitcode[pos]);
+      i++;
+    }
+    if (end0pos != I63) {
+      writeBits(EOB);
+    }
+    return DC;
+  }
+
+  function initCharLookupTable() {
+    var sfcc = String.fromCharCode;
+    for (var i = 0; i < 256; i++) {
+      ///// ACHTUNG // 255
+      clt[i] = sfcc(i);
+    }
+  }
+
+  this.encode = function(
+    image,
+    quality // image data object
+  ) {
+    if (quality) setQuality(quality);
+
+    // Initialize bit writer
+    byteout = new Array();
+    bytenew = 0;
+    bytepos = 7;
+
+    // Add JPEG headers
+    writeWord(0xffd8); // SOI
+    writeAPP0();
+    writeDQT();
+    writeSOF0(image.width, image.height);
+    writeDHT();
+    writeSOS();
+
+    // Encode 8x8 macroblocks
+    var DCY = 0;
+    var DCU = 0;
+    var DCV = 0;
+
+    bytenew = 0;
+    bytepos = 7;
+
+    this.encode.displayName = "_encode_";
+
+    var imageData = image.data;
+    var width = image.width;
+    var height = image.height;
+
+    var quadWidth = width * 4;
+
+    var x,
+      y = 0;
+    var r, g, b;
+    var start, p, col, row, pos;
+    while (y < height) {
+      x = 0;
+      while (x < quadWidth) {
+        start = quadWidth * y + x;
+        col = -1;
+        row = 0;
+
+        for (pos = 0; pos < 64; pos++) {
+          row = pos >> 3; // /8
+          col = (pos & 7) * 4; // %8
+          p = start + row * quadWidth + col;
+
+          if (y + row >= height) {
+            // padding bottom
+            p -= quadWidth * (y + 1 + row - height);
+          }
+
+          if (x + col >= quadWidth) {
+            // padding right
+            p -= x + col - quadWidth + 4;
+          }
+
+          r = imageData[p++];
+          g = imageData[p++];
+          b = imageData[p++];
+
+          /* // calculate YUV values dynamically
+					YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80
+					UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));
+					VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));
+					*/
+
+          // use lookup table (slightly faster)
+          YDU[pos] =
+            ((RGB_YUV_TABLE[r] +
+              RGB_YUV_TABLE[(g + 256) >> 0] +
+              RGB_YUV_TABLE[(b + 512) >> 0]) >>
+              16) -
+            128;
+          UDU[pos] =
+            ((RGB_YUV_TABLE[(r + 768) >> 0] +
+              RGB_YUV_TABLE[(g + 1024) >> 0] +
+              RGB_YUV_TABLE[(b + 1280) >> 0]) >>
+              16) -
+            128;
+          VDU[pos] =
+            ((RGB_YUV_TABLE[(r + 1280) >> 0] +
+              RGB_YUV_TABLE[(g + 1536) >> 0] +
+              RGB_YUV_TABLE[(b + 1792) >> 0]) >>
+              16) -
+            128;
+        }
+
+        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
+        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
+        x += 32;
+      }
+      y += 8;
+    }
+
+    ////////////////////////////////////////////////////////////////
+
+    // Do the bit alignment of the EOI marker
+    if (bytepos >= 0) {
+      var fillbits = [];
+      fillbits[1] = bytepos + 1;
+      fillbits[0] = (1 << (bytepos + 1)) - 1;
+      writeBits(fillbits);
+    }
+
+    writeWord(0xffd9); //EOI
+
+    return new Uint8Array(byteout);
+  };
+
+  function setQuality(quality) {
+    quality = Math.min(Math.max(quality, 1), 100);
+
+    if (currentQuality == quality) return; // don't recalc if unchanged
+
+    var sf =
+      quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);
+
+    initQuantTables(sf);
+    currentQuality = quality;
+    //console.log('Quality set to: '+quality +'%');
+  }
+
+  function init() {
+    quality = quality || 50;
+    // Create tables
+    initCharLookupTable();
+    initHuffmanTbl();
+    initCategoryNumber();
+    initRGBYUVTable();
+
+    setQuality(quality);
+  }
+  init();
+}
+
+/**
+ * @license
+ * Copyright (c) 2017 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * jsPDF Gif Support PlugIn
+ *
+ * @name gif_support
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  jsPDFAPI.processGIF89A = function(imageData, index, alias, compression) {
+    var reader = new GifReader(imageData);
+    var width = reader.width,
+      height = reader.height;
+    var qu = 100;
+    var pixels = [];
+
+    reader.decodeAndBlitFrameRGBA(0, pixels);
+    var rawImageData = {
+      data: pixels,
+      width: width,
+      height: height
+    };
+
+    var encoder = new JPEGEncoder(qu);
+    var data = encoder.encode(rawImageData, qu);
+    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);
+  };
+
+  jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;
+})(jsPDF.API);
+
+/**
+ * @author shaozilee
+ *
+ * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp
+ *
+ */
+
+function BmpDecoder(buffer, is_with_alpha) {
+  this.pos = 0;
+  this.buffer = buffer;
+  this.datav = new DataView(buffer.buffer);
+  this.is_with_alpha = !!is_with_alpha;
+  this.bottom_up = true;
+  this.flag =
+    String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);
+  this.pos += 2;
+  if (["BM", "BA", "CI", "CP", "IC", "PT"].indexOf(this.flag) === -1)
+    throw new Error("Invalid BMP File");
+  this.parseHeader();
+  this.parseBGR();
+}
+
+BmpDecoder.prototype.parseHeader = function() {
+  this.fileSize = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.reserved = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.offset = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.headerSize = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.width = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.height = this.datav.getInt32(this.pos, true);
+  this.pos += 4;
+  this.planes = this.datav.getUint16(this.pos, true);
+  this.pos += 2;
+  this.bitPP = this.datav.getUint16(this.pos, true);
+  this.pos += 2;
+  this.compress = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.rawSize = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.hr = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.vr = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.colors = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+  this.importantColors = this.datav.getUint32(this.pos, true);
+  this.pos += 4;
+
+  if (this.bitPP === 16 && this.is_with_alpha) {
+    this.bitPP = 15;
+  }
+  if (this.bitPP < 15) {
+    var len = this.colors === 0 ? 1 << this.bitPP : this.colors;
+    this.palette = new Array(len);
+    for (var i = 0; i < len; i++) {
+      var blue = this.datav.getUint8(this.pos++, true);
+      var green = this.datav.getUint8(this.pos++, true);
+      var red = this.datav.getUint8(this.pos++, true);
+      var quad = this.datav.getUint8(this.pos++, true);
+      this.palette[i] = {
+        red: red,
+        green: green,
+        blue: blue,
+        quad: quad
+      };
+    }
+  }
+  if (this.height < 0) {
+    this.height *= -1;
+    this.bottom_up = false;
+  }
+};
+
+BmpDecoder.prototype.parseBGR = function() {
+  this.pos = this.offset;
+  try {
+    var bitn = "bit" + this.bitPP;
+    var len = this.width * this.height * 4;
+    this.data = new Uint8Array(len);
+
+    this[bitn]();
+  } catch (e) {
+    console.log("bit decode error:" + e);
+  }
+};
+
+BmpDecoder.prototype.bit1 = function() {
+  var xlen = Math.ceil(this.width / 8);
+  var mode = xlen % 4;
+  var y;
+  for (y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+    for (var x = 0; x < xlen; x++) {
+      var b = this.datav.getUint8(this.pos++, true);
+      var location = line * this.width * 4 + x * 8 * 4;
+      for (var i = 0; i < 8; i++) {
+        if (x * 8 + i < this.width) {
+          var rgb = this.palette[(b >> (7 - i)) & 0x1];
+          this.data[location + i * 4] = rgb.blue;
+          this.data[location + i * 4 + 1] = rgb.green;
+          this.data[location + i * 4 + 2] = rgb.red;
+          this.data[location + i * 4 + 3] = 0xff;
+        } else {
+          break;
+        }
+      }
+    }
+
+    if (mode !== 0) {
+      this.pos += 4 - mode;
+    }
+  }
+};
+
+BmpDecoder.prototype.bit4 = function() {
+  var xlen = Math.ceil(this.width / 2);
+  var mode = xlen % 4;
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+    for (var x = 0; x < xlen; x++) {
+      var b = this.datav.getUint8(this.pos++, true);
+      var location = line * this.width * 4 + x * 2 * 4;
+
+      var before = b >> 4;
+      var after = b & 0x0f;
+
+      var rgb = this.palette[before];
+      this.data[location] = rgb.blue;
+      this.data[location + 1] = rgb.green;
+      this.data[location + 2] = rgb.red;
+      this.data[location + 3] = 0xff;
+
+      if (x * 2 + 1 >= this.width) break;
+
+      rgb = this.palette[after];
+      this.data[location + 4] = rgb.blue;
+      this.data[location + 4 + 1] = rgb.green;
+      this.data[location + 4 + 2] = rgb.red;
+      this.data[location + 4 + 3] = 0xff;
+    }
+
+    if (mode !== 0) {
+      this.pos += 4 - mode;
+    }
+  }
+};
+
+BmpDecoder.prototype.bit8 = function() {
+  var mode = this.width % 4;
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+    for (var x = 0; x < this.width; x++) {
+      var b = this.datav.getUint8(this.pos++, true);
+      var location = line * this.width * 4 + x * 4;
+      if (b < this.palette.length) {
+        var rgb = this.palette[b];
+        this.data[location] = rgb.red;
+        this.data[location + 1] = rgb.green;
+        this.data[location + 2] = rgb.blue;
+        this.data[location + 3] = 0xff;
+      } else {
+        this.data[location] = 0xff;
+        this.data[location + 1] = 0xff;
+        this.data[location + 2] = 0xff;
+        this.data[location + 3] = 0xff;
+      }
+    }
+    if (mode !== 0) {
+      this.pos += 4 - mode;
+    }
+  }
+};
+
+BmpDecoder.prototype.bit15 = function() {
+  var dif_w = this.width % 3;
+  var _11111 = parseInt("11111", 2),
+    _1_5 = _11111;
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+    for (var x = 0; x < this.width; x++) {
+      var B = this.datav.getUint16(this.pos, true);
+      this.pos += 2;
+      var blue = (((B & _1_5) / _1_5) * 255) | 0;
+      var green = ((((B >> 5) & _1_5) / _1_5) * 255) | 0;
+      var red = ((((B >> 10) & _1_5) / _1_5) * 255) | 0;
+      var alpha = B >> 15 ? 0xff : 0x00;
+
+      var location = line * this.width * 4 + x * 4;
+      this.data[location] = red;
+      this.data[location + 1] = green;
+      this.data[location + 2] = blue;
+      this.data[location + 3] = alpha;
+    }
+    //skip extra bytes
+    this.pos += dif_w;
+  }
+};
+
+BmpDecoder.prototype.bit16 = function() {
+  var dif_w = this.width % 3;
+  var _11111 = parseInt("11111", 2),
+    _1_5 = _11111;
+  var _111111 = parseInt("111111", 2),
+    _1_6 = _111111;
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+    for (var x = 0; x < this.width; x++) {
+      var B = this.datav.getUint16(this.pos, true);
+      this.pos += 2;
+      var alpha = 0xff;
+      var blue = (((B & _1_5) / _1_5) * 255) | 0;
+      var green = ((((B >> 5) & _1_6) / _1_6) * 255) | 0;
+      var red = (((B >> 11) / _1_5) * 255) | 0;
+
+      var location = line * this.width * 4 + x * 4;
+      this.data[location] = red;
+      this.data[location + 1] = green;
+      this.data[location + 2] = blue;
+      this.data[location + 3] = alpha;
+    }
+    //skip extra bytes
+    this.pos += dif_w;
+  }
+};
+
+BmpDecoder.prototype.bit24 = function() {
+  //when height > 0
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+    for (var x = 0; x < this.width; x++) {
+      var blue = this.datav.getUint8(this.pos++, true);
+      var green = this.datav.getUint8(this.pos++, true);
+      var red = this.datav.getUint8(this.pos++, true);
+      var location = line * this.width * 4 + x * 4;
+      this.data[location] = red;
+      this.data[location + 1] = green;
+      this.data[location + 2] = blue;
+      this.data[location + 3] = 0xff;
+    }
+    //skip extra bytes
+    this.pos += this.width % 4;
+  }
+};
+
+/**
+ * add 32bit decode func
+ * @author soubok
+ */
+BmpDecoder.prototype.bit32 = function() {
+  //when height > 0
+  for (var y = this.height - 1; y >= 0; y--) {
+    var line = this.bottom_up ? y : this.height - 1 - y;
+    for (var x = 0; x < this.width; x++) {
+      var blue = this.datav.getUint8(this.pos++, true);
+      var green = this.datav.getUint8(this.pos++, true);
+      var red = this.datav.getUint8(this.pos++, true);
+      var alpha = this.datav.getUint8(this.pos++, true);
+      var location = line * this.width * 4 + x * 4;
+      this.data[location] = red;
+      this.data[location + 1] = green;
+      this.data[location + 2] = blue;
+      this.data[location + 3] = alpha;
+    }
+    //skip extra bytes
+    //this.pos += (this.width % 4);
+  }
+};
+
+BmpDecoder.prototype.getData = function() {
+  return this.data;
+};
+
+/**
+ * @license
+ * Copyright (c) 2018 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * jsPDF bmp Support PlugIn
+ * @name bmp_support
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  jsPDFAPI.processBMP = function(imageData, index, alias, compression) {
+    var reader = new BmpDecoder(imageData, false);
+    var width = reader.width,
+      height = reader.height;
+    var qu = 100;
+    var pixels = reader.getData();
+
+    var rawImageData = {
+      data: pixels,
+      width: width,
+      height: height
+    };
+
+    var encoder = new JPEGEncoder(qu);
+    var data = encoder.encode(rawImageData, qu);
+    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);
+  };
+})(jsPDF.API);
+
+function WebPDecoder(imageData) {
+
+  function x(F) {
+    if (!F) throw Error("assert :P");
+  }
+  function fa(F, L, J) {
+    for (var H = 0; 4 > H; H++) if (F[L + H] != J.charCodeAt(H)) return !0;
+    return !1;
+  }
+  function I(F, L, J, H, Z) {
+    for (var O = 0; O < Z; O++) F[L + O] = J[H + O];
+  }
+  function M(F, L, J, H) {
+    for (var Z = 0; Z < H; Z++) F[L + Z] = J;
+  }
+  function V(F) {
+    return new Int32Array(F);
+  }
+  function wa(F, L) {
+    for (var J = [], H = 0; H < F; H++) J.push(new L());
+    return J;
+  }
+  function wb() {
+    function F(J, H, Z) {
+      for (var O = Z[H], L = 0; L < O; L++) {
+        J.push(Z.length > H + 1 ? [] : 0);
+        if (Z.length < H + 1) break;
+        F(J[L], H + 1, Z);
+      }
+    }
+    var L = [];
+    F(L, 0, [3, 11]);
+    return L;
+  }
+  function Ed(F, L) {
+    function J(H, O, F) {
+      for (var Z = F[O], ma = 0; ma < Z; ma++) {
+        H.push(F.length > O + 1 ? [] : new L());
+        if (F.length < O + 1) break;
+        J(H[ma], O + 1, F);
+      }
+    }
+    var H = [];
+    J(H, 0, F);
+    return H;
+  }
+  var _WebPDecoder = function() {
+    var self = this;
+    function L(a, b) {
+      for (var c = (1 << (b - 1)) >>> 0; a & c; ) c >>>= 1;
+      return c ? (a & (c - 1)) + c : a;
+    }
+    function J(a, b, c, d, e) {
+      x(!(d % c));
+      do (d -= c), (a[b + d] = e);
+      while (0 < d);
+    }
+    function H(a, b, c, d, e, f) {
+      var g = b,
+        h = 1 << c,
+        k,
+        l,
+        m = V(16),
+        n = V(16);
+      x(0 != e);
+      x(null != d);
+      x(null != a);
+      x(0 < c);
+      for (l = 0; l < e; ++l) {
+        if (15 < d[l]) return 0;
+        ++m[d[l]];
+      }
+      if (m[0] == e) return 0;
+      n[1] = 0;
+      for (k = 1; 15 > k; ++k) {
+        if (m[k] > 1 << k) return 0;
+        n[k + 1] = n[k] + m[k];
+      }
+      for (l = 0; l < e; ++l) (k = d[l]), 0 < d[l] && (f[n[k]++] = l);
+      if (1 == n[15])
+        return (d = new O()), (d.g = 0), (d.value = f[0]), J(a, g, 1, h, d), h;
+      var r = -1,
+        q = h - 1,
+        t = 0,
+        v = 1,
+        p = 1,
+        u,
+        w = 1 << c;
+      l = 0;
+      k = 1;
+      for (e = 2; k <= c; ++k, e <<= 1) {
+        p <<= 1;
+        v += p;
+        p -= m[k];
+        if (0 > p) return 0;
+        for (; 0 < m[k]; --m[k])
+          (d = new O()),
+            (d.g = k),
+            (d.value = f[l++]),
+            J(a, g + t, e, w, d),
+            (t = L(t, k));
+      }
+      k = c + 1;
+      for (e = 2; 15 >= k; ++k, e <<= 1) {
+        p <<= 1;
+        v += p;
+        p -= m[k];
+        if (0 > p) return 0;
+        for (; 0 < m[k]; --m[k]) {
+          d = new O();
+          if ((t & q) != r) {
+            g += w;
+            r = k;
+            for (u = 1 << (r - c); 15 > r; ) {
+              u -= m[r];
+              if (0 >= u) break;
+              ++r;
+              u <<= 1;
+            }
+            u = r - c;
+            w = 1 << u;
+            h += w;
+            r = t & q;
+            a[b + r].g = u + c;
+            a[b + r].value = g - b - r;
+          }
+          d.g = k - c;
+          d.value = f[l++];
+          J(a, g + (t >> c), e, w, d);
+          t = L(t, k);
+        }
+      }
+      return v != 2 * n[15] - 1 ? 0 : h;
+    }
+    function Z(a, b, c, d, e) {
+      x(2328 >= e);
+      if (512 >= e) var f = V(512);
+      else if (((f = V(e)), null == f)) return 0;
+      return H(a, b, c, d, e, f);
+    }
+    function O() {
+      this.value = this.g = 0;
+    }
+    function Fd() {
+      this.value = this.g = 0;
+    }
+    function Ub() {
+      this.G = wa(5, O);
+      this.H = V(5);
+      this.jc = this.Qb = this.qb = this.nd = 0;
+      this.pd = wa(xb, Fd);
+    }
+    function ma(a, b, c, d) {
+      x(null != a);
+      x(null != b);
+      x(2147483648 > d);
+      a.Ca = 254;
+      a.I = 0;
+      a.b = -8;
+      a.Ka = 0;
+      a.oa = b;
+      a.pa = c;
+      a.Jd = b;
+      a.Yc = c + d;
+      a.Zc = 4 <= d ? c + d - 4 + 1 : c;
+      Qa(a);
+    }
+    function na(a, b) {
+      for (var c = 0; 0 < b--; ) c |= K(a, 128) << b;
+      return c;
+    }
+    function ca(a, b) {
+      var c = na(a, b);
+      return G(a) ? -c : c;
+    }
+    function cb(a, b, c, d) {
+      var e,
+        f = 0;
+      x(null != a);
+      x(null != b);
+      x(4294967288 > d);
+      a.Sb = d;
+      a.Ra = 0;
+      a.u = 0;
+      a.h = 0;
+      4 < d && (d = 4);
+      for (e = 0; e < d; ++e) f += b[c + e] << (8 * e);
+      a.Ra = f;
+      a.bb = d;
+      a.oa = b;
+      a.pa = c;
+    }
+    function Vb(a) {
+      for (; 8 <= a.u && a.bb < a.Sb; )
+        (a.Ra >>>= 8),
+          (a.Ra += (a.oa[a.pa + a.bb] << (ob - 8)) >>> 0),
+          ++a.bb,
+          (a.u -= 8);
+      db(a) && ((a.h = 1), (a.u = 0));
+    }
+    function D(a, b) {
+      x(0 <= b);
+      if (!a.h && b <= Gd) {
+        var c = pb(a) & Hd[b];
+        a.u += b;
+        Vb(a);
+        return c;
+      }
+      a.h = 1;
+      return (a.u = 0);
+    }
+    function Wb() {
+      this.b = this.Ca = this.I = 0;
+      this.oa = [];
+      this.pa = 0;
+      this.Jd = [];
+      this.Yc = 0;
+      this.Zc = [];
+      this.Ka = 0;
+    }
+    function Ra() {
+      this.Ra = 0;
+      this.oa = [];
+      this.h = this.u = this.bb = this.Sb = this.pa = 0;
+    }
+    function pb(a) {
+      return (a.Ra >>> (a.u & (ob - 1))) >>> 0;
+    }
+    function db(a) {
+      x(a.bb <= a.Sb);
+      return a.h || (a.bb == a.Sb && a.u > ob);
+    }
+    function qb(a, b) {
+      a.u = b;
+      a.h = db(a);
+    }
+    function Sa(a) {
+      a.u >= Xb && (x(a.u >= Xb), Vb(a));
+    }
+    function Qa(a) {
+      x(null != a && null != a.oa);
+      a.pa < a.Zc
+        ? ((a.I = (a.oa[a.pa++] | (a.I << 8)) >>> 0), (a.b += 8))
+        : (x(null != a && null != a.oa),
+          a.pa < a.Yc
+            ? ((a.b += 8), (a.I = a.oa[a.pa++] | (a.I << 8)))
+            : a.Ka
+            ? (a.b = 0)
+            : ((a.I <<= 8), (a.b += 8), (a.Ka = 1)));
+    }
+    function G(a) {
+      return na(a, 1);
+    }
+    function K(a, b) {
+      var c = a.Ca;
+      0 > a.b && Qa(a);
+      var d = a.b,
+        e = (c * b) >>> 8,
+        f = (a.I >>> d > e) + 0;
+      f ? ((c -= e), (a.I -= ((e + 1) << d) >>> 0)) : (c = e + 1);
+      d = c;
+      for (e = 0; 256 <= d; ) (e += 8), (d >>= 8);
+      d = 7 ^ (e + Id[d]);
+      a.b -= d;
+      a.Ca = (c << d) - 1;
+      return f;
+    }
+    function ra(a, b, c) {
+      a[b + 0] = (c >> 24) & 255;
+      a[b + 1] = (c >> 16) & 255;
+      a[b + 2] = (c >> 8) & 255;
+      a[b + 3] = (c >> 0) & 255;
+    }
+    function Ta(a, b) {
+      return (a[b + 0] << 0) | (a[b + 1] << 8);
+    }
+    function Yb(a, b) {
+      return Ta(a, b) | (a[b + 2] << 16);
+    }
+    function Ha(a, b) {
+      return Ta(a, b) | (Ta(a, b + 2) << 16);
+    }
+    function Zb(a, b) {
+      var c = 1 << b;
+      x(null != a);
+      x(0 < b);
+      a.X = V(c);
+      if (null == a.X) return 0;
+      a.Mb = 32 - b;
+      a.Xa = b;
+      return 1;
+    }
+    function $b(a, b) {
+      x(null != a);
+      x(null != b);
+      x(a.Xa == b.Xa);
+      I(b.X, 0, a.X, 0, 1 << b.Xa);
+    }
+    function ac() {
+      this.X = [];
+      this.Xa = this.Mb = 0;
+    }
+    function bc(a, b, c, d) {
+      x(null != c);
+      x(null != d);
+      var e = c[0],
+        f = d[0];
+      0 == e && (e = (a * f + b / 2) / b);
+      0 == f && (f = (b * e + a / 2) / a);
+      if (0 >= e || 0 >= f) return 0;
+      c[0] = e;
+      d[0] = f;
+      return 1;
+    }
+    function xa(a, b) {
+      return (a + (1 << b) - 1) >>> b;
+    }
+    function yb(a, b) {
+      return (
+        (((((a & 4278255360) + (b & 4278255360)) >>> 0) & 4278255360) +
+          ((((a & 16711935) + (b & 16711935)) >>> 0) & 16711935)) >>>
+        0
+      );
+    }
+    function X(a, b) {
+      self[b] = function(b, d, e, f, g, h, k) {
+        var c;
+        for (c = 0; c < g; ++c) {
+          var m = self[a](h[k + c - 1], e, f + c);
+          h[k + c] = yb(b[d + c], m);
+        }
+      };
+    }
+    function Jd() {
+      this.ud = this.hd = this.jd = 0;
+    }
+    function aa(a, b) {
+      return ((((a ^ b) & 4278124286) >>> 1) + (a & b)) >>> 0;
+    }
+    function sa(a) {
+      if (0 <= a && 256 > a) return a;
+      if (0 > a) return 0;
+      if (255 < a) return 255;
+    }
+    function eb(a, b) {
+      return sa(a + ((a - b + 0.5) >> 1));
+    }
+    function Ia(a, b, c) {
+      return Math.abs(b - c) - Math.abs(a - c);
+    }
+    function cc(a, b, c, d, e, f, g) {
+      d = f[g - 1];
+      for (c = 0; c < e; ++c) f[g + c] = d = yb(a[b + c], d);
+    }
+    function Kd(a, b, c, d, e) {
+      var f;
+      for (f = 0; f < c; ++f) {
+        var g = a[b + f],
+          h = (g >> 8) & 255,
+          k = g & 16711935,
+          k = k + ((h << 16) + h),
+          k = k & 16711935;
+        d[e + f] = ((g & 4278255360) + k) >>> 0;
+      }
+    }
+    function dc(a, b) {
+      b.jd = (a >> 0) & 255;
+      b.hd = (a >> 8) & 255;
+      b.ud = (a >> 16) & 255;
+    }
+    function Ld(a, b, c, d, e, f) {
+      var g;
+      for (g = 0; g < d; ++g) {
+        var h = b[c + g],
+          k = h >>> 8,
+          l = h >>> 16,
+          m = h,
+          l = l + ((((a.jd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),
+          l = l & 255,
+          m = m + ((((a.hd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),
+          m = m + ((((a.ud << 24) >> 24) * ((l << 24) >> 24)) >>> 5),
+          m = m & 255;
+        e[f + g] = (h & 4278255360) + (l << 16) + m;
+      }
+    }
+    function ec(a, b, c, d, e) {
+      self[b] = function(a, b, c, k, l, m, n, r, q) {
+        for (k = n; k < r; ++k)
+          for (n = 0; n < q; ++n) l[m++] = e(c[d(a[b++])]);
+      };
+      self[a] = function(a, b, h, k, l, m, n) {
+        var f = 8 >> a.b,
+          g = a.Ea,
+          t = a.K[0],
+          v = a.w;
+        if (8 > f)
+          for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {
+            var p = 0,
+              u;
+            for (u = 0; u < g; ++u)
+              u & a || (p = d(k[l++])), (m[n++] = e(t[p & v])), (p >>= f);
+          }
+        else self["VP8LMapColor" + c](k, l, t, v, m, n, b, h, g);
+      };
+    }
+    function Md(a, b, c, d, e) {
+      for (c = b + c; b < c; ) {
+        var f = a[b++];
+        d[e++] = (f >> 16) & 255;
+        d[e++] = (f >> 8) & 255;
+        d[e++] = (f >> 0) & 255;
+      }
+    }
+    function Nd(a, b, c, d, e) {
+      for (c = b + c; b < c; ) {
+        var f = a[b++];
+        d[e++] = (f >> 16) & 255;
+        d[e++] = (f >> 8) & 255;
+        d[e++] = (f >> 0) & 255;
+        d[e++] = (f >> 24) & 255;
+      }
+    }
+    function Od(a, b, c, d, e) {
+      for (c = b + c; b < c; ) {
+        var f = a[b++],
+          g = ((f >> 16) & 240) | ((f >> 12) & 15),
+          f = ((f >> 0) & 240) | ((f >> 28) & 15);
+        d[e++] = g;
+        d[e++] = f;
+      }
+    }
+    function Pd(a, b, c, d, e) {
+      for (c = b + c; b < c; ) {
+        var f = a[b++],
+          g = ((f >> 16) & 248) | ((f >> 13) & 7),
+          f = ((f >> 5) & 224) | ((f >> 3) & 31);
+        d[e++] = g;
+        d[e++] = f;
+      }
+    }
+    function Qd(a, b, c, d, e) {
+      for (c = b + c; b < c; ) {
+        var f = a[b++];
+        d[e++] = (f >> 0) & 255;
+        d[e++] = (f >> 8) & 255;
+        d[e++] = (f >> 16) & 255;
+      }
+    }
+    function fb(a, b, c, d, e, f) {
+      if (0 == f)
+        for (c = b + c; b < c; )
+          (f = a[b++]),
+            ra(
+              d,
+              ((f[0] >> 24) |
+                ((f[1] >> 8) & 65280) |
+                ((f[2] << 8) & 16711680) |
+                (f[3] << 24)) >>>
+                0
+            ),
+            (e += 32);
+      else I(d, e, a, b, c);
+    }
+    function gb(a, b) {
+      self[b][0] = self[a + "0"];
+      self[b][1] = self[a + "1"];
+      self[b][2] = self[a + "2"];
+      self[b][3] = self[a + "3"];
+      self[b][4] = self[a + "4"];
+      self[b][5] = self[a + "5"];
+      self[b][6] = self[a + "6"];
+      self[b][7] = self[a + "7"];
+      self[b][8] = self[a + "8"];
+      self[b][9] = self[a + "9"];
+      self[b][10] = self[a + "10"];
+      self[b][11] = self[a + "11"];
+      self[b][12] = self[a + "12"];
+      self[b][13] = self[a + "13"];
+      self[b][14] = self[a + "0"];
+      self[b][15] = self[a + "0"];
+    }
+    function hb(a) {
+      return a == zb || a == Ab || a == Ja || a == Bb;
+    }
+    function Rd() {
+      this.eb = [];
+      this.size = this.A = this.fb = 0;
+    }
+    function Sd() {
+      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 Cb() {
+      this.Rd = this.height = this.width = this.S = 0;
+      this.f = {};
+      this.f.RGBA = new Rd();
+      this.f.kb = new Sd();
+      this.sd = null;
+    }
+    function Td() {
+      this.width = [0];
+      this.height = [0];
+      this.Pd = [0];
+      this.Qd = [0];
+      this.format = [0];
+    }
+    function Ud() {
+      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 Vd(a) {
+      alert("todo:WebPSamplerProcessPlane");
+      return a.T;
+    }
+    function Wd(a, b) {
+      var c = a.T,
+        d = b.ba.f.RGBA,
+        e = d.eb,
+        f = d.fb + a.ka * d.A,
+        g = P[b.ba.S],
+        h = a.y,
+        k = a.O,
+        l = a.f,
+        m = a.N,
+        n = a.ea,
+        r = a.W,
+        q = b.cc,
+        t = b.dc,
+        v = b.Mc,
+        p = b.Nc,
+        u = a.ka,
+        w = a.ka + a.T,
+        y = a.U,
+        A = (y + 1) >> 1;
+      0 == u
+        ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y)
+        : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y),
+          ++c);
+      for (; u + 2 < w; u += 2)
+        (q = l),
+          (t = m),
+          (v = n),
+          (p = r),
+          (m += a.Rc),
+          (r += a.Rc),
+          (f += 2 * d.A),
+          (k += 2 * a.fa),
+          g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);
+      k += a.fa;
+      a.j + w < a.o
+        ? (I(b.ec, b.fc, h, k, y),
+          I(b.cc, b.dc, l, m, A),
+          I(b.Mc, b.Nc, n, r, A),
+          c--)
+        : w & 1 ||
+          g(
+            h,
+            k,
+            null,
+            null,
+            l,
+            m,
+            n,
+            r,
+            l,
+            m,
+            n,
+            r,
+            e,
+            f + d.A,
+            null,
+            null,
+            y
+          );
+      return c;
+    }
+    function Xd(a, b, c) {
+      var d = a.F,
+        e = [a.J];
+      if (null != d) {
+        var f = a.U,
+          g = b.ba.S,
+          h = g == ya || g == Ja;
+        b = b.ba.f.RGBA;
+        var k = [0],
+          l = a.ka;
+        k[0] = a.T;
+        a.Kb &&
+          (0 == l ? --k[0] : (--l, (e[0] -= a.width)),
+          a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));
+        var m = b.eb,
+          l = b.fb + l * b.A;
+        a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);
+        x(c == k);
+        a && hb(g) && za(m, l, h, f, k, b.A);
+      }
+      return 0;
+    }
+    function gc(a) {
+      var b = a.ma,
+        c = b.ba.S,
+        d = 11 > c,
+        e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);
+      b.memory = null;
+      b.Ib = null;
+      b.Jb = null;
+      b.Nd = null;
+      if (!hc(b.Oa, a, e ? 11 : 12)) return 0;
+      e && hb(c) && ic();
+      if (a.da) alert("todo:use_scaling");
+      else {
+        if (d) {
+          if (((b.Ib = Vd), a.Kb)) {
+            c = (a.U + 1) >> 1;
+            b.memory = V(a.U + 2 * c);
+            if (null == b.memory) return 0;
+            b.ec = b.memory;
+            b.fc = 0;
+            b.cc = b.ec;
+            b.dc = b.fc + a.U;
+            b.Mc = b.cc;
+            b.Nc = b.dc + c;
+            b.Ib = Wd;
+            ic();
+          }
+        } else alert("todo:EmitYUV");
+        e && ((b.Jb = Xd), d && Aa());
+      }
+      if (d && !jc) {
+        for (a = 0; 256 > a; ++a)
+          (Yd[a] = (89858 * (a - 128) + Ba) >> Wa),
+            (Zd[a] = -22014 * (a - 128) + Ba),
+            ($d[a] = -45773 * (a - 128)),
+            (ae[a] = (113618 * (a - 128) + Ba) >> Wa);
+        for (a = ta; a < Eb; ++a)
+          (b = (76283 * (a - 16) + Ba) >> Wa),
+            (be[a - ta] = ga(b, 255)),
+            (ce[a - ta] = ga((b + 8) >> 4, 15));
+        jc = 1;
+      }
+      return 1;
+    }
+    function kc(a) {
+      var b = a.ma,
+        c = a.U,
+        d = a.T;
+      x(!(a.ka & 1));
+      if (0 >= c || 0 >= d) return 0;
+      c = b.Ib(a, b);
+      null != b.Jb && b.Jb(a, b, c);
+      b.Dc += c;
+      return 1;
+    }
+    function lc(a) {
+      a.ma.memory = null;
+    }
+    function mc(a, b, c, d) {
+      if (47 != D(a, 8)) return 0;
+      b[0] = D(a, 14) + 1;
+      c[0] = D(a, 14) + 1;
+      d[0] = D(a, 1);
+      return 0 != D(a, 3) ? 0 : !a.h;
+    }
+    function ib(a, b) {
+      if (4 > a) return a + 1;
+      var c = (a - 2) >> 1;
+      return ((2 + (a & 1)) << c) + D(b, c) + 1;
+    }
+    function nc(a, b) {
+      if (120 < b) return b - 120;
+      var c = de[b - 1],
+        c = (c >> 4) * a + (8 - (c & 15));
+      return 1 <= c ? c : 1;
+    }
+    function ua(a, b, c) {
+      var d = pb(c);
+      b += d & 255;
+      var e = a[b].g - 8;
+      0 < e &&
+        (qb(c, c.u + 8),
+        (d = pb(c)),
+        (b += a[b].value),
+        (b += d & ((1 << e) - 1)));
+      qb(c, c.u + a[b].g);
+      return a[b].value;
+    }
+    function ub(a, b, c) {
+      c.g += a.g;
+      c.value += (a.value << b) >>> 0;
+      x(8 >= c.g);
+      return a.g;
+    }
+    function ha(a, b, c) {
+      var d = a.xc;
+      b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];
+      x(b < a.Wb);
+      return a.Ya[b];
+    }
+    function oc(a, b, c, d) {
+      var e = a.ab,
+        f = a.c * b,
+        g = a.C;
+      b = g + b;
+      var h = c,
+        k = d;
+      d = a.Ta;
+      for (c = a.Ua; 0 < e--; ) {
+        var l = a.gc[e],
+          m = g,
+          n = b,
+          r = h,
+          q = k,
+          k = d,
+          h = c,
+          t = l.Ea;
+        x(m < n);
+        x(n <= l.nc);
+        switch (l.hc) {
+          case 2:
+            pc(r, q, (n - m) * t, k, h);
+            break;
+          case 0:
+            var v = l,
+              p = m,
+              u = n,
+              w = k,
+              y = h,
+              A = v.Ea;
+            0 == p &&
+              (ee(r, q, null, null, 1, w, y),
+              cc(r, q + 1, 0, 0, A - 1, w, y + 1),
+              (q += A),
+              (y += A),
+              ++p);
+            for (
+              var E = 1 << v.b,
+                B = E - 1,
+                C = xa(A, v.b),
+                N = v.K,
+                v = v.w + (p >> v.b) * C;
+              p < u;
+
+            ) {
+              var z = N,
+                Q = v,
+                S = 1;
+              for (fe(r, q, w, y - A, 1, w, y); S < A; ) {
+                var K = qc[(z[Q++] >> 8) & 15],
+                  D = (S & ~B) + E;
+                D > A && (D = A);
+                K(r, q + +S, w, y + S - A, D - S, w, y + S);
+                S = D;
+              }
+              q += A;
+              y += A;
+              ++p;
+              p & B || (v += C);
+            }
+            n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);
+            break;
+          case 1:
+            t = r;
+            u = q;
+            r = l.Ea;
+            q = 1 << l.b;
+            w = q - 1;
+            y = r & ~w;
+            A = r - y;
+            p = xa(r, l.b);
+            E = l.K;
+            for (l = l.w + (m >> l.b) * p; m < n; ) {
+              B = E;
+              C = l;
+              N = new Jd();
+              v = u + y;
+              for (z = u + r; u < v; )
+                dc(B[C++], N), Fb(N, t, u, q, k, h), (u += q), (h += q);
+              u < z &&
+                (dc(B[C++], N), Fb(N, t, u, A, k, h), (u += A), (h += A));
+              ++m;
+              m & w || (l += p);
+            }
+            break;
+          case 3:
+            if (r == k && q == h && 0 < l.b) {
+              y = (n - m) * xa(l.Ea, l.b);
+              t = h + (n - m) * t - y;
+              u = k;
+              r = t;
+              q = k;
+              w = h;
+              A = y;
+              p = [];
+              for (y = A - 1; 0 <= y; --y) p[y] = q[w + y];
+              for (y = A - 1; 0 <= y; --y) u[r + y] = p[y];
+              rc(l, m, n, k, t, k, h);
+            } else rc(l, m, n, r, q, k, h);
+        }
+        h = d;
+        k = c;
+      }
+      k != c && I(d, c, h, k, f);
+    }
+    function ge(a, b) {
+      var c = a.V,
+        d = a.Ba + a.c * a.C,
+        e = b - a.C;
+      x(b <= a.l.o);
+      x(16 >= e);
+      if (0 < e) {
+        var f = a.l,
+          g = a.Ta,
+          h = a.Ua,
+          k = f.width;
+        oc(a, e, c, d);
+        h = [h];
+        c = a.C;
+        d = b;
+        e = h;
+        x(c < d);
+        x(f.v < f.va);
+        d > f.o && (d = f.o);
+        if (c < f.j) {
+          var l = f.j - c,
+            c = f.j;
+          e[0] += l * k;
+        }
+        c >= d
+          ? (c = 0)
+          : ((e[0] += 4 * f.v),
+            (f.ka = c - f.j),
+            (f.U = f.va - f.v),
+            (f.T = d - c),
+            (c = 1));
+        if (c) {
+          h = h[0];
+          c = a.ca;
+          if (11 > c.S) {
+            for (
+              var m = c.f.RGBA,
+                d = c.S,
+                e = f.U,
+                f = f.T,
+                l = m.eb,
+                n = m.A,
+                r = f,
+                m = m.fb + a.Ma * m.A;
+              0 < r--;
+
+            ) {
+              var q = g,
+                t = h,
+                v = e,
+                p = l,
+                u = m;
+              switch (d) {
+                case Ca:
+                  sc(q, t, v, p, u);
+                  break;
+                case Ua:
+                  Gb(q, t, v, p, u);
+                  break;
+                case zb:
+                  Gb(q, t, v, p, u);
+                  za(p, u, 0, v, 1, 0);
+                  break;
+                case tc:
+                  uc(q, t, v, p, u);
+                  break;
+                case Va:
+                  fb(q, t, v, p, u, 1);
+                  break;
+                case Ab:
+                  fb(q, t, v, p, u, 1);
+                  za(p, u, 0, v, 1, 0);
+                  break;
+                case ya:
+                  fb(q, t, v, p, u, 0);
+                  break;
+                case Ja:
+                  fb(q, t, v, p, u, 0);
+                  za(p, u, 1, v, 1, 0);
+                  break;
+                case Db:
+                  Hb(q, t, v, p, u);
+                  break;
+                case Bb:
+                  Hb(q, t, v, p, u);
+                  vc(p, u, v, 1, 0);
+                  break;
+                case wc:
+                  xc(q, t, v, p, u);
+                  break;
+                default:
+                  x(0);
+              }
+              h += k;
+              m += n;
+            }
+            a.Ma += f;
+          } else alert("todo:EmitRescaledRowsYUVA");
+          x(a.Ma <= c.height);
+        }
+      }
+      a.C = b;
+      x(a.C <= a.i);
+    }
+    function yc(a) {
+      var b;
+      if (0 < a.ua) return 0;
+      for (b = 0; b < a.Wb; ++b) {
+        var c = a.Ya[b].G,
+          d = a.Ya[b].H;
+        if (
+          0 < c[1][d[1] + 0].g ||
+          0 < c[2][d[2] + 0].g ||
+          0 < c[3][d[3] + 0].g
+        )
+          return 0;
+      }
+      return 1;
+    }
+    function zc(a, b, c, d, e, f) {
+      if (0 != a.Z) {
+        var g = a.qd,
+          h = a.rd;
+        for (x(null != ia[a.Z]); b < c; ++b)
+          ia[a.Z](g, h, d, e, d, e, f), (g = d), (h = e), (e += f);
+        a.qd = g;
+        a.rd = h;
+      }
+    }
+    function Ib(a, b) {
+      var c = a.l.ma,
+        d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,
+        d = a.C < d ? d : a.C;
+      x(b <= a.l.o);
+      if (b > d) {
+        var e = a.l.width,
+          f = c.ca,
+          g = c.tb + e * d,
+          h = a.V,
+          k = a.Ba + a.c * d,
+          l = a.gc;
+        x(1 == a.ab);
+        x(3 == l[0].hc);
+        he(l[0], d, b, h, k, f, g);
+        zc(c, d, b, f, g, e);
+      }
+      a.C = a.Ma = b;
+    }
+    function Jb(a, b, c, d, e, f, g) {
+      var h = a.$ / d,
+        k = a.$ % d,
+        l = a.m,
+        m = a.s,
+        n = c + a.$,
+        r = n;
+      e = c + d * e;
+      var q = c + d * f,
+        t = 280 + m.ua,
+        v = a.Pb ? h : 16777216,
+        p = 0 < m.ua ? m.Wa : null,
+        u = m.wc,
+        w = n < q ? ha(m, k, h) : null;
+      x(a.C < f);
+      x(q <= e);
+      var y = !1;
+      a: for (;;) {
+        for (; y || n < q; ) {
+          var A = 0;
+          if (h >= v) {
+            var v = a,
+              E = n - c;
+            x(v.Pb);
+            v.wd = v.m;
+            v.xd = E;
+            0 < v.s.ua && $b(v.s.Wa, v.s.vb);
+            v = h + ie;
+          }
+          k & u || (w = ha(m, k, h));
+          x(null != w);
+          w.Qb && ((b[n] = w.qb), (y = !0));
+          if (!y)
+            if ((Sa(l), w.jc)) {
+              var A = l,
+                E = b,
+                B = n,
+                C = w.pd[pb(A) & (xb - 1)];
+              x(w.jc);
+              256 > C.g
+                ? (qb(A, A.u + C.g), (E[B] = C.value), (A = 0))
+                : (qb(A, A.u + C.g - 256), x(256 <= C.value), (A = C.value));
+              0 == A && (y = !0);
+            } else A = ua(w.G[0], w.H[0], l);
+          if (l.h) break;
+          if (y || 256 > A) {
+            if (!y)
+              if (w.nd) b[n] = (w.qb | (A << 8)) >>> 0;
+              else {
+                Sa(l);
+                y = ua(w.G[1], w.H[1], l);
+                Sa(l);
+                E = ua(w.G[2], w.H[2], l);
+                B = ua(w.G[3], w.H[3], l);
+                if (l.h) break;
+                b[n] = ((B << 24) | (y << 16) | (A << 8) | E) >>> 0;
+              }
+            y = !1;
+            ++n;
+            ++k;
+            if (
+              k >= d &&
+              ((k = 0),
+              ++h,
+              null != g && h <= f && !(h % 16) && g(a, h),
+              null != p)
+            )
+              for (; r < n; )
+                (A = b[r++]),
+                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);
+          } else if (280 > A) {
+            A = ib(A - 256, l);
+            E = ua(w.G[4], w.H[4], l);
+            Sa(l);
+            E = ib(E, l);
+            E = nc(d, E);
+            if (l.h) break;
+            if (n - c < E || e - n < A) break a;
+            else for (B = 0; B < A; ++B) b[n + B] = b[n + B - E];
+            n += A;
+            for (k += A; k >= d; )
+              (k -= d), ++h, null != g && h <= f && !(h % 16) && g(a, h);
+            x(n <= e);
+            k & u && (w = ha(m, k, h));
+            if (null != p)
+              for (; r < n; )
+                (A = b[r++]),
+                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);
+          } else if (A < t) {
+            y = A - 280;
+            for (x(null != p); r < n; )
+              (A = b[r++]), (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);
+            A = n;
+            E = p;
+            x(!(y >>> E.Xa));
+            b[A] = E.X[y];
+            y = !0;
+          } else break a;
+          y || x(l.h == db(l));
+        }
+        if (a.Pb && l.h && n < e)
+          x(a.m.h),
+            (a.a = 5),
+            (a.m = a.wd),
+            (a.$ = a.xd),
+            0 < a.s.ua && $b(a.s.vb, a.s.Wa);
+        else if (l.h) break a;
+        else null != g && g(a, h > f ? f : h), (a.a = 0), (a.$ = n - c);
+        return 1;
+      }
+      a.a = 3;
+      return 0;
+    }
+    function Ac(a) {
+      x(null != a);
+      a.vc = null;
+      a.yc = null;
+      a.Ya = null;
+      var b = a.Wa;
+      null != b && (b.X = null);
+      a.vb = null;
+      x(null != a);
+    }
+    function Bc() {
+      var a = new je();
+      if (null == a) return null;
+      a.a = 0;
+      a.xb = Cc;
+      gb("Predictor", "VP8LPredictors");
+      gb("Predictor", "VP8LPredictors_C");
+      gb("PredictorAdd", "VP8LPredictorsAdd");
+      gb("PredictorAdd", "VP8LPredictorsAdd_C");
+      pc = Kd;
+      Fb = Ld;
+      sc = Md;
+      Gb = Nd;
+      Hb = Od;
+      xc = Pd;
+      uc = Qd;
+      self.VP8LMapColor32b = ke;
+      self.VP8LMapColor8b = le;
+      return a;
+    }
+    function rb(a, b, c, d, e) {
+      var f = 1,
+        g = [a],
+        h = [b],
+        k = d.m,
+        l = d.s,
+        m = null,
+        n = 0;
+      a: for (;;) {
+        if (c)
+          for (; f && D(k, 1); ) {
+            var r = g,
+              q = h,
+              t = d,
+              v = 1,
+              p = t.m,
+              u = t.gc[t.ab],
+              w = D(p, 2);
+            if (t.Oc & (1 << w)) f = 0;
+            else {
+              t.Oc |= 1 << w;
+              u.hc = w;
+              u.Ea = r[0];
+              u.nc = q[0];
+              u.K = [null];
+              ++t.ab;
+              x(4 >= t.ab);
+              switch (w) {
+                case 0:
+                case 1:
+                  u.b = D(p, 3) + 2;
+                  v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);
+                  u.K = u.K[0];
+                  break;
+                case 3:
+                  var y = D(p, 8) + 1,
+                    A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;
+                  r[0] = xa(u.Ea, A);
+                  u.b = A;
+                  var v = rb(y, 1, 0, t, u.K),
+                    E;
+                  if ((E = v)) {
+                    var B,
+                      C = y,
+                      N = u,
+                      z = 1 << (8 >> N.b),
+                      Q = V(z);
+                    if (null == Q) E = 0;
+                    else {
+                      var S = N.K[0],
+                        K = N.w;
+                      Q[0] = N.K[0][0];
+                      for (B = 1; B < 1 * C; ++B) Q[B] = yb(S[K + B], Q[B - 1]);
+                      for (; B < 4 * z; ++B) Q[B] = 0;
+                      N.K[0] = null;
+                      N.K[0] = Q;
+                      E = 1;
+                    }
+                  }
+                  v = E;
+                  break;
+                case 2:
+                  break;
+                default:
+                  x(0);
+              }
+              f = v;
+            }
+          }
+        g = g[0];
+        h = h[0];
+        if (f && D(k, 1) && ((n = D(k, 4)), (f = 1 <= n && 11 >= n), !f)) {
+          d.a = 3;
+          break a;
+        }
+        var H;
+        if ((H = f))
+          b: {
+            var F = d,
+              G = g,
+              L = h,
+              J = n,
+              T = c,
+              Da,
+              ba,
+              X = F.m,
+              R = F.s,
+              P = [null],
+              U,
+              W = 1,
+              aa = 0,
+              na = me[J];
+            c: for (;;) {
+              if (T && D(X, 1)) {
+                var ca = D(X, 3) + 2,
+                  ga = xa(G, ca),
+                  ka = xa(L, ca),
+                  qa = ga * ka;
+                if (!rb(ga, ka, 0, F, P)) break c;
+                P = P[0];
+                R.xc = ca;
+                for (Da = 0; Da < qa; ++Da) {
+                  var ia = (P[Da] >> 8) & 65535;
+                  P[Da] = ia;
+                  ia >= W && (W = ia + 1);
+                }
+              }
+              if (X.h) break c;
+              for (ba = 0; 5 > ba; ++ba) {
+                var Y = Dc[ba];
+                !ba && 0 < J && (Y += 1 << J);
+                aa < Y && (aa = Y);
+              }
+              var ma = wa(W * na, O);
+              var ua = W,
+                va = wa(ua, Ub);
+              if (null == va) var la = null;
+              else x(65536 >= ua), (la = va);
+              var ha = V(aa);
+              if (null == la || null == ha || null == ma) {
+                F.a = 1;
+                break c;
+              }
+              var pa = ma;
+              for (Da = U = 0; Da < W; ++Da) {
+                var ja = la[Da],
+                  da = ja.G,
+                  ea = ja.H,
+                  Fa = 0,
+                  ra = 1,
+                  Ha = 0;
+                for (ba = 0; 5 > ba; ++ba) {
+                  Y = Dc[ba];
+                  da[ba] = pa;
+                  ea[ba] = U;
+                  !ba && 0 < J && (Y += 1 << J);
+                  d: {
+                    var sa,
+                      za = Y,
+                      ta = F,
+                      oa = ha,
+                      db = pa,
+                      eb = U,
+                      Ia = 0,
+                      Ka = ta.m,
+                      fb = D(Ka, 1);
+                    M(oa, 0, 0, za);
+                    if (fb) {
+                      var gb = D(Ka, 1) + 1,
+                        hb = D(Ka, 1),
+                        Ja = D(Ka, 0 == hb ? 1 : 8);
+                      oa[Ja] = 1;
+                      2 == gb && ((Ja = D(Ka, 8)), (oa[Ja] = 1));
+                      var ya = 1;
+                    } else {
+                      var Ua = V(19),
+                        Va = D(Ka, 4) + 4;
+                      if (19 < Va) {
+                        ta.a = 3;
+                        var Aa = 0;
+                        break d;
+                      }
+                      for (sa = 0; sa < Va; ++sa) Ua[ne[sa]] = D(Ka, 3);
+                      var Ba = void 0,
+                        sb = void 0,
+                        Wa = ta,
+                        ib = Ua,
+                        Ca = za,
+                        Xa = oa,
+                        Oa = 0,
+                        La = Wa.m,
+                        Ya = 8,
+                        Za = wa(128, O);
+                      e: for (;;) {
+                        if (!Z(Za, 0, 7, ib, 19)) break e;
+                        if (D(La, 1)) {
+                          var kb = 2 + 2 * D(La, 3),
+                            Ba = 2 + D(La, kb);
+                          if (Ba > Ca) break e;
+                        } else Ba = Ca;
+                        for (sb = 0; sb < Ca && Ba--; ) {
+                          Sa(La);
+                          var $a = Za[0 + (pb(La) & 127)];
+                          qb(La, La.u + $a.g);
+                          var jb = $a.value;
+                          if (16 > jb) (Xa[sb++] = jb), 0 != jb && (Ya = jb);
+                          else {
+                            var lb = 16 == jb,
+                              ab = jb - 16,
+                              mb = oe[ab],
+                              bb = D(La, pe[ab]) + mb;
+                            if (sb + bb > Ca) break e;
+                            else
+                              for (var nb = lb ? Ya : 0; 0 < bb--; )
+                                Xa[sb++] = nb;
+                          }
+                        }
+                        Oa = 1;
+                        break e;
+                      }
+                      Oa || (Wa.a = 3);
+                      ya = Oa;
+                    }
+                    (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));
+                    ya && 0 != Ia ? (Aa = Ia) : ((ta.a = 3), (Aa = 0));
+                  }
+                  if (0 == Aa) break c;
+                  ra && 1 == qe[ba] && (ra = 0 == pa[U].g);
+                  Fa += pa[U].g;
+                  U += Aa;
+                  if (3 >= ba) {
+                    var Pa = ha[0],
+                      tb;
+                    for (tb = 1; tb < Y; ++tb) ha[tb] > Pa && (Pa = ha[tb]);
+                    Ha += Pa;
+                  }
+                }
+                ja.nd = ra;
+                ja.Qb = 0;
+                ra &&
+                  ((ja.qb =
+                    ((da[3][ea[3] + 0].value << 24) |
+                      (da[1][ea[1] + 0].value << 16) |
+                      da[2][ea[2] + 0].value) >>>
+                    0),
+                  0 == Fa &&
+                    256 > da[0][ea[0] + 0].value &&
+                    ((ja.Qb = 1), (ja.qb += da[0][ea[0] + 0].value << 8)));
+                ja.jc = !ja.Qb && 6 > Ha;
+                if (ja.jc) {
+                  var Ga,
+                    Ea = ja;
+                  for (Ga = 0; Ga < xb; ++Ga) {
+                    var Ma = Ga,
+                      Na = Ea.pd[Ma],
+                      vb = Ea.G[0][Ea.H[0] + Ma];
+                    256 <= vb.value
+                      ? ((Na.g = vb.g + 256), (Na.value = vb.value))
+                      : ((Na.g = 0),
+                        (Na.value = 0),
+                        (Ma >>= ub(vb, 8, Na)),
+                        (Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na)),
+                        (Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na)),
+                        ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));
+                  }
+                }
+              }
+              R.vc = P;
+              R.Wb = W;
+              R.Ya = la;
+              R.yc = ma;
+              H = 1;
+              break b;
+            }
+            H = 0;
+          }
+        f = H;
+        if (!f) {
+          d.a = 3;
+          break a;
+        }
+        if (0 < n) {
+          if (((l.ua = 1 << n), !Zb(l.Wa, n))) {
+            d.a = 1;
+            f = 0;
+            break a;
+          }
+        } else l.ua = 0;
+        var Qa = d,
+          cb = g,
+          ob = h,
+          Ra = Qa.s,
+          Ta = Ra.xc;
+        Qa.c = cb;
+        Qa.i = ob;
+        Ra.md = xa(cb, Ta);
+        Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;
+        if (c) {
+          d.xb = re;
+          break a;
+        }
+        m = V(g * h);
+        if (null == m) {
+          d.a = 1;
+          f = 0;
+          break a;
+        }
+        f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;
+        break a;
+      }
+      f
+        ? (null != e ? (e[0] = m) : (x(null == m), x(c)), (d.$ = 0), c || Ac(l))
+        : Ac(l);
+      return f;
+    }
+    function Ec(a, b) {
+      var c = a.c * a.i,
+        d = c + b + 16 * b;
+      x(a.c <= b);
+      a.V = V(d);
+      if (null == a.V) return (a.Ta = null), (a.Ua = 0), (a.a = 1), 0;
+      a.Ta = a.V;
+      a.Ua = a.Ba + c + b;
+      return 1;
+    }
+    function se(a, b) {
+      var c = a.C,
+        d = b - c,
+        e = a.V,
+        f = a.Ba + a.c * c;
+      for (x(b <= a.l.o); 0 < d; ) {
+        var g = 16 < d ? 16 : d,
+          h = a.l.ma,
+          k = a.l.width,
+          l = k * g,
+          m = h.ca,
+          n = h.tb + k * c,
+          r = a.Ta,
+          q = a.Ua;
+        oc(a, g, e, f);
+        Fc(r, q, m, n, l);
+        zc(h, c, c + g, m, n, k);
+        d -= g;
+        e += g * a.c;
+        c += g;
+      }
+      x(c == b);
+      a.C = a.Ma = b;
+    }
+    function te(a, b) {
+      var c = [0],
+        d = [0],
+        e = [0];
+      a: for (;;) {
+        if (null == a) return 0;
+        if (null == b) return (a.a = 2), 0;
+        a.l = b;
+        a.a = 0;
+        cb(a.m, b.data, b.w, b.ha);
+        if (!mc(a.m, c, d, e)) {
+          a.a = 3;
+          break a;
+        }
+        a.xb = Cc;
+        b.width = c[0];
+        b.height = d[0];
+        if (!rb(c[0], d[0], 1, a, null)) break a;
+        return 1;
+      }
+      x(0 != a.a);
+      return 0;
+    }
+    function ue() {
+      this.ub = this.yd = this.td = this.Rb = 0;
+    }
+    function ve() {
+      this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;
+    }
+    function we() {
+      this.Fb = this.Bb = this.Cb = 0;
+      this.Zb = V(4);
+      this.Lb = V(4);
+    }
+    function Gc() {
+      this.Yb = wb();
+    }
+    function xe() {
+      this.jb = V(3);
+      this.Wc = Ed([4, 8], Gc);
+      this.Xc = Ed([4, 17], Gc);
+    }
+    function ye() {
+      this.Pc = this.wb = this.Tb = this.zd = 0;
+      this.vd = new V(4);
+      this.od = new V(4);
+    }
+    function Xa() {
+      this.ld = this.La = this.dd = this.tc = 0;
+    }
+    function Hc() {
+      this.Na = this.la = 0;
+    }
+    function ze() {
+      this.Sc = [0, 0];
+      this.Eb = [0, 0];
+      this.Qc = [0, 0];
+      this.ia = this.lc = 0;
+    }
+    function Kb() {
+      this.ad = V(384);
+      this.Za = 0;
+      this.Ob = V(16);
+      this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;
+    }
+    function Ae() {
+      this.uc = this.M = this.Nb = 0;
+      this.wa = Array(new Xa());
+      this.Y = 0;
+      this.ya = Array(new Kb());
+      this.aa = 0;
+      this.l = new Oa();
+    }
+    function Ic() {
+      this.y = V(16);
+      this.f = V(8);
+      this.ea = V(8);
+    }
+    function Be() {
+      this.cb = this.a = 0;
+      this.sc = "";
+      this.m = new Wb();
+      this.Od = new ue();
+      this.Kc = new ve();
+      this.ed = new ye();
+      this.Qa = new we();
+      this.Ic = this.$c = this.Aa = 0;
+      this.D = new Ae();
+      this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;
+      this.Jc = wa(8, Wb);
+      this.ia = 0;
+      this.pb = wa(4, ze);
+      this.Pa = new xe();
+      this.Bd = this.kc = 0;
+      this.Ac = [];
+      this.Bc = 0;
+      this.zc = [0, 0, 0, 0];
+      this.Gd = Array(new Ic());
+      this.Hd = 0;
+      this.rb = Array(new Hc());
+      this.sb = 0;
+      this.wa = Array(new Xa());
+      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 Kb());
+      this.L = this.aa = 0;
+      this.gd = Ed([4, 2], Xa);
+      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 ga(a, b) {
+      return 0 > a ? 0 : a > b ? b : a;
+    }
+    function Oa() {
+      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 Ce() {
+      var a = new Be();
+      null != a &&
+        ((a.a = 0), (a.sc = "OK"), (a.cb = 0), (a.Xb = 0), oa || (oa = De));
+      return a;
+    }
+    function T(a, b, c) {
+      0 == a.a && ((a.a = b), (a.sc = c), (a.cb = 0));
+      return 0;
+    }
+    function Jc(a, b, c) {
+      return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];
+    }
+    function Kc(a, b) {
+      if (null == a) return 0;
+      a.a = 0;
+      a.sc = "OK";
+      if (null == b) return T(a, 2, "null VP8Io passed to VP8GetHeaders()");
+      var c = b.data;
+      var d = b.w;
+      var e = b.ha;
+      if (4 > e) return T(a, 7, "Truncated header.");
+      var f = c[d + 0] | (c[d + 1] << 8) | (c[d + 2] << 16);
+      var g = a.Od;
+      g.Rb = !(f & 1);
+      g.td = (f >> 1) & 7;
+      g.yd = (f >> 4) & 1;
+      g.ub = f >> 5;
+      if (3 < g.td) return T(a, 3, "Incorrect keyframe parameters.");
+      if (!g.yd) return T(a, 4, "Frame not displayable.");
+      d += 3;
+      e -= 3;
+      var h = a.Kc;
+      if (g.Rb) {
+        if (7 > e) return T(a, 7, "cannot parse picture header");
+        if (!Jc(c, d, e)) return T(a, 3, "Bad code word");
+        h.c = ((c[d + 4] << 8) | c[d + 3]) & 16383;
+        h.Td = c[d + 4] >> 6;
+        h.i = ((c[d + 6] << 8) | c[d + 5]) & 16383;
+        h.Ud = c[d + 6] >> 6;
+        d += 7;
+        e -= 7;
+        a.za = (h.c + 15) >> 4;
+        a.Ub = (h.i + 15) >> 4;
+        b.width = h.c;
+        b.height = h.i;
+        b.Da = 0;
+        b.j = 0;
+        b.v = 0;
+        b.va = b.width;
+        b.o = b.height;
+        b.da = 0;
+        b.ib = b.width;
+        b.hb = b.height;
+        b.U = b.width;
+        b.T = b.height;
+        f = a.Pa;
+        M(f.jb, 0, 255, f.jb.length);
+        f = a.Qa;
+        x(null != f);
+        f.Cb = 0;
+        f.Bb = 0;
+        f.Fb = 1;
+        M(f.Zb, 0, 0, f.Zb.length);
+        M(f.Lb, 0, 0, f.Lb);
+      }
+      if (g.ub > e) return T(a, 7, "bad partition length");
+      f = a.m;
+      ma(f, c, d, g.ub);
+      d += g.ub;
+      e -= g.ub;
+      g.Rb && ((h.Ld = G(f)), (h.Kd = G(f)));
+      h = a.Qa;
+      var k = a.Pa,
+        l;
+      x(null != f);
+      x(null != h);
+      h.Cb = G(f);
+      if (h.Cb) {
+        h.Bb = G(f);
+        if (G(f)) {
+          h.Fb = G(f);
+          for (l = 0; 4 > l; ++l) h.Zb[l] = G(f) ? ca(f, 7) : 0;
+          for (l = 0; 4 > l; ++l) h.Lb[l] = G(f) ? ca(f, 6) : 0;
+        }
+        if (h.Bb) for (l = 0; 3 > l; ++l) k.jb[l] = G(f) ? na(f, 8) : 255;
+      } else h.Bb = 0;
+      if (f.Ka) return T(a, 3, "cannot parse segment header");
+      h = a.ed;
+      h.zd = G(f);
+      h.Tb = na(f, 6);
+      h.wb = na(f, 3);
+      h.Pc = G(f);
+      if (h.Pc && G(f)) {
+        for (k = 0; 4 > k; ++k) G(f) && (h.vd[k] = ca(f, 6));
+        for (k = 0; 4 > k; ++k) G(f) && (h.od[k] = ca(f, 6));
+      }
+      a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;
+      if (f.Ka) return T(a, 3, "cannot parse filter header");
+      l = d;
+      var m = e;
+      e = l;
+      d = l + m;
+      h = m;
+      a.Xb = (1 << na(a.m, 2)) - 1;
+      k = a.Xb;
+      if (m < 3 * k) c = 7;
+      else {
+        l += 3 * k;
+        h -= 3 * k;
+        for (m = 0; m < k; ++m) {
+          var n = c[e + 0] | (c[e + 1] << 8) | (c[e + 2] << 16);
+          n > h && (n = h);
+          ma(a.Jc[+m], c, l, n);
+          l += n;
+          h -= n;
+          e += 3;
+        }
+        ma(a.Jc[+k], c, l, h);
+        c = l < d ? 0 : 5;
+      }
+      if (0 != c) return T(a, c, "cannot parse partitions");
+      l = a.m;
+      c = na(l, 7);
+      e = G(l) ? ca(l, 4) : 0;
+      d = G(l) ? ca(l, 4) : 0;
+      h = G(l) ? ca(l, 4) : 0;
+      k = G(l) ? ca(l, 4) : 0;
+      l = G(l) ? ca(l, 4) : 0;
+      m = a.Qa;
+      for (n = 0; 4 > n; ++n) {
+        if (m.Cb) {
+          var r = m.Zb[n];
+          m.Fb || (r += c);
+        } else if (0 < n) {
+          a.pb[n] = a.pb[0];
+          continue;
+        } else r = c;
+        var q = a.pb[n];
+        q.Sc[0] = Lb[ga(r + e, 127)];
+        q.Sc[1] = Mb[ga(r + 0, 127)];
+        q.Eb[0] = 2 * Lb[ga(r + d, 127)];
+        q.Eb[1] = (101581 * Mb[ga(r + h, 127)]) >> 16;
+        8 > q.Eb[1] && (q.Eb[1] = 8);
+        q.Qc[0] = Lb[ga(r + k, 117)];
+        q.Qc[1] = Mb[ga(r + l, 127)];
+        q.lc = r + l;
+      }
+      if (!g.Rb) return T(a, 4, "Not a key frame.");
+      G(f);
+      g = a.Pa;
+      for (c = 0; 4 > c; ++c) {
+        for (e = 0; 8 > e; ++e)
+          for (d = 0; 3 > d; ++d)
+            for (h = 0; 11 > h; ++h)
+              (k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h]),
+                (g.Wc[c][e].Yb[d][h] = k);
+        for (e = 0; 17 > e; ++e) g.Xc[c][e] = g.Wc[c][Ge[e]];
+      }
+      a.kc = G(f);
+      a.kc && (a.Bd = na(f, 8));
+      return (a.cb = 1);
+    }
+    function De(a, b, c, d, e, f, g) {
+      var h = b[e].Yb[c];
+      for (c = 0; 16 > e; ++e) {
+        if (!K(a, h[c + 0])) return e;
+        for (; !K(a, h[c + 1]); )
+          if (((h = b[++e].Yb[0]), (c = 0), 16 == e)) return 16;
+        var k = b[e + 1].Yb;
+        if (K(a, h[c + 2])) {
+          var l = a,
+            m = h,
+            n = c;
+          var r = 0;
+          if (K(l, m[n + 3]))
+            if (K(l, m[n + 6])) {
+              h = 0;
+              r = K(l, m[n + 8]);
+              m = K(l, m[n + 9 + r]);
+              n = 2 * r + m;
+              r = 0;
+              for (m = He[n]; m[h]; ++h) r += r + K(l, m[h]);
+              r += 3 + (8 << n);
+            } else
+              K(l, m[n + 7])
+                ? ((r = 7 + 2 * K(l, 165)), (r += K(l, 145)))
+                : (r = 5 + K(l, 159));
+          else K(l, m[n + 4]) ? (r = 3 + K(l, m[n + 5])) : (r = 2);
+          h = k[2];
+        } else (r = 1), (h = k[1]);
+        k = g + Ie[e];
+        l = a;
+        0 > l.b && Qa(l);
+        var m = l.b,
+          n = l.Ca >> 1,
+          q = (n - (l.I >> m)) >> 31;
+        --l.b;
+        l.Ca += q;
+        l.Ca |= 1;
+        l.I -= ((n + 1) & q) << m;
+        f[k] = ((r ^ q) - q) * d[(0 < e) + 0];
+      }
+      return 16;
+    }
+    function Lc(a) {
+      var b = a.rb[a.sb - 1];
+      b.la = 0;
+      b.Na = 0;
+      M(a.zc, 0, 0, a.zc.length);
+      a.ja = 0;
+    }
+    function Je(a, b) {
+      for (a.M = 0; a.M < a.Va; ++a.M) {
+        var c = a.Jc[a.M & a.Xb],
+          d = a.m,
+          e = a,
+          f;
+        for (f = 0; f < e.za; ++f) {
+          var g = d;
+          var h = e;
+          var k = h.Ac,
+            l = h.Bc + 4 * f,
+            m = h.zc,
+            n = h.ya[h.aa + f];
+          h.Qa.Bb
+            ? (n.$b = K(g, h.Pa.jb[0])
+                ? 2 + K(g, h.Pa.jb[2])
+                : K(g, h.Pa.jb[1]))
+            : (n.$b = 0);
+          h.kc && (n.Ad = K(g, h.Bd));
+          n.Za = !K(g, 145) + 0;
+          if (n.Za) {
+            var r = n.Ob,
+              q = 0;
+            for (h = 0; 4 > h; ++h) {
+              var t = m[0 + h];
+              var v;
+              for (v = 0; 4 > v; ++v) {
+                t = Ke[k[l + v]][t];
+                for (var p = Mc[K(g, t[0])]; 0 < p; )
+                  p = Mc[2 * p + K(g, t[p])];
+                t = -p;
+                k[l + v] = t;
+              }
+              I(r, q, k, l, 4);
+              q += 4;
+              m[0 + h] = t;
+            }
+          } else
+            (t = K(g, 156) ? (K(g, 128) ? 1 : 3) : K(g, 163) ? 2 : 0),
+              (n.Ob[0] = t),
+              M(k, l, t, 4),
+              M(m, 0, t, 4);
+          n.Dd = K(g, 142) ? (K(g, 114) ? (K(g, 183) ? 1 : 3) : 2) : 0;
+        }
+        if (e.m.Ka) return T(a, 7, "Premature end-of-partition0 encountered.");
+        for (; a.ja < a.za; ++a.ja) {
+          d = a;
+          e = c;
+          g = d.rb[d.sb - 1];
+          k = d.rb[d.sb + d.ja];
+          f = d.ya[d.aa + d.ja];
+          if ((l = d.kc ? f.Ad : 0))
+            (g.la = k.la = 0),
+              f.Za || (g.Na = k.Na = 0),
+              (f.Hc = 0),
+              (f.Gc = 0),
+              (f.ia = 0);
+          else {
+            var u,
+              w,
+              g = k,
+              k = e,
+              l = d.Pa.Xc,
+              m = d.ya[d.aa + d.ja],
+              n = d.pb[m.$b];
+            h = m.ad;
+            r = 0;
+            q = d.rb[d.sb - 1];
+            t = v = 0;
+            M(h, r, 0, 384);
+            if (m.Za) {
+              var y = 0;
+              var A = l[3];
+            } else {
+              p = V(16);
+              var E = g.Na + q.Na;
+              E = oa(k, l[1], E, n.Eb, 0, p, 0);
+              g.Na = q.Na = (0 < E) + 0;
+              if (1 < E) Nc(p, 0, h, r);
+              else {
+                var B = (p[0] + 3) >> 3;
+                for (p = 0; 256 > p; p += 16) h[r + p] = B;
+              }
+              y = 1;
+              A = l[0];
+            }
+            var C = g.la & 15;
+            var N = q.la & 15;
+            for (p = 0; 4 > p; ++p) {
+              var z = N & 1;
+              for (B = w = 0; 4 > B; ++B)
+                (E = z + (C & 1)),
+                  (E = oa(k, A, E, n.Sc, y, h, r)),
+                  (z = E > y),
+                  (C = (C >> 1) | (z << 7)),
+                  (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),
+                  (r += 16);
+              C >>= 4;
+              N = (N >> 1) | (z << 7);
+              v = ((v << 8) | w) >>> 0;
+            }
+            A = C;
+            y = N >> 4;
+            for (u = 0; 4 > u; u += 2) {
+              w = 0;
+              C = g.la >> (4 + u);
+              N = q.la >> (4 + u);
+              for (p = 0; 2 > p; ++p) {
+                z = N & 1;
+                for (B = 0; 2 > B; ++B)
+                  (E = z + (C & 1)),
+                    (E = oa(k, l[2], E, n.Qc, 0, h, r)),
+                    (z = 0 < E),
+                    (C = (C >> 1) | (z << 3)),
+                    (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),
+                    (r += 16);
+                C >>= 2;
+                N = (N >> 1) | (z << 5);
+              }
+              t |= w << (4 * u);
+              A |= (C << 4) << u;
+              y |= (N & 240) << u;
+            }
+            g.la = A;
+            q.la = y;
+            m.Hc = v;
+            m.Gc = t;
+            m.ia = t & 43690 ? 0 : n.ia;
+            l = !(v | t);
+          }
+          0 < d.L &&
+            ((d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za]),
+            (d.wa[d.Y + d.ja].La |= !l));
+          if (e.Ka) return T(a, 7, "Premature end-of-file encountered.");
+        }
+        Lc(a);
+        c = a;
+        d = b;
+        e = 1;
+        f = c.D;
+        g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;
+        if (0 == c.Aa)
+          a: {
+            (f.M = c.M), (f.uc = g), Oc(c, f), (e = 1);
+            w = c.D;
+            f = w.Nb;
+            t = Ya[c.L];
+            g = t * c.R;
+            k = (t / 2) * c.B;
+            p = 16 * f * c.R;
+            B = 8 * f * c.B;
+            l = c.sa;
+            m = c.ta - g + p;
+            n = c.qa;
+            h = c.ra - k + B;
+            r = c.Ha;
+            q = c.Ia - k + B;
+            C = w.M;
+            N = 0 == C;
+            v = C >= c.Va - 1;
+            2 == c.Aa && Oc(c, w);
+            if (w.uc)
+              for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {
+                var Q = E;
+                y = w;
+                A = z;
+                var S = Q.D,
+                  D = S.Nb;
+                u = Q.R;
+                var S = S.wa[S.Y + y],
+                  F = Q.sa,
+                  H = Q.ta + 16 * D * u + 16 * y,
+                  J = S.dd,
+                  G = S.tc;
+                if (0 != G)
+                  if ((x(3 <= G), 1 == Q.L))
+                    0 < y && Pc(F, H, u, G + 4),
+                      S.La && Qc(F, H, u, G),
+                      0 < A && Rc(F, H, u, G + 4),
+                      S.La && Sc(F, H, u, G);
+                  else {
+                    var L = Q.B,
+                      O = Q.qa,
+                      P = Q.ra + 8 * D * L + 8 * y,
+                      R = Q.Ha,
+                      Q = Q.Ia + 8 * D * L + 8 * y,
+                      D = S.ld;
+                    0 < y &&
+                      (Tc(F, H, u, G + 4, J, D),
+                      Uc(O, P, R, Q, L, G + 4, J, D));
+                    S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));
+                    0 < A &&
+                      (Xc(F, H, u, G + 4, J, D),
+                      Yc(O, P, R, Q, L, G + 4, J, D));
+                    S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));
+                  }
+              }
+            c.ia && alert("todo:DitherRow");
+            if (null != d.put) {
+              w = 16 * C;
+              C = 16 * (C + 1);
+              N
+                ? ((d.y = c.sa),
+                  (d.O = c.ta + p),
+                  (d.f = c.qa),
+                  (d.N = c.ra + B),
+                  (d.ea = c.Ha),
+                  (d.W = c.Ia + B))
+                : ((w -= t),
+                  (d.y = l),
+                  (d.O = m),
+                  (d.f = n),
+                  (d.N = h),
+                  (d.ea = r),
+                  (d.W = q));
+              v || (C -= t);
+              C > d.o && (C = d.o);
+              d.F = null;
+              d.J = null;
+              if (
+                null != c.Fa &&
+                0 < c.Fa.length &&
+                w < C &&
+                ((d.J = Le(c, d, w, C - w)),
+                (d.F = c.mb),
+                null == d.F && 0 == d.F.length)
+              ) {
+                e = T(c, 3, "Could not decode alpha data.");
+                break a;
+              }
+              w < d.j &&
+                ((t = d.j - w),
+                (w = d.j),
+                x(!(t & 1)),
+                (d.O += c.R * t),
+                (d.N += c.B * (t >> 1)),
+                (d.W += c.B * (t >> 1)),
+                null != d.F && (d.J += d.width * t));
+              w < C &&
+                ((d.O += d.v),
+                (d.N += d.v >> 1),
+                (d.W += d.v >> 1),
+                null != d.F && (d.J += d.v),
+                (d.ka = w - d.j),
+                (d.U = d.va - d.v),
+                (d.T = C - w),
+                (e = d.put(d)));
+            }
+            f + 1 != c.Ic ||
+              v ||
+              (I(c.sa, c.ta - g, l, m + 16 * c.R, g),
+              I(c.qa, c.ra - k, n, h + 8 * c.B, k),
+              I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));
+          }
+        if (!e) return T(a, 6, "Output aborted.");
+      }
+      return 1;
+    }
+    function Me(a, b) {
+      if (null == a) return 0;
+      if (null == b) return T(a, 2, "NULL VP8Io parameter in VP8Decode().");
+      if (!a.cb && !Kc(a, b)) return 0;
+      x(a.cb);
+      if (null == b.ac || b.ac(b)) {
+        b.ob && (a.L = 0);
+        var c = Ya[a.L];
+        2 == a.L
+          ? ((a.yb = 0), (a.zb = 0))
+          : ((a.yb = (b.v - c) >> 4),
+            (a.zb = (b.j - c) >> 4),
+            0 > a.yb && (a.yb = 0),
+            0 > a.zb && (a.zb = 0));
+        a.Va = (b.o + 15 + c) >> 4;
+        a.Hb = (b.va + 15 + c) >> 4;
+        a.Hb > a.za && (a.Hb = a.za);
+        a.Va > a.Ub && (a.Va = a.Ub);
+        if (0 < a.L) {
+          var d = a.ed;
+          for (c = 0; 4 > c; ++c) {
+            var e;
+            if (a.Qa.Cb) {
+              var f = a.Qa.Lb[c];
+              a.Qa.Fb || (f += d.Tb);
+            } else f = d.Tb;
+            for (e = 0; 1 >= e; ++e) {
+              var g = a.gd[c][e],
+                h = f;
+              d.Pc && ((h += d.vd[0]), e && (h += d.od[0]));
+              h = 0 > h ? 0 : 63 < h ? 63 : h;
+              if (0 < h) {
+                var k = h;
+                0 < d.wb &&
+                  ((k = 4 < d.wb ? k >> 2 : k >> 1),
+                  k > 9 - d.wb && (k = 9 - d.wb));
+                1 > k && (k = 1);
+                g.dd = k;
+                g.tc = 2 * h + k;
+                g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;
+              } else g.tc = 0;
+              g.La = e;
+            }
+          }
+        }
+        c = 0;
+      } else T(a, 6, "Frame setup failed"), (c = a.a);
+      if ((c = 0 == c)) {
+        if (c) {
+          a.$c = 0;
+          0 < a.Aa || (a.Ic = Ne);
+          b: {
+            c = a.Ic;
+            var k = a.za,
+              d = 4 * k,
+              l = 32 * k,
+              m = k + 1,
+              n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,
+              r = (2 == a.Aa ? 2 : 1) * k;
+            e = ((3 * (16 * c + Ya[a.L])) / 2) * l;
+            f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;
+            g = d + 832 + e + f;
+            if (g != g) c = 0;
+            else {
+              if (g > a.Vb) {
+                a.Vb = 0;
+                a.Ec = V(g);
+                a.Fc = 0;
+                if (null == a.Ec) {
+                  c = T(a, 1, "no memory during frame initialization.");
+                  break b;
+                }
+                a.Vb = g;
+              }
+              g = a.Ec;
+              h = a.Fc;
+              a.Ac = g;
+              a.Bc = h;
+              h += d;
+              a.Gd = wa(l, Ic);
+              a.Hd = 0;
+              a.rb = wa(m + 1, Hc);
+              a.sb = 1;
+              a.wa = n ? wa(n, Xa) : null;
+              a.Y = 0;
+              a.D.Nb = 0;
+              a.D.wa = a.wa;
+              a.D.Y = a.Y;
+              0 < a.Aa && (a.D.Y += k);
+              x(!0);
+              a.oc = g;
+              a.pc = h;
+              h += 832;
+              a.ya = wa(r, Kb);
+              a.aa = 0;
+              a.D.ya = a.ya;
+              a.D.aa = a.aa;
+              2 == a.Aa && (a.D.aa += k);
+              a.R = 16 * k;
+              a.B = 8 * k;
+              l = Ya[a.L];
+              k = l * a.R;
+              l = (l / 2) * a.B;
+              a.sa = g;
+              a.ta = h + k;
+              a.qa = a.sa;
+              a.ra = a.ta + 16 * c * a.R + l;
+              a.Ha = a.qa;
+              a.Ia = a.ra + 8 * c * a.B + l;
+              a.$c = 0;
+              h += e;
+              a.mb = f ? g : null;
+              a.nb = f ? h : null;
+              x(h + f <= a.Fc + a.Vb);
+              Lc(a);
+              M(a.Ac, a.Bc, 0, d);
+              c = 1;
+            }
+          }
+          if (c) {
+            b.ka = 0;
+            b.y = a.sa;
+            b.O = a.ta;
+            b.f = a.qa;
+            b.N = a.ra;
+            b.ea = a.Ha;
+            b.Vd = a.Ia;
+            b.fa = a.R;
+            b.Rc = a.B;
+            b.F = null;
+            b.J = 0;
+            if (!ad) {
+              for (c = -255; 255 >= c; ++c) bd[255 + c] = 0 > c ? -c : c;
+              for (c = -1020; 1020 >= c; ++c)
+                cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;
+              for (c = -112; 112 >= c; ++c)
+                dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;
+              for (c = -255; 510 >= c; ++c)
+                ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;
+              ad = 1;
+            }
+            Nc = Oe;
+            Za = Pe;
+            Nb = Qe;
+            pa = Re;
+            Ob = Se;
+            fd = Te;
+            Xc = Ue;
+            Tc = Ve;
+            Yc = We;
+            Uc = Xe;
+            Zc = Ye;
+            Vc = Ze;
+            $c = $e;
+            Wc = af;
+            Rc = gd;
+            Pc = hd;
+            Sc = bf;
+            Qc = cf;
+            W[0] = df;
+            W[1] = ef;
+            W[2] = ff;
+            W[3] = gf;
+            W[4] = hf;
+            W[5] = jf;
+            W[6] = kf;
+            W[7] = lf;
+            W[8] = mf;
+            W[9] = nf;
+            Y[0] = of;
+            Y[1] = pf;
+            Y[2] = qf;
+            Y[3] = rf;
+            Y[4] = sf;
+            Y[5] = tf;
+            Y[6] = uf;
+            ka[0] = vf;
+            ka[1] = wf;
+            ka[2] = xf;
+            ka[3] = yf;
+            ka[4] = zf;
+            ka[5] = Af;
+            ka[6] = Bf;
+            c = 1;
+          } else c = 0;
+        }
+        c && (c = Je(a, b));
+        null != b.bc && b.bc(b);
+        c &= 1;
+      }
+      if (!c) return 0;
+      a.cb = 0;
+      return c;
+    }
+    function qa(a, b, c, d, e) {
+      e = a[b + c + 32 * d] + (e >> 3);
+      a[b + c + 32 * d] = e & -256 ? (0 > e ? 0 : 255) : e;
+    }
+    function kb(a, b, c, d, e, f) {
+      qa(a, b, 0, c, d + e);
+      qa(a, b, 1, c, d + f);
+      qa(a, b, 2, c, d - f);
+      qa(a, b, 3, c, d - e);
+    }
+    function da(a) {
+      return ((20091 * a) >> 16) + a;
+    }
+    function id(a, b, c, d) {
+      var e = 0,
+        f;
+      var g = V(16);
+      for (f = 0; 4 > f; ++f) {
+        var h = a[b + 0] + a[b + 8];
+        var k = a[b + 0] - a[b + 8];
+        var l = ((35468 * a[b + 4]) >> 16) - da(a[b + 12]);
+        var m = da(a[b + 4]) + ((35468 * a[b + 12]) >> 16);
+        g[e + 0] = h + m;
+        g[e + 1] = k + l;
+        g[e + 2] = k - l;
+        g[e + 3] = h - m;
+        e += 4;
+        b++;
+      }
+      for (f = e = 0; 4 > f; ++f)
+        (a = g[e + 0] + 4),
+          (h = a + g[e + 8]),
+          (k = a - g[e + 8]),
+          (l = ((35468 * g[e + 4]) >> 16) - da(g[e + 12])),
+          (m = da(g[e + 4]) + ((35468 * g[e + 12]) >> 16)),
+          qa(c, d, 0, 0, h + m),
+          qa(c, d, 1, 0, k + l),
+          qa(c, d, 2, 0, k - l),
+          qa(c, d, 3, 0, h - m),
+          e++,
+          (d += 32);
+    }
+    function Te(a, b, c, d) {
+      var e = a[b + 0] + 4,
+        f = (35468 * a[b + 4]) >> 16,
+        g = da(a[b + 4]),
+        h = (35468 * a[b + 1]) >> 16;
+      a = da(a[b + 1]);
+      kb(c, d, 0, e + g, a, h);
+      kb(c, d, 1, e + f, a, h);
+      kb(c, d, 2, e - f, a, h);
+      kb(c, d, 3, e - g, a, h);
+    }
+    function Pe(a, b, c, d, e) {
+      id(a, b, c, d);
+      e && id(a, b + 16, c, d + 4);
+    }
+    function Qe(a, b, c, d) {
+      Za(a, b + 0, c, d, 1);
+      Za(a, b + 32, c, d + 128, 1);
+    }
+    function Re(a, b, c, d) {
+      a = a[b + 0] + 4;
+      var e;
+      for (e = 0; 4 > e; ++e) for (b = 0; 4 > b; ++b) qa(c, d, b, e, a);
+    }
+    function Se(a, b, c, d) {
+      a[b + 0] && pa(a, b + 0, c, d);
+      a[b + 16] && pa(a, b + 16, c, d + 4);
+      a[b + 32] && pa(a, b + 32, c, d + 128);
+      a[b + 48] && pa(a, b + 48, c, d + 128 + 4);
+    }
+    function Oe(a, b, c, d) {
+      var e = V(16),
+        f;
+      for (f = 0; 4 > f; ++f) {
+        var g = a[b + 0 + f] + a[b + 12 + f];
+        var h = a[b + 4 + f] + a[b + 8 + f];
+        var k = a[b + 4 + f] - a[b + 8 + f];
+        var l = a[b + 0 + f] - a[b + 12 + f];
+        e[0 + f] = g + h;
+        e[8 + f] = g - h;
+        e[4 + f] = l + k;
+        e[12 + f] = l - k;
+      }
+      for (f = 0; 4 > f; ++f)
+        (a = e[0 + 4 * f] + 3),
+          (g = a + e[3 + 4 * f]),
+          (h = e[1 + 4 * f] + e[2 + 4 * f]),
+          (k = e[1 + 4 * f] - e[2 + 4 * f]),
+          (l = a - e[3 + 4 * f]),
+          (c[d + 0] = (g + h) >> 3),
+          (c[d + 16] = (l + k) >> 3),
+          (c[d + 32] = (g - h) >> 3),
+          (c[d + 48] = (l - k) >> 3),
+          (d += 64);
+    }
+    function Pb(a, b, c) {
+      var d = b - 32,
+        e = R,
+        f = 255 - a[d - 1],
+        g;
+      for (g = 0; g < c; ++g) {
+        var h = e,
+          k = f + a[b - 1],
+          l;
+        for (l = 0; l < c; ++l) a[b + l] = h[k + a[d + l]];
+        b += 32;
+      }
+    }
+    function ef(a, b) {
+      Pb(a, b, 4);
+    }
+    function wf(a, b) {
+      Pb(a, b, 8);
+    }
+    function pf(a, b) {
+      Pb(a, b, 16);
+    }
+    function qf(a, b) {
+      var c;
+      for (c = 0; 16 > c; ++c) I(a, b + 32 * c, a, b - 32, 16);
+    }
+    function rf(a, b) {
+      var c;
+      for (c = 16; 0 < c; --c) M(a, b, a[b - 1], 16), (b += 32);
+    }
+    function $a(a, b, c) {
+      var d;
+      for (d = 0; 16 > d; ++d) M(b, c + 32 * d, a, 16);
+    }
+    function of(a, b) {
+      var c = 16,
+        d;
+      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d] + a[b + d - 32];
+      $a(c >> 5, a, b);
+    }
+    function sf(a, b) {
+      var c = 8,
+        d;
+      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d];
+      $a(c >> 4, a, b);
+    }
+    function tf(a, b) {
+      var c = 8,
+        d;
+      for (d = 0; 16 > d; ++d) c += a[b + d - 32];
+      $a(c >> 4, a, b);
+    }
+    function uf(a, b) {
+      $a(128, a, b);
+    }
+    function z(a, b, c) {
+      return (a + 2 * b + c + 2) >> 2;
+    }
+    function ff(a, b) {
+      var c = b - 32,
+        c = new Uint8Array([
+          z(a[c - 1], a[c + 0], a[c + 1]),
+          z(a[c + 0], a[c + 1], a[c + 2]),
+          z(a[c + 1], a[c + 2], a[c + 3]),
+          z(a[c + 2], a[c + 3], a[c + 4])
+        ]),
+        d;
+      for (d = 0; 4 > d; ++d) I(a, b + 32 * d, c, 0, c.length);
+    }
+    function gf(a, b) {
+      var c = a[b - 1],
+        d = a[b - 1 + 32],
+        e = a[b - 1 + 64],
+        f = a[b - 1 + 96];
+      ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));
+      ra(a, b + 32, 16843009 * z(c, d, e));
+      ra(a, b + 64, 16843009 * z(d, e, f));
+      ra(a, b + 96, 16843009 * z(e, f, f));
+    }
+    function df(a, b) {
+      var c = 4,
+        d;
+      for (d = 0; 4 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];
+      c >>= 3;
+      for (d = 0; 4 > d; ++d) M(a, b + 32 * d, c, 4);
+    }
+    function hf(a, b) {
+      var c = a[b - 1 + 0],
+        d = a[b - 1 + 32],
+        e = a[b - 1 + 64],
+        f = a[b - 1 - 32],
+        g = a[b + 0 - 32],
+        h = a[b + 1 - 32],
+        k = a[b + 2 - 32],
+        l = a[b + 3 - 32];
+      a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);
+      a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);
+      a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);
+      a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);
+      a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);
+      a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);
+      a[b + 3 + 0] = z(l, k, h);
+    }
+    function kf(a, b) {
+      var c = a[b + 1 - 32],
+        d = a[b + 2 - 32],
+        e = a[b + 3 - 32],
+        f = a[b + 4 - 32],
+        g = a[b + 5 - 32],
+        h = a[b + 6 - 32],
+        k = a[b + 7 - 32];
+      a[b + 0 + 0] = z(a[b + 0 - 32], c, d);
+      a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);
+      a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);
+      a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);
+      a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);
+      a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);
+      a[b + 3 + 96] = z(h, k, k);
+    }
+    function jf(a, b) {
+      var c = a[b - 1 + 0],
+        d = a[b - 1 + 32],
+        e = a[b - 1 + 64],
+        f = a[b - 1 - 32],
+        g = a[b + 0 - 32],
+        h = a[b + 1 - 32],
+        k = a[b + 2 - 32],
+        l = a[b + 3 - 32];
+      a[b + 0 + 0] = a[b + 1 + 64] = (f + g + 1) >> 1;
+      a[b + 1 + 0] = a[b + 2 + 64] = (g + h + 1) >> 1;
+      a[b + 2 + 0] = a[b + 3 + 64] = (h + k + 1) >> 1;
+      a[b + 3 + 0] = (k + l + 1) >> 1;
+      a[b + 0 + 96] = z(e, d, c);
+      a[b + 0 + 64] = z(d, c, f);
+      a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);
+      a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);
+      a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);
+      a[b + 3 + 32] = z(h, k, l);
+    }
+    function lf(a, b) {
+      var c = a[b + 0 - 32],
+        d = a[b + 1 - 32],
+        e = a[b + 2 - 32],
+        f = a[b + 3 - 32],
+        g = a[b + 4 - 32],
+        h = a[b + 5 - 32],
+        k = a[b + 6 - 32],
+        l = a[b + 7 - 32];
+      a[b + 0 + 0] = (c + d + 1) >> 1;
+      a[b + 1 + 0] = a[b + 0 + 64] = (d + e + 1) >> 1;
+      a[b + 2 + 0] = a[b + 1 + 64] = (e + f + 1) >> 1;
+      a[b + 3 + 0] = a[b + 2 + 64] = (f + g + 1) >> 1;
+      a[b + 0 + 32] = z(c, d, e);
+      a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);
+      a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);
+      a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);
+      a[b + 3 + 64] = z(g, h, k);
+      a[b + 3 + 96] = z(h, k, l);
+    }
+    function nf(a, b) {
+      var c = a[b - 1 + 0],
+        d = a[b - 1 + 32],
+        e = a[b - 1 + 64],
+        f = a[b - 1 + 96];
+      a[b + 0 + 0] = (c + d + 1) >> 1;
+      a[b + 2 + 0] = a[b + 0 + 32] = (d + e + 1) >> 1;
+      a[b + 2 + 32] = a[b + 0 + 64] = (e + f + 1) >> 1;
+      a[b + 1 + 0] = z(c, d, e);
+      a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);
+      a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);
+      a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[
+        b + 2 + 96
+      ] = a[b + 3 + 96] = f;
+    }
+    function mf(a, b) {
+      var c = a[b - 1 + 0],
+        d = a[b - 1 + 32],
+        e = a[b - 1 + 64],
+        f = a[b - 1 + 96],
+        g = a[b - 1 - 32],
+        h = a[b + 0 - 32],
+        k = a[b + 1 - 32],
+        l = a[b + 2 - 32];
+      a[b + 0 + 0] = a[b + 2 + 32] = (c + g + 1) >> 1;
+      a[b + 0 + 32] = a[b + 2 + 64] = (d + c + 1) >> 1;
+      a[b + 0 + 64] = a[b + 2 + 96] = (e + d + 1) >> 1;
+      a[b + 0 + 96] = (f + e + 1) >> 1;
+      a[b + 3 + 0] = z(h, k, l);
+      a[b + 2 + 0] = z(g, h, k);
+      a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);
+      a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);
+      a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);
+      a[b + 1 + 96] = z(f, e, d);
+    }
+    function xf(a, b) {
+      var c;
+      for (c = 0; 8 > c; ++c) I(a, b + 32 * c, a, b - 32, 8);
+    }
+    function yf(a, b) {
+      var c;
+      for (c = 0; 8 > c; ++c) M(a, b, a[b - 1], 8), (b += 32);
+    }
+    function lb(a, b, c) {
+      var d;
+      for (d = 0; 8 > d; ++d) M(b, c + 32 * d, a, 8);
+    }
+    function vf(a, b) {
+      var c = 8,
+        d;
+      for (d = 0; 8 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];
+      lb(c >> 4, a, b);
+    }
+    function Af(a, b) {
+      var c = 4,
+        d;
+      for (d = 0; 8 > d; ++d) c += a[b + d - 32];
+      lb(c >> 3, a, b);
+    }
+    function zf(a, b) {
+      var c = 4,
+        d;
+      for (d = 0; 8 > d; ++d) c += a[b - 1 + 32 * d];
+      lb(c >> 3, a, b);
+    }
+    function Bf(a, b) {
+      lb(128, a, b);
+    }
+    function ab(a, b, c) {
+      var d = a[b - c],
+        e = a[b + 0],
+        f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],
+        g = mb[112 + ((f + 4) >> 3)];
+      a[b - c] = R[255 + d + mb[112 + ((f + 3) >> 3)]];
+      a[b + 0] = R[255 + e - g];
+    }
+    function jd(a, b, c, d) {
+      var e = a[b + 0],
+        f = a[b + c];
+      return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;
+    }
+    function kd(a, b, c, d) {
+      return (
+        4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d
+      );
+    }
+    function ld(a, b, c, d, e) {
+      var f = a[b - 3 * c],
+        g = a[b - 2 * c],
+        h = a[b - c],
+        k = a[b + 0],
+        l = a[b + c],
+        m = a[b + 2 * c],
+        n = a[b + 3 * c];
+      return 4 * U[255 + h - k] + U[255 + g - l] > d
+        ? 0
+        : U[255 + a[b - 4 * c] - f] <= e &&
+            U[255 + f - g] <= e &&
+            U[255 + g - h] <= e &&
+            U[255 + n - m] <= e &&
+            U[255 + m - l] <= e &&
+            U[255 + l - k] <= e;
+    }
+    function gd(a, b, c, d) {
+      var e = 2 * d + 1;
+      for (d = 0; 16 > d; ++d) kd(a, b + d, c, e) && ab(a, b + d, c);
+    }
+    function hd(a, b, c, d) {
+      var e = 2 * d + 1;
+      for (d = 0; 16 > d; ++d) kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);
+    }
+    function bf(a, b, c, d) {
+      var e;
+      for (e = 3; 0 < e; --e) (b += 4 * c), gd(a, b, c, d);
+    }
+    function cf(a, b, c, d) {
+      var e;
+      for (e = 3; 0 < e; --e) (b += 4), hd(a, b, c, d);
+    }
+    function ea(a, b, c, d, e, f, g, h) {
+      for (f = 2 * f + 1; 0 < e--; ) {
+        if (ld(a, b, c, f, g))
+          if (jd(a, b, c, h)) ab(a, b, c);
+          else {
+            var k = a,
+              l = b,
+              m = c,
+              n = k[l - 2 * m],
+              r = k[l - m],
+              q = k[l + 0],
+              t = k[l + m],
+              v = k[l + 2 * m],
+              p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],
+              u = (27 * p + 63) >> 7,
+              w = (18 * p + 63) >> 7,
+              p = (9 * p + 63) >> 7;
+            k[l - 3 * m] = R[255 + k[l - 3 * m] + p];
+            k[l - 2 * m] = R[255 + n + w];
+            k[l - m] = R[255 + r + u];
+            k[l + 0] = R[255 + q - u];
+            k[l + m] = R[255 + t - w];
+            k[l + 2 * m] = R[255 + v - p];
+          }
+        b += d;
+      }
+    }
+    function Fa(a, b, c, d, e, f, g, h) {
+      for (f = 2 * f + 1; 0 < e--; ) {
+        if (ld(a, b, c, f, g))
+          if (jd(a, b, c, h)) ab(a, b, c);
+          else {
+            var k = a,
+              l = b,
+              m = c,
+              n = k[l - m],
+              r = k[l + 0],
+              q = k[l + m],
+              t = 3 * (r - n),
+              v = mb[112 + ((t + 4) >> 3)],
+              t = mb[112 + ((t + 3) >> 3)],
+              p = (v + 1) >> 1;
+            k[l - 2 * m] = R[255 + k[l - 2 * m] + p];
+            k[l - m] = R[255 + n + t];
+            k[l + 0] = R[255 + r - v];
+            k[l + m] = R[255 + q - p];
+          }
+        b += d;
+      }
+    }
+    function Ue(a, b, c, d, e, f) {
+      ea(a, b, c, 1, 16, d, e, f);
+    }
+    function Ve(a, b, c, d, e, f) {
+      ea(a, b, 1, c, 16, d, e, f);
+    }
+    function Ye(a, b, c, d, e, f) {
+      var g;
+      for (g = 3; 0 < g; --g) (b += 4 * c), Fa(a, b, c, 1, 16, d, e, f);
+    }
+    function Ze(a, b, c, d, e, f) {
+      var g;
+      for (g = 3; 0 < g; --g) (b += 4), Fa(a, b, 1, c, 16, d, e, f);
+    }
+    function We(a, b, c, d, e, f, g, h) {
+      ea(a, b, e, 1, 8, f, g, h);
+      ea(c, d, e, 1, 8, f, g, h);
+    }
+    function Xe(a, b, c, d, e, f, g, h) {
+      ea(a, b, 1, e, 8, f, g, h);
+      ea(c, d, 1, e, 8, f, g, h);
+    }
+    function $e(a, b, c, d, e, f, g, h) {
+      Fa(a, b + 4 * e, e, 1, 8, f, g, h);
+      Fa(c, d + 4 * e, e, 1, 8, f, g, h);
+    }
+    function af(a, b, c, d, e, f, g, h) {
+      Fa(a, b + 4, 1, e, 8, f, g, h);
+      Fa(c, d + 4, 1, e, 8, f, g, h);
+    }
+    function Cf() {
+      this.ba = new Cb();
+      this.ec = [];
+      this.cc = [];
+      this.Mc = [];
+      this.Dc = this.Nc = this.dc = this.fc = 0;
+      this.Oa = new Ud();
+      this.memory = 0;
+      this.Ib = "OutputFunc";
+      this.Jb = "OutputAlphaFunc";
+      this.Nd = "OutputRowFunc";
+    }
+    function md() {
+      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 Df() {
+      this.nc = this.Ea = this.b = this.hc = 0;
+      this.K = [];
+      this.w = 0;
+    }
+    function Ef() {
+      this.ua = 0;
+      this.Wa = new ac();
+      this.vb = new ac();
+      this.md = this.xc = this.wc = 0;
+      this.vc = [];
+      this.Wb = 0;
+      this.Ya = new Ub();
+      this.yc = new O();
+    }
+    function je() {
+      this.xb = this.a = 0;
+      this.l = new Oa();
+      this.ca = new Cb();
+      this.V = [];
+      this.Ba = 0;
+      this.Ta = [];
+      this.Ua = 0;
+      this.m = new Ra();
+      this.Pb = 0;
+      this.wd = new Ra();
+      this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;
+      this.s = new Ef();
+      this.ab = 0;
+      this.gc = wa(4, Df);
+      this.Oc = 0;
+    }
+    function Ff() {
+      this.Lc = this.Z = this.$a = this.i = this.c = 0;
+      this.l = new Oa();
+      this.ic = 0;
+      this.ca = [];
+      this.tb = 0;
+      this.qd = null;
+      this.rd = 0;
+    }
+    function Rb(a, b, c, d, e, f, g) {
+      a = null == a ? 0 : a[b + 0];
+      for (b = 0; b < g; ++b) (e[f + b] = (a + c[d + b]) & 255), (a = e[f + b]);
+    }
+    function Gf(a, b, c, d, e, f, g) {
+      if (null == a) Rb(null, null, c, d, e, f, g);
+      else {
+        var h;
+        for (h = 0; h < g; ++h) e[f + h] = (a[b + h] + c[d + h]) & 255;
+      }
+    }
+    function Hf(a, b, c, d, e, f, g) {
+      if (null == a) Rb(null, null, c, d, e, f, g);
+      else {
+        var h = a[b + 0],
+          k = h,
+          l = h,
+          m;
+        for (m = 0; m < g; ++m)
+          (h = a[b + m]),
+            (k = l + h - k),
+            (l = (c[d + m] + (k & -256 ? (0 > k ? 0 : 255) : k)) & 255),
+            (k = h),
+            (e[f + m] = l);
+      }
+    }
+    function Le(a, b, c, d) {
+      var e = b.width,
+        f = b.o;
+      x(null != a && null != b);
+      if (0 > c || 0 >= d || c + d > f) return null;
+      if (!a.Cc) {
+        if (null == a.ga) {
+          a.ga = new Ff();
+          var g;
+          (g = null == a.ga) ||
+            ((g = b.width * b.o),
+            x(0 == a.Gb.length),
+            (a.Gb = V(g)),
+            (a.Uc = 0),
+            null == a.Gb
+              ? (g = 0)
+              : ((a.mb = a.Gb), (a.nb = a.Uc), (a.rc = null), (g = 1)),
+            (g = !g));
+          if (!g) {
+            g = a.ga;
+            var h = a.Fa,
+              k = a.P,
+              l = a.qc,
+              m = a.mb,
+              n = a.nb,
+              r = k + 1,
+              q = l - 1,
+              t = g.l;
+            x(null != h && null != m && null != b);
+            ia[0] = null;
+            ia[1] = Rb;
+            ia[2] = Gf;
+            ia[3] = Hf;
+            g.ca = m;
+            g.tb = n;
+            g.c = b.width;
+            g.i = b.height;
+            x(0 < g.c && 0 < g.i);
+            if (1 >= l) b = 0;
+            else if (
+              ((g.$a = (h[k + 0] >> 0) & 3),
+              (g.Z = (h[k + 0] >> 2) & 3),
+              (g.Lc = (h[k + 0] >> 4) & 3),
+              (k = (h[k + 0] >> 6) & 3),
+              0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k)
+            )
+              b = 0;
+            else if (
+              ((t.put = kc),
+              (t.ac = gc),
+              (t.bc = lc),
+              (t.ma = g),
+              (t.width = b.width),
+              (t.height = b.height),
+              (t.Da = b.Da),
+              (t.v = b.v),
+              (t.va = b.va),
+              (t.j = b.j),
+              (t.o = b.o),
+              g.$a)
+            )
+              b: {
+                x(1 == g.$a), (b = Bc());
+                c: for (;;) {
+                  if (null == b) {
+                    b = 0;
+                    break b;
+                  }
+                  x(null != g);
+                  g.mc = b;
+                  b.c = g.c;
+                  b.i = g.i;
+                  b.l = g.l;
+                  b.l.ma = g;
+                  b.l.width = g.c;
+                  b.l.height = g.i;
+                  b.a = 0;
+                  cb(b.m, h, r, q);
+                  if (!rb(g.c, g.i, 1, b, null)) break c;
+                  1 == b.ab && 3 == b.gc[0].hc && yc(b.s)
+                    ? ((g.ic = 1),
+                      (h = b.c * b.i),
+                      (b.Ta = null),
+                      (b.Ua = 0),
+                      (b.V = V(h)),
+                      (b.Ba = 0),
+                      null == b.V ? ((b.a = 1), (b = 0)) : (b = 1))
+                    : ((g.ic = 0), (b = Ec(b, g.c)));
+                  if (!b) break c;
+                  b = 1;
+                  break b;
+                }
+                g.mc = null;
+                b = 0;
+              }
+            else b = q >= g.c * g.i;
+            g = !b;
+          }
+          if (g) return null;
+          1 != a.ga.Lc ? (a.Ga = 0) : (d = f - c);
+        }
+        x(null != a.ga);
+        x(c + d <= f);
+        a: {
+          h = a.ga;
+          b = h.c;
+          f = h.l.o;
+          if (0 == h.$a) {
+            r = a.rc;
+            q = a.Vc;
+            t = a.Fa;
+            k = a.P + 1 + c * b;
+            l = a.mb;
+            m = a.nb + c * b;
+            x(k <= a.P + a.qc);
+            if (0 != h.Z)
+              for (x(null != ia[h.Z]), g = 0; g < d; ++g)
+                ia[h.Z](r, q, t, k, l, m, b),
+                  (r = l),
+                  (q = m),
+                  (m += b),
+                  (k += b);
+            else
+              for (g = 0; g < d; ++g)
+                I(l, m, t, k, b), (r = l), (q = m), (m += b), (k += b);
+            a.rc = r;
+            a.Vc = q;
+          } else {
+            x(null != h.mc);
+            b = c + d;
+            g = h.mc;
+            x(null != g);
+            x(b <= g.i);
+            if (g.C >= b) b = 1;
+            else if ((h.ic || Aa(), h.ic)) {
+              var h = g.V,
+                r = g.Ba,
+                q = g.c,
+                v = g.i,
+                t = 1,
+                k = g.$ / q,
+                l = g.$ % q,
+                m = g.m,
+                n = g.s,
+                p = g.$,
+                u = q * v,
+                w = q * b,
+                y = n.wc,
+                A = p < w ? ha(n, l, k) : null;
+              x(p <= u);
+              x(b <= v);
+              x(yc(n));
+              c: for (;;) {
+                for (; !m.h && p < w; ) {
+                  l & y || (A = ha(n, l, k));
+                  x(null != A);
+                  Sa(m);
+                  v = ua(A.G[0], A.H[0], m);
+                  if (256 > v)
+                    (h[r + p] = v),
+                      ++p,
+                      ++l,
+                      l >= q && ((l = 0), ++k, k <= b && !(k % 16) && Ib(g, k));
+                  else if (280 > v) {
+                    var v = ib(v - 256, m);
+                    var E = ua(A.G[4], A.H[4], m);
+                    Sa(m);
+                    E = ib(E, m);
+                    E = nc(q, E);
+                    if (p >= E && u - p >= v) {
+                      var B;
+                      for (B = 0; B < v; ++B) h[r + p + B] = h[r + p + B - E];
+                    } else {
+                      t = 0;
+                      break c;
+                    }
+                    p += v;
+                    for (l += v; l >= q; )
+                      (l -= q), ++k, k <= b && !(k % 16) && Ib(g, k);
+                    p < w && l & y && (A = ha(n, l, k));
+                  } else {
+                    t = 0;
+                    break c;
+                  }
+                  x(m.h == db(m));
+                }
+                Ib(g, k > b ? b : k);
+                break c;
+              }
+              !t || (m.h && p < u) ? ((t = 0), (g.a = m.h ? 5 : 3)) : (g.$ = p);
+              b = t;
+            } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);
+            if (!b) {
+              d = 0;
+              break a;
+            }
+          }
+          c + d >= f && (a.Cc = 1);
+          d = 1;
+        }
+        if (!d) return null;
+        if (
+          a.Cc &&
+          ((d = a.ga), null != d && (d.mc = null), (a.ga = null), 0 < a.Ga)
+        )
+          return alert("todo:WebPDequantizeLevels"), null;
+      }
+      return a.nb + c * e;
+    }
+    function If(a, b, c, d, e, f) {
+      for (; 0 < e--; ) {
+        var g = a,
+          h = b + (c ? 1 : 0),
+          k = a,
+          l = b + (c ? 0 : 3),
+          m;
+        for (m = 0; m < d; ++m) {
+          var n = k[l + 4 * m];
+          255 != n &&
+            ((n *= 32897),
+            (g[h + 4 * m + 0] = (g[h + 4 * m + 0] * n) >> 23),
+            (g[h + 4 * m + 1] = (g[h + 4 * m + 1] * n) >> 23),
+            (g[h + 4 * m + 2] = (g[h + 4 * m + 2] * n) >> 23));
+        }
+        b += f;
+      }
+    }
+    function Jf(a, b, c, d, e) {
+      for (; 0 < d--; ) {
+        var f;
+        for (f = 0; f < c; ++f) {
+          var g = a[b + 2 * f + 0],
+            h = a[b + 2 * f + 1],
+            k = h & 15,
+            l = 4369 * k,
+            h = (((h & 240) | (h >> 4)) * l) >> 16;
+          a[b + 2 * f + 0] =
+            (((((g & 240) | (g >> 4)) * l) >> 16) & 240) |
+            ((((((g & 15) | (g << 4)) * l) >> 16) >> 4) & 15);
+          a[b + 2 * f + 1] = (h & 240) | k;
+        }
+        b += e;
+      }
+    }
+    function Kf(a, b, c, d, e, f, g, h) {
+      var k = 255,
+        l,
+        m;
+      for (m = 0; m < e; ++m) {
+        for (l = 0; l < d; ++l) {
+          var n = a[b + l];
+          f[g + 4 * l] = n;
+          k &= n;
+        }
+        b += c;
+        g += h;
+      }
+      return 255 != k;
+    }
+    function Lf(a, b, c, d, e) {
+      var f;
+      for (f = 0; f < e; ++f) c[d + f] = a[b + f] >> 8;
+    }
+    function Aa() {
+      za = If;
+      vc = Jf;
+      fc = Kf;
+      Fc = Lf;
+    }
+    function va(a, b, c) {
+      self[a] = function(a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {
+        var d,
+          E = (y - 1) >> 1;
+        var B = h[k + 0] | (l[m + 0] << 16);
+        var C = n[r + 0] | (q[t + 0] << 16);
+        x(null != a);
+        var z = (3 * B + C + 131074) >> 2;
+        b(a[e + 0], z & 255, z >> 16, v, p);
+        null != f &&
+          ((z = (3 * C + B + 131074) >> 2),
+          b(f[g + 0], z & 255, z >> 16, u, w));
+        for (d = 1; d <= E; ++d) {
+          var D = h[k + d] | (l[m + d] << 16);
+          var G = n[r + d] | (q[t + d] << 16);
+          var F = B + D + C + G + 524296;
+          var H = (F + 2 * (D + C)) >> 3;
+          F = (F + 2 * (B + G)) >> 3;
+          z = (H + B) >> 1;
+          B = (F + D) >> 1;
+          b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);
+          b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);
+          null != f &&
+            ((z = (F + C) >> 1),
+            (B = (H + G) >> 1),
+            b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c),
+            b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));
+          B = D;
+          C = G;
+        }
+        y & 1 ||
+          ((z = (3 * B + C + 131074) >> 2),
+          b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c),
+          null != f &&
+            ((z = (3 * C + B + 131074) >> 2),
+            b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));
+      };
+    }
+    function ic() {
+      P[Ca] = Mf;
+      P[Ua] = nd;
+      P[tc] = Nf;
+      P[Va] = od;
+      P[ya] = pd;
+      P[Db] = qd;
+      P[wc] = Of;
+      P[zb] = nd;
+      P[Ab] = od;
+      P[Ja] = pd;
+      P[Bb] = qd;
+    }
+    function Sb(a) {
+      return a & ~Pf ? (0 > a ? 0 : 255) : a >> rd;
+    }
+    function bb(a, b) {
+      return Sb(((19077 * a) >> 8) + ((26149 * b) >> 8) - 14234);
+    }
+    function nb(a, b, c) {
+      return Sb(
+        ((19077 * a) >> 8) - ((6419 * b) >> 8) - ((13320 * c) >> 8) + 8708
+      );
+    }
+    function Pa(a, b) {
+      return Sb(((19077 * a) >> 8) + ((33050 * b) >> 8) - 17685);
+    }
+    function Ga(a, b, c, d, e) {
+      d[e + 0] = bb(a, c);
+      d[e + 1] = nb(a, b, c);
+      d[e + 2] = Pa(a, b);
+    }
+    function Tb(a, b, c, d, e) {
+      d[e + 0] = Pa(a, b);
+      d[e + 1] = nb(a, b, c);
+      d[e + 2] = bb(a, c);
+    }
+    function sd(a, b, c, d, e) {
+      var f = nb(a, b, c);
+      b = ((f << 3) & 224) | (Pa(a, b) >> 3);
+      d[e + 0] = (bb(a, c) & 248) | (f >> 5);
+      d[e + 1] = b;
+    }
+    function td(a, b, c, d, e) {
+      var f = (Pa(a, b) & 240) | 15;
+      d[e + 0] = (bb(a, c) & 240) | (nb(a, b, c) >> 4);
+      d[e + 1] = f;
+    }
+    function ud(a, b, c, d, e) {
+      d[e + 0] = 255;
+      Ga(a, b, c, d, e + 1);
+    }
+    function vd(a, b, c, d, e) {
+      Tb(a, b, c, d, e);
+      d[e + 3] = 255;
+    }
+    function wd(a, b, c, d, e) {
+      Ga(a, b, c, d, e);
+      d[e + 3] = 255;
+    }
+    function ga(a, b) {
+      return 0 > a ? 0 : a > b ? b : a;
+    }
+    function la(a, b, c) {
+      self[a] = function(a, e, f, g, h, k, l, m, n) {
+        for (var d = m + (n & -2) * c; m != d; )
+          b(a[e + 0], f[g + 0], h[k + 0], l, m),
+            b(a[e + 1], f[g + 0], h[k + 0], l, m + c),
+            (e += 2),
+            ++g,
+            ++k,
+            (m += 2 * c);
+        n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);
+      };
+    }
+    function xd(a, b, c) {
+      return 0 == c ? (0 == a ? (0 == b ? 6 : 5) : 0 == b ? 4 : 0) : c;
+    }
+    function yd(a, b, c, d, e) {
+      switch (a >>> 30) {
+        case 3:
+          Za(b, c, d, e, 0);
+          break;
+        case 2:
+          fd(b, c, d, e);
+          break;
+        case 1:
+          pa(b, c, d, e);
+      }
+    }
+    function Oc(a, b) {
+      var c,
+        d,
+        e = b.M,
+        f = b.Nb,
+        g = a.oc,
+        h = a.pc + 40,
+        k = a.oc,
+        l = a.pc + 584,
+        m = a.oc,
+        n = a.pc + 600;
+      for (c = 0; 16 > c; ++c) g[h + 32 * c - 1] = 129;
+      for (c = 0; 8 > c; ++c)
+        (k[l + 32 * c - 1] = 129), (m[n + 32 * c - 1] = 129);
+      0 < e
+        ? (g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129)
+        : (M(g, h - 32 - 1, 127, 21),
+          M(k, l - 32 - 1, 127, 9),
+          M(m, n - 32 - 1, 127, 9));
+      for (d = 0; d < a.za; ++d) {
+        var r = b.ya[b.aa + d];
+        if (0 < d) {
+          for (c = -1; 16 > c; ++c) I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);
+          for (c = -1; 8 > c; ++c)
+            I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4),
+              I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);
+        }
+        var q = a.Gd,
+          t = a.Hd + d,
+          v = r.ad,
+          p = r.Hc;
+        0 < e &&
+          (I(g, h - 32, q[t].y, 0, 16),
+          I(k, l - 32, q[t].f, 0, 8),
+          I(m, n - 32, q[t].ea, 0, 8));
+        if (r.Za) {
+          var u = g;
+          var w = h - 32 + 16;
+          0 < e &&
+            (d >= a.za - 1
+              ? M(u, w, q[t].y[15], 4)
+              : I(u, w, q[t + 1].y, 0, 4));
+          for (c = 0; 4 > c; c++)
+            u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];
+          for (c = 0; 16 > c; ++c, p <<= 2)
+            (u = g), (w = h + zd[c]), W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);
+        } else if (((u = xd(d, e, r.Ob[0])), Y[u](g, h), 0 != p))
+          for (c = 0; 16 > c; ++c, p <<= 2) yd(p, v, 16 * +c, g, h + zd[c]);
+        c = r.Gc;
+        u = xd(d, e, r.Dd);
+        ka[u](k, l);
+        ka[u](m, n);
+        r = c >> 0;
+        p = v;
+        u = k;
+        w = l;
+        r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));
+        c >>= 8;
+        r = m;
+        p = n;
+        c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));
+        e < a.Ub - 1 &&
+          (I(q[t].y, 0, g, h + 480, 16),
+          I(q[t].f, 0, k, l + 224, 8),
+          I(q[t].ea, 0, m, n + 224, 8));
+        c = 8 * f * a.B;
+        q = a.sa;
+        t = a.ta + 16 * d + 16 * f * a.R;
+        v = a.qa;
+        r = a.ra + 8 * d + c;
+        p = a.Ha;
+        u = a.Ia + 8 * d + c;
+        for (c = 0; 16 > c; ++c) I(q, t + c * a.R, g, h + 32 * c, 16);
+        for (c = 0; 8 > c; ++c)
+          I(v, r + c * a.B, k, l + 32 * c, 8),
+            I(p, u + c * a.B, m, n + 32 * c, 8);
+      }
+    }
+    function Ad(a, b, c, d, e, f, g, h, k) {
+      var l = [0],
+        m = [0],
+        n = 0,
+        r = null != k ? k.kd : 0,
+        q = null != k ? k : new md();
+      if (null == a || 12 > c) return 7;
+      q.data = a;
+      q.w = b;
+      q.ha = c;
+      b = [b];
+      c = [c];
+      q.gb = [q.gb];
+      a: {
+        var t = b;
+        var v = c;
+        var p = q.gb;
+        x(null != a);
+        x(null != v);
+        x(null != p);
+        p[0] = 0;
+        if (12 <= v[0] && !fa(a, t[0], "RIFF")) {
+          if (fa(a, t[0] + 8, "WEBP")) {
+            p = 3;
+            break a;
+          }
+          var u = Ha(a, t[0] + 4);
+          if (12 > u || 4294967286 < u) {
+            p = 3;
+            break a;
+          }
+          if (r && u > v[0] - 8) {
+            p = 7;
+            break a;
+          }
+          p[0] = u;
+          t[0] += 12;
+          v[0] -= 12;
+        }
+        p = 0;
+      }
+      if (0 != p) return p;
+      u = 0 < q.gb[0];
+      for (c = c[0]; ; ) {
+        t = [0];
+        n = [n];
+        a: {
+          var w = a;
+          v = b;
+          p = c;
+          var y = n,
+            A = l,
+            z = m,
+            B = t;
+          y[0] = 0;
+          if (8 > p[0]) p = 7;
+          else {
+            if (!fa(w, v[0], "VP8X")) {
+              if (10 != Ha(w, v[0] + 4)) {
+                p = 3;
+                break a;
+              }
+              if (18 > p[0]) {
+                p = 7;
+                break a;
+              }
+              var C = Ha(w, v[0] + 8);
+              var D = 1 + Yb(w, v[0] + 12);
+              w = 1 + Yb(w, v[0] + 15);
+              if (2147483648 <= D * w) {
+                p = 3;
+                break a;
+              }
+              null != B && (B[0] = C);
+              null != A && (A[0] = D);
+              null != z && (z[0] = w);
+              v[0] += 18;
+              p[0] -= 18;
+              y[0] = 1;
+            }
+            p = 0;
+          }
+        }
+        n = n[0];
+        t = t[0];
+        if (0 != p) return p;
+        v = !!(t & 2);
+        if (!u && n) return 3;
+        null != f && (f[0] = !!(t & 16));
+        null != g && (g[0] = v);
+        null != h && (h[0] = 0);
+        g = l[0];
+        t = m[0];
+        if (n && v && null == k) {
+          p = 0;
+          break;
+        }
+        if (4 > c) {
+          p = 7;
+          break;
+        }
+        if ((u && n) || (!u && !n && !fa(a, b[0], "ALPH"))) {
+          c = [c];
+          q.na = [q.na];
+          q.P = [q.P];
+          q.Sa = [q.Sa];
+          a: {
+            C = a;
+            p = b;
+            u = c;
+            var y = q.gb,
+              A = q.na,
+              z = q.P,
+              B = q.Sa;
+            D = 22;
+            x(null != C);
+            x(null != u);
+            w = p[0];
+            var F = u[0];
+            x(null != A);
+            x(null != B);
+            A[0] = null;
+            z[0] = null;
+            for (B[0] = 0; ; ) {
+              p[0] = w;
+              u[0] = F;
+              if (8 > F) {
+                p = 7;
+                break a;
+              }
+              var G = Ha(C, w + 4);
+              if (4294967286 < G) {
+                p = 3;
+                break a;
+              }
+              var H = (8 + G + 1) & -2;
+              D += H;
+              if (0 < y && D > y) {
+                p = 3;
+                break a;
+              }
+              if (!fa(C, w, "VP8 ") || !fa(C, w, "VP8L")) {
+                p = 0;
+                break a;
+              }
+              if (F[0] < H) {
+                p = 7;
+                break a;
+              }
+              fa(C, w, "ALPH") || ((A[0] = C), (z[0] = w + 8), (B[0] = G));
+              w += H;
+              F -= H;
+            }
+          }
+          c = c[0];
+          q.na = q.na[0];
+          q.P = q.P[0];
+          q.Sa = q.Sa[0];
+          if (0 != p) break;
+        }
+        c = [c];
+        q.Ja = [q.Ja];
+        q.xa = [q.xa];
+        a: if (
+          ((y = a),
+          (p = b),
+          (u = c),
+          (A = q.gb[0]),
+          (z = q.Ja),
+          (B = q.xa),
+          (C = p[0]),
+          (w = !fa(y, C, "VP8 ")),
+          (D = !fa(y, C, "VP8L")),
+          x(null != y),
+          x(null != u),
+          x(null != z),
+          x(null != B),
+          8 > u[0])
+        )
+          p = 7;
+        else {
+          if (w || D) {
+            y = Ha(y, C + 4);
+            if (12 <= A && y > A - 12) {
+              p = 3;
+              break a;
+            }
+            if (r && y > u[0] - 8) {
+              p = 7;
+              break a;
+            }
+            z[0] = y;
+            p[0] += 8;
+            u[0] -= 8;
+            B[0] = D;
+          } else
+            (B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5)),
+              (z[0] = u[0]);
+          p = 0;
+        }
+        c = c[0];
+        q.Ja = q.Ja[0];
+        q.xa = q.xa[0];
+        b = b[0];
+        if (0 != p) break;
+        if (4294967286 < q.Ja) return 3;
+        null == h || v || (h[0] = q.xa ? 2 : 1);
+        g = [g];
+        t = [t];
+        if (q.xa) {
+          if (5 > c) {
+            p = 7;
+            break;
+          }
+          h = g;
+          r = t;
+          v = f;
+          null == a || 5 > c
+            ? (a = 0)
+            : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5)
+            ? ((u = [0]),
+              (y = [0]),
+              (A = [0]),
+              (z = new Ra()),
+              cb(z, a, b, c),
+              mc(z, u, y, A)
+                ? (null != h && (h[0] = u[0]),
+                  null != r && (r[0] = y[0]),
+                  null != v && (v[0] = A[0]),
+                  (a = 1))
+                : (a = 0))
+            : (a = 0);
+        } else {
+          if (10 > c) {
+            p = 7;
+            break;
+          }
+          h = t;
+          null == a || 10 > c || !Jc(a, b + 3, c - 3)
+            ? (a = 0)
+            : ((r = a[b + 0] | (a[b + 1] << 8) | (a[b + 2] << 16)),
+              (v = ((a[b + 7] << 8) | a[b + 6]) & 16383),
+              (a = ((a[b + 9] << 8) | a[b + 8]) & 16383),
+              r & 1 ||
+              3 < ((r >> 1) & 7) ||
+              !((r >> 4) & 1) ||
+              r >> 5 >= q.Ja ||
+              !v ||
+              !a
+                ? (a = 0)
+                : (g && (g[0] = v), h && (h[0] = a), (a = 1)));
+        }
+        if (!a) return 3;
+        g = g[0];
+        t = t[0];
+        if (n && (l[0] != g || m[0] != t)) return 3;
+        null != k &&
+          ((k[0] = q),
+          (k.offset = b - k.w),
+          x(4294967286 > b - k.w),
+          x(k.offset == k.ha - c));
+        break;
+      }
+      return 0 == p || (7 == p && n && null == k)
+        ? (null != f && (f[0] |= null != q.na && 0 < q.na.length),
+          null != d && (d[0] = g),
+          null != e && (e[0] = t),
+          0)
+        : p;
+    }
+    function hc(a, b, c) {
+      var d = b.width,
+        e = b.height,
+        f = 0,
+        g = 0,
+        h = d,
+        k = e;
+      b.Da = null != a && 0 < a.Da;
+      if (
+        b.Da &&
+        ((h = a.cd),
+        (k = a.bd),
+        (f = a.v),
+        (g = a.j),
+        11 > c || ((f &= -2), (g &= -2)),
+        0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)
+      )
+        return 0;
+      b.v = f;
+      b.j = g;
+      b.va = f + h;
+      b.o = g + k;
+      b.U = h;
+      b.T = k;
+      b.da = null != a && 0 < a.da;
+      if (b.da) {
+        c = [a.ib];
+        f = [a.hb];
+        if (!bc(h, k, c, f)) return 0;
+        b.ib = c[0];
+        b.hb = f[0];
+      }
+      b.ob = null != a && a.ob;
+      b.Kb = null == a || !a.Sd;
+      b.da && ((b.ob = b.ib < (3 * d) / 4 && b.hb < (3 * e) / 4), (b.Kb = 0));
+      return 1;
+    }
+    function Bd(a) {
+      if (null == a) return 2;
+      if (11 > a.S) {
+        var b = a.f.RGBA;
+        b.fb += (a.height - 1) * b.A;
+        b.A = -b.A;
+      } else
+        (b = a.f.kb),
+          (a = a.height),
+          (b.O += (a - 1) * b.fa),
+          (b.fa = -b.fa),
+          (b.N += ((a - 1) >> 1) * b.Ab),
+          (b.Ab = -b.Ab),
+          (b.W += ((a - 1) >> 1) * b.Db),
+          (b.Db = -b.Db),
+          null != b.F && ((b.J += (a - 1) * b.lb), (b.lb = -b.lb));
+      return 0;
+    }
+    function Cd(a, b, c, d) {
+      if (null == d || 0 >= a || 0 >= b) return 2;
+      if (null != c) {
+        if (c.Da) {
+          var e = c.cd,
+            f = c.bd,
+            g = c.v & -2,
+            h = c.j & -2;
+          if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b)
+            return 2;
+          a = e;
+          b = f;
+        }
+        if (c.da) {
+          e = [c.ib];
+          f = [c.hb];
+          if (!bc(a, b, e, f)) return 2;
+          a = e[0];
+          b = f[0];
+        }
+      }
+      d.width = a;
+      d.height = b;
+      a: {
+        var k = d.width;
+        var l = d.height;
+        a = d.S;
+        if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;
+        else {
+          if (0 >= d.Rd && null == d.sd) {
+            var g = (f = e = b = 0),
+              h = k * Dd[a],
+              m = h * l;
+            11 > a ||
+              ((b = (k + 1) / 2),
+              (f = ((l + 1) / 2) * b),
+              12 == a && ((e = k), (g = e * l)));
+            l = V(m + 2 * f + g);
+            if (null == l) {
+              a = 1;
+              break a;
+            }
+            d.sd = l;
+            11 > a
+              ? ((k = d.f.RGBA),
+                (k.eb = l),
+                (k.fb = 0),
+                (k.A = h),
+                (k.size = m))
+              : ((k = d.f.kb),
+                (k.y = l),
+                (k.O = 0),
+                (k.fa = h),
+                (k.Fd = m),
+                (k.f = l),
+                (k.N = 0 + m),
+                (k.Ab = b),
+                (k.Cd = f),
+                (k.ea = l),
+                (k.W = 0 + m + f),
+                (k.Db = b),
+                (k.Ed = f),
+                12 == a && ((k.F = l), (k.J = 0 + m + 2 * f)),
+                (k.Tc = g),
+                (k.lb = e));
+          }
+          b = 1;
+          e = d.S;
+          f = d.width;
+          g = d.height;
+          if (e >= Ca && 13 > e)
+            if (11 > e)
+              (a = d.f.RGBA),
+                (h = Math.abs(a.A)),
+                (b &= h * (g - 1) + f <= a.size),
+                (b &= h >= f * Dd[e]),
+                (b &= null != a.eb);
+            else {
+              a = d.f.kb;
+              h = (f + 1) / 2;
+              m = (g + 1) / 2;
+              k = Math.abs(a.fa);
+              var l = Math.abs(a.Ab),
+                n = Math.abs(a.Db),
+                r = Math.abs(a.lb),
+                q = r * (g - 1) + f;
+              b &= k * (g - 1) + f <= a.Fd;
+              b &= l * (m - 1) + h <= a.Cd;
+              b &= n * (m - 1) + h <= a.Ed;
+              b = b & (k >= f) & (l >= h) & (n >= h);
+              b &= null != a.y;
+              b &= null != a.f;
+              b &= null != a.ea;
+              12 == e && ((b &= r >= f), (b &= q <= a.Tc), (b &= null != a.F));
+            }
+          else b = 0;
+          a = b ? 0 : 2;
+        }
+      }
+      if (0 != a) return a;
+      null != c && c.fd && (a = Bd(d));
+      return a;
+    }
+    var xb = 64,
+      Hd = [
+        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
+      ],
+      Gd = 24,
+      ob = 32,
+      Xb = 8,
+      Id = [
+        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
+      ];
+    X("Predictor0", "PredictorAdd0");
+    self.Predictor0 = function() {
+      return 4278190080;
+    };
+    self.Predictor1 = function(a) {
+      return a;
+    };
+    self.Predictor2 = function(a, b, c) {
+      return b[c + 0];
+    };
+    self.Predictor3 = function(a, b, c) {
+      return b[c + 1];
+    };
+    self.Predictor4 = function(a, b, c) {
+      return b[c - 1];
+    };
+    self.Predictor5 = function(a, b, c) {
+      return aa(aa(a, b[c + 1]), b[c + 0]);
+    };
+    self.Predictor6 = function(a, b, c) {
+      return aa(a, b[c - 1]);
+    };
+    self.Predictor7 = function(a, b, c) {
+      return aa(a, b[c + 0]);
+    };
+    self.Predictor8 = function(a, b, c) {
+      return aa(b[c - 1], b[c + 0]);
+    };
+    self.Predictor9 = function(a, b, c) {
+      return aa(b[c + 0], b[c + 1]);
+    };
+    self.Predictor10 = function(a, b, c) {
+      return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));
+    };
+    self.Predictor11 = function(a, b, c) {
+      var d = b[c + 0];
+      b = b[c - 1];
+      return 0 >=
+        Ia((d >> 24) & 255, (a >> 24) & 255, (b >> 24) & 255) +
+          Ia((d >> 16) & 255, (a >> 16) & 255, (b >> 16) & 255) +
+          Ia((d >> 8) & 255, (a >> 8) & 255, (b >> 8) & 255) +
+          Ia(d & 255, a & 255, b & 255)
+        ? d
+        : a;
+    };
+    self.Predictor12 = function(a, b, c) {
+      var d = b[c + 0];
+      b = b[c - 1];
+      return (
+        ((sa(((a >> 24) & 255) + ((d >> 24) & 255) - ((b >> 24) & 255)) << 24) |
+          (sa(((a >> 16) & 255) + ((d >> 16) & 255) - ((b >> 16) & 255)) <<
+            16) |
+          (sa(((a >> 8) & 255) + ((d >> 8) & 255) - ((b >> 8) & 255)) << 8) |
+          sa((a & 255) + (d & 255) - (b & 255))) >>>
+        0
+      );
+    };
+    self.Predictor13 = function(a, b, c) {
+      var d = b[c - 1];
+      a = aa(a, b[c + 0]);
+      return (
+        ((eb((a >> 24) & 255, (d >> 24) & 255) << 24) |
+          (eb((a >> 16) & 255, (d >> 16) & 255) << 16) |
+          (eb((a >> 8) & 255, (d >> 8) & 255) << 8) |
+          eb((a >> 0) & 255, (d >> 0) & 255)) >>>
+        0
+      );
+    };
+    var ee = self.PredictorAdd0;
+    self.PredictorAdd1 = cc;
+    X("Predictor2", "PredictorAdd2");
+    X("Predictor3", "PredictorAdd3");
+    X("Predictor4", "PredictorAdd4");
+    X("Predictor5", "PredictorAdd5");
+    X("Predictor6", "PredictorAdd6");
+    X("Predictor7", "PredictorAdd7");
+    X("Predictor8", "PredictorAdd8");
+    X("Predictor9", "PredictorAdd9");
+    X("Predictor10", "PredictorAdd10");
+    X("Predictor11", "PredictorAdd11");
+    X("Predictor12", "PredictorAdd12");
+    X("Predictor13", "PredictorAdd13");
+    var fe = self.PredictorAdd2;
+    ec(
+      "ColorIndexInverseTransform",
+      "MapARGB",
+      "32b",
+      function(a) {
+        return (a >> 8) & 255;
+      },
+      function(a) {
+        return a;
+      }
+    );
+    ec(
+      "VP8LColorIndexInverseTransformAlpha",
+      "MapAlpha",
+      "8b",
+      function(a) {
+        return a;
+      },
+      function(a) {
+        return (a >> 8) & 255;
+      }
+    );
+    var rc = self.ColorIndexInverseTransform,
+      ke = self.MapARGB,
+      he = self.VP8LColorIndexInverseTransformAlpha,
+      le = self.MapAlpha,
+      pc,
+      qc = (self.VP8LPredictorsAdd = []);
+    qc.length = 16;
+    (self.VP8LPredictors = []).length = 16;
+    (self.VP8LPredictorsAdd_C = []).length = 16;
+    (self.VP8LPredictors_C = []).length = 16;
+    var Fb,
+      sc,
+      Gb,
+      Hb,
+      xc,
+      uc,
+      bd = V(511),
+      cd = V(2041),
+      dd = V(225),
+      ed = V(767),
+      ad = 0,
+      Qb = cd,
+      mb = dd,
+      R = ed,
+      U = bd,
+      Ca = 0,
+      Ua = 1,
+      tc = 2,
+      Va = 3,
+      ya = 4,
+      Db = 5,
+      wc = 6,
+      zb = 7,
+      Ab = 8,
+      Ja = 9,
+      Bb = 10,
+      pe = [2, 3, 7],
+      oe = [3, 3, 11],
+      Dc = [280, 256, 256, 256, 40],
+      qe = [0, 1, 1, 1, 0],
+      ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
+      de = [
+        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
+      ],
+      me = [
+        2954,
+        2956,
+        2958,
+        2962,
+        2970,
+        2986,
+        3018,
+        3082,
+        3212,
+        3468,
+        3980,
+        5004
+      ],
+      ie = 8,
+      Lb = [
+        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
+      ],
+      Mb = [
+        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
+      ],
+      oa = null,
+      He = [
+        [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]
+      ],
+      Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],
+      Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],
+      Fe = [
+        [
+          [
+            [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]
+          ]
+        ]
+      ],
+      Ke = [
+        [
+          [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]
+        ]
+      ],
+      Ee = [
+        [
+          [
+            [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]
+          ]
+        ]
+      ],
+      Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],
+      Nc,
+      Y = [],
+      W = [],
+      ka = [],
+      Za,
+      fd,
+      Nb,
+      pa,
+      Ob,
+      Xc,
+      Tc,
+      Yc,
+      Uc,
+      Zc,
+      Vc,
+      $c,
+      Wc,
+      Rc,
+      Pc,
+      Sc,
+      Qc,
+      re = 1,
+      Cc = 2,
+      ia = [],
+      za,
+      vc,
+      fc,
+      Fc,
+      P = [];
+    va("UpsampleRgbLinePair", Ga, 3);
+    va("UpsampleBgrLinePair", Tb, 3);
+    va("UpsampleRgbaLinePair", wd, 4);
+    va("UpsampleBgraLinePair", vd, 4);
+    va("UpsampleArgbLinePair", ud, 4);
+    va("UpsampleRgba4444LinePair", td, 2);
+    va("UpsampleRgb565LinePair", sd, 2);
+    var Mf = self.UpsampleRgbLinePair,
+      Nf = self.UpsampleBgrLinePair,
+      nd = self.UpsampleRgbaLinePair,
+      od = self.UpsampleBgraLinePair,
+      pd = self.UpsampleArgbLinePair,
+      qd = self.UpsampleRgba4444LinePair,
+      Of = self.UpsampleRgb565LinePair,
+      Wa = 16,
+      Ba = 1 << (Wa - 1),
+      ta = -227,
+      Eb = 482,
+      rd = 6,
+      Pf = (256 << rd) - 1,
+      jc = 0,
+      Yd = V(256),
+      ae = V(256),
+      $d = V(256),
+      Zd = V(256),
+      be = V(Eb - ta),
+      ce = V(Eb - ta);
+    la("YuvToRgbRow", Ga, 3);
+    la("YuvToBgrRow", Tb, 3);
+    la("YuvToRgbaRow", wd, 4);
+    la("YuvToBgraRow", vd, 4);
+    la("YuvToArgbRow", ud, 4);
+    la("YuvToRgba4444Row", td, 2);
+    la("YuvToRgb565Row", sd, 2);
+    var zd = [
+        0,
+        4,
+        8,
+        12,
+        128,
+        132,
+        136,
+        140,
+        256,
+        260,
+        264,
+        268,
+        384,
+        388,
+        392,
+        396
+      ],
+      Ya = [0, 2, 8],
+      Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],
+      Ne = 1;
+    this.WebPDecodeRGBA = function(a, b, c, d, e) {
+      var f = Ua;
+      var g = new Cf(),
+        h = new Cb();
+      g.ba = h;
+      h.S = f;
+      h.width = [h.width];
+      h.height = [h.height];
+      var k = h.width;
+      var l = h.height,
+        m = new Td();
+      if (null == m || null == a) var n = 2;
+      else
+        x(null != m),
+          (n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null));
+      0 != n
+        ? (k = 0)
+        : (null != k && (k[0] = m.width[0]),
+          null != l && (l[0] = m.height[0]),
+          (k = 1));
+      if (k) {
+        h.width = h.width[0];
+        h.height = h.height[0];
+        null != d && (d[0] = h.width);
+        null != e && (e[0] = h.height);
+        b: {
+          d = new Oa();
+          e = new md();
+          e.data = a;
+          e.w = b;
+          e.ha = c;
+          e.kd = 1;
+          b = [0];
+          x(null != e);
+          a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);
+          (0 == a || 7 == a) && b[0] && (a = 4);
+          b = a;
+          if (0 == b) {
+            x(null != g);
+            d.data = e.data;
+            d.w = e.w + e.offset;
+            d.ha = e.ha - e.offset;
+            d.put = kc;
+            d.ac = gc;
+            d.bc = lc;
+            d.ma = g;
+            if (e.xa) {
+              a = Bc();
+              if (null == a) {
+                g = 1;
+                break b;
+              }
+              if (te(a, d)) {
+                b = Cd(d.width, d.height, g.Oa, g.ba);
+                if ((d = 0 == b)) {
+                  c: {
+                    d = a;
+                    d: for (;;) {
+                      if (null == d) {
+                        d = 0;
+                        break c;
+                      }
+                      x(null != d.s.yc);
+                      x(null != d.s.Ya);
+                      x(0 < d.s.Wb);
+                      c = d.l;
+                      x(null != c);
+                      e = c.ma;
+                      x(null != e);
+                      if (0 != d.xb) {
+                        d.ca = e.ba;
+                        d.tb = e.tb;
+                        x(null != d.ca);
+                        if (!hc(e.Oa, c, Va)) {
+                          d.a = 2;
+                          break d;
+                        }
+                        if (!Ec(d, c.width)) break d;
+                        if (c.da) break d;
+                        (c.da || hb(d.ca.S)) && Aa();
+                        11 > d.ca.S ||
+                          (alert("todo:WebPInitConvertARGBToYUV"),
+                          null != d.ca.f.kb.F && Aa());
+                        if (
+                          d.Pb &&
+                          0 < d.s.ua &&
+                          null == d.s.vb.X &&
+                          !Zb(d.s.vb, d.s.Wa.Xa)
+                        ) {
+                          d.a = 1;
+                          break d;
+                        }
+                        d.xb = 0;
+                      }
+                      if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;
+                      e.Dc = d.Ma;
+                      d = 1;
+                      break c;
+                    }
+                    x(0 != d.a);
+                    d = 0;
+                  }
+                  d = !d;
+                }
+                d && (b = a.a);
+              } else b = a.a;
+            } else {
+              a = new Ce();
+              if (null == a) {
+                g = 1;
+                break b;
+              }
+              a.Fa = e.na;
+              a.P = e.P;
+              a.qc = e.Sa;
+              if (Kc(a, d)) {
+                if (((b = Cd(d.width, d.height, g.Oa, g.ba)), 0 == b)) {
+                  a.Aa = 0;
+                  c = g.Oa;
+                  e = a;
+                  x(null != e);
+                  if (null != c) {
+                    k = c.Md;
+                    k = 0 > k ? 0 : 100 < k ? 255 : (255 * k) / 100;
+                    if (0 < k) {
+                      for (l = m = 0; 4 > l; ++l)
+                        (n = e.pb[l]),
+                          12 > n.lc &&
+                            (n.ia = (k * Qf[0 > n.lc ? 0 : n.lc]) >> 3),
+                          (m |= n.ia);
+                      m && (alert("todo:VP8InitRandom"), (e.ia = 1));
+                    }
+                    e.Ga = c.Id;
+                    100 < e.Ga ? (e.Ga = 100) : 0 > e.Ga && (e.Ga = 0);
+                  }
+                  Me(a, d) || (b = a.a);
+                }
+              } else b = a.a;
+            }
+            0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));
+          }
+          g = b;
+        }
+        f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;
+      } else f = null;
+      return f;
+    };
+    var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];
+  };
+  new _WebPDecoder();
+
+  /** @license
+   * Copyright (c) 2017 Dominik Homberger
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+https://webpjs.appspot.com
+WebPRiffParser dominikhlbg@gmail.com
+*/
+
+  function memcmp(data, data_off, str, size) {
+    for (var i = 0; i < size; i++)
+      if (data[data_off + i] != str.charCodeAt(i)) return true;
+    return false;
+  }
+
+  function GetTag(data, data_off) {
+    var str = "";
+    for (var i = 0; i < 4; i++) str += String.fromCharCode(data[data_off++]);
+    return str;
+  }
+
+  function GetLE16(data, data_off) {
+    return (data[data_off + 0] << 0) | (data[data_off + 1] << 8);
+  }
+
+  function GetLE24(data, data_off) {
+    return (
+      ((data[data_off + 0] << 0) |
+        (data[data_off + 1] << 8) |
+        (data[data_off + 2] << 16)) >>>
+      0
+    );
+  }
+
+  function GetLE32(data, data_off) {
+    return (
+      ((data[data_off + 0] << 0) |
+        (data[data_off + 1] << 8) |
+        (data[data_off + 2] << 16) |
+        (data[data_off + 3] << 24)) >>>
+      0
+    );
+  }
+
+  function WebPRiffParser(src, src_off) {
+    var imagearray = {};
+    var i = 0;
+    var alpha_chunk = false;
+    var alpha_size = 0;
+    var alpha_offset = 0;
+    imagearray["frames"] = [];
+    if (memcmp(src, src_off, "RIFF", 4)) return;
+    src_off += 4;
+    var riff_size = GetLE32(src, src_off) + 8;
+    src_off += 8;
+
+    while (src_off < src.length) {
+      var fourcc = GetTag(src, src_off);
+      src_off += 4;
+
+      var payload_size = GetLE32(src, src_off);
+      src_off += 4;
+      var payload_size_padded = payload_size + (payload_size & 1);
+
+      switch (fourcc) {
+        case "VP8 ":
+        case "VP8L":
+          if (typeof imagearray["frames"][i] === "undefined")
+            imagearray["frames"][i] = {};
+          var obj = imagearray["frames"][i];
+          var height = [0];
+          var width = [0];
+          obj["src_off"] = alpha_chunk ? alpha_offset : src_off - 8;
+          obj["src_size"] = alpha_size + payload_size + 8;
+          //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);
+          //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};
+          i++;
+          if (alpha_chunk) {
+            alpha_chunk = false;
+            alpha_size = 0;
+            alpha_offset = 0;
+          }
+          break;
+        case "VP8X":
+          var obj = (imagearray["header"] = {});
+          var feature_flags = (obj["feature_flags"] = src[src_off]);
+          var src_off_ = src_off + 4;
+          var canvas_width = (obj["canvas_width"] = 1 + GetLE24(src, src_off_));
+          src_off_ += 3;
+          var canvas_height = (obj["canvas_height"] =
+            1 + GetLE24(src, src_off_));
+          src_off_ += 3;
+          break;
+        case "ALPH":
+          alpha_chunk = true;
+          alpha_size = payload_size_padded + 8;
+          alpha_offset = src_off - 8;
+          break;
+
+        case "ANIM":
+          var obj = imagearray["header"];
+          var bgcolor = (obj["bgcolor"] = GetLE32(src, src_off));
+          src_off_ = src_off + 4;
+
+          var loop_count = (obj["loop_count"] = GetLE16(src, src_off_));
+          src_off_ += 2;
+          break;
+        case "ANMF":
+          var offset_x = 0,
+            offset_y = 0,
+            width = 0,
+            height = 0,
+            duration = 0,
+            blend = 0,
+            dispose = 0,
+            temp = 0;
+          var obj = (imagearray["frames"][i] = {});
+          obj["offset_x"] = offset_x = 2 * GetLE24(src, src_off);
+          src_off += 3;
+          obj["offset_y"] = offset_y = 2 * GetLE24(src, src_off);
+          src_off += 3;
+          obj["width"] = width = 1 + GetLE24(src, src_off);
+          src_off += 3;
+          obj["height"] = height = 1 + GetLE24(src, src_off);
+          src_off += 3;
+          obj["duration"] = duration = GetLE24(src, src_off);
+          src_off += 3;
+          temp = src[src_off++];
+          obj["dispose"] = dispose = temp & 1;
+          obj["blend"] = blend = (temp >> 1) & 1;
+          break;
+      }
+      if (fourcc != "ANMF") src_off += payload_size_padded;
+    }
+    return imagearray;
+  }
+
+  var height = [0];
+  var width = [0];
+  var pixels = [];
+  var webpdecoder = new _WebPDecoder();
+
+  var response = imageData;
+  var imagearray = WebPRiffParser(response, 0);
+  imagearray["response"] = response;
+  imagearray["rgbaoutput"] = true;
+  imagearray["dataurl"] = false;
+
+  var header = imagearray["header"] ? imagearray["header"] : null;
+  var frames = imagearray["frames"] ? imagearray["frames"] : null;
+
+  if (header) {
+    header["loop_counter"] = header["loop_count"];
+    height = [header["canvas_height"]];
+    width = [header["canvas_width"]];
+    for (var f = 0; f < frames.length; f++)
+      if (frames[f]["blend"] == 0) {
+        break;
+      }
+  }
+
+  var frame = frames[0];
+  var rgba = webpdecoder.WebPDecodeRGBA(
+    response,
+    frame["src_off"],
+    frame["src_size"],
+    width,
+    height
+  );
+  frame["rgba"] = rgba;
+  frame["imgwidth"] = width[0];
+  frame["imgheight"] = height[0];
+
+  for (var i = 0; i < width[0] * height[0] * 4; i++) {
+    pixels[i] = rgba[i];
+  }
+
+  this.width = width;
+  this.height = height;
+  this.data = pixels;
+  return this;
+}
+
+WebPDecoder.prototype.getData = function() {
+  return this.data;
+};
+
+/**
+ * @license
+ * Copyright (c) 2019 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * jsPDF webp Support PlugIn
+ *
+ * @name webp_support
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  jsPDFAPI.processWEBP = function(imageData, index, alias, compression) {
+    var reader = new WebPDecoder(imageData, false);
+    var width = reader.width,
+      height = reader.height;
+    var qu = 100;
+    var pixels = reader.getData();
+
+    var rawImageData = {
+      data: pixels,
+      width: width,
+      height: height
+    };
+
+    var encoder = new JPEGEncoder(qu);
+    var data = encoder.encode(rawImageData, qu);
+    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ *
+ * Copyright (c) 2021 Antti Palola, https://github.com/Pantura
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+
+/**
+ * jsPDF RGBA array PlugIn
+ * @name rgba_support
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  /**
+   * @name processRGBA
+   * @function
+   *
+   * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].
+   * RGBA array data can be obtained from DOM canvas getImageData.
+   * @ignore
+   */
+  jsPDFAPI.processRGBA = function(imageData, index, alias) {
+
+    var imagePixels = imageData.data;
+    var length = imagePixels.length;
+    // jsPDF takes alpha data separately so extract that.
+    var rgbOut = new Uint8Array((length / 4) * 3);
+    var alphaOut = new Uint8Array(length / 4);
+    var outIndex = 0;
+    var alphaIndex = 0;
+
+    for (var i = 0; i < length; i += 4) {
+      var r = imagePixels[i];
+      var g = imagePixels[i + 1];
+      var b = imagePixels[i + 2];
+      var alpha = imagePixels[i + 3];
+      rgbOut[outIndex++] = r;
+      rgbOut[outIndex++] = g;
+      rgbOut[outIndex++] = b;
+      alphaOut[alphaIndex++] = alpha;
+    }
+
+    var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);
+    var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);
+
+    return {
+      alpha: alphaData,
+      data: rgbData,
+      index: index,
+      alias: alias,
+      colorSpace: "DeviceRGB",
+      bitsPerComponent: 8,
+      width: imageData.width,
+      height: imageData.height
+    };
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * jsPDF setLanguage Plugin
+ *
+ * @name setLanguage
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  /**
+   * Add Language Tag to the generated PDF
+   *
+   * @name setLanguage
+   * @function
+   * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').
+   * @returns {jsPDF}
+   * @example
+   * var doc = new jsPDF()
+   * doc.text(10, 10, 'This is a test')
+   * doc.setLanguage("en-US")
+   * doc.save('english.pdf')
+   */
+  jsPDFAPI.setLanguage = function(langCode) {
+
+    var langCodes = {
+      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"
+    };
+
+    if (this.internal.languageSettings === undefined) {
+      this.internal.languageSettings = {};
+      this.internal.languageSettings.isSubscribed = false;
+    }
+
+    if (langCodes[langCode] !== undefined) {
+      this.internal.languageSettings.languageCode = langCode;
+      if (this.internal.languageSettings.isSubscribed === false) {
+        this.internal.events.subscribe("putCatalog", function() {
+          this.internal.write(
+            "/Lang (" + this.internal.languageSettings.languageCode + ")"
+          );
+        });
+        this.internal.languageSettings.isSubscribed = true;
+      }
+    }
+    return this;
+  };
+})(jsPDF.API);
+
+/** @license
+ * MIT license.
+ * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+
+/**
+ * jsPDF split_text_to_size plugin
+ *
+ * @name split_text_to_size
+ * @module
+ */
+(function(API) {
+  /**
+   * Returns an array of length matching length of the 'word' string, with each
+   * cell occupied by the width of the char in that position.
+   *
+   * @name getCharWidthsArray
+   * @function
+   * @param {string} text
+   * @param {Object} options
+   * @returns {Array}
+   */
+  var getCharWidthsArray = (API.getCharWidthsArray = function(text, options) {
+    options = options || {};
+
+    var activeFont = options.font || this.internal.getFont();
+    var fontSize = options.fontSize || this.internal.getFontSize();
+    var charSpace = options.charSpace || this.internal.getCharSpace();
+
+    var widths = options.widths
+      ? options.widths
+      : activeFont.metadata.Unicode.widths;
+    var widthsFractionOf = widths.fof ? widths.fof : 1;
+    var kerning = options.kerning
+      ? options.kerning
+      : activeFont.metadata.Unicode.kerning;
+    var kerningFractionOf = kerning.fof ? kerning.fof : 1;
+    var doKerning = options.doKerning === false ? false : true;
+    var kerningValue = 0;
+
+    var i;
+    var length = text.length;
+    var char_code;
+    var prior_char_code = 0; //for kerning
+    var default_char_width = widths[0] || widthsFractionOf;
+    var output = [];
+
+    for (i = 0; i < length; i++) {
+      char_code = text.charCodeAt(i);
+
+      if (typeof activeFont.metadata.widthOfString === "function") {
+        output.push(
+          (activeFont.metadata.widthOfGlyph(
+            activeFont.metadata.characterToGlyph(char_code)
+          ) +
+            charSpace * (1000 / fontSize) || 0) / 1000
+        );
+      } else {
+        if (
+          doKerning &&
+          typeof kerning[char_code] === "object" &&
+          !isNaN(parseInt(kerning[char_code][prior_char_code], 10))
+        ) {
+          kerningValue =
+            kerning[char_code][prior_char_code] / kerningFractionOf;
+        } else {
+          kerningValue = 0;
+        }
+        output.push(
+          (widths[char_code] || default_char_width) / widthsFractionOf +
+            kerningValue
+        );
+      }
+      prior_char_code = char_code;
+    }
+
+    return output;
+  });
+
+  /**
+   * Returns a widths of string in a given font, if the font size is set as 1 point.
+   *
+   * In other words, this is "proportional" value. For 1 unit of font size, the length
+   * of the string will be that much.
+   *
+   * Multiply by font size to get actual width in *points*
+   * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.
+   *
+   * @name getStringUnitWidth
+   * @public
+   * @function
+   * @param {string} text
+   * @param {string} options
+   * @returns {number} result
+   */
+  var getStringUnitWidth = (API.getStringUnitWidth = function(text, options) {
+    options = options || {};
+
+    var fontSize = options.fontSize || this.internal.getFontSize();
+    var font = options.font || this.internal.getFont();
+    var charSpace = options.charSpace || this.internal.getCharSpace();
+    var result = 0;
+
+    if (API.processArabic) {
+      text = API.processArabic(text);
+    }
+
+    if (typeof font.metadata.widthOfString === "function") {
+      result =
+        font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;
+    } else {
+      result = getCharWidthsArray
+        .apply(this, arguments)
+        .reduce(function(pv, cv) {
+          return pv + cv;
+        }, 0);
+    }
+    return result;
+  });
+
+  /**
+  returns array of lines
+  */
+  var splitLongWord = function(word, widths_array, firstLineMaxLen, maxLen) {
+    var answer = [];
+
+    // 1st, chop off the piece that can fit on the hanging line.
+    var i = 0,
+      l = word.length,
+      workingLen = 0;
+    while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {
+      workingLen += widths_array[i];
+      i++;
+    }
+    // this is first line.
+    answer.push(word.slice(0, i));
+
+    // 2nd. Split the rest into maxLen pieces.
+    var startOfLine = i;
+    workingLen = 0;
+    while (i !== l) {
+      if (workingLen + widths_array[i] > maxLen) {
+        answer.push(word.slice(startOfLine, i));
+        workingLen = 0;
+        startOfLine = i;
+      }
+      workingLen += widths_array[i];
+      i++;
+    }
+    if (startOfLine !== i) {
+      answer.push(word.slice(startOfLine, i));
+    }
+
+    return answer;
+  };
+
+  // Note, all sizing inputs for this function must be in "font measurement units"
+  // By default, for PDF, it's "point".
+  var splitParagraphIntoLines = function(text, maxlen, options) {
+    // at this time works only on Western scripts, ones with space char
+    // separating the words. Feel free to expand.
+
+    if (!options) {
+      options = {};
+    }
+
+    var line = [],
+      lines = [line],
+      line_length = options.textIndent || 0,
+      separator_length = 0,
+      current_word_length = 0,
+      word,
+      widths_array,
+      words = text.split(" "),
+      spaceCharWidth = getCharWidthsArray.apply(this, [" ", options])[0],
+      i,
+      l,
+      tmp,
+      lineIndent;
+
+    if (options.lineIndent === -1) {
+      lineIndent = words[0].length + 2;
+    } else {
+      lineIndent = options.lineIndent || 0;
+    }
+    if (lineIndent) {
+      var pad = Array(lineIndent).join(" "),
+        wrds = [];
+      words.map(function(wrd) {
+        wrd = wrd.split(/\s*\n/);
+        if (wrd.length > 1) {
+          wrds = wrds.concat(
+            wrd.map(function(wrd, idx) {
+              return (idx && wrd.length ? "\n" : "") + wrd;
+            })
+          );
+        } else {
+          wrds.push(wrd[0]);
+        }
+      });
+      words = wrds;
+      lineIndent = getStringUnitWidth.apply(this, [pad, options]);
+    }
+
+    for (i = 0, l = words.length; i < l; i++) {
+      var force = 0;
+
+      word = words[i];
+      if (lineIndent && word[0] == "\n") {
+        word = word.substr(1);
+        force = 1;
+      }
+      widths_array = getCharWidthsArray.apply(this, [word, options]);
+      current_word_length = widths_array.reduce(function(pv, cv) {
+        return pv + cv;
+      }, 0);
+
+      if (
+        line_length + separator_length + current_word_length > maxlen ||
+        force
+      ) {
+        if (current_word_length > maxlen) {
+          // this happens when you have space-less long URLs for example.
+          // we just chop these to size. We do NOT insert hiphens
+          tmp = splitLongWord.apply(this, [
+            word,
+            widths_array,
+            maxlen - (line_length + separator_length),
+            maxlen
+          ]);
+          // first line we add to existing line object
+          line.push(tmp.shift()); // it's ok to have extra space indicator there
+          // last line we make into new line object
+          line = [tmp.pop()];
+          // lines in the middle we apped to lines object as whole lines
+          while (tmp.length) {
+            lines.push([tmp.shift()]); // single fragment occupies whole line
+          }
+          current_word_length = widths_array
+            .slice(word.length - (line[0] ? line[0].length : 0))
+            .reduce(function(pv, cv) {
+              return pv + cv;
+            }, 0);
+        } else {
+          // just put it on a new line
+          line = [word];
+        }
+
+        // now we attach new line to lines
+        lines.push(line);
+        line_length = current_word_length + lineIndent;
+        separator_length = spaceCharWidth;
+      } else {
+        line.push(word);
+
+        line_length += separator_length + current_word_length;
+        separator_length = spaceCharWidth;
+      }
+    }
+
+    var postProcess;
+    if (lineIndent) {
+      postProcess = function(ln, idx) {
+        return (idx ? pad : "") + ln.join(" ");
+      };
+    } else {
+      postProcess = function(ln) {
+        return ln.join(" ");
+      };
+    }
+
+    return lines.map(postProcess);
+  };
+
+  /**
+   * Splits a given string into an array of strings. Uses 'size' value
+   * (in measurement units declared as default for the jsPDF instance)
+   * and the font's "widths" and "Kerning" tables, where available, to
+   * determine display length of a given string for a given font.
+   *
+   * We use character's 100% of unit size (height) as width when Width
+   * table or other default width is not available.
+   *
+   * @name splitTextToSize
+   * @public
+   * @function
+   * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.
+   * @param {number} size Nominal number, measured in units default to this instance of jsPDF.
+   * @param {Object} options Optional flags needed for chopper to do the right thing.
+   * @returns {Array} array Array with strings chopped to size.
+   */
+  API.splitTextToSize = function(text, maxlen, options) {
+
+    options = options || {};
+
+    var fsize = options.fontSize || this.internal.getFontSize(),
+      newOptions = function(options) {
+        var widths = {
+            0: 1
+          },
+          kerning = {};
+
+        if (!options.widths || !options.kerning) {
+          var f = this.internal.getFont(options.fontName, options.fontStyle),
+            encoding = "Unicode";
+          // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE
+          // Actual JavaScript-native String's 16bit char codes used.
+          // no multi-byte logic here
+
+          if (f.metadata[encoding]) {
+            return {
+              widths: f.metadata[encoding].widths || widths,
+              kerning: f.metadata[encoding].kerning || kerning
+            };
+          } else {
+            return {
+              font: f.metadata,
+              fontSize: this.internal.getFontSize(),
+              charSpace: this.internal.getCharSpace()
+            };
+          }
+        } else {
+          return {
+            widths: options.widths,
+            kerning: options.kerning
+          };
+        }
+      }.call(this, options);
+
+    // first we split on end-of-line chars
+    var paragraphs;
+    if (Array.isArray(text)) {
+      paragraphs = text;
+    } else {
+      paragraphs = String(text).split(/\r?\n/);
+    }
+
+    // now we convert size (max length of line) into "font size units"
+    // at present time, the "font size unit" is always 'point'
+    // 'proportional' means, "in proportion to font size"
+    var fontUnit_maxLen = (1.0 * this.internal.scaleFactor * maxlen) / fsize;
+    // at this time, fsize is always in "points" regardless of the default measurement unit of the doc.
+    // this may change in the future?
+    // until then, proportional_maxlen is likely to be in 'points'
+
+    // If first line is to be indented (shorter or longer) than maxLen
+    // we indicate that by using CSS-style "text-indent" option.
+    // here it's in font units too (which is likely 'points')
+    // it can be negative (which makes the first line longer than maxLen)
+    newOptions.textIndent = options.textIndent
+      ? (options.textIndent * 1.0 * this.internal.scaleFactor) / fsize
+      : 0;
+    newOptions.lineIndent = options.lineIndent;
+
+    var i,
+      l,
+      output = [];
+    for (i = 0, l = paragraphs.length; i < l; i++) {
+      output = output.concat(
+        splitParagraphIntoLines.apply(this, [
+          paragraphs[i],
+          fontUnit_maxLen,
+          newOptions
+        ])
+      );
+    }
+
+    return output;
+  };
+})(jsPDF.API);
+
+/** @license
+ jsPDF standard_fonts_metrics plugin
+ * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
+ * MIT license.
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+
+/**
+ * This file adds the standard font metrics to jsPDF.
+ *
+ * Font metrics data is reprocessed derivative of contents of
+ * "Font Metrics for PDF Core 14 Fonts" package, which exhibits the following copyright and license:
+ *
+ * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.
+ *
+ * This file and the 14 PostScript(R) AFM files it accompanies may be used,
+ * copied, and distributed for any purpose and without charge, with or without
+ * modification, provided that all copyright notices are retained; that the AFM
+ * files are not distributed without this file; that all modifications to this
+ * file or any of the AFM files are prominently noted in the modified file(s);
+ * and that this paragraph is not modified. Adobe Systems has no responsibility
+ * or obligation to support the use of the AFM files.
+ *
+ * @name standard_fonts_metrics
+ * @module
+ */
+
+(function(API) {
+  API.__fontmetrics__ = API.__fontmetrics__ || {};
+
+  var decoded = "0123456789abcdef",
+    encoded = "klmnopqrstuvwxyz",
+    mappingUncompress = {},
+    mappingCompress = {};
+
+  for (var i = 0; i < encoded.length; i++) {
+    mappingUncompress[encoded[i]] = decoded[i];
+    mappingCompress[decoded[i]] = encoded[i];
+  }
+
+  var hex = function(value) {
+    return "0x" + parseInt(value, 10).toString(16);
+  };
+
+  var compress = (API.__fontmetrics__.compress = function(data) {
+    var vals = ["{"];
+    var value, keystring, valuestring, numberprefix;
+
+    for (var key in data) {
+      value = data[key];
+
+      if (!isNaN(parseInt(key, 10))) {
+        key = parseInt(key, 10);
+        keystring = hex(key).slice(2);
+        keystring =
+          keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];
+      } else {
+        keystring = "'" + key + "'";
+      }
+
+      if (typeof value == "number") {
+        if (value < 0) {
+          valuestring = hex(value).slice(3);
+          numberprefix = "-";
+        } else {
+          valuestring = hex(value).slice(2);
+          numberprefix = "";
+        }
+        valuestring =
+          numberprefix +
+          valuestring.slice(0, -1) +
+          mappingCompress[valuestring.slice(-1)];
+      } else {
+        if (typeof value === "object") {
+          valuestring = compress(value);
+        } else {
+          throw new Error(
+            "Don't know what to do with value type " + typeof value + "."
+          );
+        }
+      }
+      vals.push(keystring + valuestring);
+    }
+    vals.push("}");
+    return vals.join("");
+  });
+
+  /**
+   * Uncompresses data compressed into custom, base16-like format.
+   *
+   * @public
+   * @function
+   * @param
+   * @returns {Type}
+   */
+  var uncompress = (API.__fontmetrics__.uncompress = function(data) {
+    if (typeof data !== "string") {
+      throw new Error("Invalid argument passed to uncompress.");
+    }
+
+    var output = {},
+      sign = 1,
+      stringparts, // undef. will be [] in string mode
+      activeobject = output,
+      parentchain = [],
+      parent_key_pair,
+      keyparts = "",
+      valueparts = "",
+      key, // undef. will be Truthy when Key is resolved.
+      datalen = data.length - 1, // stripping ending }
+      ch;
+
+    for (var i = 1; i < datalen; i += 1) {
+      // - { } ' are special.
+
+      ch = data[i];
+
+      if (ch == "'") {
+        if (stringparts) {
+          // end of string mode
+          key = stringparts.join("");
+          stringparts = undefined;
+        } else {
+          // start of string mode
+          stringparts = [];
+        }
+      } else if (stringparts) {
+        stringparts.push(ch);
+      } else if (ch == "{") {
+        // start of object
+        parentchain.push([activeobject, key]);
+        activeobject = {};
+        key = undefined;
+      } else if (ch == "}") {
+        // end of object
+        parent_key_pair = parentchain.pop();
+        parent_key_pair[0][parent_key_pair[1]] = activeobject;
+        key = undefined;
+        activeobject = parent_key_pair[0];
+      } else if (ch == "-") {
+        sign = -1;
+      } else {
+        // must be number
+        if (key === undefined) {
+          if (mappingUncompress.hasOwnProperty(ch)) {
+            keyparts += mappingUncompress[ch];
+            key = parseInt(keyparts, 16) * sign;
+            sign = +1;
+            keyparts = "";
+          } else {
+            keyparts += ch;
+          }
+        } else {
+          if (mappingUncompress.hasOwnProperty(ch)) {
+            valueparts += mappingUncompress[ch];
+            activeobject[key] = parseInt(valueparts, 16) * sign;
+            sign = +1;
+            key = undefined;
+            valueparts = "";
+          } else {
+            valueparts += ch;
+          }
+        }
+      }
+    }
+    return output;
+  });
+
+  // encoding = 'Unicode'
+  // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior
+  // Actual 16bit char codes used.
+  // no multi-byte logic here
+
+  // Unicode characters to WinAnsiEncoding:
+  // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}
+  // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.
+  // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly
+  // as well as give strings with some (supported by these fonts) Unicode characters and
+  // these will be mapped to win cp1252
+  // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting "Euro" glyph displayed in both cases.
+
+  var encodingBlock = {
+    codePages: ["WinAnsiEncoding"],
+    WinAnsiEncoding: uncompress(
+      "{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}"
+    )
+  };
+  var encodings = {
+    Unicode: {
+      Courier: encodingBlock,
+      "Courier-Bold": encodingBlock,
+      "Courier-BoldOblique": encodingBlock,
+      "Courier-Oblique": encodingBlock,
+      Helvetica: encodingBlock,
+      "Helvetica-Bold": encodingBlock,
+      "Helvetica-BoldOblique": encodingBlock,
+      "Helvetica-Oblique": encodingBlock,
+      "Times-Roman": encodingBlock,
+      "Times-Bold": encodingBlock,
+      "Times-BoldItalic": encodingBlock,
+      "Times-Italic": encodingBlock
+      //	, 'Symbol'
+      //	, 'ZapfDingbats'
+    }
+  };
+
+  var fontMetrics = {
+    Unicode: {
+      // all sizing numbers are n/fontMetricsFractionOf = one font size unit
+      // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's
+      // width is 476/1000 or 47.6% of its height (regardless of font size)
+      // At this time this value applies to "widths" and "kerning" numbers.
+
+      // char code 0 represents "default" (average) width - use it for chars missing in this table.
+      // key 'fof' represents the "fontMetricsFractionOf" value
+
+      "Courier-Oblique": uncompress(
+        "{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"
+      ),
+      "Times-BoldItalic": uncompress(
+        "{'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": uncompress(
+        "{'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: uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
+      "Courier-BoldOblique": uncompress(
+        "{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"
+      ),
+      "Times-Bold": uncompress(
+        "{'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: uncompress(
+        "{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"
+      ),
+      Helvetica: uncompress(
+        "{'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": uncompress(
+        "{'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: uncompress("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),
+      "Courier-Bold": uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
+      "Times-Italic": uncompress(
+        "{'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": uncompress(
+        "{'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": uncompress(
+        "{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2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{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}}}"
+      )
+    }
+  };
+
+  /*
+	This event handler is fired when a new jsPDF object is initialized
+	This event handler appends metrics data to standard fonts within
+	that jsPDF instance. The metrics are mapped over Unicode character
+	codes, NOT CIDs or other codes matching the StandardEncoding table of the
+	standard PDF fonts.
+	Future:
+	Also included is the encoding maping table, converting Unicode (UCS-2, UTF-16)
+	char codes to StandardEncoding character codes. The encoding table is to be used
+	somewhere around "pdfEscape" call.
+	*/
+  API.events.push([
+    "addFont",
+    function(data) {
+      var font = data.font;
+
+      var metrics = fontMetrics["Unicode"][font.postScriptName];
+      if (metrics) {
+        font.metadata["Unicode"] = {};
+        font.metadata["Unicode"].widths = metrics.widths;
+        font.metadata["Unicode"].kerning = metrics.kerning;
+      }
+
+      var encodingBlock = encodings["Unicode"][font.postScriptName];
+      if (encodingBlock) {
+        font.metadata["Unicode"].encoding = encodingBlock;
+        font.encoding = encodingBlock.codePages[0];
+      }
+    }
+  ]); // end of adding event handler
+})(jsPDF.API);
+
+/**
+ * @license
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * @name ttfsupport
+ * @module
+ */
+(function(jsPDF) {
+
+  var binaryStringToUint8Array = function(binary_string) {
+    var len = binary_string.length;
+    var bytes = new Uint8Array(len);
+    for (var i = 0; i < len; i++) {
+      bytes[i] = binary_string.charCodeAt(i);
+    }
+    return bytes;
+  };
+
+  var addFont = function(font, file) {
+    // eslint-disable-next-line no-control-regex
+    if (/^\x00\x01\x00\x00/.test(file)) {
+      file = binaryStringToUint8Array(file);
+    } else {
+      file = binaryStringToUint8Array(atob(file));
+    }
+    font.metadata = jsPDF.API.TTFFont.open(file);
+    font.metadata.Unicode = font.metadata.Unicode || {
+      encoding: {},
+      kerning: {},
+      widths: []
+    };
+    font.metadata.glyIdsUsed = [0];
+  };
+
+  jsPDF.API.events.push([
+    "addFont",
+    function(data) {
+      var file = undefined;
+      var font = data.font;
+      var instance = data.instance;
+      if (font.isStandardFont) {
+        return;
+      }
+      if (typeof instance !== "undefined") {
+        if (instance.existsFileInVFS(font.postScriptName) === false) {
+          file = instance.loadFile(font.postScriptName);
+        } else {
+          file = instance.getFileFromVFS(font.postScriptName);
+        }
+        if (typeof file !== "string") {
+          throw new Error(
+            "Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('" +
+              font.postScriptName +
+              "')."
+          );
+        }
+        addFont(font, file);
+      } else {
+        throw new Error(
+          "Font does not exist in vFS, import fonts or remove declaration doc.addFont('" +
+            font.postScriptName +
+            "')."
+        );
+      }
+    }
+  ]); // end of adding event handler
+})(jsPDF);
+
+/** @license
+ * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+
+/**
+ * jsPDF SVG plugin
+ *
+ * @name svg
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  function loadCanvg() {
+    return (function() {
+      if (globalObject["canvg"]) {
+        return Promise.resolve(globalObject["canvg"]);
+      }
+
+
+      if (typeof exports === "object" && typeof module !== "undefined") {
+        return new Promise(function(resolve, reject) {
+          try {
+            resolve(require("canvg"));
+          } catch (e) {
+            reject(e);
+          }
+        });
+      }
+      if (typeof define === "function" && define.amd) {
+        return new Promise(function(resolve, reject) {
+          try {
+            require(["canvg"], resolve);
+          } catch (e) {
+            reject(e);
+          }
+        });
+      }
+      return Promise.reject(new Error("Could not load canvg"));
+    })()
+      .catch(function(e) {
+        return Promise.reject(new Error("Could not load canvg: " + e));
+      })
+      .then(function(canvg) {
+        return canvg.default ? canvg.default : canvg;
+      });
+  }
+
+  /**
+   * Parses SVG XML and saves it as image into the PDF.
+   *
+   * Depends on canvas-element and canvg
+   *
+   * @name addSvgAsImage
+   * @public
+   * @function
+   * @param {string} SVG-Data as Text
+   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+   * @param {number} width of SVG-Image (in units declared at inception of PDF document)
+   * @param {number} height of SVG-Image (in units declared at inception of PDF document)
+   * @param {string} alias of SVG-Image (if used multiple times)
+   * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'
+   * @param {number} rotation of the image in degrees (0-359)
+   *
+   * @returns jsPDF jsPDF-instance
+   */
+  jsPDFAPI.addSvgAsImage = function(
+    svg,
+    x,
+    y,
+    w,
+    h,
+    alias,
+    compression,
+    rotation
+  ) {
+    if (isNaN(x) || isNaN(y)) {
+      console.error("jsPDF.addSvgAsImage: Invalid coordinates", arguments);
+      throw new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");
+    }
+
+    if (isNaN(w) || isNaN(h)) {
+      console.error("jsPDF.addSvgAsImage: Invalid measurements", arguments);
+      throw new Error(
+        "Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage"
+      );
+    }
+
+    var canvas = document.createElement("canvas");
+    canvas.width = w;
+    canvas.height = h;
+    var ctx = canvas.getContext("2d");
+    ctx.fillStyle = "#fff"; /// set white fill style
+    ctx.fillRect(0, 0, canvas.width, canvas.height);
+
+    var options = {
+      ignoreMouse: true,
+      ignoreAnimation: true,
+      ignoreDimensions: true
+    };
+    var doc = this;
+    return loadCanvg()
+      .then(
+        function(canvg) {
+          return canvg.fromString(ctx, svg, options);
+        },
+        function() {
+          return Promise.reject(new Error("Could not load canvg."));
+        }
+      )
+      .then(function(instance) {
+        return instance.render(options);
+      })
+      .then(function() {
+        doc.addImage(
+          canvas.toDataURL("image/jpeg", 1.0),
+          x,
+          y,
+          w,
+          h,
+          compression,
+          rotation
+        );
+      });
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * ====================================================================
+ * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+
+/**
+ * jsPDF total_pages plugin
+ * @name total_pages
+ * @module
+ */
+(function(jsPDFAPI) {
+  /**
+   * @name putTotalPages
+   * @function
+   * @param {string} pageExpression Regular Expression
+   * @returns {jsPDF} jsPDF-instance
+   */
+
+  jsPDFAPI.putTotalPages = function(pageExpression) {
+
+    var replaceExpression;
+    var totalNumberOfPages = 0;
+    if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {
+      replaceExpression = new RegExp(pageExpression, "g");
+      totalNumberOfPages = this.internal.getNumberOfPages();
+    } else {
+      replaceExpression = new RegExp(
+        this.pdfEscape16(pageExpression, this.internal.getFont()),
+        "g"
+      );
+      totalNumberOfPages = 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(
+          replaceExpression,
+          totalNumberOfPages
+        );
+      }
+    }
+
+    return this;
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * jsPDF viewerPreferences Plugin
+ * @author Aras Abbasi (github.com/arasabbasi)
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * Adds the ability to set ViewerPreferences and by thus
+ * controlling the way the document is to be presented on the
+ * screen or in print.
+ * @name viewerpreferences
+ * @module
+ */
+(function(jsPDFAPI) {
+  /**
+   * Set the ViewerPreferences of the generated PDF
+   *
+   * @name viewerPreferences
+   * @function
+   * @public
+   * @param {Object} options Array with the ViewerPreferences<br />
+   * Example: doc.viewerPreferences({"FitWindow":true});<br />
+   * <br />
+   * You can set following preferences:<br />
+   * <br/>
+   * <b>HideToolbar</b> <i>(boolean)</i><br />
+   * Default value: false<br />
+   * <br />
+   * <b>HideMenubar</b> <i>(boolean)</i><br />
+   * Default value: false.<br />
+   * <br />
+   * <b>HideWindowUI</b> <i>(boolean)</i><br />
+   * Default value: false.<br />
+   * <br />
+   * <b>FitWindow</b> <i>(boolean)</i><br />
+   * Default value: false.<br />
+   * <br />
+   * <b>CenterWindow</b> <i>(boolean)</i><br />
+   * Default value: false<br />
+   * <br />
+   * <b>DisplayDocTitle</b> <i>(boolean)</i><br />
+   * Default value: false.<br />
+   * <br />
+   * <b>NonFullScreenPageMode</b> <i>(string)</i><br />
+   * Possible values: UseNone, UseOutlines, UseThumbs, UseOC<br />
+   * Default value: UseNone<br/>
+   * <br />
+   * <b>Direction</b> <i>(string)</i><br />
+   * Possible values: L2R, R2L<br />
+   * Default value: L2R.<br />
+   * <br />
+   * <b>ViewArea</b> <i>(string)</i><br />
+   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+   * Default value: CropBox.<br />
+   * <br />
+   * <b>ViewClip</b> <i>(string)</i><br />
+   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+   * Default value: CropBox<br />
+   * <br />
+   * <b>PrintArea</b> <i>(string)</i><br />
+   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+   * Default value: CropBox<br />
+   * <br />
+   * <b>PrintClip</b> <i>(string)</i><br />
+   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+   * Default value: CropBox.<br />
+   * <br />
+   * <b>PrintScaling</b> <i>(string)</i><br />
+   * Possible values: AppDefault, None<br />
+   * Default value: AppDefault.<br />
+   * <br />
+   * <b>Duplex</b> <i>(string)</i><br />
+   * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge
+   * Default value: none<br />
+   * <br />
+   * <b>PickTrayByPDFSize</b> <i>(boolean)</i><br />
+   * Default value: false<br />
+   * <br />
+   * <b>PrintPageRange</b> <i>(Array)</i><br />
+   * Example: [[1,5], [7,9]]<br />
+   * Default value: as defined by PDF viewer application<br />
+   * <br />
+   * <b>NumCopies</b> <i>(Number)</i><br />
+   * Possible values: 1, 2, 3, 4, 5<br />
+   * Default value: 1<br />
+   * <br />
+   * For more information see the PDF Reference, sixth edition on Page 577
+   * @param {boolean} doReset True to reset the settings
+   * @function
+   * @returns jsPDF jsPDF-instance
+   * @example
+   * var doc = new jsPDF()
+   * doc.text('This is a test', 10, 10)
+   * doc.viewerPreferences({'FitWindow': true}, true)
+   * doc.save("viewerPreferences.pdf")
+   *
+   * // Example printing 10 copies, using cropbox, and hiding UI.
+   * doc.viewerPreferences({
+   *   'HideWindowUI': true,
+   *   'PrintArea': 'CropBox',
+   *   'NumCopies': 10
+   * })
+   */
+  jsPDFAPI.viewerPreferences = function(options, doReset) {
+    options = options || {};
+    doReset = doReset || false;
+
+    var configuration;
+    var configurationTemplate = {
+      HideToolbar: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.3
+      },
+      HideMenubar: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.3
+      },
+      HideWindowUI: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.3
+      },
+      FitWindow: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.3
+      },
+      CenterWindow: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.3
+      },
+      DisplayDocTitle: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.4
+      },
+      NonFullScreenPageMode: {
+        defaultValue: "UseNone",
+        value: "UseNone",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["UseNone", "UseOutlines", "UseThumbs", "UseOC"],
+        pdfVersion: 1.3
+      },
+      Direction: {
+        defaultValue: "L2R",
+        value: "L2R",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["L2R", "R2L"],
+        pdfVersion: 1.3
+      },
+      ViewArea: {
+        defaultValue: "CropBox",
+        value: "CropBox",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+        pdfVersion: 1.4
+      },
+      ViewClip: {
+        defaultValue: "CropBox",
+        value: "CropBox",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+        pdfVersion: 1.4
+      },
+      PrintArea: {
+        defaultValue: "CropBox",
+        value: "CropBox",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+        pdfVersion: 1.4
+      },
+      PrintClip: {
+        defaultValue: "CropBox",
+        value: "CropBox",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+        pdfVersion: 1.4
+      },
+      PrintScaling: {
+        defaultValue: "AppDefault",
+        value: "AppDefault",
+        type: "name",
+        explicitSet: false,
+        valueSet: ["AppDefault", "None"],
+        pdfVersion: 1.6
+      },
+      Duplex: {
+        defaultValue: "",
+        value: "none",
+        type: "name",
+        explicitSet: false,
+        valueSet: [
+          "Simplex",
+          "DuplexFlipShortEdge",
+          "DuplexFlipLongEdge",
+          "none"
+        ],
+        pdfVersion: 1.7
+      },
+      PickTrayByPDFSize: {
+        defaultValue: false,
+        value: false,
+        type: "boolean",
+        explicitSet: false,
+        valueSet: [true, false],
+        pdfVersion: 1.7
+      },
+      PrintPageRange: {
+        defaultValue: "",
+        value: "",
+        type: "array",
+        explicitSet: false,
+        valueSet: null,
+        pdfVersion: 1.7
+      },
+      NumCopies: {
+        defaultValue: 1,
+        value: 1,
+        type: "integer",
+        explicitSet: false,
+        valueSet: null,
+        pdfVersion: 1.7
+      }
+    };
+
+    var configurationKeys = Object.keys(configurationTemplate);
+
+    var rangeArray = [];
+    var i = 0;
+    var j = 0;
+    var k = 0;
+    var isValid;
+
+    var method;
+    var value;
+
+    function arrayContainsElement(array, element) {
+      var iterator;
+      var result = false;
+
+      for (iterator = 0; iterator < array.length; iterator += 1) {
+        if (array[iterator] === element) {
+          result = true;
+        }
+      }
+      return result;
+    }
+
+    if (this.internal.viewerpreferences === undefined) {
+      this.internal.viewerpreferences = {};
+      this.internal.viewerpreferences.configuration = JSON.parse(
+        JSON.stringify(configurationTemplate)
+      );
+      this.internal.viewerpreferences.isSubscribed = false;
+    }
+    configuration = this.internal.viewerpreferences.configuration;
+
+    if (options === "reset" || doReset === true) {
+      var len = configurationKeys.length;
+
+      for (k = 0; k < len; k += 1) {
+        configuration[configurationKeys[k]].value =
+          configuration[configurationKeys[k]].defaultValue;
+        configuration[configurationKeys[k]].explicitSet = false;
+      }
+    }
+
+    if (typeof options === "object") {
+      for (method in options) {
+        value = options[method];
+        if (
+          arrayContainsElement(configurationKeys, method) &&
+          value !== undefined
+        ) {
+          if (
+            configuration[method].type === "boolean" &&
+            typeof value === "boolean"
+          ) {
+            configuration[method].value = value;
+          } else if (
+            configuration[method].type === "name" &&
+            arrayContainsElement(configuration[method].valueSet, value)
+          ) {
+            configuration[method].value = value;
+          } else if (
+            configuration[method].type === "integer" &&
+            Number.isInteger(value)
+          ) {
+            configuration[method].value = value;
+          } else if (configuration[method].type === "array") {
+            for (i = 0; i < value.length; i += 1) {
+              isValid = true;
+              if (value[i].length === 1 && typeof value[i][0] === "number") {
+                rangeArray.push(String(value[i] - 1));
+              } else if (value[i].length > 1) {
+                for (j = 0; j < value[i].length; j += 1) {
+                  if (typeof value[i][j] !== "number") {
+                    isValid = false;
+                  }
+                }
+                if (isValid === true) {
+                  rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(" "));
+                }
+              }
+            }
+            configuration[method].value = "[" + rangeArray.join(" ") + "]";
+          } else {
+            configuration[method].value = configuration[method].defaultValue;
+          }
+
+          configuration[method].explicitSet = true;
+        }
+      }
+    }
+
+    if (this.internal.viewerpreferences.isSubscribed === false) {
+      this.internal.events.subscribe("putCatalog", function() {
+        var pdfDict = [];
+        var vPref;
+        for (vPref in configuration) {
+          if (configuration[vPref].explicitSet === true) {
+            if (configuration[vPref].type === "name") {
+              pdfDict.push("/" + vPref + " /" + configuration[vPref].value);
+            } else {
+              pdfDict.push("/" + vPref + " " + configuration[vPref].value);
+            }
+          }
+        }
+        if (pdfDict.length !== 0) {
+          this.internal.write(
+            "/ViewerPreferences\n<<\n" + pdfDict.join("\n") + "\n>>"
+          );
+        }
+      });
+      this.internal.viewerpreferences.isSubscribed = true;
+    }
+
+    this.internal.viewerpreferences.configuration = configuration;
+    return this;
+  };
+})(jsPDF.API);
+
+/** ====================================================================
+ * @license
+ * jsPDF XMP metadata plugin
+ * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+
+/**
+ * @name xmp_metadata
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  var postPutResources = function() {
+    var xmpmeta_beginning = '<x:xmpmeta xmlns:x="adobe:ns:meta/">';
+    var rdf_beginning =
+      '<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>';
+    var rdf_ending = "</jspdf:metadata></rdf:Description></rdf:RDF>";
+    var xmpmeta_ending = "</x:xmpmeta>";
+    var utf8_xmpmeta_beginning = unescape(
+      encodeURIComponent(xmpmeta_beginning)
+    );
+    var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));
+    var utf8_metadata = unescape(
+      encodeURIComponent(this.internal.__metadata__.metadata)
+    );
+    var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));
+    var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));
+
+    var total_len =
+      utf8_rdf_beginning.length +
+      utf8_metadata.length +
+      utf8_rdf_ending.length +
+      utf8_xmpmeta_beginning.length +
+      utf8_xmpmeta_ending.length;
+
+    this.internal.__metadata__.metadata_object_number = this.internal.newObject();
+    this.internal.write(
+      "<< /Type /Metadata /Subtype /XML /Length " + total_len + " >>"
+    );
+    this.internal.write("stream");
+    this.internal.write(
+      utf8_xmpmeta_beginning +
+        utf8_rdf_beginning +
+        utf8_metadata +
+        utf8_rdf_ending +
+        utf8_xmpmeta_ending
+    );
+    this.internal.write("endstream");
+    this.internal.write("endobj");
+  };
+
+  var putCatalog = function() {
+    if (this.internal.__metadata__.metadata_object_number) {
+      this.internal.write(
+        "/Metadata " +
+          this.internal.__metadata__.metadata_object_number +
+          " 0 R"
+      );
+    }
+  };
+
+  /**
+   * Adds XMP formatted metadata to PDF
+   *
+   * @name addMetadata
+   * @function
+   * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters "<", ">" or "&", those characters should be written using XML entities.
+   * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.
+   * @returns {jsPDF} jsPDF-instance
+   */
+  jsPDFAPI.addMetadata = function(metadata, namespaceuri) {
+    if (typeof this.internal.__metadata__ === "undefined") {
+      this.internal.__metadata__ = {
+        metadata: metadata,
+        namespaceuri: namespaceuri || "http://jspdf.default.namespaceuri/"
+      };
+      this.internal.events.subscribe("putCatalog", putCatalog);
+
+      this.internal.events.subscribe("postPutResources", postPutResources);
+    }
+    return this;
+  };
+})(jsPDF.API);
+
+/**
+ * @name utf8
+ * @module
+ */
+(function(jsPDF) {
+  var jsPDFAPI = jsPDF.API;
+
+  /***************************************************************************************************/
+  /* function : pdfEscape16                                                                          */
+  /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */
+  /*   the corresponding glyph id and width, and then adding padding to the string.                  */
+  /***************************************************************************************************/
+  var pdfEscape16 = (jsPDFAPI.pdfEscape16 = function(text, font) {
+    var widths = font.metadata.Unicode.widths;
+    var padz = ["", "0", "00", "000", "0000"];
+    var ar = [""];
+    for (var i = 0, l = text.length, t; i < l; ++i) {
+      t = font.metadata.characterToGlyph(text.charCodeAt(i));
+      font.metadata.glyIdsUsed.push(t);
+      font.metadata.toUnicode[t] = text.charCodeAt(i);
+      if (widths.indexOf(t) == -1) {
+        widths.push(t);
+        widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);
+      }
+      if (t == "0") {
+        //Spaces are not allowed in cmap.
+        return ar.join("");
+      } else {
+        t = t.toString(16);
+        ar.push(padz[4 - t.length], t);
+      }
+    }
+    return ar.join("");
+  });
+
+  var toUnicodeCmap = function(map) {
+    var code, codes, range, unicode, unicodeMap, _i, _len;
+    unicodeMap =
+      "/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";
+    codes = Object.keys(map).sort(function(a, b) {
+      return a - b;
+    });
+
+    range = [];
+    for (_i = 0, _len = codes.length; _i < _len; _i++) {
+      code = codes[_i];
+      if (range.length >= 100) {
+        unicodeMap +=
+          "\n" +
+          range.length +
+          " beginbfchar\n" +
+          range.join("\n") +
+          "\nendbfchar";
+        range = [];
+      }
+
+      if (
+        map[code] !== undefined &&
+        map[code] !== null &&
+        typeof map[code].toString === "function"
+      ) {
+        unicode = ("0000" + map[code].toString(16)).slice(-4);
+        code = ("0000" + (+code).toString(16)).slice(-4);
+        range.push("<" + code + "><" + unicode + ">");
+      }
+    }
+
+    if (range.length) {
+      unicodeMap +=
+        "\n" +
+        range.length +
+        " beginbfchar\n" +
+        range.join("\n") +
+        "\nendbfchar\n";
+    }
+    unicodeMap +=
+      "endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend";
+    return unicodeMap;
+  };
+
+  var identityHFunction = function(options) {
+    var font = options.font;
+    var out = options.out;
+    var newObject = options.newObject;
+    var putStream = options.putStream;
+
+    if (
+      font.metadata instanceof jsPDF.API.TTFFont &&
+      font.encoding === "Identity-H"
+    ) {
+      //Tag with Identity-H
+      var widths = font.metadata.Unicode.widths;
+      var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);
+      var pdfOutput = data;
+      var pdfOutput2 = "";
+      for (var i = 0; i < pdfOutput.length; i++) {
+        pdfOutput2 += String.fromCharCode(pdfOutput[i]);
+      }
+      var fontTable = newObject();
+      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });
+      out("endobj");
+
+      var cmap = newObject();
+      var cmapData = toUnicodeCmap(font.metadata.toUnicode);
+      putStream({ data: cmapData, addLength1: true, objectId: cmap });
+      out("endobj");
+
+      var fontDescriptor = newObject();
+      out("<<");
+      out("/Type /FontDescriptor");
+      out("/FontName /" + toPDFName(font.fontName));
+      out("/FontFile2 " + fontTable + " 0 R");
+      out("/FontBBox " + jsPDF.API.PDFObject.convert(font.metadata.bbox));
+      out("/Flags " + font.metadata.flags);
+      out("/StemV " + font.metadata.stemV);
+      out("/ItalicAngle " + font.metadata.italicAngle);
+      out("/Ascent " + font.metadata.ascender);
+      out("/Descent " + font.metadata.decender);
+      out("/CapHeight " + font.metadata.capHeight);
+      out(">>");
+      out("endobj");
+
+      var DescendantFont = newObject();
+      out("<<");
+      out("/Type /Font");
+      out("/BaseFont /" + toPDFName(font.fontName));
+      out("/FontDescriptor " + fontDescriptor + " 0 R");
+      out("/W " + jsPDF.API.PDFObject.convert(widths));
+      out("/CIDToGIDMap /Identity");
+      out("/DW 1000");
+      out("/Subtype /CIDFontType2");
+      out("/CIDSystemInfo");
+      out("<<");
+      out("/Supplement 0");
+      out("/Registry (Adobe)");
+      out("/Ordering (" + font.encoding + ")");
+      out(">>");
+      out(">>");
+      out("endobj");
+
+      font.objectNumber = newObject();
+      out("<<");
+      out("/Type /Font");
+      out("/Subtype /Type0");
+      out("/ToUnicode " + cmap + " 0 R");
+      out("/BaseFont /" + toPDFName(font.fontName));
+      out("/Encoding /" + font.encoding);
+      out("/DescendantFonts [" + DescendantFont + " 0 R]");
+      out(">>");
+      out("endobj");
+
+      font.isAlreadyPutted = true;
+    }
+  };
+
+  jsPDFAPI.events.push([
+    "putFont",
+    function(args) {
+      identityHFunction(args);
+    }
+  ]);
+
+  var winAnsiEncodingFunction = function(options) {
+    var font = options.font;
+    var out = options.out;
+    var newObject = options.newObject;
+    var putStream = options.putStream;
+
+    if (
+      font.metadata instanceof jsPDF.API.TTFFont &&
+      font.encoding === "WinAnsiEncoding"
+    ) {
+      //Tag with WinAnsi encoding
+      var data = font.metadata.rawData;
+      var pdfOutput = data;
+      var pdfOutput2 = "";
+      for (var i = 0; i < pdfOutput.length; i++) {
+        pdfOutput2 += String.fromCharCode(pdfOutput[i]);
+      }
+      var fontTable = newObject();
+      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });
+      out("endobj");
+
+      var cmap = newObject();
+      var cmapData = toUnicodeCmap(font.metadata.toUnicode);
+      putStream({ data: cmapData, addLength1: true, objectId: cmap });
+      out("endobj");
+
+      var fontDescriptor = newObject();
+      out("<<");
+      out("/Descent " + font.metadata.decender);
+      out("/CapHeight " + font.metadata.capHeight);
+      out("/StemV " + font.metadata.stemV);
+      out("/Type /FontDescriptor");
+      out("/FontFile2 " + fontTable + " 0 R");
+      out("/Flags 96");
+      out("/FontBBox " + jsPDF.API.PDFObject.convert(font.metadata.bbox));
+      out("/FontName /" + toPDFName(font.fontName));
+      out("/ItalicAngle " + font.metadata.italicAngle);
+      out("/Ascent " + font.metadata.ascender);
+      out(">>");
+      out("endobj");
+      font.objectNumber = newObject();
+      for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {
+        font.metadata.hmtx.widths[j] = parseInt(
+          font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)
+        ); //Change the width of Em units to Point units.
+      }
+      out(
+        "<</Subtype/TrueType/Type/Font/ToUnicode " +
+          cmap +
+          " 0 R/BaseFont/" +
+          toPDFName(font.fontName) +
+          "/FontDescriptor " +
+          fontDescriptor +
+          " 0 R" +
+          "/Encoding/" +
+          font.encoding +
+          " /FirstChar 29 /LastChar 255 /Widths " +
+          jsPDF.API.PDFObject.convert(font.metadata.hmtx.widths) +
+          ">>"
+      );
+      out("endobj");
+      font.isAlreadyPutted = true;
+    }
+  };
+
+  jsPDFAPI.events.push([
+    "putFont",
+    function(args) {
+      winAnsiEncodingFunction(args);
+    }
+  ]);
+
+  var utf8TextFunction = function(args) {
+    var text = args.text || "";
+    var x = args.x;
+    var y = args.y;
+    var options = args.options || {};
+    var mutex = args.mutex || {};
+
+    var pdfEscape = mutex.pdfEscape;
+    var activeFontKey = mutex.activeFontKey;
+    var fonts = mutex.fonts;
+    var key = activeFontKey;
+
+    var str = "",
+      s = 0,
+      cmapConfirm;
+    var strText = "";
+    var encoding = fonts[key].encoding;
+
+    if (fonts[key].encoding !== "Identity-H") {
+      return {
+        text: text,
+        x: x,
+        y: y,
+        options: options,
+        mutex: mutex
+      };
+    }
+    strText = text;
+
+    key = activeFontKey;
+    if (Array.isArray(text)) {
+      strText = text[0];
+    }
+    for (s = 0; s < strText.length; s += 1) {
+      if (fonts[key].metadata.hasOwnProperty("cmap")) {
+        cmapConfirm =
+          fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];
+        /*
+             if (Object.prototype.toString.call(text) === '[object Array]') {
+                var i = 0;
+               // for (i = 0; i < text.length; i += 1) {
+                    if (Object.prototype.toString.call(text[s]) === '[object Array]') {
+                        cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id
+                    } else {
+
+                    }
+                //}
+
+            } else {
+                cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id
+            }*/
+      }
+      if (!cmapConfirm) {
+        if (
+          strText[s].charCodeAt(0) < 256 &&
+          fonts[key].metadata.hasOwnProperty("Unicode")
+        ) {
+          str += strText[s];
+        } else {
+          str += "";
+        }
+      } else {
+        str += strText[s];
+      }
+    }
+    var result = "";
+    if (parseInt(key.slice(1)) < 14 || encoding === "WinAnsiEncoding") {
+      //For the default 13 font
+      result = pdfEscape(str, key)
+        .split("")
+        .map(function(cv) {
+          return cv.charCodeAt(0).toString(16);
+        })
+        .join("");
+    } else if (encoding === "Identity-H") {
+      result = pdfEscape16(str, fonts[key]);
+    }
+    mutex.isHex = true;
+
+    return {
+      text: result,
+      x: x,
+      y: y,
+      options: options,
+      mutex: mutex
+    };
+  };
+
+  var utf8EscapeFunction = function(parms) {
+    var text = parms.text || "",
+      x = parms.x,
+      y = parms.y,
+      options = parms.options,
+      mutex = parms.mutex;
+    var tmpText = [];
+    var args = {
+      text: text,
+      x: x,
+      y: y,
+      options: options,
+      mutex: mutex
+    };
+
+    if (Array.isArray(text)) {
+      var i = 0;
+      for (i = 0; i < text.length; i += 1) {
+        if (Array.isArray(text[i])) {
+          if (text[i].length === 3) {
+            tmpText.push([
+              utf8TextFunction(Object.assign({}, args, { text: text[i][0] }))
+                .text,
+              text[i][1],
+              text[i][2]
+            ]);
+          } else {
+            tmpText.push(
+              utf8TextFunction(Object.assign({}, args, { text: text[i] })).text
+            );
+          }
+        } else {
+          tmpText.push(
+            utf8TextFunction(Object.assign({}, args, { text: text[i] })).text
+          );
+        }
+      }
+      parms.text = tmpText;
+    } else {
+      parms.text = utf8TextFunction(
+        Object.assign({}, args, { text: text })
+      ).text;
+    }
+  };
+
+  jsPDFAPI.events.push(["postProcessText", utf8EscapeFunction]);
+})(jsPDF);
+
+/**
+ * @license
+ * jsPDF virtual FileSystem functionality
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+
+/**
+ * Use the vFS to handle files
+ *
+ * @name vFS
+ * @module
+ */
+(function(jsPDFAPI) {
+
+  var _initializeVFS = function() {
+    if (typeof this.internal.vFS === "undefined") {
+      this.internal.vFS = {};
+    }
+    return true;
+  };
+
+  /**
+   * Check if the file exists in the vFS
+   *
+   * @name existsFileInVFS
+   * @function
+   * @param {string} Possible filename in the vFS.
+   * @returns {boolean}
+   * @example
+   * doc.existsFileInVFS("someFile.txt");
+   */
+  jsPDFAPI.existsFileInVFS = function(filename) {
+    _initializeVFS.call(this);
+    return typeof this.internal.vFS[filename] !== "undefined";
+  };
+
+  /**
+   * Add a file to the vFS
+   *
+   * @name addFileToVFS
+   * @function
+   * @param {string} filename The name of the file which should be added.
+   * @param {string} filecontent The content of the file.
+   * @returns {jsPDF}
+   * @example
+   * doc.addFileToVFS("someFile.txt", "BADFACE1");
+   */
+  jsPDFAPI.addFileToVFS = function(filename, filecontent) {
+    _initializeVFS.call(this);
+    this.internal.vFS[filename] = filecontent;
+    return this;
+  };
+
+  /**
+   * Get the file from the vFS
+   *
+   * @name getFileFromVFS
+   * @function
+   * @param {string} The name of the file which gets requested.
+   * @returns {string}
+   * @example
+   * doc.getFileFromVFS("someFile.txt");
+   */
+  jsPDFAPI.getFileFromVFS = function(filename) {
+    _initializeVFS.call(this);
+
+    if (typeof this.internal.vFS[filename] !== "undefined") {
+      return this.internal.vFS[filename];
+    }
+    return null;
+  };
+})(jsPDF.API);
+
+/**
+ * @license
+ * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
+ * MIT License
+ */
+
+(function(jsPDF) {
+  /**
+   * Table of Unicode types.
+   *
+   * Generated by:
+   *
+   * var bidi = require("./bidi/index");
+   * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).
+   * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).
+   * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));
+   *
+   * for( var i = 0; i < bidi_accumulate.length; i++) {
+   * 	if(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')
+   * 		bidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined
+   * }
+   * var bidiAccumulateStr = 'return [ "' + bidi_accumulate.toString().replace(/,/g, '", "') + '" ];';
+   * require("fs").writeFile('unicode-types.js', bidiAccumulateStr);
+   *
+   * Based on:
+   * https://github.com/mathiasbynens/unicode-8.0.0
+   */
+  var bidiUnicodeTypes = [
+    "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"
+  ];
+
+  /**
+   * Unicode Bidi algorithm compliant Bidi engine.
+   * For reference see http://unicode.org/reports/tr9/
+   */
+
+  /**
+   * constructor ( options )
+   *
+   * Initializes Bidi engine
+   *
+   * @param {Object} See 'setOptions' below for detailed description.
+   * options are cashed between invocation of 'doBidiReorder' method
+   *
+   * sample usage pattern of BidiEngine:
+   * var opt = {
+   * 	isInputVisual: true,
+   * 	isInputRtl: false,
+   * 	isOutputVisual: false,
+   * 	isOutputRtl: false,
+   * 	isSymmetricSwapping: true
+   * }
+   * var sourceToTarget = [], levels = [];
+   * var bidiEng = Globalize.bidiEngine(opt);
+   * var src = "text string to be reordered";
+   * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);
+   */
+
+  jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function(options) {
+    var _UNICODE_TYPES = _bidiUnicodeTypes;
+
+    var _STATE_TABLE_LTR = [
+      [0, 3, 0, 1, 0, 0, 0],
+      [0, 3, 0, 1, 2, 2, 0],
+      [0, 3, 0, 0x11, 2, 0, 1],
+      [0, 3, 5, 5, 4, 1, 0],
+      [0, 3, 0x15, 0x15, 4, 0, 1],
+      [0, 3, 5, 5, 4, 2, 0]
+    ];
+
+    var _STATE_TABLE_RTL = [
+      [2, 0, 1, 1, 0, 1, 0],
+      [2, 0, 1, 1, 0, 2, 0],
+      [2, 0, 2, 1, 3, 2, 0],
+      [2, 0, 2, 0x21, 3, 1, 1]
+    ];
+
+    var _TYPE_NAMES_MAP = { L: 0, R: 1, EN: 2, AN: 3, N: 4, B: 5, S: 6 };
+
+    var _UNICODE_RANGES_MAP = {
+      0: 0,
+      5: 1,
+      6: 2,
+      7: 3,
+      0x20: 4,
+      0xfb: 5,
+      0xfe: 6,
+      0xff: 7
+    };
+
+    var _SWAP_TABLE = [
+      "\u0028",
+      "\u0029",
+      "\u0028",
+      "\u003C",
+      "\u003E",
+      "\u003C",
+      "\u005B",
+      "\u005D",
+      "\u005B",
+      "\u007B",
+      "\u007D",
+      "\u007B",
+      "\u00AB",
+      "\u00BB",
+      "\u00AB",
+      "\u2039",
+      "\u203A",
+      "\u2039",
+      "\u2045",
+      "\u2046",
+      "\u2045",
+      "\u207D",
+      "\u207E",
+      "\u207D",
+      "\u208D",
+      "\u208E",
+      "\u208D",
+      "\u2264",
+      "\u2265",
+      "\u2264",
+      "\u2329",
+      "\u232A",
+      "\u2329",
+      "\uFE59",
+      "\uFE5A",
+      "\uFE59",
+      "\uFE5B",
+      "\uFE5C",
+      "\uFE5B",
+      "\uFE5D",
+      "\uFE5E",
+      "\uFE5D",
+      "\uFE64",
+      "\uFE65",
+      "\uFE64"
+    ];
+
+    var _LTR_RANGES_REG_EXPR = 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)$/
+    );
+
+    var _lastArabic = false,
+      _hasUbatB,
+      _hasUbatS,
+      DIR_LTR = 0,
+      DIR_RTL = 1,
+      _isInVisual,
+      _isInRtl,
+      _isOutVisual,
+      _isOutRtl,
+      _isSymmetricSwapping,
+      _dir = DIR_LTR;
+
+    this.__bidiEngine__ = {};
+
+    var _init = function(text, sourceToTargetMap) {
+      if (sourceToTargetMap) {
+        for (var i = 0; i < text.length; i++) {
+          sourceToTargetMap[i] = i;
+        }
+      }
+      if (_isInRtl === undefined) {
+        _isInRtl = _isContextualDirRtl(text);
+      }
+      if (_isOutRtl === undefined) {
+        _isOutRtl = _isContextualDirRtl(text);
+      }
+    };
+
+    // for reference see 3.2 in http://unicode.org/reports/tr9/
+    //
+    var _getCharType = function(ch) {
+      var charCode = ch.charCodeAt(),
+        range = charCode >> 8,
+        rangeIdx = _UNICODE_RANGES_MAP[range];
+
+      if (rangeIdx !== undefined) {
+        return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];
+      } else if (range === 0xfc || range === 0xfd) {
+        return "AL";
+      } else if (_LTR_RANGES_REG_EXPR.test(range)) {
+        //unlikely case
+        return "L";
+      } else if (range === 8) {
+        // even less likely
+        return "R";
+      }
+      return "N"; //undefined type, mark as neutral
+    };
+
+    var _isContextualDirRtl = function(text) {
+      for (var i = 0, charType; i < text.length; i++) {
+        charType = _getCharType(text.charAt(i));
+        if (charType === "L") {
+          return false;
+        } else if (charType === "R") {
+          return true;
+        }
+      }
+      return false;
+    };
+
+    // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/
+    //
+    var _resolveCharType = function(chars, types, resolvedTypes, index) {
+      var cType = types[index],
+        wType,
+        nType,
+        i,
+        len;
+      switch (cType) {
+        case "L":
+        case "R":
+          _lastArabic = false;
+          break;
+        case "N":
+        case "AN":
+          break;
+
+        case "EN":
+          if (_lastArabic) {
+            cType = "AN";
+          }
+          break;
+
+        case "AL":
+          _lastArabic = true;
+          cType = "R";
+          break;
+
+        case "WS":
+          cType = "N";
+          break;
+
+        case "CS":
+          if (
+            index < 1 ||
+            index + 1 >= types.length ||
+            ((wType = resolvedTypes[index - 1]) !== "EN" && wType !== "AN") ||
+            ((nType = types[index + 1]) !== "EN" && nType !== "AN")
+          ) {
+            cType = "N";
+          } else if (_lastArabic) {
+            nType = "AN";
+          }
+          cType = nType === wType ? nType : "N";
+          break;
+
+        case "ES":
+          wType = index > 0 ? resolvedTypes[index - 1] : "B";
+          cType =
+            wType === "EN" &&
+            index + 1 < types.length &&
+            types[index + 1] === "EN"
+              ? "EN"
+              : "N";
+          break;
+
+        case "ET":
+          if (index > 0 && resolvedTypes[index - 1] === "EN") {
+            cType = "EN";
+            break;
+          } else if (_lastArabic) {
+            cType = "N";
+            break;
+          }
+          i = index + 1;
+          len = types.length;
+          while (i < len && types[i] === "ET") {
+            i++;
+          }
+          if (i < len && types[i] === "EN") {
+            cType = "EN";
+          } else {
+            cType = "N";
+          }
+          break;
+
+        case "NSM":
+          if (_isInVisual && !_isInRtl) {
+            //V->L
+            len = types.length;
+            i = index + 1;
+            while (i < len && types[i] === "NSM") {
+              i++;
+            }
+            if (i < len) {
+              var c = chars[index];
+              var rtlCandidate = (c >= 0x0591 && c <= 0x08ff) || c === 0xfb1e;
+              wType = types[i];
+              if (rtlCandidate && (wType === "R" || wType === "AL")) {
+                cType = "R";
+                break;
+              }
+            }
+          }
+          if (index < 1 || (wType = types[index - 1]) === "B") {
+            cType = "N";
+          } else {
+            cType = resolvedTypes[index - 1];
+          }
+          break;
+
+        case "B":
+          _lastArabic = false;
+          _hasUbatB = true;
+          cType = _dir;
+          break;
+
+        case "S":
+          _hasUbatS = true;
+          cType = "N";
+          break;
+
+        case "LRE":
+        case "RLE":
+        case "LRO":
+        case "RLO":
+        case "PDF":
+          _lastArabic = false;
+          break;
+        case "BN":
+          cType = "N";
+          break;
+      }
+      return cType;
+    };
+
+    var _handleUbatS = function(types, levels, length) {
+      for (var i = 0; i < length; i++) {
+        if (types[i] === "S") {
+          levels[i] = _dir;
+          for (var j = i - 1; j >= 0; j--) {
+            if (types[j] === "WS") {
+              levels[j] = _dir;
+            } else {
+              break;
+            }
+          }
+        }
+      }
+    };
+
+    var _invertString = function(text, sourceToTargetMap, levels) {
+      var charArray = text.split("");
+      if (levels) {
+        _computeLevels(charArray, levels, { hiLevel: _dir });
+      }
+      charArray.reverse();
+      sourceToTargetMap && sourceToTargetMap.reverse();
+      return charArray.join("");
+    };
+
+    // For reference see 3.3 in http://unicode.org/reports/tr9/
+    //
+    var _computeLevels = function(chars, levels, params) {
+      var action,
+        condition,
+        i,
+        index,
+        newLevel,
+        prevState,
+        condPos = -1,
+        len = chars.length,
+        newState = 0,
+        resolvedTypes = [],
+        stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,
+        types = [];
+
+      _lastArabic = false;
+      _hasUbatB = false;
+      _hasUbatS = false;
+      for (i = 0; i < len; i++) {
+        types[i] = _getCharType(chars[i]);
+      }
+      for (index = 0; index < len; index++) {
+        prevState = newState;
+        resolvedTypes[index] = _resolveCharType(
+          chars,
+          types,
+          resolvedTypes,
+          index
+        );
+        newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];
+        action = newState & 0xf0;
+        newState &= 0x0f;
+        levels[index] = newLevel = stateTable[newState][5];
+        if (action > 0) {
+          if (action === 0x10) {
+            for (i = condPos; i < index; i++) {
+              levels[i] = 1;
+            }
+            condPos = -1;
+          } else {
+            condPos = -1;
+          }
+        }
+        condition = stateTable[newState][6];
+        if (condition) {
+          if (condPos === -1) {
+            condPos = index;
+          }
+        } else {
+          if (condPos > -1) {
+            for (i = condPos; i < index; i++) {
+              levels[i] = newLevel;
+            }
+            condPos = -1;
+          }
+        }
+        if (types[index] === "B") {
+          levels[index] = 0;
+        }
+        params.hiLevel |= newLevel;
+      }
+      if (_hasUbatS) {
+        _handleUbatS(types, levels, len);
+      }
+    };
+
+    // for reference see 3.4 in http://unicode.org/reports/tr9/
+    //
+    var _invertByLevel = function(
+      level,
+      charArray,
+      sourceToTargetMap,
+      levels,
+      params
+    ) {
+      if (params.hiLevel < level) {
+        return;
+      }
+      if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {
+        charArray.reverse();
+        sourceToTargetMap && sourceToTargetMap.reverse();
+        return;
+      }
+      var ch,
+        high,
+        end,
+        low,
+        len = charArray.length,
+        start = 0;
+
+      while (start < len) {
+        if (levels[start] >= level) {
+          end = start + 1;
+          while (end < len && levels[end] >= level) {
+            end++;
+          }
+          for (low = start, high = end - 1; low < high; low++, high--) {
+            ch = charArray[low];
+            charArray[low] = charArray[high];
+            charArray[high] = ch;
+            if (sourceToTargetMap) {
+              ch = sourceToTargetMap[low];
+              sourceToTargetMap[low] = sourceToTargetMap[high];
+              sourceToTargetMap[high] = ch;
+            }
+          }
+          start = end;
+        }
+        start++;
+      }
+    };
+
+    // for reference see 7 & BD16 in http://unicode.org/reports/tr9/
+    //
+    var _symmetricSwap = function(charArray, levels, params) {
+      if (params.hiLevel !== 0 && _isSymmetricSwapping) {
+        for (var i = 0, index; i < charArray.length; i++) {
+          if (levels[i] === 1) {
+            index = _SWAP_TABLE.indexOf(charArray[i]);
+            if (index >= 0) {
+              charArray[i] = _SWAP_TABLE[index + 1];
+            }
+          }
+        }
+      }
+    };
+
+    var _reorder = function(text, sourceToTargetMap, levels) {
+      var charArray = text.split(""),
+        params = { hiLevel: _dir };
+
+      if (!levels) {
+        levels = [];
+      }
+      _computeLevels(charArray, levels, params);
+      _symmetricSwap(charArray, levels, params);
+      _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);
+      _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);
+      return charArray.join("");
+    };
+
+    // doBidiReorder( text, sourceToTargetMap, levels )
+    // Performs Bidi reordering by implementing Unicode Bidi algorithm.
+    // Returns reordered string
+    // @text [String]:
+    // - input string to be reordered, this is input parameter
+    // $sourceToTargetMap [Array] (optional)
+    // - resultant mapping between input and output strings, this is output parameter
+    // $levels [Array] (optional)
+    // - array of calculated Bidi levels, , this is output parameter
+    this.__bidiEngine__.doBidiReorder = function(
+      text,
+      sourceToTargetMap,
+      levels
+    ) {
+      _init(text, sourceToTargetMap);
+      if (!_isInVisual && _isOutVisual && !_isOutRtl) {
+        // LLTR->VLTR, LRTL->VLTR
+        _dir = _isInRtl ? DIR_RTL : DIR_LTR;
+        text = _reorder(text, sourceToTargetMap, levels);
+      } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {
+        // VRTL->VLTR, VLTR->VRTL
+        _dir = _isInRtl ? DIR_RTL : DIR_LTR;
+        text = _invertString(text, sourceToTargetMap, levels);
+      } else if (!_isInVisual && _isOutVisual && _isOutRtl) {
+        // LLTR->VRTL, LRTL->VRTL
+        _dir = _isInRtl ? DIR_RTL : DIR_LTR;
+        text = _reorder(text, sourceToTargetMap, levels);
+        text = _invertString(text, sourceToTargetMap);
+      } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {
+        // VLTR->LLTR
+        _dir = DIR_LTR;
+        text = _reorder(text, sourceToTargetMap, levels);
+      } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {
+        // VLTR->LRTL, VRTL->LLTR
+        text = _invertString(text, sourceToTargetMap);
+        if (_isInRtl) {
+          //LLTR -> VLTR
+          _dir = DIR_LTR;
+          text = _reorder(text, sourceToTargetMap, levels);
+        } else {
+          //LRTL -> VRTL
+          _dir = DIR_RTL;
+          text = _reorder(text, sourceToTargetMap, levels);
+          text = _invertString(text, sourceToTargetMap);
+        }
+      } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {
+        //  VRTL->LRTL
+        _dir = DIR_RTL;
+        text = _reorder(text, sourceToTargetMap, levels);
+        text = _invertString(text, sourceToTargetMap);
+      } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {
+        // LRTL->LLTR, LLTR->LRTL
+        var isSymmetricSwappingOrig = _isSymmetricSwapping;
+        if (_isInRtl) {
+          //LRTL->LLTR
+          _dir = DIR_RTL;
+          text = _reorder(text, sourceToTargetMap, levels);
+          _dir = DIR_LTR;
+          _isSymmetricSwapping = false;
+          text = _reorder(text, sourceToTargetMap, levels);
+          _isSymmetricSwapping = isSymmetricSwappingOrig;
+        } else {
+          //LLTR->LRTL
+          _dir = DIR_LTR;
+          text = _reorder(text, sourceToTargetMap, levels);
+          text = _invertString(text, sourceToTargetMap);
+          _dir = DIR_RTL;
+          _isSymmetricSwapping = false;
+          text = _reorder(text, sourceToTargetMap, levels);
+          _isSymmetricSwapping = isSymmetricSwappingOrig;
+          text = _invertString(text, sourceToTargetMap);
+        }
+      }
+      return text;
+    };
+
+    /**
+     * @name setOptions( options )
+     * @function
+     * Sets options for Bidi conversion
+     * @param {Object}:
+     * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)
+     * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)
+     * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)
+     * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)
+     * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),
+     */
+    this.__bidiEngine__.setOptions = function(options) {
+      if (options) {
+        _isInVisual = options.isInputVisual;
+        _isOutVisual = options.isOutputVisual;
+        _isInRtl = options.isInputRtl;
+        _isOutRtl = options.isOutputRtl;
+        _isSymmetricSwapping = options.isSymmetricSwapping;
+      }
+    };
+
+    this.__bidiEngine__.setOptions(options);
+    return this.__bidiEngine__;
+  };
+
+  var _bidiUnicodeTypes = bidiUnicodeTypes;
+
+  var bidiEngine = new jsPDF.__bidiEngine__({ isInputVisual: true });
+
+  var bidiEngineFunction = function(args) {
+    var text = args.text;
+    var x = args.x;
+    var y = args.y;
+    var options = args.options || {};
+    var mutex = args.mutex || {};
+    var lang = options.lang;
+    var tmpText = [];
+
+    options.isInputVisual =
+      typeof options.isInputVisual === "boolean" ? options.isInputVisual : true;
+    bidiEngine.setOptions(options);
+
+    if (Object.prototype.toString.call(text) === "[object Array]") {
+      var i = 0;
+      tmpText = [];
+      for (i = 0; i < text.length; i += 1) {
+        if (Object.prototype.toString.call(text[i]) === "[object Array]") {
+          tmpText.push([
+            bidiEngine.doBidiReorder(text[i][0]),
+            text[i][1],
+            text[i][2]
+          ]);
+        } else {
+          tmpText.push([bidiEngine.doBidiReorder(text[i])]);
+        }
+      }
+      args.text = tmpText;
+    } else {
+      args.text = bidiEngine.doBidiReorder(text);
+    }
+    bidiEngine.setOptions({ isInputVisual: true });
+  };
+
+  jsPDF.API.events.push(["postProcessText", bidiEngineFunction]);
+})(jsPDF);
+
+/* eslint-disable no-control-regex */
+
+jsPDF.API.TTFFont = (function() {
+  /************************************************************************/
+  /* function : open                                                       */
+  /* comment : Decode the encoded ttf content and create a TTFFont object. */
+  /************************************************************************/
+  TTFFont.open = function(file) {
+    return new TTFFont(file);
+  };
+  /***************************************************************/
+  /* function : TTFFont gernerator                               */
+  /* comment : Decode TTF contents are parsed, Data,             */
+  /* Subset object is created, and registerTTF function is called.*/
+  /***************************************************************/
+  function TTFFont(rawData) {
+    var data;
+    this.rawData = rawData;
+    data = this.contents = new Data(rawData);
+    this.contents.pos = 4;
+    if (data.readString(4) === "ttcf") {
+      throw new Error("TTCF not supported.");
+    } else {
+      data.pos = 0;
+      this.parse();
+      this.subset = new Subset(this);
+      this.registerTTF();
+    }
+  }
+  /********************************************************/
+  /* function : parse                                     */
+  /* comment : TTF Parses the file contents by each table.*/
+  /********************************************************/
+  TTFFont.prototype.parse = function() {
+    this.directory = new Directory(this.contents);
+    this.head = new HeadTable(this);
+    this.name = new NameTable(this);
+    this.cmap = new CmapTable(this);
+    this.toUnicode = {};
+    this.hhea = new HheaTable(this);
+    this.maxp = new MaxpTable(this);
+    this.hmtx = new HmtxTable(this);
+    this.post = new PostTable(this);
+    this.os2 = new OS2Table(this);
+    this.loca = new LocaTable(this);
+    this.glyf = new GlyfTable(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;
+    return (this.bbox = [
+      this.head.xMin,
+      this.head.yMin,
+      this.head.xMax,
+      this.head.yMax
+    ]);
+  };
+  /***************************************************************/
+  /* function : registerTTF                                      */
+  /* comment : Get the value to assign pdf font descriptors.     */
+  /***************************************************************/
+  TTFFont.prototype.registerTTF = function() {
+    var e, hi, low, raw, _ref;
+    this.scaleFactor = 1000.0 / this.head.unitsPerEm;
+    this.bbox = function() {
+      var _i, _len, _ref, _results;
+      _ref = this.bbox;
+      _results = [];
+      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+        e = _ref[_i];
+        _results.push(Math.round(e * this.scaleFactor));
+      }
+      return _results;
+    }.call(this);
+    this.stemV = 0;
+    if (this.post.exists) {
+      raw = this.post.italic_angle;
+      hi = raw >> 16;
+      low = raw & 0xff;
+      if ((hi & 0x8000) !== 0) {
+        hi = -((hi ^ 0xffff) + 1);
+      }
+      this.italicAngle = +("" + hi + "." + low);
+    } else {
+      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 =
+      (_ref = this.familyClass) === 1 ||
+      _ref === 2 ||
+      _ref === 3 ||
+      _ref === 4 ||
+      _ref === 5 ||
+      _ref === 7;
+    this.isScript = this.familyClass === 10;
+    this.flags = 0;
+    if (this.post.isFixedPitch) {
+      this.flags |= 1 << 0;
+    }
+    if (this.isSerif) {
+      this.flags |= 1 << 1;
+    }
+    if (this.isScript) {
+      this.flags |= 1 << 3;
+    }
+    if (this.italicAngle !== 0) {
+      this.flags |= 1 << 6;
+    }
+    this.flags |= 1 << 5;
+    if (!this.cmap.unicode) {
+      throw new Error("No unicode cmap for font");
+    }
+  };
+  TTFFont.prototype.characterToGlyph = function(character) {
+    var _ref;
+    return (
+      ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) ||
+      0
+    );
+  };
+  TTFFont.prototype.widthOfGlyph = function(glyph) {
+    var scale;
+    scale = 1000.0 / this.head.unitsPerEm;
+    return this.hmtx.forGlyph(glyph).advance * scale;
+  };
+  TTFFont.prototype.widthOfString = function(string, size, charSpace) {
+    var charCode, i, scale, width, _ref;
+    string = "" + string;
+    width = 0;
+    for (
+      i = 0, _ref = string.length;
+      0 <= _ref ? i < _ref : i > _ref;
+      i = 0 <= _ref ? ++i : --i
+    ) {
+      charCode = string.charCodeAt(i);
+      width +=
+        this.widthOfGlyph(this.characterToGlyph(charCode)) +
+          charSpace * (1000 / size) || 0;
+    }
+    scale = size / 1000;
+    return width * scale;
+  };
+  TTFFont.prototype.lineHeight = function(size, includeGap) {
+    var gap;
+    if (includeGap == null) {
+      includeGap = false;
+    }
+    gap = includeGap ? this.lineGap : 0;
+    return ((this.ascender + gap - this.decender) / 1000) * size;
+  };
+  return TTFFont;
+})();
+
+/************************************************************************************************/
+/* function : Data                                                                              */
+/* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/
+/************************************************************************************************/
+var Data = (function() {
+  function Data(data) {
+    this.data = data != null ? data : [];
+    this.pos = 0;
+    this.length = this.data.length;
+  }
+  Data.prototype.readByte = function() {
+    return this.data[this.pos++];
+  };
+  Data.prototype.writeByte = function(byte) {
+    return (this.data[this.pos++] = byte);
+  };
+  Data.prototype.readUInt32 = function() {
+    var b1, b2, b3, b4;
+    b1 = this.readByte() * 0x1000000;
+    b2 = this.readByte() << 16;
+    b3 = this.readByte() << 8;
+    b4 = this.readByte();
+    return b1 + b2 + b3 + b4;
+  };
+  Data.prototype.writeUInt32 = function(val) {
+    this.writeByte((val >>> 24) & 0xff);
+    this.writeByte((val >> 16) & 0xff);
+    this.writeByte((val >> 8) & 0xff);
+    return this.writeByte(val & 0xff);
+  };
+  Data.prototype.readInt32 = function() {
+    var int;
+    int = this.readUInt32();
+    if (int >= 0x80000000) {
+      return int - 0x100000000;
+    } else {
+      return int;
+    }
+  };
+  Data.prototype.writeInt32 = function(val) {
+    if (val < 0) {
+      val += 0x100000000;
+    }
+    return this.writeUInt32(val);
+  };
+  Data.prototype.readUInt16 = function() {
+    var b1, b2;
+    b1 = this.readByte() << 8;
+    b2 = this.readByte();
+    return b1 | b2;
+  };
+  Data.prototype.writeUInt16 = function(val) {
+    this.writeByte((val >> 8) & 0xff);
+    return this.writeByte(val & 0xff);
+  };
+  Data.prototype.readInt16 = function() {
+    var int;
+    int = this.readUInt16();
+    if (int >= 0x8000) {
+      return int - 0x10000;
+    } else {
+      return int;
+    }
+  };
+  Data.prototype.writeInt16 = function(val) {
+    if (val < 0) {
+      val += 0x10000;
+    }
+    return this.writeUInt16(val);
+  };
+  Data.prototype.readString = function(length) {
+    var i, ret;
+    ret = [];
+    for (
+      i = 0;
+      0 <= length ? i < length : i > length;
+      i = 0 <= length ? ++i : --i
+    ) {
+      ret[i] = String.fromCharCode(this.readByte());
+    }
+    return ret.join("");
+  };
+  Data.prototype.writeString = function(val) {
+    var i, _ref, _results;
+    _results = [];
+    for (
+      i = 0, _ref = val.length;
+      0 <= _ref ? i < _ref : i > _ref;
+      i = 0 <= _ref ? ++i : --i
+    ) {
+      _results.push(this.writeByte(val.charCodeAt(i)));
+    }
+    return _results;
+  };
+  /*Data.prototype.stringAt = function (pos, length) {
+            this.pos = pos;
+            return this.readString(length);
+        };*/
+  Data.prototype.readShort = function() {
+    return this.readInt16();
+  };
+  Data.prototype.writeShort = function(val) {
+    return this.writeInt16(val);
+  };
+  Data.prototype.readLongLong = function() {
+    var b1, b2, b3, b4, b5, b6, b7, b8;
+    b1 = this.readByte();
+    b2 = this.readByte();
+    b3 = this.readByte();
+    b4 = this.readByte();
+    b5 = this.readByte();
+    b6 = this.readByte();
+    b7 = this.readByte();
+    b8 = this.readByte();
+    if (b1 & 0x80) {
+      return (
+        ((b1 ^ 0xff) * 0x100000000000000 +
+          (b2 ^ 0xff) * 0x1000000000000 +
+          (b3 ^ 0xff) * 0x10000000000 +
+          (b4 ^ 0xff) * 0x100000000 +
+          (b5 ^ 0xff) * 0x1000000 +
+          (b6 ^ 0xff) * 0x10000 +
+          (b7 ^ 0xff) * 0x100 +
+          (b8 ^ 0xff) +
+          1) *
+        -1
+      );
+    }
+    return (
+      b1 * 0x100000000000000 +
+      b2 * 0x1000000000000 +
+      b3 * 0x10000000000 +
+      b4 * 0x100000000 +
+      b5 * 0x1000000 +
+      b6 * 0x10000 +
+      b7 * 0x100 +
+      b8
+    );
+  };
+  Data.prototype.writeLongLong = function(val) {
+    var high, low;
+    high = Math.floor(val / 0x100000000);
+    low = val & 0xffffffff;
+    this.writeByte((high >> 24) & 0xff);
+    this.writeByte((high >> 16) & 0xff);
+    this.writeByte((high >> 8) & 0xff);
+    this.writeByte(high & 0xff);
+    this.writeByte((low >> 24) & 0xff);
+    this.writeByte((low >> 16) & 0xff);
+    this.writeByte((low >> 8) & 0xff);
+    return this.writeByte(low & 0xff);
+  };
+  Data.prototype.readInt = function() {
+    return this.readInt32();
+  };
+  Data.prototype.writeInt = function(val) {
+    return this.writeInt32(val);
+  };
+  /*Data.prototype.slice = function (start, end) {
+            return this.data.slice(start, end);
+        };*/
+  Data.prototype.read = function(bytes) {
+    var buf, i;
+    buf = [];
+    for (
+      i = 0;
+      0 <= bytes ? i < bytes : i > bytes;
+      i = 0 <= bytes ? ++i : --i
+    ) {
+      buf.push(this.readByte());
+    }
+    return buf;
+  };
+  Data.prototype.write = function(bytes) {
+    var byte, i, _len, _results;
+    _results = [];
+    for (i = 0, _len = bytes.length; i < _len; i++) {
+      byte = bytes[i];
+      _results.push(this.writeByte(byte));
+    }
+    return _results;
+  };
+  return Data;
+})();
+
+var Directory = (function() {
+  var checksum;
+
+  /*****************************************************************************************************/
+  /* function : Directory generator                                                                    */
+  /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/
+  /*****************************************************************************************************/
+  function Directory(data) {
+    var entry, i, _ref;
+    this.scalarType = data.readInt();
+    this.tableCount = data.readShort();
+    this.searchRange = data.readShort();
+    this.entrySelector = data.readShort();
+    this.rangeShift = data.readShort();
+    this.tables = {};
+    for (
+      i = 0, _ref = this.tableCount;
+      0 <= _ref ? i < _ref : i > _ref;
+      i = 0 <= _ref ? ++i : --i
+    ) {
+      entry = {
+        tag: data.readString(4),
+        checksum: data.readInt(),
+        offset: data.readInt(),
+        length: data.readInt()
+      };
+      this.tables[entry.tag] = entry;
+    }
+  }
+  /********************************************************************************************************/
+  /* function : encode                                                                                    */
+  /* comment : It encodes and stores the font table object and information used for the directory object. */
+  /********************************************************************************************************/
+  Directory.prototype.encode = function(tables) {
+    var adjustment,
+      directory,
+      directoryLength,
+      entrySelector,
+      headOffset,
+      log2,
+      offset,
+      rangeShift,
+      searchRange,
+      sum,
+      table,
+      tableCount,
+      tableData,
+      tag;
+    tableCount = Object.keys(tables).length;
+    log2 = Math.log(2);
+    searchRange = Math.floor(Math.log(tableCount) / log2) * 16;
+    entrySelector = Math.floor(searchRange / log2);
+    rangeShift = tableCount * 16 - searchRange;
+    directory = new Data();
+    directory.writeInt(this.scalarType);
+    directory.writeShort(tableCount);
+    directory.writeShort(searchRange);
+    directory.writeShort(entrySelector);
+    directory.writeShort(rangeShift);
+    directoryLength = tableCount * 16;
+    offset = directory.pos + directoryLength;
+    headOffset = null;
+    tableData = [];
+    for (tag in tables) {
+      table = tables[tag];
+      directory.writeString(tag);
+      directory.writeInt(checksum(table));
+      directory.writeInt(offset);
+      directory.writeInt(table.length);
+      tableData = tableData.concat(table);
+      if (tag === "head") {
+        headOffset = offset;
+      }
+      offset += table.length;
+      while (offset % 4) {
+        tableData.push(0);
+        offset++;
+      }
+    }
+    directory.write(tableData);
+    sum = checksum(directory.data);
+    adjustment = 0xb1b0afba - sum;
+    directory.pos = headOffset + 8;
+    directory.writeUInt32(adjustment);
+    return directory.data;
+  };
+  /***************************************************************/
+  /* function : checksum                                         */
+  /* comment : Duplicate the table for the tag.                  */
+  /***************************************************************/
+  checksum = function(data) {
+    var i, sum, tmp, _ref;
+    data = __slice.call(data);
+    while (data.length % 4) {
+      data.push(0);
+    }
+    tmp = new Data(data);
+    sum = 0;
+    for (i = 0, _ref = data.length; i < _ref; i = i += 4) {
+      sum += tmp.readUInt32();
+    }
+    return sum & 0xffffffff;
+  };
+  return Directory;
+})();
+
+var Table,
+  __hasProp = {}.hasOwnProperty,
+  __extends = function(child, parent) {
+    for (var key in parent) {
+      if (__hasProp.call(parent, key)) child[key] = parent[key];
+    }
+
+    function ctor() {
+      this.constructor = child;
+    }
+    ctor.prototype = parent.prototype;
+    child.prototype = new ctor();
+    child.__super__ = parent.prototype;
+    return child;
+  };
+
+/***************************************************************/
+/* function : Table                                            */
+/* comment : Save info for each table, and parse the table.    */
+/***************************************************************/
+Table = (function() {
+  function Table(file) {
+    var info;
+    this.file = file;
+    info = this.file.directory.tables[this.tag];
+    this.exists = !!info;
+    if (info) {
+      (this.offset = info.offset), (this.length = info.length);
+      this.parse(this.file.contents);
+    }
+  }
+  Table.prototype.parse = function() {};
+  Table.prototype.encode = function() {};
+  Table.prototype.raw = function() {
+    if (!this.exists) {
+      return null;
+    }
+    this.file.contents.pos = this.offset;
+    return this.file.contents.read(this.length);
+  };
+  return Table;
+})();
+
+var HeadTable = (function(_super) {
+  __extends(HeadTable, _super);
+
+  function HeadTable() {
+    return HeadTable.__super__.constructor.apply(this, arguments);
+  }
+  HeadTable.prototype.tag = "head";
+  HeadTable.prototype.parse = function(data) {
+    data.pos = this.offset;
+    this.version = data.readInt();
+    this.revision = data.readInt();
+    this.checkSumAdjustment = data.readInt();
+    this.magicNumber = data.readInt();
+    this.flags = data.readShort();
+    this.unitsPerEm = data.readShort();
+    this.created = data.readLongLong();
+    this.modified = data.readLongLong();
+    this.xMin = data.readShort();
+    this.yMin = data.readShort();
+    this.xMax = data.readShort();
+    this.yMax = data.readShort();
+    this.macStyle = data.readShort();
+    this.lowestRecPPEM = data.readShort();
+    this.fontDirectionHint = data.readShort();
+    this.indexToLocFormat = data.readShort();
+    return (this.glyphDataFormat = data.readShort());
+  };
+  HeadTable.prototype.encode = function(indexToLocFormat) {
+    var table;
+    table = new Data();
+    table.writeInt(this.version);
+    table.writeInt(this.revision);
+    table.writeInt(this.checkSumAdjustment);
+    table.writeInt(this.magicNumber);
+    table.writeShort(this.flags);
+    table.writeShort(this.unitsPerEm);
+    table.writeLongLong(this.created);
+    table.writeLongLong(this.modified);
+    table.writeShort(this.xMin);
+    table.writeShort(this.yMin);
+    table.writeShort(this.xMax);
+    table.writeShort(this.yMax);
+    table.writeShort(this.macStyle);
+    table.writeShort(this.lowestRecPPEM);
+    table.writeShort(this.fontDirectionHint);
+    table.writeShort(indexToLocFormat);
+    table.writeShort(this.glyphDataFormat);
+    return table.data;
+  };
+  return HeadTable;
+})(Table);
+
+/************************************************************************************/
+/* function : CmapEntry                                                             */
+/* comment : Cmap Initializes and encodes object information (required by pdf spec).*/
+/************************************************************************************/
+var CmapEntry = (function() {
+  function CmapEntry(data, offset) {
+    var code,
+      count,
+      endCode,
+      glyphId,
+      glyphIds,
+      i,
+      idDelta,
+      idRangeOffset,
+      index,
+      saveOffset,
+      segCount,
+      segCountX2,
+      start,
+      startCode,
+      tail,
+      _j,
+      _k,
+      _len;
+    this.platformID = data.readUInt16();
+    this.encodingID = data.readShort();
+    this.offset = offset + data.readInt();
+    saveOffset = data.pos;
+    data.pos = this.offset;
+    this.format = data.readUInt16();
+    this.length = data.readUInt16();
+    this.language = data.readUInt16();
+    this.isUnicode =
+      (this.platformID === 3 && this.encodingID === 1 && this.format === 4) ||
+      (this.platformID === 0 && this.format === 4);
+    this.codeMap = {};
+    switch (this.format) {
+      case 0:
+        for (i = 0; i < 256; ++i) {
+          this.codeMap[i] = data.readByte();
+        }
+        break;
+      case 4:
+        segCountX2 = data.readUInt16();
+        segCount = segCountX2 / 2;
+        data.pos += 6;
+        endCode = (function() {
+          var _j, _results;
+          _results = [];
+          for (
+            i = _j = 0;
+            0 <= segCount ? _j < segCount : _j > segCount;
+            i = 0 <= segCount ? ++_j : --_j
+          ) {
+            _results.push(data.readUInt16());
+          }
+          return _results;
+        })();
+        data.pos += 2;
+        startCode = (function() {
+          var _j, _results;
+          _results = [];
+          for (
+            i = _j = 0;
+            0 <= segCount ? _j < segCount : _j > segCount;
+            i = 0 <= segCount ? ++_j : --_j
+          ) {
+            _results.push(data.readUInt16());
+          }
+          return _results;
+        })();
+        idDelta = (function() {
+          var _j, _results;
+          _results = [];
+          for (
+            i = _j = 0;
+            0 <= segCount ? _j < segCount : _j > segCount;
+            i = 0 <= segCount ? ++_j : --_j
+          ) {
+            _results.push(data.readUInt16());
+          }
+          return _results;
+        })();
+        idRangeOffset = (function() {
+          var _j, _results;
+          _results = [];
+          for (
+            i = _j = 0;
+            0 <= segCount ? _j < segCount : _j > segCount;
+            i = 0 <= segCount ? ++_j : --_j
+          ) {
+            _results.push(data.readUInt16());
+          }
+          return _results;
+        })();
+        count = (this.length - data.pos + this.offset) / 2;
+        glyphIds = (function() {
+          var _j, _results;
+          _results = [];
+          for (
+            i = _j = 0;
+            0 <= count ? _j < count : _j > count;
+            i = 0 <= count ? ++_j : --_j
+          ) {
+            _results.push(data.readUInt16());
+          }
+          return _results;
+        })();
+        for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {
+          tail = endCode[i];
+          start = startCode[i];
+          for (
+            code = _k = start;
+            start <= tail ? _k <= tail : _k >= tail;
+            code = start <= tail ? ++_k : --_k
+          ) {
+            if (idRangeOffset[i] === 0) {
+              glyphId = code + idDelta[i];
+            } else {
+              index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);
+              glyphId = glyphIds[index] || 0;
+              if (glyphId !== 0) {
+                glyphId += idDelta[i];
+              }
+            }
+            this.codeMap[code] = glyphId & 0xffff;
+          }
+        }
+    }
+    data.pos = saveOffset;
+  }
+  CmapEntry.encode = function(charmap, encoding) {
+    var charMap,
+      code,
+      codeMap,
+      codes,
+      delta,
+      deltas,
+      diff,
+      endCode,
+      endCodes,
+      entrySelector,
+      glyphIDs,
+      i,
+      id,
+      indexes,
+      last,
+      map,
+      nextID,
+      offset,
+      old,
+      rangeOffsets,
+      rangeShift,
+      searchRange,
+      segCount,
+      segCountX2,
+      startCode,
+      startCodes,
+      startGlyph,
+      subtable,
+      _i,
+      _j,
+      _k,
+      _l,
+      _len,
+      _len1,
+      _len2,
+      _len3,
+      _len4,
+      _len5,
+      _len6,
+      _len7,
+      _m,
+      _n,
+      _name,
+      _o,
+      _p,
+      _q;
+    subtable = new Data();
+    codes = Object.keys(charmap).sort(function(a, b) {
+      return a - b;
+    });
+    switch (encoding) {
+      case "macroman":
+        id = 0;
+        indexes = (function() {
+          var _results = [];
+          for (i = 0; i < 256; ++i) {
+            _results.push(0);
+          }
+          return _results;
+        })();
+        map = {
+          0: 0
+        };
+        codeMap = {};
+        for (_i = 0, _len = codes.length; _i < _len; _i++) {
+          code = codes[_i];
+          if (map[(_name = charmap[code])] == null) {
+            map[_name] = ++id;
+          }
+          codeMap[code] = {
+            old: charmap[code],
+            new: map[charmap[code]]
+          };
+          indexes[code] = map[charmap[code]];
+        }
+        subtable.writeUInt16(1);
+        subtable.writeUInt16(0);
+        subtable.writeUInt32(12);
+        subtable.writeUInt16(0);
+        subtable.writeUInt16(262);
+        subtable.writeUInt16(0);
+        subtable.write(indexes);
+        return {
+          charMap: codeMap,
+          subtable: subtable.data,
+          maxGlyphID: id + 1
+        };
+      case "unicode":
+        startCodes = [];
+        endCodes = [];
+        nextID = 0;
+        map = {};
+        charMap = {};
+        last = diff = null;
+        for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {
+          code = codes[_j];
+          old = charmap[code];
+          if (map[old] == null) {
+            map[old] = ++nextID;
+          }
+          charMap[code] = {
+            old: old,
+            new: map[old]
+          };
+          delta = map[old] - code;
+          if (last == null || delta !== diff) {
+            if (last) {
+              endCodes.push(last);
+            }
+            startCodes.push(code);
+            diff = delta;
+          }
+          last = code;
+        }
+        if (last) {
+          endCodes.push(last);
+        }
+        endCodes.push(0xffff);
+        startCodes.push(0xffff);
+        segCount = startCodes.length;
+        segCountX2 = segCount * 2;
+        searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);
+        entrySelector = Math.log(searchRange / 2) / Math.LN2;
+        rangeShift = 2 * segCount - searchRange;
+        deltas = [];
+        rangeOffsets = [];
+        glyphIDs = [];
+        for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {
+          startCode = startCodes[i];
+          endCode = endCodes[i];
+          if (startCode === 0xffff) {
+            deltas.push(0);
+            rangeOffsets.push(0);
+            break;
+          }
+          startGlyph = charMap[startCode]["new"];
+          if (startCode - startGlyph >= 0x8000) {
+            deltas.push(0);
+            rangeOffsets.push(2 * (glyphIDs.length + segCount - i));
+            for (
+              code = _l = startCode;
+              startCode <= endCode ? _l <= endCode : _l >= endCode;
+              code = startCode <= endCode ? ++_l : --_l
+            ) {
+              glyphIDs.push(charMap[code]["new"]);
+            }
+          } else {
+            deltas.push(startGlyph - startCode);
+            rangeOffsets.push(0);
+          }
+        }
+        subtable.writeUInt16(3);
+        subtable.writeUInt16(1);
+        subtable.writeUInt32(12);
+        subtable.writeUInt16(4);
+        subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);
+        subtable.writeUInt16(0);
+        subtable.writeUInt16(segCountX2);
+        subtable.writeUInt16(searchRange);
+        subtable.writeUInt16(entrySelector);
+        subtable.writeUInt16(rangeShift);
+        for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {
+          code = endCodes[_m];
+          subtable.writeUInt16(code);
+        }
+        subtable.writeUInt16(0);
+        for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {
+          code = startCodes[_n];
+          subtable.writeUInt16(code);
+        }
+        for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {
+          delta = deltas[_o];
+          subtable.writeUInt16(delta);
+        }
+        for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {
+          offset = rangeOffsets[_p];
+          subtable.writeUInt16(offset);
+        }
+        for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {
+          id = glyphIDs[_q];
+          subtable.writeUInt16(id);
+        }
+        return {
+          charMap: charMap,
+          subtable: subtable.data,
+          maxGlyphID: nextID + 1
+        };
+    }
+  };
+  return CmapEntry;
+})();
+
+var CmapTable = (function(_super) {
+  __extends(CmapTable, _super);
+
+  function CmapTable() {
+    return CmapTable.__super__.constructor.apply(this, arguments);
+  }
+  CmapTable.prototype.tag = "cmap";
+  CmapTable.prototype.parse = function(data) {
+    var entry, i, tableCount;
+    data.pos = this.offset;
+    this.version = data.readUInt16();
+    tableCount = data.readUInt16();
+    this.tables = [];
+    this.unicode = null;
+    for (
+      i = 0;
+      0 <= tableCount ? i < tableCount : i > tableCount;
+      i = 0 <= tableCount ? ++i : --i
+    ) {
+      entry = new CmapEntry(data, this.offset);
+      this.tables.push(entry);
+      if (entry.isUnicode) {
+        if (this.unicode == null) {
+          this.unicode = entry;
+        }
+      }
+    }
+    return true;
+  };
+  /*************************************************************************/
+  /* function : encode                                                     */
+  /* comment : Encode the cmap table corresponding to the input character. */
+  /*************************************************************************/
+  CmapTable.encode = function(charmap, encoding) {
+    var result, table;
+    if (encoding == null) {
+      encoding = "macroman";
+    }
+    result = CmapEntry.encode(charmap, encoding);
+    table = new Data();
+    table.writeUInt16(0);
+    table.writeUInt16(1);
+    result.table = table.data.concat(result.subtable);
+    return result;
+  };
+  return CmapTable;
+})(Table);
+
+var HheaTable = (function(_super) {
+  __extends(HheaTable, _super);
+
+  function HheaTable() {
+    return HheaTable.__super__.constructor.apply(this, arguments);
+  }
+  HheaTable.prototype.tag = "hhea";
+  HheaTable.prototype.parse = function(data) {
+    data.pos = this.offset;
+    this.version = data.readInt();
+    this.ascender = data.readShort();
+    this.decender = data.readShort();
+    this.lineGap = data.readShort();
+    this.advanceWidthMax = data.readShort();
+    this.minLeftSideBearing = data.readShort();
+    this.minRightSideBearing = data.readShort();
+    this.xMaxExtent = data.readShort();
+    this.caretSlopeRise = data.readShort();
+    this.caretSlopeRun = data.readShort();
+    this.caretOffset = data.readShort();
+    data.pos += 4 * 2;
+    this.metricDataFormat = data.readShort();
+    return (this.numberOfMetrics = data.readUInt16());
+  };
+  /*HheaTable.prototype.encode = function (ids) {
+            var i, table, _i, _ref;
+            table = new Data;
+            table.writeInt(this.version);
+            table.writeShort(this.ascender);
+            table.writeShort(this.decender);
+            table.writeShort(this.lineGap);
+            table.writeShort(this.advanceWidthMax);
+            table.writeShort(this.minLeftSideBearing);
+            table.writeShort(this.minRightSideBearing);
+            table.writeShort(this.xMaxExtent);
+            table.writeShort(this.caretSlopeRise);
+            table.writeShort(this.caretSlopeRun);
+            table.writeShort(this.caretOffset);
+            for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+                table.writeByte(0);
+            }
+            table.writeShort(this.metricDataFormat);
+            table.writeUInt16(ids.length);
+            return table.data;
+        };*/
+  return HheaTable;
+})(Table);
+
+var OS2Table = (function(_super) {
+  __extends(OS2Table, _super);
+
+  function OS2Table() {
+    return OS2Table.__super__.constructor.apply(this, arguments);
+  }
+  OS2Table.prototype.tag = "OS/2";
+  OS2Table.prototype.parse = function(data) {
+    data.pos = this.offset;
+    this.version = data.readUInt16();
+    this.averageCharWidth = data.readShort();
+    this.weightClass = data.readUInt16();
+    this.widthClass = data.readUInt16();
+    this.type = data.readShort();
+    this.ySubscriptXSize = data.readShort();
+    this.ySubscriptYSize = data.readShort();
+    this.ySubscriptXOffset = data.readShort();
+    this.ySubscriptYOffset = data.readShort();
+    this.ySuperscriptXSize = data.readShort();
+    this.ySuperscriptYSize = data.readShort();
+    this.ySuperscriptXOffset = data.readShort();
+    this.ySuperscriptYOffset = data.readShort();
+    this.yStrikeoutSize = data.readShort();
+    this.yStrikeoutPosition = data.readShort();
+    this.familyClass = data.readShort();
+    this.panose = (function() {
+      var i, _results;
+      _results = [];
+      for (i = 0; i < 10; ++i) {
+        _results.push(data.readByte());
+      }
+      return _results;
+    })();
+    this.charRange = (function() {
+      var i, _results;
+      _results = [];
+      for (i = 0; i < 4; ++i) {
+        _results.push(data.readInt());
+      }
+      return _results;
+    })();
+    this.vendorID = data.readString(4);
+    this.selection = data.readShort();
+    this.firstCharIndex = data.readShort();
+    this.lastCharIndex = data.readShort();
+    if (this.version > 0) {
+      this.ascent = data.readShort();
+      this.descent = data.readShort();
+      this.lineGap = data.readShort();
+      this.winAscent = data.readShort();
+      this.winDescent = data.readShort();
+      this.codePageRange = (function() {
+        var i, _results;
+        _results = [];
+        for (i = 0; i < 2; i = ++i) {
+          _results.push(data.readInt());
+        }
+        return _results;
+      })();
+      if (this.version > 1) {
+        this.xHeight = data.readShort();
+        this.capHeight = data.readShort();
+        this.defaultChar = data.readShort();
+        this.breakChar = data.readShort();
+        return (this.maxContext = data.readShort());
+      }
+    }
+  };
+  /*OS2Table.prototype.encode = function () {
+            return this.raw();
+        };*/
+  return OS2Table;
+})(Table);
+
+var PostTable = (function(_super) {
+  __extends(PostTable, _super);
+
+  function PostTable() {
+    return PostTable.__super__.constructor.apply(this, arguments);
+  }
+  PostTable.prototype.tag = "post";
+  PostTable.prototype.parse = function(data) {
+    var length, numberOfGlyphs, _results;
+    data.pos = this.offset;
+    this.format = data.readInt();
+    this.italicAngle = data.readInt();
+    this.underlinePosition = data.readShort();
+    this.underlineThickness = data.readShort();
+    this.isFixedPitch = data.readInt();
+    this.minMemType42 = data.readInt();
+    this.maxMemType42 = data.readInt();
+    this.minMemType1 = data.readInt();
+    this.maxMemType1 = data.readInt();
+    switch (this.format) {
+      case 0x00010000:
+        break;
+      case 0x00020000:
+        numberOfGlyphs = data.readUInt16();
+        this.glyphNameIndex = [];
+        var i;
+        for (
+          i = 0;
+          0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs;
+          i = 0 <= numberOfGlyphs ? ++i : --i
+        ) {
+          this.glyphNameIndex.push(data.readUInt16());
+        }
+        this.names = [];
+        _results = [];
+        while (data.pos < this.offset + this.length) {
+          length = data.readByte();
+          _results.push(this.names.push(data.readString(length)));
+        }
+        return _results;
+      case 0x00025000:
+        numberOfGlyphs = data.readUInt16();
+        return (this.offsets = data.read(numberOfGlyphs));
+      case 0x00030000:
+        break;
+      case 0x00040000:
+        return (this.map = function() {
+          var _j, _ref, _results1;
+          _results1 = [];
+          for (
+            i = _j = 0, _ref = this.file.maxp.numGlyphs;
+            0 <= _ref ? _j < _ref : _j > _ref;
+            i = 0 <= _ref ? ++_j : --_j
+          ) {
+            _results1.push(data.readUInt32());
+          }
+          return _results1;
+        }.call(this));
+    }
+  };
+  return PostTable;
+})(Table);
+
+/*********************************************************************************************************/
+/* function : NameEntry                                                                                  */
+/* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/
+/*********************************************************************************************************/
+var NameEntry = (function() {
+  function NameEntry(raw, entry) {
+    this.raw = raw;
+    this.length = raw.length;
+    this.platformID = entry.platformID;
+    this.encodingID = entry.encodingID;
+    this.languageID = entry.languageID;
+  }
+  return NameEntry;
+})();
+
+var NameTable = (function(_super) {
+  __extends(NameTable, _super);
+
+  function NameTable() {
+    return NameTable.__super__.constructor.apply(this, arguments);
+  }
+  NameTable.prototype.tag = "name";
+  NameTable.prototype.parse = function(data) {
+    var count,
+      entries,
+      entry,
+      i,
+      name,
+      stringOffset,
+      strings,
+      text,
+      _j,
+      _len,
+      _name;
+    data.pos = this.offset;
+    data.readShort(); //format
+    count = data.readShort();
+    stringOffset = data.readShort();
+    entries = [];
+    for (
+      i = 0;
+      0 <= count ? i < count : i > count;
+      i = 0 <= count ? ++i : --i
+    ) {
+      entries.push({
+        platformID: data.readShort(),
+        encodingID: data.readShort(),
+        languageID: data.readShort(),
+        nameID: data.readShort(),
+        length: data.readShort(),
+        offset: this.offset + stringOffset + data.readShort()
+      });
+    }
+    strings = {};
+    for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {
+      entry = entries[i];
+      data.pos = entry.offset;
+      text = data.readString(entry.length);
+      name = new NameEntry(text, entry);
+      if (strings[(_name = entry.nameID)] == null) {
+        strings[_name] = [];
+      }
+      strings[entry.nameID].push(name);
+    }
+    this.strings = strings;
+    this.copyright = strings[0];
+    this.fontFamily = strings[1];
+    this.fontSubfamily = strings[2];
+    this.uniqueSubfamily = strings[3];
+    this.fontName = strings[4];
+    this.version = strings[5];
+    try {
+      this.postscriptName = strings[6][0].raw.replace(
+        /[\x00-\x19\x80-\xff]/g,
+        ""
+      );
+    } catch (e) {
+      this.postscriptName = strings[4][0].raw.replace(
+        /[\x00-\x19\x80-\xff]/g,
+        ""
+      );
+    }
+    this.trademark = strings[7];
+    this.manufacturer = strings[8];
+    this.designer = strings[9];
+    this.description = strings[10];
+    this.vendorUrl = strings[11];
+    this.designerUrl = strings[12];
+    this.license = strings[13];
+    this.licenseUrl = strings[14];
+    this.preferredFamily = strings[15];
+    this.preferredSubfamily = strings[17];
+    this.compatibleFull = strings[18];
+    return (this.sampleText = strings[19]);
+  };
+  /*NameTable.prototype.encode = function () {
+            var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;
+            strings = {};
+            _ref = this.strings;
+            for (id in _ref) {
+                val = _ref[id];
+                strings[id] = val;
+            }
+            postscriptName = new NameEntry("" + subsetTag + "+" + this.postscriptName, {
+                platformID: 1
+                , encodingID: 0
+                , languageID: 0
+            });
+            strings[6] = [postscriptName];
+            subsetTag = successorOf(subsetTag);
+            strCount = 0;
+            for (id in strings) {
+                list = strings[id];
+                if (list != null) {
+                    strCount += list.length;
+                }
+            }
+            table = new Data;
+            strTable = new Data;
+            table.writeShort(0);
+            table.writeShort(strCount);
+            table.writeShort(6 + 12 * strCount);
+            for (nameID in strings) {
+                list = strings[nameID];
+                if (list != null) {
+                    for (_i = 0, _len = list.length; _i < _len; _i++) {
+                        string = list[_i];
+                        table.writeShort(string.platformID);
+                        table.writeShort(string.encodingID);
+                        table.writeShort(string.languageID);
+                        table.writeShort(nameID);
+                        table.writeShort(string.length);
+                        table.writeShort(strTable.pos);
+                        strTable.writeString(string.raw);
+                    }
+                }
+            }
+            return nameTable = {
+                postscriptName: postscriptName.raw
+                , table: table.data.concat(strTable.data)
+            };
+        };*/
+  return NameTable;
+})(Table);
+
+var MaxpTable = (function(_super) {
+  __extends(MaxpTable, _super);
+
+  function MaxpTable() {
+    return MaxpTable.__super__.constructor.apply(this, arguments);
+  }
+  MaxpTable.prototype.tag = "maxp";
+  MaxpTable.prototype.parse = function(data) {
+    data.pos = this.offset;
+    this.version = data.readInt();
+    this.numGlyphs = data.readUInt16();
+    this.maxPoints = data.readUInt16();
+    this.maxContours = data.readUInt16();
+    this.maxCompositePoints = data.readUInt16();
+    this.maxComponentContours = data.readUInt16();
+    this.maxZones = data.readUInt16();
+    this.maxTwilightPoints = data.readUInt16();
+    this.maxStorage = data.readUInt16();
+    this.maxFunctionDefs = data.readUInt16();
+    this.maxInstructionDefs = data.readUInt16();
+    this.maxStackElements = data.readUInt16();
+    this.maxSizeOfInstructions = data.readUInt16();
+    this.maxComponentElements = data.readUInt16();
+    return (this.maxComponentDepth = data.readUInt16());
+  };
+  /*MaxpTable.prototype.encode = function (ids) {
+            var table;
+            table = new Data;
+            table.writeInt(this.version);
+            table.writeUInt16(ids.length);
+            table.writeUInt16(this.maxPoints);
+            table.writeUInt16(this.maxContours);
+            table.writeUInt16(this.maxCompositePoints);
+            table.writeUInt16(this.maxComponentContours);
+            table.writeUInt16(this.maxZones);
+            table.writeUInt16(this.maxTwilightPoints);
+            table.writeUInt16(this.maxStorage);
+            table.writeUInt16(this.maxFunctionDefs);
+            table.writeUInt16(this.maxInstructionDefs);
+            table.writeUInt16(this.maxStackElements);
+            table.writeUInt16(this.maxSizeOfInstructions);
+            table.writeUInt16(this.maxComponentElements);
+            table.writeUInt16(this.maxComponentDepth);
+            return table.data;
+        };*/
+  return MaxpTable;
+})(Table);
+
+var HmtxTable = (function(_super) {
+  __extends(HmtxTable, _super);
+
+  function HmtxTable() {
+    return HmtxTable.__super__.constructor.apply(this, arguments);
+  }
+  HmtxTable.prototype.tag = "hmtx";
+  HmtxTable.prototype.parse = function(data) {
+    var i, last, lsbCount, m, _j, _ref, _results;
+    data.pos = this.offset;
+    this.metrics = [];
+    for (
+      i = 0, _ref = this.file.hhea.numberOfMetrics;
+      0 <= _ref ? i < _ref : i > _ref;
+      i = 0 <= _ref ? ++i : --i
+    ) {
+      this.metrics.push({
+        advance: data.readUInt16(),
+        lsb: data.readInt16()
+      });
+    }
+    lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;
+    this.leftSideBearings = (function() {
+      var _j, _results;
+      _results = [];
+      for (
+        i = _j = 0;
+        0 <= lsbCount ? _j < lsbCount : _j > lsbCount;
+        i = 0 <= lsbCount ? ++_j : --_j
+      ) {
+        _results.push(data.readInt16());
+      }
+      return _results;
+    })();
+    this.widths = function() {
+      var _j, _len, _ref1, _results;
+      _ref1 = this.metrics;
+      _results = [];
+      for (_j = 0, _len = _ref1.length; _j < _len; _j++) {
+        m = _ref1[_j];
+        _results.push(m.advance);
+      }
+      return _results;
+    }.call(this);
+    last = this.widths[this.widths.length - 1];
+    _results = [];
+    for (
+      i = _j = 0;
+      0 <= lsbCount ? _j < lsbCount : _j > lsbCount;
+      i = 0 <= lsbCount ? ++_j : --_j
+    ) {
+      _results.push(this.widths.push(last));
+    }
+    return _results;
+  };
+  /***************************************************************/
+  /* function : forGlyph                                         */
+  /* comment : Returns the advance width and lsb for this glyph. */
+  /***************************************************************/
+  HmtxTable.prototype.forGlyph = function(id) {
+    if (id in this.metrics) {
+      return this.metrics[id];
+    }
+    return {
+      advance: this.metrics[this.metrics.length - 1].advance,
+      lsb: this.leftSideBearings[id - this.metrics.length]
+    };
+  };
+  /*HmtxTable.prototype.encode = function (mapping) {
+            var id, metric, table, _i, _len;
+            table = new Data;
+            for (_i = 0, _len = mapping.length; _i < _len; _i++) {
+                id = mapping[_i];
+                metric = this.forGlyph(id);
+                table.writeUInt16(metric.advance);
+                table.writeUInt16(metric.lsb);
+            }
+            return table.data;
+        };*/
+  return HmtxTable;
+})(Table);
+
+var __slice = [].slice;
+
+var GlyfTable = (function(_super) {
+  __extends(GlyfTable, _super);
+
+  function GlyfTable() {
+    return GlyfTable.__super__.constructor.apply(this, arguments);
+  }
+  GlyfTable.prototype.tag = "glyf";
+  GlyfTable.prototype.parse = function() {
+    return (this.cache = {});
+  };
+  GlyfTable.prototype.glyphFor = function(id) {
+    var data,
+      index,
+      length,
+      loca,
+      numberOfContours,
+      raw,
+      xMax,
+      xMin,
+      yMax,
+      yMin;
+    if (id in this.cache) {
+      return this.cache[id];
+    }
+    loca = this.file.loca;
+    data = this.file.contents;
+    index = loca.indexOf(id);
+    length = loca.lengthOf(id);
+    if (length === 0) {
+      return (this.cache[id] = null);
+    }
+    data.pos = this.offset + index;
+    raw = new Data(data.read(length));
+    numberOfContours = raw.readShort();
+    xMin = raw.readShort();
+    yMin = raw.readShort();
+    xMax = raw.readShort();
+    yMax = raw.readShort();
+    if (numberOfContours === -1) {
+      this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);
+    } else {
+      this.cache[id] = new SimpleGlyph(
+        raw,
+        numberOfContours,
+        xMin,
+        yMin,
+        xMax,
+        yMax
+      );
+    }
+    return this.cache[id];
+  };
+  GlyfTable.prototype.encode = function(glyphs, mapping, old2new) {
+    var glyph, id, offsets, table, _i, _len;
+    table = [];
+    offsets = [];
+    for (_i = 0, _len = mapping.length; _i < _len; _i++) {
+      id = mapping[_i];
+      glyph = glyphs[id];
+      offsets.push(table.length);
+      if (glyph) {
+        table = table.concat(glyph.encode(old2new));
+      }
+    }
+    offsets.push(table.length);
+    return {
+      table: table,
+      offsets: offsets
+    };
+  };
+  return GlyfTable;
+})(Table);
+
+var SimpleGlyph = (function() {
+  /**************************************************************************/
+  /* function : SimpleGlyph                                                 */
+  /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/
+  /**************************************************************************/
+  function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {
+    this.raw = raw;
+    this.numberOfContours = numberOfContours;
+    this.xMin = xMin;
+    this.yMin = yMin;
+    this.xMax = xMax;
+    this.yMax = yMax;
+    this.compound = false;
+  }
+  SimpleGlyph.prototype.encode = function() {
+    return this.raw.data;
+  };
+  return SimpleGlyph;
+})();
+
+var CompoundGlyph = (function() {
+  var ARG_1_AND_2_ARE_WORDS,
+    MORE_COMPONENTS,
+    WE_HAVE_AN_X_AND_Y_SCALE,
+    WE_HAVE_A_SCALE,
+    WE_HAVE_A_TWO_BY_TWO;
+  ARG_1_AND_2_ARE_WORDS = 0x0001;
+  WE_HAVE_A_SCALE = 0x0008;
+  MORE_COMPONENTS = 0x0020;
+  WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;
+  WE_HAVE_A_TWO_BY_TWO = 0x0080;
+
+  /********************************************************************************************************************/
+  /* function : CompoundGlypg generator                                                                               */
+  /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/
+  /********************************************************************************************************************/
+  function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {
+    var data, flags;
+    this.raw = raw;
+    this.xMin = xMin;
+    this.yMin = yMin;
+    this.xMax = xMax;
+    this.yMax = yMax;
+    this.compound = true;
+    this.glyphIDs = [];
+    this.glyphOffsets = [];
+    data = this.raw;
+    while (true) {
+      flags = data.readShort();
+      this.glyphOffsets.push(data.pos);
+      this.glyphIDs.push(data.readUInt16());
+      if (!(flags & MORE_COMPONENTS)) {
+        break;
+      }
+      if (flags & ARG_1_AND_2_ARE_WORDS) {
+        data.pos += 4;
+      } else {
+        data.pos += 2;
+      }
+      if (flags & WE_HAVE_A_TWO_BY_TWO) {
+        data.pos += 8;
+      } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {
+        data.pos += 4;
+      } else if (flags & WE_HAVE_A_SCALE) {
+        data.pos += 2;
+      }
+    }
+  }
+  /****************************************************************************************************************/
+  /* function : CompoundGlypg encode                                                                              */
+  /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/
+  /****************************************************************************************************************/
+  CompoundGlyph.prototype.encode = function() {
+    var i, result, _len, _ref;
+    result = new Data(__slice.call(this.raw.data));
+    _ref = this.glyphIDs;
+    for (i = 0, _len = _ref.length; i < _len; ++i) {
+      result.pos = this.glyphOffsets[i];
+    }
+    return result.data;
+  };
+  return CompoundGlyph;
+})();
+
+var LocaTable = (function(_super) {
+  __extends(LocaTable, _super);
+
+  function LocaTable() {
+    return LocaTable.__super__.constructor.apply(this, arguments);
+  }
+  LocaTable.prototype.tag = "loca";
+  LocaTable.prototype.parse = function(data) {
+    var format, i;
+    data.pos = this.offset;
+    format = this.file.head.indexToLocFormat;
+    if (format === 0) {
+      return (this.offsets = function() {
+        var _ref, _results;
+        _results = [];
+        for (i = 0, _ref = this.length; i < _ref; i += 2) {
+          _results.push(data.readUInt16() * 2);
+        }
+        return _results;
+      }.call(this));
+    } else {
+      return (this.offsets = function() {
+        var _ref, _results;
+        _results = [];
+        for (i = 0, _ref = this.length; i < _ref; i += 4) {
+          _results.push(data.readUInt32());
+        }
+        return _results;
+      }.call(this));
+    }
+  };
+  LocaTable.prototype.indexOf = function(id) {
+    return this.offsets[id];
+  };
+  LocaTable.prototype.lengthOf = function(id) {
+    return this.offsets[id + 1] - this.offsets[id];
+  };
+  LocaTable.prototype.encode = function(offsets, activeGlyphs) {
+    var LocaTable = new Uint32Array(this.offsets.length);
+    var glyfPtr = 0;
+    var listGlyf = 0;
+    for (var k = 0; k < LocaTable.length; ++k) {
+      LocaTable[k] = glyfPtr;
+      if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {
+        ++listGlyf;
+        LocaTable[k] = glyfPtr;
+        var start = this.offsets[k];
+        var len = this.offsets[k + 1] - start;
+        if (len > 0) {
+          glyfPtr += len;
+        }
+      }
+    }
+    var newLocaTable = new Array(LocaTable.length * 4);
+    for (var j = 0; j < LocaTable.length; ++j) {
+      newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;
+      newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;
+      newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;
+      newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;
+    }
+    return newLocaTable;
+  };
+  return LocaTable;
+})(Table);
+
+/************************************************************************************/
+/* function : invert                                                                */
+/* comment : Change the object's (key: value) to create an object with (value: key).*/
+/************************************************************************************/
+var invert = function(object) {
+  var key, ret, val;
+  ret = {};
+  for (key in object) {
+    val = object[key];
+    ret[val] = key;
+  }
+  return ret;
+};
+
+/*var successorOf = function (input) {
+        var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;
+        alphabet = 'abcdefghijklmnopqrstuvwxyz';
+        length = alphabet.length;
+        result = input;
+        i = input.length;
+        while (i >= 0) {
+            last = input.charAt(--i);
+            if (isNaN(last)) {
+                index = alphabet.indexOf(last.toLowerCase());
+                if (index === -1) {
+                    next = last;
+                    carry = true;
+                }
+                else {
+                    next = alphabet.charAt((index + 1) % length);
+                    isUpperCase = last === last.toUpperCase();
+                    if (isUpperCase) {
+                        next = next.toUpperCase();
+                    }
+                    carry = index + 1 >= length;
+                    if (carry && i === 0) {
+                        added = isUpperCase ? 'A' : 'a';
+                        result = added + next + result.slice(1);
+                        break;
+                    }
+                }
+            }
+            else {
+                next = +last + 1;
+                carry = next > 9;
+                if (carry) {
+                    next = 0;
+                }
+                if (carry && i === 0) {
+                    result = '1' + next + result.slice(1);
+                    break;
+                }
+            }
+            result = result.slice(0, i) + next + result.slice(i + 1);
+            if (!carry) {
+                break;
+            }
+        }
+        return result;
+    };*/
+
+var Subset = (function() {
+  function Subset(font) {
+    this.font = font;
+    this.subset = {};
+    this.unicodes = {};
+    this.next = 33;
+  }
+  /*Subset.prototype.use = function (character) {
+            var i, _i, _ref;
+            if (typeof character === 'string') {
+                for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+                    this.use(character.charCodeAt(i));
+                }
+                return;
+            }
+            if (!this.unicodes[character]) {
+                this.subset[this.next] = character;
+                return this.unicodes[character] = this.next++;
+            }
+        };*/
+  /*Subset.prototype.encodeText = function (text) {
+            var char, i, string, _i, _ref;
+            string = '';
+            for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+                char = this.unicodes[text.charCodeAt(i)];
+                string += String.fromCharCode(char);
+            }
+            return string;
+        };*/
+  /***************************************************************/
+  /* function : generateCmap                                     */
+  /* comment : Returns the unicode cmap for this font.         */
+  /***************************************************************/
+  Subset.prototype.generateCmap = function() {
+    var mapping, roman, unicode, unicodeCmap, _ref;
+    unicodeCmap = this.font.cmap.tables[0].codeMap;
+    mapping = {};
+    _ref = this.subset;
+    for (roman in _ref) {
+      unicode = _ref[roman];
+      mapping[roman] = unicodeCmap[unicode];
+    }
+    return mapping;
+  };
+  /*Subset.prototype.glyphIDs = function () {
+            var ret, roman, unicode, unicodeCmap, val, _ref;
+            unicodeCmap = this.font.cmap.tables[0].codeMap;
+            ret = [0];
+            _ref = this.subset;
+            for (roman in _ref) {
+                unicode = _ref[roman];
+                val = unicodeCmap[unicode];
+                if ((val != null) && __indexOf.call(ret, val) < 0) {
+                    ret.push(val);
+                }
+            }
+            return ret.sort();
+        };*/
+  /******************************************************************/
+  /* function : glyphsFor                                           */
+  /* comment : Returns simple glyph objects for the input character.*/
+  /******************************************************************/
+  Subset.prototype.glyphsFor = function(glyphIDs) {
+    var additionalIDs, glyph, glyphs, id, _i, _len, _ref;
+    glyphs = {};
+    for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {
+      id = glyphIDs[_i];
+      glyphs[id] = this.font.glyf.glyphFor(id);
+    }
+    additionalIDs = [];
+    for (id in glyphs) {
+      glyph = glyphs[id];
+      if (glyph != null ? glyph.compound : void 0) {
+        additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);
+      }
+    }
+    if (additionalIDs.length > 0) {
+      _ref = this.glyphsFor(additionalIDs);
+      for (id in _ref) {
+        glyph = _ref[id];
+        glyphs[id] = glyph;
+      }
+    }
+    return glyphs;
+  };
+  /***************************************************************/
+  /* function : encode                                           */
+  /* comment : Encode various tables for the characters you use. */
+  /***************************************************************/
+  Subset.prototype.encode = function(glyID, indexToLocFormat) {
+    var cmap,
+      code,
+      glyf,
+      glyphs,
+      id,
+      ids,
+      loca,
+      new2old,
+      newIDs,
+      nextGlyphID,
+      old2new,
+      oldID,
+      oldIDs,
+      tables,
+      _ref;
+    cmap = CmapTable.encode(this.generateCmap(), "unicode");
+    glyphs = this.glyphsFor(glyID);
+    old2new = {
+      0: 0
+    };
+    _ref = cmap.charMap;
+    for (code in _ref) {
+      ids = _ref[code];
+      old2new[ids.old] = ids["new"];
+    }
+    nextGlyphID = cmap.maxGlyphID;
+    for (oldID in glyphs) {
+      if (!(oldID in old2new)) {
+        old2new[oldID] = nextGlyphID++;
+      }
+    }
+    new2old = invert(old2new);
+    newIDs = Object.keys(new2old).sort(function(a, b) {
+      return a - b;
+    });
+    oldIDs = (function() {
+      var _i, _len, _results;
+      _results = [];
+      for (_i = 0, _len = newIDs.length; _i < _len; _i++) {
+        id = newIDs[_i];
+        _results.push(new2old[id]);
+      }
+      return _results;
+    })();
+    glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);
+    loca = this.font.loca.encode(glyf.offsets, oldIDs);
+    tables = {
+      cmap: this.font.cmap.raw(),
+      glyf: glyf.table,
+      loca: loca,
+      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(indexToLocFormat)
+    };
+    if (this.font.os2.exists) {
+      tables["OS/2"] = this.font.os2.raw();
+    }
+    return this.font.directory.encode(tables);
+  };
+  return Subset;
+})();
+
+jsPDF.API.PDFObject = (function() {
+  var pad;
+
+  function PDFObject() {}
+  pad = function(str, length) {
+    return (Array(length + 1).join("0") + str).slice(-length);
+  };
+  /*****************************************************************************/
+  /* function : convert                                                        */
+  /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */
+  /*****************************************************************************/
+  PDFObject.convert = function(object) {
+    var e, items, key, out, val;
+    if (Array.isArray(object)) {
+      items = (function() {
+        var _i, _len, _results;
+        _results = [];
+        for (_i = 0, _len = object.length; _i < _len; _i++) {
+          e = object[_i];
+          _results.push(PDFObject.convert(e));
+        }
+        return _results;
+      })().join(" ");
+      return "[" + items + "]";
+    } else if (typeof object === "string") {
+      return "/" + object;
+    } else if (object != null ? object.isString : void 0) {
+      return "(" + object + ")";
+    } else if (object instanceof Date) {
+      return (
+        "(D:" +
+        pad(object.getUTCFullYear(), 4) +
+        pad(object.getUTCMonth(), 2) +
+        pad(object.getUTCDate(), 2) +
+        pad(object.getUTCHours(), 2) +
+        pad(object.getUTCMinutes(), 2) +
+        pad(object.getUTCSeconds(), 2) +
+        "Z)"
+      );
+    } else if ({}.toString.call(object) === "[object Object]") {
+      out = ["<<"];
+      for (key in object) {
+        val = object[key];
+        out.push("/" + key + " " + PDFObject.convert(val));
+      }
+      out.push(">>");
+      return out.join("\n");
+    } else {
+      return "" + object;
+    }
+  };
+  return PDFObject;
+})();
+
+exports.AcroForm = AcroForm;
+exports.AcroFormAppearance = AcroFormAppearance;
+exports.AcroFormButton = AcroFormButton;
+exports.AcroFormCheckBox = AcroFormCheckBox;
+exports.AcroFormChoiceField = AcroFormChoiceField;
+exports.AcroFormComboBox = AcroFormComboBox;
+exports.AcroFormEditBox = AcroFormEditBox;
+exports.AcroFormListBox = AcroFormListBox;
+exports.AcroFormPasswordField = AcroFormPasswordField;
+exports.AcroFormPushButton = AcroFormPushButton;
+exports.AcroFormRadioButton = AcroFormRadioButton;
+exports.AcroFormTextField = AcroFormTextField;
+exports.GState = GState;
+exports.ShadingPattern = ShadingPattern;
+exports.TilingPattern = TilingPattern;
+exports.default = jsPDF;
+exports.jsPDF = jsPDF;
+//# sourceMappingURL=jspdf.node.js.map
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.node.js.map
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.node.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.node.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"jspdf.node.js","sources":["../src/libs/globalObject.js","../src/libs/rgbcolor.js","../src/libs/AtobBtoa.js","../src/libs/console.js","../src/libs/md5.js","../src/libs/rc4.js","../src/libs/pdfsecurity.js","../src/libs/pdfname.js","../src/jspdf.js","../src/modules/acroform.js","../src/modules/addimage.js","../src/modules/annotations.js","../src/modules/arabic.js","../src/modules/autoprint.js","../src/modules/canvas.js","../src/modules/cell.js","../src/libs/fontFace.js","../src/modules/context2d.js","../src/modules/filters.js","../src/modules/fileloading.js","../src/modules/html.js","../src/modules/javascript.js","../src/modules/outline.js","../src/modules/jpeg_support.js","../src/libs/png.js","../src/modules/png_support.js","../src/libs/omggif.js","../src/libs/JPEGEncoder.js","../src/modules/gif_support.js","../src/libs/BMPDecoder.js","../src/modules/bmp_support.js","../src/libs/WebPDecoder.js","../src/modules/webp_support.js","../src/modules/rgba_support.js","../src/modules/setlanguage.js","../src/modules/split_text_to_size.js","../src/modules/standard_fonts_metrics.js","../src/modules/ttfsupport.js","../src/modules/svg.js","../src/modules/total_pages.js","../src/modules/viewerpreferences.js","../src/modules/xmp_metadata.js","../src/modules/utf8.js","../src/modules/vfs.js","../src/libs/bidiEngine.js","../src/libs/ttffont.js"],"sourcesContent":["export var globalObject = (function() {\n  return \"undefined\" !== typeof window\n    ? window\n    : \"undefined\" !== typeof global\n    ? global\n    : \"undefined\" !== typeof self\n    ? self\n    : this;\n})();\n","/**\n * A class to parse color values\n * @author Stoyan Stefanov <sstoo@gmail.com>\n * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}\n * @license Use it if you like it\n */\n\nfunction RGBColor(color_string) {\n  color_string = color_string || \"\";\n  this.ok = false;\n\n  // strip any leading #\n  if (color_string.charAt(0) == \"#\") {\n    // remove # if any\n    color_string = color_string.substr(1, 6);\n  }\n\n  color_string = color_string.replace(/ /g, \"\");\n  color_string = color_string.toLowerCase();\n\n  var channels;\n\n  // before getting into regexps, try simple matches\n  // and overwrite the input\n  var simple_colors = {\n    aliceblue: \"f0f8ff\",\n    antiquewhite: \"faebd7\",\n    aqua: \"00ffff\",\n    aquamarine: \"7fffd4\",\n    azure: \"f0ffff\",\n    beige: \"f5f5dc\",\n    bisque: \"ffe4c4\",\n    black: \"000000\",\n    blanchedalmond: \"ffebcd\",\n    blue: \"0000ff\",\n    blueviolet: \"8a2be2\",\n    brown: \"a52a2a\",\n    burlywood: \"deb887\",\n    cadetblue: \"5f9ea0\",\n    chartreuse: \"7fff00\",\n    chocolate: \"d2691e\",\n    coral: \"ff7f50\",\n    cornflowerblue: \"6495ed\",\n    cornsilk: \"fff8dc\",\n    crimson: \"dc143c\",\n    cyan: \"00ffff\",\n    darkblue: \"00008b\",\n    darkcyan: \"008b8b\",\n    darkgoldenrod: \"b8860b\",\n    darkgray: \"a9a9a9\",\n    darkgreen: \"006400\",\n    darkkhaki: \"bdb76b\",\n    darkmagenta: \"8b008b\",\n    darkolivegreen: \"556b2f\",\n    darkorange: \"ff8c00\",\n    darkorchid: \"9932cc\",\n    darkred: \"8b0000\",\n    darksalmon: \"e9967a\",\n    darkseagreen: \"8fbc8f\",\n    darkslateblue: \"483d8b\",\n    darkslategray: \"2f4f4f\",\n    darkturquoise: \"00ced1\",\n    darkviolet: \"9400d3\",\n    deeppink: \"ff1493\",\n    deepskyblue: \"00bfff\",\n    dimgray: \"696969\",\n    dodgerblue: \"1e90ff\",\n    feldspar: \"d19275\",\n    firebrick: \"b22222\",\n    floralwhite: \"fffaf0\",\n    forestgreen: \"228b22\",\n    fuchsia: \"ff00ff\",\n    gainsboro: \"dcdcdc\",\n    ghostwhite: \"f8f8ff\",\n    gold: \"ffd700\",\n    goldenrod: \"daa520\",\n    gray: \"808080\",\n    green: \"008000\",\n    greenyellow: \"adff2f\",\n    honeydew: \"f0fff0\",\n    hotpink: \"ff69b4\",\n    indianred: \"cd5c5c\",\n    indigo: \"4b0082\",\n    ivory: \"fffff0\",\n    khaki: \"f0e68c\",\n    lavender: \"e6e6fa\",\n    lavenderblush: \"fff0f5\",\n    lawngreen: \"7cfc00\",\n    lemonchiffon: \"fffacd\",\n    lightblue: \"add8e6\",\n    lightcoral: \"f08080\",\n    lightcyan: \"e0ffff\",\n    lightgoldenrodyellow: \"fafad2\",\n    lightgrey: \"d3d3d3\",\n    lightgreen: \"90ee90\",\n    lightpink: \"ffb6c1\",\n    lightsalmon: \"ffa07a\",\n    lightseagreen: \"20b2aa\",\n    lightskyblue: \"87cefa\",\n    lightslateblue: \"8470ff\",\n    lightslategray: \"778899\",\n    lightsteelblue: \"b0c4de\",\n    lightyellow: \"ffffe0\",\n    lime: \"00ff00\",\n    limegreen: \"32cd32\",\n    linen: \"faf0e6\",\n    magenta: \"ff00ff\",\n    maroon: \"800000\",\n    mediumaquamarine: \"66cdaa\",\n    mediumblue: \"0000cd\",\n    mediumorchid: \"ba55d3\",\n    mediumpurple: \"9370d8\",\n    mediumseagreen: \"3cb371\",\n    mediumslateblue: \"7b68ee\",\n    mediumspringgreen: \"00fa9a\",\n    mediumturquoise: \"48d1cc\",\n    mediumvioletred: \"c71585\",\n    midnightblue: \"191970\",\n    mintcream: \"f5fffa\",\n    mistyrose: \"ffe4e1\",\n    moccasin: \"ffe4b5\",\n    navajowhite: \"ffdead\",\n    navy: \"000080\",\n    oldlace: \"fdf5e6\",\n    olive: \"808000\",\n    olivedrab: \"6b8e23\",\n    orange: \"ffa500\",\n    orangered: \"ff4500\",\n    orchid: \"da70d6\",\n    palegoldenrod: \"eee8aa\",\n    palegreen: \"98fb98\",\n    paleturquoise: \"afeeee\",\n    palevioletred: \"d87093\",\n    papayawhip: \"ffefd5\",\n    peachpuff: \"ffdab9\",\n    peru: \"cd853f\",\n    pink: \"ffc0cb\",\n    plum: \"dda0dd\",\n    powderblue: \"b0e0e6\",\n    purple: \"800080\",\n    red: \"ff0000\",\n    rosybrown: \"bc8f8f\",\n    royalblue: \"4169e1\",\n    saddlebrown: \"8b4513\",\n    salmon: \"fa8072\",\n    sandybrown: \"f4a460\",\n    seagreen: \"2e8b57\",\n    seashell: \"fff5ee\",\n    sienna: \"a0522d\",\n    silver: \"c0c0c0\",\n    skyblue: \"87ceeb\",\n    slateblue: \"6a5acd\",\n    slategray: \"708090\",\n    snow: \"fffafa\",\n    springgreen: \"00ff7f\",\n    steelblue: \"4682b4\",\n    tan: \"d2b48c\",\n    teal: \"008080\",\n    thistle: \"d8bfd8\",\n    tomato: \"ff6347\",\n    turquoise: \"40e0d0\",\n    violet: \"ee82ee\",\n    violetred: \"d02090\",\n    wheat: \"f5deb3\",\n    white: \"ffffff\",\n    whitesmoke: \"f5f5f5\",\n    yellow: \"ffff00\",\n    yellowgreen: \"9acd32\"\n  };\n  color_string = simple_colors[color_string] || color_string;\n\n  // array of color definition objects\n  var color_defs = [\n    {\n      re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n      example: [\"rgb(123, 234, 45)\", \"rgb(255,234,245)\"],\n      process: function(bits) {\n        return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];\n      }\n    },\n    {\n      re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n      example: [\"#00ff00\", \"336699\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1], 16),\n          parseInt(bits[2], 16),\n          parseInt(bits[3], 16)\n        ];\n      }\n    },\n    {\n      re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n      example: [\"#fb0\", \"f0f\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1] + bits[1], 16),\n          parseInt(bits[2] + bits[2], 16),\n          parseInt(bits[3] + bits[3], 16)\n        ];\n      }\n    }\n  ];\n\n  // search through the definitions to find a match\n  for (var i = 0; i < color_defs.length; i++) {\n    var re = color_defs[i].re;\n    var processor = color_defs[i].process;\n    var bits = re.exec(color_string);\n    if (bits) {\n      channels = processor(bits);\n      this.r = channels[0];\n      this.g = channels[1];\n      this.b = channels[2];\n      this.ok = true;\n    }\n  }\n\n  // validate/cleanup values\n  this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r;\n  this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g;\n  this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b;\n\n  // some getters\n  this.toRGB = function() {\n    return \"rgb(\" + this.r + \", \" + this.g + \", \" + this.b + \")\";\n  };\n  this.toHex = function() {\n    var r = this.r.toString(16);\n    var g = this.g.toString(16);\n    var b = this.b.toString(16);\n    if (r.length == 1) r = \"0\" + r;\n    if (g.length == 1) g = \"0\" + g;\n    if (b.length == 1) b = \"0\" + b;\n    return \"#\" + r + g + b;\n  };\n}\n\nexport { RGBColor };\n","import { globalObject } from \"./globalObject.js\";\n\nvar atob, btoa;\n\n(function() {\n\n  atob = require(\"atob\");\n  btoa = require(\"btoa\");\n})();\n\nexport { atob, btoa };\n","import { globalObject } from \"./globalObject.js\";\n\nfunction consoleLog() {\n  if (globalObject.console && typeof globalObject.console.log === \"function\") {\n    globalObject.console.log.apply(globalObject.console, arguments);\n  }\n}\n\nfunction consoleWarn(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.warn === \"function\") {\n      globalObject.console.warn.apply(globalObject.console, arguments);\n    } else {\n      consoleLog.call(null, arguments);\n    }\n  }\n}\n\nfunction consoleError(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.error === \"function\") {\n      globalObject.console.error.apply(globalObject.console, arguments);\n    } else {\n      consoleLog(str);\n    }\n  }\n}\nexport var console = {\n  log: consoleLog,\n  warn: consoleWarn,\n  error: consoleError\n};\n","/**\n * @license\n * Joseph Myers does not specify a particular license for his work.\n *\n * Author: Joseph Myers\n * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js\n *\n * Modified by: Owen Leong\n */\n\nfunction md5cycle(x, k) {\n  var a = x[0],\n    b = x[1],\n    c = x[2],\n    d = x[3];\n\n  a = ff(a, b, c, d, k[0], 7, -680876936);\n  d = ff(d, a, b, c, k[1], 12, -389564586);\n  c = ff(c, d, a, b, k[2], 17, 606105819);\n  b = ff(b, c, d, a, k[3], 22, -1044525330);\n  a = ff(a, b, c, d, k[4], 7, -176418897);\n  d = ff(d, a, b, c, k[5], 12, 1200080426);\n  c = ff(c, d, a, b, k[6], 17, -1473231341);\n  b = ff(b, c, d, a, k[7], 22, -45705983);\n  a = ff(a, b, c, d, k[8], 7, 1770035416);\n  d = ff(d, a, b, c, k[9], 12, -1958414417);\n  c = ff(c, d, a, b, k[10], 17, -42063);\n  b = ff(b, c, d, a, k[11], 22, -1990404162);\n  a = ff(a, b, c, d, k[12], 7, 1804603682);\n  d = ff(d, a, b, c, k[13], 12, -40341101);\n  c = ff(c, d, a, b, k[14], 17, -1502002290);\n  b = ff(b, c, d, a, k[15], 22, 1236535329);\n\n  a = gg(a, b, c, d, k[1], 5, -165796510);\n  d = gg(d, a, b, c, k[6], 9, -1069501632);\n  c = gg(c, d, a, b, k[11], 14, 643717713);\n  b = gg(b, c, d, a, k[0], 20, -373897302);\n  a = gg(a, b, c, d, k[5], 5, -701558691);\n  d = gg(d, a, b, c, k[10], 9, 38016083);\n  c = gg(c, d, a, b, k[15], 14, -660478335);\n  b = gg(b, c, d, a, k[4], 20, -405537848);\n  a = gg(a, b, c, d, k[9], 5, 568446438);\n  d = gg(d, a, b, c, k[14], 9, -1019803690);\n  c = gg(c, d, a, b, k[3], 14, -187363961);\n  b = gg(b, c, d, a, k[8], 20, 1163531501);\n  a = gg(a, b, c, d, k[13], 5, -1444681467);\n  d = gg(d, a, b, c, k[2], 9, -51403784);\n  c = gg(c, d, a, b, k[7], 14, 1735328473);\n  b = gg(b, c, d, a, k[12], 20, -1926607734);\n\n  a = hh(a, b, c, d, k[5], 4, -378558);\n  d = hh(d, a, b, c, k[8], 11, -2022574463);\n  c = hh(c, d, a, b, k[11], 16, 1839030562);\n  b = hh(b, c, d, a, k[14], 23, -35309556);\n  a = hh(a, b, c, d, k[1], 4, -1530992060);\n  d = hh(d, a, b, c, k[4], 11, 1272893353);\n  c = hh(c, d, a, b, k[7], 16, -155497632);\n  b = hh(b, c, d, a, k[10], 23, -1094730640);\n  a = hh(a, b, c, d, k[13], 4, 681279174);\n  d = hh(d, a, b, c, k[0], 11, -358537222);\n  c = hh(c, d, a, b, k[3], 16, -722521979);\n  b = hh(b, c, d, a, k[6], 23, 76029189);\n  a = hh(a, b, c, d, k[9], 4, -640364487);\n  d = hh(d, a, b, c, k[12], 11, -421815835);\n  c = hh(c, d, a, b, k[15], 16, 530742520);\n  b = hh(b, c, d, a, k[2], 23, -995338651);\n\n  a = ii(a, b, c, d, k[0], 6, -198630844);\n  d = ii(d, a, b, c, k[7], 10, 1126891415);\n  c = ii(c, d, a, b, k[14], 15, -1416354905);\n  b = ii(b, c, d, a, k[5], 21, -57434055);\n  a = ii(a, b, c, d, k[12], 6, 1700485571);\n  d = ii(d, a, b, c, k[3], 10, -1894986606);\n  c = ii(c, d, a, b, k[10], 15, -1051523);\n  b = ii(b, c, d, a, k[1], 21, -2054922799);\n  a = ii(a, b, c, d, k[8], 6, 1873313359);\n  d = ii(d, a, b, c, k[15], 10, -30611744);\n  c = ii(c, d, a, b, k[6], 15, -1560198380);\n  b = ii(b, c, d, a, k[13], 21, 1309151649);\n  a = ii(a, b, c, d, k[4], 6, -145523070);\n  d = ii(d, a, b, c, k[11], 10, -1120210379);\n  c = ii(c, d, a, b, k[2], 15, 718787259);\n  b = ii(b, c, d, a, k[9], 21, -343485551);\n\n  x[0] = add32(a, x[0]);\n  x[1] = add32(b, x[1]);\n  x[2] = add32(c, x[2]);\n  x[3] = add32(d, x[3]);\n}\n\nfunction cmn(q, a, b, x, s, t) {\n  a = add32(add32(a, q), add32(x, t));\n  return add32((a << s) | (a >>> (32 - s)), b);\n}\n\nfunction ff(a, b, c, d, x, s, t) {\n  return cmn((b & c) | (~b & d), a, b, x, s, t);\n}\n\nfunction gg(a, b, c, d, x, s, t) {\n  return cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\n\nfunction hh(a, b, c, d, x, s, t) {\n  return cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction ii(a, b, c, d, x, s, t) {\n  return cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nfunction md51(s) {\n  // txt = '';\n  var n = s.length,\n    state = [1732584193, -271733879, -1732584194, 271733878],\n    i;\n  for (i = 64; i <= s.length; i += 64) {\n    md5cycle(state, md5blk(s.substring(i - 64, i)));\n  }\n  s = s.substring(i - 64);\n  var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n  for (i = 0; i < s.length; i++)\n    tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n  tail[i >> 2] |= 0x80 << (i % 4 << 3);\n  if (i > 55) {\n    md5cycle(state, tail);\n    for (i = 0; i < 16; i++) tail[i] = 0;\n  }\n  tail[14] = n * 8;\n  md5cycle(state, tail);\n  return state;\n}\n\n/* there needs to be support for Unicode here,\n * unless we pretend that we can redefine the MD-5\n * algorithm for multi-byte characters (perhaps\n * by adding every four 16-bit characters and\n * shortening the sum to 32 bits). Otherwise\n * I suggest performing MD-5 as if every character\n * was two bytes--e.g., 0040 0025 = @%--but then\n * how will an ordinary MD-5 sum be matched?\n * There is no way to standardize text to something\n * like UTF-8 before transformation; speed cost is\n * utterly prohibitive. The JavaScript standard\n * itself needs to look at this: it should start\n * providing access to strings as preformed UTF-8\n * 8-bit unsigned value arrays.\n */\nfunction md5blk(s) {\n  /* I figured global was faster.   */\n  var md5blks = [],\n    i; /* Andy King said do it this way. */\n  for (i = 0; i < 64; i += 4) {\n    md5blks[i >> 2] =\n      s.charCodeAt(i) +\n      (s.charCodeAt(i + 1) << 8) +\n      (s.charCodeAt(i + 2) << 16) +\n      (s.charCodeAt(i + 3) << 24);\n  }\n  return md5blks;\n}\n\nvar hex_chr = \"0123456789abcdef\".split(\"\");\n\nfunction rhex(n) {\n  var s = \"\",\n    j = 0;\n  for (; j < 4; j++)\n    s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];\n  return s;\n}\n\nfunction hex(x) {\n  for (var i = 0; i < x.length; i++) x[i] = rhex(x[i]);\n  return x.join(\"\");\n}\n\n// Converts a 4-byte number to byte string\nfunction singleToByteString(n) {\n  return String.fromCharCode(\n    (n & 0xff) >> 0,\n    (n & 0xff00) >> 8,\n    (n & 0xff0000) >> 16,\n    (n & 0xff000000) >> 24\n  );\n}\n\n// Converts an array of numbers to a byte string\nfunction toByteString(x) {\n  return x.map(singleToByteString).join(\"\");\n}\n\n// Returns the MD5 hash as a byte string\nfunction md5Bin(s) {\n  return toByteString(md51(s));\n}\n\n// Returns MD5 hash as a hex string\nfunction md5(s) {\n  return hex(md51(s));\n}\n\nvar md5Check = md5(\"hello\") != \"5d41402abc4b2a76b9719d911017c592\";\n\nfunction add32(a, b) {\n  if (md5Check) {\n    /* if the md5Check does not match\n     the expected value, we're dealing\n     with an old browser and need\n     this function. */\n    var lsw = (a & 0xffff) + (b & 0xffff),\n      msw = (a >> 16) + (b >> 16) + (lsw >> 16);\n    return (msw << 16) | (lsw & 0xffff);\n  } else {\n    /* this function is much faster,\n    so if possible we use it. Some IEs\n    are the only ones I know of that\n    need the idiotic second function,\n    generated by an if clause.  */\n    return (a + b) & 0xffffffff;\n  }\n}\n\nexport { md5, md5Bin };\n","/**\r\n * @license\r\n * FPDF is released under a permissive license: there is no usage restriction.\r\n * You may embed it freely in your application (commercial or not), with or\r\n * without modifications.\r\n *\r\n * Reference: http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nfunction repeat(str, num) {\r\n  return new Array(num + 1).join(str);\r\n}\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name rc4\r\n * @function\r\n * @param {string} key Byte string of encryption key\r\n * @param {string} data Byte string of data to be encrypted\r\n * @returns {string} Encrypted string\r\n */\r\nfunction rc4(key, data) {\r\n  var lastKey, lastState;\r\n  if (key !== lastKey) {\r\n    var k = repeat(key, ((256 / key.length) >> 0) + 1);\r\n    var state = [];\r\n    for (var i = 0; i < 256; i++) {\r\n      state[i] = i;\r\n    }\r\n    var j = 0;\r\n    for (var i = 0; i < 256; i++) {\r\n      var t = state[i];\r\n      j = (j + t + k.charCodeAt(i)) % 256;\r\n      state[i] = state[j];\r\n      state[j] = t;\r\n    }\r\n    lastKey = key;\r\n    lastState = state;\r\n  } else {\r\n    state = lastState;\r\n  }\r\n  var length = data.length;\r\n  var a = 0;\r\n  var b = 0;\r\n  var out = \"\";\r\n  for (var i = 0; i < length; i++) {\r\n    a = (a + 1) % 256;\r\n    t = state[a];\r\n    b = (b + t) % 256;\r\n    state[a] = state[b];\r\n    state[b] = t;\r\n    k = state[(state[a] + state[b]) % 256];\r\n    out += String.fromCharCode(data.charCodeAt(i) ^ k);\r\n  }\r\n  return out;\r\n}\r\n\r\nexport { rc4 };\r\n","/**\r\n * @license\r\n * Licensed under the MIT License.\r\n * http://opensource.org/licenses/mit-license\r\n * Author: Owen Leong (@owenl131)\r\n * Date: 15 Oct 2020\r\n * References:\r\n * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt\r\n * https://github.com/foliojs/pdfkit/blob/master/lib/security.js\r\n * http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nimport { md5Bin } from \"./md5.js\";\r\nimport { rc4 } from \"./rc4.js\";\r\n\r\nvar permissionOptions = {\r\n  print: 4,\r\n  modify: 8,\r\n  copy: 16,\r\n  \"annot-forms\": 32\r\n};\r\n\r\n/**\r\n * Initializes encryption settings\r\n *\r\n * @name constructor\r\n * @function\r\n * @param {Array} permissions Permissions allowed for user, \"print\", \"modify\", \"copy\" and \"annot-forms\".\r\n * @param {String} userPassword Permissions apply to this user. Leaving this empty means the document\r\n *                              is not password protected but viewer has the above permissions.\r\n * @param {String} ownerPassword Owner has full functionalities to the file.\r\n * @param {String} fileId As hex string, should be same as the file ID in the trailer.\r\n * @example\r\n * var security = new PDFSecurity([\"print\"])\r\n */\r\nfunction PDFSecurity(permissions, userPassword, ownerPassword, fileId) {\r\n  this.v = 1; // algorithm 1, future work can add in more recent encryption schemes\r\n  this.r = 2; // revision 2\r\n\r\n  // set flags for what functionalities the user can access\r\n  let protection = 192;\r\n  permissions.forEach(function(perm) {\r\n    if (typeof permissionOptions.perm !== \"undefined\") {\r\n      throw new Error(\"Invalid permission: \" + perm);\r\n    }\r\n    protection += permissionOptions[perm];\r\n  });\r\n\r\n  // padding is used to pad the passwords to 32 bytes, also is hashed and stored in the final PDF\r\n  this.padding =\r\n    \"\\x28\\xBF\\x4E\\x5E\\x4E\\x75\\x8A\\x41\\x64\\x00\\x4E\\x56\\xFF\\xFA\\x01\\x08\" +\r\n    \"\\x2E\\x2E\\x00\\xB6\\xD0\\x68\\x3E\\x80\\x2F\\x0C\\xA9\\xFE\\x64\\x53\\x69\\x7A\";\r\n  let paddedUserPassword = (userPassword + this.padding).substr(0, 32);\r\n  let paddedOwnerPassword = (ownerPassword + this.padding).substr(0, 32);\r\n\r\n  this.O = this.processOwnerPassword(paddedUserPassword, paddedOwnerPassword);\r\n  this.P = -((protection ^ 255) + 1);\r\n  this.encryptionKey = md5Bin(\r\n    paddedUserPassword +\r\n      this.O +\r\n      this.lsbFirstWord(this.P) +\r\n      this.hexToBytes(fileId)\r\n  ).substr(0, 5);\r\n  this.U = rc4(this.encryptionKey, this.padding);\r\n}\r\n\r\n/**\r\n * Breaks down a 4-byte number into its individual bytes, with the least significant bit first\r\n *\r\n * @name lsbFirstWord\r\n * @function\r\n * @param {number} data 32-bit number\r\n * @returns {Array}\r\n */\r\nPDFSecurity.prototype.lsbFirstWord = function(data) {\r\n  return String.fromCharCode(\r\n    (data >> 0) & 0xff,\r\n    (data >> 8) & 0xff,\r\n    (data >> 16) & 0xff,\r\n    (data >> 24) & 0xff\r\n  );\r\n};\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name toHexString\r\n * @function\r\n * @param {String} byteString Byte string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.toHexString = function(byteString) {\r\n  return byteString\r\n    .split(\"\")\r\n    .map(function(byte) {\r\n      return (\"0\" + (byte.charCodeAt(0) & 0xff).toString(16)).slice(-2);\r\n    })\r\n    .join(\"\");\r\n};\r\n\r\n/**\r\n * Converts a hex string to a byte string\r\n *\r\n * @name hexToBytes\r\n * @function\r\n * @param {String} hex Hex string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.hexToBytes = function(hex) {\r\n  for (var bytes = [], c = 0; c < hex.length; c += 2)\r\n    bytes.push(String.fromCharCode(parseInt(hex.substr(c, 2), 16)));\r\n  return bytes.join(\"\");\r\n};\r\n\r\n/**\r\n * Computes the 'O' field in the encryption dictionary\r\n *\r\n * @name processOwnerPassword\r\n * @function\r\n * @param {String} paddedUserPassword Byte string of padded user password\r\n * @param {String} paddedOwnerPassword Byte string of padded owner password\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.processOwnerPassword = function(\r\n  paddedUserPassword,\r\n  paddedOwnerPassword\r\n) {\r\n  let key = md5Bin(paddedOwnerPassword).substr(0, 5);\r\n  return rc4(key, paddedUserPassword);\r\n};\r\n\r\n/**\r\n * Returns an encryptor function which can take in a byte string and returns the encrypted version\r\n *\r\n * @name encryptor\r\n * @function\r\n * @param {number} objectId\r\n * @param {number} generation Not sure what this is for, you can set it to 0\r\n * @returns {Function}\r\n * @example\r\n * out(\"stream\");\r\n * encryptor = security.encryptor(object.id, 0);\r\n * out(encryptor(data));\r\n * out(\"endstream\");\r\n */\r\nPDFSecurity.prototype.encryptor = function(objectId, generation) {\r\n  let key = md5Bin(\r\n    this.encryptionKey +\r\n      String.fromCharCode(\r\n        objectId & 0xff,\r\n        (objectId >> 8) & 0xff,\r\n        (objectId >> 16) & 0xff,\r\n        generation & 0xff,\r\n        (generation >> 8) & 0xff\r\n      )\r\n  ).substr(0, 10);\r\n  return function(data) {\r\n    return rc4(key, data);\r\n  };\r\n};\r\n\r\nexport { PDFSecurity };\r\n","/**\n * Convert string to `PDF Name Object`.\n * Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object\n * @param str\n */\nfunction toPDFName(str) {\n  // eslint-disable-next-line no-control-regex\n  if (/[^\\u0000-\\u00ff]/.test(str)) {\n    // non ascii string\n    throw new Error(\n      \"Invalid PDF Name Object: \" + str + \", Only accept ASCII characters.\"\n    );\n  }\n  var result = \"\",\n    strLength = str.length;\n  for (var i = 0; i < strLength; i++) {\n    var charCode = str.charCodeAt(i);\n    if (\n      charCode < 0x21 ||\n      charCode === 0x23 /* # */ ||\n      charCode === 0x25 /* % */ ||\n      charCode === 0x28 /* ( */ ||\n      charCode === 0x29 /* ) */ ||\n      charCode === 0x2f /* / */ ||\n      charCode === 0x3c /* < */ ||\n      charCode === 0x3e /* > */ ||\n      charCode === 0x5b /* [ */ ||\n      charCode === 0x5d /* ] */ ||\n      charCode === 0x7b /* { */ ||\n      charCode === 0x7d /* } */ ||\n      charCode > 0x7e\n    ) {\n      // Char    CharCode    hexStr   paddingHexStr    Result\n      // \"\\t\"    9           9        09               #09\n      // \" \"     32          20       20               #20\n      // \"©\"     169         a9       a9               #a9\n      var hexStr = charCode.toString(16),\n        paddingHexStr = (\"0\" + hexStr).slice(-2);\n\n      result += \"#\" + paddingHexStr;\n    } else {\n      // Other ASCII printable characters between 0x21 <= X <= 0x7e\n      result += str[i];\n    }\n  }\n  return result;\n}\n\nexport { toPDFName };\n","/* eslint-disable no-console */\r\n\r\nimport { globalObject } from \"./libs/globalObject.js\";\r\nimport { RGBColor } from \"./libs/rgbcolor.js\";\r\nimport { btoa } from \"./libs/AtobBtoa.js\";\r\nimport { console } from \"./libs/console.js\";\r\nimport { PDFSecurity } from \"./libs/pdfsecurity.js\";\r\nimport { toPDFName } from \"./libs/pdfname.js\";\r\n/**\r\n * jsPDF's Internal PubSub Implementation.\r\n * Backward compatible rewritten on 2014 by\r\n * Diego Casorran, https://github.com/diegocr\r\n *\r\n * @class\r\n * @name PubSub\r\n * @ignore\r\n */\r\nfunction PubSub(context) {\r\n  if (typeof context !== \"object\") {\r\n    throw new Error(\r\n      \"Invalid Context passed to initialize PubSub (jsPDF-module)\"\r\n    );\r\n  }\r\n  var topics = {};\r\n\r\n  this.subscribe = function(topic, callback, once) {\r\n    once = once || false;\r\n    if (\r\n      typeof topic !== \"string\" ||\r\n      typeof callback !== \"function\" ||\r\n      typeof once !== \"boolean\"\r\n    ) {\r\n      throw new Error(\r\n        \"Invalid arguments passed to PubSub.subscribe (jsPDF-module)\"\r\n      );\r\n    }\r\n\r\n    if (!topics.hasOwnProperty(topic)) {\r\n      topics[topic] = {};\r\n    }\r\n\r\n    var token = Math.random().toString(35);\r\n    topics[topic][token] = [callback, !!once];\r\n\r\n    return token;\r\n  };\r\n\r\n  this.unsubscribe = function(token) {\r\n    for (var topic in topics) {\r\n      if (topics[topic][token]) {\r\n        delete topics[topic][token];\r\n        if (Object.keys(topics[topic]).length === 0) {\r\n          delete topics[topic];\r\n        }\r\n        return true;\r\n      }\r\n    }\r\n    return false;\r\n  };\r\n\r\n  this.publish = function(topic) {\r\n    if (topics.hasOwnProperty(topic)) {\r\n      var args = Array.prototype.slice.call(arguments, 1),\r\n        tokens = [];\r\n\r\n      for (var token in topics[topic]) {\r\n        var sub = topics[topic][token];\r\n        try {\r\n          sub[0].apply(context, args);\r\n        } catch (ex) {\r\n          if (globalObject.console) {\r\n            console.error(\"jsPDF PubSub Error\", ex.message, ex);\r\n          }\r\n        }\r\n        if (sub[1]) tokens.push(token);\r\n      }\r\n      if (tokens.length) tokens.forEach(this.unsubscribe);\r\n    }\r\n  };\r\n\r\n  this.getTopics = function() {\r\n    return topics;\r\n  };\r\n}\r\n\r\nfunction GState(parameters) {\r\n  if (!(this instanceof GState)) {\r\n    return new GState(parameters);\r\n  }\r\n\r\n  /**\r\n   * @name GState#opacity\r\n   * @type {any}\r\n   */\r\n  /**\r\n   * @name GState#stroke-opacity\r\n   * @type {any}\r\n   */\r\n  var supported = \"opacity,stroke-opacity\".split(\",\");\r\n  for (var p in parameters) {\r\n    if (parameters.hasOwnProperty(p) && supported.indexOf(p) >= 0) {\r\n      this[p] = parameters[p];\r\n    }\r\n  }\r\n  /**\r\n   * @name GState#id\r\n   * @type {string}\r\n   */\r\n  this.id = \"\"; // set by addGState()\r\n  /**\r\n   * @name GState#objectNumber\r\n   * @type {number}\r\n   */\r\n  this.objectNumber = -1; // will be set by putGState()\r\n}\r\n\r\nGState.prototype.equals = function equals(other) {\r\n  var ignore = \"id,objectNumber,equals\";\r\n  var p;\r\n  if (!other || typeof other !== typeof this) return false;\r\n  var count = 0;\r\n  for (p in this) {\r\n    if (ignore.indexOf(p) >= 0) continue;\r\n    if (this.hasOwnProperty(p) && !other.hasOwnProperty(p)) return false;\r\n    if (this[p] !== other[p]) return false;\r\n    count++;\r\n  }\r\n  for (p in other) {\r\n    if (other.hasOwnProperty(p) && ignore.indexOf(p) < 0) count--;\r\n  }\r\n  return count === 0;\r\n};\r\n\r\nfunction Pattern(gState, matrix) {\r\n  this.gState = gState;\r\n  this.matrix = matrix;\r\n\r\n  this.id = \"\"; // set by addPattern()\r\n  this.objectNumber = -1; // will be set by putPattern()\r\n}\r\n\r\nfunction ShadingPattern(type, coords, colors, gState, matrix) {\r\n  if (!(this instanceof ShadingPattern)) {\r\n    return new ShadingPattern(type, coords, colors, gState, matrix);\r\n  }\r\n\r\n  // see putPattern() for information how they are realized\r\n  this.type = type === \"axial\" ? 2 : 3;\r\n  this.coords = coords;\r\n  this.colors = colors;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\nfunction TilingPattern(boundingBox, xStep, yStep, gState, matrix) {\r\n  if (!(this instanceof TilingPattern)) {\r\n    return new TilingPattern(boundingBox, xStep, yStep, gState, matrix);\r\n  }\r\n\r\n  this.boundingBox = boundingBox;\r\n  this.xStep = xStep;\r\n  this.yStep = yStep;\r\n\r\n  this.stream = \"\"; // set by endTilingPattern();\r\n\r\n  this.cloneIndex = 0;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\n/**\r\n * Creates new jsPDF document object instance.\r\n * @name jsPDF\r\n * @class\r\n * @param {Object} [options] - Collection of settings initializing the jsPDF-instance\r\n * @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" or \"l\").<br />\r\n * @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />\r\n * Possible values are \"pt\" (points), \"mm\", \"cm\", \"in\", \"px\", \"pc\", \"em\" or \"ex\". Note that in order to get the correct scaling for \"px\"\r\n * units, you need to enable the hotfix \"px_scaling\" by setting options.hotfixes = [\"px_scaling\"].\r\n * @param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n * @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.\r\n * @param {boolean} [options.compress=false] Compress the generated PDF.\r\n * @param {number} [options.precision=16] Precision of the element-positions.\r\n * @param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.\r\n * @param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.\r\n * @param {Object} [options.encryption]\r\n * @param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.\r\n * @param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.\r\n * @param {string[]} [options.encryption.userPermissions] Array of permissions \"print\", \"modify\", \"copy\", \"annot-forms\", accessible by the user.\r\n * @param {number|\"smart\"} [options.floatPrecision=16]\r\n * @returns {jsPDF} jsPDF-instance\r\n * @description\r\n * ```\r\n * {\r\n *  orientation: 'p',\r\n *  unit: 'mm',\r\n *  format: 'a4',\r\n *  putOnlyUsedFonts:true,\r\n *  floatPrecision: 16 // or \"smart\", default is 16\r\n * }\r\n * ```\r\n *\r\n * @constructor\r\n */\r\nfunction jsPDF(options) {\r\n  var orientation = typeof arguments[0] === \"string\" ? arguments[0] : \"p\";\r\n  var unit = arguments[1];\r\n  var format = arguments[2];\r\n  var compressPdf = arguments[3];\r\n  var filters = [];\r\n  var userUnit = 1.0;\r\n  var precision;\r\n  var floatPrecision = 16;\r\n  var defaultPathOperation = \"S\";\r\n  var encryptionOptions = null;\r\n\r\n  options = options || {};\r\n\r\n  if (typeof options === \"object\") {\r\n    orientation = options.orientation;\r\n    unit = options.unit || unit;\r\n    format = options.format || format;\r\n    compressPdf = options.compress || options.compressPdf || compressPdf;\r\n    encryptionOptions = options.encryption || null;\r\n    if (encryptionOptions !== null) {\r\n      encryptionOptions.userPassword = encryptionOptions.userPassword || \"\";\r\n      encryptionOptions.ownerPassword = encryptionOptions.ownerPassword || \"\";\r\n      encryptionOptions.userPermissions =\r\n        encryptionOptions.userPermissions || [];\r\n    }\r\n    userUnit =\r\n      typeof options.userUnit === \"number\" ? Math.abs(options.userUnit) : 1.0;\r\n    if (typeof options.precision !== \"undefined\") {\r\n      precision = options.precision;\r\n    }\r\n    if (typeof options.floatPrecision !== \"undefined\") {\r\n      floatPrecision = options.floatPrecision;\r\n    }\r\n    defaultPathOperation = options.defaultPathOperation || \"S\";\r\n  }\r\n\r\n  filters =\r\n    options.filters || (compressPdf === true ? [\"FlateEncode\"] : filters);\r\n\r\n  unit = unit || \"mm\";\r\n  orientation = (\"\" + (orientation || \"P\")).toLowerCase();\r\n  var putOnlyUsedFonts = options.putOnlyUsedFonts || false;\r\n  var usedFonts = {};\r\n\r\n  var API = {\r\n    internal: {},\r\n    __private__: {}\r\n  };\r\n\r\n  API.__private__.PubSub = PubSub;\r\n\r\n  var pdfVersion = \"1.3\";\r\n  var getPdfVersion = (API.__private__.getPdfVersion = function() {\r\n    return pdfVersion;\r\n  });\r\n\r\n  API.__private__.setPdfVersion = function(value) {\r\n    pdfVersion = value;\r\n  };\r\n\r\n  // Size in pt of various paper formats\r\n  var pageFormats = {\r\n    a0: [2383.94, 3370.39],\r\n    a1: [1683.78, 2383.94],\r\n    a2: [1190.55, 1683.78],\r\n    a3: [841.89, 1190.55],\r\n    a4: [595.28, 841.89],\r\n    a5: [419.53, 595.28],\r\n    a6: [297.64, 419.53],\r\n    a7: [209.76, 297.64],\r\n    a8: [147.4, 209.76],\r\n    a9: [104.88, 147.4],\r\n    a10: [73.7, 104.88],\r\n    b0: [2834.65, 4008.19],\r\n    b1: [2004.09, 2834.65],\r\n    b2: [1417.32, 2004.09],\r\n    b3: [1000.63, 1417.32],\r\n    b4: [708.66, 1000.63],\r\n    b5: [498.9, 708.66],\r\n    b6: [354.33, 498.9],\r\n    b7: [249.45, 354.33],\r\n    b8: [175.75, 249.45],\r\n    b9: [124.72, 175.75],\r\n    b10: [87.87, 124.72],\r\n    c0: [2599.37, 3676.54],\r\n    c1: [1836.85, 2599.37],\r\n    c2: [1298.27, 1836.85],\r\n    c3: [918.43, 1298.27],\r\n    c4: [649.13, 918.43],\r\n    c5: [459.21, 649.13],\r\n    c6: [323.15, 459.21],\r\n    c7: [229.61, 323.15],\r\n    c8: [161.57, 229.61],\r\n    c9: [113.39, 161.57],\r\n    c10: [79.37, 113.39],\r\n    dl: [311.81, 623.62],\r\n    letter: [612, 792],\r\n    \"government-letter\": [576, 756],\r\n    legal: [612, 1008],\r\n    \"junior-legal\": [576, 360],\r\n    ledger: [1224, 792],\r\n    tabloid: [792, 1224],\r\n    \"credit-card\": [153, 243]\r\n  };\r\n\r\n  API.__private__.getPageFormats = function() {\r\n    return pageFormats;\r\n  };\r\n\r\n  var getPageFormat = (API.__private__.getPageFormat = function(value) {\r\n    return pageFormats[value];\r\n  });\r\n\r\n  format = format || \"a4\";\r\n\r\n  var ApiMode = {\r\n    COMPAT: \"compat\",\r\n    ADVANCED: \"advanced\"\r\n  };\r\n  var apiMode = ApiMode.COMPAT;\r\n\r\n  function advancedAPI() {\r\n    // prepend global change of basis matrix\r\n    // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix\r\n    // that does this job for us (however, texts, images and similar objects must be drawn bottom up))\r\n    this.saveGraphicsState();\r\n    out(\r\n      new Matrix(\r\n        scaleFactor,\r\n        0,\r\n        0,\r\n        -scaleFactor,\r\n        0,\r\n        getPageHeight() * scaleFactor\r\n      ).toString() + \" cm\"\r\n    );\r\n    this.setFontSize(this.getFontSize() / scaleFactor);\r\n\r\n    // The default in MrRio's implementation is \"S\" (stroke), whereas the default in the yWorks implementation\r\n    // was \"n\" (none). Although this has nothing to do with transforms, we should use the API switch here.\r\n    defaultPathOperation = \"n\";\r\n\r\n    apiMode = ApiMode.ADVANCED;\r\n  }\r\n\r\n  function compatAPI() {\r\n    this.restoreGraphicsState();\r\n    defaultPathOperation = \"S\";\r\n    apiMode = ApiMode.COMPAT;\r\n  }\r\n\r\n  /**\r\n   * @function combineFontStyleAndFontWeight\r\n   * @param {string} fontStyle Fontstyle or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @returns {string}\r\n   * @private\r\n   */\r\n  var combineFontStyleAndFontWeight = (API.__private__.combineFontStyleAndFontWeight = function(\r\n    fontStyle,\r\n    fontWeight\r\n  ) {\r\n    if (\r\n      (fontStyle == \"bold\" && fontWeight == \"normal\") ||\r\n      (fontStyle == \"bold\" && fontWeight == 400) ||\r\n      (fontStyle == \"normal\" && fontWeight == \"italic\") ||\r\n      (fontStyle == \"bold\" && fontWeight == \"italic\")\r\n    ) {\r\n      throw new Error(\"Invalid Combination of fontweight and fontstyle\");\r\n    }\r\n    if (fontWeight) {\r\n      fontStyle =\r\n        fontWeight == 400 || fontWeight === \"normal\"\r\n          ? fontStyle === \"italic\"\r\n            ? \"italic\"\r\n            : \"normal\"\r\n          : (fontWeight == 700 || fontWeight === \"bold\") &&\r\n            fontStyle === \"normal\"\r\n          ? \"bold\"\r\n          : (fontWeight == 700 ? \"bold\" : fontWeight) + \"\" + fontStyle;\r\n    }\r\n    return fontStyle;\r\n  });\r\n\r\n  /**\r\n   * @callback ApiSwitchBody\r\n   * @param {jsPDF} pdf\r\n   */\r\n\r\n  /**\r\n   * For compatibility reasons jsPDF offers two API modes which differ in the way they convert between the the usual\r\n   * screen coordinates and the PDF coordinate system.\r\n   *   - \"compat\": Offers full compatibility across all plugins but does not allow arbitrary transforms\r\n   *   - \"advanced\": Allows arbitrary transforms and more advanced features like pattern fills. Some plugins might\r\n   *     not support this mode, though.\r\n   * Initial mode is \"compat\".\r\n   *\r\n   * You can either provide a callback to the body argument, which means that jsPDF will automatically switch back to\r\n   * the original API mode afterwards; or you can omit the callback and switch back manually using {@link compatAPI}.\r\n   *\r\n   * Note, that the calls to {@link saveGraphicsState} and {@link restoreGraphicsState} need to be balanced within the\r\n   * callback or between calls of this method and its counterpart {@link compatAPI}. Calls to {@link beginFormObject}\r\n   * or {@link beginTilingPattern} need to be closed by their counterparts before switching back to \"compat\" API mode.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name advancedAPI\r\n   */\r\n  API.advancedAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.COMPAT;\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Switches to \"compat\" API mode. See {@link advancedAPI} for more details.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @return {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name compatApi\r\n   */\r\n  API.compatAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.ADVANCED;\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @return {boolean} True iff the current API mode is \"advanced\". See {@link advancedAPI}.\r\n   * @memberof jsPDF#\r\n   * @name isAdvancedAPI\r\n   */\r\n  API.isAdvancedAPI = function() {\r\n    return apiMode === ApiMode.ADVANCED;\r\n  };\r\n\r\n  var advancedApiModeTrap = function(methodName) {\r\n    if (apiMode !== ApiMode.ADVANCED) {\r\n      throw new Error(\r\n        methodName +\r\n          \" is only available in 'advanced' API mode. \" +\r\n          \"You need to call advancedAPI() first.\"\r\n      );\r\n    }\r\n  };\r\n\r\n  var roundToPrecision = (API.roundToPrecision = API.__private__.roundToPrecision = function(\r\n    number,\r\n    parmPrecision\r\n  ) {\r\n    var tmpPrecision = precision || parmPrecision;\r\n    if (isNaN(number) || isNaN(tmpPrecision)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.roundToPrecision\");\r\n    }\r\n    return number.toFixed(tmpPrecision).replace(/0+$/, \"\");\r\n  });\r\n\r\n  // high precision float\r\n  var hpf;\r\n  if (typeof floatPrecision === \"number\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, floatPrecision);\r\n    };\r\n  } else if (floatPrecision === \"smart\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      if (number > -1 && number < 1) {\r\n        return roundToPrecision(number, 16);\r\n      } else {\r\n        return roundToPrecision(number, 5);\r\n      }\r\n    };\r\n  } else {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, 16);\r\n    };\r\n  }\r\n  var f2 = (API.f2 = API.__private__.f2 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f2\");\r\n    }\r\n    return roundToPrecision(number, 2);\r\n  });\r\n\r\n  var f3 = (API.__private__.f3 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f3\");\r\n    }\r\n    return roundToPrecision(number, 3);\r\n  });\r\n\r\n  var scale = (API.scale = API.__private__.scale = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.scale\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return number * scaleFactor;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return number;\r\n    }\r\n  });\r\n\r\n  var transformY = function(y) {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return getPageHeight() - y;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return y;\r\n    }\r\n  };\r\n\r\n  var transformScaleY = function(y) {\r\n    return scale(transformY(y));\r\n  };\r\n\r\n  /**\r\n   * @name setPrecision\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} precision\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setPrecision = API.setPrecision = function(value) {\r\n    if (typeof parseInt(value, 10) === \"number\") {\r\n      precision = parseInt(value, 10);\r\n    }\r\n  };\r\n\r\n  var fileId = \"00000000000000000000000000000000\";\r\n\r\n  var getFileId = (API.__private__.getFileId = function() {\r\n    return fileId;\r\n  });\r\n\r\n  var setFileId = (API.__private__.setFileId = function(value) {\r\n    if (typeof value !== \"undefined\" && /^[a-fA-F0-9]{32}$/.test(value)) {\r\n      fileId = value.toUpperCase();\r\n    } else {\r\n      fileId = fileId\r\n        .split(\"\")\r\n        .map(function() {\r\n          return \"ABCDEF0123456789\".charAt(Math.floor(Math.random() * 16));\r\n        })\r\n        .join(\"\");\r\n    }\r\n\r\n    if (encryptionOptions !== null) {\r\n      encryption = new PDFSecurity(\r\n        encryptionOptions.userPermissions,\r\n        encryptionOptions.userPassword,\r\n        encryptionOptions.ownerPassword,\r\n        fileId\r\n      );\r\n    }\r\n    return fileId;\r\n  });\r\n\r\n  /**\r\n   * @name setFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} value GUID.\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setFileId = function(value) {\r\n    setFileId(value);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   *\r\n   * @returns {string} GUID.\r\n   */\r\n  API.getFileId = function() {\r\n    return getFileId();\r\n  };\r\n\r\n  var creationDate;\r\n\r\n  var convertDateToPDFDate = (API.__private__.convertDateToPDFDate = function(\r\n    parmDate\r\n  ) {\r\n    var result = \"\";\r\n    var tzoffset = parmDate.getTimezoneOffset(),\r\n      tzsign = tzoffset < 0 ? \"+\" : \"-\",\r\n      tzhour = Math.floor(Math.abs(tzoffset / 60)),\r\n      tzmin = Math.abs(tzoffset % 60),\r\n      timeZoneString = [tzsign, padd2(tzhour), \"'\", padd2(tzmin), \"'\"].join(\"\");\r\n\r\n    result = [\r\n      \"D:\",\r\n      parmDate.getFullYear(),\r\n      padd2(parmDate.getMonth() + 1),\r\n      padd2(parmDate.getDate()),\r\n      padd2(parmDate.getHours()),\r\n      padd2(parmDate.getMinutes()),\r\n      padd2(parmDate.getSeconds()),\r\n      timeZoneString\r\n    ].join(\"\");\r\n    return result;\r\n  });\r\n\r\n  var convertPDFDateToDate = (API.__private__.convertPDFDateToDate = function(\r\n    parmPDFDate\r\n  ) {\r\n    var year = parseInt(parmPDFDate.substr(2, 4), 10);\r\n    var month = parseInt(parmPDFDate.substr(6, 2), 10) - 1;\r\n    var date = parseInt(parmPDFDate.substr(8, 2), 10);\r\n    var hour = parseInt(parmPDFDate.substr(10, 2), 10);\r\n    var minutes = parseInt(parmPDFDate.substr(12, 2), 10);\r\n    var seconds = parseInt(parmPDFDate.substr(14, 2), 10);\r\n    // var timeZoneHour = parseInt(parmPDFDate.substr(16, 2), 10);\r\n    // var timeZoneMinutes = parseInt(parmPDFDate.substr(20, 2), 10);\r\n\r\n    var resultingDate = new Date(year, month, date, hour, minutes, seconds, 0);\r\n    return resultingDate;\r\n  });\r\n\r\n  var setCreationDate = (API.__private__.setCreationDate = function(date) {\r\n    var tmpCreationDateString;\r\n    var regexPDFCreationDate = /^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])'?$/;\r\n    if (typeof date === \"undefined\") {\r\n      date = new Date();\r\n    }\r\n\r\n    if (date instanceof Date) {\r\n      tmpCreationDateString = convertDateToPDFDate(date);\r\n    } else if (regexPDFCreationDate.test(date)) {\r\n      tmpCreationDateString = date;\r\n    } else {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCreationDate\");\r\n    }\r\n    creationDate = tmpCreationDateString;\r\n    return creationDate;\r\n  });\r\n\r\n  var getCreationDate = (API.__private__.getCreationDate = function(type) {\r\n    var result = creationDate;\r\n    if (type === \"jsDate\") {\r\n      result = convertPDFDateToDate(creationDate);\r\n    }\r\n    return result;\r\n  });\r\n\r\n  /**\r\n   * @name setCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} date\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setCreationDate = function(date) {\r\n    setCreationDate(date);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} type\r\n   * @returns {Object}\r\n   */\r\n  API.getCreationDate = function(type) {\r\n    return getCreationDate(type);\r\n  };\r\n\r\n  var padd2 = (API.__private__.padd2 = function(number) {\r\n    return (\"0\" + parseInt(number)).slice(-2);\r\n  });\r\n\r\n  var padd2Hex = (API.__private__.padd2Hex = function(hexString) {\r\n    hexString = hexString.toString();\r\n    return (\"00\" + hexString).substr(hexString.length);\r\n  });\r\n\r\n  var objectNumber = 0; // 'n' Current object number\r\n  var offsets = []; // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.\r\n  var content = [];\r\n  var contentLength = 0;\r\n  var additionalObjects = [];\r\n\r\n  var pages = [];\r\n  var currentPage;\r\n  var hasCustomDestination = false;\r\n  var outputDestination = content;\r\n\r\n  var resetDocument = function() {\r\n    //reset fields relevant for objectNumber generation and xref.\r\n    objectNumber = 0;\r\n    contentLength = 0;\r\n    content = [];\r\n    offsets = [];\r\n    additionalObjects = [];\r\n\r\n    rootDictionaryObjId = newObjectDeferred();\r\n    resourceDictionaryObjId = newObjectDeferred();\r\n  };\r\n\r\n  API.__private__.setCustomOutputDestination = function(destination) {\r\n    hasCustomDestination = true;\r\n    outputDestination = destination;\r\n  };\r\n  var setOutputDestination = function(destination) {\r\n    if (!hasCustomDestination) {\r\n      outputDestination = destination;\r\n    }\r\n  };\r\n\r\n  API.__private__.resetCustomOutputDestination = function() {\r\n    hasCustomDestination = false;\r\n    outputDestination = content;\r\n  };\r\n\r\n  var out = (API.__private__.out = function(string) {\r\n    string = string.toString();\r\n    contentLength += string.length + 1;\r\n    outputDestination.push(string);\r\n\r\n    return outputDestination;\r\n  });\r\n\r\n  var write = (API.__private__.write = function(value) {\r\n    return out(\r\n      arguments.length === 1\r\n        ? value.toString()\r\n        : Array.prototype.join.call(arguments, \" \")\r\n    );\r\n  });\r\n\r\n  var getArrayBuffer = (API.__private__.getArrayBuffer = function(data) {\r\n    var len = data.length,\r\n      ab = new ArrayBuffer(len),\r\n      u8 = new Uint8Array(ab);\r\n\r\n    while (len--) u8[len] = data.charCodeAt(len);\r\n    return ab;\r\n  });\r\n\r\n  var standardFonts = [\r\n    [\"Helvetica\", \"helvetica\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Bold\", \"helvetica\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Oblique\", \"helvetica\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-BoldOblique\", \"helvetica\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Courier\", \"courier\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Bold\", \"courier\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Oblique\", \"courier\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Courier-BoldOblique\", \"courier\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Times-Roman\", \"times\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Times-Bold\", \"times\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Times-Italic\", \"times\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Times-BoldItalic\", \"times\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"ZapfDingbats\", \"zapfdingbats\", \"normal\", null],\r\n    [\"Symbol\", \"symbol\", \"normal\", null]\r\n  ];\r\n\r\n  API.__private__.getStandardFonts = function() {\r\n    return standardFonts;\r\n  };\r\n\r\n  var activeFontSize = options.fontSize || 16;\r\n\r\n  /**\r\n   * Sets font size for upcoming text elements.\r\n   *\r\n   * @param {number} size Font size in points.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFontSize\r\n   */\r\n  API.__private__.setFontSize = API.setFontSize = function(size) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      activeFontSize = size / scaleFactor;\r\n    } else {\r\n      activeFontSize = size;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets the fontsize for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number}\r\n   * @memberof jsPDF#\r\n   * @name getFontSize\r\n   */\r\n  var getFontSize = (API.__private__.getFontSize = API.getFontSize = function() {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return activeFontSize;\r\n    } else {\r\n      return activeFontSize * scaleFactor;\r\n    }\r\n  });\r\n\r\n  var R2L = options.R2L || false;\r\n\r\n  /**\r\n   * Set value of R2L functionality.\r\n   *\r\n   * @param {boolean} value\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setR2L\r\n   */\r\n  API.__private__.setR2L = API.setR2L = function(value) {\r\n    R2L = value;\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Get value of R2L functionality.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {boolean} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name getR2L\r\n   */\r\n  API.__private__.getR2L = API.getR2L = function() {\r\n    return R2L;\r\n  };\r\n\r\n  var zoomMode; // default: 1;\r\n\r\n  var setZoomMode = (API.__private__.setZoomMode = function(zoom) {\r\n    var validZoomModes = [\r\n      undefined,\r\n      null,\r\n      \"fullwidth\",\r\n      \"fullheight\",\r\n      \"fullpage\",\r\n      \"original\"\r\n    ];\r\n\r\n    if (/^(?:\\d+\\.\\d*|\\d*\\.\\d+|\\d+)%$/.test(zoom)) {\r\n      zoomMode = zoom;\r\n    } else if (!isNaN(zoom)) {\r\n      zoomMode = parseInt(zoom, 10);\r\n    } else if (validZoomModes.indexOf(zoom) !== -1) {\r\n      zoomMode = zoom;\r\n    } else {\r\n      throw new Error(\r\n        'zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. \"' +\r\n          zoom +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n  });\r\n\r\n  API.__private__.getZoomMode = function() {\r\n    return zoomMode;\r\n  };\r\n\r\n  var pageMode; // default: 'UseOutlines';\r\n  var setPageMode = (API.__private__.setPageMode = function(pmode) {\r\n    var validPageModes = [\r\n      undefined,\r\n      null,\r\n      \"UseNone\",\r\n      \"UseOutlines\",\r\n      \"UseThumbs\",\r\n      \"FullScreen\"\r\n    ];\r\n\r\n    if (validPageModes.indexOf(pmode) == -1) {\r\n      throw new Error(\r\n        'Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. \"' +\r\n          pmode +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    pageMode = pmode;\r\n  });\r\n\r\n  API.__private__.getPageMode = function() {\r\n    return pageMode;\r\n  };\r\n\r\n  var layoutMode; // default: 'continuous';\r\n  var setLayoutMode = (API.__private__.setLayoutMode = function(layout) {\r\n    var validLayoutModes = [\r\n      undefined,\r\n      null,\r\n      \"continuous\",\r\n      \"single\",\r\n      \"twoleft\",\r\n      \"tworight\",\r\n      \"two\"\r\n    ];\r\n\r\n    if (validLayoutModes.indexOf(layout) == -1) {\r\n      throw new Error(\r\n        'Layout mode must be one of continuous, single, twoleft, tworight. \"' +\r\n          layout +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    layoutMode = layout;\r\n  });\r\n\r\n  API.__private__.getLayoutMode = function() {\r\n    return layoutMode;\r\n  };\r\n\r\n  /**\r\n   * Set the display mode options of the page like zoom and layout.\r\n   *\r\n   * @name setDisplayMode\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {integer|String} zoom   You can pass an integer or percentage as\r\n   * a string. 2 will scale the document up 2x, '200%' will scale up by the\r\n   * same amount. You can also set it to 'fullwidth', 'fullheight',\r\n   * 'fullpage', or 'original'.\r\n   *\r\n   * Only certain PDF readers support this, such as Adobe Acrobat.\r\n   *\r\n   * @param {string} layout Layout mode can be: 'continuous' - this is the\r\n   * default continuous scroll. 'single' - the single page mode only shows one\r\n   * page at a time. 'twoleft' - two column left mode, first page starts on\r\n   * the left, and 'tworight' - pages are laid out in two columns, with the\r\n   * first page on the right. This would be used for books.\r\n   * @param {string} pmode 'UseOutlines' - it shows the\r\n   * outline of the document on the left. 'UseThumbs' - shows thumbnails along\r\n   * the left. 'FullScreen' - prompts the user to enter fullscreen mode.\r\n   *\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setDisplayMode = API.setDisplayMode = function(\r\n    zoom,\r\n    layout,\r\n    pmode\r\n  ) {\r\n    setZoomMode(zoom);\r\n    setLayoutMode(layout);\r\n    setPageMode(pmode);\r\n    return this;\r\n  };\r\n\r\n  var documentProperties = {\r\n    title: \"\",\r\n    subject: \"\",\r\n    author: \"\",\r\n    keywords: \"\",\r\n    creator: \"\"\r\n  };\r\n\r\n  API.__private__.getDocumentProperty = function(key) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getDocumentProperty\");\r\n    }\r\n    return documentProperties[key];\r\n  };\r\n\r\n  API.__private__.getDocumentProperties = function() {\r\n    return documentProperties;\r\n  };\r\n\r\n  /**\r\n   * Adds a properties to the PDF document.\r\n   *\r\n   * @param {Object} A property_name-to-property_value object structure.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDocumentProperties\r\n   */\r\n  API.__private__.setDocumentProperties = API.setProperties = API.setDocumentProperties = function(\r\n    properties\r\n  ) {\r\n    // copying only those properties we can render.\r\n    for (var property in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(property) && properties[property]) {\r\n        documentProperties[property] = properties[property];\r\n      }\r\n    }\r\n    return this;\r\n  };\r\n\r\n  API.__private__.setDocumentProperty = function(key, value) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setDocumentProperty\");\r\n    }\r\n    return (documentProperties[key] = value);\r\n  };\r\n\r\n  var fonts = {}; // collection of font objects, where key is fontKey - a dynamically created label for a given font.\r\n  var fontmap = {}; // mapping structure fontName > fontStyle > font key - performance layer. See addFont()\r\n  var activeFontKey; // will be string representing the KEY of the font as combination of fontName + fontStyle\r\n  var fontStateStack = []; //\r\n  var patterns = {}; // collection of pattern objects\r\n  var patternMap = {}; // see fonts\r\n  var gStates = {}; // collection of graphic state objects\r\n  var gStatesMap = {}; // see fonts\r\n  var activeGState = null;\r\n  var scaleFactor; // Scale factor\r\n  var page = 0;\r\n  var pagesContext = [];\r\n  var events = new PubSub(API);\r\n  var hotfixes = options.hotfixes || [];\r\n\r\n  var renderTargets = {};\r\n  var renderTargetMap = {};\r\n  var renderTargetStack = [];\r\n  var pageX;\r\n  var pageY;\r\n  var pageMatrix; // only used for FormObjects\r\n\r\n  /**\r\n   * A matrix object for 2D homogenous transformations: <br>\r\n   * | a b 0 | <br>\r\n   * | c d 0 | <br>\r\n   * | e f 1 | <br>\r\n   * pdf multiplies matrices righthand: v' = v x m1 x m2 x ...\r\n   *\r\n   * @class\r\n   * @name Matrix\r\n   * @param {number} sx\r\n   * @param {number} shy\r\n   * @param {number} shx\r\n   * @param {number} sy\r\n   * @param {number} tx\r\n   * @param {number} ty\r\n   * @constructor\r\n   */\r\n  var Matrix = function(sx, shy, shx, sy, tx, ty) {\r\n    if (!(this instanceof Matrix)) {\r\n      return new Matrix(sx, shy, shx, sy, tx, ty);\r\n    }\r\n\r\n    if (isNaN(sx)) sx = 1;\r\n    if (isNaN(shy)) shy = 0;\r\n    if (isNaN(shx)) shx = 0;\r\n    if (isNaN(sy)) sy = 1;\r\n    if (isNaN(tx)) tx = 0;\r\n    if (isNaN(ty)) ty = 0;\r\n\r\n    this._matrix = [sx, shy, shx, sy, tx, ty];\r\n  };\r\n\r\n  /**\r\n   * @name sx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sx\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shy\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shx\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name sy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sy\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name tx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"tx\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name ty\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"ty\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"a\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"b\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"c\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"d\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"e\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"f\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name rotation\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"rotation\", {\r\n    get: function() {\r\n      return Math.atan2(this.shx, this.sx);\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleX\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleX\", {\r\n    get: function() {\r\n      return this.decompose().scale.sx;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleY\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleY\", {\r\n    get: function() {\r\n      return this.decompose().scale.sy;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name isIdentity\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"isIdentity\", {\r\n    get: function() {\r\n      if (this.sx !== 1) {\r\n        return false;\r\n      }\r\n      if (this.shy !== 0) {\r\n        return false;\r\n      }\r\n      if (this.shx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.sy !== 1) {\r\n        return false;\r\n      }\r\n      if (this.tx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.ty !== 0) {\r\n        return false;\r\n      }\r\n      return true;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * Join the Matrix Values to a String\r\n   *\r\n   * @function join\r\n   * @param {string} separator Specifies a string to separate each pair of adjacent elements of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma (\",\"). If separator is an empty string, all elements are joined without any characters in between them.\r\n   * @returns {string} A string with all array elements joined.\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.join = function(separator) {\r\n    return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty]\r\n      .map(hpf)\r\n      .join(separator);\r\n  };\r\n\r\n  /**\r\n   * Multiply the matrix with given Matrix\r\n   *\r\n   * @function multiply\r\n   * @param matrix\r\n   * @returns {Matrix}\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.multiply = function(matrix) {\r\n    var sx = matrix.sx * this.sx + matrix.shy * this.shx;\r\n    var shy = matrix.sx * this.shy + matrix.shy * this.sy;\r\n    var shx = matrix.shx * this.sx + matrix.sy * this.shx;\r\n    var sy = matrix.shx * this.shy + matrix.sy * this.sy;\r\n    var tx = matrix.tx * this.sx + matrix.ty * this.shx + this.tx;\r\n    var ty = matrix.tx * this.shy + matrix.ty * this.sy + this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  /**\r\n   * @function decompose\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.decompose = function() {\r\n    var a = this.sx;\r\n    var b = this.shy;\r\n    var c = this.shx;\r\n    var d = this.sy;\r\n    var e = this.tx;\r\n    var f = this.ty;\r\n\r\n    var scaleX = Math.sqrt(a * a + b * b);\r\n    a /= scaleX;\r\n    b /= scaleX;\r\n\r\n    var shear = a * c + b * d;\r\n    c -= a * shear;\r\n    d -= b * shear;\r\n\r\n    var scaleY = Math.sqrt(c * c + d * d);\r\n    c /= scaleY;\r\n    d /= scaleY;\r\n    shear /= scaleY;\r\n\r\n    if (a * d < b * c) {\r\n      a = -a;\r\n      b = -b;\r\n      shear = -shear;\r\n      scaleX = -scaleX;\r\n    }\r\n\r\n    return {\r\n      scale: new Matrix(scaleX, 0, 0, scaleY, 0, 0),\r\n      translate: new Matrix(1, 0, 0, 1, e, f),\r\n      rotate: new Matrix(a, b, -b, a, 0, 0),\r\n      skew: new Matrix(1, 0, shear, 1, 0, 0)\r\n    };\r\n  };\r\n\r\n  /**\r\n   * @function toString\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.toString = function(parmPrecision) {\r\n    return this.join(\" \");\r\n  };\r\n\r\n  /**\r\n   * @function inversed\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.inversed = function() {\r\n    var a = this.sx,\r\n      b = this.shy,\r\n      c = this.shx,\r\n      d = this.sy,\r\n      e = this.tx,\r\n      f = this.ty;\r\n\r\n    var quot = 1 / (a * d - b * c);\r\n\r\n    var aInv = d * quot;\r\n    var bInv = -b * quot;\r\n    var cInv = -c * quot;\r\n    var dInv = a * quot;\r\n    var eInv = -aInv * e - cInv * f;\r\n    var fInv = -bInv * e - dInv * f;\r\n\r\n    return new Matrix(aInv, bInv, cInv, dInv, eInv, fInv);\r\n  };\r\n\r\n  /**\r\n   * @function applyToPoint\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToPoint = function(pt) {\r\n    var x = pt.x * this.sx + pt.y * this.shx + this.tx;\r\n    var y = pt.x * this.shy + pt.y * this.sy + this.ty;\r\n    return new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * @function applyToRectangle\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToRectangle = function(rect) {\r\n    var pt1 = this.applyToPoint(rect);\r\n    var pt2 = this.applyToPoint(new Point(rect.x + rect.w, rect.y + rect.h));\r\n    return new Rectangle(pt1.x, pt1.y, pt2.x - pt1.x, pt2.y - pt1.y);\r\n  };\r\n\r\n  /**\r\n   * Clone the Matrix\r\n   *\r\n   * @function clone\r\n   * @memberof Matrix#\r\n   * @name clone\r\n   * @instance\r\n   */\r\n  Matrix.prototype.clone = function() {\r\n    var sx = this.sx;\r\n    var shy = this.shy;\r\n    var shx = this.shx;\r\n    var sy = this.sy;\r\n    var tx = this.tx;\r\n    var ty = this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  API.Matrix = Matrix;\r\n\r\n  /**\r\n   * Multiplies two matrices. (see {@link Matrix})\r\n   * @param {Matrix} m1\r\n   * @param {Matrix} m2\r\n   * @memberof jsPDF#\r\n   * @name matrixMult\r\n   */\r\n  var matrixMult = (API.matrixMult = function(m1, m2) {\r\n    return m2.multiply(m1);\r\n  });\r\n\r\n  /**\r\n   * The identity matrix (equivalent to new Matrix(1, 0, 0, 1, 0, 0)).\r\n   * @type {Matrix}\r\n   * @memberof! jsPDF#\r\n   * @name identityMatrix\r\n   */\r\n  var identityMatrix = new Matrix(1, 0, 0, 1, 0, 0);\r\n  API.unitMatrix = API.identityMatrix = identityMatrix;\r\n\r\n  /**\r\n   * Adds a new pattern for later use.\r\n   * @param {String} key The key by it can be referenced later. The keys must be unique!\r\n   * @param {API.Pattern} pattern The pattern\r\n   */\r\n  var addPattern = function(key, pattern) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (patternMap[key]) return;\r\n\r\n    var prefix = pattern instanceof ShadingPattern ? \"Sh\" : \"P\";\r\n    var patternKey = prefix + (Object.keys(patterns).length + 1).toString(10);\r\n    pattern.id = patternKey;\r\n\r\n    patternMap[key] = patternKey;\r\n    patterns[patternKey] = pattern;\r\n\r\n    events.publish(\"addPattern\", pattern);\r\n  };\r\n\r\n  /**\r\n   * A pattern describing a shading pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {String} type One of \"axial\" or \"radial\"\r\n   * @param {Array<Number>} coords Either [x1, y1, x2, y2] for \"axial\" type describing the two interpolation points\r\n   * or [x1, y1, r, x2, y2, r2] for \"radial\" describing inner and the outer circle.\r\n   * @param {Array<Object>} colors An array of objects with the fields \"offset\" and \"color\". \"offset\" describes\r\n   * the offset in parameter space [0, 1]. \"color\" is an array of length 3 describing RGB values in [0, 255].\r\n   * @param {GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.ShadingPattern = ShadingPattern;\r\n\r\n  /**\r\n   * A PDF Tiling pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {Array.<Number>} boundingBox The bounding box at which one pattern cell gets clipped.\r\n   * @param {Number} xStep Horizontal spacing between pattern cells.\r\n   * @param {Number} yStep Vertical spacing between pattern cells.\r\n   * @param {API.GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.TilingPattern = TilingPattern;\r\n\r\n  /**\r\n   * Adds a new {@link API.ShadingPattern} for later use. Only available in \"advanced\" API mode.\r\n   * @param {String} key\r\n   * @param {Pattern} pattern\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name addPattern\r\n   */\r\n  API.addShadingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"addShadingPattern()\");\r\n\r\n    addPattern(key, pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Begins a new tiling pattern. All subsequent render calls are drawn to this pattern until {@link API.endTilingPattern}\r\n   * gets called. Only available in \"advanced\" API mode.\r\n   * @param {API.Pattern} pattern\r\n   * @memberof jsPDF#\r\n   * @name beginTilingPattern\r\n   */\r\n  API.beginTilingPattern = function(pattern) {\r\n    advancedApiModeTrap(\"beginTilingPattern()\");\r\n\r\n    beginNewRenderTarget(\r\n      pattern.boundingBox[0],\r\n      pattern.boundingBox[1],\r\n      pattern.boundingBox[2] - pattern.boundingBox[0],\r\n      pattern.boundingBox[3] - pattern.boundingBox[1],\r\n      pattern.matrix\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Ends a tiling pattern and sets the render target to the one active before {@link API.beginTilingPattern} has been called.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {string} key A unique key that is used to reference this pattern at later use.\r\n   * @param {API.Pattern} pattern The pattern to end.\r\n   * @memberof jsPDF#\r\n   * @name endTilingPattern\r\n   */\r\n  API.endTilingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"endTilingPattern()\");\r\n\r\n    // retrieve the stream\r\n    pattern.stream = pages[currentPage].join(\"\\n\");\r\n\r\n    addPattern(key, pattern);\r\n\r\n    events.publish(\"endTilingPattern\", pattern);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  var newObject = (API.__private__.newObject = function() {\r\n    var oid = newObjectDeferred();\r\n    newObjectDeferredBegin(oid, true);\r\n    return oid;\r\n  });\r\n\r\n  // Does not output the object.  The caller must call newObjectDeferredBegin(oid) before outputing any data\r\n  var newObjectDeferred = (API.__private__.newObjectDeferred = function() {\r\n    objectNumber++;\r\n    offsets[objectNumber] = function() {\r\n      return contentLength;\r\n    };\r\n    return objectNumber;\r\n  });\r\n\r\n  var newObjectDeferredBegin = function(oid, doOutput) {\r\n    doOutput = typeof doOutput === \"boolean\" ? doOutput : false;\r\n    offsets[oid] = contentLength;\r\n    if (doOutput) {\r\n      out(oid + \" 0 obj\");\r\n    }\r\n    return oid;\r\n  };\r\n  // Does not output the object until after the pages have been output.\r\n  // Returns an object containing the objectId and content.\r\n  // All pages have been added so the object ID can be estimated to start right after.\r\n  // This does not modify the current objectNumber;  It must be updated after the newObjects are output.\r\n  var newAdditionalObject = (API.__private__.newAdditionalObject = function() {\r\n    var objId = newObjectDeferred();\r\n    var obj = {\r\n      objId: objId,\r\n      content: \"\"\r\n    };\r\n    additionalObjects.push(obj);\r\n    return obj;\r\n  });\r\n\r\n  var rootDictionaryObjId = newObjectDeferred();\r\n  var resourceDictionaryObjId = newObjectDeferred();\r\n\r\n  /////////////////////\r\n  // Private functions\r\n  /////////////////////\r\n\r\n  var decodeColorString = (API.__private__.decodeColorString = function(color) {\r\n    var colorEncoded = color.split(\" \");\r\n    if (\r\n      colorEncoded.length === 2 &&\r\n      (colorEncoded[1] === \"g\" || colorEncoded[1] === \"G\")\r\n    ) {\r\n      // convert grayscale value to rgb so that it can be converted to hex for consistency\r\n      var floatVal = parseFloat(colorEncoded[0]);\r\n      colorEncoded = [floatVal, floatVal, floatVal, \"r\"];\r\n    } else if (\r\n      colorEncoded.length === 5 &&\r\n      (colorEncoded[4] === \"k\" || colorEncoded[4] === \"K\")\r\n    ) {\r\n      // convert CMYK values to rbg so that it can be converted to hex for consistency\r\n      var red = (1.0 - colorEncoded[0]) * (1.0 - colorEncoded[3]);\r\n      var green = (1.0 - colorEncoded[1]) * (1.0 - colorEncoded[3]);\r\n      var blue = (1.0 - colorEncoded[2]) * (1.0 - colorEncoded[3]);\r\n\r\n      colorEncoded = [red, green, blue, \"r\"];\r\n    }\r\n    var colorAsRGB = \"#\";\r\n    for (var i = 0; i < 3; i++) {\r\n      colorAsRGB += (\r\n        \"0\" + Math.floor(parseFloat(colorEncoded[i]) * 255).toString(16)\r\n      ).slice(-2);\r\n    }\r\n    return colorAsRGB;\r\n  });\r\n\r\n  var encodeColorString = (API.__private__.encodeColorString = function(\r\n    options\r\n  ) {\r\n    var color;\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        ch1: options\r\n      };\r\n    }\r\n    var ch1 = options.ch1;\r\n    var ch2 = options.ch2;\r\n    var ch3 = options.ch3;\r\n    var ch4 = options.ch4;\r\n    var letterArray =\r\n      options.pdfColorType === \"draw\" ? [\"G\", \"RG\", \"K\"] : [\"g\", \"rg\", \"k\"];\r\n\r\n    if (typeof ch1 === \"string\" && ch1.charAt(0) !== \"#\") {\r\n      var rgbColor = new RGBColor(ch1);\r\n      if (rgbColor.ok) {\r\n        ch1 = rgbColor.toHex();\r\n      } else if (!/^\\d*\\.?\\d*$/.test(ch1)) {\r\n        throw new Error(\r\n          'Invalid color \"' + ch1 + '\" passed to jsPDF.encodeColorString.'\r\n        );\r\n      }\r\n    }\r\n    //convert short rgb to long form\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{3}$/.test(ch1)) {\r\n      ch1 = \"#\" + ch1[1] + ch1[1] + ch1[2] + ch1[2] + ch1[3] + ch1[3];\r\n    }\r\n\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{6}$/.test(ch1)) {\r\n      var hex = parseInt(ch1.substr(1), 16);\r\n      ch1 = (hex >> 16) & 255;\r\n      ch2 = (hex >> 8) & 255;\r\n      ch3 = hex & 255;\r\n    }\r\n\r\n    if (\r\n      typeof ch2 === \"undefined\" ||\r\n      (typeof ch4 === \"undefined\" && ch1 === ch2 && ch2 === ch3)\r\n    ) {\r\n      // Gray color space.\r\n      if (typeof ch1 === \"string\") {\r\n        color = ch1 + \" \" + letterArray[0];\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = f2(ch1 / 255) + \" \" + letterArray[0];\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = f3(ch1 / 255) + \" \" + letterArray[0];\r\n        }\r\n      }\r\n    } else if (typeof ch4 === \"undefined\" || typeof ch4 === \"object\") {\r\n      // assume RGBA\r\n      if (ch4 && !isNaN(ch4.a)) {\r\n        //TODO Implement transparency.\r\n        //WORKAROUND use white for now, if transparent, otherwise handle as rgb\r\n        if (ch4.a === 0) {\r\n          color = [\"1.\", \"1.\", \"1.\", letterArray[1]].join(\" \");\r\n          return color;\r\n        }\r\n      }\r\n      // assume RGB\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, letterArray[1]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [\r\n              f2(ch1 / 255),\r\n              f2(ch2 / 255),\r\n              f2(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n            break;\r\n          default:\r\n          case 3:\r\n            color = [\r\n              f3(ch1 / 255),\r\n              f3(ch2 / 255),\r\n              f3(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n        }\r\n      }\r\n    } else {\r\n      // assume CMYK\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, ch4, letterArray[2]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = [f3(ch1), f3(ch2), f3(ch3), f3(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n        }\r\n      }\r\n    }\r\n    return color;\r\n  });\r\n\r\n  var getFilters = (API.__private__.getFilters = function() {\r\n    return filters;\r\n  });\r\n\r\n  var putStream = (API.__private__.putStream = function(options) {\r\n    options = options || {};\r\n    var data = options.data || \"\";\r\n    var filters = options.filters || getFilters();\r\n    var alreadyAppliedFilters = options.alreadyAppliedFilters || [];\r\n    var addLength1 = options.addLength1 || false;\r\n    var valueOfLength1 = data.length;\r\n    var objectId = options.objectId;\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null && typeof objectId == \"undefined\") {\r\n      throw new Error(\r\n        \"ObjectId must be passed to putStream for file encryption\"\r\n      );\r\n    }\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n\r\n    var processedData = {};\r\n    if (filters === true) {\r\n      filters = [\"FlateEncode\"];\r\n    }\r\n    var keyValues = options.additionalKeyValues || [];\r\n    if (typeof jsPDF.API.processDataByFilters !== \"undefined\") {\r\n      processedData = jsPDF.API.processDataByFilters(data, filters);\r\n    } else {\r\n      processedData = { data: data, reverseChain: [] };\r\n    }\r\n    var filterAsString =\r\n      processedData.reverseChain +\r\n      (Array.isArray(alreadyAppliedFilters)\r\n        ? alreadyAppliedFilters.join(\" \")\r\n        : alreadyAppliedFilters.toString());\r\n\r\n    if (processedData.data.length !== 0) {\r\n      keyValues.push({\r\n        key: \"Length\",\r\n        value: processedData.data.length\r\n      });\r\n      if (addLength1 === true) {\r\n        keyValues.push({\r\n          key: \"Length1\",\r\n          value: valueOfLength1\r\n        });\r\n      }\r\n    }\r\n\r\n    if (filterAsString.length != 0) {\r\n      if (filterAsString.split(\"/\").length - 1 === 1) {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: filterAsString\r\n        });\r\n      } else {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: \"[\" + filterAsString + \"]\"\r\n        });\r\n\r\n        for (var j = 0; j < keyValues.length; j += 1) {\r\n          if (keyValues[j].key === \"DecodeParms\") {\r\n            var decodeParmsArray = [];\r\n\r\n            for (\r\n              var i = 0;\r\n              i < processedData.reverseChain.split(\"/\").length - 1;\r\n              i += 1\r\n            ) {\r\n              decodeParmsArray.push(\"null\");\r\n            }\r\n\r\n            decodeParmsArray.push(keyValues[j].value);\r\n            keyValues[j].value = \"[\" + decodeParmsArray.join(\" \") + \"]\";\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    out(\"<<\");\r\n    for (var k = 0; k < keyValues.length; k++) {\r\n      out(\"/\" + keyValues[k].key + \" \" + keyValues[k].value);\r\n    }\r\n    out(\">>\");\r\n    if (processedData.data.length !== 0) {\r\n      out(\"stream\");\r\n      out(encryptor(processedData.data));\r\n      out(\"endstream\");\r\n    }\r\n  });\r\n\r\n  var putPage = (API.__private__.putPage = function(page) {\r\n    var pageNumber = page.number;\r\n    var data = page.data;\r\n    var pageObjectNumber = page.objId;\r\n    var pageContentsObjId = page.contentsObjId;\r\n\r\n    newObjectDeferredBegin(pageObjectNumber, true);\r\n    out(\"<</Type /Page\");\r\n    out(\"/Parent \" + page.rootDictionaryObjId + \" 0 R\");\r\n    out(\"/Resources \" + page.resourceDictionaryObjId + \" 0 R\");\r\n    out(\r\n      \"/MediaBox [\" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftX)) +\r\n        \" \" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftY)) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightX) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightY) +\r\n        \"]\"\r\n    );\r\n    if (page.cropBox !== null) {\r\n      out(\r\n        \"/CropBox [\" +\r\n          hpf(page.cropBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.cropBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.bleedBox !== null) {\r\n      out(\r\n        \"/BleedBox [\" +\r\n          hpf(page.bleedBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.trimBox !== null) {\r\n      out(\r\n        \"/TrimBox [\" +\r\n          hpf(page.trimBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.trimBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.artBox !== null) {\r\n      out(\r\n        \"/ArtBox [\" +\r\n          hpf(page.artBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.artBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (typeof page.userUnit === \"number\" && page.userUnit !== 1.0) {\r\n      out(\"/UserUnit \" + page.userUnit);\r\n    }\r\n\r\n    events.publish(\"putPage\", {\r\n      objId: pageObjectNumber,\r\n      pageContext: pagesContext[pageNumber],\r\n      pageNumber: pageNumber,\r\n      page: data\r\n    });\r\n    out(\"/Contents \" + pageContentsObjId + \" 0 R\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    // Page content\r\n    var pageContent = data.join(\"\\n\");\r\n\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      // if the user forgot to switch back to COMPAT mode, we must balance the graphics stack again\r\n      pageContent += \"\\nQ\";\r\n    }\r\n\r\n    newObjectDeferredBegin(pageContentsObjId, true);\r\n    putStream({\r\n      data: pageContent,\r\n      filters: getFilters(),\r\n      objectId: pageContentsObjId\r\n    });\r\n    out(\"endobj\");\r\n    return pageObjectNumber;\r\n  });\r\n\r\n  var putPages = (API.__private__.putPages = function() {\r\n    var n,\r\n      i,\r\n      pageObjectNumbers = [];\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pagesContext[n].objId = newObjectDeferred();\r\n      pagesContext[n].contentsObjId = newObjectDeferred();\r\n    }\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pageObjectNumbers.push(\r\n        putPage({\r\n          number: n,\r\n          data: pages[n],\r\n          objId: pagesContext[n].objId,\r\n          contentsObjId: pagesContext[n].contentsObjId,\r\n          mediaBox: pagesContext[n].mediaBox,\r\n          cropBox: pagesContext[n].cropBox,\r\n          bleedBox: pagesContext[n].bleedBox,\r\n          trimBox: pagesContext[n].trimBox,\r\n          artBox: pagesContext[n].artBox,\r\n          userUnit: pagesContext[n].userUnit,\r\n          rootDictionaryObjId: rootDictionaryObjId,\r\n          resourceDictionaryObjId: resourceDictionaryObjId\r\n        })\r\n      );\r\n    }\r\n    newObjectDeferredBegin(rootDictionaryObjId, true);\r\n    out(\"<</Type /Pages\");\r\n    var kids = \"/Kids [\";\r\n    for (i = 0; i < page; i++) {\r\n      kids += pageObjectNumbers[i] + \" 0 R \";\r\n    }\r\n    out(kids + \"]\");\r\n    out(\"/Count \" + page);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    events.publish(\"postPutPages\");\r\n  });\r\n\r\n  var putFont = function(font) {\r\n    events.publish(\"putFont\", {\r\n      font: font,\r\n      out: out,\r\n      newObject: newObject,\r\n      putStream: putStream\r\n    });\r\n\r\n    if (font.isAlreadyPutted !== true) {\r\n      font.objectNumber = newObject();\r\n      out(\"<<\");\r\n      out(\"/Type /Font\");\r\n      out(\"/BaseFont /\" + toPDFName(font.postScriptName));\r\n      out(\"/Subtype /Type1\");\r\n      if (typeof font.encoding === \"string\") {\r\n        out(\"/Encoding /\" + font.encoding);\r\n      }\r\n      out(\"/FirstChar 32\");\r\n      out(\"/LastChar 255\");\r\n      out(\">>\");\r\n      out(\"endobj\");\r\n    }\r\n  };\r\n\r\n  var putFonts = function() {\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          putFont(fonts[fontKey]);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXObject = function(xObject) {\r\n    xObject.objectNumber = newObject();\r\n\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/XObject\" });\r\n    options.push({ key: \"Subtype\", value: \"/Form\" });\r\n    options.push({\r\n      key: \"BBox\",\r\n      value:\r\n        \"[\" +\r\n        [\r\n          hpf(xObject.x),\r\n          hpf(xObject.y),\r\n          hpf(xObject.x + xObject.width),\r\n          hpf(xObject.y + xObject.height)\r\n        ].join(\" \") +\r\n        \"]\"\r\n    });\r\n    options.push({\r\n      key: \"Matrix\",\r\n      value: \"[\" + xObject.matrix.toString() + \"]\"\r\n    });\r\n    // TODO: /Resources\r\n\r\n    var stream = xObject.pages[1].join(\"\\n\");\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      objectId: xObject.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putXObjects = function() {\r\n    for (var xObjectKey in renderTargets) {\r\n      if (renderTargets.hasOwnProperty(xObjectKey)) {\r\n        putXObject(renderTargets[xObjectKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var interpolateAndEncodeRGBStream = function(colors, numberSamples) {\r\n    var tValues = [];\r\n    var t;\r\n    var dT = 1.0 / (numberSamples - 1);\r\n    for (t = 0.0; t < 1.0; t += dT) {\r\n      tValues.push(t);\r\n    }\r\n    tValues.push(1.0);\r\n    // add first and last control point if not present\r\n    if (colors[0].offset != 0.0) {\r\n      var c0 = {\r\n        offset: 0.0,\r\n        color: colors[0].color\r\n      };\r\n      colors.unshift(c0);\r\n    }\r\n    if (colors[colors.length - 1].offset != 1.0) {\r\n      var c1 = {\r\n        offset: 1.0,\r\n        color: colors[colors.length - 1].color\r\n      };\r\n      colors.push(c1);\r\n    }\r\n    var out = \"\";\r\n    var index = 0;\r\n\r\n    for (var i = 0; i < tValues.length; i++) {\r\n      t = tValues[i];\r\n      while (t > colors[index + 1].offset) index++;\r\n      var a = colors[index].offset;\r\n      var b = colors[index + 1].offset;\r\n      var d = (t - a) / (b - a);\r\n\r\n      var aColor = colors[index].color;\r\n      var bColor = colors[index + 1].color;\r\n\r\n      out +=\r\n        padd2Hex(Math.round((1 - d) * aColor[0] + d * bColor[0]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[1] + d * bColor[1]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[2] + d * bColor[2]).toString(16));\r\n    }\r\n    return out.trim();\r\n  };\r\n\r\n  var putShadingPattern = function(pattern, numberSamples) {\r\n    /*\r\n       Axial patterns shade between the two points specified in coords, radial patterns between the inner\r\n       and outer circle.\r\n       The user can specify an array (colors) that maps t-Values in [0, 1] to RGB colors. These are now\r\n       interpolated to equidistant samples and written to pdf as a sample (type 0) function.\r\n       */\r\n    // The number of color samples that should be used to describe the shading.\r\n    // The higher, the more accurate the gradient will be.\r\n    numberSamples || (numberSamples = 21);\r\n    var funcObjectNumber = newObject();\r\n    var stream = interpolateAndEncodeRGBStream(pattern.colors, numberSamples);\r\n\r\n    var options = [];\r\n    options.push({ key: \"FunctionType\", value: \"0\" });\r\n    options.push({ key: \"Domain\", value: \"[0.0 1.0]\" });\r\n    options.push({ key: \"Size\", value: \"[\" + numberSamples + \"]\" });\r\n    options.push({ key: \"BitsPerSample\", value: \"8\" });\r\n    options.push({ key: \"Range\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n    options.push({ key: \"Decode\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      alreadyAppliedFilters: [\"/ASCIIHexDecode\"],\r\n      objectId: funcObjectNumber\r\n    });\r\n    out(\"endobj\");\r\n\r\n    pattern.objectNumber = newObject();\r\n    out(\"<< /ShadingType \" + pattern.type);\r\n    out(\"/ColorSpace /DeviceRGB\");\r\n    var coords =\r\n      \"/Coords [\" +\r\n      hpf(parseFloat(pattern.coords[0])) +\r\n      \" \" + // x1\r\n      hpf(parseFloat(pattern.coords[1])) +\r\n      \" \"; // y1\r\n    if (pattern.type === 2) {\r\n      // axial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[3])); // y2\r\n    } else {\r\n      // radial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // r1\r\n        hpf(parseFloat(pattern.coords[3])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[4])) +\r\n        \" \" + // y2\r\n        hpf(parseFloat(pattern.coords[5])); // r2\r\n    }\r\n    coords += \"]\";\r\n    out(coords);\r\n\r\n    if (pattern.matrix) {\r\n      out(\"/Matrix [\" + pattern.matrix.toString() + \"]\");\r\n    }\r\n    out(\"/Function \" + funcObjectNumber + \" 0 R\");\r\n    out(\"/Extend [true true]\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putTilingPattern = function(pattern, deferredResourceDictionaryIds) {\r\n    var resourcesObjectId = newObjectDeferred();\r\n    var patternObjectId = newObject();\r\n\r\n    deferredResourceDictionaryIds.push({\r\n      resourcesOid: resourcesObjectId,\r\n      objectOid: patternObjectId\r\n    });\r\n\r\n    pattern.objectNumber = patternObjectId;\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/Pattern\" });\r\n    options.push({ key: \"PatternType\", value: \"1\" }); // tiling pattern\r\n    options.push({ key: \"PaintType\", value: \"1\" }); // colored tiling pattern\r\n    options.push({ key: \"TilingType\", value: \"1\" }); // constant spacing\r\n    options.push({\r\n      key: \"BBox\",\r\n      value: \"[\" + pattern.boundingBox.map(hpf).join(\" \") + \"]\"\r\n    });\r\n    options.push({ key: \"XStep\", value: hpf(pattern.xStep) });\r\n    options.push({ key: \"YStep\", value: hpf(pattern.yStep) });\r\n    options.push({ key: \"Resources\", value: resourcesObjectId + \" 0 R\" });\r\n    if (pattern.matrix) {\r\n      options.push({\r\n        key: \"Matrix\",\r\n        value: \"[\" + pattern.matrix.toString() + \"]\"\r\n      });\r\n    }\r\n\r\n    putStream({\r\n      data: pattern.stream,\r\n      additionalKeyValues: options,\r\n      objectId: pattern.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putPatterns = function(deferredResourceDictionaryIds) {\r\n    var patternKey;\r\n    for (patternKey in patterns) {\r\n      if (patterns.hasOwnProperty(patternKey)) {\r\n        if (patterns[patternKey] instanceof ShadingPattern) {\r\n          putShadingPattern(patterns[patternKey]);\r\n        } else if (patterns[patternKey] instanceof TilingPattern) {\r\n          putTilingPattern(patterns[patternKey], deferredResourceDictionaryIds);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putGState = function(gState) {\r\n    gState.objectNumber = newObject();\r\n    out(\"<<\");\r\n    for (var p in gState) {\r\n      switch (p) {\r\n        case \"opacity\":\r\n          out(\"/ca \" + f2(gState[p]));\r\n          break;\r\n        case \"stroke-opacity\":\r\n          out(\"/CA \" + f2(gState[p]));\r\n          break;\r\n      }\r\n    }\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putGStates = function() {\r\n    var gStateKey;\r\n    for (gStateKey in gStates) {\r\n      if (gStates.hasOwnProperty(gStateKey)) {\r\n        putGState(gStates[gStateKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXobjectDict = function() {\r\n    out(\"/XObject <<\");\r\n    for (var xObjectKey in renderTargets) {\r\n      if (\r\n        renderTargets.hasOwnProperty(xObjectKey) &&\r\n        renderTargets[xObjectKey].objectNumber >= 0\r\n      ) {\r\n        out(\r\n          \"/\" +\r\n            xObjectKey +\r\n            \" \" +\r\n            renderTargets[xObjectKey].objectNumber +\r\n            \" 0 R\"\r\n        );\r\n      }\r\n    }\r\n\r\n    // Loop through images, or other data objects\r\n    events.publish(\"putXobjectDict\");\r\n    out(\">>\");\r\n  };\r\n\r\n  var putEncryptionDict = function() {\r\n    encryption.oid = newObject();\r\n    out(\"<<\");\r\n    out(\"/Filter /Standard\");\r\n    out(\"/V \" + encryption.v);\r\n    out(\"/R \" + encryption.r);\r\n    out(\"/U <\" + encryption.toHexString(encryption.U) + \">\");\r\n    out(\"/O <\" + encryption.toHexString(encryption.O) + \">\");\r\n    out(\"/P \" + encryption.P);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putFontDict = function() {\r\n    out(\"/Font <<\");\r\n\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          out(\"/\" + fontKey + \" \" + fonts[fontKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n    }\r\n    out(\">>\");\r\n  };\r\n\r\n  var putShadingPatternDict = function() {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Shading <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof ShadingPattern &&\r\n          patterns[patternKey].objectNumber >= 0\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n\r\n      events.publish(\"putShadingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putTilingPatternDict = function(objectOid) {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Pattern <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof API.TilingPattern &&\r\n          patterns[patternKey].objectNumber >= 0 &&\r\n          patterns[patternKey].objectNumber < objectOid // prevent cyclic dependencies\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n      events.publish(\"putTilingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putGStatesDict = function() {\r\n    if (Object.keys(gStates).length > 0) {\r\n      var gStateKey;\r\n      out(\"/ExtGState <<\");\r\n      for (gStateKey in gStates) {\r\n        if (\r\n          gStates.hasOwnProperty(gStateKey) &&\r\n          gStates[gStateKey].objectNumber >= 0\r\n        ) {\r\n          out(\"/\" + gStateKey + \" \" + gStates[gStateKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n\r\n      events.publish(\"putGStateDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putResourceDictionary = function(objectIds) {\r\n    newObjectDeferredBegin(objectIds.resourcesOid, true);\r\n    out(\"<<\");\r\n    out(\"/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\");\r\n    putFontDict();\r\n    putShadingPatternDict();\r\n    putTilingPatternDict(objectIds.objectOid);\r\n    putGStatesDict();\r\n    putXobjectDict();\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putResources = function() {\r\n    // FormObjects, Patterns etc. might use other FormObjects/Patterns/Images\r\n    // which means their resource dictionaries must contain the already resolved\r\n    // object ids. For this reason we defer the serialization of the resource\r\n    // dicts until all objects have been serialized and have object ids.\r\n    //\r\n    // In order to prevent cyclic dependencies (which Adobe Reader doesn't like),\r\n    // we only put all oids that are smaller than the oid of the object the\r\n    // resource dict belongs to. This is correct behavior, since the streams\r\n    // may only use other objects that have already been defined and thus appear\r\n    // earlier in their respective collection.\r\n    // Currently, this only affects tiling patterns, but a (more) correct\r\n    // implementation of FormObjects would also define their own resource dicts.\r\n    var deferredResourceDictionaryIds = [];\r\n\r\n    putFonts();\r\n    putGStates();\r\n    putXObjects();\r\n    putPatterns(deferredResourceDictionaryIds);\r\n\r\n    events.publish(\"putResources\");\r\n    deferredResourceDictionaryIds.forEach(putResourceDictionary);\r\n    putResourceDictionary({\r\n      resourcesOid: resourceDictionaryObjId,\r\n      objectOid: Number.MAX_SAFE_INTEGER // output all objects\r\n    });\r\n    events.publish(\"postPutResources\");\r\n  };\r\n\r\n  var putAdditionalObjects = function() {\r\n    events.publish(\"putAdditionalObjects\");\r\n    for (var i = 0; i < additionalObjects.length; i++) {\r\n      var obj = additionalObjects[i];\r\n      newObjectDeferredBegin(obj.objId, true);\r\n      out(obj.content);\r\n      out(\"endobj\");\r\n    }\r\n    events.publish(\"postPutAdditionalObjects\");\r\n  };\r\n\r\n  var addFontToFontDictionary = function(font) {\r\n    fontmap[font.fontName] = fontmap[font.fontName] || {};\r\n    fontmap[font.fontName][font.fontStyle] = font.id;\r\n  };\r\n\r\n  var addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    encoding,\r\n    isStandardFont\r\n  ) {\r\n    var font = {\r\n      id: \"F\" + (Object.keys(fonts).length + 1).toString(10),\r\n      postScriptName: postScriptName,\r\n      fontName: fontName,\r\n      fontStyle: fontStyle,\r\n      encoding: encoding,\r\n      isStandardFont: isStandardFont || false,\r\n      metadata: {}\r\n    };\r\n\r\n    events.publish(\"addFont\", {\r\n      font: font,\r\n      instance: this\r\n    });\r\n\r\n    fonts[font.id] = font;\r\n    addFontToFontDictionary(font);\r\n    return font.id;\r\n  };\r\n\r\n  var addFonts = function(arrayOfFonts) {\r\n    for (var i = 0, l = standardFonts.length; i < l; i++) {\r\n      var fontKey = addFont.call(\r\n        this,\r\n        arrayOfFonts[i][0],\r\n        arrayOfFonts[i][1],\r\n        arrayOfFonts[i][2],\r\n        standardFonts[i][3],\r\n        true\r\n      );\r\n\r\n      if (putOnlyUsedFonts === false) {\r\n        usedFonts[fontKey] = true;\r\n      }\r\n      // adding aliases for standard fonts, this time matching the capitalization\r\n      var parts = arrayOfFonts[i][0].split(\"-\");\r\n      addFontToFontDictionary({\r\n        id: fontKey,\r\n        fontName: parts[0],\r\n        fontStyle: parts[1] || \"\"\r\n      });\r\n    }\r\n    events.publish(\"addFonts\", {\r\n      fonts: fonts,\r\n      dictionary: fontmap\r\n    });\r\n  };\r\n\r\n  var SAFE = function __safeCall(fn) {\r\n    fn.foo = function __safeCallWrapper() {\r\n      try {\r\n        return fn.apply(this, arguments);\r\n      } catch (e) {\r\n        var stack = e.stack || \"\";\r\n        if (~stack.indexOf(\" at \")) stack = stack.split(\" at \")[1];\r\n        var m =\r\n          \"Error in function \" +\r\n          stack.split(\"\\n\")[0].split(\"<\")[0] +\r\n          \": \" +\r\n          e.message;\r\n        if (globalObject.console) {\r\n          globalObject.console.error(m, e);\r\n          if (globalObject.alert) alert(m);\r\n        } else {\r\n          throw new Error(m);\r\n        }\r\n      }\r\n    };\r\n    fn.foo.bar = fn;\r\n    return fn.foo;\r\n  };\r\n\r\n  var to8bitStream = function(text, flags) {\r\n    /**\r\n     * PDF 1.3 spec:\r\n     * \"For text strings encoded in Unicode, the first two bytes must be 254 followed by\r\n     * 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts\r\n     * with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely\r\n     * to be a meaningful beginning of a word or phrase.) The remainder of the\r\n     * string consists of Unicode character codes, according to the UTF-16 encoding\r\n     * specified in the Unicode standard, version 2.0. Commonly used Unicode values\r\n     * are represented as 2 bytes per character, with the high-order byte appearing first\r\n     * in the string.\"\r\n     *\r\n     * In other words, if there are chars in a string with char code above 255, we\r\n     * recode the string to UCS2 BE - string doubles in length and BOM is prepended.\r\n     *\r\n     * HOWEVER!\r\n     * Actual *content* (body) text (as opposed to strings used in document properties etc)\r\n     * does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)\r\n     *\r\n     * Because of Adobe's focus on \"you subset your fonts!\" you are not supposed to have\r\n     * a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could\r\n     * fudge it with \"Identity-H\" encoding and custom CIDtoGID map that mimics Unicode\r\n     * code page. There, however, all characters in the stream are treated as GIDs,\r\n     * including BOM, which is the reason we need to skip BOM in content text (i.e. that\r\n     * that is tied to a font).\r\n     *\r\n     * To signal this \"special\" PDFEscape / to8bitStream handling mode,\r\n     * API.text() function sets (unless you overwrite it with manual values\r\n     * given to API.text(.., flags) )\r\n     * flags.autoencode = true\r\n     * flags.noBOM = true\r\n     *\r\n     * ===================================================================================\r\n     * `flags` properties relied upon:\r\n     *   .sourceEncoding = string with encoding label.\r\n     *                     \"Unicode\" by default. = encoding of the incoming text.\r\n     *                     pass some non-existing encoding name\r\n     *                     (ex: 'Do not touch my strings! I know what I am doing.')\r\n     *                     to make encoding code skip the encoding step.\r\n     *   .outputEncoding = Either valid PDF encoding name\r\n     *                     (must be supported by jsPDF font metrics, otherwise no encoding)\r\n     *                     or a JS object, where key = sourceCharCode, value = outputCharCode\r\n     *                     missing keys will be treated as: sourceCharCode === outputCharCode\r\n     *   .noBOM\r\n     *       See comment higher above for explanation for why this is important\r\n     *   .autoencode\r\n     *       See comment higher above for explanation for why this is important\r\n     */\r\n\r\n    var i,\r\n      l,\r\n      sourceEncoding,\r\n      encodingBlock,\r\n      outputEncoding,\r\n      newtext,\r\n      isUnicode,\r\n      ch,\r\n      bch;\r\n\r\n    flags = flags || {};\r\n    sourceEncoding = flags.sourceEncoding || \"Unicode\";\r\n    outputEncoding = flags.outputEncoding;\r\n\r\n    // This 'encoding' section relies on font metrics format\r\n    // attached to font objects by, among others,\r\n    // \"Willow Systems' standard_font_metrics plugin\"\r\n    // see jspdf.plugin.standard_font_metrics.js for format\r\n    // of the font.metadata.encoding Object.\r\n    // It should be something like\r\n    //   .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}\r\n    //   .widths = {0:width, code:width, ..., 'fof':divisor}\r\n    //   .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}\r\n    if (\r\n      (flags.autoencode || outputEncoding) &&\r\n      fonts[activeFontKey].metadata &&\r\n      fonts[activeFontKey].metadata[sourceEncoding] &&\r\n      fonts[activeFontKey].metadata[sourceEncoding].encoding\r\n    ) {\r\n      encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding;\r\n\r\n      // each font has default encoding. Some have it clearly defined.\r\n      if (!outputEncoding && fonts[activeFontKey].encoding) {\r\n        outputEncoding = fonts[activeFontKey].encoding;\r\n      }\r\n\r\n      // Hmmm, the above did not work? Let's try again, in different place.\r\n      if (!outputEncoding && encodingBlock.codePages) {\r\n        outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default\r\n      }\r\n\r\n      if (typeof outputEncoding === \"string\") {\r\n        outputEncoding = encodingBlock[outputEncoding];\r\n      }\r\n      // we want output encoding to be a JS Object, where\r\n      // key = sourceEncoding's character code and\r\n      // value = outputEncoding's character code.\r\n      if (outputEncoding) {\r\n        isUnicode = false;\r\n        newtext = [];\r\n        for (i = 0, l = text.length; i < l; i++) {\r\n          ch = outputEncoding[text.charCodeAt(i)];\r\n          if (ch) {\r\n            newtext.push(String.fromCharCode(ch));\r\n          } else {\r\n            newtext.push(text[i]);\r\n          }\r\n\r\n          // since we are looping over chars anyway, might as well\r\n          // check for residual unicodeness\r\n          if (newtext[i].charCodeAt(0) >> 8) {\r\n            /* more than 255 */\r\n            isUnicode = true;\r\n          }\r\n        }\r\n        text = newtext.join(\"\");\r\n      }\r\n    }\r\n\r\n    i = text.length;\r\n    // isUnicode may be set to false above. Hence the triple-equal to undefined\r\n    while (isUnicode === undefined && i !== 0) {\r\n      if (text.charCodeAt(i - 1) >> 8) {\r\n        /* more than 255 */\r\n        isUnicode = true;\r\n      }\r\n      i--;\r\n    }\r\n    if (!isUnicode) {\r\n      return text;\r\n    }\r\n\r\n    newtext = flags.noBOM ? [] : [254, 255];\r\n    for (i = 0, l = text.length; i < l; i++) {\r\n      ch = text.charCodeAt(i);\r\n      bch = ch >> 8; // divide by 256\r\n      if (bch >> 8) {\r\n        /* something left after dividing by 256 second time */\r\n        throw new Error(\r\n          \"Character at position \" +\r\n            i +\r\n            \" of string '\" +\r\n            text +\r\n            \"' exceeds 16bits. Cannot be encoded into UCS-2 BE\"\r\n        );\r\n      }\r\n      newtext.push(bch);\r\n      newtext.push(ch - (bch << 8));\r\n    }\r\n    return String.fromCharCode.apply(undefined, newtext);\r\n  };\r\n\r\n  var pdfEscape = (API.__private__.pdfEscape = API.pdfEscape = function(\r\n    text,\r\n    flags\r\n  ) {\r\n    /**\r\n     * Replace '/', '(', and ')' with pdf-safe versions\r\n     *\r\n     * Doing to8bitStream does NOT make this PDF display unicode text. For that\r\n     * we also need to reference a unicode font and embed it - royal pain in the rear.\r\n     *\r\n     * There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,\r\n     * which JavaScript Strings are happy to provide. So, while we still cannot display\r\n     * 2-byte characters property, at least CONDITIONALLY converting (entire string containing)\r\n     * 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF\r\n     * is still parseable.\r\n     * This will allow immediate support for unicode in document properties strings.\r\n     */\r\n    return to8bitStream(text, flags)\r\n      .replace(/\\\\/g, \"\\\\\\\\\")\r\n      .replace(/\\(/g, \"\\\\(\")\r\n      .replace(/\\)/g, \"\\\\)\");\r\n  });\r\n\r\n  var beginPage = (API.__private__.beginPage = function(format) {\r\n    pages[++page] = [];\r\n    pagesContext[page] = {\r\n      objId: 0,\r\n      contentsObjId: 0,\r\n      userUnit: Number(userUnit),\r\n      artBox: null,\r\n      bleedBox: null,\r\n      cropBox: null,\r\n      trimBox: null,\r\n      mediaBox: {\r\n        bottomLeftX: 0,\r\n        bottomLeftY: 0,\r\n        topRightX: Number(format[0]),\r\n        topRightY: Number(format[1])\r\n      }\r\n    };\r\n    _setPage(page);\r\n    setOutputDestination(pages[currentPage]);\r\n  });\r\n\r\n  var _addPage = function(parmFormat, parmOrientation) {\r\n    var dimensions, width, height;\r\n\r\n    orientation = parmOrientation || orientation;\r\n\r\n    if (typeof parmFormat === \"string\") {\r\n      dimensions = getPageFormat(parmFormat.toLowerCase());\r\n      if (Array.isArray(dimensions)) {\r\n        width = dimensions[0];\r\n        height = dimensions[1];\r\n      }\r\n    }\r\n\r\n    if (Array.isArray(parmFormat)) {\r\n      width = parmFormat[0] * scaleFactor;\r\n      height = parmFormat[1] * scaleFactor;\r\n    }\r\n\r\n    if (isNaN(width)) {\r\n      width = format[0];\r\n      height = format[1];\r\n    }\r\n\r\n    if (width > 14400 || height > 14400) {\r\n      console.warn(\r\n        \"A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400\"\r\n      );\r\n      width = Math.min(14400, width);\r\n      height = Math.min(14400, height);\r\n    }\r\n\r\n    format = [width, height];\r\n\r\n    switch (orientation.substr(0, 1)) {\r\n      case \"l\":\r\n        if (height > width) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n      case \"p\":\r\n        if (width > height) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n    }\r\n\r\n    beginPage(format);\r\n\r\n    // Set line width\r\n    setLineWidth(lineWidth);\r\n    // Set draw color\r\n    out(strokeColor);\r\n    // resurrecting non-default line caps, joins\r\n    if (lineCapID !== 0) {\r\n      out(lineCapID + \" J\");\r\n    }\r\n    if (lineJoinID !== 0) {\r\n      out(lineJoinID + \" j\");\r\n    }\r\n    events.publish(\"addPage\", {\r\n      pageNumber: page\r\n    });\r\n  };\r\n\r\n  var _deletePage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      pages.splice(n, 1);\r\n      pagesContext.splice(n, 1);\r\n      page--;\r\n      if (currentPage > page) {\r\n        currentPage = page;\r\n      }\r\n      this.setPage(currentPage);\r\n    }\r\n  };\r\n\r\n  var _setPage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      currentPage = n;\r\n    }\r\n  };\r\n\r\n  var getNumberOfPages = (API.__private__.getNumberOfPages = API.getNumberOfPages = function() {\r\n    return pages.length - 1;\r\n  });\r\n\r\n  /**\r\n   * Returns a document-specific font key - a label assigned to a\r\n   * font name + font type combination at the time the font was added\r\n   * to the font inventory.\r\n   *\r\n   * Font key is used as label for the desired font for a block of text\r\n   * to be added to the PDF document stream.\r\n   * @private\r\n   * @function\r\n   * @param fontName {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @param fontStyle {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @returns {string} Font key.\r\n   * @ignore\r\n   */\r\n  var getFont = function(fontName, fontStyle, options) {\r\n    var key = undefined,\r\n      fontNameLowerCase;\r\n    options = options || {};\r\n\r\n    fontName =\r\n      fontName !== undefined ? fontName : fonts[activeFontKey].fontName;\r\n    fontStyle =\r\n      fontStyle !== undefined ? fontStyle : fonts[activeFontKey].fontStyle;\r\n    fontNameLowerCase = fontName.toLowerCase();\r\n\r\n    if (\r\n      fontmap[fontNameLowerCase] !== undefined &&\r\n      fontmap[fontNameLowerCase][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontNameLowerCase][fontStyle];\r\n    } else if (\r\n      fontmap[fontName] !== undefined &&\r\n      fontmap[fontName][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontName][fontStyle];\r\n    } else {\r\n      if (options.disableWarning === false) {\r\n        console.warn(\r\n          \"Unable to look up font label for font '\" +\r\n            fontName +\r\n            \"', '\" +\r\n            fontStyle +\r\n            \"'. Refer to getFontList() for available fonts.\"\r\n        );\r\n      }\r\n    }\r\n\r\n    if (!key && !options.noFallback) {\r\n      key = fontmap[\"times\"][fontStyle];\r\n      if (key == null) {\r\n        key = fontmap[\"times\"][\"normal\"];\r\n      }\r\n    }\r\n    return key;\r\n  };\r\n\r\n  var putInfo = (API.__private__.putInfo = function() {\r\n    var objectId = newObject();\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n    out(\"<<\");\r\n    out(\"/Producer (\" + pdfEscape(encryptor(\"jsPDF \" + jsPDF.version)) + \")\");\r\n    for (var key in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(key) && documentProperties[key]) {\r\n        out(\r\n          \"/\" +\r\n            key.substr(0, 1).toUpperCase() +\r\n            key.substr(1) +\r\n            \" (\" +\r\n            pdfEscape(encryptor(documentProperties[key])) +\r\n            \")\"\r\n        );\r\n      }\r\n    }\r\n    out(\"/CreationDate (\" + pdfEscape(encryptor(creationDate)) + \")\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putCatalog = (API.__private__.putCatalog = function(options) {\r\n    options = options || {};\r\n    var tmpRootDictionaryObjId =\r\n      options.rootDictionaryObjId || rootDictionaryObjId;\r\n    newObject();\r\n    out(\"<<\");\r\n    out(\"/Type /Catalog\");\r\n    out(\"/Pages \" + tmpRootDictionaryObjId + \" 0 R\");\r\n    // PDF13ref Section 7.2.1\r\n    if (!zoomMode) zoomMode = \"fullwidth\";\r\n    switch (zoomMode) {\r\n      case \"fullwidth\":\r\n        out(\"/OpenAction [3 0 R /FitH null]\");\r\n        break;\r\n      case \"fullheight\":\r\n        out(\"/OpenAction [3 0 R /FitV null]\");\r\n        break;\r\n      case \"fullpage\":\r\n        out(\"/OpenAction [3 0 R /Fit]\");\r\n        break;\r\n      case \"original\":\r\n        out(\"/OpenAction [3 0 R /XYZ null null 1]\");\r\n        break;\r\n      default:\r\n        var pcn = \"\" + zoomMode;\r\n        if (pcn.substr(pcn.length - 1) === \"%\")\r\n          zoomMode = parseInt(zoomMode) / 100;\r\n        if (typeof zoomMode === \"number\") {\r\n          out(\"/OpenAction [3 0 R /XYZ null null \" + f2(zoomMode) + \"]\");\r\n        }\r\n    }\r\n    if (!layoutMode) layoutMode = \"continuous\";\r\n    switch (layoutMode) {\r\n      case \"continuous\":\r\n        out(\"/PageLayout /OneColumn\");\r\n        break;\r\n      case \"single\":\r\n        out(\"/PageLayout /SinglePage\");\r\n        break;\r\n      case \"two\":\r\n      case \"twoleft\":\r\n        out(\"/PageLayout /TwoColumnLeft\");\r\n        break;\r\n      case \"tworight\":\r\n        out(\"/PageLayout /TwoColumnRight\");\r\n        break;\r\n    }\r\n    if (pageMode) {\r\n      /**\r\n       * A name object specifying how the document should be displayed when opened:\r\n       * UseNone      : Neither document outline nor thumbnail images visible -- DEFAULT\r\n       * UseOutlines  : Document outline visible\r\n       * UseThumbs    : Thumbnail images visible\r\n       * FullScreen   : Full-screen mode, with no menu bar, window controls, or any other window visible\r\n       */\r\n      out(\"/PageMode /\" + pageMode);\r\n    }\r\n    events.publish(\"putCatalog\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putTrailer = (API.__private__.putTrailer = function() {\r\n    out(\"trailer\");\r\n    out(\"<<\");\r\n    out(\"/Size \" + (objectNumber + 1));\r\n    // Root and Info must be the last and second last objects written respectively\r\n    out(\"/Root \" + objectNumber + \" 0 R\");\r\n    out(\"/Info \" + (objectNumber - 1) + \" 0 R\");\r\n    if (encryptionOptions !== null) {\r\n      out(\"/Encrypt \" + encryption.oid + \" 0 R\");\r\n    }\r\n    out(\"/ID [ <\" + fileId + \"> <\" + fileId + \"> ]\");\r\n    out(\">>\");\r\n  });\r\n\r\n  var putHeader = (API.__private__.putHeader = function() {\r\n    out(\"%PDF-\" + pdfVersion);\r\n    out(\"%\\xBA\\xDF\\xAC\\xE0\");\r\n  });\r\n\r\n  var putXRef = (API.__private__.putXRef = function() {\r\n    var p = \"0000000000\";\r\n\r\n    out(\"xref\");\r\n    out(\"0 \" + (objectNumber + 1));\r\n    out(\"0000000000 65535 f \");\r\n    for (var i = 1; i <= objectNumber; i++) {\r\n      var offset = offsets[i];\r\n      if (typeof offset === \"function\") {\r\n        out((p + offsets[i]()).slice(-10) + \" 00000 n \");\r\n      } else {\r\n        if (typeof offsets[i] !== \"undefined\") {\r\n          out((p + offsets[i]).slice(-10) + \" 00000 n \");\r\n        } else {\r\n          out(\"0000000000 00000 n \");\r\n        }\r\n      }\r\n    }\r\n  });\r\n\r\n  var buildDocument = (API.__private__.buildDocument = function() {\r\n    resetDocument();\r\n    setOutputDestination(content);\r\n\r\n    events.publish(\"buildDocument\");\r\n\r\n    putHeader();\r\n    putPages();\r\n    putAdditionalObjects();\r\n    putResources();\r\n    if (encryptionOptions !== null) putEncryptionDict();\r\n    putInfo();\r\n    putCatalog();\r\n\r\n    var offsetOfXRef = contentLength;\r\n    putXRef();\r\n    putTrailer();\r\n    out(\"startxref\");\r\n    out(\"\" + offsetOfXRef);\r\n    out(\"%%EOF\");\r\n\r\n    setOutputDestination(pages[currentPage]);\r\n\r\n    return content.join(\"\\n\");\r\n  });\r\n\r\n  var getBlob = (API.__private__.getBlob = function(data) {\r\n    return new Blob([getArrayBuffer(data)], {\r\n      type: \"application/pdf\"\r\n    });\r\n  });\r\n\r\n  /**\r\n   * Generates the PDF document.\r\n   *\r\n   * If `type` argument is undefined, output is raw body of resulting PDF returned as a string.\r\n   *\r\n   * @param {string} type A string identifying one of the possible output types.<br/>\r\n   *                      Possible values are: <br/>\r\n   *                          'arraybuffer' -> (ArrayBuffer)<br/>\r\n   *                          'blob' -> (Blob)<br/>\r\n   *                          'bloburi'/'bloburl' -> (string)<br/>\r\n   *                          'datauristring'/'dataurlstring' -> (string)<br/>\r\n   *                          'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>\r\n   *                          'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfjsnewwindow' -> (wind | null)\r\n   * @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>\r\n   *                                Possible options are 'filename'.<br/>\r\n   *                                A string can be passed instead of {filename:string} and defaults to 'generated.pdf'\r\n   * @function\r\n   * @instance\r\n   * @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}\r\n   * @memberof jsPDF#\r\n   * @name output\r\n   */\r\n  var output = (API.output = API.__private__.output = SAFE(function output(\r\n    type,\r\n    options\r\n  ) {\r\n    options = options || {};\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        filename: options\r\n      };\r\n    } else {\r\n      options.filename = options.filename || \"generated.pdf\";\r\n    }\r\n\r\n    switch (type) {\r\n      case undefined:\r\n        return buildDocument();\r\n      case \"save\":\r\n        API.save(options.filename);\r\n        break;\r\n      case \"arraybuffer\":\r\n        return getArrayBuffer(buildDocument());\r\n      case \"blob\":\r\n        return getBlob(buildDocument());\r\n      case \"bloburi\":\r\n      case \"bloburl\":\r\n        // Developer is responsible of calling revokeObjectURL\r\n        if (\r\n          typeof globalObject.URL !== \"undefined\" &&\r\n          typeof globalObject.URL.createObjectURL === \"function\"\r\n        ) {\r\n          return (\r\n            (globalObject.URL &&\r\n              globalObject.URL.createObjectURL(getBlob(buildDocument()))) ||\r\n            void 0\r\n          );\r\n        } else {\r\n          console.warn(\r\n            \"bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauristring\":\r\n      case \"dataurlstring\":\r\n        var dataURI = \"\";\r\n        var pdfDocument = buildDocument();\r\n        try {\r\n          dataURI = btoa(pdfDocument);\r\n        } catch (e) {\r\n          dataURI = btoa(unescape(encodeURIComponent(pdfDocument)));\r\n        }\r\n        return (\r\n          \"data:application/pdf;filename=\" +\r\n          options.filename +\r\n          \";base64,\" +\r\n          dataURI\r\n        );\r\n      case \"pdfobjectnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfObjectUrl =\r\n            \"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js\";\r\n          var integrity =\r\n            ' integrity=\"sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==\" crossorigin=\"anonymous\"';\r\n\r\n          if (options.pdfObjectUrl) {\r\n            pdfObjectUrl = options.pdfObjectUrl;\r\n            integrity = \"\";\r\n          }\r\n\r\n          var htmlForNewWindow =\r\n            \"<html>\" +\r\n            '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src=\"' +\r\n            pdfObjectUrl +\r\n            '\"' +\r\n            integrity +\r\n            '></script><script >PDFObject.embed(\"' +\r\n            this.output(\"dataurlstring\") +\r\n            '\", ' +\r\n            JSON.stringify(options) +\r\n            \");</script></body></html>\";\r\n          var nW = globalObject.open();\r\n\r\n          if (nW !== null) {\r\n            nW.document.write(htmlForNewWindow);\r\n          }\r\n          return nW;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfobjectnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"pdfjsnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfJsUrl = options.pdfJsUrl || \"examples/PDF.js/web/viewer.html\";\r\n          var htmlForPDFjsNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            '<body><iframe id=\"pdfViewer\" src=\"' +\r\n            pdfJsUrl +\r\n            \"?file=&downloadName=\" +\r\n            options.filename +\r\n            '\" width=\"500px\" height=\"400px\" />' +\r\n            \"</body></html>\";\r\n          var PDFjsNewWindow = globalObject.open();\r\n\r\n          if (PDFjsNewWindow !== null) {\r\n            PDFjsNewWindow.document.write(htmlForPDFjsNewWindow);\r\n            var scope = this;\r\n            PDFjsNewWindow.document.documentElement.querySelector(\r\n              \"#pdfViewer\"\r\n            ).onload = function() {\r\n              PDFjsNewWindow.document.title = options.filename;\r\n              PDFjsNewWindow.document.documentElement\r\n                .querySelector(\"#pdfViewer\")\r\n                .contentWindow.PDFViewerApplication.open(\r\n                  scope.output(\"bloburl\")\r\n                );\r\n            };\r\n          }\r\n          return PDFjsNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfjsnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"dataurlnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var htmlForDataURLNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            \"<body>\" +\r\n            '<iframe src=\"' +\r\n            this.output(\"datauristring\", options) +\r\n            '\"></iframe>' +\r\n            \"</body></html>\";\r\n          var dataURLNewWindow = globalObject.open();\r\n          if (dataURLNewWindow !== null) {\r\n            dataURLNewWindow.document.write(htmlForDataURLNewWindow);\r\n            dataURLNewWindow.document.title = options.filename;\r\n          }\r\n          if (dataURLNewWindow || typeof safari === \"undefined\")\r\n            return dataURLNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option dataurlnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauri\":\r\n      case \"dataurl\":\r\n        return (globalObject.document.location.href = this.output(\r\n          \"datauristring\",\r\n          options\r\n        ));\r\n      default:\r\n        return null;\r\n    }\r\n  }));\r\n\r\n  /**\r\n   * Used to see if a supplied hotfix was requested when the pdf instance was created.\r\n   * @param {string} hotfixName - The name of the hotfix to check.\r\n   * @returns {boolean}\r\n   */\r\n  var hasHotfix = function(hotfixName) {\r\n    return (\r\n      Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1\r\n    );\r\n  };\r\n\r\n  switch (unit) {\r\n    case \"pt\":\r\n      scaleFactor = 1;\r\n      break;\r\n    case \"mm\":\r\n      scaleFactor = 72 / 25.4;\r\n      break;\r\n    case \"cm\":\r\n      scaleFactor = 72 / 2.54;\r\n      break;\r\n    case \"in\":\r\n      scaleFactor = 72;\r\n      break;\r\n    case \"px\":\r\n      if (hasHotfix(\"px_scaling\") == true) {\r\n        scaleFactor = 72 / 96;\r\n      } else {\r\n        scaleFactor = 96 / 72;\r\n      }\r\n      break;\r\n    case \"pc\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"em\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"ex\":\r\n      scaleFactor = 6;\r\n      break;\r\n    default:\r\n      if (typeof unit === \"number\") {\r\n        scaleFactor = unit;\r\n      } else {\r\n        throw new Error(\"Invalid unit: \" + unit);\r\n      }\r\n  }\r\n\r\n  var encryption = null;\r\n  setCreationDate();\r\n  setFileId();\r\n\r\n  var getEncryptor = function(objectId) {\r\n    if (encryptionOptions !== null) {\r\n      return encryption.encryptor(objectId, 0);\r\n    }\r\n    return function(data) {\r\n      return data;\r\n    };\r\n  };\r\n\r\n  //---------------------------------------\r\n  // Public API\r\n\r\n  var getPageInfo = (API.__private__.getPageInfo = API.getPageInfo = function(\r\n    pageNumberOneBased\r\n  ) {\r\n    if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfo\");\r\n    }\r\n    var objId = pagesContext[pageNumberOneBased].objId;\r\n    return {\r\n      objId: objId,\r\n      pageNumber: pageNumberOneBased,\r\n      pageContext: pagesContext[pageNumberOneBased]\r\n    };\r\n  });\r\n\r\n  var getPageInfoByObjId = (API.__private__.getPageInfoByObjId = function(\r\n    objId\r\n  ) {\r\n    if (isNaN(objId) || objId % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfoByObjId\");\r\n    }\r\n    for (var pageNumber in pagesContext) {\r\n      if (pagesContext[pageNumber].objId === objId) {\r\n        break;\r\n      }\r\n    }\r\n    return getPageInfo(pageNumber);\r\n  });\r\n\r\n  var getCurrentPageInfo = (API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function() {\r\n    return {\r\n      objId: pagesContext[currentPage].objId,\r\n      pageNumber: currentPage,\r\n      pageContext: pagesContext[currentPage]\r\n    };\r\n  });\r\n\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @param format {String/Array} The format of the new page. Can be: <ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n   * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n   * @param orientation {string} Orientation of the new page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" (Default), \"l\").\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addPage\r\n   */\r\n  API.addPage = function() {\r\n    _addPage.apply(this, arguments);\r\n    return this;\r\n  };\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name setPage\r\n   * @param {number} page Switch the active page to the page number specified (indexed starting at 1).\r\n   * @example\r\n   * doc = jsPDF()\r\n   * doc.addPage()\r\n   * doc.addPage()\r\n   * doc.text('I am on page 3', 10, 10)\r\n   * doc.setPage(1)\r\n   * doc.text('I am on page 1', 10, 10)\r\n   */\r\n  API.setPage = function() {\r\n    _setPage.apply(this, arguments);\r\n    setOutputDestination.call(this, pages[currentPage]);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name insertPage\r\n   * @memberof jsPDF#\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {Object} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.insertPage = function(beforePage) {\r\n    this.addPage();\r\n    this.movePage(currentPage, beforePage);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name movePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {number} targetPage\r\n   * @param {number} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.movePage = function(targetPage, beforePage) {\r\n    var tmpPages, tmpPagesContext;\r\n    if (targetPage > beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var i = targetPage; i > beforePage; i--) {\r\n        pages[i] = pages[i - 1];\r\n        pagesContext[i] = pagesContext[i - 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    } else if (targetPage < beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var j = targetPage; j < beforePage; j++) {\r\n        pages[j] = pages[j + 1];\r\n        pagesContext[j] = pagesContext[j + 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Deletes a page from the PDF.\r\n   * @name deletePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @param {number} targetPage\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   */\r\n  API.deletePage = function() {\r\n    _deletePage.apply(this, arguments);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.\r\n   * @param {Object} [options] - Collection of settings signaling how the text must be encoded.\r\n   * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.\r\n   * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging\r\n   * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.\r\n   * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.\r\n   * @param {number} [options.charSpace=0] - The space between each letter.\r\n   * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.\r\n   * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.\r\n   * @param {Object} [options.flags] - Flags for to8bitStream.\r\n   * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.\r\n   * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.\r\n   * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.\r\n   * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.\r\n   * @param {boolean} [options.isInputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isInputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine\r\n   * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.\r\n   *\r\n   * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing\r\n   * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this\r\n   * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a\r\n   * DIFFERENT result. A matrix is only allowed in \"advanced\" API mode.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name text\r\n   */\r\n  API.__private__.text = API.text = function(text, x, y, options, transform) {\r\n    /*\r\n     * Inserts something like this into PDF\r\n     *   BT\r\n     *    /F1 16 Tf  % Font name + size\r\n     *    16 TL % How many units down for next line in multiline text\r\n     *    0 g % color\r\n     *    28.35 813.54 Td % position\r\n     *    (line one) Tj\r\n     *    T* (line two) Tj\r\n     *    T* (line three) Tj\r\n     *   ET\r\n     */\r\n    options = options || {};\r\n    var scope = options.scope || this;\r\n    var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, text, flags)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(data, coordinates... , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (\r\n      typeof text === \"number\" &&\r\n      typeof x === \"number\" &&\r\n      (typeof y === \"string\" || Array.isArray(y))\r\n    ) {\r\n      var tmp = y;\r\n      y = x;\r\n      x = text;\r\n      text = tmp;\r\n    }\r\n\r\n    var transformationMatrix;\r\n\r\n    if (arguments[3] instanceof Matrix === false) {\r\n      flags = arguments[3];\r\n      angle = arguments[4];\r\n      align = arguments[5];\r\n\r\n      if (typeof flags !== \"object\" || flags === null) {\r\n        if (typeof angle === \"string\") {\r\n          align = angle;\r\n          angle = null;\r\n        }\r\n        if (typeof flags === \"string\") {\r\n          align = flags;\r\n          flags = null;\r\n        }\r\n        if (typeof flags === \"number\") {\r\n          angle = flags;\r\n          flags = null;\r\n        }\r\n        options = {\r\n          flags: flags,\r\n          angle: angle,\r\n          align: align\r\n        };\r\n      }\r\n    } else {\r\n      advancedApiModeTrap(\r\n        \"The transform parameter of text() with a Matrix value\"\r\n      );\r\n      transformationMatrix = transform;\r\n    }\r\n\r\n    if (isNaN(x) || isNaN(y) || typeof text === \"undefined\" || text === null) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.text\");\r\n    }\r\n\r\n    if (text.length === 0) {\r\n      return scope;\r\n    }\r\n\r\n    var xtra = \"\";\r\n    var isHex = false;\r\n    var lineHeight =\r\n      typeof options.lineHeightFactor === \"number\"\r\n        ? options.lineHeightFactor\r\n        : lineHeightFactor;\r\n    var scaleFactor = scope.internal.scaleFactor;\r\n\r\n    function ESC(s) {\r\n      s = s.split(\"\\t\").join(Array(options.TabLen || 9).join(\" \"));\r\n      return pdfEscape(s, flags);\r\n    }\r\n\r\n    function transformTextToSpecialArray(text) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      var da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (typeof curDa === \"string\") {\r\n          da.push(curDa);\r\n        } else {\r\n          if (\r\n            Array.isArray(text) &&\r\n            (curDa.length === 1 ||\r\n              (curDa[1] === undefined && curDa[2] === undefined))\r\n          ) {\r\n            da.push(curDa[0]);\r\n          } else {\r\n            da.push([curDa[0], curDa[1], curDa[2]]);\r\n          }\r\n        }\r\n      }\r\n      return da;\r\n    }\r\n\r\n    function processTextByFunction(text, processingFunction) {\r\n      var result;\r\n      if (typeof text === \"string\") {\r\n        result = processingFunction(text)[0];\r\n      } else if (Array.isArray(text)) {\r\n        //we don't want to destroy original text array, so cloning it\r\n        var sa = text.concat();\r\n        var da = [];\r\n        var len = sa.length;\r\n        var curDa;\r\n        var tmpResult;\r\n        //we do array.join('text that must not be PDFescaped\")\r\n        //thus, pdfEscape each component separately\r\n        while (len--) {\r\n          curDa = sa.shift();\r\n          if (typeof curDa === \"string\") {\r\n            da.push(processingFunction(curDa)[0]);\r\n          } else if (Array.isArray(curDa) && typeof curDa[0] === \"string\") {\r\n            tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);\r\n            da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);\r\n          }\r\n        }\r\n        result = da;\r\n      }\r\n      return result;\r\n    }\r\n\r\n    //Check if text is of type String\r\n    var textIsOfTypeString = false;\r\n    var tmpTextIsOfTypeString = true;\r\n\r\n    if (typeof text === \"string\") {\r\n      textIsOfTypeString = true;\r\n    } else if (Array.isArray(text)) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (\r\n          typeof curDa !== \"string\" ||\r\n          (Array.isArray(curDa) && typeof curDa[0] !== \"string\")\r\n        ) {\r\n          tmpTextIsOfTypeString = false;\r\n        }\r\n      }\r\n      textIsOfTypeString = tmpTextIsOfTypeString;\r\n    }\r\n    if (textIsOfTypeString === false) {\r\n      throw new Error(\r\n        'Type of text must be string or Array. \"' +\r\n          text +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n\r\n    //If there are any newlines in text, we assume\r\n    //the user wanted to print multiple lines, so break the\r\n    //text up into an array. If the text is already an array,\r\n    //we assume the user knows what they are doing.\r\n    //Convert text into an array anyway to simplify\r\n    //later code.\r\n\r\n    if (typeof text === \"string\") {\r\n      if (text.match(/[\\r?\\n]/)) {\r\n        text = text.split(/\\r\\n|\\r|\\n/g);\r\n      } else {\r\n        text = [text];\r\n      }\r\n    }\r\n\r\n    //baseline\r\n    var height = activeFontSize / scope.internal.scaleFactor;\r\n    var descent = height * (lineHeight - 1);\r\n\r\n    switch (options.baseline) {\r\n      case \"bottom\":\r\n        y -= descent;\r\n        break;\r\n      case \"top\":\r\n        y += height - descent;\r\n        break;\r\n      case \"hanging\":\r\n        y += height - 2 * descent;\r\n        break;\r\n      case \"middle\":\r\n        y += height / 2 - descent;\r\n        break;\r\n      case \"ideographic\":\r\n      case \"alphabetic\":\r\n      default:\r\n        // do nothing, everything is fine\r\n        break;\r\n    }\r\n\r\n    //multiline\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    if (maxWidth > 0) {\r\n      if (typeof text === \"string\") {\r\n        text = scope.splitTextToSize(text, maxWidth);\r\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n        text = text.reduce(function(acc, textLine) {\r\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\r\n        }, []);\r\n      }\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"preProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    options = payload.options;\r\n\r\n    //angle\r\n    angle = options.angle;\r\n\r\n    if (\r\n      transformationMatrix instanceof Matrix === false &&\r\n      angle &&\r\n      typeof angle === \"number\"\r\n    ) {\r\n      angle *= Math.PI / 180;\r\n\r\n      if (options.rotationDirection === 0) {\r\n        angle = -angle;\r\n      }\r\n\r\n      if (apiMode === ApiMode.ADVANCED) {\r\n        angle = -angle;\r\n      }\r\n\r\n      var c = Math.cos(angle);\r\n      var s = Math.sin(angle);\r\n      transformationMatrix = new Matrix(c, s, -s, c, 0, 0);\r\n    } else if (angle && angle instanceof Matrix) {\r\n      transformationMatrix = angle;\r\n    }\r\n\r\n    if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {\r\n      transformationMatrix = identityMatrix;\r\n    }\r\n\r\n    //charSpace\r\n\r\n    charSpace = options.charSpace || activeCharSpace;\r\n\r\n    if (typeof charSpace !== \"undefined\") {\r\n      xtra += hpf(scale(charSpace)) + \" Tc\\n\";\r\n      this.setCharSpace(this.getCharSpace() || 0);\r\n    }\r\n\r\n    horizontalScale = options.horizontalScale;\r\n    if (typeof horizontalScale !== \"undefined\") {\r\n      xtra += hpf(horizontalScale * 100) + \" Tz\\n\";\r\n    }\r\n\r\n    //lang\r\n\r\n    var lang = options.lang;\r\n\r\n    if (lang) {\r\n      //    xtra += \"/Lang (\" + lang +\")\\n\";\r\n    }\r\n\r\n    //renderingMode\r\n    var renderingMode = -1;\r\n    var parmRenderingMode =\r\n      typeof options.renderingMode !== \"undefined\"\r\n        ? options.renderingMode\r\n        : options.stroke;\r\n    var pageContext = scope.internal.getCurrentPageInfo().pageContext;\r\n\r\n    switch (parmRenderingMode) {\r\n      case 0:\r\n      case false:\r\n      case \"fill\":\r\n        renderingMode = 0;\r\n        break;\r\n      case 1:\r\n      case true:\r\n      case \"stroke\":\r\n        renderingMode = 1;\r\n        break;\r\n      case 2:\r\n      case \"fillThenStroke\":\r\n        renderingMode = 2;\r\n        break;\r\n      case 3:\r\n      case \"invisible\":\r\n        renderingMode = 3;\r\n        break;\r\n      case 4:\r\n      case \"fillAndAddForClipping\":\r\n        renderingMode = 4;\r\n        break;\r\n      case 5:\r\n      case \"strokeAndAddPathForClipping\":\r\n        renderingMode = 5;\r\n        break;\r\n      case 6:\r\n      case \"fillThenStrokeAndAddToPathForClipping\":\r\n        renderingMode = 6;\r\n        break;\r\n      case 7:\r\n      case \"addToPathForClipping\":\r\n        renderingMode = 7;\r\n        break;\r\n    }\r\n\r\n    var usedRenderingMode =\r\n      typeof pageContext.usedRenderingMode !== \"undefined\"\r\n        ? pageContext.usedRenderingMode\r\n        : -1;\r\n\r\n    //if the coder wrote it explicitly to use a specific\r\n    //renderingMode, then use it\r\n    if (renderingMode !== -1) {\r\n      xtra += renderingMode + \" Tr\\n\";\r\n      //otherwise check if we used the rendering Mode already\r\n      //if so then set the rendering Mode...\r\n    } else if (usedRenderingMode !== -1) {\r\n      xtra += \"0 Tr\\n\";\r\n    }\r\n\r\n    if (renderingMode !== -1) {\r\n      pageContext.usedRenderingMode = renderingMode;\r\n    }\r\n\r\n    //align\r\n    align = options.align || \"left\";\r\n    var leading = activeFontSize * lineHeight;\r\n    var pageWidth = scope.internal.pageSize.getWidth();\r\n    var activeFont = fonts[activeFontKey];\r\n    charSpace = options.charSpace || activeCharSpace;\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    var lineWidths;\r\n    flags = Object.assign({ autoencode: true, noBOM: true }, options.flags);\r\n\r\n    var wordSpacingPerLine = [];\r\n    var findWidth = function(v) {\r\n      return (\r\n        (scope.getStringUnitWidth(v, {\r\n          font: activeFont,\r\n          charSpace: charSpace,\r\n          fontSize: activeFontSize,\r\n          doKerning: false\r\n        }) *\r\n          activeFontSize) /\r\n        scaleFactor\r\n      );\r\n    };\r\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n      da = transformTextToSpecialArray(text);\r\n      var newY;\r\n      if (align !== \"left\") {\r\n        lineWidths = da.map(findWidth);\r\n      }\r\n      //The first line uses the \"main\" Td setting,\r\n      //and the subsequent lines are offset by the\r\n      //previous line's x coordinate.\r\n      var prevWidth = 0;\r\n      var newX;\r\n      if (align === \"right\") {\r\n        //The passed in x coordinate defines the\r\n        //rightmost point of the text.\r\n        x -= lineWidths[0];\r\n        text = [];\r\n        len = da.length;\r\n        for (var i = 0; i < len; i++) {\r\n          if (i === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale(prevWidth - lineWidths[i]);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[i], newX, newY]);\r\n          prevWidth = lineWidths[i];\r\n        }\r\n      } else if (align === \"center\") {\r\n        //The passed in x coordinate defines\r\n        //the center point.\r\n        x -= lineWidths[0] / 2;\r\n        text = [];\r\n        len = da.length;\r\n        for (var j = 0; j < len; j++) {\r\n          if (j === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale((prevWidth - lineWidths[j]) / 2);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[j], newX, newY]);\r\n          prevWidth = lineWidths[j];\r\n        }\r\n      } else if (align === \"left\") {\r\n        text = [];\r\n        len = da.length;\r\n        for (var h = 0; h < len; h++) {\r\n          text.push(da[h]);\r\n        }\r\n      } else if (align === \"justify\" && activeFont.encoding === \"Identity-H\") {\r\n        // when using unicode fonts, wordSpacePerLine does not apply\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        let backToStartX = 0;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : backToStartX;\r\n          if (l < len - 1) {\r\n            let spacing = scale(\r\n              (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n            );\r\n            let words = da[l].split(\" \");\r\n            text.push([words[0] + \" \", newX, newY]);\r\n            backToStartX = 0; // distance to reset back to the left\r\n            for (let i = 1; i < words.length; i++) {\r\n              let shiftAmount =\r\n                (findWidth(words[i - 1] + \" \" + words[i]) -\r\n                  findWidth(words[i])) *\r\n                  scaleFactor +\r\n                spacing;\r\n              if (i == words.length - 1) text.push([words[i], shiftAmount, 0]);\r\n              else text.push([words[i] + \" \", shiftAmount, 0]);\r\n              backToStartX -= shiftAmount;\r\n            }\r\n          } else {\r\n            text.push([da[l], newX, newY]);\r\n          }\r\n        }\r\n        text.push([\"\", backToStartX, 0]);\r\n      } else if (align === \"justify\") {\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : 0;\r\n          if (l < len - 1) {\r\n            wordSpacingPerLine.push(\r\n              hpf(\r\n                scale(\r\n                  (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n                )\r\n              )\r\n            );\r\n          } else {\r\n            wordSpacingPerLine.push(0);\r\n          }\r\n          text.push([da[l], newX, newY]);\r\n        }\r\n      } else {\r\n        throw new Error(\r\n          'Unrecognized alignment option, use \"left\", \"center\", \"right\" or \"justify\".'\r\n        );\r\n      }\r\n    }\r\n\r\n    //R2L\r\n    var doReversing = typeof options.R2L === \"boolean\" ? options.R2L : R2L;\r\n    if (doReversing === true) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [\r\n          text\r\n            .split(\"\")\r\n            .reverse()\r\n            .join(\"\"),\r\n          posX,\r\n          posY\r\n        ];\r\n      });\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"postProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    isHex = payload.mutex.isHex || false;\r\n\r\n    //Escaping\r\n    var activeFontEncoding = fonts[activeFontKey].encoding;\r\n\r\n    if (\r\n      activeFontEncoding === \"WinAnsiEncoding\" ||\r\n      activeFontEncoding === \"StandardEncoding\"\r\n    ) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [ESC(text), posX, posY];\r\n      });\r\n    }\r\n\r\n    da = transformTextToSpecialArray(text);\r\n\r\n    text = [];\r\n    var STRING = 0;\r\n    var ARRAY = 1;\r\n    var variant = Array.isArray(da[0]) ? ARRAY : STRING;\r\n    var posX;\r\n    var posY;\r\n    var content;\r\n    var wordSpacing = \"\";\r\n\r\n    var generatePosition = function(\r\n      parmPosX,\r\n      parmPosY,\r\n      parmTransformationMatrix\r\n    ) {\r\n      var position = \"\";\r\n      if (parmTransformationMatrix instanceof Matrix) {\r\n        // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y\r\n        // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied\r\n        // in the coordinate system established by this matrix\r\n        if (typeof options.angle === \"number\") {\r\n          parmTransformationMatrix = matrixMult(\r\n            parmTransformationMatrix,\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY)\r\n          );\r\n        } else {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        if (apiMode === ApiMode.ADVANCED) {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, -1, 0, 0),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        position = parmTransformationMatrix.join(\" \") + \" Tm\\n\";\r\n      } else {\r\n        position = hpf(parmPosX) + \" \" + hpf(parmPosY) + \" Td\\n\";\r\n      }\r\n      return position;\r\n    };\r\n\r\n    for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {\r\n      wordSpacing = \"\";\r\n\r\n      switch (variant) {\r\n        case ARRAY:\r\n          content =\r\n            (isHex ? \"<\" : \"(\") + da[lineIndex][0] + (isHex ? \">\" : \")\");\r\n          posX = parseFloat(da[lineIndex][1]);\r\n          posY = parseFloat(da[lineIndex][2]);\r\n          break;\r\n        case STRING:\r\n          content = (isHex ? \"<\" : \"(\") + da[lineIndex] + (isHex ? \">\" : \")\");\r\n          posX = getHorizontalCoordinate(x);\r\n          posY = getVerticalCoordinate(y);\r\n          break;\r\n      }\r\n\r\n      if (\r\n        typeof wordSpacingPerLine !== \"undefined\" &&\r\n        typeof wordSpacingPerLine[lineIndex] !== \"undefined\"\r\n      ) {\r\n        wordSpacing = wordSpacingPerLine[lineIndex] + \" Tw\\n\";\r\n      }\r\n\r\n      if (lineIndex === 0) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      } else if (variant === STRING) {\r\n        text.push(wordSpacing + content);\r\n      } else if (variant === ARRAY) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      }\r\n    }\r\n\r\n    text = variant === STRING ? text.join(\" Tj\\nT* \") : text.join(\" Tj\\n\");\r\n    text += \" Tj\\n\";\r\n\r\n    var result = \"BT\\n/\";\r\n    result += activeFontKey + \" \" + activeFontSize + \" Tf\\n\"; // font face, style, size\r\n    result += hpf(activeFontSize * lineHeight) + \" TL\\n\"; // line spacing\r\n    result += textColor + \"\\n\";\r\n    result += xtra;\r\n    result += text;\r\n    result += \"ET\";\r\n\r\n    out(result);\r\n    usedFonts[activeFontKey] = true;\r\n    return scope;\r\n  };\r\n\r\n  // PDF supports these path painting and clip path operators:\r\n  //\r\n  // S - stroke\r\n  // s - close/stroke\r\n  // f (F) - fill non-zero\r\n  // f* - fill evenodd\r\n  // B - fill stroke nonzero\r\n  // B* - fill stroke evenodd\r\n  // b - close fill stroke nonzero\r\n  // b* - close fill stroke evenodd\r\n  // n - nothing (consume path)\r\n  // W - clip nonzero\r\n  // W* - clip evenodd\r\n  //\r\n  // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()\r\n  // method.\r\n  /**\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @instance\r\n   * @param {string} rule Only possible value is 'evenodd'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description All .clip() after calling drawing ops with a style argument of null.\r\n   */\r\n  var clip = (API.__private__.clip = API.clip = function(rule) {\r\n    // Call .clip() after calling drawing ops with a style argument of null\r\n    // W is the PDF clipping op\r\n    if (\"evenodd\" === rule) {\r\n      out(\"W*\");\r\n    } else {\r\n      out(\"W\");\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * @name clipEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note\r\n   * that this will NOT consume the current path. In order to only use this path for clipping call\r\n   * {@link API.discardPath} afterwards.\r\n   */\r\n  API.clipEvenOdd = function() {\r\n    return clip(\"evenodd\");\r\n  };\r\n\r\n  /**\r\n   * Consumes the current path without any effect. Mainly used in combination with {@link clip} or\r\n   * {@link clipEvenOdd}. The PDF \"n\" operator.\r\n   * @name discardPath\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.discardPath = API.discardPath = function() {\r\n    out(\"n\");\r\n    return this;\r\n  };\r\n\r\n  var isValidStyle = (API.__private__.isValidStyle = function(style) {\r\n    var validStyleVariants = [\r\n      undefined,\r\n      null,\r\n      \"S\",\r\n      \"D\",\r\n      \"F\",\r\n      \"DF\",\r\n      \"FD\",\r\n      \"f\",\r\n      \"f*\",\r\n      \"B\",\r\n      \"B*\",\r\n      \"n\"\r\n    ];\r\n    var result = false;\r\n    if (validStyleVariants.indexOf(style) !== -1) {\r\n      result = true;\r\n    }\r\n    return result;\r\n  });\r\n\r\n  API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function(\r\n    operator\r\n  ) {\r\n    if (isValidStyle(operator)) {\r\n      defaultPathOperation = operator;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  var getStyle = (API.__private__.getStyle = API.getStyle = function(style) {\r\n    // see path-painting operators in PDF spec\r\n    var op = defaultPathOperation; // stroke\r\n\r\n    switch (style) {\r\n      case \"D\":\r\n      case \"S\":\r\n        op = \"S\"; // stroke\r\n        break;\r\n      case \"F\":\r\n        op = \"f\"; // fill\r\n        break;\r\n      case \"FD\":\r\n      case \"DF\":\r\n        op = \"B\";\r\n        break;\r\n      case \"f\":\r\n      case \"f*\":\r\n      case \"B\":\r\n      case \"B*\":\r\n        /*\r\n               Allow direct use of these PDF path-painting operators:\r\n               - f    fill using nonzero winding number rule\r\n               - f*    fill using even-odd rule\r\n               - B    fill then stroke with fill using non-zero winding number rule\r\n               - B*    fill then stroke with fill using even-odd rule\r\n               */\r\n        op = style;\r\n        break;\r\n    }\r\n    return op;\r\n  });\r\n\r\n  /**\r\n   * Close the current path. The PDF \"h\" operator.\r\n   * @name close\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  var close = (API.close = function() {\r\n    out(\"h\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Stroke the path. The PDF \"S\" operator.\r\n   * @name stroke\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.stroke = function() {\r\n    out(\"S\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled\r\n   * with this pattern, otherwise with the current fill color. Equivalent to the PDF \"f\" operator.\r\n   * @name fill\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fill = function(pattern) {\r\n    fillWithOptionalPattern(\"f\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the even-odd rule. The PDF f* operator.\r\n   * @see API.fill\r\n   * @name fillEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"f*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the nonzero winding number rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStroke\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStroke = function(pattern) {\r\n    fillWithOptionalPattern(\"B\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the even-odd rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStrokeEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStrokeEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"B*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  var fillWithOptionalPattern = function(style, pattern) {\r\n    if (typeof pattern === \"object\") {\r\n      fillWithPattern(pattern, style);\r\n    } else {\r\n      out(style);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    if (\r\n      style === null ||\r\n      (apiMode === ApiMode.ADVANCED && style === undefined)\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    style = getStyle(style);\r\n\r\n    // stroking / filling / both the path\r\n    out(style);\r\n  };\r\n\r\n  function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {\r\n    var clone = new TilingPattern(\r\n      boundingBox || this.boundingBox,\r\n      xStep || this.xStep,\r\n      yStep || this.yStep,\r\n      this.gState,\r\n      matrix || this.matrix\r\n    );\r\n    clone.stream = this.stream;\r\n    var key = patternKey + \"$$\" + this.cloneIndex++ + \"$$\";\r\n    addPattern(key, clone);\r\n    return clone;\r\n  }\r\n\r\n  var fillWithPattern = function(patternData, style) {\r\n    var patternId = patternMap[patternData.key];\r\n    var pattern = patterns[patternId];\r\n\r\n    if (pattern instanceof ShadingPattern) {\r\n      out(\"q\");\r\n\r\n      out(clipRuleFromStyle(style));\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n      out(patternData.matrix.toString() + \" cm\");\r\n      out(\"/\" + patternId + \" sh\");\r\n      out(\"Q\");\r\n    } else if (pattern instanceof TilingPattern) {\r\n      // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,\r\n      // so we must flip them\r\n      var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());\r\n\r\n      if (patternData.matrix) {\r\n        matrix = matrix.multiply(patternData.matrix || identityMatrix);\r\n        // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances\r\n        // for each use\r\n        patternId = cloneTilingPattern.call(\r\n          pattern,\r\n          patternData.key,\r\n          patternData.boundingBox,\r\n          patternData.xStep,\r\n          patternData.yStep,\r\n          matrix\r\n        ).id;\r\n      }\r\n\r\n      out(\"q\");\r\n      out(\"/Pattern cs\");\r\n      out(\"/\" + patternId + \" scn\");\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n\r\n      out(style);\r\n      out(\"Q\");\r\n    }\r\n  };\r\n\r\n  var clipRuleFromStyle = function(style) {\r\n    switch (style) {\r\n      case \"f\":\r\n      case \"F\":\r\n        return \"W n\";\r\n      case \"f*\":\r\n        return \"W* n\";\r\n      case \"B\":\r\n        return \"W S\";\r\n      case \"B*\":\r\n        return \"W* S\";\r\n\r\n      // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern\r\n      // and \"n\"/\"S\" as style would still fill/fill and stroke the path)\r\n      case \"S\":\r\n        return \"W S\";\r\n      case \"n\":\r\n        return \"W n\";\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Begin a new subpath by moving the current point to coordinates (x, y). The PDF \"m\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @name moveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var moveTo = (API.moveTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" m\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a straight line segment from the current point to the point (x, y). The PDF \"l\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @memberof jsPDF#\r\n   * @name lineTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var lineTo = (API.lineTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" l\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point\r\n   * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {number} x3\r\n   * @param {number} y3\r\n   * @memberof jsPDF#\r\n   * @name curveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var curveTo = (API.curveTo = function(x1, y1, x2, y2, x3, y3) {\r\n    out(\r\n      [\r\n        hpf(scale(x1)),\r\n        hpf(transformScaleY(y1)),\r\n        hpf(scale(x2)),\r\n        hpf(transformScaleY(y2)),\r\n        hpf(scale(x3)),\r\n        hpf(transformScaleY(y3)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Draw a line on the current page.\r\n   *\r\n   * @name line\r\n   * @function\r\n   * @instance\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {string} style A string specifying the painting style or null.  Valid styles include: 'S' [default] - stroke, 'F' - fill,  and 'DF' (or 'FD') -  fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.line = API.line = function(x1, y1, x2, y2, style) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.line\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || \"S\");\r\n    } else {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @typedef {Object} PatternData\r\n   * {Matrix|undefined} matrix\r\n   * {Number|undefined} xStep\r\n   * {Number|undefined} yStep\r\n   * {Array.<Number>|undefined} boundingBox\r\n   */\r\n\r\n  /**\r\n   * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.\r\n   * All data points in `lines` are relative to last line origin.\r\n   * `x`, `y` become x1,y1 for first line / curve in the set.\r\n   * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.\r\n   * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.\r\n   *\r\n   * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line\r\n   * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name lines\r\n   */\r\n  API.__private__.lines = API.lines = function(\r\n    lines,\r\n    x,\r\n    y,\r\n    scale,\r\n    style,\r\n    closed\r\n  ) {\r\n    var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(content, coordinateX, coordinateY , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (typeof lines === \"number\") {\r\n      tmp = y;\r\n      y = x;\r\n      x = lines;\r\n      lines = tmp;\r\n    }\r\n\r\n    scale = scale || [1, 1];\r\n    closed = closed || false;\r\n\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      !Array.isArray(lines) ||\r\n      !Array.isArray(scale) ||\r\n      !isValidStyle(style) ||\r\n      typeof closed !== \"boolean\"\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.lines\");\r\n    }\r\n\r\n    // starting point\r\n    moveTo(x, y);\r\n\r\n    scalex = scale[0];\r\n    scaley = scale[1];\r\n    l = lines.length;\r\n    //, x2, y2 // bezier only. In page default measurement \"units\", *after* scaling\r\n    //, x3, y3 // bezier only. In page default measurement \"units\", *after* scaling\r\n    // ending point for all, lines and bezier. . In page default measurement \"units\", *after* scaling\r\n    x4 = x; // last / ending point = starting point for first item.\r\n    y4 = y; // last / ending point = starting point for first item.\r\n\r\n    for (i = 0; i < l; i++) {\r\n      leg = lines[i];\r\n      if (leg.length === 2) {\r\n        // simple line\r\n        x4 = leg[0] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[1] * scaley + y4; // here last y4 was prior ending point\r\n        lineTo(x4, y4);\r\n      } else {\r\n        // bezier curve\r\n        x2 = leg[0] * scalex + x4; // here last x4 is prior ending point\r\n        y2 = leg[1] * scaley + y4; // here last y4 is prior ending point\r\n        x3 = leg[2] * scalex + x4; // here last x4 is prior ending point\r\n        y3 = leg[3] * scaley + y4; // here last y4 is prior ending point\r\n        x4 = leg[4] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[5] * scaley + y4; // here last y4 was prior ending point\r\n        curveTo(x2, y2, x3, y3, x4, y4);\r\n      }\r\n    }\r\n\r\n    if (closed) {\r\n      close();\r\n    }\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.\r\n   * @param {Array<Object>} lines An array of {op: operator, c: coordinates} object, where op is one of \"m\" (move to), \"l\" (line to)\r\n   * \"c\" (cubic bezier curve) and \"h\" (close (sub)path)). c is an array of coordinates. \"m\" and \"l\" expect two, \"c\"\r\n   * six and \"h\" an empty array (or undefined).\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name path\r\n   */\r\n  API.path = function(lines) {\r\n    for (var i = 0; i < lines.length; i++) {\r\n      var leg = lines[i];\r\n      var coords = leg.c;\r\n      switch (leg.op) {\r\n        case \"m\":\r\n          moveTo(coords[0], coords[1]);\r\n          break;\r\n        case \"l\":\r\n          lineTo(coords[0], coords[1]);\r\n          break;\r\n        case \"c\":\r\n          curveTo.apply(this, coords);\r\n          break;\r\n        case \"h\":\r\n          close();\r\n          break;\r\n      }\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name rect\r\n   */\r\n  API.__private__.rect = API.rect = function(x, y, w, h, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.rect\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      h = -h;\r\n    }\r\n\r\n    out(\r\n      [\r\n        hpf(scale(x)),\r\n        hpf(transformScaleY(y)),\r\n        hpf(scale(w)),\r\n        hpf(scale(h)),\r\n        \"re\"\r\n      ].join(\" \")\r\n    );\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a triangle to PDF.\r\n   *\r\n   * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name triangle\r\n   */\r\n  API.__private__.triangle = API.triangle = function(\r\n    x1,\r\n    y1,\r\n    x2,\r\n    y2,\r\n    x3,\r\n    y3,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      isNaN(x3) ||\r\n      isNaN(y3) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.triangle\");\r\n    }\r\n    this.lines(\r\n      [\r\n        [x2 - x1, y2 - y1], // vector to point 2\r\n        [x3 - x2, y3 - y2], // vector to point 3\r\n        [x1 - x3, y1 - y3] // closing vector back to point 1\r\n      ],\r\n      x1,\r\n      y1, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle with rounded corners to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name roundedRect\r\n   */\r\n  API.__private__.roundedRect = API.roundedRect = function(\r\n    x,\r\n    y,\r\n    w,\r\n    h,\r\n    rx,\r\n    ry,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(w) ||\r\n      isNaN(h) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.roundedRect\");\r\n    }\r\n    var MyArc = (4 / 3) * (Math.SQRT2 - 1);\r\n\r\n    rx = Math.min(rx, w * 0.5);\r\n    ry = Math.min(ry, h * 0.5);\r\n\r\n    this.lines(\r\n      [\r\n        [w - 2 * rx, 0],\r\n        [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry],\r\n        [0, h - 2 * ry],\r\n        [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry],\r\n        [-w + 2 * rx, 0],\r\n        [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry],\r\n        [0, -h + 2 * ry],\r\n        [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]\r\n      ],\r\n      x + rx,\r\n      y, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an ellipse to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name ellipse\r\n   */\r\n  API.__private__.ellipse = API.ellipse = function(x, y, rx, ry, style) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.ellipse\");\r\n    }\r\n    var lx = (4 / 3) * (Math.SQRT2 - 1) * rx,\r\n      ly = (4 / 3) * (Math.SQRT2 - 1) * ry;\r\n\r\n    moveTo(x + rx, y);\r\n    curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);\r\n    curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);\r\n    curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);\r\n    curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an circle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} r Radius (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name circle\r\n   */\r\n  API.__private__.circle = API.circle = function(x, y, r, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.circle\");\r\n    }\r\n    return this.ellipse(x, y, r, r, style);\r\n  };\r\n\r\n  /**\r\n   * Sets text font face, variant for upcoming text elements.\r\n   * See output of jsPDF.getFontList() for possible font names, styles.\r\n   *\r\n   * @param {string} fontName Font name or family. Example: \"times\".\r\n   * @param {string} fontStyle Font style or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFont\r\n   */\r\n  API.setFont = function(fontName, fontStyle, fontWeight) {\r\n    if (fontWeight) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    activeFontKey = getFont(fontName, fontStyle, {\r\n      disableWarning: false\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets text font face, variant for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {Object}\r\n   * @memberof jsPDF#\r\n   * @name getFont\r\n   */\r\n  var getFontEntry = (API.__private__.getFont = API.getFont = function() {\r\n    return fonts[getFont.apply(API, arguments)];\r\n  });\r\n\r\n  /**\r\n   * Returns an object - a tree of fontName to fontStyle relationships available to\r\n   * active PDF document.\r\n   *\r\n   * @public\r\n   * @function\r\n   * @instance\r\n   * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }\r\n   * @memberof jsPDF#\r\n   * @name getFontList\r\n   */\r\n  API.__private__.getFontList = API.getFontList = function() {\r\n    var list = {},\r\n      fontName,\r\n      fontStyle;\r\n\r\n    for (fontName in fontmap) {\r\n      if (fontmap.hasOwnProperty(fontName)) {\r\n        list[fontName] = [];\r\n        for (fontStyle in fontmap[fontName]) {\r\n          if (fontmap[fontName].hasOwnProperty(fontStyle)) {\r\n            list[fontName].push(fontStyle);\r\n          }\r\n        }\r\n      }\r\n    }\r\n    return list;\r\n  };\r\n\r\n  /**\r\n   * Add a custom font to the current instance.\r\n   *\r\n   * @param {string} postScriptName PDF specification full name for the font.\r\n   * @param {string} id PDF-document-instance-specific label assinged to the font.\r\n   * @param {string} fontStyle Style of the Font.\r\n   * @param {number | string} fontWeight Weight of the Font.\r\n   * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @name addFont\r\n   * @returns {string} fontId\r\n   */\r\n  API.addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    fontWeight,\r\n    encoding\r\n  ) {\r\n    var encodingOptions = [\r\n      \"StandardEncoding\",\r\n      \"MacRomanEncoding\",\r\n      \"Identity-H\",\r\n      \"WinAnsiEncoding\"\r\n    ];\r\n    if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {\r\n      //IE 11 fix\r\n      encoding = arguments[3];\r\n    } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    encoding = encoding || \"Identity-H\";\r\n    return addFont.call(this, postScriptName, fontName, fontStyle, encoding);\r\n  };\r\n\r\n  var lineWidth = options.lineWidth || 0.200025; // 2mm\r\n  /**\r\n   * Gets the line width, default: 0.200025.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineWidth\r\n   * @memberof jsPDF#\r\n   * @name getLineWidth\r\n   */\r\n  var getLineWidth = (API.__private__.getLineWidth = API.getLineWidth = function() {\r\n    return lineWidth;\r\n  });\r\n\r\n  /**\r\n   * Sets line width for upcoming lines.\r\n   *\r\n   * @param {number} width Line width (in units declared at inception of PDF document).\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineWidth\r\n   */\r\n  var setLineWidth = (API.__private__.setLineWidth = API.setLineWidth = function(\r\n    width\r\n  ) {\r\n    lineWidth = width;\r\n    out(hpf(scale(width)) + \" w\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Sets the dash pattern for upcoming lines.\r\n   *\r\n   * To reset the settings simply call the method without any parameters.\r\n   * @param {Array<number>} dashArray An array containing 0-2 numbers. The first number sets the length of the\r\n   * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered\r\n   * to be as long as the dashes. An empty array means solid, unbroken lines.\r\n   * @param {number} dashPhase The phase lines start with.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineDashPattern\r\n   */\r\n  API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function(\r\n    dashArray,\r\n    dashPhase\r\n  ) {\r\n    dashArray = dashArray || [];\r\n    dashPhase = dashPhase || 0;\r\n\r\n    if (isNaN(dashPhase) || !Array.isArray(dashArray)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setLineDash\");\r\n    }\r\n\r\n    dashArray = dashArray\r\n      .map(function(x) {\r\n        return hpf(scale(x));\r\n      })\r\n      .join(\" \");\r\n    dashPhase = hpf(scale(dashPhase));\r\n\r\n    out(\"[\" + dashArray + \"] \" + dashPhase + \" d\");\r\n    return this;\r\n  };\r\n\r\n  var lineHeightFactor;\r\n\r\n  var getLineHeight = (API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  });\r\n\r\n  API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  };\r\n\r\n  /**\r\n   * Sets the LineHeightFactor of proportion.\r\n   *\r\n   * @param {number} value LineHeightFactor value. Default: 1.15.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineHeightFactor\r\n   */\r\n  var setLineHeightFactor = (API.__private__.setLineHeightFactor = API.setLineHeightFactor = function(\r\n    value\r\n  ) {\r\n    value = value || 1.15;\r\n    if (typeof value === \"number\") {\r\n      lineHeightFactor = value;\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Gets the LineHeightFactor, default: 1.15.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineHeightFactor\r\n   * @memberof jsPDF#\r\n   * @name getLineHeightFactor\r\n   */\r\n  var getLineHeightFactor = (API.__private__.getLineHeightFactor = API.getLineHeightFactor = function() {\r\n    return lineHeightFactor;\r\n  });\r\n\r\n  setLineHeightFactor(options.lineHeight);\r\n\r\n  var getHorizontalCoordinate = (API.__private__.getHorizontalCoordinate = function(\r\n    value\r\n  ) {\r\n    return scale(value);\r\n  });\r\n\r\n  var getVerticalCoordinate = (API.__private__.getVerticalCoordinate = function(\r\n    value\r\n  ) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      return value;\r\n    } else {\r\n      var pageHeight =\r\n        pagesContext[currentPage].mediaBox.topRightY -\r\n        pagesContext[currentPage].mediaBox.bottomLeftY;\r\n      return pageHeight - scale(value);\r\n    }\r\n  });\r\n\r\n  var getHorizontalCoordinateString = (API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getHorizontalCoordinate(value));\r\n  });\r\n\r\n  var getVerticalCoordinateString = (API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getVerticalCoordinate(value));\r\n  });\r\n\r\n  var strokeColor = options.strokeColor || \"0 G\";\r\n\r\n  /**\r\n   *  Gets the stroke color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getDrawColor\r\n   */\r\n  API.__private__.getStrokeColor = API.getDrawColor = function() {\r\n    return decodeColorString(strokeColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the stroke color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDrawColor\r\n   */\r\n  API.__private__.setStrokeColor = API.setDrawColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"draw\",\r\n      precision: 2\r\n    };\r\n\r\n    strokeColor = encodeColorString(options);\r\n    out(strokeColor);\r\n    return this;\r\n  };\r\n\r\n  var fillColor = options.fillColor || \"0 g\";\r\n\r\n  /**\r\n   * Gets the fill color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getFillColor\r\n   */\r\n  API.__private__.getFillColor = API.getFillColor = function() {\r\n    return decodeColorString(fillColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the fill color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFillColor\r\n   */\r\n  API.__private__.setFillColor = API.setFillColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"fill\",\r\n      precision: 2\r\n    };\r\n\r\n    fillColor = encodeColorString(options);\r\n    out(fillColor);\r\n    return this;\r\n  };\r\n\r\n  var textColor = options.textColor || \"0 g\";\r\n  /**\r\n   * Gets the text color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getTextColor\r\n   */\r\n  var getTextColor = (API.__private__.getTextColor = API.getTextColor = function() {\r\n    return decodeColorString(textColor);\r\n  });\r\n  /**\r\n   * Sets the text color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setTextColor\r\n   */\r\n  API.__private__.setTextColor = API.setTextColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"text\",\r\n      precision: 3\r\n    };\r\n    textColor = encodeColorString(options);\r\n\r\n    return this;\r\n  };\r\n\r\n  var activeCharSpace = options.charSpace;\r\n\r\n  /**\r\n   * Get global value of CharSpace.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} charSpace\r\n   * @memberof jsPDF#\r\n   * @name getCharSpace\r\n   */\r\n  var getCharSpace = (API.__private__.getCharSpace = API.getCharSpace = function() {\r\n    return parseFloat(activeCharSpace || 0);\r\n  });\r\n\r\n  /**\r\n   * Set global value of CharSpace.\r\n   *\r\n   * @param {number} charSpace\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setCharSpace\r\n   */\r\n  API.__private__.setCharSpace = API.setCharSpace = function(charSpace) {\r\n    if (isNaN(charSpace)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCharSpace\");\r\n    }\r\n    activeCharSpace = charSpace;\r\n    return this;\r\n  };\r\n\r\n  var lineCapID = 0;\r\n  /**\r\n   * Is an Object providing a mapping from human-readable to\r\n   * integer flag values designating the varieties of line cap\r\n   * and join styles.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name CapJoinStyles\r\n   */\r\n  API.CapJoinStyles = {\r\n    0: 0,\r\n    butt: 0,\r\n    but: 0,\r\n    miter: 0,\r\n    1: 1,\r\n    round: 1,\r\n    rounded: 1,\r\n    circle: 1,\r\n    2: 2,\r\n    projecting: 2,\r\n    project: 2,\r\n    square: 2,\r\n    bevel: 2\r\n  };\r\n\r\n  /**\r\n   * Sets the line cap styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line cap.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineCap\r\n   */\r\n  API.__private__.setLineCap = API.setLineCap = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line cap style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineCapID = id;\r\n    out(id + \" J\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var lineJoinID = 0;\r\n  /**\r\n   * Sets the line join styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line join.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineJoin\r\n   */\r\n  API.__private__.setLineJoin = API.setLineJoin = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line join style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineJoinID = id;\r\n    out(id + \" j\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var miterLimit;\r\n  /**\r\n   * Sets the miterLimit property, which effects the maximum miter length.\r\n   *\r\n   * @param {number} length The length of the miter\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineMiterLimit\r\n   */\r\n  API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function(\r\n    length\r\n  ) {\r\n    length = length || 0;\r\n    if (isNaN(length)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setLineMiterLimit\");\r\n    }\r\n    out(hpf(scale(length)) + \" M\");\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * An object representing a pdf graphics state.\r\n   * @class GState\r\n   */\r\n\r\n  /**\r\n   *\r\n   * @param parameters A parameter object that contains all properties this graphics state wants to set.\r\n   * Supported are: opacity, stroke-opacity\r\n   * @constructor\r\n   */\r\n  API.GState = GState;\r\n\r\n  /**\r\n   * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.\r\n   * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState\r\n   * it will be added before use.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setGState\r\n   */\r\n  API.setGState = function(gState) {\r\n    if (typeof gState === \"string\") {\r\n      gState = gStates[gStatesMap[gState]];\r\n    } else {\r\n      gState = addGState(null, gState);\r\n    }\r\n\r\n    if (!gState.equals(activeGState)) {\r\n      out(\"/\" + gState.id + \" gs\");\r\n      activeGState = gState;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Adds a new Graphics State. Duplicates are automatically eliminated.\r\n   * @param {String} key Might also be null, if no later reference to this gState is needed\r\n   * @param {Object} gState The gState object\r\n   */\r\n  var addGState = function(key, gState) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (key && gStatesMap[key]) return;\r\n    var duplicate = false;\r\n    for (var s in gStates) {\r\n      if (gStates.hasOwnProperty(s)) {\r\n        if (gStates[s].equals(gState)) {\r\n          duplicate = true;\r\n          break;\r\n        }\r\n      }\r\n    }\r\n\r\n    if (duplicate) {\r\n      gState = gStates[s];\r\n    } else {\r\n      var gStateKey = \"GS\" + (Object.keys(gStates).length + 1).toString(10);\r\n      gStates[gStateKey] = gState;\r\n      gState.id = gStateKey;\r\n    }\r\n\r\n    // several user keys may point to the same GState object\r\n    key && (gStatesMap[key] = gState.id);\r\n\r\n    events.publish(\"addGState\", gState);\r\n\r\n    return gState;\r\n  };\r\n\r\n  /**\r\n   * Adds a new {@link GState} for later use. See {@link setGState}.\r\n   * @param {String} key\r\n   * @param {GState} gState\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addGState\r\n   */\r\n  API.addGState = function(key, gState) {\r\n    addGState(key, gState);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Saves the current graphics state (\"pushes it on the stack\"). It can be restored by {@link restoreGraphicsState}\r\n   * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,\r\n   * fill and stroke colors etc.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name saveGraphicsState\r\n   */\r\n  API.saveGraphicsState = function() {\r\n    out(\"q\");\r\n    // as we cannot set font key and size independently we must keep track of both\r\n    fontStateStack.push({\r\n      key: activeFontKey,\r\n      size: activeFontSize,\r\n      color: textColor\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Restores a previously saved graphics state saved by {@link saveGraphicsState} (\"pops the stack\").\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name restoreGraphicsState\r\n   */\r\n  API.restoreGraphicsState = function() {\r\n    out(\"Q\");\r\n\r\n    // restore previous font state\r\n    var fontState = fontStateStack.pop();\r\n    activeFontKey = fontState.key;\r\n    activeFontSize = fontState.size;\r\n    textColor = fontState.color;\r\n\r\n    activeGState = null;\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Appends this matrix to the left of all previously applied matrices.\r\n   *\r\n   * @param {Matrix} matrix\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setCurrentTransformationMatrix\r\n   */\r\n  API.setCurrentTransformationMatrix = function(matrix) {\r\n    out(matrix.toString() + \" cm\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Inserts a debug comment into the generated pdf.\r\n   * @function\r\n   * @instance\r\n   * @param {String} text\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name comment\r\n   */\r\n  API.comment = function(text) {\r\n    out(\"#\" + text);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Point\r\n   */\r\n  var Point = function(x, y) {\r\n    var _x = x || 0;\r\n    Object.defineProperty(this, \"x\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _x;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _x = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _y = y || 0;\r\n    Object.defineProperty(this, \"y\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _y;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _y = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _type = \"pt\";\r\n    Object.defineProperty(this, \"type\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _type;\r\n      },\r\n      set: function(value) {\r\n        _type = value.toString();\r\n      }\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Rectangle\r\n   */\r\n  var Rectangle = function(x, y, w, h) {\r\n    Point.call(this, x, y);\r\n    this.type = \"rect\";\r\n\r\n    var _w = w || 0;\r\n    Object.defineProperty(this, \"w\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _w;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _w = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _h = h || 0;\r\n    Object.defineProperty(this, \"h\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _h;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _h = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * FormObject/RenderTarget\r\n   */\r\n\r\n  var RenderTarget = function() {\r\n    this.page = page;\r\n    this.currentPage = currentPage;\r\n    this.pages = pages.slice(0);\r\n    this.pagesContext = pagesContext.slice(0);\r\n    this.x = pageX;\r\n    this.y = pageY;\r\n    this.matrix = pageMatrix;\r\n    this.width = getPageWidth(currentPage);\r\n    this.height = getPageHeight(currentPage);\r\n    this.outputDestination = outputDestination;\r\n\r\n    this.id = \"\"; // set by endFormObject()\r\n    this.objectNumber = -1; // will be set by putXObject()\r\n  };\r\n\r\n  RenderTarget.prototype.restore = function() {\r\n    page = this.page;\r\n    currentPage = this.currentPage;\r\n    pagesContext = this.pagesContext;\r\n    pages = this.pages;\r\n    pageX = this.x;\r\n    pageY = this.y;\r\n    pageMatrix = this.matrix;\r\n    setPageWidth(currentPage, this.width);\r\n    setPageHeight(currentPage, this.height);\r\n    outputDestination = this.outputDestination;\r\n  };\r\n\r\n  var beginNewRenderTarget = function(x, y, width, height, matrix) {\r\n    // save current state\r\n    renderTargetStack.push(new RenderTarget());\r\n\r\n    // clear pages\r\n    page = currentPage = 0;\r\n    pages = [];\r\n    pageX = x;\r\n    pageY = y;\r\n\r\n    pageMatrix = matrix;\r\n\r\n    beginPage([width, height]);\r\n  };\r\n\r\n  var endFormObject = function(key) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (renderTargetMap[key]) {\r\n      renderTargetStack.pop().restore();\r\n      return;\r\n    }\r\n\r\n    // save the created xObject\r\n    var newXObject = new RenderTarget();\r\n\r\n    var xObjectId = \"Xo\" + (Object.keys(renderTargets).length + 1).toString(10);\r\n    newXObject.id = xObjectId;\r\n\r\n    renderTargetMap[key] = xObjectId;\r\n    renderTargets[xObjectId] = newXObject;\r\n\r\n    events.publish(\"addFormObject\", newXObject);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  /**\r\n   * Starts a new pdf form object, which means that all consequent draw calls target a new independent object\r\n   * until {@link endFormObject} is called. The created object can be referenced and drawn later using\r\n   * {@link doFormObject}. Nested form objects are possible.\r\n   * x, y, width, height set the bounding box that is used to clip the content.\r\n   *\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @param {number} width\r\n   * @param {number} height\r\n   * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to\r\n   * the parent's.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name beginFormObject\r\n   */\r\n  API.beginFormObject = function(x, y, width, height, matrix) {\r\n    // The user can set the output target to a new form object. Nested form objects are possible.\r\n    // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as\r\n    // the PDF-Spec states:\r\n    // \"In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which\r\n    // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,\r\n    // form XObjects may be independent of the content streams in which they appear, and this is strongly\r\n    // recommended although not required\"\r\n    beginNewRenderTarget(x, y, width, height, matrix);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Completes and saves the form object.\r\n   * @param {String} key The key by which this form object can be referenced.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name endFormObject\r\n   */\r\n  API.endFormObject = function(key) {\r\n    endFormObject(key);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Draws the specified form object by referencing to the respective pdf XObject created with\r\n   * {@link API.beginFormObject} and {@link endFormObject}.\r\n   * The location is determined by matrix.\r\n   *\r\n   * @param {String} key The key to the form object.\r\n   * @param {Matrix} matrix The matrix applied before drawing the form object.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name doFormObject\r\n   */\r\n  API.doFormObject = function(key, matrix) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    out(\"q\");\r\n    out(matrix.toString() + \" cm\");\r\n    out(\"/\" + xObject.id + \" Do\");\r\n    out(\"Q\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Returns the form object specified by key.\r\n   * @param key {String}\r\n   * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name getFormObject\r\n   */\r\n  API.getFormObject = function(key) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    return {\r\n      x: xObject.x,\r\n      y: xObject.y,\r\n      width: xObject.width,\r\n      height: xObject.height,\r\n      matrix: xObject.matrix\r\n    };\r\n  };\r\n\r\n  /**\r\n   * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').\r\n   * Uses FileSaver.js-method saveAs.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name save\r\n   * @function\r\n   * @instance\r\n   * @param  {string} filename The filename including extension.\r\n   * @param  {Object} options An Object with additional options, possible options: 'returnPromise'.\r\n   * @returns {jsPDF|Promise} jsPDF-instance     */\r\n  API.save = function(filename, options) {\r\n    filename = filename || \"generated.pdf\";\r\n\r\n    options = options || {};\r\n    options.returnPromise = options.returnPromise || false;\r\n\r\n\r\n    // eslint-disable-next-line no-unreachable\r\n    var fs = require(\"fs\");\r\n    var buffer = Buffer.from(getArrayBuffer(buildDocument()));\r\n    if (options.returnPromise === false) {\r\n      fs.writeFileSync(filename, buffer);\r\n    } else {\r\n      return new Promise(function(resolve, reject) {\r\n        fs.writeFile(filename, buffer, function(err) {\r\n          if (err) {\r\n            reject(err);\r\n          } else {\r\n            resolve();\r\n          }\r\n        });\r\n      });\r\n    }\r\n  };\r\n\r\n  // applying plugins (more methods) ON TOP of built-in API.\r\n  // this is intentional as we allow plugins to override\r\n  // built-ins\r\n  for (var plugin in jsPDF.API) {\r\n    if (jsPDF.API.hasOwnProperty(plugin)) {\r\n      if (plugin === \"events\" && jsPDF.API.events.length) {\r\n        (function(events, newEvents) {\r\n          // jsPDF.API.events is a JS Array of Arrays\r\n          // where each Array is a pair of event name, handler\r\n          // Events were added by plugins to the jsPDF instantiator.\r\n          // These are always added to the new instance and some ran\r\n          // during instantiation.\r\n          var eventname, handler_and_args, i;\r\n\r\n          for (i = newEvents.length - 1; i !== -1; i--) {\r\n            // subscribe takes 3 args: 'topic', function, runonce_flag\r\n            // if undefined, runonce is false.\r\n            // users can attach callback directly,\r\n            // or they can attach an array with [callback, runonce_flag]\r\n            // that's what the \"apply\" magic is for below.\r\n            eventname = newEvents[i][0];\r\n            handler_and_args = newEvents[i][1];\r\n            events.subscribe.apply(\r\n              events,\r\n              [eventname].concat(\r\n                typeof handler_and_args === \"function\"\r\n                  ? [handler_and_args]\r\n                  : handler_and_args\r\n              )\r\n            );\r\n          }\r\n        })(events, jsPDF.API.events);\r\n      } else {\r\n        API[plugin] = jsPDF.API[plugin];\r\n      }\r\n    }\r\n  }\r\n\r\n  var getPageWidth = (API.getPageWidth = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightX -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftX) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageWidth = (API.setPageWidth = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightX =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;\r\n  });\r\n\r\n  var getPageHeight = (API.getPageHeight = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightY -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftY) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageHeight = (API.setPageHeight = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightY =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;\r\n  });\r\n\r\n  /**\r\n   * Object exposing internal API to plugins\r\n   * @public\r\n   * @ignore\r\n   */\r\n  API.internal = {\r\n    pdfEscape: pdfEscape,\r\n    getStyle: getStyle,\r\n    getFont: getFontEntry,\r\n    getFontSize: getFontSize,\r\n    getCharSpace: getCharSpace,\r\n    getTextColor: getTextColor,\r\n    getLineHeight: getLineHeight,\r\n    getLineHeightFactor: getLineHeightFactor,\r\n    getLineWidth: getLineWidth,\r\n    write: write,\r\n    getHorizontalCoordinate: getHorizontalCoordinate,\r\n    getVerticalCoordinate: getVerticalCoordinate,\r\n    getCoordinateString: getHorizontalCoordinateString,\r\n    getVerticalCoordinateString: getVerticalCoordinateString,\r\n    collections: {},\r\n    newObject: newObject,\r\n    newAdditionalObject: newAdditionalObject,\r\n    newObjectDeferred: newObjectDeferred,\r\n    newObjectDeferredBegin: newObjectDeferredBegin,\r\n    getFilters: getFilters,\r\n    putStream: putStream,\r\n    events: events,\r\n    scaleFactor: scaleFactor,\r\n    pageSize: {\r\n      getWidth: function() {\r\n        return getPageWidth(currentPage);\r\n      },\r\n      setWidth: function(value) {\r\n        setPageWidth(currentPage, value);\r\n      },\r\n      getHeight: function() {\r\n        return getPageHeight(currentPage);\r\n      },\r\n      setHeight: function(value) {\r\n        setPageHeight(currentPage, value);\r\n      }\r\n    },\r\n    encryptionOptions: encryptionOptions,\r\n    encryption: encryption,\r\n    getEncryptor: getEncryptor,\r\n    output: output,\r\n    getNumberOfPages: getNumberOfPages,\r\n    pages: pages,\r\n    out: out,\r\n    f2: f2,\r\n    f3: f3,\r\n    getPageInfo: getPageInfo,\r\n    getPageInfoByObjId: getPageInfoByObjId,\r\n    getCurrentPageInfo: getCurrentPageInfo,\r\n    getPDFVersion: getPdfVersion,\r\n    Point: Point,\r\n    Rectangle: Rectangle,\r\n    Matrix: Matrix,\r\n    hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.\r\n  };\r\n\r\n  Object.defineProperty(API.internal.pageSize, \"width\", {\r\n    get: function() {\r\n      return getPageWidth(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageWidth(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n  Object.defineProperty(API.internal.pageSize, \"height\", {\r\n    get: function() {\r\n      return getPageHeight(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageHeight(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n\r\n  //////////////////////////////////////////////////////\r\n  // continuing initialization of jsPDF Document object\r\n  //////////////////////////////////////////////////////\r\n  // Add the first page automatically\r\n  addFonts.call(API, standardFonts);\r\n  activeFontKey = \"F1\";\r\n  _addPage(format, orientation);\r\n\r\n  events.publish(\"initialized\");\r\n  return API;\r\n}\r\n\r\n/**\r\n * jsPDF.API is a STATIC property of jsPDF class.\r\n * jsPDF.API is an object you can add methods and properties to.\r\n * The methods / properties you add will show up in new jsPDF objects.\r\n *\r\n * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,\r\n * callbacks to this object. These will be reassigned to all new instances of jsPDF.\r\n *\r\n * @static\r\n * @public\r\n * @memberof jsPDF#\r\n * @name API\r\n *\r\n * @example\r\n * jsPDF.API.mymethod = function(){\r\n *   // 'this' will be ref to internal API object. see jsPDF source\r\n *   // , so you can refer to built-in methods like so:\r\n *   //     this.line(....)\r\n *   //     this.text(....)\r\n * }\r\n * var pdfdoc = new jsPDF()\r\n * pdfdoc.mymethod() // <- !!!!!!\r\n */\r\njsPDF.API = {\r\n  events: []\r\n};\r\n/**\r\n * The version of jsPDF.\r\n * @name version\r\n * @type {string}\r\n * @memberof jsPDF#\r\n */\r\njsPDF.version = \"0.0.0\";\r\n\r\nexport { jsPDF, ShadingPattern, TilingPattern, GState };\r\nexport default jsPDF;\r\n","/* global jsPDF */\n/**\n * @license\n * Copyright (c) 2016 Alexander Weidt,\n * https://github.com/BiggA94\n *\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF AcroForm Plugin\n * @module AcroForm\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\nvar jsPDFAPI = jsPDF.API;\nvar scaleFactor = 1;\n\nvar pdfEscape = function(value) {\n  return value\n    .replace(/\\\\/g, \"\\\\\\\\\")\n    .replace(/\\(/g, \"\\\\(\")\n    .replace(/\\)/g, \"\\\\)\");\n};\nvar pdfUnescape = function(value) {\n  return value\n    .replace(/\\\\\\\\/g, \"\\\\\")\n    .replace(/\\\\\\(/g, \"(\")\n    .replace(/\\\\\\)/g, \")\");\n};\n\nvar f2 = function(number) {\n  return number.toFixed(2); // Ie, %.2f\n};\n\nvar f5 = function(number) {\n  return number.toFixed(5); // Ie, %.2f\n};\n\njsPDFAPI.__acroform__ = {};\nvar inherit = function(child, parent) {\n  child.prototype = Object.create(parent.prototype);\n  child.prototype.constructor = child;\n};\n\nvar scale = function(x) {\n  return x * scaleFactor;\n};\n\nvar createFormXObject = function(formObject) {\n  var xobj = new AcroFormXObject();\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];\n  return xobj;\n};\n\n/**\n * Bit-Operations\n */\nvar setBit = (jsPDFAPI.__acroform__.setBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number |= bitMask;\n\n  return number;\n});\n\nvar clearBit = (jsPDFAPI.__acroform__.clearBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number &= ~bitMask;\n\n  return number;\n});\n\nvar getBit = (jsPDFAPI.__acroform__.getBit = function(number, bitPosition) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBit\"\n    );\n  }\n  return (number & (1 << bitPosition)) === 0 ? 0 : 1;\n});\n\n/*\n * Ff starts counting the bit position at 1 and not like javascript at 0\n */\nvar getBitForPdf = (jsPDFAPI.__acroform__.getBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf\"\n    );\n  }\n  return getBit(number, bitPosition - 1);\n});\n\nvar setBitForPdf = (jsPDFAPI.__acroform__.setBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf\"\n    );\n  }\n  return setBit(number, bitPosition - 1);\n});\n\nvar clearBitForPdf = (jsPDFAPI.__acroform__.clearBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf\"\n    );\n  }\n  return clearBit(number, bitPosition - 1);\n});\n\nvar calculateCoordinates = (jsPDFAPI.__acroform__.calculateCoordinates = function(\n  args,\n  scope\n) {\n  var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;\n  var getVerticalCoordinate = scope.internal.getVerticalCoordinate;\n  var x = args[0];\n  var y = args[1];\n  var w = args[2];\n  var h = args[3];\n\n  var coordinates = {};\n\n  coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;\n  coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;\n  coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;\n  coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;\n\n  return [\n    Number(f2(coordinates.lowerLeft_X)),\n    Number(f2(coordinates.lowerLeft_Y)),\n    Number(f2(coordinates.upperRight_X)),\n    Number(f2(coordinates.upperRight_Y))\n  ];\n});\n\nvar calculateAppearanceStream = function(formObject) {\n  if (formObject.appearanceStreamContent) {\n    return formObject.appearanceStreamContent;\n  }\n\n  if (!formObject.V && !formObject.DV) {\n    return;\n  }\n\n  // else calculate it\n\n  var stream = [];\n  var text = formObject._V || formObject.DV;\n  var calcRes = calculateX(formObject, text);\n  var fontKey = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  ).id;\n\n  //PDF 32000-1:2008, page 444\n  stream.push(\"/Tx BMC\");\n  stream.push(\"q\");\n  stream.push(\"BT\"); // Begin Text\n  stream.push(formObject.scope.__private__.encodeColorString(formObject.color));\n  stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf\");\n  stream.push(\"1 0 0 1 0 0 Tm\"); // Transformation Matrix\n  stream.push(calcRes.text);\n  stream.push(\"ET\"); // End Text\n  stream.push(\"Q\");\n  stream.push(\"EMC\");\n\n  var appearanceStreamContent = createFormXObject(formObject);\n  appearanceStreamContent.scope = formObject.scope;\n  appearanceStreamContent.stream = stream.join(\"\\n\");\n  return appearanceStreamContent;\n};\n\nvar calculateX = function(formObject, text) {\n  var maxFontSize =\n    formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;\n  var returnValue = {\n    text: \"\",\n    fontSize: \"\"\n  };\n  // Remove Brackets\n  text = text.substr(0, 1) == \"(\" ? text.substr(1) : text;\n  text =\n    text.substr(text.length - 1) == \")\"\n      ? text.substr(0, text.length - 1)\n      : text;\n  // split into array of words\n  var textSplit = text.split(\" \");\n  if (formObject.multiline) {\n    textSplit = textSplit.map(word => word.split(\"\\n\"));\n  } else {\n    textSplit = textSplit.map(word => [word]);\n  }\n\n  var fontSize = maxFontSize; // The Starting fontSize (The Maximum)\n  var lineSpacing = 2;\n  var borderPadding = 2;\n\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  height = height < 0 ? -height : height;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  width = width < 0 ? -width : width;\n\n  var isSmallerThanWidth = function(i, lastLine, fontSize) {\n    if (i + 1 < textSplit.length) {\n      var tmp = lastLine + \" \" + textSplit[i + 1][0];\n      var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;\n      var FieldWidth = width - 2 * borderPadding;\n      return TextWidth <= FieldWidth;\n    } else {\n      return false;\n    }\n  };\n\n  fontSize++;\n  FontSize: while (fontSize > 0) {\n    text = \"\";\n    fontSize--;\n    var textHeight = calculateFontSpace(\"3\", formObject, fontSize).height;\n    var startY = formObject.multiline\n      ? height - fontSize\n      : (height - textHeight) / 2;\n    startY += lineSpacing;\n    var startX;\n\n    var lastY = startY;\n    var firstWordInLine = 0,\n      lastWordInLine = 0;\n    var lastLength;\n    var currWord = 0;\n\n    if (fontSize <= 0) {\n      // In case, the Text doesn't fit at all\n      fontSize = 12;\n      text = \"(...) Tj\\n\";\n      text +=\n        \"% Width of Text: \" +\n        calculateFontSpace(text, formObject, fontSize).width +\n        \", FieldWidth:\" +\n        width +\n        \"\\n\";\n      break;\n    }\n\n    var lastLine = \"\";\n    var lineCount = 0;\n    Line: for (var i = 0; i < textSplit.length; i++) {\n      if (textSplit.hasOwnProperty(i)) {\n        let isWithNewLine = false;\n        if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {\n          if (\n            (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n            height\n          ) {\n            continue FontSize;\n          }\n\n          lastLine += textSplit[i][currWord];\n          isWithNewLine = true;\n          lastWordInLine = i;\n          i--;\n        } else {\n          lastLine += textSplit[i][currWord] + \" \";\n          lastLine =\n            lastLine.substr(lastLine.length - 1) == \" \"\n              ? lastLine.substr(0, lastLine.length - 1)\n              : lastLine;\n          var key = parseInt(i);\n          var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);\n          var isLastWord = i >= textSplit.length - 1;\n\n          if (nextLineIsSmaller && !isLastWord) {\n            lastLine += \" \";\n            currWord = 0;\n            continue; // Line\n          } else if (!nextLineIsSmaller && !isLastWord) {\n            if (!formObject.multiline) {\n              continue FontSize;\n            } else {\n              if (\n                (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n              ) {\n                // If the Text is higher than the\n                // FieldObject\n                continue FontSize;\n              }\n              lastWordInLine = key;\n              // go on\n            }\n          } else if (isLastWord) {\n            lastWordInLine = key;\n          } else {\n            if (\n              formObject.multiline &&\n              (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n            ) {\n              // If the Text is higher than the FieldObject\n              continue FontSize;\n            }\n          }\n        }\n        // Remove last blank\n\n        var line = \"\";\n\n        for (var x = firstWordInLine; x <= lastWordInLine; x++) {\n          var currLine = textSplit[x];\n          if (formObject.multiline) {\n            if (x === lastWordInLine) {\n              line += currLine[currWord] + \" \";\n              currWord = (currWord + 1) % currLine.length;\n              continue;\n            }\n            if (x === firstWordInLine) {\n              line += currLine[currLine.length - 1] + \" \";\n              continue;\n            }\n          }\n          line += currLine[0] + \" \";\n        }\n\n        // Remove last blank\n        line =\n          line.substr(line.length - 1) == \" \"\n            ? line.substr(0, line.length - 1)\n            : line;\n        // lastLength -= blankSpace.width;\n        lastLength = calculateFontSpace(line, formObject, fontSize).width;\n\n        // Calculate startX\n        switch (formObject.textAlign) {\n          case \"right\":\n            startX = width - lastLength - borderPadding;\n            break;\n          case \"center\":\n            startX = (width - lastLength) / 2;\n            break;\n          case \"left\":\n          default:\n            startX = borderPadding;\n            break;\n        }\n        text += f2(startX) + \" \" + f2(lastY) + \" Td\\n\";\n        text += \"(\" + pdfEscape(line) + \") Tj\\n\";\n        // reset X in PDF\n        text += -f2(startX) + \" 0 Td\\n\";\n\n        // After a Line, adjust y position\n        lastY = -(fontSize + lineSpacing);\n\n        // Reset for next iteration step\n        lastLength = 0;\n        firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;\n        lineCount++;\n\n        lastLine = \"\";\n        continue Line;\n      }\n    }\n    break;\n  }\n\n  returnValue.text = text;\n  returnValue.fontSize = fontSize;\n\n  return returnValue;\n};\n\n/**\n * Small workaround for calculating the TextMetric approximately.\n *\n * @param text\n * @param fontsize\n * @returns {TextMetrics} (Has Height and Width)\n */\nvar calculateFontSpace = function(text, formObject, fontSize) {\n  var font = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  );\n  var width =\n    formObject.scope.getStringUnitWidth(text, {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) * parseFloat(fontSize);\n  var height =\n    formObject.scope.getStringUnitWidth(\"3\", {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) *\n    parseFloat(fontSize) *\n    1.5;\n  return { height: height, width: width };\n};\n\nvar acroformPluginTemplate = {\n  fields: [],\n  xForms: [],\n  /**\n   * acroFormDictionaryRoot contains information about the AcroForm\n   * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has\n   * 1: The Object ID of the Root\n   */\n  acroFormDictionaryRoot: null,\n  /**\n   * After the PDF gets evaluated, the reference to the root has to be\n   * reset, this indicates, whether the root has already been printed\n   * out\n   */\n  printedOut: false,\n  internal: null,\n  isInitialized: false\n};\n\nvar annotReferenceCallback = function(scope) {\n  //set objId to undefined and force it to get a new objId on buildDocument\n  scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;\n  var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n  for (var i in fields) {\n    if (fields.hasOwnProperty(i)) {\n      var formObject = fields[i];\n      //set objId to undefined and force it to get a new objId on buildDocument\n      formObject.objId = undefined;\n      // add Annot Reference!\n      if (formObject.hasAnnotation) {\n        // If theres an Annotation Widget in the Form Object, put the\n        // Reference in the /Annot array\n        createAnnotationReference(formObject, scope);\n      }\n    }\n  }\n};\n\nvar putForm = function(formObject) {\n  if (formObject.scope.internal.acroformPlugin.printedOut) {\n    formObject.scope.internal.acroformPlugin.printedOut = false;\n    formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;\n  }\n  formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(\n    formObject\n  );\n};\n/**\n * Create the Reference to the widgetAnnotation, so that it gets referenced\n * in the Annot[] int the+ (Requires the Annotation Plugin)\n */\nvar createAnnotationReference = function(object, scope) {\n  var options = {\n    type: \"reference\",\n    object: object\n  };\n  var findEntry = function(entry) {\n    return entry.type === options.type && entry.object === options.object;\n  };\n  if (\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.find(findEntry) === undefined\n  ) {\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.push(options);\n  }\n};\n\n// Callbacks\n\nvar putCatalogCallback = function(scope) {\n  // Put reference to AcroForm to DocumentCatalog\n  if (\n    typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== \"undefined\"\n  ) {\n    // for safety, shouldn't normally be the case\n    scope.internal.write(\n      \"/AcroForm \" +\n        scope.internal.acroformPlugin.acroFormDictionaryRoot.objId +\n        \" \" +\n        0 +\n        \" R\"\n    );\n  } else {\n    throw new Error(\"putCatalogCallback: Root missing.\");\n  }\n};\n\n/**\n * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm\n * Dictionary\n */\nvar AcroFormDictionaryCallback = function(scope) {\n  // Remove event\n  scope.internal.events.unsubscribe(\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID\n  );\n  delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;\n  scope.internal.acroformPlugin.printedOut = true;\n};\n\n/**\n * Creates the single Fields and writes them into the Document\n *\n * If fieldArray is set, use the fields that are inside it instead of the\n * fields from the AcroRoot (for the FormXObjects...)\n */\nvar createFieldCallback = function(fieldArray, scope) {\n  var standardFields = !fieldArray;\n\n  if (!fieldArray) {\n    // in case there is no fieldArray specified, we want to print out\n    // the Fields of the AcroForm\n    // Print out Root\n    scope.internal.newObjectDeferredBegin(\n      scope.internal.acroformPlugin.acroFormDictionaryRoot.objId,\n      true\n    );\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();\n  }\n\n  fieldArray =\n    fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;\n\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var fieldObject = fieldArray[i];\n      var keyValueList = [];\n      var oldRect = fieldObject.Rect;\n\n      if (fieldObject.Rect) {\n        fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);\n      }\n\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(\n        fieldObject\n      );\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.getKeyValueListForStream === \"function\"\n      ) {\n        keyValueList = fieldObject.getKeyValueListForStream();\n      }\n\n      fieldObject.Rect = oldRect;\n\n      if (\n        fieldObject.hasAppearanceStream &&\n        !fieldObject.appearanceStreamContent\n      ) {\n        // Calculate Appearance\n        var appearance = calculateAppearanceStream(fieldObject);\n        keyValueList.push({ key: \"AP\", value: \"<</N \" + appearance + \">>\" });\n\n        scope.internal.acroformPlugin.xForms.push(appearance);\n      }\n\n      // Assume AppearanceStreamContent is a Array with N,R,D (at least\n      // one of them!)\n      if (fieldObject.appearanceStreamContent) {\n        var appearanceStreamString = \"\";\n        // Iterate over N,R and D\n        for (var k in fieldObject.appearanceStreamContent) {\n          if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {\n            var value = fieldObject.appearanceStreamContent[k];\n            appearanceStreamString += \"/\" + k + \" \";\n            appearanceStreamString += \"<<\";\n            if (Object.keys(value).length >= 1 || Array.isArray(value)) {\n              // appearanceStream is an Array or Object!\n              for (var i in value) {\n                if (value.hasOwnProperty(i)) {\n                  var obj = value[i];\n                  if (typeof obj === \"function\") {\n                    // if Function is referenced, call it in order\n                    // to get the FormXObject\n                    obj = obj.call(scope, fieldObject);\n                  }\n                  appearanceStreamString += \"/\" + i + \" \" + obj + \" \";\n\n                  // In case the XForm is already used, e.g. OffState\n                  // of CheckBoxes, don't add it\n                  if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                    scope.internal.acroformPlugin.xForms.push(obj);\n                }\n              }\n            } else {\n              obj = value;\n              if (typeof obj === \"function\") {\n                // if Function is referenced, call it in order to\n                // get the FormXObject\n                obj = obj.call(scope, fieldObject);\n              }\n              appearanceStreamString += \"/\" + i + \" \" + obj;\n              if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                scope.internal.acroformPlugin.xForms.push(obj);\n            }\n            appearanceStreamString += \">>\";\n          }\n        }\n\n        // appearance stream is a normal Object..\n        keyValueList.push({\n          key: \"AP\",\n          value: \"<<\\n\" + appearanceStreamString + \">>\"\n        });\n      }\n\n      scope.internal.putStream({\n        additionalKeyValues: keyValueList,\n        objectId: fieldObject.objId\n      });\n\n      scope.internal.out(\"endobj\");\n    }\n  }\n  if (standardFields) {\n    createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);\n  }\n};\n\nvar createXFormObjectCallback = function(fieldArray, scope) {\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var key = i;\n      var fieldObject = fieldArray[i];\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.putStream === \"function\"\n      ) {\n        fieldObject.putStream();\n      }\n      delete fieldArray[key];\n    }\n  }\n};\n\nvar initializeAcroForm = function(scope, formObject) {\n  formObject.scope = scope;\n  if (\n    scope.internal !== undefined &&\n    (scope.internal.acroformPlugin === undefined ||\n      scope.internal.acroformPlugin.isInitialized === false)\n  ) {\n    AcroFormField.FieldNum = 0;\n    scope.internal.acroformPlugin = JSON.parse(\n      JSON.stringify(acroformPluginTemplate)\n    );\n    if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {\n      throw new Error(\"Exception while creating AcroformDictionary\");\n    }\n    scaleFactor = scope.internal.scaleFactor;\n    // The Object Number of the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope;\n\n    // add Callback for creating the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe(\n      \"postPutResources\",\n      function() {\n        AcroFormDictionaryCallback(scope);\n      }\n    );\n\n    scope.internal.events.subscribe(\"buildDocument\", function() {\n      annotReferenceCallback(scope);\n    }); // buildDocument\n\n    // Register event, that is triggered when the DocumentCatalog is\n    // written, in order to add /AcroForm\n\n    scope.internal.events.subscribe(\"putCatalog\", function() {\n      putCatalogCallback(scope);\n    });\n\n    // Register event, that creates all Fields\n    scope.internal.events.subscribe(\"postPutPages\", function(fieldArray) {\n      createFieldCallback(fieldArray, scope);\n    });\n\n    scope.internal.acroformPlugin.isInitialized = true;\n  }\n};\n\n//PDF 32000-1:2008, page 26, 7.3.6\nvar arrayToPdfArray = (jsPDFAPI.__acroform__.arrayToPdfArray = function(\n  array,\n  objId,\n  scope\n) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (Array.isArray(array)) {\n    var content = \"[\";\n    for (var i = 0; i < array.length; i++) {\n      if (i !== 0) {\n        content += \" \";\n      }\n      switch (typeof array[i]) {\n        case \"boolean\":\n        case \"number\":\n        case \"object\":\n          content += array[i].toString();\n          break;\n        case \"string\":\n          if (array[i].substr(0, 1) !== \"/\") {\n            if (typeof objId !== \"undefined\" && scope)\n              encryptor = scope.internal.getEncryptor(objId);\n            content += \"(\" + pdfEscape(encryptor(array[i].toString())) + \")\";\n          } else {\n            content += array[i].toString();\n          }\n          break;\n      }\n    }\n    content += \"]\";\n    return content;\n  }\n  throw new Error(\n    \"Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray\"\n  );\n});\nfunction getMatches(string, regex, index) {\n  index || (index = 1); // default to the first capturing group\n  var matches = [];\n  var match;\n  while ((match = regex.exec(string))) {\n    matches.push(match[index]);\n  }\n  return matches;\n}\nvar pdfArrayToStringArray = function(array) {\n  var result = [];\n  if (typeof array === \"string\") {\n    result = getMatches(array, /\\((.*?)\\)/g);\n  }\n  return result;\n};\n\nvar toPdfString = function(string, objId, scope) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (typeof objId !== \"undefined\" && scope)\n    encryptor = scope.internal.getEncryptor(objId);\n  string = string || \"\";\n  string.toString();\n  string = \"(\" + pdfEscape(encryptor(string)) + \")\";\n  return string;\n};\n\n// ##########################\n// Classes\n// ##########################\n\n/**\n * @class AcroFormPDFObject\n * @classdesc A AcroFormPDFObject\n */\nvar AcroFormPDFObject = function() {\n  this._objId = undefined;\n  this._scope = undefined;\n\n  /**\n   * @name AcroFormPDFObject#objId\n   * @type {any}\n   */\n  Object.defineProperty(this, \"objId\", {\n    get: function() {\n      if (typeof this._objId === \"undefined\") {\n        if (typeof this.scope === \"undefined\") {\n          return undefined;\n        }\n        this._objId = this.scope.internal.newObjectDeferred();\n      }\n      return this._objId;\n    },\n    set: function(value) {\n      this._objId = value;\n    }\n  });\n  Object.defineProperty(this, \"scope\", {\n    value: this._scope,\n    writable: true\n  });\n};\n\n/**\n * @function AcroFormPDFObject.toString\n */\nAcroFormPDFObject.prototype.toString = function() {\n  return this.objId + \" 0 R\";\n};\n\nAcroFormPDFObject.prototype.putStream = function() {\n  var keyValueList = this.getKeyValueListForStream();\n  this.scope.internal.putStream({\n    data: this.stream,\n    additionalKeyValues: keyValueList,\n    objectId: this.objId\n  });\n  this.scope.internal.out(\"endobj\");\n};\n\n/**\n * Returns an key-value-List of all non-configurable Variables from the Object\n *\n * @name getKeyValueListForStream\n * @returns {string}\n */\nAcroFormPDFObject.prototype.getKeyValueListForStream = function() {\n  var keyValueList = [];\n  var keys = Object.getOwnPropertyNames(this).filter(function(key) {\n    return (\n      key != \"content\" &&\n      key != \"appearanceStreamContent\" &&\n      key != \"scope\" &&\n      key != \"objId\" &&\n      key.substring(0, 1) != \"_\"\n    );\n  });\n\n  for (var i in keys) {\n    if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {\n      var key = keys[i];\n      var value = this[key];\n\n      if (value) {\n        if (Array.isArray(value)) {\n          keyValueList.push({\n            key: key,\n            value: arrayToPdfArray(value, this.objId, this.scope)\n          });\n        } else if (value instanceof AcroFormPDFObject) {\n          // In case it is a reference to another PDFObject,\n          // take the reference number\n          value.scope = this.scope;\n          keyValueList.push({ key: key, value: value.objId + \" 0 R\" });\n        } else if (typeof value !== \"function\") {\n          keyValueList.push({ key: key, value: value });\n        }\n      }\n    }\n  }\n  return keyValueList;\n};\n\nvar AcroFormXObject = function() {\n  AcroFormPDFObject.call(this);\n\n  Object.defineProperty(this, \"Type\", {\n    value: \"/XObject\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    value: \"/Form\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"FormType\", {\n    value: 1,\n    configurable: false,\n    writable: true\n  });\n\n  var _BBox = [];\n  Object.defineProperty(this, \"BBox\", {\n    configurable: false,\n    get: function() {\n      return _BBox;\n    },\n    set: function(value) {\n      _BBox = value;\n    }\n  });\n\n  Object.defineProperty(this, \"Resources\", {\n    value: \"2 0 R\",\n    configurable: false,\n    writable: true\n  });\n\n  var _stream;\n  Object.defineProperty(this, \"stream\", {\n    enumerable: false,\n    configurable: true,\n    set: function(value) {\n      _stream = value.trim();\n    },\n    get: function() {\n      if (_stream) {\n        return _stream;\n      } else {\n        return null;\n      }\n    }\n  });\n};\n\ninherit(AcroFormXObject, AcroFormPDFObject);\n\nvar AcroFormDictionary = function() {\n  AcroFormPDFObject.call(this);\n\n  var _Kids = [];\n\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      if (_Kids.length > 0) {\n        return _Kids;\n      } else {\n        return undefined;\n      }\n    }\n  });\n  Object.defineProperty(this, \"Fields\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    }\n  });\n\n  // Default Appearance\n  var _DA;\n  Object.defineProperty(this, \"DA\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DA) {\n        return undefined;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_DA)) + \")\";\n    },\n    set: function(value) {\n      _DA = value;\n    }\n  });\n};\n\ninherit(AcroFormDictionary, AcroFormPDFObject);\n\n/**\n * The Field Object contains the Variables, that every Field needs\n *\n * @class AcroFormField\n * @classdesc An AcroForm FieldObject\n */\nvar AcroFormField = function() {\n  AcroFormPDFObject.call(this);\n\n  //Annotation-Flag See Table 165\n  var _F = 4;\n  Object.defineProperty(this, \"F\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _F;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _F = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute F supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.\n   * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.\n   *\n   * @name AcroFormField#showWhenPrinted\n   * @default true\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"showWhenPrinted\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(_F, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.F = setBitForPdf(_F, 3);\n      } else {\n        this.F = clearBitForPdf(_F, 3);\n      }\n    }\n  });\n\n  var _Ff = 0;\n  Object.defineProperty(this, \"Ff\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Ff;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _Ff = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Ff supplied.'\n        );\n      }\n    }\n  });\n\n  var _Rect = [];\n  Object.defineProperty(this, \"Rect\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (_Rect.length === 0) {\n        return undefined;\n      }\n      return _Rect;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Rect = value;\n      } else {\n        _Rect = [];\n      }\n    }\n  });\n\n  /**\n   * The x-position of the field.\n   *\n   * @name AcroFormField#x\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"x\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[0])) {\n        return 0;\n      }\n      return _Rect[0];\n    },\n    set: function(value) {\n      _Rect[0] = value;\n    }\n  });\n\n  /**\n   * The y-position of the field.\n   *\n   * @name AcroFormField#y\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"y\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[1])) {\n        return 0;\n      }\n      return _Rect[1];\n    },\n    set: function(value) {\n      _Rect[1] = value;\n    }\n  });\n\n  /**\n   * The width of the field.\n   *\n   * @name AcroFormField#width\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"width\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[2])) {\n        return 0;\n      }\n      return _Rect[2];\n    },\n    set: function(value) {\n      _Rect[2] = value;\n    }\n  });\n\n  /**\n   * The height of the field.\n   *\n   * @name AcroFormField#height\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"height\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[3])) {\n        return 0;\n      }\n      return _Rect[3];\n    },\n    set: function(value) {\n      _Rect[3] = value;\n    }\n  });\n\n  var _FT = \"\";\n  Object.defineProperty(this, \"FT\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _FT;\n    },\n    set: function(value) {\n      switch (value) {\n        case \"/Btn\":\n        case \"/Tx\":\n        case \"/Ch\":\n        case \"/Sig\":\n          _FT = value;\n          break;\n        default:\n          throw new Error(\n            'Invalid value \"' + value + '\" for attribute FT supplied.'\n          );\n      }\n    }\n  });\n\n  var _T = null;\n\n  Object.defineProperty(this, \"T\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (!_T || _T.length < 1) {\n        // In case of a Child from a Radio´Group, you don't need a FieldName\n        if (this instanceof AcroFormChildClass) {\n          return undefined;\n        }\n        _T = \"FieldObject\" + AcroFormField.FieldNum++;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_T)) + \")\";\n    },\n    set: function(value) {\n      _T = value.toString();\n    }\n  });\n\n  /**\n   * (Optional) The partial field name (see 12.7.3.2, “Field Names”).\n   *\n   * @name AcroFormField#fieldName\n   * @default null\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fieldName\", {\n    configurable: true,\n    enumerable: true,\n    get: function() {\n      return _T;\n    },\n    set: function(value) {\n      _T = value;\n    }\n  });\n\n  var _fontName = \"helvetica\";\n  /**\n   * The fontName of the font to be used.\n   *\n   * @name AcroFormField#fontName\n   * @default 'helvetica'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontName\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontName;\n    },\n    set: function(value) {\n      _fontName = value;\n    }\n  });\n\n  var _fontStyle = \"normal\";\n  /**\n   * The fontStyle of the font to be used.\n   *\n   * @name AcroFormField#fontStyle\n   * @default 'normal'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontStyle\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontStyle;\n    },\n    set: function(value) {\n      _fontStyle = value;\n    }\n  });\n\n  var _fontSize = 0;\n  /**\n   * The fontSize of the font to be used.\n   *\n   * @name AcroFormField#fontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"fontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontSize;\n    },\n    set: function(value) {\n      _fontSize = value;\n    }\n  });\n\n  var _maxFontSize = undefined;\n  /**\n   * The maximum fontSize of the font to be used.\n   *\n   * @name AcroFormField#maxFontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxFontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (_maxFontSize === undefined) {\n        // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)\n        // (\"50\" is transformed to the \"user space\" but then used in \"pdf space\")\n        return 50 / scaleFactor;\n      } else {\n        return _maxFontSize;\n      }\n    },\n    set: function(value) {\n      _maxFontSize = value;\n    }\n  });\n\n  var _color = \"black\";\n  /**\n   * The color of the text\n   *\n   * @name AcroFormField#color\n   * @default 'black'\n   * @type {string|rgba}\n   */\n  Object.defineProperty(this, \"color\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _color;\n    },\n    set: function(value) {\n      _color = value;\n    }\n  });\n\n  var _DA = \"/F1 0 Tf 0 g\";\n  // Defines the default appearance (Needed for variable Text)\n  Object.defineProperty(this, \"DA\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (\n        !_DA ||\n        this instanceof AcroFormChildClass ||\n        this instanceof AcroFormTextField\n      ) {\n        return undefined;\n      }\n      return toPdfString(_DA, this.objId, this.scope);\n    },\n    set: function(value) {\n      value = value.toString();\n      _DA = value;\n    }\n  });\n\n  var _DV = null;\n  Object.defineProperty(this, \"DV\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DV) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_DV, this.objId, this.scope);\n      }\n      return _DV;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _DV = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _DV = pdfUnescape(value);\n        }\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.\n   *\n   * @name AcroFormField#defaultValue\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"defaultValue\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_DV.substr(1, _DV.length - 1));\n      } else {\n        return _DV;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _DV = \"/\" + value;\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  var _V = null;\n  Object.defineProperty(this, \"_V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      return _V;\n    },\n    set: function(value) {\n      this.V = value;\n    }\n  });\n  Object.defineProperty(this, \"V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_V, this.objId, this.scope);\n      }\n      return _V;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _V = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _V = pdfUnescape(value);\n        }\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.\n   *\n   * @name AcroFormField#value\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"value\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_V.substr(1, _V.length - 1));\n      } else {\n        return _V;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _V = \"/\" + value;\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * Check if field has annotations\n   *\n   * @name AcroFormField#hasAnnotation\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAnnotation\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.Rect;\n    }\n  });\n\n  Object.defineProperty(this, \"Type\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Annot\" : null;\n    }\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Widget\" : null;\n    }\n  });\n\n  var _hasAppearanceStream = false;\n  /**\n   * true if field has an appearanceStream\n   *\n   * @name AcroFormField#hasAppearanceStream\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _hasAppearanceStream;\n    },\n    set: function(value) {\n      value = Boolean(value);\n      _hasAppearanceStream = value;\n    }\n  });\n\n  /**\n   * The page on which the AcroFormField is placed\n   *\n   * @name AcroFormField#page\n   * @type {number}\n   */\n  var _page;\n  Object.defineProperty(this, \"page\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_page) {\n        return undefined;\n      }\n      return _page;\n    },\n    set: function(value) {\n      _page = value;\n    }\n  });\n\n  /**\n   * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.\n   *\n   * @name AcroFormField#readOnly\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"readOnly\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 1));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 1);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 1);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).\n   *\n   * @name AcroFormField#required\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"required\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 2));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 2);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 2);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)\n   *\n   * @name AcroFormField#noExport\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noExport\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 3);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 3);\n      }\n    }\n  });\n\n  var _Q = null;\n  Object.defineProperty(this, \"Q\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (_Q === null) {\n        return undefined;\n      }\n      return _Q;\n    },\n    set: function(value) {\n      if ([0, 1, 2].indexOf(value) !== -1) {\n        _Q = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Q supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:\n   * 'left', 'center', 'right'\n   *\n   * @name AcroFormField#textAlign\n   * @default 'left'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"textAlign\", {\n    get: function() {\n      var result;\n      switch (_Q) {\n        case 0:\n        default:\n          result = \"left\";\n          break;\n        case 1:\n          result = \"center\";\n          break;\n        case 2:\n          result = \"right\";\n          break;\n      }\n      return result;\n    },\n    configurable: true,\n    enumerable: true,\n    set: function(value) {\n      switch (value) {\n        case \"right\":\n        case 2:\n          _Q = 2;\n          break;\n        case \"center\":\n        case 1:\n          _Q = 1;\n          break;\n        case \"left\":\n        case 0:\n        default:\n          _Q = 0;\n      }\n    }\n  });\n};\n\ninherit(AcroFormField, AcroFormPDFObject);\n\n/**\n * @class AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormChoiceField = function() {\n  AcroFormField.call(this);\n  // Field Type = Choice Field\n  this.FT = \"/Ch\";\n  // options\n  this.V = \"()\";\n\n  this.fontName = \"zapfdingbats\";\n  // Top Index\n  var _TI = 0;\n\n  Object.defineProperty(this, \"TI\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  /**\n   * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.\n   *\n   * @name AcroFormChoiceField#topIndex\n   * @default 0\n   * @type {number}\n   */\n  Object.defineProperty(this, \"topIndex\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  var _Opt = [];\n  Object.defineProperty(this, \"Opt\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return arrayToPdfArray(_Opt, this.objId, this.scope);\n    },\n    set: function(value) {\n      _Opt = pdfArrayToStringArray(value);\n    }\n  });\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name getOptions\n   * @function\n   * @instance\n   * @returns {array} array of Options\n   */\n  this.getOptions = function() {\n    return _Opt;\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name setOptions\n   * @function\n   * @instance\n   * @param {array} value\n   */\n  this.setOptions = function(value) {\n    _Opt = value;\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name addOption\n   * @function\n   * @instance\n   * @param {string} value\n   */\n  this.addOption = function(value) {\n    value = value || \"\";\n    value = value.toString();\n    _Opt.push(value);\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name removeOption\n   * @function\n   * @instance\n   * @param {string} value\n   * @param {boolean} allEntries (default: false)\n   */\n  this.removeOption = function(value, allEntries) {\n    allEntries = allEntries || false;\n    value = value || \"\";\n    value = value.toString();\n\n    while (_Opt.indexOf(value) !== -1) {\n      _Opt.splice(_Opt.indexOf(value), 1);\n      if (allEntries === false) {\n        break;\n      }\n    }\n  };\n\n  /**\n   * If set, the field is a combo box; if clear, the field is a list box.\n   *\n   * @name AcroFormChoiceField#combo\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"combo\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 18));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 18);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 18);\n      }\n    }\n  });\n\n  /**\n   * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.\n   *\n   * @name AcroFormChoiceField#edit\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"edit\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 19));\n    },\n    set: function(value) {\n      //PDF 32000-1:2008, page 444\n      if (this.combo === true) {\n        if (Boolean(value) === true) {\n          this.Ff = setBitForPdf(this.Ff, 19);\n        } else {\n          this.Ff = clearBitForPdf(this.Ff, 19);\n        }\n      }\n    }\n  });\n\n  /**\n   * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).\n   *\n   * @name AcroFormChoiceField#sort\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"sort\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 20));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 20);\n        _Opt.sort();\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 20);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected\n   *\n   * @name AcroFormChoiceField#multiSelect\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 22));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 22);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 22);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.\n   *\n   * @name AcroFormChoiceField#doNotSpellCheck\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.\n   * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.\n   *\n   * @name AcroFormChoiceField#commitOnSelChange\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"commitOnSelChange\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 27));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 27);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 27);\n      }\n    }\n  });\n\n  this.hasAppearanceStream = false;\n};\ninherit(AcroFormChoiceField, AcroFormField);\n\n/**\n * @class AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormListBox = function() {\n  AcroFormChoiceField.call(this);\n  this.fontName = \"helvetica\";\n\n  //PDF 32000-1:2008, page 444\n  this.combo = false;\n};\ninherit(AcroFormListBox, AcroFormChoiceField);\n\n/**\n * @class AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormComboBox = function() {\n  AcroFormListBox.call(this);\n  this.combo = true;\n};\ninherit(AcroFormComboBox, AcroFormListBox);\n\n/**\n * @class AcroFormEditBox\n * @extends AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormEditBox = function() {\n  AcroFormComboBox.call(this);\n  this.edit = true;\n};\ninherit(AcroFormEditBox, AcroFormComboBox);\n\n/**\n * @class AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormButton = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Btn\";\n\n  /**\n   * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.\n   *\n   * @name AcroFormButton#noToggleToOff\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noToggleToOff\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 15));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 15);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 15);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.\n   *\n   * @name AcroFormButton#radio\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radio\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 16));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 16);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 16);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a pushbutton that does not retain a permanent value.\n   *\n   * @name AcroFormButton#pushButton\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"pushButton\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 17));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 17);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 17);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).\n   *\n   * @name AcroFormButton#radioIsUnison\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radioIsUnison\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      if (Object.keys(_MK).length !== 0) {\n        var result = [];\n        result.push(\"<<\");\n        var key;\n        for (key in _MK) {\n          result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n        }\n        result.push(\">>\");\n        return result.join(\"\\n\");\n      }\n      return undefined;\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n};\ninherit(AcroFormButton, AcroFormField);\n\n/**\n * @class AcroFormPushButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormPushButton = function() {\n  AcroFormButton.call(this);\n  this.pushButton = true;\n};\ninherit(AcroFormPushButton, AcroFormButton);\n\n/**\n * @class AcroFormRadioButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormRadioButton = function() {\n  AcroFormButton.call(this);\n  this.radio = true;\n  this.pushButton = false;\n\n  var _Kids = [];\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Kids = value;\n      } else {\n        _Kids = [];\n      }\n    }\n  });\n};\ninherit(AcroFormRadioButton, AcroFormButton);\n\n/**\n * The Child class of a RadioButton (the radioGroup) -> The single Buttons\n *\n * @class AcroFormChildClass\n * @extends AcroFormField\n * @ignore\n */\nvar AcroFormChildClass = function() {\n  AcroFormField.call(this);\n\n  var _parent;\n  Object.defineProperty(this, \"Parent\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _parent;\n    },\n    set: function(value) {\n      _parent = value;\n    }\n  });\n\n  var _optionName;\n  Object.defineProperty(this, \"optionName\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      return _optionName;\n    },\n    set: function(value) {\n      _optionName = value;\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      var result = [];\n      result.push(\"<<\");\n      var key;\n      for (key in _MK) {\n        result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n      }\n      result.push(\">>\");\n      return result.join(\"\\n\");\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n  this.caption = \"l\";\n  this.appearanceState = \"Off\";\n  // todo: set AppearanceType as variable that can be set from the\n  // outside...\n  this._AppearanceType = AcroFormAppearance.RadioButton.Circle;\n  // The Default appearanceType is the Circle\n  this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(\n    this.optionName\n  );\n};\ninherit(AcroFormChildClass, AcroFormField);\n\nAcroFormRadioButton.prototype.setAppearance = function(appearance) {\n  if (!(\"createAppearanceStream\" in appearance && \"getCA\" in appearance)) {\n    throw new Error(\n      \"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\"\n    );\n  }\n  for (var objId in this.Kids) {\n    if (this.Kids.hasOwnProperty(objId)) {\n      var child = this.Kids[objId];\n      child.appearanceStreamContent = appearance.createAppearanceStream(\n        child.optionName\n      );\n      child.caption = appearance.getCA();\n    }\n  }\n};\n\nAcroFormRadioButton.prototype.createOption = function(name) {\n  // Create new Child for RadioGroup\n  var child = new AcroFormChildClass();\n  child.Parent = this;\n  child.optionName = name;\n  // Add to Parent\n  this.Kids.push(child);\n\n  addField.call(this.scope, child);\n\n  return child;\n};\n\n/**\n * @class AcroFormCheckBox\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormCheckBox = function() {\n  AcroFormButton.call(this);\n\n  this.fontName = \"zapfdingbats\";\n  this.caption = \"3\";\n  this.appearanceState = \"On\";\n  this.value = \"On\";\n  this.textAlign = \"center\";\n  this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();\n};\ninherit(AcroFormCheckBox, AcroFormButton);\n\n/**\n * @class AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormTextField = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Tx\";\n\n  /**\n   * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.\n   *\n   * @name AcroFormTextField#multiline\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiline\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 13));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 13);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 13);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.\n   *\n   * @name AcroFormTextField#fileSelect\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"fileSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 21));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 21);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 21);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spell-checked.\n   *\n   * @name AcroFormTextField#doNotSpellCheck\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.\n   *\n   * @name AcroFormTextField#doNotScroll\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotScroll\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 24));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 24);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 24);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.\n   *\n   * @name AcroFormTextField#comb\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"comb\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 25));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 25);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 25);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.\n   *\n   * @name AcroFormTextField#richText\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"richText\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MaxLen = null;\n  Object.defineProperty(this, \"MaxLen\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      _MaxLen = value;\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The maximum length of the field’s text, in characters.\n   *\n   * @name AcroFormTextField#maxLength\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxLength\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      if (Number.isInteger(value)) {\n        _MaxLen = value;\n      }\n    }\n  });\n\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.V || this.DV;\n    }\n  });\n};\ninherit(AcroFormTextField, AcroFormField);\n\n/**\n * @class AcroFormPasswordField\n * @extends AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormPasswordField = function() {\n  AcroFormTextField.call(this);\n\n  /**\n   * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.\n   * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.\n   *\n   * @name AcroFormTextField#password\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"password\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 14));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 14);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 14);\n      }\n    }\n  });\n  this.password = true;\n};\ninherit(AcroFormPasswordField, AcroFormTextField);\n\n// Contains Methods for creating standard appearances\nvar AcroFormAppearance = {\n  CheckBox: {\n    createAppearanceStream: function() {\n      var appearance = {\n        N: {\n          On: AcroFormAppearance.CheckBox.YesNormal\n        },\n        D: {\n          On: AcroFormAppearance.CheckBox.YesPushDown,\n          Off: AcroFormAppearance.CheckBox.OffPushDown\n        }\n      };\n\n      return appearance;\n    },\n    /**\n     * Returns the standard On Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    YesPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      stream.push(\"BMC\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(\"BT\");\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      stream.push(\"EMC\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    YesNormal: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var stream = [];\n      var height = AcroFormAppearance.internal.getHeight(formObject);\n      var width = AcroFormAppearance.internal.getWidth(formObject);\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"1 g\");\n      stream.push(\"0 0 \" + f2(width) + \" \" + f2(height) + \" re\");\n      stream.push(\"f\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\"0 0 \" + f2(width - 1) + \" \" + f2(height - 1) + \" re\");\n      stream.push(\"W\");\n      stream.push(\"n\");\n      stream.push(\"0 g\");\n      stream.push(\"BT\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    /**\n     * Returns the standard Off Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    OffPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    }\n  },\n\n  RadioButton: {\n    Circle: {\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Circle.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Circle.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Circle.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"l\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        // Make the Radius of the Circle relative to min(height, width) of formObject\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        var c = AcroFormAppearance.internal.Bezier_C;\n        var DotRadiusBezier = Number((DotRadius * c).toFixed(5));\n        /*\n         * The Following is a Circle created with Bezier-Curves.\n         */\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n        var dc = Number(\n          (DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5)\n        );\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        stream.push(\"0 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          \"\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" \" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" -\" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          dc +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    },\n\n    Cross: {\n      /**\n       * Creates the Actual AppearanceDictionary-References\n       *\n       * @param {string} name\n       * @returns {Object}\n       * @ignore\n       */\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Cross.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Cross.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Cross.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"8\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    }\n  },\n\n  /**\n   * Returns the standard Appearance\n   *\n   * @returns {AcroFormXObject}\n   */\n  createDefaultAppearanceStream: function(formObject) {\n    // Set Helvetica to Standard Font (size: auto)\n    // Color: Black\n    var fontKey = formObject.scope.internal.getFont(\n      formObject.fontName,\n      formObject.fontStyle\n    ).id;\n    var encodedColor = formObject.scope.__private__.encodeColorString(\n      formObject.color\n    );\n    var fontSize = formObject.fontSize;\n    var result = \"/\" + fontKey + \" \" + fontSize + \" Tf \" + encodedColor;\n    return result;\n  }\n};\n\nAcroFormAppearance.internal = {\n  Bezier_C: 0.551915024494,\n\n  calculateCross: function(formObject) {\n    var width = AcroFormAppearance.internal.getWidth(formObject);\n    var height = AcroFormAppearance.internal.getHeight(formObject);\n    var a = Math.min(width, height);\n\n    var cross = {\n      x1: {\n        // upperLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 + a // height - borderPadding\n      },\n      x2: {\n        // lowerRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 // borderPadding\n      },\n      x3: {\n        // lowerLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 // borderPadding\n      },\n      x4: {\n        // upperRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 + a // height - borderPadding\n      }\n    };\n\n    return cross;\n  }\n};\nAcroFormAppearance.internal.getWidth = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[2]);\n  }\n  return result;\n};\nAcroFormAppearance.internal.getHeight = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[3]);\n  }\n  return result;\n};\n\n// Public:\n\n/**\n * Add an AcroForm-Field to the jsPDF-instance\n *\n * @name addField\n * @function\n * @instance\n * @param {Object} fieldObject\n * @returns {jsPDF}\n */\nvar addField = (jsPDFAPI.addField = function(fieldObject) {\n  initializeAcroForm(this, fieldObject);\n\n  if (fieldObject instanceof AcroFormField) {\n    putForm(fieldObject);\n  } else {\n    throw new Error(\"Invalid argument passed to jsPDF.addField.\");\n  }\n  fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;\n  return this;\n});\n\njsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;\njsPDFAPI.AcroFormListBox = AcroFormListBox;\njsPDFAPI.AcroFormComboBox = AcroFormComboBox;\njsPDFAPI.AcroFormEditBox = AcroFormEditBox;\njsPDFAPI.AcroFormButton = AcroFormButton;\njsPDFAPI.AcroFormPushButton = AcroFormPushButton;\njsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;\njsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;\njsPDFAPI.AcroFormTextField = AcroFormTextField;\njsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;\njsPDFAPI.AcroFormAppearance = AcroFormAppearance;\n\njsPDFAPI.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\njsPDF.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\nvar AcroForm = jsPDF.AcroForm;\n\nexport {\n  AcroForm,\n  AcroFormChoiceField,\n  AcroFormListBox,\n  AcroFormComboBox,\n  AcroFormEditBox,\n  AcroFormButton,\n  AcroFormPushButton,\n  AcroFormRadioButton,\n  AcroFormCheckBox,\n  AcroFormTextField,\n  AcroFormPasswordField,\n  AcroFormAppearance\n};\n","/** @license\n * jsPDF addImage plugin\n * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/\n *               2013 Chris Dowling, https://github.com/gingerchris\n *               2013 Trinh Ho, https://github.com/ineedfat\n *               2013 Edwin Alejandro Perez, https://github.com/eaparango\n *               2013 Norah Smith, https://github.com/burnburnrocket\n *               2014 Diego Casorran, https://github.com/diegocr\n *               2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * @name addImage\n * @module\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob, btoa } from \"../libs/AtobBtoa.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namespace = \"addImage_\";\n  jsPDFAPI.__addimage__ = {};\n\n  var UNKNOWN = \"UNKNOWN\";\n\n  // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.\n  // With too small batch iteration will be slow as more calls are made,\n  // higher values cause larger and slower garbage collection.\n  var ARRAY_APPLY_BATCH = 8192;\n\n  var imageFileTypeHeaders = {\n    PNG: [[0x89, 0x50, 0x4e, 0x47]],\n    TIFF: [\n      [0x4d, 0x4d, 0x00, 0x2a], //Motorola\n      [0x49, 0x49, 0x2a, 0x00] //Intel\n    ],\n    JPEG: [\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe0,\n        undefined,\n        undefined,\n        0x4a,\n        0x46,\n        0x49,\n        0x46,\n        0x00\n      ], //JFIF\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe1,\n        undefined,\n        undefined,\n        0x45,\n        0x78,\n        0x69,\n        0x66,\n        0x00,\n        0x00\n      ], //Exif\n      [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW\n      [0xff, 0xd8, 0xff, 0xee] //EXIF RAW\n    ],\n    JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],\n    GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],\n    GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],\n    WEBP: [\n      [\n        0x52,\n        0x49,\n        0x46,\n        0x46,\n        undefined,\n        undefined,\n        undefined,\n        undefined,\n        0x57,\n        0x45,\n        0x42,\n        0x50\n      ]\n    ],\n    BMP: [\n      [0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.\n      [0x42, 0x41], //BA - OS/2 struct bitmap array\n      [0x43, 0x49], //CI - OS/2 struct color icon\n      [0x43, 0x50], //CP - OS/2 const color pointer\n      [0x49, 0x43], //IC - OS/2 struct icon\n      [0x50, 0x54] //PT - OS/2 pointer\n    ]\n  };\n\n  /**\n   * Recognize filetype of Image by magic-bytes\n   *\n   * https://en.wikipedia.org/wiki/List_of_file_signatures\n   *\n   * @name getImageFileTypeByImageData\n   * @public\n   * @function\n   * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer\n   * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'\n   *\n   * @returns {string} filetype of Image\n   */\n  var getImageFileTypeByImageData = (jsPDFAPI.__addimage__.getImageFileTypeByImageData = function(\n    imageData,\n    fallbackFormat\n  ) {\n    fallbackFormat = fallbackFormat || UNKNOWN;\n    var i;\n    var j;\n    var result = UNKNOWN;\n    var headerSchemata;\n    var compareResult;\n    var fileType;\n\n    if (\n      fallbackFormat === \"RGBA\" ||\n      (imageData.data !== undefined &&\n        imageData.data instanceof Uint8ClampedArray &&\n        \"height\" in imageData &&\n        \"width\" in imageData)\n    ) {\n      return \"RGBA\";\n    }\n\n    if (isArrayBufferView(imageData)) {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData[j]) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    } else {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    }\n\n    if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {\n      result = fallbackFormat;\n    }\n    return result;\n  });\n\n  // Image functionality ported from pdf.js\n  var putImage = function(image) {\n    var out = this.internal.write;\n    var putStream = this.internal.putStream;\n    var getFilters = this.internal.getFilters;\n\n    var filter = getFilters();\n    while (filter.indexOf(\"FlateEncode\") !== -1) {\n      filter.splice(filter.indexOf(\"FlateEncode\"), 1);\n    }\n\n    image.objectId = this.internal.newObject();\n\n    var additionalKeyValues = [];\n    additionalKeyValues.push({ key: \"Type\", value: \"/XObject\" });\n    additionalKeyValues.push({ key: \"Subtype\", value: \"/Image\" });\n    additionalKeyValues.push({ key: \"Width\", value: image.width });\n    additionalKeyValues.push({ key: \"Height\", value: image.height });\n\n    if (image.colorSpace === color_spaces.INDEXED) {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value:\n          \"[/Indexed /DeviceRGB \" +\n          // if an indexed png defines more than one colour with transparency, we've created a sMask\n          (image.palette.length / 3 - 1) +\n          \" \" +\n          (\"sMask\" in image && typeof image.sMask !== \"undefined\"\n            ? image.objectId + 2\n            : image.objectId + 1) +\n          \" 0 R]\"\n      });\n    } else {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value: \"/\" + image.colorSpace\n      });\n      if (image.colorSpace === color_spaces.DEVICE_CMYK) {\n        additionalKeyValues.push({ key: \"Decode\", value: \"[1 0 1 0 1 0 1 0]\" });\n      }\n    }\n    additionalKeyValues.push({\n      key: \"BitsPerComponent\",\n      value: image.bitsPerComponent\n    });\n    if (\n      \"decodeParameters\" in image &&\n      typeof image.decodeParameters !== \"undefined\"\n    ) {\n      additionalKeyValues.push({\n        key: \"DecodeParms\",\n        value: \"<<\" + image.decodeParameters + \">>\"\n      });\n    }\n    if (\"transparency\" in image && Array.isArray(image.transparency)) {\n      var transparency = \"\",\n        i = 0,\n        len = image.transparency.length;\n      for (; i < len; i++)\n        transparency +=\n          image.transparency[i] + \" \" + image.transparency[i] + \" \";\n\n      additionalKeyValues.push({\n        key: \"Mask\",\n        value: \"[\" + transparency + \"]\"\n      });\n    }\n    if (typeof image.sMask !== \"undefined\") {\n      additionalKeyValues.push({\n        key: \"SMask\",\n        value: image.objectId + 1 + \" 0 R\"\n      });\n    }\n\n    var alreadyAppliedFilters =\n      typeof image.filter !== \"undefined\" ? [\"/\" + image.filter] : undefined;\n\n    putStream({\n      data: image.data,\n      additionalKeyValues: additionalKeyValues,\n      alreadyAppliedFilters: alreadyAppliedFilters,\n      objectId: image.objectId\n    });\n\n    out(\"endobj\");\n\n    // Soft mask\n    if (\"sMask\" in image && typeof image.sMask !== \"undefined\") {\n      var decodeParameters =\n        \"/Predictor \" +\n        image.predictor +\n        \" /Colors 1 /BitsPerComponent \" +\n        image.bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n      var sMask = {\n        width: image.width,\n        height: image.height,\n        colorSpace: \"DeviceGray\",\n        bitsPerComponent: image.bitsPerComponent,\n        decodeParameters: decodeParameters,\n        data: image.sMask\n      };\n      if (\"filter\" in image) {\n        sMask.filter = image.filter;\n      }\n      putImage.call(this, sMask);\n    }\n\n    //Palette\n    if (image.colorSpace === color_spaces.INDEXED) {\n      var objId = this.internal.newObject();\n      //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');\n      //putStream(zlib.compress(img['pal']));\n      putStream({\n        data: arrayBufferToBinaryString(new Uint8Array(image.palette)),\n        objectId: objId\n      });\n      out(\"endobj\");\n    }\n  };\n  var putResourcesCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    for (var i in images) {\n      putImage.call(this, images[i]);\n    }\n  };\n  var putXObjectsDictCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"],\n      out = this.internal.write,\n      image;\n    for (var i in images) {\n      image = images[i];\n      out(\"/I\" + image.index, image.objectId, \"0\", \"R\");\n    }\n  };\n\n  var checkCompressValue = function(value) {\n    if (value && typeof value === \"string\") value = value.toUpperCase();\n    return value in jsPDFAPI.image_compression ? value : image_compression.NONE;\n  };\n\n  var initialize = function() {\n    if (!this.internal.collections[namespace + \"images\"]) {\n      this.internal.collections[namespace + \"images\"] = {};\n      this.internal.events.subscribe(\"putResources\", putResourcesCallback);\n      this.internal.events.subscribe(\"putXobjectDict\", putXObjectsDictCallback);\n    }\n  };\n\n  var getImages = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    initialize.call(this);\n    return images;\n  };\n  var getImageIndex = function() {\n    return Object.keys(this.internal.collections[namespace + \"images\"]).length;\n  };\n  var notDefined = function(value) {\n    return typeof value === \"undefined\" || value === null || value.length === 0;\n  };\n  var generateAliasFromImageData = function(imageData) {\n    if (typeof imageData === \"string\" || isArrayBufferView(imageData)) {\n      return sHashCode(imageData);\n    } else if (isArrayBufferView(imageData.data)) {\n      return sHashCode(imageData.data);\n    }\n\n    return null;\n  };\n\n  var isImageTypeSupported = function(type) {\n    return typeof jsPDFAPI[\"process\" + type.toUpperCase()] === \"function\";\n  };\n\n  var isDOMElement = function(object) {\n    return typeof object === \"object\" && object.nodeType === 1;\n  };\n\n  var getImageDataFromElement = function(element, format) {\n    //if element is an image which uses data url definition, just return the dataurl\n    if (element.nodeName === \"IMG\" && element.hasAttribute(\"src\")) {\n      var src = \"\" + element.getAttribute(\"src\");\n\n      //is base64 encoded dataUrl, directly process it\n      if (src.indexOf(\"data:image/\") === 0) {\n        return atob(\n          unescape(src)\n            .split(\"base64,\")\n            .pop()\n        );\n      }\n\n      //it is probably an url, try to load it\n      var tmpImageData = jsPDFAPI.loadFile(src, true);\n      if (tmpImageData !== undefined) {\n        return tmpImageData;\n      }\n    }\n\n    if (element.nodeName === \"CANVAS\") {\n      if (element.width === 0 || element.height === 0) {\n        throw new Error(\n          \"Given canvas must have data. Canvas width: \" +\n            element.width +\n            \", height: \" +\n            element.height\n        );\n      }\n      var mimeType;\n      switch (format) {\n        case \"PNG\":\n          mimeType = \"image/png\";\n          break;\n        case \"WEBP\":\n          mimeType = \"image/webp\";\n          break;\n        case \"JPEG\":\n        case \"JPG\":\n        default:\n          mimeType = \"image/jpeg\";\n          break;\n      }\n      return atob(\n        element\n          .toDataURL(mimeType, 1.0)\n          .split(\"base64,\")\n          .pop()\n      );\n    }\n  };\n\n  var checkImagesForAlias = function(alias) {\n    var images = this.internal.collections[namespace + \"images\"];\n    if (images) {\n      for (var e in images) {\n        if (alias === images[e].alias) {\n          return images[e];\n        }\n      }\n    }\n  };\n\n  var determineWidthAndHeight = function(width, height, image) {\n    if (!width && !height) {\n      width = -96;\n      height = -96;\n    }\n    if (width < 0) {\n      width = (-1 * image.width * 72) / width / this.internal.scaleFactor;\n    }\n    if (height < 0) {\n      height = (-1 * image.height * 72) / height / this.internal.scaleFactor;\n    }\n    if (width === 0) {\n      width = (height * image.width) / image.height;\n    }\n    if (height === 0) {\n      height = (width * image.height) / image.width;\n    }\n\n    return [width, height];\n  };\n\n  var writeImageToPDF = function(x, y, width, height, image, rotation) {\n    var dims = determineWidthAndHeight.call(this, width, height, image),\n      coord = this.internal.getCoordinateString,\n      vcoord = this.internal.getVerticalCoordinateString;\n\n    var images = getImages.call(this);\n\n    width = dims[0];\n    height = dims[1];\n    images[image.index] = image;\n\n    if (rotation) {\n      rotation *= Math.PI / 180;\n      var c = Math.cos(rotation);\n      var s = Math.sin(rotation);\n      //like in pdf Reference do it 4 digits instead of 2\n      var f4 = function(number) {\n        return number.toFixed(4);\n      };\n      var rotationTransformationMatrix = [\n        f4(c),\n        f4(s),\n        f4(s * -1),\n        f4(c),\n        0,\n        0,\n        \"cm\"\n      ];\n    }\n    this.internal.write(\"q\"); //Save graphics state\n    if (rotation) {\n      this.internal.write(\n        [1, \"0\", \"0\", 1, coord(x), vcoord(y + height), \"cm\"].join(\" \")\n      ); //Translate\n      this.internal.write(rotationTransformationMatrix.join(\" \")); //Rotate\n      this.internal.write(\n        [coord(width), \"0\", \"0\", coord(height), \"0\", \"0\", \"cm\"].join(\" \")\n      ); //Scale\n    } else {\n      this.internal.write(\n        [\n          coord(width),\n          \"0\",\n          \"0\",\n          coord(height),\n          coord(x),\n          vcoord(y + height),\n          \"cm\"\n        ].join(\" \")\n      ); //Translate and Scale\n    }\n\n    if (this.isAdvancedAPI()) {\n      // draw image bottom up when in \"advanced\" API mode\n      this.internal.write([1, 0, 0, -1, 0, 0, \"cm\"].join(\" \"));\n    }\n\n    this.internal.write(\"/I\" + image.index + \" Do\"); //Paint Image\n    this.internal.write(\"Q\"); //Restore graphics state\n  };\n\n  /**\n   * COLOR SPACES\n   */\n  var color_spaces = (jsPDFAPI.color_spaces = {\n    DEVICE_RGB: \"DeviceRGB\",\n    DEVICE_GRAY: \"DeviceGray\",\n    DEVICE_CMYK: \"DeviceCMYK\",\n    CAL_GREY: \"CalGray\",\n    CAL_RGB: \"CalRGB\",\n    LAB: \"Lab\",\n    ICC_BASED: \"ICCBased\",\n    INDEXED: \"Indexed\",\n    PATTERN: \"Pattern\",\n    SEPARATION: \"Separation\",\n    DEVICE_N: \"DeviceN\"\n  });\n\n  /**\n   * DECODE METHODS\n   */\n  jsPDFAPI.decode = {\n    DCT_DECODE: \"DCTDecode\",\n    FLATE_DECODE: \"FlateDecode\",\n    LZW_DECODE: \"LZWDecode\",\n    JPX_DECODE: \"JPXDecode\",\n    JBIG2_DECODE: \"JBIG2Decode\",\n    ASCII85_DECODE: \"ASCII85Decode\",\n    ASCII_HEX_DECODE: \"ASCIIHexDecode\",\n    RUN_LENGTH_DECODE: \"RunLengthDecode\",\n    CCITT_FAX_DECODE: \"CCITTFaxDecode\"\n  };\n\n  /**\n   * IMAGE COMPRESSION TYPES\n   */\n  var image_compression = (jsPDFAPI.image_compression = {\n    NONE: \"NONE\",\n    FAST: \"FAST\",\n    MEDIUM: \"MEDIUM\",\n    SLOW: \"SLOW\"\n  });\n\n  /**\n   * @name sHashCode\n   * @function\n   * @param {string} data\n   * @returns {string}\n   */\n  var sHashCode = (jsPDFAPI.__addimage__.sHashCode = function(data) {\n    var hash = 0,\n      i,\n      len;\n\n    if (typeof data === \"string\") {\n      len = data.length;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data.charCodeAt(i);\n        hash |= 0; // Convert to 32bit integer\n      }\n    } else if (isArrayBufferView(data)) {\n      len = data.byteLength / 2;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data[i];\n        hash |= 0; // Convert to 32bit integer\n      }\n    }\n    return hash;\n  });\n\n  /**\n   * Validates if given String is a valid Base64-String\n   *\n   * @name validateStringAsBase64\n   * @public\n   * @function\n   * @param {String} possible Base64-String\n   *\n   * @returns {boolean}\n   */\n  var validateStringAsBase64 = (jsPDFAPI.__addimage__.validateStringAsBase64 = function(\n    possibleBase64String\n  ) {\n    possibleBase64String = possibleBase64String || \"\";\n    possibleBase64String.toString().trim();\n\n    var result = true;\n\n    if (possibleBase64String.length === 0) {\n      result = false;\n    }\n\n    if (possibleBase64String.length % 4 !== 0) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9+/]+$/.test(\n        possibleBase64String.substr(0, possibleBase64String.length - 2)\n      ) === false\n    ) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(\n        possibleBase64String.substr(-2)\n      ) === false\n    ) {\n      result = false;\n    }\n    return result;\n  });\n\n  /**\n   * Strips out and returns info from a valid base64 data URI\n   *\n   * @name extractImageFromDataUrl\n   * @function\n   * @param {string} dataUrl a valid data URI of format 'data:[<MIME-type>][;base64],<data>'\n   * @returns {Array}an Array containing the following\n   * [0] the complete data URI\n   * [1] <MIME-type>\n   * [2] format - the second part of the mime-type i.e 'png' in 'image/png'\n   * [4] <data>\n   */\n  var extractImageFromDataUrl = (jsPDFAPI.__addimage__.extractImageFromDataUrl = function(\n    dataUrl\n  ) {\n    dataUrl = dataUrl || \"\";\n    var dataUrlParts = dataUrl.split(\"base64,\");\n    var result = null;\n\n    if (dataUrlParts.length === 2) {\n      var extractedInfo = /^data:(\\w*\\/\\w*);*(charset=(?!charset=)[\\w=-]*)*;*$/.exec(\n        dataUrlParts[0]\n      );\n      if (Array.isArray(extractedInfo)) {\n        result = {\n          mimeType: extractedInfo[1],\n          charset: extractedInfo[2],\n          data: dataUrlParts[1]\n        };\n      }\n    }\n    return result;\n  });\n\n  /**\n   * Check to see if ArrayBuffer is supported\n   *\n   * @name supportsArrayBuffer\n   * @function\n   * @returns {boolean}\n   */\n  var supportsArrayBuffer = (jsPDFAPI.__addimage__.supportsArrayBuffer = function() {\n    return (\n      typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\"\n    );\n  });\n\n  /**\n   * Tests supplied object to determine if ArrayBuffer\n   *\n   * @name isArrayBuffer\n   * @function\n   * @param {Object} object an Object\n   *\n   * @returns {boolean}\n   */\n  jsPDFAPI.__addimage__.isArrayBuffer = function(object) {\n    return supportsArrayBuffer() && object instanceof ArrayBuffer;\n  };\n\n  /**\n   * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface\n   *\n   * @name isArrayBufferView\n   * @function\n   * @param {Object} object an Object\n   * @returns {boolean}\n   */\n  var isArrayBufferView = (jsPDFAPI.__addimage__.isArrayBufferView = function(\n    object\n  ) {\n    return (\n      supportsArrayBuffer() &&\n      typeof Uint32Array !== \"undefined\" &&\n      (object instanceof Int8Array ||\n        object instanceof Uint8Array ||\n        (typeof Uint8ClampedArray !== \"undefined\" &&\n          object instanceof Uint8ClampedArray) ||\n        object instanceof Int16Array ||\n        object instanceof Uint16Array ||\n        object instanceof Int32Array ||\n        object instanceof Uint32Array ||\n        object instanceof Float32Array ||\n        object instanceof Float64Array)\n    );\n  });\n\n  /**\n   * Convert Binary String to ArrayBuffer\n   *\n   * @name binaryStringToUint8Array\n   * @public\n   * @function\n   * @param {string} BinaryString with ImageData\n   * @returns {Uint8Array}\n   */\n  var binaryStringToUint8Array = (jsPDFAPI.__addimage__.binaryStringToUint8Array = function(\n    binary_string\n  ) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  });\n\n  /**\n   * Convert the Buffer to a Binary String\n   *\n   * @name arrayBufferToBinaryString\n   * @public\n   * @function\n   * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData\n   *\n   * @returns {String}\n   */\n  var arrayBufferToBinaryString = (jsPDFAPI.__addimage__.arrayBufferToBinaryString = function(\n    buffer\n  ) {\n    var out = \"\";\n    // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.\n    // Do not copy the array if input is already an array.\n    var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);\n    for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {\n      // Limit the amount of characters being parsed to prevent overflow.\n      // Note that while TextDecoder would be faster, it does not have the same\n      // functionality as fromCharCode with any provided encodings as of 3/2021.\n      out += String.fromCharCode.apply(\n        null,\n        buf.subarray(i, i + ARRAY_APPLY_BATCH)\n      );\n    }\n    return out;\n  });\n\n  /**\n   * Possible parameter for addImage, an RGBA buffer with size.\n   *\n   * @typedef {Object} RGBAData\n   * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.\n   * @property {number} width - Image width as the data does not carry this information in itself.\n   * @property {number} height - Image height as the data does not carry this information in itself.\n   */\n\n  /**\n   * Adds an Image to the PDF.\n   *\n   * @name addImage\n   * @public\n   * @function\n   * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).\n   * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'\n   * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width width of the image (in units declared at inception of PDF document)\n   * @param {number} height height of the Image (in units declared at inception of PDF document)\n   * @param {string} alias alias of the image (if used multiple times)\n   * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF\n   */\n  jsPDFAPI.addImage = function() {\n    var imageData, format, x, y, w, h, alias, compression, rotation;\n\n    imageData = arguments[0];\n    if (typeof arguments[1] === \"number\") {\n      format = UNKNOWN;\n      x = arguments[1];\n      y = arguments[2];\n      w = arguments[3];\n      h = arguments[4];\n      alias = arguments[5];\n      compression = arguments[6];\n      rotation = arguments[7];\n    } else {\n      format = arguments[1];\n      x = arguments[2];\n      y = arguments[3];\n      w = arguments[4];\n      h = arguments[5];\n      alias = arguments[6];\n      compression = arguments[7];\n      rotation = arguments[8];\n    }\n\n    if (\n      typeof imageData === \"object\" &&\n      !isDOMElement(imageData) &&\n      \"imageData\" in imageData\n    ) {\n      var options = imageData;\n\n      imageData = options.imageData;\n      format = options.format || format || UNKNOWN;\n      x = options.x || x || 0;\n      y = options.y || y || 0;\n      w = options.w || options.width || w;\n      h = options.h || options.height || h;\n      alias = options.alias || alias;\n      compression = options.compression || compression;\n      rotation = options.rotation || options.angle || rotation;\n    }\n\n    //If compression is not explicitly set, determine if we should use compression\n    var filter = this.internal.getFilters();\n    if (compression === undefined && filter.indexOf(\"FlateEncode\") !== -1) {\n      compression = \"SLOW\";\n    }\n\n    if (isNaN(x) || isNaN(y)) {\n      throw new Error(\"Invalid coordinates passed to jsPDF.addImage\");\n    }\n\n    initialize.call(this);\n\n    var image = processImageData.call(\n      this,\n      imageData,\n      format,\n      alias,\n      compression\n    );\n\n    writeImageToPDF.call(this, x, y, w, h, image, rotation);\n\n    return this;\n  };\n\n  var processImageData = function(imageData, format, alias, compression) {\n    var result, dataAsBinaryString;\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      imageData = unescape(imageData);\n      var tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData !== \"\") {\n        imageData = tmpImageData;\n      } else {\n        tmpImageData = jsPDFAPI.loadFile(imageData, true);\n        if (tmpImageData !== undefined) {\n          imageData = tmpImageData;\n        }\n      }\n    }\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData, format);\n    }\n\n    format = getImageFileTypeByImageData(imageData, format);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    // now do the heavy lifting\n\n    if (notDefined(alias)) {\n      alias = generateAliasFromImageData(imageData);\n    }\n    result = checkImagesForAlias.call(this, alias);\n\n    if (!result) {\n      if (supportsArrayBuffer()) {\n        // no need to convert if imageData is already uint8array\n        if (!(imageData instanceof Uint8Array) && format !== \"RGBA\") {\n          dataAsBinaryString = imageData;\n          imageData = binaryStringToUint8Array(imageData);\n        }\n      }\n\n      result = this[\"process\" + format.toUpperCase()](\n        imageData,\n        getImageIndex.call(this),\n        alias,\n        checkCompressValue(compression),\n        dataAsBinaryString\n      );\n    }\n\n    if (!result) {\n      throw new Error(\"An unknown error occurred whilst processing the image.\");\n    }\n    return result;\n  };\n\n  /**\n   * @name convertBase64ToBinaryString\n   * @function\n   * @param {string} stringData\n   * @returns {string} binary string\n   */\n  var convertBase64ToBinaryString = (jsPDFAPI.__addimage__.convertBase64ToBinaryString = function(\n    stringData,\n    throwError\n  ) {\n    throwError = typeof throwError === \"boolean\" ? throwError : true;\n    var base64Info;\n    var imageData = \"\";\n    var rawData;\n\n    if (typeof stringData === \"string\") {\n      base64Info = extractImageFromDataUrl(stringData);\n      rawData = base64Info !== null ? base64Info.data : stringData;\n\n      try {\n        imageData = atob(rawData);\n      } catch (e) {\n        if (throwError) {\n          if (!validateStringAsBase64(rawData)) {\n            throw new Error(\n              \"Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString \"\n            );\n          } else {\n            throw new Error(\n              \"atob-Error in jsPDF.convertBase64ToBinaryString \" + e.message\n            );\n          }\n        }\n      }\n    }\n    return imageData;\n  });\n\n  /**\n   * @name getImageProperties\n   * @function\n   * @param {Object} imageData\n   * @returns {Object}\n   */\n  jsPDFAPI.getImageProperties = function(imageData) {\n    var image;\n    var tmpImageData = \"\";\n    var format;\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData);\n    }\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData === \"\") {\n        tmpImageData = jsPDFAPI.loadFile(imageData) || \"\";\n      }\n      imageData = tmpImageData;\n    }\n\n    format = getImageFileTypeByImageData(imageData);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {\n      imageData = binaryStringToUint8Array(imageData);\n    }\n\n    image = this[\"process\" + format.toUpperCase()](imageData);\n\n    if (!image) {\n      throw new Error(\"An unknown error occurred whilst processing the image\");\n    }\n\n    image.fileType = format;\n\n    return image;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF Annotations PlugIn\n *\n * There are many types of annotations in a PDF document. Annotations are placed\n * on a page at a particular location. They are not 'attached' to an object.\n * <br />\n * This plugin current supports <br />\n * <li> Goto Page (set pageNumber and top in options)\n * <li> Goto Name (set name and top in options)\n * <li> Goto URL (set url in options)\n * <p>\n * \tThe destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below)\n *  (set magFactor in options).  XYZ is the default.\n * </p>\n * <p>\n *  Links, Text, Popup, and FreeText are supported.\n * </p>\n * <p>\n * Options In PDF spec Not Implemented Yet\n * <li> link border\n * <li> named target\n * <li> page coordinates\n * <li> destination page scaling and layout\n * <li> actions other than URL and GotoPage\n * <li> background / hover actions\n * </p>\n * @name annotations\n * @module\n */\n\n/*\n    Destination Magnification Factors\n    See PDF 1.3 Page 386 for meanings and options\n\n    [supported]\n\tXYZ (options; left top zoom)\n\tFit (no options)\n\tFitH (options: top)\n\tFitV (options: left)\n\n\t[not supported]\n\tFitR\n\tFitB\n\tFitBH\n\tFitBV\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var notEmpty = function(obj) {\n    if (typeof obj != \"undefined\") {\n      if (obj != \"\") {\n        return true;\n      }\n    }\n  };\n\n  jsPDF.API.events.push([\n    \"addPage\",\n    function(addPageData) {\n      var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);\n      pageInfo.pageContext.annotations = [];\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putPage\",\n    function(putPageData) {\n      var getHorizontalCoordinateString = this.internal.getCoordinateString;\n      var getVerticalCoordinateString = this.internal\n        .getVerticalCoordinateString;\n      var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);\n      var pageAnnos = putPageData.pageContext.annotations;\n\n      var anno, rect, line;\n      var found = false;\n      for (var a = 0; a < pageAnnos.length && !found; a++) {\n        anno = pageAnnos[a];\n        switch (anno.type) {\n          case \"link\":\n            if (\n              notEmpty(anno.options.url) ||\n              notEmpty(anno.options.pageNumber)\n            ) {\n              found = true;\n            }\n            break;\n          case \"reference\":\n          case \"text\":\n          case \"freetext\":\n            found = true;\n            break;\n        }\n      }\n      if (found == false) {\n        return;\n      }\n\n      this.internal.write(\"/Annots [\");\n      for (var i = 0; i < pageAnnos.length; i++) {\n        anno = pageAnnos[i];\n        var escape = this.internal.pdfEscape;\n        var encryptor = this.internal.getEncryptor(putPageData.objId);\n\n        switch (anno.type) {\n          case \"reference\":\n            // References to Widget Annotations (for AcroForm Fields)\n            this.internal.write(\" \" + anno.object.objId + \" 0 R \");\n            break;\n          case \"text\":\n            // Create a an object for both the text and the popup\n            var objText = this.internal.newAdditionalObject();\n            var objPopup = this.internal.newAdditionalObject();\n            var encryptorText = this.internal.getEncryptor(objText.objId);\n\n            var title = anno.title || \"Note\";\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Text\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptorText(anno.contents)) +\n              \")\";\n            line += \" /Popup \" + objPopup.objId + \" 0 R\";\n            line += \" /P \" + pageInfo.objId + \" 0 R\";\n            line += \" /T (\" + escape(encryptorText(title)) + \") >>\";\n            objText.content = line;\n\n            var parent = objText.objId + \" 0 R\";\n            var popoff = 30;\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x + popoff) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(\n                anno.bounds.x + anno.bounds.w + popoff\n              ) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Popup\" +\n              \" \" +\n              rect +\n              \" /Parent \" +\n              parent;\n            if (anno.open) {\n              line += \" /Open true\";\n            }\n            line += \" >>\";\n            objPopup.content = line;\n\n            this.internal.write(objText.objId, \"0 R\", objPopup.objId, \"0 R\");\n\n            break;\n          case \"freetext\":\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \"] \";\n            var color = anno.color || \"#000000\";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"FreeText\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptor(anno.contents)) +\n              \")\";\n            line +=\n              \" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#\" +\n              color +\n              \")\";\n            line += \" /Border [0 0 0]\";\n            line += \" >>\";\n            this.internal.write(line);\n            break;\n          case \"link\":\n            if (anno.options.name) {\n              var loc = this.annotations._nameMap[anno.options.name];\n              anno.options.pageNumber = loc.page;\n              anno.options.top = loc.y;\n            } else {\n              if (!anno.options.top) {\n                anno.options.top = 0;\n              }\n            }\n\n            rect =\n              \"/Rect [\" +\n              anno.finalBounds.x +\n              \" \" +\n              anno.finalBounds.y +\n              \" \" +\n              anno.finalBounds.w +\n              \" \" +\n              anno.finalBounds.h +\n              \"] \";\n\n            line = \"\";\n            if (anno.options.url) {\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /A <</S /URI /URI (\" +\n                escape(encryptor(anno.options.url)) +\n                \") >>\";\n            } else if (anno.options.pageNumber) {\n              // first page is 0\n              var info = this.internal.getPageInfo(anno.options.pageNumber);\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /Dest [\" +\n                info.objId +\n                \" 0 R\";\n              anno.options.magFactor = anno.options.magFactor || \"XYZ\";\n              switch (anno.options.magFactor) {\n                case \"Fit\":\n                  line += \" /Fit]\";\n                  break;\n                case \"FitH\":\n                  line += \" /FitH \" + anno.options.top + \"]\";\n                  break;\n                case \"FitV\":\n                  anno.options.left = anno.options.left || 0;\n                  line += \" /FitV \" + anno.options.left + \"]\";\n                  break;\n                case \"XYZ\":\n                default:\n                  var top = getVerticalCoordinateString(anno.options.top);\n                  anno.options.left = anno.options.left || 0;\n                  // 0 or null zoom will not change zoom factor\n                  if (typeof anno.options.zoom === \"undefined\") {\n                    anno.options.zoom = 0;\n                  }\n                  line +=\n                    \" /XYZ \" +\n                    anno.options.left +\n                    \" \" +\n                    top +\n                    \" \" +\n                    anno.options.zoom +\n                    \"]\";\n                  break;\n              }\n            }\n\n            if (line != \"\") {\n              line += \" >>\";\n              this.internal.write(line);\n            }\n            break;\n        }\n      }\n      this.internal.write(\"]\");\n    }\n  ]);\n\n  /**\n   * @name createAnnotation\n   * @function\n   * @param {Object} options\n   */\n  jsPDFAPI.createAnnotation = function(options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    switch (options.type) {\n      case \"link\":\n        this.link(\n          options.bounds.x,\n          options.bounds.y,\n          options.bounds.w,\n          options.bounds.h,\n          options\n        );\n        break;\n      case \"text\":\n      case \"freetext\":\n        pageInfo.pageContext.annotations.push(options);\n        break;\n    }\n  };\n\n  /**\n   * Create a link\n   *\n   * valid options\n   * <li> pageNumber or url [required]\n   * <p>If pageNumber is specified, top and zoom may also be specified</p>\n   * @name link\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} w\n   * @param {number} h\n   * @param {Object} options\n   */\n  jsPDFAPI.link = function(x, y, w, h, options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    var getHorizontalCoordinateString = this.internal.getCoordinateString;\n    var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\n\n    pageInfo.pageContext.annotations.push({\n      finalBounds: {\n        x: getHorizontalCoordinateString(x),\n        y: getVerticalCoordinateString(y),\n        w: getHorizontalCoordinateString(x + w),\n        h: getVerticalCoordinateString(y + h)\n      },\n      options: options,\n      type: \"link\"\n    });\n  };\n\n  /**\n   * Currently only supports single line text.\n   * Returns the width of the text/link\n   *\n   * @name textWithLink\n   * @function\n   * @param {string} text\n   * @param {number} x\n   * @param {number} y\n   * @param {Object} options\n   * @returns {number} width the width of the text/link\n   */\n  jsPDFAPI.textWithLink = function(text, x, y, options) {\n    var totalLineWidth = this.getTextWidth(text);\n    var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;\n    var linkHeight, linkWidth;\n\n    // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line\n    if (options.maxWidth !== undefined) {\n      var { maxWidth } = options;\n      linkWidth = maxWidth;\n      var numOfLines = this.splitTextToSize(text, linkWidth).length;\n      linkHeight = Math.ceil(lineHeight * numOfLines);\n    } else {\n      linkWidth = totalLineWidth;\n      linkHeight = lineHeight;\n    }\n\n    this.text(text, x, y, options);\n\n    //TODO We really need the text baseline height to do this correctly.\n    // Or ability to draw text on top, bottom, center, or baseline.\n    y += lineHeight * 0.2;\n    //handle x position based on the align option\n    if (options.align === \"center\") {\n      x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width\n    }\n    if (options.align === \"right\") {\n      x = x - totalLineWidth;\n    }\n    this.link(x, y - lineHeight, linkWidth, linkHeight, options);\n    return totalLineWidth;\n  };\n\n  //TODO move into external library\n  /**\n   * @name getTextWidth\n   * @function\n   * @param {string} text\n   * @returns {number} txtWidth\n   */\n  jsPDFAPI.getTextWidth = function(text) {\n    var fontSize = this.internal.getFontSize();\n    var txtWidth =\n      (this.getStringUnitWidth(text) * fontSize) / this.internal.scaleFactor;\n    return txtWidth;\n  };\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF arabic parser PlugIn\n *\n * @name arabic\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Arabic shape substitutions: char code => (isolated, final, initial, medial).\n   * Arabic Substition A\n   */\n  var arabicSubstitionA = {\n    0x0621: [0xfe80], // ARABIC LETTER HAMZA\n    0x0622: [0xfe81, 0xfe82], // ARABIC LETTER ALEF WITH MADDA ABOVE\n    0x0623: [0xfe83, 0xfe84], // ARABIC LETTER ALEF WITH HAMZA ABOVE\n    0x0624: [0xfe85, 0xfe86], // ARABIC LETTER WAW WITH HAMZA ABOVE\n    0x0625: [0xfe87, 0xfe88], // ARABIC LETTER ALEF WITH HAMZA BELOW\n    0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c], // ARABIC LETTER YEH WITH HAMZA ABOVE\n    0x0627: [0xfe8d, 0xfe8e], // ARABIC LETTER ALEF\n    0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92], // ARABIC LETTER BEH\n    0x0629: [0xfe93, 0xfe94], // ARABIC LETTER TEH MARBUTA\n    0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98], // ARABIC LETTER TEH\n    0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c], // ARABIC LETTER THEH\n    0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0], // ARABIC LETTER JEEM\n    0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4], // ARABIC LETTER HAH\n    0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8], // ARABIC LETTER KHAH\n    0x062f: [0xfea9, 0xfeaa], // ARABIC LETTER DAL\n    0x0630: [0xfeab, 0xfeac], // ARABIC LETTER THAL\n    0x0631: [0xfead, 0xfeae], // ARABIC LETTER REH\n    0x0632: [0xfeaf, 0xfeb0], // ARABIC LETTER ZAIN\n    0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4], // ARABIC LETTER SEEN\n    0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8], // ARABIC LETTER SHEEN\n    0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc], // ARABIC LETTER SAD\n    0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0], // ARABIC LETTER DAD\n    0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4], // ARABIC LETTER TAH\n    0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8], // ARABIC LETTER ZAH\n    0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc], // ARABIC LETTER AIN\n    0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0], // ARABIC LETTER GHAIN\n    0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4], // ARABIC LETTER FEH\n    0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8], // ARABIC LETTER QAF\n    0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc], // ARABIC LETTER KAF\n    0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0], // ARABIC LETTER LAM\n    0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], // ARABIC LETTER MEEM\n    0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], // ARABIC LETTER NOON\n    0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], // ARABIC LETTER HEH\n    0x0648: [0xfeed, 0xfeee], // ARABIC LETTER WAW\n    0x0649: [0xfeef, 0xfef0, 64488, 64489], // ARABIC LETTER ALEF MAKSURA\n    0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], // ARABIC LETTER YEH\n    0x0671: [0xfb50, 0xfb51], // ARABIC LETTER ALEF WASLA\n    0x0677: [0xfbdd], // ARABIC LETTER U WITH HAMZA ABOVE\n    0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], // ARABIC LETTER TTEH\n    0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], // ARABIC LETTER TTEHEH\n    0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], // ARABIC LETTER BEEH\n    0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], // ARABIC LETTER PEH\n    0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], // ARABIC LETTER TEHEH\n    0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], // ARABIC LETTER BEHEH\n    0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], // ARABIC LETTER NYEH\n    0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], // ARABIC LETTER DYEH\n    0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], // ARABIC LETTER TCHEH\n    0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], // ARABIC LETTER TCHEHEH\n    0x0688: [0xfb88, 0xfb89], // ARABIC LETTER DDAL\n    0x068c: [0xfb84, 0xfb85], // ARABIC LETTER DAHAL\n    0x068d: [0xfb82, 0xfb83], // ARABIC LETTER DDAHAL\n    0x068e: [0xfb86, 0xfb87], // ARABIC LETTER DUL\n    0x0691: [0xfb8c, 0xfb8d], // ARABIC LETTER RREH\n    0x0698: [0xfb8a, 0xfb8b], // ARABIC LETTER JEH\n    0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], // ARABIC LETTER VEH\n    0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], // ARABIC LETTER PEHEH\n    0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], // ARABIC LETTER KEHEH\n    0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], // ARABIC LETTER NG\n    0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], // ARABIC LETTER GAF\n    0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d], // ARABIC LETTER NGOEH\n    0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99], // ARABIC LETTER GUEH\n    0x06ba: [0xfb9e, 0xfb9f], // ARABIC LETTER NOON GHUNNA\n    0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3], // ARABIC LETTER RNOON\n    0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad], // ARABIC LETTER HEH DOACHASHMEE\n    0x06c0: [0xfba4, 0xfba5], // ARABIC LETTER HEH WITH YEH ABOVE\n    0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9], // ARABIC LETTER HEH GOAL\n    0x06c5: [0xfbe0, 0xfbe1], // ARABIC LETTER KIRGHIZ OE\n    0x06c6: [0xfbd9, 0xfbda], // ARABIC LETTER OE\n    0x06c7: [0xfbd7, 0xfbd8], // ARABIC LETTER U\n    0x06c8: [0xfbdb, 0xfbdc], // ARABIC LETTER YU\n    0x06c9: [0xfbe2, 0xfbe3], // ARABIC LETTER KIRGHIZ YU\n    0x06cb: [0xfbde, 0xfbdf], // ARABIC LETTER VE\n    0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff], // ARABIC LETTER FARSI YEH\n    0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7], //ARABIC LETTER E\n    0x06d2: [0xfbae, 0xfbaf], // ARABIC LETTER YEH BARREE\n    0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE\n  };\n\n  /*\n    var ligaturesSubstitutionA = {\n        0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM\n    };\n    */\n\n  var ligatures = {\n    0xfedf: {\n      0xfe82: 0xfef5, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM\n      0xfe84: 0xfef7, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM\n      0xfe88: 0xfef9, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM\n      0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM\n    },\n    0xfee0: {\n      0xfe82: 0xfef6, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM\n      0xfe84: 0xfef8, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM\n      0xfe88: 0xfefa, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM\n      0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM\n    },\n    0xfe8d: { 0xfedf: { 0xfee0: { 0xfeea: 0xfdf2 } } }, // ALLAH\n    0x0651: {\n      0x064c: 0xfc5e, // Shadda + Dammatan\n      0x064d: 0xfc5f, // Shadda + Kasratan\n      0x064e: 0xfc60, // Shadda + Fatha\n      0x064f: 0xfc61, // Shadda + Damma\n      0x0650: 0xfc62 // Shadda + Kasra\n    }\n  };\n\n  var arabic_diacritics = {\n    1612: 64606, // Shadda + Dammatan\n    1613: 64607, // Shadda + Kasratan\n    1614: 64608, // Shadda + Fatha\n    1615: 64609, // Shadda + Damma\n    1616: 64610 // Shadda + Kasra\n  };\n\n  var alfletter = [1570, 1571, 1573, 1575];\n\n  var noChangeInForm = -1;\n  var isolatedForm = 0;\n  var finalForm = 1;\n  var initialForm = 2;\n  var medialForm = 3;\n\n  jsPDFAPI.__arabicParser__ = {};\n\n  //private\n  var isInArabicSubstitutionA = (jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function(\n    letter\n  ) {\n    return typeof arabicSubstitionA[letter.charCodeAt(0)] !== \"undefined\";\n  });\n\n  var isArabicLetter = (jsPDFAPI.__arabicParser__.isArabicLetter = function(\n    letter\n  ) {\n    return (\n      typeof letter === \"string\" &&\n      /^[\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF\\uFB50-\\uFDFF\\uFE70-\\uFEFF]+$/.test(\n        letter\n      )\n    );\n  });\n\n  var isArabicEndLetter = (jsPDFAPI.__arabicParser__.isArabicEndLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length <= 2\n    );\n  });\n\n  var isArabicAlfLetter = (jsPDFAPI.__arabicParser__.isArabicAlfLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 1\n    );\n  };\n\n  var arabicLetterHasFinalForm = (jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 2\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 3\n    );\n  };\n\n  var arabicLetterHasMedialForm = (jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length == 4\n    );\n  });\n\n  var resolveLigatures = (jsPDFAPI.__arabicParser__.resolveLigatures = function(\n    letters\n  ) {\n    var i = 0;\n    var tmpLigatures = ligatures;\n    var result = \"\";\n    var effectedLetters = 0;\n\n    for (i = 0; i < letters.length; i += 1) {\n      if (typeof tmpLigatures[letters.charCodeAt(i)] !== \"undefined\") {\n        effectedLetters++;\n        tmpLigatures = tmpLigatures[letters.charCodeAt(i)];\n\n        if (typeof tmpLigatures === \"number\") {\n          result += String.fromCharCode(tmpLigatures);\n          tmpLigatures = ligatures;\n          effectedLetters = 0;\n        }\n        if (i === letters.length - 1) {\n          tmpLigatures = ligatures;\n          result += letters.charAt(i - (effectedLetters - 1));\n          i = i - (effectedLetters - 1);\n          effectedLetters = 0;\n        }\n      } else {\n        tmpLigatures = ligatures;\n        result += letters.charAt(i - effectedLetters);\n        i = i - effectedLetters;\n        effectedLetters = 0;\n      }\n    }\n\n    return result;\n  });\n\n  jsPDFAPI.__arabicParser__.isArabicDiacritic = function(letter) {\n    return (\n      letter !== undefined &&\n      arabic_diacritics[letter.charCodeAt(0)] !== undefined\n    );\n  };\n\n  var getCorrectForm = (jsPDFAPI.__arabicParser__.getCorrectForm = function(\n    currentChar,\n    beforeChar,\n    nextChar\n  ) {\n    if (!isArabicLetter(currentChar)) {\n      return -1;\n    }\n\n    if (isInArabicSubstitutionA(currentChar) === false) {\n      return noChangeInForm;\n    }\n    if (\n      !arabicLetterHasFinalForm(currentChar) ||\n      (!isArabicLetter(beforeChar) && !isArabicLetter(nextChar)) ||\n      (!isArabicLetter(nextChar) && isArabicEndLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar))\n    ) {\n      return isolatedForm;\n    }\n\n    if (\n      arabicLetterHasMedialForm(currentChar) &&\n      isArabicLetter(beforeChar) &&\n      !isArabicEndLetter(beforeChar) &&\n      isArabicLetter(nextChar) &&\n      arabicLetterHasFinalForm(nextChar)\n    ) {\n      return medialForm;\n    }\n\n    if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {\n      return finalForm;\n    }\n    return initialForm;\n  });\n\n  /**\n   * @name processArabic\n   * @function\n   * @param {string} text\n   * @returns {string}\n   */\n  var parseArabic = function(text) {\n    text = text || \"\";\n\n    var result = \"\";\n    var i = 0;\n    var j = 0;\n    var position = 0;\n    var currentLetter = \"\";\n    var prevLetter = \"\";\n    var nextLetter = \"\";\n\n    var words = text.split(\"\\\\s+\");\n    var newWords = [];\n    for (i = 0; i < words.length; i += 1) {\n      newWords.push(\"\");\n      for (j = 0; j < words[i].length; j += 1) {\n        currentLetter = words[i][j];\n        prevLetter = words[i][j - 1];\n        nextLetter = words[i][j + 1];\n        if (isArabicLetter(currentLetter)) {\n          position = getCorrectForm(currentLetter, prevLetter, nextLetter);\n          if (position !== -1) {\n            newWords[i] += String.fromCharCode(\n              arabicSubstitionA[currentLetter.charCodeAt(0)][position]\n            );\n          } else {\n            newWords[i] += currentLetter;\n          }\n        } else {\n          newWords[i] += currentLetter;\n        }\n      }\n\n      newWords[i] = resolveLigatures(newWords[i]);\n    }\n    result = newWords.join(\" \");\n\n    return result;\n  };\n\n  var processArabic = (jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function() {\n    var text =\n      typeof arguments[0] === \"string\" ? arguments[0] : arguments[0].text;\n    var tmpText = [];\n    var result;\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);\n        } else {\n          tmpText.push([parseArabic(text[i])]);\n        }\n      }\n      result = tmpText;\n    } else {\n      result = parseArabic(text);\n    }\n    if (typeof arguments[0] === \"string\") {\n      return result;\n    } else {\n      arguments[0].text = result;\n      return arguments[0];\n    }\n  });\n\n  jsPDFAPI.events.push([\"preProcessText\", processArabic]);\n})(jsPDF.API);\n","/** @license\n * jsPDF Autoprint Plugin\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name autoprint\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.\n   *\n   * @name autoPrint\n   * @function\n   * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF();\n   * doc.text(10, 10, 'This is a test');\n   * doc.autoPrint({variant: 'non-conform'});\n   * doc.save('autoprint.pdf');\n   */\n  jsPDFAPI.autoPrint = function(options) {\n    \"use strict\";\n    var refAutoPrintTag;\n    options = options || {};\n    options.variant = options.variant || \"non-conform\";\n\n    switch (options.variant) {\n      case \"javascript\":\n        //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb\n        this.addJS(\"print({});\");\n        break;\n      case \"non-conform\":\n      default:\n        this.internal.events.subscribe(\"postPutResources\", function() {\n          refAutoPrintTag = this.internal.newObject();\n          this.internal.out(\"<<\");\n          this.internal.out(\"/S /Named\");\n          this.internal.out(\"/Type /Action\");\n          this.internal.out(\"/N /Print\");\n          this.internal.out(\">>\");\n          this.internal.out(\"endobj\");\n        });\n\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.out(\"/OpenAction \" + refAutoPrintTag + \" 0 R\");\n        });\n        break;\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Canvas PlugIn\n * This plugin mimics the HTML5 Canvas\n *\n * The goal is to provide a way for current canvas users to print directly to a PDF.\n * @name canvas\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @class Canvas\n   * @classdesc A Canvas Wrapper for jsPDF\n   */\n  var Canvas = function() {\n    var jsPdfInstance = undefined;\n    Object.defineProperty(this, \"pdf\", {\n      get: function() {\n        return jsPdfInstance;\n      },\n      set: function(value) {\n        jsPdfInstance = value;\n      }\n    });\n\n    var _width = 150;\n    /**\n     * The height property is a positive integer reflecting the height HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.\n     * This is one of the two properties, the other being width, that controls the size of the canvas.\n     *\n     * @name width\n     */\n    Object.defineProperty(this, \"width\", {\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _width = 150;\n        } else {\n          _width = value;\n        }\n        if (this.getContext(\"2d\").pageWrapXEnabled) {\n          this.getContext(\"2d\").pageWrapX = _width + 1;\n        }\n      }\n    });\n\n    var _height = 300;\n    /**\n     * The width property is a positive integer reflecting the width HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.\n     * This is one of the two properties, the other being height, that controls the size of the canvas.\n     *\n     * @name height\n     */\n    Object.defineProperty(this, \"height\", {\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _height = 300;\n        } else {\n          _height = value;\n        }\n        if (this.getContext(\"2d\").pageWrapYEnabled) {\n          this.getContext(\"2d\").pageWrapY = _height + 1;\n        }\n      }\n    });\n\n    var _childNodes = [];\n    Object.defineProperty(this, \"childNodes\", {\n      get: function() {\n        return _childNodes;\n      },\n      set: function(value) {\n        _childNodes = value;\n      }\n    });\n\n    var _style = {};\n    Object.defineProperty(this, \"style\", {\n      get: function() {\n        return _style;\n      },\n      set: function(value) {\n        _style = value;\n      }\n    });\n\n    Object.defineProperty(this, \"parentNode\", {});\n  };\n\n  /**\n   * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\n   *\n   * @name getContext\n   * @function\n   * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is \"2d\", leading to the creation of a Context2D object representing a two-dimensional rendering context.\n   * @param {object} contextAttributes\n   */\n  Canvas.prototype.getContext = function(contextType, contextAttributes) {\n    contextType = contextType || \"2d\";\n    var key;\n\n    if (contextType !== \"2d\") {\n      return null;\n    }\n    for (key in contextAttributes) {\n      if (this.pdf.context2d.hasOwnProperty(key)) {\n        this.pdf.context2d[key] = contextAttributes[key];\n      }\n    }\n    this.pdf.context2d._canvas = this;\n    return this.pdf.context2d;\n  };\n\n  /**\n   * The toDataURL() method is just a stub to throw an error if accidently called.\n   *\n   * @name toDataURL\n   * @function\n   */\n  Canvas.prototype.toDataURL = function() {\n    throw new Error(\"toDataURL is not implemented.\");\n  };\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      this.canvas = new Canvas();\n      this.canvas.pdf = this;\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *               2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *               2013 Lee Driscoll, https://github.com/lsdriscoll\n *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n *               2014 James Hall, james@parall.ax\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name cell\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var NO_MARGINS = { left: 0, top: 0, bottom: 0, right: 0 };\n\n  var px2pt = (0.264583 * 72) / 25.4;\n  var printingHeaderRow = false;\n\n  var _initialize = function() {\n    if (typeof this.internal.__cell__ === \"undefined\") {\n      this.internal.__cell__ = {};\n      this.internal.__cell__.padding = 3;\n      this.internal.__cell__.headerFunction = undefined;\n      this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);\n      this.internal.__cell__.margins.width = this.getPageWidth();\n      _reset.call(this);\n    }\n  };\n\n  var _reset = function() {\n    this.internal.__cell__.lastCell = new Cell();\n    this.internal.__cell__.pages = 1;\n  };\n\n  var Cell = function() {\n    var _x = arguments[0];\n    Object.defineProperty(this, \"x\", {\n      enumerable: true,\n      get: function() {\n        return _x;\n      },\n      set: function(value) {\n        _x = value;\n      }\n    });\n    var _y = arguments[1];\n    Object.defineProperty(this, \"y\", {\n      enumerable: true,\n      get: function() {\n        return _y;\n      },\n      set: function(value) {\n        _y = value;\n      }\n    });\n    var _width = arguments[2];\n    Object.defineProperty(this, \"width\", {\n      enumerable: true,\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        _width = value;\n      }\n    });\n    var _height = arguments[3];\n    Object.defineProperty(this, \"height\", {\n      enumerable: true,\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        _height = value;\n      }\n    });\n    var _text = arguments[4];\n    Object.defineProperty(this, \"text\", {\n      enumerable: true,\n      get: function() {\n        return _text;\n      },\n      set: function(value) {\n        _text = value;\n      }\n    });\n    var _lineNumber = arguments[5];\n    Object.defineProperty(this, \"lineNumber\", {\n      enumerable: true,\n      get: function() {\n        return _lineNumber;\n      },\n      set: function(value) {\n        _lineNumber = value;\n      }\n    });\n    var _align = arguments[6];\n    Object.defineProperty(this, \"align\", {\n      enumerable: true,\n      get: function() {\n        return _align;\n      },\n      set: function(value) {\n        _align = value;\n      }\n    });\n\n    return this;\n  };\n\n  Cell.prototype.clone = function() {\n    return new Cell(\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    );\n  };\n\n  Cell.prototype.toArray = function() {\n    return [\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    ];\n  };\n\n  /**\n   * @name setHeaderFunction\n   * @function\n   * @param {function} func\n   */\n  jsPDFAPI.setHeaderFunction = function(func) {\n    _initialize.call(this);\n    this.internal.__cell__.headerFunction =\n      typeof func === \"function\" ? func : undefined;\n    return this;\n  };\n\n  /**\n   * @name getTextDimensions\n   * @function\n   * @param {string} txt\n   * @returns {Object} dimensions\n   */\n  jsPDFAPI.getTextDimensions = function(text, options) {\n    _initialize.call(this);\n    options = options || {};\n    var fontSize = options.fontSize || this.getFontSize();\n    var font = options.font || this.getFont();\n    var scaleFactor = options.scaleFactor || this.internal.scaleFactor;\n    var width = 0;\n    var amountOfLines = 0;\n    var height = 0;\n    var tempWidth = 0;\n    var scope = this;\n\n    if (!Array.isArray(text) && typeof text !== \"string\") {\n      if (typeof text === \"number\") {\n        text = String(text);\n      } else {\n        throw new Error(\n          \"getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.\"\n        );\n      }\n    }\n\n    const maxWidth = options.maxWidth;\n    if (maxWidth > 0) {\n      if (typeof text === \"string\") {\n        text = this.splitTextToSize(text, maxWidth);\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\n        text = text.reduce(function(acc, textLine) {\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\n        }, []);\n      }\n    } else {\n      // Without the else clause, it will not work if you do not pass along maxWidth\n      text = Array.isArray(text) ? text : [text];\n    }\n\n    for (var i = 0; i < text.length; i++) {\n      tempWidth = this.getStringUnitWidth(text[i], { font: font }) * fontSize;\n      if (width < tempWidth) {\n        width = tempWidth;\n      }\n    }\n\n    if (width !== 0) {\n      amountOfLines = text.length;\n    }\n\n    width = width / scaleFactor;\n    height = Math.max(\n      (amountOfLines * fontSize * this.getLineHeightFactor() -\n        fontSize * (this.getLineHeightFactor() - 1)) /\n        scaleFactor,\n      0\n    );\n    return { w: width, h: height };\n  };\n\n  /**\n   * @name cellAddPage\n   * @function\n   */\n  jsPDFAPI.cellAddPage = function() {\n    _initialize.call(this);\n\n    this.addPage();\n\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    this.internal.__cell__.lastCell = new Cell(\n      margins.left,\n      margins.top,\n      undefined,\n      undefined\n    );\n    this.internal.__cell__.pages += 1;\n\n    return this;\n  };\n\n  /**\n   * @name cell\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} width\n   * @param {number} height\n   * @param {string} text\n   * @param {number} lineNumber lineNumber\n   * @param {string} align\n   * @return {jsPDF} jsPDF-instance\n   */\n  var cell = (jsPDFAPI.cell = function() {\n    var currentCell;\n\n    if (arguments[0] instanceof Cell) {\n      currentCell = arguments[0];\n    } else {\n      currentCell = new Cell(\n        arguments[0],\n        arguments[1],\n        arguments[2],\n        arguments[3],\n        arguments[4],\n        arguments[5]\n      );\n    }\n    _initialize.call(this);\n    var lastCell = this.internal.__cell__.lastCell;\n    var padding = this.internal.__cell__.padding;\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    var tableHeaderRow = this.internal.__cell__.tableHeaderRow;\n    var printHeaders = this.internal.__cell__.printHeaders;\n    // If this is not the first cell, we must change its position\n    if (typeof lastCell.lineNumber !== \"undefined\") {\n      if (lastCell.lineNumber === currentCell.lineNumber) {\n        //Same line\n        currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);\n        currentCell.y = lastCell.y || 0;\n      } else {\n        //New line\n        if (\n          lastCell.y + lastCell.height + currentCell.height + margins.bottom >\n          this.getPageHeight()\n        ) {\n          this.cellAddPage();\n          currentCell.y = margins.top;\n          if (printHeaders && tableHeaderRow) {\n            this.printHeaderRow(currentCell.lineNumber, true);\n            currentCell.y += tableHeaderRow[0].height;\n          }\n        } else {\n          currentCell.y = lastCell.y + lastCell.height || currentCell.y;\n        }\n      }\n    }\n\n    if (typeof currentCell.text[0] !== \"undefined\") {\n      this.rect(\n        currentCell.x,\n        currentCell.y,\n        currentCell.width,\n        currentCell.height,\n        printingHeaderRow === true ? \"FD\" : undefined\n      );\n      if (currentCell.align === \"right\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width - padding,\n          currentCell.y + padding,\n          { align: \"right\", baseline: \"top\" }\n        );\n      } else if (currentCell.align === \"center\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width / 2,\n          currentCell.y + padding,\n          {\n            align: \"center\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      } else {\n        this.text(\n          currentCell.text,\n          currentCell.x + padding,\n          currentCell.y + padding,\n          {\n            align: \"left\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      }\n    }\n    this.internal.__cell__.lastCell = currentCell;\n    return this;\n  });\n\n  /**\n     * Create a table from a set of data.\n     * @name table\n     * @function\n     * @param {Integer} [x] : left-position for top-left corner of table\n     * @param {Integer} [y] top-position for top-left corner of table\n     * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.\n     * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost\n\n     * @param {Object} [config.printHeaders] True to print column headers at the top of every page\n     * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value\n     * @param {Object} [config.margins] margin values for left, top, bottom, and width\n     * @param {Object} [config.fontSize] Integer fontSize to use (optional)\n     * @param {Object} [config.padding] cell-padding in pt to use (optional)\n     * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)\n     * @param {Object} [config.headerTextColor] default is #000 (optional)\n     * @param {Object} [config.rowStart] callback to handle before print each row (optional)\n     * @param {Object} [config.cellStart] callback to handle before print each cell (optional)\n     * @returns {jsPDF} jsPDF-instance\n     */\n\n  jsPDFAPI.table = function(x, y, data, headers, config) {\n    _initialize.call(this);\n    if (!data) {\n      throw new Error(\"No data for PDF table.\");\n    }\n\n    config = config || {};\n\n    var headerNames = [],\n      headerLabels = [],\n      headerAligns = [],\n      i,\n      columnMatrix = {},\n      columnWidths = {},\n      column,\n      columnMinWidths = [],\n      j,\n      tableHeaderConfigs = [],\n      //set up defaults. If a value is provided in config, defaults will be overwritten:\n      autoSize = config.autoSize || false,\n      printHeaders = config.printHeaders === false ? false : true,\n      fontSize =\n        config.css && typeof config.css[\"font-size\"] !== \"undefined\"\n          ? config.css[\"font-size\"] * 16\n          : config.fontSize || 12,\n      margins =\n        config.margins ||\n        Object.assign({ width: this.getPageWidth() }, NO_MARGINS),\n      padding = typeof config.padding === \"number\" ? config.padding : 3,\n      headerBackgroundColor = config.headerBackgroundColor || \"#c8c8c8\",\n      headerTextColor = config.headerTextColor || \"#000\";\n\n    _reset.call(this);\n\n    this.internal.__cell__.printHeaders = printHeaders;\n    this.internal.__cell__.margins = margins;\n    this.internal.__cell__.table_font_size = fontSize;\n    this.internal.__cell__.padding = padding;\n    this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;\n    this.internal.__cell__.headerTextColor = headerTextColor;\n    this.setFontSize(fontSize);\n\n    // Set header values\n    if (headers === undefined || headers === null) {\n      // No headers defined so we derive from data\n      headerNames = Object.keys(data[0]);\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    } else if (Array.isArray(headers) && typeof headers[0] === \"object\") {\n      headerNames = headers.map(function(header) {\n        return header.name;\n      });\n      headerLabels = headers.map(function(header) {\n        return header.prompt || header.name || \"\";\n      });\n      headerAligns = headers.map(function(header) {\n        return header.align || \"left\";\n      });\n      // Split header configs into names and prompts\n      for (i = 0; i < headers.length; i += 1) {\n        columnWidths[headers[i].name] = headers[i].width * px2pt;\n      }\n    } else if (Array.isArray(headers) && typeof headers[0] === \"string\") {\n      headerNames = headers;\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    }\n\n    if (\n      autoSize ||\n      (Array.isArray(headers) && typeof headers[0] === \"string\")\n    ) {\n      var headerName;\n      for (i = 0; i < headerNames.length; i += 1) {\n        headerName = headerNames[i];\n\n        // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}\n\n        columnMatrix[headerName] = data.map(function(rec) {\n          return rec[headerName];\n        });\n\n        // get header width\n        this.setFont(undefined, \"bold\");\n        columnMinWidths.push(\n          this.getTextDimensions(headerLabels[i], {\n            fontSize: this.internal.__cell__.table_font_size,\n            scaleFactor: this.internal.scaleFactor\n          }).w\n        );\n        column = columnMatrix[headerName];\n\n        // get cell widths\n        this.setFont(undefined, \"normal\");\n        for (j = 0; j < column.length; j += 1) {\n          columnMinWidths.push(\n            this.getTextDimensions(column[j], {\n              fontSize: this.internal.__cell__.table_font_size,\n              scaleFactor: this.internal.scaleFactor\n            }).w\n          );\n        }\n\n        // get final column width\n        columnWidths[headerName] =\n          Math.max.apply(null, columnMinWidths) + padding + padding;\n\n        //have to reset\n        columnMinWidths = [];\n      }\n    }\n\n    // -- Construct the table\n\n    if (printHeaders) {\n      var row = {};\n      for (i = 0; i < headerNames.length; i += 1) {\n        row[headerNames[i]] = {};\n        row[headerNames[i]].text = headerLabels[i];\n        row[headerNames[i]].align = headerAligns[i];\n      }\n\n      var rowHeight = calculateLineHeight.call(this, row, columnWidths);\n\n      // Construct the header row\n      tableHeaderConfigs = headerNames.map(function(value) {\n        return new Cell(\n          x,\n          y,\n          columnWidths[value],\n          rowHeight,\n          row[value].text,\n          undefined,\n          row[value].align\n        );\n      });\n\n      // Store the table header config\n      this.setTableHeaderRow(tableHeaderConfigs);\n\n      // Print the header for the start of the table\n      this.printHeaderRow(1, false);\n    }\n\n    // Construct the data rows\n\n    var align = headers.reduce(function(pv, cv) {\n      pv[cv.name] = cv.align;\n      return pv;\n    }, {});\n    for (i = 0; i < data.length; i += 1) {\n      if (\"rowStart\" in config && config.rowStart instanceof Function) {\n        config.rowStart(\n          {\n            row: i,\n            data: data[i]\n          },\n          this\n        );\n      }\n      var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);\n\n      for (j = 0; j < headerNames.length; j += 1) {\n        var cellData = data[i][headerNames[j]];\n        if (\"cellStart\" in config && config.cellStart instanceof Function) {\n          config.cellStart(\n            {\n              row: i,\n              col: j,\n              data: cellData\n            },\n            this\n          );\n        }\n        cell.call(\n          this,\n          new Cell(\n            x,\n            y,\n            columnWidths[headerNames[j]],\n            lineHeight,\n            cellData,\n            i + 2,\n            align[headerNames[j]]\n          )\n        );\n      }\n    }\n    this.internal.__cell__.table_x = x;\n    this.internal.__cell__.table_y = y;\n    return this;\n  };\n\n  /**\n   * Calculate the height for containing the highest column\n   *\n   * @name calculateLineHeight\n   * @function\n   * @param {Object[]} model is the line of data we want to calculate the height of\n   * @param {Integer[]} columnWidths is size of each column\n   * @returns {number} lineHeight\n   * @private\n   */\n  var calculateLineHeight = function calculateLineHeight(model, columnWidths) {\n    var padding = this.internal.__cell__.padding;\n    var fontSize = this.internal.__cell__.table_font_size;\n    var scaleFactor = this.internal.scaleFactor;\n\n    return Object.keys(model)\n      .map(function(key) {\n        var value = model[key];\n        return this.splitTextToSize(\n          value.hasOwnProperty(\"text\") ? value.text : value,\n          columnWidths[key] - padding - padding\n        );\n      }, this)\n      .map(function(value) {\n        return (\n          (this.getLineHeightFactor() * value.length * fontSize) / scaleFactor +\n          padding +\n          padding\n        );\n      }, this)\n      .reduce(function(pv, cv) {\n        return Math.max(pv, cv);\n      }, 0);\n  };\n\n  /**\n   * Store the config for outputting a table header\n   *\n   * @name setTableHeaderRow\n   * @function\n   * @param {Object[]} config\n   * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell\n   * except the lineNumber parameter is excluded\n   */\n  jsPDFAPI.setTableHeaderRow = function(config) {\n    _initialize.call(this);\n    this.internal.__cell__.tableHeaderRow = config;\n  };\n\n  /**\n   * Output the store header row\n   *\n   * @name printHeaderRow\n   * @function\n   * @param {number} lineNumber The line number to output the header at\n   * @param {boolean} new_page\n   */\n  jsPDFAPI.printHeaderRow = function(lineNumber, new_page) {\n    _initialize.call(this);\n    if (!this.internal.__cell__.tableHeaderRow) {\n      throw new Error(\"Property tableHeaderRow does not exist.\");\n    }\n\n    var tableHeaderCell;\n\n    printingHeaderRow = true;\n    if (typeof this.internal.__cell__.headerFunction === \"function\") {\n      var position = this.internal.__cell__.headerFunction(\n        this,\n        this.internal.__cell__.pages\n      );\n      this.internal.__cell__.lastCell = new Cell(\n        position[0],\n        position[1],\n        position[2],\n        position[3],\n        undefined,\n        -1\n      );\n    }\n    this.setFont(undefined, \"bold\");\n\n    var tempHeaderConf = [];\n    for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {\n      tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();\n      if (new_page) {\n        tableHeaderCell.y = this.internal.__cell__.margins.top || 0;\n        tempHeaderConf.push(tableHeaderCell);\n      }\n      tableHeaderCell.lineNumber = lineNumber;\n      var currentTextColor = this.getTextColor();\n      this.setTextColor(this.internal.__cell__.headerTextColor);\n      this.setFillColor(this.internal.__cell__.headerBackgroundColor);\n      cell.call(this, tableHeaderCell);\n      this.setTextColor(currentTextColor);\n    }\n    if (tempHeaderConf.length > 0) {\n      this.setTableHeaderRow(tempHeaderConf);\n    }\n    this.setFont(undefined, \"normal\");\n    printingHeaderRow = false;\n  };\n})(jsPDF.API);\n","function toLookup(arr) {\n  return arr.reduce(function(lookup, name, index) {\n    lookup[name] = index;\n\n    return lookup;\n  }, {});\n}\n\nvar fontStyleOrder = {\n  italic: [\"italic\", \"oblique\", \"normal\"],\n  oblique: [\"oblique\", \"italic\", \"normal\"],\n  normal: [\"normal\", \"oblique\", \"italic\"]\n};\n\nvar fontStretchOrder = [\n  \"ultra-condensed\",\n  \"extra-condensed\",\n  \"condensed\",\n  \"semi-condensed\",\n  \"normal\",\n  \"semi-expanded\",\n  \"expanded\",\n  \"extra-expanded\",\n  \"ultra-expanded\"\n];\n\n// For a given font-stretch value, we need to know where to start our search\n// from in the fontStretchOrder list.\nvar fontStretchLookup = toLookup(fontStretchOrder);\n\nvar fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];\nvar fontWeightsLookup = toLookup(fontWeights);\n\nfunction normalizeFontStretch(stretch) {\n  stretch = stretch || \"normal\";\n\n  return typeof fontStretchLookup[stretch] === \"number\" ? stretch : \"normal\";\n}\n\nfunction normalizeFontStyle(style) {\n  style = style || \"normal\";\n\n  return fontStyleOrder[style] ? style : \"normal\";\n}\n\nfunction normalizeFontWeight(weight) {\n  if (!weight) {\n    return 400;\n  }\n\n  if (typeof weight === \"number\") {\n    // Ignore values which aren't valid font-weights.\n    return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;\n  }\n\n  if (/^\\d00$/.test(weight)) {\n    return parseInt(weight);\n  }\n\n  switch (weight) {\n    case \"bold\":\n      return 700;\n\n    case \"normal\":\n    default:\n      return 400;\n  }\n}\n\nexport function normalizeFontFace(fontFace) {\n  var family = fontFace.family.replace(/\"|'/g, \"\").toLowerCase();\n\n  var style = normalizeFontStyle(fontFace.style);\n  var weight = normalizeFontWeight(fontFace.weight);\n  var stretch = normalizeFontStretch(fontFace.stretch);\n\n  return {\n    family: family,\n    style: style,\n    weight: weight,\n    stretch: stretch,\n    src: fontFace.src || [],\n\n    // The ref property maps this font-face to the font\n    // added by the .addFont() method.\n    ref: fontFace.ref || {\n      name: family,\n      style: [stretch, style, weight].join(\" \")\n    }\n  };\n}\n\n/**\n * Turns a list of font-faces into a map, for easier lookup when resolving\n * fonts.\n * @private\n */\nexport function buildFontFaceMap(fontFaces) {\n  var map = {};\n\n  for (var i = 0; i < fontFaces.length; ++i) {\n    var normalized = normalizeFontFace(fontFaces[i]);\n\n    var name = normalized.family;\n    var stretch = normalized.stretch;\n    var style = normalized.style;\n    var weight = normalized.weight;\n\n    map[name] = map[name] || {};\n\n    map[name][stretch] = map[name][stretch] || {};\n    map[name][stretch][style] = map[name][stretch][style] || {};\n    map[name][stretch][style][weight] = normalized;\n  }\n\n  return map;\n}\n\n/**\n * Searches a map of stretches, weights, etc. in the given direction and\n * then, if no match has been found, in the opposite directions.\n *\n * @param {Object.<string, any>} matchingSet A map of the various font variations.\n * @param {any[]} order The order of the different variations\n * @param {number} pivot The starting point of the search in the order list.\n * @param {number} dir The initial direction of the search (desc = -1, asc = 1)\n * @private\n */\n\nfunction searchFromPivot(matchingSet, order, pivot, dir) {\n  var i;\n\n  for (i = pivot; i >= 0 && i < order.length; i += dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n\n  for (i = pivot; i >= 0 && i < order.length; i -= dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n}\n\nfunction resolveFontStretch(stretch, matchingSet) {\n  if (matchingSet[stretch]) {\n    return matchingSet[stretch];\n  }\n\n  var pivot = fontStretchLookup[stretch];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = pivot <= fontStretchLookup[\"normal\"] ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-stretch value for \" + stretch\n    );\n  }\n\n  return match;\n}\n\nfunction resolveFontStyle(fontStyle, matchingSet) {\n  if (matchingSet[fontStyle]) {\n    return matchingSet[fontStyle];\n  }\n\n  var ordering = fontStyleOrder[fontStyle];\n\n  for (var i = 0; i < ordering.length; ++i) {\n    if (matchingSet[ordering[i]]) {\n      return matchingSet[ordering[i]];\n    }\n  }\n\n  // Since a font-family cannot exist without having at least one style value\n  // we should never reach this point.\n  throw new Error(\"Could not find a matching font-style for \" + fontStyle);\n}\n\nfunction resolveFontWeight(weight, matchingSet) {\n  if (matchingSet[weight]) {\n    return matchingSet[weight];\n  }\n\n  if (weight === 400 && matchingSet[500]) {\n    return matchingSet[500];\n  }\n\n  if (weight === 500 && matchingSet[400]) {\n    return matchingSet[400];\n  }\n\n  var pivot = fontWeightsLookup[weight];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = weight < 400 ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-weight for value \" + weight\n    );\n  }\n\n  return match;\n}\n\nvar defaultGenericFontFamilies = {\n  \"sans-serif\": \"helvetica\",\n  fixed: \"courier\",\n  monospace: \"courier\",\n  terminal: \"courier\",\n  cursive: \"times\",\n  fantasy: \"times\",\n  serif: \"times\"\n};\n\nvar systemFonts = {\n  caption: \"times\",\n  icon: \"times\",\n  menu: \"times\",\n  \"message-box\": \"times\",\n  \"small-caption\": \"times\",\n  \"status-bar\": \"times\"\n};\n\nfunction ruleToString(rule) {\n  return [rule.stretch, rule.style, rule.weight, rule.family].join(\" \");\n}\n\nexport function resolveFontFace(fontFaceMap, rules, opts) {\n  opts = opts || {};\n\n  var defaultFontFamily = opts.defaultFontFamily || \"times\";\n  var genericFontFamilies = Object.assign(\n    {},\n    defaultGenericFontFamilies,\n    opts.genericFontFamilies || {}\n  );\n\n  var rule = null;\n  var matches = null;\n\n  for (var i = 0; i < rules.length; ++i) {\n    rule = normalizeFontFace(rules[i]);\n\n    if (genericFontFamilies[rule.family]) {\n      rule.family = genericFontFamilies[rule.family];\n    }\n\n    if (fontFaceMap.hasOwnProperty(rule.family)) {\n      matches = fontFaceMap[rule.family];\n\n      break;\n    }\n  }\n\n  // Always fallback to a known font family.\n  matches = matches || fontFaceMap[defaultFontFamily];\n\n  if (!matches) {\n    // At this point we should definitiely have a font family, but if we\n    // don't there is something wrong with our configuration\n    throw new Error(\n      \"Could not find a font-family for the rule '\" +\n        ruleToString(rule) +\n        \"' and default family '\" +\n        defaultFontFamily +\n        \"'.\"\n    );\n  }\n\n  matches = resolveFontStretch(rule.stretch, matches);\n  matches = resolveFontStyle(rule.style, matches);\n  matches = resolveFontWeight(rule.weight, matches);\n\n  if (!matches) {\n    // We should've fount\n    throw new Error(\n      \"Failed to resolve a font for the rule '\" + ruleToString(rule) + \"'.\"\n    );\n  }\n\n  return matches;\n}\n\n/**\n * Builds a style id for use with the addFont() method.\n * @param {FontFace} font\n * @private\n */\nexport function toStyleName(font) {\n  return [font.weight, font.style, font.stretch].join(\" \");\n}\n\nfunction eatWhiteSpace(input) {\n  return input.trimLeft();\n}\n\nfunction parseQuotedFontFamily(input, quote) {\n  var index = 0;\n\n  while (index < input.length) {\n    var current = input.charAt(index);\n\n    if (current === quote) {\n      return [input.substring(0, index), input.substring(index + 1)];\n    }\n\n    index += 1;\n  }\n\n  // Unexpected end of input\n  return null;\n}\n\nfunction parseNonQuotedFontFamily(input) {\n  // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n  //\n  // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.\n  //\n  // Breakdown of regexp:\n  // -[a-z_]     - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit\n  // [a-z_]      - allow a-z and underscore at beginning of input\n  // [a-z0-9_-]* - after that, anything goes\n  var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);\n\n  // non quoted value contains illegal characters\n  if (match === null) {\n    return null;\n  }\n\n  return [match[0], input.substring(match[0].length)];\n}\n\nvar defaultFont = [\"times\"];\n\nexport function parseFontFamily(input) {\n  var result = [];\n  var ch, parsed;\n  var remaining = input.trim();\n\n  if (remaining === \"\") {\n    return defaultFont;\n  }\n\n  if (remaining in systemFonts) {\n    return [systemFonts[remaining]];\n  }\n\n  while (remaining !== \"\") {\n    parsed = null;\n    remaining = eatWhiteSpace(remaining);\n    ch = remaining.charAt(0);\n\n    switch (ch) {\n      case '\"':\n      case \"'\":\n        parsed = parseQuotedFontFamily(remaining.substring(1), ch);\n        break;\n\n      default:\n        parsed = parseNonQuotedFontFamily(remaining);\n        break;\n    }\n\n    if (parsed === null) {\n      return defaultFont;\n    }\n\n    result.push(parsed[0]);\n\n    remaining = eatWhiteSpace(parsed[1]);\n\n    // We expect end of input or a comma separator here\n    if (remaining !== \"\" && remaining.charAt(0) !== \",\") {\n      return defaultFont;\n    }\n\n    remaining = remaining.replace(/^,/, \"\");\n  }\n\n  return result;\n}\n","/* eslint-disable no-fallthrough */\r\n/* eslint-disable no-console */\r\n/**\r\n * @license\r\n * jsPDF Context2D PlugIn Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\r\n *\r\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\r\n */\r\n\r\nimport { jsPDF } from \"../jspdf.js\";\r\nimport { RGBColor } from \"../libs/rgbcolor.js\";\r\nimport { console } from \"../libs/console.js\";\r\nimport {\r\n  buildFontFaceMap,\r\n  parseFontFamily,\r\n  resolveFontFace\r\n} from \"../libs/fontFace.js\";\r\n\r\n/**\r\n * This plugin mimics the HTML5 CanvasRenderingContext2D.\r\n *\r\n * The goal is to provide a way for current canvas implementations to print directly to a PDF.\r\n *\r\n * @name context2d\r\n * @module\r\n */\r\n(function(jsPDFAPI) {\r\n  \"use strict\";\r\n  var ContextLayer = function(ctx) {\r\n    ctx = ctx || {};\r\n    this.isStrokeTransparent = ctx.isStrokeTransparent || false;\r\n    this.strokeOpacity = ctx.strokeOpacity || 1;\r\n    this.strokeStyle = ctx.strokeStyle || \"#000000\";\r\n    this.fillStyle = ctx.fillStyle || \"#000000\";\r\n    this.isFillTransparent = ctx.isFillTransparent || false;\r\n    this.fillOpacity = ctx.fillOpacity || 1;\r\n    this.font = ctx.font || \"10px sans-serif\";\r\n    this.textBaseline = ctx.textBaseline || \"alphabetic\";\r\n    this.textAlign = ctx.textAlign || \"left\";\r\n    this.lineWidth = ctx.lineWidth || 1;\r\n    this.lineJoin = ctx.lineJoin || \"miter\";\r\n    this.lineCap = ctx.lineCap || \"butt\";\r\n    this.path = ctx.path || [];\r\n    this.transform =\r\n      typeof ctx.transform !== \"undefined\"\r\n        ? ctx.transform.clone()\r\n        : new Matrix();\r\n    this.globalCompositeOperation = ctx.globalCompositeOperation || \"normal\";\r\n    this.globalAlpha = ctx.globalAlpha || 1.0;\r\n    this.clip_path = ctx.clip_path || [];\r\n    this.currentPoint = ctx.currentPoint || new Point();\r\n    this.miterLimit = ctx.miterLimit || 10.0;\r\n    this.lastPoint = ctx.lastPoint || new Point();\r\n    this.lineDashOffset = ctx.lineDashOffset || 0.0;\r\n    this.lineDash = ctx.lineDash || [];\r\n    this.margin = ctx.margin || [0, 0, 0, 0];\r\n    this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;\r\n\r\n    this.ignoreClearRect =\r\n      typeof ctx.ignoreClearRect === \"boolean\" ? ctx.ignoreClearRect : true;\r\n    return this;\r\n  };\r\n\r\n  //stub\r\n  var f2,\r\n    getHorizontalCoordinateString,\r\n    getVerticalCoordinateString,\r\n    getHorizontalCoordinate,\r\n    getVerticalCoordinate,\r\n    Point,\r\n    Rectangle,\r\n    Matrix,\r\n    _ctx;\r\n  jsPDFAPI.events.push([\r\n    \"initialized\",\r\n    function() {\r\n      this.context2d = new Context2D(this);\r\n\r\n      f2 = this.internal.f2;\r\n      getHorizontalCoordinateString = this.internal.getCoordinateString;\r\n      getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\r\n      getHorizontalCoordinate = this.internal.getHorizontalCoordinate;\r\n      getVerticalCoordinate = this.internal.getVerticalCoordinate;\r\n      Point = this.internal.Point;\r\n      Rectangle = this.internal.Rectangle;\r\n      Matrix = this.internal.Matrix;\r\n      _ctx = new ContextLayer();\r\n    }\r\n  ]);\r\n\r\n  var Context2D = function(pdf) {\r\n    Object.defineProperty(this, \"canvas\", {\r\n      get: function() {\r\n        return { parentNode: false, style: false };\r\n      }\r\n    });\r\n\r\n    var _pdf = pdf;\r\n    Object.defineProperty(this, \"pdf\", {\r\n      get: function() {\r\n        return _pdf;\r\n      }\r\n    });\r\n\r\n    var _pageWrapXEnabled = false;\r\n    /**\r\n     * @name pageWrapXEnabled\r\n     * @type {boolean}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"pageWrapXEnabled\", {\r\n      get: function() {\r\n        return _pageWrapXEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapXEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _pageWrapYEnabled = false;\r\n    /**\r\n     * @name pageWrapYEnabled\r\n     * @type {boolean}\r\n     * @default true\r\n     */\r\n    Object.defineProperty(this, \"pageWrapYEnabled\", {\r\n      get: function() {\r\n        return _pageWrapYEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapYEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _posX = 0;\r\n    /**\r\n     * @name posX\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posX\", {\r\n      get: function() {\r\n        return _posX;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posX = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _posY = 0;\r\n    /**\r\n     * @name posY\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posY\", {\r\n      get: function() {\r\n        return _posY;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posY = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.\r\n     * @name margin\r\n     * @type {number|number[]}\r\n     * @default [0, 0, 0, 0]\r\n     */\r\n    Object.defineProperty(this, \"margin\", {\r\n      get: function() {\r\n        return _ctx.margin;\r\n      },\r\n      set: function(value) {\r\n        var margin;\r\n        if (typeof value === \"number\") {\r\n          margin = [value, value, value, value];\r\n        } else {\r\n          margin = new Array(4);\r\n          margin[0] = value[0];\r\n          margin[1] = value.length >= 2 ? value[1] : margin[0];\r\n          margin[2] = value.length >= 3 ? value[2] : margin[0];\r\n          margin[3] = value.length >= 4 ? value[3] : margin[1];\r\n        }\r\n        _ctx.margin = margin;\r\n      }\r\n    });\r\n\r\n    var _autoPaging = false;\r\n    /**\r\n     * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the\r\n     * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new\r\n     * pages if required.\r\n     *\r\n     * Context2d supports different modes:\r\n     * <ul>\r\n     * <li>\r\n     *   <code>false</code>: Auto paging is disabled.\r\n     * </li>\r\n     * <li>\r\n     *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\r\n     *   slice text in half, making it difficult to read.\r\n     * </li>\r\n     * <li>\r\n     *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\r\n     *   mostly of a single column of text.\r\n     * </li>\r\n     * </ul>\r\n     * @name Context2D#autoPaging\r\n     * @type {boolean|\"slice\"|\"text\"}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"autoPaging\", {\r\n      get: function() {\r\n        return _autoPaging;\r\n      },\r\n      set: function(value) {\r\n        _autoPaging = value;\r\n      }\r\n    });\r\n\r\n    var lastBreak = 0;\r\n    /**\r\n     * @name lastBreak\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"lastBreak\", {\r\n      get: function() {\r\n        return lastBreak;\r\n      },\r\n      set: function(value) {\r\n        lastBreak = value;\r\n      }\r\n    });\r\n\r\n    var pageBreaks = [];\r\n    /**\r\n     * Y Position of page breaks.\r\n     * @name pageBreaks\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"pageBreaks\", {\r\n      get: function() {\r\n        return pageBreaks;\r\n      },\r\n      set: function(value) {\r\n        pageBreaks = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctx\r\n     * @type {object}\r\n     * @default {}\r\n     */\r\n    Object.defineProperty(this, \"ctx\", {\r\n      get: function() {\r\n        return _ctx;\r\n      },\r\n      set: function(value) {\r\n        if (value instanceof ContextLayer) {\r\n          _ctx = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name path\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    Object.defineProperty(this, \"path\", {\r\n      get: function() {\r\n        return _ctx.path;\r\n      },\r\n      set: function(value) {\r\n        _ctx.path = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctxStack\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    var _ctxStack = [];\r\n    Object.defineProperty(this, \"ctxStack\", {\r\n      get: function() {\r\n        return _ctxStack;\r\n      },\r\n      set: function(value) {\r\n        _ctxStack = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used to fill the drawing\r\n     *\r\n     * @name fillStyle\r\n     * @default #000000\r\n     * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />\r\n     * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />\r\n     * A pattern object to use to fill the drawing (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"fillStyle\", {\r\n      get: function() {\r\n        return this.ctx.fillStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba;\r\n        rgba = getRGBA(value);\r\n\r\n        this.ctx.fillStyle = rgba.style;\r\n        this.ctx.isFillTransparent = rgba.a === 0;\r\n        this.ctx.fillOpacity = rgba.a;\r\n\r\n        this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n        this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used for strokes\r\n     *\r\n     * @name strokeStyle\r\n     * @default #000000\r\n     * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)\r\n     * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)\r\n     * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"strokeStyle\", {\r\n      get: function() {\r\n        return this.ctx.strokeStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba = getRGBA(value);\r\n\r\n        this.ctx.strokeStyle = rgba.style;\r\n        this.ctx.isStrokeTransparent = rgba.a === 0;\r\n        this.ctx.strokeOpacity = rgba.a;\r\n\r\n        if (rgba.a === 0) {\r\n          this.pdf.setDrawColor(255, 255, 255);\r\n        } else if (rgba.a === 1) {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        } else {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the style of the end caps for a line\r\n     *\r\n     * @name lineCap\r\n     * @default butt\r\n     * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line <br/>\r\n     * round A rounded end cap is added to each end of the line<br/>\r\n     * square A square end cap is added to each end of the line<br/>\r\n     */\r\n    Object.defineProperty(this, \"lineCap\", {\r\n      get: function() {\r\n        return this.ctx.lineCap;\r\n      },\r\n      set: function(value) {\r\n        if ([\"butt\", \"round\", \"square\"].indexOf(value) !== -1) {\r\n          this.ctx.lineCap = value;\r\n          this.pdf.setLineCap(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the current line width\r\n     *\r\n     * @name lineWidth\r\n     * @default 1\r\n     * @property {number} lineWidth The current line width, in pixels\r\n     */\r\n    Object.defineProperty(this, \"lineWidth\", {\r\n      get: function() {\r\n        return this.ctx.lineWidth;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.lineWidth = value;\r\n          this.pdf.setLineWidth(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the type of corner created, when two lines meet\r\n     */\r\n    Object.defineProperty(this, \"lineJoin\", {\r\n      get: function() {\r\n        return this.ctx.lineJoin;\r\n      },\r\n      set: function(value) {\r\n        if ([\"bevel\", \"round\", \"miter\"].indexOf(value) !== -1) {\r\n          this.ctx.lineJoin = value;\r\n          this.pdf.setLineJoin(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.\r\n     *\r\n     * @name miterLimit\r\n     * @default 10\r\n     */\r\n    Object.defineProperty(this, \"miterLimit\", {\r\n      get: function() {\r\n        return this.ctx.miterLimit;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.miterLimit = value;\r\n          this.pdf.setMiterLimit(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textBaseline\", {\r\n      get: function() {\r\n        return this.ctx.textBaseline;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.textBaseline = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textAlign\", {\r\n      get: function() {\r\n        return this.ctx.textAlign;\r\n      },\r\n      set: function(value) {\r\n        if ([\"right\", \"end\", \"center\", \"left\", \"start\"].indexOf(value) !== -1) {\r\n          this.ctx.textAlign = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _fontFaceMap = null;\r\n\r\n    function getFontFaceMap(pdf, fontFaces) {\r\n      if (_fontFaceMap === null) {\r\n        var fontMap = pdf.getFontList();\r\n\r\n        var convertedFontFaces = convertToFontFaces(fontMap);\r\n\r\n        _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));\r\n      }\r\n\r\n      return _fontFaceMap;\r\n    }\r\n\r\n    function convertToFontFaces(fontMap) {\r\n      var fontFaces = [];\r\n\r\n      Object.keys(fontMap).forEach(function(family) {\r\n        var styles = fontMap[family];\r\n\r\n        styles.forEach(function(style) {\r\n          var fontFace = null;\r\n\r\n          switch (style) {\r\n            case \"bold\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\"\r\n              };\r\n              break;\r\n\r\n            case \"italic\":\r\n              fontFace = {\r\n                family: family,\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"bolditalic\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\",\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"\":\r\n            case \"normal\":\r\n              fontFace = {\r\n                family: family\r\n              };\r\n              break;\r\n          }\r\n\r\n          // If font-face is still null here, it is a font with some styling we don't recognize and\r\n          // cannot map or it is a font added via the fontFaces option of .html().\r\n          if (fontFace !== null) {\r\n            fontFace.ref = {\r\n              name: family,\r\n              style: style\r\n            };\r\n\r\n            fontFaces.push(fontFace);\r\n          }\r\n        });\r\n      });\r\n\r\n      return fontFaces;\r\n    }\r\n\r\n    var _fontFaces = null;\r\n    /**\r\n     * A map of available font-faces, as passed in the options of\r\n     * .html(). If set a limited implementation of the font style matching\r\n     * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm\r\n     * will be used. If not set it will fallback to previous behavior.\r\n     */\r\n\r\n    Object.defineProperty(this, \"fontFaces\", {\r\n      get: function() {\r\n        return _fontFaces;\r\n      },\r\n      set: function(value) {\r\n        _fontFaceMap = null;\r\n        _fontFaces = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"font\", {\r\n      get: function() {\r\n        return this.ctx.font;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.font = value;\r\n        var rx, matches;\r\n\r\n        //source: https://stackoverflow.com/a/10136041\r\n        // eslint-disable-next-line no-useless-escape\r\n        rx = /^\\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;\r\n        matches = rx.exec(value);\r\n        if (matches !== null) {\r\n          var fontStyle = matches[1];\r\n          var fontVariant = matches[2];\r\n          var fontWeight = matches[3];\r\n          var fontSize = matches[4];\r\n          var lineHeight = matches[5];\r\n          var fontFamily = matches[6];\r\n        } else {\r\n          return;\r\n        }\r\n        var rxFontSize = /^([.\\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;\r\n        var fontSizeUnit = rxFontSize.exec(fontSize)[2];\r\n\r\n        if (\"px\" === fontSizeUnit) {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        } else if (\"em\" === fontSizeUnit) {\r\n          fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());\r\n        } else {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        }\r\n\r\n        this.pdf.setFontSize(fontSize);\r\n        var parts = parseFontFamily(fontFamily);\r\n\r\n        if (this.fontFaces) {\r\n          var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);\r\n\r\n          var rules = parts.map(function(ff) {\r\n            return {\r\n              family: ff,\r\n              stretch: \"normal\", // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)\r\n              weight: fontWeight,\r\n              style: fontStyle\r\n            };\r\n          });\r\n\r\n          var font = resolveFontFace(fontFaceMap, rules);\r\n          this.pdf.setFont(font.ref.name, font.ref.style);\r\n          return;\r\n        }\r\n\r\n        var style = \"\";\r\n        if (\r\n          fontWeight === \"bold\" ||\r\n          parseInt(fontWeight, 10) >= 700 ||\r\n          fontStyle === \"bold\"\r\n        ) {\r\n          style = \"bold\";\r\n        }\r\n\r\n        if (fontStyle === \"italic\") {\r\n          style += \"italic\";\r\n        }\r\n\r\n        if (style.length === 0) {\r\n          style = \"normal\";\r\n        }\r\n        var jsPdfFontName = \"\";\r\n\r\n        var fallbackFonts = {\r\n          arial: \"Helvetica\",\r\n          Arial: \"Helvetica\",\r\n          verdana: \"Helvetica\",\r\n          Verdana: \"Helvetica\",\r\n          helvetica: \"Helvetica\",\r\n          Helvetica: \"Helvetica\",\r\n          \"sans-serif\": \"Helvetica\",\r\n          fixed: \"Courier\",\r\n          monospace: \"Courier\",\r\n          terminal: \"Courier\",\r\n          cursive: \"Times\",\r\n          fantasy: \"Times\",\r\n          serif: \"Times\"\r\n        };\r\n\r\n        for (var i = 0; i < parts.length; i++) {\r\n          if (\r\n            this.pdf.internal.getFont(parts[i], style, {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            break;\r\n          } else if (\r\n            style === \"bolditalic\" &&\r\n            this.pdf.internal.getFont(parts[i], \"bold\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"bold\";\r\n          } else if (\r\n            this.pdf.internal.getFont(parts[i], \"normal\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"normal\";\r\n            break;\r\n          }\r\n        }\r\n        if (jsPdfFontName === \"\") {\r\n          for (var j = 0; j < parts.length; j++) {\r\n            if (fallbackFonts[parts[j]]) {\r\n              jsPdfFontName = fallbackFonts[parts[j]];\r\n              break;\r\n            }\r\n          }\r\n        }\r\n        jsPdfFontName = jsPdfFontName === \"\" ? \"Times\" : jsPdfFontName;\r\n        this.pdf.setFont(jsPdfFontName, style);\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalCompositeOperation\", {\r\n      get: function() {\r\n        return this.ctx.globalCompositeOperation;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalCompositeOperation = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalAlpha\", {\r\n      get: function() {\r\n        return this.ctx.globalAlpha;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalAlpha = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A float specifying the amount of the line dash offset. The default value is 0.0.\r\n     *\r\n     * @name lineDashOffset\r\n     * @default 0.0\r\n     */\r\n    Object.defineProperty(this, \"lineDashOffset\", {\r\n      get: function() {\r\n        return this.ctx.lineDashOffset;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDashOffset = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"lineDash\", {\r\n      get: function() {\r\n        return this.ctx.lineDash;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDash = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"ignoreClearRect\", {\r\n      get: function() {\r\n        return this.ctx.ignoreClearRect;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.ignoreClearRect = Boolean(value);\r\n      }\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Sets the line dash pattern used when stroking lines.\r\n   * @name setLineDash\r\n   * @function\r\n   * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.\r\n   */\r\n  Context2D.prototype.setLineDash = function(dashArray) {\r\n    this.lineDash = dashArray;\r\n  };\r\n\r\n  /**\r\n   * gets the current line dash pattern.\r\n   * @name getLineDash\r\n   * @function\r\n   * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].\r\n   */\r\n  Context2D.prototype.getLineDash = function() {\r\n    if (this.lineDash.length % 2) {\r\n      // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value\r\n      return this.lineDash.concat(this.lineDash);\r\n    } else {\r\n      // The copied value is returned to prevent contamination from outside.\r\n      return this.lineDash.slice();\r\n    }\r\n  };\r\n\r\n  Context2D.prototype.fill = function() {\r\n    pathPreProcess.call(this, \"fill\", false);\r\n  };\r\n\r\n  /**\r\n   * Actually draws the path you have defined\r\n   *\r\n   * @name stroke\r\n   * @function\r\n   * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.\r\n   */\r\n  Context2D.prototype.stroke = function() {\r\n    pathPreProcess.call(this, \"stroke\", false);\r\n  };\r\n\r\n  /**\r\n   * Begins a path, or resets the current\r\n   *\r\n   * @name beginPath\r\n   * @function\r\n   * @description The beginPath() method begins a path, or resets the current path.\r\n   */\r\n  Context2D.prototype.beginPath = function() {\r\n    this.path = [\r\n      {\r\n        type: \"begin\"\r\n      }\r\n    ];\r\n  };\r\n\r\n  /**\r\n   * Moves the path to the specified point in the canvas, without creating a line\r\n   *\r\n   * @name moveTo\r\n   * @function\r\n   * @param x {Number} The x-coordinate of where to move the path to\r\n   * @param y {Number} The y-coordinate of where to move the path to\r\n   */\r\n  Context2D.prototype.moveTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.moveTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.moveTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"mt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * Creates a path from the current point back to the starting point\r\n   *\r\n   * @name closePath\r\n   * @function\r\n   * @description The closePath() method creates a path from the current point back to the starting point.\r\n   */\r\n  Context2D.prototype.closePath = function() {\r\n    var pathBegin = new Point(0, 0);\r\n    var i = 0;\r\n    for (i = this.path.length - 1; i !== -1; i--) {\r\n      if (this.path[i].type === \"begin\") {\r\n        if (\r\n          typeof this.path[i + 1] === \"object\" &&\r\n          typeof this.path[i + 1].x === \"number\"\r\n        ) {\r\n          pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);\r\n          break;\r\n        }\r\n      }\r\n    }\r\n    this.path.push({\r\n      type: \"close\"\r\n    });\r\n    this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);\r\n  };\r\n\r\n  /**\r\n   * Adds a new point and creates a line to that point from the last specified point in the canvas\r\n   *\r\n   * @name lineTo\r\n   * @function\r\n   * @param x The x-coordinate of where to create the line to\r\n   * @param y The y-coordinate of where to create the line to\r\n   * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).\r\n   */\r\n  Context2D.prototype.lineTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.lineTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.lineTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"lt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt.x, pt.y);\r\n  };\r\n\r\n  /**\r\n   * Clips a region of any shape and size from the original canvas\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @description The clip() method clips a region of any shape and size from the original canvas.\r\n   */\r\n  Context2D.prototype.clip = function() {\r\n    this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));\r\n    pathPreProcess.call(this, null, true);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name quadraticCurveTo\r\n   * @function\r\n   * @param cpx {Number} The x-coordinate of the Bézier control point\r\n   * @param cpy {Number} The y-coordinate of the Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.<br /><br /> A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {\r\n      console.error(\r\n        \"jsPDF.context2d.quadraticCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.quadraticCurveTo\"\r\n      );\r\n    }\r\n\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));\r\n\r\n    this.path.push({\r\n      type: \"qct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name bezierCurveTo\r\n   * @function\r\n   * @param cp1x {Number} The x-coordinate of the first Bézier control point\r\n   * @param cp1y {Number} The y-coordinate of the first Bézier control point\r\n   * @param cp2x {Number} The x-coordinate of the second Bézier control point\r\n   * @param cp2y {Number} The y-coordinate of the second Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve. <br /><br />A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve.  The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(cp1x) ||\r\n      isNaN(cp1y) ||\r\n      isNaN(cp2x) ||\r\n      isNaN(cp2y)\r\n    ) {\r\n      console.error(\r\n        \"jsPDF.context2d.bezierCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.bezierCurveTo\"\r\n      );\r\n    }\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));\r\n    var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));\r\n\r\n    this.path.push({\r\n      type: \"bct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x2: pt2.x,\r\n      y2: pt2.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve (used to create circles, or parts of circles)\r\n   *\r\n   * @name arc\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the center of the circle\r\n   * @param y {Number} The y-coordinate of the center of the circle\r\n   * @param radius {Number} The radius of the circle\r\n   * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)\r\n   * @param endAngle {Number} The ending angle, in radians\r\n   * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.\r\n   * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).\r\n   */\r\n  Context2D.prototype.arc = function(\r\n    x,\r\n    y,\r\n    radius,\r\n    startAngle,\r\n    endAngle,\r\n    counterclockwise\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(radius) ||\r\n      isNaN(startAngle) ||\r\n      isNaN(endAngle)\r\n    ) {\r\n      console.error(\"jsPDF.context2d.arc: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.arc\");\r\n    }\r\n    counterclockwise = Boolean(counterclockwise);\r\n\r\n    if (!this.ctx.transform.isIdentity) {\r\n      var xpt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n      x = xpt.x;\r\n      y = xpt.y;\r\n\r\n      var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));\r\n      var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));\r\n      radius = Math.sqrt(\r\n        Math.pow(x_radPt.x - x_radPt0.x, 2) +\r\n          Math.pow(x_radPt.y - x_radPt0.y, 2)\r\n      );\r\n    }\r\n    if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {\r\n      startAngle = 0;\r\n      endAngle = 2 * Math.PI;\r\n    }\r\n\r\n    this.path.push({\r\n      type: \"arc\",\r\n      x: x,\r\n      y: y,\r\n      radius: radius,\r\n      startAngle: startAngle,\r\n      endAngle: endAngle,\r\n      counterclockwise: counterclockwise\r\n    });\r\n    // this.ctx.lastPoint(new Point(pt.x,pt.y));\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve between two tangents\r\n   *\r\n   * @name arcTo\r\n   * @function\r\n   * @param x1 {Number} The x-coordinate of the first tangent\r\n   * @param y1 {Number} The y-coordinate of the first tangent\r\n   * @param x2 {Number} The x-coordinate of the second tangent\r\n   * @param y2 {Number} The y-coordinate of the second tangent\r\n   * @param radius The radius of the arc\r\n   * @description The arcTo() method creates an arc/curve between two tangents on the canvas.\r\n   */\r\n  // eslint-disable-next-line no-unused-vars\r\n  Context2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {\r\n    throw new Error(\"arcTo not implemented.\");\r\n  };\r\n\r\n  /**\r\n   * Creates a rectangle\r\n   *\r\n   * @name rect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The rect() method creates a rectangle.\r\n   */\r\n  Context2D.prototype.rect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.rect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rect\");\r\n    }\r\n    this.moveTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x + w, y + h);\r\n    this.lineTo(x, y + h);\r\n    this.lineTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x, y);\r\n  };\r\n\r\n  /**\r\n   * Draws a \"filled\" rectangle\r\n   *\r\n   * @name fillRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The fillRect() method draws a \"filled\" rectangle. The default color of the fill is black.\r\n   */\r\n  Context2D.prototype.fillRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.fillRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillRect\");\r\n    }\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n    var tmp = {};\r\n    if (this.lineCap !== \"butt\") {\r\n      tmp.lineCap = this.lineCap;\r\n      this.lineCap = \"butt\";\r\n    }\r\n    if (this.lineJoin !== \"miter\") {\r\n      tmp.lineJoin = this.lineJoin;\r\n      this.lineJoin = \"miter\";\r\n    }\r\n\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.fill();\r\n\r\n    if (tmp.hasOwnProperty(\"lineCap\")) {\r\n      this.lineCap = tmp.lineCap;\r\n    }\r\n    if (tmp.hasOwnProperty(\"lineJoin\")) {\r\n      this.lineJoin = tmp.lineJoin;\r\n    }\r\n  };\r\n\r\n  /**\r\n   *     Draws a rectangle (no fill)\r\n   *\r\n   * @name strokeRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.\r\n   */\r\n  Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.strokeRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeRect\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.stroke();\r\n  };\r\n\r\n  /**\r\n   * Clears the specified pixels within a given rectangle\r\n   *\r\n   * @name clearRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle to clear, in pixels\r\n   * @param h {Number} The height of the rectangle to clear, in pixels\r\n   * @description We cannot clear PDF commands that were already written to PDF, so we use white instead. <br />\r\n   * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.\r\n   * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.\r\n   * This flag is stored in the save/restore context and is managed the same way as other drawing states.\r\n   *\r\n   */\r\n  Context2D.prototype.clearRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.clearRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.clearRect\");\r\n    }\r\n    if (this.ignoreClearRect) {\r\n      return;\r\n    }\r\n\r\n    this.fillStyle = \"#ffffff\";\r\n    this.fillRect(x, y, w, h);\r\n  };\r\n\r\n  /**\r\n   * Saves the state of the current context\r\n   *\r\n   * @name save\r\n   * @function\r\n   */\r\n  Context2D.prototype.save = function(doStackPush) {\r\n    doStackPush = typeof doStackPush === \"boolean\" ? doStackPush : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPush) {\r\n      this.ctx.fontSize = this.pdf.internal.getFontSize();\r\n      var ctx = new ContextLayer(this.ctx);\r\n      this.ctxStack.push(this.ctx);\r\n      this.ctx = ctx;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Returns previously saved path state and attributes\r\n   *\r\n   * @name restore\r\n   * @function\r\n   */\r\n  Context2D.prototype.restore = function(doStackPop) {\r\n    doStackPop = typeof doStackPop === \"boolean\" ? doStackPop : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"Q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPop && this.ctxStack.length !== 0) {\r\n      this.ctx = this.ctxStack.pop();\r\n      this.fillStyle = this.ctx.fillStyle;\r\n      this.strokeStyle = this.ctx.strokeStyle;\r\n      this.font = this.ctx.font;\r\n      this.lineCap = this.ctx.lineCap;\r\n      this.lineWidth = this.ctx.lineWidth;\r\n      this.lineJoin = this.ctx.lineJoin;\r\n      this.lineDash = this.ctx.lineDash;\r\n      this.lineDashOffset = this.ctx.lineDashOffset;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @name toDataURL\r\n   * @function\r\n   */\r\n  Context2D.prototype.toDataURL = function() {\r\n    throw new Error(\"toDataUrl not implemented.\");\r\n  };\r\n\r\n  //helper functions\r\n\r\n  /**\r\n   * Get the decimal values of r, g, b and a\r\n   *\r\n   * @name getRGBA\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var getRGBA = function(style) {\r\n    var rxRgb = /rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/;\r\n    var rxRgba = /rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*([\\d.]+)\\s*\\)/;\r\n    var rxTransparent = /transparent|rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*0+\\s*\\)/;\r\n\r\n    var r, g, b, a;\r\n\r\n    if (style.isCanvasGradient === true) {\r\n      style = style.getColor();\r\n    }\r\n\r\n    if (!style) {\r\n      return { r: 0, g: 0, b: 0, a: 0, style: style };\r\n    }\r\n\r\n    if (rxTransparent.test(style)) {\r\n      r = 0;\r\n      g = 0;\r\n      b = 0;\r\n      a = 0;\r\n    } else {\r\n      var matches = rxRgb.exec(style);\r\n      if (matches !== null) {\r\n        r = parseInt(matches[1]);\r\n        g = parseInt(matches[2]);\r\n        b = parseInt(matches[3]);\r\n        a = 1;\r\n      } else {\r\n        matches = rxRgba.exec(style);\r\n        if (matches !== null) {\r\n          r = parseInt(matches[1]);\r\n          g = parseInt(matches[2]);\r\n          b = parseInt(matches[3]);\r\n          a = parseFloat(matches[4]);\r\n        } else {\r\n          a = 1;\r\n\r\n          if (typeof style === \"string\" && style.charAt(0) !== \"#\") {\r\n            var rgbColor = new RGBColor(style);\r\n            if (rgbColor.ok) {\r\n              style = rgbColor.toHex();\r\n            } else {\r\n              style = \"#000000\";\r\n            }\r\n          }\r\n\r\n          if (style.length === 4) {\r\n            r = style.substring(1, 2);\r\n            r += r;\r\n            g = style.substring(2, 3);\r\n            g += g;\r\n            b = style.substring(3, 4);\r\n            b += b;\r\n          } else {\r\n            r = style.substring(1, 3);\r\n            g = style.substring(3, 5);\r\n            b = style.substring(5, 7);\r\n          }\r\n          r = parseInt(r, 16);\r\n          g = parseInt(g, 16);\r\n          b = parseInt(b, 16);\r\n        }\r\n      }\r\n    }\r\n    return { r: r, g: g, b: b, a: a, style: style };\r\n  };\r\n\r\n  /**\r\n   * @name isFillTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isFillTransparent = function() {\r\n    return this.ctx.isFillTransparent || this.globalAlpha == 0;\r\n  };\r\n\r\n  /**\r\n   * @name isStrokeTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isStrokeTransparent = function() {\r\n    return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);\r\n  };\r\n\r\n  /**\r\n   * Draws \"filled\" text on the canvas\r\n   *\r\n   * @name fillText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The fillText() method draws filled text on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.fillText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.fillText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillText\");\r\n    }\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n\r\n    // We only use X axis as scale hint\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Draws text on the canvas (no fill)\r\n   *\r\n   * @name strokeText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.strokeText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.strokeText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeText\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      renderingMode: \"stroke\",\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Returns an object that contains the width of the specified text\r\n   *\r\n   * @name measureText\r\n   * @function\r\n   * @param text {String} The text to be measured\r\n   * @description The measureText() method returns an object that contains the width of the specified text, in pixels.\r\n   * @returns {Number}\r\n   */\r\n  Context2D.prototype.measureText = function(text) {\r\n    if (typeof text !== \"string\") {\r\n      console.error(\r\n        \"jsPDF.context2d.measureText: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.measureText\"\r\n      );\r\n    }\r\n    var pdf = this.pdf;\r\n    var k = this.pdf.internal.scaleFactor;\r\n\r\n    var fontSize = pdf.internal.getFontSize();\r\n    var txtWidth =\r\n      (pdf.getStringUnitWidth(text) * fontSize) / pdf.internal.scaleFactor;\r\n    txtWidth *= Math.round(((k * 96) / 72) * 10000) / 10000;\r\n\r\n    var TextMetrics = function(options) {\r\n      options = options || {};\r\n      var _width = options.width || 0;\r\n      Object.defineProperty(this, \"width\", {\r\n        get: function() {\r\n          return _width;\r\n        }\r\n      });\r\n      return this;\r\n    };\r\n    return new TextMetrics({ width: txtWidth });\r\n  };\r\n\r\n  //Transformations\r\n\r\n  /**\r\n   * Scales the current drawing bigger or smaller\r\n   *\r\n   * @name scale\r\n   * @function\r\n   * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @description The scale() method scales the current drawing, bigger or smaller.\r\n   */\r\n  Context2D.prototype.scale = function(scalewidth, scaleheight) {\r\n    if (isNaN(scalewidth) || isNaN(scaleheight)) {\r\n      console.error(\"jsPDF.context2d.scale: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.scale\");\r\n    }\r\n    var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Rotates the current drawing\r\n   *\r\n   * @name rotate\r\n   * @function\r\n   * @param angle {Number} The rotation angle, in radians.\r\n   * @description To calculate from degrees to radians: degrees*Math.PI/180. <br />\r\n   * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180\r\n   */\r\n  Context2D.prototype.rotate = function(angle) {\r\n    if (isNaN(angle)) {\r\n      console.error(\"jsPDF.context2d.rotate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rotate\");\r\n    }\r\n    var matrix = new Matrix(\r\n      Math.cos(angle),\r\n      Math.sin(angle),\r\n      -Math.sin(angle),\r\n      Math.cos(angle),\r\n      0.0,\r\n      0.0\r\n    );\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Remaps the (0,0) position on the canvas\r\n   *\r\n   * @name translate\r\n   * @function\r\n   * @param x {Number} The value to add to horizontal (x) coordinates\r\n   * @param y {Number} The value to add to vertical (y) coordinates\r\n   * @description The translate() method remaps the (0,0) position on the canvas.\r\n   */\r\n  Context2D.prototype.translate = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.translate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.translate\");\r\n    }\r\n    var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Replaces the current transformation matrix for the drawing\r\n   *\r\n   * @name transform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix.<br /><br />The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:<br /><br /><br /><br />a    c    e<br /><br />b    d    f<br /><br />0    0    1<br /><br />In other words, the transform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.transform = function(a, b, c, d, e, f) {\r\n    if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {\r\n      console.error(\"jsPDF.context2d.transform: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.transform\");\r\n    }\r\n    var matrix = new Matrix(a, b, c, d, e, f);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Resets the current transform to the identity matrix. Then runs transform()\r\n   *\r\n   * @name setTransform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix. <br /><br />The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.<br /><br />In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.setTransform = function(a, b, c, d, e, f) {\r\n    a = isNaN(a) ? 1 : a;\r\n    b = isNaN(b) ? 0 : b;\r\n    c = isNaN(c) ? 0 : c;\r\n    d = isNaN(d) ? 1 : d;\r\n    e = isNaN(e) ? 0 : e;\r\n    f = isNaN(f) ? 0 : f;\r\n    this.ctx.transform = new Matrix(a, b, c, d, e, f);\r\n  };\r\n\r\n  /**\r\n   * Should only be used if pageWrapYEnabled is true\r\n   *\r\n   * @name setPageByYPosition\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns One-based Page Number\r\n   */\r\n  var setPageByYPosition = function(y) {\r\n    if (this.pageWrapYEnabled) {\r\n      this.lastBreak = 0;\r\n      var manualBreaks = 0;\r\n      var autoBreaks = 0;\r\n      for (var i = 0; i < this.pageBreaks.length; i++) {\r\n        if (y >= this.pageBreaks[i]) {\r\n          manualBreaks++;\r\n          if (this.lastBreak === 0) {\r\n            autoBreaks++;\r\n          }\r\n          var spaceBetweenLastBreak = this.pageBreaks[i] - this.lastBreak;\r\n          this.lastBreak = this.pageBreaks[i];\r\n          var pagesSinceLastBreak = Math.floor(\r\n            spaceBetweenLastBreak / this.pageWrapY\r\n          );\r\n          autoBreaks += pagesSinceLastBreak;\r\n        }\r\n      }\r\n      if (this.lastBreak === 0) {\r\n        var pagesSinceLastBreak = Math.floor(y / this.pageWrapY) + 1;\r\n        autoBreaks += pagesSinceLastBreak;\r\n      }\r\n      return autoBreaks + manualBreaks;\r\n    } else {\r\n      return this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    }\r\n  };\r\n\r\n  var hasMargins = function() {\r\n    return (\r\n      this.margin[0] > 0 ||\r\n      this.margin[1] > 0 ||\r\n      this.margin[2] > 0 ||\r\n      this.margin[3] > 0\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Draws an image, canvas, or video onto the canvas\r\n   *\r\n   * @function\r\n   * @param img {} Specifies the image, canvas, or video element to use\r\n   * @param sx {Number} Optional. The x coordinate where to start clipping\r\n   * @param sy {Number} Optional. The y coordinate where to start clipping\r\n   * @param swidth {Number} Optional. The width of the clipped image\r\n   * @param sheight {Number} Optional. The height of the clipped image\r\n   * @param x {Number} The x coordinate where to place the image on the canvas\r\n   * @param y {Number} The y coordinate where to place the image on the canvas\r\n   * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)\r\n   * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)\r\n   */\r\n  Context2D.prototype.drawImage = function(\r\n    img,\r\n    sx,\r\n    sy,\r\n    swidth,\r\n    sheight,\r\n    x,\r\n    y,\r\n    width,\r\n    height\r\n  ) {\r\n    var imageProperties = this.pdf.getImageProperties(img);\r\n    var factorX = 1;\r\n    var factorY = 1;\r\n    var isClip;\r\n\r\n    var clipFactorX = 1;\r\n    var clipFactorY = 1;\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width !== \"undefined\") {\r\n      isClip = true;\r\n      clipFactorX = width / swidth;\r\n      clipFactorY = height / sheight;\r\n      factorX = ((imageProperties.width / swidth) * width) / swidth;\r\n      factorY = ((imageProperties.height / sheight) * height) / sheight;\r\n    }\r\n\r\n    //is sx and sy are set and x and y not, set x and y with values of sx and sy\r\n    if (typeof x === \"undefined\") {\r\n      x = sx;\r\n      y = sy;\r\n      sx = 0;\r\n      sy = 0;\r\n    }\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width === \"undefined\") {\r\n      width = swidth;\r\n      height = sheight;\r\n    }\r\n    if (typeof swidth === \"undefined\" && typeof width === \"undefined\") {\r\n      width = imageProperties.width;\r\n      height = imageProperties.height;\r\n    }\r\n\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n    var xRect = matrix.applyToRectangle(\r\n      new Rectangle(\r\n        x - sx * clipFactorX,\r\n        y - sy * clipFactorY,\r\n        swidth * factorX,\r\n        sheight * factorY\r\n      )\r\n    );\r\n    var pageArray = getPagesByPath.call(this, xRect);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var tmpRect = JSON.parse(JSON.stringify(xRect));\r\n        tmpRect = pathPositionRedo(\r\n          [tmpRect],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        const needsClipping = (i > min || i < max) && hasMargins.call(this);\r\n\r\n        if (needsClipping) {\r\n          this.pdf.saveGraphicsState();\r\n          this.pdf\r\n            .rect(\r\n              this.margin[3],\r\n              this.margin[0],\r\n              pageWidthMinusMargins,\r\n              pageHeightMinusMargins,\r\n              null\r\n            )\r\n            .clip()\r\n            .discardPath();\r\n        }\r\n        this.pdf.addImage(\r\n          img,\r\n          \"JPEG\",\r\n          tmpRect.x,\r\n          tmpRect.y,\r\n          tmpRect.w,\r\n          tmpRect.h,\r\n          null,\r\n          null,\r\n          angle\r\n        );\r\n        if (needsClipping) {\r\n          this.pdf.restoreGraphicsState();\r\n        }\r\n      }\r\n    } else {\r\n      this.pdf.addImage(\r\n        img,\r\n        \"JPEG\",\r\n        xRect.x,\r\n        xRect.y,\r\n        xRect.w,\r\n        xRect.h,\r\n        null,\r\n        null,\r\n        angle\r\n      );\r\n    }\r\n  };\r\n\r\n  var getPagesByPath = function(path, pageWrapX, pageWrapY) {\r\n    var result = [];\r\n    pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;\r\n    pageWrapY =\r\n      pageWrapY ||\r\n      this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n    var yOffset = this.posY + this.ctx.prevPageLastElemOffset;\r\n\r\n    switch (path.type) {\r\n      default:\r\n      case \"mt\":\r\n      case \"lt\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        break;\r\n      case \"arc\":\r\n        result.push(\r\n          Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1\r\n        );\r\n        break;\r\n      case \"qct\":\r\n        var rectOfQuadraticCurve = getQuadraticCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) /\r\n              pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"bct\":\r\n        var rectOfBezierCurve = getBezierCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x2,\r\n          path.y2,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"rect\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);\r\n    }\r\n\r\n    for (var i = 0; i < result.length; i += 1) {\r\n      while (this.pdf.internal.getNumberOfPages() < result[i]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    return result;\r\n  };\r\n\r\n  var addPage = function() {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var font = this.font;\r\n    var lineCap = this.lineCap;\r\n    var lineWidth = this.lineWidth;\r\n    var lineJoin = this.lineJoin;\r\n    this.pdf.addPage();\r\n    this.fillStyle = fillStyle;\r\n    this.strokeStyle = strokeStyle;\r\n    this.font = font;\r\n    this.lineCap = lineCap;\r\n    this.lineWidth = lineWidth;\r\n    this.lineJoin = lineJoin;\r\n  };\r\n\r\n  var pathPositionRedo = function(paths, x, y) {\r\n    for (var i = 0; i < paths.length; i++) {\r\n      switch (paths[i].type) {\r\n        case \"bct\":\r\n          paths[i].x2 += x;\r\n          paths[i].y2 += y;\r\n        case \"qct\":\r\n          paths[i].x1 += x;\r\n          paths[i].y1 += y;\r\n        case \"mt\":\r\n        case \"lt\":\r\n        case \"arc\":\r\n        default:\r\n          paths[i].x += x;\r\n          paths[i].y += y;\r\n      }\r\n    }\r\n    return paths;\r\n  };\r\n\r\n  var sortPages = function(pages) {\r\n    return pages.sort(function(a, b) {\r\n      return a - b;\r\n    });\r\n  };\r\n\r\n  var pathPreProcess = function(rule, isClip) {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var lineCap = this.lineCap;\r\n    var oldLineWidth = this.lineWidth;\r\n    var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);\r\n    var lineJoin = this.lineJoin;\r\n\r\n    var origPath = JSON.parse(JSON.stringify(this.path));\r\n    var xPath = JSON.parse(JSON.stringify(this.path));\r\n    var clipPath;\r\n    var tmpPath;\r\n    var pages = [];\r\n\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      if (typeof xPath[i].x !== \"undefined\") {\r\n        var page = getPagesByPath.call(this, xPath[i]);\r\n\r\n        for (var ii = 0; ii < page.length; ii += 1) {\r\n          if (pages.indexOf(page[ii]) === -1) {\r\n            pages.push(page[ii]);\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    for (var j = 0; j < pages.length; j++) {\r\n      while (this.pdf.internal.getNumberOfPages() < pages[j]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    sortPages(pages);\r\n\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var k = min; k < max + 1; k++) {\r\n        this.pdf.setPage(k);\r\n\r\n        this.fillStyle = fillStyle;\r\n        this.strokeStyle = strokeStyle;\r\n        this.lineCap = lineCap;\r\n        this.lineWidth = lineWidth;\r\n        this.lineJoin = lineJoin;\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, rule, true);\r\n          this.path = tmpPaths;\r\n        }\r\n        tmpPath = JSON.parse(JSON.stringify(origPath));\r\n        this.path = pathPositionRedo(\r\n          tmpPath,\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        );\r\n        if (isClip === false || k === 0) {\r\n          const needsClipping = (k > min || k < max) && hasMargins.call(this);\r\n          if (needsClipping) {\r\n            this.pdf.saveGraphicsState();\r\n            this.pdf\r\n              .rect(\r\n                this.margin[3],\r\n                this.margin[0],\r\n                pageWidthMinusMargins,\r\n                pageHeightMinusMargins,\r\n                null\r\n              )\r\n              .clip()\r\n              .discardPath();\r\n          }\r\n          drawPaths.call(this, rule, isClip);\r\n          if (needsClipping) {\r\n            this.pdf.restoreGraphicsState();\r\n          }\r\n        }\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    } else {\r\n      this.lineWidth = lineWidth;\r\n      drawPaths.call(this, rule, isClip);\r\n      this.lineWidth = oldLineWidth;\r\n    }\r\n    this.path = origPath;\r\n  };\r\n\r\n  /**\r\n   * Processes the paths\r\n   *\r\n   * @function\r\n   * @param rule {String}\r\n   * @param isClip {Boolean}\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var drawPaths = function(rule, isClip) {\r\n    if (rule === \"stroke\" && !isClip && isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    if (rule !== \"stroke\" && !isClip && isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var moves = [];\r\n\r\n    //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;\r\n    var delta;\r\n    var xPath = this.path;\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      var pt = xPath[i];\r\n\r\n      switch (pt.type) {\r\n        case \"begin\":\r\n          moves.push({\r\n            begin: true\r\n          });\r\n          break;\r\n\r\n        case \"close\":\r\n          moves.push({\r\n            close: true\r\n          });\r\n          break;\r\n\r\n        case \"mt\":\r\n          moves.push({\r\n            start: pt,\r\n            deltas: [],\r\n            abs: []\r\n          });\r\n          break;\r\n\r\n        case \"lt\":\r\n          var iii = moves.length;\r\n          if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {\r\n            delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];\r\n            if (iii > 0) {\r\n              for (iii; iii >= 0; iii--) {\r\n                if (\r\n                  moves[iii - 1].close !== true &&\r\n                  moves[iii - 1].begin !== true\r\n                ) {\r\n                  moves[iii - 1].deltas.push(delta);\r\n                  moves[iii - 1].abs.push(pt);\r\n                  break;\r\n                }\r\n              }\r\n            }\r\n          }\r\n          break;\r\n\r\n        case \"bct\":\r\n          delta = [\r\n            pt.x1 - xPath[i - 1].x,\r\n            pt.y1 - xPath[i - 1].y,\r\n            pt.x2 - xPath[i - 1].x,\r\n            pt.y2 - xPath[i - 1].y,\r\n            pt.x - xPath[i - 1].x,\r\n            pt.y - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"qct\":\r\n          var x1 = xPath[i - 1].x + (2.0 / 3.0) * (pt.x1 - xPath[i - 1].x);\r\n          var y1 = xPath[i - 1].y + (2.0 / 3.0) * (pt.y1 - xPath[i - 1].y);\r\n          var x2 = pt.x + (2.0 / 3.0) * (pt.x1 - pt.x);\r\n          var y2 = pt.y + (2.0 / 3.0) * (pt.y1 - pt.y);\r\n          var x3 = pt.x;\r\n          var y3 = pt.y;\r\n          delta = [\r\n            x1 - xPath[i - 1].x,\r\n            y1 - xPath[i - 1].y,\r\n            x2 - xPath[i - 1].x,\r\n            y2 - xPath[i - 1].y,\r\n            x3 - xPath[i - 1].x,\r\n            y3 - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"arc\":\r\n          moves.push({\r\n            deltas: [],\r\n            abs: [],\r\n            arc: true\r\n          });\r\n\r\n          if (Array.isArray(moves[moves.length - 1].abs)) {\r\n            moves[moves.length - 1].abs.push(pt);\r\n          }\r\n          break;\r\n      }\r\n    }\r\n    var style;\r\n    if (!isClip) {\r\n      if (rule === \"stroke\") {\r\n        style = \"stroke\";\r\n      } else {\r\n        style = \"fill\";\r\n      }\r\n    } else {\r\n      style = null;\r\n    }\r\n\r\n    var began = false;\r\n    for (var k = 0; k < moves.length; k++) {\r\n      if (moves[k].arc) {\r\n        var arcs = moves[k].abs;\r\n\r\n        for (var ii = 0; ii < arcs.length; ii++) {\r\n          var arc = arcs[ii];\r\n\r\n          if (arc.type === \"arc\") {\r\n            drawArc.call(\r\n              this,\r\n              arc.x,\r\n              arc.y,\r\n              arc.radius,\r\n              arc.startAngle,\r\n              arc.endAngle,\r\n              arc.counterclockwise,\r\n              undefined,\r\n              isClip,\r\n              !began\r\n            );\r\n          } else {\r\n            drawLine.call(this, arc.x, arc.y);\r\n          }\r\n          began = true;\r\n        }\r\n      } else if (moves[k].close === true) {\r\n        this.pdf.internal.out(\"h\");\r\n        began = false;\r\n      } else if (moves[k].begin !== true) {\r\n        var x = moves[k].start.x;\r\n        var y = moves[k].start.y;\r\n        drawLines.call(this, moves[k].deltas, x, y);\r\n        began = true;\r\n      }\r\n    }\r\n\r\n    if (style) {\r\n      putStyle.call(this, style);\r\n    }\r\n    if (isClip) {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var getBaseline = function(y) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    switch (this.ctx.textBaseline) {\r\n      case \"bottom\":\r\n        return y - descent;\r\n      case \"top\":\r\n        return y + height - descent;\r\n      case \"hanging\":\r\n        return y + height - 2 * descent;\r\n      case \"middle\":\r\n        return y + height / 2 - descent;\r\n      case \"ideographic\":\r\n        // TODO not implemented\r\n        return y;\r\n      case \"alphabetic\":\r\n      default:\r\n        return y;\r\n    }\r\n  };\r\n\r\n  var getTextBottom = function(yBaseLine) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    return yBaseLine + descent;\r\n  };\r\n\r\n  Context2D.prototype.createLinearGradient = function createLinearGradient() {\r\n    var canvasGradient = function canvasGradient() {};\r\n\r\n    canvasGradient.colorStops = [];\r\n    canvasGradient.addColorStop = function(offset, color) {\r\n      this.colorStops.push([offset, color]);\r\n    };\r\n\r\n    canvasGradient.getColor = function() {\r\n      if (this.colorStops.length === 0) {\r\n        return \"#000000\";\r\n      }\r\n\r\n      return this.colorStops[0][1];\r\n    };\r\n\r\n    canvasGradient.isCanvasGradient = true;\r\n    return canvasGradient;\r\n  };\r\n  Context2D.prototype.createPattern = function createPattern() {\r\n    return this.createLinearGradient();\r\n  };\r\n  Context2D.prototype.createRadialGradient = function createRadialGradient() {\r\n    return this.createLinearGradient();\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param x Edge point X\r\n   * @param y Edge point Y\r\n   * @param r Radius\r\n   * @param a1 start angle\r\n   * @param a2 end angle\r\n   * @param counterclockwise\r\n   * @param style\r\n   * @param isClip\r\n   */\r\n  var drawArc = function(\r\n    x,\r\n    y,\r\n    r,\r\n    a1,\r\n    a2,\r\n    counterclockwise,\r\n    style,\r\n    isClip,\r\n    includeMove\r\n  ) {\r\n    // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html\r\n    var curves = createArc.call(this, r, a1, a2, counterclockwise);\r\n\r\n    for (var i = 0; i < curves.length; i++) {\r\n      var curve = curves[i];\r\n      if (i === 0) {\r\n        if (includeMove) {\r\n          doMove.call(this, curve.x1 + x, curve.y1 + y);\r\n        } else {\r\n          drawLine.call(this, curve.x1 + x, curve.y1 + y);\r\n        }\r\n      }\r\n      drawCurve.call(\r\n        this,\r\n        x,\r\n        y,\r\n        curve.x2,\r\n        curve.y2,\r\n        curve.x3,\r\n        curve.y3,\r\n        curve.x4,\r\n        curve.y4\r\n      );\r\n    }\r\n\r\n    if (!isClip) {\r\n      putStyle.call(this, style);\r\n    } else {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    switch (style) {\r\n      case \"stroke\":\r\n        this.pdf.internal.out(\"S\");\r\n        break;\r\n      case \"fill\":\r\n        this.pdf.internal.out(\"f\");\r\n        break;\r\n    }\r\n  };\r\n\r\n  var doClip = function() {\r\n    this.pdf.clip();\r\n    this.pdf.discardPath();\r\n  };\r\n\r\n  var doMove = function(x, y) {\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y) +\r\n        \" m\"\r\n    );\r\n  };\r\n\r\n  var putText = function(options) {\r\n    var textAlign;\r\n    switch (options.align) {\r\n      case \"right\":\r\n      case \"end\":\r\n        textAlign = \"right\";\r\n        break;\r\n      case \"center\":\r\n        textAlign = \"center\";\r\n        break;\r\n      case \"left\":\r\n      case \"start\":\r\n      default:\r\n        textAlign = \"left\";\r\n        break;\r\n    }\r\n\r\n    var textDimensions = this.pdf.getTextDimensions(options.text);\r\n    var yBaseLine = getBaseline.call(this, options.y);\r\n    var yBottom = getTextBottom.call(this, yBaseLine);\r\n    var yTop = yBottom - textDimensions.h;\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n\r\n    var baselineRect = this.ctx.transform.applyToRectangle(\r\n      new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h)\r\n    );\r\n    var textBounds = matrix.applyToRectangle(\r\n      new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h)\r\n    );\r\n    var pageArray = getPagesByPath.call(this, textBounds);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath, oldSize, oldLineWidth;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusBottomMargin =\r\n          this.pdf.internal.pageSize.height - this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          pageHeightMinusBottomMargin - this.margin[0];\r\n        var pageWidthMinusRightMargin =\r\n          this.pdf.internal.pageSize.width - this.margin[1];\r\n        var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -1 * previousPageHeightSum + topMargin\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var textBoundsOnPage = pathPositionRedo(\r\n          [JSON.parse(JSON.stringify(textBounds))],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        if (options.scale >= 0.01) {\r\n          oldSize = this.pdf.internal.getFontSize();\r\n          this.pdf.setFontSize(oldSize * options.scale);\r\n          oldLineWidth = this.lineWidth;\r\n          this.lineWidth = oldLineWidth * options.scale;\r\n        }\r\n\r\n        var doSlice = this.autoPaging !== \"text\";\r\n\r\n        if (\r\n          doSlice ||\r\n          textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin\r\n        ) {\r\n          if (\r\n            doSlice ||\r\n            (textBoundsOnPage.y >= topMargin &&\r\n              textBoundsOnPage.x <= pageWidthMinusRightMargin)\r\n          ) {\r\n            var croppedText = doSlice\r\n              ? options.text\r\n              : this.pdf.splitTextToSize(\r\n                  options.text,\r\n                  options.maxWidth ||\r\n                    pageWidthMinusRightMargin - textBoundsOnPage.x\r\n                )[0];\r\n            var baseLineRectOnPage = pathPositionRedo(\r\n              [JSON.parse(JSON.stringify(baselineRect))],\r\n              this.posX + this.margin[3],\r\n              -previousPageHeightSum +\r\n                topMargin +\r\n                this.ctx.prevPageLastElemOffset\r\n            )[0];\r\n\r\n            const needsClipping =\r\n              doSlice && (i > min || i < max) && hasMargins.call(this);\r\n\r\n            if (needsClipping) {\r\n              this.pdf.saveGraphicsState();\r\n              this.pdf\r\n                .rect(\r\n                  this.margin[3],\r\n                  this.margin[0],\r\n                  pageWidthMinusMargins,\r\n                  pageHeightMinusMargins,\r\n                  null\r\n                )\r\n                .clip()\r\n                .discardPath();\r\n            }\r\n\r\n            this.pdf.text(\r\n              croppedText,\r\n              baseLineRectOnPage.x,\r\n              baseLineRectOnPage.y,\r\n              {\r\n                angle: options.angle,\r\n                align: textAlign,\r\n                renderingMode: options.renderingMode\r\n              }\r\n            );\r\n\r\n            if (needsClipping) {\r\n              this.pdf.restoreGraphicsState();\r\n            }\r\n          }\r\n        } else {\r\n          // This text is the last element of the page, but it got cut off due to the margin\r\n          // so we render it in the next page\r\n\r\n          if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {\r\n            // As a result, all other elements have their y offset increased\r\n            this.ctx.prevPageLastElemOffset +=\r\n              pageHeightMinusBottomMargin - textBoundsOnPage.y;\r\n          }\r\n        }\r\n\r\n        if (options.scale >= 0.01) {\r\n          this.pdf.setFontSize(oldSize);\r\n          this.lineWidth = oldLineWidth;\r\n        }\r\n      }\r\n    } else {\r\n      if (options.scale >= 0.01) {\r\n        oldSize = this.pdf.internal.getFontSize();\r\n        this.pdf.setFontSize(oldSize * options.scale);\r\n        oldLineWidth = this.lineWidth;\r\n        this.lineWidth = oldLineWidth * options.scale;\r\n      }\r\n      this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {\r\n        angle: options.angle,\r\n        align: textAlign,\r\n        renderingMode: options.renderingMode,\r\n        maxWidth: options.maxWidth\r\n      });\r\n\r\n      if (options.scale >= 0.01) {\r\n        this.pdf.setFontSize(oldSize);\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    }\r\n  };\r\n\r\n  var drawLine = function(x, y, prevX, prevY) {\r\n    prevX = prevX || 0;\r\n    prevY = prevY || 0;\r\n\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x + prevX) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y + prevY) +\r\n        \" l\"\r\n    );\r\n  };\r\n\r\n  var drawLines = function(lines, x, y) {\r\n    return this.pdf.lines(lines, x, y, null, null);\r\n  };\r\n\r\n  var drawCurve = function(x, y, x1, y1, x2, y2, x3, y3) {\r\n    this.pdf.internal.out(\r\n      [\r\n        f2(getHorizontalCoordinate(x1 + x)),\r\n        f2(getVerticalCoordinate(y1 + y)),\r\n        f2(getHorizontalCoordinate(x2 + x)),\r\n        f2(getVerticalCoordinate(y2 + y)),\r\n        f2(getHorizontalCoordinate(x3 + x)),\r\n        f2(getVerticalCoordinate(y3 + y)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.\r\n   *\r\n   * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   * @function createArc\r\n   */\r\n  var createArc = function(radius, startAngle, endAngle, anticlockwise) {\r\n    var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below\r\n    var twoPi = Math.PI * 2;\r\n    var halfPi = Math.PI / 2.0;\r\n\r\n    while (startAngle > endAngle) {\r\n      startAngle = startAngle - twoPi;\r\n    }\r\n    var totalAngle = Math.abs(endAngle - startAngle);\r\n    if (totalAngle < twoPi) {\r\n      if (anticlockwise) {\r\n        totalAngle = twoPi - totalAngle;\r\n      }\r\n    }\r\n\r\n    // Compute the sequence of arc curves, up to PI/2 at a time.\r\n    var curves = [];\r\n\r\n    // clockwise or counterclockwise\r\n    var sgn = anticlockwise ? -1 : +1;\r\n\r\n    var a1 = startAngle;\r\n    for (; totalAngle > EPSILON; ) {\r\n      var remain = sgn * Math.min(totalAngle, halfPi);\r\n      var a2 = a1 + remain;\r\n      curves.push(createSmallArc.call(this, radius, a1, a2));\r\n      totalAngle -= Math.abs(a2 - a1);\r\n      a1 = a2;\r\n    }\r\n\r\n    return curves;\r\n  };\r\n\r\n  /**\r\n   * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.\r\n   *\r\n   * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   *\r\n   * This algorithm is based on the approach described in: A. Riškus, \"Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa,\" Information Technology and Control, 35(4), 2006 pp. 371-378.\r\n   */\r\n  var createSmallArc = function(r, a1, a2) {\r\n    var a = (a2 - a1) / 2.0;\r\n\r\n    var x4 = r * Math.cos(a);\r\n    var y4 = r * Math.sin(a);\r\n    var x1 = x4;\r\n    var y1 = -y4;\r\n\r\n    var q1 = x1 * x1 + y1 * y1;\r\n    var q2 = q1 + x1 * x4 + y1 * y4;\r\n    var k2 = ((4 / 3) * (Math.sqrt(2 * q1 * q2) - q2)) / (x1 * y4 - y1 * x4);\r\n\r\n    var x2 = x1 - k2 * y1;\r\n    var y2 = y1 + k2 * x1;\r\n    var x3 = x2;\r\n    var y3 = -y2;\r\n\r\n    var ar = a + a1;\r\n    var cos_ar = Math.cos(ar);\r\n    var sin_ar = Math.sin(ar);\r\n\r\n    return {\r\n      x1: r * Math.cos(a1),\r\n      y1: r * Math.sin(a1),\r\n      x2: x2 * cos_ar - y2 * sin_ar,\r\n      y2: x2 * sin_ar + y2 * cos_ar,\r\n      x3: x3 * cos_ar - y3 * sin_ar,\r\n      y3: x3 * sin_ar + y3 * cos_ar,\r\n      x4: r * Math.cos(a2),\r\n      y4: r * Math.sin(a2)\r\n    };\r\n  };\r\n\r\n  var rad2deg = function(value) {\r\n    return (value * 180) / Math.PI;\r\n  };\r\n\r\n  var getQuadraticCurveBoundary = function(sx, sy, cpx, cpy, ex, ey) {\r\n    var midX1 = sx + (cpx - sx) * 0.5;\r\n    var midY1 = sy + (cpy - sy) * 0.5;\r\n    var midX2 = ex + (cpx - ex) * 0.5;\r\n    var midY2 = ey + (cpy - ey) * 0.5;\r\n    var resultX1 = Math.min(sx, ex, midX1, midX2);\r\n    var resultX2 = Math.max(sx, ex, midX1, midX2);\r\n    var resultY1 = Math.min(sy, ey, midY1, midY2);\r\n    var resultY2 = Math.max(sy, ey, midY1, midY2);\r\n    return new Rectangle(\r\n      resultX1,\r\n      resultY1,\r\n      resultX2 - resultX1,\r\n      resultY2 - resultY1\r\n    );\r\n  };\r\n\r\n  //De Casteljau algorithm\r\n  var getBezierCurveBoundary = function(ax, ay, bx, by, cx, cy, dx, dy) {\r\n    var tobx = bx - ax;\r\n    var toby = by - ay;\r\n    var tocx = cx - bx;\r\n    var tocy = cy - by;\r\n    var todx = dx - cx;\r\n    var tody = dy - cy;\r\n    var precision = 40;\r\n    var d,\r\n      i,\r\n      px,\r\n      py,\r\n      qx,\r\n      qy,\r\n      rx,\r\n      ry,\r\n      tx,\r\n      ty,\r\n      sx,\r\n      sy,\r\n      x,\r\n      y,\r\n      minx,\r\n      miny,\r\n      maxx,\r\n      maxy,\r\n      toqx,\r\n      toqy,\r\n      torx,\r\n      tory,\r\n      totx,\r\n      toty;\r\n    for (i = 0; i < precision + 1; i++) {\r\n      d = i / precision;\r\n      px = ax + d * tobx;\r\n      py = ay + d * toby;\r\n      qx = bx + d * tocx;\r\n      qy = by + d * tocy;\r\n      rx = cx + d * todx;\r\n      ry = cy + d * tody;\r\n      toqx = qx - px;\r\n      toqy = qy - py;\r\n      torx = rx - qx;\r\n      tory = ry - qy;\r\n\r\n      sx = px + d * toqx;\r\n      sy = py + d * toqy;\r\n      tx = qx + d * torx;\r\n      ty = qy + d * tory;\r\n      totx = tx - sx;\r\n      toty = ty - sy;\r\n\r\n      x = sx + d * totx;\r\n      y = sy + d * toty;\r\n      if (i == 0) {\r\n        minx = x;\r\n        miny = y;\r\n        maxx = x;\r\n        maxy = y;\r\n      } else {\r\n        minx = Math.min(minx, x);\r\n        miny = Math.min(miny, y);\r\n        maxx = Math.max(maxx, x);\r\n        maxy = Math.max(maxy, y);\r\n      }\r\n    }\r\n    return new Rectangle(\r\n      Math.round(minx),\r\n      Math.round(miny),\r\n      Math.round(maxx - minx),\r\n      Math.round(maxy - miny)\r\n    );\r\n  };\r\n\r\n  var getPrevLineDashValue = function(lineDash, lineDashOffset) {\r\n    return JSON.stringify({\r\n      lineDash: lineDash,\r\n      lineDashOffset: lineDashOffset\r\n    });\r\n  };\r\n\r\n  var setLineDash = function() {\r\n    // Avoid unnecessary line dash declarations.\r\n    if (\r\n      !this.prevLineDash &&\r\n      !this.ctx.lineDash.length &&\r\n      !this.ctx.lineDashOffset\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    // Avoid unnecessary line dash declarations.\r\n    const nextLineDash = getPrevLineDashValue(\r\n      this.ctx.lineDash,\r\n      this.ctx.lineDashOffset\r\n    );\r\n    if (this.prevLineDash !== nextLineDash) {\r\n      this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);\r\n      this.prevLineDash = nextLineDash;\r\n    }\r\n  };\r\n})(jsPDF.API);\r\n","/**\n * @license\n * jsPDF filters PlugIn\n * Copyright (c) 2014 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var ASCII85Encode = function(a) {\n    var b, c, d, e, f, g, h, i, j, k;\n    // eslint-disable-next-line no-control-regex\n    for (\n      !/[^\\x00-\\xFF]/.test(a),\n        b = \"\\x00\\x00\\x00\\x00\".slice(a.length % 4 || 4),\n        a += b,\n        c = [],\n        d = 0,\n        e = a.length;\n      e > d;\n      d += 4\n    )\n      (f =\n        (a.charCodeAt(d) << 24) +\n        (a.charCodeAt(d + 1) << 16) +\n        (a.charCodeAt(d + 2) << 8) +\n        a.charCodeAt(d + 3)),\n        0 !== f\n          ? ((k = f % 85),\n            (f = (f - k) / 85),\n            (j = f % 85),\n            (f = (f - j) / 85),\n            (i = f % 85),\n            (f = (f - i) / 85),\n            (h = f % 85),\n            (f = (f - h) / 85),\n            (g = f % 85),\n            c.push(g + 33, h + 33, i + 33, j + 33, k + 33))\n          : c.push(122);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(c, b.length),\n      String.fromCharCode.apply(String, c) + \"~>\"\n    );\n  };\n\n  var ASCII85Decode = function(a) {\n    var c,\n      d,\n      e,\n      f,\n      g,\n      h = String,\n      l = \"length\",\n      w = 255,\n      x = \"charCodeAt\",\n      y = \"slice\",\n      z = \"replace\";\n    for (\n      \"~>\" === a[y](-2),\n        a = a[y](0, -2)\n          [z](/\\s/g, \"\")\n          [z](\"z\", \"!!!!!\"),\n        c = \"uuuuu\"[y](a[l] % 5 || 5),\n        a += c,\n        e = [],\n        f = 0,\n        g = a[l];\n      g > f;\n      f += 5\n    )\n      (d =\n        52200625 * (a[x](f) - 33) +\n        614125 * (a[x](f + 1) - 33) +\n        7225 * (a[x](f + 2) - 33) +\n        85 * (a[x](f + 3) - 33) +\n        (a[x](f + 4) - 33)),\n        e.push(w & (d >> 24), w & (d >> 16), w & (d >> 8), w & d);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(e, c[l]),\n      h.fromCharCode.apply(h, e)\n    );\n  };\n\n  var ASCIIHexEncode = function(value) {\n    return (\n      value\n        .split(\"\")\n        .map(function(value) {\n          return (\"0\" + value.charCodeAt().toString(16)).slice(-2);\n        })\n        .join(\"\") + \">\"\n    );\n  };\n\n  var ASCIIHexDecode = function(value) {\n    var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);\n    value = value.replace(/\\s/g, \"\");\n    if (value.indexOf(\">\") !== -1) {\n      value = value.substr(0, value.indexOf(\">\"));\n    }\n    if (value.length % 2) {\n      value += \"0\";\n    }\n    if (regexCheckIfHex.test(value) === false) {\n      return \"\";\n    }\n    var result = \"\";\n    for (var i = 0; i < value.length; i += 2) {\n      result += String.fromCharCode(\"0x\" + (value[i] + value[i + 1]));\n    }\n    return result;\n  };\n  /*\n  var FlatePredictors = {\n      None: 1,\n      TIFF: 2,\n      PNG_None: 10,\n      PNG_Sub: 11,\n      PNG_Up: 12,\n      PNG_Average: 13,\n      PNG_Paeth: 14,\n      PNG_Optimum: 15\n  };\n  */\n\n  var FlateEncode = function(data) {\n    var arr = new Uint8Array(data.length);\n    var i = data.length;\n    while (i--) {\n      arr[i] = data.charCodeAt(i);\n    }\n    arr = zlibSync(arr);\n    data = arr.reduce(function(data, byte) {\n      return data + String.fromCharCode(byte);\n    }, \"\");\n    return data;\n  };\n\n  jsPDFAPI.processDataByFilters = function(origData, filterChain) {\n    \"use strict\";\n    var i = 0;\n    var data = origData || \"\";\n    var reverseChain = [];\n    filterChain = filterChain || [];\n\n    if (typeof filterChain === \"string\") {\n      filterChain = [filterChain];\n    }\n\n    for (i = 0; i < filterChain.length; i += 1) {\n      switch (filterChain[i]) {\n        case \"ASCII85Decode\":\n        case \"/ASCII85Decode\":\n          data = ASCII85Decode(data);\n          reverseChain.push(\"/ASCII85Encode\");\n          break;\n        case \"ASCII85Encode\":\n        case \"/ASCII85Encode\":\n          data = ASCII85Encode(data);\n          reverseChain.push(\"/ASCII85Decode\");\n          break;\n        case \"ASCIIHexDecode\":\n        case \"/ASCIIHexDecode\":\n          data = ASCIIHexDecode(data);\n          reverseChain.push(\"/ASCIIHexEncode\");\n          break;\n        case \"ASCIIHexEncode\":\n        case \"/ASCIIHexEncode\":\n          data = ASCIIHexEncode(data);\n          reverseChain.push(\"/ASCIIHexDecode\");\n          break;\n        case \"FlateEncode\":\n        case \"/FlateEncode\":\n          data = FlateEncode(data);\n          reverseChain.push(\"/FlateDecode\");\n          break;\n        default:\n          throw new Error(\n            'The filter: \"' + filterChain[i] + '\" is not implemented'\n          );\n      }\n    }\n\n    return { data: data, reverseChain: reverseChain.reverse().join(\" \") };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF fileloading PlugIn\n * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name fileloading\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name loadFile\n   * @function\n   * @param {string} url\n   * @param {boolean} sync\n   * @param {function} callback\n   * @returns {string|undefined} result\n   */\n  jsPDFAPI.loadFile = function(url, sync, callback) {\n\n    // eslint-disable-next-line no-unreachable\n    return nodeReadFile(url, sync, callback);\n  };\n\n  /**\n   * @name loadImageFile\n   * @function\n   * @param {string} path\n   * @param {boolean} sync\n   * @param {function} callback\n   */\n  jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;\n\n  function browserRequest(url, sync, callback) {\n    sync = sync === false ? false : true;\n    callback = typeof callback === \"function\" ? callback : function() {};\n    var result = undefined;\n\n    var xhr = function(url, sync, callback) {\n      var request = new XMLHttpRequest();\n      var i = 0;\n\n      var sanitizeUnicode = function(data) {\n        var dataLength = data.length;\n        var charArray = [];\n        var StringFromCharCode = String.fromCharCode;\n\n        //Transform Unicode to ASCII\n        for (i = 0; i < dataLength; i += 1) {\n          charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff));\n        }\n        return charArray.join(\"\");\n      };\n\n      request.open(\"GET\", url, !sync);\n      // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]\n      request.overrideMimeType(\"text/plain; charset=x-user-defined\");\n\n      if (sync === false) {\n        request.onload = function() {\n          if (request.status === 200) {\n            callback(sanitizeUnicode(this.responseText));\n          } else {\n            callback(undefined);\n          }\n        };\n      }\n      request.send(null);\n\n      if (sync && request.status === 200) {\n        return sanitizeUnicode(request.responseText);\n      }\n    };\n    try {\n      result = xhr(url, sync, callback);\n      // eslint-disable-next-line no-empty\n    } catch (e) {}\n    return result;\n  }\n\n  function nodeReadFile(url, sync, callback) {\n    sync = sync === false ? false : true;\n    var result = undefined;\n\n    var fs = require(\"fs\");\n    var path = require(\"path\");\n\n    url = path.resolve(url);\n    if (sync) {\n      try {\n        result = fs.readFileSync(url, { encoding: \"latin1\" });\n      } catch (e) {\n        return undefined;\n      }\n    } else {\n      fs.readFile(url, { encoding: \"latin1\" }, function(err, data) {\n        if (!callback) {\n          return;\n        }\n        if (err) {\n          callback(undefined);\n        }\n        callback(data);\n      });\n    }\n\n    return result;\n  }\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2018 Erik Koopmans\n * Released under the MIT License.\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { normalizeFontFace } from \"../libs/fontFace.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF html PlugIn\n *\n * @name html\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadHtml2Canvas() {\n    return (function() {\n      if (globalObject[\"html2canvas\"]) {\n        return Promise.resolve(globalObject[\"html2canvas\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"html2canvas\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"html2canvas\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load html2canvas\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load html2canvas: \" + e));\n      })\n      .then(function(html2canvas) {\n        return html2canvas.default ? html2canvas.default : html2canvas;\n      });\n  }\n\n  function loadDomPurify() {\n    return (function() {\n      if (globalObject[\"DOMPurify\"]) {\n        return Promise.resolve(globalObject[\"DOMPurify\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"dompurify\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"dompurify\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load dompurify\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load dompurify: \" + e));\n      })\n      .then(function(dompurify) {\n        return dompurify.default ? dompurify.default : dompurify;\n      });\n  }\n\n  /**\n   * Determine the type of a variable/object.\n   *\n   * @private\n   * @ignore\n   */\n  var objType = function(obj) {\n    var type = typeof obj;\n    if (type === \"undefined\") return \"undefined\";\n    else if (type === \"string\" || obj instanceof String) return \"string\";\n    else if (type === \"number\" || obj instanceof Number) return \"number\";\n    else if (type === \"function\" || obj instanceof Function) return \"function\";\n    else if (!!obj && obj.constructor === Array) return \"array\";\n    else if (obj && obj.nodeType === 1) return \"element\";\n    else if (type === \"object\") return \"object\";\n    else return \"unknown\";\n  };\n\n  /**\n   * Create an HTML element with optional className, innerHTML, and style.\n   *\n   * @private\n   * @ignore\n   */\n  var createElement = function(tagName, opt) {\n    var el = document.createElement(tagName);\n    if (opt.className) el.className = opt.className;\n    if (opt.innerHTML && opt.dompurify) {\n      el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);\n    }\n    for (var key in opt.style) {\n      el.style[key] = opt.style[key];\n    }\n    return el;\n  };\n\n  /**\n   * Deep-clone a node and preserve contents/properties.\n   *\n   * @private\n   * @ignore\n   */\n  var cloneNode = function(node, javascriptEnabled) {\n    // Recursively clone the node.\n    var clone =\n      node.nodeType === 3\n        ? document.createTextNode(node.nodeValue)\n        : node.cloneNode(false);\n    for (var child = node.firstChild; child; child = child.nextSibling) {\n      if (\n        javascriptEnabled === true ||\n        child.nodeType !== 1 ||\n        child.nodeName !== \"SCRIPT\"\n      ) {\n        clone.appendChild(cloneNode(child, javascriptEnabled));\n      }\n    }\n\n    if (node.nodeType === 1) {\n      // Preserve contents/properties of special nodes.\n      if (node.nodeName === \"CANVAS\") {\n        clone.width = node.width;\n        clone.height = node.height;\n        clone.getContext(\"2d\").drawImage(node, 0, 0);\n      } else if (node.nodeName === \"TEXTAREA\" || node.nodeName === \"SELECT\") {\n        clone.value = node.value;\n      }\n\n      // Preserve the node's scroll position when it loads.\n      clone.addEventListener(\n        \"load\",\n        function() {\n          clone.scrollTop = node.scrollTop;\n          clone.scrollLeft = node.scrollLeft;\n        },\n        true\n      );\n    }\n\n    // Return the cloned node.\n    return clone;\n  };\n\n  /* ----- CONSTRUCTOR ----- */\n\n  var Worker = function Worker(opt) {\n    // Create the root parent for the proto chain, and the starting Worker.\n    var root = Object.assign(\n      Worker.convert(Promise.resolve()),\n      JSON.parse(JSON.stringify(Worker.template))\n    );\n    var self = Worker.convert(Promise.resolve(), root);\n\n    // Set progress, optional settings, and return.\n    self = self.setProgress(1, Worker, 1, [Worker]);\n    self = self.set(opt);\n    return self;\n  };\n\n  // Boilerplate for subclassing Promise.\n  Worker.prototype = Object.create(Promise.prototype);\n  Worker.prototype.constructor = Worker;\n\n  // Converts/casts promises into Workers.\n  Worker.convert = function convert(promise, inherit) {\n    // Uses prototypal inheritance to receive changes made to ancestors' properties.\n    promise.__proto__ = inherit || Worker.prototype;\n    return promise;\n  };\n\n  Worker.template = {\n    prop: {\n      src: null,\n      container: null,\n      overlay: null,\n      canvas: null,\n      img: null,\n      pdf: null,\n      pageSize: null,\n      callback: function() {}\n    },\n    progress: {\n      val: 0,\n      state: null,\n      n: 0,\n      stack: []\n    },\n    opt: {\n      filename: \"file.pdf\",\n      margin: [0, 0, 0, 0],\n      enableLinks: true,\n      x: 0,\n      y: 0,\n      html2canvas: {},\n      jsPDF: {},\n      backgroundColor: \"transparent\"\n    }\n  };\n\n  /* ----- FROM / TO ----- */\n\n  Worker.prototype.from = function from(src, type) {\n    function getType(src) {\n      switch (objType(src)) {\n        case \"string\":\n          return \"string\";\n        case \"element\":\n          return src.nodeName.toLowerCase() === \"canvas\" ? \"canvas\" : \"element\";\n        default:\n          return \"unknown\";\n      }\n    }\n\n    return this.then(function from_main() {\n      type = type || getType(src);\n      switch (type) {\n        case \"string\":\n          return this.then(loadDomPurify).then(function(dompurify) {\n            return this.set({\n              src: createElement(\"div\", {\n                innerHTML: src,\n                dompurify: dompurify\n              })\n            });\n          });\n        case \"element\":\n          return this.set({ src: src });\n        case \"canvas\":\n          return this.set({ canvas: src });\n        case \"img\":\n          return this.set({ img: src });\n        default:\n          return this.error(\"Unknown source type.\");\n      }\n    });\n  };\n\n  Worker.prototype.to = function to(target) {\n    // Route the 'to' request to the appropriate method.\n    switch (target) {\n      case \"container\":\n        return this.toContainer();\n      case \"canvas\":\n        return this.toCanvas();\n      case \"img\":\n        return this.toImg();\n      case \"pdf\":\n        return this.toPdf();\n      default:\n        return this.error(\"Invalid target.\");\n    }\n  };\n\n  Worker.prototype.toContainer = function toContainer() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkSrc() {\n        return (\n          this.prop.src || this.error(\"Cannot duplicate - no source HTML.\")\n        );\n      },\n      function checkPageSize() {\n        return this.prop.pageSize || this.setPageSize();\n      }\n    ];\n    return this.thenList(prereqs).then(function toContainer_main() {\n      // Define the CSS styles for the container and its overlay parent.\n      var overlayCSS = {\n        position: \"fixed\",\n        overflow: \"hidden\",\n        zIndex: 1000,\n        left: \"-100000px\",\n        right: 0,\n        bottom: 0,\n        top: 0\n      };\n      var containerCSS = {\n        position: \"relative\",\n        display: \"inline-block\",\n        width:\n          (typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.windowWidth\n            : Math.max(\n                this.prop.src.clientWidth,\n                this.prop.src.scrollWidth,\n                this.prop.src.offsetWidth\n              )) + \"px\",\n        left: 0,\n        right: 0,\n        top: 0,\n        margin: \"auto\",\n        backgroundColor: this.opt.backgroundColor\n      }; // Set the overlay to hidden (could be changed in the future to provide a print preview).\n\n      var source = cloneNode(\n        this.prop.src,\n        this.opt.html2canvas.javascriptEnabled\n      );\n\n      if (source.tagName === \"BODY\") {\n        containerCSS.height =\n          Math.max(\n            document.body.scrollHeight,\n            document.body.offsetHeight,\n            document.documentElement.clientHeight,\n            document.documentElement.scrollHeight,\n            document.documentElement.offsetHeight\n          ) + \"px\";\n      }\n\n      this.prop.overlay = createElement(\"div\", {\n        className: \"html2pdf__overlay\",\n        style: overlayCSS\n      });\n      this.prop.container = createElement(\"div\", {\n        className: \"html2pdf__container\",\n        style: containerCSS\n      });\n      this.prop.container.appendChild(source);\n      this.prop.container.firstChild.appendChild(\n        createElement(\"div\", {\n          style: {\n            clear: \"both\",\n            border: \"0 none transparent\",\n            margin: 0,\n            padding: 0,\n            height: 0\n          }\n        })\n      );\n      this.prop.container.style.float = \"none\";\n      this.prop.overlay.appendChild(this.prop.container);\n      document.body.appendChild(this.prop.overlay);\n      this.prop.container.firstChild.style.position = \"relative\";\n      this.prop.container.height =\n        Math.max(\n          this.prop.container.firstChild.clientHeight,\n          this.prop.container.firstChild.scrollHeight,\n          this.prop.container.firstChild.offsetHeight\n        ) + \"px\";\n    });\n  };\n\n  Worker.prototype.toCanvas = function toCanvas() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toCanvas_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var options = Object.assign({}, this.opt.html2canvas);\n        delete options.onrendered;\n\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toCanvas_post(canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toContext2d = function toContext2d() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toContext2d_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n\n        var pdf = this.opt.jsPDF;\n        var fontFaces = this.opt.fontFaces;\n\n        var scale =\n          typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.width / this.opt.windowWidth\n            : 1;\n\n        var options = Object.assign(\n          {\n            async: true,\n            allowTaint: true,\n            scale: scale,\n            scrollX: this.opt.scrollX || 0,\n            scrollY: this.opt.scrollY || 0,\n            backgroundColor: \"#ffffff\",\n            imageTimeout: 15000,\n            logging: true,\n            proxy: null,\n            removeContainer: true,\n            foreignObjectRendering: false,\n            useCORS: false\n          },\n          this.opt.html2canvas\n        );\n        delete options.onrendered;\n\n        pdf.context2d.autoPaging =\n          typeof this.opt.autoPaging === \"undefined\"\n            ? true\n            : this.opt.autoPaging;\n        pdf.context2d.posX = this.opt.x;\n        pdf.context2d.posY = this.opt.y;\n        pdf.context2d.margin = this.opt.margin;\n        pdf.context2d.fontFaces = fontFaces;\n\n        if (fontFaces) {\n          for (var i = 0; i < fontFaces.length; ++i) {\n            var font = fontFaces[i];\n            var src = font.src.find(function(src) {\n              return src.format === \"truetype\";\n            });\n\n            if (src) {\n              pdf.addFont(src.url, font.ref.name, font.ref.style);\n            }\n          }\n        }\n\n        options.windowHeight = options.windowHeight || 0;\n        options.windowHeight =\n          options.windowHeight == 0\n            ? Math.max(\n                this.prop.container.clientHeight,\n                this.prop.container.scrollHeight,\n                this.prop.container.offsetHeight\n              )\n            : options.windowHeight;\n\n        pdf.context2d.save(true);\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toContext2d_post(canvas) {\n        this.opt.jsPDF.context2d.restore(true);\n\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toImg = function toImg() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkCanvas() {\n        return this.prop.canvas || this.toCanvas();\n      }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toImg_main() {\n      var imgData = this.prop.canvas.toDataURL(\n        \"image/\" + this.opt.image.type,\n        this.opt.image.quality\n      );\n      this.prop.img = document.createElement(\"img\");\n      this.prop.img.src = imgData;\n    });\n  };\n\n  Worker.prototype.toPdf = function toPdf() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContext2d() {\n        return this.toContext2d();\n      }\n      //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toPdf_main() {\n      // Create local copies of frequently used properties.\n      this.prop.pdf = this.prop.pdf || this.opt.jsPDF;\n    });\n  };\n\n  /* ----- OUTPUT / SAVE ----- */\n\n  Worker.prototype.output = function output(type, options, src) {\n    // Redirect requests to the correct function (outputPdf / outputImg).\n    src = src || \"pdf\";\n    if (src.toLowerCase() === \"img\" || src.toLowerCase() === \"image\") {\n      return this.outputImg(type, options);\n    } else {\n      return this.outputPdf(type, options);\n    }\n  };\n\n  Worker.prototype.outputPdf = function outputPdf(type, options) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputPdf_main() {\n      /* Currently implemented output types:\n       *    https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992\n       *  save(options), arraybuffer, blob, bloburi/bloburl,\n       *  datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl\n       */\n      return this.prop.pdf.output(type, options);\n    });\n  };\n\n  Worker.prototype.outputImg = function outputImg(type) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkImg() {\n        return this.prop.img || this.toImg();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputImg_main() {\n      switch (type) {\n        case undefined:\n        case \"img\":\n          return this.prop.img;\n        case \"datauristring\":\n        case \"dataurlstring\":\n          return this.prop.img.src;\n        case \"datauri\":\n        case \"dataurl\":\n          return (document.location.href = this.prop.img.src);\n        default:\n          throw 'Image output type \"' + type + '\" is not supported.';\n      }\n    });\n  };\n\n  Worker.prototype.save = function save(filename) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs)\n      .set(filename ? { filename: filename } : null)\n      .then(function save_main() {\n        this.prop.pdf.save(this.opt.filename);\n      });\n  };\n\n  Worker.prototype.doCallback = function doCallback() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs).then(function doCallback_main() {\n      this.prop.callback(this.prop.pdf);\n    });\n  };\n\n  /* ----- SET / GET ----- */\n\n  Worker.prototype.set = function set(opt) {\n    // TODO: Implement ordered pairs?\n\n    // Silently ignore invalid or empty input.\n    if (objType(opt) !== \"object\") {\n      return this;\n    }\n\n    // Build an array of setter functions to queue.\n    var fns = Object.keys(opt || {}).map(function(key) {\n      if (key in Worker.template.prop) {\n        // Set pre-defined properties.\n        return function set_prop() {\n          this.prop[key] = opt[key];\n        };\n      } else {\n        switch (key) {\n          case \"margin\":\n            return this.setMargin.bind(this, opt.margin);\n          case \"jsPDF\":\n            return function set_jsPDF() {\n              this.opt.jsPDF = opt.jsPDF;\n              return this.setPageSize();\n            };\n          case \"pageSize\":\n            return this.setPageSize.bind(this, opt.pageSize);\n          default:\n            // Set any other properties in opt.\n            return function set_opt() {\n              this.opt[key] = opt[key];\n            };\n        }\n      }\n    }, this);\n\n    // Set properties within the promise chain.\n    return this.then(function set_main() {\n      return this.thenList(fns);\n    });\n  };\n\n  Worker.prototype.get = function get(key, cbk) {\n    return this.then(function get_main() {\n      // Fetch the requested property, either as a predefined prop or in opt.\n      var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];\n      return cbk ? cbk(val) : val;\n    });\n  };\n\n  Worker.prototype.setMargin = function setMargin(margin) {\n    return this.then(function setMargin_main() {\n      // Parse the margin property.\n      switch (objType(margin)) {\n        case \"number\":\n          margin = [margin, margin, margin, margin];\n        // eslint-disable-next-line no-fallthrough\n        case \"array\":\n          if (margin.length === 2) {\n            margin = [margin[0], margin[1], margin[0], margin[1]];\n          }\n          if (margin.length === 4) {\n            break;\n          }\n        // eslint-disable-next-line no-fallthrough\n        default:\n          return this.error(\"Invalid margin array.\");\n      }\n\n      // Set the margin property, then update pageSize.\n      this.opt.margin = margin;\n    }).then(this.setPageSize);\n  };\n\n  Worker.prototype.setPageSize = function setPageSize(pageSize) {\n    function toPx(val, k) {\n      return Math.floor(((val * k) / 72) * 96);\n    }\n\n    return this.then(function setPageSize_main() {\n      // Retrieve page-size based on jsPDF settings, if not explicitly provided.\n      pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF);\n\n      // Add 'inner' field if not present.\n      if (!pageSize.hasOwnProperty(\"inner\")) {\n        pageSize.inner = {\n          width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],\n          height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]\n        };\n        pageSize.inner.px = {\n          width: toPx(pageSize.inner.width, pageSize.k),\n          height: toPx(pageSize.inner.height, pageSize.k)\n        };\n        pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;\n      }\n\n      // Attach pageSize to this.\n      this.prop.pageSize = pageSize;\n    });\n  };\n\n  Worker.prototype.setProgress = function setProgress(val, state, n, stack) {\n    // Immediately update all progress values.\n    if (val != null) this.progress.val = val;\n    if (state != null) this.progress.state = state;\n    if (n != null) this.progress.n = n;\n    if (stack != null) this.progress.stack = stack;\n    this.progress.ratio = this.progress.val / this.progress.state;\n\n    // Return this for command chaining.\n    return this;\n  };\n\n  Worker.prototype.updateProgress = function updateProgress(\n    val,\n    state,\n    n,\n    stack\n  ) {\n    // Immediately update all progress values, using setProgress.\n    return this.setProgress(\n      val ? this.progress.val + val : null,\n      state ? state : null,\n      n ? this.progress.n + n : null,\n      stack ? this.progress.stack.concat(stack) : null\n    );\n  };\n\n  /* ----- PROMISE MAPPING ----- */\n\n  Worker.prototype.then = function then(onFulfilled, onRejected) {\n    // Wrap `this` for encapsulation.\n    var self = this;\n\n    return this.thenCore(onFulfilled, onRejected, function then_main(\n      onFulfilled,\n      onRejected\n    ) {\n      // Update progress while queuing, calling, and resolving `then`.\n      self.updateProgress(null, null, 1, [onFulfilled]);\n      return Promise.prototype.then\n        .call(this, function then_pre(val) {\n          self.updateProgress(null, onFulfilled);\n          return val;\n        })\n        .then(onFulfilled, onRejected)\n        .then(function then_post(val) {\n          self.updateProgress(1);\n          return val;\n        });\n    });\n  };\n\n  Worker.prototype.thenCore = function thenCore(\n    onFulfilled,\n    onRejected,\n    thenBase\n  ) {\n    // Handle optional thenBase parameter.\n    thenBase = thenBase || Promise.prototype.then;\n\n    // Wrap `this` for encapsulation and bind it to the promise handlers.\n    var self = this;\n    if (onFulfilled) {\n      onFulfilled = onFulfilled.bind(self);\n    }\n    if (onRejected) {\n      onRejected = onRejected.bind(self);\n    }\n\n    // Cast self into a Promise to avoid polyfills recursively defining `then`.\n    var isNative =\n      Promise.toString().indexOf(\"[native code]\") !== -1 &&\n      Promise.name === \"Promise\";\n    var selfPromise = isNative\n      ? self\n      : Worker.convert(Object.assign({}, self), Promise.prototype);\n\n    // Return the promise, after casting it into a Worker and preserving props.\n    var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);\n    return Worker.convert(returnVal, self.__proto__);\n  };\n\n  Worker.prototype.thenExternal = function thenExternal(\n    onFulfilled,\n    onRejected\n  ) {\n    // Call `then` and return a standard promise (exits the Worker chain).\n    return Promise.prototype.then.call(this, onFulfilled, onRejected);\n  };\n\n  Worker.prototype.thenList = function thenList(fns) {\n    // Queue a series of promise 'factories' into the promise chain.\n    var self = this;\n    fns.forEach(function thenList_forEach(fn) {\n      self = self.thenCore(fn);\n    });\n    return self;\n  };\n\n  Worker.prototype[\"catch\"] = function(onRejected) {\n    // Bind `this` to the promise handler, call `catch`, and return a Worker.\n    if (onRejected) {\n      onRejected = onRejected.bind(this);\n    }\n    var returnVal = Promise.prototype[\"catch\"].call(this, onRejected);\n    return Worker.convert(returnVal, this);\n  };\n\n  Worker.prototype.catchExternal = function catchExternal(onRejected) {\n    // Call `catch` and return a standard promise (exits the Worker chain).\n    return Promise.prototype[\"catch\"].call(this, onRejected);\n  };\n\n  Worker.prototype.error = function error(msg) {\n    // Throw the error in the Promise chain.\n    return this.then(function error_main() {\n      throw new Error(msg);\n    });\n  };\n\n  /* ----- ALIASES ----- */\n\n  Worker.prototype.using = Worker.prototype.set;\n  Worker.prototype.saveAs = Worker.prototype.save;\n  Worker.prototype.export = Worker.prototype.output;\n  Worker.prototype.run = Worker.prototype.then;\n\n  // Get dimensions of a PDF page, as determined by jsPDF.\n  jsPDF.getPageSize = function(orientation, unit, format) {\n    // Decode options object\n    if (typeof orientation === \"object\") {\n      var options = orientation;\n      orientation = options.orientation;\n      unit = options.unit || unit;\n      format = options.format || format;\n    }\n\n    // Default options\n    unit = unit || \"mm\";\n    format = format || \"a4\";\n    orientation = (\"\" + (orientation || \"P\")).toLowerCase();\n    var format_as_string = (\"\" + format).toLowerCase();\n\n    // Size in pt of various paper formats\n    var pageFormats = {\n      a0: [2383.94, 3370.39],\n      a1: [1683.78, 2383.94],\n      a2: [1190.55, 1683.78],\n      a3: [841.89, 1190.55],\n      a4: [595.28, 841.89],\n      a5: [419.53, 595.28],\n      a6: [297.64, 419.53],\n      a7: [209.76, 297.64],\n      a8: [147.4, 209.76],\n      a9: [104.88, 147.4],\n      a10: [73.7, 104.88],\n      b0: [2834.65, 4008.19],\n      b1: [2004.09, 2834.65],\n      b2: [1417.32, 2004.09],\n      b3: [1000.63, 1417.32],\n      b4: [708.66, 1000.63],\n      b5: [498.9, 708.66],\n      b6: [354.33, 498.9],\n      b7: [249.45, 354.33],\n      b8: [175.75, 249.45],\n      b9: [124.72, 175.75],\n      b10: [87.87, 124.72],\n      c0: [2599.37, 3676.54],\n      c1: [1836.85, 2599.37],\n      c2: [1298.27, 1836.85],\n      c3: [918.43, 1298.27],\n      c4: [649.13, 918.43],\n      c5: [459.21, 649.13],\n      c6: [323.15, 459.21],\n      c7: [229.61, 323.15],\n      c8: [161.57, 229.61],\n      c9: [113.39, 161.57],\n      c10: [79.37, 113.39],\n      dl: [311.81, 623.62],\n      letter: [612, 792],\n      \"government-letter\": [576, 756],\n      legal: [612, 1008],\n      \"junior-legal\": [576, 360],\n      ledger: [1224, 792],\n      tabloid: [792, 1224],\n      \"credit-card\": [153, 243]\n    };\n\n    var k;\n    // Unit conversion\n    switch (unit) {\n      case \"pt\":\n        k = 1;\n        break;\n      case \"mm\":\n        k = 72 / 25.4;\n        break;\n      case \"cm\":\n        k = 72 / 2.54;\n        break;\n      case \"in\":\n        k = 72;\n        break;\n      case \"px\":\n        k = 72 / 96;\n        break;\n      case \"pc\":\n        k = 12;\n        break;\n      case \"em\":\n        k = 12;\n        break;\n      case \"ex\":\n        k = 6;\n        break;\n      default:\n        throw \"Invalid unit: \" + unit;\n    }\n    var pageHeight = 0;\n    var pageWidth = 0;\n\n    // Dimensions are stored as user units and converted to points on output\n    if (pageFormats.hasOwnProperty(format_as_string)) {\n      pageHeight = pageFormats[format_as_string][1] / k;\n      pageWidth = pageFormats[format_as_string][0] / k;\n    } else {\n      try {\n        pageHeight = format[1];\n        pageWidth = format[0];\n      } catch (err) {\n        throw new Error(\"Invalid format: \" + format);\n      }\n    }\n\n    var tmp;\n    // Handle page orientation\n    if (orientation === \"p\" || orientation === \"portrait\") {\n      orientation = \"p\";\n      if (pageWidth > pageHeight) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else if (orientation === \"l\" || orientation === \"landscape\") {\n      orientation = \"l\";\n      if (pageHeight > pageWidth) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else {\n      throw \"Invalid orientation: \" + orientation;\n    }\n\n    // Return information (k is the unit conversion ratio from pts)\n    var info = {\n      width: pageWidth,\n      height: pageHeight,\n      unit: unit,\n      k: k,\n      orientation: orientation\n    };\n    return info;\n  };\n\n  /**\n   * @typedef FontFace\n   *\n   * The font-face type implements an interface similar to that of the font-face CSS rule,\n   * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D\n   * is updated.\n   *\n   * All properties expect values similar to those in the font-face CSS rule. A difference\n   * is the font-family, which do not need to be enclosed in double-quotes when containing\n   * spaces like in CSS.\n   *\n   * @property {string} family The name of the font-family.\n   * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.\n   * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)\n   * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.\n   * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.\n   * @property {string} [src] url A URL to a font of a specific format.\n   * @property {string} [src] format Format of the font referenced by the URL.\n   */\n\n  /**\n   * Generate a PDF from an HTML element or string using.\n   *\n   * @name html\n   * @function\n   * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.\n   * @param {Object} [options] Collection of settings\n   * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance\n   * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.\n   * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.\n   * <ul>\n   * <li>\n   *   <code>false</code>: Auto paging is disabled.\n   * </li>\n   * <li>\n   *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\n   *   slice text in half, making it difficult to read.\n   * </li>\n   * <li>\n   *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\n   *   mostly of a single column of text.\n   * </li>\n   * </ul>\n   * Default is <code>true</code>.\n   * @param {string} [options.filename] name of the file\n   * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image\n   * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options\n   * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.\n   * @param {jsPDF} [options.jsPDF] jsPDF instance\n   * @param {number=} [options.x] x position on the PDF document in jsPDF units.\n   * @param {number=} [options.y] y position on the PDF document in jsPDF units.\n   * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be\n   * scaled such that it fits into the specified width. Has no effect if either the <code>html2canvas.scale<code> is\n   * specified or the <code>windowWidth</code> option is NOT specified.\n   * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the\n   * <code>html2canvas.windowWidth</code> option, this option affects the actual container size while rendering and\n   * does NOT affect CSS media queries. This option only has an effect, if the <code>width<code> option is also specified.\n   *\n   * @example\n   * var doc = new jsPDF();\n   *\n   * doc.html(document.body, {\n   *    callback: function (doc) {\n   *      doc.save();\n   *    },\n   *    x: 10,\n   *    y: 10\n   * });\n   */\n  jsPDFAPI.html = function(src, options) {\n    \"use strict\";\n\n    options = options || {};\n    options.callback = options.callback || function() {};\n    options.html2canvas = options.html2canvas || {};\n    options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;\n    options.jsPDF = options.jsPDF || this;\n    options.fontFaces = options.fontFaces\n      ? options.fontFaces.map(normalizeFontFace)\n      : null;\n\n    // Create a new worker with the given options.\n    var worker = new Worker(options);\n\n    if (!options.worker) {\n      // If worker is not set to true, perform the traditional 'simple' operation.\n      return worker.from(src).doCallback();\n    } else {\n      // Otherwise, return the worker for new Promise-based operation.\n      return worker;\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF JavaScript plugin\n *\n * @name javascript\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  var jsNamesObj, jsJsObj, text;\n  /**\n   * @name addJS\n   * @function\n   * @param {string} javascript The javascript to be embedded into the PDF-file.\n   * @returns {jsPDF}\n   */\n  jsPDFAPI.addJS = function(javascript) {\n    text = javascript;\n    this.internal.events.subscribe(\"postPutResources\", function() {\n      jsNamesObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/Names [(EmbeddedJS) \" + (jsNamesObj + 1) + \" 0 R]\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n\n      jsJsObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/S /JavaScript\");\n      this.internal.out(\"/JS (\" + text + \")\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n    });\n    this.internal.events.subscribe(\"putCatalog\", function() {\n      if (jsNamesObj !== undefined && jsJsObj !== undefined) {\n        this.internal.out(\"/Names <</JavaScript \" + jsNamesObj + \" 0 R>>\");\n      }\n    });\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Outline PlugIn\n *\n * Generates a PDF Outline\n * @name outline\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namesOid;\n  //var destsGoto = [];\n\n  jsPDFAPI.events.push([\n    \"postPutResources\",\n    function() {\n      var pdf = this;\n      var rx = /^(\\d+) 0 obj$/;\n\n      // Write action goto objects for each page\n      // this.outline.destsGoto = [];\n      // for (var i = 0; i < totalPages; i++) {\n      // var id = pdf.internal.newObject();\n      // this.outline.destsGoto.push(id);\n      // pdf.internal.write(\"<</D[\" + (i * 2 + 3) + \" 0 R /XYZ null\n      // null null]/S/GoTo>> endobj\");\n      // }\n      //\n      // for (var i = 0; i < dests.length; i++) {\n      // pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0\n      // R\");\n      // }\n      //\n      if (this.outline.root.children.length > 0) {\n        var lines = pdf.outline.render().split(/\\r\\n/);\n        for (var i = 0; i < lines.length; i++) {\n          var line = lines[i];\n          var m = rx.exec(line);\n          if (m != null) {\n            var oid = m[1];\n            pdf.internal.newObjectDeferredBegin(oid, false);\n          }\n          pdf.internal.write(line);\n        }\n      }\n\n      // This code will write named destination for each page reference\n      // (page_1, etc)\n      if (this.outline.createNamedDestinations) {\n        var totalPages = this.internal.pages.length;\n        // WARNING: this assumes jsPDF starts on page 3 and pageIDs\n        // follow 5, 7, 9, etc\n        // Write destination objects for each page\n        var dests = [];\n        for (var i = 0; i < totalPages; i++) {\n          var id = pdf.internal.newObject();\n          dests.push(id);\n          var info = pdf.internal.getPageInfo(i + 1);\n          pdf.internal.write(\n            \"<< /D[\" + info.objId + \" 0 R /XYZ null null null]>> endobj\"\n          );\n        }\n\n        // assign a name for each destination\n        var names2Oid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Names [ \");\n        for (var i = 0; i < dests.length; i++) {\n          pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0 R\");\n        }\n        pdf.internal.write(\" ] >>\", \"endobj\");\n\n        // var kids = pdf.internal.newObject();\n        // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');\n        // pdf.internal.write(' ] >>', 'endobj');\n\n        namesOid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Dests \" + names2Oid + \" 0 R\");\n        pdf.internal.write(\">>\", \"endobj\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putCatalog\",\n    function() {\n      var pdf = this;\n      if (pdf.outline.root.children.length > 0) {\n        pdf.internal.write(\n          \"/Outlines\",\n          this.outline.makeRef(this.outline.root)\n        );\n        if (this.outline.createNamedDestinations) {\n          pdf.internal.write(\"/Names \" + namesOid + \" 0 R\");\n        }\n        // Open with Bookmarks showing\n        // pdf.internal.write(\"/PageMode /UseOutlines\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      var pdf = this;\n\n      pdf.outline = {\n        createNamedDestinations: false,\n        root: {\n          children: []\n        }\n      };\n\n      /**\n       * Options: pageNumber\n       */\n      pdf.outline.add = function(parent, title, options) {\n        var item = {\n          title: title,\n          options: options,\n          children: []\n        };\n        if (parent == null) {\n          parent = this.root;\n        }\n        parent.children.push(item);\n        return item;\n      };\n\n      pdf.outline.render = function() {\n        this.ctx = {};\n        this.ctx.val = \"\";\n        this.ctx.pdf = pdf;\n\n        this.genIds_r(this.root);\n        this.renderRoot(this.root);\n        this.renderItems(this.root);\n\n        return this.ctx.val;\n      };\n\n      pdf.outline.genIds_r = function(node) {\n        node.id = pdf.internal.newObjectDeferred();\n        for (var i = 0; i < node.children.length; i++) {\n          this.genIds_r(node.children[i]);\n        }\n      };\n\n      pdf.outline.renderRoot = function(node) {\n        this.objStart(node);\n        this.line(\"/Type /Outlines\");\n        if (node.children.length > 0) {\n          this.line(\"/First \" + this.makeRef(node.children[0]));\n          this.line(\n            \"/Last \" + this.makeRef(node.children[node.children.length - 1])\n          );\n        }\n        this.line(\n          \"/Count \" +\n            this.count_r(\n              {\n                count: 0\n              },\n              node\n            )\n        );\n        this.objEnd();\n      };\n\n      pdf.outline.renderItems = function(node) {\n        var getVerticalCoordinateString = this.ctx.pdf.internal\n          .getVerticalCoordinateString;\n        for (var i = 0; i < node.children.length; i++) {\n          var item = node.children[i];\n          this.objStart(item);\n\n          this.line(\"/Title \" + this.makeString(item.title));\n\n          this.line(\"/Parent \" + this.makeRef(node));\n          if (i > 0) {\n            this.line(\"/Prev \" + this.makeRef(node.children[i - 1]));\n          }\n          if (i < node.children.length - 1) {\n            this.line(\"/Next \" + this.makeRef(node.children[i + 1]));\n          }\n          if (item.children.length > 0) {\n            this.line(\"/First \" + this.makeRef(item.children[0]));\n            this.line(\n              \"/Last \" + this.makeRef(item.children[item.children.length - 1])\n            );\n          }\n\n          var count = (this.count = this.count_r(\n            {\n              count: 0\n            },\n            item\n          ));\n          if (count > 0) {\n            this.line(\"/Count \" + count);\n          }\n\n          if (item.options) {\n            if (item.options.pageNumber) {\n              // Explicit Destination\n              //WARNING this assumes page ids are 3,5,7, etc.\n              var info = pdf.internal.getPageInfo(item.options.pageNumber);\n              this.line(\n                \"/Dest \" +\n                  \"[\" +\n                  info.objId +\n                  \" 0 R /XYZ 0 \" +\n                  getVerticalCoordinateString(0) +\n                  \" 0]\"\n              );\n              // this line does not work on all clients (pageNumber instead of page ref)\n              //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');\n\n              // Named Destination\n              // this.line('/Dest (page_' + (item.options.pageNumber) + ')');\n\n              // Action Destination\n              // var id = pdf.internal.newObject();\n              // pdf.internal.write('<</D[' + (item.options.pageNumber - 1) + ' /XYZ null null null]/S/GoTo>> endobj');\n              // this.line('/A ' + id + ' 0 R' );\n            }\n          }\n          this.objEnd();\n        }\n        for (var z = 0; z < node.children.length; z++) {\n          this.renderItems(node.children[z]);\n        }\n      };\n\n      pdf.outline.line = function(text) {\n        this.ctx.val += text + \"\\r\\n\";\n      };\n\n      pdf.outline.makeRef = function(node) {\n        return node.id + \" 0 R\";\n      };\n\n      pdf.outline.makeString = function(val) {\n        return \"(\" + pdf.internal.pdfEscape(val) + \")\";\n      };\n\n      pdf.outline.objStart = function(node) {\n        this.ctx.val += \"\\r\\n\" + node.id + \" 0 obj\" + \"\\r\\n<<\\r\\n\";\n      };\n\n      pdf.outline.objEnd = function() {\n        this.ctx.val += \">> \\r\\n\" + \"endobj\" + \"\\r\\n\";\n      };\n\n      pdf.outline.count_r = function(ctx, node) {\n        for (var i = 0; i < node.children.length; i++) {\n          ctx.count++;\n          this.count_r(ctx, node.children[i]);\n        }\n        return ctx.count;\n      };\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF jpeg Support PlugIn\n *\n * @name jpeg_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * 0xc0 (SOF) Huffman  - Baseline DCT\n   * 0xc1 (SOF) Huffman  - Extended sequential DCT\n   * 0xc2 Progressive DCT (SOF2)\n   * 0xc3 Spatial (sequential) lossless (SOF3)\n   * 0xc4 Differential sequential DCT (SOF5)\n   * 0xc5 Differential progressive DCT (SOF6)\n   * 0xc6 Differential spatial (SOF7)\n   * 0xc7\n   */\n  var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];\n\n  //takes a string imgData containing the raw bytes of\n  //a jpeg image and returns [width, height]\n  //Algorithm from: http://www.64lines.com/jpeg-width-height\n  var getJpegInfo = function(imgData) {\n    var width, height, numcomponents;\n    var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);\n    var len = imgData.length;\n    var result = { width: 0, height: 0, numcomponents: 1 };\n    for (var i = 4; i < len; i += 2) {\n      i += blockLength;\n      if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {\n        height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);\n        width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);\n        numcomponents = imgData.charCodeAt(i + 9);\n        result = { width: width, height: height, numcomponents: numcomponents };\n        break;\n      } else {\n        blockLength =\n          imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);\n      }\n    }\n    return result;\n  };\n\n  /**\n   * @ignore\n   */\n  jsPDFAPI.processJPEG = function(\n    data,\n    index,\n    alias,\n    compression,\n    dataAsBinaryString,\n    colorSpace\n  ) {\n    var filter = this.decode.DCT_DECODE,\n      bpc = 8,\n      dims,\n      result = null;\n\n    if (\n      typeof data === \"string\" ||\n      this.__addimage__.isArrayBuffer(data) ||\n      this.__addimage__.isArrayBufferView(data)\n    ) {\n      // if we already have a stored binary string rep use that\n      data = dataAsBinaryString || data;\n      data = this.__addimage__.isArrayBuffer(data)\n        ? new Uint8Array(data)\n        : data;\n      data = this.__addimage__.isArrayBufferView(data)\n        ? this.__addimage__.arrayBufferToBinaryString(data)\n        : data;\n\n      dims = getJpegInfo(data);\n      switch (dims.numcomponents) {\n        case 1:\n          colorSpace = this.color_spaces.DEVICE_GRAY;\n          break;\n        case 4:\n          colorSpace = this.color_spaces.DEVICE_CMYK;\n          break;\n        case 3:\n          colorSpace = this.color_spaces.DEVICE_RGB;\n          break;\n      }\n\n      result = {\n        data: data,\n        width: dims.width,\n        height: dims.height,\n        colorSpace: colorSpace,\n        bitsPerComponent: bpc,\n        filter: filter,\n        index: index,\n        alias: alias\n      };\n    }\n    return result;\n  };\n})(jsPDF.API);\n","// Generated by CoffeeScript 1.4.0\n\n/**\n * @license\n * PNG.js\n * Copyright (c) 2011 Devon Govett\n * MIT LICENSE\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this\n * software and associated documentation files (the \"Software\"), to deal in the Software\n * without restriction, including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons\n * to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or\n * substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\n * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport { unzlibSync } from \"./fflate.js\";\nimport { globalObject } from \"./globalObject.js\";\n\nvar PNG = (function() {\n  var APNG_BLEND_OP_OVER,\n    APNG_BLEND_OP_SOURCE,\n    APNG_DISPOSE_OP_BACKGROUND,\n    APNG_DISPOSE_OP_NONE,\n    APNG_DISPOSE_OP_PREVIOUS,\n    makeImage,\n    scratchCanvas,\n    scratchCtx;\n\n  APNG_DISPOSE_OP_NONE = 0;\n\n  APNG_DISPOSE_OP_BACKGROUND = 1;\n\n  APNG_DISPOSE_OP_PREVIOUS = 2;\n\n  APNG_BLEND_OP_SOURCE = 0;\n\n  APNG_BLEND_OP_OVER = 1;\n\n  function PNG(data) {\n    var chunkSize,\n      colors,\n      palLen,\n      delayDen,\n      delayNum,\n      frame,\n      i,\n      index,\n      key,\n      section,\n      palShort,\n      text,\n      _i,\n      _j,\n      _ref;\n    this.data = data;\n    this.pos = 8;\n    this.palette = [];\n    this.imgData = [];\n    this.transparency = {};\n    this.animation = null;\n    this.text = {};\n    frame = null;\n    while (true) {\n      chunkSize = this.readUInt32();\n      section = function() {\n        var _i, _results;\n        _results = [];\n        for (i = _i = 0; _i < 4; i = ++_i) {\n          _results.push(String.fromCharCode(this.data[this.pos++]));\n        }\n        return _results;\n      }\n        .call(this)\n        .join(\"\");\n      switch (section) {\n        case \"IHDR\":\n          this.width = this.readUInt32();\n          this.height = this.readUInt32();\n          this.bits = this.data[this.pos++];\n          this.colorType = this.data[this.pos++];\n          this.compressionMethod = this.data[this.pos++];\n          this.filterMethod = this.data[this.pos++];\n          this.interlaceMethod = this.data[this.pos++];\n          break;\n        case \"acTL\":\n          this.animation = {\n            numFrames: this.readUInt32(),\n            numPlays: this.readUInt32() || Infinity,\n            frames: []\n          };\n          break;\n        case \"PLTE\":\n          this.palette = this.read(chunkSize);\n          break;\n        case \"fcTL\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.pos += 4;\n          frame = {\n            width: this.readUInt32(),\n            height: this.readUInt32(),\n            xOffset: this.readUInt32(),\n            yOffset: this.readUInt32()\n          };\n          delayNum = this.readUInt16();\n          delayDen = this.readUInt16() || 100;\n          frame.delay = (1000 * delayNum) / delayDen;\n          frame.disposeOp = this.data[this.pos++];\n          frame.blendOp = this.data[this.pos++];\n          frame.data = [];\n          break;\n        case \"IDAT\":\n        case \"fdAT\":\n          if (section === \"fdAT\") {\n            this.pos += 4;\n            chunkSize -= 4;\n          }\n          data = (frame != null ? frame.data : void 0) || this.imgData;\n          for (\n            i = _i = 0;\n            0 <= chunkSize ? _i < chunkSize : _i > chunkSize;\n            i = 0 <= chunkSize ? ++_i : --_i\n          ) {\n            data.push(this.data[this.pos++]);\n          }\n          break;\n        case \"tRNS\":\n          this.transparency = {};\n          switch (this.colorType) {\n            case 3:\n              palLen = this.palette.length / 3;\n              this.transparency.indexed = this.read(chunkSize);\n              if (this.transparency.indexed.length > palLen)\n                throw new Error(\"More transparent colors than palette size\");\n              /*\n               * According to the PNG spec trns should be increased to the same size as palette if shorter\n               */\n              //palShort = 255 - this.transparency.indexed.length;\n              palShort = palLen - this.transparency.indexed.length;\n              if (palShort > 0) {\n                for (\n                  i = _j = 0;\n                  0 <= palShort ? _j < palShort : _j > palShort;\n                  i = 0 <= palShort ? ++_j : --_j\n                ) {\n                  this.transparency.indexed.push(255);\n                }\n              }\n              break;\n            case 0:\n              this.transparency.grayscale = this.read(chunkSize)[0];\n              break;\n            case 2:\n              this.transparency.rgb = this.read(chunkSize);\n          }\n          break;\n        case \"tEXt\":\n          text = this.read(chunkSize);\n          index = text.indexOf(0);\n          key = String.fromCharCode.apply(String, text.slice(0, index));\n          this.text[key] = String.fromCharCode.apply(\n            String,\n            text.slice(index + 1)\n          );\n          break;\n        case \"IEND\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.colors = function() {\n            switch (this.colorType) {\n              case 0:\n              case 3:\n              case 4:\n                return 1;\n              case 2:\n              case 6:\n                return 3;\n            }\n          }.call(this);\n          this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;\n          colors = this.colors + (this.hasAlphaChannel ? 1 : 0);\n          this.pixelBitlength = this.bits * colors;\n          this.colorSpace = function() {\n            switch (this.colors) {\n              case 1:\n                return \"DeviceGray\";\n              case 3:\n                return \"DeviceRGB\";\n            }\n          }.call(this);\n          this.imgData = new Uint8Array(this.imgData);\n          return;\n        default:\n          this.pos += chunkSize;\n      }\n      this.pos += 4;\n      if (this.pos > this.data.length) {\n        throw new Error(\"Incomplete or corrupt PNG file\");\n      }\n    }\n  }\n\n  PNG.prototype.read = function(bytes) {\n    var i, _i, _results;\n    _results = [];\n    for (\n      i = _i = 0;\n      0 <= bytes ? _i < bytes : _i > bytes;\n      i = 0 <= bytes ? ++_i : --_i\n    ) {\n      _results.push(this.data[this.pos++]);\n    }\n    return _results;\n  };\n\n  PNG.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.data[this.pos++] << 24;\n    b2 = this.data[this.pos++] << 16;\n    b3 = this.data[this.pos++] << 8;\n    b4 = this.data[this.pos++];\n    return b1 | b2 | b3 | b4;\n  };\n\n  PNG.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.data[this.pos++] << 8;\n    b2 = this.data[this.pos++];\n    return b1 | b2;\n  };\n\n  PNG.prototype.decodePixels = function(data) {\n    var pixelBytes = this.pixelBitlength / 8;\n    var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);\n    var pos = 0;\n    var _this = this;\n\n    if (data == null) {\n      data = this.imgData;\n    }\n    if (data.length === 0) {\n      return new Uint8Array(0);\n    }\n\n    data = unzlibSync(data);\n    function pass(x0, y0, dx, dy) {\n      var abyte,\n        c,\n        col,\n        i,\n        left,\n        length,\n        p,\n        pa,\n        paeth,\n        pb,\n        pc,\n        pixels,\n        row,\n        scanlineLength,\n        upper,\n        upperLeft,\n        _i,\n        _j,\n        _k,\n        _l,\n        _m;\n      var w = Math.ceil((_this.width - x0) / dx),\n        h = Math.ceil((_this.height - y0) / dy);\n      var isFull = _this.width == w && _this.height == h;\n      scanlineLength = pixelBytes * w;\n      pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);\n      length = data.length;\n      row = 0;\n      c = 0;\n      while (row < h && pos < length) {\n        switch (data[pos++]) {\n          case 0:\n            for (i = _i = 0; _i < scanlineLength; i = _i += 1) {\n              pixels[c++] = data[pos++];\n            }\n            break;\n          case 1:\n            for (i = _j = 0; _j < scanlineLength; i = _j += 1) {\n              abyte = data[pos++];\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              pixels[c++] = (abyte + left) % 256;\n            }\n            break;\n          case 2:\n            for (i = _k = 0; _k < scanlineLength; i = _k += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (upper + abyte) % 256;\n            }\n            break;\n          case 3:\n            for (i = _l = 0; _l < scanlineLength; i = _l += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;\n            }\n            break;\n          case 4:\n            for (i = _m = 0; _m < scanlineLength; i = _m += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              if (row === 0) {\n                upper = upperLeft = 0;\n              } else {\n                upper =\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      col * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n                upperLeft =\n                  col &&\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      (col - 1) * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n              }\n              p = left + upper - upperLeft;\n              pa = Math.abs(p - left);\n              pb = Math.abs(p - upper);\n              pc = Math.abs(p - upperLeft);\n              if (pa <= pb && pa <= pc) {\n                paeth = left;\n              } else if (pb <= pc) {\n                paeth = upper;\n              } else {\n                paeth = upperLeft;\n              }\n              pixels[c++] = (abyte + paeth) % 256;\n            }\n            break;\n          default:\n            throw new Error(\"Invalid filter algorithm: \" + data[pos - 1]);\n        }\n        if (!isFull) {\n          var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;\n          var partPos = row * scanlineLength;\n          for (i = 0; i < w; i += 1) {\n            for (var j = 0; j < pixelBytes; j += 1)\n              fullPixels[fullPos++] = pixels[partPos++];\n            fullPos += (dx - 1) * pixelBytes;\n          }\n        }\n        row++;\n      }\n    }\n    if (_this.interlaceMethod == 1) {\n      /*\n          1 6 4 6 2 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n          3 6 4 6 3 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n        */\n      pass(0, 0, 8, 8); // 1\n      /* NOTE these seem to follow the pattern:\n       * pass(x, 0, 2*x, 2*x);\n       * pass(0, x,   x, 2*x);\n       * with x being 4, 2, 1.\n       */\n      pass(4, 0, 8, 8); // 2\n      pass(0, 4, 4, 8); // 3\n\n      pass(2, 0, 4, 4); // 4\n      pass(0, 2, 2, 4); // 5\n\n      pass(1, 0, 2, 2); // 6\n      pass(0, 1, 1, 2); // 7\n    } else {\n      pass(0, 0, 1, 1);\n    }\n    return fullPixels;\n  };\n\n  PNG.prototype.decodePalette = function() {\n    var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;\n    palette = this.palette;\n    transparency = this.transparency.indexed || [];\n    ret = new Uint8Array((transparency.length || 0) + palette.length);\n    pos = 0;\n    length = palette.length;\n    c = 0;\n    for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {\n      ret[pos++] = palette[i];\n      ret[pos++] = palette[i + 1];\n      ret[pos++] = palette[i + 2];\n      ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;\n    }\n    return ret;\n  };\n\n  PNG.prototype.copyToImageData = function(imageData, pixels) {\n    var alpha, colors, data, i, input, j, k, length, palette, v, _ref;\n    colors = this.colors;\n    palette = null;\n    alpha = this.hasAlphaChannel;\n    if (this.palette.length) {\n      palette =\n        (_ref = this._decodedPalette) != null\n          ? _ref\n          : (this._decodedPalette = this.decodePalette());\n      colors = 4;\n      alpha = true;\n    }\n    data = imageData.data || imageData;\n    length = data.length;\n    input = palette || pixels;\n    i = j = 0;\n    if (colors === 1) {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        v = input[k++];\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    } else {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    }\n  };\n\n  PNG.prototype.decode = function() {\n    var ret;\n    ret = new Uint8Array(this.width * this.height * 4);\n    this.copyToImageData(ret, this.decodePixels());\n    return ret;\n  };\n\n  var hasBrowserCanvas = function() {\n    if (Object.prototype.toString.call(globalObject) === \"[object Window]\") {\n      try {\n        scratchCanvas = globalObject.document.createElement(\"canvas\");\n        scratchCtx = scratchCanvas.getContext(\"2d\");\n      } catch (e) {\n        return false;\n      }\n      return true;\n    }\n    return false;\n  };\n\n  hasBrowserCanvas();\n\n  makeImage = function(imageData) {\n    if (hasBrowserCanvas() === true) {\n      var img;\n      scratchCtx.width = imageData.width;\n      scratchCtx.height = imageData.height;\n      scratchCtx.clearRect(0, 0, imageData.width, imageData.height);\n      scratchCtx.putImageData(imageData, 0, 0);\n      img = new Image();\n      img.src = scratchCanvas.toDataURL();\n      return img;\n    }\n    throw new Error(\"This method requires a Browser with Canvas-capability.\");\n  };\n\n  PNG.prototype.decodeFrames = function(ctx) {\n    var frame, i, imageData, pixels, _i, _len, _ref, _results;\n    if (!this.animation) {\n      return;\n    }\n    _ref = this.animation.frames;\n    _results = [];\n    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {\n      frame = _ref[i];\n      imageData = ctx.createImageData(frame.width, frame.height);\n      pixels = this.decodePixels(new Uint8Array(frame.data));\n      this.copyToImageData(imageData, pixels);\n      frame.imageData = imageData;\n      _results.push((frame.image = makeImage(imageData)));\n    }\n    return _results;\n  };\n\n  PNG.prototype.renderFrame = function(ctx, number) {\n    var frame, frames, prev;\n    frames = this.animation.frames;\n    frame = frames[number];\n    prev = frames[number - 1];\n    if (number === 0) {\n      ctx.clearRect(0, 0, this.width, this.height);\n    }\n    if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND\n    ) {\n      ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);\n    } else if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS\n    ) {\n      ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);\n    }\n    if (frame.blendOp === APNG_BLEND_OP_SOURCE) {\n      ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);\n    }\n    return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);\n  };\n\n  PNG.prototype.animate = function(ctx) {\n    var doFrame,\n      frameNumber,\n      frames,\n      numFrames,\n      numPlays,\n      _ref,\n      _this = this;\n    frameNumber = 0;\n    (_ref = this.animation),\n      (numFrames = _ref.numFrames),\n      (frames = _ref.frames),\n      (numPlays = _ref.numPlays);\n    return (doFrame = function() {\n      var f, frame;\n      f = frameNumber++ % numFrames;\n      frame = frames[f];\n      _this.renderFrame(ctx, f);\n      if (numFrames > 1 && frameNumber / numFrames < numPlays) {\n        return (_this.animation._timeout = setTimeout(doFrame, frame.delay));\n      }\n    })();\n  };\n\n  PNG.prototype.stopAnimation = function() {\n    var _ref;\n    return clearTimeout(\n      (_ref = this.animation) != null ? _ref._timeout : void 0\n    );\n  };\n\n  PNG.prototype.render = function(canvas) {\n    var ctx, data;\n    if (canvas._png) {\n      canvas._png.stopAnimation();\n    }\n    canvas._png = this;\n    canvas.width = this.width;\n    canvas.height = this.height;\n    ctx = canvas.getContext(\"2d\");\n    if (this.animation) {\n      this.decodeFrames(ctx);\n      return this.animate(ctx);\n    } else {\n      data = ctx.createImageData(this.width, this.height);\n      this.copyToImageData(data, this.decodePixels());\n      return ctx.putImageData(data, 0, 0);\n    }\n  };\n\n  return PNG;\n})();\n\nexport { PNG };\n","/**\n * @license\n *\n * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\nimport { PNG } from \"../libs/png.js\";\n\n/**\n * jsPDF PNG PlugIn\n * @name png_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /*\n   * @see http://www.w3.org/TR/PNG-Chunks.html\n   *\n   Color    Allowed      Interpretation\n   Type     Bit Depths\n\n     0       1,2,4,8,16  Each pixel is a grayscale sample.\n\n     2       8,16        Each pixel is an R,G,B triple.\n\n     3       1,2,4,8     Each pixel is a palette index;\n                         a PLTE chunk must appear.\n\n     4       8,16        Each pixel is a grayscale sample,\n                         followed by an alpha sample.\n\n     6       8,16        Each pixel is an R,G,B triple,\n                         followed by an alpha sample.\n  */\n\n  /*\n   * PNG filter method types\n   *\n   * @see http://www.w3.org/TR/PNG-Filters.html\n   * @see http://www.libpng.org/pub/png/book/chapter09.html\n   *\n   * This is what the value 'Predictor' in decode params relates to\n   *\n   * 15 is \"optimal prediction\", which means the prediction algorithm can change from line to line.\n   * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.\n   *\n     0       None\n     1       Sub\n     2       Up\n     3       Average\n     4       Paeth\n   */\n\n  var canCompress = function(value) {\n    return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();\n  };\n\n  var hasCompressionJS = function() {\n    return typeof zlibSync === \"function\";\n  };\n  var compressBytes = function(bytes, lineLength, colorsPerPixel, compression) {\n    var level = 4;\n    var filter_method = filterUp;\n\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        level = 1;\n        filter_method = filterSub;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        level = 6;\n        filter_method = filterAverage;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        level = 9;\n        filter_method = filterPaeth;\n        break;\n    }\n\n    bytes = applyPngFilterMethod(\n      bytes,\n      lineLength,\n      colorsPerPixel,\n      filter_method\n    );\n    var dat = zlibSync(bytes, { level: level });\n    return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);\n  };\n\n  var applyPngFilterMethod = function(\n    bytes,\n    lineLength,\n    colorsPerPixel,\n    filter_method\n  ) {\n    var lines = bytes.length / lineLength,\n      result = new Uint8Array(bytes.length + lines),\n      filter_methods = getFilterMethods(),\n      line,\n      prevLine,\n      offset;\n\n    for (var i = 0; i < lines; i += 1) {\n      offset = i * lineLength;\n      line = bytes.subarray(offset, offset + lineLength);\n\n      if (filter_method) {\n        result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);\n      } else {\n        var len = filter_methods.length,\n          results = [];\n\n        for (var j; j < len; j += 1) {\n          results[j] = filter_methods[j](line, colorsPerPixel, prevLine);\n        }\n\n        var ind = getIndexOfSmallestSum(results.concat());\n\n        result.set(results[ind], offset + i);\n      }\n\n      prevLine = line;\n    }\n\n    return result;\n  };\n\n  var filterNone = function(line) {\n    /*var result = new Uint8Array(line.length + 1);\n    result[0] = 0;\n    result.set(line, 1);*/\n\n    var result = Array.apply([], line);\n    result.unshift(0);\n\n    return result;\n  };\n\n  var filterSub = function(line, colorsPerPixel) {\n    var result = [],\n      len = line.length,\n      left;\n\n    result[0] = 1;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      result[i + 1] = (line[i] - left + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterUp = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      up;\n\n    result[0] = 2;\n\n    for (var i = 0; i < len; i += 1) {\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] - up + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterAverage = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up;\n\n    result[0] = 3;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] + 0x0100 - ((left + up) >>> 1)) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterPaeth = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up,\n      upLeft,\n      paeth;\n\n    result[0] = 4;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      upLeft = (prevLine && prevLine[i - colorsPerPixel]) || 0;\n      paeth = paethPredictor(left, up, upLeft);\n      result[i + 1] = (line[i] - paeth + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var paethPredictor = function(left, up, upLeft) {\n    if (left === up && up === upLeft) {\n      return left;\n    }\n    var pLeft = Math.abs(up - upLeft),\n      pUp = Math.abs(left - upLeft),\n      pUpLeft = Math.abs(left + up - upLeft - upLeft);\n    return pLeft <= pUp && pLeft <= pUpLeft\n      ? left\n      : pUp <= pUpLeft\n      ? up\n      : upLeft;\n  };\n\n  var getFilterMethods = function() {\n    return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];\n  };\n\n  var getIndexOfSmallestSum = function(arrays) {\n    var sum = arrays.map(function(value) {\n      return value.reduce(function(pv, cv) {\n        return pv + Math.abs(cv);\n      }, 0);\n    });\n    return sum.indexOf(Math.min.apply(null, sum));\n  };\n\n  var getPredictorFromCompression = function(compression) {\n    var predictor;\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        predictor = 11;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        predictor = 13;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        predictor = 14;\n        break;\n\n      default:\n        predictor = 12;\n        break;\n    }\n    return predictor;\n  };\n\n  /**\n   * @name processPNG\n   * @function\n   * @ignore\n   */\n  jsPDFAPI.processPNG = function(imageData, index, alias, compression) {\n    \"use strict\";\n\n    var colorSpace,\n      filter = this.decode.FLATE_DECODE,\n      bitsPerComponent,\n      image,\n      decodeParameters = \"\",\n      trns,\n      colors,\n      pal,\n      smask,\n      pixels,\n      len,\n      alphaData,\n      imgData,\n      hasColors,\n      pixel,\n      i,\n      n;\n\n    if (this.__addimage__.isArrayBuffer(imageData))\n      imageData = new Uint8Array(imageData);\n\n    if (this.__addimage__.isArrayBufferView(imageData)) {\n      image = new PNG(imageData);\n      imageData = image.imgData;\n      bitsPerComponent = image.bits;\n      colorSpace = image.colorSpace;\n      colors = image.colors;\n\n      /*\n       * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.\n       *\n       * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.\n       *\n       * Extract alpha to create two separate images, using the alpha as a sMask\n       */\n      if ([4, 6].indexOf(image.colorType) !== -1) {\n        /*\n         * processes 8 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 8) {\n          pixels =\n            image.pixelBitlength == 32\n              ? new Uint32Array(image.decodePixels().buffer)\n              : image.pixelBitlength == 16\n              ? new Uint16Array(image.decodePixels().buffer)\n              : new Uint8Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(len * image.colors);\n          alphaData = new Uint8Array(len);\n          var pDiff = image.pixelBitlength - image.bits;\n          i = 0;\n          n = 0;\n          var pbl;\n\n          for (; i < len; i++) {\n            pixel = pixels[i];\n            pbl = 0;\n\n            while (pbl < pDiff) {\n              imgData[n++] = (pixel >>> pbl) & 0xff;\n              pbl = pbl + image.bits;\n            }\n\n            alphaData[i] = (pixel >>> pbl) & 0xff;\n          }\n        }\n\n        /*\n         * processes 16 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 16) {\n          pixels = new Uint32Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(\n            len * (32 / image.pixelBitlength) * image.colors\n          );\n          alphaData = new Uint8Array(len * (32 / image.pixelBitlength));\n          hasColors = image.colors > 1;\n          i = 0;\n          n = 0;\n          var a = 0;\n\n          while (i < len) {\n            pixel = pixels[i++];\n\n            imgData[n++] = (pixel >>> 0) & 0xff;\n\n            if (hasColors) {\n              imgData[n++] = (pixel >>> 16) & 0xff;\n\n              pixel = pixels[i++];\n              imgData[n++] = (pixel >>> 0) & 0xff;\n            }\n\n            alphaData[a++] = (pixel >>> 16) & 0xff;\n          }\n          bitsPerComponent = 8;\n        }\n\n        if (canCompress(compression)) {\n          imageData = compressBytes(\n            imgData,\n            image.width * image.colors,\n            image.colors,\n            compression\n          );\n          smask = compressBytes(alphaData, image.width, 1, compression);\n        } else {\n          imageData = imgData;\n          smask = alphaData;\n          filter = undefined;\n        }\n      }\n\n      /*\n       * Indexed png. Each pixel is a palette index.\n       */\n      if (image.colorType === 3) {\n        colorSpace = this.color_spaces.INDEXED;\n        pal = image.palette;\n\n        if (image.transparency.indexed) {\n          var trans = image.transparency.indexed;\n          var total = 0;\n          i = 0;\n          len = trans.length;\n\n          for (; i < len; ++i) {\n            total += trans[i];\n          }\n\n          total = total / 255;\n\n          /*\n           * a single color is specified as 100% transparent (0),\n           * so we set trns to use a /Mask with that index\n           */\n          if (total === len - 1 && trans.indexOf(0) !== -1) {\n            trns = [trans.indexOf(0)];\n\n            /*\n             * there's more than one colour within the palette that specifies\n             * a transparency value less than 255, so we unroll the pixels to create an image sMask\n             */\n          } else if (total !== len) {\n            pixels = image.decodePixels();\n            alphaData = new Uint8Array(pixels.length);\n            i = 0;\n            len = pixels.length;\n\n            for (; i < len; i++) {\n              alphaData[i] = trans[pixels[i]];\n            }\n\n            smask = compressBytes(alphaData, image.width, 1);\n          }\n        }\n      }\n\n      var predictor = getPredictorFromCompression(compression);\n\n      if (filter === this.decode.FLATE_DECODE) {\n        decodeParameters = \"/Predictor \" + predictor + \" \";\n      }\n      decodeParameters +=\n        \"/Colors \" +\n        colors +\n        \" /BitsPerComponent \" +\n        bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n\n      if (\n        this.__addimage__.isArrayBuffer(imageData) ||\n        this.__addimage__.isArrayBufferView(imageData)\n      ) {\n        imageData = this.__addimage__.arrayBufferToBinaryString(imageData);\n      }\n\n      if (\n        (smask && this.__addimage__.isArrayBuffer(smask)) ||\n        this.__addimage__.isArrayBufferView(smask)\n      ) {\n        smask = this.__addimage__.arrayBufferToBinaryString(smask);\n      }\n\n      return {\n        alias: alias,\n        data: imageData,\n        index: index,\n        filter: filter,\n        decodeParameters: decodeParameters,\n        transparency: trns,\n        palette: pal,\n        sMask: smask,\n        predictor: predictor,\n        width: image.width,\n        height: image.height,\n        bitsPerComponent: bitsPerComponent,\n        colorSpace: colorSpace\n      };\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * (c) Dean McNamee <dean@gmail.com>, 2013.\n *\n * https://github.com/deanm/omggif\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,\n * including animation and compression.  It does not rely on any specific\n * underlying system, so should run in the browser, Node, or Plask.\n */\n\n\"use strict\";\n\nimport { console } from \"./console.js\";\n\nfunction GifWriter(buf, width, height, gopts) {\n  var p = 0;\n\n  var gopts = gopts === undefined ? {} : gopts;\n  var loop_count = gopts.loop === undefined ? null : gopts.loop;\n  var global_palette = gopts.palette === undefined ? null : gopts.palette;\n\n  if (width <= 0 || height <= 0 || width > 65535 || height > 65535)\n    throw new Error(\"Width/Height invalid.\");\n\n  function check_palette_and_num_colors(palette) {\n    var num_colors = palette.length;\n    if (num_colors < 2 || num_colors > 256 || num_colors & (num_colors - 1)) {\n      throw new Error(\n        \"Invalid code/color length, must be power of 2 and 2 .. 256.\"\n      );\n    }\n    return num_colors;\n  }\n\n  // - Header.\n  buf[p++] = 0x47;\n  buf[p++] = 0x49;\n  buf[p++] = 0x46; // GIF\n  buf[p++] = 0x38;\n  buf[p++] = 0x39;\n  buf[p++] = 0x61; // 89a\n\n  // Handling of Global Color Table (palette) and background index.\n  var gp_num_colors_pow2 = 0;\n  var background = 0;\n  if (global_palette !== null) {\n    var gp_num_colors = check_palette_and_num_colors(global_palette);\n    while ((gp_num_colors >>= 1)) ++gp_num_colors_pow2;\n    gp_num_colors = 1 << gp_num_colors_pow2;\n    --gp_num_colors_pow2;\n    if (gopts.background !== undefined) {\n      background = gopts.background;\n      if (background >= gp_num_colors)\n        throw new Error(\"Background index out of range.\");\n      // The GIF spec states that a background index of 0 should be ignored, so\n      // this is probably a mistake and you really want to set it to another\n      // slot in the palette.  But actually in the end most browsers, etc end\n      // up ignoring this almost completely (including for dispose background).\n      if (background === 0)\n        throw new Error(\"Background index explicitly passed as 0.\");\n    }\n  }\n\n  // - Logical Screen Descriptor.\n  // NOTE(deanm): w/h apparently ignored by implementations, but set anyway.\n  buf[p++] = width & 0xff;\n  buf[p++] = (width >> 8) & 0xff;\n  buf[p++] = height & 0xff;\n  buf[p++] = (height >> 8) & 0xff;\n  // NOTE: Indicates 0-bpp original color resolution (unused?).\n  buf[p++] = (global_palette !== null ? 0x80 : 0) | gp_num_colors_pow2; // Global Color Table Flag. // NOTE: No sort flag (unused?).\n  buf[p++] = background; // Background Color Index.\n  buf[p++] = 0; // Pixel aspect ratio (unused?).\n\n  // - Global Color Table\n  if (global_palette !== null) {\n    for (var i = 0, il = global_palette.length; i < il; ++i) {\n      var rgb = global_palette[i];\n      buf[p++] = (rgb >> 16) & 0xff;\n      buf[p++] = (rgb >> 8) & 0xff;\n      buf[p++] = rgb & 0xff;\n    }\n  }\n\n  if (loop_count !== null) {\n    // Netscape block for looping.\n    if (loop_count < 0 || loop_count > 65535)\n      throw new Error(\"Loop count invalid.\");\n    // Extension code, label, and length.\n    buf[p++] = 0x21;\n    buf[p++] = 0xff;\n    buf[p++] = 0x0b;\n    // NETSCAPE2.0\n    buf[p++] = 0x4e;\n    buf[p++] = 0x45;\n    buf[p++] = 0x54;\n    buf[p++] = 0x53;\n    buf[p++] = 0x43;\n    buf[p++] = 0x41;\n    buf[p++] = 0x50;\n    buf[p++] = 0x45;\n    buf[p++] = 0x32;\n    buf[p++] = 0x2e;\n    buf[p++] = 0x30;\n    // Sub-block\n    buf[p++] = 0x03;\n    buf[p++] = 0x01;\n    buf[p++] = loop_count & 0xff;\n    buf[p++] = (loop_count >> 8) & 0xff;\n    buf[p++] = 0x00; // Terminator.\n  }\n\n  var ended = false;\n\n  this.addFrame = function(x, y, w, h, indexed_pixels, opts) {\n    if (ended === true) {\n      --p;\n      ended = false;\n    } // Un-end.\n\n    opts = opts === undefined ? {} : opts;\n\n    // TODO(deanm): Bounds check x, y.  Do they need to be within the virtual\n    // canvas width/height, I imagine?\n    if (x < 0 || y < 0 || x > 65535 || y > 65535)\n      throw new Error(\"x/y invalid.\");\n\n    if (w <= 0 || h <= 0 || w > 65535 || h > 65535)\n      throw new Error(\"Width/Height invalid.\");\n\n    if (indexed_pixels.length < w * h)\n      throw new Error(\"Not enough pixels for the frame size.\");\n\n    var using_local_palette = true;\n    var palette = opts.palette;\n    if (palette === undefined || palette === null) {\n      using_local_palette = false;\n      palette = global_palette;\n    }\n\n    if (palette === undefined || palette === null)\n      throw new Error(\"Must supply either a local or global palette.\");\n\n    var num_colors = check_palette_and_num_colors(palette);\n\n    // Compute the min_code_size (power of 2), destroying num_colors.\n    var min_code_size = 0;\n    while ((num_colors >>= 1)) ++min_code_size;\n    num_colors = 1 << min_code_size; // Now we can easily get it back.\n\n    var delay = opts.delay === undefined ? 0 : opts.delay;\n\n    // From the spec:\n    //     0 -   No disposal specified. The decoder is\n    //           not required to take any action.\n    //     1 -   Do not dispose. The graphic is to be left\n    //           in place.\n    //     2 -   Restore to background color. The area used by the\n    //           graphic must be restored to the background color.\n    //     3 -   Restore to previous. The decoder is required to\n    //           restore the area overwritten by the graphic with\n    //           what was there prior to rendering the graphic.\n    //  4-7 -    To be defined.\n    // NOTE(deanm): Dispose background doesn't really work, apparently most\n    // browsers ignore the background palette index and clear to transparency.\n    var disposal = opts.disposal === undefined ? 0 : opts.disposal;\n    if (disposal < 0 || disposal > 3)\n      // 4-7 is reserved.\n      throw new Error(\"Disposal out of range.\");\n\n    var use_transparency = false;\n    var transparent_index = 0;\n    if (opts.transparent !== undefined && opts.transparent !== null) {\n      use_transparency = true;\n      transparent_index = opts.transparent;\n      if (transparent_index < 0 || transparent_index >= num_colors)\n        throw new Error(\"Transparent color index.\");\n    }\n\n    if (disposal !== 0 || use_transparency || delay !== 0) {\n      // - Graphics Control Extension\n      buf[p++] = 0x21;\n      buf[p++] = 0xf9; // Extension / Label.\n      buf[p++] = 4; // Byte size.\n\n      buf[p++] = (disposal << 2) | (use_transparency === true ? 1 : 0);\n      buf[p++] = delay & 0xff;\n      buf[p++] = (delay >> 8) & 0xff;\n      buf[p++] = transparent_index; // Transparent color index.\n      buf[p++] = 0; // Block Terminator.\n    }\n\n    // - Image Descriptor\n    buf[p++] = 0x2c; // Image Seperator.\n    buf[p++] = x & 0xff;\n    buf[p++] = (x >> 8) & 0xff; // Left.\n    buf[p++] = y & 0xff;\n    buf[p++] = (y >> 8) & 0xff; // Top.\n    buf[p++] = w & 0xff;\n    buf[p++] = (w >> 8) & 0xff;\n    buf[p++] = h & 0xff;\n    buf[p++] = (h >> 8) & 0xff;\n    // NOTE: No sort flag (unused?).\n    // TODO(deanm): Support interlace.\n    buf[p++] = using_local_palette === true ? 0x80 | (min_code_size - 1) : 0;\n\n    // - Local Color Table\n    if (using_local_palette === true) {\n      for (var i = 0, il = palette.length; i < il; ++i) {\n        var rgb = palette[i];\n        buf[p++] = (rgb >> 16) & 0xff;\n        buf[p++] = (rgb >> 8) & 0xff;\n        buf[p++] = rgb & 0xff;\n      }\n    }\n\n    p = GifWriterOutputLZWCodeStream(\n      buf,\n      p,\n      min_code_size < 2 ? 2 : min_code_size,\n      indexed_pixels\n    );\n\n    return p;\n  };\n\n  this.end = function() {\n    if (ended === false) {\n      buf[p++] = 0x3b; // Trailer.\n      ended = true;\n    }\n    return p;\n  };\n\n  this.getOutputBuffer = function() {\n    return buf;\n  };\n  this.setOutputBuffer = function(v) {\n    buf = v;\n  };\n  this.getOutputBufferPosition = function() {\n    return p;\n  };\n  this.setOutputBufferPosition = function(v) {\n    p = v;\n  };\n}\n\n// Main compression routine, palette indexes -> LZW code stream.\n// |index_stream| must have at least one entry.\nfunction GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) {\n  buf[p++] = min_code_size;\n  var cur_subblock = p++; // Pointing at the length field.\n\n  var clear_code = 1 << min_code_size;\n  var code_mask = clear_code - 1;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  var cur_shift = 0;\n  // We have at most 12-bit codes, so we should have to hold a max of 19\n  // bits here (and then we would write out).\n  var cur = 0;\n\n  function emit_bytes_to_buffer(bit_block_size) {\n    while (cur_shift >= bit_block_size) {\n      buf[p++] = cur & 0xff;\n      cur >>= 8;\n      cur_shift -= 8;\n      if (p === cur_subblock + 256) {\n        // Finished a subblock.\n        buf[cur_subblock] = 255;\n        cur_subblock = p++;\n      }\n    }\n  }\n\n  function emit_code(c) {\n    cur |= c << cur_shift;\n    cur_shift += cur_code_size;\n    emit_bytes_to_buffer(8);\n  }\n\n  // I am not an expert on the topic, and I don't want to write a thesis.\n  // However, it is good to outline here the basic algorithm and the few data\n  // structures and optimizations here that make this implementation fast.\n  // The basic idea behind LZW is to build a table of previously seen runs\n  // addressed by a short id (herein called output code).  All data is\n  // referenced by a code, which represents one or more values from the\n  // original input stream.  All input bytes can be referenced as the same\n  // value as an output code.  So if you didn't want any compression, you\n  // could more or less just output the original bytes as codes (there are\n  // some details to this, but it is the idea).  In order to achieve\n  // compression, values greater then the input range (codes can be up to\n  // 12-bit while input only 8-bit) represent a sequence of previously seen\n  // inputs.  The decompressor is able to build the same mapping while\n  // decoding, so there is always a shared common knowledge between the\n  // encoding and decoder, which is also important for \"timing\" aspects like\n  // how to handle variable bit width code encoding.\n  //\n  // One obvious but very important consequence of the table system is there\n  // is always a unique id (at most 12-bits) to map the runs.  'A' might be\n  // 4, then 'AA' might be 10, 'AAA' 11, 'AAAA' 12, etc.  This relationship\n  // can be used for an effecient lookup strategy for the code mapping.  We\n  // need to know if a run has been seen before, and be able to map that run\n  // to the output code.  Since we start with known unique ids (input bytes),\n  // and then from those build more unique ids (table entries), we can\n  // continue this chain (almost like a linked list) to always have small\n  // integer values that represent the current byte chains in the encoder.\n  // This means instead of tracking the input bytes (AAAABCD) to know our\n  // current state, we can track the table entry for AAAABC (it is guaranteed\n  // to exist by the nature of the algorithm) and the next character D.\n  // Therefor the tuple of (table_entry, byte) is guaranteed to also be\n  // unique.  This allows us to create a simple lookup key for mapping input\n  // sequences to codes (table indices) without having to store or search\n  // any of the code sequences.  So if 'AAAA' has a table entry of 12, the\n  // tuple of ('AAAA', K) for any input byte K will be unique, and can be our\n  // key.  This leads to a integer value at most 20-bits, which can always\n  // fit in an SMI value and be used as a fast sparse array / object key.\n\n  // Output code for the current contents of the index buffer.\n  var ib_code = index_stream[0] & code_mask; // Load first input index.\n  var code_table = {}; // Key'd on our 20-bit \"tuple\".\n\n  emit_code(clear_code); // Spec says first code should be a clear code.\n\n  // First index already loaded, process the rest of the stream.\n  for (var i = 1, il = index_stream.length; i < il; ++i) {\n    var k = index_stream[i] & code_mask;\n    var cur_key = (ib_code << 8) | k; // (prev, k) unique tuple.\n    var cur_code = code_table[cur_key]; // buffer + k.\n\n    // Check if we have to create a new code table entry.\n    if (cur_code === undefined) {\n      // We don't have buffer + k.\n      // Emit index buffer (without k).\n      // This is an inline version of emit_code, because this is the core\n      // writing routine of the compressor (and V8 cannot inline emit_code\n      // because it is a closure here in a different context).  Additionally\n      // we can call emit_byte_to_buffer less often, because we can have\n      // 30-bits (from our 31-bit signed SMI), and we know our codes will only\n      // be 12-bits, so can safely have 18-bits there without overflow.\n      // emit_code(ib_code);\n      cur |= ib_code << cur_shift;\n      cur_shift += cur_code_size;\n      while (cur_shift >= 8) {\n        buf[p++] = cur & 0xff;\n        cur >>= 8;\n        cur_shift -= 8;\n        if (p === cur_subblock + 256) {\n          // Finished a subblock.\n          buf[cur_subblock] = 255;\n          cur_subblock = p++;\n        }\n      }\n\n      if (next_code === 4096) {\n        // Table full, need a clear.\n        emit_code(clear_code);\n        next_code = eoi_code + 1;\n        cur_code_size = min_code_size + 1;\n        code_table = {};\n      } else {\n        // Table not full, insert a new entry.\n        // Increase our variable bit code sizes if necessary.  This is a bit\n        // tricky as it is based on \"timing\" between the encoding and\n        // decoder.  From the encoders perspective this should happen after\n        // we've already emitted the index buffer and are about to create the\n        // first table entry that would overflow our current code bit size.\n        if (next_code >= 1 << cur_code_size) ++cur_code_size;\n        code_table[cur_key] = next_code++; // Insert into code table.\n      }\n\n      ib_code = k; // Index buffer to single input k.\n    } else {\n      ib_code = cur_code; // Index buffer to sequence in code table.\n    }\n  }\n\n  emit_code(ib_code); // There will still be something in the index buffer.\n  emit_code(eoi_code); // End Of Information.\n\n  // Flush / finalize the sub-blocks stream to the buffer.\n  emit_bytes_to_buffer(1);\n\n  // Finish the sub-blocks, writing out any unfinished lengths and\n  // terminating with a sub-block of length 0.  If we have already started\n  // but not yet used a sub-block it can just become the terminator.\n  if (cur_subblock + 1 === p) {\n    // Started but unused.\n    buf[cur_subblock] = 0;\n  } else {\n    // Started and used, write length and additional terminator block.\n    buf[cur_subblock] = p - cur_subblock - 1;\n    buf[p++] = 0;\n  }\n  return p;\n}\n\nfunction GifReader(buf) {\n  var p = 0;\n\n  // - Header (GIF87a or GIF89a).\n  if (\n    buf[p++] !== 0x47 ||\n    buf[p++] !== 0x49 ||\n    buf[p++] !== 0x46 ||\n    buf[p++] !== 0x38 ||\n    ((buf[p++] + 1) & 0xfd) !== 0x38 ||\n    buf[p++] !== 0x61\n  ) {\n    throw new Error(\"Invalid GIF 87a/89a header.\");\n  }\n\n  // - Logical Screen Descriptor.\n  var width = buf[p++] | (buf[p++] << 8);\n  var height = buf[p++] | (buf[p++] << 8);\n  var pf0 = buf[p++]; // <Packed Fields>.\n  var global_palette_flag = pf0 >> 7;\n  var num_global_colors_pow2 = pf0 & 0x7;\n  var num_global_colors = 1 << (num_global_colors_pow2 + 1);\n  var background = buf[p++];\n  buf[p++]; // Pixel aspect ratio (unused?).\n\n  var global_palette_offset = null;\n  var global_palette_size = null;\n\n  if (global_palette_flag) {\n    global_palette_offset = p;\n    global_palette_size = num_global_colors;\n    p += num_global_colors * 3; // Seek past palette.\n  }\n\n  var no_eof = true;\n\n  var frames = [];\n\n  var delay = 0;\n  var transparent_index = null;\n  var disposal = 0; // 0 - No disposal specified.\n  var loop_count = null;\n\n  this.width = width;\n  this.height = height;\n\n  while (no_eof && p < buf.length) {\n    switch (buf[p++]) {\n      case 0x21: // Graphics Control Extension Block\n        switch (buf[p++]) {\n          case 0xff: // Application specific block\n            // Try if it's a Netscape block (with animation loop counter).\n            if (\n              buf[p] !== 0x0b || // 21 FF already read, check block size.\n              // NETSCAPE2.0\n              (buf[p + 1] == 0x4e &&\n                buf[p + 2] == 0x45 &&\n                buf[p + 3] == 0x54 &&\n                buf[p + 4] == 0x53 &&\n                buf[p + 5] == 0x43 &&\n                buf[p + 6] == 0x41 &&\n                buf[p + 7] == 0x50 &&\n                buf[p + 8] == 0x45 &&\n                buf[p + 9] == 0x32 &&\n                buf[p + 10] == 0x2e &&\n                buf[p + 11] == 0x30 &&\n                // Sub-block\n                buf[p + 12] == 0x03 &&\n                buf[p + 13] == 0x01 &&\n                buf[p + 16] == 0)\n            ) {\n              p += 14;\n              loop_count = buf[p++] | (buf[p++] << 8);\n              p++; // Skip terminator.\n            } else {\n              // We don't know what it is, just try to get past it.\n              p += 12;\n              while (true) {\n                // Seek through subblocks.\n                var block_size = buf[p++];\n                // Bad block size (ex: undefined from an out of bounds read).\n                if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n                if (block_size === 0) break; // 0 size is terminator\n                p += block_size;\n              }\n            }\n            break;\n\n          case 0xf9: // Graphics Control Extension\n            if (buf[p++] !== 0x4 || buf[p + 4] !== 0)\n              throw new Error(\"Invalid graphics extension block.\");\n            var pf1 = buf[p++];\n            delay = buf[p++] | (buf[p++] << 8);\n            transparent_index = buf[p++];\n            if ((pf1 & 1) === 0) transparent_index = null;\n            disposal = (pf1 >> 2) & 0x7;\n            p++; // Skip terminator.\n            break;\n\n          case 0xfe: // Comment Extension.\n            while (true) {\n              // Seek through subblocks.\n              var block_size = buf[p++];\n              // Bad block size (ex: undefined from an out of bounds read).\n              if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n              if (block_size === 0) break; // 0 size is terminator\n              // console.log(buf.slice(p, p+block_size).toString('ascii'));\n              p += block_size;\n            }\n            break;\n\n          default:\n            throw new Error(\n              \"Unknown graphic control label: 0x\" + buf[p - 1].toString(16)\n            );\n        }\n        break;\n\n      case 0x2c: // Image Descriptor.\n        var x = buf[p++] | (buf[p++] << 8);\n        var y = buf[p++] | (buf[p++] << 8);\n        var w = buf[p++] | (buf[p++] << 8);\n        var h = buf[p++] | (buf[p++] << 8);\n        var pf2 = buf[p++];\n        var local_palette_flag = pf2 >> 7;\n        var interlace_flag = (pf2 >> 6) & 1;\n        var num_local_colors_pow2 = pf2 & 0x7;\n        var num_local_colors = 1 << (num_local_colors_pow2 + 1);\n        var palette_offset = global_palette_offset;\n        var palette_size = global_palette_size;\n        var has_local_palette = false;\n        if (local_palette_flag) {\n          var has_local_palette = true;\n          palette_offset = p; // Override with local palette.\n          palette_size = num_local_colors;\n          p += num_local_colors * 3; // Seek past palette.\n        }\n\n        var data_offset = p;\n\n        p++; // codesize\n        while (true) {\n          var block_size = buf[p++];\n          // Bad block size (ex: undefined from an out of bounds read).\n          if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n          if (block_size === 0) break; // 0 size is terminator\n          p += block_size;\n        }\n\n        frames.push({\n          x: x,\n          y: y,\n          width: w,\n          height: h,\n          has_local_palette: has_local_palette,\n          palette_offset: palette_offset,\n          palette_size: palette_size,\n          data_offset: data_offset,\n          data_length: p - data_offset,\n          transparent_index: transparent_index,\n          interlaced: !!interlace_flag,\n          delay: delay,\n          disposal: disposal\n        });\n        break;\n\n      case 0x3b: // Trailer Marker (end of file).\n        no_eof = false;\n        break;\n\n      default:\n        throw new Error(\"Unknown gif block: 0x\" + buf[p - 1].toString(16));\n        break;\n    }\n  }\n\n  this.numFrames = function() {\n    return frames.length;\n  };\n\n  this.loopCount = function() {\n    return loop_count;\n  };\n\n  this.frameInfo = function(frame_num) {\n    if (frame_num < 0 || frame_num >= frames.length)\n      throw new Error(\"Frame index out of range.\");\n    return frames[frame_num];\n  };\n\n  this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = b;\n        pixels[op++] = g;\n        pixels[op++] = r;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n\n  // I will go to copy and paste hell one day...\n  this.decodeAndBlitFrameRGBA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = r;\n        pixels[op++] = g;\n        pixels[op++] = b;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n}\n\nfunction GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {\n  var min_code_size = code_stream[p++];\n\n  var clear_code = 1 << min_code_size;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  // NOTE: This shares the same name as the encoder, but has a different\n  // meaning here.  Here this masks each code coming from the code stream.\n  var code_mask = (1 << cur_code_size) - 1;\n  var cur_shift = 0;\n  var cur = 0;\n\n  var op = 0; // Output pointer.\n\n  var subblock_size = code_stream[p++];\n\n  // TODO(deanm): Would using a TypedArray be any faster?  At least it would\n  // solve the fast mode / backing store uncertainty.\n  // var code_table = Array(4096);\n  var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.\n\n  var prev_code = null; // Track code-1.\n\n  while (true) {\n    // Read up to two bytes, making sure we always 12-bits for max sized code.\n    while (cur_shift < 16) {\n      if (subblock_size === 0) break; // No more data to be read.\n\n      cur |= code_stream[p++] << cur_shift;\n      cur_shift += 8;\n\n      if (subblock_size === 1) {\n        // Never let it get to 0 to hold logic above.\n        subblock_size = code_stream[p++]; // Next subblock.\n      } else {\n        --subblock_size;\n      }\n    }\n\n    // TODO(deanm): We should never really get here, we should have received\n    // and EOI.\n    if (cur_shift < cur_code_size) break;\n\n    var code = cur & code_mask;\n    cur >>= cur_code_size;\n    cur_shift -= cur_code_size;\n\n    // TODO(deanm): Maybe should check that the first code was a clear code,\n    // at least this is what you're supposed to do.  But actually our encoder\n    // now doesn't emit a clear code first anyway.\n    if (code === clear_code) {\n      // We don't actually have to clear the table.  This could be a good idea\n      // for greater error checking, but we don't really do any anyway.  We\n      // will just track it with next_code and overwrite old entries.\n\n      next_code = eoi_code + 1;\n      cur_code_size = min_code_size + 1;\n      code_mask = (1 << cur_code_size) - 1;\n\n      // Don't update prev_code ?\n      prev_code = null;\n      continue;\n    } else if (code === eoi_code) {\n      break;\n    }\n\n    // We have a similar situation as the decoder, where we want to store\n    // variable length entries (code table entries), but we want to do in a\n    // faster manner than an array of arrays.  The code below stores sort of a\n    // linked list within the code table, and then \"chases\" through it to\n    // construct the dictionary entries.  When a new entry is created, just the\n    // last byte is stored, and the rest (prefix) of the entry is only\n    // referenced by its table entry.  Then the code chases through the\n    // prefixes until it reaches a single byte code.  We have to chase twice,\n    // first to compute the length, and then to actually copy the data to the\n    // output (backwards, since we know the length).  The alternative would be\n    // storing something in an intermediate stack, but that doesn't make any\n    // more sense.  I implemented an approach where it also stored the length\n    // in the code table, although it's a bit tricky because you run out of\n    // bits (12 + 12 + 8), but I didn't measure much improvements (the table\n    // entries are generally not the long).  Even when I created benchmarks for\n    // very long table entries the complexity did not seem worth it.\n    // The code table stores the prefix entry in 12 bits and then the suffix\n    // byte in 8 bits, so each entry is 20 bits.\n\n    var chase_code = code < next_code ? code : prev_code;\n\n    // Chase what we will output, either {CODE} or {CODE-1}.\n    var chase_length = 0;\n    var chase = chase_code;\n    while (chase > clear_code) {\n      chase = code_table[chase] >> 8;\n      ++chase_length;\n    }\n\n    var k = chase;\n\n    var op_end = op + chase_length + (chase_code !== code ? 1 : 0);\n    if (op_end > output_length) {\n      console.log(\"Warning, gif stream longer than expected.\");\n      return;\n    }\n\n    // Already have the first byte from the chase, might as well write it fast.\n    output[op++] = k;\n\n    op += chase_length;\n    var b = op; // Track pointer, writing backwards.\n\n    if (chase_code !== code)\n      // The case of emitting {CODE-1} + k.\n      output[op++] = k;\n\n    chase = chase_code;\n    while (chase_length--) {\n      chase = code_table[chase];\n      output[--b] = chase & 0xff; // Write backwards.\n      chase >>= 8; // Pull down to the prefix code.\n    }\n\n    if (prev_code !== null && next_code < 4096) {\n      code_table[next_code++] = (prev_code << 8) | k;\n      // TODO(deanm): Figure out this clearing vs code growth logic better.  I\n      // have an feeling that it should just happen somewhere else, for now it\n      // is awkward between when we grow past the max and then hit a clear code.\n      // For now just check if we hit the max 12-bits (then a clear code should\n      // follow, also of course encoded in 12-bits).\n      if (next_code >= code_mask + 1 && cur_code_size < 12) {\n        ++cur_code_size;\n        code_mask = (code_mask << 1) | 1;\n      }\n    }\n\n    prev_code = code;\n  }\n\n  if (op !== output_length) {\n    console.log(\"Warning, gif stream shorter than expected.\");\n  }\n\n  return output;\n}\n\nexport { GifReader, GifWriter };\n","/**\n * @license\n  Copyright (c) 2008, Adobe Systems Incorporated\n  All rights reserved.\n\n  Redistribution and use in source and binary forms, with or without \n  modification, are permitted provided that the following conditions are\n  met:\n\n  * Redistributions of source code must retain the above copyright notice, \n    this list of conditions and the following disclaimer.\n  \n  * Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the \n    documentation and/or other materials provided with the distribution.\n  \n  * Neither the name of Adobe Systems Incorporated nor the names of its \n    contributors may be used to endorse or promote products derived from \n    this software without specific prior written permission.\n\n  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n  IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \n  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*\nJPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n\nBasic GUI blocking jpeg encoder\n*/\n\nfunction JPEGEncoder(quality) {\n  var ffloor = Math.floor;\n  var YTable = new Array(64);\n  var UVTable = new Array(64);\n  var fdtbl_Y = new Array(64);\n  var fdtbl_UV = new Array(64);\n  var YDC_HT;\n  var UVDC_HT;\n  var YAC_HT;\n  var UVAC_HT;\n\n  var bitcode = new Array(65535);\n  var category = new Array(65535);\n  var outputfDCTQuant = new Array(64);\n  var DU = new Array(64);\n  var byteout = [];\n  var bytenew = 0;\n  var bytepos = 7;\n\n  var YDU = new Array(64);\n  var UDU = new Array(64);\n  var VDU = new Array(64);\n  var clt = new Array(256);\n  var RGB_YUV_TABLE = new Array(2048);\n  var currentQuality;\n\n  var ZigZag = [\n    0,\n    1,\n    5,\n    6,\n    14,\n    15,\n    27,\n    28,\n    2,\n    4,\n    7,\n    13,\n    16,\n    26,\n    29,\n    42,\n    3,\n    8,\n    12,\n    17,\n    25,\n    30,\n    41,\n    43,\n    9,\n    11,\n    18,\n    24,\n    31,\n    40,\n    44,\n    53,\n    10,\n    19,\n    23,\n    32,\n    39,\n    45,\n    52,\n    54,\n    20,\n    22,\n    33,\n    38,\n    46,\n    51,\n    55,\n    60,\n    21,\n    34,\n    37,\n    47,\n    50,\n    56,\n    59,\n    61,\n    35,\n    36,\n    48,\n    49,\n    57,\n    58,\n    62,\n    63\n  ];\n\n  var std_dc_luminance_nrcodes = [\n    0,\n    0,\n    1,\n    5,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_luminance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    3,\n    3,\n    2,\n    4,\n    3,\n    5,\n    5,\n    4,\n    4,\n    0,\n    0,\n    1,\n    0x7d\n  ];\n  var std_ac_luminance_values = [\n    0x01,\n    0x02,\n    0x03,\n    0x00,\n    0x04,\n    0x11,\n    0x05,\n    0x12,\n    0x21,\n    0x31,\n    0x41,\n    0x06,\n    0x13,\n    0x51,\n    0x61,\n    0x07,\n    0x22,\n    0x71,\n    0x14,\n    0x32,\n    0x81,\n    0x91,\n    0xa1,\n    0x08,\n    0x23,\n    0x42,\n    0xb1,\n    0xc1,\n    0x15,\n    0x52,\n    0xd1,\n    0xf0,\n    0x24,\n    0x33,\n    0x62,\n    0x72,\n    0x82,\n    0x09,\n    0x0a,\n    0x16,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x25,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x34,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe1,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf1,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  var std_dc_chrominance_nrcodes = [\n    0,\n    0,\n    3,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_chrominance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    2,\n    4,\n    4,\n    3,\n    4,\n    7,\n    5,\n    4,\n    4,\n    0,\n    1,\n    2,\n    0x77\n  ];\n  var std_ac_chrominance_values = [\n    0x00,\n    0x01,\n    0x02,\n    0x03,\n    0x11,\n    0x04,\n    0x05,\n    0x21,\n    0x31,\n    0x06,\n    0x12,\n    0x41,\n    0x51,\n    0x07,\n    0x61,\n    0x71,\n    0x13,\n    0x22,\n    0x32,\n    0x81,\n    0x08,\n    0x14,\n    0x42,\n    0x91,\n    0xa1,\n    0xb1,\n    0xc1,\n    0x09,\n    0x23,\n    0x33,\n    0x52,\n    0xf0,\n    0x15,\n    0x62,\n    0x72,\n    0xd1,\n    0x0a,\n    0x16,\n    0x24,\n    0x34,\n    0xe1,\n    0x25,\n    0xf1,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x82,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  function initQuantTables(sf) {\n    var YQT = [\n      16,\n      11,\n      10,\n      16,\n      24,\n      40,\n      51,\n      61,\n      12,\n      12,\n      14,\n      19,\n      26,\n      58,\n      60,\n      55,\n      14,\n      13,\n      16,\n      24,\n      40,\n      57,\n      69,\n      56,\n      14,\n      17,\n      22,\n      29,\n      51,\n      87,\n      80,\n      62,\n      18,\n      22,\n      37,\n      56,\n      68,\n      109,\n      103,\n      77,\n      24,\n      35,\n      55,\n      64,\n      81,\n      104,\n      113,\n      92,\n      49,\n      64,\n      78,\n      87,\n      103,\n      121,\n      120,\n      101,\n      72,\n      92,\n      95,\n      98,\n      112,\n      100,\n      103,\n      99\n    ];\n\n    for (var i = 0; i < 64; i++) {\n      var t = ffloor((YQT[i] * sf + 50) / 100);\n      t = Math.min(Math.max(t, 1), 255);\n      YTable[ZigZag[i]] = t;\n    }\n    var UVQT = [\n      17,\n      18,\n      24,\n      47,\n      99,\n      99,\n      99,\n      99,\n      18,\n      21,\n      26,\n      66,\n      99,\n      99,\n      99,\n      99,\n      24,\n      26,\n      56,\n      99,\n      99,\n      99,\n      99,\n      99,\n      47,\n      66,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99\n    ];\n    for (var j = 0; j < 64; j++) {\n      var u = ffloor((UVQT[j] * sf + 50) / 100);\n      u = Math.min(Math.max(u, 1), 255);\n      UVTable[ZigZag[j]] = u;\n    }\n    var aasf = [\n      1.0,\n      1.387039845,\n      1.306562965,\n      1.175875602,\n      1.0,\n      0.785694958,\n      0.5411961,\n      0.275899379\n    ];\n    var k = 0;\n    for (var row = 0; row < 8; row++) {\n      for (var col = 0; col < 8; col++) {\n        fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        k++;\n      }\n    }\n  }\n\n  function computeHuffmanTbl(nrcodes, std_table) {\n    var codevalue = 0;\n    var pos_in_table = 0;\n    var HT = new Array();\n    for (var k = 1; k <= 16; k++) {\n      for (var j = 1; j <= nrcodes[k]; j++) {\n        HT[std_table[pos_in_table]] = [];\n        HT[std_table[pos_in_table]][0] = codevalue;\n        HT[std_table[pos_in_table]][1] = k;\n        pos_in_table++;\n        codevalue++;\n      }\n      codevalue *= 2;\n    }\n    return HT;\n  }\n\n  function initHuffmanTbl() {\n    YDC_HT = computeHuffmanTbl(\n      std_dc_luminance_nrcodes,\n      std_dc_luminance_values\n    );\n    UVDC_HT = computeHuffmanTbl(\n      std_dc_chrominance_nrcodes,\n      std_dc_chrominance_values\n    );\n    YAC_HT = computeHuffmanTbl(\n      std_ac_luminance_nrcodes,\n      std_ac_luminance_values\n    );\n    UVAC_HT = computeHuffmanTbl(\n      std_ac_chrominance_nrcodes,\n      std_ac_chrominance_values\n    );\n  }\n\n  function initCategoryNumber() {\n    var nrlower = 1;\n    var nrupper = 2;\n    for (var cat = 1; cat <= 15; cat++) {\n      //Positive numbers\n      for (var nr = nrlower; nr < nrupper; nr++) {\n        category[32767 + nr] = cat;\n        bitcode[32767 + nr] = [];\n        bitcode[32767 + nr][1] = cat;\n        bitcode[32767 + nr][0] = nr;\n      }\n      //Negative numbers\n      for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {\n        category[32767 + nrneg] = cat;\n        bitcode[32767 + nrneg] = [];\n        bitcode[32767 + nrneg][1] = cat;\n        bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;\n      }\n      nrlower <<= 1;\n      nrupper <<= 1;\n    }\n  }\n\n  function initRGBYUVTable() {\n    for (var i = 0; i < 256; i++) {\n      RGB_YUV_TABLE[i] = 19595 * i;\n      RGB_YUV_TABLE[(i + 256) >> 0] = 38470 * i;\n      RGB_YUV_TABLE[(i + 512) >> 0] = 7471 * i + 0x8000;\n      RGB_YUV_TABLE[(i + 768) >> 0] = -11059 * i;\n      RGB_YUV_TABLE[(i + 1024) >> 0] = -21709 * i;\n      RGB_YUV_TABLE[(i + 1280) >> 0] = 32768 * i + 0x807fff;\n      RGB_YUV_TABLE[(i + 1536) >> 0] = -27439 * i;\n      RGB_YUV_TABLE[(i + 1792) >> 0] = -5329 * i;\n    }\n  }\n\n  // IO functions\n  function writeBits(bs) {\n    var value = bs[0];\n    var posval = bs[1] - 1;\n    while (posval >= 0) {\n      if (value & (1 << posval)) {\n        bytenew |= 1 << bytepos;\n      }\n      posval--;\n      bytepos--;\n      if (bytepos < 0) {\n        if (bytenew == 0xff) {\n          writeByte(0xff);\n          writeByte(0);\n        } else {\n          writeByte(bytenew);\n        }\n        bytepos = 7;\n        bytenew = 0;\n      }\n    }\n  }\n\n  function writeByte(value) {\n    //byteout.push(clt[value]); // write char directly instead of converting later\n    byteout.push(value);\n  }\n\n  function writeWord(value) {\n    writeByte((value >> 8) & 0xff);\n    writeByte(value & 0xff);\n  }\n\n  // DCT & quantization core\n  function fDCTQuant(data, fdtbl) {\n    var d0, d1, d2, d3, d4, d5, d6, d7;\n    /* Pass 1: process rows. */\n    var dataOff = 0;\n    var i;\n    var I8 = 8;\n    var I64 = 64;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 1];\n      d2 = data[dataOff + 2];\n      d3 = data[dataOff + 3];\n      d4 = data[dataOff + 4];\n      d5 = data[dataOff + 5];\n      d6 = data[dataOff + 6];\n      d7 = data[dataOff + 7];\n\n      var tmp0 = d0 + d7;\n      var tmp7 = d0 - d7;\n      var tmp1 = d1 + d6;\n      var tmp6 = d1 - d6;\n      var tmp2 = d2 + d5;\n      var tmp5 = d2 - d5;\n      var tmp3 = d3 + d4;\n      var tmp4 = d3 - d4;\n\n      /* Even part */\n      var tmp10 = tmp0 + tmp3; /* phase 2 */\n      var tmp13 = tmp0 - tmp3;\n      var tmp11 = tmp1 + tmp2;\n      var tmp12 = tmp1 - tmp2;\n\n      data[dataOff] = tmp10 + tmp11; /* phase 3 */\n      data[dataOff + 4] = tmp10 - tmp11;\n\n      var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n      data[dataOff + 2] = tmp13 + z1; /* phase 5 */\n      data[dataOff + 6] = tmp13 - z1;\n\n      /* Odd part */\n      tmp10 = tmp4 + tmp5; /* phase 2 */\n      tmp11 = tmp5 + tmp6;\n      tmp12 = tmp6 + tmp7;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n      var z2 = 0.5411961 * tmp10 + z5; /* c2-c6 */\n      var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n      var z3 = tmp11 * 0.707106781; /* c4 */\n\n      var z11 = tmp7 + z3; /* phase 5 */\n      var z13 = tmp7 - z3;\n\n      data[dataOff + 5] = z13 + z2; /* phase 6 */\n      data[dataOff + 3] = z13 - z2;\n      data[dataOff + 1] = z11 + z4;\n      data[dataOff + 7] = z11 - z4;\n\n      dataOff += 8; /* advance pointer to next row */\n    }\n\n    /* Pass 2: process columns. */\n    dataOff = 0;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 8];\n      d2 = data[dataOff + 16];\n      d3 = data[dataOff + 24];\n      d4 = data[dataOff + 32];\n      d5 = data[dataOff + 40];\n      d6 = data[dataOff + 48];\n      d7 = data[dataOff + 56];\n\n      var tmp0p2 = d0 + d7;\n      var tmp7p2 = d0 - d7;\n      var tmp1p2 = d1 + d6;\n      var tmp6p2 = d1 - d6;\n      var tmp2p2 = d2 + d5;\n      var tmp5p2 = d2 - d5;\n      var tmp3p2 = d3 + d4;\n      var tmp4p2 = d3 - d4;\n\n      /* Even part */\n      var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n      var tmp13p2 = tmp0p2 - tmp3p2;\n      var tmp11p2 = tmp1p2 + tmp2p2;\n      var tmp12p2 = tmp1p2 - tmp2p2;\n\n      data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n      data[dataOff + 32] = tmp10p2 - tmp11p2;\n\n      var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n      data[dataOff + 16] = tmp13p2 + z1p2; /* phase 5 */\n      data[dataOff + 48] = tmp13p2 - z1p2;\n\n      /* Odd part */\n      tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n      tmp11p2 = tmp5p2 + tmp6p2;\n      tmp12p2 = tmp6p2 + tmp7p2;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n      var z2p2 = 0.5411961 * tmp10p2 + z5p2; /* c2-c6 */\n      var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n      var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\n      var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n      var z13p2 = tmp7p2 - z3p2;\n\n      data[dataOff + 40] = z13p2 + z2p2; /* phase 6 */\n      data[dataOff + 24] = z13p2 - z2p2;\n      data[dataOff + 8] = z11p2 + z4p2;\n      data[dataOff + 56] = z11p2 - z4p2;\n\n      dataOff++; /* advance pointer to next column */\n    }\n\n    // Quantize/descale the coefficients\n    var fDCTQuant;\n    for (i = 0; i < I64; ++i) {\n      // Apply the quantization and scaling factor & Round to nearest integer\n      fDCTQuant = data[i] * fdtbl[i];\n      outputfDCTQuant[i] =\n        fDCTQuant > 0.0 ? (fDCTQuant + 0.5) | 0 : (fDCTQuant - 0.5) | 0;\n      //outputfDCTQuant[i] = fround(fDCTQuant);\n    }\n    return outputfDCTQuant;\n  }\n\n  function writeAPP0() {\n    writeWord(0xffe0); // marker\n    writeWord(16); // length\n    writeByte(0x4a); // J\n    writeByte(0x46); // F\n    writeByte(0x49); // I\n    writeByte(0x46); // F\n    writeByte(0); // = \"JFIF\",'\\0'\n    writeByte(1); // versionhi\n    writeByte(1); // versionlo\n    writeByte(0); // xyunits\n    writeWord(1); // xdensity\n    writeWord(1); // ydensity\n    writeByte(0); // thumbnwidth\n    writeByte(0); // thumbnheight\n  }\n\n  function writeSOF0(width, height) {\n    writeWord(0xffc0); // marker\n    writeWord(17); // length, truecolor YUV JPG\n    writeByte(8); // precision\n    writeWord(height);\n    writeWord(width);\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0x11); // HVY\n    writeByte(0); // QTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HVU\n    writeByte(1); // QTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HVV\n    writeByte(1); // QTV\n  }\n\n  function writeDQT() {\n    writeWord(0xffdb); // marker\n    writeWord(132); // length\n    writeByte(0);\n    for (var i = 0; i < 64; i++) {\n      writeByte(YTable[i]);\n    }\n    writeByte(1);\n    for (var j = 0; j < 64; j++) {\n      writeByte(UVTable[j]);\n    }\n  }\n\n  function writeDHT() {\n    writeWord(0xffc4); // marker\n    writeWord(0x01a2); // length\n\n    writeByte(0); // HTYDCinfo\n    for (var i = 0; i < 16; i++) {\n      writeByte(std_dc_luminance_nrcodes[i + 1]);\n    }\n    for (var j = 0; j <= 11; j++) {\n      writeByte(std_dc_luminance_values[j]);\n    }\n\n    writeByte(0x10); // HTYACinfo\n    for (var k = 0; k < 16; k++) {\n      writeByte(std_ac_luminance_nrcodes[k + 1]);\n    }\n    for (var l = 0; l <= 161; l++) {\n      writeByte(std_ac_luminance_values[l]);\n    }\n\n    writeByte(1); // HTUDCinfo\n    for (var m = 0; m < 16; m++) {\n      writeByte(std_dc_chrominance_nrcodes[m + 1]);\n    }\n    for (var n = 0; n <= 11; n++) {\n      writeByte(std_dc_chrominance_values[n]);\n    }\n\n    writeByte(0x11); // HTUACinfo\n    for (var o = 0; o < 16; o++) {\n      writeByte(std_ac_chrominance_nrcodes[o + 1]);\n    }\n    for (var p = 0; p <= 161; p++) {\n      writeByte(std_ac_chrominance_values[p]);\n    }\n  }\n\n  function writeSOS() {\n    writeWord(0xffda); // marker\n    writeWord(12); // length\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0); // HTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HTV\n    writeByte(0); // Ss\n    writeByte(0x3f); // Se\n    writeByte(0); // Bf\n  }\n\n  function processDU(CDU, fdtbl, DC, HTDC, HTAC) {\n    var EOB = HTAC[0x00];\n    var M16zeroes = HTAC[0xf0];\n    var pos;\n    var I16 = 16;\n    var I63 = 63;\n    var I64 = 64;\n    var DU_DCT = fDCTQuant(CDU, fdtbl);\n    //ZigZag reorder\n    for (var j = 0; j < I64; ++j) {\n      DU[ZigZag[j]] = DU_DCT[j];\n    }\n    var Diff = DU[0] - DC;\n    DC = DU[0];\n    //Encode DC\n    if (Diff == 0) {\n      writeBits(HTDC[0]); // Diff might be 0\n    } else {\n      pos = 32767 + Diff;\n      writeBits(HTDC[category[pos]]);\n      writeBits(bitcode[pos]);\n    }\n    //Encode ACs\n    var end0pos = 63; // was const... which is crazy\n    while (end0pos > 0 && DU[end0pos] == 0) {\n      end0pos--;\n    }\n    //end0pos = first element in reverse order !=0\n    if (end0pos == 0) {\n      writeBits(EOB);\n      return DC;\n    }\n    var i = 1;\n    var lng;\n    while (i <= end0pos) {\n      var startpos = i;\n      while (DU[i] == 0 && i <= end0pos) {\n        ++i;\n      }\n      var nrzeroes = i - startpos;\n      if (nrzeroes >= I16) {\n        lng = nrzeroes >> 4;\n        for (var nrmarker = 1; nrmarker <= lng; ++nrmarker)\n          writeBits(M16zeroes);\n        nrzeroes = nrzeroes & 0xf;\n      }\n      pos = 32767 + DU[i];\n      writeBits(HTAC[(nrzeroes << 4) + category[pos]]);\n      writeBits(bitcode[pos]);\n      i++;\n    }\n    if (end0pos != I63) {\n      writeBits(EOB);\n    }\n    return DC;\n  }\n\n  function initCharLookupTable() {\n    var sfcc = String.fromCharCode;\n    for (var i = 0; i < 256; i++) {\n      ///// ACHTUNG // 255\n      clt[i] = sfcc(i);\n    }\n  }\n\n  this.encode = function(\n    image,\n    quality // image data object\n  ) {\n    if (quality) setQuality(quality);\n\n    // Initialize bit writer\n    byteout = new Array();\n    bytenew = 0;\n    bytepos = 7;\n\n    // Add JPEG headers\n    writeWord(0xffd8); // SOI\n    writeAPP0();\n    writeDQT();\n    writeSOF0(image.width, image.height);\n    writeDHT();\n    writeSOS();\n\n    // Encode 8x8 macroblocks\n    var DCY = 0;\n    var DCU = 0;\n    var DCV = 0;\n\n    bytenew = 0;\n    bytepos = 7;\n\n    this.encode.displayName = \"_encode_\";\n\n    var imageData = image.data;\n    var width = image.width;\n    var height = image.height;\n\n    var quadWidth = width * 4;\n\n    var x,\n      y = 0;\n    var r, g, b;\n    var start, p, col, row, pos;\n    while (y < height) {\n      x = 0;\n      while (x < quadWidth) {\n        start = quadWidth * y + x;\n        col = -1;\n        row = 0;\n\n        for (pos = 0; pos < 64; pos++) {\n          row = pos >> 3; // /8\n          col = (pos & 7) * 4; // %8\n          p = start + row * quadWidth + col;\n\n          if (y + row >= height) {\n            // padding bottom\n            p -= quadWidth * (y + 1 + row - height);\n          }\n\n          if (x + col >= quadWidth) {\n            // padding right\n            p -= x + col - quadWidth + 4;\n          }\n\n          r = imageData[p++];\n          g = imageData[p++];\n          b = imageData[p++];\n\n          /* // calculate YUV values dynamically\n\t\t\t\t\tYDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n\t\t\t\t\tUDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n\t\t\t\t\tVDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n\t\t\t\t\t*/\n\n          // use lookup table (slightly faster)\n          YDU[pos] =\n            ((RGB_YUV_TABLE[r] +\n              RGB_YUV_TABLE[(g + 256) >> 0] +\n              RGB_YUV_TABLE[(b + 512) >> 0]) >>\n              16) -\n            128;\n          UDU[pos] =\n            ((RGB_YUV_TABLE[(r + 768) >> 0] +\n              RGB_YUV_TABLE[(g + 1024) >> 0] +\n              RGB_YUV_TABLE[(b + 1280) >> 0]) >>\n              16) -\n            128;\n          VDU[pos] =\n            ((RGB_YUV_TABLE[(r + 1280) >> 0] +\n              RGB_YUV_TABLE[(g + 1536) >> 0] +\n              RGB_YUV_TABLE[(b + 1792) >> 0]) >>\n              16) -\n            128;\n        }\n\n        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n        x += 32;\n      }\n      y += 8;\n    }\n\n    ////////////////////////////////////////////////////////////////\n\n    // Do the bit alignment of the EOI marker\n    if (bytepos >= 0) {\n      var fillbits = [];\n      fillbits[1] = bytepos + 1;\n      fillbits[0] = (1 << (bytepos + 1)) - 1;\n      writeBits(fillbits);\n    }\n\n    writeWord(0xffd9); //EOI\n\n    return new Uint8Array(byteout);\n  };\n\n  function setQuality(quality) {\n    quality = Math.min(Math.max(quality, 1), 100);\n\n    if (currentQuality == quality) return; // don't recalc if unchanged\n\n    var sf =\n      quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);\n\n    initQuantTables(sf);\n    currentQuality = quality;\n    //console.log('Quality set to: '+quality +'%');\n  }\n\n  function init() {\n    quality = quality || 50;\n    // Create tables\n    initCharLookupTable();\n    initHuffmanTbl();\n    initCategoryNumber();\n    initRGBYUVTable();\n\n    setQuality(quality);\n  }\n  init();\n}\n\nexport { JPEGEncoder };\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { GifReader } from \"../libs/omggif.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\n\n/**\n * jsPDF Gif Support PlugIn\n *\n * @name gif_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processGIF89A = function(imageData, index, alias, compression) {\n    var reader = new GifReader(imageData);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = [];\n\n    reader.decodeAndBlitFrameRGBA(0, pixels);\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n\n  jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;\n})(jsPDF.API);\n","/**\n * @author shaozilee\n *\n * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp\n *\n */\n\nimport { console } from \"./console.js\";\n\nfunction BmpDecoder(buffer, is_with_alpha) {\n  this.pos = 0;\n  this.buffer = buffer;\n  this.datav = new DataView(buffer.buffer);\n  this.is_with_alpha = !!is_with_alpha;\n  this.bottom_up = true;\n  this.flag =\n    String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);\n  this.pos += 2;\n  if ([\"BM\", \"BA\", \"CI\", \"CP\", \"IC\", \"PT\"].indexOf(this.flag) === -1)\n    throw new Error(\"Invalid BMP File\");\n  this.parseHeader();\n  this.parseBGR();\n}\n\nBmpDecoder.prototype.parseHeader = function() {\n  this.fileSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.reserved = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.offset = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.headerSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.width = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.height = this.datav.getInt32(this.pos, true);\n  this.pos += 4;\n  this.planes = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.bitPP = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.compress = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.rawSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.hr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.vr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.colors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.importantColors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n\n  if (this.bitPP === 16 && this.is_with_alpha) {\n    this.bitPP = 15;\n  }\n  if (this.bitPP < 15) {\n    var len = this.colors === 0 ? 1 << this.bitPP : this.colors;\n    this.palette = new Array(len);\n    for (var i = 0; i < len; i++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var quad = this.datav.getUint8(this.pos++, true);\n      this.palette[i] = {\n        red: red,\n        green: green,\n        blue: blue,\n        quad: quad\n      };\n    }\n  }\n  if (this.height < 0) {\n    this.height *= -1;\n    this.bottom_up = false;\n  }\n};\n\nBmpDecoder.prototype.parseBGR = function() {\n  this.pos = this.offset;\n  try {\n    var bitn = \"bit\" + this.bitPP;\n    var len = this.width * this.height * 4;\n    this.data = new Uint8Array(len);\n\n    this[bitn]();\n  } catch (e) {\n    console.log(\"bit decode error:\" + e);\n  }\n};\n\nBmpDecoder.prototype.bit1 = function() {\n  var xlen = Math.ceil(this.width / 8);\n  var mode = xlen % 4;\n  var y;\n  for (y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 8 * 4;\n      for (var i = 0; i < 8; i++) {\n        if (x * 8 + i < this.width) {\n          var rgb = this.palette[(b >> (7 - i)) & 0x1];\n          this.data[location + i * 4] = rgb.blue;\n          this.data[location + i * 4 + 1] = rgb.green;\n          this.data[location + i * 4 + 2] = rgb.red;\n          this.data[location + i * 4 + 3] = 0xff;\n        } else {\n          break;\n        }\n      }\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit4 = function() {\n  var xlen = Math.ceil(this.width / 2);\n  var mode = xlen % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 2 * 4;\n\n      var before = b >> 4;\n      var after = b & 0x0f;\n\n      var rgb = this.palette[before];\n      this.data[location] = rgb.blue;\n      this.data[location + 1] = rgb.green;\n      this.data[location + 2] = rgb.red;\n      this.data[location + 3] = 0xff;\n\n      if (x * 2 + 1 >= this.width) break;\n\n      rgb = this.palette[after];\n      this.data[location + 4] = rgb.blue;\n      this.data[location + 4 + 1] = rgb.green;\n      this.data[location + 4 + 2] = rgb.red;\n      this.data[location + 4 + 3] = 0xff;\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit8 = function() {\n  var mode = this.width % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      if (b < this.palette.length) {\n        var rgb = this.palette[b];\n        this.data[location] = rgb.red;\n        this.data[location + 1] = rgb.green;\n        this.data[location + 2] = rgb.blue;\n        this.data[location + 3] = 0xff;\n      } else {\n        this.data[location] = 0xff;\n        this.data[location + 1] = 0xff;\n        this.data[location + 2] = 0xff;\n        this.data[location + 3] = 0xff;\n      }\n    }\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit15 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_5) / _1_5) * 255) | 0;\n      var red = ((((B >> 10) & _1_5) / _1_5) * 255) | 0;\n      var alpha = B >> 15 ? 0xff : 0x00;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit16 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  var _111111 = parseInt(\"111111\", 2),\n    _1_6 = _111111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var alpha = 0xff;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_6) / _1_6) * 255) | 0;\n      var red = (((B >> 11) / _1_5) * 255) | 0;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit24 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = 0xff;\n    }\n    //skip extra bytes\n    this.pos += this.width % 4;\n  }\n};\n\n/**\n * add 32bit decode func\n * @author soubok\n */\nBmpDecoder.prototype.bit32 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var alpha = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    //this.pos += (this.width % 4);\n  }\n};\n\nBmpDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { BmpDecoder };\n","import { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { BmpDecoder } from \"../libs/BMPDecoder.js\";\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @license\n * Copyright (c) 2018 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF bmp Support PlugIn\n * @name bmp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processBMP = function(imageData, index, alias, compression) {\n    var reader = new BmpDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","function WebPDecoder(imageData) {\n  /** @license\n   * Copyright 2011 Google Inc.\n   *\n   * This code is licensed under the same terms as WebM:\n   *  Software License Agreement:  http://www.webmproject.org/license/software/\n   *  Additional IP Rights Grant:  http://www.webmproject.org/license/additional/\n   * -----------------------------------------------------------------------------\n   *\n   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n   * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n   * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n   * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n   *\n   * -----------------------------------------------------------------------------\n   *\n   * Copyright 2011-2017 Dominik Homberger\n   * Libwebp Javascript / libwebpjs - the libwebp implementation in javascript (v0.6.0)\n   *\n   * Author: Dominik Homberger (dominik.homberger@gmail.com)\n   */\n\n  var self = this;\n  var UpsampleRgbLinePair,\n    UpsampleBgrLinePair,\n    UpsampleRgbaLinePair,\n    UpsampleBgraLinePair,\n    UpsampleArgbLinePair,\n    UpsampleArgbLinePair,\n    UpsampleRgba4444LinePair,\n    UpsampleRgb565LinePair;\n\n  function x(F) {\n    if (!F) throw Error(\"assert :P\");\n  }\n  function fa(F, L, J) {\n    for (var H = 0; 4 > H; H++) if (F[L + H] != J.charCodeAt(H)) return !0;\n    return !1;\n  }\n  function I(F, L, J, H, Z) {\n    for (var O = 0; O < Z; O++) F[L + O] = J[H + O];\n  }\n  function M(F, L, J, H) {\n    for (var Z = 0; Z < H; Z++) F[L + Z] = J;\n  }\n  function V(F) {\n    return new Int32Array(F);\n  }\n  function wa(F, L) {\n    for (var J = [], H = 0; H < F; H++) J.push(new L());\n    return J;\n  }\n  function wb() {\n    function F(J, H, Z) {\n      for (var O = Z[H], L = 0; L < O; L++) {\n        J.push(Z.length > H + 1 ? [] : 0);\n        if (Z.length < H + 1) break;\n        F(J[L], H + 1, Z);\n      }\n    }\n    var L = [];\n    F(L, 0, [3, 11]);\n    return L;\n  }\n  function Ed(F, L) {\n    function J(H, O, F) {\n      for (var Z = F[O], ma = 0; ma < Z; ma++) {\n        H.push(F.length > O + 1 ? [] : new L());\n        if (F.length < O + 1) break;\n        J(H[ma], O + 1, F);\n      }\n    }\n    var H = [];\n    J(H, 0, F);\n    return H;\n  }\n  var _WebPDecoder = function() {\n    var self = this;\n    function F() {\n      V(55);\n    }\n    function L(a, b) {\n      for (var c = (1 << (b - 1)) >>> 0; a & c; ) c >>>= 1;\n      return c ? (a & (c - 1)) + c : a;\n    }\n    function J(a, b, c, d, e) {\n      x(!(d % c));\n      do (d -= c), (a[b + d] = e);\n      while (0 < d);\n    }\n    function H(a, b, c, d, e, f) {\n      var g = b,\n        h = 1 << c,\n        k,\n        l,\n        m = V(16),\n        n = V(16);\n      x(0 != e);\n      x(null != d);\n      x(null != a);\n      x(0 < c);\n      for (l = 0; l < e; ++l) {\n        if (15 < d[l]) return 0;\n        ++m[d[l]];\n      }\n      if (m[0] == e) return 0;\n      n[1] = 0;\n      for (k = 1; 15 > k; ++k) {\n        if (m[k] > 1 << k) return 0;\n        n[k + 1] = n[k] + m[k];\n      }\n      for (l = 0; l < e; ++l) (k = d[l]), 0 < d[l] && (f[n[k]++] = l);\n      if (1 == n[15])\n        return (d = new O()), (d.g = 0), (d.value = f[0]), J(a, g, 1, h, d), h;\n      var r = -1,\n        q = h - 1,\n        t = 0,\n        v = 1,\n        p = 1,\n        u,\n        w = 1 << c;\n      l = 0;\n      k = 1;\n      for (e = 2; k <= c; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k])\n          (d = new O()),\n            (d.g = k),\n            (d.value = f[l++]),\n            J(a, g + t, e, w, d),\n            (t = L(t, k));\n      }\n      k = c + 1;\n      for (e = 2; 15 >= k; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k]) {\n          d = new O();\n          if ((t & q) != r) {\n            g += w;\n            r = k;\n            for (u = 1 << (r - c); 15 > r; ) {\n              u -= m[r];\n              if (0 >= u) break;\n              ++r;\n              u <<= 1;\n            }\n            u = r - c;\n            w = 1 << u;\n            h += w;\n            r = t & q;\n            a[b + r].g = u + c;\n            a[b + r].value = g - b - r;\n          }\n          d.g = k - c;\n          d.value = f[l++];\n          J(a, g + (t >> c), e, w, d);\n          t = L(t, k);\n        }\n      }\n      return v != 2 * n[15] - 1 ? 0 : h;\n    }\n    function Z(a, b, c, d, e) {\n      x(2328 >= e);\n      if (512 >= e) var f = V(512);\n      else if (((f = V(e)), null == f)) return 0;\n      return H(a, b, c, d, e, f);\n    }\n    function O() {\n      this.value = this.g = 0;\n    }\n    function Fd() {\n      this.value = this.g = 0;\n    }\n    function Ub() {\n      this.G = wa(5, O);\n      this.H = V(5);\n      this.jc = this.Qb = this.qb = this.nd = 0;\n      this.pd = wa(xb, Fd);\n    }\n    function ma(a, b, c, d) {\n      x(null != a);\n      x(null != b);\n      x(2147483648 > d);\n      a.Ca = 254;\n      a.I = 0;\n      a.b = -8;\n      a.Ka = 0;\n      a.oa = b;\n      a.pa = c;\n      a.Jd = b;\n      a.Yc = c + d;\n      a.Zc = 4 <= d ? c + d - 4 + 1 : c;\n      Qa(a);\n    }\n    function na(a, b) {\n      for (var c = 0; 0 < b--; ) c |= K(a, 128) << b;\n      return c;\n    }\n    function ca(a, b) {\n      var c = na(a, b);\n      return G(a) ? -c : c;\n    }\n    function cb(a, b, c, d) {\n      var e,\n        f = 0;\n      x(null != a);\n      x(null != b);\n      x(4294967288 > d);\n      a.Sb = d;\n      a.Ra = 0;\n      a.u = 0;\n      a.h = 0;\n      4 < d && (d = 4);\n      for (e = 0; e < d; ++e) f += b[c + e] << (8 * e);\n      a.Ra = f;\n      a.bb = d;\n      a.oa = b;\n      a.pa = c;\n    }\n    function Vb(a) {\n      for (; 8 <= a.u && a.bb < a.Sb; )\n        (a.Ra >>>= 8),\n          (a.Ra += (a.oa[a.pa + a.bb] << (ob - 8)) >>> 0),\n          ++a.bb,\n          (a.u -= 8);\n      db(a) && ((a.h = 1), (a.u = 0));\n    }\n    function D(a, b) {\n      x(0 <= b);\n      if (!a.h && b <= Gd) {\n        var c = pb(a) & Hd[b];\n        a.u += b;\n        Vb(a);\n        return c;\n      }\n      a.h = 1;\n      return (a.u = 0);\n    }\n    function Wb() {\n      this.b = this.Ca = this.I = 0;\n      this.oa = [];\n      this.pa = 0;\n      this.Jd = [];\n      this.Yc = 0;\n      this.Zc = [];\n      this.Ka = 0;\n    }\n    function Ra() {\n      this.Ra = 0;\n      this.oa = [];\n      this.h = this.u = this.bb = this.Sb = this.pa = 0;\n    }\n    function pb(a) {\n      return (a.Ra >>> (a.u & (ob - 1))) >>> 0;\n    }\n    function db(a) {\n      x(a.bb <= a.Sb);\n      return a.h || (a.bb == a.Sb && a.u > ob);\n    }\n    function qb(a, b) {\n      a.u = b;\n      a.h = db(a);\n    }\n    function Sa(a) {\n      a.u >= Xb && (x(a.u >= Xb), Vb(a));\n    }\n    function Qa(a) {\n      x(null != a && null != a.oa);\n      a.pa < a.Zc\n        ? ((a.I = (a.oa[a.pa++] | (a.I << 8)) >>> 0), (a.b += 8))\n        : (x(null != a && null != a.oa),\n          a.pa < a.Yc\n            ? ((a.b += 8), (a.I = a.oa[a.pa++] | (a.I << 8)))\n            : a.Ka\n            ? (a.b = 0)\n            : ((a.I <<= 8), (a.b += 8), (a.Ka = 1)));\n    }\n    function G(a) {\n      return na(a, 1);\n    }\n    function K(a, b) {\n      var c = a.Ca;\n      0 > a.b && Qa(a);\n      var d = a.b,\n        e = (c * b) >>> 8,\n        f = (a.I >>> d > e) + 0;\n      f ? ((c -= e), (a.I -= ((e + 1) << d) >>> 0)) : (c = e + 1);\n      d = c;\n      for (e = 0; 256 <= d; ) (e += 8), (d >>= 8);\n      d = 7 ^ (e + Id[d]);\n      a.b -= d;\n      a.Ca = (c << d) - 1;\n      return f;\n    }\n    function ra(a, b, c) {\n      a[b + 0] = (c >> 24) & 255;\n      a[b + 1] = (c >> 16) & 255;\n      a[b + 2] = (c >> 8) & 255;\n      a[b + 3] = (c >> 0) & 255;\n    }\n    function Ta(a, b) {\n      return (a[b + 0] << 0) | (a[b + 1] << 8);\n    }\n    function Yb(a, b) {\n      return Ta(a, b) | (a[b + 2] << 16);\n    }\n    function Ha(a, b) {\n      return Ta(a, b) | (Ta(a, b + 2) << 16);\n    }\n    function Zb(a, b) {\n      var c = 1 << b;\n      x(null != a);\n      x(0 < b);\n      a.X = V(c);\n      if (null == a.X) return 0;\n      a.Mb = 32 - b;\n      a.Xa = b;\n      return 1;\n    }\n    function $b(a, b) {\n      x(null != a);\n      x(null != b);\n      x(a.Xa == b.Xa);\n      I(b.X, 0, a.X, 0, 1 << b.Xa);\n    }\n    function ac() {\n      this.X = [];\n      this.Xa = this.Mb = 0;\n    }\n    function bc(a, b, c, d) {\n      x(null != c);\n      x(null != d);\n      var e = c[0],\n        f = d[0];\n      0 == e && (e = (a * f + b / 2) / b);\n      0 == f && (f = (b * e + a / 2) / a);\n      if (0 >= e || 0 >= f) return 0;\n      c[0] = e;\n      d[0] = f;\n      return 1;\n    }\n    function xa(a, b) {\n      return (a + (1 << b) - 1) >>> b;\n    }\n    function yb(a, b) {\n      return (\n        (((((a & 4278255360) + (b & 4278255360)) >>> 0) & 4278255360) +\n          ((((a & 16711935) + (b & 16711935)) >>> 0) & 16711935)) >>>\n        0\n      );\n    }\n    function X(a, b) {\n      self[b] = function(b, d, e, f, g, h, k) {\n        var c;\n        for (c = 0; c < g; ++c) {\n          var m = self[a](h[k + c - 1], e, f + c);\n          h[k + c] = yb(b[d + c], m);\n        }\n      };\n    }\n    function Jd() {\n      this.ud = this.hd = this.jd = 0;\n    }\n    function aa(a, b) {\n      return ((((a ^ b) & 4278124286) >>> 1) + (a & b)) >>> 0;\n    }\n    function sa(a) {\n      if (0 <= a && 256 > a) return a;\n      if (0 > a) return 0;\n      if (255 < a) return 255;\n    }\n    function eb(a, b) {\n      return sa(a + ((a - b + 0.5) >> 1));\n    }\n    function Ia(a, b, c) {\n      return Math.abs(b - c) - Math.abs(a - c);\n    }\n    function cc(a, b, c, d, e, f, g) {\n      d = f[g - 1];\n      for (c = 0; c < e; ++c) f[g + c] = d = yb(a[b + c], d);\n    }\n    function Kd(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < c; ++f) {\n        var g = a[b + f],\n          h = (g >> 8) & 255,\n          k = g & 16711935,\n          k = k + ((h << 16) + h),\n          k = k & 16711935;\n        d[e + f] = ((g & 4278255360) + k) >>> 0;\n      }\n    }\n    function dc(a, b) {\n      b.jd = (a >> 0) & 255;\n      b.hd = (a >> 8) & 255;\n      b.ud = (a >> 16) & 255;\n    }\n    function Ld(a, b, c, d, e, f) {\n      var g;\n      for (g = 0; g < d; ++g) {\n        var h = b[c + g],\n          k = h >>> 8,\n          l = h >>> 16,\n          m = h,\n          l = l + ((((a.jd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          l = l & 255,\n          m = m + ((((a.hd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          m = m + ((((a.ud << 24) >> 24) * ((l << 24) >> 24)) >>> 5),\n          m = m & 255;\n        e[f + g] = (h & 4278255360) + (l << 16) + m;\n      }\n    }\n    function ec(a, b, c, d, e) {\n      self[b] = function(a, b, c, k, l, m, n, r, q) {\n        for (k = n; k < r; ++k)\n          for (n = 0; n < q; ++n) l[m++] = e(c[d(a[b++])]);\n      };\n      self[a] = function(a, b, h, k, l, m, n) {\n        var f = 8 >> a.b,\n          g = a.Ea,\n          t = a.K[0],\n          v = a.w;\n        if (8 > f)\n          for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {\n            var p = 0,\n              u;\n            for (u = 0; u < g; ++u)\n              u & a || (p = d(k[l++])), (m[n++] = e(t[p & v])), (p >>= f);\n          }\n        else self[\"VP8LMapColor\" + c](k, l, t, v, m, n, b, h, g);\n      };\n    }\n    function Md(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n      }\n    }\n    function Nd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 24) & 255;\n      }\n    }\n    function Od(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 240) | ((f >> 12) & 15),\n          f = ((f >> 0) & 240) | ((f >> 28) & 15);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Pd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 248) | ((f >> 13) & 7),\n          f = ((f >> 5) & 224) | ((f >> 3) & 31);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Qd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 16) & 255;\n      }\n    }\n    function fb(a, b, c, d, e, f) {\n      if (0 == f)\n        for (c = b + c; b < c; )\n          (f = a[b++]),\n            ra(\n              d,\n              ((f[0] >> 24) |\n                ((f[1] >> 8) & 65280) |\n                ((f[2] << 8) & 16711680) |\n                (f[3] << 24)) >>>\n                0\n            ),\n            (e += 32);\n      else I(d, e, a, b, c);\n    }\n    function gb(a, b) {\n      self[b][0] = self[a + \"0\"];\n      self[b][1] = self[a + \"1\"];\n      self[b][2] = self[a + \"2\"];\n      self[b][3] = self[a + \"3\"];\n      self[b][4] = self[a + \"4\"];\n      self[b][5] = self[a + \"5\"];\n      self[b][6] = self[a + \"6\"];\n      self[b][7] = self[a + \"7\"];\n      self[b][8] = self[a + \"8\"];\n      self[b][9] = self[a + \"9\"];\n      self[b][10] = self[a + \"10\"];\n      self[b][11] = self[a + \"11\"];\n      self[b][12] = self[a + \"12\"];\n      self[b][13] = self[a + \"13\"];\n      self[b][14] = self[a + \"0\"];\n      self[b][15] = self[a + \"0\"];\n    }\n    function hb(a) {\n      return a == zb || a == Ab || a == Ja || a == Bb;\n    }\n    function Rd() {\n      this.eb = [];\n      this.size = this.A = this.fb = 0;\n    }\n    function Sd() {\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.F = [];\n      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;\n    }\n    function Cb() {\n      this.Rd = this.height = this.width = this.S = 0;\n      this.f = {};\n      this.f.RGBA = new Rd();\n      this.f.kb = new Sd();\n      this.sd = null;\n    }\n    function Td() {\n      this.width = [0];\n      this.height = [0];\n      this.Pd = [0];\n      this.Qd = [0];\n      this.format = [0];\n    }\n    function Ud() {\n      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;\n    }\n    function Vd(a) {\n      alert(\"todo:WebPSamplerProcessPlane\");\n      return a.T;\n    }\n    function Wd(a, b) {\n      var c = a.T,\n        d = b.ba.f.RGBA,\n        e = d.eb,\n        f = d.fb + a.ka * d.A,\n        g = P[b.ba.S],\n        h = a.y,\n        k = a.O,\n        l = a.f,\n        m = a.N,\n        n = a.ea,\n        r = a.W,\n        q = b.cc,\n        t = b.dc,\n        v = b.Mc,\n        p = b.Nc,\n        u = a.ka,\n        w = a.ka + a.T,\n        y = a.U,\n        A = (y + 1) >> 1;\n      0 == u\n        ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y)\n        : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y),\n          ++c);\n      for (; u + 2 < w; u += 2)\n        (q = l),\n          (t = m),\n          (v = n),\n          (p = r),\n          (m += a.Rc),\n          (r += a.Rc),\n          (f += 2 * d.A),\n          (k += 2 * a.fa),\n          g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);\n      k += a.fa;\n      a.j + w < a.o\n        ? (I(b.ec, b.fc, h, k, y),\n          I(b.cc, b.dc, l, m, A),\n          I(b.Mc, b.Nc, n, r, A),\n          c--)\n        : w & 1 ||\n          g(\n            h,\n            k,\n            null,\n            null,\n            l,\n            m,\n            n,\n            r,\n            l,\n            m,\n            n,\n            r,\n            e,\n            f + d.A,\n            null,\n            null,\n            y\n          );\n      return c;\n    }\n    function Xd(a, b, c) {\n      var d = a.F,\n        e = [a.J];\n      if (null != d) {\n        var f = a.U,\n          g = b.ba.S,\n          h = g == ya || g == Ja;\n        b = b.ba.f.RGBA;\n        var k = [0],\n          l = a.ka;\n        k[0] = a.T;\n        a.Kb &&\n          (0 == l ? --k[0] : (--l, (e[0] -= a.width)),\n          a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));\n        var m = b.eb,\n          l = b.fb + l * b.A;\n        a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);\n        x(c == k);\n        a && hb(g) && za(m, l, h, f, k, b.A);\n      }\n      return 0;\n    }\n    function gc(a) {\n      var b = a.ma,\n        c = b.ba.S,\n        d = 11 > c,\n        e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);\n      b.memory = null;\n      b.Ib = null;\n      b.Jb = null;\n      b.Nd = null;\n      if (!hc(b.Oa, a, e ? 11 : 12)) return 0;\n      e && hb(c) && ic();\n      if (a.da) alert(\"todo:use_scaling\");\n      else {\n        if (d) {\n          if (((b.Ib = Vd), a.Kb)) {\n            c = (a.U + 1) >> 1;\n            b.memory = V(a.U + 2 * c);\n            if (null == b.memory) return 0;\n            b.ec = b.memory;\n            b.fc = 0;\n            b.cc = b.ec;\n            b.dc = b.fc + a.U;\n            b.Mc = b.cc;\n            b.Nc = b.dc + c;\n            b.Ib = Wd;\n            ic();\n          }\n        } else alert(\"todo:EmitYUV\");\n        e && ((b.Jb = Xd), d && Aa());\n      }\n      if (d && !jc) {\n        for (a = 0; 256 > a; ++a)\n          (Yd[a] = (89858 * (a - 128) + Ba) >> Wa),\n            (Zd[a] = -22014 * (a - 128) + Ba),\n            ($d[a] = -45773 * (a - 128)),\n            (ae[a] = (113618 * (a - 128) + Ba) >> Wa);\n        for (a = ta; a < Eb; ++a)\n          (b = (76283 * (a - 16) + Ba) >> Wa),\n            (be[a - ta] = ga(b, 255)),\n            (ce[a - ta] = ga((b + 8) >> 4, 15));\n        jc = 1;\n      }\n      return 1;\n    }\n    function kc(a) {\n      var b = a.ma,\n        c = a.U,\n        d = a.T;\n      x(!(a.ka & 1));\n      if (0 >= c || 0 >= d) return 0;\n      c = b.Ib(a, b);\n      null != b.Jb && b.Jb(a, b, c);\n      b.Dc += c;\n      return 1;\n    }\n    function lc(a) {\n      a.ma.memory = null;\n    }\n    function mc(a, b, c, d) {\n      if (47 != D(a, 8)) return 0;\n      b[0] = D(a, 14) + 1;\n      c[0] = D(a, 14) + 1;\n      d[0] = D(a, 1);\n      return 0 != D(a, 3) ? 0 : !a.h;\n    }\n    function ib(a, b) {\n      if (4 > a) return a + 1;\n      var c = (a - 2) >> 1;\n      return ((2 + (a & 1)) << c) + D(b, c) + 1;\n    }\n    function nc(a, b) {\n      if (120 < b) return b - 120;\n      var c = de[b - 1],\n        c = (c >> 4) * a + (8 - (c & 15));\n      return 1 <= c ? c : 1;\n    }\n    function ua(a, b, c) {\n      var d = pb(c);\n      b += d & 255;\n      var e = a[b].g - 8;\n      0 < e &&\n        (qb(c, c.u + 8),\n        (d = pb(c)),\n        (b += a[b].value),\n        (b += d & ((1 << e) - 1)));\n      qb(c, c.u + a[b].g);\n      return a[b].value;\n    }\n    function ub(a, b, c) {\n      c.g += a.g;\n      c.value += (a.value << b) >>> 0;\n      x(8 >= c.g);\n      return a.g;\n    }\n    function ha(a, b, c) {\n      var d = a.xc;\n      b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];\n      x(b < a.Wb);\n      return a.Ya[b];\n    }\n    function oc(a, b, c, d) {\n      var e = a.ab,\n        f = a.c * b,\n        g = a.C;\n      b = g + b;\n      var h = c,\n        k = d;\n      d = a.Ta;\n      for (c = a.Ua; 0 < e--; ) {\n        var l = a.gc[e],\n          m = g,\n          n = b,\n          r = h,\n          q = k,\n          k = d,\n          h = c,\n          t = l.Ea;\n        x(m < n);\n        x(n <= l.nc);\n        switch (l.hc) {\n          case 2:\n            pc(r, q, (n - m) * t, k, h);\n            break;\n          case 0:\n            var v = l,\n              p = m,\n              u = n,\n              w = k,\n              y = h,\n              A = v.Ea;\n            0 == p &&\n              (ee(r, q, null, null, 1, w, y),\n              cc(r, q + 1, 0, 0, A - 1, w, y + 1),\n              (q += A),\n              (y += A),\n              ++p);\n            for (\n              var E = 1 << v.b,\n                B = E - 1,\n                C = xa(A, v.b),\n                N = v.K,\n                v = v.w + (p >> v.b) * C;\n              p < u;\n\n            ) {\n              var z = N,\n                Q = v,\n                S = 1;\n              for (fe(r, q, w, y - A, 1, w, y); S < A; ) {\n                var K = qc[(z[Q++] >> 8) & 15],\n                  D = (S & ~B) + E;\n                D > A && (D = A);\n                K(r, q + +S, w, y + S - A, D - S, w, y + S);\n                S = D;\n              }\n              q += A;\n              y += A;\n              ++p;\n              p & B || (v += C);\n            }\n            n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);\n            break;\n          case 1:\n            t = r;\n            u = q;\n            r = l.Ea;\n            q = 1 << l.b;\n            w = q - 1;\n            y = r & ~w;\n            A = r - y;\n            p = xa(r, l.b);\n            E = l.K;\n            for (l = l.w + (m >> l.b) * p; m < n; ) {\n              B = E;\n              C = l;\n              N = new Jd();\n              v = u + y;\n              for (z = u + r; u < v; )\n                dc(B[C++], N), Fb(N, t, u, q, k, h), (u += q), (h += q);\n              u < z &&\n                (dc(B[C++], N), Fb(N, t, u, A, k, h), (u += A), (h += A));\n              ++m;\n              m & w || (l += p);\n            }\n            break;\n          case 3:\n            if (r == k && q == h && 0 < l.b) {\n              y = (n - m) * xa(l.Ea, l.b);\n              t = h + (n - m) * t - y;\n              u = k;\n              r = t;\n              q = k;\n              w = h;\n              A = y;\n              p = [];\n              for (y = A - 1; 0 <= y; --y) p[y] = q[w + y];\n              for (y = A - 1; 0 <= y; --y) u[r + y] = p[y];\n              rc(l, m, n, k, t, k, h);\n            } else rc(l, m, n, r, q, k, h);\n        }\n        h = d;\n        k = c;\n      }\n      k != c && I(d, c, h, k, f);\n    }\n    function ge(a, b) {\n      var c = a.V,\n        d = a.Ba + a.c * a.C,\n        e = b - a.C;\n      x(b <= a.l.o);\n      x(16 >= e);\n      if (0 < e) {\n        var f = a.l,\n          g = a.Ta,\n          h = a.Ua,\n          k = f.width;\n        oc(a, e, c, d);\n        h = [h];\n        c = a.C;\n        d = b;\n        e = h;\n        x(c < d);\n        x(f.v < f.va);\n        d > f.o && (d = f.o);\n        if (c < f.j) {\n          var l = f.j - c,\n            c = f.j;\n          e[0] += l * k;\n        }\n        c >= d\n          ? (c = 0)\n          : ((e[0] += 4 * f.v),\n            (f.ka = c - f.j),\n            (f.U = f.va - f.v),\n            (f.T = d - c),\n            (c = 1));\n        if (c) {\n          h = h[0];\n          c = a.ca;\n          if (11 > c.S) {\n            for (\n              var m = c.f.RGBA,\n                d = c.S,\n                e = f.U,\n                f = f.T,\n                l = m.eb,\n                n = m.A,\n                r = f,\n                m = m.fb + a.Ma * m.A;\n              0 < r--;\n\n            ) {\n              var q = g,\n                t = h,\n                v = e,\n                p = l,\n                u = m;\n              switch (d) {\n                case Ca:\n                  sc(q, t, v, p, u);\n                  break;\n                case Ua:\n                  Gb(q, t, v, p, u);\n                  break;\n                case zb:\n                  Gb(q, t, v, p, u);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case tc:\n                  uc(q, t, v, p, u);\n                  break;\n                case Va:\n                  fb(q, t, v, p, u, 1);\n                  break;\n                case Ab:\n                  fb(q, t, v, p, u, 1);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case ya:\n                  fb(q, t, v, p, u, 0);\n                  break;\n                case Ja:\n                  fb(q, t, v, p, u, 0);\n                  za(p, u, 1, v, 1, 0);\n                  break;\n                case Db:\n                  Hb(q, t, v, p, u);\n                  break;\n                case Bb:\n                  Hb(q, t, v, p, u);\n                  vc(p, u, v, 1, 0);\n                  break;\n                case wc:\n                  xc(q, t, v, p, u);\n                  break;\n                default:\n                  x(0);\n              }\n              h += k;\n              m += n;\n            }\n            a.Ma += f;\n          } else alert(\"todo:EmitRescaledRowsYUVA\");\n          x(a.Ma <= c.height);\n        }\n      }\n      a.C = b;\n      x(a.C <= a.i);\n    }\n    function yc(a) {\n      var b;\n      if (0 < a.ua) return 0;\n      for (b = 0; b < a.Wb; ++b) {\n        var c = a.Ya[b].G,\n          d = a.Ya[b].H;\n        if (\n          0 < c[1][d[1] + 0].g ||\n          0 < c[2][d[2] + 0].g ||\n          0 < c[3][d[3] + 0].g\n        )\n          return 0;\n      }\n      return 1;\n    }\n    function zc(a, b, c, d, e, f) {\n      if (0 != a.Z) {\n        var g = a.qd,\n          h = a.rd;\n        for (x(null != ia[a.Z]); b < c; ++b)\n          ia[a.Z](g, h, d, e, d, e, f), (g = d), (h = e), (e += f);\n        a.qd = g;\n        a.rd = h;\n      }\n    }\n    function Ib(a, b) {\n      var c = a.l.ma,\n        d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,\n        d = a.C < d ? d : a.C;\n      x(b <= a.l.o);\n      if (b > d) {\n        var e = a.l.width,\n          f = c.ca,\n          g = c.tb + e * d,\n          h = a.V,\n          k = a.Ba + a.c * d,\n          l = a.gc;\n        x(1 == a.ab);\n        x(3 == l[0].hc);\n        he(l[0], d, b, h, k, f, g);\n        zc(c, d, b, f, g, e);\n      }\n      a.C = a.Ma = b;\n    }\n    function Jb(a, b, c, d, e, f, g) {\n      var h = a.$ / d,\n        k = a.$ % d,\n        l = a.m,\n        m = a.s,\n        n = c + a.$,\n        r = n;\n      e = c + d * e;\n      var q = c + d * f,\n        t = 280 + m.ua,\n        v = a.Pb ? h : 16777216,\n        p = 0 < m.ua ? m.Wa : null,\n        u = m.wc,\n        w = n < q ? ha(m, k, h) : null;\n      x(a.C < f);\n      x(q <= e);\n      var y = !1;\n      a: for (;;) {\n        for (; y || n < q; ) {\n          var A = 0;\n          if (h >= v) {\n            var v = a,\n              E = n - c;\n            x(v.Pb);\n            v.wd = v.m;\n            v.xd = E;\n            0 < v.s.ua && $b(v.s.Wa, v.s.vb);\n            v = h + ie;\n          }\n          k & u || (w = ha(m, k, h));\n          x(null != w);\n          w.Qb && ((b[n] = w.qb), (y = !0));\n          if (!y)\n            if ((Sa(l), w.jc)) {\n              var A = l,\n                E = b,\n                B = n,\n                C = w.pd[pb(A) & (xb - 1)];\n              x(w.jc);\n              256 > C.g\n                ? (qb(A, A.u + C.g), (E[B] = C.value), (A = 0))\n                : (qb(A, A.u + C.g - 256), x(256 <= C.value), (A = C.value));\n              0 == A && (y = !0);\n            } else A = ua(w.G[0], w.H[0], l);\n          if (l.h) break;\n          if (y || 256 > A) {\n            if (!y)\n              if (w.nd) b[n] = (w.qb | (A << 8)) >>> 0;\n              else {\n                Sa(l);\n                y = ua(w.G[1], w.H[1], l);\n                Sa(l);\n                E = ua(w.G[2], w.H[2], l);\n                B = ua(w.G[3], w.H[3], l);\n                if (l.h) break;\n                b[n] = ((B << 24) | (y << 16) | (A << 8) | E) >>> 0;\n              }\n            y = !1;\n            ++n;\n            ++k;\n            if (\n              k >= d &&\n              ((k = 0),\n              ++h,\n              null != g && h <= f && !(h % 16) && g(a, h),\n              null != p)\n            )\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (280 > A) {\n            A = ib(A - 256, l);\n            E = ua(w.G[4], w.H[4], l);\n            Sa(l);\n            E = ib(E, l);\n            E = nc(d, E);\n            if (l.h) break;\n            if (n - c < E || e - n < A) break a;\n            else for (B = 0; B < A; ++B) b[n + B] = b[n + B - E];\n            n += A;\n            for (k += A; k >= d; )\n              (k -= d), ++h, null != g && h <= f && !(h % 16) && g(a, h);\n            x(n <= e);\n            k & u && (w = ha(m, k, h));\n            if (null != p)\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (A < t) {\n            y = A - 280;\n            for (x(null != p); r < n; )\n              (A = b[r++]), (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n            A = n;\n            E = p;\n            x(!(y >>> E.Xa));\n            b[A] = E.X[y];\n            y = !0;\n          } else break a;\n          y || x(l.h == db(l));\n        }\n        if (a.Pb && l.h && n < e)\n          x(a.m.h),\n            (a.a = 5),\n            (a.m = a.wd),\n            (a.$ = a.xd),\n            0 < a.s.ua && $b(a.s.vb, a.s.Wa);\n        else if (l.h) break a;\n        else null != g && g(a, h > f ? f : h), (a.a = 0), (a.$ = n - c);\n        return 1;\n      }\n      a.a = 3;\n      return 0;\n    }\n    function Ac(a) {\n      x(null != a);\n      a.vc = null;\n      a.yc = null;\n      a.Ya = null;\n      var b = a.Wa;\n      null != b && (b.X = null);\n      a.vb = null;\n      x(null != a);\n    }\n    function Bc() {\n      var a = new je();\n      if (null == a) return null;\n      a.a = 0;\n      a.xb = Cc;\n      gb(\"Predictor\", \"VP8LPredictors\");\n      gb(\"Predictor\", \"VP8LPredictors_C\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd_C\");\n      pc = Kd;\n      Fb = Ld;\n      sc = Md;\n      Gb = Nd;\n      Hb = Od;\n      xc = Pd;\n      uc = Qd;\n      self.VP8LMapColor32b = ke;\n      self.VP8LMapColor8b = le;\n      return a;\n    }\n    function rb(a, b, c, d, e) {\n      var f = 1,\n        g = [a],\n        h = [b],\n        k = d.m,\n        l = d.s,\n        m = null,\n        n = 0;\n      a: for (;;) {\n        if (c)\n          for (; f && D(k, 1); ) {\n            var r = g,\n              q = h,\n              t = d,\n              v = 1,\n              p = t.m,\n              u = t.gc[t.ab],\n              w = D(p, 2);\n            if (t.Oc & (1 << w)) f = 0;\n            else {\n              t.Oc |= 1 << w;\n              u.hc = w;\n              u.Ea = r[0];\n              u.nc = q[0];\n              u.K = [null];\n              ++t.ab;\n              x(4 >= t.ab);\n              switch (w) {\n                case 0:\n                case 1:\n                  u.b = D(p, 3) + 2;\n                  v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);\n                  u.K = u.K[0];\n                  break;\n                case 3:\n                  var y = D(p, 8) + 1,\n                    A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;\n                  r[0] = xa(u.Ea, A);\n                  u.b = A;\n                  var v = rb(y, 1, 0, t, u.K),\n                    E;\n                  if ((E = v)) {\n                    var B,\n                      C = y,\n                      N = u,\n                      z = 1 << (8 >> N.b),\n                      Q = V(z);\n                    if (null == Q) E = 0;\n                    else {\n                      var S = N.K[0],\n                        K = N.w;\n                      Q[0] = N.K[0][0];\n                      for (B = 1; B < 1 * C; ++B) Q[B] = yb(S[K + B], Q[B - 1]);\n                      for (; B < 4 * z; ++B) Q[B] = 0;\n                      N.K[0] = null;\n                      N.K[0] = Q;\n                      E = 1;\n                    }\n                  }\n                  v = E;\n                  break;\n                case 2:\n                  break;\n                default:\n                  x(0);\n              }\n              f = v;\n            }\n          }\n        g = g[0];\n        h = h[0];\n        if (f && D(k, 1) && ((n = D(k, 4)), (f = 1 <= n && 11 >= n), !f)) {\n          d.a = 3;\n          break a;\n        }\n        var H;\n        if ((H = f))\n          b: {\n            var F = d,\n              G = g,\n              L = h,\n              J = n,\n              T = c,\n              Da,\n              ba,\n              X = F.m,\n              R = F.s,\n              P = [null],\n              U,\n              W = 1,\n              aa = 0,\n              na = me[J];\n            c: for (;;) {\n              if (T && D(X, 1)) {\n                var ca = D(X, 3) + 2,\n                  ga = xa(G, ca),\n                  ka = xa(L, ca),\n                  qa = ga * ka;\n                if (!rb(ga, ka, 0, F, P)) break c;\n                P = P[0];\n                R.xc = ca;\n                for (Da = 0; Da < qa; ++Da) {\n                  var ia = (P[Da] >> 8) & 65535;\n                  P[Da] = ia;\n                  ia >= W && (W = ia + 1);\n                }\n              }\n              if (X.h) break c;\n              for (ba = 0; 5 > ba; ++ba) {\n                var Y = Dc[ba];\n                !ba && 0 < J && (Y += 1 << J);\n                aa < Y && (aa = Y);\n              }\n              var ma = wa(W * na, O);\n              var ua = W,\n                va = wa(ua, Ub);\n              if (null == va) var la = null;\n              else x(65536 >= ua), (la = va);\n              var ha = V(aa);\n              if (null == la || null == ha || null == ma) {\n                F.a = 1;\n                break c;\n              }\n              var pa = ma;\n              for (Da = U = 0; Da < W; ++Da) {\n                var ja = la[Da],\n                  da = ja.G,\n                  ea = ja.H,\n                  Fa = 0,\n                  ra = 1,\n                  Ha = 0;\n                for (ba = 0; 5 > ba; ++ba) {\n                  Y = Dc[ba];\n                  da[ba] = pa;\n                  ea[ba] = U;\n                  !ba && 0 < J && (Y += 1 << J);\n                  d: {\n                    var sa,\n                      za = Y,\n                      ta = F,\n                      oa = ha,\n                      db = pa,\n                      eb = U,\n                      Ia = 0,\n                      Ka = ta.m,\n                      fb = D(Ka, 1);\n                    M(oa, 0, 0, za);\n                    if (fb) {\n                      var gb = D(Ka, 1) + 1,\n                        hb = D(Ka, 1),\n                        Ja = D(Ka, 0 == hb ? 1 : 8);\n                      oa[Ja] = 1;\n                      2 == gb && ((Ja = D(Ka, 8)), (oa[Ja] = 1));\n                      var ya = 1;\n                    } else {\n                      var Ua = V(19),\n                        Va = D(Ka, 4) + 4;\n                      if (19 < Va) {\n                        ta.a = 3;\n                        var Aa = 0;\n                        break d;\n                      }\n                      for (sa = 0; sa < Va; ++sa) Ua[ne[sa]] = D(Ka, 3);\n                      var Ba = void 0,\n                        sb = void 0,\n                        Wa = ta,\n                        ib = Ua,\n                        Ca = za,\n                        Xa = oa,\n                        Oa = 0,\n                        La = Wa.m,\n                        Ya = 8,\n                        Za = wa(128, O);\n                      e: for (;;) {\n                        if (!Z(Za, 0, 7, ib, 19)) break e;\n                        if (D(La, 1)) {\n                          var kb = 2 + 2 * D(La, 3),\n                            Ba = 2 + D(La, kb);\n                          if (Ba > Ca) break e;\n                        } else Ba = Ca;\n                        for (sb = 0; sb < Ca && Ba--; ) {\n                          Sa(La);\n                          var $a = Za[0 + (pb(La) & 127)];\n                          qb(La, La.u + $a.g);\n                          var jb = $a.value;\n                          if (16 > jb) (Xa[sb++] = jb), 0 != jb && (Ya = jb);\n                          else {\n                            var lb = 16 == jb,\n                              ab = jb - 16,\n                              mb = oe[ab],\n                              bb = D(La, pe[ab]) + mb;\n                            if (sb + bb > Ca) break e;\n                            else\n                              for (var nb = lb ? Ya : 0; 0 < bb--; )\n                                Xa[sb++] = nb;\n                          }\n                        }\n                        Oa = 1;\n                        break e;\n                      }\n                      Oa || (Wa.a = 3);\n                      ya = Oa;\n                    }\n                    (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));\n                    ya && 0 != Ia ? (Aa = Ia) : ((ta.a = 3), (Aa = 0));\n                  }\n                  if (0 == Aa) break c;\n                  ra && 1 == qe[ba] && (ra = 0 == pa[U].g);\n                  Fa += pa[U].g;\n                  U += Aa;\n                  if (3 >= ba) {\n                    var Pa = ha[0],\n                      tb;\n                    for (tb = 1; tb < Y; ++tb) ha[tb] > Pa && (Pa = ha[tb]);\n                    Ha += Pa;\n                  }\n                }\n                ja.nd = ra;\n                ja.Qb = 0;\n                ra &&\n                  ((ja.qb =\n                    ((da[3][ea[3] + 0].value << 24) |\n                      (da[1][ea[1] + 0].value << 16) |\n                      da[2][ea[2] + 0].value) >>>\n                    0),\n                  0 == Fa &&\n                    256 > da[0][ea[0] + 0].value &&\n                    ((ja.Qb = 1), (ja.qb += da[0][ea[0] + 0].value << 8)));\n                ja.jc = !ja.Qb && 6 > Ha;\n                if (ja.jc) {\n                  var Ga,\n                    Ea = ja;\n                  for (Ga = 0; Ga < xb; ++Ga) {\n                    var Ma = Ga,\n                      Na = Ea.pd[Ma],\n                      vb = Ea.G[0][Ea.H[0] + Ma];\n                    256 <= vb.value\n                      ? ((Na.g = vb.g + 256), (Na.value = vb.value))\n                      : ((Na.g = 0),\n                        (Na.value = 0),\n                        (Ma >>= ub(vb, 8, Na)),\n                        (Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na)),\n                        (Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na)),\n                        ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));\n                  }\n                }\n              }\n              R.vc = P;\n              R.Wb = W;\n              R.Ya = la;\n              R.yc = ma;\n              H = 1;\n              break b;\n            }\n            H = 0;\n          }\n        f = H;\n        if (!f) {\n          d.a = 3;\n          break a;\n        }\n        if (0 < n) {\n          if (((l.ua = 1 << n), !Zb(l.Wa, n))) {\n            d.a = 1;\n            f = 0;\n            break a;\n          }\n        } else l.ua = 0;\n        var Qa = d,\n          cb = g,\n          ob = h,\n          Ra = Qa.s,\n          Ta = Ra.xc;\n        Qa.c = cb;\n        Qa.i = ob;\n        Ra.md = xa(cb, Ta);\n        Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;\n        if (c) {\n          d.xb = re;\n          break a;\n        }\n        m = V(g * h);\n        if (null == m) {\n          d.a = 1;\n          f = 0;\n          break a;\n        }\n        f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;\n        break a;\n      }\n      f\n        ? (null != e ? (e[0] = m) : (x(null == m), x(c)), (d.$ = 0), c || Ac(l))\n        : Ac(l);\n      return f;\n    }\n    function Ec(a, b) {\n      var c = a.c * a.i,\n        d = c + b + 16 * b;\n      x(a.c <= b);\n      a.V = V(d);\n      if (null == a.V) return (a.Ta = null), (a.Ua = 0), (a.a = 1), 0;\n      a.Ta = a.V;\n      a.Ua = a.Ba + c + b;\n      return 1;\n    }\n    function se(a, b) {\n      var c = a.C,\n        d = b - c,\n        e = a.V,\n        f = a.Ba + a.c * c;\n      for (x(b <= a.l.o); 0 < d; ) {\n        var g = 16 < d ? 16 : d,\n          h = a.l.ma,\n          k = a.l.width,\n          l = k * g,\n          m = h.ca,\n          n = h.tb + k * c,\n          r = a.Ta,\n          q = a.Ua;\n        oc(a, g, e, f);\n        Fc(r, q, m, n, l);\n        zc(h, c, c + g, m, n, k);\n        d -= g;\n        e += g * a.c;\n        c += g;\n      }\n      x(c == b);\n      a.C = a.Ma = b;\n    }\n    function te(a, b) {\n      var c = [0],\n        d = [0],\n        e = [0];\n      a: for (;;) {\n        if (null == a) return 0;\n        if (null == b) return (a.a = 2), 0;\n        a.l = b;\n        a.a = 0;\n        cb(a.m, b.data, b.w, b.ha);\n        if (!mc(a.m, c, d, e)) {\n          a.a = 3;\n          break a;\n        }\n        a.xb = Cc;\n        b.width = c[0];\n        b.height = d[0];\n        if (!rb(c[0], d[0], 1, a, null)) break a;\n        return 1;\n      }\n      x(0 != a.a);\n      return 0;\n    }\n    function ue() {\n      this.ub = this.yd = this.td = this.Rb = 0;\n    }\n    function ve() {\n      this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;\n    }\n    function we() {\n      this.Fb = this.Bb = this.Cb = 0;\n      this.Zb = V(4);\n      this.Lb = V(4);\n    }\n    function Gc() {\n      this.Yb = wb();\n    }\n    function xe() {\n      this.jb = V(3);\n      this.Wc = Ed([4, 8], Gc);\n      this.Xc = Ed([4, 17], Gc);\n    }\n    function ye() {\n      this.Pc = this.wb = this.Tb = this.zd = 0;\n      this.vd = new V(4);\n      this.od = new V(4);\n    }\n    function Xa() {\n      this.ld = this.La = this.dd = this.tc = 0;\n    }\n    function Hc() {\n      this.Na = this.la = 0;\n    }\n    function ze() {\n      this.Sc = [0, 0];\n      this.Eb = [0, 0];\n      this.Qc = [0, 0];\n      this.ia = this.lc = 0;\n    }\n    function Kb() {\n      this.ad = V(384);\n      this.Za = 0;\n      this.Ob = V(16);\n      this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;\n    }\n    function Ae() {\n      this.uc = this.M = this.Nb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.ya = Array(new Kb());\n      this.aa = 0;\n      this.l = new Oa();\n    }\n    function Ic() {\n      this.y = V(16);\n      this.f = V(8);\n      this.ea = V(8);\n    }\n    function Be() {\n      this.cb = this.a = 0;\n      this.sc = \"\";\n      this.m = new Wb();\n      this.Od = new ue();\n      this.Kc = new ve();\n      this.ed = new ye();\n      this.Qa = new we();\n      this.Ic = this.$c = this.Aa = 0;\n      this.D = new Ae();\n      this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;\n      this.Jc = wa(8, Wb);\n      this.ia = 0;\n      new F();\n      this.pb = wa(4, ze);\n      this.Pa = new xe();\n      this.Bd = this.kc = 0;\n      this.Ac = [];\n      this.Bc = 0;\n      this.zc = [0, 0, 0, 0];\n      this.Gd = Array(new Ic());\n      this.Hd = 0;\n      this.rb = Array(new Hc());\n      this.sb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.oc = [];\n      this.pc = 0;\n      this.sa = [];\n      this.ta = 0;\n      this.qa = [];\n      this.ra = 0;\n      this.Ha = [];\n      this.B = this.R = this.Ia = 0;\n      this.Ec = [];\n      this.M = this.ja = this.Vb = this.Fc = 0;\n      this.ya = Array(new Kb());\n      this.L = this.aa = 0;\n      this.gd = Ed([4, 2], Xa);\n      this.ga = null;\n      this.Fa = [];\n      this.Cc = this.qc = this.P = 0;\n      this.Gb = [];\n      this.Uc = 0;\n      this.mb = [];\n      this.nb = 0;\n      this.rc = [];\n      this.Ga = this.Vc = 0;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function Oa() {\n      this.T = this.U = this.ka = this.height = this.width = 0;\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.Rc = this.fa = this.W = this.N = this.O = 0;\n      this.ma = \"void\";\n      this.put = \"VP8IoPutHook\";\n      this.ac = \"VP8IoSetupHook\";\n      this.bc = \"VP8IoTeardownHook\";\n      this.ha = this.Kb = 0;\n      this.data = [];\n      this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0;\n      this.F = [];\n      this.J = 0;\n    }\n    function Ce() {\n      var a = new Be();\n      null != a &&\n        ((a.a = 0), (a.sc = \"OK\"), (a.cb = 0), (a.Xb = 0), oa || (oa = De));\n      return a;\n    }\n    function T(a, b, c) {\n      0 == a.a && ((a.a = b), (a.sc = c), (a.cb = 0));\n      return 0;\n    }\n    function Jc(a, b, c) {\n      return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];\n    }\n    function Kc(a, b) {\n      if (null == a) return 0;\n      a.a = 0;\n      a.sc = \"OK\";\n      if (null == b) return T(a, 2, \"null VP8Io passed to VP8GetHeaders()\");\n      var c = b.data;\n      var d = b.w;\n      var e = b.ha;\n      if (4 > e) return T(a, 7, \"Truncated header.\");\n      var f = c[d + 0] | (c[d + 1] << 8) | (c[d + 2] << 16);\n      var g = a.Od;\n      g.Rb = !(f & 1);\n      g.td = (f >> 1) & 7;\n      g.yd = (f >> 4) & 1;\n      g.ub = f >> 5;\n      if (3 < g.td) return T(a, 3, \"Incorrect keyframe parameters.\");\n      if (!g.yd) return T(a, 4, \"Frame not displayable.\");\n      d += 3;\n      e -= 3;\n      var h = a.Kc;\n      if (g.Rb) {\n        if (7 > e) return T(a, 7, \"cannot parse picture header\");\n        if (!Jc(c, d, e)) return T(a, 3, \"Bad code word\");\n        h.c = ((c[d + 4] << 8) | c[d + 3]) & 16383;\n        h.Td = c[d + 4] >> 6;\n        h.i = ((c[d + 6] << 8) | c[d + 5]) & 16383;\n        h.Ud = c[d + 6] >> 6;\n        d += 7;\n        e -= 7;\n        a.za = (h.c + 15) >> 4;\n        a.Ub = (h.i + 15) >> 4;\n        b.width = h.c;\n        b.height = h.i;\n        b.Da = 0;\n        b.j = 0;\n        b.v = 0;\n        b.va = b.width;\n        b.o = b.height;\n        b.da = 0;\n        b.ib = b.width;\n        b.hb = b.height;\n        b.U = b.width;\n        b.T = b.height;\n        f = a.Pa;\n        M(f.jb, 0, 255, f.jb.length);\n        f = a.Qa;\n        x(null != f);\n        f.Cb = 0;\n        f.Bb = 0;\n        f.Fb = 1;\n        M(f.Zb, 0, 0, f.Zb.length);\n        M(f.Lb, 0, 0, f.Lb);\n      }\n      if (g.ub > e) return T(a, 7, \"bad partition length\");\n      f = a.m;\n      ma(f, c, d, g.ub);\n      d += g.ub;\n      e -= g.ub;\n      g.Rb && ((h.Ld = G(f)), (h.Kd = G(f)));\n      h = a.Qa;\n      var k = a.Pa,\n        l;\n      x(null != f);\n      x(null != h);\n      h.Cb = G(f);\n      if (h.Cb) {\n        h.Bb = G(f);\n        if (G(f)) {\n          h.Fb = G(f);\n          for (l = 0; 4 > l; ++l) h.Zb[l] = G(f) ? ca(f, 7) : 0;\n          for (l = 0; 4 > l; ++l) h.Lb[l] = G(f) ? ca(f, 6) : 0;\n        }\n        if (h.Bb) for (l = 0; 3 > l; ++l) k.jb[l] = G(f) ? na(f, 8) : 255;\n      } else h.Bb = 0;\n      if (f.Ka) return T(a, 3, \"cannot parse segment header\");\n      h = a.ed;\n      h.zd = G(f);\n      h.Tb = na(f, 6);\n      h.wb = na(f, 3);\n      h.Pc = G(f);\n      if (h.Pc && G(f)) {\n        for (k = 0; 4 > k; ++k) G(f) && (h.vd[k] = ca(f, 6));\n        for (k = 0; 4 > k; ++k) G(f) && (h.od[k] = ca(f, 6));\n      }\n      a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;\n      if (f.Ka) return T(a, 3, \"cannot parse filter header\");\n      l = d;\n      var m = e;\n      e = l;\n      d = l + m;\n      h = m;\n      a.Xb = (1 << na(a.m, 2)) - 1;\n      k = a.Xb;\n      if (m < 3 * k) c = 7;\n      else {\n        l += 3 * k;\n        h -= 3 * k;\n        for (m = 0; m < k; ++m) {\n          var n = c[e + 0] | (c[e + 1] << 8) | (c[e + 2] << 16);\n          n > h && (n = h);\n          ma(a.Jc[+m], c, l, n);\n          l += n;\n          h -= n;\n          e += 3;\n        }\n        ma(a.Jc[+k], c, l, h);\n        c = l < d ? 0 : 5;\n      }\n      if (0 != c) return T(a, c, \"cannot parse partitions\");\n      l = a.m;\n      c = na(l, 7);\n      e = G(l) ? ca(l, 4) : 0;\n      d = G(l) ? ca(l, 4) : 0;\n      h = G(l) ? ca(l, 4) : 0;\n      k = G(l) ? ca(l, 4) : 0;\n      l = G(l) ? ca(l, 4) : 0;\n      m = a.Qa;\n      for (n = 0; 4 > n; ++n) {\n        if (m.Cb) {\n          var r = m.Zb[n];\n          m.Fb || (r += c);\n        } else if (0 < n) {\n          a.pb[n] = a.pb[0];\n          continue;\n        } else r = c;\n        var q = a.pb[n];\n        q.Sc[0] = Lb[ga(r + e, 127)];\n        q.Sc[1] = Mb[ga(r + 0, 127)];\n        q.Eb[0] = 2 * Lb[ga(r + d, 127)];\n        q.Eb[1] = (101581 * Mb[ga(r + h, 127)]) >> 16;\n        8 > q.Eb[1] && (q.Eb[1] = 8);\n        q.Qc[0] = Lb[ga(r + k, 117)];\n        q.Qc[1] = Mb[ga(r + l, 127)];\n        q.lc = r + l;\n      }\n      if (!g.Rb) return T(a, 4, \"Not a key frame.\");\n      G(f);\n      g = a.Pa;\n      for (c = 0; 4 > c; ++c) {\n        for (e = 0; 8 > e; ++e)\n          for (d = 0; 3 > d; ++d)\n            for (h = 0; 11 > h; ++h)\n              (k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h]),\n                (g.Wc[c][e].Yb[d][h] = k);\n        for (e = 0; 17 > e; ++e) g.Xc[c][e] = g.Wc[c][Ge[e]];\n      }\n      a.kc = G(f);\n      a.kc && (a.Bd = na(f, 8));\n      return (a.cb = 1);\n    }\n    function De(a, b, c, d, e, f, g) {\n      var h = b[e].Yb[c];\n      for (c = 0; 16 > e; ++e) {\n        if (!K(a, h[c + 0])) return e;\n        for (; !K(a, h[c + 1]); )\n          if (((h = b[++e].Yb[0]), (c = 0), 16 == e)) return 16;\n        var k = b[e + 1].Yb;\n        if (K(a, h[c + 2])) {\n          var l = a,\n            m = h,\n            n = c;\n          var r = 0;\n          if (K(l, m[n + 3]))\n            if (K(l, m[n + 6])) {\n              h = 0;\n              r = K(l, m[n + 8]);\n              m = K(l, m[n + 9 + r]);\n              n = 2 * r + m;\n              r = 0;\n              for (m = He[n]; m[h]; ++h) r += r + K(l, m[h]);\n              r += 3 + (8 << n);\n            } else\n              K(l, m[n + 7])\n                ? ((r = 7 + 2 * K(l, 165)), (r += K(l, 145)))\n                : (r = 5 + K(l, 159));\n          else K(l, m[n + 4]) ? (r = 3 + K(l, m[n + 5])) : (r = 2);\n          h = k[2];\n        } else (r = 1), (h = k[1]);\n        k = g + Ie[e];\n        l = a;\n        0 > l.b && Qa(l);\n        var m = l.b,\n          n = l.Ca >> 1,\n          q = (n - (l.I >> m)) >> 31;\n        --l.b;\n        l.Ca += q;\n        l.Ca |= 1;\n        l.I -= ((n + 1) & q) << m;\n        f[k] = ((r ^ q) - q) * d[(0 < e) + 0];\n      }\n      return 16;\n    }\n    function Lc(a) {\n      var b = a.rb[a.sb - 1];\n      b.la = 0;\n      b.Na = 0;\n      M(a.zc, 0, 0, a.zc.length);\n      a.ja = 0;\n    }\n    function Je(a, b) {\n      for (a.M = 0; a.M < a.Va; ++a.M) {\n        var c = a.Jc[a.M & a.Xb],\n          d = a.m,\n          e = a,\n          f;\n        for (f = 0; f < e.za; ++f) {\n          var g = d;\n          var h = e;\n          var k = h.Ac,\n            l = h.Bc + 4 * f,\n            m = h.zc,\n            n = h.ya[h.aa + f];\n          h.Qa.Bb\n            ? (n.$b = K(g, h.Pa.jb[0])\n                ? 2 + K(g, h.Pa.jb[2])\n                : K(g, h.Pa.jb[1]))\n            : (n.$b = 0);\n          h.kc && (n.Ad = K(g, h.Bd));\n          n.Za = !K(g, 145) + 0;\n          if (n.Za) {\n            var r = n.Ob,\n              q = 0;\n            for (h = 0; 4 > h; ++h) {\n              var t = m[0 + h];\n              var v;\n              for (v = 0; 4 > v; ++v) {\n                t = Ke[k[l + v]][t];\n                for (var p = Mc[K(g, t[0])]; 0 < p; )\n                  p = Mc[2 * p + K(g, t[p])];\n                t = -p;\n                k[l + v] = t;\n              }\n              I(r, q, k, l, 4);\n              q += 4;\n              m[0 + h] = t;\n            }\n          } else\n            (t = K(g, 156) ? (K(g, 128) ? 1 : 3) : K(g, 163) ? 2 : 0),\n              (n.Ob[0] = t),\n              M(k, l, t, 4),\n              M(m, 0, t, 4);\n          n.Dd = K(g, 142) ? (K(g, 114) ? (K(g, 183) ? 1 : 3) : 2) : 0;\n        }\n        if (e.m.Ka) return T(a, 7, \"Premature end-of-partition0 encountered.\");\n        for (; a.ja < a.za; ++a.ja) {\n          d = a;\n          e = c;\n          g = d.rb[d.sb - 1];\n          k = d.rb[d.sb + d.ja];\n          f = d.ya[d.aa + d.ja];\n          if ((l = d.kc ? f.Ad : 0))\n            (g.la = k.la = 0),\n              f.Za || (g.Na = k.Na = 0),\n              (f.Hc = 0),\n              (f.Gc = 0),\n              (f.ia = 0);\n          else {\n            var u,\n              w,\n              g = k,\n              k = e,\n              l = d.Pa.Xc,\n              m = d.ya[d.aa + d.ja],\n              n = d.pb[m.$b];\n            h = m.ad;\n            r = 0;\n            q = d.rb[d.sb - 1];\n            t = v = 0;\n            M(h, r, 0, 384);\n            if (m.Za) {\n              var y = 0;\n              var A = l[3];\n            } else {\n              p = V(16);\n              var E = g.Na + q.Na;\n              E = oa(k, l[1], E, n.Eb, 0, p, 0);\n              g.Na = q.Na = (0 < E) + 0;\n              if (1 < E) Nc(p, 0, h, r);\n              else {\n                var B = (p[0] + 3) >> 3;\n                for (p = 0; 256 > p; p += 16) h[r + p] = B;\n              }\n              y = 1;\n              A = l[0];\n            }\n            var C = g.la & 15;\n            var N = q.la & 15;\n            for (p = 0; 4 > p; ++p) {\n              var z = N & 1;\n              for (B = w = 0; 4 > B; ++B)\n                (E = z + (C & 1)),\n                  (E = oa(k, A, E, n.Sc, y, h, r)),\n                  (z = E > y),\n                  (C = (C >> 1) | (z << 7)),\n                  (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                  (r += 16);\n              C >>= 4;\n              N = (N >> 1) | (z << 7);\n              v = ((v << 8) | w) >>> 0;\n            }\n            A = C;\n            y = N >> 4;\n            for (u = 0; 4 > u; u += 2) {\n              w = 0;\n              C = g.la >> (4 + u);\n              N = q.la >> (4 + u);\n              for (p = 0; 2 > p; ++p) {\n                z = N & 1;\n                for (B = 0; 2 > B; ++B)\n                  (E = z + (C & 1)),\n                    (E = oa(k, l[2], E, n.Qc, 0, h, r)),\n                    (z = 0 < E),\n                    (C = (C >> 1) | (z << 3)),\n                    (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                    (r += 16);\n                C >>= 2;\n                N = (N >> 1) | (z << 5);\n              }\n              t |= w << (4 * u);\n              A |= (C << 4) << u;\n              y |= (N & 240) << u;\n            }\n            g.la = A;\n            q.la = y;\n            m.Hc = v;\n            m.Gc = t;\n            m.ia = t & 43690 ? 0 : n.ia;\n            l = !(v | t);\n          }\n          0 < d.L &&\n            ((d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za]),\n            (d.wa[d.Y + d.ja].La |= !l));\n          if (e.Ka) return T(a, 7, \"Premature end-of-file encountered.\");\n        }\n        Lc(a);\n        c = a;\n        d = b;\n        e = 1;\n        f = c.D;\n        g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;\n        if (0 == c.Aa)\n          a: {\n            (f.M = c.M), (f.uc = g), Oc(c, f), (e = 1);\n            w = c.D;\n            f = w.Nb;\n            t = Ya[c.L];\n            g = t * c.R;\n            k = (t / 2) * c.B;\n            p = 16 * f * c.R;\n            B = 8 * f * c.B;\n            l = c.sa;\n            m = c.ta - g + p;\n            n = c.qa;\n            h = c.ra - k + B;\n            r = c.Ha;\n            q = c.Ia - k + B;\n            C = w.M;\n            N = 0 == C;\n            v = C >= c.Va - 1;\n            2 == c.Aa && Oc(c, w);\n            if (w.uc)\n              for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {\n                var Q = E;\n                y = w;\n                A = z;\n                var S = Q.D,\n                  D = S.Nb;\n                u = Q.R;\n                var S = S.wa[S.Y + y],\n                  F = Q.sa,\n                  H = Q.ta + 16 * D * u + 16 * y,\n                  J = S.dd,\n                  G = S.tc;\n                if (0 != G)\n                  if ((x(3 <= G), 1 == Q.L))\n                    0 < y && Pc(F, H, u, G + 4),\n                      S.La && Qc(F, H, u, G),\n                      0 < A && Rc(F, H, u, G + 4),\n                      S.La && Sc(F, H, u, G);\n                  else {\n                    var L = Q.B,\n                      O = Q.qa,\n                      P = Q.ra + 8 * D * L + 8 * y,\n                      R = Q.Ha,\n                      Q = Q.Ia + 8 * D * L + 8 * y,\n                      D = S.ld;\n                    0 < y &&\n                      (Tc(F, H, u, G + 4, J, D),\n                      Uc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));\n                    0 < A &&\n                      (Xc(F, H, u, G + 4, J, D),\n                      Yc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));\n                  }\n              }\n            c.ia && alert(\"todo:DitherRow\");\n            if (null != d.put) {\n              w = 16 * C;\n              C = 16 * (C + 1);\n              N\n                ? ((d.y = c.sa),\n                  (d.O = c.ta + p),\n                  (d.f = c.qa),\n                  (d.N = c.ra + B),\n                  (d.ea = c.Ha),\n                  (d.W = c.Ia + B))\n                : ((w -= t),\n                  (d.y = l),\n                  (d.O = m),\n                  (d.f = n),\n                  (d.N = h),\n                  (d.ea = r),\n                  (d.W = q));\n              v || (C -= t);\n              C > d.o && (C = d.o);\n              d.F = null;\n              d.J = null;\n              if (\n                null != c.Fa &&\n                0 < c.Fa.length &&\n                w < C &&\n                ((d.J = Le(c, d, w, C - w)),\n                (d.F = c.mb),\n                null == d.F && 0 == d.F.length)\n              ) {\n                e = T(c, 3, \"Could not decode alpha data.\");\n                break a;\n              }\n              w < d.j &&\n                ((t = d.j - w),\n                (w = d.j),\n                x(!(t & 1)),\n                (d.O += c.R * t),\n                (d.N += c.B * (t >> 1)),\n                (d.W += c.B * (t >> 1)),\n                null != d.F && (d.J += d.width * t));\n              w < C &&\n                ((d.O += d.v),\n                (d.N += d.v >> 1),\n                (d.W += d.v >> 1),\n                null != d.F && (d.J += d.v),\n                (d.ka = w - d.j),\n                (d.U = d.va - d.v),\n                (d.T = C - w),\n                (e = d.put(d)));\n            }\n            f + 1 != c.Ic ||\n              v ||\n              (I(c.sa, c.ta - g, l, m + 16 * c.R, g),\n              I(c.qa, c.ra - k, n, h + 8 * c.B, k),\n              I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));\n          }\n        if (!e) return T(a, 6, \"Output aborted.\");\n      }\n      return 1;\n    }\n    function Me(a, b) {\n      if (null == a) return 0;\n      if (null == b) return T(a, 2, \"NULL VP8Io parameter in VP8Decode().\");\n      if (!a.cb && !Kc(a, b)) return 0;\n      x(a.cb);\n      if (null == b.ac || b.ac(b)) {\n        b.ob && (a.L = 0);\n        var c = Ya[a.L];\n        2 == a.L\n          ? ((a.yb = 0), (a.zb = 0))\n          : ((a.yb = (b.v - c) >> 4),\n            (a.zb = (b.j - c) >> 4),\n            0 > a.yb && (a.yb = 0),\n            0 > a.zb && (a.zb = 0));\n        a.Va = (b.o + 15 + c) >> 4;\n        a.Hb = (b.va + 15 + c) >> 4;\n        a.Hb > a.za && (a.Hb = a.za);\n        a.Va > a.Ub && (a.Va = a.Ub);\n        if (0 < a.L) {\n          var d = a.ed;\n          for (c = 0; 4 > c; ++c) {\n            var e;\n            if (a.Qa.Cb) {\n              var f = a.Qa.Lb[c];\n              a.Qa.Fb || (f += d.Tb);\n            } else f = d.Tb;\n            for (e = 0; 1 >= e; ++e) {\n              var g = a.gd[c][e],\n                h = f;\n              d.Pc && ((h += d.vd[0]), e && (h += d.od[0]));\n              h = 0 > h ? 0 : 63 < h ? 63 : h;\n              if (0 < h) {\n                var k = h;\n                0 < d.wb &&\n                  ((k = 4 < d.wb ? k >> 2 : k >> 1),\n                  k > 9 - d.wb && (k = 9 - d.wb));\n                1 > k && (k = 1);\n                g.dd = k;\n                g.tc = 2 * h + k;\n                g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;\n              } else g.tc = 0;\n              g.La = e;\n            }\n          }\n        }\n        c = 0;\n      } else T(a, 6, \"Frame setup failed\"), (c = a.a);\n      if ((c = 0 == c)) {\n        if (c) {\n          a.$c = 0;\n          0 < a.Aa || (a.Ic = Ne);\n          b: {\n            c = a.Ic;\n            var k = a.za,\n              d = 4 * k,\n              l = 32 * k,\n              m = k + 1,\n              n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,\n              r = (2 == a.Aa ? 2 : 1) * k;\n            e = ((3 * (16 * c + Ya[a.L])) / 2) * l;\n            f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;\n            g = d + 832 + e + f;\n            if (g != g) c = 0;\n            else {\n              if (g > a.Vb) {\n                a.Vb = 0;\n                a.Ec = V(g);\n                a.Fc = 0;\n                if (null == a.Ec) {\n                  c = T(a, 1, \"no memory during frame initialization.\");\n                  break b;\n                }\n                a.Vb = g;\n              }\n              g = a.Ec;\n              h = a.Fc;\n              a.Ac = g;\n              a.Bc = h;\n              h += d;\n              a.Gd = wa(l, Ic);\n              a.Hd = 0;\n              a.rb = wa(m + 1, Hc);\n              a.sb = 1;\n              a.wa = n ? wa(n, Xa) : null;\n              a.Y = 0;\n              a.D.Nb = 0;\n              a.D.wa = a.wa;\n              a.D.Y = a.Y;\n              0 < a.Aa && (a.D.Y += k);\n              x(!0);\n              a.oc = g;\n              a.pc = h;\n              h += 832;\n              a.ya = wa(r, Kb);\n              a.aa = 0;\n              a.D.ya = a.ya;\n              a.D.aa = a.aa;\n              2 == a.Aa && (a.D.aa += k);\n              a.R = 16 * k;\n              a.B = 8 * k;\n              l = Ya[a.L];\n              k = l * a.R;\n              l = (l / 2) * a.B;\n              a.sa = g;\n              a.ta = h + k;\n              a.qa = a.sa;\n              a.ra = a.ta + 16 * c * a.R + l;\n              a.Ha = a.qa;\n              a.Ia = a.ra + 8 * c * a.B + l;\n              a.$c = 0;\n              h += e;\n              a.mb = f ? g : null;\n              a.nb = f ? h : null;\n              x(h + f <= a.Fc + a.Vb);\n              Lc(a);\n              M(a.Ac, a.Bc, 0, d);\n              c = 1;\n            }\n          }\n          if (c) {\n            b.ka = 0;\n            b.y = a.sa;\n            b.O = a.ta;\n            b.f = a.qa;\n            b.N = a.ra;\n            b.ea = a.Ha;\n            b.Vd = a.Ia;\n            b.fa = a.R;\n            b.Rc = a.B;\n            b.F = null;\n            b.J = 0;\n            if (!ad) {\n              for (c = -255; 255 >= c; ++c) bd[255 + c] = 0 > c ? -c : c;\n              for (c = -1020; 1020 >= c; ++c)\n                cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;\n              for (c = -112; 112 >= c; ++c)\n                dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;\n              for (c = -255; 510 >= c; ++c)\n                ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;\n              ad = 1;\n            }\n            Nc = Oe;\n            Za = Pe;\n            Nb = Qe;\n            pa = Re;\n            Ob = Se;\n            fd = Te;\n            Xc = Ue;\n            Tc = Ve;\n            Yc = We;\n            Uc = Xe;\n            Zc = Ye;\n            Vc = Ze;\n            $c = $e;\n            Wc = af;\n            Rc = gd;\n            Pc = hd;\n            Sc = bf;\n            Qc = cf;\n            W[0] = df;\n            W[1] = ef;\n            W[2] = ff;\n            W[3] = gf;\n            W[4] = hf;\n            W[5] = jf;\n            W[6] = kf;\n            W[7] = lf;\n            W[8] = mf;\n            W[9] = nf;\n            Y[0] = of;\n            Y[1] = pf;\n            Y[2] = qf;\n            Y[3] = rf;\n            Y[4] = sf;\n            Y[5] = tf;\n            Y[6] = uf;\n            ka[0] = vf;\n            ka[1] = wf;\n            ka[2] = xf;\n            ka[3] = yf;\n            ka[4] = zf;\n            ka[5] = Af;\n            ka[6] = Bf;\n            c = 1;\n          } else c = 0;\n        }\n        c && (c = Je(a, b));\n        null != b.bc && b.bc(b);\n        c &= 1;\n      }\n      if (!c) return 0;\n      a.cb = 0;\n      return c;\n    }\n    function qa(a, b, c, d, e) {\n      e = a[b + c + 32 * d] + (e >> 3);\n      a[b + c + 32 * d] = e & -256 ? (0 > e ? 0 : 255) : e;\n    }\n    function kb(a, b, c, d, e, f) {\n      qa(a, b, 0, c, d + e);\n      qa(a, b, 1, c, d + f);\n      qa(a, b, 2, c, d - f);\n      qa(a, b, 3, c, d - e);\n    }\n    function da(a) {\n      return ((20091 * a) >> 16) + a;\n    }\n    function id(a, b, c, d) {\n      var e = 0,\n        f;\n      var g = V(16);\n      for (f = 0; 4 > f; ++f) {\n        var h = a[b + 0] + a[b + 8];\n        var k = a[b + 0] - a[b + 8];\n        var l = ((35468 * a[b + 4]) >> 16) - da(a[b + 12]);\n        var m = da(a[b + 4]) + ((35468 * a[b + 12]) >> 16);\n        g[e + 0] = h + m;\n        g[e + 1] = k + l;\n        g[e + 2] = k - l;\n        g[e + 3] = h - m;\n        e += 4;\n        b++;\n      }\n      for (f = e = 0; 4 > f; ++f)\n        (a = g[e + 0] + 4),\n          (h = a + g[e + 8]),\n          (k = a - g[e + 8]),\n          (l = ((35468 * g[e + 4]) >> 16) - da(g[e + 12])),\n          (m = da(g[e + 4]) + ((35468 * g[e + 12]) >> 16)),\n          qa(c, d, 0, 0, h + m),\n          qa(c, d, 1, 0, k + l),\n          qa(c, d, 2, 0, k - l),\n          qa(c, d, 3, 0, h - m),\n          e++,\n          (d += 32);\n    }\n    function Te(a, b, c, d) {\n      var e = a[b + 0] + 4,\n        f = (35468 * a[b + 4]) >> 16,\n        g = da(a[b + 4]),\n        h = (35468 * a[b + 1]) >> 16;\n      a = da(a[b + 1]);\n      kb(c, d, 0, e + g, a, h);\n      kb(c, d, 1, e + f, a, h);\n      kb(c, d, 2, e - f, a, h);\n      kb(c, d, 3, e - g, a, h);\n    }\n    function Pe(a, b, c, d, e) {\n      id(a, b, c, d);\n      e && id(a, b + 16, c, d + 4);\n    }\n    function Qe(a, b, c, d) {\n      Za(a, b + 0, c, d, 1);\n      Za(a, b + 32, c, d + 128, 1);\n    }\n    function Re(a, b, c, d) {\n      a = a[b + 0] + 4;\n      var e;\n      for (e = 0; 4 > e; ++e) for (b = 0; 4 > b; ++b) qa(c, d, b, e, a);\n    }\n    function Se(a, b, c, d) {\n      a[b + 0] && pa(a, b + 0, c, d);\n      a[b + 16] && pa(a, b + 16, c, d + 4);\n      a[b + 32] && pa(a, b + 32, c, d + 128);\n      a[b + 48] && pa(a, b + 48, c, d + 128 + 4);\n    }\n    function Oe(a, b, c, d) {\n      var e = V(16),\n        f;\n      for (f = 0; 4 > f; ++f) {\n        var g = a[b + 0 + f] + a[b + 12 + f];\n        var h = a[b + 4 + f] + a[b + 8 + f];\n        var k = a[b + 4 + f] - a[b + 8 + f];\n        var l = a[b + 0 + f] - a[b + 12 + f];\n        e[0 + f] = g + h;\n        e[8 + f] = g - h;\n        e[4 + f] = l + k;\n        e[12 + f] = l - k;\n      }\n      for (f = 0; 4 > f; ++f)\n        (a = e[0 + 4 * f] + 3),\n          (g = a + e[3 + 4 * f]),\n          (h = e[1 + 4 * f] + e[2 + 4 * f]),\n          (k = e[1 + 4 * f] - e[2 + 4 * f]),\n          (l = a - e[3 + 4 * f]),\n          (c[d + 0] = (g + h) >> 3),\n          (c[d + 16] = (l + k) >> 3),\n          (c[d + 32] = (g - h) >> 3),\n          (c[d + 48] = (l - k) >> 3),\n          (d += 64);\n    }\n    function Pb(a, b, c) {\n      var d = b - 32,\n        e = R,\n        f = 255 - a[d - 1],\n        g;\n      for (g = 0; g < c; ++g) {\n        var h = e,\n          k = f + a[b - 1],\n          l;\n        for (l = 0; l < c; ++l) a[b + l] = h[k + a[d + l]];\n        b += 32;\n      }\n    }\n    function ef(a, b) {\n      Pb(a, b, 4);\n    }\n    function wf(a, b) {\n      Pb(a, b, 8);\n    }\n    function pf(a, b) {\n      Pb(a, b, 16);\n    }\n    function qf(a, b) {\n      var c;\n      for (c = 0; 16 > c; ++c) I(a, b + 32 * c, a, b - 32, 16);\n    }\n    function rf(a, b) {\n      var c;\n      for (c = 16; 0 < c; --c) M(a, b, a[b - 1], 16), (b += 32);\n    }\n    function $a(a, b, c) {\n      var d;\n      for (d = 0; 16 > d; ++d) M(b, c + 32 * d, a, 16);\n    }\n    function of(a, b) {\n      var c = 16,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d] + a[b + d - 32];\n      $a(c >> 5, a, b);\n    }\n    function sf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d];\n      $a(c >> 4, a, b);\n    }\n    function tf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b + d - 32];\n      $a(c >> 4, a, b);\n    }\n    function uf(a, b) {\n      $a(128, a, b);\n    }\n    function z(a, b, c) {\n      return (a + 2 * b + c + 2) >> 2;\n    }\n    function ff(a, b) {\n      var c = b - 32,\n        c = new Uint8Array([\n          z(a[c - 1], a[c + 0], a[c + 1]),\n          z(a[c + 0], a[c + 1], a[c + 2]),\n          z(a[c + 1], a[c + 2], a[c + 3]),\n          z(a[c + 2], a[c + 3], a[c + 4])\n        ]),\n        d;\n      for (d = 0; 4 > d; ++d) I(a, b + 32 * d, c, 0, c.length);\n    }\n    function gf(a, b) {\n      var c = a[b - 1],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));\n      ra(a, b + 32, 16843009 * z(c, d, e));\n      ra(a, b + 64, 16843009 * z(d, e, f));\n      ra(a, b + 96, 16843009 * z(e, f, f));\n    }\n    function df(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 4 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      c >>= 3;\n      for (d = 0; 4 > d; ++d) M(a, b + 32 * d, c, 4);\n    }\n    function hf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);\n      a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);\n      a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);\n      a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);\n      a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);\n      a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);\n      a[b + 3 + 0] = z(l, k, h);\n    }\n    function kf(a, b) {\n      var c = a[b + 1 - 32],\n        d = a[b + 2 - 32],\n        e = a[b + 3 - 32],\n        f = a[b + 4 - 32],\n        g = a[b + 5 - 32],\n        h = a[b + 6 - 32],\n        k = a[b + 7 - 32];\n      a[b + 0 + 0] = z(a[b + 0 - 32], c, d);\n      a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);\n      a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);\n      a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);\n      a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, k);\n    }\n    function jf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 0] = a[b + 1 + 64] = (f + g + 1) >> 1;\n      a[b + 1 + 0] = a[b + 2 + 64] = (g + h + 1) >> 1;\n      a[b + 2 + 0] = a[b + 3 + 64] = (h + k + 1) >> 1;\n      a[b + 3 + 0] = (k + l + 1) >> 1;\n      a[b + 0 + 96] = z(e, d, c);\n      a[b + 0 + 64] = z(d, c, f);\n      a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);\n      a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);\n      a[b + 3 + 32] = z(h, k, l);\n    }\n    function lf(a, b) {\n      var c = a[b + 0 - 32],\n        d = a[b + 1 - 32],\n        e = a[b + 2 - 32],\n        f = a[b + 3 - 32],\n        g = a[b + 4 - 32],\n        h = a[b + 5 - 32],\n        k = a[b + 6 - 32],\n        l = a[b + 7 - 32];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 1 + 0] = a[b + 0 + 64] = (d + e + 1) >> 1;\n      a[b + 2 + 0] = a[b + 1 + 64] = (e + f + 1) >> 1;\n      a[b + 3 + 0] = a[b + 2 + 64] = (f + g + 1) >> 1;\n      a[b + 0 + 32] = z(c, d, e);\n      a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);\n      a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 3 + 64] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, l);\n    }\n    function nf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 2 + 0] = a[b + 0 + 32] = (d + e + 1) >> 1;\n      a[b + 2 + 32] = a[b + 0 + 64] = (e + f + 1) >> 1;\n      a[b + 1 + 0] = z(c, d, e);\n      a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);\n      a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);\n      a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[\n        b + 2 + 96\n      ] = a[b + 3 + 96] = f;\n    }\n    function mf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96],\n        g = a[b - 1 - 32],\n        h = a[b + 0 - 32],\n        k = a[b + 1 - 32],\n        l = a[b + 2 - 32];\n      a[b + 0 + 0] = a[b + 2 + 32] = (c + g + 1) >> 1;\n      a[b + 0 + 32] = a[b + 2 + 64] = (d + c + 1) >> 1;\n      a[b + 0 + 64] = a[b + 2 + 96] = (e + d + 1) >> 1;\n      a[b + 0 + 96] = (f + e + 1) >> 1;\n      a[b + 3 + 0] = z(h, k, l);\n      a[b + 2 + 0] = z(g, h, k);\n      a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);\n      a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);\n      a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);\n      a[b + 1 + 96] = z(f, e, d);\n    }\n    function xf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) I(a, b + 32 * c, a, b - 32, 8);\n    }\n    function yf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) M(a, b, a[b - 1], 8), (b += 32);\n    }\n    function lb(a, b, c) {\n      var d;\n      for (d = 0; 8 > d; ++d) M(b, c + 32 * d, a, 8);\n    }\n    function vf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      lb(c >> 4, a, b);\n    }\n    function Af(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32];\n      lb(c >> 3, a, b);\n    }\n    function zf(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b - 1 + 32 * d];\n      lb(c >> 3, a, b);\n    }\n    function Bf(a, b) {\n      lb(128, a, b);\n    }\n    function ab(a, b, c) {\n      var d = a[b - c],\n        e = a[b + 0],\n        f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],\n        g = mb[112 + ((f + 4) >> 3)];\n      a[b - c] = R[255 + d + mb[112 + ((f + 3) >> 3)]];\n      a[b + 0] = R[255 + e - g];\n    }\n    function jd(a, b, c, d) {\n      var e = a[b + 0],\n        f = a[b + c];\n      return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;\n    }\n    function kd(a, b, c, d) {\n      return (\n        4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d\n      );\n    }\n    function ld(a, b, c, d, e) {\n      var f = a[b - 3 * c],\n        g = a[b - 2 * c],\n        h = a[b - c],\n        k = a[b + 0],\n        l = a[b + c],\n        m = a[b + 2 * c],\n        n = a[b + 3 * c];\n      return 4 * U[255 + h - k] + U[255 + g - l] > d\n        ? 0\n        : U[255 + a[b - 4 * c] - f] <= e &&\n            U[255 + f - g] <= e &&\n            U[255 + g - h] <= e &&\n            U[255 + n - m] <= e &&\n            U[255 + m - l] <= e &&\n            U[255 + l - k] <= e;\n    }\n    function gd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d, c, e) && ab(a, b + d, c);\n    }\n    function hd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);\n    }\n    function bf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4 * c), gd(a, b, c, d);\n    }\n    function cf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4), hd(a, b, c, d);\n    }\n    function ea(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - 2 * m],\n              r = k[l - m],\n              q = k[l + 0],\n              t = k[l + m],\n              v = k[l + 2 * m],\n              p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],\n              u = (27 * p + 63) >> 7,\n              w = (18 * p + 63) >> 7,\n              p = (9 * p + 63) >> 7;\n            k[l - 3 * m] = R[255 + k[l - 3 * m] + p];\n            k[l - 2 * m] = R[255 + n + w];\n            k[l - m] = R[255 + r + u];\n            k[l + 0] = R[255 + q - u];\n            k[l + m] = R[255 + t - w];\n            k[l + 2 * m] = R[255 + v - p];\n          }\n        b += d;\n      }\n    }\n    function Fa(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - m],\n              r = k[l + 0],\n              q = k[l + m],\n              t = 3 * (r - n),\n              v = mb[112 + ((t + 4) >> 3)],\n              t = mb[112 + ((t + 3) >> 3)],\n              p = (v + 1) >> 1;\n            k[l - 2 * m] = R[255 + k[l - 2 * m] + p];\n            k[l - m] = R[255 + n + t];\n            k[l + 0] = R[255 + r - v];\n            k[l + m] = R[255 + q - p];\n          }\n        b += d;\n      }\n    }\n    function Ue(a, b, c, d, e, f) {\n      ea(a, b, c, 1, 16, d, e, f);\n    }\n    function Ve(a, b, c, d, e, f) {\n      ea(a, b, 1, c, 16, d, e, f);\n    }\n    function Ye(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4 * c), Fa(a, b, c, 1, 16, d, e, f);\n    }\n    function Ze(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4), Fa(a, b, 1, c, 16, d, e, f);\n    }\n    function We(a, b, c, d, e, f, g, h) {\n      ea(a, b, e, 1, 8, f, g, h);\n      ea(c, d, e, 1, 8, f, g, h);\n    }\n    function Xe(a, b, c, d, e, f, g, h) {\n      ea(a, b, 1, e, 8, f, g, h);\n      ea(c, d, 1, e, 8, f, g, h);\n    }\n    function $e(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4 * e, e, 1, 8, f, g, h);\n      Fa(c, d + 4 * e, e, 1, 8, f, g, h);\n    }\n    function af(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4, 1, e, 8, f, g, h);\n      Fa(c, d + 4, 1, e, 8, f, g, h);\n    }\n    function Cf() {\n      this.ba = new Cb();\n      this.ec = [];\n      this.cc = [];\n      this.Mc = [];\n      this.Dc = this.Nc = this.dc = this.fc = 0;\n      this.Oa = new Ud();\n      this.memory = 0;\n      this.Ib = \"OutputFunc\";\n      this.Jb = \"OutputAlphaFunc\";\n      this.Nd = \"OutputRowFunc\";\n    }\n    function md() {\n      this.data = [];\n      this.offset = this.kd = this.ha = this.w = 0;\n      this.na = [];\n      this.xa = this.gb = this.Ja = this.Sa = this.P = 0;\n    }\n    function Df() {\n      this.nc = this.Ea = this.b = this.hc = 0;\n      this.K = [];\n      this.w = 0;\n    }\n    function Ef() {\n      this.ua = 0;\n      this.Wa = new ac();\n      this.vb = new ac();\n      this.md = this.xc = this.wc = 0;\n      this.vc = [];\n      this.Wb = 0;\n      this.Ya = new Ub();\n      this.yc = new O();\n    }\n    function je() {\n      this.xb = this.a = 0;\n      this.l = new Oa();\n      this.ca = new Cb();\n      this.V = [];\n      this.Ba = 0;\n      this.Ta = [];\n      this.Ua = 0;\n      this.m = new Ra();\n      this.Pb = 0;\n      this.wd = new Ra();\n      this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;\n      this.s = new Ef();\n      this.ab = 0;\n      this.gc = wa(4, Df);\n      this.Oc = 0;\n    }\n    function Ff() {\n      this.Lc = this.Z = this.$a = this.i = this.c = 0;\n      this.l = new Oa();\n      this.ic = 0;\n      this.ca = [];\n      this.tb = 0;\n      this.qd = null;\n      this.rd = 0;\n    }\n    function Rb(a, b, c, d, e, f, g) {\n      a = null == a ? 0 : a[b + 0];\n      for (b = 0; b < g; ++b) (e[f + b] = (a + c[d + b]) & 255), (a = e[f + b]);\n    }\n    function Gf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h;\n        for (h = 0; h < g; ++h) e[f + h] = (a[b + h] + c[d + h]) & 255;\n      }\n    }\n    function Hf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h = a[b + 0],\n          k = h,\n          l = h,\n          m;\n        for (m = 0; m < g; ++m)\n          (h = a[b + m]),\n            (k = l + h - k),\n            (l = (c[d + m] + (k & -256 ? (0 > k ? 0 : 255) : k)) & 255),\n            (k = h),\n            (e[f + m] = l);\n      }\n    }\n    function Le(a, b, c, d) {\n      var e = b.width,\n        f = b.o;\n      x(null != a && null != b);\n      if (0 > c || 0 >= d || c + d > f) return null;\n      if (!a.Cc) {\n        if (null == a.ga) {\n          a.ga = new Ff();\n          var g;\n          (g = null == a.ga) ||\n            ((g = b.width * b.o),\n            x(0 == a.Gb.length),\n            (a.Gb = V(g)),\n            (a.Uc = 0),\n            null == a.Gb\n              ? (g = 0)\n              : ((a.mb = a.Gb), (a.nb = a.Uc), (a.rc = null), (g = 1)),\n            (g = !g));\n          if (!g) {\n            g = a.ga;\n            var h = a.Fa,\n              k = a.P,\n              l = a.qc,\n              m = a.mb,\n              n = a.nb,\n              r = k + 1,\n              q = l - 1,\n              t = g.l;\n            x(null != h && null != m && null != b);\n            ia[0] = null;\n            ia[1] = Rb;\n            ia[2] = Gf;\n            ia[3] = Hf;\n            g.ca = m;\n            g.tb = n;\n            g.c = b.width;\n            g.i = b.height;\n            x(0 < g.c && 0 < g.i);\n            if (1 >= l) b = 0;\n            else if (\n              ((g.$a = (h[k + 0] >> 0) & 3),\n              (g.Z = (h[k + 0] >> 2) & 3),\n              (g.Lc = (h[k + 0] >> 4) & 3),\n              (k = (h[k + 0] >> 6) & 3),\n              0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k)\n            )\n              b = 0;\n            else if (\n              ((t.put = kc),\n              (t.ac = gc),\n              (t.bc = lc),\n              (t.ma = g),\n              (t.width = b.width),\n              (t.height = b.height),\n              (t.Da = b.Da),\n              (t.v = b.v),\n              (t.va = b.va),\n              (t.j = b.j),\n              (t.o = b.o),\n              g.$a)\n            )\n              b: {\n                x(1 == g.$a), (b = Bc());\n                c: for (;;) {\n                  if (null == b) {\n                    b = 0;\n                    break b;\n                  }\n                  x(null != g);\n                  g.mc = b;\n                  b.c = g.c;\n                  b.i = g.i;\n                  b.l = g.l;\n                  b.l.ma = g;\n                  b.l.width = g.c;\n                  b.l.height = g.i;\n                  b.a = 0;\n                  cb(b.m, h, r, q);\n                  if (!rb(g.c, g.i, 1, b, null)) break c;\n                  1 == b.ab && 3 == b.gc[0].hc && yc(b.s)\n                    ? ((g.ic = 1),\n                      (h = b.c * b.i),\n                      (b.Ta = null),\n                      (b.Ua = 0),\n                      (b.V = V(h)),\n                      (b.Ba = 0),\n                      null == b.V ? ((b.a = 1), (b = 0)) : (b = 1))\n                    : ((g.ic = 0), (b = Ec(b, g.c)));\n                  if (!b) break c;\n                  b = 1;\n                  break b;\n                }\n                g.mc = null;\n                b = 0;\n              }\n            else b = q >= g.c * g.i;\n            g = !b;\n          }\n          if (g) return null;\n          1 != a.ga.Lc ? (a.Ga = 0) : (d = f - c);\n        }\n        x(null != a.ga);\n        x(c + d <= f);\n        a: {\n          h = a.ga;\n          b = h.c;\n          f = h.l.o;\n          if (0 == h.$a) {\n            r = a.rc;\n            q = a.Vc;\n            t = a.Fa;\n            k = a.P + 1 + c * b;\n            l = a.mb;\n            m = a.nb + c * b;\n            x(k <= a.P + a.qc);\n            if (0 != h.Z)\n              for (x(null != ia[h.Z]), g = 0; g < d; ++g)\n                ia[h.Z](r, q, t, k, l, m, b),\n                  (r = l),\n                  (q = m),\n                  (m += b),\n                  (k += b);\n            else\n              for (g = 0; g < d; ++g)\n                I(l, m, t, k, b), (r = l), (q = m), (m += b), (k += b);\n            a.rc = r;\n            a.Vc = q;\n          } else {\n            x(null != h.mc);\n            b = c + d;\n            g = h.mc;\n            x(null != g);\n            x(b <= g.i);\n            if (g.C >= b) b = 1;\n            else if ((h.ic || Aa(), h.ic)) {\n              var h = g.V,\n                r = g.Ba,\n                q = g.c,\n                v = g.i,\n                t = 1,\n                k = g.$ / q,\n                l = g.$ % q,\n                m = g.m,\n                n = g.s,\n                p = g.$,\n                u = q * v,\n                w = q * b,\n                y = n.wc,\n                A = p < w ? ha(n, l, k) : null;\n              x(p <= u);\n              x(b <= v);\n              x(yc(n));\n              c: for (;;) {\n                for (; !m.h && p < w; ) {\n                  l & y || (A = ha(n, l, k));\n                  x(null != A);\n                  Sa(m);\n                  v = ua(A.G[0], A.H[0], m);\n                  if (256 > v)\n                    (h[r + p] = v),\n                      ++p,\n                      ++l,\n                      l >= q && ((l = 0), ++k, k <= b && !(k % 16) && Ib(g, k));\n                  else if (280 > v) {\n                    var v = ib(v - 256, m);\n                    var E = ua(A.G[4], A.H[4], m);\n                    Sa(m);\n                    E = ib(E, m);\n                    E = nc(q, E);\n                    if (p >= E && u - p >= v) {\n                      var B;\n                      for (B = 0; B < v; ++B) h[r + p + B] = h[r + p + B - E];\n                    } else {\n                      t = 0;\n                      break c;\n                    }\n                    p += v;\n                    for (l += v; l >= q; )\n                      (l -= q), ++k, k <= b && !(k % 16) && Ib(g, k);\n                    p < w && l & y && (A = ha(n, l, k));\n                  } else {\n                    t = 0;\n                    break c;\n                  }\n                  x(m.h == db(m));\n                }\n                Ib(g, k > b ? b : k);\n                break c;\n              }\n              !t || (m.h && p < u) ? ((t = 0), (g.a = m.h ? 5 : 3)) : (g.$ = p);\n              b = t;\n            } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);\n            if (!b) {\n              d = 0;\n              break a;\n            }\n          }\n          c + d >= f && (a.Cc = 1);\n          d = 1;\n        }\n        if (!d) return null;\n        if (\n          a.Cc &&\n          ((d = a.ga), null != d && (d.mc = null), (a.ga = null), 0 < a.Ga)\n        )\n          return alert(\"todo:WebPDequantizeLevels\"), null;\n      }\n      return a.nb + c * e;\n    }\n    function If(a, b, c, d, e, f) {\n      for (; 0 < e--; ) {\n        var g = a,\n          h = b + (c ? 1 : 0),\n          k = a,\n          l = b + (c ? 0 : 3),\n          m;\n        for (m = 0; m < d; ++m) {\n          var n = k[l + 4 * m];\n          255 != n &&\n            ((n *= 32897),\n            (g[h + 4 * m + 0] = (g[h + 4 * m + 0] * n) >> 23),\n            (g[h + 4 * m + 1] = (g[h + 4 * m + 1] * n) >> 23),\n            (g[h + 4 * m + 2] = (g[h + 4 * m + 2] * n) >> 23));\n        }\n        b += f;\n      }\n    }\n    function Jf(a, b, c, d, e) {\n      for (; 0 < d--; ) {\n        var f;\n        for (f = 0; f < c; ++f) {\n          var g = a[b + 2 * f + 0],\n            h = a[b + 2 * f + 1],\n            k = h & 15,\n            l = 4369 * k,\n            h = (((h & 240) | (h >> 4)) * l) >> 16;\n          a[b + 2 * f + 0] =\n            (((((g & 240) | (g >> 4)) * l) >> 16) & 240) |\n            ((((((g & 15) | (g << 4)) * l) >> 16) >> 4) & 15);\n          a[b + 2 * f + 1] = (h & 240) | k;\n        }\n        b += e;\n      }\n    }\n    function Kf(a, b, c, d, e, f, g, h) {\n      var k = 255,\n        l,\n        m;\n      for (m = 0; m < e; ++m) {\n        for (l = 0; l < d; ++l) {\n          var n = a[b + l];\n          f[g + 4 * l] = n;\n          k &= n;\n        }\n        b += c;\n        g += h;\n      }\n      return 255 != k;\n    }\n    function Lf(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < e; ++f) c[d + f] = a[b + f] >> 8;\n    }\n    function Aa() {\n      za = If;\n      vc = Jf;\n      fc = Kf;\n      Fc = Lf;\n    }\n    function va(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {\n        var d,\n          E = (y - 1) >> 1;\n        var B = h[k + 0] | (l[m + 0] << 16);\n        var C = n[r + 0] | (q[t + 0] << 16);\n        x(null != a);\n        var z = (3 * B + C + 131074) >> 2;\n        b(a[e + 0], z & 255, z >> 16, v, p);\n        null != f &&\n          ((z = (3 * C + B + 131074) >> 2),\n          b(f[g + 0], z & 255, z >> 16, u, w));\n        for (d = 1; d <= E; ++d) {\n          var D = h[k + d] | (l[m + d] << 16);\n          var G = n[r + d] | (q[t + d] << 16);\n          var F = B + D + C + G + 524296;\n          var H = (F + 2 * (D + C)) >> 3;\n          F = (F + 2 * (B + G)) >> 3;\n          z = (H + B) >> 1;\n          B = (F + D) >> 1;\n          b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);\n          b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);\n          null != f &&\n            ((z = (F + C) >> 1),\n            (B = (H + G) >> 1),\n            b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c),\n            b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));\n          B = D;\n          C = G;\n        }\n        y & 1 ||\n          ((z = (3 * B + C + 131074) >> 2),\n          b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c),\n          null != f &&\n            ((z = (3 * C + B + 131074) >> 2),\n            b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));\n      };\n    }\n    function ic() {\n      P[Ca] = Mf;\n      P[Ua] = nd;\n      P[tc] = Nf;\n      P[Va] = od;\n      P[ya] = pd;\n      P[Db] = qd;\n      P[wc] = Of;\n      P[zb] = nd;\n      P[Ab] = od;\n      P[Ja] = pd;\n      P[Bb] = qd;\n    }\n    function Sb(a) {\n      return a & ~Pf ? (0 > a ? 0 : 255) : a >> rd;\n    }\n    function bb(a, b) {\n      return Sb(((19077 * a) >> 8) + ((26149 * b) >> 8) - 14234);\n    }\n    function nb(a, b, c) {\n      return Sb(\n        ((19077 * a) >> 8) - ((6419 * b) >> 8) - ((13320 * c) >> 8) + 8708\n      );\n    }\n    function Pa(a, b) {\n      return Sb(((19077 * a) >> 8) + ((33050 * b) >> 8) - 17685);\n    }\n    function Ga(a, b, c, d, e) {\n      d[e + 0] = bb(a, c);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = Pa(a, b);\n    }\n    function Tb(a, b, c, d, e) {\n      d[e + 0] = Pa(a, b);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = bb(a, c);\n    }\n    function sd(a, b, c, d, e) {\n      var f = nb(a, b, c);\n      b = ((f << 3) & 224) | (Pa(a, b) >> 3);\n      d[e + 0] = (bb(a, c) & 248) | (f >> 5);\n      d[e + 1] = b;\n    }\n    function td(a, b, c, d, e) {\n      var f = (Pa(a, b) & 240) | 15;\n      d[e + 0] = (bb(a, c) & 240) | (nb(a, b, c) >> 4);\n      d[e + 1] = f;\n    }\n    function ud(a, b, c, d, e) {\n      d[e + 0] = 255;\n      Ga(a, b, c, d, e + 1);\n    }\n    function vd(a, b, c, d, e) {\n      Tb(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function wd(a, b, c, d, e) {\n      Ga(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function la(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n) {\n        for (var d = m + (n & -2) * c; m != d; )\n          b(a[e + 0], f[g + 0], h[k + 0], l, m),\n            b(a[e + 1], f[g + 0], h[k + 0], l, m + c),\n            (e += 2),\n            ++g,\n            ++k,\n            (m += 2 * c);\n        n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);\n      };\n    }\n    function xd(a, b, c) {\n      return 0 == c ? (0 == a ? (0 == b ? 6 : 5) : 0 == b ? 4 : 0) : c;\n    }\n    function yd(a, b, c, d, e) {\n      switch (a >>> 30) {\n        case 3:\n          Za(b, c, d, e, 0);\n          break;\n        case 2:\n          fd(b, c, d, e);\n          break;\n        case 1:\n          pa(b, c, d, e);\n      }\n    }\n    function Oc(a, b) {\n      var c,\n        d,\n        e = b.M,\n        f = b.Nb,\n        g = a.oc,\n        h = a.pc + 40,\n        k = a.oc,\n        l = a.pc + 584,\n        m = a.oc,\n        n = a.pc + 600;\n      for (c = 0; 16 > c; ++c) g[h + 32 * c - 1] = 129;\n      for (c = 0; 8 > c; ++c)\n        (k[l + 32 * c - 1] = 129), (m[n + 32 * c - 1] = 129);\n      0 < e\n        ? (g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129)\n        : (M(g, h - 32 - 1, 127, 21),\n          M(k, l - 32 - 1, 127, 9),\n          M(m, n - 32 - 1, 127, 9));\n      for (d = 0; d < a.za; ++d) {\n        var r = b.ya[b.aa + d];\n        if (0 < d) {\n          for (c = -1; 16 > c; ++c) I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);\n          for (c = -1; 8 > c; ++c)\n            I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4),\n              I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);\n        }\n        var q = a.Gd,\n          t = a.Hd + d,\n          v = r.ad,\n          p = r.Hc;\n        0 < e &&\n          (I(g, h - 32, q[t].y, 0, 16),\n          I(k, l - 32, q[t].f, 0, 8),\n          I(m, n - 32, q[t].ea, 0, 8));\n        if (r.Za) {\n          var u = g;\n          var w = h - 32 + 16;\n          0 < e &&\n            (d >= a.za - 1\n              ? M(u, w, q[t].y[15], 4)\n              : I(u, w, q[t + 1].y, 0, 4));\n          for (c = 0; 4 > c; c++)\n            u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];\n          for (c = 0; 16 > c; ++c, p <<= 2)\n            (u = g), (w = h + zd[c]), W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);\n        } else if (((u = xd(d, e, r.Ob[0])), Y[u](g, h), 0 != p))\n          for (c = 0; 16 > c; ++c, p <<= 2) yd(p, v, 16 * +c, g, h + zd[c]);\n        c = r.Gc;\n        u = xd(d, e, r.Dd);\n        ka[u](k, l);\n        ka[u](m, n);\n        r = c >> 0;\n        p = v;\n        u = k;\n        w = l;\n        r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));\n        c >>= 8;\n        r = m;\n        p = n;\n        c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));\n        e < a.Ub - 1 &&\n          (I(q[t].y, 0, g, h + 480, 16),\n          I(q[t].f, 0, k, l + 224, 8),\n          I(q[t].ea, 0, m, n + 224, 8));\n        c = 8 * f * a.B;\n        q = a.sa;\n        t = a.ta + 16 * d + 16 * f * a.R;\n        v = a.qa;\n        r = a.ra + 8 * d + c;\n        p = a.Ha;\n        u = a.Ia + 8 * d + c;\n        for (c = 0; 16 > c; ++c) I(q, t + c * a.R, g, h + 32 * c, 16);\n        for (c = 0; 8 > c; ++c)\n          I(v, r + c * a.B, k, l + 32 * c, 8),\n            I(p, u + c * a.B, m, n + 32 * c, 8);\n      }\n    }\n    function Ad(a, b, c, d, e, f, g, h, k) {\n      var l = [0],\n        m = [0],\n        n = 0,\n        r = null != k ? k.kd : 0,\n        q = null != k ? k : new md();\n      if (null == a || 12 > c) return 7;\n      q.data = a;\n      q.w = b;\n      q.ha = c;\n      b = [b];\n      c = [c];\n      q.gb = [q.gb];\n      a: {\n        var t = b;\n        var v = c;\n        var p = q.gb;\n        x(null != a);\n        x(null != v);\n        x(null != p);\n        p[0] = 0;\n        if (12 <= v[0] && !fa(a, t[0], \"RIFF\")) {\n          if (fa(a, t[0] + 8, \"WEBP\")) {\n            p = 3;\n            break a;\n          }\n          var u = Ha(a, t[0] + 4);\n          if (12 > u || 4294967286 < u) {\n            p = 3;\n            break a;\n          }\n          if (r && u > v[0] - 8) {\n            p = 7;\n            break a;\n          }\n          p[0] = u;\n          t[0] += 12;\n          v[0] -= 12;\n        }\n        p = 0;\n      }\n      if (0 != p) return p;\n      u = 0 < q.gb[0];\n      for (c = c[0]; ; ) {\n        t = [0];\n        n = [n];\n        a: {\n          var w = a;\n          v = b;\n          p = c;\n          var y = n,\n            A = l,\n            z = m,\n            B = t;\n          y[0] = 0;\n          if (8 > p[0]) p = 7;\n          else {\n            if (!fa(w, v[0], \"VP8X\")) {\n              if (10 != Ha(w, v[0] + 4)) {\n                p = 3;\n                break a;\n              }\n              if (18 > p[0]) {\n                p = 7;\n                break a;\n              }\n              var C = Ha(w, v[0] + 8);\n              var D = 1 + Yb(w, v[0] + 12);\n              w = 1 + Yb(w, v[0] + 15);\n              if (2147483648 <= D * w) {\n                p = 3;\n                break a;\n              }\n              null != B && (B[0] = C);\n              null != A && (A[0] = D);\n              null != z && (z[0] = w);\n              v[0] += 18;\n              p[0] -= 18;\n              y[0] = 1;\n            }\n            p = 0;\n          }\n        }\n        n = n[0];\n        t = t[0];\n        if (0 != p) return p;\n        v = !!(t & 2);\n        if (!u && n) return 3;\n        null != f && (f[0] = !!(t & 16));\n        null != g && (g[0] = v);\n        null != h && (h[0] = 0);\n        g = l[0];\n        t = m[0];\n        if (n && v && null == k) {\n          p = 0;\n          break;\n        }\n        if (4 > c) {\n          p = 7;\n          break;\n        }\n        if ((u && n) || (!u && !n && !fa(a, b[0], \"ALPH\"))) {\n          c = [c];\n          q.na = [q.na];\n          q.P = [q.P];\n          q.Sa = [q.Sa];\n          a: {\n            C = a;\n            p = b;\n            u = c;\n            var y = q.gb,\n              A = q.na,\n              z = q.P,\n              B = q.Sa;\n            D = 22;\n            x(null != C);\n            x(null != u);\n            w = p[0];\n            var F = u[0];\n            x(null != A);\n            x(null != B);\n            A[0] = null;\n            z[0] = null;\n            for (B[0] = 0; ; ) {\n              p[0] = w;\n              u[0] = F;\n              if (8 > F) {\n                p = 7;\n                break a;\n              }\n              var G = Ha(C, w + 4);\n              if (4294967286 < G) {\n                p = 3;\n                break a;\n              }\n              var H = (8 + G + 1) & -2;\n              D += H;\n              if (0 < y && D > y) {\n                p = 3;\n                break a;\n              }\n              if (!fa(C, w, \"VP8 \") || !fa(C, w, \"VP8L\")) {\n                p = 0;\n                break a;\n              }\n              if (F[0] < H) {\n                p = 7;\n                break a;\n              }\n              fa(C, w, \"ALPH\") || ((A[0] = C), (z[0] = w + 8), (B[0] = G));\n              w += H;\n              F -= H;\n            }\n          }\n          c = c[0];\n          q.na = q.na[0];\n          q.P = q.P[0];\n          q.Sa = q.Sa[0];\n          if (0 != p) break;\n        }\n        c = [c];\n        q.Ja = [q.Ja];\n        q.xa = [q.xa];\n        a: if (\n          ((y = a),\n          (p = b),\n          (u = c),\n          (A = q.gb[0]),\n          (z = q.Ja),\n          (B = q.xa),\n          (C = p[0]),\n          (w = !fa(y, C, \"VP8 \")),\n          (D = !fa(y, C, \"VP8L\")),\n          x(null != y),\n          x(null != u),\n          x(null != z),\n          x(null != B),\n          8 > u[0])\n        )\n          p = 7;\n        else {\n          if (w || D) {\n            y = Ha(y, C + 4);\n            if (12 <= A && y > A - 12) {\n              p = 3;\n              break a;\n            }\n            if (r && y > u[0] - 8) {\n              p = 7;\n              break a;\n            }\n            z[0] = y;\n            p[0] += 8;\n            u[0] -= 8;\n            B[0] = D;\n          } else\n            (B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5)),\n              (z[0] = u[0]);\n          p = 0;\n        }\n        c = c[0];\n        q.Ja = q.Ja[0];\n        q.xa = q.xa[0];\n        b = b[0];\n        if (0 != p) break;\n        if (4294967286 < q.Ja) return 3;\n        null == h || v || (h[0] = q.xa ? 2 : 1);\n        g = [g];\n        t = [t];\n        if (q.xa) {\n          if (5 > c) {\n            p = 7;\n            break;\n          }\n          h = g;\n          r = t;\n          v = f;\n          null == a || 5 > c\n            ? (a = 0)\n            : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5)\n            ? ((u = [0]),\n              (y = [0]),\n              (A = [0]),\n              (z = new Ra()),\n              cb(z, a, b, c),\n              mc(z, u, y, A)\n                ? (null != h && (h[0] = u[0]),\n                  null != r && (r[0] = y[0]),\n                  null != v && (v[0] = A[0]),\n                  (a = 1))\n                : (a = 0))\n            : (a = 0);\n        } else {\n          if (10 > c) {\n            p = 7;\n            break;\n          }\n          h = t;\n          null == a || 10 > c || !Jc(a, b + 3, c - 3)\n            ? (a = 0)\n            : ((r = a[b + 0] | (a[b + 1] << 8) | (a[b + 2] << 16)),\n              (v = ((a[b + 7] << 8) | a[b + 6]) & 16383),\n              (a = ((a[b + 9] << 8) | a[b + 8]) & 16383),\n              r & 1 ||\n              3 < ((r >> 1) & 7) ||\n              !((r >> 4) & 1) ||\n              r >> 5 >= q.Ja ||\n              !v ||\n              !a\n                ? (a = 0)\n                : (g && (g[0] = v), h && (h[0] = a), (a = 1)));\n        }\n        if (!a) return 3;\n        g = g[0];\n        t = t[0];\n        if (n && (l[0] != g || m[0] != t)) return 3;\n        null != k &&\n          ((k[0] = q),\n          (k.offset = b - k.w),\n          x(4294967286 > b - k.w),\n          x(k.offset == k.ha - c));\n        break;\n      }\n      return 0 == p || (7 == p && n && null == k)\n        ? (null != f && (f[0] |= null != q.na && 0 < q.na.length),\n          null != d && (d[0] = g),\n          null != e && (e[0] = t),\n          0)\n        : p;\n    }\n    function hc(a, b, c) {\n      var d = b.width,\n        e = b.height,\n        f = 0,\n        g = 0,\n        h = d,\n        k = e;\n      b.Da = null != a && 0 < a.Da;\n      if (\n        b.Da &&\n        ((h = a.cd),\n        (k = a.bd),\n        (f = a.v),\n        (g = a.j),\n        11 > c || ((f &= -2), (g &= -2)),\n        0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)\n      )\n        return 0;\n      b.v = f;\n      b.j = g;\n      b.va = f + h;\n      b.o = g + k;\n      b.U = h;\n      b.T = k;\n      b.da = null != a && 0 < a.da;\n      if (b.da) {\n        c = [a.ib];\n        f = [a.hb];\n        if (!bc(h, k, c, f)) return 0;\n        b.ib = c[0];\n        b.hb = f[0];\n      }\n      b.ob = null != a && a.ob;\n      b.Kb = null == a || !a.Sd;\n      b.da && ((b.ob = b.ib < (3 * d) / 4 && b.hb < (3 * e) / 4), (b.Kb = 0));\n      return 1;\n    }\n    function Bd(a) {\n      if (null == a) return 2;\n      if (11 > a.S) {\n        var b = a.f.RGBA;\n        b.fb += (a.height - 1) * b.A;\n        b.A = -b.A;\n      } else\n        (b = a.f.kb),\n          (a = a.height),\n          (b.O += (a - 1) * b.fa),\n          (b.fa = -b.fa),\n          (b.N += ((a - 1) >> 1) * b.Ab),\n          (b.Ab = -b.Ab),\n          (b.W += ((a - 1) >> 1) * b.Db),\n          (b.Db = -b.Db),\n          null != b.F && ((b.J += (a - 1) * b.lb), (b.lb = -b.lb));\n      return 0;\n    }\n    function Cd(a, b, c, d) {\n      if (null == d || 0 >= a || 0 >= b) return 2;\n      if (null != c) {\n        if (c.Da) {\n          var e = c.cd,\n            f = c.bd,\n            g = c.v & -2,\n            h = c.j & -2;\n          if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b)\n            return 2;\n          a = e;\n          b = f;\n        }\n        if (c.da) {\n          e = [c.ib];\n          f = [c.hb];\n          if (!bc(a, b, e, f)) return 2;\n          a = e[0];\n          b = f[0];\n        }\n      }\n      d.width = a;\n      d.height = b;\n      a: {\n        var k = d.width;\n        var l = d.height;\n        a = d.S;\n        if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;\n        else {\n          if (0 >= d.Rd && null == d.sd) {\n            var g = (f = e = b = 0),\n              h = k * Dd[a],\n              m = h * l;\n            11 > a ||\n              ((b = (k + 1) / 2),\n              (f = ((l + 1) / 2) * b),\n              12 == a && ((e = k), (g = e * l)));\n            l = V(m + 2 * f + g);\n            if (null == l) {\n              a = 1;\n              break a;\n            }\n            d.sd = l;\n            11 > a\n              ? ((k = d.f.RGBA),\n                (k.eb = l),\n                (k.fb = 0),\n                (k.A = h),\n                (k.size = m))\n              : ((k = d.f.kb),\n                (k.y = l),\n                (k.O = 0),\n                (k.fa = h),\n                (k.Fd = m),\n                (k.f = l),\n                (k.N = 0 + m),\n                (k.Ab = b),\n                (k.Cd = f),\n                (k.ea = l),\n                (k.W = 0 + m + f),\n                (k.Db = b),\n                (k.Ed = f),\n                12 == a && ((k.F = l), (k.J = 0 + m + 2 * f)),\n                (k.Tc = g),\n                (k.lb = e));\n          }\n          b = 1;\n          e = d.S;\n          f = d.width;\n          g = d.height;\n          if (e >= Ca && 13 > e)\n            if (11 > e)\n              (a = d.f.RGBA),\n                (h = Math.abs(a.A)),\n                (b &= h * (g - 1) + f <= a.size),\n                (b &= h >= f * Dd[e]),\n                (b &= null != a.eb);\n            else {\n              a = d.f.kb;\n              h = (f + 1) / 2;\n              m = (g + 1) / 2;\n              k = Math.abs(a.fa);\n              var l = Math.abs(a.Ab),\n                n = Math.abs(a.Db),\n                r = Math.abs(a.lb),\n                q = r * (g - 1) + f;\n              b &= k * (g - 1) + f <= a.Fd;\n              b &= l * (m - 1) + h <= a.Cd;\n              b &= n * (m - 1) + h <= a.Ed;\n              b = b & (k >= f) & (l >= h) & (n >= h);\n              b &= null != a.y;\n              b &= null != a.f;\n              b &= null != a.ea;\n              12 == e && ((b &= r >= f), (b &= q <= a.Tc), (b &= null != a.F));\n            }\n          else b = 0;\n          a = b ? 0 : 2;\n        }\n      }\n      if (0 != a) return a;\n      null != c && c.fd && (a = Bd(d));\n      return a;\n    }\n    var xb = 64,\n      Hd = [\n        0,\n        1,\n        3,\n        7,\n        15,\n        31,\n        63,\n        127,\n        255,\n        511,\n        1023,\n        2047,\n        4095,\n        8191,\n        16383,\n        32767,\n        65535,\n        131071,\n        262143,\n        524287,\n        1048575,\n        2097151,\n        4194303,\n        8388607,\n        16777215\n      ],\n      Gd = 24,\n      ob = 32,\n      Xb = 8,\n      Id = [\n        0,\n        0,\n        1,\n        1,\n        2,\n        2,\n        2,\n        2,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7\n      ];\n    X(\"Predictor0\", \"PredictorAdd0\");\n    self.Predictor0 = function() {\n      return 4278190080;\n    };\n    self.Predictor1 = function(a) {\n      return a;\n    };\n    self.Predictor2 = function(a, b, c) {\n      return b[c + 0];\n    };\n    self.Predictor3 = function(a, b, c) {\n      return b[c + 1];\n    };\n    self.Predictor4 = function(a, b, c) {\n      return b[c - 1];\n    };\n    self.Predictor5 = function(a, b, c) {\n      return aa(aa(a, b[c + 1]), b[c + 0]);\n    };\n    self.Predictor6 = function(a, b, c) {\n      return aa(a, b[c - 1]);\n    };\n    self.Predictor7 = function(a, b, c) {\n      return aa(a, b[c + 0]);\n    };\n    self.Predictor8 = function(a, b, c) {\n      return aa(b[c - 1], b[c + 0]);\n    };\n    self.Predictor9 = function(a, b, c) {\n      return aa(b[c + 0], b[c + 1]);\n    };\n    self.Predictor10 = function(a, b, c) {\n      return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));\n    };\n    self.Predictor11 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return 0 >=\n        Ia((d >> 24) & 255, (a >> 24) & 255, (b >> 24) & 255) +\n          Ia((d >> 16) & 255, (a >> 16) & 255, (b >> 16) & 255) +\n          Ia((d >> 8) & 255, (a >> 8) & 255, (b >> 8) & 255) +\n          Ia(d & 255, a & 255, b & 255)\n        ? d\n        : a;\n    };\n    self.Predictor12 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return (\n        ((sa(((a >> 24) & 255) + ((d >> 24) & 255) - ((b >> 24) & 255)) << 24) |\n          (sa(((a >> 16) & 255) + ((d >> 16) & 255) - ((b >> 16) & 255)) <<\n            16) |\n          (sa(((a >> 8) & 255) + ((d >> 8) & 255) - ((b >> 8) & 255)) << 8) |\n          sa((a & 255) + (d & 255) - (b & 255))) >>>\n        0\n      );\n    };\n    self.Predictor13 = function(a, b, c) {\n      var d = b[c - 1];\n      a = aa(a, b[c + 0]);\n      return (\n        ((eb((a >> 24) & 255, (d >> 24) & 255) << 24) |\n          (eb((a >> 16) & 255, (d >> 16) & 255) << 16) |\n          (eb((a >> 8) & 255, (d >> 8) & 255) << 8) |\n          eb((a >> 0) & 255, (d >> 0) & 255)) >>>\n        0\n      );\n    };\n    var ee = self.PredictorAdd0;\n    self.PredictorAdd1 = cc;\n    X(\"Predictor2\", \"PredictorAdd2\");\n    X(\"Predictor3\", \"PredictorAdd3\");\n    X(\"Predictor4\", \"PredictorAdd4\");\n    X(\"Predictor5\", \"PredictorAdd5\");\n    X(\"Predictor6\", \"PredictorAdd6\");\n    X(\"Predictor7\", \"PredictorAdd7\");\n    X(\"Predictor8\", \"PredictorAdd8\");\n    X(\"Predictor9\", \"PredictorAdd9\");\n    X(\"Predictor10\", \"PredictorAdd10\");\n    X(\"Predictor11\", \"PredictorAdd11\");\n    X(\"Predictor12\", \"PredictorAdd12\");\n    X(\"Predictor13\", \"PredictorAdd13\");\n    var fe = self.PredictorAdd2;\n    ec(\n      \"ColorIndexInverseTransform\",\n      \"MapARGB\",\n      \"32b\",\n      function(a) {\n        return (a >> 8) & 255;\n      },\n      function(a) {\n        return a;\n      }\n    );\n    ec(\n      \"VP8LColorIndexInverseTransformAlpha\",\n      \"MapAlpha\",\n      \"8b\",\n      function(a) {\n        return a;\n      },\n      function(a) {\n        return (a >> 8) & 255;\n      }\n    );\n    var rc = self.ColorIndexInverseTransform,\n      ke = self.MapARGB,\n      he = self.VP8LColorIndexInverseTransformAlpha,\n      le = self.MapAlpha,\n      pc,\n      qc = (self.VP8LPredictorsAdd = []);\n    qc.length = 16;\n    (self.VP8LPredictors = []).length = 16;\n    (self.VP8LPredictorsAdd_C = []).length = 16;\n    (self.VP8LPredictors_C = []).length = 16;\n    var Fb,\n      sc,\n      Gb,\n      Hb,\n      xc,\n      uc,\n      bd = V(511),\n      cd = V(2041),\n      dd = V(225),\n      ed = V(767),\n      ad = 0,\n      Qb = cd,\n      mb = dd,\n      R = ed,\n      U = bd,\n      Ca = 0,\n      Ua = 1,\n      tc = 2,\n      Va = 3,\n      ya = 4,\n      Db = 5,\n      wc = 6,\n      zb = 7,\n      Ab = 8,\n      Ja = 9,\n      Bb = 10,\n      pe = [2, 3, 7],\n      oe = [3, 3, 11],\n      Dc = [280, 256, 256, 256, 40],\n      qe = [0, 1, 1, 1, 0],\n      ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n      de = [\n        24,\n        7,\n        23,\n        25,\n        40,\n        6,\n        39,\n        41,\n        22,\n        26,\n        38,\n        42,\n        56,\n        5,\n        55,\n        57,\n        21,\n        27,\n        54,\n        58,\n        37,\n        43,\n        72,\n        4,\n        71,\n        73,\n        20,\n        28,\n        53,\n        59,\n        70,\n        74,\n        36,\n        44,\n        88,\n        69,\n        75,\n        52,\n        60,\n        3,\n        87,\n        89,\n        19,\n        29,\n        86,\n        90,\n        35,\n        45,\n        68,\n        76,\n        85,\n        91,\n        51,\n        61,\n        104,\n        2,\n        103,\n        105,\n        18,\n        30,\n        102,\n        106,\n        34,\n        46,\n        84,\n        92,\n        67,\n        77,\n        101,\n        107,\n        50,\n        62,\n        120,\n        1,\n        119,\n        121,\n        83,\n        93,\n        17,\n        31,\n        100,\n        108,\n        66,\n        78,\n        118,\n        122,\n        33,\n        47,\n        117,\n        123,\n        49,\n        63,\n        99,\n        109,\n        82,\n        94,\n        0,\n        116,\n        124,\n        65,\n        79,\n        16,\n        32,\n        98,\n        110,\n        48,\n        115,\n        125,\n        81,\n        95,\n        64,\n        114,\n        126,\n        97,\n        111,\n        80,\n        113,\n        127,\n        96,\n        112\n      ],\n      me = [\n        2954,\n        2956,\n        2958,\n        2962,\n        2970,\n        2986,\n        3018,\n        3082,\n        3212,\n        3468,\n        3980,\n        5004\n      ],\n      ie = 8,\n      Lb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        17,\n        18,\n        19,\n        20,\n        20,\n        21,\n        21,\n        22,\n        22,\n        23,\n        23,\n        24,\n        25,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        59,\n        60,\n        61,\n        62,\n        63,\n        64,\n        65,\n        66,\n        67,\n        68,\n        69,\n        70,\n        71,\n        72,\n        73,\n        74,\n        75,\n        76,\n        76,\n        77,\n        78,\n        79,\n        80,\n        81,\n        82,\n        83,\n        84,\n        85,\n        86,\n        87,\n        88,\n        89,\n        91,\n        93,\n        95,\n        96,\n        98,\n        100,\n        101,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        118,\n        122,\n        124,\n        126,\n        128,\n        130,\n        132,\n        134,\n        136,\n        138,\n        140,\n        143,\n        145,\n        148,\n        151,\n        154,\n        157\n      ],\n      Mb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        18,\n        19,\n        20,\n        21,\n        22,\n        23,\n        24,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        60,\n        62,\n        64,\n        66,\n        68,\n        70,\n        72,\n        74,\n        76,\n        78,\n        80,\n        82,\n        84,\n        86,\n        88,\n        90,\n        92,\n        94,\n        96,\n        98,\n        100,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        119,\n        122,\n        125,\n        128,\n        131,\n        134,\n        137,\n        140,\n        143,\n        146,\n        149,\n        152,\n        155,\n        158,\n        161,\n        164,\n        167,\n        170,\n        173,\n        177,\n        181,\n        185,\n        189,\n        193,\n        197,\n        201,\n        205,\n        209,\n        213,\n        217,\n        221,\n        225,\n        229,\n        234,\n        239,\n        245,\n        249,\n        254,\n        259,\n        264,\n        269,\n        274,\n        279,\n        284\n      ],\n      oa = null,\n      He = [\n        [173, 148, 140, 0],\n        [176, 155, 140, 135, 0],\n        [180, 157, 141, 134, 130, 0],\n        [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]\n      ],\n      Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],\n      Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],\n      Fe = [\n        [\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],\n            [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128],\n            [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],\n            [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],\n            [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]\n          ],\n          [\n            [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],\n            [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],\n            [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],\n            [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],\n            [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128],\n            [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],\n            [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],\n            [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],\n            [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],\n            [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],\n            [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]\n          ],\n          [\n            [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],\n            [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],\n            [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]\n          ],\n          [\n            [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],\n            [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],\n            [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]\n          ],\n          [\n            [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],\n            [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],\n            [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],\n            [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],\n            [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]\n          ],\n          [\n            [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],\n            [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],\n            [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],\n            [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],\n            [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]\n          ],\n          [\n            [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],\n            [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],\n            [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128],\n            [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]\n          ],\n          [\n            [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],\n            [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],\n            [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],\n            [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],\n            [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]\n          ],\n          [\n            [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],\n            [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],\n            [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],\n            [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],\n            [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],\n            [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],\n            [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],\n            [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]\n          ],\n          [\n            [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],\n            [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],\n            [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]\n          ],\n          [\n            [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],\n            [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],\n            [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]\n          ],\n          [\n            [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],\n            [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128],\n            [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]\n          ],\n          [\n            [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],\n            [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],\n            [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]\n          ],\n          [\n            [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],\n            [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],\n            [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],\n            [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],\n            [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ]\n      ],\n      Ke = [\n        [\n          [231, 120, 48, 89, 115, 113, 120, 152, 112],\n          [152, 179, 64, 126, 170, 118, 46, 70, 95],\n          [175, 69, 143, 80, 85, 82, 72, 155, 103],\n          [56, 58, 10, 171, 218, 189, 17, 13, 152],\n          [114, 26, 17, 163, 44, 195, 21, 10, 173],\n          [121, 24, 80, 195, 26, 62, 44, 64, 85],\n          [144, 71, 10, 38, 171, 213, 144, 34, 26],\n          [170, 46, 55, 19, 136, 160, 33, 206, 71],\n          [63, 20, 8, 114, 114, 208, 12, 9, 226],\n          [81, 40, 11, 96, 182, 84, 29, 16, 36]\n        ],\n        [\n          [134, 183, 89, 137, 98, 101, 106, 165, 148],\n          [72, 187, 100, 130, 157, 111, 32, 75, 80],\n          [66, 102, 167, 99, 74, 62, 40, 234, 128],\n          [41, 53, 9, 178, 241, 141, 26, 8, 107],\n          [74, 43, 26, 146, 73, 166, 49, 23, 157],\n          [65, 38, 105, 160, 51, 52, 31, 115, 128],\n          [104, 79, 12, 27, 217, 255, 87, 17, 7],\n          [87, 68, 71, 44, 114, 51, 15, 186, 23],\n          [47, 41, 14, 110, 182, 183, 21, 17, 194],\n          [66, 45, 25, 102, 197, 189, 23, 18, 22]\n        ],\n        [\n          [88, 88, 147, 150, 42, 46, 45, 196, 205],\n          [43, 97, 183, 117, 85, 38, 35, 179, 61],\n          [39, 53, 200, 87, 26, 21, 43, 232, 171],\n          [56, 34, 51, 104, 114, 102, 29, 93, 77],\n          [39, 28, 85, 171, 58, 165, 90, 98, 64],\n          [34, 22, 116, 206, 23, 34, 43, 166, 73],\n          [107, 54, 32, 26, 51, 1, 81, 43, 31],\n          [68, 25, 106, 22, 64, 171, 36, 225, 114],\n          [34, 19, 21, 102, 132, 188, 16, 76, 124],\n          [62, 18, 78, 95, 85, 57, 50, 48, 51]\n        ],\n        [\n          [193, 101, 35, 159, 215, 111, 89, 46, 111],\n          [60, 148, 31, 172, 219, 228, 21, 18, 111],\n          [112, 113, 77, 85, 179, 255, 38, 120, 114],\n          [40, 42, 1, 196, 245, 209, 10, 25, 109],\n          [88, 43, 29, 140, 166, 213, 37, 43, 154],\n          [61, 63, 30, 155, 67, 45, 68, 1, 209],\n          [100, 80, 8, 43, 154, 1, 51, 26, 71],\n          [142, 78, 78, 16, 255, 128, 34, 197, 171],\n          [41, 40, 5, 102, 211, 183, 4, 1, 221],\n          [51, 50, 17, 168, 209, 192, 23, 25, 82]\n        ],\n        [\n          [138, 31, 36, 171, 27, 166, 38, 44, 229],\n          [67, 87, 58, 169, 82, 115, 26, 59, 179],\n          [63, 59, 90, 180, 59, 166, 93, 73, 154],\n          [40, 40, 21, 116, 143, 209, 34, 39, 175],\n          [47, 15, 16, 183, 34, 223, 49, 45, 183],\n          [46, 17, 33, 183, 6, 98, 15, 32, 183],\n          [57, 46, 22, 24, 128, 1, 54, 17, 37],\n          [65, 32, 73, 115, 28, 128, 23, 128, 205],\n          [40, 3, 9, 115, 51, 192, 18, 6, 223],\n          [87, 37, 9, 115, 59, 77, 64, 21, 47]\n        ],\n        [\n          [104, 55, 44, 218, 9, 54, 53, 130, 226],\n          [64, 90, 70, 205, 40, 41, 23, 26, 57],\n          [54, 57, 112, 184, 5, 41, 38, 166, 213],\n          [30, 34, 26, 133, 152, 116, 10, 32, 134],\n          [39, 19, 53, 221, 26, 114, 32, 73, 255],\n          [31, 9, 65, 234, 2, 15, 1, 118, 73],\n          [75, 32, 12, 51, 192, 255, 160, 43, 51],\n          [88, 31, 35, 67, 102, 85, 55, 186, 85],\n          [56, 21, 23, 111, 59, 205, 45, 37, 192],\n          [55, 38, 70, 124, 73, 102, 1, 34, 98]\n        ],\n        [\n          [125, 98, 42, 88, 104, 85, 117, 175, 82],\n          [95, 84, 53, 89, 128, 100, 113, 101, 45],\n          [75, 79, 123, 47, 51, 128, 81, 171, 1],\n          [57, 17, 5, 71, 102, 57, 53, 41, 49],\n          [38, 33, 13, 121, 57, 73, 26, 1, 85],\n          [41, 10, 67, 138, 77, 110, 90, 47, 114],\n          [115, 21, 2, 10, 102, 255, 166, 23, 6],\n          [101, 29, 16, 10, 85, 128, 101, 196, 26],\n          [57, 18, 10, 102, 102, 213, 34, 20, 43],\n          [117, 20, 15, 36, 163, 128, 68, 1, 26]\n        ],\n        [\n          [102, 61, 71, 37, 34, 53, 31, 243, 192],\n          [69, 60, 71, 38, 73, 119, 28, 222, 37],\n          [68, 45, 128, 34, 1, 47, 11, 245, 171],\n          [62, 17, 19, 70, 146, 85, 55, 62, 70],\n          [37, 43, 37, 154, 100, 163, 85, 160, 1],\n          [63, 9, 92, 136, 28, 64, 32, 201, 85],\n          [75, 15, 9, 9, 64, 255, 184, 119, 16],\n          [86, 6, 28, 5, 64, 255, 25, 248, 1],\n          [56, 8, 17, 132, 137, 255, 55, 116, 128],\n          [58, 15, 20, 82, 135, 57, 26, 121, 40]\n        ],\n        [\n          [164, 50, 31, 137, 154, 133, 25, 35, 218],\n          [51, 103, 44, 131, 131, 123, 31, 6, 158],\n          [86, 40, 64, 135, 148, 224, 45, 183, 128],\n          [22, 26, 17, 131, 240, 154, 14, 1, 209],\n          [45, 16, 21, 91, 64, 222, 7, 1, 197],\n          [56, 21, 39, 155, 60, 138, 23, 102, 213],\n          [83, 12, 13, 54, 192, 255, 68, 47, 28],\n          [85, 26, 85, 85, 128, 128, 32, 146, 171],\n          [18, 11, 7, 63, 144, 171, 4, 4, 246],\n          [35, 27, 10, 146, 174, 171, 12, 26, 128]\n        ],\n        [\n          [190, 80, 35, 99, 180, 80, 126, 54, 45],\n          [85, 126, 47, 87, 176, 51, 41, 20, 32],\n          [101, 75, 128, 139, 118, 146, 116, 128, 85],\n          [56, 41, 15, 176, 236, 85, 37, 9, 62],\n          [71, 30, 17, 119, 118, 255, 17, 18, 138],\n          [101, 38, 60, 138, 55, 70, 43, 26, 142],\n          [146, 36, 19, 30, 171, 255, 97, 27, 20],\n          [138, 45, 61, 62, 219, 1, 81, 188, 64],\n          [32, 41, 20, 117, 151, 142, 20, 21, 163],\n          [112, 19, 12, 61, 195, 128, 48, 4, 24]\n        ]\n      ],\n      Ee = [\n        [\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],\n            [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255],\n            [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],\n            [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ]\n      ],\n      Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],\n      Nc,\n      Y = [],\n      W = [],\n      ka = [],\n      Za,\n      fd,\n      Nb,\n      pa,\n      Ob,\n      Xc,\n      Tc,\n      Yc,\n      Uc,\n      Zc,\n      Vc,\n      $c,\n      Wc,\n      Rc,\n      Pc,\n      Sc,\n      Qc,\n      re = 1,\n      Cc = 2,\n      ia = [],\n      za,\n      vc,\n      fc,\n      Fc,\n      P = [];\n    va(\"UpsampleRgbLinePair\", Ga, 3);\n    va(\"UpsampleBgrLinePair\", Tb, 3);\n    va(\"UpsampleRgbaLinePair\", wd, 4);\n    va(\"UpsampleBgraLinePair\", vd, 4);\n    va(\"UpsampleArgbLinePair\", ud, 4);\n    va(\"UpsampleRgba4444LinePair\", td, 2);\n    va(\"UpsampleRgb565LinePair\", sd, 2);\n    var Mf = self.UpsampleRgbLinePair,\n      Nf = self.UpsampleBgrLinePair,\n      nd = self.UpsampleRgbaLinePair,\n      od = self.UpsampleBgraLinePair,\n      pd = self.UpsampleArgbLinePair,\n      qd = self.UpsampleRgba4444LinePair,\n      Of = self.UpsampleRgb565LinePair,\n      Wa = 16,\n      Ba = 1 << (Wa - 1),\n      ta = -227,\n      Eb = 482,\n      rd = 6,\n      Pf = (256 << rd) - 1,\n      jc = 0,\n      Yd = V(256),\n      ae = V(256),\n      $d = V(256),\n      Zd = V(256),\n      be = V(Eb - ta),\n      ce = V(Eb - ta);\n    la(\"YuvToRgbRow\", Ga, 3);\n    la(\"YuvToBgrRow\", Tb, 3);\n    la(\"YuvToRgbaRow\", wd, 4);\n    la(\"YuvToBgraRow\", vd, 4);\n    la(\"YuvToArgbRow\", ud, 4);\n    la(\"YuvToRgba4444Row\", td, 2);\n    la(\"YuvToRgb565Row\", sd, 2);\n    var zd = [\n        0,\n        4,\n        8,\n        12,\n        128,\n        132,\n        136,\n        140,\n        256,\n        260,\n        264,\n        268,\n        384,\n        388,\n        392,\n        396\n      ],\n      Ya = [0, 2, 8],\n      Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],\n      Ne = 1;\n    this.WebPDecodeRGBA = function(a, b, c, d, e) {\n      var f = Ua;\n      var g = new Cf(),\n        h = new Cb();\n      g.ba = h;\n      h.S = f;\n      h.width = [h.width];\n      h.height = [h.height];\n      var k = h.width;\n      var l = h.height,\n        m = new Td();\n      if (null == m || null == a) var n = 2;\n      else\n        x(null != m),\n          (n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null));\n      0 != n\n        ? (k = 0)\n        : (null != k && (k[0] = m.width[0]),\n          null != l && (l[0] = m.height[0]),\n          (k = 1));\n      if (k) {\n        h.width = h.width[0];\n        h.height = h.height[0];\n        null != d && (d[0] = h.width);\n        null != e && (e[0] = h.height);\n        b: {\n          d = new Oa();\n          e = new md();\n          e.data = a;\n          e.w = b;\n          e.ha = c;\n          e.kd = 1;\n          b = [0];\n          x(null != e);\n          a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);\n          (0 == a || 7 == a) && b[0] && (a = 4);\n          b = a;\n          if (0 == b) {\n            x(null != g);\n            d.data = e.data;\n            d.w = e.w + e.offset;\n            d.ha = e.ha - e.offset;\n            d.put = kc;\n            d.ac = gc;\n            d.bc = lc;\n            d.ma = g;\n            if (e.xa) {\n              a = Bc();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              if (te(a, d)) {\n                b = Cd(d.width, d.height, g.Oa, g.ba);\n                if ((d = 0 == b)) {\n                  c: {\n                    d = a;\n                    d: for (;;) {\n                      if (null == d) {\n                        d = 0;\n                        break c;\n                      }\n                      x(null != d.s.yc);\n                      x(null != d.s.Ya);\n                      x(0 < d.s.Wb);\n                      c = d.l;\n                      x(null != c);\n                      e = c.ma;\n                      x(null != e);\n                      if (0 != d.xb) {\n                        d.ca = e.ba;\n                        d.tb = e.tb;\n                        x(null != d.ca);\n                        if (!hc(e.Oa, c, Va)) {\n                          d.a = 2;\n                          break d;\n                        }\n                        if (!Ec(d, c.width)) break d;\n                        if (c.da) break d;\n                        (c.da || hb(d.ca.S)) && Aa();\n                        11 > d.ca.S ||\n                          (alert(\"todo:WebPInitConvertARGBToYUV\"),\n                          null != d.ca.f.kb.F && Aa());\n                        if (\n                          d.Pb &&\n                          0 < d.s.ua &&\n                          null == d.s.vb.X &&\n                          !Zb(d.s.vb, d.s.Wa.Xa)\n                        ) {\n                          d.a = 1;\n                          break d;\n                        }\n                        d.xb = 0;\n                      }\n                      if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;\n                      e.Dc = d.Ma;\n                      d = 1;\n                      break c;\n                    }\n                    x(0 != d.a);\n                    d = 0;\n                  }\n                  d = !d;\n                }\n                d && (b = a.a);\n              } else b = a.a;\n            } else {\n              a = new Ce();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              a.Fa = e.na;\n              a.P = e.P;\n              a.qc = e.Sa;\n              if (Kc(a, d)) {\n                if (((b = Cd(d.width, d.height, g.Oa, g.ba)), 0 == b)) {\n                  a.Aa = 0;\n                  c = g.Oa;\n                  e = a;\n                  x(null != e);\n                  if (null != c) {\n                    k = c.Md;\n                    k = 0 > k ? 0 : 100 < k ? 255 : (255 * k) / 100;\n                    if (0 < k) {\n                      for (l = m = 0; 4 > l; ++l)\n                        (n = e.pb[l]),\n                          12 > n.lc &&\n                            (n.ia = (k * Qf[0 > n.lc ? 0 : n.lc]) >> 3),\n                          (m |= n.ia);\n                      m && (alert(\"todo:VP8InitRandom\"), (e.ia = 1));\n                    }\n                    e.Ga = c.Id;\n                    100 < e.Ga ? (e.Ga = 100) : 0 > e.Ga && (e.Ga = 0);\n                  }\n                  Me(a, d) || (b = a.a);\n                }\n              } else b = a.a;\n            }\n            0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));\n          }\n          g = b;\n        }\n        f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;\n      } else f = null;\n      return f;\n    };\n    var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];\n  };\n  new _WebPDecoder();\n\n  /** @license\n   * Copyright (c) 2017 Dominik Homberger\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nhttps://webpjs.appspot.com\nWebPRiffParser dominikhlbg@gmail.com\n*/\n\n  function memcmp(data, data_off, str, size) {\n    for (var i = 0; i < size; i++)\n      if (data[data_off + i] != str.charCodeAt(i)) return true;\n    return false;\n  }\n\n  function GetTag(data, data_off) {\n    var str = \"\";\n    for (var i = 0; i < 4; i++) str += String.fromCharCode(data[data_off++]);\n    return str;\n  }\n\n  function GetLE16(data, data_off) {\n    return (data[data_off + 0] << 0) | (data[data_off + 1] << 8);\n  }\n\n  function GetLE24(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16)) >>>\n      0\n    );\n  }\n\n  function GetLE32(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16) |\n        (data[data_off + 3] << 24)) >>>\n      0\n    );\n  }\n\n  function WebPRiffParser(src, src_off) {\n    var imagearray = {};\n    var i = 0;\n    var alpha_chunk = false;\n    var alpha_size = 0;\n    var alpha_offset = 0;\n    imagearray[\"frames\"] = [];\n    if (memcmp(src, src_off, \"RIFF\", 4)) return;\n    src_off += 4;\n    var riff_size = GetLE32(src, src_off) + 8;\n    src_off += 8;\n\n    while (src_off < src.length) {\n      var fourcc = GetTag(src, src_off);\n      src_off += 4;\n\n      var payload_size = GetLE32(src, src_off);\n      src_off += 4;\n      var payload_size_padded = payload_size + (payload_size & 1);\n\n      switch (fourcc) {\n        case \"VP8 \":\n        case \"VP8L\":\n          if (typeof imagearray[\"frames\"][i] === \"undefined\")\n            imagearray[\"frames\"][i] = {};\n          var obj = imagearray[\"frames\"][i];\n          var height = [0];\n          var width = [0];\n          obj[\"src_off\"] = alpha_chunk ? alpha_offset : src_off - 8;\n          obj[\"src_size\"] = alpha_size + payload_size + 8;\n          //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);\n          //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};\n          i++;\n          if (alpha_chunk) {\n            alpha_chunk = false;\n            alpha_size = 0;\n            alpha_offset = 0;\n          }\n          break;\n        case \"VP8X\":\n          var obj = (imagearray[\"header\"] = {});\n          var feature_flags = (obj[\"feature_flags\"] = src[src_off]);\n          var src_off_ = src_off + 4;\n          var canvas_width = (obj[\"canvas_width\"] = 1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          var canvas_height = (obj[\"canvas_height\"] =\n            1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          break;\n        case \"ALPH\":\n          alpha_chunk = true;\n          alpha_size = payload_size_padded + 8;\n          alpha_offset = src_off - 8;\n          break;\n\n        case \"ANIM\":\n          var obj = imagearray[\"header\"];\n          var bgcolor = (obj[\"bgcolor\"] = GetLE32(src, src_off));\n          src_off_ = src_off + 4;\n\n          var loop_count = (obj[\"loop_count\"] = GetLE16(src, src_off_));\n          src_off_ += 2;\n          break;\n        case \"ANMF\":\n          var offset_x = 0,\n            offset_y = 0,\n            width = 0,\n            height = 0,\n            duration = 0,\n            blend = 0,\n            dispose = 0,\n            temp = 0;\n          var obj = (imagearray[\"frames\"][i] = {});\n          obj[\"offset_x\"] = offset_x = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"offset_y\"] = offset_y = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"width\"] = width = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"height\"] = height = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"duration\"] = duration = GetLE24(src, src_off);\n          src_off += 3;\n          temp = src[src_off++];\n          obj[\"dispose\"] = dispose = temp & 1;\n          obj[\"blend\"] = blend = (temp >> 1) & 1;\n          break;\n        default:\n      }\n      if (fourcc != \"ANMF\") src_off += payload_size_padded;\n    }\n    return imagearray;\n  }\n\n  var height = [0];\n  var width = [0];\n  var pixels = [];\n  var webpdecoder = new _WebPDecoder();\n\n  var response = imageData;\n  var imagearray = WebPRiffParser(response, 0);\n  imagearray[\"response\"] = response;\n  imagearray[\"rgbaoutput\"] = true;\n  imagearray[\"dataurl\"] = false;\n\n  var header = imagearray[\"header\"] ? imagearray[\"header\"] : null;\n  var frames = imagearray[\"frames\"] ? imagearray[\"frames\"] : null;\n\n  if (header) {\n    header[\"loop_counter\"] = header[\"loop_count\"];\n    height = [header[\"canvas_height\"]];\n    width = [header[\"canvas_width\"]];\n\n    var blend = false;\n    for (var f = 0; f < frames.length; f++)\n      if (frames[f][\"blend\"] == 0) {\n        blend = true;\n        break;\n      }\n  }\n\n  var frame = frames[0];\n  var rgba = webpdecoder.WebPDecodeRGBA(\n    response,\n    frame[\"src_off\"],\n    frame[\"src_size\"],\n    width,\n    height\n  );\n  frame[\"rgba\"] = rgba;\n  frame[\"imgwidth\"] = width[0];\n  frame[\"imgheight\"] = height[0];\n\n  for (var i = 0; i < width[0] * height[0] * 4; i++) {\n    pixels[i] = rgba[i];\n  }\n\n  this.width = width;\n  this.height = height;\n  this.data = pixels;\n  return this;\n}\n\nWebPDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { WebPDecoder };\n","/**\n * @license\n * Copyright (c) 2019 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { WebPDecoder } from \"../libs/WebPDecoder.js\";\n\n/**\n * jsPDF webp Support PlugIn\n *\n * @name webp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processWEBP = function(imageData, index, alias, compression) {\n    var reader = new WebPDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","/**\n * @license\n *\n * Copyright (c) 2021 Antti Palola, https://github.com/Pantura\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF RGBA array PlugIn\n * @name rgba_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name processRGBA\n   * @function\n   *\n   * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].\n   * RGBA array data can be obtained from DOM canvas getImageData.\n   * @ignore\n   */\n  jsPDFAPI.processRGBA = function(imageData, index, alias) {\n    \"use strict\";\n\n    var imagePixels = imageData.data;\n    var length = imagePixels.length;\n    // jsPDF takes alpha data separately so extract that.\n    var rgbOut = new Uint8Array((length / 4) * 3);\n    var alphaOut = new Uint8Array(length / 4);\n    var outIndex = 0;\n    var alphaIndex = 0;\n\n    for (var i = 0; i < length; i += 4) {\n      var r = imagePixels[i];\n      var g = imagePixels[i + 1];\n      var b = imagePixels[i + 2];\n      var alpha = imagePixels[i + 3];\n      rgbOut[outIndex++] = r;\n      rgbOut[outIndex++] = g;\n      rgbOut[outIndex++] = b;\n      alphaOut[alphaIndex++] = alpha;\n    }\n\n    var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);\n    var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);\n\n    return {\n      alpha: alphaData,\n      data: rgbData,\n      index: index,\n      alias: alias,\n      colorSpace: \"DeviceRGB\",\n      bitsPerComponent: 8,\n      width: imageData.width,\n      height: imageData.height\n    };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF setLanguage Plugin\n *\n * @name setLanguage\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Add Language Tag to the generated PDF\n   *\n   * @name setLanguage\n   * @function\n   * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF()\n   * doc.text(10, 10, 'This is a test')\n   * doc.setLanguage(\"en-US\")\n   * doc.save('english.pdf')\n   */\n  jsPDFAPI.setLanguage = function(langCode) {\n    \"use strict\";\n\n    var langCodes = {\n      af: \"Afrikaans\",\n      sq: \"Albanian\",\n      ar: \"Arabic (Standard)\",\n      \"ar-DZ\": \"Arabic (Algeria)\",\n      \"ar-BH\": \"Arabic (Bahrain)\",\n      \"ar-EG\": \"Arabic (Egypt)\",\n      \"ar-IQ\": \"Arabic (Iraq)\",\n      \"ar-JO\": \"Arabic (Jordan)\",\n      \"ar-KW\": \"Arabic (Kuwait)\",\n      \"ar-LB\": \"Arabic (Lebanon)\",\n      \"ar-LY\": \"Arabic (Libya)\",\n      \"ar-MA\": \"Arabic (Morocco)\",\n      \"ar-OM\": \"Arabic (Oman)\",\n      \"ar-QA\": \"Arabic (Qatar)\",\n      \"ar-SA\": \"Arabic (Saudi Arabia)\",\n      \"ar-SY\": \"Arabic (Syria)\",\n      \"ar-TN\": \"Arabic (Tunisia)\",\n      \"ar-AE\": \"Arabic (U.A.E.)\",\n      \"ar-YE\": \"Arabic (Yemen)\",\n      an: \"Aragonese\",\n      hy: \"Armenian\",\n      as: \"Assamese\",\n      ast: \"Asturian\",\n      az: \"Azerbaijani\",\n      eu: \"Basque\",\n      be: \"Belarusian\",\n      bn: \"Bengali\",\n      bs: \"Bosnian\",\n      br: \"Breton\",\n      bg: \"Bulgarian\",\n      my: \"Burmese\",\n      ca: \"Catalan\",\n      ch: \"Chamorro\",\n      ce: \"Chechen\",\n      zh: \"Chinese\",\n      \"zh-HK\": \"Chinese (Hong Kong)\",\n      \"zh-CN\": \"Chinese (PRC)\",\n      \"zh-SG\": \"Chinese (Singapore)\",\n      \"zh-TW\": \"Chinese (Taiwan)\",\n      cv: \"Chuvash\",\n      co: \"Corsican\",\n      cr: \"Cree\",\n      hr: \"Croatian\",\n      cs: \"Czech\",\n      da: \"Danish\",\n      nl: \"Dutch (Standard)\",\n      \"nl-BE\": \"Dutch (Belgian)\",\n      en: \"English\",\n      \"en-AU\": \"English (Australia)\",\n      \"en-BZ\": \"English (Belize)\",\n      \"en-CA\": \"English (Canada)\",\n      \"en-IE\": \"English (Ireland)\",\n      \"en-JM\": \"English (Jamaica)\",\n      \"en-NZ\": \"English (New Zealand)\",\n      \"en-PH\": \"English (Philippines)\",\n      \"en-ZA\": \"English (South Africa)\",\n      \"en-TT\": \"English (Trinidad & Tobago)\",\n      \"en-GB\": \"English (United Kingdom)\",\n      \"en-US\": \"English (United States)\",\n      \"en-ZW\": \"English (Zimbabwe)\",\n      eo: \"Esperanto\",\n      et: \"Estonian\",\n      fo: \"Faeroese\",\n      fj: \"Fijian\",\n      fi: \"Finnish\",\n      fr: \"French (Standard)\",\n      \"fr-BE\": \"French (Belgium)\",\n      \"fr-CA\": \"French (Canada)\",\n      \"fr-FR\": \"French (France)\",\n      \"fr-LU\": \"French (Luxembourg)\",\n      \"fr-MC\": \"French (Monaco)\",\n      \"fr-CH\": \"French (Switzerland)\",\n      fy: \"Frisian\",\n      fur: \"Friulian\",\n      gd: \"Gaelic (Scots)\",\n      \"gd-IE\": \"Gaelic (Irish)\",\n      gl: \"Galacian\",\n      ka: \"Georgian\",\n      de: \"German (Standard)\",\n      \"de-AT\": \"German (Austria)\",\n      \"de-DE\": \"German (Germany)\",\n      \"de-LI\": \"German (Liechtenstein)\",\n      \"de-LU\": \"German (Luxembourg)\",\n      \"de-CH\": \"German (Switzerland)\",\n      el: \"Greek\",\n      gu: \"Gujurati\",\n      ht: \"Haitian\",\n      he: \"Hebrew\",\n      hi: \"Hindi\",\n      hu: \"Hungarian\",\n      is: \"Icelandic\",\n      id: \"Indonesian\",\n      iu: \"Inuktitut\",\n      ga: \"Irish\",\n      it: \"Italian (Standard)\",\n      \"it-CH\": \"Italian (Switzerland)\",\n      ja: \"Japanese\",\n      kn: \"Kannada\",\n      ks: \"Kashmiri\",\n      kk: \"Kazakh\",\n      km: \"Khmer\",\n      ky: \"Kirghiz\",\n      tlh: \"Klingon\",\n      ko: \"Korean\",\n      \"ko-KP\": \"Korean (North Korea)\",\n      \"ko-KR\": \"Korean (South Korea)\",\n      la: \"Latin\",\n      lv: \"Latvian\",\n      lt: \"Lithuanian\",\n      lb: \"Luxembourgish\",\n      mk: \"North Macedonia\",\n      ms: \"Malay\",\n      ml: \"Malayalam\",\n      mt: \"Maltese\",\n      mi: \"Maori\",\n      mr: \"Marathi\",\n      mo: \"Moldavian\",\n      nv: \"Navajo\",\n      ng: \"Ndonga\",\n      ne: \"Nepali\",\n      no: \"Norwegian\",\n      nb: \"Norwegian (Bokmal)\",\n      nn: \"Norwegian (Nynorsk)\",\n      oc: \"Occitan\",\n      or: \"Oriya\",\n      om: \"Oromo\",\n      fa: \"Persian\",\n      \"fa-IR\": \"Persian/Iran\",\n      pl: \"Polish\",\n      pt: \"Portuguese\",\n      \"pt-BR\": \"Portuguese (Brazil)\",\n      pa: \"Punjabi\",\n      \"pa-IN\": \"Punjabi (India)\",\n      \"pa-PK\": \"Punjabi (Pakistan)\",\n      qu: \"Quechua\",\n      rm: \"Rhaeto-Romanic\",\n      ro: \"Romanian\",\n      \"ro-MO\": \"Romanian (Moldavia)\",\n      ru: \"Russian\",\n      \"ru-MO\": \"Russian (Moldavia)\",\n      sz: \"Sami (Lappish)\",\n      sg: \"Sango\",\n      sa: \"Sanskrit\",\n      sc: \"Sardinian\",\n      sd: \"Sindhi\",\n      si: \"Singhalese\",\n      sr: \"Serbian\",\n      sk: \"Slovak\",\n      sl: \"Slovenian\",\n      so: \"Somani\",\n      sb: \"Sorbian\",\n      es: \"Spanish\",\n      \"es-AR\": \"Spanish (Argentina)\",\n      \"es-BO\": \"Spanish (Bolivia)\",\n      \"es-CL\": \"Spanish (Chile)\",\n      \"es-CO\": \"Spanish (Colombia)\",\n      \"es-CR\": \"Spanish (Costa Rica)\",\n      \"es-DO\": \"Spanish (Dominican Republic)\",\n      \"es-EC\": \"Spanish (Ecuador)\",\n      \"es-SV\": \"Spanish (El Salvador)\",\n      \"es-GT\": \"Spanish (Guatemala)\",\n      \"es-HN\": \"Spanish (Honduras)\",\n      \"es-MX\": \"Spanish (Mexico)\",\n      \"es-NI\": \"Spanish (Nicaragua)\",\n      \"es-PA\": \"Spanish (Panama)\",\n      \"es-PY\": \"Spanish (Paraguay)\",\n      \"es-PE\": \"Spanish (Peru)\",\n      \"es-PR\": \"Spanish (Puerto Rico)\",\n      \"es-ES\": \"Spanish (Spain)\",\n      \"es-UY\": \"Spanish (Uruguay)\",\n      \"es-VE\": \"Spanish (Venezuela)\",\n      sx: \"Sutu\",\n      sw: \"Swahili\",\n      sv: \"Swedish\",\n      \"sv-FI\": \"Swedish (Finland)\",\n      \"sv-SV\": \"Swedish (Sweden)\",\n      ta: \"Tamil\",\n      tt: \"Tatar\",\n      te: \"Teluga\",\n      th: \"Thai\",\n      tig: \"Tigre\",\n      ts: \"Tsonga\",\n      tn: \"Tswana\",\n      tr: \"Turkish\",\n      tk: \"Turkmen\",\n      uk: \"Ukrainian\",\n      hsb: \"Upper Sorbian\",\n      ur: \"Urdu\",\n      ve: \"Venda\",\n      vi: \"Vietnamese\",\n      vo: \"Volapuk\",\n      wa: \"Walloon\",\n      cy: \"Welsh\",\n      xh: \"Xhosa\",\n      ji: \"Yiddish\",\n      zu: \"Zulu\"\n    };\n\n    if (this.internal.languageSettings === undefined) {\n      this.internal.languageSettings = {};\n      this.internal.languageSettings.isSubscribed = false;\n    }\n\n    if (langCodes[langCode] !== undefined) {\n      this.internal.languageSettings.languageCode = langCode;\n      if (this.internal.languageSettings.isSubscribed === false) {\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.write(\n            \"/Lang (\" + this.internal.languageSettings.languageCode + \")\"\n          );\n        });\n        this.internal.languageSettings.isSubscribed = true;\n      }\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/** @license\n * MIT license.\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF split_text_to_size plugin\n *\n * @name split_text_to_size\n * @module\n */\n(function(API) {\n  \"use strict\";\n  /**\n   * Returns an array of length matching length of the 'word' string, with each\n   * cell occupied by the width of the char in that position.\n   *\n   * @name getCharWidthsArray\n   * @function\n   * @param {string} text\n   * @param {Object} options\n   * @returns {Array}\n   */\n  var getCharWidthsArray = (API.getCharWidthsArray = function(text, options) {\n    options = options || {};\n\n    var activeFont = options.font || this.internal.getFont();\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n\n    var widths = options.widths\n      ? options.widths\n      : activeFont.metadata.Unicode.widths;\n    var widthsFractionOf = widths.fof ? widths.fof : 1;\n    var kerning = options.kerning\n      ? options.kerning\n      : activeFont.metadata.Unicode.kerning;\n    var kerningFractionOf = kerning.fof ? kerning.fof : 1;\n    var doKerning = options.doKerning === false ? false : true;\n    var kerningValue = 0;\n\n    var i;\n    var length = text.length;\n    var char_code;\n    var prior_char_code = 0; //for kerning\n    var default_char_width = widths[0] || widthsFractionOf;\n    var output = [];\n\n    for (i = 0; i < length; i++) {\n      char_code = text.charCodeAt(i);\n\n      if (typeof activeFont.metadata.widthOfString === \"function\") {\n        output.push(\n          (activeFont.metadata.widthOfGlyph(\n            activeFont.metadata.characterToGlyph(char_code)\n          ) +\n            charSpace * (1000 / fontSize) || 0) / 1000\n        );\n      } else {\n        if (\n          doKerning &&\n          typeof kerning[char_code] === \"object\" &&\n          !isNaN(parseInt(kerning[char_code][prior_char_code], 10))\n        ) {\n          kerningValue =\n            kerning[char_code][prior_char_code] / kerningFractionOf;\n        } else {\n          kerningValue = 0;\n        }\n        output.push(\n          (widths[char_code] || default_char_width) / widthsFractionOf +\n            kerningValue\n        );\n      }\n      prior_char_code = char_code;\n    }\n\n    return output;\n  });\n\n  /**\n   * Returns a widths of string in a given font, if the font size is set as 1 point.\n   *\n   * In other words, this is \"proportional\" value. For 1 unit of font size, the length\n   * of the string will be that much.\n   *\n   * Multiply by font size to get actual width in *points*\n   * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.\n   *\n   * @name getStringUnitWidth\n   * @public\n   * @function\n   * @param {string} text\n   * @param {string} options\n   * @returns {number} result\n   */\n  var getStringUnitWidth = (API.getStringUnitWidth = function(text, options) {\n    options = options || {};\n\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var font = options.font || this.internal.getFont();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n    var result = 0;\n\n    if (API.processArabic) {\n      text = API.processArabic(text);\n    }\n\n    if (typeof font.metadata.widthOfString === \"function\") {\n      result =\n        font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;\n    } else {\n      result = getCharWidthsArray\n        .apply(this, arguments)\n        .reduce(function(pv, cv) {\n          return pv + cv;\n        }, 0);\n    }\n    return result;\n  });\n\n  /**\n  returns array of lines\n  */\n  var splitLongWord = function(word, widths_array, firstLineMaxLen, maxLen) {\n    var answer = [];\n\n    // 1st, chop off the piece that can fit on the hanging line.\n    var i = 0,\n      l = word.length,\n      workingLen = 0;\n    while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {\n      workingLen += widths_array[i];\n      i++;\n    }\n    // this is first line.\n    answer.push(word.slice(0, i));\n\n    // 2nd. Split the rest into maxLen pieces.\n    var startOfLine = i;\n    workingLen = 0;\n    while (i !== l) {\n      if (workingLen + widths_array[i] > maxLen) {\n        answer.push(word.slice(startOfLine, i));\n        workingLen = 0;\n        startOfLine = i;\n      }\n      workingLen += widths_array[i];\n      i++;\n    }\n    if (startOfLine !== i) {\n      answer.push(word.slice(startOfLine, i));\n    }\n\n    return answer;\n  };\n\n  // Note, all sizing inputs for this function must be in \"font measurement units\"\n  // By default, for PDF, it's \"point\".\n  var splitParagraphIntoLines = function(text, maxlen, options) {\n    // at this time works only on Western scripts, ones with space char\n    // separating the words. Feel free to expand.\n\n    if (!options) {\n      options = {};\n    }\n\n    var line = [],\n      lines = [line],\n      line_length = options.textIndent || 0,\n      separator_length = 0,\n      current_word_length = 0,\n      word,\n      widths_array,\n      words = text.split(\" \"),\n      spaceCharWidth = getCharWidthsArray.apply(this, [\" \", options])[0],\n      i,\n      l,\n      tmp,\n      lineIndent;\n\n    if (options.lineIndent === -1) {\n      lineIndent = words[0].length + 2;\n    } else {\n      lineIndent = options.lineIndent || 0;\n    }\n    if (lineIndent) {\n      var pad = Array(lineIndent).join(\" \"),\n        wrds = [];\n      words.map(function(wrd) {\n        wrd = wrd.split(/\\s*\\n/);\n        if (wrd.length > 1) {\n          wrds = wrds.concat(\n            wrd.map(function(wrd, idx) {\n              return (idx && wrd.length ? \"\\n\" : \"\") + wrd;\n            })\n          );\n        } else {\n          wrds.push(wrd[0]);\n        }\n      });\n      words = wrds;\n      lineIndent = getStringUnitWidth.apply(this, [pad, options]);\n    }\n\n    for (i = 0, l = words.length; i < l; i++) {\n      var force = 0;\n\n      word = words[i];\n      if (lineIndent && word[0] == \"\\n\") {\n        word = word.substr(1);\n        force = 1;\n      }\n      widths_array = getCharWidthsArray.apply(this, [word, options]);\n      current_word_length = widths_array.reduce(function(pv, cv) {\n        return pv + cv;\n      }, 0);\n\n      if (\n        line_length + separator_length + current_word_length > maxlen ||\n        force\n      ) {\n        if (current_word_length > maxlen) {\n          // this happens when you have space-less long URLs for example.\n          // we just chop these to size. We do NOT insert hiphens\n          tmp = splitLongWord.apply(this, [\n            word,\n            widths_array,\n            maxlen - (line_length + separator_length),\n            maxlen\n          ]);\n          // first line we add to existing line object\n          line.push(tmp.shift()); // it's ok to have extra space indicator there\n          // last line we make into new line object\n          line = [tmp.pop()];\n          // lines in the middle we apped to lines object as whole lines\n          while (tmp.length) {\n            lines.push([tmp.shift()]); // single fragment occupies whole line\n          }\n          current_word_length = widths_array\n            .slice(word.length - (line[0] ? line[0].length : 0))\n            .reduce(function(pv, cv) {\n              return pv + cv;\n            }, 0);\n        } else {\n          // just put it on a new line\n          line = [word];\n        }\n\n        // now we attach new line to lines\n        lines.push(line);\n        line_length = current_word_length + lineIndent;\n        separator_length = spaceCharWidth;\n      } else {\n        line.push(word);\n\n        line_length += separator_length + current_word_length;\n        separator_length = spaceCharWidth;\n      }\n    }\n\n    var postProcess;\n    if (lineIndent) {\n      postProcess = function(ln, idx) {\n        return (idx ? pad : \"\") + ln.join(\" \");\n      };\n    } else {\n      postProcess = function(ln) {\n        return ln.join(\" \");\n      };\n    }\n\n    return lines.map(postProcess);\n  };\n\n  /**\n   * Splits a given string into an array of strings. Uses 'size' value\n   * (in measurement units declared as default for the jsPDF instance)\n   * and the font's \"widths\" and \"Kerning\" tables, where available, to\n   * determine display length of a given string for a given font.\n   *\n   * We use character's 100% of unit size (height) as width when Width\n   * table or other default width is not available.\n   *\n   * @name splitTextToSize\n   * @public\n   * @function\n   * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.\n   * @param {number} size Nominal number, measured in units default to this instance of jsPDF.\n   * @param {Object} options Optional flags needed for chopper to do the right thing.\n   * @returns {Array} array Array with strings chopped to size.\n   */\n  API.splitTextToSize = function(text, maxlen, options) {\n    \"use strict\";\n\n    options = options || {};\n\n    var fsize = options.fontSize || this.internal.getFontSize(),\n      newOptions = function(options) {\n        var widths = {\n            0: 1\n          },\n          kerning = {};\n\n        if (!options.widths || !options.kerning) {\n          var f = this.internal.getFont(options.fontName, options.fontStyle),\n            encoding = \"Unicode\";\n          // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE\n          // Actual JavaScript-native String's 16bit char codes used.\n          // no multi-byte logic here\n\n          if (f.metadata[encoding]) {\n            return {\n              widths: f.metadata[encoding].widths || widths,\n              kerning: f.metadata[encoding].kerning || kerning\n            };\n          } else {\n            return {\n              font: f.metadata,\n              fontSize: this.internal.getFontSize(),\n              charSpace: this.internal.getCharSpace()\n            };\n          }\n        } else {\n          return {\n            widths: options.widths,\n            kerning: options.kerning\n          };\n        }\n      }.call(this, options);\n\n    // first we split on end-of-line chars\n    var paragraphs;\n    if (Array.isArray(text)) {\n      paragraphs = text;\n    } else {\n      paragraphs = String(text).split(/\\r?\\n/);\n    }\n\n    // now we convert size (max length of line) into \"font size units\"\n    // at present time, the \"font size unit\" is always 'point'\n    // 'proportional' means, \"in proportion to font size\"\n    var fontUnit_maxLen = (1.0 * this.internal.scaleFactor * maxlen) / fsize;\n    // at this time, fsize is always in \"points\" regardless of the default measurement unit of the doc.\n    // this may change in the future?\n    // until then, proportional_maxlen is likely to be in 'points'\n\n    // If first line is to be indented (shorter or longer) than maxLen\n    // we indicate that by using CSS-style \"text-indent\" option.\n    // here it's in font units too (which is likely 'points')\n    // it can be negative (which makes the first line longer than maxLen)\n    newOptions.textIndent = options.textIndent\n      ? (options.textIndent * 1.0 * this.internal.scaleFactor) / fsize\n      : 0;\n    newOptions.lineIndent = options.lineIndent;\n\n    var i,\n      l,\n      output = [];\n    for (i = 0, l = paragraphs.length; i < l; i++) {\n      output = output.concat(\n        splitParagraphIntoLines.apply(this, [\n          paragraphs[i],\n          fontUnit_maxLen,\n          newOptions\n        ])\n      );\n    }\n\n    return output;\n  };\n})(jsPDF.API);\n","/** @license\n jsPDF standard_fonts_metrics plugin\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n * MIT license.\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * This file adds the standard font metrics to jsPDF.\n *\n * Font metrics data is reprocessed derivative of contents of\n * \"Font Metrics for PDF Core 14 Fonts\" package, which exhibits the following copyright and license:\n *\n * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.\n *\n * This file and the 14 PostScript(R) AFM files it accompanies may be used,\n * copied, and distributed for any purpose and without charge, with or without\n * modification, provided that all copyright notices are retained; that the AFM\n * files are not distributed without this file; that all modifications to this\n * file or any of the AFM files are prominently noted in the modified file(s);\n * and that this paragraph is not modified. Adobe Systems has no responsibility\n * or obligation to support the use of the AFM files.\n *\n * @name standard_fonts_metrics\n * @module\n */\n\n(function(API) {\n  \"use strict\";\n  API.__fontmetrics__ = API.__fontmetrics__ || {};\n\n  var decoded = \"0123456789abcdef\",\n    encoded = \"klmnopqrstuvwxyz\",\n    mappingUncompress = {},\n    mappingCompress = {};\n\n  for (var i = 0; i < encoded.length; i++) {\n    mappingUncompress[encoded[i]] = decoded[i];\n    mappingCompress[decoded[i]] = encoded[i];\n  }\n\n  var hex = function(value) {\n    return \"0x\" + parseInt(value, 10).toString(16);\n  };\n\n  var compress = (API.__fontmetrics__.compress = function(data) {\n    var vals = [\"{\"];\n    var value, keystring, valuestring, numberprefix;\n\n    for (var key in data) {\n      value = data[key];\n\n      if (!isNaN(parseInt(key, 10))) {\n        key = parseInt(key, 10);\n        keystring = hex(key).slice(2);\n        keystring =\n          keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];\n      } else {\n        keystring = \"'\" + key + \"'\";\n      }\n\n      if (typeof value == \"number\") {\n        if (value < 0) {\n          valuestring = hex(value).slice(3);\n          numberprefix = \"-\";\n        } else {\n          valuestring = hex(value).slice(2);\n          numberprefix = \"\";\n        }\n        valuestring =\n          numberprefix +\n          valuestring.slice(0, -1) +\n          mappingCompress[valuestring.slice(-1)];\n      } else {\n        if (typeof value === \"object\") {\n          valuestring = compress(value);\n        } else {\n          throw new Error(\n            \"Don't know what to do with value type \" + typeof value + \".\"\n          );\n        }\n      }\n      vals.push(keystring + valuestring);\n    }\n    vals.push(\"}\");\n    return vals.join(\"\");\n  });\n\n  /**\n   * Uncompresses data compressed into custom, base16-like format.\n   *\n   * @public\n   * @function\n   * @param\n   * @returns {Type}\n   */\n  var uncompress = (API.__fontmetrics__.uncompress = function(data) {\n    if (typeof data !== \"string\") {\n      throw new Error(\"Invalid argument passed to uncompress.\");\n    }\n\n    var output = {},\n      sign = 1,\n      stringparts, // undef. will be [] in string mode\n      activeobject = output,\n      parentchain = [],\n      parent_key_pair,\n      keyparts = \"\",\n      valueparts = \"\",\n      key, // undef. will be Truthy when Key is resolved.\n      datalen = data.length - 1, // stripping ending }\n      ch;\n\n    for (var i = 1; i < datalen; i += 1) {\n      // - { } ' are special.\n\n      ch = data[i];\n\n      if (ch == \"'\") {\n        if (stringparts) {\n          // end of string mode\n          key = stringparts.join(\"\");\n          stringparts = undefined;\n        } else {\n          // start of string mode\n          stringparts = [];\n        }\n      } else if (stringparts) {\n        stringparts.push(ch);\n      } else if (ch == \"{\") {\n        // start of object\n        parentchain.push([activeobject, key]);\n        activeobject = {};\n        key = undefined;\n      } else if (ch == \"}\") {\n        // end of object\n        parent_key_pair = parentchain.pop();\n        parent_key_pair[0][parent_key_pair[1]] = activeobject;\n        key = undefined;\n        activeobject = parent_key_pair[0];\n      } else if (ch == \"-\") {\n        sign = -1;\n      } else {\n        // must be number\n        if (key === undefined) {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            keyparts += mappingUncompress[ch];\n            key = parseInt(keyparts, 16) * sign;\n            sign = +1;\n            keyparts = \"\";\n          } else {\n            keyparts += ch;\n          }\n        } else {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            valueparts += mappingUncompress[ch];\n            activeobject[key] = parseInt(valueparts, 16) * sign;\n            sign = +1;\n            key = undefined;\n            valueparts = \"\";\n          } else {\n            valueparts += ch;\n          }\n        }\n      }\n    }\n    return output;\n  });\n\n  // encoding = 'Unicode'\n  // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior\n  // Actual 16bit char codes used.\n  // no multi-byte logic here\n\n  // Unicode characters to WinAnsiEncoding:\n  // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}\n  // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.\n  // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly\n  // as well as give strings with some (supported by these fonts) Unicode characters and\n  // these will be mapped to win cp1252\n  // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting \"Euro\" glyph displayed in both cases.\n\n  var encodingBlock = {\n    codePages: [\"WinAnsiEncoding\"],\n    WinAnsiEncoding: uncompress(\n      \"{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}\"\n    )\n  };\n  var encodings = {\n    Unicode: {\n      Courier: encodingBlock,\n      \"Courier-Bold\": encodingBlock,\n      \"Courier-BoldOblique\": encodingBlock,\n      \"Courier-Oblique\": encodingBlock,\n      Helvetica: encodingBlock,\n      \"Helvetica-Bold\": encodingBlock,\n      \"Helvetica-BoldOblique\": encodingBlock,\n      \"Helvetica-Oblique\": encodingBlock,\n      \"Times-Roman\": encodingBlock,\n      \"Times-Bold\": encodingBlock,\n      \"Times-BoldItalic\": encodingBlock,\n      \"Times-Italic\": encodingBlock\n      //\t, 'Symbol'\n      //\t, 'ZapfDingbats'\n    }\n  };\n\n  var fontMetrics = {\n    Unicode: {\n      // all sizing numbers are n/fontMetricsFractionOf = one font size unit\n      // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's\n      // width is 476/1000 or 47.6% of its height (regardless of font size)\n      // At this time this value applies to \"widths\" and \"kerning\" numbers.\n\n      // char code 0 represents \"default\" (average) width - use it for chars missing in this table.\n      // key 'fof' represents the \"fontMetricsFractionOf\" value\n\n      \"Courier-Oblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-BoldItalic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Courier: uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-BoldOblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Symbol: uncompress(\n        \"{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}\"\n      ),\n      Helvetica: uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-BoldOblique\": uncompress(\n        \"{'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}}}\"\n      ),\n      ZapfDingbats: uncompress(\"{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-Bold\": uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Times-Italic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Times-Roman\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Oblique\": uncompress(\n        \"{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k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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}}}\"\n      )\n    }\n  };\n\n  /*\n\tThis event handler is fired when a new jsPDF object is initialized\n\tThis event handler appends metrics data to standard fonts within\n\tthat jsPDF instance. The metrics are mapped over Unicode character\n\tcodes, NOT CIDs or other codes matching the StandardEncoding table of the\n\tstandard PDF fonts.\n\tFuture:\n\tAlso included is the encoding maping table, converting Unicode (UCS-2, UTF-16)\n\tchar codes to StandardEncoding character codes. The encoding table is to be used\n\tsomewhere around \"pdfEscape\" call.\n\t*/\n  API.events.push([\n    \"addFont\",\n    function(data) {\n      var font = data.font;\n\n      var metrics = fontMetrics[\"Unicode\"][font.postScriptName];\n      if (metrics) {\n        font.metadata[\"Unicode\"] = {};\n        font.metadata[\"Unicode\"].widths = metrics.widths;\n        font.metadata[\"Unicode\"].kerning = metrics.kerning;\n      }\n\n      var encodingBlock = encodings[\"Unicode\"][font.postScriptName];\n      if (encodingBlock) {\n        font.metadata[\"Unicode\"].encoding = encodingBlock;\n        font.encoding = encodingBlock.codePages[0];\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob } from \"../libs/AtobBtoa.js\";\n\n/**\n * @name ttfsupport\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n\n  var binaryStringToUint8Array = function(binary_string) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  };\n\n  var addFont = function(font, file) {\n    // eslint-disable-next-line no-control-regex\n    if (/^\\x00\\x01\\x00\\x00/.test(file)) {\n      file = binaryStringToUint8Array(file);\n    } else {\n      file = binaryStringToUint8Array(atob(file));\n    }\n    font.metadata = jsPDF.API.TTFFont.open(file);\n    font.metadata.Unicode = font.metadata.Unicode || {\n      encoding: {},\n      kerning: {},\n      widths: []\n    };\n    font.metadata.glyIdsUsed = [0];\n  };\n\n  jsPDF.API.events.push([\n    \"addFont\",\n    function(data) {\n      var file = undefined;\n      var font = data.font;\n      var instance = data.instance;\n      if (font.isStandardFont) {\n        return;\n      }\n      if (typeof instance !== \"undefined\") {\n        if (instance.existsFileInVFS(font.postScriptName) === false) {\n          file = instance.loadFile(font.postScriptName);\n        } else {\n          file = instance.getFileFromVFS(font.postScriptName);\n        }\n        if (typeof file !== \"string\") {\n          throw new Error(\n            \"Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('\" +\n              font.postScriptName +\n              \"').\"\n          );\n        }\n        addFont(font, file);\n      } else {\n        throw new Error(\n          \"Font does not exist in vFS, import fonts or remove declaration doc.addFont('\" +\n            font.postScriptName +\n            \"').\"\n        );\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF);\n","/** @license\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { console } from \"../libs/console.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF SVG plugin\n *\n * @name svg\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadCanvg() {\n    return (function() {\n      if (globalObject[\"canvg\"]) {\n        return Promise.resolve(globalObject[\"canvg\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"canvg\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"canvg\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load canvg\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load canvg: \" + e));\n      })\n      .then(function(canvg) {\n        return canvg.default ? canvg.default : canvg;\n      });\n  }\n\n  /**\n   * Parses SVG XML and saves it as image into the PDF.\n   *\n   * Depends on canvas-element and canvg\n   *\n   * @name addSvgAsImage\n   * @public\n   * @function\n   * @param {string} SVG-Data as Text\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width of SVG-Image (in units declared at inception of PDF document)\n   * @param {number} height of SVG-Image (in units declared at inception of PDF document)\n   * @param {string} alias of SVG-Image (if used multiple times)\n   * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF jsPDF-instance\n   */\n  jsPDFAPI.addSvgAsImage = function(\n    svg,\n    x,\n    y,\n    w,\n    h,\n    alias,\n    compression,\n    rotation\n  ) {\n    if (isNaN(x) || isNaN(y)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid coordinates\", arguments);\n      throw new Error(\"Invalid coordinates passed to jsPDF.addSvgAsImage\");\n    }\n\n    if (isNaN(w) || isNaN(h)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid measurements\", arguments);\n      throw new Error(\n        \"Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage\"\n      );\n    }\n\n    var canvas = document.createElement(\"canvas\");\n    canvas.width = w;\n    canvas.height = h;\n    var ctx = canvas.getContext(\"2d\");\n    ctx.fillStyle = \"#fff\"; /// set white fill style\n    ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n    var options = {\n      ignoreMouse: true,\n      ignoreAnimation: true,\n      ignoreDimensions: true\n    };\n    var doc = this;\n    return loadCanvg()\n      .then(\n        function(canvg) {\n          return canvg.fromString(ctx, svg, options);\n        },\n        function() {\n          return Promise.reject(new Error(\"Could not load canvg.\"));\n        }\n      )\n      .then(function(instance) {\n        return instance.render(options);\n      })\n      .then(function() {\n        doc.addImage(\n          canvas.toDataURL(\"image/jpeg\", 1.0),\n          x,\n          y,\n          w,\n          h,\n          compression,\n          rotation\n        );\n      });\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF total_pages plugin\n * @name total_pages\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * @name putTotalPages\n   * @function\n   * @param {string} pageExpression Regular Expression\n   * @returns {jsPDF} jsPDF-instance\n   */\n\n  jsPDFAPI.putTotalPages = function(pageExpression) {\n    \"use strict\";\n\n    var replaceExpression;\n    var totalNumberOfPages = 0;\n    if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {\n      replaceExpression = new RegExp(pageExpression, \"g\");\n      totalNumberOfPages = this.internal.getNumberOfPages();\n    } else {\n      replaceExpression = new RegExp(\n        this.pdfEscape16(pageExpression, this.internal.getFont()),\n        \"g\"\n      );\n      totalNumberOfPages = this.pdfEscape16(\n        this.internal.getNumberOfPages() + \"\",\n        this.internal.getFont()\n      );\n    }\n\n    for (var n = 1; n <= this.internal.getNumberOfPages(); n++) {\n      for (var i = 0; i < this.internal.pages[n].length; i++) {\n        this.internal.pages[n][i] = this.internal.pages[n][i].replace(\n          replaceExpression,\n          totalNumberOfPages\n        );\n      }\n    }\n\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF viewerPreferences Plugin\n * @author Aras Abbasi (github.com/arasabbasi)\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Adds the ability to set ViewerPreferences and by thus\n * controlling the way the document is to be presented on the\n * screen or in print.\n * @name viewerpreferences\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * Set the ViewerPreferences of the generated PDF\n   *\n   * @name viewerPreferences\n   * @function\n   * @public\n   * @param {Object} options Array with the ViewerPreferences<br />\n   * Example: doc.viewerPreferences({\"FitWindow\":true});<br />\n   * <br />\n   * You can set following preferences:<br />\n   * <br/>\n   * <b>HideToolbar</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>HideMenubar</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>HideWindowUI</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>FitWindow</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>CenterWindow</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>DisplayDocTitle</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>NonFullScreenPageMode</b> <i>(string)</i><br />\n   * Possible values: UseNone, UseOutlines, UseThumbs, UseOC<br />\n   * Default value: UseNone<br/>\n   * <br />\n   * <b>Direction</b> <i>(string)</i><br />\n   * Possible values: L2R, R2L<br />\n   * Default value: L2R.<br />\n   * <br />\n   * <b>ViewArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>ViewClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>PrintScaling</b> <i>(string)</i><br />\n   * Possible values: AppDefault, None<br />\n   * Default value: AppDefault.<br />\n   * <br />\n   * <b>Duplex</b> <i>(string)</i><br />\n   * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge\n   * Default value: none<br />\n   * <br />\n   * <b>PickTrayByPDFSize</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>PrintPageRange</b> <i>(Array)</i><br />\n   * Example: [[1,5], [7,9]]<br />\n   * Default value: as defined by PDF viewer application<br />\n   * <br />\n   * <b>NumCopies</b> <i>(Number)</i><br />\n   * Possible values: 1, 2, 3, 4, 5<br />\n   * Default value: 1<br />\n   * <br />\n   * For more information see the PDF Reference, sixth edition on Page 577\n   * @param {boolean} doReset True to reset the settings\n   * @function\n   * @returns jsPDF jsPDF-instance\n   * @example\n   * var doc = new jsPDF()\n   * doc.text('This is a test', 10, 10)\n   * doc.viewerPreferences({'FitWindow': true}, true)\n   * doc.save(\"viewerPreferences.pdf\")\n   *\n   * // Example printing 10 copies, using cropbox, and hiding UI.\n   * doc.viewerPreferences({\n   *   'HideWindowUI': true,\n   *   'PrintArea': 'CropBox',\n   *   'NumCopies': 10\n   * })\n   */\n  jsPDFAPI.viewerPreferences = function(options, doReset) {\n    options = options || {};\n    doReset = doReset || false;\n\n    var configuration;\n    var configurationTemplate = {\n      HideToolbar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideMenubar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideWindowUI: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      FitWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      CenterWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      DisplayDocTitle: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.4\n      },\n      NonFullScreenPageMode: {\n        defaultValue: \"UseNone\",\n        value: \"UseNone\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"UseNone\", \"UseOutlines\", \"UseThumbs\", \"UseOC\"],\n        pdfVersion: 1.3\n      },\n      Direction: {\n        defaultValue: \"L2R\",\n        value: \"L2R\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"L2R\", \"R2L\"],\n        pdfVersion: 1.3\n      },\n      ViewArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      ViewClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintScaling: {\n        defaultValue: \"AppDefault\",\n        value: \"AppDefault\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"AppDefault\", \"None\"],\n        pdfVersion: 1.6\n      },\n      Duplex: {\n        defaultValue: \"\",\n        value: \"none\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\n          \"Simplex\",\n          \"DuplexFlipShortEdge\",\n          \"DuplexFlipLongEdge\",\n          \"none\"\n        ],\n        pdfVersion: 1.7\n      },\n      PickTrayByPDFSize: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.7\n      },\n      PrintPageRange: {\n        defaultValue: \"\",\n        value: \"\",\n        type: \"array\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      },\n      NumCopies: {\n        defaultValue: 1,\n        value: 1,\n        type: \"integer\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      }\n    };\n\n    var configurationKeys = Object.keys(configurationTemplate);\n\n    var rangeArray = [];\n    var i = 0;\n    var j = 0;\n    var k = 0;\n    var isValid;\n\n    var method;\n    var value;\n\n    function arrayContainsElement(array, element) {\n      var iterator;\n      var result = false;\n\n      for (iterator = 0; iterator < array.length; iterator += 1) {\n        if (array[iterator] === element) {\n          result = true;\n        }\n      }\n      return result;\n    }\n\n    if (this.internal.viewerpreferences === undefined) {\n      this.internal.viewerpreferences = {};\n      this.internal.viewerpreferences.configuration = JSON.parse(\n        JSON.stringify(configurationTemplate)\n      );\n      this.internal.viewerpreferences.isSubscribed = false;\n    }\n    configuration = this.internal.viewerpreferences.configuration;\n\n    if (options === \"reset\" || doReset === true) {\n      var len = configurationKeys.length;\n\n      for (k = 0; k < len; k += 1) {\n        configuration[configurationKeys[k]].value =\n          configuration[configurationKeys[k]].defaultValue;\n        configuration[configurationKeys[k]].explicitSet = false;\n      }\n    }\n\n    if (typeof options === \"object\") {\n      for (method in options) {\n        value = options[method];\n        if (\n          arrayContainsElement(configurationKeys, method) &&\n          value !== undefined\n        ) {\n          if (\n            configuration[method].type === \"boolean\" &&\n            typeof value === \"boolean\"\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"name\" &&\n            arrayContainsElement(configuration[method].valueSet, value)\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"integer\" &&\n            Number.isInteger(value)\n          ) {\n            configuration[method].value = value;\n          } else if (configuration[method].type === \"array\") {\n            for (i = 0; i < value.length; i += 1) {\n              isValid = true;\n              if (value[i].length === 1 && typeof value[i][0] === \"number\") {\n                rangeArray.push(String(value[i] - 1));\n              } else if (value[i].length > 1) {\n                for (j = 0; j < value[i].length; j += 1) {\n                  if (typeof value[i][j] !== \"number\") {\n                    isValid = false;\n                  }\n                }\n                if (isValid === true) {\n                  rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(\" \"));\n                }\n              }\n            }\n            configuration[method].value = \"[\" + rangeArray.join(\" \") + \"]\";\n          } else {\n            configuration[method].value = configuration[method].defaultValue;\n          }\n\n          configuration[method].explicitSet = true;\n        }\n      }\n    }\n\n    if (this.internal.viewerpreferences.isSubscribed === false) {\n      this.internal.events.subscribe(\"putCatalog\", function() {\n        var pdfDict = [];\n        var vPref;\n        for (vPref in configuration) {\n          if (configuration[vPref].explicitSet === true) {\n            if (configuration[vPref].type === \"name\") {\n              pdfDict.push(\"/\" + vPref + \" /\" + configuration[vPref].value);\n            } else {\n              pdfDict.push(\"/\" + vPref + \" \" + configuration[vPref].value);\n            }\n          }\n        }\n        if (pdfDict.length !== 0) {\n          this.internal.write(\n            \"/ViewerPreferences\\n<<\\n\" + pdfDict.join(\"\\n\") + \"\\n>>\"\n          );\n        }\n      });\n      this.internal.viewerpreferences.isSubscribed = true;\n    }\n\n    this.internal.viewerpreferences.configuration = configuration;\n    return this;\n  };\n})(jsPDF.API);\n","/** ====================================================================\n * @license\n * jsPDF XMP metadata plugin\n * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name xmp_metadata\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var postPutResources = function() {\n    var xmpmeta_beginning = '<x:xmpmeta xmlns:x=\"adobe:ns:meta/\">';\n    var rdf_beginning =\n      '<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\" xmlns:jspdf=\"' +\n      this.internal.__metadata__.namespaceuri +\n      '\"><jspdf:metadata>';\n    var rdf_ending = \"</jspdf:metadata></rdf:Description></rdf:RDF>\";\n    var xmpmeta_ending = \"</x:xmpmeta>\";\n    var utf8_xmpmeta_beginning = unescape(\n      encodeURIComponent(xmpmeta_beginning)\n    );\n    var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));\n    var utf8_metadata = unescape(\n      encodeURIComponent(this.internal.__metadata__.metadata)\n    );\n    var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));\n    var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));\n\n    var total_len =\n      utf8_rdf_beginning.length +\n      utf8_metadata.length +\n      utf8_rdf_ending.length +\n      utf8_xmpmeta_beginning.length +\n      utf8_xmpmeta_ending.length;\n\n    this.internal.__metadata__.metadata_object_number = this.internal.newObject();\n    this.internal.write(\n      \"<< /Type /Metadata /Subtype /XML /Length \" + total_len + \" >>\"\n    );\n    this.internal.write(\"stream\");\n    this.internal.write(\n      utf8_xmpmeta_beginning +\n        utf8_rdf_beginning +\n        utf8_metadata +\n        utf8_rdf_ending +\n        utf8_xmpmeta_ending\n    );\n    this.internal.write(\"endstream\");\n    this.internal.write(\"endobj\");\n  };\n\n  var putCatalog = function() {\n    if (this.internal.__metadata__.metadata_object_number) {\n      this.internal.write(\n        \"/Metadata \" +\n          this.internal.__metadata__.metadata_object_number +\n          \" 0 R\"\n      );\n    }\n  };\n\n  /**\n   * Adds XMP formatted metadata to PDF\n   *\n   * @name addMetadata\n   * @function\n   * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters \"<\", \">\" or \"&\", those characters should be written using XML entities.\n   * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.\n   * @returns {jsPDF} jsPDF-instance\n   */\n  jsPDFAPI.addMetadata = function(metadata, namespaceuri) {\n    if (typeof this.internal.__metadata__ === \"undefined\") {\n      this.internal.__metadata__ = {\n        metadata: metadata,\n        namespaceuri: namespaceuri || \"http://jspdf.default.namespaceuri/\"\n      };\n      this.internal.events.subscribe(\"putCatalog\", putCatalog);\n\n      this.internal.events.subscribe(\"postPutResources\", postPutResources);\n    }\n    return this;\n  };\n})(jsPDF.API);\n","import { jsPDF } from \"../jspdf.js\";\nimport { toPDFName } from \"../libs/pdfname.js\";\n\n/**\n * @name utf8\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n  var jsPDFAPI = jsPDF.API;\n\n  /***************************************************************************************************/\n  /* function : pdfEscape16                                                                          */\n  /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */\n  /*   the corresponding glyph id and width, and then adding padding to the string.                  */\n  /***************************************************************************************************/\n  var pdfEscape16 = (jsPDFAPI.pdfEscape16 = function(text, font) {\n    var widths = font.metadata.Unicode.widths;\n    var padz = [\"\", \"0\", \"00\", \"000\", \"0000\"];\n    var ar = [\"\"];\n    for (var i = 0, l = text.length, t; i < l; ++i) {\n      t = font.metadata.characterToGlyph(text.charCodeAt(i));\n      font.metadata.glyIdsUsed.push(t);\n      font.metadata.toUnicode[t] = text.charCodeAt(i);\n      if (widths.indexOf(t) == -1) {\n        widths.push(t);\n        widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);\n      }\n      if (t == \"0\") {\n        //Spaces are not allowed in cmap.\n        return ar.join(\"\");\n      } else {\n        t = t.toString(16);\n        ar.push(padz[4 - t.length], t);\n      }\n    }\n    return ar.join(\"\");\n  });\n\n  var toUnicodeCmap = function(map) {\n    var code, codes, range, unicode, unicodeMap, _i, _len;\n    unicodeMap =\n      \"/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    codes = Object.keys(map).sort(function(a, b) {\n      return a - b;\n    });\n\n    range = [];\n    for (_i = 0, _len = codes.length; _i < _len; _i++) {\n      code = codes[_i];\n      if (range.length >= 100) {\n        unicodeMap +=\n          \"\\n\" +\n          range.length +\n          \" beginbfchar\\n\" +\n          range.join(\"\\n\") +\n          \"\\nendbfchar\";\n        range = [];\n      }\n\n      if (\n        map[code] !== undefined &&\n        map[code] !== null &&\n        typeof map[code].toString === \"function\"\n      ) {\n        unicode = (\"0000\" + map[code].toString(16)).slice(-4);\n        code = (\"0000\" + (+code).toString(16)).slice(-4);\n        range.push(\"<\" + code + \"><\" + unicode + \">\");\n      }\n    }\n\n    if (range.length) {\n      unicodeMap +=\n        \"\\n\" +\n        range.length +\n        \" beginbfchar\\n\" +\n        range.join(\"\\n\") +\n        \"\\nendbfchar\\n\";\n    }\n    unicodeMap +=\n      \"endcmap\\nCMapName currentdict /CMap defineresource pop\\nend\\nend\";\n    return unicodeMap;\n  };\n\n  var identityHFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"Identity-H\"\n    ) {\n      //Tag with Identity-H\n      var widths = font.metadata.Unicode.widths;\n      var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/Flags \" + font.metadata.flags);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\">>\");\n      out(\"endobj\");\n\n      var DescendantFont = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/FontDescriptor \" + fontDescriptor + \" 0 R\");\n      out(\"/W \" + jsPDF.API.PDFObject.convert(widths));\n      out(\"/CIDToGIDMap /Identity\");\n      out(\"/DW 1000\");\n      out(\"/Subtype /CIDFontType2\");\n      out(\"/CIDSystemInfo\");\n      out(\"<<\");\n      out(\"/Supplement 0\");\n      out(\"/Registry (Adobe)\");\n      out(\"/Ordering (\" + font.encoding + \")\");\n      out(\">>\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.objectNumber = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/Subtype /Type0\");\n      out(\"/ToUnicode \" + cmap + \" 0 R\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/Encoding /\" + font.encoding);\n      out(\"/DescendantFonts [\" + DescendantFont + \" 0 R]\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      identityHFunction(args);\n    }\n  ]);\n\n  var winAnsiEncodingFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"WinAnsiEncoding\"\n    ) {\n      //Tag with WinAnsi encoding\n      var data = font.metadata.rawData;\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/Flags 96\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\">>\");\n      out(\"endobj\");\n      font.objectNumber = newObject();\n      for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {\n        font.metadata.hmtx.widths[j] = parseInt(\n          font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)\n        ); //Change the width of Em units to Point units.\n      }\n      out(\n        \"<</Subtype/TrueType/Type/Font/ToUnicode \" +\n          cmap +\n          \" 0 R/BaseFont/\" +\n          toPDFName(font.fontName) +\n          \"/FontDescriptor \" +\n          fontDescriptor +\n          \" 0 R\" +\n          \"/Encoding/\" +\n          font.encoding +\n          \" /FirstChar 29 /LastChar 255 /Widths \" +\n          jsPDF.API.PDFObject.convert(font.metadata.hmtx.widths) +\n          \">>\"\n      );\n      out(\"endobj\");\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      winAnsiEncodingFunction(args);\n    }\n  ]);\n\n  var utf8TextFunction = function(args) {\n    var text = args.text || \"\";\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n\n    var pdfEscape = mutex.pdfEscape;\n    var activeFontKey = mutex.activeFontKey;\n    var fonts = mutex.fonts;\n    var key = activeFontKey;\n\n    var str = \"\",\n      s = 0,\n      cmapConfirm;\n    var strText = \"\";\n    var encoding = fonts[key].encoding;\n\n    if (fonts[key].encoding !== \"Identity-H\") {\n      return {\n        text: text,\n        x: x,\n        y: y,\n        options: options,\n        mutex: mutex\n      };\n    }\n    strText = text;\n\n    key = activeFontKey;\n    if (Array.isArray(text)) {\n      strText = text[0];\n    }\n    for (s = 0; s < strText.length; s += 1) {\n      if (fonts[key].metadata.hasOwnProperty(\"cmap\")) {\n        cmapConfirm =\n          fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];\n        /*\n             if (Object.prototype.toString.call(text) === '[object Array]') {\n                var i = 0;\n               // for (i = 0; i < text.length; i += 1) {\n                    if (Object.prototype.toString.call(text[s]) === '[object Array]') {\n                        cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n                    } else {\n\n                    }\n                //}\n\n            } else {\n                cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n            }*/\n      }\n      if (!cmapConfirm) {\n        if (\n          strText[s].charCodeAt(0) < 256 &&\n          fonts[key].metadata.hasOwnProperty(\"Unicode\")\n        ) {\n          str += strText[s];\n        } else {\n          str += \"\";\n        }\n      } else {\n        str += strText[s];\n      }\n    }\n    var result = \"\";\n    if (parseInt(key.slice(1)) < 14 || encoding === \"WinAnsiEncoding\") {\n      //For the default 13 font\n      result = pdfEscape(str, key)\n        .split(\"\")\n        .map(function(cv) {\n          return cv.charCodeAt(0).toString(16);\n        })\n        .join(\"\");\n    } else if (encoding === \"Identity-H\") {\n      result = pdfEscape16(str, fonts[key]);\n    }\n    mutex.isHex = true;\n\n    return {\n      text: result,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n  };\n\n  var utf8EscapeFunction = function(parms) {\n    var text = parms.text || \"\",\n      x = parms.x,\n      y = parms.y,\n      options = parms.options,\n      mutex = parms.mutex;\n    var tmpText = [];\n    var args = {\n      text: text,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          if (text[i].length === 3) {\n            tmpText.push([\n              utf8TextFunction(Object.assign({}, args, { text: text[i][0] }))\n                .text,\n              text[i][1],\n              text[i][2]\n            ]);\n          } else {\n            tmpText.push(\n              utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n            );\n          }\n        } else {\n          tmpText.push(\n            utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n          );\n        }\n      }\n      parms.text = tmpText;\n    } else {\n      parms.text = utf8TextFunction(\n        Object.assign({}, args, { text: text })\n      ).text;\n    }\n  };\n\n  jsPDFAPI.events.push([\"postProcessText\", utf8EscapeFunction]);\n})(jsPDF);\n","/**\n * @license\n * jsPDF virtual FileSystem functionality\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Use the vFS to handle files\n *\n * @name vFS\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var _initializeVFS = function() {\n    if (typeof this.internal.vFS === \"undefined\") {\n      this.internal.vFS = {};\n    }\n    return true;\n  };\n\n  /**\n   * Check if the file exists in the vFS\n   *\n   * @name existsFileInVFS\n   * @function\n   * @param {string} Possible filename in the vFS.\n   * @returns {boolean}\n   * @example\n   * doc.existsFileInVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.existsFileInVFS = function(filename) {\n    _initializeVFS.call(this);\n    return typeof this.internal.vFS[filename] !== \"undefined\";\n  };\n\n  /**\n   * Add a file to the vFS\n   *\n   * @name addFileToVFS\n   * @function\n   * @param {string} filename The name of the file which should be added.\n   * @param {string} filecontent The content of the file.\n   * @returns {jsPDF}\n   * @example\n   * doc.addFileToVFS(\"someFile.txt\", \"BADFACE1\");\n   */\n  jsPDFAPI.addFileToVFS = function(filename, filecontent) {\n    _initializeVFS.call(this);\n    this.internal.vFS[filename] = filecontent;\n    return this;\n  };\n\n  /**\n   * Get the file from the vFS\n   *\n   * @name getFileFromVFS\n   * @function\n   * @param {string} The name of the file which gets requested.\n   * @returns {string}\n   * @example\n   * doc.getFileFromVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.getFileFromVFS = function(filename) {\n    _initializeVFS.call(this);\n\n    if (typeof this.internal.vFS[filename] !== \"undefined\") {\n      return this.internal.vFS[filename];\n    }\n    return null;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)\n * MIT License\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDF) {\n  \"use strict\";\n  /**\n   * Table of Unicode types.\n   *\n   * Generated by:\n   *\n   * var bidi = require(\"./bidi/index\");\n   * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).\n   * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).\n   * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));\n   *\n   * for( var i = 0; i < bidi_accumulate.length; i++) {\n   * \tif(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')\n   * \t\tbidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined\n   * }\n   * var bidiAccumulateStr = 'return [ \"' + bidi_accumulate.toString().replace(/,/g, '\", \"') + '\" ];';\n   * require(\"fs\").writeFile('unicode-types.js', bidiAccumulateStr);\n   *\n   * Based on:\n   * https://github.com/mathiasbynens/unicode-8.0.0\n   */\n  var bidiUnicodeTypes = [\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"S\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"B\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"CS\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"EN\",\n    \"EN\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"ET\",\n    \"ET\",\n    \"AL\",\n    \"CS\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"ET\",\n    \"AN\",\n    \"AN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\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    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"L\",\n    \"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\",\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\",\n    \"B\",\n    \"LRE\",\n    \"RLE\",\n    \"PDF\",\n    \"LRO\",\n    \"RLO\",\n    \"CS\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"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\",\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    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"N\",\n    \"LRI\",\n    \"RLI\",\n    \"FSI\",\n    \"PDI\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"ES\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\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\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\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\",\n    \"CS\",\n    \"N\",\n    \"CS\",\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    \"ET\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"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    \"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   * Unicode Bidi algorithm compliant Bidi engine.\n   * For reference see http://unicode.org/reports/tr9/\n   */\n\n  /**\n   * constructor ( options )\n   *\n   * Initializes Bidi engine\n   *\n   * @param {Object} See 'setOptions' below for detailed description.\n   * options are cashed between invocation of 'doBidiReorder' method\n   *\n   * sample usage pattern of BidiEngine:\n   * var opt = {\n   * \tisInputVisual: true,\n   * \tisInputRtl: false,\n   * \tisOutputVisual: false,\n   * \tisOutputRtl: false,\n   * \tisSymmetricSwapping: true\n   * }\n   * var sourceToTarget = [], levels = [];\n   * var bidiEng = Globalize.bidiEngine(opt);\n   * var src = \"text string to be reordered\";\n   * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);\n   */\n\n  jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function(options) {\n    var _UNICODE_TYPES = _bidiUnicodeTypes;\n\n    var _STATE_TABLE_LTR = [\n      [0, 3, 0, 1, 0, 0, 0],\n      [0, 3, 0, 1, 2, 2, 0],\n      [0, 3, 0, 0x11, 2, 0, 1],\n      [0, 3, 5, 5, 4, 1, 0],\n      [0, 3, 0x15, 0x15, 4, 0, 1],\n      [0, 3, 5, 5, 4, 2, 0]\n    ];\n\n    var _STATE_TABLE_RTL = [\n      [2, 0, 1, 1, 0, 1, 0],\n      [2, 0, 1, 1, 0, 2, 0],\n      [2, 0, 2, 1, 3, 2, 0],\n      [2, 0, 2, 0x21, 3, 1, 1]\n    ];\n\n    var _TYPE_NAMES_MAP = { L: 0, R: 1, EN: 2, AN: 3, N: 4, B: 5, S: 6 };\n\n    var _UNICODE_RANGES_MAP = {\n      0: 0,\n      5: 1,\n      6: 2,\n      7: 3,\n      0x20: 4,\n      0xfb: 5,\n      0xfe: 6,\n      0xff: 7\n    };\n\n    var _SWAP_TABLE = [\n      \"\\u0028\",\n      \"\\u0029\",\n      \"\\u0028\",\n      \"\\u003C\",\n      \"\\u003E\",\n      \"\\u003C\",\n      \"\\u005B\",\n      \"\\u005D\",\n      \"\\u005B\",\n      \"\\u007B\",\n      \"\\u007D\",\n      \"\\u007B\",\n      \"\\u00AB\",\n      \"\\u00BB\",\n      \"\\u00AB\",\n      \"\\u2039\",\n      \"\\u203A\",\n      \"\\u2039\",\n      \"\\u2045\",\n      \"\\u2046\",\n      \"\\u2045\",\n      \"\\u207D\",\n      \"\\u207E\",\n      \"\\u207D\",\n      \"\\u208D\",\n      \"\\u208E\",\n      \"\\u208D\",\n      \"\\u2264\",\n      \"\\u2265\",\n      \"\\u2264\",\n      \"\\u2329\",\n      \"\\u232A\",\n      \"\\u2329\",\n      \"\\uFE59\",\n      \"\\uFE5A\",\n      \"\\uFE59\",\n      \"\\uFE5B\",\n      \"\\uFE5C\",\n      \"\\uFE5B\",\n      \"\\uFE5D\",\n      \"\\uFE5E\",\n      \"\\uFE5D\",\n      \"\\uFE64\",\n      \"\\uFE65\",\n      \"\\uFE64\"\n    ];\n\n    var _LTR_RANGES_REG_EXPR = new RegExp(\n      /^([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)$/\n    );\n\n    var _lastArabic = false,\n      _hasUbatAl,\n      _hasUbatB,\n      _hasUbatS,\n      DIR_LTR = 0,\n      DIR_RTL = 1,\n      _isInVisual,\n      _isInRtl,\n      _isOutVisual,\n      _isOutRtl,\n      _isSymmetricSwapping,\n      _dir = DIR_LTR;\n\n    this.__bidiEngine__ = {};\n\n    var _init = function(text, sourceToTargetMap) {\n      if (sourceToTargetMap) {\n        for (var i = 0; i < text.length; i++) {\n          sourceToTargetMap[i] = i;\n        }\n      }\n      if (_isInRtl === undefined) {\n        _isInRtl = _isContextualDirRtl(text);\n      }\n      if (_isOutRtl === undefined) {\n        _isOutRtl = _isContextualDirRtl(text);\n      }\n    };\n\n    // for reference see 3.2 in http://unicode.org/reports/tr9/\n    //\n    var _getCharType = function(ch) {\n      var charCode = ch.charCodeAt(),\n        range = charCode >> 8,\n        rangeIdx = _UNICODE_RANGES_MAP[range];\n\n      if (rangeIdx !== undefined) {\n        return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];\n      } else if (range === 0xfc || range === 0xfd) {\n        return \"AL\";\n      } else if (_LTR_RANGES_REG_EXPR.test(range)) {\n        //unlikely case\n        return \"L\";\n      } else if (range === 8) {\n        // even less likely\n        return \"R\";\n      }\n      return \"N\"; //undefined type, mark as neutral\n    };\n\n    var _isContextualDirRtl = function(text) {\n      for (var i = 0, charType; i < text.length; i++) {\n        charType = _getCharType(text.charAt(i));\n        if (charType === \"L\") {\n          return false;\n        } else if (charType === \"R\") {\n          return true;\n        }\n      }\n      return false;\n    };\n\n    // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/\n    //\n    var _resolveCharType = function(chars, types, resolvedTypes, index) {\n      var cType = types[index],\n        wType,\n        nType,\n        i,\n        len;\n      switch (cType) {\n        case \"L\":\n        case \"R\":\n          _lastArabic = false;\n          break;\n        case \"N\":\n        case \"AN\":\n          break;\n\n        case \"EN\":\n          if (_lastArabic) {\n            cType = \"AN\";\n          }\n          break;\n\n        case \"AL\":\n          _lastArabic = true;\n          _hasUbatAl = true;\n          cType = \"R\";\n          break;\n\n        case \"WS\":\n          cType = \"N\";\n          break;\n\n        case \"CS\":\n          if (\n            index < 1 ||\n            index + 1 >= types.length ||\n            ((wType = resolvedTypes[index - 1]) !== \"EN\" && wType !== \"AN\") ||\n            ((nType = types[index + 1]) !== \"EN\" && nType !== \"AN\")\n          ) {\n            cType = \"N\";\n          } else if (_lastArabic) {\n            nType = \"AN\";\n          }\n          cType = nType === wType ? nType : \"N\";\n          break;\n\n        case \"ES\":\n          wType = index > 0 ? resolvedTypes[index - 1] : \"B\";\n          cType =\n            wType === \"EN\" &&\n            index + 1 < types.length &&\n            types[index + 1] === \"EN\"\n              ? \"EN\"\n              : \"N\";\n          break;\n\n        case \"ET\":\n          if (index > 0 && resolvedTypes[index - 1] === \"EN\") {\n            cType = \"EN\";\n            break;\n          } else if (_lastArabic) {\n            cType = \"N\";\n            break;\n          }\n          i = index + 1;\n          len = types.length;\n          while (i < len && types[i] === \"ET\") {\n            i++;\n          }\n          if (i < len && types[i] === \"EN\") {\n            cType = \"EN\";\n          } else {\n            cType = \"N\";\n          }\n          break;\n\n        case \"NSM\":\n          if (_isInVisual && !_isInRtl) {\n            //V->L\n            len = types.length;\n            i = index + 1;\n            while (i < len && types[i] === \"NSM\") {\n              i++;\n            }\n            if (i < len) {\n              var c = chars[index];\n              var rtlCandidate = (c >= 0x0591 && c <= 0x08ff) || c === 0xfb1e;\n              wType = types[i];\n              if (rtlCandidate && (wType === \"R\" || wType === \"AL\")) {\n                cType = \"R\";\n                break;\n              }\n            }\n          }\n          if (index < 1 || (wType = types[index - 1]) === \"B\") {\n            cType = \"N\";\n          } else {\n            cType = resolvedTypes[index - 1];\n          }\n          break;\n\n        case \"B\":\n          _lastArabic = false;\n          _hasUbatB = true;\n          cType = _dir;\n          break;\n\n        case \"S\":\n          _hasUbatS = true;\n          cType = \"N\";\n          break;\n\n        case \"LRE\":\n        case \"RLE\":\n        case \"LRO\":\n        case \"RLO\":\n        case \"PDF\":\n          _lastArabic = false;\n          break;\n        case \"BN\":\n          cType = \"N\";\n          break;\n      }\n      return cType;\n    };\n\n    var _handleUbatS = function(types, levels, length) {\n      for (var i = 0; i < length; i++) {\n        if (types[i] === \"S\") {\n          levels[i] = _dir;\n          for (var j = i - 1; j >= 0; j--) {\n            if (types[j] === \"WS\") {\n              levels[j] = _dir;\n            } else {\n              break;\n            }\n          }\n        }\n      }\n    };\n\n    var _invertString = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\");\n      if (levels) {\n        _computeLevels(charArray, levels, { hiLevel: _dir });\n      }\n      charArray.reverse();\n      sourceToTargetMap && sourceToTargetMap.reverse();\n      return charArray.join(\"\");\n    };\n\n    // For reference see 3.3 in http://unicode.org/reports/tr9/\n    //\n    var _computeLevels = function(chars, levels, params) {\n      var action,\n        condition,\n        i,\n        index,\n        newLevel,\n        prevState,\n        condPos = -1,\n        len = chars.length,\n        newState = 0,\n        resolvedTypes = [],\n        stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,\n        types = [];\n\n      _lastArabic = false;\n      _hasUbatAl = false;\n      _hasUbatB = false;\n      _hasUbatS = false;\n      for (i = 0; i < len; i++) {\n        types[i] = _getCharType(chars[i]);\n      }\n      for (index = 0; index < len; index++) {\n        prevState = newState;\n        resolvedTypes[index] = _resolveCharType(\n          chars,\n          types,\n          resolvedTypes,\n          index\n        );\n        newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];\n        action = newState & 0xf0;\n        newState &= 0x0f;\n        levels[index] = newLevel = stateTable[newState][5];\n        if (action > 0) {\n          if (action === 0x10) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = 1;\n            }\n            condPos = -1;\n          } else {\n            condPos = -1;\n          }\n        }\n        condition = stateTable[newState][6];\n        if (condition) {\n          if (condPos === -1) {\n            condPos = index;\n          }\n        } else {\n          if (condPos > -1) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = newLevel;\n            }\n            condPos = -1;\n          }\n        }\n        if (types[index] === \"B\") {\n          levels[index] = 0;\n        }\n        params.hiLevel |= newLevel;\n      }\n      if (_hasUbatS) {\n        _handleUbatS(types, levels, len);\n      }\n    };\n\n    // for reference see 3.4 in http://unicode.org/reports/tr9/\n    //\n    var _invertByLevel = function(\n      level,\n      charArray,\n      sourceToTargetMap,\n      levels,\n      params\n    ) {\n      if (params.hiLevel < level) {\n        return;\n      }\n      if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {\n        charArray.reverse();\n        sourceToTargetMap && sourceToTargetMap.reverse();\n        return;\n      }\n      var ch,\n        high,\n        end,\n        low,\n        len = charArray.length,\n        start = 0;\n\n      while (start < len) {\n        if (levels[start] >= level) {\n          end = start + 1;\n          while (end < len && levels[end] >= level) {\n            end++;\n          }\n          for (low = start, high = end - 1; low < high; low++, high--) {\n            ch = charArray[low];\n            charArray[low] = charArray[high];\n            charArray[high] = ch;\n            if (sourceToTargetMap) {\n              ch = sourceToTargetMap[low];\n              sourceToTargetMap[low] = sourceToTargetMap[high];\n              sourceToTargetMap[high] = ch;\n            }\n          }\n          start = end;\n        }\n        start++;\n      }\n    };\n\n    // for reference see 7 & BD16 in http://unicode.org/reports/tr9/\n    //\n    var _symmetricSwap = function(charArray, levels, params) {\n      if (params.hiLevel !== 0 && _isSymmetricSwapping) {\n        for (var i = 0, index; i < charArray.length; i++) {\n          if (levels[i] === 1) {\n            index = _SWAP_TABLE.indexOf(charArray[i]);\n            if (index >= 0) {\n              charArray[i] = _SWAP_TABLE[index + 1];\n            }\n          }\n        }\n      }\n    };\n\n    var _reorder = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\"),\n        params = { hiLevel: _dir };\n\n      if (!levels) {\n        levels = [];\n      }\n      _computeLevels(charArray, levels, params);\n      _symmetricSwap(charArray, levels, params);\n      _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);\n      _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);\n      return charArray.join(\"\");\n    };\n\n    // doBidiReorder( text, sourceToTargetMap, levels )\n    // Performs Bidi reordering by implementing Unicode Bidi algorithm.\n    // Returns reordered string\n    // @text [String]:\n    // - input string to be reordered, this is input parameter\n    // $sourceToTargetMap [Array] (optional)\n    // - resultant mapping between input and output strings, this is output parameter\n    // $levels [Array] (optional)\n    // - array of calculated Bidi levels, , this is output parameter\n    this.__bidiEngine__.doBidiReorder = function(\n      text,\n      sourceToTargetMap,\n      levels\n    ) {\n      _init(text, sourceToTargetMap);\n      if (!_isInVisual && _isOutVisual && !_isOutRtl) {\n        // LLTR->VLTR, LRTL->VLTR\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VRTL->VLTR, VLTR->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _invertString(text, sourceToTargetMap, levels);\n      } else if (!_isInVisual && _isOutVisual && _isOutRtl) {\n        // LLTR->VRTL, LRTL->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {\n        // VLTR->LLTR\n        _dir = DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VLTR->LRTL, VRTL->LLTR\n        text = _invertString(text, sourceToTargetMap);\n        if (_isInRtl) {\n          //LLTR -> VLTR\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n        } else {\n          //LRTL -> VRTL\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n        }\n      } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {\n        //  VRTL->LRTL\n        _dir = DIR_RTL;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // LRTL->LLTR, LLTR->LRTL\n        var isSymmetricSwappingOrig = _isSymmetricSwapping;\n        if (_isInRtl) {\n          //LRTL->LLTR\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _dir = DIR_LTR;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n        } else {\n          //LLTR->LRTL\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n          _dir = DIR_RTL;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n          text = _invertString(text, sourceToTargetMap);\n        }\n      }\n      return text;\n    };\n\n    /**\n     * @name setOptions( options )\n     * @function\n     * Sets options for Bidi conversion\n     * @param {Object}:\n     * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)\n     * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)\n     * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),\n     */\n    this.__bidiEngine__.setOptions = function(options) {\n      if (options) {\n        _isInVisual = options.isInputVisual;\n        _isOutVisual = options.isOutputVisual;\n        _isInRtl = options.isInputRtl;\n        _isOutRtl = options.isOutputRtl;\n        _isSymmetricSwapping = options.isSymmetricSwapping;\n      }\n    };\n\n    this.__bidiEngine__.setOptions(options);\n    return this.__bidiEngine__;\n  };\n\n  var _bidiUnicodeTypes = bidiUnicodeTypes;\n\n  var bidiEngine = new jsPDF.__bidiEngine__({ isInputVisual: true });\n\n  var bidiEngineFunction = function(args) {\n    var text = args.text;\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n    var lang = options.lang;\n    var tmpText = [];\n\n    options.isInputVisual =\n      typeof options.isInputVisual === \"boolean\" ? options.isInputVisual : true;\n    bidiEngine.setOptions(options);\n\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Object.prototype.toString.call(text[i]) === \"[object Array]\") {\n          tmpText.push([\n            bidiEngine.doBidiReorder(text[i][0]),\n            text[i][1],\n            text[i][2]\n          ]);\n        } else {\n          tmpText.push([bidiEngine.doBidiReorder(text[i])]);\n        }\n      }\n      args.text = tmpText;\n    } else {\n      args.text = bidiEngine.doBidiReorder(text);\n    }\n    bidiEngine.setOptions({ isInputVisual: true });\n  };\n\n  jsPDF.API.events.push([\"postProcessText\", bidiEngineFunction]);\n})(jsPDF);\n","/* eslint-disable no-control-regex */\n/************************************************\n * Title : custom font                          *\n * Start Data : 2017. 01. 22.                   *\n * Comment : TEXT API                           *\n ************************************************/\n\n/******************************\n * jsPDF extension API Design *\n * ****************************/\n\nimport { jsPDF } from \"../jspdf.js\";\n\njsPDF.API.TTFFont = (function() {\n  /************************************************************************/\n  /* function : open                                                       */\n  /* comment : Decode the encoded ttf content and create a TTFFont object. */\n  /************************************************************************/\n  TTFFont.open = function(file) {\n    return new TTFFont(file);\n  };\n  /***************************************************************/\n  /* function : TTFFont gernerator                               */\n  /* comment : Decode TTF contents are parsed, Data,             */\n  /* Subset object is created, and registerTTF function is called.*/\n  /***************************************************************/\n  function TTFFont(rawData) {\n    var data;\n    this.rawData = rawData;\n    data = this.contents = new Data(rawData);\n    this.contents.pos = 4;\n    if (data.readString(4) === \"ttcf\") {\n      throw new Error(\"TTCF not supported.\");\n    } else {\n      data.pos = 0;\n      this.parse();\n      this.subset = new Subset(this);\n      this.registerTTF();\n    }\n  }\n  /********************************************************/\n  /* function : parse                                     */\n  /* comment : TTF Parses the file contents by each table.*/\n  /********************************************************/\n  TTFFont.prototype.parse = function() {\n    this.directory = new Directory(this.contents);\n    this.head = new HeadTable(this);\n    this.name = new NameTable(this);\n    this.cmap = new CmapTable(this);\n    this.toUnicode = {};\n    this.hhea = new HheaTable(this);\n    this.maxp = new MaxpTable(this);\n    this.hmtx = new HmtxTable(this);\n    this.post = new PostTable(this);\n    this.os2 = new OS2Table(this);\n    this.loca = new LocaTable(this);\n    this.glyf = new GlyfTable(this);\n    this.ascender =\n      (this.os2.exists && this.os2.ascender) || this.hhea.ascender;\n    this.decender =\n      (this.os2.exists && this.os2.decender) || this.hhea.decender;\n    this.lineGap = (this.os2.exists && this.os2.lineGap) || this.hhea.lineGap;\n    return (this.bbox = [\n      this.head.xMin,\n      this.head.yMin,\n      this.head.xMax,\n      this.head.yMax\n    ]);\n  };\n  /***************************************************************/\n  /* function : registerTTF                                      */\n  /* comment : Get the value to assign pdf font descriptors.     */\n  /***************************************************************/\n  TTFFont.prototype.registerTTF = function() {\n    var e, hi, low, raw, _ref;\n    this.scaleFactor = 1000.0 / this.head.unitsPerEm;\n    this.bbox = function() {\n      var _i, _len, _ref, _results;\n      _ref = this.bbox;\n      _results = [];\n      for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n        e = _ref[_i];\n        _results.push(Math.round(e * this.scaleFactor));\n      }\n      return _results;\n    }.call(this);\n    this.stemV = 0;\n    if (this.post.exists) {\n      raw = this.post.italic_angle;\n      hi = raw >> 16;\n      low = raw & 0xff;\n      if ((hi & 0x8000) !== 0) {\n        hi = -((hi ^ 0xffff) + 1);\n      }\n      this.italicAngle = +(\"\" + hi + \".\" + low);\n    } else {\n      this.italicAngle = 0;\n    }\n    this.ascender = Math.round(this.ascender * this.scaleFactor);\n    this.decender = Math.round(this.decender * this.scaleFactor);\n    this.lineGap = Math.round(this.lineGap * this.scaleFactor);\n    this.capHeight = (this.os2.exists && this.os2.capHeight) || this.ascender;\n    this.xHeight = (this.os2.exists && this.os2.xHeight) || 0;\n    this.familyClass = ((this.os2.exists && this.os2.familyClass) || 0) >> 8;\n    this.isSerif =\n      (_ref = this.familyClass) === 1 ||\n      _ref === 2 ||\n      _ref === 3 ||\n      _ref === 4 ||\n      _ref === 5 ||\n      _ref === 7;\n    this.isScript = this.familyClass === 10;\n    this.flags = 0;\n    if (this.post.isFixedPitch) {\n      this.flags |= 1 << 0;\n    }\n    if (this.isSerif) {\n      this.flags |= 1 << 1;\n    }\n    if (this.isScript) {\n      this.flags |= 1 << 3;\n    }\n    if (this.italicAngle !== 0) {\n      this.flags |= 1 << 6;\n    }\n    this.flags |= 1 << 5;\n    if (!this.cmap.unicode) {\n      throw new Error(\"No unicode cmap for font\");\n    }\n  };\n  TTFFont.prototype.characterToGlyph = function(character) {\n    var _ref;\n    return (\n      ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) ||\n      0\n    );\n  };\n  TTFFont.prototype.widthOfGlyph = function(glyph) {\n    var scale;\n    scale = 1000.0 / this.head.unitsPerEm;\n    return this.hmtx.forGlyph(glyph).advance * scale;\n  };\n  TTFFont.prototype.widthOfString = function(string, size, charSpace) {\n    var charCode, i, scale, width, _ref;\n    string = \"\" + string;\n    width = 0;\n    for (\n      i = 0, _ref = string.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      charCode = string.charCodeAt(i);\n      width +=\n        this.widthOfGlyph(this.characterToGlyph(charCode)) +\n          charSpace * (1000 / size) || 0;\n    }\n    scale = size / 1000;\n    return width * scale;\n  };\n  TTFFont.prototype.lineHeight = function(size, includeGap) {\n    var gap;\n    if (includeGap == null) {\n      includeGap = false;\n    }\n    gap = includeGap ? this.lineGap : 0;\n    return ((this.ascender + gap - this.decender) / 1000) * size;\n  };\n  return TTFFont;\n})();\n\n/************************************************************************************************/\n/* function : Data                                                                              */\n/* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/\n/************************************************************************************************/\nvar Data = (function() {\n  function Data(data) {\n    this.data = data != null ? data : [];\n    this.pos = 0;\n    this.length = this.data.length;\n  }\n  Data.prototype.readByte = function() {\n    return this.data[this.pos++];\n  };\n  Data.prototype.writeByte = function(byte) {\n    return (this.data[this.pos++] = byte);\n  };\n  Data.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.readByte() * 0x1000000;\n    b2 = this.readByte() << 16;\n    b3 = this.readByte() << 8;\n    b4 = this.readByte();\n    return b1 + b2 + b3 + b4;\n  };\n  Data.prototype.writeUInt32 = function(val) {\n    this.writeByte((val >>> 24) & 0xff);\n    this.writeByte((val >> 16) & 0xff);\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt32 = function() {\n    var int;\n    int = this.readUInt32();\n    if (int >= 0x80000000) {\n      return int - 0x100000000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt32 = function(val) {\n    if (val < 0) {\n      val += 0x100000000;\n    }\n    return this.writeUInt32(val);\n  };\n  Data.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.readByte() << 8;\n    b2 = this.readByte();\n    return b1 | b2;\n  };\n  Data.prototype.writeUInt16 = function(val) {\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt16 = function() {\n    var int;\n    int = this.readUInt16();\n    if (int >= 0x8000) {\n      return int - 0x10000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt16 = function(val) {\n    if (val < 0) {\n      val += 0x10000;\n    }\n    return this.writeUInt16(val);\n  };\n  Data.prototype.readString = function(length) {\n    var i, ret;\n    ret = [];\n    for (\n      i = 0;\n      0 <= length ? i < length : i > length;\n      i = 0 <= length ? ++i : --i\n    ) {\n      ret[i] = String.fromCharCode(this.readByte());\n    }\n    return ret.join(\"\");\n  };\n  Data.prototype.writeString = function(val) {\n    var i, _ref, _results;\n    _results = [];\n    for (\n      i = 0, _ref = val.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      _results.push(this.writeByte(val.charCodeAt(i)));\n    }\n    return _results;\n  };\n  /*Data.prototype.stringAt = function (pos, length) {\n            this.pos = pos;\n            return this.readString(length);\n        };*/\n  Data.prototype.readShort = function() {\n    return this.readInt16();\n  };\n  Data.prototype.writeShort = function(val) {\n    return this.writeInt16(val);\n  };\n  Data.prototype.readLongLong = function() {\n    var b1, b2, b3, b4, b5, b6, b7, b8;\n    b1 = this.readByte();\n    b2 = this.readByte();\n    b3 = this.readByte();\n    b4 = this.readByte();\n    b5 = this.readByte();\n    b6 = this.readByte();\n    b7 = this.readByte();\n    b8 = this.readByte();\n    if (b1 & 0x80) {\n      return (\n        ((b1 ^ 0xff) * 0x100000000000000 +\n          (b2 ^ 0xff) * 0x1000000000000 +\n          (b3 ^ 0xff) * 0x10000000000 +\n          (b4 ^ 0xff) * 0x100000000 +\n          (b5 ^ 0xff) * 0x1000000 +\n          (b6 ^ 0xff) * 0x10000 +\n          (b7 ^ 0xff) * 0x100 +\n          (b8 ^ 0xff) +\n          1) *\n        -1\n      );\n    }\n    return (\n      b1 * 0x100000000000000 +\n      b2 * 0x1000000000000 +\n      b3 * 0x10000000000 +\n      b4 * 0x100000000 +\n      b5 * 0x1000000 +\n      b6 * 0x10000 +\n      b7 * 0x100 +\n      b8\n    );\n  };\n  Data.prototype.writeLongLong = function(val) {\n    var high, low;\n    high = Math.floor(val / 0x100000000);\n    low = val & 0xffffffff;\n    this.writeByte((high >> 24) & 0xff);\n    this.writeByte((high >> 16) & 0xff);\n    this.writeByte((high >> 8) & 0xff);\n    this.writeByte(high & 0xff);\n    this.writeByte((low >> 24) & 0xff);\n    this.writeByte((low >> 16) & 0xff);\n    this.writeByte((low >> 8) & 0xff);\n    return this.writeByte(low & 0xff);\n  };\n  Data.prototype.readInt = function() {\n    return this.readInt32();\n  };\n  Data.prototype.writeInt = function(val) {\n    return this.writeInt32(val);\n  };\n  /*Data.prototype.slice = function (start, end) {\n            return this.data.slice(start, end);\n        };*/\n  Data.prototype.read = function(bytes) {\n    var buf, i;\n    buf = [];\n    for (\n      i = 0;\n      0 <= bytes ? i < bytes : i > bytes;\n      i = 0 <= bytes ? ++i : --i\n    ) {\n      buf.push(this.readByte());\n    }\n    return buf;\n  };\n  Data.prototype.write = function(bytes) {\n    var byte, i, _len, _results;\n    _results = [];\n    for (i = 0, _len = bytes.length; i < _len; i++) {\n      byte = bytes[i];\n      _results.push(this.writeByte(byte));\n    }\n    return _results;\n  };\n  return Data;\n})();\n\nvar Directory = (function() {\n  var checksum;\n\n  /*****************************************************************************************************/\n  /* function : Directory generator                                                                    */\n  /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/\n  /*****************************************************************************************************/\n  function Directory(data) {\n    var entry, i, _ref;\n    this.scalarType = data.readInt();\n    this.tableCount = data.readShort();\n    this.searchRange = data.readShort();\n    this.entrySelector = data.readShort();\n    this.rangeShift = data.readShort();\n    this.tables = {};\n    for (\n      i = 0, _ref = this.tableCount;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      entry = {\n        tag: data.readString(4),\n        checksum: data.readInt(),\n        offset: data.readInt(),\n        length: data.readInt()\n      };\n      this.tables[entry.tag] = entry;\n    }\n  }\n  /********************************************************************************************************/\n  /* function : encode                                                                                    */\n  /* comment : It encodes and stores the font table object and information used for the directory object. */\n  /********************************************************************************************************/\n  Directory.prototype.encode = function(tables) {\n    var adjustment,\n      directory,\n      directoryLength,\n      entrySelector,\n      headOffset,\n      log2,\n      offset,\n      rangeShift,\n      searchRange,\n      sum,\n      table,\n      tableCount,\n      tableData,\n      tag;\n    tableCount = Object.keys(tables).length;\n    log2 = Math.log(2);\n    searchRange = Math.floor(Math.log(tableCount) / log2) * 16;\n    entrySelector = Math.floor(searchRange / log2);\n    rangeShift = tableCount * 16 - searchRange;\n    directory = new Data();\n    directory.writeInt(this.scalarType);\n    directory.writeShort(tableCount);\n    directory.writeShort(searchRange);\n    directory.writeShort(entrySelector);\n    directory.writeShort(rangeShift);\n    directoryLength = tableCount * 16;\n    offset = directory.pos + directoryLength;\n    headOffset = null;\n    tableData = [];\n    for (tag in tables) {\n      table = tables[tag];\n      directory.writeString(tag);\n      directory.writeInt(checksum(table));\n      directory.writeInt(offset);\n      directory.writeInt(table.length);\n      tableData = tableData.concat(table);\n      if (tag === \"head\") {\n        headOffset = offset;\n      }\n      offset += table.length;\n      while (offset % 4) {\n        tableData.push(0);\n        offset++;\n      }\n    }\n    directory.write(tableData);\n    sum = checksum(directory.data);\n    adjustment = 0xb1b0afba - sum;\n    directory.pos = headOffset + 8;\n    directory.writeUInt32(adjustment);\n    return directory.data;\n  };\n  /***************************************************************/\n  /* function : checksum                                         */\n  /* comment : Duplicate the table for the tag.                  */\n  /***************************************************************/\n  checksum = function(data) {\n    var i, sum, tmp, _ref;\n    data = __slice.call(data);\n    while (data.length % 4) {\n      data.push(0);\n    }\n    tmp = new Data(data);\n    sum = 0;\n    for (i = 0, _ref = data.length; i < _ref; i = i += 4) {\n      sum += tmp.readUInt32();\n    }\n    return sum & 0xffffffff;\n  };\n  return Directory;\n})();\n\nvar Table,\n  __hasProp = {}.hasOwnProperty,\n  __extends = function(child, parent) {\n    for (var key in parent) {\n      if (__hasProp.call(parent, key)) child[key] = parent[key];\n    }\n\n    function ctor() {\n      this.constructor = child;\n    }\n    ctor.prototype = parent.prototype;\n    child.prototype = new ctor();\n    child.__super__ = parent.prototype;\n    return child;\n  };\n\n/***************************************************************/\n/* function : Table                                            */\n/* comment : Save info for each table, and parse the table.    */\n/***************************************************************/\nTable = (function() {\n  function Table(file) {\n    var info;\n    this.file = file;\n    info = this.file.directory.tables[this.tag];\n    this.exists = !!info;\n    if (info) {\n      (this.offset = info.offset), (this.length = info.length);\n      this.parse(this.file.contents);\n    }\n  }\n  Table.prototype.parse = function() {};\n  Table.prototype.encode = function() {};\n  Table.prototype.raw = function() {\n    if (!this.exists) {\n      return null;\n    }\n    this.file.contents.pos = this.offset;\n    return this.file.contents.read(this.length);\n  };\n  return Table;\n})();\n\nvar HeadTable = (function(_super) {\n  __extends(HeadTable, _super);\n\n  function HeadTable() {\n    return HeadTable.__super__.constructor.apply(this, arguments);\n  }\n  HeadTable.prototype.tag = \"head\";\n  HeadTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.revision = data.readInt();\n    this.checkSumAdjustment = data.readInt();\n    this.magicNumber = data.readInt();\n    this.flags = data.readShort();\n    this.unitsPerEm = data.readShort();\n    this.created = data.readLongLong();\n    this.modified = data.readLongLong();\n    this.xMin = data.readShort();\n    this.yMin = data.readShort();\n    this.xMax = data.readShort();\n    this.yMax = data.readShort();\n    this.macStyle = data.readShort();\n    this.lowestRecPPEM = data.readShort();\n    this.fontDirectionHint = data.readShort();\n    this.indexToLocFormat = data.readShort();\n    return (this.glyphDataFormat = data.readShort());\n  };\n  HeadTable.prototype.encode = function(indexToLocFormat) {\n    var table;\n    table = new Data();\n    table.writeInt(this.version);\n    table.writeInt(this.revision);\n    table.writeInt(this.checkSumAdjustment);\n    table.writeInt(this.magicNumber);\n    table.writeShort(this.flags);\n    table.writeShort(this.unitsPerEm);\n    table.writeLongLong(this.created);\n    table.writeLongLong(this.modified);\n    table.writeShort(this.xMin);\n    table.writeShort(this.yMin);\n    table.writeShort(this.xMax);\n    table.writeShort(this.yMax);\n    table.writeShort(this.macStyle);\n    table.writeShort(this.lowestRecPPEM);\n    table.writeShort(this.fontDirectionHint);\n    table.writeShort(indexToLocFormat);\n    table.writeShort(this.glyphDataFormat);\n    return table.data;\n  };\n  return HeadTable;\n})(Table);\n\n/************************************************************************************/\n/* function : CmapEntry                                                             */\n/* comment : Cmap Initializes and encodes object information (required by pdf spec).*/\n/************************************************************************************/\nvar CmapEntry = (function() {\n  function CmapEntry(data, offset) {\n    var code,\n      count,\n      endCode,\n      glyphId,\n      glyphIds,\n      i,\n      idDelta,\n      idRangeOffset,\n      index,\n      saveOffset,\n      segCount,\n      segCountX2,\n      start,\n      startCode,\n      tail,\n      _j,\n      _k,\n      _len;\n    this.platformID = data.readUInt16();\n    this.encodingID = data.readShort();\n    this.offset = offset + data.readInt();\n    saveOffset = data.pos;\n    data.pos = this.offset;\n    this.format = data.readUInt16();\n    this.length = data.readUInt16();\n    this.language = data.readUInt16();\n    this.isUnicode =\n      (this.platformID === 3 && this.encodingID === 1 && this.format === 4) ||\n      (this.platformID === 0 && this.format === 4);\n    this.codeMap = {};\n    switch (this.format) {\n      case 0:\n        for (i = 0; i < 256; ++i) {\n          this.codeMap[i] = data.readByte();\n        }\n        break;\n      case 4:\n        segCountX2 = data.readUInt16();\n        segCount = segCountX2 / 2;\n        data.pos += 6;\n        endCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        data.pos += 2;\n        startCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idDelta = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idRangeOffset = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        count = (this.length - data.pos + this.offset) / 2;\n        glyphIds = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= count ? _j < count : _j > count;\n            i = 0 <= count ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {\n          tail = endCode[i];\n          start = startCode[i];\n          for (\n            code = _k = start;\n            start <= tail ? _k <= tail : _k >= tail;\n            code = start <= tail ? ++_k : --_k\n          ) {\n            if (idRangeOffset[i] === 0) {\n              glyphId = code + idDelta[i];\n            } else {\n              index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);\n              glyphId = glyphIds[index] || 0;\n              if (glyphId !== 0) {\n                glyphId += idDelta[i];\n              }\n            }\n            this.codeMap[code] = glyphId & 0xffff;\n          }\n        }\n    }\n    data.pos = saveOffset;\n  }\n  CmapEntry.encode = function(charmap, encoding) {\n    var charMap,\n      code,\n      codeMap,\n      codes,\n      delta,\n      deltas,\n      diff,\n      endCode,\n      endCodes,\n      entrySelector,\n      glyphIDs,\n      i,\n      id,\n      indexes,\n      last,\n      map,\n      nextID,\n      offset,\n      old,\n      rangeOffsets,\n      rangeShift,\n      searchRange,\n      segCount,\n      segCountX2,\n      startCode,\n      startCodes,\n      startGlyph,\n      subtable,\n      _i,\n      _j,\n      _k,\n      _l,\n      _len,\n      _len1,\n      _len2,\n      _len3,\n      _len4,\n      _len5,\n      _len6,\n      _len7,\n      _m,\n      _n,\n      _name,\n      _o,\n      _p,\n      _q;\n    subtable = new Data();\n    codes = Object.keys(charmap).sort(function(a, b) {\n      return a - b;\n    });\n    switch (encoding) {\n      case \"macroman\":\n        id = 0;\n        indexes = (function() {\n          var _results = [];\n          for (i = 0; i < 256; ++i) {\n            _results.push(0);\n          }\n          return _results;\n        })();\n        map = {\n          0: 0\n        };\n        codeMap = {};\n        for (_i = 0, _len = codes.length; _i < _len; _i++) {\n          code = codes[_i];\n          if (map[(_name = charmap[code])] == null) {\n            map[_name] = ++id;\n          }\n          codeMap[code] = {\n            old: charmap[code],\n            new: map[charmap[code]]\n          };\n          indexes[code] = map[charmap[code]];\n        }\n        subtable.writeUInt16(1);\n        subtable.writeUInt16(0);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(262);\n        subtable.writeUInt16(0);\n        subtable.write(indexes);\n        return {\n          charMap: codeMap,\n          subtable: subtable.data,\n          maxGlyphID: id + 1\n        };\n      case \"unicode\":\n        startCodes = [];\n        endCodes = [];\n        nextID = 0;\n        map = {};\n        charMap = {};\n        last = diff = null;\n        for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {\n          code = codes[_j];\n          old = charmap[code];\n          if (map[old] == null) {\n            map[old] = ++nextID;\n          }\n          charMap[code] = {\n            old: old,\n            new: map[old]\n          };\n          delta = map[old] - code;\n          if (last == null || delta !== diff) {\n            if (last) {\n              endCodes.push(last);\n            }\n            startCodes.push(code);\n            diff = delta;\n          }\n          last = code;\n        }\n        if (last) {\n          endCodes.push(last);\n        }\n        endCodes.push(0xffff);\n        startCodes.push(0xffff);\n        segCount = startCodes.length;\n        segCountX2 = segCount * 2;\n        searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);\n        entrySelector = Math.log(searchRange / 2) / Math.LN2;\n        rangeShift = 2 * segCount - searchRange;\n        deltas = [];\n        rangeOffsets = [];\n        glyphIDs = [];\n        for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {\n          startCode = startCodes[i];\n          endCode = endCodes[i];\n          if (startCode === 0xffff) {\n            deltas.push(0);\n            rangeOffsets.push(0);\n            break;\n          }\n          startGlyph = charMap[startCode][\"new\"];\n          if (startCode - startGlyph >= 0x8000) {\n            deltas.push(0);\n            rangeOffsets.push(2 * (glyphIDs.length + segCount - i));\n            for (\n              code = _l = startCode;\n              startCode <= endCode ? _l <= endCode : _l >= endCode;\n              code = startCode <= endCode ? ++_l : --_l\n            ) {\n              glyphIDs.push(charMap[code][\"new\"]);\n            }\n          } else {\n            deltas.push(startGlyph - startCode);\n            rangeOffsets.push(0);\n          }\n        }\n        subtable.writeUInt16(3);\n        subtable.writeUInt16(1);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(4);\n        subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(segCountX2);\n        subtable.writeUInt16(searchRange);\n        subtable.writeUInt16(entrySelector);\n        subtable.writeUInt16(rangeShift);\n        for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {\n          code = endCodes[_m];\n          subtable.writeUInt16(code);\n        }\n        subtable.writeUInt16(0);\n        for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {\n          code = startCodes[_n];\n          subtable.writeUInt16(code);\n        }\n        for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {\n          delta = deltas[_o];\n          subtable.writeUInt16(delta);\n        }\n        for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {\n          offset = rangeOffsets[_p];\n          subtable.writeUInt16(offset);\n        }\n        for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {\n          id = glyphIDs[_q];\n          subtable.writeUInt16(id);\n        }\n        return {\n          charMap: charMap,\n          subtable: subtable.data,\n          maxGlyphID: nextID + 1\n        };\n    }\n  };\n  return CmapEntry;\n})();\n\nvar CmapTable = (function(_super) {\n  __extends(CmapTable, _super);\n\n  function CmapTable() {\n    return CmapTable.__super__.constructor.apply(this, arguments);\n  }\n  CmapTable.prototype.tag = \"cmap\";\n  CmapTable.prototype.parse = function(data) {\n    var entry, i, tableCount;\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    tableCount = data.readUInt16();\n    this.tables = [];\n    this.unicode = null;\n    for (\n      i = 0;\n      0 <= tableCount ? i < tableCount : i > tableCount;\n      i = 0 <= tableCount ? ++i : --i\n    ) {\n      entry = new CmapEntry(data, this.offset);\n      this.tables.push(entry);\n      if (entry.isUnicode) {\n        if (this.unicode == null) {\n          this.unicode = entry;\n        }\n      }\n    }\n    return true;\n  };\n  /*************************************************************************/\n  /* function : encode                                                     */\n  /* comment : Encode the cmap table corresponding to the input character. */\n  /*************************************************************************/\n  CmapTable.encode = function(charmap, encoding) {\n    var result, table;\n    if (encoding == null) {\n      encoding = \"macroman\";\n    }\n    result = CmapEntry.encode(charmap, encoding);\n    table = new Data();\n    table.writeUInt16(0);\n    table.writeUInt16(1);\n    result.table = table.data.concat(result.subtable);\n    return result;\n  };\n  return CmapTable;\n})(Table);\n\nvar HheaTable = (function(_super) {\n  __extends(HheaTable, _super);\n\n  function HheaTable() {\n    return HheaTable.__super__.constructor.apply(this, arguments);\n  }\n  HheaTable.prototype.tag = \"hhea\";\n  HheaTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.ascender = data.readShort();\n    this.decender = data.readShort();\n    this.lineGap = data.readShort();\n    this.advanceWidthMax = data.readShort();\n    this.minLeftSideBearing = data.readShort();\n    this.minRightSideBearing = data.readShort();\n    this.xMaxExtent = data.readShort();\n    this.caretSlopeRise = data.readShort();\n    this.caretSlopeRun = data.readShort();\n    this.caretOffset = data.readShort();\n    data.pos += 4 * 2;\n    this.metricDataFormat = data.readShort();\n    return (this.numberOfMetrics = data.readUInt16());\n  };\n  /*HheaTable.prototype.encode = function (ids) {\n            var i, table, _i, _ref;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeShort(this.ascender);\n            table.writeShort(this.decender);\n            table.writeShort(this.lineGap);\n            table.writeShort(this.advanceWidthMax);\n            table.writeShort(this.minLeftSideBearing);\n            table.writeShort(this.minRightSideBearing);\n            table.writeShort(this.xMaxExtent);\n            table.writeShort(this.caretSlopeRise);\n            table.writeShort(this.caretSlopeRun);\n            table.writeShort(this.caretOffset);\n            for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                table.writeByte(0);\n            }\n            table.writeShort(this.metricDataFormat);\n            table.writeUInt16(ids.length);\n            return table.data;\n        };*/\n  return HheaTable;\n})(Table);\n\nvar OS2Table = (function(_super) {\n  __extends(OS2Table, _super);\n\n  function OS2Table() {\n    return OS2Table.__super__.constructor.apply(this, arguments);\n  }\n  OS2Table.prototype.tag = \"OS/2\";\n  OS2Table.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    this.averageCharWidth = data.readShort();\n    this.weightClass = data.readUInt16();\n    this.widthClass = data.readUInt16();\n    this.type = data.readShort();\n    this.ySubscriptXSize = data.readShort();\n    this.ySubscriptYSize = data.readShort();\n    this.ySubscriptXOffset = data.readShort();\n    this.ySubscriptYOffset = data.readShort();\n    this.ySuperscriptXSize = data.readShort();\n    this.ySuperscriptYSize = data.readShort();\n    this.ySuperscriptXOffset = data.readShort();\n    this.ySuperscriptYOffset = data.readShort();\n    this.yStrikeoutSize = data.readShort();\n    this.yStrikeoutPosition = data.readShort();\n    this.familyClass = data.readShort();\n    this.panose = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 10; ++i) {\n        _results.push(data.readByte());\n      }\n      return _results;\n    })();\n    this.charRange = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 4; ++i) {\n        _results.push(data.readInt());\n      }\n      return _results;\n    })();\n    this.vendorID = data.readString(4);\n    this.selection = data.readShort();\n    this.firstCharIndex = data.readShort();\n    this.lastCharIndex = data.readShort();\n    if (this.version > 0) {\n      this.ascent = data.readShort();\n      this.descent = data.readShort();\n      this.lineGap = data.readShort();\n      this.winAscent = data.readShort();\n      this.winDescent = data.readShort();\n      this.codePageRange = (function() {\n        var i, _results;\n        _results = [];\n        for (i = 0; i < 2; i = ++i) {\n          _results.push(data.readInt());\n        }\n        return _results;\n      })();\n      if (this.version > 1) {\n        this.xHeight = data.readShort();\n        this.capHeight = data.readShort();\n        this.defaultChar = data.readShort();\n        this.breakChar = data.readShort();\n        return (this.maxContext = data.readShort());\n      }\n    }\n  };\n  /*OS2Table.prototype.encode = function () {\n            return this.raw();\n        };*/\n  return OS2Table;\n})(Table);\n\nvar PostTable = (function(_super) {\n  var POSTSCRIPT_GLYPHS;\n  __extends(PostTable, _super);\n\n  function PostTable() {\n    return PostTable.__super__.constructor.apply(this, arguments);\n  }\n  PostTable.prototype.tag = \"post\";\n  PostTable.prototype.parse = function(data) {\n    var length, numberOfGlyphs, _results;\n    data.pos = this.offset;\n    this.format = data.readInt();\n    this.italicAngle = data.readInt();\n    this.underlinePosition = data.readShort();\n    this.underlineThickness = data.readShort();\n    this.isFixedPitch = data.readInt();\n    this.minMemType42 = data.readInt();\n    this.maxMemType42 = data.readInt();\n    this.minMemType1 = data.readInt();\n    this.maxMemType1 = data.readInt();\n    switch (this.format) {\n      case 0x00010000:\n        break;\n      case 0x00020000:\n        numberOfGlyphs = data.readUInt16();\n        this.glyphNameIndex = [];\n        var i;\n        for (\n          i = 0;\n          0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs;\n          i = 0 <= numberOfGlyphs ? ++i : --i\n        ) {\n          this.glyphNameIndex.push(data.readUInt16());\n        }\n        this.names = [];\n        _results = [];\n        while (data.pos < this.offset + this.length) {\n          length = data.readByte();\n          _results.push(this.names.push(data.readString(length)));\n        }\n        return _results;\n      case 0x00025000:\n        numberOfGlyphs = data.readUInt16();\n        return (this.offsets = data.read(numberOfGlyphs));\n      case 0x00030000:\n        break;\n      case 0x00040000:\n        return (this.map = function() {\n          var _j, _ref, _results1;\n          _results1 = [];\n          for (\n            i = _j = 0, _ref = this.file.maxp.numGlyphs;\n            0 <= _ref ? _j < _ref : _j > _ref;\n            i = 0 <= _ref ? ++_j : --_j\n          ) {\n            _results1.push(data.readUInt32());\n          }\n          return _results1;\n        }.call(this));\n    }\n  };\n  /*PostTable.prototype.glyphFor = function (code) {\n            var index;\n            switch (this.format) {\n            case 0x00010000:\n                return POSTSCRIPT_GLYPHS[code] || '.notdef';\n            case 0x00020000:\n                index = this.glyphNameIndex[code];\n                if (index <= 257) {\n                    return POSTSCRIPT_GLYPHS[index];\n                }\n                else {\n                    return this.names[index - 258] || '.notdef';\n                }\n                break;\n            case 0x00025000:\n                return POSTSCRIPT_GLYPHS[code + this.offsets[code]] || '.notdef';\n            case 0x00030000:\n                return '.notdef';\n            case 0x00040000:\n                return this.map[code] || 0xFFFF;\n            }\n        };*/\n  /*PostTable.prototype.encode = function (mapping) {\n            var id, index, indexes, position, post, raw, string, strings, table, _i, _j, _k, _len, _len1, _len2;\n            if (!this.exists) {\n                return null;\n            }\n            raw = this.raw();\n            if (this.format === 0x00030000) {\n                return raw;\n            }\n            table = new Data(raw.slice(0, 32));\n            table.writeUInt32(0x00020000);\n            table.pos = 32;\n            indexes = [];\n            strings = [];\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                post = this.glyphFor(id);\n                position = POSTSCRIPT_GLYPHS.indexOf(post);\n                if (position !== -1) {\n                    indexes.push(position);\n                }\n                else {\n                    indexes.push(257 + strings.length);\n                    strings.push(post);\n                }\n            }\n            table.writeUInt16(Object.keys(mapping).length);\n            for (_j = 0, _len1 = indexes.length; _j < _len1; _j++) {\n                index = indexes[_j];\n                table.writeUInt16(index);\n            }\n            for (_k = 0, _len2 = strings.length; _k < _len2; _k++) {\n                string = strings[_k];\n                table.writeByte(string.length);\n                table.writeString(string);\n            }\n            return table.data;\n        };*/\n  POSTSCRIPT_GLYPHS = \".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\\nzero one two three four five six seven eight nine colon semicolon less equal greater\\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\\nbracketleft backslash bracketright asciicircum underscore grave\\na b c d e f g h i j k l m n o p q r s t u v w x y z\\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\\nsterling section bullet paragraph germandbls registered copyright trademark acute\\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\\nCacute cacute Ccaron ccaron dcroat\".split(\n    /\\s+/g\n  );\n  return PostTable;\n})(Table);\n\n/*********************************************************************************************************/\n/* function : NameEntry                                                                                  */\n/* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/\n/*********************************************************************************************************/\nvar NameEntry = (function() {\n  function NameEntry(raw, entry) {\n    this.raw = raw;\n    this.length = raw.length;\n    this.platformID = entry.platformID;\n    this.encodingID = entry.encodingID;\n    this.languageID = entry.languageID;\n  }\n  return NameEntry;\n})();\n\nvar NameTable = (function(_super) {\n  var subsetTag;\n  __extends(NameTable, _super);\n\n  function NameTable() {\n    return NameTable.__super__.constructor.apply(this, arguments);\n  }\n  NameTable.prototype.tag = \"name\";\n  NameTable.prototype.parse = function(data) {\n    var count,\n      entries,\n      entry,\n      i,\n      name,\n      stringOffset,\n      strings,\n      text,\n      _j,\n      _len,\n      _name;\n    data.pos = this.offset;\n    data.readShort(); //format\n    count = data.readShort();\n    stringOffset = data.readShort();\n    entries = [];\n    for (\n      i = 0;\n      0 <= count ? i < count : i > count;\n      i = 0 <= count ? ++i : --i\n    ) {\n      entries.push({\n        platformID: data.readShort(),\n        encodingID: data.readShort(),\n        languageID: data.readShort(),\n        nameID: data.readShort(),\n        length: data.readShort(),\n        offset: this.offset + stringOffset + data.readShort()\n      });\n    }\n    strings = {};\n    for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {\n      entry = entries[i];\n      data.pos = entry.offset;\n      text = data.readString(entry.length);\n      name = new NameEntry(text, entry);\n      if (strings[(_name = entry.nameID)] == null) {\n        strings[_name] = [];\n      }\n      strings[entry.nameID].push(name);\n    }\n    this.strings = strings;\n    this.copyright = strings[0];\n    this.fontFamily = strings[1];\n    this.fontSubfamily = strings[2];\n    this.uniqueSubfamily = strings[3];\n    this.fontName = strings[4];\n    this.version = strings[5];\n    try {\n      this.postscriptName = strings[6][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    } catch (e) {\n      this.postscriptName = strings[4][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    }\n    this.trademark = strings[7];\n    this.manufacturer = strings[8];\n    this.designer = strings[9];\n    this.description = strings[10];\n    this.vendorUrl = strings[11];\n    this.designerUrl = strings[12];\n    this.license = strings[13];\n    this.licenseUrl = strings[14];\n    this.preferredFamily = strings[15];\n    this.preferredSubfamily = strings[17];\n    this.compatibleFull = strings[18];\n    return (this.sampleText = strings[19]);\n  };\n  subsetTag = \"AAAAAA\";\n  /*NameTable.prototype.encode = function () {\n            var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;\n            strings = {};\n            _ref = this.strings;\n            for (id in _ref) {\n                val = _ref[id];\n                strings[id] = val;\n            }\n            postscriptName = new NameEntry(\"\" + subsetTag + \"+\" + this.postscriptName, {\n                platformID: 1\n                , encodingID: 0\n                , languageID: 0\n            });\n            strings[6] = [postscriptName];\n            subsetTag = successorOf(subsetTag);\n            strCount = 0;\n            for (id in strings) {\n                list = strings[id];\n                if (list != null) {\n                    strCount += list.length;\n                }\n            }\n            table = new Data;\n            strTable = new Data;\n            table.writeShort(0);\n            table.writeShort(strCount);\n            table.writeShort(6 + 12 * strCount);\n            for (nameID in strings) {\n                list = strings[nameID];\n                if (list != null) {\n                    for (_i = 0, _len = list.length; _i < _len; _i++) {\n                        string = list[_i];\n                        table.writeShort(string.platformID);\n                        table.writeShort(string.encodingID);\n                        table.writeShort(string.languageID);\n                        table.writeShort(nameID);\n                        table.writeShort(string.length);\n                        table.writeShort(strTable.pos);\n                        strTable.writeString(string.raw);\n                    }\n                }\n            }\n            return nameTable = {\n                postscriptName: postscriptName.raw\n                , table: table.data.concat(strTable.data)\n            };\n        };*/\n  return NameTable;\n})(Table);\n\nvar MaxpTable = (function(_super) {\n  __extends(MaxpTable, _super);\n\n  function MaxpTable() {\n    return MaxpTable.__super__.constructor.apply(this, arguments);\n  }\n  MaxpTable.prototype.tag = \"maxp\";\n  MaxpTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.numGlyphs = data.readUInt16();\n    this.maxPoints = data.readUInt16();\n    this.maxContours = data.readUInt16();\n    this.maxCompositePoints = data.readUInt16();\n    this.maxComponentContours = data.readUInt16();\n    this.maxZones = data.readUInt16();\n    this.maxTwilightPoints = data.readUInt16();\n    this.maxStorage = data.readUInt16();\n    this.maxFunctionDefs = data.readUInt16();\n    this.maxInstructionDefs = data.readUInt16();\n    this.maxStackElements = data.readUInt16();\n    this.maxSizeOfInstructions = data.readUInt16();\n    this.maxComponentElements = data.readUInt16();\n    return (this.maxComponentDepth = data.readUInt16());\n  };\n  /*MaxpTable.prototype.encode = function (ids) {\n            var table;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeUInt16(ids.length);\n            table.writeUInt16(this.maxPoints);\n            table.writeUInt16(this.maxContours);\n            table.writeUInt16(this.maxCompositePoints);\n            table.writeUInt16(this.maxComponentContours);\n            table.writeUInt16(this.maxZones);\n            table.writeUInt16(this.maxTwilightPoints);\n            table.writeUInt16(this.maxStorage);\n            table.writeUInt16(this.maxFunctionDefs);\n            table.writeUInt16(this.maxInstructionDefs);\n            table.writeUInt16(this.maxStackElements);\n            table.writeUInt16(this.maxSizeOfInstructions);\n            table.writeUInt16(this.maxComponentElements);\n            table.writeUInt16(this.maxComponentDepth);\n            return table.data;\n        };*/\n  return MaxpTable;\n})(Table);\n\nvar HmtxTable = (function(_super) {\n  __extends(HmtxTable, _super);\n\n  function HmtxTable() {\n    return HmtxTable.__super__.constructor.apply(this, arguments);\n  }\n  HmtxTable.prototype.tag = \"hmtx\";\n  HmtxTable.prototype.parse = function(data) {\n    var i, last, lsbCount, m, _j, _ref, _results;\n    data.pos = this.offset;\n    this.metrics = [];\n    for (\n      i = 0, _ref = this.file.hhea.numberOfMetrics;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      this.metrics.push({\n        advance: data.readUInt16(),\n        lsb: data.readInt16()\n      });\n    }\n    lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;\n    this.leftSideBearings = (function() {\n      var _j, _results;\n      _results = [];\n      for (\n        i = _j = 0;\n        0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n        i = 0 <= lsbCount ? ++_j : --_j\n      ) {\n        _results.push(data.readInt16());\n      }\n      return _results;\n    })();\n    this.widths = function() {\n      var _j, _len, _ref1, _results;\n      _ref1 = this.metrics;\n      _results = [];\n      for (_j = 0, _len = _ref1.length; _j < _len; _j++) {\n        m = _ref1[_j];\n        _results.push(m.advance);\n      }\n      return _results;\n    }.call(this);\n    last = this.widths[this.widths.length - 1];\n    _results = [];\n    for (\n      i = _j = 0;\n      0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n      i = 0 <= lsbCount ? ++_j : --_j\n    ) {\n      _results.push(this.widths.push(last));\n    }\n    return _results;\n  };\n  /***************************************************************/\n  /* function : forGlyph                                         */\n  /* comment : Returns the advance width and lsb for this glyph. */\n  /***************************************************************/\n  HmtxTable.prototype.forGlyph = function(id) {\n    if (id in this.metrics) {\n      return this.metrics[id];\n    }\n    return {\n      advance: this.metrics[this.metrics.length - 1].advance,\n      lsb: this.leftSideBearings[id - this.metrics.length]\n    };\n  };\n  /*HmtxTable.prototype.encode = function (mapping) {\n            var id, metric, table, _i, _len;\n            table = new Data;\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                metric = this.forGlyph(id);\n                table.writeUInt16(metric.advance);\n                table.writeUInt16(metric.lsb);\n            }\n            return table.data;\n        };*/\n  return HmtxTable;\n})(Table);\n\nvar __slice = [].slice;\n\nvar GlyfTable = (function(_super) {\n  __extends(GlyfTable, _super);\n\n  function GlyfTable() {\n    return GlyfTable.__super__.constructor.apply(this, arguments);\n  }\n  GlyfTable.prototype.tag = \"glyf\";\n  GlyfTable.prototype.parse = function() {\n    return (this.cache = {});\n  };\n  GlyfTable.prototype.glyphFor = function(id) {\n    var data,\n      index,\n      length,\n      loca,\n      numberOfContours,\n      raw,\n      xMax,\n      xMin,\n      yMax,\n      yMin;\n    if (id in this.cache) {\n      return this.cache[id];\n    }\n    loca = this.file.loca;\n    data = this.file.contents;\n    index = loca.indexOf(id);\n    length = loca.lengthOf(id);\n    if (length === 0) {\n      return (this.cache[id] = null);\n    }\n    data.pos = this.offset + index;\n    raw = new Data(data.read(length));\n    numberOfContours = raw.readShort();\n    xMin = raw.readShort();\n    yMin = raw.readShort();\n    xMax = raw.readShort();\n    yMax = raw.readShort();\n    if (numberOfContours === -1) {\n      this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);\n    } else {\n      this.cache[id] = new SimpleGlyph(\n        raw,\n        numberOfContours,\n        xMin,\n        yMin,\n        xMax,\n        yMax\n      );\n    }\n    return this.cache[id];\n  };\n  GlyfTable.prototype.encode = function(glyphs, mapping, old2new) {\n    var glyph, id, offsets, table, _i, _len;\n    table = [];\n    offsets = [];\n    for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n      id = mapping[_i];\n      glyph = glyphs[id];\n      offsets.push(table.length);\n      if (glyph) {\n        table = table.concat(glyph.encode(old2new));\n      }\n    }\n    offsets.push(table.length);\n    return {\n      table: table,\n      offsets: offsets\n    };\n  };\n  return GlyfTable;\n})(Table);\n\nvar SimpleGlyph = (function() {\n  /**************************************************************************/\n  /* function : SimpleGlyph                                                 */\n  /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/\n  /**************************************************************************/\n  function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {\n    this.raw = raw;\n    this.numberOfContours = numberOfContours;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = false;\n  }\n  SimpleGlyph.prototype.encode = function() {\n    return this.raw.data;\n  };\n  return SimpleGlyph;\n})();\n\nvar CompoundGlyph = (function() {\n  var ARG_1_AND_2_ARE_WORDS,\n    MORE_COMPONENTS,\n    WE_HAVE_AN_X_AND_Y_SCALE,\n    WE_HAVE_A_SCALE,\n    WE_HAVE_A_TWO_BY_TWO,\n    WE_HAVE_INSTRUCTIONS;\n  ARG_1_AND_2_ARE_WORDS = 0x0001;\n  WE_HAVE_A_SCALE = 0x0008;\n  MORE_COMPONENTS = 0x0020;\n  WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;\n  WE_HAVE_A_TWO_BY_TWO = 0x0080;\n  WE_HAVE_INSTRUCTIONS = 0x0100;\n\n  /********************************************************************************************************************/\n  /* function : CompoundGlypg generator                                                                               */\n  /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/\n  /********************************************************************************************************************/\n  function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {\n    var data, flags;\n    this.raw = raw;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = true;\n    this.glyphIDs = [];\n    this.glyphOffsets = [];\n    data = this.raw;\n    while (true) {\n      flags = data.readShort();\n      this.glyphOffsets.push(data.pos);\n      this.glyphIDs.push(data.readUInt16());\n      if (!(flags & MORE_COMPONENTS)) {\n        break;\n      }\n      if (flags & ARG_1_AND_2_ARE_WORDS) {\n        data.pos += 4;\n      } else {\n        data.pos += 2;\n      }\n      if (flags & WE_HAVE_A_TWO_BY_TWO) {\n        data.pos += 8;\n      } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n        data.pos += 4;\n      } else if (flags & WE_HAVE_A_SCALE) {\n        data.pos += 2;\n      }\n    }\n  }\n  /****************************************************************************************************************/\n  /* function : CompoundGlypg encode                                                                              */\n  /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/\n  /****************************************************************************************************************/\n  CompoundGlyph.prototype.encode = function() {\n    var i, result, _len, _ref;\n    result = new Data(__slice.call(this.raw.data));\n    _ref = this.glyphIDs;\n    for (i = 0, _len = _ref.length; i < _len; ++i) {\n      result.pos = this.glyphOffsets[i];\n    }\n    return result.data;\n  };\n  return CompoundGlyph;\n})();\n\nvar LocaTable = (function(_super) {\n  __extends(LocaTable, _super);\n\n  function LocaTable() {\n    return LocaTable.__super__.constructor.apply(this, arguments);\n  }\n  LocaTable.prototype.tag = \"loca\";\n  LocaTable.prototype.parse = function(data) {\n    var format, i;\n    data.pos = this.offset;\n    format = this.file.head.indexToLocFormat;\n    if (format === 0) {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 2) {\n          _results.push(data.readUInt16() * 2);\n        }\n        return _results;\n      }.call(this));\n    } else {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 4) {\n          _results.push(data.readUInt32());\n        }\n        return _results;\n      }.call(this));\n    }\n  };\n  LocaTable.prototype.indexOf = function(id) {\n    return this.offsets[id];\n  };\n  LocaTable.prototype.lengthOf = function(id) {\n    return this.offsets[id + 1] - this.offsets[id];\n  };\n  LocaTable.prototype.encode = function(offsets, activeGlyphs) {\n    var LocaTable = new Uint32Array(this.offsets.length);\n    var glyfPtr = 0;\n    var listGlyf = 0;\n    for (var k = 0; k < LocaTable.length; ++k) {\n      LocaTable[k] = glyfPtr;\n      if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {\n        ++listGlyf;\n        LocaTable[k] = glyfPtr;\n        var start = this.offsets[k];\n        var len = this.offsets[k + 1] - start;\n        if (len > 0) {\n          glyfPtr += len;\n        }\n      }\n    }\n    var newLocaTable = new Array(LocaTable.length * 4);\n    for (var j = 0; j < LocaTable.length; ++j) {\n      newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;\n      newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;\n      newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;\n      newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;\n    }\n    return newLocaTable;\n  };\n  return LocaTable;\n})(Table);\n\n/************************************************************************************/\n/* function : invert                                                                */\n/* comment : Change the object's (key: value) to create an object with (value: key).*/\n/************************************************************************************/\nvar invert = function(object) {\n  var key, ret, val;\n  ret = {};\n  for (key in object) {\n    val = object[key];\n    ret[val] = key;\n  }\n  return ret;\n};\n\n/*var successorOf = function (input) {\n        var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;\n        alphabet = 'abcdefghijklmnopqrstuvwxyz';\n        length = alphabet.length;\n        result = input;\n        i = input.length;\n        while (i >= 0) {\n            last = input.charAt(--i);\n            if (isNaN(last)) {\n                index = alphabet.indexOf(last.toLowerCase());\n                if (index === -1) {\n                    next = last;\n                    carry = true;\n                }\n                else {\n                    next = alphabet.charAt((index + 1) % length);\n                    isUpperCase = last === last.toUpperCase();\n                    if (isUpperCase) {\n                        next = next.toUpperCase();\n                    }\n                    carry = index + 1 >= length;\n                    if (carry && i === 0) {\n                        added = isUpperCase ? 'A' : 'a';\n                        result = added + next + result.slice(1);\n                        break;\n                    }\n                }\n            }\n            else {\n                next = +last + 1;\n                carry = next > 9;\n                if (carry) {\n                    next = 0;\n                }\n                if (carry && i === 0) {\n                    result = '1' + next + result.slice(1);\n                    break;\n                }\n            }\n            result = result.slice(0, i) + next + result.slice(i + 1);\n            if (!carry) {\n                break;\n            }\n        }\n        return result;\n    };*/\n\nvar Subset = (function() {\n  function Subset(font) {\n    this.font = font;\n    this.subset = {};\n    this.unicodes = {};\n    this.next = 33;\n  }\n  /*Subset.prototype.use = function (character) {\n            var i, _i, _ref;\n            if (typeof character === 'string') {\n                for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                    this.use(character.charCodeAt(i));\n                }\n                return;\n            }\n            if (!this.unicodes[character]) {\n                this.subset[this.next] = character;\n                return this.unicodes[character] = this.next++;\n            }\n        };*/\n  /*Subset.prototype.encodeText = function (text) {\n            var char, i, string, _i, _ref;\n            string = '';\n            for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                char = this.unicodes[text.charCodeAt(i)];\n                string += String.fromCharCode(char);\n            }\n            return string;\n        };*/\n  /***************************************************************/\n  /* function : generateCmap                                     */\n  /* comment : Returns the unicode cmap for this font.         */\n  /***************************************************************/\n  Subset.prototype.generateCmap = function() {\n    var mapping, roman, unicode, unicodeCmap, _ref;\n    unicodeCmap = this.font.cmap.tables[0].codeMap;\n    mapping = {};\n    _ref = this.subset;\n    for (roman in _ref) {\n      unicode = _ref[roman];\n      mapping[roman] = unicodeCmap[unicode];\n    }\n    return mapping;\n  };\n  /*Subset.prototype.glyphIDs = function () {\n            var ret, roman, unicode, unicodeCmap, val, _ref;\n            unicodeCmap = this.font.cmap.tables[0].codeMap;\n            ret = [0];\n            _ref = this.subset;\n            for (roman in _ref) {\n                unicode = _ref[roman];\n                val = unicodeCmap[unicode];\n                if ((val != null) && __indexOf.call(ret, val) < 0) {\n                    ret.push(val);\n                }\n            }\n            return ret.sort();\n        };*/\n  /******************************************************************/\n  /* function : glyphsFor                                           */\n  /* comment : Returns simple glyph objects for the input character.*/\n  /******************************************************************/\n  Subset.prototype.glyphsFor = function(glyphIDs) {\n    var additionalIDs, glyph, glyphs, id, _i, _len, _ref;\n    glyphs = {};\n    for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {\n      id = glyphIDs[_i];\n      glyphs[id] = this.font.glyf.glyphFor(id);\n    }\n    additionalIDs = [];\n    for (id in glyphs) {\n      glyph = glyphs[id];\n      if (glyph != null ? glyph.compound : void 0) {\n        additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);\n      }\n    }\n    if (additionalIDs.length > 0) {\n      _ref = this.glyphsFor(additionalIDs);\n      for (id in _ref) {\n        glyph = _ref[id];\n        glyphs[id] = glyph;\n      }\n    }\n    return glyphs;\n  };\n  /***************************************************************/\n  /* function : encode                                           */\n  /* comment : Encode various tables for the characters you use. */\n  /***************************************************************/\n  Subset.prototype.encode = function(glyID, indexToLocFormat) {\n    var cmap,\n      code,\n      glyf,\n      glyphs,\n      id,\n      ids,\n      loca,\n      new2old,\n      newIDs,\n      nextGlyphID,\n      old2new,\n      oldID,\n      oldIDs,\n      tables,\n      _ref;\n    cmap = CmapTable.encode(this.generateCmap(), \"unicode\");\n    glyphs = this.glyphsFor(glyID);\n    old2new = {\n      0: 0\n    };\n    _ref = cmap.charMap;\n    for (code in _ref) {\n      ids = _ref[code];\n      old2new[ids.old] = ids[\"new\"];\n    }\n    nextGlyphID = cmap.maxGlyphID;\n    for (oldID in glyphs) {\n      if (!(oldID in old2new)) {\n        old2new[oldID] = nextGlyphID++;\n      }\n    }\n    new2old = invert(old2new);\n    newIDs = Object.keys(new2old).sort(function(a, b) {\n      return a - b;\n    });\n    oldIDs = (function() {\n      var _i, _len, _results;\n      _results = [];\n      for (_i = 0, _len = newIDs.length; _i < _len; _i++) {\n        id = newIDs[_i];\n        _results.push(new2old[id]);\n      }\n      return _results;\n    })();\n    glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);\n    loca = this.font.loca.encode(glyf.offsets, oldIDs);\n    tables = {\n      cmap: this.font.cmap.raw(),\n      glyf: glyf.table,\n      loca: loca,\n      hmtx: this.font.hmtx.raw(),\n      hhea: this.font.hhea.raw(),\n      maxp: this.font.maxp.raw(),\n      post: this.font.post.raw(),\n      name: this.font.name.raw(),\n      head: this.font.head.encode(indexToLocFormat)\n    };\n    if (this.font.os2.exists) {\n      tables[\"OS/2\"] = this.font.os2.raw();\n    }\n    return this.font.directory.encode(tables);\n  };\n  return Subset;\n})();\n\njsPDF.API.PDFObject = (function() {\n  var pad;\n\n  function PDFObject() {}\n  pad = function(str, length) {\n    return (Array(length + 1).join(\"0\") + str).slice(-length);\n  };\n  /*****************************************************************************/\n  /* function : convert                                                        */\n  /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */\n  /*****************************************************************************/\n  PDFObject.convert = function(object) {\n    var e, items, key, out, val;\n    if (Array.isArray(object)) {\n      items = (function() {\n        var _i, _len, _results;\n        _results = [];\n        for (_i = 0, _len = object.length; _i < _len; _i++) {\n          e = object[_i];\n          _results.push(PDFObject.convert(e));\n        }\n        return _results;\n      })().join(\" \");\n      return \"[\" + items + \"]\";\n    } else if (typeof object === \"string\") {\n      return \"/\" + object;\n    } else if (object != null ? object.isString : void 0) {\n      return \"(\" + object + \")\";\n    } else if (object instanceof Date) {\n      return (\n        \"(D:\" +\n        pad(object.getUTCFullYear(), 4) +\n        pad(object.getUTCMonth(), 2) +\n        pad(object.getUTCDate(), 2) +\n        pad(object.getUTCHours(), 2) +\n        pad(object.getUTCMinutes(), 2) +\n        pad(object.getUTCSeconds(), 2) +\n        \"Z)\"\n      );\n    } else if ({}.toString.call(object) === \"[object Object]\") {\n      out = [\"<<\"];\n      for (key in object) {\n        val = object[key];\n        out.push(\"/\" + key + \" \" + PDFObject.convert(val));\n      }\n      out.push(\">>\");\n      return out.join(\"\\n\");\n    } else {\n      return \"\" + object;\n    }\n  };\n  return PDFObject;\n})();\n"],"names":["zlibSync","unzlibSync"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAI,YAAY,GAAG,CAAC,WAAW;AACtC,EAAE,OAAO,WAAW,KAAK,OAAO,MAAM;AACtC,MAAM,MAAM;AACZ,MAAM,WAAW,KAAK,OAAO,MAAM;AACnC,MAAM,MAAM;AACZ,MAAM,WAAW,KAAK,OAAO,IAAI;AACjC,MAAM,IAAI;AACV,MAAM,IAAI,CAAC;AACX,CAAC,GAAG;;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,CAAC,OAAO;AACrE,UAAU,iBAAiB;AAC3B,UAAU,kBAAkB;AAC5B,SAAS,CAAC;AACV,OAAO;AACP,KAAK;AACL;AACA,IAAI,OAAO,IAAI,CAAC;AAChB,GAAG,CAAC;AACJ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC;;ACxEb;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,SAAS,QAAQ,EAAE;AAEpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,QAAQ,CAAC,iBAAiB,GAAG,SAAS,OAAO,EAAE,OAAO,EAAE;AAC1D,IAAI,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;AAC5B,IAAI,OAAO,GAAG,OAAO,IAAI,KAAK,CAAC;AAC/B;AACA,IAAI,IAAI,aAAa,CAAC;AACtB,IAAI,IAAI,qBAAqB,GAAG;AAChC,MAAM,WAAW,EAAE;AACnB,QAAQ,YAAY,EAAE,KAAK;AAC3B,QAAQ,KAAK,EAAE,KAAK;AACpB,QAAQ,IAAI,EAAE,SAAS;AACvB,QAAQ,WAAW,EAAE,KAAK;AAC1B,QAAQ,QAAQ,EAAE,CAAC,IAAI,EAAE,KAAK,CAAC;AAC/B,QAAQ,UAAU,EAAE,GAAG;AACvB,OAAO;AACP,MAAM,WAAW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================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.node.min.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.node.min.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,456 @@
+/** @license
+ *
+ * jsPDF - PDF Document creation from JavaScript
+ * Version 2.5.2 Built on 2024-09-17T13:29:57.860Z
+ *                      CommitID 00000000
+ *
+ * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
+ *               2015-2021 yWorks GmbH, http://www.yworks.com
+ *               2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
+ *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
+ *               2010 Aaron Spike, https://github.com/acspike
+ *               2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2012 Pablo Hess, https://github.com/pablohess
+ *               2012 Florian Jenett, https://github.com/fjenett
+ *               2013 Warren Weckesser, https://github.com/warrenweckesser
+ *               2013 Youssef Beddad, https://github.com/lifof
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2013 Stefan Slonevskiy, https://github.com/stefslon
+ *               2013 Jeremy Morel, https://github.com/jmorel
+ *               2013 Christoph Hartmann, https://github.com/chris-rock
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Makes, https://github.com/dollaruw
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 Steven Spungin, https://github.com/Flamenco
+ *               2014 Kenneth Glassey, https://github.com/Gavvers
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Contributor(s):
+ *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
+ *    kim3er, mfo, alnorth, Flamenco
+ */
+
+"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e,r=require("fflate"),n=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();
+/**
+ * A class to parse color values
+ * @author Stoyan Stefanov <sstoo@gmail.com>
+ * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
+ * @license Use it if you like it
+ */
+function i(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 a(){n.console&&"function"==typeof n.console.log&&n.console.log.apply(n.console,arguments)}t=require("atob"),e=require("btoa");var o={log:a,warn:function(t){n.console&&("function"==typeof n.console.warn?n.console.warn.apply(n.console,arguments):a.call(null,arguments))},error:function(t){n.console&&("function"==typeof n.console.error?n.console.error.apply(n.console,arguments):a(t))}};
+/**
+ * @license
+ * Joseph Myers does not specify a particular license for his work.
+ *
+ * Author: Joseph Myers
+ * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
+ *
+ * Modified by: Owen Leong
+ */function s(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];r=u(r,n,i,a,e[0],7,-680876936),a=u(a,r,n,i,e[1],12,-389564586),i=u(i,a,r,n,e[2],17,606105819),n=u(n,i,a,r,e[3],22,-1044525330),r=u(r,n,i,a,e[4],7,-176418897),a=u(a,r,n,i,e[5],12,1200080426),i=u(i,a,r,n,e[6],17,-1473231341),n=u(n,i,a,r,e[7],22,-45705983),r=u(r,n,i,a,e[8],7,1770035416),a=u(a,r,n,i,e[9],12,-1958414417),i=u(i,a,r,n,e[10],17,-42063),n=u(n,i,a,r,e[11],22,-1990404162),r=u(r,n,i,a,e[12],7,1804603682),a=u(a,r,n,i,e[13],12,-40341101),i=u(i,a,r,n,e[14],17,-1502002290),r=h(r,n=u(n,i,a,r,e[15],22,1236535329),i,a,e[1],5,-165796510),a=h(a,r,n,i,e[6],9,-1069501632),i=h(i,a,r,n,e[11],14,643717713),n=h(n,i,a,r,e[0],20,-373897302),r=h(r,n,i,a,e[5],5,-701558691),a=h(a,r,n,i,e[10],9,38016083),i=h(i,a,r,n,e[15],14,-660478335),n=h(n,i,a,r,e[4],20,-405537848),r=h(r,n,i,a,e[9],5,568446438),a=h(a,r,n,i,e[14],9,-1019803690),i=h(i,a,r,n,e[3],14,-187363961),n=h(n,i,a,r,e[8],20,1163531501),r=h(r,n,i,a,e[13],5,-1444681467),a=h(a,r,n,i,e[2],9,-51403784),i=h(i,a,r,n,e[7],14,1735328473),r=l(r,n=h(n,i,a,r,e[12],20,-1926607734),i,a,e[5],4,-378558),a=l(a,r,n,i,e[8],11,-2022574463),i=l(i,a,r,n,e[11],16,1839030562),n=l(n,i,a,r,e[14],23,-35309556),r=l(r,n,i,a,e[1],4,-1530992060),a=l(a,r,n,i,e[4],11,1272893353),i=l(i,a,r,n,e[7],16,-155497632),n=l(n,i,a,r,e[10],23,-1094730640),r=l(r,n,i,a,e[13],4,681279174),a=l(a,r,n,i,e[0],11,-358537222),i=l(i,a,r,n,e[3],16,-722521979),n=l(n,i,a,r,e[6],23,76029189),r=l(r,n,i,a,e[9],4,-640364487),a=l(a,r,n,i,e[12],11,-421815835),i=l(i,a,r,n,e[15],16,530742520),r=f(r,n=l(n,i,a,r,e[2],23,-995338651),i,a,e[0],6,-198630844),a=f(a,r,n,i,e[7],10,1126891415),i=f(i,a,r,n,e[14],15,-1416354905),n=f(n,i,a,r,e[5],21,-57434055),r=f(r,n,i,a,e[12],6,1700485571),a=f(a,r,n,i,e[3],10,-1894986606),i=f(i,a,r,n,e[10],15,-1051523),n=f(n,i,a,r,e[1],21,-2054922799),r=f(r,n,i,a,e[8],6,1873313359),a=f(a,r,n,i,e[15],10,-30611744),i=f(i,a,r,n,e[6],15,-1560198380),n=f(n,i,a,r,e[13],21,1309151649),r=f(r,n,i,a,e[4],6,-145523070),a=f(a,r,n,i,e[11],10,-1120210379),i=f(i,a,r,n,e[2],15,718787259),n=f(n,i,a,r,e[9],21,-343485551),t[0]=w(r,t[0]),t[1]=w(n,t[1]),t[2]=w(i,t[2]),t[3]=w(a,t[3])}function c(t,e,r,n,i,a){return e=w(w(e,t),w(n,a)),w(e<<i|e>>>32-i,r)}function u(t,e,r,n,i,a,o){return c(e&r|~e&n,t,e,i,a,o)}function h(t,e,r,n,i,a,o){return c(e&n|r&~n,t,e,i,a,o)}function l(t,e,r,n,i,a,o){return c(e^r^n,t,e,i,a,o)}function f(t,e,r,n,i,a,o){return c(r^(e|~n),t,e,i,a,o)}function d(t){var e,r=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)s(n,p(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(s(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*r,s(n,i),n}function p(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}var g="0123456789abcdef".split("");function m(t){for(var e="",r=0;r<4;r++)e+=g[t>>8*r+4&15]+g[t>>8*r&15];return e}function v(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function b(t){return d(t).map(v).join("")}var y="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e<t.length;e++)t[e]=m(t[e]);return t.join("")}(d("hello"));function w(t,e){if(y){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}return t+e&4294967295}
+/**
+ * @license
+ * FPDF is released under a permissive license: there is no usage restriction.
+ * You may embed it freely in your application (commercial or not), with or
+ * without modifications.
+ *
+ * Reference: http://www.fpdf.org/en/script/script37.php
+ */function N(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=[],c=0;c<256;c++)s[c]=c;var u=0;for(c=0;c<256;c++){var h=s[c];u=(u+h+o.charCodeAt(c))%256,s[c]=s[u],s[u]=h}r=t,n=s}else s=n;var l=e.length,f=0,d=0,p="";for(c=0;c<l;c++)d=(d+(h=s[f=(f+1)%256]))%256,s[f]=s[d],s[d]=h,o=s[(s[f]+s[d])%256],p+=String.fromCharCode(e.charCodeAt(c)^o);return p}
+/**
+ * @license
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ * Author: Owen Leong (@owenl131)
+ * Date: 15 Oct 2020
+ * References:
+ * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
+ * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
+ * http://www.fpdf.org/en/script/script37.php
+ */var L={print:4,modify:8,copy:16,"annot-forms":32};function A(t,e,r,n){this.v=1,this.r=2;let i=192;t.forEach((function(t){if(void 0!==L.perm)throw new Error("Invalid permission: "+t);i+=L[t]})),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz";let 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=b(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=N(this.encryptionKey,this.padding)}function x(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);if(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)e+="#"+("0"+i.toString(16)).slice(-2);else e+=t[n]}return e}function S(t){if("object"!=typeof t)throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,r,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof r||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var i=Math.random().toString(35);return e[t][i]=[r,!!n],i},this.unsubscribe=function(t){for(var r in e)if(e[r][t])return delete e[r][t],0===Object.keys(e[r]).length&&delete e[r],!0;return!1},this.publish=function(r){if(e.hasOwnProperty(r)){var i=Array.prototype.slice.call(arguments,1),a=[];for(var s in e[r]){var c=e[r][s];try{c[0].apply(t,i)}catch(t){n.console&&o.error("jsPDF PubSub Error",t.message,t)}c[1]&&a.push(s)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function _(t){if(!(this instanceof _))return new _(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 P(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function k(t,e,r,n,i){if(!(this instanceof k))return new k(t,e,r,n,i);this.type="axial"===t?2:3,this.coords=e,this.colors=r,P.call(this,n,i)}function F(t,e,r,n,i){if(!(this instanceof F))return new F(t,e,r,n,i);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,P.call(this,n,i)}function I(t){var r,a="string"==typeof arguments[0]?arguments[0]:"p",s=arguments[1],c=arguments[2],u=arguments[3],h=[],l=1,f=16,d="S",p=null;"object"==typeof(t=t||{})&&(a=t.orientation,s=t.unit||s,c=t.format||c,u=t.compress||t.compressPdf||u,null!==(p=t.encryption||null)&&(p.userPassword=p.userPassword||"",p.ownerPassword=p.ownerPassword||"",p.userPermissions=p.userPermissions||[]),l="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(r=t.precision),void 0!==t.floatPrecision&&(f=t.floatPrecision),d=t.defaultPathOperation||"S"),h=t.filters||(!0===u?["FlateEncode"]:h),s=s||"mm",a=(""+(a||"P")).toLowerCase();var g=t.putOnlyUsedFonts||!1,m={},v={internal:{},__private__:{}};v.__private__.PubSub=S;var b="1.3",y=v.__private__.getPdfVersion=function(){return b};v.__private__.setPdfVersion=function(t){b=t};var w={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]};v.__private__.getPageFormats=function(){return w};var N=v.__private__.getPageFormat=function(t){return w[t]};c=c||"a4";var L={COMPAT:"compat",ADVANCED:"advanced"},P=L.COMPAT;function C(){this.saveGraphicsState(),ut(new Ht(xt,0,0,-xt,0,Er()*xt).toString()+" cm"),this.setFontSize(this.getFontSize()/xt),d="n",P=L.ADVANCED}function j(){this.restoreGraphicsState(),d="S",P=L.COMPAT}var O=v.__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};v.advancedAPI=function(t){var e=P===L.COMPAT;return e&&C.call(this),"function"!=typeof t||(t(this),e&&j.call(this)),this},v.compatAPI=function(t){var e=P===L.ADVANCED;return e&&j.call(this),"function"!=typeof t||(t(this),e&&C.call(this)),this},v.isAdvancedAPI=function(){return P===L.ADVANCED};var B,q=function(t){if(P!==L.ADVANCED)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},M=v.roundToPrecision=v.__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+$/,"")};B=v.hpf=v.__private__.hpf="number"==typeof f?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return M(t,f)}:"smart"===f?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return M(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return M(t,16)};var E=v.f2=v.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return M(t,2)},D=v.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return M(t,3)},R=v.scale=v.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return P===L.COMPAT?t*xt:P===L.ADVANCED?t:void 0},T=function(t){return P===L.COMPAT?Er()-t:P===L.ADVANCED?t:void 0},z=function(t){return R(T(t))};v.__private__.setPrecision=v.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(r=parseInt(t,10))};var U,H="00000000000000000000000000000000",W=v.__private__.getFileId=function(){return H},V=v.__private__.setFileId=function(t){return H=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():H.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==p&&(Ve=new A(p.userPermissions,p.userPassword,p.ownerPassword,H)),H};v.setFileId=function(t){return V(t),this},v.getFileId=function(){return W()};var G=v.__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,Z(n),"'",Z(i),"'"].join("");return["D:",t.getFullYear(),Z(t.getMonth()+1),Z(t.getDate()),Z(t.getHours()),Z(t.getMinutes()),Z(t.getSeconds()),a].join("")},Y=v.__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)},J=v.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=G(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 U=e},X=v.__private__.getCreationDate=function(t){var e=U;return"jsDate"===t&&(e=Y(U)),e};v.setCreationDate=function(t){return J(t),this},v.getCreationDate=function(t){return X(t)};var K,Z=v.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},$=v.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},Q=0,tt=[],et=[],rt=0,nt=[],it=[],at=!1,ot=et,st=function(){Q=0,rt=0,et=[],tt=[],nt=[],Zt=Jt(),$t=Jt()};v.__private__.setCustomOutputDestination=function(t){at=!0,ot=t};var ct=function(t){at||(ot=t)};v.__private__.resetCustomOutputDestination=function(){at=!1,ot=et};var ut=v.__private__.out=function(t){return t=t.toString(),rt+=t.length+1,ot.push(t),ot},ht=v.__private__.write=function(t){return ut(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},lt=v.__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},ft=[["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]];v.__private__.getStandardFonts=function(){return ft};var dt=t.fontSize||16;v.__private__.setFontSize=v.setFontSize=function(t){return dt=P===L.ADVANCED?t/xt:t,this};var pt,gt=v.__private__.getFontSize=v.getFontSize=function(){return P===L.COMPAT?dt:dt*xt},mt=t.R2L||!1;v.__private__.setR2L=v.setR2L=function(t){return mt=t,this},v.__private__.getR2L=v.getR2L=function(){return mt};var vt,bt=v.__private__.setZoomMode=function(t){var e=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))pt=t;else if(isNaN(t)){if(-1===e.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.');pt=t}else pt=parseInt(t,10)};v.__private__.getZoomMode=function(){return pt};var yt,wt=v.__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.');vt=t};v.__private__.getPageMode=function(){return vt};var Nt=v.__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.');yt=t};v.__private__.getLayoutMode=function(){return yt},v.__private__.setDisplayMode=v.setDisplayMode=function(t,e,r){return bt(t),Nt(e),wt(r),this};var Lt={title:"",subject:"",author:"",keywords:"",creator:""};v.__private__.getDocumentProperty=function(t){if(-1===Object.keys(Lt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Lt[t]},v.__private__.getDocumentProperties=function(){return Lt},v.__private__.setDocumentProperties=v.setProperties=v.setDocumentProperties=function(t){for(var e in Lt)Lt.hasOwnProperty(e)&&t[e]&&(Lt[e]=t[e]);return this},v.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(Lt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Lt[t]=e};var At,xt,St,_t,Pt,kt={},Ft={},It=[],Ct={},jt={},Ot={},Bt={},qt=null,Mt=0,Et=[],Dt=new S(v),Rt=t.hotfixes||[],Tt={},zt={},Ut=[],Ht=function(t,e,r,n,i,a){if(!(this instanceof Ht))return new Ht(t,e,r,n,i,a);isNaN(t)&&(t=1),isNaN(e)&&(e=0),isNaN(r)&&(r=0),isNaN(n)&&(n=1),isNaN(i)&&(i=0),isNaN(a)&&(a=0),this._matrix=[t,e,r,n,i,a]};Object.defineProperty(Ht.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Ht.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Ht.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Ht.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Ht.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Ht.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Ht.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Ht.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Ht.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Ht.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Ht.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Ht.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Ht.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ht.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ht.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ht.prototype,"isIdentity",{get:function(){return 1===this.sx&&(0===this.shy&&(0===this.shx&&(1===this.sy&&(0===this.tx&&0===this.ty))))}}),Ht.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(B).join(t)},Ht.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 Ht(e,r,n,i,a,o)},Ht.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 c=Math.sqrt(r*r+n*n);return s/=c,t*(n/=c)<e*(r/=c)&&(t=-t,e=-e,s=-s,o=-o),{scale:new Ht(o,0,0,c,0,0),translate:new Ht(1,0,0,1,i,a),rotate:new Ht(t,e,-e,t,0,0),skew:new Ht(1,0,s,1,0,0)}},Ht.prototype.toString=function(t){return this.join(" ")},Ht.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,c=-e*o,u=-r*o,h=t*o;return new Ht(s,c,u,h,-s*i-u*a,-c*i-h*a)},Ht.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 Fr(e,r)},Ht.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),r=this.applyToPoint(new Fr(t.x+t.w,t.y+t.h));return new Ir(e.x,e.y,r.x-e.x,r.y-e.y)},Ht.prototype.clone=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,a=this.ty;return new Ht(t,e,r,n,i,a)},v.Matrix=Ht;var Wt=v.matrixMult=function(t,e){return e.multiply(t)},Vt=new Ht(1,0,0,1,0,0);v.unitMatrix=v.identityMatrix=Vt;var Gt=function(t,e){if(!jt[t]){var r=(e instanceof k?"Sh":"P")+(Object.keys(Ct).length+1).toString(10);e.id=r,jt[t]=r,Ct[r]=e,Dt.publish("addPattern",e)}};v.ShadingPattern=k,v.TilingPattern=F,v.addShadingPattern=function(t,e){return q("addShadingPattern()"),Gt(t,e),this},v.beginTilingPattern=function(t){q("beginTilingPattern()"),jr(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},v.endTilingPattern=function(t,e){q("endTilingPattern()"),e.stream=it[K].join("\n"),Gt(t,e),Dt.publish("endTilingPattern",e),Ut.pop().restore()};var Yt=v.__private__.newObject=function(){var t=Jt();return Xt(t,!0),t},Jt=v.__private__.newObjectDeferred=function(){return Q++,tt[Q]=function(){return rt},Q},Xt=function(t,e){return e="boolean"==typeof e&&e,tt[t]=rt,e&&ut(t+" 0 obj"),t},Kt=v.__private__.newAdditionalObject=function(){var t={objId:Jt(),content:""};return nt.push(t),t},Zt=Jt(),$t=Jt(),Qt=v.__private__.decodeColorString=function(t){var e=t.split(" ");if(2!==e.length||"g"!==e[1]&&"G"!==e[1]){if(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},te=v.__private__.encodeColorString=function(t){var e;"string"==typeof t&&(t={ch1:t});var r=t.ch1,n=t.ch2,a=t.ch3,o=t.ch4,s="draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof r&&"#"!==r.charAt(0)){var c=new i(r);if(c.ok)r=c.toHex();else if(!/^\d*\.?\d*$/.test(r))throw new Error('Invalid color "'+r+'" passed to jsPDF.encodeColorString.')}if("string"==typeof r&&/^#[0-9A-Fa-f]{3}$/.test(r)&&(r="#"+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]),"string"==typeof r&&/^#[0-9A-Fa-f]{6}$/.test(r)){var u=parseInt(r.substr(1),16);r=u>>16&255,n=u>>8&255,a=255&u}if(void 0===n||void 0===o&&r===n&&n===a)if("string"==typeof r)e=r+" "+s[0];else switch(t.precision){case 2:e=E(r/255)+" "+s[0];break;case 3:default:e=D(r/255)+" "+s[0]}else if(void 0===o||"object"==typeof o){if(o&&!isNaN(o.a)&&0===o.a)return e=["1.","1.","1.",s[1]].join(" ");if("string"==typeof r)e=[r,n,a,s[1]].join(" ");else switch(t.precision){case 2:e=[E(r/255),E(n/255),E(a/255),s[1]].join(" ");break;default:case 3:e=[D(r/255),D(n/255),D(a/255),s[1]].join(" ")}}else if("string"==typeof r)e=[r,n,a,o,s[2]].join(" ");else switch(t.precision){case 2:e=[E(r),E(n),E(a),E(o),s[2]].join(" ");break;case 3:default:e=[D(r),D(n),D(a),D(o),s[2]].join(" ")}return e},ee=v.__private__.getFilters=function(){return h},re=v.__private__.putStream=function(t){var e=(t=t||{}).data||"",r=t.filters||ee(),n=t.alreadyAppliedFilters||[],i=t.addLength1||!1,a=e.length,o=t.objectId,s=function(t){return t};if(null!==p&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==p&&(s=Ve.encryptor(o,0));var c={};!0===r&&(r=["FlateEncode"]);var u=t.additionalKeyValues||[],h=(c=void 0!==I.API.processDataByFilters?I.API.processDataByFilters(e,r):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==c.data.length&&(u.push({key:"Length",value:c.data.length}),!0===i&&u.push({key:"Length1",value:a})),0!=h.length)if(h.split("/").length-1==1)u.push({key:"Filter",value:h});else{u.push({key:"Filter",value:"["+h+"]"});for(var l=0;l<u.length;l+=1)if("DecodeParms"===u[l].key){for(var f=[],d=0;d<c.reverseChain.split("/").length-1;d+=1)f.push("null");f.push(u[l].value),u[l].value="["+f.join(" ")+"]"}}ut("<<");for(var g=0;g<u.length;g++)ut("/"+u[g].key+" "+u[g].value);ut(">>"),0!==c.data.length&&(ut("stream"),ut(s(c.data)),ut("endstream"))},ne=v.__private__.putPage=function(t){var e=t.number,r=t.data,n=t.objId,i=t.contentsObjId;Xt(n,!0),ut("<</Type /Page"),ut("/Parent "+t.rootDictionaryObjId+" 0 R"),ut("/Resources "+t.resourceDictionaryObjId+" 0 R"),ut("/MediaBox ["+parseFloat(B(t.mediaBox.bottomLeftX))+" "+parseFloat(B(t.mediaBox.bottomLeftY))+" "+B(t.mediaBox.topRightX)+" "+B(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&ut("/CropBox ["+B(t.cropBox.bottomLeftX)+" "+B(t.cropBox.bottomLeftY)+" "+B(t.cropBox.topRightX)+" "+B(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&ut("/BleedBox ["+B(t.bleedBox.bottomLeftX)+" "+B(t.bleedBox.bottomLeftY)+" "+B(t.bleedBox.topRightX)+" "+B(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&ut("/TrimBox ["+B(t.trimBox.bottomLeftX)+" "+B(t.trimBox.bottomLeftY)+" "+B(t.trimBox.topRightX)+" "+B(t.trimBox.topRightY)+"]"),null!==t.artBox&&ut("/ArtBox ["+B(t.artBox.bottomLeftX)+" "+B(t.artBox.bottomLeftY)+" "+B(t.artBox.topRightX)+" "+B(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&ut("/UserUnit "+t.userUnit),Dt.publish("putPage",{objId:n,pageContext:Et[e],pageNumber:e,page:r}),ut("/Contents "+i+" 0 R"),ut(">>"),ut("endobj");var a=r.join("\n");return P===L.ADVANCED&&(a+="\nQ"),Xt(i,!0),re({data:a,filters:ee(),objectId:i}),ut("endobj"),n},ie=v.__private__.putPages=function(){var t,e,r=[];for(t=1;t<=Mt;t++)Et[t].objId=Jt(),Et[t].contentsObjId=Jt();for(t=1;t<=Mt;t++)r.push(ne({number:t,data:it[t],objId:Et[t].objId,contentsObjId:Et[t].contentsObjId,mediaBox:Et[t].mediaBox,cropBox:Et[t].cropBox,bleedBox:Et[t].bleedBox,trimBox:Et[t].trimBox,artBox:Et[t].artBox,userUnit:Et[t].userUnit,rootDictionaryObjId:Zt,resourceDictionaryObjId:$t}));Xt(Zt,!0),ut("<</Type /Pages");var n="/Kids [";for(e=0;e<Mt;e++)n+=r[e]+" 0 R ";ut(n+"]"),ut("/Count "+Mt),ut(">>"),ut("endobj"),Dt.publish("postPutPages")},ae=function(t){Dt.publish("putFont",{font:t,out:ut,newObject:Yt,putStream:re}),!0!==t.isAlreadyPutted&&(t.objectNumber=Yt(),ut("<<"),ut("/Type /Font"),ut("/BaseFont /"+x(t.postScriptName)),ut("/Subtype /Type1"),"string"==typeof t.encoding&&ut("/Encoding /"+t.encoding),ut("/FirstChar 32"),ut("/LastChar 255"),ut(">>"),ut("endobj"))},oe=function(){for(var t in kt)kt.hasOwnProperty(t)&&(!1===g||!0===g&&m.hasOwnProperty(t))&&ae(kt[t])},se=function(t){t.objectNumber=Yt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[B(t.x),B(t.y),B(t.x+t.width),B(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var r=t.pages[1].join("\n");re({data:r,additionalKeyValues:e,objectId:t.objectNumber}),ut("endobj")},ce=function(){for(var t in Tt)Tt.hasOwnProperty(t)&&se(Tt[t])},ue=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="",c=0,u=0;u<n.length;u++){for(r=n[u];r>t[c+1].offset;)c++;var h=t[c].offset,l=(r-h)/(t[c+1].offset-h),f=t[c].color,d=t[c+1].color;s+=$(Math.round((1-l)*f[0]+l*d[0]).toString(16))+$(Math.round((1-l)*f[1]+l*d[1]).toString(16))+$(Math.round((1-l)*f[2]+l*d[2]).toString(16))}return s.trim()},he=function(t,e){e||(e=21);var r=Yt(),n=ue(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]"}),re({data:n,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:r}),ut("endobj"),t.objectNumber=Yt(),ut("<< /ShadingType "+t.type),ut("/ColorSpace /DeviceRGB");var a="/Coords ["+B(parseFloat(t.coords[0]))+" "+B(parseFloat(t.coords[1]))+" ";2===t.type?a+=B(parseFloat(t.coords[2]))+" "+B(parseFloat(t.coords[3])):a+=B(parseFloat(t.coords[2]))+" "+B(parseFloat(t.coords[3]))+" "+B(parseFloat(t.coords[4]))+" "+B(parseFloat(t.coords[5])),ut(a+="]"),t.matrix&&ut("/Matrix ["+t.matrix.toString()+"]"),ut("/Function "+r+" 0 R"),ut("/Extend [true true]"),ut(">>"),ut("endobj")},le=function(t,e){var r=Jt(),n=Yt();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(B).join(" ")+"]"}),i.push({key:"XStep",value:B(t.xStep)}),i.push({key:"YStep",value:B(t.yStep)}),i.push({key:"Resources",value:r+" 0 R"}),t.matrix&&i.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),re({data:t.stream,additionalKeyValues:i,objectId:t.objectNumber}),ut("endobj")},fe=function(t){var e;for(e in Ct)Ct.hasOwnProperty(e)&&(Ct[e]instanceof k?he(Ct[e]):Ct[e]instanceof F&&le(Ct[e],t))},de=function(t){for(var e in t.objectNumber=Yt(),ut("<<"),t)switch(e){case"opacity":ut("/ca "+E(t[e]));break;case"stroke-opacity":ut("/CA "+E(t[e]))}ut(">>"),ut("endobj")},pe=function(){var t;for(t in Ot)Ot.hasOwnProperty(t)&&de(Ot[t])},ge=function(){for(var t in ut("/XObject <<"),Tt)Tt.hasOwnProperty(t)&&Tt[t].objectNumber>=0&&ut("/"+t+" "+Tt[t].objectNumber+" 0 R");Dt.publish("putXobjectDict"),ut(">>")},me=function(){Ve.oid=Yt(),ut("<<"),ut("/Filter /Standard"),ut("/V "+Ve.v),ut("/R "+Ve.r),ut("/U <"+Ve.toHexString(Ve.U)+">"),ut("/O <"+Ve.toHexString(Ve.O)+">"),ut("/P "+Ve.P),ut(">>"),ut("endobj")},ve=function(){for(var t in ut("/Font <<"),kt)kt.hasOwnProperty(t)&&(!1===g||!0===g&&m.hasOwnProperty(t))&&ut("/"+t+" "+kt[t].objectNumber+" 0 R");ut(">>")},be=function(){if(Object.keys(Ct).length>0){for(var t in ut("/Shading <<"),Ct)Ct.hasOwnProperty(t)&&Ct[t]instanceof k&&Ct[t].objectNumber>=0&&ut("/"+t+" "+Ct[t].objectNumber+" 0 R");Dt.publish("putShadingPatternDict"),ut(">>")}},ye=function(t){if(Object.keys(Ct).length>0){for(var e in ut("/Pattern <<"),Ct)Ct.hasOwnProperty(e)&&Ct[e]instanceof v.TilingPattern&&Ct[e].objectNumber>=0&&Ct[e].objectNumber<t&&ut("/"+e+" "+Ct[e].objectNumber+" 0 R");Dt.publish("putTilingPatternDict"),ut(">>")}},we=function(){if(Object.keys(Ot).length>0){var t;for(t in ut("/ExtGState <<"),Ot)Ot.hasOwnProperty(t)&&Ot[t].objectNumber>=0&&ut("/"+t+" "+Ot[t].objectNumber+" 0 R");Dt.publish("putGStateDict"),ut(">>")}},Ne=function(t){Xt(t.resourcesOid,!0),ut("<<"),ut("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ve(),be(),ye(t.objectOid),we(),ge(),ut(">>"),ut("endobj")},Le=function(){var t=[];oe(),pe(),ce(),fe(t),Dt.publish("putResources"),t.forEach(Ne),Ne({resourcesOid:$t,objectOid:Number.MAX_SAFE_INTEGER}),Dt.publish("postPutResources")},Ae=function(){Dt.publish("putAdditionalObjects");for(var t=0;t<nt.length;t++){var e=nt[t];Xt(e.objId,!0),ut(e.content),ut("endobj")}Dt.publish("postPutAdditionalObjects")},xe=function(t){Ft[t.fontName]=Ft[t.fontName]||{},Ft[t.fontName][t.fontStyle]=t.id},Se=function(t,e,r,n,i){var a={id:"F"+(Object.keys(kt).length+1).toString(10),postScriptName:t,fontName:e,fontStyle:r,encoding:n,isStandardFont:i||!1,metadata:{}};return Dt.publish("addFont",{font:a,instance:this}),kt[a.id]=a,xe(a),a.id},_e=function(t){for(var e=0,r=ft.length;e<r;e++){var n=Se.call(this,t[e][0],t[e][1],t[e][2],ft[e][3],!0);!1===g&&(m[n]=!0);var i=t[e][0].split("-");xe({id:n,fontName:i[0],fontStyle:i[1]||""})}Dt.publish("addFonts",{fonts:kt,dictionary:Ft})},Pe=function(t){return t.foo=function(){try{return t.apply(this,arguments)}catch(t){var e=t.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var r="Error in function "+e.split("\n")[0].split("<")[0]+": "+t.message;if(!n.console)throw new Error(r);n.console.error(r,t),n.alert&&alert(r)}},t.foo.bar=t,t.foo},ke=function(t,e){var r,n,i,a,o,s,c,u,h;if(i=(e=e||{}).sourceEncoding||"Unicode",o=e.outputEncoding,(e.autoencode||o)&&kt[At].metadata&&kt[At].metadata[i]&&kt[At].metadata[i].encoding&&(a=kt[At].metadata[i].encoding,!o&&kt[At].encoding&&(o=kt[At].encoding),!o&&a.codePages&&(o=a.codePages[0]),"string"==typeof o&&(o=a[o]),o)){for(c=!1,s=[],r=0,n=t.length;r<n;r++)(u=o[t.charCodeAt(r)])?s.push(String.fromCharCode(u)):s.push(t[r]),s[r].charCodeAt(0)>>8&&(c=!0);t=s.join("")}for(r=t.length;void 0===c&&0!==r;)t.charCodeAt(r-1)>>8&&(c=!0),r--;if(!c)return t;for(s=e.noBOM?[]:[254,255],r=0,n=t.length;r<n;r++){if((h=(u=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(h),s.push(u-(h<<8))}return String.fromCharCode.apply(void 0,s)},Fe=v.__private__.pdfEscape=v.pdfEscape=function(t,e){return ke(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Ie=v.__private__.beginPage=function(t){it[++Mt]=[],Et[Mt]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},Oe(Mt),ct(it[K])},Ce=function(t,e){var r,n,i;switch(a=e||a,"string"==typeof t&&(r=N(t.toLowerCase()),Array.isArray(r)&&(n=r[0],i=r[1])),Array.isArray(t)&&(n=t[0]*xt,i=t[1]*xt),isNaN(n)&&(n=c[0],i=c[1]),(n>14400||i>14400)&&(o.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),n=Math.min(14400,n),i=Math.min(14400,i)),c=[n,i],a.substr(0,1)){case"l":i>n&&(c=[i,n]);break;case"p":n>i&&(c=[i,n])}Ie(c),fr(hr),ut(wr),0!==_r&&ut(_r+" J"),0!==Pr&&ut(Pr+" j"),Dt.publish("addPage",{pageNumber:Mt})},je=function(t){t>0&&t<=Mt&&(it.splice(t,1),Et.splice(t,1),Mt--,K>Mt&&(K=Mt),this.setPage(K))},Oe=function(t){t>0&&t<=Mt&&(K=t)},Be=v.__private__.getNumberOfPages=v.getNumberOfPages=function(){return it.length-1},qe=function(t,e,r){var n,i=void 0;return r=r||{},t=void 0!==t?t:kt[At].fontName,e=void 0!==e?e:kt[At].fontStyle,n=t.toLowerCase(),void 0!==Ft[n]&&void 0!==Ft[n][e]?i=Ft[n][e]:void 0!==Ft[t]&&void 0!==Ft[t][e]?i=Ft[t][e]:!1===r.disableWarning&&o.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),i||r.noFallback||null==(i=Ft.times[e])&&(i=Ft.times.normal),i},Me=v.__private__.putInfo=function(){var t=Yt(),e=function(t){return t};for(var r in null!==p&&(e=Ve.encryptor(t,0)),ut("<<"),ut("/Producer ("+Fe(e("jsPDF "+I.version))+")"),Lt)Lt.hasOwnProperty(r)&&Lt[r]&&ut("/"+r.substr(0,1).toUpperCase()+r.substr(1)+" ("+Fe(e(Lt[r]))+")");ut("/CreationDate ("+Fe(e(U))+")"),ut(">>"),ut("endobj")},Ee=v.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||Zt;switch(Yt(),ut("<<"),ut("/Type /Catalog"),ut("/Pages "+e+" 0 R"),pt||(pt="fullwidth"),pt){case"fullwidth":ut("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ut("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ut("/OpenAction [3 0 R /Fit]");break;case"original":ut("/OpenAction [3 0 R /XYZ null null 1]");break;default:var r=""+pt;"%"===r.substr(r.length-1)&&(pt=parseInt(pt)/100),"number"==typeof pt&&ut("/OpenAction [3 0 R /XYZ null null "+E(pt)+"]")}switch(yt||(yt="continuous"),yt){case"continuous":ut("/PageLayout /OneColumn");break;case"single":ut("/PageLayout /SinglePage");break;case"two":case"twoleft":ut("/PageLayout /TwoColumnLeft");break;case"tworight":ut("/PageLayout /TwoColumnRight")}vt&&ut("/PageMode /"+vt),Dt.publish("putCatalog"),ut(">>"),ut("endobj")},De=v.__private__.putTrailer=function(){ut("trailer"),ut("<<"),ut("/Size "+(Q+1)),ut("/Root "+Q+" 0 R"),ut("/Info "+(Q-1)+" 0 R"),null!==p&&ut("/Encrypt "+Ve.oid+" 0 R"),ut("/ID [ <"+H+"> <"+H+"> ]"),ut(">>")},Re=v.__private__.putHeader=function(){ut("%PDF-"+b),ut("%ºß¬à")},Te=v.__private__.putXRef=function(){var t="0000000000";ut("xref"),ut("0 "+(Q+1)),ut("0000000000 65535 f ");for(var e=1;e<=Q;e++){"function"==typeof tt[e]?ut((t+tt[e]()).slice(-10)+" 00000 n "):void 0!==tt[e]?ut((t+tt[e]).slice(-10)+" 00000 n "):ut("0000000000 00000 n ")}},ze=v.__private__.buildDocument=function(){st(),ct(et),Dt.publish("buildDocument"),Re(),ie(),Ae(),Le(),null!==p&&me(),Me(),Ee();var t=rt;return Te(),De(),ut("startxref"),ut(""+t),ut("%%EOF"),ct(it[K]),et.join("\n")},Ue=v.__private__.getBlob=function(t){return new Blob([lt(t)],{type:"application/pdf"})},He=v.output=v.__private__.output=Pe((function(t,r){switch("string"==typeof(r=r||{})?r={filename:r}:r.filename=r.filename||"generated.pdf",t){case void 0:return ze();case"save":v.save(r.filename);break;case"arraybuffer":return lt(ze());case"blob":return Ue(ze());case"bloburi":case"bloburl":if(void 0!==n.URL&&"function"==typeof n.URL.createObjectURL)return n.URL&&n.URL.createObjectURL(Ue(ze()))||void 0;o.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var i="",a=ze();try{i=e(a)}catch(t){i=e(unescape(encodeURIComponent(a)))}return"data:application/pdf;filename="+r.filename+";base64,"+i;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(n)){var s="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",c=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';r.pdfObjectUrl&&(s=r.pdfObjectUrl,c="");var u='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+s+'"'+c+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(r)+");<\/script></body></html>",h=n.open();return null!==h&&h.document.write(u),h}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(n)){var l='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe id="pdfViewer" src="'+(r.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+r.filename+'" width="500px" height="400px" /></body></html>',f=n.open();if(null!==f){f.document.write(l);var d=this;f.document.documentElement.querySelector("#pdfViewer").onload=function(){f.document.title=r.filename,f.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(d.output("bloburl"))}}return f}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(n))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var p='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="'+this.output("datauristring",r)+'"></iframe></body></html>',g=n.open();if(null!==g&&(g.document.write(p),g.document.title=r.filename),g||"undefined"==typeof safari)return g;break;case"datauri":case"dataurl":return n.document.location.href=this.output("datauristring",r);default:return null}})),We=function(t){return!0===Array.isArray(Rt)&&Rt.indexOf(t)>-1};switch(s){case"pt":xt=1;break;case"mm":xt=72/25.4;break;case"cm":xt=72/2.54;break;case"in":xt=72;break;case"px":xt=1==We("px_scaling")?.75:96/72;break;case"pc":case"em":xt=12;break;case"ex":xt=6;break;default:if("number"!=typeof s)throw new Error("Invalid unit: "+s);xt=s}var Ve=null;J(),V();var Ge=function(t){return null!==p?Ve.encryptor(t,0):function(t){return t}},Ye=v.__private__.getPageInfo=v.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Et[t].objId,pageNumber:t,pageContext:Et[t]}},Je=v.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var e in Et)if(Et[e].objId===t)break;return Ye(e)},Xe=v.__private__.getCurrentPageInfo=v.getCurrentPageInfo=function(){return{objId:Et[K].objId,pageNumber:K,pageContext:Et[K]}};v.addPage=function(){return Ce.apply(this,arguments),this},v.setPage=function(){return Oe.apply(this,arguments),ct.call(this,it[K]),this},v.insertPage=function(t){return this.addPage(),this.movePage(K,t),this},v.movePage=function(t,e){var r,n;if(t>e){r=it[t],n=Et[t];for(var i=t;i>e;i--)it[i]=it[i-1],Et[i]=Et[i-1];it[e]=r,Et[e]=n,this.setPage(e)}else if(t<e){r=it[t],n=Et[t];for(var a=t;a<e;a++)it[a]=it[a+1],Et[a]=Et[a+1];it[e]=r,Et[e]=n,this.setPage(e)}return this},v.deletePage=function(){return je.apply(this,arguments),this},v.__private__.text=v.text=function(t,e,r,n,i){var a,o,s,c,u,h,l,f,d,p=(n=n||{}).scope||this;if("number"==typeof t&&"number"==typeof e&&("string"==typeof r||Array.isArray(r))){var g=r;r=e,e=t,t=g}if(arguments[3]instanceof Ht==!1?(s=arguments[4],c=arguments[5],"object"==typeof(l=arguments[3])&&null!==l||("string"==typeof s&&(c=s,s=null),"string"==typeof l&&(c=l,l=null),"number"==typeof l&&(s=l,l=null),n={flags:l,angle:s,align:c})):(q("The transform parameter of text() with a Matrix value"),d=i),isNaN(e)||isNaN(r)||null==t)throw new Error("Invalid arguments passed to jsPDF.text");if(0===t.length)return p;var v="",b=!1,y="number"==typeof n.lineHeightFactor?n.lineHeightFactor:ur,w=p.internal.scaleFactor;function N(t){return t=t.split("\t").join(Array(n.TabLen||9).join(" ")),Fe(t,l)}function A(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 x(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 S=!1,_=!0;if("string"==typeof t)S=!0;else if(Array.isArray(t)){var k=t.concat();o=[];for(var F,I=k.length;I--;)("string"!=typeof(F=k.shift())||Array.isArray(F)&&"string"!=typeof F[0])&&(_=!1);S=_}if(!1===S)throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');"string"==typeof t&&(t=t.match(/[\r?\n]/)?t.split(/\r\n|\r|\n/g):[t]);var C=dt/p.internal.scaleFactor,j=C*(y-1);switch(n.baseline){case"bottom":r-=j;break;case"top":r+=C-j;break;case"hanging":r+=C-2*j;break;case"middle":r+=C/2-j}if((h=n.maxWidth||0)>0&&("string"==typeof t?t=p.splitTextToSize(t,h):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,e){return t.concat(p.splitTextToSize(e,h))}),[]))),a={text:t,x:e,y:r,options:n,mutex:{pdfEscape:Fe,activeFontKey:At,fonts:kt,activeFontSize:dt}},Dt.publish("preProcessText",a),t=a.text,s=(n=a.options).angle,d instanceof Ht==!1&&s&&"number"==typeof s){s*=Math.PI/180,0===n.rotationDirection&&(s=-s),P===L.ADVANCED&&(s=-s);var O=Math.cos(s),M=Math.sin(s);d=new Ht(O,M,-M,O,0,0)}else s&&s instanceof Ht&&(d=s);P!==L.ADVANCED||d||(d=Vt),void 0!==(u=n.charSpace||xr)&&(v+=B(R(u))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(f=n.horizontalScale)&&(v+=B(100*f)+" Tz\n");n.lang;var E=-1,D=void 0!==n.renderingMode?n.renderingMode:n.stroke,T=p.internal.getCurrentPageInfo().pageContext;switch(D){case 0:case!1:case"fill":E=0;break;case 1:case!0:case"stroke":E=1;break;case 2:case"fillThenStroke":E=2;break;case 3:case"invisible":E=3;break;case 4:case"fillAndAddForClipping":E=4;break;case 5:case"strokeAndAddPathForClipping":E=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":E=6;break;case 7:case"addToPathForClipping":E=7}var z=void 0!==T.usedRenderingMode?T.usedRenderingMode:-1;-1!==E?v+=E+" Tr\n":-1!==z&&(v+="0 Tr\n"),-1!==E&&(T.usedRenderingMode=E),c=n.align||"left";var U,H=dt*y,W=p.internal.pageSize.getWidth(),V=kt[At];u=n.charSpace||xr,h=n.maxWidth||0,l=Object.assign({autoencode:!0,noBOM:!0},n.flags);var G=[],Y=function(t){return p.getStringUnitWidth(t,{font:V,charSpace:u,fontSize:dt,doKerning:!1})*dt/w};if("[object Array]"===Object.prototype.toString.call(t)){var J;o=A(t),"left"!==c&&(U=o.map(Y));var X,K=0;if("right"===c){e-=U[0],t=[],I=o.length;for(var Z=0;Z<I;Z++)0===Z?(X=mr(e),J=vr(r)):(X=R(K-U[Z]),J=-H),t.push([o[Z],X,J]),K=U[Z]}else if("center"===c){e-=U[0]/2,t=[],I=o.length;for(var $=0;$<I;$++)0===$?(X=mr(e),J=vr(r)):(X=R((K-U[$])/2),J=-H),t.push([o[$],X,J]),K=U[$]}else if("left"===c){t=[],I=o.length;for(var Q=0;Q<I;Q++)t.push(o[Q])}else if("justify"===c&&"Identity-H"===V.encoding){t=[],I=o.length,h=0!==h?h:W;let n=0;for(var tt=0;tt<I;tt++)if(J=0===tt?vr(r):-H,X=0===tt?mr(e):n,tt<I-1){let e=R((h-U[tt])/(o[tt].split(" ").length-1)),r=o[tt].split(" ");t.push([r[0]+" ",X,J]),n=0;for(let i=1;i<r.length;i++){let a=(Y(r[i-1]+" "+r[i])-Y(r[i]))*w+e;i==r.length-1?t.push([r[i],a,0]):t.push([r[i]+" ",a,0]),n-=a}}else t.push([o[tt],X,J]);t.push(["",n,0])}else{if("justify"!==c)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');t=[],I=o.length,h=0!==h?h:W;for(tt=0;tt<I;tt++)J=0===tt?vr(r):-H,X=0===tt?mr(e):0,tt<I-1?G.push(B(R((h-U[tt])/(o[tt].split(" ").length-1)))):G.push(0),t.push([o[tt],X,J])}}var et="boolean"==typeof n.R2L?n.R2L:mt;!0===et&&(t=x(t,(function(t,e,r){return[t.split("").reverse().join(""),e,r]}))),a={text:t,x:e,y:r,options:n,mutex:{pdfEscape:Fe,activeFontKey:At,fonts:kt,activeFontSize:dt}},Dt.publish("postProcessText",a),t=a.text,b=a.mutex.isHex||!1;var rt=kt[At].encoding;"WinAnsiEncoding"!==rt&&"StandardEncoding"!==rt||(t=x(t,(function(t,e,r){return[N(t),e,r]}))),o=A(t),t=[];for(var nt,it,at,ot=0,st=1,ct=Array.isArray(o[0])?st:ot,ht="",lt=function(t,e,r){var i="";return r instanceof Ht?(r="number"==typeof n.angle?Wt(r,new Ht(1,0,0,1,t,e)):Wt(new Ht(1,0,0,1,t,e),r),P===L.ADVANCED&&(r=Wt(new Ht(1,0,0,-1,0,0),r)),i=r.join(" ")+" Tm\n"):i=B(t)+" "+B(e)+" Td\n",i},ft=0;ft<o.length;ft++){switch(ht="",ct){case st:at=(b?"<":"(")+o[ft][0]+(b?">":")"),nt=parseFloat(o[ft][1]),it=parseFloat(o[ft][2]);break;case ot:at=(b?"<":"(")+o[ft]+(b?">":")"),nt=mr(e),it=vr(r)}void 0!==G&&void 0!==G[ft]&&(ht=G[ft]+" Tw\n"),0===ft?t.push(ht+lt(nt,it,d)+at):ct===ot?t.push(ht+at):ct===st&&t.push(ht+lt(nt,it,d)+at)}t=ct===ot?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";var pt="BT\n/";return pt+=At+" "+dt+" Tf\n",pt+=B(dt*y)+" TL\n",pt+=Lr+"\n",pt+=v,pt+=t,ut(pt+="ET"),m[At]=!0,p};var Ke=v.__private__.clip=v.clip=function(t){return ut("evenodd"===t?"W*":"W"),this};v.clipEvenOdd=function(){return Ke("evenodd")},v.__private__.discardPath=v.discardPath=function(){return ut("n"),this};var Ze=v.__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};v.__private__.setDefaultPathOperation=v.setDefaultPathOperation=function(t){return Ze(t)&&(d=t),this};var $e=v.__private__.getStyle=v.getStyle=function(t){var e=d;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=v.close=function(){return ut("h"),this};v.stroke=function(){return ut("S"),this},v.fill=function(t){return tr("f",t),this},v.fillEvenOdd=function(t){return tr("f*",t),this},v.fillStroke=function(t){return tr("B",t),this},v.fillStrokeEvenOdd=function(t){return tr("B*",t),this};var tr=function(t,e){"object"==typeof e?nr(e,t):ut(t)},er=function(t){null===t||P===L.ADVANCED&&void 0===t||(t=$e(t),ut(t))};function rr(t,e,r,n,i){var a=new F(e||this.boundingBox,r||this.xStep,n||this.yStep,this.gState,i||this.matrix);a.stream=this.stream;var o=t+"$$"+this.cloneIndex+++"$$";return Gt(o,a),a}var nr=function(t,e){var r=jt[t.key],n=Ct[r];if(n instanceof k)ut("q"),ut(ir(e)),n.gState&&v.setGState(n.gState),ut(t.matrix.toString()+" cm"),ut("/"+r+" sh"),ut("Q");else if(n instanceof F){var i=new Ht(1,0,0,-1,0,Er());t.matrix&&(i=i.multiply(t.matrix||Vt),r=rr.call(n,t.key,t.boundingBox,t.xStep,t.yStep,i).id),ut("q"),ut("/Pattern cs"),ut("/"+r+" scn"),n.gState&&v.setGState(n.gState),ut(e),ut("Q")}},ir=function(t){switch(t){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},ar=v.moveTo=function(t,e){return ut(B(R(t))+" "+B(z(e))+" m"),this},or=v.lineTo=function(t,e){return ut(B(R(t))+" "+B(z(e))+" l"),this},sr=v.curveTo=function(t,e,r,n,i,a){return ut([B(R(t)),B(z(e)),B(R(r)),B(z(n)),B(R(i)),B(z(a)),"c"].join(" ")),this};v.__private__.line=v.line=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Ze(i))throw new Error("Invalid arguments passed to jsPDF.line");return P===L.COMPAT?this.lines([[r-t,n-e]],t,e,[1,1],i||"S"):this.lines([[r-t,n-e]],t,e,[1,1]).stroke()},v.__private__.lines=v.lines=function(t,e,r,n,i,a){var o,s,c,u,h,l,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)||!Ze(i)||"boolean"!=typeof a)throw new Error("Invalid arguments passed to jsPDF.lines");for(ar(e,r),o=n[0],s=n[1],u=t.length,g=e,m=r,c=0;c<u;c++)2===(h=t[c]).length?(g=h[0]*o+g,m=h[1]*s+m,or(g,m)):(l=h[0]*o+g,f=h[1]*s+m,d=h[2]*o+g,p=h[3]*s+m,g=h[4]*o+g,m=h[5]*s+m,sr(l,f,d,p,g,m));return a&&Qe(),er(i),this},v.path=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r.c;switch(r.op){case"m":ar(n[0],n[1]);break;case"l":or(n[0],n[1]);break;case"c":sr.apply(this,n);break;case"h":Qe()}}return this},v.__private__.rect=v.rect=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Ze(i))throw new Error("Invalid arguments passed to jsPDF.rect");return P===L.COMPAT&&(n=-n),ut([B(R(t)),B(z(e)),B(R(r)),B(R(n)),"re"].join(" ")),er(i),this},v.__private__.triangle=v.triangle=function(t,e,r,n,i,a,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(a)||!Ze(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},v.__private__.roundedRect=v.roundedRect=function(t,e,r,n,i,a,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(a)||!Ze(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},v.__private__.ellipse=v.ellipse=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Ze(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 ar(t+r,e),sr(t+r,e-o,t+a,e-n,t,e-n),sr(t-a,e-n,t-r,e-o,t-r,e),sr(t-r,e+o,t-a,e+n,t,e+n),sr(t+a,e+n,t+r,e+o,t+r,e),er(i),this},v.__private__.circle=v.circle=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||!Ze(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,e,r,r,n)},v.setFont=function(t,e,r){return r&&(e=O(e,r)),At=qe(t,e,{disableWarning:!1}),this};var cr=v.__private__.getFont=v.getFont=function(){return kt[qe.apply(v,arguments)]};v.__private__.getFontList=v.getFontList=function(){var t,e,r={};for(t in Ft)if(Ft.hasOwnProperty(t))for(e in r[t]=[],Ft[t])Ft[t].hasOwnProperty(e)&&r[t].push(e);return r},v.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=O(r,n)),i=i||"Identity-H",Se.call(this,t,e,r,i)};var ur,hr=t.lineWidth||.200025,lr=v.__private__.getLineWidth=v.getLineWidth=function(){return hr},fr=v.__private__.setLineWidth=v.setLineWidth=function(t){return hr=t,ut(B(R(t))+" w"),this};v.__private__.setLineDash=I.API.setLineDash=I.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 B(R(t))})).join(" "),e=B(R(e)),ut("["+t+"] "+e+" d"),this};var dr=v.__private__.getLineHeight=v.getLineHeight=function(){return dt*ur};v.__private__.getLineHeight=v.getLineHeight=function(){return dt*ur};var pr=v.__private__.setLineHeightFactor=v.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(ur=t),this},gr=v.__private__.getLineHeightFactor=v.getLineHeightFactor=function(){return ur};pr(t.lineHeight);var mr=v.__private__.getHorizontalCoordinate=function(t){return R(t)},vr=v.__private__.getVerticalCoordinate=function(t){return P===L.ADVANCED?t:Et[K].mediaBox.topRightY-Et[K].mediaBox.bottomLeftY-R(t)},br=v.__private__.getHorizontalCoordinateString=v.getHorizontalCoordinateString=function(t){return B(mr(t))},yr=v.__private__.getVerticalCoordinateString=v.getVerticalCoordinateString=function(t){return B(vr(t))},wr=t.strokeColor||"0 G";v.__private__.getStrokeColor=v.getDrawColor=function(){return Qt(wr)},v.__private__.setStrokeColor=v.setDrawColor=function(t,e,r,n){return wr=te({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"draw",precision:2}),ut(wr),this};var Nr=t.fillColor||"0 g";v.__private__.getFillColor=v.getFillColor=function(){return Qt(Nr)},v.__private__.setFillColor=v.setFillColor=function(t,e,r,n){return Nr=te({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"fill",precision:2}),ut(Nr),this};var Lr=t.textColor||"0 g",Ar=v.__private__.getTextColor=v.getTextColor=function(){return Qt(Lr)};v.__private__.setTextColor=v.setTextColor=function(t,e,r,n){return Lr=te({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"text",precision:3}),this};var xr=t.charSpace,Sr=v.__private__.getCharSpace=v.getCharSpace=function(){return parseFloat(xr||0)};v.__private__.setCharSpace=v.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return xr=t,this};var _r=0;v.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},v.__private__.setLineCap=v.setLineCap=function(t){var e=v.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 _r=e,ut(e+" J"),this};var Pr=0;v.__private__.setLineJoin=v.setLineJoin=function(t){var e=v.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 Pr=e,ut(e+" j"),this},v.__private__.setLineMiterLimit=v.__private__.setMiterLimit=v.setLineMiterLimit=v.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ut(B(R(t))+" M"),this},v.GState=_,v.setGState=function(t){(t="string"==typeof t?Ot[Bt[t]]:kr(null,t)).equals(qt)||(ut("/"+t.id+" gs"),qt=t)};var kr=function(t,e){if(!t||!Bt[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&&(Bt[t]=e.id),Dt.publish("addGState",e),e}};v.addGState=function(t,e){return kr(t,e),this},v.saveGraphicsState=function(){return ut("q"),It.push({key:At,size:dt,color:Lr}),this},v.restoreGraphicsState=function(){ut("Q");var t=It.pop();return At=t.key,dt=t.size,Lr=t.color,qt=null,this},v.setCurrentTransformationMatrix=function(t){return ut(t.toString()+" cm"),this},v.comment=function(t){return ut("#"+t),this};var Fr=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},Ir=function(t,e,r,n){Fr.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},Cr=function(){this.page=Mt,this.currentPage=K,this.pages=it.slice(0),this.pagesContext=Et.slice(0),this.x=St,this.y=_t,this.matrix=Pt,this.width=qr(K),this.height=Er(K),this.outputDestination=ot,this.id="",this.objectNumber=-1};Cr.prototype.restore=function(){Mt=this.page,K=this.currentPage,Et=this.pagesContext,it=this.pages,St=this.x,_t=this.y,Pt=this.matrix,Mr(K,this.width),Dr(K,this.height),ot=this.outputDestination};var jr=function(t,e,r,n,i){Ut.push(new Cr),Mt=K=0,it=[],St=t,_t=e,Pt=i,Ie([r,n])},Or=function(t){if(zt[t])Ut.pop().restore();else{var e=new Cr,r="Xo"+(Object.keys(Tt).length+1).toString(10);e.id=r,zt[t]=r,Tt[r]=e,Dt.publish("addFormObject",e),Ut.pop().restore()}};for(var Br in v.beginFormObject=function(t,e,r,n,i){return jr(t,e,r,n,i),this},v.endFormObject=function(t){return Or(t),this},v.doFormObject=function(t,e){var r=Tt[zt[t]];return ut("q"),ut(e.toString()+" cm"),ut("/"+r.id+" Do"),ut("Q"),this},v.getFormObject=function(t){var e=Tt[zt[t]];return{x:e.x,y:e.y,width:e.width,height:e.height,matrix:e.matrix}},v.save=function(t,e){t=t||"generated.pdf",(e=e||{}).returnPromise=e.returnPromise||!1;var r=require("fs"),n=Buffer.from(lt(ze()));if(!1!==e.returnPromise)return new Promise((function(e,i){r.writeFile(t,n,(function(t){t?i(t):e()}))}));r.writeFileSync(t,n)},I.API)I.API.hasOwnProperty(Br)&&("events"===Br&&I.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))}(Dt,I.API.events):v[Br]=I.API[Br]);var qr=v.getPageWidth=function(t){return(Et[t=t||K].mediaBox.topRightX-Et[t].mediaBox.bottomLeftX)/xt},Mr=v.setPageWidth=function(t,e){Et[t].mediaBox.topRightX=e*xt+Et[t].mediaBox.bottomLeftX},Er=v.getPageHeight=function(t){return(Et[t=t||K].mediaBox.topRightY-Et[t].mediaBox.bottomLeftY)/xt},Dr=v.setPageHeight=function(t,e){Et[t].mediaBox.topRightY=e*xt+Et[t].mediaBox.bottomLeftY};return v.internal={pdfEscape:Fe,getStyle:$e,getFont:cr,getFontSize:gt,getCharSpace:Sr,getTextColor:Ar,getLineHeight:dr,getLineHeightFactor:gr,getLineWidth:lr,write:ht,getHorizontalCoordinate:mr,getVerticalCoordinate:vr,getCoordinateString:br,getVerticalCoordinateString:yr,collections:{},newObject:Yt,newAdditionalObject:Kt,newObjectDeferred:Jt,newObjectDeferredBegin:Xt,getFilters:ee,putStream:re,events:Dt,scaleFactor:xt,pageSize:{getWidth:function(){return qr(K)},setWidth:function(t){Mr(K,t)},getHeight:function(){return Er(K)},setHeight:function(t){Dr(K,t)}},encryptionOptions:p,encryption:Ve,getEncryptor:Ge,output:He,getNumberOfPages:Be,pages:it,out:ut,f2:E,f3:D,getPageInfo:Ye,getPageInfoByObjId:Je,getCurrentPageInfo:Xe,getPDFVersion:y,Point:Fr,Rectangle:Ir,Matrix:Ht,hasHotfix:We},Object.defineProperty(v.internal.pageSize,"width",{get:function(){return qr(K)},set:function(t){Mr(K,t)},enumerable:!0,configurable:!0}),Object.defineProperty(v.internal.pageSize,"height",{get:function(){return Er(K)},set:function(t){Dr(K,t)},enumerable:!0,configurable:!0}),_e.call(v,ft),At="F1",Ce(c,a),Dt.publish("initialized"),v}A.prototype.lsbFirstWord=function(t){return String.fromCharCode(t>>0&255,t>>8&255,t>>16&255,t>>24&255)},A.prototype.toHexString=function(t){return t.split("").map((function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)})).join("")},A.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("")},A.prototype.processOwnerPassword=function(t,e){return N(b(e).substr(0,5),t)},A.prototype.encryptor=function(t,e){let r=b(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(t){return N(r,t)}},_.prototype.equals=function(t){var e,r="id,objectNumber,equals";if(!t||typeof t!=typeof this)return!1;var n=0;for(e in this)if(!(r.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e))return!1;if(this[e]!==t[e])return!1;n++}for(e in t)t.hasOwnProperty(e)&&r.indexOf(e)<0&&n--;return 0===n},I.API={events:[]},I.version="2.5.2";var C=I.API,j=1,O=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},B=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},q=function(t){return t.toFixed(2)},M=function(t){return t.toFixed(5)};C.__acroform__={};var E=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},D=function(t){return t*j},R=function(t){var e=new nt,r=vt.internal.getHeight(t)||0,n=vt.internal.getWidth(t)||0;return e.BBox=[0,0,Number(q(n)),Number(q(r))],e},T=C.__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},z=C.__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)},U=C.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(t&1<<e)?0:1},H=C.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return U(t,e-1)},W=C.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return T(t,e-1)},V=C.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return z(t,e-1)},G=C.__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],c={};return c.lowerLeft_X=r(i)||0,c.lowerLeft_Y=n(a+s)||0,c.upperRight_X=r(i+o)||0,c.upperRight_Y=n(a)||0,[Number(q(c.lowerLeft_X)),Number(q(c.lowerLeft_Y)),Number(q(c.upperRight_X)),Number(q(c.upperRight_Y))]},Y=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],r=t._V||t.DV,n=J(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+" "+q(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=R(t);return a.scope=t.scope,a.stream=e.join("\n"),a}},J=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(t=>t.split("\n")):i.map(t=>[t]);var a=r,o=vt.internal.getHeight(t)||0;o=o<0?-o:o;var s=vt.internal.getWidth(t)||0;s=s<0?-s:s;var c=function(e,r,n){if(e+1<i.length){var a=r+" "+i[e+1][0];return X(a,t,n).width<=s-4}return!1};a++;t:for(;a>0;){e="",a--;var u,h,l=X("3",t,a).height,f=t.multiline?o-a:(o-l)/2,d=f+=2,p=0,g=0,m=0;if(a<=0){e="(...) Tj\n",e+="% Width of Text: "+X(e,t,a=12).width+", FieldWidth:"+s+"\n";break}for(var v="",b=0,y=0;y<i.length;y++)if(i.hasOwnProperty(y)){let r=!1;if(1!==i[y].length&&m!==i[y].length-1){if((l+2)*(b+2)+2>o)continue t;v+=i[y][m],r=!0,g=y,y--}else{v=" "==(v+=i[y][m]+" ").substr(v.length-1)?v.substr(0,v.length-1):v;var w=parseInt(y),N=c(w,v,a),L=y>=i.length-1;if(N&&!L){v+=" ",m=0;continue}if(N||L){if(L)g=w;else if(t.multiline&&(l+2)*(b+2)+2>o)continue t}else{if(!t.multiline)continue t;if((l+2)*(b+2)+2>o)continue t;g=w}}for(var A="",x=p;x<=g;x++){var S=i[x];if(t.multiline){if(x===g){A+=S[m]+" ",m=(m+1)%S.length;continue}if(x===p){A+=S[S.length-1]+" ";continue}}A+=S[0]+" "}switch(A=" "==A.substr(A.length-1)?A.substr(0,A.length-1):A,h=X(A,t,a).width,t.textAlign){case"right":u=s-h-2;break;case"center":u=(s-h)/2;break;case"left":default:u=2}e+=q(u)+" "+q(d)+" Td\n",e+="("+O(A)+") Tj\n",e+=-q(u)+" 0 Td\n",d=-(a+2),h=0,p=r?g:g+1,b++,v=""}else;break}return n.text=e,n.fontSize=a,n},X=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}},K={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Z=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)},$=function(t,e){for(var r in t)if(t.hasOwnProperty(r)){var n=r,i=t[r];e.internal.newObjectDeferredBegin(i.objId,!0),"object"==typeof i&&"function"==typeof i.putStream&&i.putStream(),delete t[n]}},Q=function(t,e){if(e.scope=t,void 0!==t.internal&&(void 0===t.internal.acroformPlugin||!1===t.internal.acroformPlugin.isInitialized)){if(at.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(K)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");j=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new it,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",(function(){!function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0}(t)})),t.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&&Z(n,t)}}(t)})),t.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")}(t)})),t.internal.events.subscribe("postPutPages",(function(e){!function(t,e){var r=!t;for(var n in t||(e.internal.newObjectDeferredBegin(e.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),e.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||e.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(n)){var i=t[n],a=[],o=i.Rect;if(i.Rect&&(i.Rect=G(i.Rect,e)),e.internal.newObjectDeferredBegin(i.objId,!0),i.DA=vt.createDefaultAppearanceStream(i),"object"==typeof i&&"function"==typeof i.getKeyValueListForStream&&(a=i.getKeyValueListForStream()),i.Rect=o,i.hasAppearanceStream&&!i.appearanceStreamContent){var s=Y(i);a.push({key:"AP",value:"<</N "+s+">>"}),e.internal.acroformPlugin.xForms.push(s)}if(i.appearanceStreamContent){var c="";for(var u in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(u)){var h=i.appearanceStreamContent[u];if(c+="/"+u+" ",c+="<<",Object.keys(h).length>=1||Array.isArray(h)){for(var n in h)if(h.hasOwnProperty(n)){var l=h[n];"function"==typeof l&&(l=l.call(e,i)),c+="/"+n+" "+l+" ",e.internal.acroformPlugin.xForms.indexOf(l)>=0||e.internal.acroformPlugin.xForms.push(l)}}else"function"==typeof(l=h)&&(l=l.call(e,i)),c+="/"+n+" "+l,e.internal.acroformPlugin.xForms.indexOf(l)>=0||e.internal.acroformPlugin.xForms.push(l);c+=">>"}a.push({key:"AP",value:"<<\n"+c+">>"})}e.internal.putStream({additionalKeyValues:a,objectId:i.objId}),e.internal.out("endobj")}r&&$(e.internal.acroformPlugin.xForms,e)}(e,t)})),t.internal.acroformPlugin.isInitialized=!0}},tt=C.__acroform__.arrayToPdfArray=function(t,e,r){var n=function(t){return t};if(Array.isArray(t)){for(var i="[",a=0;a<t.length;a++)switch(0!==a&&(i+=" "),typeof t[a]){case"boolean":case"number":case"object":i+=t[a].toString();break;case"string":"/"!==t[a].substr(0,1)?(void 0!==e&&r&&(n=r.internal.getEncryptor(e)),i+="("+O(n(t[a].toString()))+")"):i+=t[a].toString()}return i+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")};var et=function(t,e,r){var n=function(t){return t};return void 0!==e&&r&&(n=r.internal.getEncryptor(e)),(t=t||"").toString(),t="("+O(n(t))+")"},rt=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})};rt.prototype.toString=function(){return this.objId+" 0 R"},rt.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},rt.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:tt(i,this.objId,this.scope)}):i instanceof rt?(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 nt=function(){rt.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}})};E(nt,rt);var it=function(){rt.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)),"("+O(e(t))+")"}},set:function(e){t=e}})};E(it,rt);var at=function(){rt.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute F supplied.');t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(t,3))},set:function(e){!0===Boolean(e)?this.F=W(t,3):this.F=V(t,3)}});var e=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');e=t}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==r.length)return r},set:function(t){r=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(t){r[0]=t}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(t){r[1]=t}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(t){r[2]=t}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(t){r[3]=t}});var n="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return n},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":n=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var i=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!i||i.length<1){if(this instanceof dt)return;i="FieldObject"+at.FieldNum++}var t=function(t){return t};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+O(t(i))+")"},set:function(t){i=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return i},set:function(t){i=t}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a},set:function(t){a=t}});var o="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return o},set:function(t){o=t}});var s=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return s},set:function(t){s=t}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===c?50/j:c},set:function(t){c=t}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(t){u=t}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!h||this instanceof dt||this instanceof gt))return et(h,this.objId,this.scope)},set:function(t){t=t.toString(),h=t}});var l=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(l)return this instanceof ht==!1?et(l,this.objId,this.scope):l},set:function(t){t=t.toString(),l=this instanceof ht==!1?"("===t.substr(0,1)?B(t.substr(1,t.length-2)):B(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof ht==!0?B(l.substr(1,l.length-1)):l},set:function(t){t=t.toString(),l=this instanceof ht==!0?"/"+t:t}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof ht==!1?et(f,this.objId,this.scope):f},set:function(t){t=t.toString(),f=this instanceof ht==!1?"("===t.substr(0,1)?B(t.substr(1,t.length-2)):B(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof ht==!0?B(f.substr(1,f.length-1)):f},set:function(t){t=t.toString(),f=this instanceof ht==!0?"/"+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 d,p=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return p},set:function(t){t=Boolean(t),p=t}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(d)return d},set:function(t){d=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,1):this.Ff=V(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,2):this.Ff=V(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,3):this.Ff=V(this.Ff,3)}});var g=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==g)return g},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');g=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(g){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:g=2;break;case"center":case 1:g=1;break;case"left":case 0:default:g=0}}})};E(at,rt);var ot=function(){at.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 tt(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(H(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,18):this.Ff=V(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=W(this.Ff,19):this.Ff=V(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=W(this.Ff,20),e.sort()):this.Ff=V(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,22):this.Ff=V(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,23):this.Ff=V(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,27):this.Ff=V(this.Ff,27)}}),this.hasAppearanceStream=!1};E(ot,at);var st=function(){ot.call(this),this.fontName="helvetica",this.combo=!1};E(st,ot);var ct=function(){st.call(this),this.combo=!0};E(ct,st);var ut=function(){ct.call(this),this.edit=!0};E(ut,ct);var ht=function(){at.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,15):this.Ff=V(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,16):this.Ff=V(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,17):this.Ff=V(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,26):this.Ff=V(this.Ff,26)}});var t,e={};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(e).length){var r,n=[];for(r in n.push("<<"),e)n.push("/"+r+" ("+O(t(e[r]))+")");return n.push(">>"),n.join("\n")}},set:function(t){"object"==typeof t&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){"string"==typeof t&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(e){t="/"+e}})};E(ht,at);var lt=function(){ht.call(this),this.pushButton=!0};E(lt,ht);var ft=function(){ht.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:[]}})};E(ft,ht);var dt=function(){var t,e;at.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(t){e=t}});var r,n={};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("<<"),n)r.push("/"+e+" ("+O(t(n[e]))+")");return r.push(">>"),r.join("\n")},set:function(t){"object"==typeof t&&(n=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){"string"==typeof t&&(n.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=vt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};E(dt,at),ft.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()}},ft.prototype.createOption=function(t){var e=new dt;return e.Parent=this,e.optionName=t,this.Kids.push(e),bt.call(this.scope,e),e};var pt=function(){ht.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=vt.CheckBox.createAppearanceStream()};E(pt,ht);var gt=function(){at.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,13):this.Ff=V(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,21):this.Ff=V(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,23):this.Ff=V(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,24):this.Ff=V(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,25):this.Ff=V(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,26):this.Ff=V(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}})};E(gt,at);var mt=function(){gt.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(H(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=W(this.Ff,14):this.Ff=V(this.Ff,14)}}),this.password=!0};E(mt,gt);var vt={CheckBox:{createAppearanceStream:function(){return{N:{On:vt.CheckBox.YesNormal},D:{On:vt.CheckBox.YesPushDown,Off:vt.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=R(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=J(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+q(vt.internal.getWidth(t))+" "+q(vt.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+q(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=R(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=vt.internal.getHeight(t),o=vt.internal.getWidth(t),s=J(t,t.caption);return i.push("1 g"),i.push("0 0 "+q(o)+" "+q(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+q(o-1)+" "+q(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+q(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=R(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+q(vt.internal.getWidth(t))+" "+q(vt.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:vt.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=vt.RadioButton.Circle.YesNormal,e.D[t]=vt.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=R(t);e.scope=t.scope;var r=[],n=vt.internal.getWidth(t)<=vt.internal.getHeight(t)?vt.internal.getWidth(t)/4:vt.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=vt.internal.Bezier_C,a=Number((n*i).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+M(vt.internal.getWidth(t)/2)+" "+M(vt.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=R(t);e.scope=t.scope;var r=[],n=vt.internal.getWidth(t)<=vt.internal.getHeight(t)?vt.internal.getWidth(t)/4:vt.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*vt.internal.Bezier_C).toFixed(5)),o=Number((n*vt.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+M(vt.internal.getWidth(t)/2)+" "+M(vt.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 "+M(vt.internal.getWidth(t)/2)+" "+M(vt.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=R(t);e.scope=t.scope;var r=[],n=vt.internal.getWidth(t)<=vt.internal.getHeight(t)?vt.internal.getWidth(t)/4:vt.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*vt.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+M(vt.internal.getWidth(t)/2)+" "+M(vt.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:vt.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=vt.RadioButton.Cross.YesNormal,e.D[t]=vt.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=R(t);e.scope=t.scope;var r=[],n=vt.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+q(vt.internal.getWidth(t)-2)+" "+q(vt.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(q(n.x1.x)+" "+q(n.x1.y)+" m"),r.push(q(n.x2.x)+" "+q(n.x2.y)+" l"),r.push(q(n.x4.x)+" "+q(n.x4.y)+" m"),r.push(q(n.x3.x)+" "+q(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=R(t);e.scope=t.scope;var r=vt.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+q(vt.internal.getWidth(t))+" "+q(vt.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+q(vt.internal.getWidth(t)-2)+" "+q(vt.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(q(r.x1.x)+" "+q(r.x1.y)+" m"),n.push(q(r.x2.x)+" "+q(r.x2.y)+" l"),n.push(q(r.x4.x)+" "+q(r.x4.y)+" m"),n.push(q(r.x3.x)+" "+q(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=R(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+q(vt.internal.getWidth(t))+" "+q(vt.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}};vt.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=vt.internal.getWidth(t),r=vt.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}}}},vt.internal.getWidth=function(t){var e=0;return"object"==typeof t&&(e=D(t.Rect[2])),e},vt.internal.getHeight=function(t){var e=0;return"object"==typeof t&&(e=D(t.Rect[3])),e};var bt=C.addField=function(t){if(Q(this,t),!(t instanceof at))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};C.AcroFormChoiceField=ot,C.AcroFormListBox=st,C.AcroFormComboBox=ct,C.AcroFormEditBox=ut,C.AcroFormButton=ht,C.AcroFormPushButton=lt,C.AcroFormRadioButton=ft,C.AcroFormCheckBox=pt,C.AcroFormTextField=gt,C.AcroFormPasswordField=mt,C.AcroFormAppearance=vt,C.AcroForm={ChoiceField:ot,ListBox:st,ComboBox:ct,EditBox:ut,Button:ht,PushButton:lt,RadioButton:ft,CheckBox:pt,TextField:gt,PasswordField:mt,Appearance:vt},I.AcroForm={ChoiceField:ot,ListBox:st,ComboBox:ct,EditBox:ut,Button:ht,PushButton:lt,RadioButton:ft,CheckBox:pt,TextField:gt,PasswordField:mt,Appearance:vt};var yt=I.AcroForm;
+/** @license
+ * jsPDF addImage plugin
+ * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/
+ *               2013 Chris Dowling, https://github.com/gingerchris
+ *               2013 Trinh Ho, https://github.com/ineedfat
+ *               2013 Edwin Alejandro Perez, https://github.com/eaparango
+ *               2013 Norah Smith, https://github.com/burnburnrocket
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 James Robb, https://github.com/jamesbrobb
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */function wt(t){return t.reduce((function(t,e,r){return t[e]=r,t}),{})}!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,c,u=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(c in n)for(o=n[c],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){u=c;break}}else for(c in n)for(o=n[c],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){u=c;break}}return u===r&&e!==r&&(u=e),u},a=function(t){for(var e=this.internal.write,r=this.internal.putStream,n=(0,this.internal.getFilters)();-1!==n.indexOf("FlateEncode");)n.splice(n.indexOf("FlateEncode"),1);t.objectId=this.internal.newObject();var i=[];if(i.push({key:"Type",value:"/XObject"}),i.push({key:"Subtype",value:"/Image"}),i.push({key:"Width",value:t.width}),i.push({key:"Height",value:t.height}),t.colorSpace===v.INDEXED?i.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(t.palette.length/3-1)+" "+("sMask"in t&&void 0!==t.sMask?t.objectId+2:t.objectId+1)+" 0 R]"}):(i.push({key:"ColorSpace",value:"/"+t.colorSpace}),t.colorSpace===v.DEVICE_CMYK&&i.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),i.push({key:"BitsPerComponent",value:t.bitsPerComponent}),"decodeParameters"in t&&void 0!==t.decodeParameters&&i.push({key:"DecodeParms",value:"<<"+t.decodeParameters+">>"}),"transparency"in t&&Array.isArray(t.transparency)){for(var o="",s=0,c=t.transparency.length;s<c;s++)o+=t.transparency[s]+" "+t.transparency[s]+" ";i.push({key:"Mask",value:"["+o+"]"})}void 0!==t.sMask&&i.push({key:"SMask",value:t.objectId+1+" 0 R"});var u=void 0!==t.filter?["/"+t.filter]:void 0;if(r({data:t.data,additionalKeyValues:i,alreadyAppliedFilters:u,objectId:t.objectId}),e("endobj"),"sMask"in t&&void 0!==t.sMask){var h="/Predictor "+t.predictor+" /Colors 1 /BitsPerComponent "+t.bitsPerComponent+" /Columns "+t.width,l={width:t.width,height:t.height,colorSpace:"DeviceGray",bitsPerComponent:t.bitsPerComponent,decodeParameters:h,data:t.sMask};"filter"in t&&(l.filter=t.filter),a.call(this,l)}if(t.colorSpace===v.INDEXED){var f=this.internal.newObject();r({data:S(new Uint8Array(t.palette)),objectId:f}),e("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")},c=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",s))},u=function(){var t=this.internal.collections.addImage_images;return c.call(this),t},h=function(){return Object.keys(this.internal.collections.addImage_images).length},l=function(t){return"function"==typeof e["process"+t.toUpperCase()]},f=function(t){return"object"==typeof t&&1===t.nodeType},d=function(r,n){if("IMG"===r.nodeName&&r.hasAttribute("src")){var i=""+r.getAttribute("src");if(0===i.indexOf("data:image/"))return t(unescape(i).split("base64,").pop());var a=e.loadFile(i,!0);if(void 0!==a)return a}if("CANVAS"===r.nodeName){if(0===r.width||0===r.height)throw new Error("Given canvas must have data. Canvas width: "+r.width+", height: "+r.height);var o;switch(n){case"PNG":o="image/png";break;case"WEBP":o="image/webp";break;case"JPEG":case"JPG":default:o="image/jpeg"}return t(r.toDataURL(o,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,c=this.internal.getVerticalCoordinateString,h=u.call(this);if(r=o[0],n=o[1],h[i.index]=i,a){a*=Math.PI/180;var l=Math.cos(a),f=Math.sin(a),d=function(t){return t.toFixed(4)},p=[d(l),d(f),d(-1*f),d(l),0,0,"cm"]}this.internal.write("q"),a?(this.internal.write([1,"0","0",1,s(t),c(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),c(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},N=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},L=e.__addimage__.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array};e.__addimage__.isArrayBuffer=function(t){return L()&&t instanceof ArrayBuffer};var A=e.__addimage__.isArrayBufferView=function(t){return L()&&"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)},x=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},S=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 t,e,n,i,a,o,s,u,h;if("number"==typeof arguments[1]?(e=r,n=arguments[1],i=arguments[2],a=arguments[3],o=arguments[4],s=arguments[5],u=arguments[6],h=arguments[7]):(e=arguments[1],n=arguments[2],i=arguments[3],a=arguments[4],o=arguments[5],s=arguments[6],u=arguments[7],h=arguments[8]),"object"==typeof(t=arguments[0])&&!f(t)&&"imageData"in t){var l=t;t=l.imageData,e=l.format||e||r,n=l.x||n||0,i=l.y||i||0,a=l.w||l.width||a,o=l.h||l.height||o,s=l.alias||s,u=l.compression||u,h=l.rotation||l.angle||h}var d=this.internal.getFilters();if(void 0===u&&-1!==d.indexOf("FlateEncode")&&(u="SLOW"),isNaN(n)||isNaN(i))throw new Error("Invalid coordinates passed to jsPDF.addImage");c.call(this);var p=_.call(this,t,e,s,u);return m.call(this,n,i,a,o,p,h),this};var _=function(t,n,a,o){var s,c,u;if("string"==typeof t&&i(t)===r){t=unescape(t);var g=P(t,!1);(""!==g||void 0!==(g=e.loadFile(t,!0)))&&(t=g)}if(f(t)&&(t=d(t,n)),n=i(t,n),!l(n))throw new Error("addImage does not support files of type '"+n+"', please ensure that a plugin for '"+n+"' support is added.");if((null==(u=a)||0===u.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))||(L()&&(t instanceof Uint8Array||"RGBA"===n||(c=t,t=x(t))),s=this["process"+n.toUpperCase()](t,h.call(this),a,function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in e.image_compression?t:b.NONE}(o),c)),!s)throw new Error("An unknown error occurred whilst processing the image.");return s},P=e.__addimage__.convertBase64ToBinaryString=function(e,r){var n;r="boolean"!=typeof r||r;var i,a="";if("string"==typeof e){i=null!==(n=N(e))?n.data:e;try{a=t(i)}catch(t){if(r)throw w(i)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return a};e.getImageProperties=function(t){var n,a,o="";if(f(t)&&(t=d(t)),"string"==typeof t&&i(t)===r&&(""===(o=P(t,!1))&&(o=e.loadFile(t)||""),t=o),a=i(t),!l(a))throw new Error("addImage does not support files of type '"+a+"', please ensure that a plugin for '"+a+"' support is added.");if(!L()||t instanceof Uint8Array||(t=x(t)),!(n=this["process"+a.toUpperCase()](t)))throw new Error("An unknown error occurred whilst processing the image");return n.fileType=a,n}}(I.API),
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){var e=function(t){if(void 0!==t&&""!=t)return!0};I.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(t){for(var r,n,i,a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,s=this.internal.getPageInfoByObjId(t.objId),c=t.pageContext.annotations,u=!1,h=0;h<c.length&&!u;h++)switch((r=c[h]).type){case"link":(e(r.options.url)||e(r.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(0!=u){this.internal.write("/Annots [");for(var l=0;l<c.length;l++){r=c[l];var f=this.internal.pdfEscape,d=this.internal.getEncryptor(t.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var p=this.internal.newAdditionalObject(),g=this.internal.newAdditionalObject(),m=this.internal.getEncryptor(p.objId),v=r.title||"Note";i="<</Type /Annot /Subtype /Text "+(n="/Rect ["+a(r.bounds.x)+" "+o(r.bounds.y+r.bounds.h)+" "+a(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y)+"] ")+"/Contents ("+f(m(r.contents))+")",i+=" /Popup "+g.objId+" 0 R",i+=" /P "+s.objId+" 0 R",i+=" /T ("+f(m(v))+") >>",p.content=i;var b=p.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+a(r.bounds.x+30)+" "+o(r.bounds.y+r.bounds.h)+" "+a(r.bounds.x+r.bounds.w+30)+" "+o(r.bounds.y)+"] ")+" /Parent "+b,r.open&&(i+=" /Open true"),i+=" >>",g.content=i,this.internal.write(p.objId,"0 R",g.objId,"0 R");break;case"freetext":n="/Rect ["+a(r.bounds.x)+" "+o(r.bounds.y)+" "+a(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y+r.bounds.h)+"] ";var y=r.color||"#000000";i="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+f(d(r.contents))+")",i+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+y+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(r.options.name){var w=this.annotations._nameMap[r.options.name];r.options.pageNumber=w.page,r.options.top=w.y}else r.options.top||(r.options.top=0);if(n="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",i="",r.options.url)i="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+f(d(r.options.url))+") >>";else if(r.options.pageNumber){switch(i="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,i+=" /FitV "+r.options.left+"]";break;case"XYZ":default:var N=o(r.options.top);r.options.left=r.options.left||0,void 0===r.options.zoom&&(r.options.zoom=0),i+=" /XYZ "+r.options.left+" "+N+" "+r.options.zoom+"]"}}""!=i&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),t.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)}},t.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"})},t.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){var{maxWidth:c}=n;a=c;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},t.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor}}(I.API),
+/**
+ * @license
+ * Copyright (c) 2017 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+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},c=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 u=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 h=t.__arabicParser__.arabicLetterHasMedialForm=function(t){return o(t)&&a(t)&&4==e[t.charCodeAt(0)].length},l=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:!u(t)||!o(e)&&!o(r)||!o(r)&&s(e)||s(t)&&!o(e)||s(t)&&c(e)||s(t)&&s(e)?0:h(t)&&o(e)&&!s(e)&&o(r)&&u(r)?3:s(t)||!o(r)?1:2:-1},d=function(t){var r=0,n=0,i=0,a="",s="",c="",u=(t=t||"").split("\\s+"),h=[];for(r=0;r<u.length;r+=1){for(h.push(""),n=0;n<u[r].length;n+=1)a=u[r][n],s=u[r][n-1],c=u[r][n+1],o(a)?(i=f(a,s,c),h[r]+=-1!==i?String.fromCharCode(e[a.charCodeAt(0)][i]):a):h[r]+=a;h[r]=l(h[r])}return h.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])}(I.API),I.API.autoPrint=function(t){var e;switch((t=t||{}).variant=t.variant||"non-conform",t.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default: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")}))}return this},
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+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}])}(I.API),
+/**
+ * @license
+ * ====================================================================
+ * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
+ *               2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Hall, james@parall.ax
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+function(t){var e={left:0,top:0,bottom:0,right:0},r=!1,n=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({},e),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=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};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(t){return n.call(this),this.internal.__cell__.headerFunction="function"==typeof t?t:void 0,this},t.getTextDimensions=function(t,e){n.call(this);var r=(e=e||{}).fontSize||this.getFontSize(),i=e.font||this.getFont(),a=e.scaleFactor||this.internal.scaleFactor,o=0,s=0,c=0,u=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)}const h=e.maxWidth;h>0?"string"==typeof t?t=this.splitTextToSize(t,h):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,e){return t.concat(u.splitTextToSize(e,h))}),[])):t=Array.isArray(t)?t:[t];for(var l=0;l<t.length;l++)o<(c=this.getStringUnitWidth(t[l],{font:i})*r)&&(o=c);return 0!==o&&(s=t.length),{w:o/=a,h:Math.max((s*r*this.getLineHeightFactor()-r*(this.getLineHeightFactor()-1))/a,0)}},t.cellAddPage=function(){n.call(this),this.addPage();var t=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new a(t.left,t.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=t.cell=function(){var t;t=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),n.call(this);var i=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,s=this.internal.__cell__.margins||e,c=this.internal.__cell__.tableHeaderRow,u=this.internal.__cell__.printHeaders;return void 0!==i.lineNumber&&(i.lineNumber===t.lineNumber?(t.x=(i.x||0)+(i.width||0),t.y=i.y||0):i.y+i.height+t.height+s.bottom>this.getPageHeight()?(this.cellAddPage(),t.y=s.top,u&&c&&(this.printHeaderRow(t.lineNumber,!0),t.y+=c[0].height)):t.y=i.y+i.height||t.y),void 0!==t.text[0]&&(this.rect(t.x,t.y,t.width,t.height,!0===r?"FD":void 0),"right"===t.align?this.text(t.text,t.x+t.width-o,t.y+o,{align:"right",baseline:"top"}):"center"===t.align?this.text(t.text,t.x+t.width/2,t.y+o,{align:"center",baseline:"top",maxWidth:t.width-o-o}):this.text(t.text,t.x+o,t.y+o,{align:"left",baseline:"top",maxWidth:t.width-o-o})),this.internal.__cell__.lastCell=t,this};t.table=function(t,r,c,u,h){if(n.call(this),!c)throw new Error("No data for PDF table.");var l,f,d,p,g=[],m=[],v=[],b={},y={},w=[],N=[],L=(h=h||{}).autoSize||!1,A=!1!==h.printHeaders,x=h.css&&void 0!==h.css["font-size"]?16*h.css["font-size"]:h.fontSize||12,S=h.margins||Object.assign({width:this.getPageWidth()},e),_="number"==typeof h.padding?h.padding:3,P=h.headerBackgroundColor||"#c8c8c8",k=h.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=A,this.internal.__cell__.margins=S,this.internal.__cell__.table_font_size=x,this.internal.__cell__.padding=_,this.internal.__cell__.headerBackgroundColor=P,this.internal.__cell__.headerTextColor=k,this.setFontSize(x),null==u)m=g=Object.keys(c[0]),v=g.map((function(){return"left"}));else if(Array.isArray(u)&&"object"==typeof u[0])for(g=u.map((function(t){return t.name})),m=u.map((function(t){return t.prompt||t.name||""})),v=u.map((function(t){return t.align||"left"})),l=0;l<u.length;l+=1)y[u[l].name]=u[l].width*(19.049976/25.4);else Array.isArray(u)&&"string"==typeof u[0]&&(m=g=u,v=g.map((function(){return"left"})));if(L||Array.isArray(u)&&"string"==typeof u[0])for(l=0;l<g.length;l+=1){for(b[p=g[l]]=c.map((function(t){return t[p]})),this.setFont(void 0,"bold"),w.push(this.getTextDimensions(m[l],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),f=b[p],this.setFont(void 0,"normal"),d=0;d<f.length;d+=1)w.push(this.getTextDimensions(f[d],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);y[p]=Math.max.apply(null,w)+_+_,w=[]}if(A){var F={};for(l=0;l<g.length;l+=1)F[g[l]]={},F[g[l]].text=m[l],F[g[l]].align=v[l];var I=s.call(this,F,y);N=g.map((function(e){return new a(t,r,y[e],I,F[e].text,void 0,F[e].align)})),this.setTableHeaderRow(N),this.printHeaderRow(1,!1)}var C=u.reduce((function(t,e){return t[e.name]=e.align,t}),{});for(l=0;l<c.length;l+=1){"rowStart"in h&&h.rowStart instanceof Function&&h.rowStart({row:l,data:c[l]},this);var j=s.call(this,c[l],y);for(d=0;d<g.length;d+=1){var O=c[l][g[d]];"cellStart"in h&&h.cellStart instanceof Function&&h.cellStart({row:l,col:d,data:O},this),o.call(this,new a(t,r,y[g[d]],j,O,l+2,C[g[d]]))}}return this.internal.__cell__.table_x=t,this.internal.__cell__.table_y=r,this};var s=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)};t.setTableHeaderRow=function(t){n.call(this),this.internal.__cell__.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var i;if(r=!0,"function"==typeof this.internal.__cell__.headerFunction){var s=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(s[0],s[1],s[2],s[3],void 0,-1)}this.setFont(void 0,"bold");for(var c=[],u=0;u<this.internal.__cell__.tableHeaderRow.length;u+=1){i=this.internal.__cell__.tableHeaderRow[u].clone(),e&&(i.y=this.internal.__cell__.margins.top||0,c.push(i)),i.lineNumber=t;var h=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,i),this.setTextColor(h)}c.length>0&&this.setTableHeaderRow(c),this.setFont(void 0,"normal"),r=!1}}(I.API);var Nt={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Lt=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],At=wt(Lt),xt=[100,200,300,400,500,600,700,800,900],St=wt(xt);function _t(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),r=function(t){return Nt[t=t||"normal"]?t:"normal"}(t.style),n=function(t){if(!t)return 400;if("number"==typeof t)return t>=100&&t<=900&&t%100==0?t:400;if(/^\d00$/.test(t))return parseInt(t);switch(t){case"bold":return 700;case"normal":default:return 400}}(t.weight),i=function(t){return"number"==typeof At[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 Pt(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 kt={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Ft={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function It(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function Ct(t,e,r){for(var n=(r=r||{}).defaultFontFamily||"times",i=Object.assign({},kt,r.genericFontFamilies||{}),a=null,o=null,s=0;s<e.length;++s)if(i[(a=_t(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 '"+It(a)+"' and default family '"+n+"'.");if(o=function(t,e){if(e[t])return e[t];var r=At[t],n=r<=At.normal?-1:1,i=Pt(e,Lt,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=Nt[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=St[t],n=Pt(e,xt,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 '"+It(a)+"'.");return o}function jt(t){return t.trimLeft()}function Ot(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 Bt(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 qt,Mt,Et,Dt=["times"];!function(t){var e,r,n,a,s,c,u,h,l,f=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 h,this.globalCompositeOperation=t.globalCompositeOperation||"normal",this.globalAlpha=t.globalAlpha||1,this.clip_path=t.clip_path||[],this.currentPoint=t.currentPoint||new c,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new c,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};t.events.push(["initialized",function(){this.context2d=new d(this),e=this.internal.f2,r=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,a=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,c=this.internal.Point,u=this.internal.Rectangle,h=this.internal.Matrix,l=new f}]);var d=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 l.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]),l.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 c=[];Object.defineProperty(this,"pageBreaks",{get:function(){return c},set:function(t){c=t}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(t){t instanceof f&&(l=t)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(t){l.path=t}});var u=[];Object.defineProperty(this,"ctxStack",{get:function(){return u},set:function(t){u=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){var e;e=p(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=p(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 h=null;function d(t,e){if(null===h){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());h=function(t){for(var e={},r=0;r<t.length;++r){var n=_t(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 h}var g=null;Object.defineProperty(this,"fontFaces",{get:function(){return g},set:function(t){h=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 Dt;if(i in Ft)return[Ft[i]];for(;""!==i;){switch(r=null,e=(i=jt(i)).charAt(0)){case'"':case"'":r=Ot(i.substring(1),e);break;default:r=Bt(i)}if(null===r)return Dt;if(n.push(r[0]),""!==(i=jt(r[1]))&&","!==i.charAt(0))return Dt;i=i.replace(/^,/,"")}return n}(a);if(this.fontFaces){var c=Ct(d(this.pdf,this.fontFaces),s.map((function(t){return{family:t,stretch:"normal",weight:n,style:r}})));this.pdf.setFont(c.ref.name,c.ref.style)}else{var u="";("bold"===n||parseInt(n,10)>=700||"bold"===r)&&(u="bold"),"italic"===r&&(u+="italic"),0===u.length&&(u="normal");for(var h="",l={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],u,{noFallback:!0,disableWarning:!0})){h=s[f];break}if("bolditalic"===u&&void 0!==this.pdf.internal.getFont(s[f],"bold",{noFallback:!0,disableWarning:!0}))h=s[f],u="bold";else if(void 0!==this.pdf.internal.getFont(s[f],"normal",{noFallback:!0,disableWarning:!0})){h=s[f],u="normal";break}}if(""===h)for(var p=0;p<s.length;p++)if(l[s[p]]){h=l[s[p]];break}h=""===h?"Times":h,this.pdf.setFont(h,u)}}}}),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,R.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(t){this.ctx.lineDash=t,R.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=Boolean(t)}})};d.prototype.setLineDash=function(t){this.lineDash=t},d.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},d.prototype.fill=function(){L.call(this,"fill",!1)},d.prototype.stroke=function(){L.call(this,"stroke",!1)},d.prototype.beginPath=function(){this.path=[{type:"begin"}]},d.prototype.moveTo=function(t,e){if(isNaN(t)||isNaN(e))throw o.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var r=this.ctx.transform.applyToPoint(new c(t,e));this.path.push({type:"mt",x:r.x,y:r.y}),this.ctx.lastPoint=new c(t,e)},d.prototype.closePath=function(){var t=new c(0,0),e=0;for(e=this.path.length-1;-1!==e;e--)if("begin"===this.path[e].type&&"object"==typeof this.path[e+1]&&"number"==typeof this.path[e+1].x){t=new c(this.path[e+1].x,this.path[e+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new c(t.x,t.y)},d.prototype.lineTo=function(t,e){if(isNaN(t)||isNaN(e))throw o.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var r=this.ctx.transform.applyToPoint(new c(t,e));this.path.push({type:"lt",x:r.x,y:r.y}),this.ctx.lastPoint=new c(r.x,r.y)},d.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),L.call(this,null,!0)},d.prototype.quadraticCurveTo=function(t,e,r,n){if(isNaN(r)||isNaN(n)||isNaN(t)||isNaN(e))throw o.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var i=this.ctx.transform.applyToPoint(new c(r,n)),a=this.ctx.transform.applyToPoint(new c(t,e));this.path.push({type:"qct",x1:a.x,y1:a.y,x:i.x,y:i.y}),this.ctx.lastPoint=new c(i.x,i.y)},d.prototype.bezierCurveTo=function(t,e,r,n,i,a){if(isNaN(i)||isNaN(a)||isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw o.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var s=this.ctx.transform.applyToPoint(new c(i,a)),u=this.ctx.transform.applyToPoint(new c(t,e)),h=this.ctx.transform.applyToPoint(new c(r,n));this.path.push({type:"bct",x1:u.x,y1:u.y,x2:h.x,y2:h.y,x:s.x,y:s.y}),this.ctx.lastPoint=new c(s.x,s.y)},d.prototype.arc=function(t,e,r,n,i,a){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i))throw o.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 s=this.ctx.transform.applyToPoint(new c(t,e));t=s.x,e=s.y;var u=this.ctx.transform.applyToPoint(new c(0,r)),h=this.ctx.transform.applyToPoint(new c(0,0));r=Math.sqrt(Math.pow(u.x-h.x,2)+Math.pow(u.y-h.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})},d.prototype.arcTo=function(t,e,r,n,i){throw new Error("arcTo not implemented.")},d.prototype.rect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw o.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)},d.prototype.fillRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw o.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!g.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)}},d.prototype.strokeRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw o.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");m.call(this)||(this.beginPath(),this.rect(t,e,r,n),this.stroke())},d.prototype.clearRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw o.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))},d.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 f(this.ctx);this.ctxStack.push(this.ctx),this.ctx=n}},d.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)},d.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var p=function(t){var e,r,n,a;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,a=0;else{var o=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(t);if(null!==o)e=parseInt(o[1]),r=parseInt(o[2]),n=parseInt(o[3]),a=1;else if(null!==(o=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(t)))e=parseInt(o[1]),r=parseInt(o[2]),n=parseInt(o[3]),a=parseFloat(o[4]);else{if(a=1,"string"==typeof t&&"#"!==t.charAt(0)){var s=new i(t);t=s.ok?s.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:a,style:t}},g=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},m=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};d.prototype.fillText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw o.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(n=isNaN(n)?void 0:n,!g.call(this)){var i=M(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;I.call(this,{text:t,x:e,y:r,scale:a,angle:i,align:this.textAlign,maxWidth:n})}},d.prototype.strokeText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw o.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!m.call(this)){n=isNaN(n)?void 0:n;var i=M(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;I.call(this,{text:t,x:e,y:r,scale:a,renderingMode:"stroke",angle:i,align:this.textAlign,maxWidth:n})}},d.prototype.measureText=function(t){if("string"!=typeof t)throw o.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,a=function(t){var e=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return e}}),this};return new a({width:i*=Math.round(96*r/72*1e4)/1e4})},d.prototype.scale=function(t,e){if(isNaN(t)||isNaN(e))throw o.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var r=new h(t,0,0,e,0,0);this.ctx.transform=this.ctx.transform.multiply(r)},d.prototype.rotate=function(t){if(isNaN(t))throw o.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var e=new h(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0);this.ctx.transform=this.ctx.transform.multiply(e)},d.prototype.translate=function(t,e){if(isNaN(t)||isNaN(e))throw o.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var r=new h(1,0,0,1,t,e);this.ctx.transform=this.ctx.transform.multiply(r)},d.prototype.transform=function(t,e,r,n,i,a){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(a))throw o.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var s=new h(t,e,r,n,i,a);this.ctx.transform=this.ctx.transform.multiply(s)},d.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 h(t,e,r,n,i,a)};var v=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};d.prototype.drawImage=function(t,e,r,n,i,a,o,s,c){var l=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=l.width/n*s/n,d=l.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=l.width,c=l.height);for(var m,y=this.ctx.transform.decompose(),L=M(y.rotate.shx),x=new h,S=(x=(x=(x=x.multiply(y.translate)).multiply(y.skew)).multiply(y.scale)).applyToRectangle(new u(a-e*p,o-r*g,n*f,i*d)),_=b.call(this,S),P=[],k=0;k<_.length;k+=1)-1===P.indexOf(_[k])&&P.push(_[k]);if(N(P),this.autoPaging)for(var F=P[0],I=P[P.length-1],C=F;C<I+1;C++){this.pdf.setPage(C);var j=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],O=1===C?this.posY+this.margin[0]:this.margin[0],B=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],q=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],E=1===C?0:B+(C-2)*q;if(0!==this.ctx.clip_path.length){var D=this.path;m=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(m,this.posX+this.margin[3],-E+O+this.ctx.prevPageLastElemOffset),A.call(this,"fill",!0),this.path=D}var R=JSON.parse(JSON.stringify(S));R=w([R],this.posX+this.margin[3],-E+O+this.ctx.prevPageLastElemOffset)[0];const e=(C>F||C<I)&&v.call(this);e&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],j,q,null).clip().discardPath()),this.pdf.addImage(t,"JPEG",R.x,R.y,R.w,R.h,null,null,L),e&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(t,"JPEG",S.x,S.y,S.w,S.h,null,null,L)};var b=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=D(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];)y.call(this);return n},y=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},w=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;case"mt":case"lt":case"arc":default:t[n].x+=e,t[n].y+=r}return t},N=function(t){return t.sort((function(t,e){return t-e}))},L=function(t,e){for(var r,n,i=this.fillStyle,a=this.strokeStyle,o=this.lineCap,s=this.lineWidth,c=Math.abs(s*this.ctx.transform.scaleX),u=this.lineJoin,h=JSON.parse(JSON.stringify(this.path)),l=JSON.parse(JSON.stringify(this.path)),f=[],d=0;d<l.length;d++)if(void 0!==l[d].x)for(var p=b.call(this,l[d]),g=0;g<p.length;g+=1)-1===f.indexOf(p[g])&&f.push(p[g]);for(var m=0;m<f.length;m++)for(;this.pdf.internal.getNumberOfPages()<f[m];)y.call(this);if(N(f),this.autoPaging)for(var L=f[0],x=f[f.length-1],S=L;S<x+1;S++){this.pdf.setPage(S),this.fillStyle=i,this.strokeStyle=a,this.lineCap=o,this.lineWidth=c,this.lineJoin=u;var _=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],P=1===S?this.posY+this.margin[0]:this.margin[0],k=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],I=1===S?0:k+(S-2)*F;if(0!==this.ctx.clip_path.length){var C=this.path;r=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(r,this.posX+this.margin[3],-I+P+this.ctx.prevPageLastElemOffset),A.call(this,t,!0),this.path=C}if(n=JSON.parse(JSON.stringify(h)),this.path=w(n,this.posX+this.margin[3],-I+P+this.ctx.prevPageLastElemOffset),!1===e||0===S){const r=(S>L||S<x)&&v.call(this);r&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],_,F,null).clip().discardPath()),A.call(this,t,e),r&&this.pdf.restoreGraphicsState()}this.lineWidth=s}else this.lineWidth=c,A.call(this,t,e),this.lineWidth=s;this.path=h},A=function(t,e){if(("stroke"!==t||e||!m.call(this))&&("stroke"===t||e||!g.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 c=i.length;if(a[o-1]&&!isNaN(a[o-1].x)&&(r=[s.x-a[o-1].x,s.y-a[o-1].y],c>0))for(;c>=0;c--)if(!0!==i[c-1].close&&!0!==i[c-1].begin){i[c-1].deltas.push(r),i[c-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 u=a[o-1].x+2/3*(s.x1-a[o-1].x),h=a[o-1].y+2/3*(s.y1-a[o-1].y),l=s.x+2/3*(s.x1-s.x),f=s.y+2/3*(s.y1-s.y),d=s.x,p=s.y;r=[u-a[o-1].x,h-a[o-1].y,l-a[o-1].x,f-a[o-1].y,d-a[o-1].x,p-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 N=y[w];"arc"===N.type?_.call(this,N.x,N.y,N.radius,N.startAngle,N.endAngle,N.counterclockwise,void 0,e,!v):C.call(this,N.x,N.y),v=!0}else if(!0===i[b].close)this.pdf.internal.out("h"),v=!1;else if(!0!==i[b].begin){var L=i[b].start.x,A=i[b].start.y;j.call(this,i[b].deltas,L,A),v=!0}n&&P.call(this,n),e&&k.call(this)}},x=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;case"ideographic":return t;case"alphabetic":default:return t}},S=function(t){return t+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};d.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},d.prototype.createPattern=function(){return this.createLinearGradient()},d.prototype.createRadialGradient=function(){return this.createLinearGradient()};var _=function(t,e,r,n,i,a,o,s,c){for(var u=B.call(this,r,n,i,a),h=0;h<u.length;h++){var l=u[h];0===h&&(c?F.call(this,l.x1+t,l.y1+e):C.call(this,l.x1+t,l.y1+e)),O.call(this,t,e,l.x2,l.y2,l.x3,l.y3,l.x4,l.y4)}s?k.call(this):P.call(this,o)},P=function(t){switch(t){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},k=function(){this.pdf.clip(),this.pdf.discardPath()},F=function(t,e){this.pdf.internal.out(r(t)+" "+n(e)+" m")},I=function(t){var e;switch(t.align){case"right":case"end":e="right";break;case"center":e="center";break;case"left":case"start":default:e="left"}var r=this.pdf.getTextDimensions(t.text),n=x.call(this,t.y),i=S.call(this,n)-r.h,a=this.ctx.transform.applyToPoint(new c(t.x,n)),o=this.ctx.transform.decompose(),s=new h;s=(s=(s=s.multiply(o.translate)).multiply(o.skew)).multiply(o.scale);for(var l,f,d,p=this.ctx.transform.applyToRectangle(new u(t.x,n,r.w,r.h)),g=s.applyToRectangle(new u(t.x,i,r.w,r.h)),m=b.call(this,g),y=[],L=0;L<m.length;L+=1)-1===y.indexOf(m[L])&&y.push(m[L]);if(N(y),this.autoPaging)for(var _=y[0],P=y[y.length-1],k=_;k<P+1;k++){this.pdf.setPage(k);var F=1===k?this.posY+this.margin[0]:this.margin[0],I=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],C=this.pdf.internal.pageSize.height-this.margin[2],j=C-this.margin[0],O=this.pdf.internal.pageSize.width-this.margin[1],B=O-this.margin[3],q=1===k?0:I+(k-2)*j;if(0!==this.ctx.clip_path.length){var M=this.path;l=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(l,this.posX+this.margin[3],-1*q+F),A.call(this,"fill",!0),this.path=M}var E=w([JSON.parse(JSON.stringify(g))],this.posX+this.margin[3],-q+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 D="text"!==this.autoPaging;if(D||E.y+E.h<=C){if(D||E.y>=F&&E.x<=O){var R=D?t.text:this.pdf.splitTextToSize(t.text,t.maxWidth||O-E.x)[0],T=w([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-q+F+this.ctx.prevPageLastElemOffset)[0];const r=D&&(k>_||k<P)&&v.call(this);r&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],B,j,null).clip().discardPath()),this.pdf.text(R,T.x,T.y,{angle:t.angle,align:e,renderingMode:t.renderingMode}),r&&this.pdf.restoreGraphicsState()}}else E.y<C&&(this.ctx.prevPageLastElemOffset+=C-E.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,i,a){i=i||0,a=a||0,this.pdf.internal.out(r(t+i)+" "+n(e+a)+" l")},j=function(t,e,r){return this.pdf.lines(t,e,r,null,null)},O=function(t,r,n,i,o,c,u,h){this.pdf.internal.out([e(a(n+t)),e(s(i+r)),e(a(o+t)),e(s(c+r)),e(a(u+t)),e(s(h+r)),"c"].join(" "))},B=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=[],c=n?-1:1,u=e;o>1e-5;){var h=u+c*Math.min(o,a);s.push(q.call(this,t,u,h)),o-=Math.abs(h-u),u=h}return s},q=function(t,e,r){var n=(r-e)/2,i=t*Math.cos(n),a=t*Math.sin(n),o=i,s=-a,c=o*o+s*s,u=c+o*i+s*a,h=4/3*(Math.sqrt(2*c*u)-u)/(o*a-s*i),l=o-h*s,f=s+h*o,d=l,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:l*m-f*v,y2:l*v+f*m,x3:d*m-p*v,y3:d*v+p*m,x4:t*Math.cos(r),y4:t*Math.sin(r)}},M=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),c=i+.5*(r-i),h=a+.5*(n-a),l=Math.min(t,i,o,c),f=Math.max(t,i,o,c),d=Math.min(e,a,s,h),p=Math.max(e,a,s,h);return new u(l,d,f-l,p-d)},D=function(t,e,r,n,i,a,o,s){var c,h,l,f,d,p,g,m,v,b,y,w,N,L,A=r-t,x=n-e,S=i-r,_=a-n,P=o-i,k=s-a;for(h=0;h<41;h++)v=(g=(l=t+(c=h/40)*A)+c*((d=r+c*S)-l))+c*(d+c*(i+c*P-d)-g),b=(m=(f=e+c*x)+c*((p=n+c*_)-f))+c*(p+c*(a+c*k-p)-m),0==h?(y=v,w=b,N=v,L=b):(y=Math.min(y,v),w=Math.min(w,b),N=Math.max(N,v),L=Math.max(L,b));return new u(Math.round(y),Math.round(w),Math.round(N-y),Math.round(L-w))},R=function(){if(!this.prevLineDash&&!this.ctx.lineDash.length&&!this.ctx.lineDashOffset)return;const t=(e=this.ctx.lineDash,r=this.ctx.lineDashOffset,JSON.stringify({lineDash:e,lineDashOffset:r}));var e,r;this.prevLineDash!==t&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=t)}}(I.API),
+/**
+ * @license
+ * jsPDF filters PlugIn
+ * Copyright (c) 2014 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){var e=function(t){var e,r,n,i,a,o,s,c,u,h;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-(h=a%85))/85)-(u=a%85))/85)-(c=a%85))/85)-(s=a%85))/85)%85,r.push(o+33,s+33,c+33,u+33,h+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)+"~>"},n=function(t){var e,r,n,i,a,o=String,s="length",c=255,u="charCodeAt",h="slice",l="replace";for(t[h](-2),t=t[h](0,-2)[l](/\s/g,"")[l]("z","!!!!!"),n=[],i=0,a=(t+=e="uuuuu"[h](t[s]%5||5))[s];a>i;i+=5)r=52200625*(t[u](i)-33)+614125*(t[u](i+1)-33)+7225*(t[u](i+2)-33)+85*(t[u](i+3)-33)+(t[u](i+4)-33),n.push(c&r>>24,c&r>>16,c&r>>8,c&r);return function(t,e){for(var r=e;r>0;r--)t.pop()}(n,e[s]),o.fromCharCode.apply(o,n)},i=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},a=function(t){for(var e=new Uint8Array(t.length),n=t.length;n--;)e[n]=t.charCodeAt(n);return t=(e=r.zlibSync(e)).reduce((function(t,e){return t+String.fromCharCode(e)}),"")};t.processDataByFilters=function(t,r){var o=0,s=t||"",c=[];for("string"==typeof(r=r||[])&&(r=[r]),o=0;o<r.length;o+=1)switch(r[o]){case"ASCII85Decode":case"/ASCII85Decode":s=n(s),c.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":s=e(s),c.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":s=i(s),c.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":s=s.split("").map((function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)})).join("")+">",c.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":s=a(s),c.push("/FlateDecode");break;default:throw new Error('The filter: "'+r[o]+'" is not implemented')}return{data:s,reverseChain:c.reverse().join(" ")}}}(I.API),
+/**
+ * @license
+ * jsPDF fileloading PlugIn
+ * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){t.loadFile=function(t,e,r){return function(t,e,r){e=!1!==e;var n=void 0,i=require("fs"),a=require("path");if(t=a.resolve(t),e)try{n=i.readFileSync(t,{encoding:"latin1"})}catch(t){return}else i.readFile(t,{encoding:"latin1"},(function(t,e){r&&(t&&r(void 0),r(e))}));return n}(t,e,r)},t.loadImageFile=t.loadFile}(I.API),
+/**
+ * @license
+ * Copyright (c) 2018 Erik Koopmans
+ * Released under the MIT License.
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){function e(){return(n.html2canvas?Promise.resolve(n.html2canvas):"object"==typeof exports&&"undefined"!=typeof module?new Promise((function(t,e){try{t(require("html2canvas"))}catch(t){e(t)}})):"function"==typeof define&&define.amd?new Promise((function(t,e){try{require(["html2canvas"],t)}catch(t){e(t)}})):Promise.reject(new Error("Could not load html2canvas"))).catch((function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))})).then((function(t){return t.default?t.default:t}))}function r(){return(n.DOMPurify?Promise.resolve(n.DOMPurify):"object"==typeof exports&&"undefined"!=typeof module?new Promise((function(t,e){try{t(require("dompurify"))}catch(t){e(t)}})):"function"==typeof define&&define.amd?new Promise((function(t,e){try{require(["dompurify"],t)}catch(t){e(t)}})):Promise.reject(new Error("Could not load dompurify"))).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(t){var e=typeof t;return"undefined"===e?"undefined":"string"===e||t instanceof String?"string":"number"===e||t instanceof Number?"number":"function"===e||t instanceof Function?"function":t&&t.constructor===Array?"array":t&&1===t.nodeType?"element":"object"===e?"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},o=function(t,e){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),n=t.firstChild;n;n=n.nextSibling)!0!==e&&1===n.nodeType&&"SCRIPT"===n.nodeName||r.appendChild(o(n,e));return 1===t.nodeType&&("CANVAS"===t.nodeName?(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(r.value=t.value),r.addEventListener("load",(function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft}),!0)),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=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(r).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=o(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(e).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(e).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||I.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,I.getPageSize=function(t,e,r){if("object"==typeof t){var n=t;t=n.orientation,e=n.unit||e,r=n.format||r}e=e||"mm",r=r||"a4",t=(""+(t||"P")).toLowerCase();var i,a=(""+r).toLowerCase(),o={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(e){case"pt":i=1;break;case"mm":i=72/25.4;break;case"cm":i=72/2.54;break;case"in":i=72;break;case"px":i=.75;break;case"pc":case"em":i=12;break;case"ex":i=6;break;default:throw"Invalid unit: "+e}var s,c=0,u=0;if(o.hasOwnProperty(a))c=o[a][1]/i,u=o[a][0]/i;else try{c=r[1],u=r[0]}catch(t){throw new Error("Invalid format: "+r)}if("p"===t||"portrait"===t)t="p",u>c&&(s=u,u=c,c=s);else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;t="l",c>u&&(s=u,u=c,c=s)}return{width:u,height:c,unit:e,k:i,orientation:t}},t.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(_t):null;var r=new s(e);return e.worker?r:r.from(t).doCallback()}}(I.API),I.API.addJS=function(t){return Et=t,this.internal.events.subscribe("postPutResources",(function(){qt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(qt+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Mt=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Et+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==qt&&void 0!==Mt&&this.internal.out("/Names <</JavaScript "+qt+" 0 R>>")})),this},
+/**
+ * @license
+ * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+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 c=this.internal.pages.length,u=[];for(i=0;i<c;i++){var h=t.internal.newObject();u.push(h);var l=t.internal.getPageInfo(i+1);t.internal.write("<< /D["+l.objId+" 0 R /XYZ null null null]>> endobj")}var f=t.internal.newObject();t.internal.write("<< /Names [ ");for(i=0;i<u.length;i++)t.internal.write("(page_"+(i+1)+")"+u[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}}])}(I.API),
+/**
+ * @license
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(t,r,n,i,a,o){var s,c=this.decode.DCT_DECODE,u=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}u={data:t,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:c,index:r,alias:n}}return u}}(I.API);var Rt,Tt,zt,Ut,Ht,Wt=function(){var t,e,i;function a(t){var e,r,n,i,a,o,s,c,u,h,l,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(),u=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"===u&&(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((h=n-this.transparency.indexed.length)>0)for(d=0;0<=h?d<h:d>h;0<=h?++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=(l=this.read(e)).indexOf(0),c=String.fromCharCode.apply(String,l.slice(0,s)),this.text[c]=String.fromCharCode.apply(String,l.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")}}a.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},a.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.decodePixels=function(t){var e=this.pixelBitlength/8,n=new Uint8Array(this.width*this.height*e),i=0,a=this;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);function o(r,o,s,c){var u,h,l,f,d,p,g,m,v,b,y,w,N,L,A,x,S,_,P,k,F,I=Math.ceil((a.width-r)/s),C=Math.ceil((a.height-o)/c),j=a.width==I&&a.height==C;for(L=e*I,w=j?n:new Uint8Array(L*C),p=t.length,N=0,h=0;N<C&&i<p;){switch(t[i++]){case 0:for(f=S=0;S<L;f=S+=1)w[h++]=t[i++];break;case 1:for(f=_=0;_<L;f=_+=1)u=t[i++],d=f<e?0:w[h-e],w[h++]=(u+d)%256;break;case 2:for(f=P=0;P<L;f=P+=1)u=t[i++],l=(f-f%e)/e,A=N&&w[(N-1)*L+l*e+f%e],w[h++]=(A+u)%256;break;case 3:for(f=k=0;k<L;f=k+=1)u=t[i++],l=(f-f%e)/e,d=f<e?0:w[h-e],A=N&&w[(N-1)*L+l*e+f%e],w[h++]=(u+Math.floor((d+A)/2))%256;break;case 4:for(f=F=0;F<L;f=F+=1)u=t[i++],l=(f-f%e)/e,d=f<e?0:w[h-e],0===N?A=x=0:(A=w[(N-1)*L+l*e+f%e],x=l&&w[(N-1)*L+(l-1)*e+f%e]),g=d+A-x,m=Math.abs(g-d),b=Math.abs(g-A),y=Math.abs(g-x),v=m<=b&&m<=y?d:b<=y?A:x,w[h++]=(u+v)%256;break;default:throw new Error("Invalid filter algorithm: "+t[i-1])}if(!j){var O=((o+N*c)*a.width+r)*e,B=N*L;for(f=0;f<I;f+=1){for(var q=0;q<e;q+=1)n[O++]=w[B++];O+=(s-1)*e}}N++}}return t=r.unzlibSync(t),1==a.interlaceMethod?(o(0,0,8,8),o(4,0,8,8),o(0,4,4,8),o(2,0,4,4),o(0,2,2,4),o(1,0,2,2),o(0,1,1,2)):o(0,0,1,1),n},a.prototype.decodePalette=function(){var t,e,r,n,i,a,o,s,c;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!=(c=a[t++])?c:255;return i},a.prototype.copyToImageData=function(t,e){var r,n,i,a,o,s,c,u,h,l,f;if(n=this.colors,h=null,r=this.hasAlphaChannel,this.palette.length&&(h=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),u=(i=t.data||t).length,o=h||e,a=s=0,1===n)for(;a<u;)c=h?4*e[a/4]:s,l=o[c++],i[a++]=l,i[a++]=l,i[a++]=l,i[a++]=r?o[c++]:255,s=c;else for(;a<u;)c=h?4*e[a/4]:s,i[a++]=o[c++],i[a++]=o[c++],i[a++]=o[c++],i[a++]=r?o[c++]:255,s=c},a.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t};var o=function(){if("[object Window]"===Object.prototype.toString.call(n)){try{e=n.document.createElement("canvas"),i=e.getContext("2d")}catch(t){return!1}return!0}return!1};return o(),t=function(t){var r;if(!0===o())return i.width=t.width,i.height=t.height,i.clearRect(0,0,t.width,t.height),i.putImageData(t,0,0),(r=new Image).src=e.toDataURL(),r;throw new Error("This method requires a Browser with Canvas-capability.")},a.prototype.decodeFrames=function(e){var r,n,i,a,o,s,c,u;if(this.animation){for(u=[],n=o=0,s=(c=this.animation.frames).length;o<s;n=++o)r=c[n],i=e.createImageData(r.width,r.height),a=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(i,a),r.imageData=i,u.push(r.image=t(i));return u}},a.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)},a.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,c;if(o=r++%i,c=n[o],s.renderFrame(t,o),i>1&&r/i<a)return s.animation._timeout=setTimeout(e,c.delay)})()},a.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},a.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))},a}();
+/**
+ * @license
+ *
+ * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+/**
+ * @license
+ * (c) Dean McNamee <dean@gmail.com>, 2013.
+ *
+ * https://github.com/deanm/omggif
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
+ * including animation and compression.  It does not rely on any specific
+ * underlying system, so should run in the browser, Node, or Plask.
+ */
+function Vt(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<<(7&i)+1;t[e++];t[e++];var s=null,c=null;a&&(s=e,c=o,e+=3*o);var u=!0,h=[],l=0,f=null,d=0,p=null;for(this.width=r,this.height=n;u&&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(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}break;case 249:if(4!==t[e++]||0!==t[e+4])throw new Error("Invalid graphics extension block.");var g=t[e++];l=t[e++]|t[e++]<<8,f=t[e++],0==(1&g)&&(f=null),d=g>>2&7,e++;break;case 254:for(;;){if(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}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++],N=w>>6&1,L=1<<(7&w)+1,A=s,x=c,S=!1;if(w>>7){S=!0;A=e,x=L,e+=3*L}var _=e;for(e++;;){var P;if(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}h.push({x:m,y:v,width:b,height:y,has_local_palette:S,palette_offset:A,palette_size:x,data_offset:_,data_length:e-_,transparent_index:f,interlaced:!!N,delay:l,disposal:d});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return h.length},this.loopCount=function(){return p},this.frameInfo=function(t){if(t<0||t>=h.length)throw new Error("Frame index out of range.");return h[t]},this.decodeAndBlitFrameBGRA=function(e,n){var i=this.frameInfo(e),a=i.width*i.height,o=new Uint8Array(a);Gt(t,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;null===c&&(c=256);var u=i.width,h=r-u,l=u,f=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=f,g=4*h;!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===l&&(l=u,(p+=g)>=d&&(g=4*h+4*r*(m-1),p=f+(u+h)*(m<<1),m>>=1)),y===c)p+=4;else{var w=t[s+3*y],N=t[s+3*y+1],L=t[s+3*y+2];n[p++]=L,n[p++]=N,n[p++]=w,n[p++]=255}--l}},this.decodeAndBlitFrameRGBA=function(e,n){var i=this.frameInfo(e),a=i.width*i.height,o=new Uint8Array(a);Gt(t,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;null===c&&(c=256);var u=i.width,h=r-u,l=u,f=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=f,g=4*h;!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===l&&(l=u,(p+=g)>=d&&(g=4*h+4*r*(m-1),p=f+(u+h)*(m<<1),m>>=1)),y===c)p+=4;else{var w=t[s+3*y],N=t[s+3*y+1],L=t[s+3*y+2];n[p++]=w,n[p++]=N,n[p++]=L,n[p++]=255}--l}}}function Gt(t,e,r,n){for(var i=t[e++],a=1<<i,s=a+1,c=s+1,u=i+1,h=(1<<u)-1,l=0,f=0,d=0,p=t[e++],g=new Int32Array(4096),m=null;;){for(;l<16&&0!==p;)f|=t[e++]<<l,l+=8,1===p?p=t[e++]:--p;if(l<u)break;var v=f&h;if(f>>=u,l-=u,v!==a){if(v===s)break;for(var b=v<c?v:m,y=0,w=b;w>a;)w=g[w]>>8,++y;var N=w;if(d+y+(b!==v?1:0)>n)return void o.log("Warning, gif stream longer than expected.");r[d++]=N;var L=d+=y;for(b!==v&&(r[d++]=N),w=b;y--;)w=g[w],r[--L]=255&w,w>>=8;null!==m&&c<4096&&(g[c++]=m<<8|N,c>=h+1&&u<12&&(++u,h=h<<1|1)),m=v}else c=s+1,h=(1<<(u=i+1))-1,m=null}return d!==n&&o.log("Warning, gif stream shorter than expected."),r}
+/**
+ * @license
+  Copyright (c) 2008, Adobe Systems Incorporated
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without 
+  modification, are permitted provided that the following conditions are
+  met:
+
+  * Redistributions of source code must retain the above copyright notice, 
+    this list of conditions and the following disclaimer.
+  
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the 
+    documentation and/or other materials provided with the distribution.
+  
+  * Neither the name of Adobe Systems Incorporated nor the names of its 
+    contributors may be used to endorse or promote products derived from 
+    this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/function Yt(t){var e,r,n,i,a,o=Math.floor,s=new Array(64),c=new Array(64),u=new Array(64),h=new Array(64),l=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),N=new Array(256),L=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],x=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],S=[0,1,2,3,4,5,6,7,8,9,10,11],_=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],P=[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],k=[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],I=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],C=[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 j(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 O(t){for(var e=t[0],r=t[1]-1;r>=0;)e&1<<r&&(m|=1<<v),r--,--v<0&&(255==m?(B(255),B(0)):B(m),v=7,m=0)}function B(t){g.push(t)}function q(t){B(t>>8&255),B(255&t)}function M(t,e,r,n,i){for(var a,o=i[0],s=i[240],c=function(t,e){var r,n,i,a,o,s,c,u,h,l,f=0;for(h=0;h<8;++h){r=t[f],n=t[f+1],i=t[f+2],a=t[f+3],o=t[f+4],s=t[f+5],c=t[f+6];var p=r+(u=t[f+7]),g=r-u,m=n+c,v=n-c,b=i+s,y=i-s,w=a+o,N=a-o,L=p+w,A=p-w,x=m+b,S=m-b;t[f]=L+x,t[f+4]=L-x;var _=.707106781*(S+A);t[f+2]=A+_,t[f+6]=A-_;var P=.382683433*((L=N+y)-(S=v+g)),k=.5411961*L+P,F=1.306562965*S+P,I=.707106781*(x=y+v),C=g+I,j=g-I;t[f+5]=j+k,t[f+3]=j-k,t[f+1]=C+F,t[f+7]=C-F,f+=8}for(f=0,h=0;h<8;++h){r=t[f],n=t[f+8],i=t[f+16],a=t[f+24],o=t[f+32],s=t[f+40],c=t[f+48];var O=r+(u=t[f+56]),B=r-u,q=n+c,M=n-c,E=i+s,D=i-s,R=a+o,T=a-o,z=O+R,U=O-R,H=q+E,W=q-E;t[f]=z+H,t[f+32]=z-H;var V=.707106781*(W+U);t[f+16]=U+V,t[f+48]=U-V;var G=.382683433*((z=T+D)-(W=M+B)),Y=.5411961*z+G,J=1.306562965*W+G,X=.707106781*(H=D+M),K=B+X,Z=B-X;t[f+40]=Z+Y,t[f+24]=Z-Y,t[f+8]=K+J,t[f+56]=K-J,f++}for(h=0;h<64;++h)l=t[h]*e[h],d[h]=l>0?l+.5|0:l-.5|0;return d}(t,e),u=0;u<64;++u)p[A[u]]=c[u];var h=p[0]-r;r=p[0],0==h?O(n[0]):(O(n[f[a=32767+h]]),O(l[a]));for(var g=63;g>0&&0==p[g];)g--;if(0==g)return O(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)O(s);y&=15}a=32767+p[v],O(i[(y<<4)+f[a]]),O(l[a]),v++}return 63!=g&&O(o),r}function E(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 l=o((i[a]*t+50)/100);l=Math.min(Math.max(l,1),255),c[A[a]]=l}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++)u[d]=1/(s[A[d]]*f[p]*f[g]*8),h[d]=1/(c[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&&E(a),g=new Array,m=0,v=7,q(65496),q(65504),q(16),B(74),B(70),B(73),B(70),B(0),B(1),B(1),B(0),q(1),q(1),B(0),B(0),function(){q(65499),q(132),B(0);for(var t=0;t<64;t++)B(s[t]);B(1);for(var e=0;e<64;e++)B(c[e])}(),function(t,e){q(65472),q(17),B(8),q(e),q(t),B(3),B(1),B(17),B(0),B(2),B(17),B(1),B(3),B(17),B(1)}(t.width,t.height),function(){q(65476),q(418),B(0);for(var t=0;t<16;t++)B(x[t+1]);for(var e=0;e<=11;e++)B(S[e]);B(16);for(var r=0;r<16;r++)B(_[r+1]);for(var n=0;n<=161;n++)B(P[n]);B(1);for(var i=0;i<16;i++)B(k[i+1]);for(var a=0;a<=11;a++)B(F[a]);B(17);for(var o=0;o<16;o++)B(I[o+1]);for(var s=0;s<=161;s++)B(C[s])}(),q(65498),q(12),B(3),B(1),B(0),B(2),B(17),B(3),B(17),B(0),B(63),B(0);var o=0,l=0,f=0;m=0,v=7,this.encode.displayName="_encode_";for(var d,p,N,A,j,D,R,T,z,U=t.data,H=t.width,W=t.height,V=4*H,G=0;G<W;){for(d=0;d<V;){for(j=V*G+d,R=-1,T=0,z=0;z<64;z++)D=j+(T=z>>3)*V+(R=4*(7&z)),G+T>=W&&(D-=V*(G+1+T-W)),d+R>=V&&(D-=d+R-V+4),p=U[D++],N=U[D++],A=U[D++],b[z]=(L[p]+L[N+256>>0]+L[A+512>>0]>>16)-128,y[z]=(L[p+768>>0]+L[N+1024>>0]+L[A+1280>>0]>>16)-128,w[z]=(L[p+1280>>0]+L[N+1536>>0]+L[A+1792>>0]>>16)-128;o=M(b,u,o,e,n),l=M(y,h,l,r,i),f=M(w,h,f,r,i),d+=32}G+=8}if(v>=0){var Y=[];Y[1]=v+1,Y[0]=(1<<v+1)-1,O(Y)}return q(65497),new Uint8Array(g)},t=t||50,function(){for(var t=String.fromCharCode,e=0;e<256;e++)N[e]=t(e)}(),e=j(x,S),r=j(k,F),n=j(_,P),i=j(I,C),function(){for(var t=1,e=2,r=1;r<=15;r++){for(var n=t;n<e;n++)f[32767+n]=r,l[32767+n]=[],l[32767+n][1]=r,l[32767+n][0]=n;for(var i=-(e-1);i<=-t;i++)f[32767+i]=r,l[32767+i]=[],l[32767+i][1]=r,l[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)L[t]=19595*t,L[t+256>>0]=38470*t,L[t+512>>0]=7471*t+32768,L[t+768>>0]=-11059*t,L[t+1024>>0]=-21709*t,L[t+1280>>0]=32768*t+8421375,L[t+1536>>0]=-27439*t,L[t+1792>>0]=-5329*t}(),E(t)}
+/**
+ * @license
+ * Copyright (c) 2017 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */function Jt(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 Xt(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 c=function(){var t=this;function c(t,e){for(var r=1<<e-1>>>0;t&r;)r>>>=1;return r?(t&r-1)+r:t}function u(t,r,n,i,a){e(!(i%n));do{t[r+(i-=n)]=a}while(0<i)}function h(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 h,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,h=1;15>h;++h){if(g[h]>1<<h)return 0;m[h+1]=m[h]+g[h]}for(f=0;f<o;++f)h=i[f],0<i[f]&&(s[m[h]++]=f);if(1==m[15])return(i=new l).g=0,i.value=s[0],u(t,d,1,p,i),p;var v,b=-1,y=p-1,w=0,N=1,L=1,A=1<<n;for(f=0,h=1,o=2;h<=n;++h,o<<=1){if(N+=L<<=1,0>(L-=g[h]))return 0;for(;0<g[h];--g[h])(i=new l).g=h,i.value=s[f++],u(t,d+w,o,A,i),w=c(w,h)}for(h=n+1,o=2;15>=h;++h,o<<=1){if(N+=L<<=1,0>(L-=g[h]))return 0;for(;0<g[h];--g[h]){if(i=new l,(w&y)!=b){for(d+=A,v=1<<(b=h)-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=h-n,i.value=s[f++],u(t,d+(w>>n),o,A,i),w=c(w,h)}}return N!=2*m[15]-1?0:p}(t,r,n,i,o,s)}function l(){this.value=this.g=0}function f(){this.value=this.g=0}function d(){this.G=o(5,l),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Dr,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,_(t)}function g(t,e){for(var r=0;0<e--;)r|=k(t,128)<<e;return r}function m(t,e){var r=g(t,e);return P(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]<<zr-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<=Tr){var n=L(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 N(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function L(t){return t.Ra>>>(t.u&zr-1)>>>0}function A(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>zr}function x(t,e){t.u=e,t.h=A(t)}function S(t){t.u>=Ur&&(e(t.u>=Ur),b(t))}function _(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 P(t){return g(t,1)}function k(t,e){var r=t.Ca;0>t.b&&_(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]=r>>0&255}function I(t,e){return t[e+0]<<0|t[e+1]<<8}function C(t,e){return I(t,e)|t[e+2]<<16}function j(t,e){return I(t,e)|I(t,e+2)<<16}function O(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 B(t,r){e(null!=t),e(null!=r),e(t.Xa==r.Xa),n(r.X,0,t.X,0,1<<r.Xa)}function q(){this.X=[],this.Xa=this.Mb=0}function M(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 E(t,e){return t+(1<<e)-1>>>e}function D(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,c){var u;for(u=0;u<o;++u){var h=t[e](s[c+u-1],i,a+u);s[c+u]=D(r[n+u],h)}}}function T(){this.ud=this.hd=this.jd=0}function z(t,e){return((4278124286&(t^e))>>>1)+(t&e)>>>0}function U(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function H(t,e){return U(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=D(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,c=16711935&(c=(c=16711935&o)+((s<<16)+s));n[i+a]=(4278255360&o)+c>>>0}}function Y(t,e){e.jd=t>>0&255,e.hd=t>>8&255,e.ud=t>>16&255}function J(t,e,r,n,i,a){var o;for(o=0;o<n;++o){var s=e[r+o],c=s>>>8,u=s,h=255&(h=(h=s>>>16)+((t.jd<<24>>24)*(c<<24>>24)>>>5));u=255&(u=(u=u+((t.hd<<24>>24)*(c<<24>>24)>>>5))+((t.ud<<24>>24)*(h<<24>>24)>>>5));i[a+o]=(4278255360&s)+(h<<16)+u}}function X(e,r,n,i,a){t[r]=function(t,e,r,n,o,s,c,u,h){for(n=c;n<u;++n)for(c=0;c<h;++c)o[s++]=a(r[i(t[e++])])},t[e]=function(e,r,o,s,c,u,h){var l=8>>e.b,f=e.Ea,d=e.K[0],p=e.w;if(8>l)for(e=(1<<e.b)-1,p=(1<<l)-1;r<o;++r){var g,m=0;for(g=0;g<f;++g)g&e||(m=i(s[c++])),u[h++]=a(d[m&p]),m>>=l}else t["VP8LMapColor"+n](s,c,d,p,u,h,r,o,f)}}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++]=a>>0&255}}function Z(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++]=a>>0&255,n[i++]=a>>24&255}}function $(t,e,r,n,i){for(r=e+r;e<r;){var a=(o=t[e++])>>16&240|o>>12&15,o=o>>0&240|o>>28&15;n[i++]=a,n[i++]=o}}function Q(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++]=a>>0&255,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 ct(){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 ut(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ht(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],c=t.y,u=t.O,h=t.f,l=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,N=w+1>>1;for(0==b?s(c,u,null,null,h,l,f,d,h,l,f,d,a,o,null,null,w):(s(e.ec,e.fc,c,u,p,g,m,v,h,l,f,d,a,o-i.A,a,o,w),++r);b+2<y;b+=2)p=h,g=l,m=f,v=d,l+=t.Rc,d+=t.Rc,o+=2*i.A,s(c,(u+=2*t.fa)-t.fa,c,u,p,g,m,v,h,l,f,d,a,o-i.A,a,o,w);return u+=t.fa,t.j+y<t.o?(n(e.ec,e.fc,c,u,w),n(e.cc,e.dc,h,l,N),n(e.Mc,e.Nc,f,d,N),r--):1&y||s(c,u,null,null,h,l,f,d,h,l,f,d,a,o+i.A,null,null,w),r}function lt(t,r,n){var i=t.F,a=[t.J];if(null!=i){var o=t.U,s=r.ba.S,c=s==Tn||s==Vn;r=r.ba.f.RGBA;var u=[0],h=t.ka;u[0]=t.T,t.Kb&&(0==h?--u[0]:(--h,a[0]-=t.width),t.j+t.ka+t.T==t.o&&(u[0]=t.o-t.j-h));var l=r.eb;h=r.fb+h*r.A;t=Sn(i,a[0],t.width,o,u,l,h+(c?0:3),r.A),e(n==u),t&&nt(s)&&An(l,h,c,o,u,r.A)}return 0}function ft(t){var e=t.ma,r=e.ba.S,n=11>r,i=r==En||r==Rn||r==Tn||r==zn||12==r||nt(r);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!qr(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=ut,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=ht,br()}}else alert("todo:EmitYUV");i&&(e.Jb=lt,n&&mr())}if(n&&!Ci){for(t=0;256>t;++t)ji[t]=89858*(t-128)+_i>>Si,qi[t]=-22014*(t-128)+_i,Bi[t]=-45773*(t-128),Oi[t]=113618*(t-128)+_i>>Si;for(t=Pi;t<ki;++t)e=76283*(t-16)+_i>>Si,Mi[t-Pi]=Vt(e,255),Ei[t-Pi]=Vt(e+8>>4,15);Ci=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=$n[e-1])>>4)*t+(8-(15&r)))?r:1;var r}function bt(t,e,r){var n=L(r),i=t[e+=255&n].g-8;return 0<i&&(x(r,r.u+8),n=L(r),e+=t[e].value,e+=n&(1<<i)-1),x(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 Nt(t,r,i,a){var o=t.ab,s=t.c*r,c=t.C;r=c+r;var u=i,h=a;for(a=t.Ta,i=t.Ua;0<o--;){var l=t.gc[o],f=c,d=r,p=u,g=h,m=(h=a,u=i,l.Ea);switch(e(f<d),e(d<=l.nc),l.hc){case 2:Gr(p,g,(d-f)*m,h,u);break;case 0:var v=f,b=d,y=h,w=u,N=(_=l).Ea;0==v&&(Wr(p,g,null,null,1,y,w),V(p,g+1,0,0,N-1,y,w+1),g+=N,w+=N,++v);for(var L=1<<_.b,A=L-1,x=E(N,_.b),S=_.K,_=_.w+(v>>_.b)*x;v<b;){var P=S,k=_,F=1;for(Vr(p,g,y,w-N,1,y,w);F<N;){var I=(F&~A)+L;I>N&&(I=N),(0,Zr[P[k++]>>8&15])(p,g+ +F,y,w+F-N,I-F,y,w+F),F=I}g+=N,w+=N,++v&A||(_+=x)}d!=l.nc&&n(h,u-m,h,u+(d-f-1)*m,m);break;case 1:for(m=p,b=g,N=(p=l.Ea)-(w=p&~(y=(g=1<<l.b)-1)),v=E(p,l.b),L=l.K,l=l.w+(f>>l.b)*v;f<d;){for(A=L,x=l,S=new T,_=b+w,P=b+p;b<_;)Y(A[x++],S),$r(S,m,b,g,h,u),b+=g,u+=g;b<P&&(Y(A[x++],S),$r(S,m,b,N,h,u),b+=N,u+=N),++f&y||(l+=v)}break;case 3:if(p==h&&g==u&&0<l.b){for(b=h,p=m=u+(d-f)*m-(w=(d-f)*E(l.Ea,l.b)),g=h,y=u,v=[],w=(N=w)-1;0<=w;--w)v[w]=g[y+w];for(w=N-1;0<=w;--w)b[p+w]=v[w];Yr(l,f,d,h,m,h,u)}else Yr(l,f,d,p,g,h,u)}u=a,h=i}h!=i&&n(a,i,u,h,s)}function Lt(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,c=t.Ua,u=o.width;if(Nt(t,a,n,i),a=c=[c],e((n=t.C)<(i=r)),e(o.v<o.va),i>o.o&&(i=o.o),n<o.j){var h=o.j-n;n=o.j;a[0]+=h*u}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(c=c[0],11>(n=t.ca).S){var l=n.f.RGBA,f=(i=n.S,a=o.U,o=o.T,h=l.eb,l.A),d=o;for(l=l.fb+t.Ma*l.A;0<d--;){var p=s,g=c,m=a,v=h,b=l;switch(i){case Mn:Qr(p,g,m,v,b);break;case En:tn(p,g,m,v,b);break;case Hn:tn(p,g,m,v,b),An(v,b,0,m,1,0);break;case Dn: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 Tn: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 zn:en(p,g,m,v,b);break;case Gn:en(p,g,m,v,b),xn(v,b,m,1,0);break;case Un:rn(p,g,m,v,b);break;default:e(0)}c+=u,l+=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 xt(t,r,n,i,a,o){if(0!=t.Z){var s=t.qd,c=t.rd;for(e(null!=mi[t.Z]);r<n;++r)mi[t.Z](s,c,i,a,i,a,o),s=i,c=a,a+=o;t.qd=s,t.rd=c}}function St(t,r){var n=t.l.ma,i=0==n.Z||1==n.Z?t.l.j:t.C;i=t.C<i?i:t.C;if(e(r<=t.l.o),r>i){var a=t.l.width,o=n.ca,s=n.tb+a*i,c=t.V,u=t.Ba+t.c*i,h=t.gc;e(1==t.ab),e(3==h[0].hc),Xr(h[0],i,r,c,u,o,s),xt(n,i,r,o,s,a)}t.C=t.Ma=r}function _t(t,r,n,i,a,o,s){var c=t.$/i,u=t.$%i,h=t.m,l=t.s,f=n+t.$,d=f;a=n+i*a;var p=n+i*o,g=280+l.ua,m=t.Pb?c:16777216,v=0<l.ua?l.Wa:null,b=l.wc,y=f<p?wt(l,u,c):null;e(t.C<o),e(p<=a);var w=!1;t:for(;;){for(;w||f<p;){var N=0;if(c>=m){var _=f-n;e((m=t).Pb),m.wd=m.m,m.xd=_,0<m.s.ua&&B(m.s.Wa,m.s.vb),m=c+ti}if(u&b||(y=wt(l,u,c)),e(null!=y),y.Qb&&(r[f]=y.qb,w=!0),!w)if(S(h),y.jc){N=h,_=r;var P=f,k=y.pd[L(N)&Dr-1];e(y.jc),256>k.g?(x(N,N.u+k.g),_[P]=k.value,N=0):(x(N,N.u+k.g-256),e(256<=k.value),N=k.value),0==N&&(w=!0)}else N=bt(y.G[0],y.H[0],h);if(h.h)break;if(w||256>N){if(!w)if(y.nd)r[f]=(y.qb|N<<8)>>>0;else{if(S(h),w=bt(y.G[1],y.H[1],h),S(h),_=bt(y.G[2],y.H[2],h),P=bt(y.G[3],y.H[3],h),h.h)break;r[f]=(P<<24|w<<16|N<<8|_)>>>0}if(w=!1,++f,++u>=i&&(u=0,++c,null!=s&&c<=o&&!(c%16)&&s(t,c),null!=v))for(;d<f;)N=r[d++],v.X[(506832829*N&4294967295)>>>v.Mb]=N}else if(280>N){if(N=mt(N-256,h),_=bt(y.G[4],y.H[4],h),S(h),_=vt(i,_=mt(_,h)),h.h)break;if(f-n<_||a-f<N)break t;for(P=0;P<N;++P)r[f+P]=r[f+P-_];for(f+=N,u+=N;u>=i;)u-=i,++c,null!=s&&c<=o&&!(c%16)&&s(t,c);if(e(f<=a),u&b&&(y=wt(l,u,c)),null!=v)for(;d<f;)N=r[d++],v.X[(506832829*N&4294967295)>>>v.Mb]=N}else{if(!(N<g))break t;for(w=N-280,e(null!=v);d<f;)N=r[d++],v.X[(506832829*N&4294967295)>>>v.Mb]=N;N=f,e(!(w>>>(_=v).Xa)),r[N]=_.X[w],w=!0}w||e(h.h==A(h))}if(t.Pb&&h.h&&f<a)e(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&B(t.s.vb,t.s.Wa);else{if(h.h)break t;null!=s&&s(t,c>o?o:c),t.a=0,t.$=f-n}return 1}return t.a=3,0}function Pt(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 kt(){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,$r=J,Qr=K,tn=Z,en=$,rn=Q,nn=tt,t.VP8LMapColor32b=Jr,t.VP8LMapColor8b=Kr,e)}function Ft(t,r,n,s,c){var u=1,f=[t],p=[r],g=s.m,m=s.s,v=null,b=0;t:for(;;){if(n)for(;u&&y(g,1);){var w=f,N=p,A=s,_=1,P=A.m,k=A.gc[A.ab],F=y(P,2);if(A.Oc&1<<F)u=0;else{switch(A.Oc|=1<<F,k.hc=F,k.Ea=w[0],k.nc=N[0],k.K=[null],++A.ab,e(4>=A.ab),F){case 0:case 1:k.b=y(P,3)+2,_=Ft(E(k.Ea,k.b),E(k.nc,k.b),0,A,k.K),k.K=k.K[0];break;case 3:var I,C=y(P,8)+1,j=16<C?0:4<C?1:2<C?2:3;if(w[0]=E(k.Ea,j),k.b=j,I=_=Ft(C,1,0,A,k.K)){var B,q=C,M=k,R=1<<(8>>M.b),T=a(R);if(null==T)I=0;else{var z=M.K[0],U=M.w;for(T[0]=M.K[0][0],B=1;B<1*q;++B)T[B]=D(z[U+B],T[B-1]);for(;B<4*R;++B)T[B]=0;M.K[0]=null,M.K[0]=T,I=1}}_=I;break;case 2:break;default:e(0)}u=_}}if(f=f[0],p=p[0],u&&y(g,1)&&!(u=1<=(b=y(g,4))&&11>=b)){s.a=3;break t}var H;if(H=u)e:{var W,V,G,Y=s,J=f,X=p,K=b,Z=n,$=Y.m,Q=Y.s,tt=[null],et=1,rt=0,nt=Qn[K];r:for(;;){if(Z&&y($,1)){var it=y($,3)+2,at=E(J,it),ot=E(X,it),st=at*ot;if(!Ft(at,ot,0,Y,tt))break r;for(tt=tt[0],Q.xc=it,W=0;W<st;++W){var ct=tt[W]>>8&65535;tt[W]=ct,ct>=et&&(et=ct+1)}}if($.h)break r;for(V=0;5>V;++V){var ut=Xn[V];!V&&0<K&&(ut+=1<<K),rt<ut&&(rt=ut)}var ht=o(et*nt,l),lt=et,ft=o(lt,d);if(null==ft)var dt=null;else e(65536>=lt),dt=ft;var pt=a(rt);if(null==dt||null==pt||null==ht){Y.a=1;break r}var gt=ht;for(W=G=0;W<et;++W){var mt=dt[W],vt=mt.G,bt=mt.H,wt=0,Nt=1,Lt=0;for(V=0;5>V;++V){ut=Xn[V],vt[V]=gt,bt[V]=G,!V&&0<K&&(ut+=1<<K);n:{var At,xt=ut,St=Y,kt=pt,It=gt,Ct=G,jt=0,Ot=St.m,Bt=y(Ot,1);if(i(kt,0,0,xt),Bt){var qt=y(Ot,1)+1,Mt=y(Ot,1),Et=y(Ot,0==Mt?1:8);kt[Et]=1,2==qt&&(kt[Et=y(Ot,8)]=1);var Dt=1}else{var Rt=a(19),Tt=y(Ot,4)+4;if(19<Tt){St.a=3;var zt=0;break n}for(At=0;At<Tt;++At)Rt[Zn[At]]=y(Ot,3);var Ut=void 0,Ht=void 0,Wt=St,Vt=Rt,Gt=xt,Yt=kt,Jt=0,Xt=Wt.m,Kt=8,Zt=o(128,l);i:for(;h(Zt,0,7,Vt,19);){if(y(Xt,1)){var $t=2+2*y(Xt,3);if((Ut=2+y(Xt,$t))>Gt)break i}else Ut=Gt;for(Ht=0;Ht<Gt&&Ut--;){S(Xt);var Qt=Zt[0+(127&L(Xt))];x(Xt,Xt.u+Qt.g);var te=Qt.value;if(16>te)Yt[Ht++]=te,0!=te&&(Kt=te);else{var ee=16==te,re=te-16,ne=Jn[re],ie=y(Xt,Yn[re])+ne;if(Ht+ie>Gt)break i;for(var ae=ee?Kt:0;0<ie--;)Yt[Ht++]=ae}}Jt=1;break i}Jt||(Wt.a=3),Dt=Jt}(Dt=Dt&&!Ot.h)&&(jt=h(It,Ct,8,kt,xt)),Dt&&0!=jt?zt=jt:(St.a=3,zt=0)}if(0==zt)break r;if(Nt&&1==Kn[V]&&(Nt=0==gt[G].g),wt+=gt[G].g,G+=zt,3>=V){var oe,se=pt[0];for(oe=1;oe<ut;++oe)pt[oe]>se&&(se=pt[oe]);Lt+=se}}if(mt.nd=Nt,mt.Qb=0,Nt&&(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>Lt,mt.jc){var ce,ue=mt;for(ce=0;ce<Dr;++ce){var he=ce,le=ue.pd[he],fe=ue.G[0][ue.H[0]+he];256<=fe.value?(le.g=fe.g+256,le.value=fe.value):(le.g=0,le.value=0,he>>=yt(fe,8,le),he>>=yt(ue.G[1][ue.H[1]+he],16,le),he>>=yt(ue.G[2][ue.H[2]+he],0,le),yt(ue.G[3][ue.H[3]+he],24,le))}}}Q.vc=tt,Q.Wb=et,Q.Ya=dt,Q.yc=ht,H=1;break e}H=0}if(!(u=H)){s.a=3;break t}if(0<b){if(m.ua=1<<b,!O(m.Wa,b)){s.a=1,u=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=E(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,u=0;break t}u=(u=_t(s,v,0,f,p,p,null))&&!g.h;break t}return u?(null!=c?c[0]=v:(e(null==v),e(n)),s.$=0,n||Pt(m)):Pt(m),u}function It(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 Ct(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,c=t.l.ma,u=t.l.width,h=u*s,l=c.ca,f=c.tb+u*n,d=t.Ta,p=t.Ua;Nt(t,s,a,o),_n(d,p,l,f,h),xt(c,n,n+s,l,f,u),i-=s,a+=s*t.c,n+=s}e(n==r),t.C=t.Ma=r}function jt(){this.ub=this.yd=this.td=this.Rb=0}function Ot(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Bt(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function qt(){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 Mt(){this.jb=a(3),this.Wc=s([4,8],qt),this.Xc=s([4,17],qt)}function Et(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Dt(){this.ld=this.La=this.dd=this.tc=0}function Rt(){this.Na=this.la=0}function Tt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function zt(){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 Ut(){this.uc=this.M=this.Nb=0,this.wa=Array(new Dt),this.Y=0,this.ya=Array(new zt),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 jt,this.Kc=new Ot,this.ed=new Et,this.Qa=new Bt,this.Ic=this.$c=this.Aa=0,this.D=new Ut,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,Tt),this.Pa=new Mt,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 Dt),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 zt),this.L=this.aa=0,this.gd=s([4,2],Dt),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=Zt)),t}function Jt(t,e,r){return 0==t.a&&(t.a=e,t.sc=r,t.cb=0),0}function Xt(t,e,r){return 3<=r&&157==t[e+0]&&1==t[e+1]&&42==t[e+2]}function Kt(t,r){if(null==t)return 0;if(t.a=0,t.sc="OK",null==r)return Jt(t,2,"null VP8Io passed to VP8GetHeaders()");var n=r.data,a=r.w,o=r.ha;if(4>o)return Jt(t,7,"Truncated header.");var s=n[a+0]|n[a+1]<<8|n[a+2]<<16,c=t.Od;if(c.Rb=!(1&s),c.td=s>>1&7,c.yd=s>>4&1,c.ub=s>>5,3<c.td)return Jt(t,3,"Incorrect keyframe parameters.");if(!c.yd)return Jt(t,4,"Frame not displayable.");a+=3,o-=3;var u=t.Kc;if(c.Rb){if(7>o)return Jt(t,7,"cannot parse picture header");if(!Xt(n,a,o))return Jt(t,3,"Bad code word");u.c=16383&(n[a+4]<<8|n[a+3]),u.Td=n[a+4]>>6,u.i=16383&(n[a+6]<<8|n[a+5]),u.Ud=n[a+6]>>6,a+=7,o-=7,t.za=u.c+15>>4,t.Ub=u.i+15>>4,r.width=u.c,r.height=u.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(c.ub>o)return Jt(t,7,"bad partition length");p(s=t.m,n,a,c.ub),a+=c.ub,o-=c.ub,c.Rb&&(u.Ld=P(s),u.Kd=P(s)),u=t.Qa;var h,l=t.Pa;if(e(null!=s),e(null!=u),u.Cb=P(s),u.Cb){if(u.Bb=P(s),P(s)){for(u.Fb=P(s),h=0;4>h;++h)u.Zb[h]=P(s)?m(s,7):0;for(h=0;4>h;++h)u.Lb[h]=P(s)?m(s,6):0}if(u.Bb)for(h=0;3>h;++h)l.jb[h]=P(s)?g(s,8):255}else u.Bb=0;if(s.Ka)return Jt(t,3,"cannot parse segment header");if((u=t.ed).zd=P(s),u.Tb=g(s,6),u.wb=g(s,3),u.Pc=P(s),u.Pc&&P(s)){for(l=0;4>l;++l)P(s)&&(u.vd[l]=m(s,6));for(l=0;4>l;++l)P(s)&&(u.od[l]=m(s,6))}if(t.L=0==u.Tb?0:u.zd?1:2,s.Ka)return Jt(t,3,"cannot parse filter header");var f=o;if(o=h=a,a=h+f,u=f,t.Xb=(1<<g(t.m,2))-1,f<3*(l=t.Xb))n=7;else{for(h+=3*l,u-=3*l,f=0;f<l;++f){var d=n[o+0]|n[o+1]<<8|n[o+2]<<16;d>u&&(d=u),p(t.Jc[+f],n,h,d),h+=d,u-=d,o+=3}p(t.Jc[+l],n,h,u),n=h<a?0:5}if(0!=n)return Jt(t,n,"cannot parse partitions");for(n=g(h=t.m,7),o=P(h)?m(h,4):0,a=P(h)?m(h,4):0,u=P(h)?m(h,4):0,l=P(h)?m(h,4):0,h=P(h)?m(h,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+u,127)]>>16,8>b.Eb[1]&&(b.Eb[1]=8),b.Qc[0]=ei[Vt(v+l,117)],b.Qc[1]=ri[Vt(v+h,127)],b.lc=v+h}if(!c.Rb)return Jt(t,4,"Not a key frame.");for(P(s),c=t.Pa,n=0;4>n;++n){for(o=0;8>o;++o)for(a=0;3>a;++a)for(u=0;11>u;++u)l=k(s,ui[n][o][a][u])?g(s,8):si[n][o][a][u],c.Wc[n][o].Yb[a][u]=l;for(o=0;17>o;++o)c.Xc[n][o]=c.Wc[n][hi[o]]}return t.kc=P(s),t.kc&&(t.Bd=g(s,8)),t.cb=1}function Zt(t,e,r,n,i,a,o){var s=e[i].Yb[r];for(r=0;16>i;++i){if(!k(t,s[r+0]))return i;for(;!k(t,s[r+1]);)if(s=e[++i].Yb[0],r=0,16==i)return 16;var c=e[i+1].Yb;if(k(t,s[r+2])){var u=t,h=0;if(k(u,(f=s)[(l=r)+3]))if(k(u,f[l+6])){for(s=0,l=2*(h=k(u,f[l+8]))+(f=k(u,f[l+9+h])),h=0,f=ii[l];f[s];++s)h+=h+k(u,f[s]);h+=3+(8<<l)}else k(u,f[l+7])?(h=7+2*k(u,165),h+=k(u,145)):h=5+k(u,159);else h=k(u,f[l+4])?3+k(u,f[l+5]):2;s=c[2]}else h=1,s=c[1];c=o+ai[i],0>(u=t).b&&_(u);var l,f=u.b,d=(l=u.Ca>>1)-(u.I>>f)>>31;--u.b,u.Ca+=d,u.Ca|=1,u.I-=(l+1&d)<<f,a[c]=((h^d)-d)*n[(0<i)+0]}return 16}function $t(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 Qt(t,r){if(null==t)return 0;if(null==r)return Jt(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!Kt(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 c=t.ed;for(s=0;4>s;++s){var u;if(t.Qa.Cb){var h=t.Qa.Lb[s];t.Qa.Fb||(h+=c.Tb)}else h=c.Tb;for(u=0;1>=u;++u){var l=t.gd[s][u],f=h;if(c.Pc&&(f+=c.vd[0],u&&(f+=c.od[0])),0<(f=0>f?0:63<f?63:f)){var d=f;0<c.wb&&((d=4<c.wb?d>>2:d>>1)>9-c.wb&&(d=9-c.wb)),1>d&&(d=1),l.dd=d,l.tc=2*f+d,l.ld=40<=f?2:15<=f?1:0}else l.tc=0;l.La=u}}}s=0}else Jt(t,6,"Frame setup failed"),s=t.a;if(s=0==s){if(s){t.$c=0,0<t.Aa||(t.Ic=zi);t:{s=t.Ic;c=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((l=c+832+(u=3*(16*s+Ri[t.L])/2*p)+(h=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=l)s=0;else{if(l>t.Vb){if(t.Vb=0,t.Ec=a(l),t.Fc=0,null==t.Ec){s=Jt(t,1,"no memory during frame initialization.");break t}t.Vb=l}l=t.Ec,f=t.Fc,t.Ac=l,t.Bc=f,f+=c,t.Gd=o(p,Ht),t.Hd=0,t.rb=o(g+1,Rt),t.sb=1,t.wa=m?o(m,Dt):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=l,t.pc=f,f+=832,t.ya=o(v,zt),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=l,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+=u,t.mb=h?l:null,t.nb=h?f:null,e(f+h<=t.Fc+t.Vb),$t(t),i(t.Ac,t.Bc,0,c),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,!Cn){for(s=-255;255>=s;++s)Pn[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)kn[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)In[255+s]=0>s?0:255<s?255:s;Cn=1}an=ue,on=ae,cn=oe,un=se,hn=ce,sn=ie,ln=Je,fn=Xe,dn=$e,pn=Qe,gn=Ke,mn=Ze,vn=tr,bn=er,yn=Ue,wn=He,Nn=We,Ln=Ve,fi[0]=xe,fi[1]=le,fi[2]=Le,fi[3]=Ae,fi[4]=Se,fi[5]=Pe,fi[6]=_e,fi[7]=ke,fi[8]=Ie,fi[9]=Fe,li[0]=ve,li[1]=de,li[2]=pe,li[3]=ge,li[4]=be,li[5]=ye,li[6]=we,di[0]=Be,di[1]=fe,di[2]=Ce,di[3]=je,di[4]=Me,di[5]=qe,di[6]=Ee,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],c=t.m,u=t;for(o=0;o<u.za;++o){var h=c,l=u,f=l.Ac,d=l.Bc+4*o,p=l.zc,g=l.ya[l.aa+o];if(l.Qa.Bb?g.$b=k(h,l.Pa.jb[0])?2+k(h,l.Pa.jb[2]):k(h,l.Pa.jb[1]):g.$b=0,l.kc&&(g.Ad=k(h,l.Bd)),g.Za=!k(h,145)+0,g.Za){var m=g.Ob,v=0;for(l=0;4>l;++l){var b,y=p[0+l];for(b=0;4>b;++b){y=ci[f[d+b]][y];for(var w=oi[k(h,y[0])];0<w;)w=oi[2*w+k(h,y[w])];y=-w,f[d+b]=y}n(m,v,f,d,4),v+=4,p[0+l]=y}}else y=k(h,156)?k(h,128)?1:3:k(h,163)?2:0,g.Ob[0]=y,i(f,d,y,4),i(p,0,y,4);g.Dd=k(h,142)?k(h,114)?k(h,183)?1:3:2:0}if(u.m.Ka)return Jt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(u=s,h=(c=t).rb[c.sb-1],f=c.rb[c.sb+c.ja],o=c.ya[c.aa+c.ja],d=c.kc?o.Ad:0)h.la=f.la=0,o.Za||(h.Na=f.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var N,L;h=f,f=u,d=c.Pa.Xc,p=c.ya[c.aa+c.ja],g=c.pb[p.$b];if(l=p.ad,m=0,v=c.rb[c.sb-1],y=b=0,i(l,m,0,384),p.Za)var A=0,x=d[3];else{w=a(16);var S=h.Na+v.Na;if(S=ni(f,d[1],S,g.Eb,0,w,0),h.Na=v.Na=(0<S)+0,1<S)an(w,0,l,m);else{var _=w[0]+3>>3;for(w=0;256>w;w+=16)l[m+w]=_}A=1,x=d[0]}var P=15&h.la,F=15&v.la;for(w=0;4>w;++w){var I=1&F;for(_=L=0;4>_;++_)P=P>>1|(I=(S=ni(f,x,S=I+(1&P),g.Sc,A,l,m))>A)<<7,L=L<<2|(3<S?3:1<S?2:0!=l[m+0]),m+=16;P>>=4,F=F>>1|I<<7,b=(b<<8|L)>>>0}for(x=P,A=F>>4,N=0;4>N;N+=2){for(L=0,P=h.la>>4+N,F=v.la>>4+N,w=0;2>w;++w){for(I=1&F,_=0;2>_;++_)S=I+(1&P),P=P>>1|(I=0<(S=ni(f,d[2],S,g.Qc,0,l,m)))<<3,L=L<<2|(3<S?3:1<S?2:0!=l[m+0]),m+=16;P>>=2,F=F>>1|I<<5}y|=L<<4*N,x|=P<<4<<N,A|=(240&F)<<N}h.la=x,v.la=A,p.Hc=b,p.Gc=y,p.ia=43690&y?0:g.ia,d=!(b|y)}if(0<c.L&&(c.wa[c.Y+c.ja]=c.gd[o.$b][o.Za],c.wa[c.Y+c.ja].La|=!d),u.Ka)return Jt(t,7,"Premature end-of-file encountered.")}if($t(t),c=r,u=1,o=(s=t).D,h=0<s.L&&s.M>=s.zb&&s.M<=s.Va,0==s.Aa)t:{if(o.M=s.M,o.uc=h,Or(s,o),u=1,o=(L=s.D).Nb,h=(y=Ri[s.L])*s.R,f=y/2*s.B,w=16*o*s.R,_=8*o*s.B,d=s.sa,p=s.ta-h+w,g=s.qa,l=s.ra-f+_,m=s.Ha,v=s.Ia-f+_,F=0==(P=L.M),b=P>=s.Va-1,2==s.Aa&&Or(s,L),L.uc)for(I=(S=s).D.M,e(S.D.uc),L=S.yb;L<S.Hb;++L){A=L,x=I;var C=(j=(z=S).D).Nb;N=z.R;var j=j.wa[j.Y+A],O=z.sa,B=z.ta+16*C*N+16*A,q=j.dd,M=j.tc;if(0!=M)if(e(3<=M),1==z.L)0<A&&wn(O,B,N,M+4),j.La&&Ln(O,B,N,M),0<x&&yn(O,B,N,M+4),j.La&&Nn(O,B,N,M);else{var E=z.B,D=z.qa,R=z.ra+8*C*E+8*A,T=z.Ha,z=z.Ia+8*C*E+8*A;C=j.ld;0<A&&(fn(O,B,N,M+4,q,C),pn(D,R,T,z,E,M+4,q,C)),j.La&&(mn(O,B,N,M,q,C),bn(D,R,T,z,E,M,q,C)),0<x&&(ln(O,B,N,M+4,q,C),dn(D,R,T,z,E,M+4,q,C)),j.La&&(gn(O,B,N,M,q,C),vn(D,R,T,z,E,M,q,C))}}if(s.ia&&alert("todo:DitherRow"),null!=c.put){if(L=16*P,P=16*(P+1),F?(c.y=s.sa,c.O=s.ta+w,c.f=s.qa,c.N=s.ra+_,c.ea=s.Ha,c.W=s.Ia+_):(L-=y,c.y=d,c.O=p,c.f=g,c.N=l,c.ea=m,c.W=v),b||(P-=y),P>c.o&&(P=c.o),c.F=null,c.J=null,null!=s.Fa&&0<s.Fa.length&&L<P&&(c.J=lr(s,c,L,P-L),c.F=s.mb,null==c.F&&0==c.F.length)){u=Jt(s,3,"Could not decode alpha data.");break t}L<c.j&&(y=c.j-L,L=c.j,e(!(1&y)),c.O+=s.R*y,c.N+=s.B*(y>>1),c.W+=s.B*(y>>1),null!=c.F&&(c.J+=c.width*y)),L<P&&(c.O+=c.v,c.N+=c.v>>1,c.W+=c.v>>1,null!=c.F&&(c.J+=c.v),c.ka=L-c.j,c.U=c.va-c.v,c.T=P-L,u=c.put(c))}o+1!=s.Ic||b||(n(s.sa,s.ta-h,d,p+16*s.R,h),n(s.qa,s.ra-f,g,l+8*s.B,f),n(s.Ha,s.Ia-f,m,v+8*s.B,f))}if(!u)return Jt(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 c=t[e+0]+t[e+8],u=t[e+0]-t[e+8],h=(35468*t[e+4]>>16)-re(t[e+12]),l=re(t[e+4])+(35468*t[e+12]>>16);s[o+0]=c+l,s[o+1]=u+h,s[o+2]=u-h,s[o+3]=c-l,o+=4,e++}for(i=o=0;4>i;++i)c=(t=s[o+0]+4)+s[o+8],u=t-s[o+8],h=(35468*s[o+4]>>16)-re(s[o+12]),te(r,n,0,0,c+(l=re(s[o+4])+(35468*s[o+12]>>16))),te(r,n,1,0,u+h),te(r,n,2,0,u-h),te(r,n,3,0,c-l),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 ce(t,e,r,n){t[e+0]&&un(t,e+0,r,n),t[e+16]&&un(t,e+16,r,n+4),t[e+32]&&un(t,e+32,r,n+128),t[e+48]&&un(t,e+48,r,n+128+4)}function ue(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],c=t[e+4+i]+t[e+8+i],u=t[e+4+i]-t[e+8+i],h=t[e+0+i]-t[e+12+i];o[0+i]=s+c,o[8+i]=s-c,o[4+i]=h+u,o[12+i]=h-u}for(i=0;4>i;++i)s=(t=o[0+4*i]+3)+o[3+4*i],c=o[1+4*i]+o[2+4*i],u=o[1+4*i]-o[2+4*i],h=t-o[3+4*i],r[n+0]=s+c>>3,r[n+16]=h+u>>3,r[n+32]=s-c>>3,r[n+48]=h-u>>3,n+=64}function he(t,e,r){var n,i=e-32,a=Bn,o=255-t[i-1];for(n=0;n<r;++n){var s,c=a,u=o+t[e-1];for(s=0;s<r;++s)t[e+s]=c[u+t[i+s]];e+=32}}function le(t,e){he(t,e,4)}function fe(t,e){he(t,e,8)}function de(t,e){he(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 Ne(t,e,r){return t+2*e+r+2>>2}function Le(t,e){var r,i=e-32;i=new Uint8Array([Ne(t[i-1],t[i+0],t[i+1]),Ne(t[i+0],t[i+1],t[i+2]),Ne(t[i+1],t[i+2],t[i+3]),Ne(t[i+2],t[i+3],t[i+4])]);for(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*Ne(t[e-1-32],r,n)),F(t,e+32,16843009*Ne(r,n,i)),F(t,e+64,16843009*Ne(n,i,a)),F(t,e+96,16843009*Ne(i,a,a))}function xe(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 Se(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],c=t[e+2-32],u=t[e+3-32];t[e+0+96]=Ne(n,i,t[e-1+96]),t[e+1+96]=t[e+0+64]=Ne(r,n,i),t[e+2+96]=t[e+1+64]=t[e+0+32]=Ne(a,r,n),t[e+3+96]=t[e+2+64]=t[e+1+32]=t[e+0+0]=Ne(o,a,r),t[e+3+64]=t[e+2+32]=t[e+1+0]=Ne(s,o,a),t[e+3+32]=t[e+2+0]=Ne(c,s,o),t[e+3+0]=Ne(u,c,s)}function _e(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],c=t[e+7-32];t[e+0+0]=Ne(t[e+0-32],r,n),t[e+1+0]=t[e+0+32]=Ne(r,n,i),t[e+2+0]=t[e+1+32]=t[e+0+64]=Ne(n,i,a),t[e+3+0]=t[e+2+32]=t[e+1+64]=t[e+0+96]=Ne(i,a,o),t[e+3+32]=t[e+2+64]=t[e+1+96]=Ne(a,o,s),t[e+3+64]=t[e+2+96]=Ne(o,s,c),t[e+3+96]=Ne(s,c,c)}function Pe(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],c=t[e+2-32],u=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+c+1>>1,t[e+3+0]=c+u+1>>1,t[e+0+96]=Ne(i,n,r),t[e+0+64]=Ne(n,r,a),t[e+0+32]=t[e+1+96]=Ne(r,a,o),t[e+1+32]=t[e+2+96]=Ne(a,o,s),t[e+2+32]=t[e+3+96]=Ne(o,s,c),t[e+3+32]=Ne(s,c,u)}function ke(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],c=t[e+6-32],u=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]=Ne(r,n,i),t[e+1+32]=t[e+0+96]=Ne(n,i,a),t[e+2+32]=t[e+1+96]=Ne(i,a,o),t[e+3+32]=t[e+2+96]=Ne(a,o,s),t[e+3+64]=Ne(o,s,c),t[e+3+96]=Ne(s,c,u)}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]=Ne(r,n,i),t[e+3+0]=t[e+1+32]=Ne(n,i,a),t[e+3+32]=t[e+1+64]=Ne(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 Ie(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],c=t[e+1-32],u=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]=Ne(s,c,u),t[e+2+0]=Ne(o,s,c),t[e+1+0]=t[e+3+32]=Ne(r,o,s),t[e+1+32]=t[e+3+64]=Ne(n,r,o),t[e+1+64]=t[e+3+96]=Ne(i,n,r),t[e+1+96]=Ne(a,i,n)}function Ce(t,e){var r;for(r=0;8>r;++r)n(t,e+32*r,t,e-32,8)}function je(t,e){var r;for(r=0;8>r;++r)i(t,e,t[e-1],8),e+=32}function Oe(t,e,r){var n;for(n=0;8>n;++n)i(e,r+32*n,t,8)}function Be(t,e){var r,n=8;for(r=0;8>r;++r)n+=t[e+r-32]+t[e-1+32*r];Oe(n>>4,t,e)}function qe(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e+r-32];Oe(n>>3,t,e)}function Me(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e-1+32*r];Oe(n>>3,t,e)}function Ee(t,e){Oe(128,t,e)}function De(t,e,r){var n=t[e-r],i=t[e+0],a=3*(i-n)+jn[1020+t[e-2*r]-t[e+r]],o=On[112+(a+4>>3)];t[e-r]=Bn[255+n+On[112+(a+3>>3)]],t[e+0]=Bn[255+i-o]}function Re(t,e,r,n){var i=t[e+0],a=t[e+r];return qn[255+t[e-2*r]-t[e-r]]>n||qn[255+a-i]>n}function Te(t,e,r,n){return 4*qn[255+t[e-r]-t[e+0]]+qn[255+t[e-2*r]-t[e+r]]<=n}function ze(t,e,r,n,i){var a=t[e-3*r],o=t[e-2*r],s=t[e-r],c=t[e+0],u=t[e+r],h=t[e+2*r],l=t[e+3*r];return 4*qn[255+s-c]+qn[255+o-u]>n?0:qn[255+t[e-4*r]-a]<=i&&qn[255+a-o]<=i&&qn[255+o-s]<=i&&qn[255+l-h]<=i&&qn[255+h-u]<=i&&qn[255+u-c]<=i}function Ue(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)Te(t,e+n,r,i)&&De(t,e+n,r)}function He(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)Te(t,e+n*r,1,i)&&De(t,e+n*r,1)}function We(t,e,r,n){var i;for(i=3;0<i;--i)Ue(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(ze(t,e,r,a,o))if(Re(t,e,r,s))De(t,e,r);else{var c=t,u=e,h=r,l=c[u-2*h],f=c[u-h],d=c[u+0],p=c[u+h],g=c[u+2*h],m=27*(b=jn[1020+3*(d-f)+jn[1020+l-p]])+63>>7,v=18*b+63>>7,b=9*b+63>>7;c[u-3*h]=Bn[255+c[u-3*h]+b],c[u-2*h]=Bn[255+l+v],c[u-h]=Bn[255+f+m],c[u+0]=Bn[255+d-m],c[u+h]=Bn[255+p-v],c[u+2*h]=Bn[255+g-b]}e+=n}}function Ye(t,e,r,n,i,a,o,s){for(a=2*a+1;0<i--;){if(ze(t,e,r,a,o))if(Re(t,e,r,s))De(t,e,r);else{var c=t,u=e,h=r,l=c[u-h],f=c[u+0],d=c[u+h],p=On[112+((g=3*(f-l))+4>>3)],g=On[112+(g+3>>3)],m=p+1>>1;c[u-2*h]=Bn[255+c[u-2*h]+m],c[u-h]=Bn[255+l+g],c[u+0]=Bn[255+f-p],c[u+h]=Bn[255+d-m]}e+=n}}function Je(t,e,r,n,i,a){Ge(t,e,r,1,16,n,i,a)}function Xe(t,e,r,n,i,a){Ge(t,e,1,r,16,n,i,a)}function Ke(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 Ze(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 $e(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 Qe(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 ct,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 q,this.vb=new q,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new d,this.yc=new l}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 N,this.Pb=0,this.wd=new N,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 cr(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 ur(t,e,r,n,i,a,o){var s;if(null==t)cr(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 hr(t,e,r,n,i,a,o){if(null==t)cr(null,null,r,n,i,a,o);else{var s,c=t[e+0],u=c,h=c;for(s=0;s<o;++s)u=h+(c=t[e+s])-u,h=r[n+s]+(-256&u?0>u?0:255:u)&255,u=c,i[a+s]=h}}function lr(t,r,i,o){var s=r.width,c=r.o;if(e(null!=t&&null!=r),0>i||0>=o||i+o>c)return null;if(!t.Cc){if(null==t.ga){var u;if(t.ga=new sr,(u=null==t.ga)||(u=r.width*r.o,e(0==t.Gb.length),t.Gb=a(u),t.Uc=0,null==t.Gb?u=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,u=1),u=!u),!u){u=t.ga;var h=t.Fa,l=t.P,f=t.qc,d=t.mb,p=t.nb,g=l+1,m=f-1,b=u.l;if(e(null!=h&&null!=d&&null!=r),mi[0]=null,mi[1]=cr,mi[2]=ur,mi[3]=hr,u.ca=d,u.tb=p,u.c=r.width,u.i=r.height,e(0<u.c&&0<u.i),1>=f)r=0;else if(u.$a=h[l+0]>>0&3,u.Z=h[l+0]>>2&3,u.Lc=h[l+0]>>4&3,l=h[l+0]>>6&3,0>u.$a||1<u.$a||4<=u.Z||1<u.Lc||l)r=0;else if(b.put=dt,b.ac=ft,b.bc=pt,b.ma=u,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,u.$a)t:{e(1==u.$a),r=kt();e:for(;;){if(null==r){r=0;break t}if(e(null!=u),u.mc=r,r.c=u.c,r.i=u.i,r.l=u.l,r.l.ma=u,r.l.width=u.c,r.l.height=u.i,r.a=0,v(r.m,h,g,m),!Ft(u.c,u.i,1,r,null))break e;if(1==r.ab&&3==r.gc[0].hc&&At(r.s)?(u.ic=1,h=r.c*r.i,r.Ta=null,r.Ua=0,r.V=a(h),r.Ba=0,null==r.V?(r.a=1,r=0):r=1):(u.ic=0,r=It(r,u.c)),!r)break e;r=1;break t}u.mc=null,r=0}else r=m>=u.c*u.i;u=!r}if(u)return null;1!=t.ga.Lc?t.Ga=0:o=c-i}e(null!=t.ga),e(i+o<=c);t:{if(r=(h=t.ga).c,c=h.l.o,0==h.$a){if(g=t.rc,m=t.Vc,b=t.Fa,l=t.P+1+i*r,f=t.mb,d=t.nb+i*r,e(l<=t.P+t.qc),0!=h.Z)for(e(null!=mi[h.Z]),u=0;u<o;++u)mi[h.Z](g,m,b,l,f,d,r),g=f,m=d,d+=r,l+=r;else for(u=0;u<o;++u)n(f,d,b,l,r),g=f,m=d,d+=r,l+=r;t.rc=g,t.Vc=m}else{if(e(null!=h.mc),r=i+o,e(null!=(u=h.mc)),e(r<=u.i),u.C>=r)r=1;else if(h.ic||mr(),h.ic){h=u.V,g=u.Ba,m=u.c;var y=u.i,w=(b=1,l=u.$/m,f=u.$%m,d=u.m,p=u.s,u.$),N=m*y,L=m*r,x=p.wc,_=w<L?wt(p,f,l):null;e(w<=N),e(r<=y),e(At(p));e:for(;;){for(;!d.h&&w<L;){if(f&x||(_=wt(p,f,l)),e(null!=_),S(d),256>(y=bt(_.G[0],_.H[0],d)))h[g+w]=y,++w,++f>=m&&(f=0,++l<=r&&!(l%16)&&St(u,l));else{if(!(280>y)){b=0;break e}y=mt(y-256,d);var P,k=bt(_.G[4],_.H[4],d);if(S(d),!(w>=(k=vt(m,k=mt(k,d)))&&N-w>=y)){b=0;break e}for(P=0;P<y;++P)h[g+w+P]=h[g+w+P-k];for(w+=y,f+=y;f>=m;)f-=m,++l<=r&&!(l%16)&&St(u,l);w<L&&f&x&&(_=wt(p,f,l))}e(d.h==A(d))}St(u,l>r?r:l);break e}!b||d.h&&w<N?(b=0,u.a=d.h?5:3):u.$=w,r=b}else r=_t(u,u.V,u.Ba,u.c,u.i,r,Ct);if(!r){o=0;break t}}i+o>=c&&(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,c=e+(r?1:0),u=t,h=e+(r?0:3);for(o=0;o<n;++o){var l=u[h+4*o];255!=l&&(l*=32897,s[c+4*o+0]=s[c+4*o+0]*l>>23,s[c+4*o+1]=s[c+4*o+1]*l>>23,s[c+4*o+2]=s[c+4*o+2]*l>>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&(u=t[e+2*a+1]),c=4369*s,u=(240&u|u>>4)*c>>16;t[e+2*a+0]=(240&o|o>>4)*c>>16&240|(15&o|o<<4)*c>>16>>4&15,t[e+2*a+1]=240&u|s}e+=i}}function pr(t,e,r,n,i,a,o,s){var c,u,h=255;for(u=0;u<i;++u){for(c=0;c<n;++c){var l=t[e+c];a[o+4*c]=l,h&=l}e+=r,o+=s}return 255!=h}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,xn=dr,Sn=pr,_n=gr}function vr(r,n,i){t[r]=function(t,r,a,o,s,c,u,h,l,f,d,p,g,m,v,b,y){var w,N=y-1>>1,L=s[c+0]|u[h+0]<<16,A=l[f+0]|d[p+0]<<16;e(null!=t);var x=3*L+A+131074>>2;for(n(t[r+0],255&x,x>>16,g,m),null!=a&&(x=3*A+L+131074>>2,n(a[o+0],255&x,x>>16,v,b)),w=1;w<=N;++w){var S=s[c+w]|u[h+w]<<16,_=l[f+w]|d[p+w]<<16,P=L+S+A+_+524296,k=P+2*(S+A)>>3;x=k+L>>1,L=(P=P+2*(L+_)>>3)+S>>1,n(t[r+2*w-1],255&x,x>>16,g,m+(2*w-1)*i),n(t[r+2*w-0],255&L,L>>16,g,m+(2*w-0)*i),null!=a&&(x=P+A>>1,L=k+_>>1,n(a[o+2*w-1],255&x,x>>16,v,b+(2*w-1)*i),n(a[o+2*w+0],255&L,L>>16,v,b+(2*w+0)*i)),L=S,A=_}1&y||(x=3*L+A+131074>>2,n(t[r+y-1],255&x,x>>16,g,m+(y-1)*i),null!=a&&(x=3*A+L+131074>>2,n(a[o+y-1],255&x,x>>16,v,b+(y-1)*i)))}}function br(){vi[Mn]=bi,vi[En]=wi,vi[Dn]=yi,vi[Rn]=Ni,vi[Tn]=Li,vi[zn]=Ai,vi[Un]=xi,vi[Hn]=wi,vi[Wn]=Ni,vi[Vn]=Li,vi[Gn]=Ai}function yr(t){return t&~Ii?0>t?0:255:t>>Fi}function wr(t,e){return yr((19077*t>>8)+(26149*e>>8)-14234)}function Nr(t,e,r){return yr((19077*t>>8)-(6419*e>>8)-(13320*r>>8)+8708)}function Lr(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]=Nr(t,e,r),n[i+2]=Lr(t,e)}function xr(t,e,r,n,i){n[i+0]=Lr(t,e),n[i+1]=Nr(t,e,r),n[i+2]=wr(t,r)}function Sr(t,e,r,n,i){var a=Nr(t,e,r);e=a<<3&224|Lr(t,e)>>3,n[i+0]=248&wr(t,r)|a>>5,n[i+1]=e}function _r(t,e,r,n,i){var a=240&Lr(t,e)|15;n[i+0]=240&wr(t,r)|Nr(t,e,r)>>4,n[i+1]=a}function Pr(t,e,r,n,i){n[i+0]=255,Ar(t,e,r,n,i+1)}function kr(t,e,r,n,i){xr(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 Ir(e,r,n){t[e]=function(t,e,i,a,o,s,c,u,h){for(var l=u+(-2&h)*n;u!=l;)r(t[e+0],i[a+0],o[s+0],c,u),r(t[e+1],i[a+0],o[s+0],c,u+n),e+=2,++a,++s,u+=2*n;1&h&&r(t[e+0],i[a+0],o[s+0],c,u)}}function Cr(t,e,r){return 0==r?0==t?0==e?6:5:0==e?4:0:r}function jr(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:un(e,r,n,i)}}function Or(t,e){var r,a,o=e.M,s=e.Nb,c=t.oc,u=t.pc+40,h=t.oc,l=t.pc+584,f=t.oc,d=t.pc+600;for(r=0;16>r;++r)c[u+32*r-1]=129;for(r=0;8>r;++r)h[l+32*r-1]=129,f[d+32*r-1]=129;for(0<o?c[u-1-32]=h[l-1-32]=f[d-1-32]=129:(i(c,u-32-1,127,21),i(h,l-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(c,u+32*r-4,c,u+32*r+12,4);for(r=-1;8>r;++r)n(h,l+32*r-4,h,l+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(c,u-32,g[m].y,0,16),n(h,l-32,g[m].f,0,8),n(f,d-32,g[m].ea,0,8)),p.Za){var y=c,w=u-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=c,w=u+Di[r],fi[p.Ob[r]](y,w),jr(b,v,16*+r,y,w)}else if(y=Cr(a,o,p.Ob[0]),li[y](c,u),0!=b)for(r=0;16>r;++r,b<<=2)jr(b,v,16*+r,c,u+Di[r]);for(r=p.Gc,y=Cr(a,o,p.Dd),di[y](h,l),di[y](f,d),b=v,y=h,w=l,255&(p=r>>0)&&(170&p?cn(b,256,y,w):hn(b,256,y,w)),p=f,b=d,255&(r>>=8)&&(170&r?cn(v,320,p,b):hn(v,320,p,b)),o<t.Ub-1&&(n(g[m].y,0,c,u+480,16),n(g[m].f,0,h,l+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,c,u+32*r,16);for(r=0;8>r;++r)n(v,p+r*t.B,h,l+32*r,8),n(b,y+r*t.B,f,d+32*r,8)}}function Br(t,n,i,a,o,s,c,u,h){var l=[0],f=[0],d=0,p=null!=h?h.kd:0,g=null!=h?h: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=j(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 L=t;b=n,y=i;var A=l,x=f,S=m=[0];if((k=d=[d])[0]=0,8>y[0])y=7;else{if(!r(L,b[0],"VP8X")){if(10!=j(L,b[0]+4)){y=3;break t}if(18>y[0]){y=7;break t}var _=j(L,b[0]+8),P=1+C(L,b[0]+12);if(2147483648<=P*(L=1+C(L,b[0]+15))){y=3;break t}null!=S&&(S[0]=_),null!=A&&(A[0]=P),null!=x&&(x[0]=L),b[0]+=18,y[0]-=18,k[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!=c&&(c[0]=b),null!=u&&(u[0]=0),c=l[0],m=f[0],d&&b&&null==h){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:{_=t,y=n,w=i;var k=g.gb;A=g.na,x=g.P,S=g.Sa;P=22,e(null!=_),e(null!=w),L=y[0];var F=w[0];for(e(null!=A),e(null!=S),A[0]=null,x[0]=null,S[0]=0;;){if(y[0]=L,w[0]=F,8>F){y=7;break t}var I=j(_,L+4);if(4294967286<I){y=3;break t}var O=8+I+1&-2;if(P+=O,0<k&&P>k){y=3;break t}if(!r(_,L,"VP8 ")||!r(_,L,"VP8L")){y=0;break t}if(F[0]<O){y=7;break t}r(_,L,"ALPH")||(A[0]=_,x[0]=L+8,S[0]=I),L+=O,F-=O}}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(k=t,y=n,w=i,A=g.gb[0],x=g.Ja,S=g.xa,_=y[0],L=!r(k,_,"VP8 "),P=!r(k,_,"VP8L"),e(null!=k),e(null!=w),e(null!=x),e(null!=S),8>w[0])y=7;else{if(L||P){if(k=j(k,_+4),12<=A&&k>A-12){y=3;break t}if(p&&k>w[0]-8){y=7;break t}x[0]=k,y[0]+=8,w[0]-=8,S[0]=P}else S[0]=5<=w[0]&&47==k[_+0]&&!(k[_+4]>>5),x[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==u||b||(u[0]=g.xa?2:1),c=[c],m=[m],g.xa){if(5>i){y=7;break}u=c,p=m,b=s,null==t||5>i?t=0:5<=i&&47==t[n+0]&&!(t[n+4]>>5)?(w=[0],k=[0],A=[0],v(x=new N,t,n,i),gt(x,w,k,A)?(null!=u&&(u[0]=w[0]),null!=p&&(p[0]=k[0]),null!=b&&(b[0]=A[0]),t=1):t=0):t=0}else{if(10>i){y=7;break}u=m,null==t||10>i||!Xt(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:(c&&(c[0]=b),u&&(u[0]=t),t=1))}if(!t)return 3;if(c=c[0],m=m[0],d&&(l[0]!=c||f[0]!=m))return 3;null!=h&&(h[0]=g,h.offset=n-h.w,e(4294967286>n-h.w),e(h.offset==h.ha-i));break}return 0==y||7==y&&d&&null==h?(null!=s&&(s[0]|=null!=g.na&&0<g.na.length),null!=a&&(a[0]=c),null!=o&&(o[0]=m),0):y}function qr(t,e,r){var n=e.width,i=e.height,a=0,o=0,s=n,c=i;if(e.Da=null!=t&&0<t.Da,e.Da&&(s=t.cd,c=t.bd,a=t.v,o=t.j,11>r||(a&=-2,o&=-2),0>a||0>o||0>=s||0>=c||a+s>n||o+c>i))return 0;if(e.v=a,e.j=o,e.va=a+s,e.o=o+c,e.U=s,e.T=c,e.da=null!=t&&0<t.da,e.da){if(!M(s,c,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 Mr(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 Er(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,c=-2&r.j;if(0>s||0>c||0>=i||0>=o||s+i>t||c+o>e)return 2;t=i,e=o}if(r.da){if(!M(t,e,i=[r.ib],o=[r.hb]))return 2;t=i[0],e=o[0]}}n.width=t,n.height=e;t:{var u=n.width,h=n.height;if(t=n.S,0>=u||0>=h||!(t>=Mn&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){s=o=i=e=0;var l=(c=u*Ui[t])*h;if(11>t||(o=(h+1)/2*(e=(u+1)/2),12==t&&(s=(i=u)*h)),null==(h=a(l+2*o+s))){t=1;break t}n.sd=h,11>t?((u=n.f.RGBA).eb=h,u.fb=0,u.A=c,u.size=l):((u=n.f.kb).y=h,u.O=0,u.fa=c,u.Fd=l,u.f=h,u.N=0+l,u.Ab=e,u.Cd=o,u.ea=h,u.W=0+l+o,u.Db=e,u.Ed=o,12==t&&(u.F=h,u.J=0+l+2*o),u.Tc=s,u.lb=i)}if(e=1,i=n.S,o=n.width,s=n.height,i>=Mn&&13>i)if(11>i)t=n.f.RGBA,e&=(c=Math.abs(t.A))*(s-1)+o<=t.size,e&=c>=o*Ui[i],e&=null!=t.eb;else{t=n.f.kb,c=(o+1)/2,l=(s+1)/2,u=Math.abs(t.fa);h=Math.abs(t.Ab);var f=Math.abs(t.Db),d=Math.abs(t.lb),p=d*(s-1)+o;e&=u*(s-1)+o<=t.Fd,e&=h*(l-1)+c<=t.Cd,e=(e&=f*(l-1)+c<=t.Ed)&u>=o&h>=c&f>=c,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=Mr(n)),t}var Dr=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],Tr=24,zr=32,Ur=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 z(z(t,e[r+1]),e[r+0])},t.Predictor6=function(t,e,r){return z(t,e[r-1])},t.Predictor7=function(t,e,r){return z(t,e[r+0])},t.Predictor8=function(t,e,r){return z(e[r-1],e[r+0])},t.Predictor9=function(t,e,r){return z(e[r+0],e[r+1])},t.Predictor10=function(t,e,r){return z(z(t,e[r-1]),z(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(U((t>>24&255)+(n>>24&255)-((e=e[r-1])>>24&255))<<24|U((t>>16&255)+(n>>16&255)-(e>>16&255))<<16|U((t>>8&255)+(n>>8&255)-(e>>8&255))<<8|U((255&t)+(255&n)-(255&e)))>>>0},t.Predictor13=function(t,e,r){var n=e[r-1];return(H((t=z(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(t>>0&255,n>>0&255))>>>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;X("ColorIndexInverseTransform","MapARGB","32b",(function(t){return t>>8&255}),(function(t){return t})),X("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(t){return t}),(function(t){return t>>8&255}));var Gr,Yr=t.ColorIndexInverseTransform,Jr=t.MapARGB,Xr=t.VP8LColorIndexInverseTransformAlpha,Kr=t.MapAlpha,Zr=t.VP8LPredictorsAdd=[];Zr.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var $r,Qr,tn,en,rn,nn,an,on,sn,cn,un,hn,ln,fn,dn,pn,gn,mn,vn,bn,yn,wn,Nn,Ln,An,xn,Sn,_n,Pn=a(511),kn=a(2041),Fn=a(225),In=a(767),Cn=0,jn=kn,On=Fn,Bn=In,qn=Pn,Mn=0,En=1,Dn=2,Rn=3,Tn=4,zn=5,Un=6,Hn=7,Wn=8,Vn=9,Gn=10,Yn=[2,3,7],Jn=[3,3,11],Xn=[280,256,256,256,40],Kn=[0,1,1,1,0],Zn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],$n=[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],Qn=[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]]]],ci=[[[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]]],ui=[[[[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]]]],hi=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],li=[],fi=[],di=[],pi=1,gi=2,mi=[],vi=[];vr("UpsampleRgbLinePair",Ar,3),vr("UpsampleBgrLinePair",xr,3),vr("UpsampleRgbaLinePair",Fr,4),vr("UpsampleBgraLinePair",kr,4),vr("UpsampleArgbLinePair",Pr,4),vr("UpsampleRgba4444LinePair",_r,2),vr("UpsampleRgb565LinePair",Sr,2);var bi=t.UpsampleRgbLinePair,yi=t.UpsampleBgrLinePair,wi=t.UpsampleRgbaLinePair,Ni=t.UpsampleBgraLinePair,Li=t.UpsampleArgbLinePair,Ai=t.UpsampleRgba4444LinePair,xi=t.UpsampleRgb565LinePair,Si=16,_i=1<<Si-1,Pi=-227,ki=482,Fi=6,Ii=(256<<Fi)-1,Ci=0,ji=a(256),Oi=a(256),Bi=a(256),qi=a(256),Mi=a(ki-Pi),Ei=a(ki-Pi);Ir("YuvToRgbRow",Ar,3),Ir("YuvToBgrRow",xr,3),Ir("YuvToRgbaRow",Fr,4),Ir("YuvToBgraRow",kr,4),Ir("YuvToArgbRow",Pr,4),Ir("YuvToRgba4444Row",_r,2),Ir("YuvToRgb565Row",Sr,2);var Di=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ri=[0,2,8],Ti=[8,7,6,4,4,2,2,2,1,1,1,1],zi=1;this.WebPDecodeRGBA=function(t,r,n,i,a){var o=En,s=new rr,c=new ot;s.ba=c,c.S=o,c.width=[c.width],c.height=[c.height];var u=c.width,h=c.height,l=new st;if(null==l||null==t)var f=2;else e(null!=l),f=Br(t,r,n,l.width,l.height,l.Pd,l.Qd,l.format,null);if(0!=f?u=0:(null!=u&&(u[0]=l.width[0]),null!=h&&(h[0]=l.height[0]),u=1),u){c.width=c.width[0],c.height=c.height[0],null!=i&&(i[0]=c.width),null!=a&&(a[0]=c.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=Br(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=kt())){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=Er(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),!qr(a.Oa,n,Rn)){i.a=2;break r}if(!It(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&&!O(i.s.vb,i.s.Wa.Xa)){i.a=1;break r}i.xb=0}if(!_t(i,i.V,i.Ba,i.c,i.i,n.o,Lt))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,Kt(t,i)){if(0==(r=Er(i.width,i.height,s.Oa,s.ba))){if(t.Aa=0,n=s.Oa,e(null!=(a=t)),null!=n){if(0<(u=0>(u=n.Md)?0:100<u?255:255*u/100)){for(h=l=0;4>h;++h)12>(f=a.pb[h]).lc&&(f.ia=u*Ti[0>f.lc?0:f.lc]>>3),l|=f.ia;l&&(alert("todo:VP8InitRandom"),a.ia=1)}a.Ga=n.Id,100<a.Ga?a.Ga=100:0>a.Ga&&(a.Ga=0)}Qt(t,i)||(r=t.a)}}else r=t.a}0==r&&null!=s.Oa&&s.Oa.fd&&(r=Mr(s.ba))}s=r}o=0!=s?null:11>o?c.f.RGBA.eb:c.f.kb.y}else o=null;return o};var Ui=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(t,e){for(var r="",n=0;n<4;n++)r+=String.fromCharCode(t[e++]);return r}function h(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16)>>>0}function l(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}new c;var f=[0],d=[0],p=[],g=new c,m=t,v=function(t,e){var r={},n=0,i=!1,a=0,o=0;if(r.frames=[],!
+/** @license
+   * Copyright (c) 2017 Dominik Homberger
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+https://webpjs.appspot.com
+WebPRiffParser dominikhlbg@gmail.com
+*/
+function(t,e,r,n){for(var i=0;i<n;i++)if(t[e+i]!=r.charCodeAt(i))return!0;return!1}(t,e,"RIFF",4)){var s,c;l(t,e+=4);for(e+=8;e<t.length;){var f=u(t,e),d=l(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+h(t,g);g+=3;v.canvas_height=1+h(t,g);g+=3;break;case"ALPH":i=!0,a=p+8,o=e-8;break;case"ANIM":(v=r.header).bgcolor=l(t,e);g=e+4;v.loop_count=(s=t)[(c=g)+0]<<0|s[c+1]<<8;g+=2;break;case"ANMF":var m,v;(v=r.frames[n]={}).offset_x=2*h(t,e),e+=3,v.offset_y=2*h(t,e),e+=3,v.width=1+h(t,e),e+=3,v.height=1+h(t,e),e+=3,v.duration=h(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 N=y[0],L=g.WebPDecodeRGBA(m,N.src_off,N.src_size,d,f);N.rgba=L,N.imgwidth=d[0],N.imgheight=f[0];for(var A=0;A<d[0]*f[0]*4;A++)p[A]=L[A];return this.width=d,this.height=f,this.data=p,this}!function(t){var e=function(){return"function"==typeof r.zlibSync},n=function(e,n,a,h){var l=4,f=s;switch(h){case t.image_compression.FAST:l=1,f=o;break;case t.image_compression.MEDIUM:l=6,f=c;break;case t.image_compression.SLOW:l=9,f=u}e=i(e,n,a,f);var d=r.zlibSync(e,{level:l});return t.__addimage__.arrayBufferToBinaryString(d)},i=function(t,e,r,n){for(var i,a,o,s=t.length/e,c=new Uint8Array(t.length+s),u=l(),h=0;h<s;h+=1){if(o=h*e,i=t.subarray(o,o+e),n)c.set(n(i,r,a),o+h);else{for(var d,p=u.length,g=[];d<p;d+=1)g[d]=u[d](i,r,a);var m=f(g.concat());c.set(g[m],o+h)}a=i}return c},a=function(t){var e=Array.apply([],t);return e.unshift(0),e},o=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},s=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},c=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},u=function(t,e,r){var n,i,a,o,s=[],c=t.length;s[0]=4;for(var u=0;u<c;u+=1)n=t[u-e]||0,i=r&&r[u]||0,a=r&&r[u-e]||0,o=h(n,i,a),s[u+1]=t[u]-o+256&255;return s},h=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[a,o,s,c,u]},f=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,i,a,o){var s,c,u,h,l,f,d,p,g,m,v,b,y,w,N,L=this.decode.FLATE_DECODE,A="";if(this.__addimage__.isArrayBuffer(r)&&(r=new Uint8Array(r)),this.__addimage__.isArrayBufferView(r)){if(r=(u=new Wt(r)).imgData,c=u.bits,s=u.colorSpace,l=u.colors,-1!==[4,6].indexOf(u.colorType)){if(8===u.bits){g=(p=32==u.pixelBitlength?new Uint32Array(u.decodePixels().buffer):16==u.pixelBitlength?new Uint16Array(u.decodePixels().buffer):new Uint8Array(u.decodePixels().buffer)).length,v=new Uint8Array(g*u.colors),m=new Uint8Array(g);var x,S=u.pixelBitlength-u.bits;for(w=0,N=0;w<g;w++){for(y=p[w],x=0;x<S;)v[N++]=y>>>x&255,x+=u.bits;m[w]=y>>>x&255}}if(16===u.bits){g=(p=new Uint32Array(u.decodePixels().buffer)).length,v=new Uint8Array(g*(32/u.pixelBitlength)*u.colors),m=new Uint8Array(g*(32/u.pixelBitlength)),b=u.colors>1,w=0,N=0;for(var _=0;w<g;)y=p[w++],v[N++]=y>>>0&255,b&&(v[N++]=y>>>16&255,y=p[w++],v[N++]=y>>>0&255),m[_++]=y>>>16&255;c=8}o!==t.image_compression.NONE&&e()?(r=n(v,u.width*u.colors,u.colors,o),d=n(m,u.width,1,o)):(r=v,d=m,L=void 0)}if(3===u.colorType&&(s=this.color_spaces.INDEXED,f=u.palette,u.transparency.indexed)){var P=u.transparency.indexed,k=0;for(w=0,g=P.length;w<g;++w)k+=P[w];if((k/=255)===g-1&&-1!==P.indexOf(0))h=[P.indexOf(0)];else if(k!==g){for(p=u.decodePixels(),m=new Uint8Array(p.length),w=0,g=p.length;w<g;w++)m[w]=P[p[w]];d=n(m,u.width,1)}}var F=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}(o);return L===this.decode.FLATE_DECODE&&(A="/Predictor "+F+" "),A+="/Colors "+l+" /BitsPerComponent "+c+" /Columns "+u.width,(this.__addimage__.isArrayBuffer(r)||this.__addimage__.isArrayBufferView(r))&&(r=this.__addimage__.arrayBufferToBinaryString(r)),(d&&this.__addimage__.isArrayBuffer(d)||this.__addimage__.isArrayBufferView(d))&&(d=this.__addimage__.arrayBufferToBinaryString(d)),{alias:a,data:r,index:i,filter:L,decodeParameters:A,transparency:h,palette:f,sMask:d,predictor:F,width:u.width,height:u.height,bitsPerComponent:c,colorSpace:s}}}}(I.API),function(t){t.processGIF89A=function(e,r,n,i){var a=new Vt(e),o=a.width,s=a.height,c=[];a.decodeAndBlitFrameRGBA(0,c);var u={data:c,width:o,height:s},h=new Yt(100).encode(u,100);return t.processJPEG.call(this,h,r,n,i)},t.processGIF87A=t.processGIF89A}(I.API),Jt.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)},Jt.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){o.log("bit decode error:"+t)}},Jt.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 c=this.palette[a>>7-s&1];this.data[o+4*s]=c.blue,this.data[o+4*s+1]=c.green,this.data[o+4*s+2]=c.red,this.data[o+4*s+3]=255}0!==r&&(this.pos+=4-r)}},Jt.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,c=15&a,u=this.palette[s];if(this.data[o]=u.blue,this.data[o+1]=u.green,this.data[o+2]=u.red,this.data[o+3]=255,2*i+1>=this.width)break;u=this.palette[c],this.data[o+4]=u.blue,this.data[o+4+1]=u.green,this.data[o+4+2]=u.red,this.data[o+4+3]=255}0!==e&&(this.pos+=4-e)}},Jt.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)}},Jt.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,c=(a>>10&e)/e*255|0,u=a>>15?255:0,h=n*this.width*4+4*i;this.data[h]=c,this.data[h+1]=s,this.data[h+2]=o,this.data[h+3]=u}this.pos+=t}},Jt.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,c=(o>>5&r)/r*255|0,u=(o>>11)/e*255|0,h=i*this.width*4+4*a;this.data[h]=u,this.data[h+1]=c,this.data[h+2]=s,this.data[h+3]=255}this.pos+=t}},Jt.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}},Jt.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}},Jt.prototype.getData=function(){return this.data},
+/**
+ * @license
+ * Copyright (c) 2018 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){t.processBMP=function(e,r,n,i){var a=new Jt(e,!1),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},u=new Yt(100).encode(c,100);return t.processJPEG.call(this,u,r,n,i)}}(I.API),Xt.prototype.getData=function(){return this.data},
+/**
+ * @license
+ * Copyright (c) 2019 Aras Abbasi
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(t){t.processWEBP=function(e,r,n,i){var a=new Xt(e,!1),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},u=new Yt(100).encode(c,100);return t.processJPEG.call(this,u,r,n,i)}}(I.API),I.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,c=0,u=0;u<i;u+=4){var h=n[u],l=n[u+1],f=n[u+2],d=n[u+3];a[s++]=h,a[s++]=l,a[s++]=f,o[c++]=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}},I.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},
+/** @license
+ * MIT license.
+ * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+Rt=I.API,Tt=Rt.getCharWidthsArray=function(t,e){var r,n,i=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),o=e.charSpace||this.internal.getCharSpace(),s=e.widths?e.widths:i.metadata.Unicode.widths,c=s.fof?s.fof:1,u=e.kerning?e.kerning:i.metadata.Unicode.kerning,h=u.fof?u.fof:1,l=!1!==e.doKerning,f=0,d=t.length,p=0,g=s[0]||c,m=[];for(r=0;r<d;r++)n=t.charCodeAt(r),"function"==typeof i.metadata.widthOfString?m.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+o*(1e3/a)||0)/1e3):(f=l&&"object"==typeof u[n]&&!isNaN(parseInt(u[n][p],10))?u[n][p]/h:0,m.push((s[n]||g)/c+f)),p=n;return m},zt=Rt.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 Rt.processArabic&&(t=Rt.processArabic(t)),"function"==typeof n.metadata.widthOfString?n.metadata.widthOfString(t,r,i)/r:Tt.apply(this,arguments).reduce((function(t,e){return t+e}),0)},Ut=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 c=a;for(s=0;a!==o;)s+e[a]>n&&(i.push(t.slice(c,a)),s=0,c=a),s+=e[a],a++;return c!==a&&i.push(t.slice(c,a)),i},Ht=function(t,e,r){r||(r={});var n,i,a,o,s,c,u,h=[],l=[h],f=r.textIndent||0,d=0,p=0,g=t.split(" "),m=Tt.apply(this,[" ",r])[0];if(c=-1===r.lineIndent?g[0].length+2:r.lineIndent||0){var v=Array(c).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,c=zt.apply(this,[v,r])}for(a=0,o=g.length;a<o;a++){var y=0;if(n=g[a],c&&"\n"==n[0]&&(n=n.substr(1),y=1),f+d+(p=(i=Tt.apply(this,[n,r])).reduce((function(t,e){return t+e}),0))>e||y){if(p>e){for(s=Ut.apply(this,[n,i,e-(f+d),e]),h.push(s.shift()),h=[s.pop()];s.length;)l.push([s.shift()]);p=i.slice(n.length-(h[0]?h[0].length:0)).reduce((function(t,e){return t+e}),0)}else h=[n];l.push(h),f=p+c,d=m}else h.push(n),f+=d+p,d=m}return u=c?function(t,e){return(e?v:"")+t.join(" ")}:function(t){return t.join(" ")},l.map(u)},Rt.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,c,u=[];for(s=0,c=n.length;s<c;s++)u=u.concat(Ht.apply(this,[n[s],o,a]));return u},
+/** @license
+ jsPDF standard_fonts_metrics plugin
+ * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
+ * MIT license.
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="klmnopqrstuvwxyz",r={},n={},i=0;i<e.length;i++)r[e[i]]="0123456789abcdef"[i],n["0123456789abcdef"[i]]=e[i];var a=function(t){return"0x"+parseInt(t,10).toString(16)},o=t.__fontmetrics__.compress=function(t){var e,r,i,s,c=["{"];for(var u in t){if(e=t[u],isNaN(parseInt(u,10))?r="'"+u+"'":(u=parseInt(u,10),r=(r=a(u).slice(2)).slice(0,-1)+n[r.slice(-1)]),"number"==typeof e)e<0?(i=a(e).slice(3),s="-"):(i=a(e).slice(2),s=""),i=s+i.slice(0,-1)+n[i.slice(-1)];else{if("object"!=typeof e)throw new Error("Don't know what to do with value type "+typeof e+".");i=o(e)}c.push(r+i)}return c.push("}"),c.join("")},s=t.__fontmetrics__.uncompress=function(t){if("string"!=typeof t)throw new Error("Invalid argument passed to uncompress.");for(var e,n,i,a,o={},s=1,c=o,u=[],h="",l="",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?(u.push([c,i]),c={},i=void 0):"}"==a?((n=u.pop())[0][n[1]]=c,i=void 0,c=n[0]):"-"==a?s=-1:void 0===i?r.hasOwnProperty(a)?(h+=r[a],i=parseInt(h,16)*s,s=1,h=""):h+=a:r.hasOwnProperty(a)?(l+=r[a],c[i]=parseInt(l,16)*s,s=1,i=void 0,l=""):l+=a;return o},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:s("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},u={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},h={Unicode:{"Courier-Oblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":s("{'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":s("{'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:s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":s("{'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:s("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r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o{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":s("{'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:s("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":s("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2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ru17su5tu}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":s("{'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":s("{'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}}}")}};t.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=u.Unicode[e.postScriptName];n&&(e.metadata.Unicode.encoding=n,e.encoding=n.codePages[0])}])}(I.API),
+/**
+ * @license
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+function(e){var r=function(t){for(var e=t.length,r=new Uint8Array(e),n=0;n<e;n++)r[n]=t.charCodeAt(n);return r};e.API.events.push(["addFont",function(n){var i=void 0,a=n.font,o=n.instance;if(!a.isStandardFont){if(void 0===o)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if("string"!=typeof(i=!1===o.existsFileInVFS(a.postScriptName)?o.loadFile(a.postScriptName):o.getFileFromVFS(a.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");!function(n,i){i=/^\x00\x01\x00\x00/.test(i)?r(i):r(t(i)),n.metadata=e.API.TTFFont.open(i),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0]}(a,i)}}])}(I),
+/** @license
+ * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+function(t){function e(){return(n.canvg?Promise.resolve(n.canvg):"object"==typeof exports&&"undefined"!=typeof module?new Promise((function(t,e){try{t(require("canvg"))}catch(t){e(t)}})):"function"==typeof define&&define.amd?new Promise((function(t,e){try{require(["canvg"],t)}catch(t){e(t)}})):Promise.reject(new Error("Could not load canvg"))).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}I.API.addSvgAsImage=function(t,r,n,i,a,s,c,u){if(isNaN(r)||isNaN(n))throw o.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(i)||isNaN(a))throw o.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var h=document.createElement("canvas");h.width=i,h.height=a;var l=h.getContext("2d");l.fillStyle="#fff",l.fillRect(0,0,h.width,h.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return e().then((function(e){return e.fromString(l,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(h.toDataURL("image/jpeg",1),r,n,i,a,c,u)}))}}(),I.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},I.API.viewerPreferences=function(t,e){var r;t=t||{},e=e||!1;var n,i,a,o={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}},s=Object.keys(o),c=[],u=0,h=0,l=0;function f(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(o)),this.internal.viewerpreferences.isSubscribed=!1),r=this.internal.viewerpreferences.configuration,"reset"===t||!0===e){var d=s.length;for(l=0;l<d;l+=1)r[s[l]].value=r[s[l]].defaultValue,r[s[l]].explicitSet=!1}if("object"==typeof t)for(i in t)if(a=t[i],f(s,i)&&void 0!==a){if("boolean"===r[i].type&&"boolean"==typeof a)r[i].value=a;else if("name"===r[i].type&&f(r[i].valueSet,a))r[i].value=a;else if("integer"===r[i].type&&Number.isInteger(a))r[i].value=a;else if("array"===r[i].type){for(u=0;u<a.length;u+=1)if(n=!0,1===a[u].length&&"number"==typeof a[u][0])c.push(String(a[u]-1));else if(a[u].length>1){for(h=0;h<a[u].length;h+=1)"number"!=typeof a[u][h]&&(n=!1);!0===n&&c.push([a[u][0]-1,a[u][1]-1].join(" "))}r[i].value="["+c.join(" ")+"]"}else r[i].value=r[i].defaultValue;r[i].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var t,e=[];for(t in r)!0===r[t].explicitSet&&("name"===r[t].type?e.push("/"+t+" /"+r[t].value):e.push("/"+t+" "+r[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=r,this},
+/** ====================================================================
+ * @license
+ * jsPDF XMP metadata plugin
+ * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ * ====================================================================
+ */
+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}}(I.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,c=r.metadata.subset.encode(r.metadata.glyIdsUsed,1),u="",h=0;h<c.length;h++)u+=String.fromCharCode(c[h]);var l=a();o({data:u,addLength1:!0,objectId:l}),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 /"+x(r.fontName)),i("/FontFile2 "+l+" 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 /"+x(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 /"+x(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,c="",u=0;u<s.length;u++)c+=String.fromCharCode(s[u]);var h=a();o({data:c,addLength1:!0,objectId:h}),i("endobj");var l=a();o({data:n(r.metadata.toUnicode),addLength1:!0,objectId:l}),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 "+h+" 0 R"),i("/Flags 96"),i("/FontBBox "+t.API.PDFObject.convert(r.metadata.bbox)),i("/FontName /"+x(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 "+l+" 0 R/BaseFont/"+x(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||{},c=s.pdfEscape,u=s.activeFontKey,h=s.fonts,l=u,f="",d=0,p="",g=h[l].encoding;if("Identity-H"!==h[l].encoding)return{text:n,x:i,y:a,options:o,mutex:s};for(p=n,l=u,Array.isArray(n)&&(p=n[0]),d=0;d<p.length;d+=1)h[l].metadata.hasOwnProperty("cmap")&&(e=h[l].metadata.cmap.unicode.codeMap[p[d].charCodeAt(0)]),e||p[d].charCodeAt(0)<256&&h[l].metadata.hasOwnProperty("Unicode")?f+=p[d]:f+="";var m="";return parseInt(l.slice(1))<14||"WinAnsiEncoding"===g?m=c(f,l).split("").map((function(t){return t.charCodeAt(0).toString(16)})).join(""):"Identity-H"===g&&(m=r(f,h[l])),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}])}(I),
+/**
+ * @license
+ * jsPDF virtual FileSystem functionality
+ *
+ * Licensed under the MIT License.
+ * http://opensource.org/licenses/mit-license
+ */
+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}}(I.API),
+/**
+ * @license
+ * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
+ * MIT License
+ */
+function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var r,n,i,a,o,s,c,u=e,h=[[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]],l=[[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?u[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 c,u,h,l,f=e[s];switch(f){case"L":case"R":m=!1;break;case"N":case"AN":break;case"EN":m&&(f="AN");break;case"AL":m=!0,f="R";break;case"WS":f="N";break;case"CS":s<1||s+1>=e.length||"EN"!==(c=o[s-1])&&"AN"!==c||"EN"!==(u=e[s+1])&&"AN"!==u?f="N":m&&(u="AN"),f=u===c?u:"N";break;case"ES":f="EN"===(c=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(h=s+1,l=e.length;h<l&&"ET"===e[h];)h++;f=h<l&&"EN"===e[h]?"EN":"N";break;case"NSM":if(i&&!a){for(l=e.length,h=s+1;h<l&&"NSM"===e[h];)h++;if(h<l){var d=t[s],p=d>=1425&&d<=2303||64286===d;if(c=e[h],p&&("R"===c||"AL"===c)){f="R";break}}}f=s<1||"B"===(c=e[s-1])?"N":o[s-1];break;case"B":m=!1,r=!0,f=v;break;case"S":n=!0,f="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=!1;break;case"BN":f="N"}return f},N=function(t,e,r){var n=t.split("");return r&&L(n,r,{hiLevel:v}),n.reverse(),e&&e.reverse(),n.join("")},L=function(t,e,i){var a,o,s,c,u,d=-1,p=t.length,g=0,y=[],N=v?l:h,L=[];for(m=!1,r=!1,n=!1,o=0;o<p;o++)L[o]=b(t[o]);for(s=0;s<p;s++){if(u=g,y[s]=w(t,L,y,s),a=240&(g=N[u][f[y[s]]]),g&=15,e[s]=c=N[g][5],a>0)if(16===a){for(o=d;o<s;o++)e[o]=1;d=-1}else d=-1;if(N[g][6])-1===d&&(d=s);else if(d>-1){for(o=d;o<s;o++)e[o]=c;d=-1}"B"===L[s]&&(e[s]=0),i.hiLevel|=c}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}}(L,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,c,u,h=e.length,l=0;l<h;){if(i[l]>=t){for(c=l+1;c<h&&i[c]>=t;)c++;for(u=l,s=c-1;u<s;u++,s--)o=e[u],e[u]=e[s],e[s]=o,n&&(o=n[u],n[u]=n[s],n[s]=o);l=c}l++}}},x=function(t,e,r){var n=t.split(""),i={hiLevel:v};return r||(r=[]),L(n,r,i),function(t,e,r){if(0!==r.hiLevel&&c)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=N(t,e,r);else if(!i&&o&&s)v=a?1:0,t=x(t,e,r),t=N(t,e);else if(!i||a||o||s){if(i&&!o&&a^s)t=N(t,e),a?(v=0,t=x(t,e,r)):(v=1,t=x(t,e,r),t=N(t,e));else if(i&&a&&!o&&s)v=1,t=x(t,e,r),t=N(t,e);else if(!i&&!o&&a^s){var n=c;a?(v=1,t=x(t,e,r),v=0,c=!1,t=x(t,e,r),c=n):(v=0,t=x(t,e,r),t=N(t,e),v=1,c=!1,t=x(t,e,r),c=n,t=N(t,e))}}else v=0,t=x(t,e,r);else v=a?1:0,t=x(t,e,r);return t},this.__bidiEngine__.setOptions=function(t){t&&(i=t.isInputVisual,o=t.isOutputVisual,a=t.isInputRtl,s=t.isOutputRtl,c=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})}])}(I),I.API.TTFFont=function(){function t(t){var e;if(this.rawData=t,e=this.contents=new Zt(t),this.contents.pos=4,"ttcf"===e.readString(4))throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new me(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new $t(this.contents),this.head=new ee(this),this.name=new ce(this),this.cmap=new ne(this),this.toUnicode={},this.hhea=new ie(this),this.maxp=new ue(this),this.hmtx=new he(this),this.post=new oe(this),this.os2=new ae(this),this.loca=new ge(this),this.glyf=new fe(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),0!=(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 Kt,Zt=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}(),$t=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,c,u,h,l,f,d,p;for(p in f=Object.keys(e).length,s=Math.log(2),h=16*Math.floor(Math.log(f)/s),a=Math.floor(h/s),u=16*f-h,(n=new Zt).writeInt(this.scalarType),n.writeShort(f),n.writeShort(h),n.writeShort(a),n.writeShort(u),i=16*f,c=n.pos+i,o=null,d=[],e)for(l=e[p],n.writeString(p),n.writeInt(t(l)),n.writeInt(c),n.writeInt(l.length),d=d.concat(l),"head"===p&&(o=c),c+=l.length;c%4;)d.push(0),c++;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=le.call(t);t.length%4;)t.push(0);for(n=new Zt(t),r=0,e=0,i=t.length;e<i;e=e+=4)r+=n.readUInt32();return 4294967295&r},e}(),Qt={}.hasOwnProperty,te=function(t,e){for(var r in e)Qt.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};Kt=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 ee=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return te(e,Kt),e.prototype.tag="head",e.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()},e.prototype.encode=function(t){var e;return(e=new Zt).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},e}(),re=function(){function t(t,e){var r,n,i,a,o,s,c,u,h,l,f,d,p,g,m,v,b;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),h=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(),l=f/2,t.pos+=6,i=function(){var e,r;for(r=[],s=e=0;0<=l?e<l:e>l;s=0<=l?++e:--e)r.push(t.readUInt16());return r}(),t.pos+=2,p=function(){var e,r;for(r=[],s=e=0;0<=l?e<l:e>l;s=0<=l?++e:--e)r.push(t.readUInt16());return r}(),c=function(){var e,r;for(r=[],s=e=0;0<=l?e<l:e>l;s=0<=l?++e:--e)r.push(t.readUInt16());return r}(),u=function(){var e,r;for(r=[],s=e=0;0<=l?e<l:e>l;s=0<=l?++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===u[s]?a=r+c[s]:0!==(a=o[u[s]/2+(r-d)-(l-s)]||0)&&(a+=c[s]),this.codeMap[r]=65535&a}t.pos=h}return t.encode=function(t,e){var r,n,i,a,o,s,c,u,h,l,f,d,p,g,m,v,b,y,w,N,L,A,x,S,_,P,k,F,I,C,j,O,B,q,M,E,D,R,T,z,U,H,W,V,G,Y;switch(F=new Zt,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={},I=0,B=a.length;I<B;I++)null==v[W=t[n=a[I]]]&&(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(P=[],h=[],b=0,v={},r={},m=c=null,C=0,q=a.length;C<q;C++)null==v[w=t[n=a[C]]]&&(v[w]=++b),r[n]={old:w,new:v[w]},o=v[w]-n,null!=m&&o===c||(m&&h.push(m),P.push(n),c=o),m=n;for(m&&h.push(m),h.push(65535),P.push(65535),S=2*(x=P.length),A=2*Math.pow(Math.log(x)/Math.LN2,2),l=Math.log(A/2)/Math.LN2,L=2*x-A,s=[],N=[],f=[],d=j=0,M=P.length;j<M;d=++j){if(_=P[d],u=h[d],65535===_){s.push(0),N.push(0);break}if(_-(k=r[_].new)>=32768)for(s.push(0),N.push(2*(f.length+x-d)),n=O=_;_<=u?O<=u:O>=u;n=_<=u?++O:--O)f.push(r[n].new);else s.push(k-_),N.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*x+2*f.length),F.writeUInt16(0),F.writeUInt16(S),F.writeUInt16(A),F.writeUInt16(l),F.writeUInt16(L),U=0,E=h.length;U<E;U++)n=h[U],F.writeUInt16(n);for(F.writeUInt16(0),H=0,D=P.length;H<D;H++)n=P[H],F.writeUInt16(n);for(V=0,R=s.length;V<R;V++)o=s[V],F.writeUInt16(o);for(G=0,T=N.length;G<T;G++)y=N[G],F.writeUInt16(y);for(Y=0,z=f.length;Y<z;Y++)p=f[Y],F.writeUInt16(p);return{charMap:r,subtable:F.data,maxGlyphID:b+1}}},t}(),ne=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return te(e,Kt),e.prototype.tag="cmap",e.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 re(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},e.encode=function(t,e){var r,n;return null==e&&(e="macroman"),r=re.encode(t,e),(n=new Zt).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},e}(),ie=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return te(e,Kt),e.prototype.tag="hhea",e.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()},e}(),ae=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return te(e,Kt),e.prototype.tag="OS/2",e.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()},e}(),oe=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return te(e,Kt),e.prototype.tag="post",e.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: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 196608:break;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)}},e}(),se=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},ce=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return te(e,Kt),e.prototype.tag="name",e.prototype.parse=function(t){var e,r,n,i,a,o,s,c,u,h,l;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=u=0,h=r.length;u<h;i=++u)n=r[i],t.pos=n.offset,c=t.readString(n.length),a=new se(c,n),null==s[l=n.nameID]&&(s[l]=[]),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]},e}(),ue=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return te(e,Kt),e.prototype.tag="maxp",e.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()},e}(),he=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return te(e,Kt),e.prototype.tag="hmtx",e.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},e.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]}},e}(),le=[].slice,fe=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return te(e,Kt),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var e,r,n,i,a,o,s,c,u,h;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 Zt(e.read(n))).readShort(),c=o.readShort(),h=o.readShort(),s=o.readShort(),u=o.readShort(),this.cache[t]=-1===a?new pe(o,c,h,s,u):new de(o,a,c,h,s,u),this.cache[t]))},e.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}},e}(),de=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}(),pe=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 1,8,32,64,128,t.prototype.encode=function(){var t,e,r;for(e=new Zt(le.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)e.pos=this.glyphOffsets[t];return e.data},t}(),ge=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return te(e,Kt),e.prototype.tag="loca",e.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)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.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 c=new Array(4*r.length),u=0;u<r.length;++u)c[4*u+3]=255&r[u],c[4*u+2]=(65280&r[u])>>8,c[4*u+1]=(16711680&r[u])>>16,c[4*u]=(4278190080&r[u])>>24;return c},e}(),me=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,c,u,h,l,f,d,p,g,m;for(n in r=ne.encode(this.generateCmap(),"unicode"),a=this.glyphsFor(t),f={0:0},m=r.charMap)f[(s=m[n]).old]=s.new;for(d in l=r.maxGlyphID,a)d in f||(f[d]=l++);return u=function(t){var e,r;for(e in r={},t)r[t[e]]=e;return r}(f),h=Object.keys(u).sort((function(t,e){return t-e})),p=function(){var t,e,r;for(r=[],t=0,e=h.length;t<e;t++)o=h[t],r.push(u[o]);return r}(),i=this.font.glyf.encode(a,p,f),c=this.font.loca.encode(i.offsets,p),g={cmap:this.font.cmap.raw(),glyf:i.table,loca:c,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}();I.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}(),exports.AcroForm=yt,exports.AcroFormAppearance=vt,exports.AcroFormButton=ht,exports.AcroFormCheckBox=pt,exports.AcroFormChoiceField=ot,exports.AcroFormComboBox=ct,exports.AcroFormEditBox=ut,exports.AcroFormListBox=st,exports.AcroFormPasswordField=mt,exports.AcroFormPushButton=lt,exports.AcroFormRadioButton=ft,exports.AcroFormTextField=gt,exports.GState=_,exports.ShadingPattern=k,exports.TilingPattern=F,exports.default=I,exports.jsPDF=I;
+//# sourceMappingURL=jspdf.node.min.js.map
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.node.min.js.map
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.node.min.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.node.min.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"jspdf.node.min.js","sources":["../src/libs/AtobBtoa.js","../src/libs/globalObject.js","../src/libs/rgbcolor.js","../src/libs/console.js","../src/libs/md5.js","../src/libs/rc4.js","../src/libs/pdfsecurity.js","../src/libs/pdfname.js","../src/jspdf.js","../src/modules/acroform.js","../src/libs/fontFace.js","../src/modules/addimage.js","../src/modules/annotations.js","../src/modules/arabic.js","../src/modules/autoprint.js","../src/modules/canvas.js","../src/modules/cell.js","../src/modules/javascript.js","../src/modules/context2d.js","../src/modules/filters.js","../src/modules/fileloading.js","../src/modules/html.js","../src/modules/outline.js","../src/modules/jpeg_support.js","../src/libs/png.js","../src/modules/split_text_to_size.js","../src/libs/omggif.js","../src/libs/JPEGEncoder.js","../src/libs/BMPDecoder.js","../src/libs/WebPDecoder.js","../src/modules/png_support.js","../src/modules/gif_support.js","../src/modules/bmp_support.js","../src/modules/webp_support.js","../src/modules/rgba_support.js","../src/modules/setlanguage.js","../src/modules/standard_fonts_metrics.js","../src/modules/ttfsupport.js","../src/modules/svg.js","../src/modules/total_pages.js","../src/modules/viewerpreferences.js","../src/modules/xmp_metadata.js","../src/modules/utf8.js","../src/modules/vfs.js","../src/libs/bidiEngine.js","../src/libs/ttffont.js"],"sourcesContent":["import { globalObject } from \"./globalObject.js\";\n\nvar atob, btoa;\n\n(function() {\n\n  atob = require(\"atob\");\n  btoa = require(\"btoa\");\n})();\n\nexport { atob, btoa };\n","export var globalObject = (function() {\n  return \"undefined\" !== typeof window\n    ? window\n    : \"undefined\" !== typeof global\n    ? global\n    : \"undefined\" !== typeof self\n    ? self\n    : this;\n})();\n","/**\n * A class to parse color values\n * @author Stoyan Stefanov <sstoo@gmail.com>\n * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}\n * @license Use it if you like it\n */\n\nfunction RGBColor(color_string) {\n  color_string = color_string || \"\";\n  this.ok = false;\n\n  // strip any leading #\n  if (color_string.charAt(0) == \"#\") {\n    // remove # if any\n    color_string = color_string.substr(1, 6);\n  }\n\n  color_string = color_string.replace(/ /g, \"\");\n  color_string = color_string.toLowerCase();\n\n  var channels;\n\n  // before getting into regexps, try simple matches\n  // and overwrite the input\n  var simple_colors = {\n    aliceblue: \"f0f8ff\",\n    antiquewhite: \"faebd7\",\n    aqua: \"00ffff\",\n    aquamarine: \"7fffd4\",\n    azure: \"f0ffff\",\n    beige: \"f5f5dc\",\n    bisque: \"ffe4c4\",\n    black: \"000000\",\n    blanchedalmond: \"ffebcd\",\n    blue: \"0000ff\",\n    blueviolet: \"8a2be2\",\n    brown: \"a52a2a\",\n    burlywood: \"deb887\",\n    cadetblue: \"5f9ea0\",\n    chartreuse: \"7fff00\",\n    chocolate: \"d2691e\",\n    coral: \"ff7f50\",\n    cornflowerblue: \"6495ed\",\n    cornsilk: \"fff8dc\",\n    crimson: \"dc143c\",\n    cyan: \"00ffff\",\n    darkblue: \"00008b\",\n    darkcyan: \"008b8b\",\n    darkgoldenrod: \"b8860b\",\n    darkgray: \"a9a9a9\",\n    darkgreen: \"006400\",\n    darkkhaki: \"bdb76b\",\n    darkmagenta: \"8b008b\",\n    darkolivegreen: \"556b2f\",\n    darkorange: \"ff8c00\",\n    darkorchid: \"9932cc\",\n    darkred: \"8b0000\",\n    darksalmon: \"e9967a\",\n    darkseagreen: \"8fbc8f\",\n    darkslateblue: \"483d8b\",\n    darkslategray: \"2f4f4f\",\n    darkturquoise: \"00ced1\",\n    darkviolet: \"9400d3\",\n    deeppink: \"ff1493\",\n    deepskyblue: \"00bfff\",\n    dimgray: \"696969\",\n    dodgerblue: \"1e90ff\",\n    feldspar: \"d19275\",\n    firebrick: \"b22222\",\n    floralwhite: \"fffaf0\",\n    forestgreen: \"228b22\",\n    fuchsia: \"ff00ff\",\n    gainsboro: \"dcdcdc\",\n    ghostwhite: \"f8f8ff\",\n    gold: \"ffd700\",\n    goldenrod: \"daa520\",\n    gray: \"808080\",\n    green: \"008000\",\n    greenyellow: \"adff2f\",\n    honeydew: \"f0fff0\",\n    hotpink: \"ff69b4\",\n    indianred: \"cd5c5c\",\n    indigo: \"4b0082\",\n    ivory: \"fffff0\",\n    khaki: \"f0e68c\",\n    lavender: \"e6e6fa\",\n    lavenderblush: \"fff0f5\",\n    lawngreen: \"7cfc00\",\n    lemonchiffon: \"fffacd\",\n    lightblue: \"add8e6\",\n    lightcoral: \"f08080\",\n    lightcyan: \"e0ffff\",\n    lightgoldenrodyellow: \"fafad2\",\n    lightgrey: \"d3d3d3\",\n    lightgreen: \"90ee90\",\n    lightpink: \"ffb6c1\",\n    lightsalmon: \"ffa07a\",\n    lightseagreen: \"20b2aa\",\n    lightskyblue: \"87cefa\",\n    lightslateblue: \"8470ff\",\n    lightslategray: \"778899\",\n    lightsteelblue: \"b0c4de\",\n    lightyellow: \"ffffe0\",\n    lime: \"00ff00\",\n    limegreen: \"32cd32\",\n    linen: \"faf0e6\",\n    magenta: \"ff00ff\",\n    maroon: \"800000\",\n    mediumaquamarine: \"66cdaa\",\n    mediumblue: \"0000cd\",\n    mediumorchid: \"ba55d3\",\n    mediumpurple: \"9370d8\",\n    mediumseagreen: \"3cb371\",\n    mediumslateblue: \"7b68ee\",\n    mediumspringgreen: \"00fa9a\",\n    mediumturquoise: \"48d1cc\",\n    mediumvioletred: \"c71585\",\n    midnightblue: \"191970\",\n    mintcream: \"f5fffa\",\n    mistyrose: \"ffe4e1\",\n    moccasin: \"ffe4b5\",\n    navajowhite: \"ffdead\",\n    navy: \"000080\",\n    oldlace: \"fdf5e6\",\n    olive: \"808000\",\n    olivedrab: \"6b8e23\",\n    orange: \"ffa500\",\n    orangered: \"ff4500\",\n    orchid: \"da70d6\",\n    palegoldenrod: \"eee8aa\",\n    palegreen: \"98fb98\",\n    paleturquoise: \"afeeee\",\n    palevioletred: \"d87093\",\n    papayawhip: \"ffefd5\",\n    peachpuff: \"ffdab9\",\n    peru: \"cd853f\",\n    pink: \"ffc0cb\",\n    plum: \"dda0dd\",\n    powderblue: \"b0e0e6\",\n    purple: \"800080\",\n    red: \"ff0000\",\n    rosybrown: \"bc8f8f\",\n    royalblue: \"4169e1\",\n    saddlebrown: \"8b4513\",\n    salmon: \"fa8072\",\n    sandybrown: \"f4a460\",\n    seagreen: \"2e8b57\",\n    seashell: \"fff5ee\",\n    sienna: \"a0522d\",\n    silver: \"c0c0c0\",\n    skyblue: \"87ceeb\",\n    slateblue: \"6a5acd\",\n    slategray: \"708090\",\n    snow: \"fffafa\",\n    springgreen: \"00ff7f\",\n    steelblue: \"4682b4\",\n    tan: \"d2b48c\",\n    teal: \"008080\",\n    thistle: \"d8bfd8\",\n    tomato: \"ff6347\",\n    turquoise: \"40e0d0\",\n    violet: \"ee82ee\",\n    violetred: \"d02090\",\n    wheat: \"f5deb3\",\n    white: \"ffffff\",\n    whitesmoke: \"f5f5f5\",\n    yellow: \"ffff00\",\n    yellowgreen: \"9acd32\"\n  };\n  color_string = simple_colors[color_string] || color_string;\n\n  // array of color definition objects\n  var color_defs = [\n    {\n      re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n      example: [\"rgb(123, 234, 45)\", \"rgb(255,234,245)\"],\n      process: function(bits) {\n        return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];\n      }\n    },\n    {\n      re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n      example: [\"#00ff00\", \"336699\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1], 16),\n          parseInt(bits[2], 16),\n          parseInt(bits[3], 16)\n        ];\n      }\n    },\n    {\n      re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n      example: [\"#fb0\", \"f0f\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1] + bits[1], 16),\n          parseInt(bits[2] + bits[2], 16),\n          parseInt(bits[3] + bits[3], 16)\n        ];\n      }\n    }\n  ];\n\n  // search through the definitions to find a match\n  for (var i = 0; i < color_defs.length; i++) {\n    var re = color_defs[i].re;\n    var processor = color_defs[i].process;\n    var bits = re.exec(color_string);\n    if (bits) {\n      channels = processor(bits);\n      this.r = channels[0];\n      this.g = channels[1];\n      this.b = channels[2];\n      this.ok = true;\n    }\n  }\n\n  // validate/cleanup values\n  this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r;\n  this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g;\n  this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b;\n\n  // some getters\n  this.toRGB = function() {\n    return \"rgb(\" + this.r + \", \" + this.g + \", \" + this.b + \")\";\n  };\n  this.toHex = function() {\n    var r = this.r.toString(16);\n    var g = this.g.toString(16);\n    var b = this.b.toString(16);\n    if (r.length == 1) r = \"0\" + r;\n    if (g.length == 1) g = \"0\" + g;\n    if (b.length == 1) b = \"0\" + b;\n    return \"#\" + r + g + b;\n  };\n}\n\nexport { RGBColor };\n","import { globalObject } from \"./globalObject.js\";\n\nfunction consoleLog() {\n  if (globalObject.console && typeof globalObject.console.log === \"function\") {\n    globalObject.console.log.apply(globalObject.console, arguments);\n  }\n}\n\nfunction consoleWarn(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.warn === \"function\") {\n      globalObject.console.warn.apply(globalObject.console, arguments);\n    } else {\n      consoleLog.call(null, arguments);\n    }\n  }\n}\n\nfunction consoleError(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.error === \"function\") {\n      globalObject.console.error.apply(globalObject.console, arguments);\n    } else {\n      consoleLog(str);\n    }\n  }\n}\nexport var console = {\n  log: consoleLog,\n  warn: consoleWarn,\n  error: consoleError\n};\n","/**\n * @license\n * Joseph Myers does not specify a particular license for his work.\n *\n * Author: Joseph Myers\n * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js\n *\n * Modified by: Owen Leong\n */\n\nfunction md5cycle(x, k) {\n  var a = x[0],\n    b = x[1],\n    c = x[2],\n    d = x[3];\n\n  a = ff(a, b, c, d, k[0], 7, -680876936);\n  d = ff(d, a, b, c, k[1], 12, -389564586);\n  c = ff(c, d, a, b, k[2], 17, 606105819);\n  b = ff(b, c, d, a, k[3], 22, -1044525330);\n  a = ff(a, b, c, d, k[4], 7, -176418897);\n  d = ff(d, a, b, c, k[5], 12, 1200080426);\n  c = ff(c, d, a, b, k[6], 17, -1473231341);\n  b = ff(b, c, d, a, k[7], 22, -45705983);\n  a = ff(a, b, c, d, k[8], 7, 1770035416);\n  d = ff(d, a, b, c, k[9], 12, -1958414417);\n  c = ff(c, d, a, b, k[10], 17, -42063);\n  b = ff(b, c, d, a, k[11], 22, -1990404162);\n  a = ff(a, b, c, d, k[12], 7, 1804603682);\n  d = ff(d, a, b, c, k[13], 12, -40341101);\n  c = ff(c, d, a, b, k[14], 17, -1502002290);\n  b = ff(b, c, d, a, k[15], 22, 1236535329);\n\n  a = gg(a, b, c, d, k[1], 5, -165796510);\n  d = gg(d, a, b, c, k[6], 9, -1069501632);\n  c = gg(c, d, a, b, k[11], 14, 643717713);\n  b = gg(b, c, d, a, k[0], 20, -373897302);\n  a = gg(a, b, c, d, k[5], 5, -701558691);\n  d = gg(d, a, b, c, k[10], 9, 38016083);\n  c = gg(c, d, a, b, k[15], 14, -660478335);\n  b = gg(b, c, d, a, k[4], 20, -405537848);\n  a = gg(a, b, c, d, k[9], 5, 568446438);\n  d = gg(d, a, b, c, k[14], 9, -1019803690);\n  c = gg(c, d, a, b, k[3], 14, -187363961);\n  b = gg(b, c, d, a, k[8], 20, 1163531501);\n  a = gg(a, b, c, d, k[13], 5, -1444681467);\n  d = gg(d, a, b, c, k[2], 9, -51403784);\n  c = gg(c, d, a, b, k[7], 14, 1735328473);\n  b = gg(b, c, d, a, k[12], 20, -1926607734);\n\n  a = hh(a, b, c, d, k[5], 4, -378558);\n  d = hh(d, a, b, c, k[8], 11, -2022574463);\n  c = hh(c, d, a, b, k[11], 16, 1839030562);\n  b = hh(b, c, d, a, k[14], 23, -35309556);\n  a = hh(a, b, c, d, k[1], 4, -1530992060);\n  d = hh(d, a, b, c, k[4], 11, 1272893353);\n  c = hh(c, d, a, b, k[7], 16, -155497632);\n  b = hh(b, c, d, a, k[10], 23, -1094730640);\n  a = hh(a, b, c, d, k[13], 4, 681279174);\n  d = hh(d, a, b, c, k[0], 11, -358537222);\n  c = hh(c, d, a, b, k[3], 16, -722521979);\n  b = hh(b, c, d, a, k[6], 23, 76029189);\n  a = hh(a, b, c, d, k[9], 4, -640364487);\n  d = hh(d, a, b, c, k[12], 11, -421815835);\n  c = hh(c, d, a, b, k[15], 16, 530742520);\n  b = hh(b, c, d, a, k[2], 23, -995338651);\n\n  a = ii(a, b, c, d, k[0], 6, -198630844);\n  d = ii(d, a, b, c, k[7], 10, 1126891415);\n  c = ii(c, d, a, b, k[14], 15, -1416354905);\n  b = ii(b, c, d, a, k[5], 21, -57434055);\n  a = ii(a, b, c, d, k[12], 6, 1700485571);\n  d = ii(d, a, b, c, k[3], 10, -1894986606);\n  c = ii(c, d, a, b, k[10], 15, -1051523);\n  b = ii(b, c, d, a, k[1], 21, -2054922799);\n  a = ii(a, b, c, d, k[8], 6, 1873313359);\n  d = ii(d, a, b, c, k[15], 10, -30611744);\n  c = ii(c, d, a, b, k[6], 15, -1560198380);\n  b = ii(b, c, d, a, k[13], 21, 1309151649);\n  a = ii(a, b, c, d, k[4], 6, -145523070);\n  d = ii(d, a, b, c, k[11], 10, -1120210379);\n  c = ii(c, d, a, b, k[2], 15, 718787259);\n  b = ii(b, c, d, a, k[9], 21, -343485551);\n\n  x[0] = add32(a, x[0]);\n  x[1] = add32(b, x[1]);\n  x[2] = add32(c, x[2]);\n  x[3] = add32(d, x[3]);\n}\n\nfunction cmn(q, a, b, x, s, t) {\n  a = add32(add32(a, q), add32(x, t));\n  return add32((a << s) | (a >>> (32 - s)), b);\n}\n\nfunction ff(a, b, c, d, x, s, t) {\n  return cmn((b & c) | (~b & d), a, b, x, s, t);\n}\n\nfunction gg(a, b, c, d, x, s, t) {\n  return cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\n\nfunction hh(a, b, c, d, x, s, t) {\n  return cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction ii(a, b, c, d, x, s, t) {\n  return cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nfunction md51(s) {\n  // txt = '';\n  var n = s.length,\n    state = [1732584193, -271733879, -1732584194, 271733878],\n    i;\n  for (i = 64; i <= s.length; i += 64) {\n    md5cycle(state, md5blk(s.substring(i - 64, i)));\n  }\n  s = s.substring(i - 64);\n  var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n  for (i = 0; i < s.length; i++)\n    tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n  tail[i >> 2] |= 0x80 << (i % 4 << 3);\n  if (i > 55) {\n    md5cycle(state, tail);\n    for (i = 0; i < 16; i++) tail[i] = 0;\n  }\n  tail[14] = n * 8;\n  md5cycle(state, tail);\n  return state;\n}\n\n/* there needs to be support for Unicode here,\n * unless we pretend that we can redefine the MD-5\n * algorithm for multi-byte characters (perhaps\n * by adding every four 16-bit characters and\n * shortening the sum to 32 bits). Otherwise\n * I suggest performing MD-5 as if every character\n * was two bytes--e.g., 0040 0025 = @%--but then\n * how will an ordinary MD-5 sum be matched?\n * There is no way to standardize text to something\n * like UTF-8 before transformation; speed cost is\n * utterly prohibitive. The JavaScript standard\n * itself needs to look at this: it should start\n * providing access to strings as preformed UTF-8\n * 8-bit unsigned value arrays.\n */\nfunction md5blk(s) {\n  /* I figured global was faster.   */\n  var md5blks = [],\n    i; /* Andy King said do it this way. */\n  for (i = 0; i < 64; i += 4) {\n    md5blks[i >> 2] =\n      s.charCodeAt(i) +\n      (s.charCodeAt(i + 1) << 8) +\n      (s.charCodeAt(i + 2) << 16) +\n      (s.charCodeAt(i + 3) << 24);\n  }\n  return md5blks;\n}\n\nvar hex_chr = \"0123456789abcdef\".split(\"\");\n\nfunction rhex(n) {\n  var s = \"\",\n    j = 0;\n  for (; j < 4; j++)\n    s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];\n  return s;\n}\n\nfunction hex(x) {\n  for (var i = 0; i < x.length; i++) x[i] = rhex(x[i]);\n  return x.join(\"\");\n}\n\n// Converts a 4-byte number to byte string\nfunction singleToByteString(n) {\n  return String.fromCharCode(\n    (n & 0xff) >> 0,\n    (n & 0xff00) >> 8,\n    (n & 0xff0000) >> 16,\n    (n & 0xff000000) >> 24\n  );\n}\n\n// Converts an array of numbers to a byte string\nfunction toByteString(x) {\n  return x.map(singleToByteString).join(\"\");\n}\n\n// Returns the MD5 hash as a byte string\nfunction md5Bin(s) {\n  return toByteString(md51(s));\n}\n\n// Returns MD5 hash as a hex string\nfunction md5(s) {\n  return hex(md51(s));\n}\n\nvar md5Check = md5(\"hello\") != \"5d41402abc4b2a76b9719d911017c592\";\n\nfunction add32(a, b) {\n  if (md5Check) {\n    /* if the md5Check does not match\n     the expected value, we're dealing\n     with an old browser and need\n     this function. */\n    var lsw = (a & 0xffff) + (b & 0xffff),\n      msw = (a >> 16) + (b >> 16) + (lsw >> 16);\n    return (msw << 16) | (lsw & 0xffff);\n  } else {\n    /* this function is much faster,\n    so if possible we use it. Some IEs\n    are the only ones I know of that\n    need the idiotic second function,\n    generated by an if clause.  */\n    return (a + b) & 0xffffffff;\n  }\n}\n\nexport { md5, md5Bin };\n","/**\r\n * @license\r\n * FPDF is released under a permissive license: there is no usage restriction.\r\n * You may embed it freely in your application (commercial or not), with or\r\n * without modifications.\r\n *\r\n * Reference: http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nfunction repeat(str, num) {\r\n  return new Array(num + 1).join(str);\r\n}\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name rc4\r\n * @function\r\n * @param {string} key Byte string of encryption key\r\n * @param {string} data Byte string of data to be encrypted\r\n * @returns {string} Encrypted string\r\n */\r\nfunction rc4(key, data) {\r\n  var lastKey, lastState;\r\n  if (key !== lastKey) {\r\n    var k = repeat(key, ((256 / key.length) >> 0) + 1);\r\n    var state = [];\r\n    for (var i = 0; i < 256; i++) {\r\n      state[i] = i;\r\n    }\r\n    var j = 0;\r\n    for (var i = 0; i < 256; i++) {\r\n      var t = state[i];\r\n      j = (j + t + k.charCodeAt(i)) % 256;\r\n      state[i] = state[j];\r\n      state[j] = t;\r\n    }\r\n    lastKey = key;\r\n    lastState = state;\r\n  } else {\r\n    state = lastState;\r\n  }\r\n  var length = data.length;\r\n  var a = 0;\r\n  var b = 0;\r\n  var out = \"\";\r\n  for (var i = 0; i < length; i++) {\r\n    a = (a + 1) % 256;\r\n    t = state[a];\r\n    b = (b + t) % 256;\r\n    state[a] = state[b];\r\n    state[b] = t;\r\n    k = state[(state[a] + state[b]) % 256];\r\n    out += String.fromCharCode(data.charCodeAt(i) ^ k);\r\n  }\r\n  return out;\r\n}\r\n\r\nexport { rc4 };\r\n","/**\r\n * @license\r\n * Licensed under the MIT License.\r\n * http://opensource.org/licenses/mit-license\r\n * Author: Owen Leong (@owenl131)\r\n * Date: 15 Oct 2020\r\n * References:\r\n * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt\r\n * https://github.com/foliojs/pdfkit/blob/master/lib/security.js\r\n * http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nimport { md5Bin } from \"./md5.js\";\r\nimport { rc4 } from \"./rc4.js\";\r\n\r\nvar permissionOptions = {\r\n  print: 4,\r\n  modify: 8,\r\n  copy: 16,\r\n  \"annot-forms\": 32\r\n};\r\n\r\n/**\r\n * Initializes encryption settings\r\n *\r\n * @name constructor\r\n * @function\r\n * @param {Array} permissions Permissions allowed for user, \"print\", \"modify\", \"copy\" and \"annot-forms\".\r\n * @param {String} userPassword Permissions apply to this user. Leaving this empty means the document\r\n *                              is not password protected but viewer has the above permissions.\r\n * @param {String} ownerPassword Owner has full functionalities to the file.\r\n * @param {String} fileId As hex string, should be same as the file ID in the trailer.\r\n * @example\r\n * var security = new PDFSecurity([\"print\"])\r\n */\r\nfunction PDFSecurity(permissions, userPassword, ownerPassword, fileId) {\r\n  this.v = 1; // algorithm 1, future work can add in more recent encryption schemes\r\n  this.r = 2; // revision 2\r\n\r\n  // set flags for what functionalities the user can access\r\n  let protection = 192;\r\n  permissions.forEach(function(perm) {\r\n    if (typeof permissionOptions.perm !== \"undefined\") {\r\n      throw new Error(\"Invalid permission: \" + perm);\r\n    }\r\n    protection += permissionOptions[perm];\r\n  });\r\n\r\n  // padding is used to pad the passwords to 32 bytes, also is hashed and stored in the final PDF\r\n  this.padding =\r\n    \"\\x28\\xBF\\x4E\\x5E\\x4E\\x75\\x8A\\x41\\x64\\x00\\x4E\\x56\\xFF\\xFA\\x01\\x08\" +\r\n    \"\\x2E\\x2E\\x00\\xB6\\xD0\\x68\\x3E\\x80\\x2F\\x0C\\xA9\\xFE\\x64\\x53\\x69\\x7A\";\r\n  let paddedUserPassword = (userPassword + this.padding).substr(0, 32);\r\n  let paddedOwnerPassword = (ownerPassword + this.padding).substr(0, 32);\r\n\r\n  this.O = this.processOwnerPassword(paddedUserPassword, paddedOwnerPassword);\r\n  this.P = -((protection ^ 255) + 1);\r\n  this.encryptionKey = md5Bin(\r\n    paddedUserPassword +\r\n      this.O +\r\n      this.lsbFirstWord(this.P) +\r\n      this.hexToBytes(fileId)\r\n  ).substr(0, 5);\r\n  this.U = rc4(this.encryptionKey, this.padding);\r\n}\r\n\r\n/**\r\n * Breaks down a 4-byte number into its individual bytes, with the least significant bit first\r\n *\r\n * @name lsbFirstWord\r\n * @function\r\n * @param {number} data 32-bit number\r\n * @returns {Array}\r\n */\r\nPDFSecurity.prototype.lsbFirstWord = function(data) {\r\n  return String.fromCharCode(\r\n    (data >> 0) & 0xff,\r\n    (data >> 8) & 0xff,\r\n    (data >> 16) & 0xff,\r\n    (data >> 24) & 0xff\r\n  );\r\n};\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name toHexString\r\n * @function\r\n * @param {String} byteString Byte string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.toHexString = function(byteString) {\r\n  return byteString\r\n    .split(\"\")\r\n    .map(function(byte) {\r\n      return (\"0\" + (byte.charCodeAt(0) & 0xff).toString(16)).slice(-2);\r\n    })\r\n    .join(\"\");\r\n};\r\n\r\n/**\r\n * Converts a hex string to a byte string\r\n *\r\n * @name hexToBytes\r\n * @function\r\n * @param {String} hex Hex string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.hexToBytes = function(hex) {\r\n  for (var bytes = [], c = 0; c < hex.length; c += 2)\r\n    bytes.push(String.fromCharCode(parseInt(hex.substr(c, 2), 16)));\r\n  return bytes.join(\"\");\r\n};\r\n\r\n/**\r\n * Computes the 'O' field in the encryption dictionary\r\n *\r\n * @name processOwnerPassword\r\n * @function\r\n * @param {String} paddedUserPassword Byte string of padded user password\r\n * @param {String} paddedOwnerPassword Byte string of padded owner password\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.processOwnerPassword = function(\r\n  paddedUserPassword,\r\n  paddedOwnerPassword\r\n) {\r\n  let key = md5Bin(paddedOwnerPassword).substr(0, 5);\r\n  return rc4(key, paddedUserPassword);\r\n};\r\n\r\n/**\r\n * Returns an encryptor function which can take in a byte string and returns the encrypted version\r\n *\r\n * @name encryptor\r\n * @function\r\n * @param {number} objectId\r\n * @param {number} generation Not sure what this is for, you can set it to 0\r\n * @returns {Function}\r\n * @example\r\n * out(\"stream\");\r\n * encryptor = security.encryptor(object.id, 0);\r\n * out(encryptor(data));\r\n * out(\"endstream\");\r\n */\r\nPDFSecurity.prototype.encryptor = function(objectId, generation) {\r\n  let key = md5Bin(\r\n    this.encryptionKey +\r\n      String.fromCharCode(\r\n        objectId & 0xff,\r\n        (objectId >> 8) & 0xff,\r\n        (objectId >> 16) & 0xff,\r\n        generation & 0xff,\r\n        (generation >> 8) & 0xff\r\n      )\r\n  ).substr(0, 10);\r\n  return function(data) {\r\n    return rc4(key, data);\r\n  };\r\n};\r\n\r\nexport { PDFSecurity };\r\n","/**\n * Convert string to `PDF Name Object`.\n * Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object\n * @param str\n */\nfunction toPDFName(str) {\n  // eslint-disable-next-line no-control-regex\n  if (/[^\\u0000-\\u00ff]/.test(str)) {\n    // non ascii string\n    throw new Error(\n      \"Invalid PDF Name Object: \" + str + \", Only accept ASCII characters.\"\n    );\n  }\n  var result = \"\",\n    strLength = str.length;\n  for (var i = 0; i < strLength; i++) {\n    var charCode = str.charCodeAt(i);\n    if (\n      charCode < 0x21 ||\n      charCode === 0x23 /* # */ ||\n      charCode === 0x25 /* % */ ||\n      charCode === 0x28 /* ( */ ||\n      charCode === 0x29 /* ) */ ||\n      charCode === 0x2f /* / */ ||\n      charCode === 0x3c /* < */ ||\n      charCode === 0x3e /* > */ ||\n      charCode === 0x5b /* [ */ ||\n      charCode === 0x5d /* ] */ ||\n      charCode === 0x7b /* { */ ||\n      charCode === 0x7d /* } */ ||\n      charCode > 0x7e\n    ) {\n      // Char    CharCode    hexStr   paddingHexStr    Result\n      // \"\\t\"    9           9        09               #09\n      // \" \"     32          20       20               #20\n      // \"©\"     169         a9       a9               #a9\n      var hexStr = charCode.toString(16),\n        paddingHexStr = (\"0\" + hexStr).slice(-2);\n\n      result += \"#\" + paddingHexStr;\n    } else {\n      // Other ASCII printable characters between 0x21 <= X <= 0x7e\n      result += str[i];\n    }\n  }\n  return result;\n}\n\nexport { toPDFName };\n","/* eslint-disable no-console */\r\n\r\nimport { globalObject } from \"./libs/globalObject.js\";\r\nimport { RGBColor } from \"./libs/rgbcolor.js\";\r\nimport { btoa } from \"./libs/AtobBtoa.js\";\r\nimport { console } from \"./libs/console.js\";\r\nimport { PDFSecurity } from \"./libs/pdfsecurity.js\";\r\nimport { toPDFName } from \"./libs/pdfname.js\";\r\n/**\r\n * jsPDF's Internal PubSub Implementation.\r\n * Backward compatible rewritten on 2014 by\r\n * Diego Casorran, https://github.com/diegocr\r\n *\r\n * @class\r\n * @name PubSub\r\n * @ignore\r\n */\r\nfunction PubSub(context) {\r\n  if (typeof context !== \"object\") {\r\n    throw new Error(\r\n      \"Invalid Context passed to initialize PubSub (jsPDF-module)\"\r\n    );\r\n  }\r\n  var topics = {};\r\n\r\n  this.subscribe = function(topic, callback, once) {\r\n    once = once || false;\r\n    if (\r\n      typeof topic !== \"string\" ||\r\n      typeof callback !== \"function\" ||\r\n      typeof once !== \"boolean\"\r\n    ) {\r\n      throw new Error(\r\n        \"Invalid arguments passed to PubSub.subscribe (jsPDF-module)\"\r\n      );\r\n    }\r\n\r\n    if (!topics.hasOwnProperty(topic)) {\r\n      topics[topic] = {};\r\n    }\r\n\r\n    var token = Math.random().toString(35);\r\n    topics[topic][token] = [callback, !!once];\r\n\r\n    return token;\r\n  };\r\n\r\n  this.unsubscribe = function(token) {\r\n    for (var topic in topics) {\r\n      if (topics[topic][token]) {\r\n        delete topics[topic][token];\r\n        if (Object.keys(topics[topic]).length === 0) {\r\n          delete topics[topic];\r\n        }\r\n        return true;\r\n      }\r\n    }\r\n    return false;\r\n  };\r\n\r\n  this.publish = function(topic) {\r\n    if (topics.hasOwnProperty(topic)) {\r\n      var args = Array.prototype.slice.call(arguments, 1),\r\n        tokens = [];\r\n\r\n      for (var token in topics[topic]) {\r\n        var sub = topics[topic][token];\r\n        try {\r\n          sub[0].apply(context, args);\r\n        } catch (ex) {\r\n          if (globalObject.console) {\r\n            console.error(\"jsPDF PubSub Error\", ex.message, ex);\r\n          }\r\n        }\r\n        if (sub[1]) tokens.push(token);\r\n      }\r\n      if (tokens.length) tokens.forEach(this.unsubscribe);\r\n    }\r\n  };\r\n\r\n  this.getTopics = function() {\r\n    return topics;\r\n  };\r\n}\r\n\r\nfunction GState(parameters) {\r\n  if (!(this instanceof GState)) {\r\n    return new GState(parameters);\r\n  }\r\n\r\n  /**\r\n   * @name GState#opacity\r\n   * @type {any}\r\n   */\r\n  /**\r\n   * @name GState#stroke-opacity\r\n   * @type {any}\r\n   */\r\n  var supported = \"opacity,stroke-opacity\".split(\",\");\r\n  for (var p in parameters) {\r\n    if (parameters.hasOwnProperty(p) && supported.indexOf(p) >= 0) {\r\n      this[p] = parameters[p];\r\n    }\r\n  }\r\n  /**\r\n   * @name GState#id\r\n   * @type {string}\r\n   */\r\n  this.id = \"\"; // set by addGState()\r\n  /**\r\n   * @name GState#objectNumber\r\n   * @type {number}\r\n   */\r\n  this.objectNumber = -1; // will be set by putGState()\r\n}\r\n\r\nGState.prototype.equals = function equals(other) {\r\n  var ignore = \"id,objectNumber,equals\";\r\n  var p;\r\n  if (!other || typeof other !== typeof this) return false;\r\n  var count = 0;\r\n  for (p in this) {\r\n    if (ignore.indexOf(p) >= 0) continue;\r\n    if (this.hasOwnProperty(p) && !other.hasOwnProperty(p)) return false;\r\n    if (this[p] !== other[p]) return false;\r\n    count++;\r\n  }\r\n  for (p in other) {\r\n    if (other.hasOwnProperty(p) && ignore.indexOf(p) < 0) count--;\r\n  }\r\n  return count === 0;\r\n};\r\n\r\nfunction Pattern(gState, matrix) {\r\n  this.gState = gState;\r\n  this.matrix = matrix;\r\n\r\n  this.id = \"\"; // set by addPattern()\r\n  this.objectNumber = -1; // will be set by putPattern()\r\n}\r\n\r\nfunction ShadingPattern(type, coords, colors, gState, matrix) {\r\n  if (!(this instanceof ShadingPattern)) {\r\n    return new ShadingPattern(type, coords, colors, gState, matrix);\r\n  }\r\n\r\n  // see putPattern() for information how they are realized\r\n  this.type = type === \"axial\" ? 2 : 3;\r\n  this.coords = coords;\r\n  this.colors = colors;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\nfunction TilingPattern(boundingBox, xStep, yStep, gState, matrix) {\r\n  if (!(this instanceof TilingPattern)) {\r\n    return new TilingPattern(boundingBox, xStep, yStep, gState, matrix);\r\n  }\r\n\r\n  this.boundingBox = boundingBox;\r\n  this.xStep = xStep;\r\n  this.yStep = yStep;\r\n\r\n  this.stream = \"\"; // set by endTilingPattern();\r\n\r\n  this.cloneIndex = 0;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\n/**\r\n * Creates new jsPDF document object instance.\r\n * @name jsPDF\r\n * @class\r\n * @param {Object} [options] - Collection of settings initializing the jsPDF-instance\r\n * @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" or \"l\").<br />\r\n * @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />\r\n * Possible values are \"pt\" (points), \"mm\", \"cm\", \"in\", \"px\", \"pc\", \"em\" or \"ex\". Note that in order to get the correct scaling for \"px\"\r\n * units, you need to enable the hotfix \"px_scaling\" by setting options.hotfixes = [\"px_scaling\"].\r\n * @param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n * @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.\r\n * @param {boolean} [options.compress=false] Compress the generated PDF.\r\n * @param {number} [options.precision=16] Precision of the element-positions.\r\n * @param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.\r\n * @param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.\r\n * @param {Object} [options.encryption]\r\n * @param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.\r\n * @param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.\r\n * @param {string[]} [options.encryption.userPermissions] Array of permissions \"print\", \"modify\", \"copy\", \"annot-forms\", accessible by the user.\r\n * @param {number|\"smart\"} [options.floatPrecision=16]\r\n * @returns {jsPDF} jsPDF-instance\r\n * @description\r\n * ```\r\n * {\r\n *  orientation: 'p',\r\n *  unit: 'mm',\r\n *  format: 'a4',\r\n *  putOnlyUsedFonts:true,\r\n *  floatPrecision: 16 // or \"smart\", default is 16\r\n * }\r\n * ```\r\n *\r\n * @constructor\r\n */\r\nfunction jsPDF(options) {\r\n  var orientation = typeof arguments[0] === \"string\" ? arguments[0] : \"p\";\r\n  var unit = arguments[1];\r\n  var format = arguments[2];\r\n  var compressPdf = arguments[3];\r\n  var filters = [];\r\n  var userUnit = 1.0;\r\n  var precision;\r\n  var floatPrecision = 16;\r\n  var defaultPathOperation = \"S\";\r\n  var encryptionOptions = null;\r\n\r\n  options = options || {};\r\n\r\n  if (typeof options === \"object\") {\r\n    orientation = options.orientation;\r\n    unit = options.unit || unit;\r\n    format = options.format || format;\r\n    compressPdf = options.compress || options.compressPdf || compressPdf;\r\n    encryptionOptions = options.encryption || null;\r\n    if (encryptionOptions !== null) {\r\n      encryptionOptions.userPassword = encryptionOptions.userPassword || \"\";\r\n      encryptionOptions.ownerPassword = encryptionOptions.ownerPassword || \"\";\r\n      encryptionOptions.userPermissions =\r\n        encryptionOptions.userPermissions || [];\r\n    }\r\n    userUnit =\r\n      typeof options.userUnit === \"number\" ? Math.abs(options.userUnit) : 1.0;\r\n    if (typeof options.precision !== \"undefined\") {\r\n      precision = options.precision;\r\n    }\r\n    if (typeof options.floatPrecision !== \"undefined\") {\r\n      floatPrecision = options.floatPrecision;\r\n    }\r\n    defaultPathOperation = options.defaultPathOperation || \"S\";\r\n  }\r\n\r\n  filters =\r\n    options.filters || (compressPdf === true ? [\"FlateEncode\"] : filters);\r\n\r\n  unit = unit || \"mm\";\r\n  orientation = (\"\" + (orientation || \"P\")).toLowerCase();\r\n  var putOnlyUsedFonts = options.putOnlyUsedFonts || false;\r\n  var usedFonts = {};\r\n\r\n  var API = {\r\n    internal: {},\r\n    __private__: {}\r\n  };\r\n\r\n  API.__private__.PubSub = PubSub;\r\n\r\n  var pdfVersion = \"1.3\";\r\n  var getPdfVersion = (API.__private__.getPdfVersion = function() {\r\n    return pdfVersion;\r\n  });\r\n\r\n  API.__private__.setPdfVersion = function(value) {\r\n    pdfVersion = value;\r\n  };\r\n\r\n  // Size in pt of various paper formats\r\n  var pageFormats = {\r\n    a0: [2383.94, 3370.39],\r\n    a1: [1683.78, 2383.94],\r\n    a2: [1190.55, 1683.78],\r\n    a3: [841.89, 1190.55],\r\n    a4: [595.28, 841.89],\r\n    a5: [419.53, 595.28],\r\n    a6: [297.64, 419.53],\r\n    a7: [209.76, 297.64],\r\n    a8: [147.4, 209.76],\r\n    a9: [104.88, 147.4],\r\n    a10: [73.7, 104.88],\r\n    b0: [2834.65, 4008.19],\r\n    b1: [2004.09, 2834.65],\r\n    b2: [1417.32, 2004.09],\r\n    b3: [1000.63, 1417.32],\r\n    b4: [708.66, 1000.63],\r\n    b5: [498.9, 708.66],\r\n    b6: [354.33, 498.9],\r\n    b7: [249.45, 354.33],\r\n    b8: [175.75, 249.45],\r\n    b9: [124.72, 175.75],\r\n    b10: [87.87, 124.72],\r\n    c0: [2599.37, 3676.54],\r\n    c1: [1836.85, 2599.37],\r\n    c2: [1298.27, 1836.85],\r\n    c3: [918.43, 1298.27],\r\n    c4: [649.13, 918.43],\r\n    c5: [459.21, 649.13],\r\n    c6: [323.15, 459.21],\r\n    c7: [229.61, 323.15],\r\n    c8: [161.57, 229.61],\r\n    c9: [113.39, 161.57],\r\n    c10: [79.37, 113.39],\r\n    dl: [311.81, 623.62],\r\n    letter: [612, 792],\r\n    \"government-letter\": [576, 756],\r\n    legal: [612, 1008],\r\n    \"junior-legal\": [576, 360],\r\n    ledger: [1224, 792],\r\n    tabloid: [792, 1224],\r\n    \"credit-card\": [153, 243]\r\n  };\r\n\r\n  API.__private__.getPageFormats = function() {\r\n    return pageFormats;\r\n  };\r\n\r\n  var getPageFormat = (API.__private__.getPageFormat = function(value) {\r\n    return pageFormats[value];\r\n  });\r\n\r\n  format = format || \"a4\";\r\n\r\n  var ApiMode = {\r\n    COMPAT: \"compat\",\r\n    ADVANCED: \"advanced\"\r\n  };\r\n  var apiMode = ApiMode.COMPAT;\r\n\r\n  function advancedAPI() {\r\n    // prepend global change of basis matrix\r\n    // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix\r\n    // that does this job for us (however, texts, images and similar objects must be drawn bottom up))\r\n    this.saveGraphicsState();\r\n    out(\r\n      new Matrix(\r\n        scaleFactor,\r\n        0,\r\n        0,\r\n        -scaleFactor,\r\n        0,\r\n        getPageHeight() * scaleFactor\r\n      ).toString() + \" cm\"\r\n    );\r\n    this.setFontSize(this.getFontSize() / scaleFactor);\r\n\r\n    // The default in MrRio's implementation is \"S\" (stroke), whereas the default in the yWorks implementation\r\n    // was \"n\" (none). Although this has nothing to do with transforms, we should use the API switch here.\r\n    defaultPathOperation = \"n\";\r\n\r\n    apiMode = ApiMode.ADVANCED;\r\n  }\r\n\r\n  function compatAPI() {\r\n    this.restoreGraphicsState();\r\n    defaultPathOperation = \"S\";\r\n    apiMode = ApiMode.COMPAT;\r\n  }\r\n\r\n  /**\r\n   * @function combineFontStyleAndFontWeight\r\n   * @param {string} fontStyle Fontstyle or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @returns {string}\r\n   * @private\r\n   */\r\n  var combineFontStyleAndFontWeight = (API.__private__.combineFontStyleAndFontWeight = function(\r\n    fontStyle,\r\n    fontWeight\r\n  ) {\r\n    if (\r\n      (fontStyle == \"bold\" && fontWeight == \"normal\") ||\r\n      (fontStyle == \"bold\" && fontWeight == 400) ||\r\n      (fontStyle == \"normal\" && fontWeight == \"italic\") ||\r\n      (fontStyle == \"bold\" && fontWeight == \"italic\")\r\n    ) {\r\n      throw new Error(\"Invalid Combination of fontweight and fontstyle\");\r\n    }\r\n    if (fontWeight) {\r\n      fontStyle =\r\n        fontWeight == 400 || fontWeight === \"normal\"\r\n          ? fontStyle === \"italic\"\r\n            ? \"italic\"\r\n            : \"normal\"\r\n          : (fontWeight == 700 || fontWeight === \"bold\") &&\r\n            fontStyle === \"normal\"\r\n          ? \"bold\"\r\n          : (fontWeight == 700 ? \"bold\" : fontWeight) + \"\" + fontStyle;\r\n    }\r\n    return fontStyle;\r\n  });\r\n\r\n  /**\r\n   * @callback ApiSwitchBody\r\n   * @param {jsPDF} pdf\r\n   */\r\n\r\n  /**\r\n   * For compatibility reasons jsPDF offers two API modes which differ in the way they convert between the the usual\r\n   * screen coordinates and the PDF coordinate system.\r\n   *   - \"compat\": Offers full compatibility across all plugins but does not allow arbitrary transforms\r\n   *   - \"advanced\": Allows arbitrary transforms and more advanced features like pattern fills. Some plugins might\r\n   *     not support this mode, though.\r\n   * Initial mode is \"compat\".\r\n   *\r\n   * You can either provide a callback to the body argument, which means that jsPDF will automatically switch back to\r\n   * the original API mode afterwards; or you can omit the callback and switch back manually using {@link compatAPI}.\r\n   *\r\n   * Note, that the calls to {@link saveGraphicsState} and {@link restoreGraphicsState} need to be balanced within the\r\n   * callback or between calls of this method and its counterpart {@link compatAPI}. Calls to {@link beginFormObject}\r\n   * or {@link beginTilingPattern} need to be closed by their counterparts before switching back to \"compat\" API mode.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name advancedAPI\r\n   */\r\n  API.advancedAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.COMPAT;\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Switches to \"compat\" API mode. See {@link advancedAPI} for more details.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @return {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name compatApi\r\n   */\r\n  API.compatAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.ADVANCED;\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @return {boolean} True iff the current API mode is \"advanced\". See {@link advancedAPI}.\r\n   * @memberof jsPDF#\r\n   * @name isAdvancedAPI\r\n   */\r\n  API.isAdvancedAPI = function() {\r\n    return apiMode === ApiMode.ADVANCED;\r\n  };\r\n\r\n  var advancedApiModeTrap = function(methodName) {\r\n    if (apiMode !== ApiMode.ADVANCED) {\r\n      throw new Error(\r\n        methodName +\r\n          \" is only available in 'advanced' API mode. \" +\r\n          \"You need to call advancedAPI() first.\"\r\n      );\r\n    }\r\n  };\r\n\r\n  var roundToPrecision = (API.roundToPrecision = API.__private__.roundToPrecision = function(\r\n    number,\r\n    parmPrecision\r\n  ) {\r\n    var tmpPrecision = precision || parmPrecision;\r\n    if (isNaN(number) || isNaN(tmpPrecision)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.roundToPrecision\");\r\n    }\r\n    return number.toFixed(tmpPrecision).replace(/0+$/, \"\");\r\n  });\r\n\r\n  // high precision float\r\n  var hpf;\r\n  if (typeof floatPrecision === \"number\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, floatPrecision);\r\n    };\r\n  } else if (floatPrecision === \"smart\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      if (number > -1 && number < 1) {\r\n        return roundToPrecision(number, 16);\r\n      } else {\r\n        return roundToPrecision(number, 5);\r\n      }\r\n    };\r\n  } else {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, 16);\r\n    };\r\n  }\r\n  var f2 = (API.f2 = API.__private__.f2 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f2\");\r\n    }\r\n    return roundToPrecision(number, 2);\r\n  });\r\n\r\n  var f3 = (API.__private__.f3 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f3\");\r\n    }\r\n    return roundToPrecision(number, 3);\r\n  });\r\n\r\n  var scale = (API.scale = API.__private__.scale = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.scale\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return number * scaleFactor;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return number;\r\n    }\r\n  });\r\n\r\n  var transformY = function(y) {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return getPageHeight() - y;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return y;\r\n    }\r\n  };\r\n\r\n  var transformScaleY = function(y) {\r\n    return scale(transformY(y));\r\n  };\r\n\r\n  /**\r\n   * @name setPrecision\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} precision\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setPrecision = API.setPrecision = function(value) {\r\n    if (typeof parseInt(value, 10) === \"number\") {\r\n      precision = parseInt(value, 10);\r\n    }\r\n  };\r\n\r\n  var fileId = \"00000000000000000000000000000000\";\r\n\r\n  var getFileId = (API.__private__.getFileId = function() {\r\n    return fileId;\r\n  });\r\n\r\n  var setFileId = (API.__private__.setFileId = function(value) {\r\n    if (typeof value !== \"undefined\" && /^[a-fA-F0-9]{32}$/.test(value)) {\r\n      fileId = value.toUpperCase();\r\n    } else {\r\n      fileId = fileId\r\n        .split(\"\")\r\n        .map(function() {\r\n          return \"ABCDEF0123456789\".charAt(Math.floor(Math.random() * 16));\r\n        })\r\n        .join(\"\");\r\n    }\r\n\r\n    if (encryptionOptions !== null) {\r\n      encryption = new PDFSecurity(\r\n        encryptionOptions.userPermissions,\r\n        encryptionOptions.userPassword,\r\n        encryptionOptions.ownerPassword,\r\n        fileId\r\n      );\r\n    }\r\n    return fileId;\r\n  });\r\n\r\n  /**\r\n   * @name setFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} value GUID.\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setFileId = function(value) {\r\n    setFileId(value);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   *\r\n   * @returns {string} GUID.\r\n   */\r\n  API.getFileId = function() {\r\n    return getFileId();\r\n  };\r\n\r\n  var creationDate;\r\n\r\n  var convertDateToPDFDate = (API.__private__.convertDateToPDFDate = function(\r\n    parmDate\r\n  ) {\r\n    var result = \"\";\r\n    var tzoffset = parmDate.getTimezoneOffset(),\r\n      tzsign = tzoffset < 0 ? \"+\" : \"-\",\r\n      tzhour = Math.floor(Math.abs(tzoffset / 60)),\r\n      tzmin = Math.abs(tzoffset % 60),\r\n      timeZoneString = [tzsign, padd2(tzhour), \"'\", padd2(tzmin), \"'\"].join(\"\");\r\n\r\n    result = [\r\n      \"D:\",\r\n      parmDate.getFullYear(),\r\n      padd2(parmDate.getMonth() + 1),\r\n      padd2(parmDate.getDate()),\r\n      padd2(parmDate.getHours()),\r\n      padd2(parmDate.getMinutes()),\r\n      padd2(parmDate.getSeconds()),\r\n      timeZoneString\r\n    ].join(\"\");\r\n    return result;\r\n  });\r\n\r\n  var convertPDFDateToDate = (API.__private__.convertPDFDateToDate = function(\r\n    parmPDFDate\r\n  ) {\r\n    var year = parseInt(parmPDFDate.substr(2, 4), 10);\r\n    var month = parseInt(parmPDFDate.substr(6, 2), 10) - 1;\r\n    var date = parseInt(parmPDFDate.substr(8, 2), 10);\r\n    var hour = parseInt(parmPDFDate.substr(10, 2), 10);\r\n    var minutes = parseInt(parmPDFDate.substr(12, 2), 10);\r\n    var seconds = parseInt(parmPDFDate.substr(14, 2), 10);\r\n    // var timeZoneHour = parseInt(parmPDFDate.substr(16, 2), 10);\r\n    // var timeZoneMinutes = parseInt(parmPDFDate.substr(20, 2), 10);\r\n\r\n    var resultingDate = new Date(year, month, date, hour, minutes, seconds, 0);\r\n    return resultingDate;\r\n  });\r\n\r\n  var setCreationDate = (API.__private__.setCreationDate = function(date) {\r\n    var tmpCreationDateString;\r\n    var regexPDFCreationDate = /^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])'?$/;\r\n    if (typeof date === \"undefined\") {\r\n      date = new Date();\r\n    }\r\n\r\n    if (date instanceof Date) {\r\n      tmpCreationDateString = convertDateToPDFDate(date);\r\n    } else if (regexPDFCreationDate.test(date)) {\r\n      tmpCreationDateString = date;\r\n    } else {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCreationDate\");\r\n    }\r\n    creationDate = tmpCreationDateString;\r\n    return creationDate;\r\n  });\r\n\r\n  var getCreationDate = (API.__private__.getCreationDate = function(type) {\r\n    var result = creationDate;\r\n    if (type === \"jsDate\") {\r\n      result = convertPDFDateToDate(creationDate);\r\n    }\r\n    return result;\r\n  });\r\n\r\n  /**\r\n   * @name setCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} date\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setCreationDate = function(date) {\r\n    setCreationDate(date);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} type\r\n   * @returns {Object}\r\n   */\r\n  API.getCreationDate = function(type) {\r\n    return getCreationDate(type);\r\n  };\r\n\r\n  var padd2 = (API.__private__.padd2 = function(number) {\r\n    return (\"0\" + parseInt(number)).slice(-2);\r\n  });\r\n\r\n  var padd2Hex = (API.__private__.padd2Hex = function(hexString) {\r\n    hexString = hexString.toString();\r\n    return (\"00\" + hexString).substr(hexString.length);\r\n  });\r\n\r\n  var objectNumber = 0; // 'n' Current object number\r\n  var offsets = []; // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.\r\n  var content = [];\r\n  var contentLength = 0;\r\n  var additionalObjects = [];\r\n\r\n  var pages = [];\r\n  var currentPage;\r\n  var hasCustomDestination = false;\r\n  var outputDestination = content;\r\n\r\n  var resetDocument = function() {\r\n    //reset fields relevant for objectNumber generation and xref.\r\n    objectNumber = 0;\r\n    contentLength = 0;\r\n    content = [];\r\n    offsets = [];\r\n    additionalObjects = [];\r\n\r\n    rootDictionaryObjId = newObjectDeferred();\r\n    resourceDictionaryObjId = newObjectDeferred();\r\n  };\r\n\r\n  API.__private__.setCustomOutputDestination = function(destination) {\r\n    hasCustomDestination = true;\r\n    outputDestination = destination;\r\n  };\r\n  var setOutputDestination = function(destination) {\r\n    if (!hasCustomDestination) {\r\n      outputDestination = destination;\r\n    }\r\n  };\r\n\r\n  API.__private__.resetCustomOutputDestination = function() {\r\n    hasCustomDestination = false;\r\n    outputDestination = content;\r\n  };\r\n\r\n  var out = (API.__private__.out = function(string) {\r\n    string = string.toString();\r\n    contentLength += string.length + 1;\r\n    outputDestination.push(string);\r\n\r\n    return outputDestination;\r\n  });\r\n\r\n  var write = (API.__private__.write = function(value) {\r\n    return out(\r\n      arguments.length === 1\r\n        ? value.toString()\r\n        : Array.prototype.join.call(arguments, \" \")\r\n    );\r\n  });\r\n\r\n  var getArrayBuffer = (API.__private__.getArrayBuffer = function(data) {\r\n    var len = data.length,\r\n      ab = new ArrayBuffer(len),\r\n      u8 = new Uint8Array(ab);\r\n\r\n    while (len--) u8[len] = data.charCodeAt(len);\r\n    return ab;\r\n  });\r\n\r\n  var standardFonts = [\r\n    [\"Helvetica\", \"helvetica\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Bold\", \"helvetica\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Oblique\", \"helvetica\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-BoldOblique\", \"helvetica\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Courier\", \"courier\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Bold\", \"courier\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Oblique\", \"courier\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Courier-BoldOblique\", \"courier\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Times-Roman\", \"times\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Times-Bold\", \"times\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Times-Italic\", \"times\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Times-BoldItalic\", \"times\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"ZapfDingbats\", \"zapfdingbats\", \"normal\", null],\r\n    [\"Symbol\", \"symbol\", \"normal\", null]\r\n  ];\r\n\r\n  API.__private__.getStandardFonts = function() {\r\n    return standardFonts;\r\n  };\r\n\r\n  var activeFontSize = options.fontSize || 16;\r\n\r\n  /**\r\n   * Sets font size for upcoming text elements.\r\n   *\r\n   * @param {number} size Font size in points.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFontSize\r\n   */\r\n  API.__private__.setFontSize = API.setFontSize = function(size) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      activeFontSize = size / scaleFactor;\r\n    } else {\r\n      activeFontSize = size;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets the fontsize for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number}\r\n   * @memberof jsPDF#\r\n   * @name getFontSize\r\n   */\r\n  var getFontSize = (API.__private__.getFontSize = API.getFontSize = function() {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return activeFontSize;\r\n    } else {\r\n      return activeFontSize * scaleFactor;\r\n    }\r\n  });\r\n\r\n  var R2L = options.R2L || false;\r\n\r\n  /**\r\n   * Set value of R2L functionality.\r\n   *\r\n   * @param {boolean} value\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setR2L\r\n   */\r\n  API.__private__.setR2L = API.setR2L = function(value) {\r\n    R2L = value;\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Get value of R2L functionality.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {boolean} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name getR2L\r\n   */\r\n  API.__private__.getR2L = API.getR2L = function() {\r\n    return R2L;\r\n  };\r\n\r\n  var zoomMode; // default: 1;\r\n\r\n  var setZoomMode = (API.__private__.setZoomMode = function(zoom) {\r\n    var validZoomModes = [\r\n      undefined,\r\n      null,\r\n      \"fullwidth\",\r\n      \"fullheight\",\r\n      \"fullpage\",\r\n      \"original\"\r\n    ];\r\n\r\n    if (/^(?:\\d+\\.\\d*|\\d*\\.\\d+|\\d+)%$/.test(zoom)) {\r\n      zoomMode = zoom;\r\n    } else if (!isNaN(zoom)) {\r\n      zoomMode = parseInt(zoom, 10);\r\n    } else if (validZoomModes.indexOf(zoom) !== -1) {\r\n      zoomMode = zoom;\r\n    } else {\r\n      throw new Error(\r\n        'zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. \"' +\r\n          zoom +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n  });\r\n\r\n  API.__private__.getZoomMode = function() {\r\n    return zoomMode;\r\n  };\r\n\r\n  var pageMode; // default: 'UseOutlines';\r\n  var setPageMode = (API.__private__.setPageMode = function(pmode) {\r\n    var validPageModes = [\r\n      undefined,\r\n      null,\r\n      \"UseNone\",\r\n      \"UseOutlines\",\r\n      \"UseThumbs\",\r\n      \"FullScreen\"\r\n    ];\r\n\r\n    if (validPageModes.indexOf(pmode) == -1) {\r\n      throw new Error(\r\n        'Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. \"' +\r\n          pmode +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    pageMode = pmode;\r\n  });\r\n\r\n  API.__private__.getPageMode = function() {\r\n    return pageMode;\r\n  };\r\n\r\n  var layoutMode; // default: 'continuous';\r\n  var setLayoutMode = (API.__private__.setLayoutMode = function(layout) {\r\n    var validLayoutModes = [\r\n      undefined,\r\n      null,\r\n      \"continuous\",\r\n      \"single\",\r\n      \"twoleft\",\r\n      \"tworight\",\r\n      \"two\"\r\n    ];\r\n\r\n    if (validLayoutModes.indexOf(layout) == -1) {\r\n      throw new Error(\r\n        'Layout mode must be one of continuous, single, twoleft, tworight. \"' +\r\n          layout +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    layoutMode = layout;\r\n  });\r\n\r\n  API.__private__.getLayoutMode = function() {\r\n    return layoutMode;\r\n  };\r\n\r\n  /**\r\n   * Set the display mode options of the page like zoom and layout.\r\n   *\r\n   * @name setDisplayMode\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {integer|String} zoom   You can pass an integer or percentage as\r\n   * a string. 2 will scale the document up 2x, '200%' will scale up by the\r\n   * same amount. You can also set it to 'fullwidth', 'fullheight',\r\n   * 'fullpage', or 'original'.\r\n   *\r\n   * Only certain PDF readers support this, such as Adobe Acrobat.\r\n   *\r\n   * @param {string} layout Layout mode can be: 'continuous' - this is the\r\n   * default continuous scroll. 'single' - the single page mode only shows one\r\n   * page at a time. 'twoleft' - two column left mode, first page starts on\r\n   * the left, and 'tworight' - pages are laid out in two columns, with the\r\n   * first page on the right. This would be used for books.\r\n   * @param {string} pmode 'UseOutlines' - it shows the\r\n   * outline of the document on the left. 'UseThumbs' - shows thumbnails along\r\n   * the left. 'FullScreen' - prompts the user to enter fullscreen mode.\r\n   *\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setDisplayMode = API.setDisplayMode = function(\r\n    zoom,\r\n    layout,\r\n    pmode\r\n  ) {\r\n    setZoomMode(zoom);\r\n    setLayoutMode(layout);\r\n    setPageMode(pmode);\r\n    return this;\r\n  };\r\n\r\n  var documentProperties = {\r\n    title: \"\",\r\n    subject: \"\",\r\n    author: \"\",\r\n    keywords: \"\",\r\n    creator: \"\"\r\n  };\r\n\r\n  API.__private__.getDocumentProperty = function(key) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getDocumentProperty\");\r\n    }\r\n    return documentProperties[key];\r\n  };\r\n\r\n  API.__private__.getDocumentProperties = function() {\r\n    return documentProperties;\r\n  };\r\n\r\n  /**\r\n   * Adds a properties to the PDF document.\r\n   *\r\n   * @param {Object} A property_name-to-property_value object structure.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDocumentProperties\r\n   */\r\n  API.__private__.setDocumentProperties = API.setProperties = API.setDocumentProperties = function(\r\n    properties\r\n  ) {\r\n    // copying only those properties we can render.\r\n    for (var property in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(property) && properties[property]) {\r\n        documentProperties[property] = properties[property];\r\n      }\r\n    }\r\n    return this;\r\n  };\r\n\r\n  API.__private__.setDocumentProperty = function(key, value) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setDocumentProperty\");\r\n    }\r\n    return (documentProperties[key] = value);\r\n  };\r\n\r\n  var fonts = {}; // collection of font objects, where key is fontKey - a dynamically created label for a given font.\r\n  var fontmap = {}; // mapping structure fontName > fontStyle > font key - performance layer. See addFont()\r\n  var activeFontKey; // will be string representing the KEY of the font as combination of fontName + fontStyle\r\n  var fontStateStack = []; //\r\n  var patterns = {}; // collection of pattern objects\r\n  var patternMap = {}; // see fonts\r\n  var gStates = {}; // collection of graphic state objects\r\n  var gStatesMap = {}; // see fonts\r\n  var activeGState = null;\r\n  var scaleFactor; // Scale factor\r\n  var page = 0;\r\n  var pagesContext = [];\r\n  var events = new PubSub(API);\r\n  var hotfixes = options.hotfixes || [];\r\n\r\n  var renderTargets = {};\r\n  var renderTargetMap = {};\r\n  var renderTargetStack = [];\r\n  var pageX;\r\n  var pageY;\r\n  var pageMatrix; // only used for FormObjects\r\n\r\n  /**\r\n   * A matrix object for 2D homogenous transformations: <br>\r\n   * | a b 0 | <br>\r\n   * | c d 0 | <br>\r\n   * | e f 1 | <br>\r\n   * pdf multiplies matrices righthand: v' = v x m1 x m2 x ...\r\n   *\r\n   * @class\r\n   * @name Matrix\r\n   * @param {number} sx\r\n   * @param {number} shy\r\n   * @param {number} shx\r\n   * @param {number} sy\r\n   * @param {number} tx\r\n   * @param {number} ty\r\n   * @constructor\r\n   */\r\n  var Matrix = function(sx, shy, shx, sy, tx, ty) {\r\n    if (!(this instanceof Matrix)) {\r\n      return new Matrix(sx, shy, shx, sy, tx, ty);\r\n    }\r\n\r\n    if (isNaN(sx)) sx = 1;\r\n    if (isNaN(shy)) shy = 0;\r\n    if (isNaN(shx)) shx = 0;\r\n    if (isNaN(sy)) sy = 1;\r\n    if (isNaN(tx)) tx = 0;\r\n    if (isNaN(ty)) ty = 0;\r\n\r\n    this._matrix = [sx, shy, shx, sy, tx, ty];\r\n  };\r\n\r\n  /**\r\n   * @name sx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sx\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shy\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shx\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name sy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sy\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name tx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"tx\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name ty\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"ty\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"a\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"b\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"c\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"d\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"e\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"f\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name rotation\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"rotation\", {\r\n    get: function() {\r\n      return Math.atan2(this.shx, this.sx);\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleX\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleX\", {\r\n    get: function() {\r\n      return this.decompose().scale.sx;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleY\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleY\", {\r\n    get: function() {\r\n      return this.decompose().scale.sy;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name isIdentity\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"isIdentity\", {\r\n    get: function() {\r\n      if (this.sx !== 1) {\r\n        return false;\r\n      }\r\n      if (this.shy !== 0) {\r\n        return false;\r\n      }\r\n      if (this.shx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.sy !== 1) {\r\n        return false;\r\n      }\r\n      if (this.tx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.ty !== 0) {\r\n        return false;\r\n      }\r\n      return true;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * Join the Matrix Values to a String\r\n   *\r\n   * @function join\r\n   * @param {string} separator Specifies a string to separate each pair of adjacent elements of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma (\",\"). If separator is an empty string, all elements are joined without any characters in between them.\r\n   * @returns {string} A string with all array elements joined.\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.join = function(separator) {\r\n    return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty]\r\n      .map(hpf)\r\n      .join(separator);\r\n  };\r\n\r\n  /**\r\n   * Multiply the matrix with given Matrix\r\n   *\r\n   * @function multiply\r\n   * @param matrix\r\n   * @returns {Matrix}\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.multiply = function(matrix) {\r\n    var sx = matrix.sx * this.sx + matrix.shy * this.shx;\r\n    var shy = matrix.sx * this.shy + matrix.shy * this.sy;\r\n    var shx = matrix.shx * this.sx + matrix.sy * this.shx;\r\n    var sy = matrix.shx * this.shy + matrix.sy * this.sy;\r\n    var tx = matrix.tx * this.sx + matrix.ty * this.shx + this.tx;\r\n    var ty = matrix.tx * this.shy + matrix.ty * this.sy + this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  /**\r\n   * @function decompose\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.decompose = function() {\r\n    var a = this.sx;\r\n    var b = this.shy;\r\n    var c = this.shx;\r\n    var d = this.sy;\r\n    var e = this.tx;\r\n    var f = this.ty;\r\n\r\n    var scaleX = Math.sqrt(a * a + b * b);\r\n    a /= scaleX;\r\n    b /= scaleX;\r\n\r\n    var shear = a * c + b * d;\r\n    c -= a * shear;\r\n    d -= b * shear;\r\n\r\n    var scaleY = Math.sqrt(c * c + d * d);\r\n    c /= scaleY;\r\n    d /= scaleY;\r\n    shear /= scaleY;\r\n\r\n    if (a * d < b * c) {\r\n      a = -a;\r\n      b = -b;\r\n      shear = -shear;\r\n      scaleX = -scaleX;\r\n    }\r\n\r\n    return {\r\n      scale: new Matrix(scaleX, 0, 0, scaleY, 0, 0),\r\n      translate: new Matrix(1, 0, 0, 1, e, f),\r\n      rotate: new Matrix(a, b, -b, a, 0, 0),\r\n      skew: new Matrix(1, 0, shear, 1, 0, 0)\r\n    };\r\n  };\r\n\r\n  /**\r\n   * @function toString\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.toString = function(parmPrecision) {\r\n    return this.join(\" \");\r\n  };\r\n\r\n  /**\r\n   * @function inversed\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.inversed = function() {\r\n    var a = this.sx,\r\n      b = this.shy,\r\n      c = this.shx,\r\n      d = this.sy,\r\n      e = this.tx,\r\n      f = this.ty;\r\n\r\n    var quot = 1 / (a * d - b * c);\r\n\r\n    var aInv = d * quot;\r\n    var bInv = -b * quot;\r\n    var cInv = -c * quot;\r\n    var dInv = a * quot;\r\n    var eInv = -aInv * e - cInv * f;\r\n    var fInv = -bInv * e - dInv * f;\r\n\r\n    return new Matrix(aInv, bInv, cInv, dInv, eInv, fInv);\r\n  };\r\n\r\n  /**\r\n   * @function applyToPoint\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToPoint = function(pt) {\r\n    var x = pt.x * this.sx + pt.y * this.shx + this.tx;\r\n    var y = pt.x * this.shy + pt.y * this.sy + this.ty;\r\n    return new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * @function applyToRectangle\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToRectangle = function(rect) {\r\n    var pt1 = this.applyToPoint(rect);\r\n    var pt2 = this.applyToPoint(new Point(rect.x + rect.w, rect.y + rect.h));\r\n    return new Rectangle(pt1.x, pt1.y, pt2.x - pt1.x, pt2.y - pt1.y);\r\n  };\r\n\r\n  /**\r\n   * Clone the Matrix\r\n   *\r\n   * @function clone\r\n   * @memberof Matrix#\r\n   * @name clone\r\n   * @instance\r\n   */\r\n  Matrix.prototype.clone = function() {\r\n    var sx = this.sx;\r\n    var shy = this.shy;\r\n    var shx = this.shx;\r\n    var sy = this.sy;\r\n    var tx = this.tx;\r\n    var ty = this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  API.Matrix = Matrix;\r\n\r\n  /**\r\n   * Multiplies two matrices. (see {@link Matrix})\r\n   * @param {Matrix} m1\r\n   * @param {Matrix} m2\r\n   * @memberof jsPDF#\r\n   * @name matrixMult\r\n   */\r\n  var matrixMult = (API.matrixMult = function(m1, m2) {\r\n    return m2.multiply(m1);\r\n  });\r\n\r\n  /**\r\n   * The identity matrix (equivalent to new Matrix(1, 0, 0, 1, 0, 0)).\r\n   * @type {Matrix}\r\n   * @memberof! jsPDF#\r\n   * @name identityMatrix\r\n   */\r\n  var identityMatrix = new Matrix(1, 0, 0, 1, 0, 0);\r\n  API.unitMatrix = API.identityMatrix = identityMatrix;\r\n\r\n  /**\r\n   * Adds a new pattern for later use.\r\n   * @param {String} key The key by it can be referenced later. The keys must be unique!\r\n   * @param {API.Pattern} pattern The pattern\r\n   */\r\n  var addPattern = function(key, pattern) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (patternMap[key]) return;\r\n\r\n    var prefix = pattern instanceof ShadingPattern ? \"Sh\" : \"P\";\r\n    var patternKey = prefix + (Object.keys(patterns).length + 1).toString(10);\r\n    pattern.id = patternKey;\r\n\r\n    patternMap[key] = patternKey;\r\n    patterns[patternKey] = pattern;\r\n\r\n    events.publish(\"addPattern\", pattern);\r\n  };\r\n\r\n  /**\r\n   * A pattern describing a shading pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {String} type One of \"axial\" or \"radial\"\r\n   * @param {Array<Number>} coords Either [x1, y1, x2, y2] for \"axial\" type describing the two interpolation points\r\n   * or [x1, y1, r, x2, y2, r2] for \"radial\" describing inner and the outer circle.\r\n   * @param {Array<Object>} colors An array of objects with the fields \"offset\" and \"color\". \"offset\" describes\r\n   * the offset in parameter space [0, 1]. \"color\" is an array of length 3 describing RGB values in [0, 255].\r\n   * @param {GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.ShadingPattern = ShadingPattern;\r\n\r\n  /**\r\n   * A PDF Tiling pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {Array.<Number>} boundingBox The bounding box at which one pattern cell gets clipped.\r\n   * @param {Number} xStep Horizontal spacing between pattern cells.\r\n   * @param {Number} yStep Vertical spacing between pattern cells.\r\n   * @param {API.GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.TilingPattern = TilingPattern;\r\n\r\n  /**\r\n   * Adds a new {@link API.ShadingPattern} for later use. Only available in \"advanced\" API mode.\r\n   * @param {String} key\r\n   * @param {Pattern} pattern\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name addPattern\r\n   */\r\n  API.addShadingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"addShadingPattern()\");\r\n\r\n    addPattern(key, pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Begins a new tiling pattern. All subsequent render calls are drawn to this pattern until {@link API.endTilingPattern}\r\n   * gets called. Only available in \"advanced\" API mode.\r\n   * @param {API.Pattern} pattern\r\n   * @memberof jsPDF#\r\n   * @name beginTilingPattern\r\n   */\r\n  API.beginTilingPattern = function(pattern) {\r\n    advancedApiModeTrap(\"beginTilingPattern()\");\r\n\r\n    beginNewRenderTarget(\r\n      pattern.boundingBox[0],\r\n      pattern.boundingBox[1],\r\n      pattern.boundingBox[2] - pattern.boundingBox[0],\r\n      pattern.boundingBox[3] - pattern.boundingBox[1],\r\n      pattern.matrix\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Ends a tiling pattern and sets the render target to the one active before {@link API.beginTilingPattern} has been called.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {string} key A unique key that is used to reference this pattern at later use.\r\n   * @param {API.Pattern} pattern The pattern to end.\r\n   * @memberof jsPDF#\r\n   * @name endTilingPattern\r\n   */\r\n  API.endTilingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"endTilingPattern()\");\r\n\r\n    // retrieve the stream\r\n    pattern.stream = pages[currentPage].join(\"\\n\");\r\n\r\n    addPattern(key, pattern);\r\n\r\n    events.publish(\"endTilingPattern\", pattern);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  var newObject = (API.__private__.newObject = function() {\r\n    var oid = newObjectDeferred();\r\n    newObjectDeferredBegin(oid, true);\r\n    return oid;\r\n  });\r\n\r\n  // Does not output the object.  The caller must call newObjectDeferredBegin(oid) before outputing any data\r\n  var newObjectDeferred = (API.__private__.newObjectDeferred = function() {\r\n    objectNumber++;\r\n    offsets[objectNumber] = function() {\r\n      return contentLength;\r\n    };\r\n    return objectNumber;\r\n  });\r\n\r\n  var newObjectDeferredBegin = function(oid, doOutput) {\r\n    doOutput = typeof doOutput === \"boolean\" ? doOutput : false;\r\n    offsets[oid] = contentLength;\r\n    if (doOutput) {\r\n      out(oid + \" 0 obj\");\r\n    }\r\n    return oid;\r\n  };\r\n  // Does not output the object until after the pages have been output.\r\n  // Returns an object containing the objectId and content.\r\n  // All pages have been added so the object ID can be estimated to start right after.\r\n  // This does not modify the current objectNumber;  It must be updated after the newObjects are output.\r\n  var newAdditionalObject = (API.__private__.newAdditionalObject = function() {\r\n    var objId = newObjectDeferred();\r\n    var obj = {\r\n      objId: objId,\r\n      content: \"\"\r\n    };\r\n    additionalObjects.push(obj);\r\n    return obj;\r\n  });\r\n\r\n  var rootDictionaryObjId = newObjectDeferred();\r\n  var resourceDictionaryObjId = newObjectDeferred();\r\n\r\n  /////////////////////\r\n  // Private functions\r\n  /////////////////////\r\n\r\n  var decodeColorString = (API.__private__.decodeColorString = function(color) {\r\n    var colorEncoded = color.split(\" \");\r\n    if (\r\n      colorEncoded.length === 2 &&\r\n      (colorEncoded[1] === \"g\" || colorEncoded[1] === \"G\")\r\n    ) {\r\n      // convert grayscale value to rgb so that it can be converted to hex for consistency\r\n      var floatVal = parseFloat(colorEncoded[0]);\r\n      colorEncoded = [floatVal, floatVal, floatVal, \"r\"];\r\n    } else if (\r\n      colorEncoded.length === 5 &&\r\n      (colorEncoded[4] === \"k\" || colorEncoded[4] === \"K\")\r\n    ) {\r\n      // convert CMYK values to rbg so that it can be converted to hex for consistency\r\n      var red = (1.0 - colorEncoded[0]) * (1.0 - colorEncoded[3]);\r\n      var green = (1.0 - colorEncoded[1]) * (1.0 - colorEncoded[3]);\r\n      var blue = (1.0 - colorEncoded[2]) * (1.0 - colorEncoded[3]);\r\n\r\n      colorEncoded = [red, green, blue, \"r\"];\r\n    }\r\n    var colorAsRGB = \"#\";\r\n    for (var i = 0; i < 3; i++) {\r\n      colorAsRGB += (\r\n        \"0\" + Math.floor(parseFloat(colorEncoded[i]) * 255).toString(16)\r\n      ).slice(-2);\r\n    }\r\n    return colorAsRGB;\r\n  });\r\n\r\n  var encodeColorString = (API.__private__.encodeColorString = function(\r\n    options\r\n  ) {\r\n    var color;\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        ch1: options\r\n      };\r\n    }\r\n    var ch1 = options.ch1;\r\n    var ch2 = options.ch2;\r\n    var ch3 = options.ch3;\r\n    var ch4 = options.ch4;\r\n    var letterArray =\r\n      options.pdfColorType === \"draw\" ? [\"G\", \"RG\", \"K\"] : [\"g\", \"rg\", \"k\"];\r\n\r\n    if (typeof ch1 === \"string\" && ch1.charAt(0) !== \"#\") {\r\n      var rgbColor = new RGBColor(ch1);\r\n      if (rgbColor.ok) {\r\n        ch1 = rgbColor.toHex();\r\n      } else if (!/^\\d*\\.?\\d*$/.test(ch1)) {\r\n        throw new Error(\r\n          'Invalid color \"' + ch1 + '\" passed to jsPDF.encodeColorString.'\r\n        );\r\n      }\r\n    }\r\n    //convert short rgb to long form\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{3}$/.test(ch1)) {\r\n      ch1 = \"#\" + ch1[1] + ch1[1] + ch1[2] + ch1[2] + ch1[3] + ch1[3];\r\n    }\r\n\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{6}$/.test(ch1)) {\r\n      var hex = parseInt(ch1.substr(1), 16);\r\n      ch1 = (hex >> 16) & 255;\r\n      ch2 = (hex >> 8) & 255;\r\n      ch3 = hex & 255;\r\n    }\r\n\r\n    if (\r\n      typeof ch2 === \"undefined\" ||\r\n      (typeof ch4 === \"undefined\" && ch1 === ch2 && ch2 === ch3)\r\n    ) {\r\n      // Gray color space.\r\n      if (typeof ch1 === \"string\") {\r\n        color = ch1 + \" \" + letterArray[0];\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = f2(ch1 / 255) + \" \" + letterArray[0];\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = f3(ch1 / 255) + \" \" + letterArray[0];\r\n        }\r\n      }\r\n    } else if (typeof ch4 === \"undefined\" || typeof ch4 === \"object\") {\r\n      // assume RGBA\r\n      if (ch4 && !isNaN(ch4.a)) {\r\n        //TODO Implement transparency.\r\n        //WORKAROUND use white for now, if transparent, otherwise handle as rgb\r\n        if (ch4.a === 0) {\r\n          color = [\"1.\", \"1.\", \"1.\", letterArray[1]].join(\" \");\r\n          return color;\r\n        }\r\n      }\r\n      // assume RGB\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, letterArray[1]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [\r\n              f2(ch1 / 255),\r\n              f2(ch2 / 255),\r\n              f2(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n            break;\r\n          default:\r\n          case 3:\r\n            color = [\r\n              f3(ch1 / 255),\r\n              f3(ch2 / 255),\r\n              f3(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n        }\r\n      }\r\n    } else {\r\n      // assume CMYK\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, ch4, letterArray[2]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = [f3(ch1), f3(ch2), f3(ch3), f3(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n        }\r\n      }\r\n    }\r\n    return color;\r\n  });\r\n\r\n  var getFilters = (API.__private__.getFilters = function() {\r\n    return filters;\r\n  });\r\n\r\n  var putStream = (API.__private__.putStream = function(options) {\r\n    options = options || {};\r\n    var data = options.data || \"\";\r\n    var filters = options.filters || getFilters();\r\n    var alreadyAppliedFilters = options.alreadyAppliedFilters || [];\r\n    var addLength1 = options.addLength1 || false;\r\n    var valueOfLength1 = data.length;\r\n    var objectId = options.objectId;\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null && typeof objectId == \"undefined\") {\r\n      throw new Error(\r\n        \"ObjectId must be passed to putStream for file encryption\"\r\n      );\r\n    }\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n\r\n    var processedData = {};\r\n    if (filters === true) {\r\n      filters = [\"FlateEncode\"];\r\n    }\r\n    var keyValues = options.additionalKeyValues || [];\r\n    if (typeof jsPDF.API.processDataByFilters !== \"undefined\") {\r\n      processedData = jsPDF.API.processDataByFilters(data, filters);\r\n    } else {\r\n      processedData = { data: data, reverseChain: [] };\r\n    }\r\n    var filterAsString =\r\n      processedData.reverseChain +\r\n      (Array.isArray(alreadyAppliedFilters)\r\n        ? alreadyAppliedFilters.join(\" \")\r\n        : alreadyAppliedFilters.toString());\r\n\r\n    if (processedData.data.length !== 0) {\r\n      keyValues.push({\r\n        key: \"Length\",\r\n        value: processedData.data.length\r\n      });\r\n      if (addLength1 === true) {\r\n        keyValues.push({\r\n          key: \"Length1\",\r\n          value: valueOfLength1\r\n        });\r\n      }\r\n    }\r\n\r\n    if (filterAsString.length != 0) {\r\n      if (filterAsString.split(\"/\").length - 1 === 1) {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: filterAsString\r\n        });\r\n      } else {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: \"[\" + filterAsString + \"]\"\r\n        });\r\n\r\n        for (var j = 0; j < keyValues.length; j += 1) {\r\n          if (keyValues[j].key === \"DecodeParms\") {\r\n            var decodeParmsArray = [];\r\n\r\n            for (\r\n              var i = 0;\r\n              i < processedData.reverseChain.split(\"/\").length - 1;\r\n              i += 1\r\n            ) {\r\n              decodeParmsArray.push(\"null\");\r\n            }\r\n\r\n            decodeParmsArray.push(keyValues[j].value);\r\n            keyValues[j].value = \"[\" + decodeParmsArray.join(\" \") + \"]\";\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    out(\"<<\");\r\n    for (var k = 0; k < keyValues.length; k++) {\r\n      out(\"/\" + keyValues[k].key + \" \" + keyValues[k].value);\r\n    }\r\n    out(\">>\");\r\n    if (processedData.data.length !== 0) {\r\n      out(\"stream\");\r\n      out(encryptor(processedData.data));\r\n      out(\"endstream\");\r\n    }\r\n  });\r\n\r\n  var putPage = (API.__private__.putPage = function(page) {\r\n    var pageNumber = page.number;\r\n    var data = page.data;\r\n    var pageObjectNumber = page.objId;\r\n    var pageContentsObjId = page.contentsObjId;\r\n\r\n    newObjectDeferredBegin(pageObjectNumber, true);\r\n    out(\"<</Type /Page\");\r\n    out(\"/Parent \" + page.rootDictionaryObjId + \" 0 R\");\r\n    out(\"/Resources \" + page.resourceDictionaryObjId + \" 0 R\");\r\n    out(\r\n      \"/MediaBox [\" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftX)) +\r\n        \" \" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftY)) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightX) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightY) +\r\n        \"]\"\r\n    );\r\n    if (page.cropBox !== null) {\r\n      out(\r\n        \"/CropBox [\" +\r\n          hpf(page.cropBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.cropBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.bleedBox !== null) {\r\n      out(\r\n        \"/BleedBox [\" +\r\n          hpf(page.bleedBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.trimBox !== null) {\r\n      out(\r\n        \"/TrimBox [\" +\r\n          hpf(page.trimBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.trimBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.artBox !== null) {\r\n      out(\r\n        \"/ArtBox [\" +\r\n          hpf(page.artBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.artBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (typeof page.userUnit === \"number\" && page.userUnit !== 1.0) {\r\n      out(\"/UserUnit \" + page.userUnit);\r\n    }\r\n\r\n    events.publish(\"putPage\", {\r\n      objId: pageObjectNumber,\r\n      pageContext: pagesContext[pageNumber],\r\n      pageNumber: pageNumber,\r\n      page: data\r\n    });\r\n    out(\"/Contents \" + pageContentsObjId + \" 0 R\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    // Page content\r\n    var pageContent = data.join(\"\\n\");\r\n\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      // if the user forgot to switch back to COMPAT mode, we must balance the graphics stack again\r\n      pageContent += \"\\nQ\";\r\n    }\r\n\r\n    newObjectDeferredBegin(pageContentsObjId, true);\r\n    putStream({\r\n      data: pageContent,\r\n      filters: getFilters(),\r\n      objectId: pageContentsObjId\r\n    });\r\n    out(\"endobj\");\r\n    return pageObjectNumber;\r\n  });\r\n\r\n  var putPages = (API.__private__.putPages = function() {\r\n    var n,\r\n      i,\r\n      pageObjectNumbers = [];\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pagesContext[n].objId = newObjectDeferred();\r\n      pagesContext[n].contentsObjId = newObjectDeferred();\r\n    }\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pageObjectNumbers.push(\r\n        putPage({\r\n          number: n,\r\n          data: pages[n],\r\n          objId: pagesContext[n].objId,\r\n          contentsObjId: pagesContext[n].contentsObjId,\r\n          mediaBox: pagesContext[n].mediaBox,\r\n          cropBox: pagesContext[n].cropBox,\r\n          bleedBox: pagesContext[n].bleedBox,\r\n          trimBox: pagesContext[n].trimBox,\r\n          artBox: pagesContext[n].artBox,\r\n          userUnit: pagesContext[n].userUnit,\r\n          rootDictionaryObjId: rootDictionaryObjId,\r\n          resourceDictionaryObjId: resourceDictionaryObjId\r\n        })\r\n      );\r\n    }\r\n    newObjectDeferredBegin(rootDictionaryObjId, true);\r\n    out(\"<</Type /Pages\");\r\n    var kids = \"/Kids [\";\r\n    for (i = 0; i < page; i++) {\r\n      kids += pageObjectNumbers[i] + \" 0 R \";\r\n    }\r\n    out(kids + \"]\");\r\n    out(\"/Count \" + page);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    events.publish(\"postPutPages\");\r\n  });\r\n\r\n  var putFont = function(font) {\r\n    events.publish(\"putFont\", {\r\n      font: font,\r\n      out: out,\r\n      newObject: newObject,\r\n      putStream: putStream\r\n    });\r\n\r\n    if (font.isAlreadyPutted !== true) {\r\n      font.objectNumber = newObject();\r\n      out(\"<<\");\r\n      out(\"/Type /Font\");\r\n      out(\"/BaseFont /\" + toPDFName(font.postScriptName));\r\n      out(\"/Subtype /Type1\");\r\n      if (typeof font.encoding === \"string\") {\r\n        out(\"/Encoding /\" + font.encoding);\r\n      }\r\n      out(\"/FirstChar 32\");\r\n      out(\"/LastChar 255\");\r\n      out(\">>\");\r\n      out(\"endobj\");\r\n    }\r\n  };\r\n\r\n  var putFonts = function() {\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          putFont(fonts[fontKey]);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXObject = function(xObject) {\r\n    xObject.objectNumber = newObject();\r\n\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/XObject\" });\r\n    options.push({ key: \"Subtype\", value: \"/Form\" });\r\n    options.push({\r\n      key: \"BBox\",\r\n      value:\r\n        \"[\" +\r\n        [\r\n          hpf(xObject.x),\r\n          hpf(xObject.y),\r\n          hpf(xObject.x + xObject.width),\r\n          hpf(xObject.y + xObject.height)\r\n        ].join(\" \") +\r\n        \"]\"\r\n    });\r\n    options.push({\r\n      key: \"Matrix\",\r\n      value: \"[\" + xObject.matrix.toString() + \"]\"\r\n    });\r\n    // TODO: /Resources\r\n\r\n    var stream = xObject.pages[1].join(\"\\n\");\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      objectId: xObject.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putXObjects = function() {\r\n    for (var xObjectKey in renderTargets) {\r\n      if (renderTargets.hasOwnProperty(xObjectKey)) {\r\n        putXObject(renderTargets[xObjectKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var interpolateAndEncodeRGBStream = function(colors, numberSamples) {\r\n    var tValues = [];\r\n    var t;\r\n    var dT = 1.0 / (numberSamples - 1);\r\n    for (t = 0.0; t < 1.0; t += dT) {\r\n      tValues.push(t);\r\n    }\r\n    tValues.push(1.0);\r\n    // add first and last control point if not present\r\n    if (colors[0].offset != 0.0) {\r\n      var c0 = {\r\n        offset: 0.0,\r\n        color: colors[0].color\r\n      };\r\n      colors.unshift(c0);\r\n    }\r\n    if (colors[colors.length - 1].offset != 1.0) {\r\n      var c1 = {\r\n        offset: 1.0,\r\n        color: colors[colors.length - 1].color\r\n      };\r\n      colors.push(c1);\r\n    }\r\n    var out = \"\";\r\n    var index = 0;\r\n\r\n    for (var i = 0; i < tValues.length; i++) {\r\n      t = tValues[i];\r\n      while (t > colors[index + 1].offset) index++;\r\n      var a = colors[index].offset;\r\n      var b = colors[index + 1].offset;\r\n      var d = (t - a) / (b - a);\r\n\r\n      var aColor = colors[index].color;\r\n      var bColor = colors[index + 1].color;\r\n\r\n      out +=\r\n        padd2Hex(Math.round((1 - d) * aColor[0] + d * bColor[0]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[1] + d * bColor[1]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[2] + d * bColor[2]).toString(16));\r\n    }\r\n    return out.trim();\r\n  };\r\n\r\n  var putShadingPattern = function(pattern, numberSamples) {\r\n    /*\r\n       Axial patterns shade between the two points specified in coords, radial patterns between the inner\r\n       and outer circle.\r\n       The user can specify an array (colors) that maps t-Values in [0, 1] to RGB colors. These are now\r\n       interpolated to equidistant samples and written to pdf as a sample (type 0) function.\r\n       */\r\n    // The number of color samples that should be used to describe the shading.\r\n    // The higher, the more accurate the gradient will be.\r\n    numberSamples || (numberSamples = 21);\r\n    var funcObjectNumber = newObject();\r\n    var stream = interpolateAndEncodeRGBStream(pattern.colors, numberSamples);\r\n\r\n    var options = [];\r\n    options.push({ key: \"FunctionType\", value: \"0\" });\r\n    options.push({ key: \"Domain\", value: \"[0.0 1.0]\" });\r\n    options.push({ key: \"Size\", value: \"[\" + numberSamples + \"]\" });\r\n    options.push({ key: \"BitsPerSample\", value: \"8\" });\r\n    options.push({ key: \"Range\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n    options.push({ key: \"Decode\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      alreadyAppliedFilters: [\"/ASCIIHexDecode\"],\r\n      objectId: funcObjectNumber\r\n    });\r\n    out(\"endobj\");\r\n\r\n    pattern.objectNumber = newObject();\r\n    out(\"<< /ShadingType \" + pattern.type);\r\n    out(\"/ColorSpace /DeviceRGB\");\r\n    var coords =\r\n      \"/Coords [\" +\r\n      hpf(parseFloat(pattern.coords[0])) +\r\n      \" \" + // x1\r\n      hpf(parseFloat(pattern.coords[1])) +\r\n      \" \"; // y1\r\n    if (pattern.type === 2) {\r\n      // axial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[3])); // y2\r\n    } else {\r\n      // radial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // r1\r\n        hpf(parseFloat(pattern.coords[3])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[4])) +\r\n        \" \" + // y2\r\n        hpf(parseFloat(pattern.coords[5])); // r2\r\n    }\r\n    coords += \"]\";\r\n    out(coords);\r\n\r\n    if (pattern.matrix) {\r\n      out(\"/Matrix [\" + pattern.matrix.toString() + \"]\");\r\n    }\r\n    out(\"/Function \" + funcObjectNumber + \" 0 R\");\r\n    out(\"/Extend [true true]\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putTilingPattern = function(pattern, deferredResourceDictionaryIds) {\r\n    var resourcesObjectId = newObjectDeferred();\r\n    var patternObjectId = newObject();\r\n\r\n    deferredResourceDictionaryIds.push({\r\n      resourcesOid: resourcesObjectId,\r\n      objectOid: patternObjectId\r\n    });\r\n\r\n    pattern.objectNumber = patternObjectId;\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/Pattern\" });\r\n    options.push({ key: \"PatternType\", value: \"1\" }); // tiling pattern\r\n    options.push({ key: \"PaintType\", value: \"1\" }); // colored tiling pattern\r\n    options.push({ key: \"TilingType\", value: \"1\" }); // constant spacing\r\n    options.push({\r\n      key: \"BBox\",\r\n      value: \"[\" + pattern.boundingBox.map(hpf).join(\" \") + \"]\"\r\n    });\r\n    options.push({ key: \"XStep\", value: hpf(pattern.xStep) });\r\n    options.push({ key: \"YStep\", value: hpf(pattern.yStep) });\r\n    options.push({ key: \"Resources\", value: resourcesObjectId + \" 0 R\" });\r\n    if (pattern.matrix) {\r\n      options.push({\r\n        key: \"Matrix\",\r\n        value: \"[\" + pattern.matrix.toString() + \"]\"\r\n      });\r\n    }\r\n\r\n    putStream({\r\n      data: pattern.stream,\r\n      additionalKeyValues: options,\r\n      objectId: pattern.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putPatterns = function(deferredResourceDictionaryIds) {\r\n    var patternKey;\r\n    for (patternKey in patterns) {\r\n      if (patterns.hasOwnProperty(patternKey)) {\r\n        if (patterns[patternKey] instanceof ShadingPattern) {\r\n          putShadingPattern(patterns[patternKey]);\r\n        } else if (patterns[patternKey] instanceof TilingPattern) {\r\n          putTilingPattern(patterns[patternKey], deferredResourceDictionaryIds);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putGState = function(gState) {\r\n    gState.objectNumber = newObject();\r\n    out(\"<<\");\r\n    for (var p in gState) {\r\n      switch (p) {\r\n        case \"opacity\":\r\n          out(\"/ca \" + f2(gState[p]));\r\n          break;\r\n        case \"stroke-opacity\":\r\n          out(\"/CA \" + f2(gState[p]));\r\n          break;\r\n      }\r\n    }\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putGStates = function() {\r\n    var gStateKey;\r\n    for (gStateKey in gStates) {\r\n      if (gStates.hasOwnProperty(gStateKey)) {\r\n        putGState(gStates[gStateKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXobjectDict = function() {\r\n    out(\"/XObject <<\");\r\n    for (var xObjectKey in renderTargets) {\r\n      if (\r\n        renderTargets.hasOwnProperty(xObjectKey) &&\r\n        renderTargets[xObjectKey].objectNumber >= 0\r\n      ) {\r\n        out(\r\n          \"/\" +\r\n            xObjectKey +\r\n            \" \" +\r\n            renderTargets[xObjectKey].objectNumber +\r\n            \" 0 R\"\r\n        );\r\n      }\r\n    }\r\n\r\n    // Loop through images, or other data objects\r\n    events.publish(\"putXobjectDict\");\r\n    out(\">>\");\r\n  };\r\n\r\n  var putEncryptionDict = function() {\r\n    encryption.oid = newObject();\r\n    out(\"<<\");\r\n    out(\"/Filter /Standard\");\r\n    out(\"/V \" + encryption.v);\r\n    out(\"/R \" + encryption.r);\r\n    out(\"/U <\" + encryption.toHexString(encryption.U) + \">\");\r\n    out(\"/O <\" + encryption.toHexString(encryption.O) + \">\");\r\n    out(\"/P \" + encryption.P);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putFontDict = function() {\r\n    out(\"/Font <<\");\r\n\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          out(\"/\" + fontKey + \" \" + fonts[fontKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n    }\r\n    out(\">>\");\r\n  };\r\n\r\n  var putShadingPatternDict = function() {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Shading <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof ShadingPattern &&\r\n          patterns[patternKey].objectNumber >= 0\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n\r\n      events.publish(\"putShadingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putTilingPatternDict = function(objectOid) {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Pattern <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof API.TilingPattern &&\r\n          patterns[patternKey].objectNumber >= 0 &&\r\n          patterns[patternKey].objectNumber < objectOid // prevent cyclic dependencies\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n      events.publish(\"putTilingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putGStatesDict = function() {\r\n    if (Object.keys(gStates).length > 0) {\r\n      var gStateKey;\r\n      out(\"/ExtGState <<\");\r\n      for (gStateKey in gStates) {\r\n        if (\r\n          gStates.hasOwnProperty(gStateKey) &&\r\n          gStates[gStateKey].objectNumber >= 0\r\n        ) {\r\n          out(\"/\" + gStateKey + \" \" + gStates[gStateKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n\r\n      events.publish(\"putGStateDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putResourceDictionary = function(objectIds) {\r\n    newObjectDeferredBegin(objectIds.resourcesOid, true);\r\n    out(\"<<\");\r\n    out(\"/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\");\r\n    putFontDict();\r\n    putShadingPatternDict();\r\n    putTilingPatternDict(objectIds.objectOid);\r\n    putGStatesDict();\r\n    putXobjectDict();\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putResources = function() {\r\n    // FormObjects, Patterns etc. might use other FormObjects/Patterns/Images\r\n    // which means their resource dictionaries must contain the already resolved\r\n    // object ids. For this reason we defer the serialization of the resource\r\n    // dicts until all objects have been serialized and have object ids.\r\n    //\r\n    // In order to prevent cyclic dependencies (which Adobe Reader doesn't like),\r\n    // we only put all oids that are smaller than the oid of the object the\r\n    // resource dict belongs to. This is correct behavior, since the streams\r\n    // may only use other objects that have already been defined and thus appear\r\n    // earlier in their respective collection.\r\n    // Currently, this only affects tiling patterns, but a (more) correct\r\n    // implementation of FormObjects would also define their own resource dicts.\r\n    var deferredResourceDictionaryIds = [];\r\n\r\n    putFonts();\r\n    putGStates();\r\n    putXObjects();\r\n    putPatterns(deferredResourceDictionaryIds);\r\n\r\n    events.publish(\"putResources\");\r\n    deferredResourceDictionaryIds.forEach(putResourceDictionary);\r\n    putResourceDictionary({\r\n      resourcesOid: resourceDictionaryObjId,\r\n      objectOid: Number.MAX_SAFE_INTEGER // output all objects\r\n    });\r\n    events.publish(\"postPutResources\");\r\n  };\r\n\r\n  var putAdditionalObjects = function() {\r\n    events.publish(\"putAdditionalObjects\");\r\n    for (var i = 0; i < additionalObjects.length; i++) {\r\n      var obj = additionalObjects[i];\r\n      newObjectDeferredBegin(obj.objId, true);\r\n      out(obj.content);\r\n      out(\"endobj\");\r\n    }\r\n    events.publish(\"postPutAdditionalObjects\");\r\n  };\r\n\r\n  var addFontToFontDictionary = function(font) {\r\n    fontmap[font.fontName] = fontmap[font.fontName] || {};\r\n    fontmap[font.fontName][font.fontStyle] = font.id;\r\n  };\r\n\r\n  var addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    encoding,\r\n    isStandardFont\r\n  ) {\r\n    var font = {\r\n      id: \"F\" + (Object.keys(fonts).length + 1).toString(10),\r\n      postScriptName: postScriptName,\r\n      fontName: fontName,\r\n      fontStyle: fontStyle,\r\n      encoding: encoding,\r\n      isStandardFont: isStandardFont || false,\r\n      metadata: {}\r\n    };\r\n\r\n    events.publish(\"addFont\", {\r\n      font: font,\r\n      instance: this\r\n    });\r\n\r\n    fonts[font.id] = font;\r\n    addFontToFontDictionary(font);\r\n    return font.id;\r\n  };\r\n\r\n  var addFonts = function(arrayOfFonts) {\r\n    for (var i = 0, l = standardFonts.length; i < l; i++) {\r\n      var fontKey = addFont.call(\r\n        this,\r\n        arrayOfFonts[i][0],\r\n        arrayOfFonts[i][1],\r\n        arrayOfFonts[i][2],\r\n        standardFonts[i][3],\r\n        true\r\n      );\r\n\r\n      if (putOnlyUsedFonts === false) {\r\n        usedFonts[fontKey] = true;\r\n      }\r\n      // adding aliases for standard fonts, this time matching the capitalization\r\n      var parts = arrayOfFonts[i][0].split(\"-\");\r\n      addFontToFontDictionary({\r\n        id: fontKey,\r\n        fontName: parts[0],\r\n        fontStyle: parts[1] || \"\"\r\n      });\r\n    }\r\n    events.publish(\"addFonts\", {\r\n      fonts: fonts,\r\n      dictionary: fontmap\r\n    });\r\n  };\r\n\r\n  var SAFE = function __safeCall(fn) {\r\n    fn.foo = function __safeCallWrapper() {\r\n      try {\r\n        return fn.apply(this, arguments);\r\n      } catch (e) {\r\n        var stack = e.stack || \"\";\r\n        if (~stack.indexOf(\" at \")) stack = stack.split(\" at \")[1];\r\n        var m =\r\n          \"Error in function \" +\r\n          stack.split(\"\\n\")[0].split(\"<\")[0] +\r\n          \": \" +\r\n          e.message;\r\n        if (globalObject.console) {\r\n          globalObject.console.error(m, e);\r\n          if (globalObject.alert) alert(m);\r\n        } else {\r\n          throw new Error(m);\r\n        }\r\n      }\r\n    };\r\n    fn.foo.bar = fn;\r\n    return fn.foo;\r\n  };\r\n\r\n  var to8bitStream = function(text, flags) {\r\n    /**\r\n     * PDF 1.3 spec:\r\n     * \"For text strings encoded in Unicode, the first two bytes must be 254 followed by\r\n     * 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts\r\n     * with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely\r\n     * to be a meaningful beginning of a word or phrase.) The remainder of the\r\n     * string consists of Unicode character codes, according to the UTF-16 encoding\r\n     * specified in the Unicode standard, version 2.0. Commonly used Unicode values\r\n     * are represented as 2 bytes per character, with the high-order byte appearing first\r\n     * in the string.\"\r\n     *\r\n     * In other words, if there are chars in a string with char code above 255, we\r\n     * recode the string to UCS2 BE - string doubles in length and BOM is prepended.\r\n     *\r\n     * HOWEVER!\r\n     * Actual *content* (body) text (as opposed to strings used in document properties etc)\r\n     * does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)\r\n     *\r\n     * Because of Adobe's focus on \"you subset your fonts!\" you are not supposed to have\r\n     * a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could\r\n     * fudge it with \"Identity-H\" encoding and custom CIDtoGID map that mimics Unicode\r\n     * code page. There, however, all characters in the stream are treated as GIDs,\r\n     * including BOM, which is the reason we need to skip BOM in content text (i.e. that\r\n     * that is tied to a font).\r\n     *\r\n     * To signal this \"special\" PDFEscape / to8bitStream handling mode,\r\n     * API.text() function sets (unless you overwrite it with manual values\r\n     * given to API.text(.., flags) )\r\n     * flags.autoencode = true\r\n     * flags.noBOM = true\r\n     *\r\n     * ===================================================================================\r\n     * `flags` properties relied upon:\r\n     *   .sourceEncoding = string with encoding label.\r\n     *                     \"Unicode\" by default. = encoding of the incoming text.\r\n     *                     pass some non-existing encoding name\r\n     *                     (ex: 'Do not touch my strings! I know what I am doing.')\r\n     *                     to make encoding code skip the encoding step.\r\n     *   .outputEncoding = Either valid PDF encoding name\r\n     *                     (must be supported by jsPDF font metrics, otherwise no encoding)\r\n     *                     or a JS object, where key = sourceCharCode, value = outputCharCode\r\n     *                     missing keys will be treated as: sourceCharCode === outputCharCode\r\n     *   .noBOM\r\n     *       See comment higher above for explanation for why this is important\r\n     *   .autoencode\r\n     *       See comment higher above for explanation for why this is important\r\n     */\r\n\r\n    var i,\r\n      l,\r\n      sourceEncoding,\r\n      encodingBlock,\r\n      outputEncoding,\r\n      newtext,\r\n      isUnicode,\r\n      ch,\r\n      bch;\r\n\r\n    flags = flags || {};\r\n    sourceEncoding = flags.sourceEncoding || \"Unicode\";\r\n    outputEncoding = flags.outputEncoding;\r\n\r\n    // This 'encoding' section relies on font metrics format\r\n    // attached to font objects by, among others,\r\n    // \"Willow Systems' standard_font_metrics plugin\"\r\n    // see jspdf.plugin.standard_font_metrics.js for format\r\n    // of the font.metadata.encoding Object.\r\n    // It should be something like\r\n    //   .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}\r\n    //   .widths = {0:width, code:width, ..., 'fof':divisor}\r\n    //   .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}\r\n    if (\r\n      (flags.autoencode || outputEncoding) &&\r\n      fonts[activeFontKey].metadata &&\r\n      fonts[activeFontKey].metadata[sourceEncoding] &&\r\n      fonts[activeFontKey].metadata[sourceEncoding].encoding\r\n    ) {\r\n      encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding;\r\n\r\n      // each font has default encoding. Some have it clearly defined.\r\n      if (!outputEncoding && fonts[activeFontKey].encoding) {\r\n        outputEncoding = fonts[activeFontKey].encoding;\r\n      }\r\n\r\n      // Hmmm, the above did not work? Let's try again, in different place.\r\n      if (!outputEncoding && encodingBlock.codePages) {\r\n        outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default\r\n      }\r\n\r\n      if (typeof outputEncoding === \"string\") {\r\n        outputEncoding = encodingBlock[outputEncoding];\r\n      }\r\n      // we want output encoding to be a JS Object, where\r\n      // key = sourceEncoding's character code and\r\n      // value = outputEncoding's character code.\r\n      if (outputEncoding) {\r\n        isUnicode = false;\r\n        newtext = [];\r\n        for (i = 0, l = text.length; i < l; i++) {\r\n          ch = outputEncoding[text.charCodeAt(i)];\r\n          if (ch) {\r\n            newtext.push(String.fromCharCode(ch));\r\n          } else {\r\n            newtext.push(text[i]);\r\n          }\r\n\r\n          // since we are looping over chars anyway, might as well\r\n          // check for residual unicodeness\r\n          if (newtext[i].charCodeAt(0) >> 8) {\r\n            /* more than 255 */\r\n            isUnicode = true;\r\n          }\r\n        }\r\n        text = newtext.join(\"\");\r\n      }\r\n    }\r\n\r\n    i = text.length;\r\n    // isUnicode may be set to false above. Hence the triple-equal to undefined\r\n    while (isUnicode === undefined && i !== 0) {\r\n      if (text.charCodeAt(i - 1) >> 8) {\r\n        /* more than 255 */\r\n        isUnicode = true;\r\n      }\r\n      i--;\r\n    }\r\n    if (!isUnicode) {\r\n      return text;\r\n    }\r\n\r\n    newtext = flags.noBOM ? [] : [254, 255];\r\n    for (i = 0, l = text.length; i < l; i++) {\r\n      ch = text.charCodeAt(i);\r\n      bch = ch >> 8; // divide by 256\r\n      if (bch >> 8) {\r\n        /* something left after dividing by 256 second time */\r\n        throw new Error(\r\n          \"Character at position \" +\r\n            i +\r\n            \" of string '\" +\r\n            text +\r\n            \"' exceeds 16bits. Cannot be encoded into UCS-2 BE\"\r\n        );\r\n      }\r\n      newtext.push(bch);\r\n      newtext.push(ch - (bch << 8));\r\n    }\r\n    return String.fromCharCode.apply(undefined, newtext);\r\n  };\r\n\r\n  var pdfEscape = (API.__private__.pdfEscape = API.pdfEscape = function(\r\n    text,\r\n    flags\r\n  ) {\r\n    /**\r\n     * Replace '/', '(', and ')' with pdf-safe versions\r\n     *\r\n     * Doing to8bitStream does NOT make this PDF display unicode text. For that\r\n     * we also need to reference a unicode font and embed it - royal pain in the rear.\r\n     *\r\n     * There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,\r\n     * which JavaScript Strings are happy to provide. So, while we still cannot display\r\n     * 2-byte characters property, at least CONDITIONALLY converting (entire string containing)\r\n     * 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF\r\n     * is still parseable.\r\n     * This will allow immediate support for unicode in document properties strings.\r\n     */\r\n    return to8bitStream(text, flags)\r\n      .replace(/\\\\/g, \"\\\\\\\\\")\r\n      .replace(/\\(/g, \"\\\\(\")\r\n      .replace(/\\)/g, \"\\\\)\");\r\n  });\r\n\r\n  var beginPage = (API.__private__.beginPage = function(format) {\r\n    pages[++page] = [];\r\n    pagesContext[page] = {\r\n      objId: 0,\r\n      contentsObjId: 0,\r\n      userUnit: Number(userUnit),\r\n      artBox: null,\r\n      bleedBox: null,\r\n      cropBox: null,\r\n      trimBox: null,\r\n      mediaBox: {\r\n        bottomLeftX: 0,\r\n        bottomLeftY: 0,\r\n        topRightX: Number(format[0]),\r\n        topRightY: Number(format[1])\r\n      }\r\n    };\r\n    _setPage(page);\r\n    setOutputDestination(pages[currentPage]);\r\n  });\r\n\r\n  var _addPage = function(parmFormat, parmOrientation) {\r\n    var dimensions, width, height;\r\n\r\n    orientation = parmOrientation || orientation;\r\n\r\n    if (typeof parmFormat === \"string\") {\r\n      dimensions = getPageFormat(parmFormat.toLowerCase());\r\n      if (Array.isArray(dimensions)) {\r\n        width = dimensions[0];\r\n        height = dimensions[1];\r\n      }\r\n    }\r\n\r\n    if (Array.isArray(parmFormat)) {\r\n      width = parmFormat[0] * scaleFactor;\r\n      height = parmFormat[1] * scaleFactor;\r\n    }\r\n\r\n    if (isNaN(width)) {\r\n      width = format[0];\r\n      height = format[1];\r\n    }\r\n\r\n    if (width > 14400 || height > 14400) {\r\n      console.warn(\r\n        \"A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400\"\r\n      );\r\n      width = Math.min(14400, width);\r\n      height = Math.min(14400, height);\r\n    }\r\n\r\n    format = [width, height];\r\n\r\n    switch (orientation.substr(0, 1)) {\r\n      case \"l\":\r\n        if (height > width) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n      case \"p\":\r\n        if (width > height) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n    }\r\n\r\n    beginPage(format);\r\n\r\n    // Set line width\r\n    setLineWidth(lineWidth);\r\n    // Set draw color\r\n    out(strokeColor);\r\n    // resurrecting non-default line caps, joins\r\n    if (lineCapID !== 0) {\r\n      out(lineCapID + \" J\");\r\n    }\r\n    if (lineJoinID !== 0) {\r\n      out(lineJoinID + \" j\");\r\n    }\r\n    events.publish(\"addPage\", {\r\n      pageNumber: page\r\n    });\r\n  };\r\n\r\n  var _deletePage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      pages.splice(n, 1);\r\n      pagesContext.splice(n, 1);\r\n      page--;\r\n      if (currentPage > page) {\r\n        currentPage = page;\r\n      }\r\n      this.setPage(currentPage);\r\n    }\r\n  };\r\n\r\n  var _setPage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      currentPage = n;\r\n    }\r\n  };\r\n\r\n  var getNumberOfPages = (API.__private__.getNumberOfPages = API.getNumberOfPages = function() {\r\n    return pages.length - 1;\r\n  });\r\n\r\n  /**\r\n   * Returns a document-specific font key - a label assigned to a\r\n   * font name + font type combination at the time the font was added\r\n   * to the font inventory.\r\n   *\r\n   * Font key is used as label for the desired font for a block of text\r\n   * to be added to the PDF document stream.\r\n   * @private\r\n   * @function\r\n   * @param fontName {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @param fontStyle {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @returns {string} Font key.\r\n   * @ignore\r\n   */\r\n  var getFont = function(fontName, fontStyle, options) {\r\n    var key = undefined,\r\n      fontNameLowerCase;\r\n    options = options || {};\r\n\r\n    fontName =\r\n      fontName !== undefined ? fontName : fonts[activeFontKey].fontName;\r\n    fontStyle =\r\n      fontStyle !== undefined ? fontStyle : fonts[activeFontKey].fontStyle;\r\n    fontNameLowerCase = fontName.toLowerCase();\r\n\r\n    if (\r\n      fontmap[fontNameLowerCase] !== undefined &&\r\n      fontmap[fontNameLowerCase][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontNameLowerCase][fontStyle];\r\n    } else if (\r\n      fontmap[fontName] !== undefined &&\r\n      fontmap[fontName][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontName][fontStyle];\r\n    } else {\r\n      if (options.disableWarning === false) {\r\n        console.warn(\r\n          \"Unable to look up font label for font '\" +\r\n            fontName +\r\n            \"', '\" +\r\n            fontStyle +\r\n            \"'. Refer to getFontList() for available fonts.\"\r\n        );\r\n      }\r\n    }\r\n\r\n    if (!key && !options.noFallback) {\r\n      key = fontmap[\"times\"][fontStyle];\r\n      if (key == null) {\r\n        key = fontmap[\"times\"][\"normal\"];\r\n      }\r\n    }\r\n    return key;\r\n  };\r\n\r\n  var putInfo = (API.__private__.putInfo = function() {\r\n    var objectId = newObject();\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n    out(\"<<\");\r\n    out(\"/Producer (\" + pdfEscape(encryptor(\"jsPDF \" + jsPDF.version)) + \")\");\r\n    for (var key in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(key) && documentProperties[key]) {\r\n        out(\r\n          \"/\" +\r\n            key.substr(0, 1).toUpperCase() +\r\n            key.substr(1) +\r\n            \" (\" +\r\n            pdfEscape(encryptor(documentProperties[key])) +\r\n            \")\"\r\n        );\r\n      }\r\n    }\r\n    out(\"/CreationDate (\" + pdfEscape(encryptor(creationDate)) + \")\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putCatalog = (API.__private__.putCatalog = function(options) {\r\n    options = options || {};\r\n    var tmpRootDictionaryObjId =\r\n      options.rootDictionaryObjId || rootDictionaryObjId;\r\n    newObject();\r\n    out(\"<<\");\r\n    out(\"/Type /Catalog\");\r\n    out(\"/Pages \" + tmpRootDictionaryObjId + \" 0 R\");\r\n    // PDF13ref Section 7.2.1\r\n    if (!zoomMode) zoomMode = \"fullwidth\";\r\n    switch (zoomMode) {\r\n      case \"fullwidth\":\r\n        out(\"/OpenAction [3 0 R /FitH null]\");\r\n        break;\r\n      case \"fullheight\":\r\n        out(\"/OpenAction [3 0 R /FitV null]\");\r\n        break;\r\n      case \"fullpage\":\r\n        out(\"/OpenAction [3 0 R /Fit]\");\r\n        break;\r\n      case \"original\":\r\n        out(\"/OpenAction [3 0 R /XYZ null null 1]\");\r\n        break;\r\n      default:\r\n        var pcn = \"\" + zoomMode;\r\n        if (pcn.substr(pcn.length - 1) === \"%\")\r\n          zoomMode = parseInt(zoomMode) / 100;\r\n        if (typeof zoomMode === \"number\") {\r\n          out(\"/OpenAction [3 0 R /XYZ null null \" + f2(zoomMode) + \"]\");\r\n        }\r\n    }\r\n    if (!layoutMode) layoutMode = \"continuous\";\r\n    switch (layoutMode) {\r\n      case \"continuous\":\r\n        out(\"/PageLayout /OneColumn\");\r\n        break;\r\n      case \"single\":\r\n        out(\"/PageLayout /SinglePage\");\r\n        break;\r\n      case \"two\":\r\n      case \"twoleft\":\r\n        out(\"/PageLayout /TwoColumnLeft\");\r\n        break;\r\n      case \"tworight\":\r\n        out(\"/PageLayout /TwoColumnRight\");\r\n        break;\r\n    }\r\n    if (pageMode) {\r\n      /**\r\n       * A name object specifying how the document should be displayed when opened:\r\n       * UseNone      : Neither document outline nor thumbnail images visible -- DEFAULT\r\n       * UseOutlines  : Document outline visible\r\n       * UseThumbs    : Thumbnail images visible\r\n       * FullScreen   : Full-screen mode, with no menu bar, window controls, or any other window visible\r\n       */\r\n      out(\"/PageMode /\" + pageMode);\r\n    }\r\n    events.publish(\"putCatalog\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putTrailer = (API.__private__.putTrailer = function() {\r\n    out(\"trailer\");\r\n    out(\"<<\");\r\n    out(\"/Size \" + (objectNumber + 1));\r\n    // Root and Info must be the last and second last objects written respectively\r\n    out(\"/Root \" + objectNumber + \" 0 R\");\r\n    out(\"/Info \" + (objectNumber - 1) + \" 0 R\");\r\n    if (encryptionOptions !== null) {\r\n      out(\"/Encrypt \" + encryption.oid + \" 0 R\");\r\n    }\r\n    out(\"/ID [ <\" + fileId + \"> <\" + fileId + \"> ]\");\r\n    out(\">>\");\r\n  });\r\n\r\n  var putHeader = (API.__private__.putHeader = function() {\r\n    out(\"%PDF-\" + pdfVersion);\r\n    out(\"%\\xBA\\xDF\\xAC\\xE0\");\r\n  });\r\n\r\n  var putXRef = (API.__private__.putXRef = function() {\r\n    var p = \"0000000000\";\r\n\r\n    out(\"xref\");\r\n    out(\"0 \" + (objectNumber + 1));\r\n    out(\"0000000000 65535 f \");\r\n    for (var i = 1; i <= objectNumber; i++) {\r\n      var offset = offsets[i];\r\n      if (typeof offset === \"function\") {\r\n        out((p + offsets[i]()).slice(-10) + \" 00000 n \");\r\n      } else {\r\n        if (typeof offsets[i] !== \"undefined\") {\r\n          out((p + offsets[i]).slice(-10) + \" 00000 n \");\r\n        } else {\r\n          out(\"0000000000 00000 n \");\r\n        }\r\n      }\r\n    }\r\n  });\r\n\r\n  var buildDocument = (API.__private__.buildDocument = function() {\r\n    resetDocument();\r\n    setOutputDestination(content);\r\n\r\n    events.publish(\"buildDocument\");\r\n\r\n    putHeader();\r\n    putPages();\r\n    putAdditionalObjects();\r\n    putResources();\r\n    if (encryptionOptions !== null) putEncryptionDict();\r\n    putInfo();\r\n    putCatalog();\r\n\r\n    var offsetOfXRef = contentLength;\r\n    putXRef();\r\n    putTrailer();\r\n    out(\"startxref\");\r\n    out(\"\" + offsetOfXRef);\r\n    out(\"%%EOF\");\r\n\r\n    setOutputDestination(pages[currentPage]);\r\n\r\n    return content.join(\"\\n\");\r\n  });\r\n\r\n  var getBlob = (API.__private__.getBlob = function(data) {\r\n    return new Blob([getArrayBuffer(data)], {\r\n      type: \"application/pdf\"\r\n    });\r\n  });\r\n\r\n  /**\r\n   * Generates the PDF document.\r\n   *\r\n   * If `type` argument is undefined, output is raw body of resulting PDF returned as a string.\r\n   *\r\n   * @param {string} type A string identifying one of the possible output types.<br/>\r\n   *                      Possible values are: <br/>\r\n   *                          'arraybuffer' -> (ArrayBuffer)<br/>\r\n   *                          'blob' -> (Blob)<br/>\r\n   *                          'bloburi'/'bloburl' -> (string)<br/>\r\n   *                          'datauristring'/'dataurlstring' -> (string)<br/>\r\n   *                          'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>\r\n   *                          'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfjsnewwindow' -> (wind | null)\r\n   * @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>\r\n   *                                Possible options are 'filename'.<br/>\r\n   *                                A string can be passed instead of {filename:string} and defaults to 'generated.pdf'\r\n   * @function\r\n   * @instance\r\n   * @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}\r\n   * @memberof jsPDF#\r\n   * @name output\r\n   */\r\n  var output = (API.output = API.__private__.output = SAFE(function output(\r\n    type,\r\n    options\r\n  ) {\r\n    options = options || {};\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        filename: options\r\n      };\r\n    } else {\r\n      options.filename = options.filename || \"generated.pdf\";\r\n    }\r\n\r\n    switch (type) {\r\n      case undefined:\r\n        return buildDocument();\r\n      case \"save\":\r\n        API.save(options.filename);\r\n        break;\r\n      case \"arraybuffer\":\r\n        return getArrayBuffer(buildDocument());\r\n      case \"blob\":\r\n        return getBlob(buildDocument());\r\n      case \"bloburi\":\r\n      case \"bloburl\":\r\n        // Developer is responsible of calling revokeObjectURL\r\n        if (\r\n          typeof globalObject.URL !== \"undefined\" &&\r\n          typeof globalObject.URL.createObjectURL === \"function\"\r\n        ) {\r\n          return (\r\n            (globalObject.URL &&\r\n              globalObject.URL.createObjectURL(getBlob(buildDocument()))) ||\r\n            void 0\r\n          );\r\n        } else {\r\n          console.warn(\r\n            \"bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauristring\":\r\n      case \"dataurlstring\":\r\n        var dataURI = \"\";\r\n        var pdfDocument = buildDocument();\r\n        try {\r\n          dataURI = btoa(pdfDocument);\r\n        } catch (e) {\r\n          dataURI = btoa(unescape(encodeURIComponent(pdfDocument)));\r\n        }\r\n        return (\r\n          \"data:application/pdf;filename=\" +\r\n          options.filename +\r\n          \";base64,\" +\r\n          dataURI\r\n        );\r\n      case \"pdfobjectnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfObjectUrl =\r\n            \"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js\";\r\n          var integrity =\r\n            ' integrity=\"sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==\" crossorigin=\"anonymous\"';\r\n\r\n          if (options.pdfObjectUrl) {\r\n            pdfObjectUrl = options.pdfObjectUrl;\r\n            integrity = \"\";\r\n          }\r\n\r\n          var htmlForNewWindow =\r\n            \"<html>\" +\r\n            '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src=\"' +\r\n            pdfObjectUrl +\r\n            '\"' +\r\n            integrity +\r\n            '></script><script >PDFObject.embed(\"' +\r\n            this.output(\"dataurlstring\") +\r\n            '\", ' +\r\n            JSON.stringify(options) +\r\n            \");</script></body></html>\";\r\n          var nW = globalObject.open();\r\n\r\n          if (nW !== null) {\r\n            nW.document.write(htmlForNewWindow);\r\n          }\r\n          return nW;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfobjectnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"pdfjsnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfJsUrl = options.pdfJsUrl || \"examples/PDF.js/web/viewer.html\";\r\n          var htmlForPDFjsNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            '<body><iframe id=\"pdfViewer\" src=\"' +\r\n            pdfJsUrl +\r\n            \"?file=&downloadName=\" +\r\n            options.filename +\r\n            '\" width=\"500px\" height=\"400px\" />' +\r\n            \"</body></html>\";\r\n          var PDFjsNewWindow = globalObject.open();\r\n\r\n          if (PDFjsNewWindow !== null) {\r\n            PDFjsNewWindow.document.write(htmlForPDFjsNewWindow);\r\n            var scope = this;\r\n            PDFjsNewWindow.document.documentElement.querySelector(\r\n              \"#pdfViewer\"\r\n            ).onload = function() {\r\n              PDFjsNewWindow.document.title = options.filename;\r\n              PDFjsNewWindow.document.documentElement\r\n                .querySelector(\"#pdfViewer\")\r\n                .contentWindow.PDFViewerApplication.open(\r\n                  scope.output(\"bloburl\")\r\n                );\r\n            };\r\n          }\r\n          return PDFjsNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfjsnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"dataurlnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var htmlForDataURLNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            \"<body>\" +\r\n            '<iframe src=\"' +\r\n            this.output(\"datauristring\", options) +\r\n            '\"></iframe>' +\r\n            \"</body></html>\";\r\n          var dataURLNewWindow = globalObject.open();\r\n          if (dataURLNewWindow !== null) {\r\n            dataURLNewWindow.document.write(htmlForDataURLNewWindow);\r\n            dataURLNewWindow.document.title = options.filename;\r\n          }\r\n          if (dataURLNewWindow || typeof safari === \"undefined\")\r\n            return dataURLNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option dataurlnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauri\":\r\n      case \"dataurl\":\r\n        return (globalObject.document.location.href = this.output(\r\n          \"datauristring\",\r\n          options\r\n        ));\r\n      default:\r\n        return null;\r\n    }\r\n  }));\r\n\r\n  /**\r\n   * Used to see if a supplied hotfix was requested when the pdf instance was created.\r\n   * @param {string} hotfixName - The name of the hotfix to check.\r\n   * @returns {boolean}\r\n   */\r\n  var hasHotfix = function(hotfixName) {\r\n    return (\r\n      Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1\r\n    );\r\n  };\r\n\r\n  switch (unit) {\r\n    case \"pt\":\r\n      scaleFactor = 1;\r\n      break;\r\n    case \"mm\":\r\n      scaleFactor = 72 / 25.4;\r\n      break;\r\n    case \"cm\":\r\n      scaleFactor = 72 / 2.54;\r\n      break;\r\n    case \"in\":\r\n      scaleFactor = 72;\r\n      break;\r\n    case \"px\":\r\n      if (hasHotfix(\"px_scaling\") == true) {\r\n        scaleFactor = 72 / 96;\r\n      } else {\r\n        scaleFactor = 96 / 72;\r\n      }\r\n      break;\r\n    case \"pc\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"em\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"ex\":\r\n      scaleFactor = 6;\r\n      break;\r\n    default:\r\n      if (typeof unit === \"number\") {\r\n        scaleFactor = unit;\r\n      } else {\r\n        throw new Error(\"Invalid unit: \" + unit);\r\n      }\r\n  }\r\n\r\n  var encryption = null;\r\n  setCreationDate();\r\n  setFileId();\r\n\r\n  var getEncryptor = function(objectId) {\r\n    if (encryptionOptions !== null) {\r\n      return encryption.encryptor(objectId, 0);\r\n    }\r\n    return function(data) {\r\n      return data;\r\n    };\r\n  };\r\n\r\n  //---------------------------------------\r\n  // Public API\r\n\r\n  var getPageInfo = (API.__private__.getPageInfo = API.getPageInfo = function(\r\n    pageNumberOneBased\r\n  ) {\r\n    if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfo\");\r\n    }\r\n    var objId = pagesContext[pageNumberOneBased].objId;\r\n    return {\r\n      objId: objId,\r\n      pageNumber: pageNumberOneBased,\r\n      pageContext: pagesContext[pageNumberOneBased]\r\n    };\r\n  });\r\n\r\n  var getPageInfoByObjId = (API.__private__.getPageInfoByObjId = function(\r\n    objId\r\n  ) {\r\n    if (isNaN(objId) || objId % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfoByObjId\");\r\n    }\r\n    for (var pageNumber in pagesContext) {\r\n      if (pagesContext[pageNumber].objId === objId) {\r\n        break;\r\n      }\r\n    }\r\n    return getPageInfo(pageNumber);\r\n  });\r\n\r\n  var getCurrentPageInfo = (API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function() {\r\n    return {\r\n      objId: pagesContext[currentPage].objId,\r\n      pageNumber: currentPage,\r\n      pageContext: pagesContext[currentPage]\r\n    };\r\n  });\r\n\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @param format {String/Array} The format of the new page. Can be: <ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n   * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n   * @param orientation {string} Orientation of the new page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" (Default), \"l\").\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addPage\r\n   */\r\n  API.addPage = function() {\r\n    _addPage.apply(this, arguments);\r\n    return this;\r\n  };\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name setPage\r\n   * @param {number} page Switch the active page to the page number specified (indexed starting at 1).\r\n   * @example\r\n   * doc = jsPDF()\r\n   * doc.addPage()\r\n   * doc.addPage()\r\n   * doc.text('I am on page 3', 10, 10)\r\n   * doc.setPage(1)\r\n   * doc.text('I am on page 1', 10, 10)\r\n   */\r\n  API.setPage = function() {\r\n    _setPage.apply(this, arguments);\r\n    setOutputDestination.call(this, pages[currentPage]);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name insertPage\r\n   * @memberof jsPDF#\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {Object} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.insertPage = function(beforePage) {\r\n    this.addPage();\r\n    this.movePage(currentPage, beforePage);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name movePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {number} targetPage\r\n   * @param {number} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.movePage = function(targetPage, beforePage) {\r\n    var tmpPages, tmpPagesContext;\r\n    if (targetPage > beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var i = targetPage; i > beforePage; i--) {\r\n        pages[i] = pages[i - 1];\r\n        pagesContext[i] = pagesContext[i - 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    } else if (targetPage < beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var j = targetPage; j < beforePage; j++) {\r\n        pages[j] = pages[j + 1];\r\n        pagesContext[j] = pagesContext[j + 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Deletes a page from the PDF.\r\n   * @name deletePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @param {number} targetPage\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   */\r\n  API.deletePage = function() {\r\n    _deletePage.apply(this, arguments);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.\r\n   * @param {Object} [options] - Collection of settings signaling how the text must be encoded.\r\n   * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.\r\n   * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging\r\n   * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.\r\n   * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.\r\n   * @param {number} [options.charSpace=0] - The space between each letter.\r\n   * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.\r\n   * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.\r\n   * @param {Object} [options.flags] - Flags for to8bitStream.\r\n   * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.\r\n   * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.\r\n   * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.\r\n   * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.\r\n   * @param {boolean} [options.isInputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isInputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine\r\n   * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.\r\n   *\r\n   * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing\r\n   * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this\r\n   * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a\r\n   * DIFFERENT result. A matrix is only allowed in \"advanced\" API mode.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name text\r\n   */\r\n  API.__private__.text = API.text = function(text, x, y, options, transform) {\r\n    /*\r\n     * Inserts something like this into PDF\r\n     *   BT\r\n     *    /F1 16 Tf  % Font name + size\r\n     *    16 TL % How many units down for next line in multiline text\r\n     *    0 g % color\r\n     *    28.35 813.54 Td % position\r\n     *    (line one) Tj\r\n     *    T* (line two) Tj\r\n     *    T* (line three) Tj\r\n     *   ET\r\n     */\r\n    options = options || {};\r\n    var scope = options.scope || this;\r\n    var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, text, flags)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(data, coordinates... , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (\r\n      typeof text === \"number\" &&\r\n      typeof x === \"number\" &&\r\n      (typeof y === \"string\" || Array.isArray(y))\r\n    ) {\r\n      var tmp = y;\r\n      y = x;\r\n      x = text;\r\n      text = tmp;\r\n    }\r\n\r\n    var transformationMatrix;\r\n\r\n    if (arguments[3] instanceof Matrix === false) {\r\n      flags = arguments[3];\r\n      angle = arguments[4];\r\n      align = arguments[5];\r\n\r\n      if (typeof flags !== \"object\" || flags === null) {\r\n        if (typeof angle === \"string\") {\r\n          align = angle;\r\n          angle = null;\r\n        }\r\n        if (typeof flags === \"string\") {\r\n          align = flags;\r\n          flags = null;\r\n        }\r\n        if (typeof flags === \"number\") {\r\n          angle = flags;\r\n          flags = null;\r\n        }\r\n        options = {\r\n          flags: flags,\r\n          angle: angle,\r\n          align: align\r\n        };\r\n      }\r\n    } else {\r\n      advancedApiModeTrap(\r\n        \"The transform parameter of text() with a Matrix value\"\r\n      );\r\n      transformationMatrix = transform;\r\n    }\r\n\r\n    if (isNaN(x) || isNaN(y) || typeof text === \"undefined\" || text === null) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.text\");\r\n    }\r\n\r\n    if (text.length === 0) {\r\n      return scope;\r\n    }\r\n\r\n    var xtra = \"\";\r\n    var isHex = false;\r\n    var lineHeight =\r\n      typeof options.lineHeightFactor === \"number\"\r\n        ? options.lineHeightFactor\r\n        : lineHeightFactor;\r\n    var scaleFactor = scope.internal.scaleFactor;\r\n\r\n    function ESC(s) {\r\n      s = s.split(\"\\t\").join(Array(options.TabLen || 9).join(\" \"));\r\n      return pdfEscape(s, flags);\r\n    }\r\n\r\n    function transformTextToSpecialArray(text) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      var da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (typeof curDa === \"string\") {\r\n          da.push(curDa);\r\n        } else {\r\n          if (\r\n            Array.isArray(text) &&\r\n            (curDa.length === 1 ||\r\n              (curDa[1] === undefined && curDa[2] === undefined))\r\n          ) {\r\n            da.push(curDa[0]);\r\n          } else {\r\n            da.push([curDa[0], curDa[1], curDa[2]]);\r\n          }\r\n        }\r\n      }\r\n      return da;\r\n    }\r\n\r\n    function processTextByFunction(text, processingFunction) {\r\n      var result;\r\n      if (typeof text === \"string\") {\r\n        result = processingFunction(text)[0];\r\n      } else if (Array.isArray(text)) {\r\n        //we don't want to destroy original text array, so cloning it\r\n        var sa = text.concat();\r\n        var da = [];\r\n        var len = sa.length;\r\n        var curDa;\r\n        var tmpResult;\r\n        //we do array.join('text that must not be PDFescaped\")\r\n        //thus, pdfEscape each component separately\r\n        while (len--) {\r\n          curDa = sa.shift();\r\n          if (typeof curDa === \"string\") {\r\n            da.push(processingFunction(curDa)[0]);\r\n          } else if (Array.isArray(curDa) && typeof curDa[0] === \"string\") {\r\n            tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);\r\n            da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);\r\n          }\r\n        }\r\n        result = da;\r\n      }\r\n      return result;\r\n    }\r\n\r\n    //Check if text is of type String\r\n    var textIsOfTypeString = false;\r\n    var tmpTextIsOfTypeString = true;\r\n\r\n    if (typeof text === \"string\") {\r\n      textIsOfTypeString = true;\r\n    } else if (Array.isArray(text)) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (\r\n          typeof curDa !== \"string\" ||\r\n          (Array.isArray(curDa) && typeof curDa[0] !== \"string\")\r\n        ) {\r\n          tmpTextIsOfTypeString = false;\r\n        }\r\n      }\r\n      textIsOfTypeString = tmpTextIsOfTypeString;\r\n    }\r\n    if (textIsOfTypeString === false) {\r\n      throw new Error(\r\n        'Type of text must be string or Array. \"' +\r\n          text +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n\r\n    //If there are any newlines in text, we assume\r\n    //the user wanted to print multiple lines, so break the\r\n    //text up into an array. If the text is already an array,\r\n    //we assume the user knows what they are doing.\r\n    //Convert text into an array anyway to simplify\r\n    //later code.\r\n\r\n    if (typeof text === \"string\") {\r\n      if (text.match(/[\\r?\\n]/)) {\r\n        text = text.split(/\\r\\n|\\r|\\n/g);\r\n      } else {\r\n        text = [text];\r\n      }\r\n    }\r\n\r\n    //baseline\r\n    var height = activeFontSize / scope.internal.scaleFactor;\r\n    var descent = height * (lineHeight - 1);\r\n\r\n    switch (options.baseline) {\r\n      case \"bottom\":\r\n        y -= descent;\r\n        break;\r\n      case \"top\":\r\n        y += height - descent;\r\n        break;\r\n      case \"hanging\":\r\n        y += height - 2 * descent;\r\n        break;\r\n      case \"middle\":\r\n        y += height / 2 - descent;\r\n        break;\r\n      case \"ideographic\":\r\n      case \"alphabetic\":\r\n      default:\r\n        // do nothing, everything is fine\r\n        break;\r\n    }\r\n\r\n    //multiline\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    if (maxWidth > 0) {\r\n      if (typeof text === \"string\") {\r\n        text = scope.splitTextToSize(text, maxWidth);\r\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n        text = text.reduce(function(acc, textLine) {\r\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\r\n        }, []);\r\n      }\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"preProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    options = payload.options;\r\n\r\n    //angle\r\n    angle = options.angle;\r\n\r\n    if (\r\n      transformationMatrix instanceof Matrix === false &&\r\n      angle &&\r\n      typeof angle === \"number\"\r\n    ) {\r\n      angle *= Math.PI / 180;\r\n\r\n      if (options.rotationDirection === 0) {\r\n        angle = -angle;\r\n      }\r\n\r\n      if (apiMode === ApiMode.ADVANCED) {\r\n        angle = -angle;\r\n      }\r\n\r\n      var c = Math.cos(angle);\r\n      var s = Math.sin(angle);\r\n      transformationMatrix = new Matrix(c, s, -s, c, 0, 0);\r\n    } else if (angle && angle instanceof Matrix) {\r\n      transformationMatrix = angle;\r\n    }\r\n\r\n    if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {\r\n      transformationMatrix = identityMatrix;\r\n    }\r\n\r\n    //charSpace\r\n\r\n    charSpace = options.charSpace || activeCharSpace;\r\n\r\n    if (typeof charSpace !== \"undefined\") {\r\n      xtra += hpf(scale(charSpace)) + \" Tc\\n\";\r\n      this.setCharSpace(this.getCharSpace() || 0);\r\n    }\r\n\r\n    horizontalScale = options.horizontalScale;\r\n    if (typeof horizontalScale !== \"undefined\") {\r\n      xtra += hpf(horizontalScale * 100) + \" Tz\\n\";\r\n    }\r\n\r\n    //lang\r\n\r\n    var lang = options.lang;\r\n\r\n    if (lang) {\r\n      //    xtra += \"/Lang (\" + lang +\")\\n\";\r\n    }\r\n\r\n    //renderingMode\r\n    var renderingMode = -1;\r\n    var parmRenderingMode =\r\n      typeof options.renderingMode !== \"undefined\"\r\n        ? options.renderingMode\r\n        : options.stroke;\r\n    var pageContext = scope.internal.getCurrentPageInfo().pageContext;\r\n\r\n    switch (parmRenderingMode) {\r\n      case 0:\r\n      case false:\r\n      case \"fill\":\r\n        renderingMode = 0;\r\n        break;\r\n      case 1:\r\n      case true:\r\n      case \"stroke\":\r\n        renderingMode = 1;\r\n        break;\r\n      case 2:\r\n      case \"fillThenStroke\":\r\n        renderingMode = 2;\r\n        break;\r\n      case 3:\r\n      case \"invisible\":\r\n        renderingMode = 3;\r\n        break;\r\n      case 4:\r\n      case \"fillAndAddForClipping\":\r\n        renderingMode = 4;\r\n        break;\r\n      case 5:\r\n      case \"strokeAndAddPathForClipping\":\r\n        renderingMode = 5;\r\n        break;\r\n      case 6:\r\n      case \"fillThenStrokeAndAddToPathForClipping\":\r\n        renderingMode = 6;\r\n        break;\r\n      case 7:\r\n      case \"addToPathForClipping\":\r\n        renderingMode = 7;\r\n        break;\r\n    }\r\n\r\n    var usedRenderingMode =\r\n      typeof pageContext.usedRenderingMode !== \"undefined\"\r\n        ? pageContext.usedRenderingMode\r\n        : -1;\r\n\r\n    //if the coder wrote it explicitly to use a specific\r\n    //renderingMode, then use it\r\n    if (renderingMode !== -1) {\r\n      xtra += renderingMode + \" Tr\\n\";\r\n      //otherwise check if we used the rendering Mode already\r\n      //if so then set the rendering Mode...\r\n    } else if (usedRenderingMode !== -1) {\r\n      xtra += \"0 Tr\\n\";\r\n    }\r\n\r\n    if (renderingMode !== -1) {\r\n      pageContext.usedRenderingMode = renderingMode;\r\n    }\r\n\r\n    //align\r\n    align = options.align || \"left\";\r\n    var leading = activeFontSize * lineHeight;\r\n    var pageWidth = scope.internal.pageSize.getWidth();\r\n    var activeFont = fonts[activeFontKey];\r\n    charSpace = options.charSpace || activeCharSpace;\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    var lineWidths;\r\n    flags = Object.assign({ autoencode: true, noBOM: true }, options.flags);\r\n\r\n    var wordSpacingPerLine = [];\r\n    var findWidth = function(v) {\r\n      return (\r\n        (scope.getStringUnitWidth(v, {\r\n          font: activeFont,\r\n          charSpace: charSpace,\r\n          fontSize: activeFontSize,\r\n          doKerning: false\r\n        }) *\r\n          activeFontSize) /\r\n        scaleFactor\r\n      );\r\n    };\r\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n      da = transformTextToSpecialArray(text);\r\n      var newY;\r\n      if (align !== \"left\") {\r\n        lineWidths = da.map(findWidth);\r\n      }\r\n      //The first line uses the \"main\" Td setting,\r\n      //and the subsequent lines are offset by the\r\n      //previous line's x coordinate.\r\n      var prevWidth = 0;\r\n      var newX;\r\n      if (align === \"right\") {\r\n        //The passed in x coordinate defines the\r\n        //rightmost point of the text.\r\n        x -= lineWidths[0];\r\n        text = [];\r\n        len = da.length;\r\n        for (var i = 0; i < len; i++) {\r\n          if (i === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale(prevWidth - lineWidths[i]);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[i], newX, newY]);\r\n          prevWidth = lineWidths[i];\r\n        }\r\n      } else if (align === \"center\") {\r\n        //The passed in x coordinate defines\r\n        //the center point.\r\n        x -= lineWidths[0] / 2;\r\n        text = [];\r\n        len = da.length;\r\n        for (var j = 0; j < len; j++) {\r\n          if (j === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale((prevWidth - lineWidths[j]) / 2);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[j], newX, newY]);\r\n          prevWidth = lineWidths[j];\r\n        }\r\n      } else if (align === \"left\") {\r\n        text = [];\r\n        len = da.length;\r\n        for (var h = 0; h < len; h++) {\r\n          text.push(da[h]);\r\n        }\r\n      } else if (align === \"justify\" && activeFont.encoding === \"Identity-H\") {\r\n        // when using unicode fonts, wordSpacePerLine does not apply\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        let backToStartX = 0;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : backToStartX;\r\n          if (l < len - 1) {\r\n            let spacing = scale(\r\n              (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n            );\r\n            let words = da[l].split(\" \");\r\n            text.push([words[0] + \" \", newX, newY]);\r\n            backToStartX = 0; // distance to reset back to the left\r\n            for (let i = 1; i < words.length; i++) {\r\n              let shiftAmount =\r\n                (findWidth(words[i - 1] + \" \" + words[i]) -\r\n                  findWidth(words[i])) *\r\n                  scaleFactor +\r\n                spacing;\r\n              if (i == words.length - 1) text.push([words[i], shiftAmount, 0]);\r\n              else text.push([words[i] + \" \", shiftAmount, 0]);\r\n              backToStartX -= shiftAmount;\r\n            }\r\n          } else {\r\n            text.push([da[l], newX, newY]);\r\n          }\r\n        }\r\n        text.push([\"\", backToStartX, 0]);\r\n      } else if (align === \"justify\") {\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : 0;\r\n          if (l < len - 1) {\r\n            wordSpacingPerLine.push(\r\n              hpf(\r\n                scale(\r\n                  (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n                )\r\n              )\r\n            );\r\n          } else {\r\n            wordSpacingPerLine.push(0);\r\n          }\r\n          text.push([da[l], newX, newY]);\r\n        }\r\n      } else {\r\n        throw new Error(\r\n          'Unrecognized alignment option, use \"left\", \"center\", \"right\" or \"justify\".'\r\n        );\r\n      }\r\n    }\r\n\r\n    //R2L\r\n    var doReversing = typeof options.R2L === \"boolean\" ? options.R2L : R2L;\r\n    if (doReversing === true) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [\r\n          text\r\n            .split(\"\")\r\n            .reverse()\r\n            .join(\"\"),\r\n          posX,\r\n          posY\r\n        ];\r\n      });\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"postProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    isHex = payload.mutex.isHex || false;\r\n\r\n    //Escaping\r\n    var activeFontEncoding = fonts[activeFontKey].encoding;\r\n\r\n    if (\r\n      activeFontEncoding === \"WinAnsiEncoding\" ||\r\n      activeFontEncoding === \"StandardEncoding\"\r\n    ) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [ESC(text), posX, posY];\r\n      });\r\n    }\r\n\r\n    da = transformTextToSpecialArray(text);\r\n\r\n    text = [];\r\n    var STRING = 0;\r\n    var ARRAY = 1;\r\n    var variant = Array.isArray(da[0]) ? ARRAY : STRING;\r\n    var posX;\r\n    var posY;\r\n    var content;\r\n    var wordSpacing = \"\";\r\n\r\n    var generatePosition = function(\r\n      parmPosX,\r\n      parmPosY,\r\n      parmTransformationMatrix\r\n    ) {\r\n      var position = \"\";\r\n      if (parmTransformationMatrix instanceof Matrix) {\r\n        // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y\r\n        // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied\r\n        // in the coordinate system established by this matrix\r\n        if (typeof options.angle === \"number\") {\r\n          parmTransformationMatrix = matrixMult(\r\n            parmTransformationMatrix,\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY)\r\n          );\r\n        } else {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        if (apiMode === ApiMode.ADVANCED) {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, -1, 0, 0),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        position = parmTransformationMatrix.join(\" \") + \" Tm\\n\";\r\n      } else {\r\n        position = hpf(parmPosX) + \" \" + hpf(parmPosY) + \" Td\\n\";\r\n      }\r\n      return position;\r\n    };\r\n\r\n    for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {\r\n      wordSpacing = \"\";\r\n\r\n      switch (variant) {\r\n        case ARRAY:\r\n          content =\r\n            (isHex ? \"<\" : \"(\") + da[lineIndex][0] + (isHex ? \">\" : \")\");\r\n          posX = parseFloat(da[lineIndex][1]);\r\n          posY = parseFloat(da[lineIndex][2]);\r\n          break;\r\n        case STRING:\r\n          content = (isHex ? \"<\" : \"(\") + da[lineIndex] + (isHex ? \">\" : \")\");\r\n          posX = getHorizontalCoordinate(x);\r\n          posY = getVerticalCoordinate(y);\r\n          break;\r\n      }\r\n\r\n      if (\r\n        typeof wordSpacingPerLine !== \"undefined\" &&\r\n        typeof wordSpacingPerLine[lineIndex] !== \"undefined\"\r\n      ) {\r\n        wordSpacing = wordSpacingPerLine[lineIndex] + \" Tw\\n\";\r\n      }\r\n\r\n      if (lineIndex === 0) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      } else if (variant === STRING) {\r\n        text.push(wordSpacing + content);\r\n      } else if (variant === ARRAY) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      }\r\n    }\r\n\r\n    text = variant === STRING ? text.join(\" Tj\\nT* \") : text.join(\" Tj\\n\");\r\n    text += \" Tj\\n\";\r\n\r\n    var result = \"BT\\n/\";\r\n    result += activeFontKey + \" \" + activeFontSize + \" Tf\\n\"; // font face, style, size\r\n    result += hpf(activeFontSize * lineHeight) + \" TL\\n\"; // line spacing\r\n    result += textColor + \"\\n\";\r\n    result += xtra;\r\n    result += text;\r\n    result += \"ET\";\r\n\r\n    out(result);\r\n    usedFonts[activeFontKey] = true;\r\n    return scope;\r\n  };\r\n\r\n  // PDF supports these path painting and clip path operators:\r\n  //\r\n  // S - stroke\r\n  // s - close/stroke\r\n  // f (F) - fill non-zero\r\n  // f* - fill evenodd\r\n  // B - fill stroke nonzero\r\n  // B* - fill stroke evenodd\r\n  // b - close fill stroke nonzero\r\n  // b* - close fill stroke evenodd\r\n  // n - nothing (consume path)\r\n  // W - clip nonzero\r\n  // W* - clip evenodd\r\n  //\r\n  // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()\r\n  // method.\r\n  /**\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @instance\r\n   * @param {string} rule Only possible value is 'evenodd'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description All .clip() after calling drawing ops with a style argument of null.\r\n   */\r\n  var clip = (API.__private__.clip = API.clip = function(rule) {\r\n    // Call .clip() after calling drawing ops with a style argument of null\r\n    // W is the PDF clipping op\r\n    if (\"evenodd\" === rule) {\r\n      out(\"W*\");\r\n    } else {\r\n      out(\"W\");\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * @name clipEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note\r\n   * that this will NOT consume the current path. In order to only use this path for clipping call\r\n   * {@link API.discardPath} afterwards.\r\n   */\r\n  API.clipEvenOdd = function() {\r\n    return clip(\"evenodd\");\r\n  };\r\n\r\n  /**\r\n   * Consumes the current path without any effect. Mainly used in combination with {@link clip} or\r\n   * {@link clipEvenOdd}. The PDF \"n\" operator.\r\n   * @name discardPath\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.discardPath = API.discardPath = function() {\r\n    out(\"n\");\r\n    return this;\r\n  };\r\n\r\n  var isValidStyle = (API.__private__.isValidStyle = function(style) {\r\n    var validStyleVariants = [\r\n      undefined,\r\n      null,\r\n      \"S\",\r\n      \"D\",\r\n      \"F\",\r\n      \"DF\",\r\n      \"FD\",\r\n      \"f\",\r\n      \"f*\",\r\n      \"B\",\r\n      \"B*\",\r\n      \"n\"\r\n    ];\r\n    var result = false;\r\n    if (validStyleVariants.indexOf(style) !== -1) {\r\n      result = true;\r\n    }\r\n    return result;\r\n  });\r\n\r\n  API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function(\r\n    operator\r\n  ) {\r\n    if (isValidStyle(operator)) {\r\n      defaultPathOperation = operator;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  var getStyle = (API.__private__.getStyle = API.getStyle = function(style) {\r\n    // see path-painting operators in PDF spec\r\n    var op = defaultPathOperation; // stroke\r\n\r\n    switch (style) {\r\n      case \"D\":\r\n      case \"S\":\r\n        op = \"S\"; // stroke\r\n        break;\r\n      case \"F\":\r\n        op = \"f\"; // fill\r\n        break;\r\n      case \"FD\":\r\n      case \"DF\":\r\n        op = \"B\";\r\n        break;\r\n      case \"f\":\r\n      case \"f*\":\r\n      case \"B\":\r\n      case \"B*\":\r\n        /*\r\n               Allow direct use of these PDF path-painting operators:\r\n               - f    fill using nonzero winding number rule\r\n               - f*    fill using even-odd rule\r\n               - B    fill then stroke with fill using non-zero winding number rule\r\n               - B*    fill then stroke with fill using even-odd rule\r\n               */\r\n        op = style;\r\n        break;\r\n    }\r\n    return op;\r\n  });\r\n\r\n  /**\r\n   * Close the current path. The PDF \"h\" operator.\r\n   * @name close\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  var close = (API.close = function() {\r\n    out(\"h\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Stroke the path. The PDF \"S\" operator.\r\n   * @name stroke\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.stroke = function() {\r\n    out(\"S\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled\r\n   * with this pattern, otherwise with the current fill color. Equivalent to the PDF \"f\" operator.\r\n   * @name fill\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fill = function(pattern) {\r\n    fillWithOptionalPattern(\"f\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the even-odd rule. The PDF f* operator.\r\n   * @see API.fill\r\n   * @name fillEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"f*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the nonzero winding number rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStroke\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStroke = function(pattern) {\r\n    fillWithOptionalPattern(\"B\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the even-odd rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStrokeEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStrokeEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"B*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  var fillWithOptionalPattern = function(style, pattern) {\r\n    if (typeof pattern === \"object\") {\r\n      fillWithPattern(pattern, style);\r\n    } else {\r\n      out(style);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    if (\r\n      style === null ||\r\n      (apiMode === ApiMode.ADVANCED && style === undefined)\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    style = getStyle(style);\r\n\r\n    // stroking / filling / both the path\r\n    out(style);\r\n  };\r\n\r\n  function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {\r\n    var clone = new TilingPattern(\r\n      boundingBox || this.boundingBox,\r\n      xStep || this.xStep,\r\n      yStep || this.yStep,\r\n      this.gState,\r\n      matrix || this.matrix\r\n    );\r\n    clone.stream = this.stream;\r\n    var key = patternKey + \"$$\" + this.cloneIndex++ + \"$$\";\r\n    addPattern(key, clone);\r\n    return clone;\r\n  }\r\n\r\n  var fillWithPattern = function(patternData, style) {\r\n    var patternId = patternMap[patternData.key];\r\n    var pattern = patterns[patternId];\r\n\r\n    if (pattern instanceof ShadingPattern) {\r\n      out(\"q\");\r\n\r\n      out(clipRuleFromStyle(style));\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n      out(patternData.matrix.toString() + \" cm\");\r\n      out(\"/\" + patternId + \" sh\");\r\n      out(\"Q\");\r\n    } else if (pattern instanceof TilingPattern) {\r\n      // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,\r\n      // so we must flip them\r\n      var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());\r\n\r\n      if (patternData.matrix) {\r\n        matrix = matrix.multiply(patternData.matrix || identityMatrix);\r\n        // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances\r\n        // for each use\r\n        patternId = cloneTilingPattern.call(\r\n          pattern,\r\n          patternData.key,\r\n          patternData.boundingBox,\r\n          patternData.xStep,\r\n          patternData.yStep,\r\n          matrix\r\n        ).id;\r\n      }\r\n\r\n      out(\"q\");\r\n      out(\"/Pattern cs\");\r\n      out(\"/\" + patternId + \" scn\");\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n\r\n      out(style);\r\n      out(\"Q\");\r\n    }\r\n  };\r\n\r\n  var clipRuleFromStyle = function(style) {\r\n    switch (style) {\r\n      case \"f\":\r\n      case \"F\":\r\n        return \"W n\";\r\n      case \"f*\":\r\n        return \"W* n\";\r\n      case \"B\":\r\n        return \"W S\";\r\n      case \"B*\":\r\n        return \"W* S\";\r\n\r\n      // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern\r\n      // and \"n\"/\"S\" as style would still fill/fill and stroke the path)\r\n      case \"S\":\r\n        return \"W S\";\r\n      case \"n\":\r\n        return \"W n\";\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Begin a new subpath by moving the current point to coordinates (x, y). The PDF \"m\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @name moveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var moveTo = (API.moveTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" m\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a straight line segment from the current point to the point (x, y). The PDF \"l\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @memberof jsPDF#\r\n   * @name lineTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var lineTo = (API.lineTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" l\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point\r\n   * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {number} x3\r\n   * @param {number} y3\r\n   * @memberof jsPDF#\r\n   * @name curveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var curveTo = (API.curveTo = function(x1, y1, x2, y2, x3, y3) {\r\n    out(\r\n      [\r\n        hpf(scale(x1)),\r\n        hpf(transformScaleY(y1)),\r\n        hpf(scale(x2)),\r\n        hpf(transformScaleY(y2)),\r\n        hpf(scale(x3)),\r\n        hpf(transformScaleY(y3)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Draw a line on the current page.\r\n   *\r\n   * @name line\r\n   * @function\r\n   * @instance\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {string} style A string specifying the painting style or null.  Valid styles include: 'S' [default] - stroke, 'F' - fill,  and 'DF' (or 'FD') -  fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.line = API.line = function(x1, y1, x2, y2, style) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.line\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || \"S\");\r\n    } else {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @typedef {Object} PatternData\r\n   * {Matrix|undefined} matrix\r\n   * {Number|undefined} xStep\r\n   * {Number|undefined} yStep\r\n   * {Array.<Number>|undefined} boundingBox\r\n   */\r\n\r\n  /**\r\n   * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.\r\n   * All data points in `lines` are relative to last line origin.\r\n   * `x`, `y` become x1,y1 for first line / curve in the set.\r\n   * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.\r\n   * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.\r\n   *\r\n   * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line\r\n   * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name lines\r\n   */\r\n  API.__private__.lines = API.lines = function(\r\n    lines,\r\n    x,\r\n    y,\r\n    scale,\r\n    style,\r\n    closed\r\n  ) {\r\n    var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(content, coordinateX, coordinateY , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (typeof lines === \"number\") {\r\n      tmp = y;\r\n      y = x;\r\n      x = lines;\r\n      lines = tmp;\r\n    }\r\n\r\n    scale = scale || [1, 1];\r\n    closed = closed || false;\r\n\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      !Array.isArray(lines) ||\r\n      !Array.isArray(scale) ||\r\n      !isValidStyle(style) ||\r\n      typeof closed !== \"boolean\"\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.lines\");\r\n    }\r\n\r\n    // starting point\r\n    moveTo(x, y);\r\n\r\n    scalex = scale[0];\r\n    scaley = scale[1];\r\n    l = lines.length;\r\n    //, x2, y2 // bezier only. In page default measurement \"units\", *after* scaling\r\n    //, x3, y3 // bezier only. In page default measurement \"units\", *after* scaling\r\n    // ending point for all, lines and bezier. . In page default measurement \"units\", *after* scaling\r\n    x4 = x; // last / ending point = starting point for first item.\r\n    y4 = y; // last / ending point = starting point for first item.\r\n\r\n    for (i = 0; i < l; i++) {\r\n      leg = lines[i];\r\n      if (leg.length === 2) {\r\n        // simple line\r\n        x4 = leg[0] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[1] * scaley + y4; // here last y4 was prior ending point\r\n        lineTo(x4, y4);\r\n      } else {\r\n        // bezier curve\r\n        x2 = leg[0] * scalex + x4; // here last x4 is prior ending point\r\n        y2 = leg[1] * scaley + y4; // here last y4 is prior ending point\r\n        x3 = leg[2] * scalex + x4; // here last x4 is prior ending point\r\n        y3 = leg[3] * scaley + y4; // here last y4 is prior ending point\r\n        x4 = leg[4] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[5] * scaley + y4; // here last y4 was prior ending point\r\n        curveTo(x2, y2, x3, y3, x4, y4);\r\n      }\r\n    }\r\n\r\n    if (closed) {\r\n      close();\r\n    }\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.\r\n   * @param {Array<Object>} lines An array of {op: operator, c: coordinates} object, where op is one of \"m\" (move to), \"l\" (line to)\r\n   * \"c\" (cubic bezier curve) and \"h\" (close (sub)path)). c is an array of coordinates. \"m\" and \"l\" expect two, \"c\"\r\n   * six and \"h\" an empty array (or undefined).\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name path\r\n   */\r\n  API.path = function(lines) {\r\n    for (var i = 0; i < lines.length; i++) {\r\n      var leg = lines[i];\r\n      var coords = leg.c;\r\n      switch (leg.op) {\r\n        case \"m\":\r\n          moveTo(coords[0], coords[1]);\r\n          break;\r\n        case \"l\":\r\n          lineTo(coords[0], coords[1]);\r\n          break;\r\n        case \"c\":\r\n          curveTo.apply(this, coords);\r\n          break;\r\n        case \"h\":\r\n          close();\r\n          break;\r\n      }\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name rect\r\n   */\r\n  API.__private__.rect = API.rect = function(x, y, w, h, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.rect\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      h = -h;\r\n    }\r\n\r\n    out(\r\n      [\r\n        hpf(scale(x)),\r\n        hpf(transformScaleY(y)),\r\n        hpf(scale(w)),\r\n        hpf(scale(h)),\r\n        \"re\"\r\n      ].join(\" \")\r\n    );\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a triangle to PDF.\r\n   *\r\n   * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name triangle\r\n   */\r\n  API.__private__.triangle = API.triangle = function(\r\n    x1,\r\n    y1,\r\n    x2,\r\n    y2,\r\n    x3,\r\n    y3,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      isNaN(x3) ||\r\n      isNaN(y3) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.triangle\");\r\n    }\r\n    this.lines(\r\n      [\r\n        [x2 - x1, y2 - y1], // vector to point 2\r\n        [x3 - x2, y3 - y2], // vector to point 3\r\n        [x1 - x3, y1 - y3] // closing vector back to point 1\r\n      ],\r\n      x1,\r\n      y1, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle with rounded corners to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name roundedRect\r\n   */\r\n  API.__private__.roundedRect = API.roundedRect = function(\r\n    x,\r\n    y,\r\n    w,\r\n    h,\r\n    rx,\r\n    ry,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(w) ||\r\n      isNaN(h) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.roundedRect\");\r\n    }\r\n    var MyArc = (4 / 3) * (Math.SQRT2 - 1);\r\n\r\n    rx = Math.min(rx, w * 0.5);\r\n    ry = Math.min(ry, h * 0.5);\r\n\r\n    this.lines(\r\n      [\r\n        [w - 2 * rx, 0],\r\n        [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry],\r\n        [0, h - 2 * ry],\r\n        [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry],\r\n        [-w + 2 * rx, 0],\r\n        [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry],\r\n        [0, -h + 2 * ry],\r\n        [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]\r\n      ],\r\n      x + rx,\r\n      y, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an ellipse to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name ellipse\r\n   */\r\n  API.__private__.ellipse = API.ellipse = function(x, y, rx, ry, style) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.ellipse\");\r\n    }\r\n    var lx = (4 / 3) * (Math.SQRT2 - 1) * rx,\r\n      ly = (4 / 3) * (Math.SQRT2 - 1) * ry;\r\n\r\n    moveTo(x + rx, y);\r\n    curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);\r\n    curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);\r\n    curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);\r\n    curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an circle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} r Radius (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name circle\r\n   */\r\n  API.__private__.circle = API.circle = function(x, y, r, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.circle\");\r\n    }\r\n    return this.ellipse(x, y, r, r, style);\r\n  };\r\n\r\n  /**\r\n   * Sets text font face, variant for upcoming text elements.\r\n   * See output of jsPDF.getFontList() for possible font names, styles.\r\n   *\r\n   * @param {string} fontName Font name or family. Example: \"times\".\r\n   * @param {string} fontStyle Font style or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFont\r\n   */\r\n  API.setFont = function(fontName, fontStyle, fontWeight) {\r\n    if (fontWeight) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    activeFontKey = getFont(fontName, fontStyle, {\r\n      disableWarning: false\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets text font face, variant for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {Object}\r\n   * @memberof jsPDF#\r\n   * @name getFont\r\n   */\r\n  var getFontEntry = (API.__private__.getFont = API.getFont = function() {\r\n    return fonts[getFont.apply(API, arguments)];\r\n  });\r\n\r\n  /**\r\n   * Returns an object - a tree of fontName to fontStyle relationships available to\r\n   * active PDF document.\r\n   *\r\n   * @public\r\n   * @function\r\n   * @instance\r\n   * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }\r\n   * @memberof jsPDF#\r\n   * @name getFontList\r\n   */\r\n  API.__private__.getFontList = API.getFontList = function() {\r\n    var list = {},\r\n      fontName,\r\n      fontStyle;\r\n\r\n    for (fontName in fontmap) {\r\n      if (fontmap.hasOwnProperty(fontName)) {\r\n        list[fontName] = [];\r\n        for (fontStyle in fontmap[fontName]) {\r\n          if (fontmap[fontName].hasOwnProperty(fontStyle)) {\r\n            list[fontName].push(fontStyle);\r\n          }\r\n        }\r\n      }\r\n    }\r\n    return list;\r\n  };\r\n\r\n  /**\r\n   * Add a custom font to the current instance.\r\n   *\r\n   * @param {string} postScriptName PDF specification full name for the font.\r\n   * @param {string} id PDF-document-instance-specific label assinged to the font.\r\n   * @param {string} fontStyle Style of the Font.\r\n   * @param {number | string} fontWeight Weight of the Font.\r\n   * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @name addFont\r\n   * @returns {string} fontId\r\n   */\r\n  API.addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    fontWeight,\r\n    encoding\r\n  ) {\r\n    var encodingOptions = [\r\n      \"StandardEncoding\",\r\n      \"MacRomanEncoding\",\r\n      \"Identity-H\",\r\n      \"WinAnsiEncoding\"\r\n    ];\r\n    if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {\r\n      //IE 11 fix\r\n      encoding = arguments[3];\r\n    } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    encoding = encoding || \"Identity-H\";\r\n    return addFont.call(this, postScriptName, fontName, fontStyle, encoding);\r\n  };\r\n\r\n  var lineWidth = options.lineWidth || 0.200025; // 2mm\r\n  /**\r\n   * Gets the line width, default: 0.200025.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineWidth\r\n   * @memberof jsPDF#\r\n   * @name getLineWidth\r\n   */\r\n  var getLineWidth = (API.__private__.getLineWidth = API.getLineWidth = function() {\r\n    return lineWidth;\r\n  });\r\n\r\n  /**\r\n   * Sets line width for upcoming lines.\r\n   *\r\n   * @param {number} width Line width (in units declared at inception of PDF document).\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineWidth\r\n   */\r\n  var setLineWidth = (API.__private__.setLineWidth = API.setLineWidth = function(\r\n    width\r\n  ) {\r\n    lineWidth = width;\r\n    out(hpf(scale(width)) + \" w\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Sets the dash pattern for upcoming lines.\r\n   *\r\n   * To reset the settings simply call the method without any parameters.\r\n   * @param {Array<number>} dashArray An array containing 0-2 numbers. The first number sets the length of the\r\n   * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered\r\n   * to be as long as the dashes. An empty array means solid, unbroken lines.\r\n   * @param {number} dashPhase The phase lines start with.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineDashPattern\r\n   */\r\n  API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function(\r\n    dashArray,\r\n    dashPhase\r\n  ) {\r\n    dashArray = dashArray || [];\r\n    dashPhase = dashPhase || 0;\r\n\r\n    if (isNaN(dashPhase) || !Array.isArray(dashArray)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setLineDash\");\r\n    }\r\n\r\n    dashArray = dashArray\r\n      .map(function(x) {\r\n        return hpf(scale(x));\r\n      })\r\n      .join(\" \");\r\n    dashPhase = hpf(scale(dashPhase));\r\n\r\n    out(\"[\" + dashArray + \"] \" + dashPhase + \" d\");\r\n    return this;\r\n  };\r\n\r\n  var lineHeightFactor;\r\n\r\n  var getLineHeight = (API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  });\r\n\r\n  API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  };\r\n\r\n  /**\r\n   * Sets the LineHeightFactor of proportion.\r\n   *\r\n   * @param {number} value LineHeightFactor value. Default: 1.15.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineHeightFactor\r\n   */\r\n  var setLineHeightFactor = (API.__private__.setLineHeightFactor = API.setLineHeightFactor = function(\r\n    value\r\n  ) {\r\n    value = value || 1.15;\r\n    if (typeof value === \"number\") {\r\n      lineHeightFactor = value;\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Gets the LineHeightFactor, default: 1.15.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineHeightFactor\r\n   * @memberof jsPDF#\r\n   * @name getLineHeightFactor\r\n   */\r\n  var getLineHeightFactor = (API.__private__.getLineHeightFactor = API.getLineHeightFactor = function() {\r\n    return lineHeightFactor;\r\n  });\r\n\r\n  setLineHeightFactor(options.lineHeight);\r\n\r\n  var getHorizontalCoordinate = (API.__private__.getHorizontalCoordinate = function(\r\n    value\r\n  ) {\r\n    return scale(value);\r\n  });\r\n\r\n  var getVerticalCoordinate = (API.__private__.getVerticalCoordinate = function(\r\n    value\r\n  ) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      return value;\r\n    } else {\r\n      var pageHeight =\r\n        pagesContext[currentPage].mediaBox.topRightY -\r\n        pagesContext[currentPage].mediaBox.bottomLeftY;\r\n      return pageHeight - scale(value);\r\n    }\r\n  });\r\n\r\n  var getHorizontalCoordinateString = (API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getHorizontalCoordinate(value));\r\n  });\r\n\r\n  var getVerticalCoordinateString = (API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getVerticalCoordinate(value));\r\n  });\r\n\r\n  var strokeColor = options.strokeColor || \"0 G\";\r\n\r\n  /**\r\n   *  Gets the stroke color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getDrawColor\r\n   */\r\n  API.__private__.getStrokeColor = API.getDrawColor = function() {\r\n    return decodeColorString(strokeColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the stroke color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDrawColor\r\n   */\r\n  API.__private__.setStrokeColor = API.setDrawColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"draw\",\r\n      precision: 2\r\n    };\r\n\r\n    strokeColor = encodeColorString(options);\r\n    out(strokeColor);\r\n    return this;\r\n  };\r\n\r\n  var fillColor = options.fillColor || \"0 g\";\r\n\r\n  /**\r\n   * Gets the fill color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getFillColor\r\n   */\r\n  API.__private__.getFillColor = API.getFillColor = function() {\r\n    return decodeColorString(fillColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the fill color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFillColor\r\n   */\r\n  API.__private__.setFillColor = API.setFillColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"fill\",\r\n      precision: 2\r\n    };\r\n\r\n    fillColor = encodeColorString(options);\r\n    out(fillColor);\r\n    return this;\r\n  };\r\n\r\n  var textColor = options.textColor || \"0 g\";\r\n  /**\r\n   * Gets the text color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getTextColor\r\n   */\r\n  var getTextColor = (API.__private__.getTextColor = API.getTextColor = function() {\r\n    return decodeColorString(textColor);\r\n  });\r\n  /**\r\n   * Sets the text color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setTextColor\r\n   */\r\n  API.__private__.setTextColor = API.setTextColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"text\",\r\n      precision: 3\r\n    };\r\n    textColor = encodeColorString(options);\r\n\r\n    return this;\r\n  };\r\n\r\n  var activeCharSpace = options.charSpace;\r\n\r\n  /**\r\n   * Get global value of CharSpace.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} charSpace\r\n   * @memberof jsPDF#\r\n   * @name getCharSpace\r\n   */\r\n  var getCharSpace = (API.__private__.getCharSpace = API.getCharSpace = function() {\r\n    return parseFloat(activeCharSpace || 0);\r\n  });\r\n\r\n  /**\r\n   * Set global value of CharSpace.\r\n   *\r\n   * @param {number} charSpace\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setCharSpace\r\n   */\r\n  API.__private__.setCharSpace = API.setCharSpace = function(charSpace) {\r\n    if (isNaN(charSpace)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCharSpace\");\r\n    }\r\n    activeCharSpace = charSpace;\r\n    return this;\r\n  };\r\n\r\n  var lineCapID = 0;\r\n  /**\r\n   * Is an Object providing a mapping from human-readable to\r\n   * integer flag values designating the varieties of line cap\r\n   * and join styles.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name CapJoinStyles\r\n   */\r\n  API.CapJoinStyles = {\r\n    0: 0,\r\n    butt: 0,\r\n    but: 0,\r\n    miter: 0,\r\n    1: 1,\r\n    round: 1,\r\n    rounded: 1,\r\n    circle: 1,\r\n    2: 2,\r\n    projecting: 2,\r\n    project: 2,\r\n    square: 2,\r\n    bevel: 2\r\n  };\r\n\r\n  /**\r\n   * Sets the line cap styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line cap.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineCap\r\n   */\r\n  API.__private__.setLineCap = API.setLineCap = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line cap style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineCapID = id;\r\n    out(id + \" J\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var lineJoinID = 0;\r\n  /**\r\n   * Sets the line join styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line join.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineJoin\r\n   */\r\n  API.__private__.setLineJoin = API.setLineJoin = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line join style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineJoinID = id;\r\n    out(id + \" j\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var miterLimit;\r\n  /**\r\n   * Sets the miterLimit property, which effects the maximum miter length.\r\n   *\r\n   * @param {number} length The length of the miter\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineMiterLimit\r\n   */\r\n  API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function(\r\n    length\r\n  ) {\r\n    length = length || 0;\r\n    if (isNaN(length)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setLineMiterLimit\");\r\n    }\r\n    out(hpf(scale(length)) + \" M\");\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * An object representing a pdf graphics state.\r\n   * @class GState\r\n   */\r\n\r\n  /**\r\n   *\r\n   * @param parameters A parameter object that contains all properties this graphics state wants to set.\r\n   * Supported are: opacity, stroke-opacity\r\n   * @constructor\r\n   */\r\n  API.GState = GState;\r\n\r\n  /**\r\n   * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.\r\n   * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState\r\n   * it will be added before use.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setGState\r\n   */\r\n  API.setGState = function(gState) {\r\n    if (typeof gState === \"string\") {\r\n      gState = gStates[gStatesMap[gState]];\r\n    } else {\r\n      gState = addGState(null, gState);\r\n    }\r\n\r\n    if (!gState.equals(activeGState)) {\r\n      out(\"/\" + gState.id + \" gs\");\r\n      activeGState = gState;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Adds a new Graphics State. Duplicates are automatically eliminated.\r\n   * @param {String} key Might also be null, if no later reference to this gState is needed\r\n   * @param {Object} gState The gState object\r\n   */\r\n  var addGState = function(key, gState) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (key && gStatesMap[key]) return;\r\n    var duplicate = false;\r\n    for (var s in gStates) {\r\n      if (gStates.hasOwnProperty(s)) {\r\n        if (gStates[s].equals(gState)) {\r\n          duplicate = true;\r\n          break;\r\n        }\r\n      }\r\n    }\r\n\r\n    if (duplicate) {\r\n      gState = gStates[s];\r\n    } else {\r\n      var gStateKey = \"GS\" + (Object.keys(gStates).length + 1).toString(10);\r\n      gStates[gStateKey] = gState;\r\n      gState.id = gStateKey;\r\n    }\r\n\r\n    // several user keys may point to the same GState object\r\n    key && (gStatesMap[key] = gState.id);\r\n\r\n    events.publish(\"addGState\", gState);\r\n\r\n    return gState;\r\n  };\r\n\r\n  /**\r\n   * Adds a new {@link GState} for later use. See {@link setGState}.\r\n   * @param {String} key\r\n   * @param {GState} gState\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addGState\r\n   */\r\n  API.addGState = function(key, gState) {\r\n    addGState(key, gState);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Saves the current graphics state (\"pushes it on the stack\"). It can be restored by {@link restoreGraphicsState}\r\n   * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,\r\n   * fill and stroke colors etc.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name saveGraphicsState\r\n   */\r\n  API.saveGraphicsState = function() {\r\n    out(\"q\");\r\n    // as we cannot set font key and size independently we must keep track of both\r\n    fontStateStack.push({\r\n      key: activeFontKey,\r\n      size: activeFontSize,\r\n      color: textColor\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Restores a previously saved graphics state saved by {@link saveGraphicsState} (\"pops the stack\").\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name restoreGraphicsState\r\n   */\r\n  API.restoreGraphicsState = function() {\r\n    out(\"Q\");\r\n\r\n    // restore previous font state\r\n    var fontState = fontStateStack.pop();\r\n    activeFontKey = fontState.key;\r\n    activeFontSize = fontState.size;\r\n    textColor = fontState.color;\r\n\r\n    activeGState = null;\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Appends this matrix to the left of all previously applied matrices.\r\n   *\r\n   * @param {Matrix} matrix\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setCurrentTransformationMatrix\r\n   */\r\n  API.setCurrentTransformationMatrix = function(matrix) {\r\n    out(matrix.toString() + \" cm\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Inserts a debug comment into the generated pdf.\r\n   * @function\r\n   * @instance\r\n   * @param {String} text\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name comment\r\n   */\r\n  API.comment = function(text) {\r\n    out(\"#\" + text);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Point\r\n   */\r\n  var Point = function(x, y) {\r\n    var _x = x || 0;\r\n    Object.defineProperty(this, \"x\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _x;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _x = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _y = y || 0;\r\n    Object.defineProperty(this, \"y\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _y;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _y = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _type = \"pt\";\r\n    Object.defineProperty(this, \"type\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _type;\r\n      },\r\n      set: function(value) {\r\n        _type = value.toString();\r\n      }\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Rectangle\r\n   */\r\n  var Rectangle = function(x, y, w, h) {\r\n    Point.call(this, x, y);\r\n    this.type = \"rect\";\r\n\r\n    var _w = w || 0;\r\n    Object.defineProperty(this, \"w\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _w;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _w = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _h = h || 0;\r\n    Object.defineProperty(this, \"h\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _h;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _h = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * FormObject/RenderTarget\r\n   */\r\n\r\n  var RenderTarget = function() {\r\n    this.page = page;\r\n    this.currentPage = currentPage;\r\n    this.pages = pages.slice(0);\r\n    this.pagesContext = pagesContext.slice(0);\r\n    this.x = pageX;\r\n    this.y = pageY;\r\n    this.matrix = pageMatrix;\r\n    this.width = getPageWidth(currentPage);\r\n    this.height = getPageHeight(currentPage);\r\n    this.outputDestination = outputDestination;\r\n\r\n    this.id = \"\"; // set by endFormObject()\r\n    this.objectNumber = -1; // will be set by putXObject()\r\n  };\r\n\r\n  RenderTarget.prototype.restore = function() {\r\n    page = this.page;\r\n    currentPage = this.currentPage;\r\n    pagesContext = this.pagesContext;\r\n    pages = this.pages;\r\n    pageX = this.x;\r\n    pageY = this.y;\r\n    pageMatrix = this.matrix;\r\n    setPageWidth(currentPage, this.width);\r\n    setPageHeight(currentPage, this.height);\r\n    outputDestination = this.outputDestination;\r\n  };\r\n\r\n  var beginNewRenderTarget = function(x, y, width, height, matrix) {\r\n    // save current state\r\n    renderTargetStack.push(new RenderTarget());\r\n\r\n    // clear pages\r\n    page = currentPage = 0;\r\n    pages = [];\r\n    pageX = x;\r\n    pageY = y;\r\n\r\n    pageMatrix = matrix;\r\n\r\n    beginPage([width, height]);\r\n  };\r\n\r\n  var endFormObject = function(key) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (renderTargetMap[key]) {\r\n      renderTargetStack.pop().restore();\r\n      return;\r\n    }\r\n\r\n    // save the created xObject\r\n    var newXObject = new RenderTarget();\r\n\r\n    var xObjectId = \"Xo\" + (Object.keys(renderTargets).length + 1).toString(10);\r\n    newXObject.id = xObjectId;\r\n\r\n    renderTargetMap[key] = xObjectId;\r\n    renderTargets[xObjectId] = newXObject;\r\n\r\n    events.publish(\"addFormObject\", newXObject);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  /**\r\n   * Starts a new pdf form object, which means that all consequent draw calls target a new independent object\r\n   * until {@link endFormObject} is called. The created object can be referenced and drawn later using\r\n   * {@link doFormObject}. Nested form objects are possible.\r\n   * x, y, width, height set the bounding box that is used to clip the content.\r\n   *\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @param {number} width\r\n   * @param {number} height\r\n   * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to\r\n   * the parent's.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name beginFormObject\r\n   */\r\n  API.beginFormObject = function(x, y, width, height, matrix) {\r\n    // The user can set the output target to a new form object. Nested form objects are possible.\r\n    // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as\r\n    // the PDF-Spec states:\r\n    // \"In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which\r\n    // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,\r\n    // form XObjects may be independent of the content streams in which they appear, and this is strongly\r\n    // recommended although not required\"\r\n    beginNewRenderTarget(x, y, width, height, matrix);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Completes and saves the form object.\r\n   * @param {String} key The key by which this form object can be referenced.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name endFormObject\r\n   */\r\n  API.endFormObject = function(key) {\r\n    endFormObject(key);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Draws the specified form object by referencing to the respective pdf XObject created with\r\n   * {@link API.beginFormObject} and {@link endFormObject}.\r\n   * The location is determined by matrix.\r\n   *\r\n   * @param {String} key The key to the form object.\r\n   * @param {Matrix} matrix The matrix applied before drawing the form object.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name doFormObject\r\n   */\r\n  API.doFormObject = function(key, matrix) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    out(\"q\");\r\n    out(matrix.toString() + \" cm\");\r\n    out(\"/\" + xObject.id + \" Do\");\r\n    out(\"Q\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Returns the form object specified by key.\r\n   * @param key {String}\r\n   * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name getFormObject\r\n   */\r\n  API.getFormObject = function(key) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    return {\r\n      x: xObject.x,\r\n      y: xObject.y,\r\n      width: xObject.width,\r\n      height: xObject.height,\r\n      matrix: xObject.matrix\r\n    };\r\n  };\r\n\r\n  /**\r\n   * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').\r\n   * Uses FileSaver.js-method saveAs.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name save\r\n   * @function\r\n   * @instance\r\n   * @param  {string} filename The filename including extension.\r\n   * @param  {Object} options An Object with additional options, possible options: 'returnPromise'.\r\n   * @returns {jsPDF|Promise} jsPDF-instance     */\r\n  API.save = function(filename, options) {\r\n    filename = filename || \"generated.pdf\";\r\n\r\n    options = options || {};\r\n    options.returnPromise = options.returnPromise || false;\r\n\r\n\r\n    // eslint-disable-next-line no-unreachable\r\n    var fs = require(\"fs\");\r\n    var buffer = Buffer.from(getArrayBuffer(buildDocument()));\r\n    if (options.returnPromise === false) {\r\n      fs.writeFileSync(filename, buffer);\r\n    } else {\r\n      return new Promise(function(resolve, reject) {\r\n        fs.writeFile(filename, buffer, function(err) {\r\n          if (err) {\r\n            reject(err);\r\n          } else {\r\n            resolve();\r\n          }\r\n        });\r\n      });\r\n    }\r\n  };\r\n\r\n  // applying plugins (more methods) ON TOP of built-in API.\r\n  // this is intentional as we allow plugins to override\r\n  // built-ins\r\n  for (var plugin in jsPDF.API) {\r\n    if (jsPDF.API.hasOwnProperty(plugin)) {\r\n      if (plugin === \"events\" && jsPDF.API.events.length) {\r\n        (function(events, newEvents) {\r\n          // jsPDF.API.events is a JS Array of Arrays\r\n          // where each Array is a pair of event name, handler\r\n          // Events were added by plugins to the jsPDF instantiator.\r\n          // These are always added to the new instance and some ran\r\n          // during instantiation.\r\n          var eventname, handler_and_args, i;\r\n\r\n          for (i = newEvents.length - 1; i !== -1; i--) {\r\n            // subscribe takes 3 args: 'topic', function, runonce_flag\r\n            // if undefined, runonce is false.\r\n            // users can attach callback directly,\r\n            // or they can attach an array with [callback, runonce_flag]\r\n            // that's what the \"apply\" magic is for below.\r\n            eventname = newEvents[i][0];\r\n            handler_and_args = newEvents[i][1];\r\n            events.subscribe.apply(\r\n              events,\r\n              [eventname].concat(\r\n                typeof handler_and_args === \"function\"\r\n                  ? [handler_and_args]\r\n                  : handler_and_args\r\n              )\r\n            );\r\n          }\r\n        })(events, jsPDF.API.events);\r\n      } else {\r\n        API[plugin] = jsPDF.API[plugin];\r\n      }\r\n    }\r\n  }\r\n\r\n  var getPageWidth = (API.getPageWidth = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightX -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftX) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageWidth = (API.setPageWidth = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightX =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;\r\n  });\r\n\r\n  var getPageHeight = (API.getPageHeight = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightY -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftY) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageHeight = (API.setPageHeight = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightY =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;\r\n  });\r\n\r\n  /**\r\n   * Object exposing internal API to plugins\r\n   * @public\r\n   * @ignore\r\n   */\r\n  API.internal = {\r\n    pdfEscape: pdfEscape,\r\n    getStyle: getStyle,\r\n    getFont: getFontEntry,\r\n    getFontSize: getFontSize,\r\n    getCharSpace: getCharSpace,\r\n    getTextColor: getTextColor,\r\n    getLineHeight: getLineHeight,\r\n    getLineHeightFactor: getLineHeightFactor,\r\n    getLineWidth: getLineWidth,\r\n    write: write,\r\n    getHorizontalCoordinate: getHorizontalCoordinate,\r\n    getVerticalCoordinate: getVerticalCoordinate,\r\n    getCoordinateString: getHorizontalCoordinateString,\r\n    getVerticalCoordinateString: getVerticalCoordinateString,\r\n    collections: {},\r\n    newObject: newObject,\r\n    newAdditionalObject: newAdditionalObject,\r\n    newObjectDeferred: newObjectDeferred,\r\n    newObjectDeferredBegin: newObjectDeferredBegin,\r\n    getFilters: getFilters,\r\n    putStream: putStream,\r\n    events: events,\r\n    scaleFactor: scaleFactor,\r\n    pageSize: {\r\n      getWidth: function() {\r\n        return getPageWidth(currentPage);\r\n      },\r\n      setWidth: function(value) {\r\n        setPageWidth(currentPage, value);\r\n      },\r\n      getHeight: function() {\r\n        return getPageHeight(currentPage);\r\n      },\r\n      setHeight: function(value) {\r\n        setPageHeight(currentPage, value);\r\n      }\r\n    },\r\n    encryptionOptions: encryptionOptions,\r\n    encryption: encryption,\r\n    getEncryptor: getEncryptor,\r\n    output: output,\r\n    getNumberOfPages: getNumberOfPages,\r\n    pages: pages,\r\n    out: out,\r\n    f2: f2,\r\n    f3: f3,\r\n    getPageInfo: getPageInfo,\r\n    getPageInfoByObjId: getPageInfoByObjId,\r\n    getCurrentPageInfo: getCurrentPageInfo,\r\n    getPDFVersion: getPdfVersion,\r\n    Point: Point,\r\n    Rectangle: Rectangle,\r\n    Matrix: Matrix,\r\n    hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.\r\n  };\r\n\r\n  Object.defineProperty(API.internal.pageSize, \"width\", {\r\n    get: function() {\r\n      return getPageWidth(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageWidth(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n  Object.defineProperty(API.internal.pageSize, \"height\", {\r\n    get: function() {\r\n      return getPageHeight(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageHeight(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n\r\n  //////////////////////////////////////////////////////\r\n  // continuing initialization of jsPDF Document object\r\n  //////////////////////////////////////////////////////\r\n  // Add the first page automatically\r\n  addFonts.call(API, standardFonts);\r\n  activeFontKey = \"F1\";\r\n  _addPage(format, orientation);\r\n\r\n  events.publish(\"initialized\");\r\n  return API;\r\n}\r\n\r\n/**\r\n * jsPDF.API is a STATIC property of jsPDF class.\r\n * jsPDF.API is an object you can add methods and properties to.\r\n * The methods / properties you add will show up in new jsPDF objects.\r\n *\r\n * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,\r\n * callbacks to this object. These will be reassigned to all new instances of jsPDF.\r\n *\r\n * @static\r\n * @public\r\n * @memberof jsPDF#\r\n * @name API\r\n *\r\n * @example\r\n * jsPDF.API.mymethod = function(){\r\n *   // 'this' will be ref to internal API object. see jsPDF source\r\n *   // , so you can refer to built-in methods like so:\r\n *   //     this.line(....)\r\n *   //     this.text(....)\r\n * }\r\n * var pdfdoc = new jsPDF()\r\n * pdfdoc.mymethod() // <- !!!!!!\r\n */\r\njsPDF.API = {\r\n  events: []\r\n};\r\n/**\r\n * The version of jsPDF.\r\n * @name version\r\n * @type {string}\r\n * @memberof jsPDF#\r\n */\r\njsPDF.version = \"0.0.0\";\r\n\r\nexport { jsPDF, ShadingPattern, TilingPattern, GState };\r\nexport default jsPDF;\r\n","/* global jsPDF */\n/**\n * @license\n * Copyright (c) 2016 Alexander Weidt,\n * https://github.com/BiggA94\n *\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF AcroForm Plugin\n * @module AcroForm\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\nvar jsPDFAPI = jsPDF.API;\nvar scaleFactor = 1;\n\nvar pdfEscape = function(value) {\n  return value\n    .replace(/\\\\/g, \"\\\\\\\\\")\n    .replace(/\\(/g, \"\\\\(\")\n    .replace(/\\)/g, \"\\\\)\");\n};\nvar pdfUnescape = function(value) {\n  return value\n    .replace(/\\\\\\\\/g, \"\\\\\")\n    .replace(/\\\\\\(/g, \"(\")\n    .replace(/\\\\\\)/g, \")\");\n};\n\nvar f2 = function(number) {\n  return number.toFixed(2); // Ie, %.2f\n};\n\nvar f5 = function(number) {\n  return number.toFixed(5); // Ie, %.2f\n};\n\njsPDFAPI.__acroform__ = {};\nvar inherit = function(child, parent) {\n  child.prototype = Object.create(parent.prototype);\n  child.prototype.constructor = child;\n};\n\nvar scale = function(x) {\n  return x * scaleFactor;\n};\n\nvar createFormXObject = function(formObject) {\n  var xobj = new AcroFormXObject();\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];\n  return xobj;\n};\n\n/**\n * Bit-Operations\n */\nvar setBit = (jsPDFAPI.__acroform__.setBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number |= bitMask;\n\n  return number;\n});\n\nvar clearBit = (jsPDFAPI.__acroform__.clearBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number &= ~bitMask;\n\n  return number;\n});\n\nvar getBit = (jsPDFAPI.__acroform__.getBit = function(number, bitPosition) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBit\"\n    );\n  }\n  return (number & (1 << bitPosition)) === 0 ? 0 : 1;\n});\n\n/*\n * Ff starts counting the bit position at 1 and not like javascript at 0\n */\nvar getBitForPdf = (jsPDFAPI.__acroform__.getBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf\"\n    );\n  }\n  return getBit(number, bitPosition - 1);\n});\n\nvar setBitForPdf = (jsPDFAPI.__acroform__.setBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf\"\n    );\n  }\n  return setBit(number, bitPosition - 1);\n});\n\nvar clearBitForPdf = (jsPDFAPI.__acroform__.clearBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf\"\n    );\n  }\n  return clearBit(number, bitPosition - 1);\n});\n\nvar calculateCoordinates = (jsPDFAPI.__acroform__.calculateCoordinates = function(\n  args,\n  scope\n) {\n  var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;\n  var getVerticalCoordinate = scope.internal.getVerticalCoordinate;\n  var x = args[0];\n  var y = args[1];\n  var w = args[2];\n  var h = args[3];\n\n  var coordinates = {};\n\n  coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;\n  coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;\n  coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;\n  coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;\n\n  return [\n    Number(f2(coordinates.lowerLeft_X)),\n    Number(f2(coordinates.lowerLeft_Y)),\n    Number(f2(coordinates.upperRight_X)),\n    Number(f2(coordinates.upperRight_Y))\n  ];\n});\n\nvar calculateAppearanceStream = function(formObject) {\n  if (formObject.appearanceStreamContent) {\n    return formObject.appearanceStreamContent;\n  }\n\n  if (!formObject.V && !formObject.DV) {\n    return;\n  }\n\n  // else calculate it\n\n  var stream = [];\n  var text = formObject._V || formObject.DV;\n  var calcRes = calculateX(formObject, text);\n  var fontKey = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  ).id;\n\n  //PDF 32000-1:2008, page 444\n  stream.push(\"/Tx BMC\");\n  stream.push(\"q\");\n  stream.push(\"BT\"); // Begin Text\n  stream.push(formObject.scope.__private__.encodeColorString(formObject.color));\n  stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf\");\n  stream.push(\"1 0 0 1 0 0 Tm\"); // Transformation Matrix\n  stream.push(calcRes.text);\n  stream.push(\"ET\"); // End Text\n  stream.push(\"Q\");\n  stream.push(\"EMC\");\n\n  var appearanceStreamContent = createFormXObject(formObject);\n  appearanceStreamContent.scope = formObject.scope;\n  appearanceStreamContent.stream = stream.join(\"\\n\");\n  return appearanceStreamContent;\n};\n\nvar calculateX = function(formObject, text) {\n  var maxFontSize =\n    formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;\n  var returnValue = {\n    text: \"\",\n    fontSize: \"\"\n  };\n  // Remove Brackets\n  text = text.substr(0, 1) == \"(\" ? text.substr(1) : text;\n  text =\n    text.substr(text.length - 1) == \")\"\n      ? text.substr(0, text.length - 1)\n      : text;\n  // split into array of words\n  var textSplit = text.split(\" \");\n  if (formObject.multiline) {\n    textSplit = textSplit.map(word => word.split(\"\\n\"));\n  } else {\n    textSplit = textSplit.map(word => [word]);\n  }\n\n  var fontSize = maxFontSize; // The Starting fontSize (The Maximum)\n  var lineSpacing = 2;\n  var borderPadding = 2;\n\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  height = height < 0 ? -height : height;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  width = width < 0 ? -width : width;\n\n  var isSmallerThanWidth = function(i, lastLine, fontSize) {\n    if (i + 1 < textSplit.length) {\n      var tmp = lastLine + \" \" + textSplit[i + 1][0];\n      var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;\n      var FieldWidth = width - 2 * borderPadding;\n      return TextWidth <= FieldWidth;\n    } else {\n      return false;\n    }\n  };\n\n  fontSize++;\n  FontSize: while (fontSize > 0) {\n    text = \"\";\n    fontSize--;\n    var textHeight = calculateFontSpace(\"3\", formObject, fontSize).height;\n    var startY = formObject.multiline\n      ? height - fontSize\n      : (height - textHeight) / 2;\n    startY += lineSpacing;\n    var startX;\n\n    var lastY = startY;\n    var firstWordInLine = 0,\n      lastWordInLine = 0;\n    var lastLength;\n    var currWord = 0;\n\n    if (fontSize <= 0) {\n      // In case, the Text doesn't fit at all\n      fontSize = 12;\n      text = \"(...) Tj\\n\";\n      text +=\n        \"% Width of Text: \" +\n        calculateFontSpace(text, formObject, fontSize).width +\n        \", FieldWidth:\" +\n        width +\n        \"\\n\";\n      break;\n    }\n\n    var lastLine = \"\";\n    var lineCount = 0;\n    Line: for (var i = 0; i < textSplit.length; i++) {\n      if (textSplit.hasOwnProperty(i)) {\n        let isWithNewLine = false;\n        if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {\n          if (\n            (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n            height\n          ) {\n            continue FontSize;\n          }\n\n          lastLine += textSplit[i][currWord];\n          isWithNewLine = true;\n          lastWordInLine = i;\n          i--;\n        } else {\n          lastLine += textSplit[i][currWord] + \" \";\n          lastLine =\n            lastLine.substr(lastLine.length - 1) == \" \"\n              ? lastLine.substr(0, lastLine.length - 1)\n              : lastLine;\n          var key = parseInt(i);\n          var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);\n          var isLastWord = i >= textSplit.length - 1;\n\n          if (nextLineIsSmaller && !isLastWord) {\n            lastLine += \" \";\n            currWord = 0;\n            continue; // Line\n          } else if (!nextLineIsSmaller && !isLastWord) {\n            if (!formObject.multiline) {\n              continue FontSize;\n            } else {\n              if (\n                (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n              ) {\n                // If the Text is higher than the\n                // FieldObject\n                continue FontSize;\n              }\n              lastWordInLine = key;\n              // go on\n            }\n          } else if (isLastWord) {\n            lastWordInLine = key;\n          } else {\n            if (\n              formObject.multiline &&\n              (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n            ) {\n              // If the Text is higher than the FieldObject\n              continue FontSize;\n            }\n          }\n        }\n        // Remove last blank\n\n        var line = \"\";\n\n        for (var x = firstWordInLine; x <= lastWordInLine; x++) {\n          var currLine = textSplit[x];\n          if (formObject.multiline) {\n            if (x === lastWordInLine) {\n              line += currLine[currWord] + \" \";\n              currWord = (currWord + 1) % currLine.length;\n              continue;\n            }\n            if (x === firstWordInLine) {\n              line += currLine[currLine.length - 1] + \" \";\n              continue;\n            }\n          }\n          line += currLine[0] + \" \";\n        }\n\n        // Remove last blank\n        line =\n          line.substr(line.length - 1) == \" \"\n            ? line.substr(0, line.length - 1)\n            : line;\n        // lastLength -= blankSpace.width;\n        lastLength = calculateFontSpace(line, formObject, fontSize).width;\n\n        // Calculate startX\n        switch (formObject.textAlign) {\n          case \"right\":\n            startX = width - lastLength - borderPadding;\n            break;\n          case \"center\":\n            startX = (width - lastLength) / 2;\n            break;\n          case \"left\":\n          default:\n            startX = borderPadding;\n            break;\n        }\n        text += f2(startX) + \" \" + f2(lastY) + \" Td\\n\";\n        text += \"(\" + pdfEscape(line) + \") Tj\\n\";\n        // reset X in PDF\n        text += -f2(startX) + \" 0 Td\\n\";\n\n        // After a Line, adjust y position\n        lastY = -(fontSize + lineSpacing);\n\n        // Reset for next iteration step\n        lastLength = 0;\n        firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;\n        lineCount++;\n\n        lastLine = \"\";\n        continue Line;\n      }\n    }\n    break;\n  }\n\n  returnValue.text = text;\n  returnValue.fontSize = fontSize;\n\n  return returnValue;\n};\n\n/**\n * Small workaround for calculating the TextMetric approximately.\n *\n * @param text\n * @param fontsize\n * @returns {TextMetrics} (Has Height and Width)\n */\nvar calculateFontSpace = function(text, formObject, fontSize) {\n  var font = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  );\n  var width =\n    formObject.scope.getStringUnitWidth(text, {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) * parseFloat(fontSize);\n  var height =\n    formObject.scope.getStringUnitWidth(\"3\", {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) *\n    parseFloat(fontSize) *\n    1.5;\n  return { height: height, width: width };\n};\n\nvar acroformPluginTemplate = {\n  fields: [],\n  xForms: [],\n  /**\n   * acroFormDictionaryRoot contains information about the AcroForm\n   * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has\n   * 1: The Object ID of the Root\n   */\n  acroFormDictionaryRoot: null,\n  /**\n   * After the PDF gets evaluated, the reference to the root has to be\n   * reset, this indicates, whether the root has already been printed\n   * out\n   */\n  printedOut: false,\n  internal: null,\n  isInitialized: false\n};\n\nvar annotReferenceCallback = function(scope) {\n  //set objId to undefined and force it to get a new objId on buildDocument\n  scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;\n  var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n  for (var i in fields) {\n    if (fields.hasOwnProperty(i)) {\n      var formObject = fields[i];\n      //set objId to undefined and force it to get a new objId on buildDocument\n      formObject.objId = undefined;\n      // add Annot Reference!\n      if (formObject.hasAnnotation) {\n        // If theres an Annotation Widget in the Form Object, put the\n        // Reference in the /Annot array\n        createAnnotationReference(formObject, scope);\n      }\n    }\n  }\n};\n\nvar putForm = function(formObject) {\n  if (formObject.scope.internal.acroformPlugin.printedOut) {\n    formObject.scope.internal.acroformPlugin.printedOut = false;\n    formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;\n  }\n  formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(\n    formObject\n  );\n};\n/**\n * Create the Reference to the widgetAnnotation, so that it gets referenced\n * in the Annot[] int the+ (Requires the Annotation Plugin)\n */\nvar createAnnotationReference = function(object, scope) {\n  var options = {\n    type: \"reference\",\n    object: object\n  };\n  var findEntry = function(entry) {\n    return entry.type === options.type && entry.object === options.object;\n  };\n  if (\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.find(findEntry) === undefined\n  ) {\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.push(options);\n  }\n};\n\n// Callbacks\n\nvar putCatalogCallback = function(scope) {\n  // Put reference to AcroForm to DocumentCatalog\n  if (\n    typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== \"undefined\"\n  ) {\n    // for safety, shouldn't normally be the case\n    scope.internal.write(\n      \"/AcroForm \" +\n        scope.internal.acroformPlugin.acroFormDictionaryRoot.objId +\n        \" \" +\n        0 +\n        \" R\"\n    );\n  } else {\n    throw new Error(\"putCatalogCallback: Root missing.\");\n  }\n};\n\n/**\n * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm\n * Dictionary\n */\nvar AcroFormDictionaryCallback = function(scope) {\n  // Remove event\n  scope.internal.events.unsubscribe(\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID\n  );\n  delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;\n  scope.internal.acroformPlugin.printedOut = true;\n};\n\n/**\n * Creates the single Fields and writes them into the Document\n *\n * If fieldArray is set, use the fields that are inside it instead of the\n * fields from the AcroRoot (for the FormXObjects...)\n */\nvar createFieldCallback = function(fieldArray, scope) {\n  var standardFields = !fieldArray;\n\n  if (!fieldArray) {\n    // in case there is no fieldArray specified, we want to print out\n    // the Fields of the AcroForm\n    // Print out Root\n    scope.internal.newObjectDeferredBegin(\n      scope.internal.acroformPlugin.acroFormDictionaryRoot.objId,\n      true\n    );\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();\n  }\n\n  fieldArray =\n    fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;\n\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var fieldObject = fieldArray[i];\n      var keyValueList = [];\n      var oldRect = fieldObject.Rect;\n\n      if (fieldObject.Rect) {\n        fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);\n      }\n\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(\n        fieldObject\n      );\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.getKeyValueListForStream === \"function\"\n      ) {\n        keyValueList = fieldObject.getKeyValueListForStream();\n      }\n\n      fieldObject.Rect = oldRect;\n\n      if (\n        fieldObject.hasAppearanceStream &&\n        !fieldObject.appearanceStreamContent\n      ) {\n        // Calculate Appearance\n        var appearance = calculateAppearanceStream(fieldObject);\n        keyValueList.push({ key: \"AP\", value: \"<</N \" + appearance + \">>\" });\n\n        scope.internal.acroformPlugin.xForms.push(appearance);\n      }\n\n      // Assume AppearanceStreamContent is a Array with N,R,D (at least\n      // one of them!)\n      if (fieldObject.appearanceStreamContent) {\n        var appearanceStreamString = \"\";\n        // Iterate over N,R and D\n        for (var k in fieldObject.appearanceStreamContent) {\n          if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {\n            var value = fieldObject.appearanceStreamContent[k];\n            appearanceStreamString += \"/\" + k + \" \";\n            appearanceStreamString += \"<<\";\n            if (Object.keys(value).length >= 1 || Array.isArray(value)) {\n              // appearanceStream is an Array or Object!\n              for (var i in value) {\n                if (value.hasOwnProperty(i)) {\n                  var obj = value[i];\n                  if (typeof obj === \"function\") {\n                    // if Function is referenced, call it in order\n                    // to get the FormXObject\n                    obj = obj.call(scope, fieldObject);\n                  }\n                  appearanceStreamString += \"/\" + i + \" \" + obj + \" \";\n\n                  // In case the XForm is already used, e.g. OffState\n                  // of CheckBoxes, don't add it\n                  if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                    scope.internal.acroformPlugin.xForms.push(obj);\n                }\n              }\n            } else {\n              obj = value;\n              if (typeof obj === \"function\") {\n                // if Function is referenced, call it in order to\n                // get the FormXObject\n                obj = obj.call(scope, fieldObject);\n              }\n              appearanceStreamString += \"/\" + i + \" \" + obj;\n              if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                scope.internal.acroformPlugin.xForms.push(obj);\n            }\n            appearanceStreamString += \">>\";\n          }\n        }\n\n        // appearance stream is a normal Object..\n        keyValueList.push({\n          key: \"AP\",\n          value: \"<<\\n\" + appearanceStreamString + \">>\"\n        });\n      }\n\n      scope.internal.putStream({\n        additionalKeyValues: keyValueList,\n        objectId: fieldObject.objId\n      });\n\n      scope.internal.out(\"endobj\");\n    }\n  }\n  if (standardFields) {\n    createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);\n  }\n};\n\nvar createXFormObjectCallback = function(fieldArray, scope) {\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var key = i;\n      var fieldObject = fieldArray[i];\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.putStream === \"function\"\n      ) {\n        fieldObject.putStream();\n      }\n      delete fieldArray[key];\n    }\n  }\n};\n\nvar initializeAcroForm = function(scope, formObject) {\n  formObject.scope = scope;\n  if (\n    scope.internal !== undefined &&\n    (scope.internal.acroformPlugin === undefined ||\n      scope.internal.acroformPlugin.isInitialized === false)\n  ) {\n    AcroFormField.FieldNum = 0;\n    scope.internal.acroformPlugin = JSON.parse(\n      JSON.stringify(acroformPluginTemplate)\n    );\n    if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {\n      throw new Error(\"Exception while creating AcroformDictionary\");\n    }\n    scaleFactor = scope.internal.scaleFactor;\n    // The Object Number of the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope;\n\n    // add Callback for creating the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe(\n      \"postPutResources\",\n      function() {\n        AcroFormDictionaryCallback(scope);\n      }\n    );\n\n    scope.internal.events.subscribe(\"buildDocument\", function() {\n      annotReferenceCallback(scope);\n    }); // buildDocument\n\n    // Register event, that is triggered when the DocumentCatalog is\n    // written, in order to add /AcroForm\n\n    scope.internal.events.subscribe(\"putCatalog\", function() {\n      putCatalogCallback(scope);\n    });\n\n    // Register event, that creates all Fields\n    scope.internal.events.subscribe(\"postPutPages\", function(fieldArray) {\n      createFieldCallback(fieldArray, scope);\n    });\n\n    scope.internal.acroformPlugin.isInitialized = true;\n  }\n};\n\n//PDF 32000-1:2008, page 26, 7.3.6\nvar arrayToPdfArray = (jsPDFAPI.__acroform__.arrayToPdfArray = function(\n  array,\n  objId,\n  scope\n) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (Array.isArray(array)) {\n    var content = \"[\";\n    for (var i = 0; i < array.length; i++) {\n      if (i !== 0) {\n        content += \" \";\n      }\n      switch (typeof array[i]) {\n        case \"boolean\":\n        case \"number\":\n        case \"object\":\n          content += array[i].toString();\n          break;\n        case \"string\":\n          if (array[i].substr(0, 1) !== \"/\") {\n            if (typeof objId !== \"undefined\" && scope)\n              encryptor = scope.internal.getEncryptor(objId);\n            content += \"(\" + pdfEscape(encryptor(array[i].toString())) + \")\";\n          } else {\n            content += array[i].toString();\n          }\n          break;\n      }\n    }\n    content += \"]\";\n    return content;\n  }\n  throw new Error(\n    \"Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray\"\n  );\n});\nfunction getMatches(string, regex, index) {\n  index || (index = 1); // default to the first capturing group\n  var matches = [];\n  var match;\n  while ((match = regex.exec(string))) {\n    matches.push(match[index]);\n  }\n  return matches;\n}\nvar pdfArrayToStringArray = function(array) {\n  var result = [];\n  if (typeof array === \"string\") {\n    result = getMatches(array, /\\((.*?)\\)/g);\n  }\n  return result;\n};\n\nvar toPdfString = function(string, objId, scope) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (typeof objId !== \"undefined\" && scope)\n    encryptor = scope.internal.getEncryptor(objId);\n  string = string || \"\";\n  string.toString();\n  string = \"(\" + pdfEscape(encryptor(string)) + \")\";\n  return string;\n};\n\n// ##########################\n// Classes\n// ##########################\n\n/**\n * @class AcroFormPDFObject\n * @classdesc A AcroFormPDFObject\n */\nvar AcroFormPDFObject = function() {\n  this._objId = undefined;\n  this._scope = undefined;\n\n  /**\n   * @name AcroFormPDFObject#objId\n   * @type {any}\n   */\n  Object.defineProperty(this, \"objId\", {\n    get: function() {\n      if (typeof this._objId === \"undefined\") {\n        if (typeof this.scope === \"undefined\") {\n          return undefined;\n        }\n        this._objId = this.scope.internal.newObjectDeferred();\n      }\n      return this._objId;\n    },\n    set: function(value) {\n      this._objId = value;\n    }\n  });\n  Object.defineProperty(this, \"scope\", {\n    value: this._scope,\n    writable: true\n  });\n};\n\n/**\n * @function AcroFormPDFObject.toString\n */\nAcroFormPDFObject.prototype.toString = function() {\n  return this.objId + \" 0 R\";\n};\n\nAcroFormPDFObject.prototype.putStream = function() {\n  var keyValueList = this.getKeyValueListForStream();\n  this.scope.internal.putStream({\n    data: this.stream,\n    additionalKeyValues: keyValueList,\n    objectId: this.objId\n  });\n  this.scope.internal.out(\"endobj\");\n};\n\n/**\n * Returns an key-value-List of all non-configurable Variables from the Object\n *\n * @name getKeyValueListForStream\n * @returns {string}\n */\nAcroFormPDFObject.prototype.getKeyValueListForStream = function() {\n  var keyValueList = [];\n  var keys = Object.getOwnPropertyNames(this).filter(function(key) {\n    return (\n      key != \"content\" &&\n      key != \"appearanceStreamContent\" &&\n      key != \"scope\" &&\n      key != \"objId\" &&\n      key.substring(0, 1) != \"_\"\n    );\n  });\n\n  for (var i in keys) {\n    if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {\n      var key = keys[i];\n      var value = this[key];\n\n      if (value) {\n        if (Array.isArray(value)) {\n          keyValueList.push({\n            key: key,\n            value: arrayToPdfArray(value, this.objId, this.scope)\n          });\n        } else if (value instanceof AcroFormPDFObject) {\n          // In case it is a reference to another PDFObject,\n          // take the reference number\n          value.scope = this.scope;\n          keyValueList.push({ key: key, value: value.objId + \" 0 R\" });\n        } else if (typeof value !== \"function\") {\n          keyValueList.push({ key: key, value: value });\n        }\n      }\n    }\n  }\n  return keyValueList;\n};\n\nvar AcroFormXObject = function() {\n  AcroFormPDFObject.call(this);\n\n  Object.defineProperty(this, \"Type\", {\n    value: \"/XObject\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    value: \"/Form\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"FormType\", {\n    value: 1,\n    configurable: false,\n    writable: true\n  });\n\n  var _BBox = [];\n  Object.defineProperty(this, \"BBox\", {\n    configurable: false,\n    get: function() {\n      return _BBox;\n    },\n    set: function(value) {\n      _BBox = value;\n    }\n  });\n\n  Object.defineProperty(this, \"Resources\", {\n    value: \"2 0 R\",\n    configurable: false,\n    writable: true\n  });\n\n  var _stream;\n  Object.defineProperty(this, \"stream\", {\n    enumerable: false,\n    configurable: true,\n    set: function(value) {\n      _stream = value.trim();\n    },\n    get: function() {\n      if (_stream) {\n        return _stream;\n      } else {\n        return null;\n      }\n    }\n  });\n};\n\ninherit(AcroFormXObject, AcroFormPDFObject);\n\nvar AcroFormDictionary = function() {\n  AcroFormPDFObject.call(this);\n\n  var _Kids = [];\n\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      if (_Kids.length > 0) {\n        return _Kids;\n      } else {\n        return undefined;\n      }\n    }\n  });\n  Object.defineProperty(this, \"Fields\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    }\n  });\n\n  // Default Appearance\n  var _DA;\n  Object.defineProperty(this, \"DA\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DA) {\n        return undefined;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_DA)) + \")\";\n    },\n    set: function(value) {\n      _DA = value;\n    }\n  });\n};\n\ninherit(AcroFormDictionary, AcroFormPDFObject);\n\n/**\n * The Field Object contains the Variables, that every Field needs\n *\n * @class AcroFormField\n * @classdesc An AcroForm FieldObject\n */\nvar AcroFormField = function() {\n  AcroFormPDFObject.call(this);\n\n  //Annotation-Flag See Table 165\n  var _F = 4;\n  Object.defineProperty(this, \"F\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _F;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _F = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute F supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.\n   * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.\n   *\n   * @name AcroFormField#showWhenPrinted\n   * @default true\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"showWhenPrinted\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(_F, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.F = setBitForPdf(_F, 3);\n      } else {\n        this.F = clearBitForPdf(_F, 3);\n      }\n    }\n  });\n\n  var _Ff = 0;\n  Object.defineProperty(this, \"Ff\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Ff;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _Ff = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Ff supplied.'\n        );\n      }\n    }\n  });\n\n  var _Rect = [];\n  Object.defineProperty(this, \"Rect\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (_Rect.length === 0) {\n        return undefined;\n      }\n      return _Rect;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Rect = value;\n      } else {\n        _Rect = [];\n      }\n    }\n  });\n\n  /**\n   * The x-position of the field.\n   *\n   * @name AcroFormField#x\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"x\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[0])) {\n        return 0;\n      }\n      return _Rect[0];\n    },\n    set: function(value) {\n      _Rect[0] = value;\n    }\n  });\n\n  /**\n   * The y-position of the field.\n   *\n   * @name AcroFormField#y\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"y\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[1])) {\n        return 0;\n      }\n      return _Rect[1];\n    },\n    set: function(value) {\n      _Rect[1] = value;\n    }\n  });\n\n  /**\n   * The width of the field.\n   *\n   * @name AcroFormField#width\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"width\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[2])) {\n        return 0;\n      }\n      return _Rect[2];\n    },\n    set: function(value) {\n      _Rect[2] = value;\n    }\n  });\n\n  /**\n   * The height of the field.\n   *\n   * @name AcroFormField#height\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"height\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[3])) {\n        return 0;\n      }\n      return _Rect[3];\n    },\n    set: function(value) {\n      _Rect[3] = value;\n    }\n  });\n\n  var _FT = \"\";\n  Object.defineProperty(this, \"FT\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _FT;\n    },\n    set: function(value) {\n      switch (value) {\n        case \"/Btn\":\n        case \"/Tx\":\n        case \"/Ch\":\n        case \"/Sig\":\n          _FT = value;\n          break;\n        default:\n          throw new Error(\n            'Invalid value \"' + value + '\" for attribute FT supplied.'\n          );\n      }\n    }\n  });\n\n  var _T = null;\n\n  Object.defineProperty(this, \"T\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (!_T || _T.length < 1) {\n        // In case of a Child from a Radio´Group, you don't need a FieldName\n        if (this instanceof AcroFormChildClass) {\n          return undefined;\n        }\n        _T = \"FieldObject\" + AcroFormField.FieldNum++;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_T)) + \")\";\n    },\n    set: function(value) {\n      _T = value.toString();\n    }\n  });\n\n  /**\n   * (Optional) The partial field name (see 12.7.3.2, “Field Names”).\n   *\n   * @name AcroFormField#fieldName\n   * @default null\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fieldName\", {\n    configurable: true,\n    enumerable: true,\n    get: function() {\n      return _T;\n    },\n    set: function(value) {\n      _T = value;\n    }\n  });\n\n  var _fontName = \"helvetica\";\n  /**\n   * The fontName of the font to be used.\n   *\n   * @name AcroFormField#fontName\n   * @default 'helvetica'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontName\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontName;\n    },\n    set: function(value) {\n      _fontName = value;\n    }\n  });\n\n  var _fontStyle = \"normal\";\n  /**\n   * The fontStyle of the font to be used.\n   *\n   * @name AcroFormField#fontStyle\n   * @default 'normal'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontStyle\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontStyle;\n    },\n    set: function(value) {\n      _fontStyle = value;\n    }\n  });\n\n  var _fontSize = 0;\n  /**\n   * The fontSize of the font to be used.\n   *\n   * @name AcroFormField#fontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"fontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontSize;\n    },\n    set: function(value) {\n      _fontSize = value;\n    }\n  });\n\n  var _maxFontSize = undefined;\n  /**\n   * The maximum fontSize of the font to be used.\n   *\n   * @name AcroFormField#maxFontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxFontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (_maxFontSize === undefined) {\n        // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)\n        // (\"50\" is transformed to the \"user space\" but then used in \"pdf space\")\n        return 50 / scaleFactor;\n      } else {\n        return _maxFontSize;\n      }\n    },\n    set: function(value) {\n      _maxFontSize = value;\n    }\n  });\n\n  var _color = \"black\";\n  /**\n   * The color of the text\n   *\n   * @name AcroFormField#color\n   * @default 'black'\n   * @type {string|rgba}\n   */\n  Object.defineProperty(this, \"color\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _color;\n    },\n    set: function(value) {\n      _color = value;\n    }\n  });\n\n  var _DA = \"/F1 0 Tf 0 g\";\n  // Defines the default appearance (Needed for variable Text)\n  Object.defineProperty(this, \"DA\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (\n        !_DA ||\n        this instanceof AcroFormChildClass ||\n        this instanceof AcroFormTextField\n      ) {\n        return undefined;\n      }\n      return toPdfString(_DA, this.objId, this.scope);\n    },\n    set: function(value) {\n      value = value.toString();\n      _DA = value;\n    }\n  });\n\n  var _DV = null;\n  Object.defineProperty(this, \"DV\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DV) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_DV, this.objId, this.scope);\n      }\n      return _DV;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _DV = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _DV = pdfUnescape(value);\n        }\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.\n   *\n   * @name AcroFormField#defaultValue\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"defaultValue\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_DV.substr(1, _DV.length - 1));\n      } else {\n        return _DV;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _DV = \"/\" + value;\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  var _V = null;\n  Object.defineProperty(this, \"_V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      return _V;\n    },\n    set: function(value) {\n      this.V = value;\n    }\n  });\n  Object.defineProperty(this, \"V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_V, this.objId, this.scope);\n      }\n      return _V;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _V = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _V = pdfUnescape(value);\n        }\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.\n   *\n   * @name AcroFormField#value\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"value\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_V.substr(1, _V.length - 1));\n      } else {\n        return _V;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _V = \"/\" + value;\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * Check if field has annotations\n   *\n   * @name AcroFormField#hasAnnotation\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAnnotation\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.Rect;\n    }\n  });\n\n  Object.defineProperty(this, \"Type\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Annot\" : null;\n    }\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Widget\" : null;\n    }\n  });\n\n  var _hasAppearanceStream = false;\n  /**\n   * true if field has an appearanceStream\n   *\n   * @name AcroFormField#hasAppearanceStream\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _hasAppearanceStream;\n    },\n    set: function(value) {\n      value = Boolean(value);\n      _hasAppearanceStream = value;\n    }\n  });\n\n  /**\n   * The page on which the AcroFormField is placed\n   *\n   * @name AcroFormField#page\n   * @type {number}\n   */\n  var _page;\n  Object.defineProperty(this, \"page\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_page) {\n        return undefined;\n      }\n      return _page;\n    },\n    set: function(value) {\n      _page = value;\n    }\n  });\n\n  /**\n   * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.\n   *\n   * @name AcroFormField#readOnly\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"readOnly\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 1));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 1);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 1);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).\n   *\n   * @name AcroFormField#required\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"required\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 2));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 2);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 2);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)\n   *\n   * @name AcroFormField#noExport\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noExport\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 3);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 3);\n      }\n    }\n  });\n\n  var _Q = null;\n  Object.defineProperty(this, \"Q\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (_Q === null) {\n        return undefined;\n      }\n      return _Q;\n    },\n    set: function(value) {\n      if ([0, 1, 2].indexOf(value) !== -1) {\n        _Q = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Q supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:\n   * 'left', 'center', 'right'\n   *\n   * @name AcroFormField#textAlign\n   * @default 'left'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"textAlign\", {\n    get: function() {\n      var result;\n      switch (_Q) {\n        case 0:\n        default:\n          result = \"left\";\n          break;\n        case 1:\n          result = \"center\";\n          break;\n        case 2:\n          result = \"right\";\n          break;\n      }\n      return result;\n    },\n    configurable: true,\n    enumerable: true,\n    set: function(value) {\n      switch (value) {\n        case \"right\":\n        case 2:\n          _Q = 2;\n          break;\n        case \"center\":\n        case 1:\n          _Q = 1;\n          break;\n        case \"left\":\n        case 0:\n        default:\n          _Q = 0;\n      }\n    }\n  });\n};\n\ninherit(AcroFormField, AcroFormPDFObject);\n\n/**\n * @class AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormChoiceField = function() {\n  AcroFormField.call(this);\n  // Field Type = Choice Field\n  this.FT = \"/Ch\";\n  // options\n  this.V = \"()\";\n\n  this.fontName = \"zapfdingbats\";\n  // Top Index\n  var _TI = 0;\n\n  Object.defineProperty(this, \"TI\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  /**\n   * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.\n   *\n   * @name AcroFormChoiceField#topIndex\n   * @default 0\n   * @type {number}\n   */\n  Object.defineProperty(this, \"topIndex\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  var _Opt = [];\n  Object.defineProperty(this, \"Opt\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return arrayToPdfArray(_Opt, this.objId, this.scope);\n    },\n    set: function(value) {\n      _Opt = pdfArrayToStringArray(value);\n    }\n  });\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name getOptions\n   * @function\n   * @instance\n   * @returns {array} array of Options\n   */\n  this.getOptions = function() {\n    return _Opt;\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name setOptions\n   * @function\n   * @instance\n   * @param {array} value\n   */\n  this.setOptions = function(value) {\n    _Opt = value;\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name addOption\n   * @function\n   * @instance\n   * @param {string} value\n   */\n  this.addOption = function(value) {\n    value = value || \"\";\n    value = value.toString();\n    _Opt.push(value);\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name removeOption\n   * @function\n   * @instance\n   * @param {string} value\n   * @param {boolean} allEntries (default: false)\n   */\n  this.removeOption = function(value, allEntries) {\n    allEntries = allEntries || false;\n    value = value || \"\";\n    value = value.toString();\n\n    while (_Opt.indexOf(value) !== -1) {\n      _Opt.splice(_Opt.indexOf(value), 1);\n      if (allEntries === false) {\n        break;\n      }\n    }\n  };\n\n  /**\n   * If set, the field is a combo box; if clear, the field is a list box.\n   *\n   * @name AcroFormChoiceField#combo\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"combo\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 18));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 18);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 18);\n      }\n    }\n  });\n\n  /**\n   * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.\n   *\n   * @name AcroFormChoiceField#edit\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"edit\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 19));\n    },\n    set: function(value) {\n      //PDF 32000-1:2008, page 444\n      if (this.combo === true) {\n        if (Boolean(value) === true) {\n          this.Ff = setBitForPdf(this.Ff, 19);\n        } else {\n          this.Ff = clearBitForPdf(this.Ff, 19);\n        }\n      }\n    }\n  });\n\n  /**\n   * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).\n   *\n   * @name AcroFormChoiceField#sort\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"sort\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 20));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 20);\n        _Opt.sort();\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 20);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected\n   *\n   * @name AcroFormChoiceField#multiSelect\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 22));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 22);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 22);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.\n   *\n   * @name AcroFormChoiceField#doNotSpellCheck\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.\n   * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.\n   *\n   * @name AcroFormChoiceField#commitOnSelChange\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"commitOnSelChange\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 27));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 27);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 27);\n      }\n    }\n  });\n\n  this.hasAppearanceStream = false;\n};\ninherit(AcroFormChoiceField, AcroFormField);\n\n/**\n * @class AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormListBox = function() {\n  AcroFormChoiceField.call(this);\n  this.fontName = \"helvetica\";\n\n  //PDF 32000-1:2008, page 444\n  this.combo = false;\n};\ninherit(AcroFormListBox, AcroFormChoiceField);\n\n/**\n * @class AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormComboBox = function() {\n  AcroFormListBox.call(this);\n  this.combo = true;\n};\ninherit(AcroFormComboBox, AcroFormListBox);\n\n/**\n * @class AcroFormEditBox\n * @extends AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormEditBox = function() {\n  AcroFormComboBox.call(this);\n  this.edit = true;\n};\ninherit(AcroFormEditBox, AcroFormComboBox);\n\n/**\n * @class AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormButton = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Btn\";\n\n  /**\n   * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.\n   *\n   * @name AcroFormButton#noToggleToOff\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noToggleToOff\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 15));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 15);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 15);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.\n   *\n   * @name AcroFormButton#radio\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radio\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 16));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 16);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 16);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a pushbutton that does not retain a permanent value.\n   *\n   * @name AcroFormButton#pushButton\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"pushButton\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 17));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 17);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 17);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).\n   *\n   * @name AcroFormButton#radioIsUnison\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radioIsUnison\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      if (Object.keys(_MK).length !== 0) {\n        var result = [];\n        result.push(\"<<\");\n        var key;\n        for (key in _MK) {\n          result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n        }\n        result.push(\">>\");\n        return result.join(\"\\n\");\n      }\n      return undefined;\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n};\ninherit(AcroFormButton, AcroFormField);\n\n/**\n * @class AcroFormPushButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormPushButton = function() {\n  AcroFormButton.call(this);\n  this.pushButton = true;\n};\ninherit(AcroFormPushButton, AcroFormButton);\n\n/**\n * @class AcroFormRadioButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormRadioButton = function() {\n  AcroFormButton.call(this);\n  this.radio = true;\n  this.pushButton = false;\n\n  var _Kids = [];\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Kids = value;\n      } else {\n        _Kids = [];\n      }\n    }\n  });\n};\ninherit(AcroFormRadioButton, AcroFormButton);\n\n/**\n * The Child class of a RadioButton (the radioGroup) -> The single Buttons\n *\n * @class AcroFormChildClass\n * @extends AcroFormField\n * @ignore\n */\nvar AcroFormChildClass = function() {\n  AcroFormField.call(this);\n\n  var _parent;\n  Object.defineProperty(this, \"Parent\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _parent;\n    },\n    set: function(value) {\n      _parent = value;\n    }\n  });\n\n  var _optionName;\n  Object.defineProperty(this, \"optionName\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      return _optionName;\n    },\n    set: function(value) {\n      _optionName = value;\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      var result = [];\n      result.push(\"<<\");\n      var key;\n      for (key in _MK) {\n        result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n      }\n      result.push(\">>\");\n      return result.join(\"\\n\");\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n  this.caption = \"l\";\n  this.appearanceState = \"Off\";\n  // todo: set AppearanceType as variable that can be set from the\n  // outside...\n  this._AppearanceType = AcroFormAppearance.RadioButton.Circle;\n  // The Default appearanceType is the Circle\n  this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(\n    this.optionName\n  );\n};\ninherit(AcroFormChildClass, AcroFormField);\n\nAcroFormRadioButton.prototype.setAppearance = function(appearance) {\n  if (!(\"createAppearanceStream\" in appearance && \"getCA\" in appearance)) {\n    throw new Error(\n      \"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\"\n    );\n  }\n  for (var objId in this.Kids) {\n    if (this.Kids.hasOwnProperty(objId)) {\n      var child = this.Kids[objId];\n      child.appearanceStreamContent = appearance.createAppearanceStream(\n        child.optionName\n      );\n      child.caption = appearance.getCA();\n    }\n  }\n};\n\nAcroFormRadioButton.prototype.createOption = function(name) {\n  // Create new Child for RadioGroup\n  var child = new AcroFormChildClass();\n  child.Parent = this;\n  child.optionName = name;\n  // Add to Parent\n  this.Kids.push(child);\n\n  addField.call(this.scope, child);\n\n  return child;\n};\n\n/**\n * @class AcroFormCheckBox\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormCheckBox = function() {\n  AcroFormButton.call(this);\n\n  this.fontName = \"zapfdingbats\";\n  this.caption = \"3\";\n  this.appearanceState = \"On\";\n  this.value = \"On\";\n  this.textAlign = \"center\";\n  this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();\n};\ninherit(AcroFormCheckBox, AcroFormButton);\n\n/**\n * @class AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormTextField = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Tx\";\n\n  /**\n   * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.\n   *\n   * @name AcroFormTextField#multiline\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiline\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 13));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 13);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 13);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.\n   *\n   * @name AcroFormTextField#fileSelect\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"fileSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 21));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 21);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 21);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spell-checked.\n   *\n   * @name AcroFormTextField#doNotSpellCheck\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.\n   *\n   * @name AcroFormTextField#doNotScroll\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotScroll\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 24));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 24);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 24);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.\n   *\n   * @name AcroFormTextField#comb\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"comb\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 25));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 25);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 25);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.\n   *\n   * @name AcroFormTextField#richText\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"richText\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MaxLen = null;\n  Object.defineProperty(this, \"MaxLen\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      _MaxLen = value;\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The maximum length of the field’s text, in characters.\n   *\n   * @name AcroFormTextField#maxLength\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxLength\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      if (Number.isInteger(value)) {\n        _MaxLen = value;\n      }\n    }\n  });\n\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.V || this.DV;\n    }\n  });\n};\ninherit(AcroFormTextField, AcroFormField);\n\n/**\n * @class AcroFormPasswordField\n * @extends AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormPasswordField = function() {\n  AcroFormTextField.call(this);\n\n  /**\n   * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.\n   * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.\n   *\n   * @name AcroFormTextField#password\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"password\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 14));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 14);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 14);\n      }\n    }\n  });\n  this.password = true;\n};\ninherit(AcroFormPasswordField, AcroFormTextField);\n\n// Contains Methods for creating standard appearances\nvar AcroFormAppearance = {\n  CheckBox: {\n    createAppearanceStream: function() {\n      var appearance = {\n        N: {\n          On: AcroFormAppearance.CheckBox.YesNormal\n        },\n        D: {\n          On: AcroFormAppearance.CheckBox.YesPushDown,\n          Off: AcroFormAppearance.CheckBox.OffPushDown\n        }\n      };\n\n      return appearance;\n    },\n    /**\n     * Returns the standard On Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    YesPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      stream.push(\"BMC\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(\"BT\");\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      stream.push(\"EMC\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    YesNormal: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var stream = [];\n      var height = AcroFormAppearance.internal.getHeight(formObject);\n      var width = AcroFormAppearance.internal.getWidth(formObject);\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"1 g\");\n      stream.push(\"0 0 \" + f2(width) + \" \" + f2(height) + \" re\");\n      stream.push(\"f\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\"0 0 \" + f2(width - 1) + \" \" + f2(height - 1) + \" re\");\n      stream.push(\"W\");\n      stream.push(\"n\");\n      stream.push(\"0 g\");\n      stream.push(\"BT\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    /**\n     * Returns the standard Off Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    OffPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    }\n  },\n\n  RadioButton: {\n    Circle: {\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Circle.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Circle.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Circle.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"l\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        // Make the Radius of the Circle relative to min(height, width) of formObject\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        var c = AcroFormAppearance.internal.Bezier_C;\n        var DotRadiusBezier = Number((DotRadius * c).toFixed(5));\n        /*\n         * The Following is a Circle created with Bezier-Curves.\n         */\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n        var dc = Number(\n          (DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5)\n        );\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        stream.push(\"0 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          \"\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" \" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" -\" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          dc +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    },\n\n    Cross: {\n      /**\n       * Creates the Actual AppearanceDictionary-References\n       *\n       * @param {string} name\n       * @returns {Object}\n       * @ignore\n       */\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Cross.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Cross.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Cross.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"8\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    }\n  },\n\n  /**\n   * Returns the standard Appearance\n   *\n   * @returns {AcroFormXObject}\n   */\n  createDefaultAppearanceStream: function(formObject) {\n    // Set Helvetica to Standard Font (size: auto)\n    // Color: Black\n    var fontKey = formObject.scope.internal.getFont(\n      formObject.fontName,\n      formObject.fontStyle\n    ).id;\n    var encodedColor = formObject.scope.__private__.encodeColorString(\n      formObject.color\n    );\n    var fontSize = formObject.fontSize;\n    var result = \"/\" + fontKey + \" \" + fontSize + \" Tf \" + encodedColor;\n    return result;\n  }\n};\n\nAcroFormAppearance.internal = {\n  Bezier_C: 0.551915024494,\n\n  calculateCross: function(formObject) {\n    var width = AcroFormAppearance.internal.getWidth(formObject);\n    var height = AcroFormAppearance.internal.getHeight(formObject);\n    var a = Math.min(width, height);\n\n    var cross = {\n      x1: {\n        // upperLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 + a // height - borderPadding\n      },\n      x2: {\n        // lowerRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 // borderPadding\n      },\n      x3: {\n        // lowerLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 // borderPadding\n      },\n      x4: {\n        // upperRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 + a // height - borderPadding\n      }\n    };\n\n    return cross;\n  }\n};\nAcroFormAppearance.internal.getWidth = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[2]);\n  }\n  return result;\n};\nAcroFormAppearance.internal.getHeight = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[3]);\n  }\n  return result;\n};\n\n// Public:\n\n/**\n * Add an AcroForm-Field to the jsPDF-instance\n *\n * @name addField\n * @function\n * @instance\n * @param {Object} fieldObject\n * @returns {jsPDF}\n */\nvar addField = (jsPDFAPI.addField = function(fieldObject) {\n  initializeAcroForm(this, fieldObject);\n\n  if (fieldObject instanceof AcroFormField) {\n    putForm(fieldObject);\n  } else {\n    throw new Error(\"Invalid argument passed to jsPDF.addField.\");\n  }\n  fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;\n  return this;\n});\n\njsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;\njsPDFAPI.AcroFormListBox = AcroFormListBox;\njsPDFAPI.AcroFormComboBox = AcroFormComboBox;\njsPDFAPI.AcroFormEditBox = AcroFormEditBox;\njsPDFAPI.AcroFormButton = AcroFormButton;\njsPDFAPI.AcroFormPushButton = AcroFormPushButton;\njsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;\njsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;\njsPDFAPI.AcroFormTextField = AcroFormTextField;\njsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;\njsPDFAPI.AcroFormAppearance = AcroFormAppearance;\n\njsPDFAPI.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\njsPDF.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\nvar AcroForm = jsPDF.AcroForm;\n\nexport {\n  AcroForm,\n  AcroFormChoiceField,\n  AcroFormListBox,\n  AcroFormComboBox,\n  AcroFormEditBox,\n  AcroFormButton,\n  AcroFormPushButton,\n  AcroFormRadioButton,\n  AcroFormCheckBox,\n  AcroFormTextField,\n  AcroFormPasswordField,\n  AcroFormAppearance\n};\n","function toLookup(arr) {\n  return arr.reduce(function(lookup, name, index) {\n    lookup[name] = index;\n\n    return lookup;\n  }, {});\n}\n\nvar fontStyleOrder = {\n  italic: [\"italic\", \"oblique\", \"normal\"],\n  oblique: [\"oblique\", \"italic\", \"normal\"],\n  normal: [\"normal\", \"oblique\", \"italic\"]\n};\n\nvar fontStretchOrder = [\n  \"ultra-condensed\",\n  \"extra-condensed\",\n  \"condensed\",\n  \"semi-condensed\",\n  \"normal\",\n  \"semi-expanded\",\n  \"expanded\",\n  \"extra-expanded\",\n  \"ultra-expanded\"\n];\n\n// For a given font-stretch value, we need to know where to start our search\n// from in the fontStretchOrder list.\nvar fontStretchLookup = toLookup(fontStretchOrder);\n\nvar fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];\nvar fontWeightsLookup = toLookup(fontWeights);\n\nfunction normalizeFontStretch(stretch) {\n  stretch = stretch || \"normal\";\n\n  return typeof fontStretchLookup[stretch] === \"number\" ? stretch : \"normal\";\n}\n\nfunction normalizeFontStyle(style) {\n  style = style || \"normal\";\n\n  return fontStyleOrder[style] ? style : \"normal\";\n}\n\nfunction normalizeFontWeight(weight) {\n  if (!weight) {\n    return 400;\n  }\n\n  if (typeof weight === \"number\") {\n    // Ignore values which aren't valid font-weights.\n    return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;\n  }\n\n  if (/^\\d00$/.test(weight)) {\n    return parseInt(weight);\n  }\n\n  switch (weight) {\n    case \"bold\":\n      return 700;\n\n    case \"normal\":\n    default:\n      return 400;\n  }\n}\n\nexport function normalizeFontFace(fontFace) {\n  var family = fontFace.family.replace(/\"|'/g, \"\").toLowerCase();\n\n  var style = normalizeFontStyle(fontFace.style);\n  var weight = normalizeFontWeight(fontFace.weight);\n  var stretch = normalizeFontStretch(fontFace.stretch);\n\n  return {\n    family: family,\n    style: style,\n    weight: weight,\n    stretch: stretch,\n    src: fontFace.src || [],\n\n    // The ref property maps this font-face to the font\n    // added by the .addFont() method.\n    ref: fontFace.ref || {\n      name: family,\n      style: [stretch, style, weight].join(\" \")\n    }\n  };\n}\n\n/**\n * Turns a list of font-faces into a map, for easier lookup when resolving\n * fonts.\n * @private\n */\nexport function buildFontFaceMap(fontFaces) {\n  var map = {};\n\n  for (var i = 0; i < fontFaces.length; ++i) {\n    var normalized = normalizeFontFace(fontFaces[i]);\n\n    var name = normalized.family;\n    var stretch = normalized.stretch;\n    var style = normalized.style;\n    var weight = normalized.weight;\n\n    map[name] = map[name] || {};\n\n    map[name][stretch] = map[name][stretch] || {};\n    map[name][stretch][style] = map[name][stretch][style] || {};\n    map[name][stretch][style][weight] = normalized;\n  }\n\n  return map;\n}\n\n/**\n * Searches a map of stretches, weights, etc. in the given direction and\n * then, if no match has been found, in the opposite directions.\n *\n * @param {Object.<string, any>} matchingSet A map of the various font variations.\n * @param {any[]} order The order of the different variations\n * @param {number} pivot The starting point of the search in the order list.\n * @param {number} dir The initial direction of the search (desc = -1, asc = 1)\n * @private\n */\n\nfunction searchFromPivot(matchingSet, order, pivot, dir) {\n  var i;\n\n  for (i = pivot; i >= 0 && i < order.length; i += dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n\n  for (i = pivot; i >= 0 && i < order.length; i -= dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n}\n\nfunction resolveFontStretch(stretch, matchingSet) {\n  if (matchingSet[stretch]) {\n    return matchingSet[stretch];\n  }\n\n  var pivot = fontStretchLookup[stretch];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = pivot <= fontStretchLookup[\"normal\"] ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-stretch value for \" + stretch\n    );\n  }\n\n  return match;\n}\n\nfunction resolveFontStyle(fontStyle, matchingSet) {\n  if (matchingSet[fontStyle]) {\n    return matchingSet[fontStyle];\n  }\n\n  var ordering = fontStyleOrder[fontStyle];\n\n  for (var i = 0; i < ordering.length; ++i) {\n    if (matchingSet[ordering[i]]) {\n      return matchingSet[ordering[i]];\n    }\n  }\n\n  // Since a font-family cannot exist without having at least one style value\n  // we should never reach this point.\n  throw new Error(\"Could not find a matching font-style for \" + fontStyle);\n}\n\nfunction resolveFontWeight(weight, matchingSet) {\n  if (matchingSet[weight]) {\n    return matchingSet[weight];\n  }\n\n  if (weight === 400 && matchingSet[500]) {\n    return matchingSet[500];\n  }\n\n  if (weight === 500 && matchingSet[400]) {\n    return matchingSet[400];\n  }\n\n  var pivot = fontWeightsLookup[weight];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = weight < 400 ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-weight for value \" + weight\n    );\n  }\n\n  return match;\n}\n\nvar defaultGenericFontFamilies = {\n  \"sans-serif\": \"helvetica\",\n  fixed: \"courier\",\n  monospace: \"courier\",\n  terminal: \"courier\",\n  cursive: \"times\",\n  fantasy: \"times\",\n  serif: \"times\"\n};\n\nvar systemFonts = {\n  caption: \"times\",\n  icon: \"times\",\n  menu: \"times\",\n  \"message-box\": \"times\",\n  \"small-caption\": \"times\",\n  \"status-bar\": \"times\"\n};\n\nfunction ruleToString(rule) {\n  return [rule.stretch, rule.style, rule.weight, rule.family].join(\" \");\n}\n\nexport function resolveFontFace(fontFaceMap, rules, opts) {\n  opts = opts || {};\n\n  var defaultFontFamily = opts.defaultFontFamily || \"times\";\n  var genericFontFamilies = Object.assign(\n    {},\n    defaultGenericFontFamilies,\n    opts.genericFontFamilies || {}\n  );\n\n  var rule = null;\n  var matches = null;\n\n  for (var i = 0; i < rules.length; ++i) {\n    rule = normalizeFontFace(rules[i]);\n\n    if (genericFontFamilies[rule.family]) {\n      rule.family = genericFontFamilies[rule.family];\n    }\n\n    if (fontFaceMap.hasOwnProperty(rule.family)) {\n      matches = fontFaceMap[rule.family];\n\n      break;\n    }\n  }\n\n  // Always fallback to a known font family.\n  matches = matches || fontFaceMap[defaultFontFamily];\n\n  if (!matches) {\n    // At this point we should definitiely have a font family, but if we\n    // don't there is something wrong with our configuration\n    throw new Error(\n      \"Could not find a font-family for the rule '\" +\n        ruleToString(rule) +\n        \"' and default family '\" +\n        defaultFontFamily +\n        \"'.\"\n    );\n  }\n\n  matches = resolveFontStretch(rule.stretch, matches);\n  matches = resolveFontStyle(rule.style, matches);\n  matches = resolveFontWeight(rule.weight, matches);\n\n  if (!matches) {\n    // We should've fount\n    throw new Error(\n      \"Failed to resolve a font for the rule '\" + ruleToString(rule) + \"'.\"\n    );\n  }\n\n  return matches;\n}\n\n/**\n * Builds a style id for use with the addFont() method.\n * @param {FontFace} font\n * @private\n */\nexport function toStyleName(font) {\n  return [font.weight, font.style, font.stretch].join(\" \");\n}\n\nfunction eatWhiteSpace(input) {\n  return input.trimLeft();\n}\n\nfunction parseQuotedFontFamily(input, quote) {\n  var index = 0;\n\n  while (index < input.length) {\n    var current = input.charAt(index);\n\n    if (current === quote) {\n      return [input.substring(0, index), input.substring(index + 1)];\n    }\n\n    index += 1;\n  }\n\n  // Unexpected end of input\n  return null;\n}\n\nfunction parseNonQuotedFontFamily(input) {\n  // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n  //\n  // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.\n  //\n  // Breakdown of regexp:\n  // -[a-z_]     - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit\n  // [a-z_]      - allow a-z and underscore at beginning of input\n  // [a-z0-9_-]* - after that, anything goes\n  var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);\n\n  // non quoted value contains illegal characters\n  if (match === null) {\n    return null;\n  }\n\n  return [match[0], input.substring(match[0].length)];\n}\n\nvar defaultFont = [\"times\"];\n\nexport function parseFontFamily(input) {\n  var result = [];\n  var ch, parsed;\n  var remaining = input.trim();\n\n  if (remaining === \"\") {\n    return defaultFont;\n  }\n\n  if (remaining in systemFonts) {\n    return [systemFonts[remaining]];\n  }\n\n  while (remaining !== \"\") {\n    parsed = null;\n    remaining = eatWhiteSpace(remaining);\n    ch = remaining.charAt(0);\n\n    switch (ch) {\n      case '\"':\n      case \"'\":\n        parsed = parseQuotedFontFamily(remaining.substring(1), ch);\n        break;\n\n      default:\n        parsed = parseNonQuotedFontFamily(remaining);\n        break;\n    }\n\n    if (parsed === null) {\n      return defaultFont;\n    }\n\n    result.push(parsed[0]);\n\n    remaining = eatWhiteSpace(parsed[1]);\n\n    // We expect end of input or a comma separator here\n    if (remaining !== \"\" && remaining.charAt(0) !== \",\") {\n      return defaultFont;\n    }\n\n    remaining = remaining.replace(/^,/, \"\");\n  }\n\n  return result;\n}\n","/** @license\n * jsPDF addImage plugin\n * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/\n *               2013 Chris Dowling, https://github.com/gingerchris\n *               2013 Trinh Ho, https://github.com/ineedfat\n *               2013 Edwin Alejandro Perez, https://github.com/eaparango\n *               2013 Norah Smith, https://github.com/burnburnrocket\n *               2014 Diego Casorran, https://github.com/diegocr\n *               2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * @name addImage\n * @module\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob, btoa } from \"../libs/AtobBtoa.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namespace = \"addImage_\";\n  jsPDFAPI.__addimage__ = {};\n\n  var UNKNOWN = \"UNKNOWN\";\n\n  // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.\n  // With too small batch iteration will be slow as more calls are made,\n  // higher values cause larger and slower garbage collection.\n  var ARRAY_APPLY_BATCH = 8192;\n\n  var imageFileTypeHeaders = {\n    PNG: [[0x89, 0x50, 0x4e, 0x47]],\n    TIFF: [\n      [0x4d, 0x4d, 0x00, 0x2a], //Motorola\n      [0x49, 0x49, 0x2a, 0x00] //Intel\n    ],\n    JPEG: [\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe0,\n        undefined,\n        undefined,\n        0x4a,\n        0x46,\n        0x49,\n        0x46,\n        0x00\n      ], //JFIF\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe1,\n        undefined,\n        undefined,\n        0x45,\n        0x78,\n        0x69,\n        0x66,\n        0x00,\n        0x00\n      ], //Exif\n      [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW\n      [0xff, 0xd8, 0xff, 0xee] //EXIF RAW\n    ],\n    JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],\n    GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],\n    GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],\n    WEBP: [\n      [\n        0x52,\n        0x49,\n        0x46,\n        0x46,\n        undefined,\n        undefined,\n        undefined,\n        undefined,\n        0x57,\n        0x45,\n        0x42,\n        0x50\n      ]\n    ],\n    BMP: [\n      [0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.\n      [0x42, 0x41], //BA - OS/2 struct bitmap array\n      [0x43, 0x49], //CI - OS/2 struct color icon\n      [0x43, 0x50], //CP - OS/2 const color pointer\n      [0x49, 0x43], //IC - OS/2 struct icon\n      [0x50, 0x54] //PT - OS/2 pointer\n    ]\n  };\n\n  /**\n   * Recognize filetype of Image by magic-bytes\n   *\n   * https://en.wikipedia.org/wiki/List_of_file_signatures\n   *\n   * @name getImageFileTypeByImageData\n   * @public\n   * @function\n   * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer\n   * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'\n   *\n   * @returns {string} filetype of Image\n   */\n  var getImageFileTypeByImageData = (jsPDFAPI.__addimage__.getImageFileTypeByImageData = function(\n    imageData,\n    fallbackFormat\n  ) {\n    fallbackFormat = fallbackFormat || UNKNOWN;\n    var i;\n    var j;\n    var result = UNKNOWN;\n    var headerSchemata;\n    var compareResult;\n    var fileType;\n\n    if (\n      fallbackFormat === \"RGBA\" ||\n      (imageData.data !== undefined &&\n        imageData.data instanceof Uint8ClampedArray &&\n        \"height\" in imageData &&\n        \"width\" in imageData)\n    ) {\n      return \"RGBA\";\n    }\n\n    if (isArrayBufferView(imageData)) {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData[j]) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    } else {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    }\n\n    if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {\n      result = fallbackFormat;\n    }\n    return result;\n  });\n\n  // Image functionality ported from pdf.js\n  var putImage = function(image) {\n    var out = this.internal.write;\n    var putStream = this.internal.putStream;\n    var getFilters = this.internal.getFilters;\n\n    var filter = getFilters();\n    while (filter.indexOf(\"FlateEncode\") !== -1) {\n      filter.splice(filter.indexOf(\"FlateEncode\"), 1);\n    }\n\n    image.objectId = this.internal.newObject();\n\n    var additionalKeyValues = [];\n    additionalKeyValues.push({ key: \"Type\", value: \"/XObject\" });\n    additionalKeyValues.push({ key: \"Subtype\", value: \"/Image\" });\n    additionalKeyValues.push({ key: \"Width\", value: image.width });\n    additionalKeyValues.push({ key: \"Height\", value: image.height });\n\n    if (image.colorSpace === color_spaces.INDEXED) {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value:\n          \"[/Indexed /DeviceRGB \" +\n          // if an indexed png defines more than one colour with transparency, we've created a sMask\n          (image.palette.length / 3 - 1) +\n          \" \" +\n          (\"sMask\" in image && typeof image.sMask !== \"undefined\"\n            ? image.objectId + 2\n            : image.objectId + 1) +\n          \" 0 R]\"\n      });\n    } else {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value: \"/\" + image.colorSpace\n      });\n      if (image.colorSpace === color_spaces.DEVICE_CMYK) {\n        additionalKeyValues.push({ key: \"Decode\", value: \"[1 0 1 0 1 0 1 0]\" });\n      }\n    }\n    additionalKeyValues.push({\n      key: \"BitsPerComponent\",\n      value: image.bitsPerComponent\n    });\n    if (\n      \"decodeParameters\" in image &&\n      typeof image.decodeParameters !== \"undefined\"\n    ) {\n      additionalKeyValues.push({\n        key: \"DecodeParms\",\n        value: \"<<\" + image.decodeParameters + \">>\"\n      });\n    }\n    if (\"transparency\" in image && Array.isArray(image.transparency)) {\n      var transparency = \"\",\n        i = 0,\n        len = image.transparency.length;\n      for (; i < len; i++)\n        transparency +=\n          image.transparency[i] + \" \" + image.transparency[i] + \" \";\n\n      additionalKeyValues.push({\n        key: \"Mask\",\n        value: \"[\" + transparency + \"]\"\n      });\n    }\n    if (typeof image.sMask !== \"undefined\") {\n      additionalKeyValues.push({\n        key: \"SMask\",\n        value: image.objectId + 1 + \" 0 R\"\n      });\n    }\n\n    var alreadyAppliedFilters =\n      typeof image.filter !== \"undefined\" ? [\"/\" + image.filter] : undefined;\n\n    putStream({\n      data: image.data,\n      additionalKeyValues: additionalKeyValues,\n      alreadyAppliedFilters: alreadyAppliedFilters,\n      objectId: image.objectId\n    });\n\n    out(\"endobj\");\n\n    // Soft mask\n    if (\"sMask\" in image && typeof image.sMask !== \"undefined\") {\n      var decodeParameters =\n        \"/Predictor \" +\n        image.predictor +\n        \" /Colors 1 /BitsPerComponent \" +\n        image.bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n      var sMask = {\n        width: image.width,\n        height: image.height,\n        colorSpace: \"DeviceGray\",\n        bitsPerComponent: image.bitsPerComponent,\n        decodeParameters: decodeParameters,\n        data: image.sMask\n      };\n      if (\"filter\" in image) {\n        sMask.filter = image.filter;\n      }\n      putImage.call(this, sMask);\n    }\n\n    //Palette\n    if (image.colorSpace === color_spaces.INDEXED) {\n      var objId = this.internal.newObject();\n      //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');\n      //putStream(zlib.compress(img['pal']));\n      putStream({\n        data: arrayBufferToBinaryString(new Uint8Array(image.palette)),\n        objectId: objId\n      });\n      out(\"endobj\");\n    }\n  };\n  var putResourcesCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    for (var i in images) {\n      putImage.call(this, images[i]);\n    }\n  };\n  var putXObjectsDictCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"],\n      out = this.internal.write,\n      image;\n    for (var i in images) {\n      image = images[i];\n      out(\"/I\" + image.index, image.objectId, \"0\", \"R\");\n    }\n  };\n\n  var checkCompressValue = function(value) {\n    if (value && typeof value === \"string\") value = value.toUpperCase();\n    return value in jsPDFAPI.image_compression ? value : image_compression.NONE;\n  };\n\n  var initialize = function() {\n    if (!this.internal.collections[namespace + \"images\"]) {\n      this.internal.collections[namespace + \"images\"] = {};\n      this.internal.events.subscribe(\"putResources\", putResourcesCallback);\n      this.internal.events.subscribe(\"putXobjectDict\", putXObjectsDictCallback);\n    }\n  };\n\n  var getImages = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    initialize.call(this);\n    return images;\n  };\n  var getImageIndex = function() {\n    return Object.keys(this.internal.collections[namespace + \"images\"]).length;\n  };\n  var notDefined = function(value) {\n    return typeof value === \"undefined\" || value === null || value.length === 0;\n  };\n  var generateAliasFromImageData = function(imageData) {\n    if (typeof imageData === \"string\" || isArrayBufferView(imageData)) {\n      return sHashCode(imageData);\n    } else if (isArrayBufferView(imageData.data)) {\n      return sHashCode(imageData.data);\n    }\n\n    return null;\n  };\n\n  var isImageTypeSupported = function(type) {\n    return typeof jsPDFAPI[\"process\" + type.toUpperCase()] === \"function\";\n  };\n\n  var isDOMElement = function(object) {\n    return typeof object === \"object\" && object.nodeType === 1;\n  };\n\n  var getImageDataFromElement = function(element, format) {\n    //if element is an image which uses data url definition, just return the dataurl\n    if (element.nodeName === \"IMG\" && element.hasAttribute(\"src\")) {\n      var src = \"\" + element.getAttribute(\"src\");\n\n      //is base64 encoded dataUrl, directly process it\n      if (src.indexOf(\"data:image/\") === 0) {\n        return atob(\n          unescape(src)\n            .split(\"base64,\")\n            .pop()\n        );\n      }\n\n      //it is probably an url, try to load it\n      var tmpImageData = jsPDFAPI.loadFile(src, true);\n      if (tmpImageData !== undefined) {\n        return tmpImageData;\n      }\n    }\n\n    if (element.nodeName === \"CANVAS\") {\n      if (element.width === 0 || element.height === 0) {\n        throw new Error(\n          \"Given canvas must have data. Canvas width: \" +\n            element.width +\n            \", height: \" +\n            element.height\n        );\n      }\n      var mimeType;\n      switch (format) {\n        case \"PNG\":\n          mimeType = \"image/png\";\n          break;\n        case \"WEBP\":\n          mimeType = \"image/webp\";\n          break;\n        case \"JPEG\":\n        case \"JPG\":\n        default:\n          mimeType = \"image/jpeg\";\n          break;\n      }\n      return atob(\n        element\n          .toDataURL(mimeType, 1.0)\n          .split(\"base64,\")\n          .pop()\n      );\n    }\n  };\n\n  var checkImagesForAlias = function(alias) {\n    var images = this.internal.collections[namespace + \"images\"];\n    if (images) {\n      for (var e in images) {\n        if (alias === images[e].alias) {\n          return images[e];\n        }\n      }\n    }\n  };\n\n  var determineWidthAndHeight = function(width, height, image) {\n    if (!width && !height) {\n      width = -96;\n      height = -96;\n    }\n    if (width < 0) {\n      width = (-1 * image.width * 72) / width / this.internal.scaleFactor;\n    }\n    if (height < 0) {\n      height = (-1 * image.height * 72) / height / this.internal.scaleFactor;\n    }\n    if (width === 0) {\n      width = (height * image.width) / image.height;\n    }\n    if (height === 0) {\n      height = (width * image.height) / image.width;\n    }\n\n    return [width, height];\n  };\n\n  var writeImageToPDF = function(x, y, width, height, image, rotation) {\n    var dims = determineWidthAndHeight.call(this, width, height, image),\n      coord = this.internal.getCoordinateString,\n      vcoord = this.internal.getVerticalCoordinateString;\n\n    var images = getImages.call(this);\n\n    width = dims[0];\n    height = dims[1];\n    images[image.index] = image;\n\n    if (rotation) {\n      rotation *= Math.PI / 180;\n      var c = Math.cos(rotation);\n      var s = Math.sin(rotation);\n      //like in pdf Reference do it 4 digits instead of 2\n      var f4 = function(number) {\n        return number.toFixed(4);\n      };\n      var rotationTransformationMatrix = [\n        f4(c),\n        f4(s),\n        f4(s * -1),\n        f4(c),\n        0,\n        0,\n        \"cm\"\n      ];\n    }\n    this.internal.write(\"q\"); //Save graphics state\n    if (rotation) {\n      this.internal.write(\n        [1, \"0\", \"0\", 1, coord(x), vcoord(y + height), \"cm\"].join(\" \")\n      ); //Translate\n      this.internal.write(rotationTransformationMatrix.join(\" \")); //Rotate\n      this.internal.write(\n        [coord(width), \"0\", \"0\", coord(height), \"0\", \"0\", \"cm\"].join(\" \")\n      ); //Scale\n    } else {\n      this.internal.write(\n        [\n          coord(width),\n          \"0\",\n          \"0\",\n          coord(height),\n          coord(x),\n          vcoord(y + height),\n          \"cm\"\n        ].join(\" \")\n      ); //Translate and Scale\n    }\n\n    if (this.isAdvancedAPI()) {\n      // draw image bottom up when in \"advanced\" API mode\n      this.internal.write([1, 0, 0, -1, 0, 0, \"cm\"].join(\" \"));\n    }\n\n    this.internal.write(\"/I\" + image.index + \" Do\"); //Paint Image\n    this.internal.write(\"Q\"); //Restore graphics state\n  };\n\n  /**\n   * COLOR SPACES\n   */\n  var color_spaces = (jsPDFAPI.color_spaces = {\n    DEVICE_RGB: \"DeviceRGB\",\n    DEVICE_GRAY: \"DeviceGray\",\n    DEVICE_CMYK: \"DeviceCMYK\",\n    CAL_GREY: \"CalGray\",\n    CAL_RGB: \"CalRGB\",\n    LAB: \"Lab\",\n    ICC_BASED: \"ICCBased\",\n    INDEXED: \"Indexed\",\n    PATTERN: \"Pattern\",\n    SEPARATION: \"Separation\",\n    DEVICE_N: \"DeviceN\"\n  });\n\n  /**\n   * DECODE METHODS\n   */\n  jsPDFAPI.decode = {\n    DCT_DECODE: \"DCTDecode\",\n    FLATE_DECODE: \"FlateDecode\",\n    LZW_DECODE: \"LZWDecode\",\n    JPX_DECODE: \"JPXDecode\",\n    JBIG2_DECODE: \"JBIG2Decode\",\n    ASCII85_DECODE: \"ASCII85Decode\",\n    ASCII_HEX_DECODE: \"ASCIIHexDecode\",\n    RUN_LENGTH_DECODE: \"RunLengthDecode\",\n    CCITT_FAX_DECODE: \"CCITTFaxDecode\"\n  };\n\n  /**\n   * IMAGE COMPRESSION TYPES\n   */\n  var image_compression = (jsPDFAPI.image_compression = {\n    NONE: \"NONE\",\n    FAST: \"FAST\",\n    MEDIUM: \"MEDIUM\",\n    SLOW: \"SLOW\"\n  });\n\n  /**\n   * @name sHashCode\n   * @function\n   * @param {string} data\n   * @returns {string}\n   */\n  var sHashCode = (jsPDFAPI.__addimage__.sHashCode = function(data) {\n    var hash = 0,\n      i,\n      len;\n\n    if (typeof data === \"string\") {\n      len = data.length;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data.charCodeAt(i);\n        hash |= 0; // Convert to 32bit integer\n      }\n    } else if (isArrayBufferView(data)) {\n      len = data.byteLength / 2;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data[i];\n        hash |= 0; // Convert to 32bit integer\n      }\n    }\n    return hash;\n  });\n\n  /**\n   * Validates if given String is a valid Base64-String\n   *\n   * @name validateStringAsBase64\n   * @public\n   * @function\n   * @param {String} possible Base64-String\n   *\n   * @returns {boolean}\n   */\n  var validateStringAsBase64 = (jsPDFAPI.__addimage__.validateStringAsBase64 = function(\n    possibleBase64String\n  ) {\n    possibleBase64String = possibleBase64String || \"\";\n    possibleBase64String.toString().trim();\n\n    var result = true;\n\n    if (possibleBase64String.length === 0) {\n      result = false;\n    }\n\n    if (possibleBase64String.length % 4 !== 0) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9+/]+$/.test(\n        possibleBase64String.substr(0, possibleBase64String.length - 2)\n      ) === false\n    ) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(\n        possibleBase64String.substr(-2)\n      ) === false\n    ) {\n      result = false;\n    }\n    return result;\n  });\n\n  /**\n   * Strips out and returns info from a valid base64 data URI\n   *\n   * @name extractImageFromDataUrl\n   * @function\n   * @param {string} dataUrl a valid data URI of format 'data:[<MIME-type>][;base64],<data>'\n   * @returns {Array}an Array containing the following\n   * [0] the complete data URI\n   * [1] <MIME-type>\n   * [2] format - the second part of the mime-type i.e 'png' in 'image/png'\n   * [4] <data>\n   */\n  var extractImageFromDataUrl = (jsPDFAPI.__addimage__.extractImageFromDataUrl = function(\n    dataUrl\n  ) {\n    dataUrl = dataUrl || \"\";\n    var dataUrlParts = dataUrl.split(\"base64,\");\n    var result = null;\n\n    if (dataUrlParts.length === 2) {\n      var extractedInfo = /^data:(\\w*\\/\\w*);*(charset=(?!charset=)[\\w=-]*)*;*$/.exec(\n        dataUrlParts[0]\n      );\n      if (Array.isArray(extractedInfo)) {\n        result = {\n          mimeType: extractedInfo[1],\n          charset: extractedInfo[2],\n          data: dataUrlParts[1]\n        };\n      }\n    }\n    return result;\n  });\n\n  /**\n   * Check to see if ArrayBuffer is supported\n   *\n   * @name supportsArrayBuffer\n   * @function\n   * @returns {boolean}\n   */\n  var supportsArrayBuffer = (jsPDFAPI.__addimage__.supportsArrayBuffer = function() {\n    return (\n      typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\"\n    );\n  });\n\n  /**\n   * Tests supplied object to determine if ArrayBuffer\n   *\n   * @name isArrayBuffer\n   * @function\n   * @param {Object} object an Object\n   *\n   * @returns {boolean}\n   */\n  jsPDFAPI.__addimage__.isArrayBuffer = function(object) {\n    return supportsArrayBuffer() && object instanceof ArrayBuffer;\n  };\n\n  /**\n   * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface\n   *\n   * @name isArrayBufferView\n   * @function\n   * @param {Object} object an Object\n   * @returns {boolean}\n   */\n  var isArrayBufferView = (jsPDFAPI.__addimage__.isArrayBufferView = function(\n    object\n  ) {\n    return (\n      supportsArrayBuffer() &&\n      typeof Uint32Array !== \"undefined\" &&\n      (object instanceof Int8Array ||\n        object instanceof Uint8Array ||\n        (typeof Uint8ClampedArray !== \"undefined\" &&\n          object instanceof Uint8ClampedArray) ||\n        object instanceof Int16Array ||\n        object instanceof Uint16Array ||\n        object instanceof Int32Array ||\n        object instanceof Uint32Array ||\n        object instanceof Float32Array ||\n        object instanceof Float64Array)\n    );\n  });\n\n  /**\n   * Convert Binary String to ArrayBuffer\n   *\n   * @name binaryStringToUint8Array\n   * @public\n   * @function\n   * @param {string} BinaryString with ImageData\n   * @returns {Uint8Array}\n   */\n  var binaryStringToUint8Array = (jsPDFAPI.__addimage__.binaryStringToUint8Array = function(\n    binary_string\n  ) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  });\n\n  /**\n   * Convert the Buffer to a Binary String\n   *\n   * @name arrayBufferToBinaryString\n   * @public\n   * @function\n   * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData\n   *\n   * @returns {String}\n   */\n  var arrayBufferToBinaryString = (jsPDFAPI.__addimage__.arrayBufferToBinaryString = function(\n    buffer\n  ) {\n    var out = \"\";\n    // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.\n    // Do not copy the array if input is already an array.\n    var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);\n    for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {\n      // Limit the amount of characters being parsed to prevent overflow.\n      // Note that while TextDecoder would be faster, it does not have the same\n      // functionality as fromCharCode with any provided encodings as of 3/2021.\n      out += String.fromCharCode.apply(\n        null,\n        buf.subarray(i, i + ARRAY_APPLY_BATCH)\n      );\n    }\n    return out;\n  });\n\n  /**\n   * Possible parameter for addImage, an RGBA buffer with size.\n   *\n   * @typedef {Object} RGBAData\n   * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.\n   * @property {number} width - Image width as the data does not carry this information in itself.\n   * @property {number} height - Image height as the data does not carry this information in itself.\n   */\n\n  /**\n   * Adds an Image to the PDF.\n   *\n   * @name addImage\n   * @public\n   * @function\n   * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).\n   * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'\n   * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width width of the image (in units declared at inception of PDF document)\n   * @param {number} height height of the Image (in units declared at inception of PDF document)\n   * @param {string} alias alias of the image (if used multiple times)\n   * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF\n   */\n  jsPDFAPI.addImage = function() {\n    var imageData, format, x, y, w, h, alias, compression, rotation;\n\n    imageData = arguments[0];\n    if (typeof arguments[1] === \"number\") {\n      format = UNKNOWN;\n      x = arguments[1];\n      y = arguments[2];\n      w = arguments[3];\n      h = arguments[4];\n      alias = arguments[5];\n      compression = arguments[6];\n      rotation = arguments[7];\n    } else {\n      format = arguments[1];\n      x = arguments[2];\n      y = arguments[3];\n      w = arguments[4];\n      h = arguments[5];\n      alias = arguments[6];\n      compression = arguments[7];\n      rotation = arguments[8];\n    }\n\n    if (\n      typeof imageData === \"object\" &&\n      !isDOMElement(imageData) &&\n      \"imageData\" in imageData\n    ) {\n      var options = imageData;\n\n      imageData = options.imageData;\n      format = options.format || format || UNKNOWN;\n      x = options.x || x || 0;\n      y = options.y || y || 0;\n      w = options.w || options.width || w;\n      h = options.h || options.height || h;\n      alias = options.alias || alias;\n      compression = options.compression || compression;\n      rotation = options.rotation || options.angle || rotation;\n    }\n\n    //If compression is not explicitly set, determine if we should use compression\n    var filter = this.internal.getFilters();\n    if (compression === undefined && filter.indexOf(\"FlateEncode\") !== -1) {\n      compression = \"SLOW\";\n    }\n\n    if (isNaN(x) || isNaN(y)) {\n      throw new Error(\"Invalid coordinates passed to jsPDF.addImage\");\n    }\n\n    initialize.call(this);\n\n    var image = processImageData.call(\n      this,\n      imageData,\n      format,\n      alias,\n      compression\n    );\n\n    writeImageToPDF.call(this, x, y, w, h, image, rotation);\n\n    return this;\n  };\n\n  var processImageData = function(imageData, format, alias, compression) {\n    var result, dataAsBinaryString;\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      imageData = unescape(imageData);\n      var tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData !== \"\") {\n        imageData = tmpImageData;\n      } else {\n        tmpImageData = jsPDFAPI.loadFile(imageData, true);\n        if (tmpImageData !== undefined) {\n          imageData = tmpImageData;\n        }\n      }\n    }\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData, format);\n    }\n\n    format = getImageFileTypeByImageData(imageData, format);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    // now do the heavy lifting\n\n    if (notDefined(alias)) {\n      alias = generateAliasFromImageData(imageData);\n    }\n    result = checkImagesForAlias.call(this, alias);\n\n    if (!result) {\n      if (supportsArrayBuffer()) {\n        // no need to convert if imageData is already uint8array\n        if (!(imageData instanceof Uint8Array) && format !== \"RGBA\") {\n          dataAsBinaryString = imageData;\n          imageData = binaryStringToUint8Array(imageData);\n        }\n      }\n\n      result = this[\"process\" + format.toUpperCase()](\n        imageData,\n        getImageIndex.call(this),\n        alias,\n        checkCompressValue(compression),\n        dataAsBinaryString\n      );\n    }\n\n    if (!result) {\n      throw new Error(\"An unknown error occurred whilst processing the image.\");\n    }\n    return result;\n  };\n\n  /**\n   * @name convertBase64ToBinaryString\n   * @function\n   * @param {string} stringData\n   * @returns {string} binary string\n   */\n  var convertBase64ToBinaryString = (jsPDFAPI.__addimage__.convertBase64ToBinaryString = function(\n    stringData,\n    throwError\n  ) {\n    throwError = typeof throwError === \"boolean\" ? throwError : true;\n    var base64Info;\n    var imageData = \"\";\n    var rawData;\n\n    if (typeof stringData === \"string\") {\n      base64Info = extractImageFromDataUrl(stringData);\n      rawData = base64Info !== null ? base64Info.data : stringData;\n\n      try {\n        imageData = atob(rawData);\n      } catch (e) {\n        if (throwError) {\n          if (!validateStringAsBase64(rawData)) {\n            throw new Error(\n              \"Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString \"\n            );\n          } else {\n            throw new Error(\n              \"atob-Error in jsPDF.convertBase64ToBinaryString \" + e.message\n            );\n          }\n        }\n      }\n    }\n    return imageData;\n  });\n\n  /**\n   * @name getImageProperties\n   * @function\n   * @param {Object} imageData\n   * @returns {Object}\n   */\n  jsPDFAPI.getImageProperties = function(imageData) {\n    var image;\n    var tmpImageData = \"\";\n    var format;\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData);\n    }\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData === \"\") {\n        tmpImageData = jsPDFAPI.loadFile(imageData) || \"\";\n      }\n      imageData = tmpImageData;\n    }\n\n    format = getImageFileTypeByImageData(imageData);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {\n      imageData = binaryStringToUint8Array(imageData);\n    }\n\n    image = this[\"process\" + format.toUpperCase()](imageData);\n\n    if (!image) {\n      throw new Error(\"An unknown error occurred whilst processing the image\");\n    }\n\n    image.fileType = format;\n\n    return image;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF Annotations PlugIn\n *\n * There are many types of annotations in a PDF document. Annotations are placed\n * on a page at a particular location. They are not 'attached' to an object.\n * <br />\n * This plugin current supports <br />\n * <li> Goto Page (set pageNumber and top in options)\n * <li> Goto Name (set name and top in options)\n * <li> Goto URL (set url in options)\n * <p>\n * \tThe destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below)\n *  (set magFactor in options).  XYZ is the default.\n * </p>\n * <p>\n *  Links, Text, Popup, and FreeText are supported.\n * </p>\n * <p>\n * Options In PDF spec Not Implemented Yet\n * <li> link border\n * <li> named target\n * <li> page coordinates\n * <li> destination page scaling and layout\n * <li> actions other than URL and GotoPage\n * <li> background / hover actions\n * </p>\n * @name annotations\n * @module\n */\n\n/*\n    Destination Magnification Factors\n    See PDF 1.3 Page 386 for meanings and options\n\n    [supported]\n\tXYZ (options; left top zoom)\n\tFit (no options)\n\tFitH (options: top)\n\tFitV (options: left)\n\n\t[not supported]\n\tFitR\n\tFitB\n\tFitBH\n\tFitBV\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var notEmpty = function(obj) {\n    if (typeof obj != \"undefined\") {\n      if (obj != \"\") {\n        return true;\n      }\n    }\n  };\n\n  jsPDF.API.events.push([\n    \"addPage\",\n    function(addPageData) {\n      var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);\n      pageInfo.pageContext.annotations = [];\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putPage\",\n    function(putPageData) {\n      var getHorizontalCoordinateString = this.internal.getCoordinateString;\n      var getVerticalCoordinateString = this.internal\n        .getVerticalCoordinateString;\n      var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);\n      var pageAnnos = putPageData.pageContext.annotations;\n\n      var anno, rect, line;\n      var found = false;\n      for (var a = 0; a < pageAnnos.length && !found; a++) {\n        anno = pageAnnos[a];\n        switch (anno.type) {\n          case \"link\":\n            if (\n              notEmpty(anno.options.url) ||\n              notEmpty(anno.options.pageNumber)\n            ) {\n              found = true;\n            }\n            break;\n          case \"reference\":\n          case \"text\":\n          case \"freetext\":\n            found = true;\n            break;\n        }\n      }\n      if (found == false) {\n        return;\n      }\n\n      this.internal.write(\"/Annots [\");\n      for (var i = 0; i < pageAnnos.length; i++) {\n        anno = pageAnnos[i];\n        var escape = this.internal.pdfEscape;\n        var encryptor = this.internal.getEncryptor(putPageData.objId);\n\n        switch (anno.type) {\n          case \"reference\":\n            // References to Widget Annotations (for AcroForm Fields)\n            this.internal.write(\" \" + anno.object.objId + \" 0 R \");\n            break;\n          case \"text\":\n            // Create a an object for both the text and the popup\n            var objText = this.internal.newAdditionalObject();\n            var objPopup = this.internal.newAdditionalObject();\n            var encryptorText = this.internal.getEncryptor(objText.objId);\n\n            var title = anno.title || \"Note\";\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Text\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptorText(anno.contents)) +\n              \")\";\n            line += \" /Popup \" + objPopup.objId + \" 0 R\";\n            line += \" /P \" + pageInfo.objId + \" 0 R\";\n            line += \" /T (\" + escape(encryptorText(title)) + \") >>\";\n            objText.content = line;\n\n            var parent = objText.objId + \" 0 R\";\n            var popoff = 30;\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x + popoff) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(\n                anno.bounds.x + anno.bounds.w + popoff\n              ) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Popup\" +\n              \" \" +\n              rect +\n              \" /Parent \" +\n              parent;\n            if (anno.open) {\n              line += \" /Open true\";\n            }\n            line += \" >>\";\n            objPopup.content = line;\n\n            this.internal.write(objText.objId, \"0 R\", objPopup.objId, \"0 R\");\n\n            break;\n          case \"freetext\":\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \"] \";\n            var color = anno.color || \"#000000\";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"FreeText\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptor(anno.contents)) +\n              \")\";\n            line +=\n              \" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#\" +\n              color +\n              \")\";\n            line += \" /Border [0 0 0]\";\n            line += \" >>\";\n            this.internal.write(line);\n            break;\n          case \"link\":\n            if (anno.options.name) {\n              var loc = this.annotations._nameMap[anno.options.name];\n              anno.options.pageNumber = loc.page;\n              anno.options.top = loc.y;\n            } else {\n              if (!anno.options.top) {\n                anno.options.top = 0;\n              }\n            }\n\n            rect =\n              \"/Rect [\" +\n              anno.finalBounds.x +\n              \" \" +\n              anno.finalBounds.y +\n              \" \" +\n              anno.finalBounds.w +\n              \" \" +\n              anno.finalBounds.h +\n              \"] \";\n\n            line = \"\";\n            if (anno.options.url) {\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /A <</S /URI /URI (\" +\n                escape(encryptor(anno.options.url)) +\n                \") >>\";\n            } else if (anno.options.pageNumber) {\n              // first page is 0\n              var info = this.internal.getPageInfo(anno.options.pageNumber);\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /Dest [\" +\n                info.objId +\n                \" 0 R\";\n              anno.options.magFactor = anno.options.magFactor || \"XYZ\";\n              switch (anno.options.magFactor) {\n                case \"Fit\":\n                  line += \" /Fit]\";\n                  break;\n                case \"FitH\":\n                  line += \" /FitH \" + anno.options.top + \"]\";\n                  break;\n                case \"FitV\":\n                  anno.options.left = anno.options.left || 0;\n                  line += \" /FitV \" + anno.options.left + \"]\";\n                  break;\n                case \"XYZ\":\n                default:\n                  var top = getVerticalCoordinateString(anno.options.top);\n                  anno.options.left = anno.options.left || 0;\n                  // 0 or null zoom will not change zoom factor\n                  if (typeof anno.options.zoom === \"undefined\") {\n                    anno.options.zoom = 0;\n                  }\n                  line +=\n                    \" /XYZ \" +\n                    anno.options.left +\n                    \" \" +\n                    top +\n                    \" \" +\n                    anno.options.zoom +\n                    \"]\";\n                  break;\n              }\n            }\n\n            if (line != \"\") {\n              line += \" >>\";\n              this.internal.write(line);\n            }\n            break;\n        }\n      }\n      this.internal.write(\"]\");\n    }\n  ]);\n\n  /**\n   * @name createAnnotation\n   * @function\n   * @param {Object} options\n   */\n  jsPDFAPI.createAnnotation = function(options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    switch (options.type) {\n      case \"link\":\n        this.link(\n          options.bounds.x,\n          options.bounds.y,\n          options.bounds.w,\n          options.bounds.h,\n          options\n        );\n        break;\n      case \"text\":\n      case \"freetext\":\n        pageInfo.pageContext.annotations.push(options);\n        break;\n    }\n  };\n\n  /**\n   * Create a link\n   *\n   * valid options\n   * <li> pageNumber or url [required]\n   * <p>If pageNumber is specified, top and zoom may also be specified</p>\n   * @name link\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} w\n   * @param {number} h\n   * @param {Object} options\n   */\n  jsPDFAPI.link = function(x, y, w, h, options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    var getHorizontalCoordinateString = this.internal.getCoordinateString;\n    var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\n\n    pageInfo.pageContext.annotations.push({\n      finalBounds: {\n        x: getHorizontalCoordinateString(x),\n        y: getVerticalCoordinateString(y),\n        w: getHorizontalCoordinateString(x + w),\n        h: getVerticalCoordinateString(y + h)\n      },\n      options: options,\n      type: \"link\"\n    });\n  };\n\n  /**\n   * Currently only supports single line text.\n   * Returns the width of the text/link\n   *\n   * @name textWithLink\n   * @function\n   * @param {string} text\n   * @param {number} x\n   * @param {number} y\n   * @param {Object} options\n   * @returns {number} width the width of the text/link\n   */\n  jsPDFAPI.textWithLink = function(text, x, y, options) {\n    var totalLineWidth = this.getTextWidth(text);\n    var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;\n    var linkHeight, linkWidth;\n\n    // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line\n    if (options.maxWidth !== undefined) {\n      var { maxWidth } = options;\n      linkWidth = maxWidth;\n      var numOfLines = this.splitTextToSize(text, linkWidth).length;\n      linkHeight = Math.ceil(lineHeight * numOfLines);\n    } else {\n      linkWidth = totalLineWidth;\n      linkHeight = lineHeight;\n    }\n\n    this.text(text, x, y, options);\n\n    //TODO We really need the text baseline height to do this correctly.\n    // Or ability to draw text on top, bottom, center, or baseline.\n    y += lineHeight * 0.2;\n    //handle x position based on the align option\n    if (options.align === \"center\") {\n      x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width\n    }\n    if (options.align === \"right\") {\n      x = x - totalLineWidth;\n    }\n    this.link(x, y - lineHeight, linkWidth, linkHeight, options);\n    return totalLineWidth;\n  };\n\n  //TODO move into external library\n  /**\n   * @name getTextWidth\n   * @function\n   * @param {string} text\n   * @returns {number} txtWidth\n   */\n  jsPDFAPI.getTextWidth = function(text) {\n    var fontSize = this.internal.getFontSize();\n    var txtWidth =\n      (this.getStringUnitWidth(text) * fontSize) / this.internal.scaleFactor;\n    return txtWidth;\n  };\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF arabic parser PlugIn\n *\n * @name arabic\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Arabic shape substitutions: char code => (isolated, final, initial, medial).\n   * Arabic Substition A\n   */\n  var arabicSubstitionA = {\n    0x0621: [0xfe80], // ARABIC LETTER HAMZA\n    0x0622: [0xfe81, 0xfe82], // ARABIC LETTER ALEF WITH MADDA ABOVE\n    0x0623: [0xfe83, 0xfe84], // ARABIC LETTER ALEF WITH HAMZA ABOVE\n    0x0624: [0xfe85, 0xfe86], // ARABIC LETTER WAW WITH HAMZA ABOVE\n    0x0625: [0xfe87, 0xfe88], // ARABIC LETTER ALEF WITH HAMZA BELOW\n    0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c], // ARABIC LETTER YEH WITH HAMZA ABOVE\n    0x0627: [0xfe8d, 0xfe8e], // ARABIC LETTER ALEF\n    0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92], // ARABIC LETTER BEH\n    0x0629: [0xfe93, 0xfe94], // ARABIC LETTER TEH MARBUTA\n    0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98], // ARABIC LETTER TEH\n    0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c], // ARABIC LETTER THEH\n    0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0], // ARABIC LETTER JEEM\n    0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4], // ARABIC LETTER HAH\n    0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8], // ARABIC LETTER KHAH\n    0x062f: [0xfea9, 0xfeaa], // ARABIC LETTER DAL\n    0x0630: [0xfeab, 0xfeac], // ARABIC LETTER THAL\n    0x0631: [0xfead, 0xfeae], // ARABIC LETTER REH\n    0x0632: [0xfeaf, 0xfeb0], // ARABIC LETTER ZAIN\n    0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4], // ARABIC LETTER SEEN\n    0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8], // ARABIC LETTER SHEEN\n    0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc], // ARABIC LETTER SAD\n    0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0], // ARABIC LETTER DAD\n    0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4], // ARABIC LETTER TAH\n    0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8], // ARABIC LETTER ZAH\n    0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc], // ARABIC LETTER AIN\n    0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0], // ARABIC LETTER GHAIN\n    0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4], // ARABIC LETTER FEH\n    0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8], // ARABIC LETTER QAF\n    0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc], // ARABIC LETTER KAF\n    0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0], // ARABIC LETTER LAM\n    0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], // ARABIC LETTER MEEM\n    0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], // ARABIC LETTER NOON\n    0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], // ARABIC LETTER HEH\n    0x0648: [0xfeed, 0xfeee], // ARABIC LETTER WAW\n    0x0649: [0xfeef, 0xfef0, 64488, 64489], // ARABIC LETTER ALEF MAKSURA\n    0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], // ARABIC LETTER YEH\n    0x0671: [0xfb50, 0xfb51], // ARABIC LETTER ALEF WASLA\n    0x0677: [0xfbdd], // ARABIC LETTER U WITH HAMZA ABOVE\n    0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], // ARABIC LETTER TTEH\n    0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], // ARABIC LETTER TTEHEH\n    0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], // ARABIC LETTER BEEH\n    0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], // ARABIC LETTER PEH\n    0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], // ARABIC LETTER TEHEH\n    0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], // ARABIC LETTER BEHEH\n    0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], // ARABIC LETTER NYEH\n    0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], // ARABIC LETTER DYEH\n    0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], // ARABIC LETTER TCHEH\n    0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], // ARABIC LETTER TCHEHEH\n    0x0688: [0xfb88, 0xfb89], // ARABIC LETTER DDAL\n    0x068c: [0xfb84, 0xfb85], // ARABIC LETTER DAHAL\n    0x068d: [0xfb82, 0xfb83], // ARABIC LETTER DDAHAL\n    0x068e: [0xfb86, 0xfb87], // ARABIC LETTER DUL\n    0x0691: [0xfb8c, 0xfb8d], // ARABIC LETTER RREH\n    0x0698: [0xfb8a, 0xfb8b], // ARABIC LETTER JEH\n    0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], // ARABIC LETTER VEH\n    0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], // ARABIC LETTER PEHEH\n    0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], // ARABIC LETTER KEHEH\n    0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], // ARABIC LETTER NG\n    0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], // ARABIC LETTER GAF\n    0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d], // ARABIC LETTER NGOEH\n    0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99], // ARABIC LETTER GUEH\n    0x06ba: [0xfb9e, 0xfb9f], // ARABIC LETTER NOON GHUNNA\n    0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3], // ARABIC LETTER RNOON\n    0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad], // ARABIC LETTER HEH DOACHASHMEE\n    0x06c0: [0xfba4, 0xfba5], // ARABIC LETTER HEH WITH YEH ABOVE\n    0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9], // ARABIC LETTER HEH GOAL\n    0x06c5: [0xfbe0, 0xfbe1], // ARABIC LETTER KIRGHIZ OE\n    0x06c6: [0xfbd9, 0xfbda], // ARABIC LETTER OE\n    0x06c7: [0xfbd7, 0xfbd8], // ARABIC LETTER U\n    0x06c8: [0xfbdb, 0xfbdc], // ARABIC LETTER YU\n    0x06c9: [0xfbe2, 0xfbe3], // ARABIC LETTER KIRGHIZ YU\n    0x06cb: [0xfbde, 0xfbdf], // ARABIC LETTER VE\n    0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff], // ARABIC LETTER FARSI YEH\n    0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7], //ARABIC LETTER E\n    0x06d2: [0xfbae, 0xfbaf], // ARABIC LETTER YEH BARREE\n    0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE\n  };\n\n  /*\n    var ligaturesSubstitutionA = {\n        0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM\n    };\n    */\n\n  var ligatures = {\n    0xfedf: {\n      0xfe82: 0xfef5, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM\n      0xfe84: 0xfef7, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM\n      0xfe88: 0xfef9, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM\n      0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM\n    },\n    0xfee0: {\n      0xfe82: 0xfef6, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM\n      0xfe84: 0xfef8, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM\n      0xfe88: 0xfefa, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM\n      0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM\n    },\n    0xfe8d: { 0xfedf: { 0xfee0: { 0xfeea: 0xfdf2 } } }, // ALLAH\n    0x0651: {\n      0x064c: 0xfc5e, // Shadda + Dammatan\n      0x064d: 0xfc5f, // Shadda + Kasratan\n      0x064e: 0xfc60, // Shadda + Fatha\n      0x064f: 0xfc61, // Shadda + Damma\n      0x0650: 0xfc62 // Shadda + Kasra\n    }\n  };\n\n  var arabic_diacritics = {\n    1612: 64606, // Shadda + Dammatan\n    1613: 64607, // Shadda + Kasratan\n    1614: 64608, // Shadda + Fatha\n    1615: 64609, // Shadda + Damma\n    1616: 64610 // Shadda + Kasra\n  };\n\n  var alfletter = [1570, 1571, 1573, 1575];\n\n  var noChangeInForm = -1;\n  var isolatedForm = 0;\n  var finalForm = 1;\n  var initialForm = 2;\n  var medialForm = 3;\n\n  jsPDFAPI.__arabicParser__ = {};\n\n  //private\n  var isInArabicSubstitutionA = (jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function(\n    letter\n  ) {\n    return typeof arabicSubstitionA[letter.charCodeAt(0)] !== \"undefined\";\n  });\n\n  var isArabicLetter = (jsPDFAPI.__arabicParser__.isArabicLetter = function(\n    letter\n  ) {\n    return (\n      typeof letter === \"string\" &&\n      /^[\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF\\uFB50-\\uFDFF\\uFE70-\\uFEFF]+$/.test(\n        letter\n      )\n    );\n  });\n\n  var isArabicEndLetter = (jsPDFAPI.__arabicParser__.isArabicEndLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length <= 2\n    );\n  });\n\n  var isArabicAlfLetter = (jsPDFAPI.__arabicParser__.isArabicAlfLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 1\n    );\n  };\n\n  var arabicLetterHasFinalForm = (jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 2\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 3\n    );\n  };\n\n  var arabicLetterHasMedialForm = (jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length == 4\n    );\n  });\n\n  var resolveLigatures = (jsPDFAPI.__arabicParser__.resolveLigatures = function(\n    letters\n  ) {\n    var i = 0;\n    var tmpLigatures = ligatures;\n    var result = \"\";\n    var effectedLetters = 0;\n\n    for (i = 0; i < letters.length; i += 1) {\n      if (typeof tmpLigatures[letters.charCodeAt(i)] !== \"undefined\") {\n        effectedLetters++;\n        tmpLigatures = tmpLigatures[letters.charCodeAt(i)];\n\n        if (typeof tmpLigatures === \"number\") {\n          result += String.fromCharCode(tmpLigatures);\n          tmpLigatures = ligatures;\n          effectedLetters = 0;\n        }\n        if (i === letters.length - 1) {\n          tmpLigatures = ligatures;\n          result += letters.charAt(i - (effectedLetters - 1));\n          i = i - (effectedLetters - 1);\n          effectedLetters = 0;\n        }\n      } else {\n        tmpLigatures = ligatures;\n        result += letters.charAt(i - effectedLetters);\n        i = i - effectedLetters;\n        effectedLetters = 0;\n      }\n    }\n\n    return result;\n  });\n\n  jsPDFAPI.__arabicParser__.isArabicDiacritic = function(letter) {\n    return (\n      letter !== undefined &&\n      arabic_diacritics[letter.charCodeAt(0)] !== undefined\n    );\n  };\n\n  var getCorrectForm = (jsPDFAPI.__arabicParser__.getCorrectForm = function(\n    currentChar,\n    beforeChar,\n    nextChar\n  ) {\n    if (!isArabicLetter(currentChar)) {\n      return -1;\n    }\n\n    if (isInArabicSubstitutionA(currentChar) === false) {\n      return noChangeInForm;\n    }\n    if (\n      !arabicLetterHasFinalForm(currentChar) ||\n      (!isArabicLetter(beforeChar) && !isArabicLetter(nextChar)) ||\n      (!isArabicLetter(nextChar) && isArabicEndLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar))\n    ) {\n      return isolatedForm;\n    }\n\n    if (\n      arabicLetterHasMedialForm(currentChar) &&\n      isArabicLetter(beforeChar) &&\n      !isArabicEndLetter(beforeChar) &&\n      isArabicLetter(nextChar) &&\n      arabicLetterHasFinalForm(nextChar)\n    ) {\n      return medialForm;\n    }\n\n    if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {\n      return finalForm;\n    }\n    return initialForm;\n  });\n\n  /**\n   * @name processArabic\n   * @function\n   * @param {string} text\n   * @returns {string}\n   */\n  var parseArabic = function(text) {\n    text = text || \"\";\n\n    var result = \"\";\n    var i = 0;\n    var j = 0;\n    var position = 0;\n    var currentLetter = \"\";\n    var prevLetter = \"\";\n    var nextLetter = \"\";\n\n    var words = text.split(\"\\\\s+\");\n    var newWords = [];\n    for (i = 0; i < words.length; i += 1) {\n      newWords.push(\"\");\n      for (j = 0; j < words[i].length; j += 1) {\n        currentLetter = words[i][j];\n        prevLetter = words[i][j - 1];\n        nextLetter = words[i][j + 1];\n        if (isArabicLetter(currentLetter)) {\n          position = getCorrectForm(currentLetter, prevLetter, nextLetter);\n          if (position !== -1) {\n            newWords[i] += String.fromCharCode(\n              arabicSubstitionA[currentLetter.charCodeAt(0)][position]\n            );\n          } else {\n            newWords[i] += currentLetter;\n          }\n        } else {\n          newWords[i] += currentLetter;\n        }\n      }\n\n      newWords[i] = resolveLigatures(newWords[i]);\n    }\n    result = newWords.join(\" \");\n\n    return result;\n  };\n\n  var processArabic = (jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function() {\n    var text =\n      typeof arguments[0] === \"string\" ? arguments[0] : arguments[0].text;\n    var tmpText = [];\n    var result;\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);\n        } else {\n          tmpText.push([parseArabic(text[i])]);\n        }\n      }\n      result = tmpText;\n    } else {\n      result = parseArabic(text);\n    }\n    if (typeof arguments[0] === \"string\") {\n      return result;\n    } else {\n      arguments[0].text = result;\n      return arguments[0];\n    }\n  });\n\n  jsPDFAPI.events.push([\"preProcessText\", processArabic]);\n})(jsPDF.API);\n","/** @license\n * jsPDF Autoprint Plugin\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name autoprint\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.\n   *\n   * @name autoPrint\n   * @function\n   * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF();\n   * doc.text(10, 10, 'This is a test');\n   * doc.autoPrint({variant: 'non-conform'});\n   * doc.save('autoprint.pdf');\n   */\n  jsPDFAPI.autoPrint = function(options) {\n    \"use strict\";\n    var refAutoPrintTag;\n    options = options || {};\n    options.variant = options.variant || \"non-conform\";\n\n    switch (options.variant) {\n      case \"javascript\":\n        //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb\n        this.addJS(\"print({});\");\n        break;\n      case \"non-conform\":\n      default:\n        this.internal.events.subscribe(\"postPutResources\", function() {\n          refAutoPrintTag = this.internal.newObject();\n          this.internal.out(\"<<\");\n          this.internal.out(\"/S /Named\");\n          this.internal.out(\"/Type /Action\");\n          this.internal.out(\"/N /Print\");\n          this.internal.out(\">>\");\n          this.internal.out(\"endobj\");\n        });\n\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.out(\"/OpenAction \" + refAutoPrintTag + \" 0 R\");\n        });\n        break;\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Canvas PlugIn\n * This plugin mimics the HTML5 Canvas\n *\n * The goal is to provide a way for current canvas users to print directly to a PDF.\n * @name canvas\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @class Canvas\n   * @classdesc A Canvas Wrapper for jsPDF\n   */\n  var Canvas = function() {\n    var jsPdfInstance = undefined;\n    Object.defineProperty(this, \"pdf\", {\n      get: function() {\n        return jsPdfInstance;\n      },\n      set: function(value) {\n        jsPdfInstance = value;\n      }\n    });\n\n    var _width = 150;\n    /**\n     * The height property is a positive integer reflecting the height HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.\n     * This is one of the two properties, the other being width, that controls the size of the canvas.\n     *\n     * @name width\n     */\n    Object.defineProperty(this, \"width\", {\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _width = 150;\n        } else {\n          _width = value;\n        }\n        if (this.getContext(\"2d\").pageWrapXEnabled) {\n          this.getContext(\"2d\").pageWrapX = _width + 1;\n        }\n      }\n    });\n\n    var _height = 300;\n    /**\n     * The width property is a positive integer reflecting the width HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.\n     * This is one of the two properties, the other being height, that controls the size of the canvas.\n     *\n     * @name height\n     */\n    Object.defineProperty(this, \"height\", {\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _height = 300;\n        } else {\n          _height = value;\n        }\n        if (this.getContext(\"2d\").pageWrapYEnabled) {\n          this.getContext(\"2d\").pageWrapY = _height + 1;\n        }\n      }\n    });\n\n    var _childNodes = [];\n    Object.defineProperty(this, \"childNodes\", {\n      get: function() {\n        return _childNodes;\n      },\n      set: function(value) {\n        _childNodes = value;\n      }\n    });\n\n    var _style = {};\n    Object.defineProperty(this, \"style\", {\n      get: function() {\n        return _style;\n      },\n      set: function(value) {\n        _style = value;\n      }\n    });\n\n    Object.defineProperty(this, \"parentNode\", {});\n  };\n\n  /**\n   * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\n   *\n   * @name getContext\n   * @function\n   * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is \"2d\", leading to the creation of a Context2D object representing a two-dimensional rendering context.\n   * @param {object} contextAttributes\n   */\n  Canvas.prototype.getContext = function(contextType, contextAttributes) {\n    contextType = contextType || \"2d\";\n    var key;\n\n    if (contextType !== \"2d\") {\n      return null;\n    }\n    for (key in contextAttributes) {\n      if (this.pdf.context2d.hasOwnProperty(key)) {\n        this.pdf.context2d[key] = contextAttributes[key];\n      }\n    }\n    this.pdf.context2d._canvas = this;\n    return this.pdf.context2d;\n  };\n\n  /**\n   * The toDataURL() method is just a stub to throw an error if accidently called.\n   *\n   * @name toDataURL\n   * @function\n   */\n  Canvas.prototype.toDataURL = function() {\n    throw new Error(\"toDataURL is not implemented.\");\n  };\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      this.canvas = new Canvas();\n      this.canvas.pdf = this;\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *               2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *               2013 Lee Driscoll, https://github.com/lsdriscoll\n *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n *               2014 James Hall, james@parall.ax\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name cell\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var NO_MARGINS = { left: 0, top: 0, bottom: 0, right: 0 };\n\n  var px2pt = (0.264583 * 72) / 25.4;\n  var printingHeaderRow = false;\n\n  var _initialize = function() {\n    if (typeof this.internal.__cell__ === \"undefined\") {\n      this.internal.__cell__ = {};\n      this.internal.__cell__.padding = 3;\n      this.internal.__cell__.headerFunction = undefined;\n      this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);\n      this.internal.__cell__.margins.width = this.getPageWidth();\n      _reset.call(this);\n    }\n  };\n\n  var _reset = function() {\n    this.internal.__cell__.lastCell = new Cell();\n    this.internal.__cell__.pages = 1;\n  };\n\n  var Cell = function() {\n    var _x = arguments[0];\n    Object.defineProperty(this, \"x\", {\n      enumerable: true,\n      get: function() {\n        return _x;\n      },\n      set: function(value) {\n        _x = value;\n      }\n    });\n    var _y = arguments[1];\n    Object.defineProperty(this, \"y\", {\n      enumerable: true,\n      get: function() {\n        return _y;\n      },\n      set: function(value) {\n        _y = value;\n      }\n    });\n    var _width = arguments[2];\n    Object.defineProperty(this, \"width\", {\n      enumerable: true,\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        _width = value;\n      }\n    });\n    var _height = arguments[3];\n    Object.defineProperty(this, \"height\", {\n      enumerable: true,\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        _height = value;\n      }\n    });\n    var _text = arguments[4];\n    Object.defineProperty(this, \"text\", {\n      enumerable: true,\n      get: function() {\n        return _text;\n      },\n      set: function(value) {\n        _text = value;\n      }\n    });\n    var _lineNumber = arguments[5];\n    Object.defineProperty(this, \"lineNumber\", {\n      enumerable: true,\n      get: function() {\n        return _lineNumber;\n      },\n      set: function(value) {\n        _lineNumber = value;\n      }\n    });\n    var _align = arguments[6];\n    Object.defineProperty(this, \"align\", {\n      enumerable: true,\n      get: function() {\n        return _align;\n      },\n      set: function(value) {\n        _align = value;\n      }\n    });\n\n    return this;\n  };\n\n  Cell.prototype.clone = function() {\n    return new Cell(\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    );\n  };\n\n  Cell.prototype.toArray = function() {\n    return [\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    ];\n  };\n\n  /**\n   * @name setHeaderFunction\n   * @function\n   * @param {function} func\n   */\n  jsPDFAPI.setHeaderFunction = function(func) {\n    _initialize.call(this);\n    this.internal.__cell__.headerFunction =\n      typeof func === \"function\" ? func : undefined;\n    return this;\n  };\n\n  /**\n   * @name getTextDimensions\n   * @function\n   * @param {string} txt\n   * @returns {Object} dimensions\n   */\n  jsPDFAPI.getTextDimensions = function(text, options) {\n    _initialize.call(this);\n    options = options || {};\n    var fontSize = options.fontSize || this.getFontSize();\n    var font = options.font || this.getFont();\n    var scaleFactor = options.scaleFactor || this.internal.scaleFactor;\n    var width = 0;\n    var amountOfLines = 0;\n    var height = 0;\n    var tempWidth = 0;\n    var scope = this;\n\n    if (!Array.isArray(text) && typeof text !== \"string\") {\n      if (typeof text === \"number\") {\n        text = String(text);\n      } else {\n        throw new Error(\n          \"getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.\"\n        );\n      }\n    }\n\n    const maxWidth = options.maxWidth;\n    if (maxWidth > 0) {\n      if (typeof text === \"string\") {\n        text = this.splitTextToSize(text, maxWidth);\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\n        text = text.reduce(function(acc, textLine) {\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\n        }, []);\n      }\n    } else {\n      // Without the else clause, it will not work if you do not pass along maxWidth\n      text = Array.isArray(text) ? text : [text];\n    }\n\n    for (var i = 0; i < text.length; i++) {\n      tempWidth = this.getStringUnitWidth(text[i], { font: font }) * fontSize;\n      if (width < tempWidth) {\n        width = tempWidth;\n      }\n    }\n\n    if (width !== 0) {\n      amountOfLines = text.length;\n    }\n\n    width = width / scaleFactor;\n    height = Math.max(\n      (amountOfLines * fontSize * this.getLineHeightFactor() -\n        fontSize * (this.getLineHeightFactor() - 1)) /\n        scaleFactor,\n      0\n    );\n    return { w: width, h: height };\n  };\n\n  /**\n   * @name cellAddPage\n   * @function\n   */\n  jsPDFAPI.cellAddPage = function() {\n    _initialize.call(this);\n\n    this.addPage();\n\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    this.internal.__cell__.lastCell = new Cell(\n      margins.left,\n      margins.top,\n      undefined,\n      undefined\n    );\n    this.internal.__cell__.pages += 1;\n\n    return this;\n  };\n\n  /**\n   * @name cell\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} width\n   * @param {number} height\n   * @param {string} text\n   * @param {number} lineNumber lineNumber\n   * @param {string} align\n   * @return {jsPDF} jsPDF-instance\n   */\n  var cell = (jsPDFAPI.cell = function() {\n    var currentCell;\n\n    if (arguments[0] instanceof Cell) {\n      currentCell = arguments[0];\n    } else {\n      currentCell = new Cell(\n        arguments[0],\n        arguments[1],\n        arguments[2],\n        arguments[3],\n        arguments[4],\n        arguments[5]\n      );\n    }\n    _initialize.call(this);\n    var lastCell = this.internal.__cell__.lastCell;\n    var padding = this.internal.__cell__.padding;\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    var tableHeaderRow = this.internal.__cell__.tableHeaderRow;\n    var printHeaders = this.internal.__cell__.printHeaders;\n    // If this is not the first cell, we must change its position\n    if (typeof lastCell.lineNumber !== \"undefined\") {\n      if (lastCell.lineNumber === currentCell.lineNumber) {\n        //Same line\n        currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);\n        currentCell.y = lastCell.y || 0;\n      } else {\n        //New line\n        if (\n          lastCell.y + lastCell.height + currentCell.height + margins.bottom >\n          this.getPageHeight()\n        ) {\n          this.cellAddPage();\n          currentCell.y = margins.top;\n          if (printHeaders && tableHeaderRow) {\n            this.printHeaderRow(currentCell.lineNumber, true);\n            currentCell.y += tableHeaderRow[0].height;\n          }\n        } else {\n          currentCell.y = lastCell.y + lastCell.height || currentCell.y;\n        }\n      }\n    }\n\n    if (typeof currentCell.text[0] !== \"undefined\") {\n      this.rect(\n        currentCell.x,\n        currentCell.y,\n        currentCell.width,\n        currentCell.height,\n        printingHeaderRow === true ? \"FD\" : undefined\n      );\n      if (currentCell.align === \"right\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width - padding,\n          currentCell.y + padding,\n          { align: \"right\", baseline: \"top\" }\n        );\n      } else if (currentCell.align === \"center\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width / 2,\n          currentCell.y + padding,\n          {\n            align: \"center\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      } else {\n        this.text(\n          currentCell.text,\n          currentCell.x + padding,\n          currentCell.y + padding,\n          {\n            align: \"left\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      }\n    }\n    this.internal.__cell__.lastCell = currentCell;\n    return this;\n  });\n\n  /**\n     * Create a table from a set of data.\n     * @name table\n     * @function\n     * @param {Integer} [x] : left-position for top-left corner of table\n     * @param {Integer} [y] top-position for top-left corner of table\n     * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.\n     * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost\n\n     * @param {Object} [config.printHeaders] True to print column headers at the top of every page\n     * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value\n     * @param {Object} [config.margins] margin values for left, top, bottom, and width\n     * @param {Object} [config.fontSize] Integer fontSize to use (optional)\n     * @param {Object} [config.padding] cell-padding in pt to use (optional)\n     * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)\n     * @param {Object} [config.headerTextColor] default is #000 (optional)\n     * @param {Object} [config.rowStart] callback to handle before print each row (optional)\n     * @param {Object} [config.cellStart] callback to handle before print each cell (optional)\n     * @returns {jsPDF} jsPDF-instance\n     */\n\n  jsPDFAPI.table = function(x, y, data, headers, config) {\n    _initialize.call(this);\n    if (!data) {\n      throw new Error(\"No data for PDF table.\");\n    }\n\n    config = config || {};\n\n    var headerNames = [],\n      headerLabels = [],\n      headerAligns = [],\n      i,\n      columnMatrix = {},\n      columnWidths = {},\n      column,\n      columnMinWidths = [],\n      j,\n      tableHeaderConfigs = [],\n      //set up defaults. If a value is provided in config, defaults will be overwritten:\n      autoSize = config.autoSize || false,\n      printHeaders = config.printHeaders === false ? false : true,\n      fontSize =\n        config.css && typeof config.css[\"font-size\"] !== \"undefined\"\n          ? config.css[\"font-size\"] * 16\n          : config.fontSize || 12,\n      margins =\n        config.margins ||\n        Object.assign({ width: this.getPageWidth() }, NO_MARGINS),\n      padding = typeof config.padding === \"number\" ? config.padding : 3,\n      headerBackgroundColor = config.headerBackgroundColor || \"#c8c8c8\",\n      headerTextColor = config.headerTextColor || \"#000\";\n\n    _reset.call(this);\n\n    this.internal.__cell__.printHeaders = printHeaders;\n    this.internal.__cell__.margins = margins;\n    this.internal.__cell__.table_font_size = fontSize;\n    this.internal.__cell__.padding = padding;\n    this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;\n    this.internal.__cell__.headerTextColor = headerTextColor;\n    this.setFontSize(fontSize);\n\n    // Set header values\n    if (headers === undefined || headers === null) {\n      // No headers defined so we derive from data\n      headerNames = Object.keys(data[0]);\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    } else if (Array.isArray(headers) && typeof headers[0] === \"object\") {\n      headerNames = headers.map(function(header) {\n        return header.name;\n      });\n      headerLabels = headers.map(function(header) {\n        return header.prompt || header.name || \"\";\n      });\n      headerAligns = headers.map(function(header) {\n        return header.align || \"left\";\n      });\n      // Split header configs into names and prompts\n      for (i = 0; i < headers.length; i += 1) {\n        columnWidths[headers[i].name] = headers[i].width * px2pt;\n      }\n    } else if (Array.isArray(headers) && typeof headers[0] === \"string\") {\n      headerNames = headers;\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    }\n\n    if (\n      autoSize ||\n      (Array.isArray(headers) && typeof headers[0] === \"string\")\n    ) {\n      var headerName;\n      for (i = 0; i < headerNames.length; i += 1) {\n        headerName = headerNames[i];\n\n        // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}\n\n        columnMatrix[headerName] = data.map(function(rec) {\n          return rec[headerName];\n        });\n\n        // get header width\n        this.setFont(undefined, \"bold\");\n        columnMinWidths.push(\n          this.getTextDimensions(headerLabels[i], {\n            fontSize: this.internal.__cell__.table_font_size,\n            scaleFactor: this.internal.scaleFactor\n          }).w\n        );\n        column = columnMatrix[headerName];\n\n        // get cell widths\n        this.setFont(undefined, \"normal\");\n        for (j = 0; j < column.length; j += 1) {\n          columnMinWidths.push(\n            this.getTextDimensions(column[j], {\n              fontSize: this.internal.__cell__.table_font_size,\n              scaleFactor: this.internal.scaleFactor\n            }).w\n          );\n        }\n\n        // get final column width\n        columnWidths[headerName] =\n          Math.max.apply(null, columnMinWidths) + padding + padding;\n\n        //have to reset\n        columnMinWidths = [];\n      }\n    }\n\n    // -- Construct the table\n\n    if (printHeaders) {\n      var row = {};\n      for (i = 0; i < headerNames.length; i += 1) {\n        row[headerNames[i]] = {};\n        row[headerNames[i]].text = headerLabels[i];\n        row[headerNames[i]].align = headerAligns[i];\n      }\n\n      var rowHeight = calculateLineHeight.call(this, row, columnWidths);\n\n      // Construct the header row\n      tableHeaderConfigs = headerNames.map(function(value) {\n        return new Cell(\n          x,\n          y,\n          columnWidths[value],\n          rowHeight,\n          row[value].text,\n          undefined,\n          row[value].align\n        );\n      });\n\n      // Store the table header config\n      this.setTableHeaderRow(tableHeaderConfigs);\n\n      // Print the header for the start of the table\n      this.printHeaderRow(1, false);\n    }\n\n    // Construct the data rows\n\n    var align = headers.reduce(function(pv, cv) {\n      pv[cv.name] = cv.align;\n      return pv;\n    }, {});\n    for (i = 0; i < data.length; i += 1) {\n      if (\"rowStart\" in config && config.rowStart instanceof Function) {\n        config.rowStart(\n          {\n            row: i,\n            data: data[i]\n          },\n          this\n        );\n      }\n      var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);\n\n      for (j = 0; j < headerNames.length; j += 1) {\n        var cellData = data[i][headerNames[j]];\n        if (\"cellStart\" in config && config.cellStart instanceof Function) {\n          config.cellStart(\n            {\n              row: i,\n              col: j,\n              data: cellData\n            },\n            this\n          );\n        }\n        cell.call(\n          this,\n          new Cell(\n            x,\n            y,\n            columnWidths[headerNames[j]],\n            lineHeight,\n            cellData,\n            i + 2,\n            align[headerNames[j]]\n          )\n        );\n      }\n    }\n    this.internal.__cell__.table_x = x;\n    this.internal.__cell__.table_y = y;\n    return this;\n  };\n\n  /**\n   * Calculate the height for containing the highest column\n   *\n   * @name calculateLineHeight\n   * @function\n   * @param {Object[]} model is the line of data we want to calculate the height of\n   * @param {Integer[]} columnWidths is size of each column\n   * @returns {number} lineHeight\n   * @private\n   */\n  var calculateLineHeight = function calculateLineHeight(model, columnWidths) {\n    var padding = this.internal.__cell__.padding;\n    var fontSize = this.internal.__cell__.table_font_size;\n    var scaleFactor = this.internal.scaleFactor;\n\n    return Object.keys(model)\n      .map(function(key) {\n        var value = model[key];\n        return this.splitTextToSize(\n          value.hasOwnProperty(\"text\") ? value.text : value,\n          columnWidths[key] - padding - padding\n        );\n      }, this)\n      .map(function(value) {\n        return (\n          (this.getLineHeightFactor() * value.length * fontSize) / scaleFactor +\n          padding +\n          padding\n        );\n      }, this)\n      .reduce(function(pv, cv) {\n        return Math.max(pv, cv);\n      }, 0);\n  };\n\n  /**\n   * Store the config for outputting a table header\n   *\n   * @name setTableHeaderRow\n   * @function\n   * @param {Object[]} config\n   * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell\n   * except the lineNumber parameter is excluded\n   */\n  jsPDFAPI.setTableHeaderRow = function(config) {\n    _initialize.call(this);\n    this.internal.__cell__.tableHeaderRow = config;\n  };\n\n  /**\n   * Output the store header row\n   *\n   * @name printHeaderRow\n   * @function\n   * @param {number} lineNumber The line number to output the header at\n   * @param {boolean} new_page\n   */\n  jsPDFAPI.printHeaderRow = function(lineNumber, new_page) {\n    _initialize.call(this);\n    if (!this.internal.__cell__.tableHeaderRow) {\n      throw new Error(\"Property tableHeaderRow does not exist.\");\n    }\n\n    var tableHeaderCell;\n\n    printingHeaderRow = true;\n    if (typeof this.internal.__cell__.headerFunction === \"function\") {\n      var position = this.internal.__cell__.headerFunction(\n        this,\n        this.internal.__cell__.pages\n      );\n      this.internal.__cell__.lastCell = new Cell(\n        position[0],\n        position[1],\n        position[2],\n        position[3],\n        undefined,\n        -1\n      );\n    }\n    this.setFont(undefined, \"bold\");\n\n    var tempHeaderConf = [];\n    for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {\n      tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();\n      if (new_page) {\n        tableHeaderCell.y = this.internal.__cell__.margins.top || 0;\n        tempHeaderConf.push(tableHeaderCell);\n      }\n      tableHeaderCell.lineNumber = lineNumber;\n      var currentTextColor = this.getTextColor();\n      this.setTextColor(this.internal.__cell__.headerTextColor);\n      this.setFillColor(this.internal.__cell__.headerBackgroundColor);\n      cell.call(this, tableHeaderCell);\n      this.setTextColor(currentTextColor);\n    }\n    if (tempHeaderConf.length > 0) {\n      this.setTableHeaderRow(tempHeaderConf);\n    }\n    this.setFont(undefined, \"normal\");\n    printingHeaderRow = false;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF JavaScript plugin\n *\n * @name javascript\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  var jsNamesObj, jsJsObj, text;\n  /**\n   * @name addJS\n   * @function\n   * @param {string} javascript The javascript to be embedded into the PDF-file.\n   * @returns {jsPDF}\n   */\n  jsPDFAPI.addJS = function(javascript) {\n    text = javascript;\n    this.internal.events.subscribe(\"postPutResources\", function() {\n      jsNamesObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/Names [(EmbeddedJS) \" + (jsNamesObj + 1) + \" 0 R]\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n\n      jsJsObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/S /JavaScript\");\n      this.internal.out(\"/JS (\" + text + \")\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n    });\n    this.internal.events.subscribe(\"putCatalog\", function() {\n      if (jsNamesObj !== undefined && jsJsObj !== undefined) {\n        this.internal.out(\"/Names <</JavaScript \" + jsNamesObj + \" 0 R>>\");\n      }\n    });\n    return this;\n  };\n})(jsPDF.API);\n","/* eslint-disable no-fallthrough */\r\n/* eslint-disable no-console */\r\n/**\r\n * @license\r\n * jsPDF Context2D PlugIn Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\r\n *\r\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\r\n */\r\n\r\nimport { jsPDF } from \"../jspdf.js\";\r\nimport { RGBColor } from \"../libs/rgbcolor.js\";\r\nimport { console } from \"../libs/console.js\";\r\nimport {\r\n  buildFontFaceMap,\r\n  parseFontFamily,\r\n  resolveFontFace\r\n} from \"../libs/fontFace.js\";\r\n\r\n/**\r\n * This plugin mimics the HTML5 CanvasRenderingContext2D.\r\n *\r\n * The goal is to provide a way for current canvas implementations to print directly to a PDF.\r\n *\r\n * @name context2d\r\n * @module\r\n */\r\n(function(jsPDFAPI) {\r\n  \"use strict\";\r\n  var ContextLayer = function(ctx) {\r\n    ctx = ctx || {};\r\n    this.isStrokeTransparent = ctx.isStrokeTransparent || false;\r\n    this.strokeOpacity = ctx.strokeOpacity || 1;\r\n    this.strokeStyle = ctx.strokeStyle || \"#000000\";\r\n    this.fillStyle = ctx.fillStyle || \"#000000\";\r\n    this.isFillTransparent = ctx.isFillTransparent || false;\r\n    this.fillOpacity = ctx.fillOpacity || 1;\r\n    this.font = ctx.font || \"10px sans-serif\";\r\n    this.textBaseline = ctx.textBaseline || \"alphabetic\";\r\n    this.textAlign = ctx.textAlign || \"left\";\r\n    this.lineWidth = ctx.lineWidth || 1;\r\n    this.lineJoin = ctx.lineJoin || \"miter\";\r\n    this.lineCap = ctx.lineCap || \"butt\";\r\n    this.path = ctx.path || [];\r\n    this.transform =\r\n      typeof ctx.transform !== \"undefined\"\r\n        ? ctx.transform.clone()\r\n        : new Matrix();\r\n    this.globalCompositeOperation = ctx.globalCompositeOperation || \"normal\";\r\n    this.globalAlpha = ctx.globalAlpha || 1.0;\r\n    this.clip_path = ctx.clip_path || [];\r\n    this.currentPoint = ctx.currentPoint || new Point();\r\n    this.miterLimit = ctx.miterLimit || 10.0;\r\n    this.lastPoint = ctx.lastPoint || new Point();\r\n    this.lineDashOffset = ctx.lineDashOffset || 0.0;\r\n    this.lineDash = ctx.lineDash || [];\r\n    this.margin = ctx.margin || [0, 0, 0, 0];\r\n    this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;\r\n\r\n    this.ignoreClearRect =\r\n      typeof ctx.ignoreClearRect === \"boolean\" ? ctx.ignoreClearRect : true;\r\n    return this;\r\n  };\r\n\r\n  //stub\r\n  var f2,\r\n    getHorizontalCoordinateString,\r\n    getVerticalCoordinateString,\r\n    getHorizontalCoordinate,\r\n    getVerticalCoordinate,\r\n    Point,\r\n    Rectangle,\r\n    Matrix,\r\n    _ctx;\r\n  jsPDFAPI.events.push([\r\n    \"initialized\",\r\n    function() {\r\n      this.context2d = new Context2D(this);\r\n\r\n      f2 = this.internal.f2;\r\n      getHorizontalCoordinateString = this.internal.getCoordinateString;\r\n      getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\r\n      getHorizontalCoordinate = this.internal.getHorizontalCoordinate;\r\n      getVerticalCoordinate = this.internal.getVerticalCoordinate;\r\n      Point = this.internal.Point;\r\n      Rectangle = this.internal.Rectangle;\r\n      Matrix = this.internal.Matrix;\r\n      _ctx = new ContextLayer();\r\n    }\r\n  ]);\r\n\r\n  var Context2D = function(pdf) {\r\n    Object.defineProperty(this, \"canvas\", {\r\n      get: function() {\r\n        return { parentNode: false, style: false };\r\n      }\r\n    });\r\n\r\n    var _pdf = pdf;\r\n    Object.defineProperty(this, \"pdf\", {\r\n      get: function() {\r\n        return _pdf;\r\n      }\r\n    });\r\n\r\n    var _pageWrapXEnabled = false;\r\n    /**\r\n     * @name pageWrapXEnabled\r\n     * @type {boolean}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"pageWrapXEnabled\", {\r\n      get: function() {\r\n        return _pageWrapXEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapXEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _pageWrapYEnabled = false;\r\n    /**\r\n     * @name pageWrapYEnabled\r\n     * @type {boolean}\r\n     * @default true\r\n     */\r\n    Object.defineProperty(this, \"pageWrapYEnabled\", {\r\n      get: function() {\r\n        return _pageWrapYEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapYEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _posX = 0;\r\n    /**\r\n     * @name posX\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posX\", {\r\n      get: function() {\r\n        return _posX;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posX = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _posY = 0;\r\n    /**\r\n     * @name posY\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posY\", {\r\n      get: function() {\r\n        return _posY;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posY = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.\r\n     * @name margin\r\n     * @type {number|number[]}\r\n     * @default [0, 0, 0, 0]\r\n     */\r\n    Object.defineProperty(this, \"margin\", {\r\n      get: function() {\r\n        return _ctx.margin;\r\n      },\r\n      set: function(value) {\r\n        var margin;\r\n        if (typeof value === \"number\") {\r\n          margin = [value, value, value, value];\r\n        } else {\r\n          margin = new Array(4);\r\n          margin[0] = value[0];\r\n          margin[1] = value.length >= 2 ? value[1] : margin[0];\r\n          margin[2] = value.length >= 3 ? value[2] : margin[0];\r\n          margin[3] = value.length >= 4 ? value[3] : margin[1];\r\n        }\r\n        _ctx.margin = margin;\r\n      }\r\n    });\r\n\r\n    var _autoPaging = false;\r\n    /**\r\n     * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the\r\n     * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new\r\n     * pages if required.\r\n     *\r\n     * Context2d supports different modes:\r\n     * <ul>\r\n     * <li>\r\n     *   <code>false</code>: Auto paging is disabled.\r\n     * </li>\r\n     * <li>\r\n     *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\r\n     *   slice text in half, making it difficult to read.\r\n     * </li>\r\n     * <li>\r\n     *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\r\n     *   mostly of a single column of text.\r\n     * </li>\r\n     * </ul>\r\n     * @name Context2D#autoPaging\r\n     * @type {boolean|\"slice\"|\"text\"}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"autoPaging\", {\r\n      get: function() {\r\n        return _autoPaging;\r\n      },\r\n      set: function(value) {\r\n        _autoPaging = value;\r\n      }\r\n    });\r\n\r\n    var lastBreak = 0;\r\n    /**\r\n     * @name lastBreak\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"lastBreak\", {\r\n      get: function() {\r\n        return lastBreak;\r\n      },\r\n      set: function(value) {\r\n        lastBreak = value;\r\n      }\r\n    });\r\n\r\n    var pageBreaks = [];\r\n    /**\r\n     * Y Position of page breaks.\r\n     * @name pageBreaks\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"pageBreaks\", {\r\n      get: function() {\r\n        return pageBreaks;\r\n      },\r\n      set: function(value) {\r\n        pageBreaks = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctx\r\n     * @type {object}\r\n     * @default {}\r\n     */\r\n    Object.defineProperty(this, \"ctx\", {\r\n      get: function() {\r\n        return _ctx;\r\n      },\r\n      set: function(value) {\r\n        if (value instanceof ContextLayer) {\r\n          _ctx = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name path\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    Object.defineProperty(this, \"path\", {\r\n      get: function() {\r\n        return _ctx.path;\r\n      },\r\n      set: function(value) {\r\n        _ctx.path = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctxStack\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    var _ctxStack = [];\r\n    Object.defineProperty(this, \"ctxStack\", {\r\n      get: function() {\r\n        return _ctxStack;\r\n      },\r\n      set: function(value) {\r\n        _ctxStack = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used to fill the drawing\r\n     *\r\n     * @name fillStyle\r\n     * @default #000000\r\n     * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />\r\n     * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />\r\n     * A pattern object to use to fill the drawing (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"fillStyle\", {\r\n      get: function() {\r\n        return this.ctx.fillStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba;\r\n        rgba = getRGBA(value);\r\n\r\n        this.ctx.fillStyle = rgba.style;\r\n        this.ctx.isFillTransparent = rgba.a === 0;\r\n        this.ctx.fillOpacity = rgba.a;\r\n\r\n        this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n        this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used for strokes\r\n     *\r\n     * @name strokeStyle\r\n     * @default #000000\r\n     * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)\r\n     * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)\r\n     * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"strokeStyle\", {\r\n      get: function() {\r\n        return this.ctx.strokeStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba = getRGBA(value);\r\n\r\n        this.ctx.strokeStyle = rgba.style;\r\n        this.ctx.isStrokeTransparent = rgba.a === 0;\r\n        this.ctx.strokeOpacity = rgba.a;\r\n\r\n        if (rgba.a === 0) {\r\n          this.pdf.setDrawColor(255, 255, 255);\r\n        } else if (rgba.a === 1) {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        } else {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the style of the end caps for a line\r\n     *\r\n     * @name lineCap\r\n     * @default butt\r\n     * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line <br/>\r\n     * round A rounded end cap is added to each end of the line<br/>\r\n     * square A square end cap is added to each end of the line<br/>\r\n     */\r\n    Object.defineProperty(this, \"lineCap\", {\r\n      get: function() {\r\n        return this.ctx.lineCap;\r\n      },\r\n      set: function(value) {\r\n        if ([\"butt\", \"round\", \"square\"].indexOf(value) !== -1) {\r\n          this.ctx.lineCap = value;\r\n          this.pdf.setLineCap(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the current line width\r\n     *\r\n     * @name lineWidth\r\n     * @default 1\r\n     * @property {number} lineWidth The current line width, in pixels\r\n     */\r\n    Object.defineProperty(this, \"lineWidth\", {\r\n      get: function() {\r\n        return this.ctx.lineWidth;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.lineWidth = value;\r\n          this.pdf.setLineWidth(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the type of corner created, when two lines meet\r\n     */\r\n    Object.defineProperty(this, \"lineJoin\", {\r\n      get: function() {\r\n        return this.ctx.lineJoin;\r\n      },\r\n      set: function(value) {\r\n        if ([\"bevel\", \"round\", \"miter\"].indexOf(value) !== -1) {\r\n          this.ctx.lineJoin = value;\r\n          this.pdf.setLineJoin(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.\r\n     *\r\n     * @name miterLimit\r\n     * @default 10\r\n     */\r\n    Object.defineProperty(this, \"miterLimit\", {\r\n      get: function() {\r\n        return this.ctx.miterLimit;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.miterLimit = value;\r\n          this.pdf.setMiterLimit(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textBaseline\", {\r\n      get: function() {\r\n        return this.ctx.textBaseline;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.textBaseline = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textAlign\", {\r\n      get: function() {\r\n        return this.ctx.textAlign;\r\n      },\r\n      set: function(value) {\r\n        if ([\"right\", \"end\", \"center\", \"left\", \"start\"].indexOf(value) !== -1) {\r\n          this.ctx.textAlign = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _fontFaceMap = null;\r\n\r\n    function getFontFaceMap(pdf, fontFaces) {\r\n      if (_fontFaceMap === null) {\r\n        var fontMap = pdf.getFontList();\r\n\r\n        var convertedFontFaces = convertToFontFaces(fontMap);\r\n\r\n        _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));\r\n      }\r\n\r\n      return _fontFaceMap;\r\n    }\r\n\r\n    function convertToFontFaces(fontMap) {\r\n      var fontFaces = [];\r\n\r\n      Object.keys(fontMap).forEach(function(family) {\r\n        var styles = fontMap[family];\r\n\r\n        styles.forEach(function(style) {\r\n          var fontFace = null;\r\n\r\n          switch (style) {\r\n            case \"bold\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\"\r\n              };\r\n              break;\r\n\r\n            case \"italic\":\r\n              fontFace = {\r\n                family: family,\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"bolditalic\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\",\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"\":\r\n            case \"normal\":\r\n              fontFace = {\r\n                family: family\r\n              };\r\n              break;\r\n          }\r\n\r\n          // If font-face is still null here, it is a font with some styling we don't recognize and\r\n          // cannot map or it is a font added via the fontFaces option of .html().\r\n          if (fontFace !== null) {\r\n            fontFace.ref = {\r\n              name: family,\r\n              style: style\r\n            };\r\n\r\n            fontFaces.push(fontFace);\r\n          }\r\n        });\r\n      });\r\n\r\n      return fontFaces;\r\n    }\r\n\r\n    var _fontFaces = null;\r\n    /**\r\n     * A map of available font-faces, as passed in the options of\r\n     * .html(). If set a limited implementation of the font style matching\r\n     * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm\r\n     * will be used. If not set it will fallback to previous behavior.\r\n     */\r\n\r\n    Object.defineProperty(this, \"fontFaces\", {\r\n      get: function() {\r\n        return _fontFaces;\r\n      },\r\n      set: function(value) {\r\n        _fontFaceMap = null;\r\n        _fontFaces = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"font\", {\r\n      get: function() {\r\n        return this.ctx.font;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.font = value;\r\n        var rx, matches;\r\n\r\n        //source: https://stackoverflow.com/a/10136041\r\n        // eslint-disable-next-line no-useless-escape\r\n        rx = /^\\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;\r\n        matches = rx.exec(value);\r\n        if (matches !== null) {\r\n          var fontStyle = matches[1];\r\n          var fontVariant = matches[2];\r\n          var fontWeight = matches[3];\r\n          var fontSize = matches[4];\r\n          var lineHeight = matches[5];\r\n          var fontFamily = matches[6];\r\n        } else {\r\n          return;\r\n        }\r\n        var rxFontSize = /^([.\\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;\r\n        var fontSizeUnit = rxFontSize.exec(fontSize)[2];\r\n\r\n        if (\"px\" === fontSizeUnit) {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        } else if (\"em\" === fontSizeUnit) {\r\n          fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());\r\n        } else {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        }\r\n\r\n        this.pdf.setFontSize(fontSize);\r\n        var parts = parseFontFamily(fontFamily);\r\n\r\n        if (this.fontFaces) {\r\n          var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);\r\n\r\n          var rules = parts.map(function(ff) {\r\n            return {\r\n              family: ff,\r\n              stretch: \"normal\", // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)\r\n              weight: fontWeight,\r\n              style: fontStyle\r\n            };\r\n          });\r\n\r\n          var font = resolveFontFace(fontFaceMap, rules);\r\n          this.pdf.setFont(font.ref.name, font.ref.style);\r\n          return;\r\n        }\r\n\r\n        var style = \"\";\r\n        if (\r\n          fontWeight === \"bold\" ||\r\n          parseInt(fontWeight, 10) >= 700 ||\r\n          fontStyle === \"bold\"\r\n        ) {\r\n          style = \"bold\";\r\n        }\r\n\r\n        if (fontStyle === \"italic\") {\r\n          style += \"italic\";\r\n        }\r\n\r\n        if (style.length === 0) {\r\n          style = \"normal\";\r\n        }\r\n        var jsPdfFontName = \"\";\r\n\r\n        var fallbackFonts = {\r\n          arial: \"Helvetica\",\r\n          Arial: \"Helvetica\",\r\n          verdana: \"Helvetica\",\r\n          Verdana: \"Helvetica\",\r\n          helvetica: \"Helvetica\",\r\n          Helvetica: \"Helvetica\",\r\n          \"sans-serif\": \"Helvetica\",\r\n          fixed: \"Courier\",\r\n          monospace: \"Courier\",\r\n          terminal: \"Courier\",\r\n          cursive: \"Times\",\r\n          fantasy: \"Times\",\r\n          serif: \"Times\"\r\n        };\r\n\r\n        for (var i = 0; i < parts.length; i++) {\r\n          if (\r\n            this.pdf.internal.getFont(parts[i], style, {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            break;\r\n          } else if (\r\n            style === \"bolditalic\" &&\r\n            this.pdf.internal.getFont(parts[i], \"bold\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"bold\";\r\n          } else if (\r\n            this.pdf.internal.getFont(parts[i], \"normal\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"normal\";\r\n            break;\r\n          }\r\n        }\r\n        if (jsPdfFontName === \"\") {\r\n          for (var j = 0; j < parts.length; j++) {\r\n            if (fallbackFonts[parts[j]]) {\r\n              jsPdfFontName = fallbackFonts[parts[j]];\r\n              break;\r\n            }\r\n          }\r\n        }\r\n        jsPdfFontName = jsPdfFontName === \"\" ? \"Times\" : jsPdfFontName;\r\n        this.pdf.setFont(jsPdfFontName, style);\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalCompositeOperation\", {\r\n      get: function() {\r\n        return this.ctx.globalCompositeOperation;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalCompositeOperation = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalAlpha\", {\r\n      get: function() {\r\n        return this.ctx.globalAlpha;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalAlpha = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A float specifying the amount of the line dash offset. The default value is 0.0.\r\n     *\r\n     * @name lineDashOffset\r\n     * @default 0.0\r\n     */\r\n    Object.defineProperty(this, \"lineDashOffset\", {\r\n      get: function() {\r\n        return this.ctx.lineDashOffset;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDashOffset = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"lineDash\", {\r\n      get: function() {\r\n        return this.ctx.lineDash;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDash = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"ignoreClearRect\", {\r\n      get: function() {\r\n        return this.ctx.ignoreClearRect;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.ignoreClearRect = Boolean(value);\r\n      }\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Sets the line dash pattern used when stroking lines.\r\n   * @name setLineDash\r\n   * @function\r\n   * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.\r\n   */\r\n  Context2D.prototype.setLineDash = function(dashArray) {\r\n    this.lineDash = dashArray;\r\n  };\r\n\r\n  /**\r\n   * gets the current line dash pattern.\r\n   * @name getLineDash\r\n   * @function\r\n   * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].\r\n   */\r\n  Context2D.prototype.getLineDash = function() {\r\n    if (this.lineDash.length % 2) {\r\n      // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value\r\n      return this.lineDash.concat(this.lineDash);\r\n    } else {\r\n      // The copied value is returned to prevent contamination from outside.\r\n      return this.lineDash.slice();\r\n    }\r\n  };\r\n\r\n  Context2D.prototype.fill = function() {\r\n    pathPreProcess.call(this, \"fill\", false);\r\n  };\r\n\r\n  /**\r\n   * Actually draws the path you have defined\r\n   *\r\n   * @name stroke\r\n   * @function\r\n   * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.\r\n   */\r\n  Context2D.prototype.stroke = function() {\r\n    pathPreProcess.call(this, \"stroke\", false);\r\n  };\r\n\r\n  /**\r\n   * Begins a path, or resets the current\r\n   *\r\n   * @name beginPath\r\n   * @function\r\n   * @description The beginPath() method begins a path, or resets the current path.\r\n   */\r\n  Context2D.prototype.beginPath = function() {\r\n    this.path = [\r\n      {\r\n        type: \"begin\"\r\n      }\r\n    ];\r\n  };\r\n\r\n  /**\r\n   * Moves the path to the specified point in the canvas, without creating a line\r\n   *\r\n   * @name moveTo\r\n   * @function\r\n   * @param x {Number} The x-coordinate of where to move the path to\r\n   * @param y {Number} The y-coordinate of where to move the path to\r\n   */\r\n  Context2D.prototype.moveTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.moveTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.moveTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"mt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * Creates a path from the current point back to the starting point\r\n   *\r\n   * @name closePath\r\n   * @function\r\n   * @description The closePath() method creates a path from the current point back to the starting point.\r\n   */\r\n  Context2D.prototype.closePath = function() {\r\n    var pathBegin = new Point(0, 0);\r\n    var i = 0;\r\n    for (i = this.path.length - 1; i !== -1; i--) {\r\n      if (this.path[i].type === \"begin\") {\r\n        if (\r\n          typeof this.path[i + 1] === \"object\" &&\r\n          typeof this.path[i + 1].x === \"number\"\r\n        ) {\r\n          pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);\r\n          break;\r\n        }\r\n      }\r\n    }\r\n    this.path.push({\r\n      type: \"close\"\r\n    });\r\n    this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);\r\n  };\r\n\r\n  /**\r\n   * Adds a new point and creates a line to that point from the last specified point in the canvas\r\n   *\r\n   * @name lineTo\r\n   * @function\r\n   * @param x The x-coordinate of where to create the line to\r\n   * @param y The y-coordinate of where to create the line to\r\n   * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).\r\n   */\r\n  Context2D.prototype.lineTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.lineTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.lineTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"lt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt.x, pt.y);\r\n  };\r\n\r\n  /**\r\n   * Clips a region of any shape and size from the original canvas\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @description The clip() method clips a region of any shape and size from the original canvas.\r\n   */\r\n  Context2D.prototype.clip = function() {\r\n    this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));\r\n    pathPreProcess.call(this, null, true);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name quadraticCurveTo\r\n   * @function\r\n   * @param cpx {Number} The x-coordinate of the Bézier control point\r\n   * @param cpy {Number} The y-coordinate of the Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.<br /><br /> A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {\r\n      console.error(\r\n        \"jsPDF.context2d.quadraticCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.quadraticCurveTo\"\r\n      );\r\n    }\r\n\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));\r\n\r\n    this.path.push({\r\n      type: \"qct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name bezierCurveTo\r\n   * @function\r\n   * @param cp1x {Number} The x-coordinate of the first Bézier control point\r\n   * @param cp1y {Number} The y-coordinate of the first Bézier control point\r\n   * @param cp2x {Number} The x-coordinate of the second Bézier control point\r\n   * @param cp2y {Number} The y-coordinate of the second Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve. <br /><br />A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve.  The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(cp1x) ||\r\n      isNaN(cp1y) ||\r\n      isNaN(cp2x) ||\r\n      isNaN(cp2y)\r\n    ) {\r\n      console.error(\r\n        \"jsPDF.context2d.bezierCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.bezierCurveTo\"\r\n      );\r\n    }\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));\r\n    var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));\r\n\r\n    this.path.push({\r\n      type: \"bct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x2: pt2.x,\r\n      y2: pt2.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve (used to create circles, or parts of circles)\r\n   *\r\n   * @name arc\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the center of the circle\r\n   * @param y {Number} The y-coordinate of the center of the circle\r\n   * @param radius {Number} The radius of the circle\r\n   * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)\r\n   * @param endAngle {Number} The ending angle, in radians\r\n   * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.\r\n   * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).\r\n   */\r\n  Context2D.prototype.arc = function(\r\n    x,\r\n    y,\r\n    radius,\r\n    startAngle,\r\n    endAngle,\r\n    counterclockwise\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(radius) ||\r\n      isNaN(startAngle) ||\r\n      isNaN(endAngle)\r\n    ) {\r\n      console.error(\"jsPDF.context2d.arc: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.arc\");\r\n    }\r\n    counterclockwise = Boolean(counterclockwise);\r\n\r\n    if (!this.ctx.transform.isIdentity) {\r\n      var xpt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n      x = xpt.x;\r\n      y = xpt.y;\r\n\r\n      var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));\r\n      var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));\r\n      radius = Math.sqrt(\r\n        Math.pow(x_radPt.x - x_radPt0.x, 2) +\r\n          Math.pow(x_radPt.y - x_radPt0.y, 2)\r\n      );\r\n    }\r\n    if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {\r\n      startAngle = 0;\r\n      endAngle = 2 * Math.PI;\r\n    }\r\n\r\n    this.path.push({\r\n      type: \"arc\",\r\n      x: x,\r\n      y: y,\r\n      radius: radius,\r\n      startAngle: startAngle,\r\n      endAngle: endAngle,\r\n      counterclockwise: counterclockwise\r\n    });\r\n    // this.ctx.lastPoint(new Point(pt.x,pt.y));\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve between two tangents\r\n   *\r\n   * @name arcTo\r\n   * @function\r\n   * @param x1 {Number} The x-coordinate of the first tangent\r\n   * @param y1 {Number} The y-coordinate of the first tangent\r\n   * @param x2 {Number} The x-coordinate of the second tangent\r\n   * @param y2 {Number} The y-coordinate of the second tangent\r\n   * @param radius The radius of the arc\r\n   * @description The arcTo() method creates an arc/curve between two tangents on the canvas.\r\n   */\r\n  // eslint-disable-next-line no-unused-vars\r\n  Context2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {\r\n    throw new Error(\"arcTo not implemented.\");\r\n  };\r\n\r\n  /**\r\n   * Creates a rectangle\r\n   *\r\n   * @name rect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The rect() method creates a rectangle.\r\n   */\r\n  Context2D.prototype.rect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.rect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rect\");\r\n    }\r\n    this.moveTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x + w, y + h);\r\n    this.lineTo(x, y + h);\r\n    this.lineTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x, y);\r\n  };\r\n\r\n  /**\r\n   * Draws a \"filled\" rectangle\r\n   *\r\n   * @name fillRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The fillRect() method draws a \"filled\" rectangle. The default color of the fill is black.\r\n   */\r\n  Context2D.prototype.fillRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.fillRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillRect\");\r\n    }\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n    var tmp = {};\r\n    if (this.lineCap !== \"butt\") {\r\n      tmp.lineCap = this.lineCap;\r\n      this.lineCap = \"butt\";\r\n    }\r\n    if (this.lineJoin !== \"miter\") {\r\n      tmp.lineJoin = this.lineJoin;\r\n      this.lineJoin = \"miter\";\r\n    }\r\n\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.fill();\r\n\r\n    if (tmp.hasOwnProperty(\"lineCap\")) {\r\n      this.lineCap = tmp.lineCap;\r\n    }\r\n    if (tmp.hasOwnProperty(\"lineJoin\")) {\r\n      this.lineJoin = tmp.lineJoin;\r\n    }\r\n  };\r\n\r\n  /**\r\n   *     Draws a rectangle (no fill)\r\n   *\r\n   * @name strokeRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.\r\n   */\r\n  Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.strokeRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeRect\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.stroke();\r\n  };\r\n\r\n  /**\r\n   * Clears the specified pixels within a given rectangle\r\n   *\r\n   * @name clearRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle to clear, in pixels\r\n   * @param h {Number} The height of the rectangle to clear, in pixels\r\n   * @description We cannot clear PDF commands that were already written to PDF, so we use white instead. <br />\r\n   * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.\r\n   * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.\r\n   * This flag is stored in the save/restore context and is managed the same way as other drawing states.\r\n   *\r\n   */\r\n  Context2D.prototype.clearRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.clearRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.clearRect\");\r\n    }\r\n    if (this.ignoreClearRect) {\r\n      return;\r\n    }\r\n\r\n    this.fillStyle = \"#ffffff\";\r\n    this.fillRect(x, y, w, h);\r\n  };\r\n\r\n  /**\r\n   * Saves the state of the current context\r\n   *\r\n   * @name save\r\n   * @function\r\n   */\r\n  Context2D.prototype.save = function(doStackPush) {\r\n    doStackPush = typeof doStackPush === \"boolean\" ? doStackPush : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPush) {\r\n      this.ctx.fontSize = this.pdf.internal.getFontSize();\r\n      var ctx = new ContextLayer(this.ctx);\r\n      this.ctxStack.push(this.ctx);\r\n      this.ctx = ctx;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Returns previously saved path state and attributes\r\n   *\r\n   * @name restore\r\n   * @function\r\n   */\r\n  Context2D.prototype.restore = function(doStackPop) {\r\n    doStackPop = typeof doStackPop === \"boolean\" ? doStackPop : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"Q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPop && this.ctxStack.length !== 0) {\r\n      this.ctx = this.ctxStack.pop();\r\n      this.fillStyle = this.ctx.fillStyle;\r\n      this.strokeStyle = this.ctx.strokeStyle;\r\n      this.font = this.ctx.font;\r\n      this.lineCap = this.ctx.lineCap;\r\n      this.lineWidth = this.ctx.lineWidth;\r\n      this.lineJoin = this.ctx.lineJoin;\r\n      this.lineDash = this.ctx.lineDash;\r\n      this.lineDashOffset = this.ctx.lineDashOffset;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @name toDataURL\r\n   * @function\r\n   */\r\n  Context2D.prototype.toDataURL = function() {\r\n    throw new Error(\"toDataUrl not implemented.\");\r\n  };\r\n\r\n  //helper functions\r\n\r\n  /**\r\n   * Get the decimal values of r, g, b and a\r\n   *\r\n   * @name getRGBA\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var getRGBA = function(style) {\r\n    var rxRgb = /rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/;\r\n    var rxRgba = /rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*([\\d.]+)\\s*\\)/;\r\n    var rxTransparent = /transparent|rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*0+\\s*\\)/;\r\n\r\n    var r, g, b, a;\r\n\r\n    if (style.isCanvasGradient === true) {\r\n      style = style.getColor();\r\n    }\r\n\r\n    if (!style) {\r\n      return { r: 0, g: 0, b: 0, a: 0, style: style };\r\n    }\r\n\r\n    if (rxTransparent.test(style)) {\r\n      r = 0;\r\n      g = 0;\r\n      b = 0;\r\n      a = 0;\r\n    } else {\r\n      var matches = rxRgb.exec(style);\r\n      if (matches !== null) {\r\n        r = parseInt(matches[1]);\r\n        g = parseInt(matches[2]);\r\n        b = parseInt(matches[3]);\r\n        a = 1;\r\n      } else {\r\n        matches = rxRgba.exec(style);\r\n        if (matches !== null) {\r\n          r = parseInt(matches[1]);\r\n          g = parseInt(matches[2]);\r\n          b = parseInt(matches[3]);\r\n          a = parseFloat(matches[4]);\r\n        } else {\r\n          a = 1;\r\n\r\n          if (typeof style === \"string\" && style.charAt(0) !== \"#\") {\r\n            var rgbColor = new RGBColor(style);\r\n            if (rgbColor.ok) {\r\n              style = rgbColor.toHex();\r\n            } else {\r\n              style = \"#000000\";\r\n            }\r\n          }\r\n\r\n          if (style.length === 4) {\r\n            r = style.substring(1, 2);\r\n            r += r;\r\n            g = style.substring(2, 3);\r\n            g += g;\r\n            b = style.substring(3, 4);\r\n            b += b;\r\n          } else {\r\n            r = style.substring(1, 3);\r\n            g = style.substring(3, 5);\r\n            b = style.substring(5, 7);\r\n          }\r\n          r = parseInt(r, 16);\r\n          g = parseInt(g, 16);\r\n          b = parseInt(b, 16);\r\n        }\r\n      }\r\n    }\r\n    return { r: r, g: g, b: b, a: a, style: style };\r\n  };\r\n\r\n  /**\r\n   * @name isFillTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isFillTransparent = function() {\r\n    return this.ctx.isFillTransparent || this.globalAlpha == 0;\r\n  };\r\n\r\n  /**\r\n   * @name isStrokeTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isStrokeTransparent = function() {\r\n    return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);\r\n  };\r\n\r\n  /**\r\n   * Draws \"filled\" text on the canvas\r\n   *\r\n   * @name fillText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The fillText() method draws filled text on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.fillText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.fillText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillText\");\r\n    }\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n\r\n    // We only use X axis as scale hint\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Draws text on the canvas (no fill)\r\n   *\r\n   * @name strokeText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.strokeText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.strokeText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeText\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      renderingMode: \"stroke\",\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Returns an object that contains the width of the specified text\r\n   *\r\n   * @name measureText\r\n   * @function\r\n   * @param text {String} The text to be measured\r\n   * @description The measureText() method returns an object that contains the width of the specified text, in pixels.\r\n   * @returns {Number}\r\n   */\r\n  Context2D.prototype.measureText = function(text) {\r\n    if (typeof text !== \"string\") {\r\n      console.error(\r\n        \"jsPDF.context2d.measureText: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.measureText\"\r\n      );\r\n    }\r\n    var pdf = this.pdf;\r\n    var k = this.pdf.internal.scaleFactor;\r\n\r\n    var fontSize = pdf.internal.getFontSize();\r\n    var txtWidth =\r\n      (pdf.getStringUnitWidth(text) * fontSize) / pdf.internal.scaleFactor;\r\n    txtWidth *= Math.round(((k * 96) / 72) * 10000) / 10000;\r\n\r\n    var TextMetrics = function(options) {\r\n      options = options || {};\r\n      var _width = options.width || 0;\r\n      Object.defineProperty(this, \"width\", {\r\n        get: function() {\r\n          return _width;\r\n        }\r\n      });\r\n      return this;\r\n    };\r\n    return new TextMetrics({ width: txtWidth });\r\n  };\r\n\r\n  //Transformations\r\n\r\n  /**\r\n   * Scales the current drawing bigger or smaller\r\n   *\r\n   * @name scale\r\n   * @function\r\n   * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @description The scale() method scales the current drawing, bigger or smaller.\r\n   */\r\n  Context2D.prototype.scale = function(scalewidth, scaleheight) {\r\n    if (isNaN(scalewidth) || isNaN(scaleheight)) {\r\n      console.error(\"jsPDF.context2d.scale: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.scale\");\r\n    }\r\n    var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Rotates the current drawing\r\n   *\r\n   * @name rotate\r\n   * @function\r\n   * @param angle {Number} The rotation angle, in radians.\r\n   * @description To calculate from degrees to radians: degrees*Math.PI/180. <br />\r\n   * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180\r\n   */\r\n  Context2D.prototype.rotate = function(angle) {\r\n    if (isNaN(angle)) {\r\n      console.error(\"jsPDF.context2d.rotate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rotate\");\r\n    }\r\n    var matrix = new Matrix(\r\n      Math.cos(angle),\r\n      Math.sin(angle),\r\n      -Math.sin(angle),\r\n      Math.cos(angle),\r\n      0.0,\r\n      0.0\r\n    );\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Remaps the (0,0) position on the canvas\r\n   *\r\n   * @name translate\r\n   * @function\r\n   * @param x {Number} The value to add to horizontal (x) coordinates\r\n   * @param y {Number} The value to add to vertical (y) coordinates\r\n   * @description The translate() method remaps the (0,0) position on the canvas.\r\n   */\r\n  Context2D.prototype.translate = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.translate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.translate\");\r\n    }\r\n    var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Replaces the current transformation matrix for the drawing\r\n   *\r\n   * @name transform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix.<br /><br />The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:<br /><br /><br /><br />a    c    e<br /><br />b    d    f<br /><br />0    0    1<br /><br />In other words, the transform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.transform = function(a, b, c, d, e, f) {\r\n    if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {\r\n      console.error(\"jsPDF.context2d.transform: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.transform\");\r\n    }\r\n    var matrix = new Matrix(a, b, c, d, e, f);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Resets the current transform to the identity matrix. Then runs transform()\r\n   *\r\n   * @name setTransform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix. <br /><br />The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.<br /><br />In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.setTransform = function(a, b, c, d, e, f) {\r\n    a = isNaN(a) ? 1 : a;\r\n    b = isNaN(b) ? 0 : b;\r\n    c = isNaN(c) ? 0 : c;\r\n    d = isNaN(d) ? 1 : d;\r\n    e = isNaN(e) ? 0 : e;\r\n    f = isNaN(f) ? 0 : f;\r\n    this.ctx.transform = new Matrix(a, b, c, d, e, f);\r\n  };\r\n\r\n  /**\r\n   * Should only be used if pageWrapYEnabled is true\r\n   *\r\n   * @name setPageByYPosition\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns One-based Page Number\r\n   */\r\n  var setPageByYPosition = function(y) {\r\n    if (this.pageWrapYEnabled) {\r\n      this.lastBreak = 0;\r\n      var manualBreaks = 0;\r\n      var autoBreaks = 0;\r\n      for (var i = 0; i < this.pageBreaks.length; i++) {\r\n        if (y >= this.pageBreaks[i]) {\r\n          manualBreaks++;\r\n          if (this.lastBreak === 0) {\r\n            autoBreaks++;\r\n          }\r\n          var spaceBetweenLastBreak = this.pageBreaks[i] - this.lastBreak;\r\n          this.lastBreak = this.pageBreaks[i];\r\n          var pagesSinceLastBreak = Math.floor(\r\n            spaceBetweenLastBreak / this.pageWrapY\r\n          );\r\n          autoBreaks += pagesSinceLastBreak;\r\n        }\r\n      }\r\n      if (this.lastBreak === 0) {\r\n        var pagesSinceLastBreak = Math.floor(y / this.pageWrapY) + 1;\r\n        autoBreaks += pagesSinceLastBreak;\r\n      }\r\n      return autoBreaks + manualBreaks;\r\n    } else {\r\n      return this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    }\r\n  };\r\n\r\n  var hasMargins = function() {\r\n    return (\r\n      this.margin[0] > 0 ||\r\n      this.margin[1] > 0 ||\r\n      this.margin[2] > 0 ||\r\n      this.margin[3] > 0\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Draws an image, canvas, or video onto the canvas\r\n   *\r\n   * @function\r\n   * @param img {} Specifies the image, canvas, or video element to use\r\n   * @param sx {Number} Optional. The x coordinate where to start clipping\r\n   * @param sy {Number} Optional. The y coordinate where to start clipping\r\n   * @param swidth {Number} Optional. The width of the clipped image\r\n   * @param sheight {Number} Optional. The height of the clipped image\r\n   * @param x {Number} The x coordinate where to place the image on the canvas\r\n   * @param y {Number} The y coordinate where to place the image on the canvas\r\n   * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)\r\n   * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)\r\n   */\r\n  Context2D.prototype.drawImage = function(\r\n    img,\r\n    sx,\r\n    sy,\r\n    swidth,\r\n    sheight,\r\n    x,\r\n    y,\r\n    width,\r\n    height\r\n  ) {\r\n    var imageProperties = this.pdf.getImageProperties(img);\r\n    var factorX = 1;\r\n    var factorY = 1;\r\n    var isClip;\r\n\r\n    var clipFactorX = 1;\r\n    var clipFactorY = 1;\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width !== \"undefined\") {\r\n      isClip = true;\r\n      clipFactorX = width / swidth;\r\n      clipFactorY = height / sheight;\r\n      factorX = ((imageProperties.width / swidth) * width) / swidth;\r\n      factorY = ((imageProperties.height / sheight) * height) / sheight;\r\n    }\r\n\r\n    //is sx and sy are set and x and y not, set x and y with values of sx and sy\r\n    if (typeof x === \"undefined\") {\r\n      x = sx;\r\n      y = sy;\r\n      sx = 0;\r\n      sy = 0;\r\n    }\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width === \"undefined\") {\r\n      width = swidth;\r\n      height = sheight;\r\n    }\r\n    if (typeof swidth === \"undefined\" && typeof width === \"undefined\") {\r\n      width = imageProperties.width;\r\n      height = imageProperties.height;\r\n    }\r\n\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n    var xRect = matrix.applyToRectangle(\r\n      new Rectangle(\r\n        x - sx * clipFactorX,\r\n        y - sy * clipFactorY,\r\n        swidth * factorX,\r\n        sheight * factorY\r\n      )\r\n    );\r\n    var pageArray = getPagesByPath.call(this, xRect);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var tmpRect = JSON.parse(JSON.stringify(xRect));\r\n        tmpRect = pathPositionRedo(\r\n          [tmpRect],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        const needsClipping = (i > min || i < max) && hasMargins.call(this);\r\n\r\n        if (needsClipping) {\r\n          this.pdf.saveGraphicsState();\r\n          this.pdf\r\n            .rect(\r\n              this.margin[3],\r\n              this.margin[0],\r\n              pageWidthMinusMargins,\r\n              pageHeightMinusMargins,\r\n              null\r\n            )\r\n            .clip()\r\n            .discardPath();\r\n        }\r\n        this.pdf.addImage(\r\n          img,\r\n          \"JPEG\",\r\n          tmpRect.x,\r\n          tmpRect.y,\r\n          tmpRect.w,\r\n          tmpRect.h,\r\n          null,\r\n          null,\r\n          angle\r\n        );\r\n        if (needsClipping) {\r\n          this.pdf.restoreGraphicsState();\r\n        }\r\n      }\r\n    } else {\r\n      this.pdf.addImage(\r\n        img,\r\n        \"JPEG\",\r\n        xRect.x,\r\n        xRect.y,\r\n        xRect.w,\r\n        xRect.h,\r\n        null,\r\n        null,\r\n        angle\r\n      );\r\n    }\r\n  };\r\n\r\n  var getPagesByPath = function(path, pageWrapX, pageWrapY) {\r\n    var result = [];\r\n    pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;\r\n    pageWrapY =\r\n      pageWrapY ||\r\n      this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n    var yOffset = this.posY + this.ctx.prevPageLastElemOffset;\r\n\r\n    switch (path.type) {\r\n      default:\r\n      case \"mt\":\r\n      case \"lt\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        break;\r\n      case \"arc\":\r\n        result.push(\r\n          Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1\r\n        );\r\n        break;\r\n      case \"qct\":\r\n        var rectOfQuadraticCurve = getQuadraticCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) /\r\n              pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"bct\":\r\n        var rectOfBezierCurve = getBezierCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x2,\r\n          path.y2,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"rect\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);\r\n    }\r\n\r\n    for (var i = 0; i < result.length; i += 1) {\r\n      while (this.pdf.internal.getNumberOfPages() < result[i]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    return result;\r\n  };\r\n\r\n  var addPage = function() {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var font = this.font;\r\n    var lineCap = this.lineCap;\r\n    var lineWidth = this.lineWidth;\r\n    var lineJoin = this.lineJoin;\r\n    this.pdf.addPage();\r\n    this.fillStyle = fillStyle;\r\n    this.strokeStyle = strokeStyle;\r\n    this.font = font;\r\n    this.lineCap = lineCap;\r\n    this.lineWidth = lineWidth;\r\n    this.lineJoin = lineJoin;\r\n  };\r\n\r\n  var pathPositionRedo = function(paths, x, y) {\r\n    for (var i = 0; i < paths.length; i++) {\r\n      switch (paths[i].type) {\r\n        case \"bct\":\r\n          paths[i].x2 += x;\r\n          paths[i].y2 += y;\r\n        case \"qct\":\r\n          paths[i].x1 += x;\r\n          paths[i].y1 += y;\r\n        case \"mt\":\r\n        case \"lt\":\r\n        case \"arc\":\r\n        default:\r\n          paths[i].x += x;\r\n          paths[i].y += y;\r\n      }\r\n    }\r\n    return paths;\r\n  };\r\n\r\n  var sortPages = function(pages) {\r\n    return pages.sort(function(a, b) {\r\n      return a - b;\r\n    });\r\n  };\r\n\r\n  var pathPreProcess = function(rule, isClip) {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var lineCap = this.lineCap;\r\n    var oldLineWidth = this.lineWidth;\r\n    var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);\r\n    var lineJoin = this.lineJoin;\r\n\r\n    var origPath = JSON.parse(JSON.stringify(this.path));\r\n    var xPath = JSON.parse(JSON.stringify(this.path));\r\n    var clipPath;\r\n    var tmpPath;\r\n    var pages = [];\r\n\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      if (typeof xPath[i].x !== \"undefined\") {\r\n        var page = getPagesByPath.call(this, xPath[i]);\r\n\r\n        for (var ii = 0; ii < page.length; ii += 1) {\r\n          if (pages.indexOf(page[ii]) === -1) {\r\n            pages.push(page[ii]);\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    for (var j = 0; j < pages.length; j++) {\r\n      while (this.pdf.internal.getNumberOfPages() < pages[j]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    sortPages(pages);\r\n\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var k = min; k < max + 1; k++) {\r\n        this.pdf.setPage(k);\r\n\r\n        this.fillStyle = fillStyle;\r\n        this.strokeStyle = strokeStyle;\r\n        this.lineCap = lineCap;\r\n        this.lineWidth = lineWidth;\r\n        this.lineJoin = lineJoin;\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, rule, true);\r\n          this.path = tmpPaths;\r\n        }\r\n        tmpPath = JSON.parse(JSON.stringify(origPath));\r\n        this.path = pathPositionRedo(\r\n          tmpPath,\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        );\r\n        if (isClip === false || k === 0) {\r\n          const needsClipping = (k > min || k < max) && hasMargins.call(this);\r\n          if (needsClipping) {\r\n            this.pdf.saveGraphicsState();\r\n            this.pdf\r\n              .rect(\r\n                this.margin[3],\r\n                this.margin[0],\r\n                pageWidthMinusMargins,\r\n                pageHeightMinusMargins,\r\n                null\r\n              )\r\n              .clip()\r\n              .discardPath();\r\n          }\r\n          drawPaths.call(this, rule, isClip);\r\n          if (needsClipping) {\r\n            this.pdf.restoreGraphicsState();\r\n          }\r\n        }\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    } else {\r\n      this.lineWidth = lineWidth;\r\n      drawPaths.call(this, rule, isClip);\r\n      this.lineWidth = oldLineWidth;\r\n    }\r\n    this.path = origPath;\r\n  };\r\n\r\n  /**\r\n   * Processes the paths\r\n   *\r\n   * @function\r\n   * @param rule {String}\r\n   * @param isClip {Boolean}\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var drawPaths = function(rule, isClip) {\r\n    if (rule === \"stroke\" && !isClip && isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    if (rule !== \"stroke\" && !isClip && isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var moves = [];\r\n\r\n    //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;\r\n    var delta;\r\n    var xPath = this.path;\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      var pt = xPath[i];\r\n\r\n      switch (pt.type) {\r\n        case \"begin\":\r\n          moves.push({\r\n            begin: true\r\n          });\r\n          break;\r\n\r\n        case \"close\":\r\n          moves.push({\r\n            close: true\r\n          });\r\n          break;\r\n\r\n        case \"mt\":\r\n          moves.push({\r\n            start: pt,\r\n            deltas: [],\r\n            abs: []\r\n          });\r\n          break;\r\n\r\n        case \"lt\":\r\n          var iii = moves.length;\r\n          if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {\r\n            delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];\r\n            if (iii > 0) {\r\n              for (iii; iii >= 0; iii--) {\r\n                if (\r\n                  moves[iii - 1].close !== true &&\r\n                  moves[iii - 1].begin !== true\r\n                ) {\r\n                  moves[iii - 1].deltas.push(delta);\r\n                  moves[iii - 1].abs.push(pt);\r\n                  break;\r\n                }\r\n              }\r\n            }\r\n          }\r\n          break;\r\n\r\n        case \"bct\":\r\n          delta = [\r\n            pt.x1 - xPath[i - 1].x,\r\n            pt.y1 - xPath[i - 1].y,\r\n            pt.x2 - xPath[i - 1].x,\r\n            pt.y2 - xPath[i - 1].y,\r\n            pt.x - xPath[i - 1].x,\r\n            pt.y - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"qct\":\r\n          var x1 = xPath[i - 1].x + (2.0 / 3.0) * (pt.x1 - xPath[i - 1].x);\r\n          var y1 = xPath[i - 1].y + (2.0 / 3.0) * (pt.y1 - xPath[i - 1].y);\r\n          var x2 = pt.x + (2.0 / 3.0) * (pt.x1 - pt.x);\r\n          var y2 = pt.y + (2.0 / 3.0) * (pt.y1 - pt.y);\r\n          var x3 = pt.x;\r\n          var y3 = pt.y;\r\n          delta = [\r\n            x1 - xPath[i - 1].x,\r\n            y1 - xPath[i - 1].y,\r\n            x2 - xPath[i - 1].x,\r\n            y2 - xPath[i - 1].y,\r\n            x3 - xPath[i - 1].x,\r\n            y3 - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"arc\":\r\n          moves.push({\r\n            deltas: [],\r\n            abs: [],\r\n            arc: true\r\n          });\r\n\r\n          if (Array.isArray(moves[moves.length - 1].abs)) {\r\n            moves[moves.length - 1].abs.push(pt);\r\n          }\r\n          break;\r\n      }\r\n    }\r\n    var style;\r\n    if (!isClip) {\r\n      if (rule === \"stroke\") {\r\n        style = \"stroke\";\r\n      } else {\r\n        style = \"fill\";\r\n      }\r\n    } else {\r\n      style = null;\r\n    }\r\n\r\n    var began = false;\r\n    for (var k = 0; k < moves.length; k++) {\r\n      if (moves[k].arc) {\r\n        var arcs = moves[k].abs;\r\n\r\n        for (var ii = 0; ii < arcs.length; ii++) {\r\n          var arc = arcs[ii];\r\n\r\n          if (arc.type === \"arc\") {\r\n            drawArc.call(\r\n              this,\r\n              arc.x,\r\n              arc.y,\r\n              arc.radius,\r\n              arc.startAngle,\r\n              arc.endAngle,\r\n              arc.counterclockwise,\r\n              undefined,\r\n              isClip,\r\n              !began\r\n            );\r\n          } else {\r\n            drawLine.call(this, arc.x, arc.y);\r\n          }\r\n          began = true;\r\n        }\r\n      } else if (moves[k].close === true) {\r\n        this.pdf.internal.out(\"h\");\r\n        began = false;\r\n      } else if (moves[k].begin !== true) {\r\n        var x = moves[k].start.x;\r\n        var y = moves[k].start.y;\r\n        drawLines.call(this, moves[k].deltas, x, y);\r\n        began = true;\r\n      }\r\n    }\r\n\r\n    if (style) {\r\n      putStyle.call(this, style);\r\n    }\r\n    if (isClip) {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var getBaseline = function(y) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    switch (this.ctx.textBaseline) {\r\n      case \"bottom\":\r\n        return y - descent;\r\n      case \"top\":\r\n        return y + height - descent;\r\n      case \"hanging\":\r\n        return y + height - 2 * descent;\r\n      case \"middle\":\r\n        return y + height / 2 - descent;\r\n      case \"ideographic\":\r\n        // TODO not implemented\r\n        return y;\r\n      case \"alphabetic\":\r\n      default:\r\n        return y;\r\n    }\r\n  };\r\n\r\n  var getTextBottom = function(yBaseLine) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    return yBaseLine + descent;\r\n  };\r\n\r\n  Context2D.prototype.createLinearGradient = function createLinearGradient() {\r\n    var canvasGradient = function canvasGradient() {};\r\n\r\n    canvasGradient.colorStops = [];\r\n    canvasGradient.addColorStop = function(offset, color) {\r\n      this.colorStops.push([offset, color]);\r\n    };\r\n\r\n    canvasGradient.getColor = function() {\r\n      if (this.colorStops.length === 0) {\r\n        return \"#000000\";\r\n      }\r\n\r\n      return this.colorStops[0][1];\r\n    };\r\n\r\n    canvasGradient.isCanvasGradient = true;\r\n    return canvasGradient;\r\n  };\r\n  Context2D.prototype.createPattern = function createPattern() {\r\n    return this.createLinearGradient();\r\n  };\r\n  Context2D.prototype.createRadialGradient = function createRadialGradient() {\r\n    return this.createLinearGradient();\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param x Edge point X\r\n   * @param y Edge point Y\r\n   * @param r Radius\r\n   * @param a1 start angle\r\n   * @param a2 end angle\r\n   * @param counterclockwise\r\n   * @param style\r\n   * @param isClip\r\n   */\r\n  var drawArc = function(\r\n    x,\r\n    y,\r\n    r,\r\n    a1,\r\n    a2,\r\n    counterclockwise,\r\n    style,\r\n    isClip,\r\n    includeMove\r\n  ) {\r\n    // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html\r\n    var curves = createArc.call(this, r, a1, a2, counterclockwise);\r\n\r\n    for (var i = 0; i < curves.length; i++) {\r\n      var curve = curves[i];\r\n      if (i === 0) {\r\n        if (includeMove) {\r\n          doMove.call(this, curve.x1 + x, curve.y1 + y);\r\n        } else {\r\n          drawLine.call(this, curve.x1 + x, curve.y1 + y);\r\n        }\r\n      }\r\n      drawCurve.call(\r\n        this,\r\n        x,\r\n        y,\r\n        curve.x2,\r\n        curve.y2,\r\n        curve.x3,\r\n        curve.y3,\r\n        curve.x4,\r\n        curve.y4\r\n      );\r\n    }\r\n\r\n    if (!isClip) {\r\n      putStyle.call(this, style);\r\n    } else {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    switch (style) {\r\n      case \"stroke\":\r\n        this.pdf.internal.out(\"S\");\r\n        break;\r\n      case \"fill\":\r\n        this.pdf.internal.out(\"f\");\r\n        break;\r\n    }\r\n  };\r\n\r\n  var doClip = function() {\r\n    this.pdf.clip();\r\n    this.pdf.discardPath();\r\n  };\r\n\r\n  var doMove = function(x, y) {\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y) +\r\n        \" m\"\r\n    );\r\n  };\r\n\r\n  var putText = function(options) {\r\n    var textAlign;\r\n    switch (options.align) {\r\n      case \"right\":\r\n      case \"end\":\r\n        textAlign = \"right\";\r\n        break;\r\n      case \"center\":\r\n        textAlign = \"center\";\r\n        break;\r\n      case \"left\":\r\n      case \"start\":\r\n      default:\r\n        textAlign = \"left\";\r\n        break;\r\n    }\r\n\r\n    var textDimensions = this.pdf.getTextDimensions(options.text);\r\n    var yBaseLine = getBaseline.call(this, options.y);\r\n    var yBottom = getTextBottom.call(this, yBaseLine);\r\n    var yTop = yBottom - textDimensions.h;\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n\r\n    var baselineRect = this.ctx.transform.applyToRectangle(\r\n      new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h)\r\n    );\r\n    var textBounds = matrix.applyToRectangle(\r\n      new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h)\r\n    );\r\n    var pageArray = getPagesByPath.call(this, textBounds);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath, oldSize, oldLineWidth;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusBottomMargin =\r\n          this.pdf.internal.pageSize.height - this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          pageHeightMinusBottomMargin - this.margin[0];\r\n        var pageWidthMinusRightMargin =\r\n          this.pdf.internal.pageSize.width - this.margin[1];\r\n        var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -1 * previousPageHeightSum + topMargin\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var textBoundsOnPage = pathPositionRedo(\r\n          [JSON.parse(JSON.stringify(textBounds))],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        if (options.scale >= 0.01) {\r\n          oldSize = this.pdf.internal.getFontSize();\r\n          this.pdf.setFontSize(oldSize * options.scale);\r\n          oldLineWidth = this.lineWidth;\r\n          this.lineWidth = oldLineWidth * options.scale;\r\n        }\r\n\r\n        var doSlice = this.autoPaging !== \"text\";\r\n\r\n        if (\r\n          doSlice ||\r\n          textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin\r\n        ) {\r\n          if (\r\n            doSlice ||\r\n            (textBoundsOnPage.y >= topMargin &&\r\n              textBoundsOnPage.x <= pageWidthMinusRightMargin)\r\n          ) {\r\n            var croppedText = doSlice\r\n              ? options.text\r\n              : this.pdf.splitTextToSize(\r\n                  options.text,\r\n                  options.maxWidth ||\r\n                    pageWidthMinusRightMargin - textBoundsOnPage.x\r\n                )[0];\r\n            var baseLineRectOnPage = pathPositionRedo(\r\n              [JSON.parse(JSON.stringify(baselineRect))],\r\n              this.posX + this.margin[3],\r\n              -previousPageHeightSum +\r\n                topMargin +\r\n                this.ctx.prevPageLastElemOffset\r\n            )[0];\r\n\r\n            const needsClipping =\r\n              doSlice && (i > min || i < max) && hasMargins.call(this);\r\n\r\n            if (needsClipping) {\r\n              this.pdf.saveGraphicsState();\r\n              this.pdf\r\n                .rect(\r\n                  this.margin[3],\r\n                  this.margin[0],\r\n                  pageWidthMinusMargins,\r\n                  pageHeightMinusMargins,\r\n                  null\r\n                )\r\n                .clip()\r\n                .discardPath();\r\n            }\r\n\r\n            this.pdf.text(\r\n              croppedText,\r\n              baseLineRectOnPage.x,\r\n              baseLineRectOnPage.y,\r\n              {\r\n                angle: options.angle,\r\n                align: textAlign,\r\n                renderingMode: options.renderingMode\r\n              }\r\n            );\r\n\r\n            if (needsClipping) {\r\n              this.pdf.restoreGraphicsState();\r\n            }\r\n          }\r\n        } else {\r\n          // This text is the last element of the page, but it got cut off due to the margin\r\n          // so we render it in the next page\r\n\r\n          if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {\r\n            // As a result, all other elements have their y offset increased\r\n            this.ctx.prevPageLastElemOffset +=\r\n              pageHeightMinusBottomMargin - textBoundsOnPage.y;\r\n          }\r\n        }\r\n\r\n        if (options.scale >= 0.01) {\r\n          this.pdf.setFontSize(oldSize);\r\n          this.lineWidth = oldLineWidth;\r\n        }\r\n      }\r\n    } else {\r\n      if (options.scale >= 0.01) {\r\n        oldSize = this.pdf.internal.getFontSize();\r\n        this.pdf.setFontSize(oldSize * options.scale);\r\n        oldLineWidth = this.lineWidth;\r\n        this.lineWidth = oldLineWidth * options.scale;\r\n      }\r\n      this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {\r\n        angle: options.angle,\r\n        align: textAlign,\r\n        renderingMode: options.renderingMode,\r\n        maxWidth: options.maxWidth\r\n      });\r\n\r\n      if (options.scale >= 0.01) {\r\n        this.pdf.setFontSize(oldSize);\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    }\r\n  };\r\n\r\n  var drawLine = function(x, y, prevX, prevY) {\r\n    prevX = prevX || 0;\r\n    prevY = prevY || 0;\r\n\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x + prevX) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y + prevY) +\r\n        \" l\"\r\n    );\r\n  };\r\n\r\n  var drawLines = function(lines, x, y) {\r\n    return this.pdf.lines(lines, x, y, null, null);\r\n  };\r\n\r\n  var drawCurve = function(x, y, x1, y1, x2, y2, x3, y3) {\r\n    this.pdf.internal.out(\r\n      [\r\n        f2(getHorizontalCoordinate(x1 + x)),\r\n        f2(getVerticalCoordinate(y1 + y)),\r\n        f2(getHorizontalCoordinate(x2 + x)),\r\n        f2(getVerticalCoordinate(y2 + y)),\r\n        f2(getHorizontalCoordinate(x3 + x)),\r\n        f2(getVerticalCoordinate(y3 + y)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.\r\n   *\r\n   * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   * @function createArc\r\n   */\r\n  var createArc = function(radius, startAngle, endAngle, anticlockwise) {\r\n    var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below\r\n    var twoPi = Math.PI * 2;\r\n    var halfPi = Math.PI / 2.0;\r\n\r\n    while (startAngle > endAngle) {\r\n      startAngle = startAngle - twoPi;\r\n    }\r\n    var totalAngle = Math.abs(endAngle - startAngle);\r\n    if (totalAngle < twoPi) {\r\n      if (anticlockwise) {\r\n        totalAngle = twoPi - totalAngle;\r\n      }\r\n    }\r\n\r\n    // Compute the sequence of arc curves, up to PI/2 at a time.\r\n    var curves = [];\r\n\r\n    // clockwise or counterclockwise\r\n    var sgn = anticlockwise ? -1 : +1;\r\n\r\n    var a1 = startAngle;\r\n    for (; totalAngle > EPSILON; ) {\r\n      var remain = sgn * Math.min(totalAngle, halfPi);\r\n      var a2 = a1 + remain;\r\n      curves.push(createSmallArc.call(this, radius, a1, a2));\r\n      totalAngle -= Math.abs(a2 - a1);\r\n      a1 = a2;\r\n    }\r\n\r\n    return curves;\r\n  };\r\n\r\n  /**\r\n   * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.\r\n   *\r\n   * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   *\r\n   * This algorithm is based on the approach described in: A. Riškus, \"Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa,\" Information Technology and Control, 35(4), 2006 pp. 371-378.\r\n   */\r\n  var createSmallArc = function(r, a1, a2) {\r\n    var a = (a2 - a1) / 2.0;\r\n\r\n    var x4 = r * Math.cos(a);\r\n    var y4 = r * Math.sin(a);\r\n    var x1 = x4;\r\n    var y1 = -y4;\r\n\r\n    var q1 = x1 * x1 + y1 * y1;\r\n    var q2 = q1 + x1 * x4 + y1 * y4;\r\n    var k2 = ((4 / 3) * (Math.sqrt(2 * q1 * q2) - q2)) / (x1 * y4 - y1 * x4);\r\n\r\n    var x2 = x1 - k2 * y1;\r\n    var y2 = y1 + k2 * x1;\r\n    var x3 = x2;\r\n    var y3 = -y2;\r\n\r\n    var ar = a + a1;\r\n    var cos_ar = Math.cos(ar);\r\n    var sin_ar = Math.sin(ar);\r\n\r\n    return {\r\n      x1: r * Math.cos(a1),\r\n      y1: r * Math.sin(a1),\r\n      x2: x2 * cos_ar - y2 * sin_ar,\r\n      y2: x2 * sin_ar + y2 * cos_ar,\r\n      x3: x3 * cos_ar - y3 * sin_ar,\r\n      y3: x3 * sin_ar + y3 * cos_ar,\r\n      x4: r * Math.cos(a2),\r\n      y4: r * Math.sin(a2)\r\n    };\r\n  };\r\n\r\n  var rad2deg = function(value) {\r\n    return (value * 180) / Math.PI;\r\n  };\r\n\r\n  var getQuadraticCurveBoundary = function(sx, sy, cpx, cpy, ex, ey) {\r\n    var midX1 = sx + (cpx - sx) * 0.5;\r\n    var midY1 = sy + (cpy - sy) * 0.5;\r\n    var midX2 = ex + (cpx - ex) * 0.5;\r\n    var midY2 = ey + (cpy - ey) * 0.5;\r\n    var resultX1 = Math.min(sx, ex, midX1, midX2);\r\n    var resultX2 = Math.max(sx, ex, midX1, midX2);\r\n    var resultY1 = Math.min(sy, ey, midY1, midY2);\r\n    var resultY2 = Math.max(sy, ey, midY1, midY2);\r\n    return new Rectangle(\r\n      resultX1,\r\n      resultY1,\r\n      resultX2 - resultX1,\r\n      resultY2 - resultY1\r\n    );\r\n  };\r\n\r\n  //De Casteljau algorithm\r\n  var getBezierCurveBoundary = function(ax, ay, bx, by, cx, cy, dx, dy) {\r\n    var tobx = bx - ax;\r\n    var toby = by - ay;\r\n    var tocx = cx - bx;\r\n    var tocy = cy - by;\r\n    var todx = dx - cx;\r\n    var tody = dy - cy;\r\n    var precision = 40;\r\n    var d,\r\n      i,\r\n      px,\r\n      py,\r\n      qx,\r\n      qy,\r\n      rx,\r\n      ry,\r\n      tx,\r\n      ty,\r\n      sx,\r\n      sy,\r\n      x,\r\n      y,\r\n      minx,\r\n      miny,\r\n      maxx,\r\n      maxy,\r\n      toqx,\r\n      toqy,\r\n      torx,\r\n      tory,\r\n      totx,\r\n      toty;\r\n    for (i = 0; i < precision + 1; i++) {\r\n      d = i / precision;\r\n      px = ax + d * tobx;\r\n      py = ay + d * toby;\r\n      qx = bx + d * tocx;\r\n      qy = by + d * tocy;\r\n      rx = cx + d * todx;\r\n      ry = cy + d * tody;\r\n      toqx = qx - px;\r\n      toqy = qy - py;\r\n      torx = rx - qx;\r\n      tory = ry - qy;\r\n\r\n      sx = px + d * toqx;\r\n      sy = py + d * toqy;\r\n      tx = qx + d * torx;\r\n      ty = qy + d * tory;\r\n      totx = tx - sx;\r\n      toty = ty - sy;\r\n\r\n      x = sx + d * totx;\r\n      y = sy + d * toty;\r\n      if (i == 0) {\r\n        minx = x;\r\n        miny = y;\r\n        maxx = x;\r\n        maxy = y;\r\n      } else {\r\n        minx = Math.min(minx, x);\r\n        miny = Math.min(miny, y);\r\n        maxx = Math.max(maxx, x);\r\n        maxy = Math.max(maxy, y);\r\n      }\r\n    }\r\n    return new Rectangle(\r\n      Math.round(minx),\r\n      Math.round(miny),\r\n      Math.round(maxx - minx),\r\n      Math.round(maxy - miny)\r\n    );\r\n  };\r\n\r\n  var getPrevLineDashValue = function(lineDash, lineDashOffset) {\r\n    return JSON.stringify({\r\n      lineDash: lineDash,\r\n      lineDashOffset: lineDashOffset\r\n    });\r\n  };\r\n\r\n  var setLineDash = function() {\r\n    // Avoid unnecessary line dash declarations.\r\n    if (\r\n      !this.prevLineDash &&\r\n      !this.ctx.lineDash.length &&\r\n      !this.ctx.lineDashOffset\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    // Avoid unnecessary line dash declarations.\r\n    const nextLineDash = getPrevLineDashValue(\r\n      this.ctx.lineDash,\r\n      this.ctx.lineDashOffset\r\n    );\r\n    if (this.prevLineDash !== nextLineDash) {\r\n      this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);\r\n      this.prevLineDash = nextLineDash;\r\n    }\r\n  };\r\n})(jsPDF.API);\r\n","/**\n * @license\n * jsPDF filters PlugIn\n * Copyright (c) 2014 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var ASCII85Encode = function(a) {\n    var b, c, d, e, f, g, h, i, j, k;\n    // eslint-disable-next-line no-control-regex\n    for (\n      !/[^\\x00-\\xFF]/.test(a),\n        b = \"\\x00\\x00\\x00\\x00\".slice(a.length % 4 || 4),\n        a += b,\n        c = [],\n        d = 0,\n        e = a.length;\n      e > d;\n      d += 4\n    )\n      (f =\n        (a.charCodeAt(d) << 24) +\n        (a.charCodeAt(d + 1) << 16) +\n        (a.charCodeAt(d + 2) << 8) +\n        a.charCodeAt(d + 3)),\n        0 !== f\n          ? ((k = f % 85),\n            (f = (f - k) / 85),\n            (j = f % 85),\n            (f = (f - j) / 85),\n            (i = f % 85),\n            (f = (f - i) / 85),\n            (h = f % 85),\n            (f = (f - h) / 85),\n            (g = f % 85),\n            c.push(g + 33, h + 33, i + 33, j + 33, k + 33))\n          : c.push(122);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(c, b.length),\n      String.fromCharCode.apply(String, c) + \"~>\"\n    );\n  };\n\n  var ASCII85Decode = function(a) {\n    var c,\n      d,\n      e,\n      f,\n      g,\n      h = String,\n      l = \"length\",\n      w = 255,\n      x = \"charCodeAt\",\n      y = \"slice\",\n      z = \"replace\";\n    for (\n      \"~>\" === a[y](-2),\n        a = a[y](0, -2)\n          [z](/\\s/g, \"\")\n          [z](\"z\", \"!!!!!\"),\n        c = \"uuuuu\"[y](a[l] % 5 || 5),\n        a += c,\n        e = [],\n        f = 0,\n        g = a[l];\n      g > f;\n      f += 5\n    )\n      (d =\n        52200625 * (a[x](f) - 33) +\n        614125 * (a[x](f + 1) - 33) +\n        7225 * (a[x](f + 2) - 33) +\n        85 * (a[x](f + 3) - 33) +\n        (a[x](f + 4) - 33)),\n        e.push(w & (d >> 24), w & (d >> 16), w & (d >> 8), w & d);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(e, c[l]),\n      h.fromCharCode.apply(h, e)\n    );\n  };\n\n  var ASCIIHexEncode = function(value) {\n    return (\n      value\n        .split(\"\")\n        .map(function(value) {\n          return (\"0\" + value.charCodeAt().toString(16)).slice(-2);\n        })\n        .join(\"\") + \">\"\n    );\n  };\n\n  var ASCIIHexDecode = function(value) {\n    var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);\n    value = value.replace(/\\s/g, \"\");\n    if (value.indexOf(\">\") !== -1) {\n      value = value.substr(0, value.indexOf(\">\"));\n    }\n    if (value.length % 2) {\n      value += \"0\";\n    }\n    if (regexCheckIfHex.test(value) === false) {\n      return \"\";\n    }\n    var result = \"\";\n    for (var i = 0; i < value.length; i += 2) {\n      result += String.fromCharCode(\"0x\" + (value[i] + value[i + 1]));\n    }\n    return result;\n  };\n  /*\n  var FlatePredictors = {\n      None: 1,\n      TIFF: 2,\n      PNG_None: 10,\n      PNG_Sub: 11,\n      PNG_Up: 12,\n      PNG_Average: 13,\n      PNG_Paeth: 14,\n      PNG_Optimum: 15\n  };\n  */\n\n  var FlateEncode = function(data) {\n    var arr = new Uint8Array(data.length);\n    var i = data.length;\n    while (i--) {\n      arr[i] = data.charCodeAt(i);\n    }\n    arr = zlibSync(arr);\n    data = arr.reduce(function(data, byte) {\n      return data + String.fromCharCode(byte);\n    }, \"\");\n    return data;\n  };\n\n  jsPDFAPI.processDataByFilters = function(origData, filterChain) {\n    \"use strict\";\n    var i = 0;\n    var data = origData || \"\";\n    var reverseChain = [];\n    filterChain = filterChain || [];\n\n    if (typeof filterChain === \"string\") {\n      filterChain = [filterChain];\n    }\n\n    for (i = 0; i < filterChain.length; i += 1) {\n      switch (filterChain[i]) {\n        case \"ASCII85Decode\":\n        case \"/ASCII85Decode\":\n          data = ASCII85Decode(data);\n          reverseChain.push(\"/ASCII85Encode\");\n          break;\n        case \"ASCII85Encode\":\n        case \"/ASCII85Encode\":\n          data = ASCII85Encode(data);\n          reverseChain.push(\"/ASCII85Decode\");\n          break;\n        case \"ASCIIHexDecode\":\n        case \"/ASCIIHexDecode\":\n          data = ASCIIHexDecode(data);\n          reverseChain.push(\"/ASCIIHexEncode\");\n          break;\n        case \"ASCIIHexEncode\":\n        case \"/ASCIIHexEncode\":\n          data = ASCIIHexEncode(data);\n          reverseChain.push(\"/ASCIIHexDecode\");\n          break;\n        case \"FlateEncode\":\n        case \"/FlateEncode\":\n          data = FlateEncode(data);\n          reverseChain.push(\"/FlateDecode\");\n          break;\n        default:\n          throw new Error(\n            'The filter: \"' + filterChain[i] + '\" is not implemented'\n          );\n      }\n    }\n\n    return { data: data, reverseChain: reverseChain.reverse().join(\" \") };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF fileloading PlugIn\n * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name fileloading\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name loadFile\n   * @function\n   * @param {string} url\n   * @param {boolean} sync\n   * @param {function} callback\n   * @returns {string|undefined} result\n   */\n  jsPDFAPI.loadFile = function(url, sync, callback) {\n\n    // eslint-disable-next-line no-unreachable\n    return nodeReadFile(url, sync, callback);\n  };\n\n  /**\n   * @name loadImageFile\n   * @function\n   * @param {string} path\n   * @param {boolean} sync\n   * @param {function} callback\n   */\n  jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;\n\n  function browserRequest(url, sync, callback) {\n    sync = sync === false ? false : true;\n    callback = typeof callback === \"function\" ? callback : function() {};\n    var result = undefined;\n\n    var xhr = function(url, sync, callback) {\n      var request = new XMLHttpRequest();\n      var i = 0;\n\n      var sanitizeUnicode = function(data) {\n        var dataLength = data.length;\n        var charArray = [];\n        var StringFromCharCode = String.fromCharCode;\n\n        //Transform Unicode to ASCII\n        for (i = 0; i < dataLength; i += 1) {\n          charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff));\n        }\n        return charArray.join(\"\");\n      };\n\n      request.open(\"GET\", url, !sync);\n      // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]\n      request.overrideMimeType(\"text/plain; charset=x-user-defined\");\n\n      if (sync === false) {\n        request.onload = function() {\n          if (request.status === 200) {\n            callback(sanitizeUnicode(this.responseText));\n          } else {\n            callback(undefined);\n          }\n        };\n      }\n      request.send(null);\n\n      if (sync && request.status === 200) {\n        return sanitizeUnicode(request.responseText);\n      }\n    };\n    try {\n      result = xhr(url, sync, callback);\n      // eslint-disable-next-line no-empty\n    } catch (e) {}\n    return result;\n  }\n\n  function nodeReadFile(url, sync, callback) {\n    sync = sync === false ? false : true;\n    var result = undefined;\n\n    var fs = require(\"fs\");\n    var path = require(\"path\");\n\n    url = path.resolve(url);\n    if (sync) {\n      try {\n        result = fs.readFileSync(url, { encoding: \"latin1\" });\n      } catch (e) {\n        return undefined;\n      }\n    } else {\n      fs.readFile(url, { encoding: \"latin1\" }, function(err, data) {\n        if (!callback) {\n          return;\n        }\n        if (err) {\n          callback(undefined);\n        }\n        callback(data);\n      });\n    }\n\n    return result;\n  }\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2018 Erik Koopmans\n * Released under the MIT License.\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { normalizeFontFace } from \"../libs/fontFace.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF html PlugIn\n *\n * @name html\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadHtml2Canvas() {\n    return (function() {\n      if (globalObject[\"html2canvas\"]) {\n        return Promise.resolve(globalObject[\"html2canvas\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"html2canvas\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"html2canvas\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load html2canvas\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load html2canvas: \" + e));\n      })\n      .then(function(html2canvas) {\n        return html2canvas.default ? html2canvas.default : html2canvas;\n      });\n  }\n\n  function loadDomPurify() {\n    return (function() {\n      if (globalObject[\"DOMPurify\"]) {\n        return Promise.resolve(globalObject[\"DOMPurify\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"dompurify\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"dompurify\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load dompurify\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load dompurify: \" + e));\n      })\n      .then(function(dompurify) {\n        return dompurify.default ? dompurify.default : dompurify;\n      });\n  }\n\n  /**\n   * Determine the type of a variable/object.\n   *\n   * @private\n   * @ignore\n   */\n  var objType = function(obj) {\n    var type = typeof obj;\n    if (type === \"undefined\") return \"undefined\";\n    else if (type === \"string\" || obj instanceof String) return \"string\";\n    else if (type === \"number\" || obj instanceof Number) return \"number\";\n    else if (type === \"function\" || obj instanceof Function) return \"function\";\n    else if (!!obj && obj.constructor === Array) return \"array\";\n    else if (obj && obj.nodeType === 1) return \"element\";\n    else if (type === \"object\") return \"object\";\n    else return \"unknown\";\n  };\n\n  /**\n   * Create an HTML element with optional className, innerHTML, and style.\n   *\n   * @private\n   * @ignore\n   */\n  var createElement = function(tagName, opt) {\n    var el = document.createElement(tagName);\n    if (opt.className) el.className = opt.className;\n    if (opt.innerHTML && opt.dompurify) {\n      el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);\n    }\n    for (var key in opt.style) {\n      el.style[key] = opt.style[key];\n    }\n    return el;\n  };\n\n  /**\n   * Deep-clone a node and preserve contents/properties.\n   *\n   * @private\n   * @ignore\n   */\n  var cloneNode = function(node, javascriptEnabled) {\n    // Recursively clone the node.\n    var clone =\n      node.nodeType === 3\n        ? document.createTextNode(node.nodeValue)\n        : node.cloneNode(false);\n    for (var child = node.firstChild; child; child = child.nextSibling) {\n      if (\n        javascriptEnabled === true ||\n        child.nodeType !== 1 ||\n        child.nodeName !== \"SCRIPT\"\n      ) {\n        clone.appendChild(cloneNode(child, javascriptEnabled));\n      }\n    }\n\n    if (node.nodeType === 1) {\n      // Preserve contents/properties of special nodes.\n      if (node.nodeName === \"CANVAS\") {\n        clone.width = node.width;\n        clone.height = node.height;\n        clone.getContext(\"2d\").drawImage(node, 0, 0);\n      } else if (node.nodeName === \"TEXTAREA\" || node.nodeName === \"SELECT\") {\n        clone.value = node.value;\n      }\n\n      // Preserve the node's scroll position when it loads.\n      clone.addEventListener(\n        \"load\",\n        function() {\n          clone.scrollTop = node.scrollTop;\n          clone.scrollLeft = node.scrollLeft;\n        },\n        true\n      );\n    }\n\n    // Return the cloned node.\n    return clone;\n  };\n\n  /* ----- CONSTRUCTOR ----- */\n\n  var Worker = function Worker(opt) {\n    // Create the root parent for the proto chain, and the starting Worker.\n    var root = Object.assign(\n      Worker.convert(Promise.resolve()),\n      JSON.parse(JSON.stringify(Worker.template))\n    );\n    var self = Worker.convert(Promise.resolve(), root);\n\n    // Set progress, optional settings, and return.\n    self = self.setProgress(1, Worker, 1, [Worker]);\n    self = self.set(opt);\n    return self;\n  };\n\n  // Boilerplate for subclassing Promise.\n  Worker.prototype = Object.create(Promise.prototype);\n  Worker.prototype.constructor = Worker;\n\n  // Converts/casts promises into Workers.\n  Worker.convert = function convert(promise, inherit) {\n    // Uses prototypal inheritance to receive changes made to ancestors' properties.\n    promise.__proto__ = inherit || Worker.prototype;\n    return promise;\n  };\n\n  Worker.template = {\n    prop: {\n      src: null,\n      container: null,\n      overlay: null,\n      canvas: null,\n      img: null,\n      pdf: null,\n      pageSize: null,\n      callback: function() {}\n    },\n    progress: {\n      val: 0,\n      state: null,\n      n: 0,\n      stack: []\n    },\n    opt: {\n      filename: \"file.pdf\",\n      margin: [0, 0, 0, 0],\n      enableLinks: true,\n      x: 0,\n      y: 0,\n      html2canvas: {},\n      jsPDF: {},\n      backgroundColor: \"transparent\"\n    }\n  };\n\n  /* ----- FROM / TO ----- */\n\n  Worker.prototype.from = function from(src, type) {\n    function getType(src) {\n      switch (objType(src)) {\n        case \"string\":\n          return \"string\";\n        case \"element\":\n          return src.nodeName.toLowerCase() === \"canvas\" ? \"canvas\" : \"element\";\n        default:\n          return \"unknown\";\n      }\n    }\n\n    return this.then(function from_main() {\n      type = type || getType(src);\n      switch (type) {\n        case \"string\":\n          return this.then(loadDomPurify).then(function(dompurify) {\n            return this.set({\n              src: createElement(\"div\", {\n                innerHTML: src,\n                dompurify: dompurify\n              })\n            });\n          });\n        case \"element\":\n          return this.set({ src: src });\n        case \"canvas\":\n          return this.set({ canvas: src });\n        case \"img\":\n          return this.set({ img: src });\n        default:\n          return this.error(\"Unknown source type.\");\n      }\n    });\n  };\n\n  Worker.prototype.to = function to(target) {\n    // Route the 'to' request to the appropriate method.\n    switch (target) {\n      case \"container\":\n        return this.toContainer();\n      case \"canvas\":\n        return this.toCanvas();\n      case \"img\":\n        return this.toImg();\n      case \"pdf\":\n        return this.toPdf();\n      default:\n        return this.error(\"Invalid target.\");\n    }\n  };\n\n  Worker.prototype.toContainer = function toContainer() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkSrc() {\n        return (\n          this.prop.src || this.error(\"Cannot duplicate - no source HTML.\")\n        );\n      },\n      function checkPageSize() {\n        return this.prop.pageSize || this.setPageSize();\n      }\n    ];\n    return this.thenList(prereqs).then(function toContainer_main() {\n      // Define the CSS styles for the container and its overlay parent.\n      var overlayCSS = {\n        position: \"fixed\",\n        overflow: \"hidden\",\n        zIndex: 1000,\n        left: \"-100000px\",\n        right: 0,\n        bottom: 0,\n        top: 0\n      };\n      var containerCSS = {\n        position: \"relative\",\n        display: \"inline-block\",\n        width:\n          (typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.windowWidth\n            : Math.max(\n                this.prop.src.clientWidth,\n                this.prop.src.scrollWidth,\n                this.prop.src.offsetWidth\n              )) + \"px\",\n        left: 0,\n        right: 0,\n        top: 0,\n        margin: \"auto\",\n        backgroundColor: this.opt.backgroundColor\n      }; // Set the overlay to hidden (could be changed in the future to provide a print preview).\n\n      var source = cloneNode(\n        this.prop.src,\n        this.opt.html2canvas.javascriptEnabled\n      );\n\n      if (source.tagName === \"BODY\") {\n        containerCSS.height =\n          Math.max(\n            document.body.scrollHeight,\n            document.body.offsetHeight,\n            document.documentElement.clientHeight,\n            document.documentElement.scrollHeight,\n            document.documentElement.offsetHeight\n          ) + \"px\";\n      }\n\n      this.prop.overlay = createElement(\"div\", {\n        className: \"html2pdf__overlay\",\n        style: overlayCSS\n      });\n      this.prop.container = createElement(\"div\", {\n        className: \"html2pdf__container\",\n        style: containerCSS\n      });\n      this.prop.container.appendChild(source);\n      this.prop.container.firstChild.appendChild(\n        createElement(\"div\", {\n          style: {\n            clear: \"both\",\n            border: \"0 none transparent\",\n            margin: 0,\n            padding: 0,\n            height: 0\n          }\n        })\n      );\n      this.prop.container.style.float = \"none\";\n      this.prop.overlay.appendChild(this.prop.container);\n      document.body.appendChild(this.prop.overlay);\n      this.prop.container.firstChild.style.position = \"relative\";\n      this.prop.container.height =\n        Math.max(\n          this.prop.container.firstChild.clientHeight,\n          this.prop.container.firstChild.scrollHeight,\n          this.prop.container.firstChild.offsetHeight\n        ) + \"px\";\n    });\n  };\n\n  Worker.prototype.toCanvas = function toCanvas() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toCanvas_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var options = Object.assign({}, this.opt.html2canvas);\n        delete options.onrendered;\n\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toCanvas_post(canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toContext2d = function toContext2d() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toContext2d_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n\n        var pdf = this.opt.jsPDF;\n        var fontFaces = this.opt.fontFaces;\n\n        var scale =\n          typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.width / this.opt.windowWidth\n            : 1;\n\n        var options = Object.assign(\n          {\n            async: true,\n            allowTaint: true,\n            scale: scale,\n            scrollX: this.opt.scrollX || 0,\n            scrollY: this.opt.scrollY || 0,\n            backgroundColor: \"#ffffff\",\n            imageTimeout: 15000,\n            logging: true,\n            proxy: null,\n            removeContainer: true,\n            foreignObjectRendering: false,\n            useCORS: false\n          },\n          this.opt.html2canvas\n        );\n        delete options.onrendered;\n\n        pdf.context2d.autoPaging =\n          typeof this.opt.autoPaging === \"undefined\"\n            ? true\n            : this.opt.autoPaging;\n        pdf.context2d.posX = this.opt.x;\n        pdf.context2d.posY = this.opt.y;\n        pdf.context2d.margin = this.opt.margin;\n        pdf.context2d.fontFaces = fontFaces;\n\n        if (fontFaces) {\n          for (var i = 0; i < fontFaces.length; ++i) {\n            var font = fontFaces[i];\n            var src = font.src.find(function(src) {\n              return src.format === \"truetype\";\n            });\n\n            if (src) {\n              pdf.addFont(src.url, font.ref.name, font.ref.style);\n            }\n          }\n        }\n\n        options.windowHeight = options.windowHeight || 0;\n        options.windowHeight =\n          options.windowHeight == 0\n            ? Math.max(\n                this.prop.container.clientHeight,\n                this.prop.container.scrollHeight,\n                this.prop.container.offsetHeight\n              )\n            : options.windowHeight;\n\n        pdf.context2d.save(true);\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toContext2d_post(canvas) {\n        this.opt.jsPDF.context2d.restore(true);\n\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toImg = function toImg() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkCanvas() {\n        return this.prop.canvas || this.toCanvas();\n      }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toImg_main() {\n      var imgData = this.prop.canvas.toDataURL(\n        \"image/\" + this.opt.image.type,\n        this.opt.image.quality\n      );\n      this.prop.img = document.createElement(\"img\");\n      this.prop.img.src = imgData;\n    });\n  };\n\n  Worker.prototype.toPdf = function toPdf() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContext2d() {\n        return this.toContext2d();\n      }\n      //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toPdf_main() {\n      // Create local copies of frequently used properties.\n      this.prop.pdf = this.prop.pdf || this.opt.jsPDF;\n    });\n  };\n\n  /* ----- OUTPUT / SAVE ----- */\n\n  Worker.prototype.output = function output(type, options, src) {\n    // Redirect requests to the correct function (outputPdf / outputImg).\n    src = src || \"pdf\";\n    if (src.toLowerCase() === \"img\" || src.toLowerCase() === \"image\") {\n      return this.outputImg(type, options);\n    } else {\n      return this.outputPdf(type, options);\n    }\n  };\n\n  Worker.prototype.outputPdf = function outputPdf(type, options) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputPdf_main() {\n      /* Currently implemented output types:\n       *    https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992\n       *  save(options), arraybuffer, blob, bloburi/bloburl,\n       *  datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl\n       */\n      return this.prop.pdf.output(type, options);\n    });\n  };\n\n  Worker.prototype.outputImg = function outputImg(type) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkImg() {\n        return this.prop.img || this.toImg();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputImg_main() {\n      switch (type) {\n        case undefined:\n        case \"img\":\n          return this.prop.img;\n        case \"datauristring\":\n        case \"dataurlstring\":\n          return this.prop.img.src;\n        case \"datauri\":\n        case \"dataurl\":\n          return (document.location.href = this.prop.img.src);\n        default:\n          throw 'Image output type \"' + type + '\" is not supported.';\n      }\n    });\n  };\n\n  Worker.prototype.save = function save(filename) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs)\n      .set(filename ? { filename: filename } : null)\n      .then(function save_main() {\n        this.prop.pdf.save(this.opt.filename);\n      });\n  };\n\n  Worker.prototype.doCallback = function doCallback() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs).then(function doCallback_main() {\n      this.prop.callback(this.prop.pdf);\n    });\n  };\n\n  /* ----- SET / GET ----- */\n\n  Worker.prototype.set = function set(opt) {\n    // TODO: Implement ordered pairs?\n\n    // Silently ignore invalid or empty input.\n    if (objType(opt) !== \"object\") {\n      return this;\n    }\n\n    // Build an array of setter functions to queue.\n    var fns = Object.keys(opt || {}).map(function(key) {\n      if (key in Worker.template.prop) {\n        // Set pre-defined properties.\n        return function set_prop() {\n          this.prop[key] = opt[key];\n        };\n      } else {\n        switch (key) {\n          case \"margin\":\n            return this.setMargin.bind(this, opt.margin);\n          case \"jsPDF\":\n            return function set_jsPDF() {\n              this.opt.jsPDF = opt.jsPDF;\n              return this.setPageSize();\n            };\n          case \"pageSize\":\n            return this.setPageSize.bind(this, opt.pageSize);\n          default:\n            // Set any other properties in opt.\n            return function set_opt() {\n              this.opt[key] = opt[key];\n            };\n        }\n      }\n    }, this);\n\n    // Set properties within the promise chain.\n    return this.then(function set_main() {\n      return this.thenList(fns);\n    });\n  };\n\n  Worker.prototype.get = function get(key, cbk) {\n    return this.then(function get_main() {\n      // Fetch the requested property, either as a predefined prop or in opt.\n      var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];\n      return cbk ? cbk(val) : val;\n    });\n  };\n\n  Worker.prototype.setMargin = function setMargin(margin) {\n    return this.then(function setMargin_main() {\n      // Parse the margin property.\n      switch (objType(margin)) {\n        case \"number\":\n          margin = [margin, margin, margin, margin];\n        // eslint-disable-next-line no-fallthrough\n        case \"array\":\n          if (margin.length === 2) {\n            margin = [margin[0], margin[1], margin[0], margin[1]];\n          }\n          if (margin.length === 4) {\n            break;\n          }\n        // eslint-disable-next-line no-fallthrough\n        default:\n          return this.error(\"Invalid margin array.\");\n      }\n\n      // Set the margin property, then update pageSize.\n      this.opt.margin = margin;\n    }).then(this.setPageSize);\n  };\n\n  Worker.prototype.setPageSize = function setPageSize(pageSize) {\n    function toPx(val, k) {\n      return Math.floor(((val * k) / 72) * 96);\n    }\n\n    return this.then(function setPageSize_main() {\n      // Retrieve page-size based on jsPDF settings, if not explicitly provided.\n      pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF);\n\n      // Add 'inner' field if not present.\n      if (!pageSize.hasOwnProperty(\"inner\")) {\n        pageSize.inner = {\n          width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],\n          height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]\n        };\n        pageSize.inner.px = {\n          width: toPx(pageSize.inner.width, pageSize.k),\n          height: toPx(pageSize.inner.height, pageSize.k)\n        };\n        pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;\n      }\n\n      // Attach pageSize to this.\n      this.prop.pageSize = pageSize;\n    });\n  };\n\n  Worker.prototype.setProgress = function setProgress(val, state, n, stack) {\n    // Immediately update all progress values.\n    if (val != null) this.progress.val = val;\n    if (state != null) this.progress.state = state;\n    if (n != null) this.progress.n = n;\n    if (stack != null) this.progress.stack = stack;\n    this.progress.ratio = this.progress.val / this.progress.state;\n\n    // Return this for command chaining.\n    return this;\n  };\n\n  Worker.prototype.updateProgress = function updateProgress(\n    val,\n    state,\n    n,\n    stack\n  ) {\n    // Immediately update all progress values, using setProgress.\n    return this.setProgress(\n      val ? this.progress.val + val : null,\n      state ? state : null,\n      n ? this.progress.n + n : null,\n      stack ? this.progress.stack.concat(stack) : null\n    );\n  };\n\n  /* ----- PROMISE MAPPING ----- */\n\n  Worker.prototype.then = function then(onFulfilled, onRejected) {\n    // Wrap `this` for encapsulation.\n    var self = this;\n\n    return this.thenCore(onFulfilled, onRejected, function then_main(\n      onFulfilled,\n      onRejected\n    ) {\n      // Update progress while queuing, calling, and resolving `then`.\n      self.updateProgress(null, null, 1, [onFulfilled]);\n      return Promise.prototype.then\n        .call(this, function then_pre(val) {\n          self.updateProgress(null, onFulfilled);\n          return val;\n        })\n        .then(onFulfilled, onRejected)\n        .then(function then_post(val) {\n          self.updateProgress(1);\n          return val;\n        });\n    });\n  };\n\n  Worker.prototype.thenCore = function thenCore(\n    onFulfilled,\n    onRejected,\n    thenBase\n  ) {\n    // Handle optional thenBase parameter.\n    thenBase = thenBase || Promise.prototype.then;\n\n    // Wrap `this` for encapsulation and bind it to the promise handlers.\n    var self = this;\n    if (onFulfilled) {\n      onFulfilled = onFulfilled.bind(self);\n    }\n    if (onRejected) {\n      onRejected = onRejected.bind(self);\n    }\n\n    // Cast self into a Promise to avoid polyfills recursively defining `then`.\n    var isNative =\n      Promise.toString().indexOf(\"[native code]\") !== -1 &&\n      Promise.name === \"Promise\";\n    var selfPromise = isNative\n      ? self\n      : Worker.convert(Object.assign({}, self), Promise.prototype);\n\n    // Return the promise, after casting it into a Worker and preserving props.\n    var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);\n    return Worker.convert(returnVal, self.__proto__);\n  };\n\n  Worker.prototype.thenExternal = function thenExternal(\n    onFulfilled,\n    onRejected\n  ) {\n    // Call `then` and return a standard promise (exits the Worker chain).\n    return Promise.prototype.then.call(this, onFulfilled, onRejected);\n  };\n\n  Worker.prototype.thenList = function thenList(fns) {\n    // Queue a series of promise 'factories' into the promise chain.\n    var self = this;\n    fns.forEach(function thenList_forEach(fn) {\n      self = self.thenCore(fn);\n    });\n    return self;\n  };\n\n  Worker.prototype[\"catch\"] = function(onRejected) {\n    // Bind `this` to the promise handler, call `catch`, and return a Worker.\n    if (onRejected) {\n      onRejected = onRejected.bind(this);\n    }\n    var returnVal = Promise.prototype[\"catch\"].call(this, onRejected);\n    return Worker.convert(returnVal, this);\n  };\n\n  Worker.prototype.catchExternal = function catchExternal(onRejected) {\n    // Call `catch` and return a standard promise (exits the Worker chain).\n    return Promise.prototype[\"catch\"].call(this, onRejected);\n  };\n\n  Worker.prototype.error = function error(msg) {\n    // Throw the error in the Promise chain.\n    return this.then(function error_main() {\n      throw new Error(msg);\n    });\n  };\n\n  /* ----- ALIASES ----- */\n\n  Worker.prototype.using = Worker.prototype.set;\n  Worker.prototype.saveAs = Worker.prototype.save;\n  Worker.prototype.export = Worker.prototype.output;\n  Worker.prototype.run = Worker.prototype.then;\n\n  // Get dimensions of a PDF page, as determined by jsPDF.\n  jsPDF.getPageSize = function(orientation, unit, format) {\n    // Decode options object\n    if (typeof orientation === \"object\") {\n      var options = orientation;\n      orientation = options.orientation;\n      unit = options.unit || unit;\n      format = options.format || format;\n    }\n\n    // Default options\n    unit = unit || \"mm\";\n    format = format || \"a4\";\n    orientation = (\"\" + (orientation || \"P\")).toLowerCase();\n    var format_as_string = (\"\" + format).toLowerCase();\n\n    // Size in pt of various paper formats\n    var pageFormats = {\n      a0: [2383.94, 3370.39],\n      a1: [1683.78, 2383.94],\n      a2: [1190.55, 1683.78],\n      a3: [841.89, 1190.55],\n      a4: [595.28, 841.89],\n      a5: [419.53, 595.28],\n      a6: [297.64, 419.53],\n      a7: [209.76, 297.64],\n      a8: [147.4, 209.76],\n      a9: [104.88, 147.4],\n      a10: [73.7, 104.88],\n      b0: [2834.65, 4008.19],\n      b1: [2004.09, 2834.65],\n      b2: [1417.32, 2004.09],\n      b3: [1000.63, 1417.32],\n      b4: [708.66, 1000.63],\n      b5: [498.9, 708.66],\n      b6: [354.33, 498.9],\n      b7: [249.45, 354.33],\n      b8: [175.75, 249.45],\n      b9: [124.72, 175.75],\n      b10: [87.87, 124.72],\n      c0: [2599.37, 3676.54],\n      c1: [1836.85, 2599.37],\n      c2: [1298.27, 1836.85],\n      c3: [918.43, 1298.27],\n      c4: [649.13, 918.43],\n      c5: [459.21, 649.13],\n      c6: [323.15, 459.21],\n      c7: [229.61, 323.15],\n      c8: [161.57, 229.61],\n      c9: [113.39, 161.57],\n      c10: [79.37, 113.39],\n      dl: [311.81, 623.62],\n      letter: [612, 792],\n      \"government-letter\": [576, 756],\n      legal: [612, 1008],\n      \"junior-legal\": [576, 360],\n      ledger: [1224, 792],\n      tabloid: [792, 1224],\n      \"credit-card\": [153, 243]\n    };\n\n    var k;\n    // Unit conversion\n    switch (unit) {\n      case \"pt\":\n        k = 1;\n        break;\n      case \"mm\":\n        k = 72 / 25.4;\n        break;\n      case \"cm\":\n        k = 72 / 2.54;\n        break;\n      case \"in\":\n        k = 72;\n        break;\n      case \"px\":\n        k = 72 / 96;\n        break;\n      case \"pc\":\n        k = 12;\n        break;\n      case \"em\":\n        k = 12;\n        break;\n      case \"ex\":\n        k = 6;\n        break;\n      default:\n        throw \"Invalid unit: \" + unit;\n    }\n    var pageHeight = 0;\n    var pageWidth = 0;\n\n    // Dimensions are stored as user units and converted to points on output\n    if (pageFormats.hasOwnProperty(format_as_string)) {\n      pageHeight = pageFormats[format_as_string][1] / k;\n      pageWidth = pageFormats[format_as_string][0] / k;\n    } else {\n      try {\n        pageHeight = format[1];\n        pageWidth = format[0];\n      } catch (err) {\n        throw new Error(\"Invalid format: \" + format);\n      }\n    }\n\n    var tmp;\n    // Handle page orientation\n    if (orientation === \"p\" || orientation === \"portrait\") {\n      orientation = \"p\";\n      if (pageWidth > pageHeight) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else if (orientation === \"l\" || orientation === \"landscape\") {\n      orientation = \"l\";\n      if (pageHeight > pageWidth) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else {\n      throw \"Invalid orientation: \" + orientation;\n    }\n\n    // Return information (k is the unit conversion ratio from pts)\n    var info = {\n      width: pageWidth,\n      height: pageHeight,\n      unit: unit,\n      k: k,\n      orientation: orientation\n    };\n    return info;\n  };\n\n  /**\n   * @typedef FontFace\n   *\n   * The font-face type implements an interface similar to that of the font-face CSS rule,\n   * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D\n   * is updated.\n   *\n   * All properties expect values similar to those in the font-face CSS rule. A difference\n   * is the font-family, which do not need to be enclosed in double-quotes when containing\n   * spaces like in CSS.\n   *\n   * @property {string} family The name of the font-family.\n   * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.\n   * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)\n   * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.\n   * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.\n   * @property {string} [src] url A URL to a font of a specific format.\n   * @property {string} [src] format Format of the font referenced by the URL.\n   */\n\n  /**\n   * Generate a PDF from an HTML element or string using.\n   *\n   * @name html\n   * @function\n   * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.\n   * @param {Object} [options] Collection of settings\n   * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance\n   * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.\n   * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.\n   * <ul>\n   * <li>\n   *   <code>false</code>: Auto paging is disabled.\n   * </li>\n   * <li>\n   *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\n   *   slice text in half, making it difficult to read.\n   * </li>\n   * <li>\n   *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\n   *   mostly of a single column of text.\n   * </li>\n   * </ul>\n   * Default is <code>true</code>.\n   * @param {string} [options.filename] name of the file\n   * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image\n   * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options\n   * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.\n   * @param {jsPDF} [options.jsPDF] jsPDF instance\n   * @param {number=} [options.x] x position on the PDF document in jsPDF units.\n   * @param {number=} [options.y] y position on the PDF document in jsPDF units.\n   * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be\n   * scaled such that it fits into the specified width. Has no effect if either the <code>html2canvas.scale<code> is\n   * specified or the <code>windowWidth</code> option is NOT specified.\n   * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the\n   * <code>html2canvas.windowWidth</code> option, this option affects the actual container size while rendering and\n   * does NOT affect CSS media queries. This option only has an effect, if the <code>width<code> option is also specified.\n   *\n   * @example\n   * var doc = new jsPDF();\n   *\n   * doc.html(document.body, {\n   *    callback: function (doc) {\n   *      doc.save();\n   *    },\n   *    x: 10,\n   *    y: 10\n   * });\n   */\n  jsPDFAPI.html = function(src, options) {\n    \"use strict\";\n\n    options = options || {};\n    options.callback = options.callback || function() {};\n    options.html2canvas = options.html2canvas || {};\n    options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;\n    options.jsPDF = options.jsPDF || this;\n    options.fontFaces = options.fontFaces\n      ? options.fontFaces.map(normalizeFontFace)\n      : null;\n\n    // Create a new worker with the given options.\n    var worker = new Worker(options);\n\n    if (!options.worker) {\n      // If worker is not set to true, perform the traditional 'simple' operation.\n      return worker.from(src).doCallback();\n    } else {\n      // Otherwise, return the worker for new Promise-based operation.\n      return worker;\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Outline PlugIn\n *\n * Generates a PDF Outline\n * @name outline\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namesOid;\n  //var destsGoto = [];\n\n  jsPDFAPI.events.push([\n    \"postPutResources\",\n    function() {\n      var pdf = this;\n      var rx = /^(\\d+) 0 obj$/;\n\n      // Write action goto objects for each page\n      // this.outline.destsGoto = [];\n      // for (var i = 0; i < totalPages; i++) {\n      // var id = pdf.internal.newObject();\n      // this.outline.destsGoto.push(id);\n      // pdf.internal.write(\"<</D[\" + (i * 2 + 3) + \" 0 R /XYZ null\n      // null null]/S/GoTo>> endobj\");\n      // }\n      //\n      // for (var i = 0; i < dests.length; i++) {\n      // pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0\n      // R\");\n      // }\n      //\n      if (this.outline.root.children.length > 0) {\n        var lines = pdf.outline.render().split(/\\r\\n/);\n        for (var i = 0; i < lines.length; i++) {\n          var line = lines[i];\n          var m = rx.exec(line);\n          if (m != null) {\n            var oid = m[1];\n            pdf.internal.newObjectDeferredBegin(oid, false);\n          }\n          pdf.internal.write(line);\n        }\n      }\n\n      // This code will write named destination for each page reference\n      // (page_1, etc)\n      if (this.outline.createNamedDestinations) {\n        var totalPages = this.internal.pages.length;\n        // WARNING: this assumes jsPDF starts on page 3 and pageIDs\n        // follow 5, 7, 9, etc\n        // Write destination objects for each page\n        var dests = [];\n        for (var i = 0; i < totalPages; i++) {\n          var id = pdf.internal.newObject();\n          dests.push(id);\n          var info = pdf.internal.getPageInfo(i + 1);\n          pdf.internal.write(\n            \"<< /D[\" + info.objId + \" 0 R /XYZ null null null]>> endobj\"\n          );\n        }\n\n        // assign a name for each destination\n        var names2Oid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Names [ \");\n        for (var i = 0; i < dests.length; i++) {\n          pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0 R\");\n        }\n        pdf.internal.write(\" ] >>\", \"endobj\");\n\n        // var kids = pdf.internal.newObject();\n        // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');\n        // pdf.internal.write(' ] >>', 'endobj');\n\n        namesOid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Dests \" + names2Oid + \" 0 R\");\n        pdf.internal.write(\">>\", \"endobj\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putCatalog\",\n    function() {\n      var pdf = this;\n      if (pdf.outline.root.children.length > 0) {\n        pdf.internal.write(\n          \"/Outlines\",\n          this.outline.makeRef(this.outline.root)\n        );\n        if (this.outline.createNamedDestinations) {\n          pdf.internal.write(\"/Names \" + namesOid + \" 0 R\");\n        }\n        // Open with Bookmarks showing\n        // pdf.internal.write(\"/PageMode /UseOutlines\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      var pdf = this;\n\n      pdf.outline = {\n        createNamedDestinations: false,\n        root: {\n          children: []\n        }\n      };\n\n      /**\n       * Options: pageNumber\n       */\n      pdf.outline.add = function(parent, title, options) {\n        var item = {\n          title: title,\n          options: options,\n          children: []\n        };\n        if (parent == null) {\n          parent = this.root;\n        }\n        parent.children.push(item);\n        return item;\n      };\n\n      pdf.outline.render = function() {\n        this.ctx = {};\n        this.ctx.val = \"\";\n        this.ctx.pdf = pdf;\n\n        this.genIds_r(this.root);\n        this.renderRoot(this.root);\n        this.renderItems(this.root);\n\n        return this.ctx.val;\n      };\n\n      pdf.outline.genIds_r = function(node) {\n        node.id = pdf.internal.newObjectDeferred();\n        for (var i = 0; i < node.children.length; i++) {\n          this.genIds_r(node.children[i]);\n        }\n      };\n\n      pdf.outline.renderRoot = function(node) {\n        this.objStart(node);\n        this.line(\"/Type /Outlines\");\n        if (node.children.length > 0) {\n          this.line(\"/First \" + this.makeRef(node.children[0]));\n          this.line(\n            \"/Last \" + this.makeRef(node.children[node.children.length - 1])\n          );\n        }\n        this.line(\n          \"/Count \" +\n            this.count_r(\n              {\n                count: 0\n              },\n              node\n            )\n        );\n        this.objEnd();\n      };\n\n      pdf.outline.renderItems = function(node) {\n        var getVerticalCoordinateString = this.ctx.pdf.internal\n          .getVerticalCoordinateString;\n        for (var i = 0; i < node.children.length; i++) {\n          var item = node.children[i];\n          this.objStart(item);\n\n          this.line(\"/Title \" + this.makeString(item.title));\n\n          this.line(\"/Parent \" + this.makeRef(node));\n          if (i > 0) {\n            this.line(\"/Prev \" + this.makeRef(node.children[i - 1]));\n          }\n          if (i < node.children.length - 1) {\n            this.line(\"/Next \" + this.makeRef(node.children[i + 1]));\n          }\n          if (item.children.length > 0) {\n            this.line(\"/First \" + this.makeRef(item.children[0]));\n            this.line(\n              \"/Last \" + this.makeRef(item.children[item.children.length - 1])\n            );\n          }\n\n          var count = (this.count = this.count_r(\n            {\n              count: 0\n            },\n            item\n          ));\n          if (count > 0) {\n            this.line(\"/Count \" + count);\n          }\n\n          if (item.options) {\n            if (item.options.pageNumber) {\n              // Explicit Destination\n              //WARNING this assumes page ids are 3,5,7, etc.\n              var info = pdf.internal.getPageInfo(item.options.pageNumber);\n              this.line(\n                \"/Dest \" +\n                  \"[\" +\n                  info.objId +\n                  \" 0 R /XYZ 0 \" +\n                  getVerticalCoordinateString(0) +\n                  \" 0]\"\n              );\n              // this line does not work on all clients (pageNumber instead of page ref)\n              //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');\n\n              // Named Destination\n              // this.line('/Dest (page_' + (item.options.pageNumber) + ')');\n\n              // Action Destination\n              // var id = pdf.internal.newObject();\n              // pdf.internal.write('<</D[' + (item.options.pageNumber - 1) + ' /XYZ null null null]/S/GoTo>> endobj');\n              // this.line('/A ' + id + ' 0 R' );\n            }\n          }\n          this.objEnd();\n        }\n        for (var z = 0; z < node.children.length; z++) {\n          this.renderItems(node.children[z]);\n        }\n      };\n\n      pdf.outline.line = function(text) {\n        this.ctx.val += text + \"\\r\\n\";\n      };\n\n      pdf.outline.makeRef = function(node) {\n        return node.id + \" 0 R\";\n      };\n\n      pdf.outline.makeString = function(val) {\n        return \"(\" + pdf.internal.pdfEscape(val) + \")\";\n      };\n\n      pdf.outline.objStart = function(node) {\n        this.ctx.val += \"\\r\\n\" + node.id + \" 0 obj\" + \"\\r\\n<<\\r\\n\";\n      };\n\n      pdf.outline.objEnd = function() {\n        this.ctx.val += \">> \\r\\n\" + \"endobj\" + \"\\r\\n\";\n      };\n\n      pdf.outline.count_r = function(ctx, node) {\n        for (var i = 0; i < node.children.length; i++) {\n          ctx.count++;\n          this.count_r(ctx, node.children[i]);\n        }\n        return ctx.count;\n      };\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF jpeg Support PlugIn\n *\n * @name jpeg_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * 0xc0 (SOF) Huffman  - Baseline DCT\n   * 0xc1 (SOF) Huffman  - Extended sequential DCT\n   * 0xc2 Progressive DCT (SOF2)\n   * 0xc3 Spatial (sequential) lossless (SOF3)\n   * 0xc4 Differential sequential DCT (SOF5)\n   * 0xc5 Differential progressive DCT (SOF6)\n   * 0xc6 Differential spatial (SOF7)\n   * 0xc7\n   */\n  var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];\n\n  //takes a string imgData containing the raw bytes of\n  //a jpeg image and returns [width, height]\n  //Algorithm from: http://www.64lines.com/jpeg-width-height\n  var getJpegInfo = function(imgData) {\n    var width, height, numcomponents;\n    var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);\n    var len = imgData.length;\n    var result = { width: 0, height: 0, numcomponents: 1 };\n    for (var i = 4; i < len; i += 2) {\n      i += blockLength;\n      if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {\n        height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);\n        width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);\n        numcomponents = imgData.charCodeAt(i + 9);\n        result = { width: width, height: height, numcomponents: numcomponents };\n        break;\n      } else {\n        blockLength =\n          imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);\n      }\n    }\n    return result;\n  };\n\n  /**\n   * @ignore\n   */\n  jsPDFAPI.processJPEG = function(\n    data,\n    index,\n    alias,\n    compression,\n    dataAsBinaryString,\n    colorSpace\n  ) {\n    var filter = this.decode.DCT_DECODE,\n      bpc = 8,\n      dims,\n      result = null;\n\n    if (\n      typeof data === \"string\" ||\n      this.__addimage__.isArrayBuffer(data) ||\n      this.__addimage__.isArrayBufferView(data)\n    ) {\n      // if we already have a stored binary string rep use that\n      data = dataAsBinaryString || data;\n      data = this.__addimage__.isArrayBuffer(data)\n        ? new Uint8Array(data)\n        : data;\n      data = this.__addimage__.isArrayBufferView(data)\n        ? this.__addimage__.arrayBufferToBinaryString(data)\n        : data;\n\n      dims = getJpegInfo(data);\n      switch (dims.numcomponents) {\n        case 1:\n          colorSpace = this.color_spaces.DEVICE_GRAY;\n          break;\n        case 4:\n          colorSpace = this.color_spaces.DEVICE_CMYK;\n          break;\n        case 3:\n          colorSpace = this.color_spaces.DEVICE_RGB;\n          break;\n      }\n\n      result = {\n        data: data,\n        width: dims.width,\n        height: dims.height,\n        colorSpace: colorSpace,\n        bitsPerComponent: bpc,\n        filter: filter,\n        index: index,\n        alias: alias\n      };\n    }\n    return result;\n  };\n})(jsPDF.API);\n","// Generated by CoffeeScript 1.4.0\n\n/**\n * @license\n * PNG.js\n * Copyright (c) 2011 Devon Govett\n * MIT LICENSE\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this\n * software and associated documentation files (the \"Software\"), to deal in the Software\n * without restriction, including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons\n * to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or\n * substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\n * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport { unzlibSync } from \"./fflate.js\";\nimport { globalObject } from \"./globalObject.js\";\n\nvar PNG = (function() {\n  var APNG_BLEND_OP_OVER,\n    APNG_BLEND_OP_SOURCE,\n    APNG_DISPOSE_OP_BACKGROUND,\n    APNG_DISPOSE_OP_NONE,\n    APNG_DISPOSE_OP_PREVIOUS,\n    makeImage,\n    scratchCanvas,\n    scratchCtx;\n\n  APNG_DISPOSE_OP_NONE = 0;\n\n  APNG_DISPOSE_OP_BACKGROUND = 1;\n\n  APNG_DISPOSE_OP_PREVIOUS = 2;\n\n  APNG_BLEND_OP_SOURCE = 0;\n\n  APNG_BLEND_OP_OVER = 1;\n\n  function PNG(data) {\n    var chunkSize,\n      colors,\n      palLen,\n      delayDen,\n      delayNum,\n      frame,\n      i,\n      index,\n      key,\n      section,\n      palShort,\n      text,\n      _i,\n      _j,\n      _ref;\n    this.data = data;\n    this.pos = 8;\n    this.palette = [];\n    this.imgData = [];\n    this.transparency = {};\n    this.animation = null;\n    this.text = {};\n    frame = null;\n    while (true) {\n      chunkSize = this.readUInt32();\n      section = function() {\n        var _i, _results;\n        _results = [];\n        for (i = _i = 0; _i < 4; i = ++_i) {\n          _results.push(String.fromCharCode(this.data[this.pos++]));\n        }\n        return _results;\n      }\n        .call(this)\n        .join(\"\");\n      switch (section) {\n        case \"IHDR\":\n          this.width = this.readUInt32();\n          this.height = this.readUInt32();\n          this.bits = this.data[this.pos++];\n          this.colorType = this.data[this.pos++];\n          this.compressionMethod = this.data[this.pos++];\n          this.filterMethod = this.data[this.pos++];\n          this.interlaceMethod = this.data[this.pos++];\n          break;\n        case \"acTL\":\n          this.animation = {\n            numFrames: this.readUInt32(),\n            numPlays: this.readUInt32() || Infinity,\n            frames: []\n          };\n          break;\n        case \"PLTE\":\n          this.palette = this.read(chunkSize);\n          break;\n        case \"fcTL\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.pos += 4;\n          frame = {\n            width: this.readUInt32(),\n            height: this.readUInt32(),\n            xOffset: this.readUInt32(),\n            yOffset: this.readUInt32()\n          };\n          delayNum = this.readUInt16();\n          delayDen = this.readUInt16() || 100;\n          frame.delay = (1000 * delayNum) / delayDen;\n          frame.disposeOp = this.data[this.pos++];\n          frame.blendOp = this.data[this.pos++];\n          frame.data = [];\n          break;\n        case \"IDAT\":\n        case \"fdAT\":\n          if (section === \"fdAT\") {\n            this.pos += 4;\n            chunkSize -= 4;\n          }\n          data = (frame != null ? frame.data : void 0) || this.imgData;\n          for (\n            i = _i = 0;\n            0 <= chunkSize ? _i < chunkSize : _i > chunkSize;\n            i = 0 <= chunkSize ? ++_i : --_i\n          ) {\n            data.push(this.data[this.pos++]);\n          }\n          break;\n        case \"tRNS\":\n          this.transparency = {};\n          switch (this.colorType) {\n            case 3:\n              palLen = this.palette.length / 3;\n              this.transparency.indexed = this.read(chunkSize);\n              if (this.transparency.indexed.length > palLen)\n                throw new Error(\"More transparent colors than palette size\");\n              /*\n               * According to the PNG spec trns should be increased to the same size as palette if shorter\n               */\n              //palShort = 255 - this.transparency.indexed.length;\n              palShort = palLen - this.transparency.indexed.length;\n              if (palShort > 0) {\n                for (\n                  i = _j = 0;\n                  0 <= palShort ? _j < palShort : _j > palShort;\n                  i = 0 <= palShort ? ++_j : --_j\n                ) {\n                  this.transparency.indexed.push(255);\n                }\n              }\n              break;\n            case 0:\n              this.transparency.grayscale = this.read(chunkSize)[0];\n              break;\n            case 2:\n              this.transparency.rgb = this.read(chunkSize);\n          }\n          break;\n        case \"tEXt\":\n          text = this.read(chunkSize);\n          index = text.indexOf(0);\n          key = String.fromCharCode.apply(String, text.slice(0, index));\n          this.text[key] = String.fromCharCode.apply(\n            String,\n            text.slice(index + 1)\n          );\n          break;\n        case \"IEND\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.colors = function() {\n            switch (this.colorType) {\n              case 0:\n              case 3:\n              case 4:\n                return 1;\n              case 2:\n              case 6:\n                return 3;\n            }\n          }.call(this);\n          this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;\n          colors = this.colors + (this.hasAlphaChannel ? 1 : 0);\n          this.pixelBitlength = this.bits * colors;\n          this.colorSpace = function() {\n            switch (this.colors) {\n              case 1:\n                return \"DeviceGray\";\n              case 3:\n                return \"DeviceRGB\";\n            }\n          }.call(this);\n          this.imgData = new Uint8Array(this.imgData);\n          return;\n        default:\n          this.pos += chunkSize;\n      }\n      this.pos += 4;\n      if (this.pos > this.data.length) {\n        throw new Error(\"Incomplete or corrupt PNG file\");\n      }\n    }\n  }\n\n  PNG.prototype.read = function(bytes) {\n    var i, _i, _results;\n    _results = [];\n    for (\n      i = _i = 0;\n      0 <= bytes ? _i < bytes : _i > bytes;\n      i = 0 <= bytes ? ++_i : --_i\n    ) {\n      _results.push(this.data[this.pos++]);\n    }\n    return _results;\n  };\n\n  PNG.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.data[this.pos++] << 24;\n    b2 = this.data[this.pos++] << 16;\n    b3 = this.data[this.pos++] << 8;\n    b4 = this.data[this.pos++];\n    return b1 | b2 | b3 | b4;\n  };\n\n  PNG.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.data[this.pos++] << 8;\n    b2 = this.data[this.pos++];\n    return b1 | b2;\n  };\n\n  PNG.prototype.decodePixels = function(data) {\n    var pixelBytes = this.pixelBitlength / 8;\n    var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);\n    var pos = 0;\n    var _this = this;\n\n    if (data == null) {\n      data = this.imgData;\n    }\n    if (data.length === 0) {\n      return new Uint8Array(0);\n    }\n\n    data = unzlibSync(data);\n    function pass(x0, y0, dx, dy) {\n      var abyte,\n        c,\n        col,\n        i,\n        left,\n        length,\n        p,\n        pa,\n        paeth,\n        pb,\n        pc,\n        pixels,\n        row,\n        scanlineLength,\n        upper,\n        upperLeft,\n        _i,\n        _j,\n        _k,\n        _l,\n        _m;\n      var w = Math.ceil((_this.width - x0) / dx),\n        h = Math.ceil((_this.height - y0) / dy);\n      var isFull = _this.width == w && _this.height == h;\n      scanlineLength = pixelBytes * w;\n      pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);\n      length = data.length;\n      row = 0;\n      c = 0;\n      while (row < h && pos < length) {\n        switch (data[pos++]) {\n          case 0:\n            for (i = _i = 0; _i < scanlineLength; i = _i += 1) {\n              pixels[c++] = data[pos++];\n            }\n            break;\n          case 1:\n            for (i = _j = 0; _j < scanlineLength; i = _j += 1) {\n              abyte = data[pos++];\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              pixels[c++] = (abyte + left) % 256;\n            }\n            break;\n          case 2:\n            for (i = _k = 0; _k < scanlineLength; i = _k += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (upper + abyte) % 256;\n            }\n            break;\n          case 3:\n            for (i = _l = 0; _l < scanlineLength; i = _l += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;\n            }\n            break;\n          case 4:\n            for (i = _m = 0; _m < scanlineLength; i = _m += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              if (row === 0) {\n                upper = upperLeft = 0;\n              } else {\n                upper =\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      col * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n                upperLeft =\n                  col &&\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      (col - 1) * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n              }\n              p = left + upper - upperLeft;\n              pa = Math.abs(p - left);\n              pb = Math.abs(p - upper);\n              pc = Math.abs(p - upperLeft);\n              if (pa <= pb && pa <= pc) {\n                paeth = left;\n              } else if (pb <= pc) {\n                paeth = upper;\n              } else {\n                paeth = upperLeft;\n              }\n              pixels[c++] = (abyte + paeth) % 256;\n            }\n            break;\n          default:\n            throw new Error(\"Invalid filter algorithm: \" + data[pos - 1]);\n        }\n        if (!isFull) {\n          var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;\n          var partPos = row * scanlineLength;\n          for (i = 0; i < w; i += 1) {\n            for (var j = 0; j < pixelBytes; j += 1)\n              fullPixels[fullPos++] = pixels[partPos++];\n            fullPos += (dx - 1) * pixelBytes;\n          }\n        }\n        row++;\n      }\n    }\n    if (_this.interlaceMethod == 1) {\n      /*\n          1 6 4 6 2 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n          3 6 4 6 3 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n        */\n      pass(0, 0, 8, 8); // 1\n      /* NOTE these seem to follow the pattern:\n       * pass(x, 0, 2*x, 2*x);\n       * pass(0, x,   x, 2*x);\n       * with x being 4, 2, 1.\n       */\n      pass(4, 0, 8, 8); // 2\n      pass(0, 4, 4, 8); // 3\n\n      pass(2, 0, 4, 4); // 4\n      pass(0, 2, 2, 4); // 5\n\n      pass(1, 0, 2, 2); // 6\n      pass(0, 1, 1, 2); // 7\n    } else {\n      pass(0, 0, 1, 1);\n    }\n    return fullPixels;\n  };\n\n  PNG.prototype.decodePalette = function() {\n    var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;\n    palette = this.palette;\n    transparency = this.transparency.indexed || [];\n    ret = new Uint8Array((transparency.length || 0) + palette.length);\n    pos = 0;\n    length = palette.length;\n    c = 0;\n    for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {\n      ret[pos++] = palette[i];\n      ret[pos++] = palette[i + 1];\n      ret[pos++] = palette[i + 2];\n      ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;\n    }\n    return ret;\n  };\n\n  PNG.prototype.copyToImageData = function(imageData, pixels) {\n    var alpha, colors, data, i, input, j, k, length, palette, v, _ref;\n    colors = this.colors;\n    palette = null;\n    alpha = this.hasAlphaChannel;\n    if (this.palette.length) {\n      palette =\n        (_ref = this._decodedPalette) != null\n          ? _ref\n          : (this._decodedPalette = this.decodePalette());\n      colors = 4;\n      alpha = true;\n    }\n    data = imageData.data || imageData;\n    length = data.length;\n    input = palette || pixels;\n    i = j = 0;\n    if (colors === 1) {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        v = input[k++];\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    } else {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    }\n  };\n\n  PNG.prototype.decode = function() {\n    var ret;\n    ret = new Uint8Array(this.width * this.height * 4);\n    this.copyToImageData(ret, this.decodePixels());\n    return ret;\n  };\n\n  var hasBrowserCanvas = function() {\n    if (Object.prototype.toString.call(globalObject) === \"[object Window]\") {\n      try {\n        scratchCanvas = globalObject.document.createElement(\"canvas\");\n        scratchCtx = scratchCanvas.getContext(\"2d\");\n      } catch (e) {\n        return false;\n      }\n      return true;\n    }\n    return false;\n  };\n\n  hasBrowserCanvas();\n\n  makeImage = function(imageData) {\n    if (hasBrowserCanvas() === true) {\n      var img;\n      scratchCtx.width = imageData.width;\n      scratchCtx.height = imageData.height;\n      scratchCtx.clearRect(0, 0, imageData.width, imageData.height);\n      scratchCtx.putImageData(imageData, 0, 0);\n      img = new Image();\n      img.src = scratchCanvas.toDataURL();\n      return img;\n    }\n    throw new Error(\"This method requires a Browser with Canvas-capability.\");\n  };\n\n  PNG.prototype.decodeFrames = function(ctx) {\n    var frame, i, imageData, pixels, _i, _len, _ref, _results;\n    if (!this.animation) {\n      return;\n    }\n    _ref = this.animation.frames;\n    _results = [];\n    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {\n      frame = _ref[i];\n      imageData = ctx.createImageData(frame.width, frame.height);\n      pixels = this.decodePixels(new Uint8Array(frame.data));\n      this.copyToImageData(imageData, pixels);\n      frame.imageData = imageData;\n      _results.push((frame.image = makeImage(imageData)));\n    }\n    return _results;\n  };\n\n  PNG.prototype.renderFrame = function(ctx, number) {\n    var frame, frames, prev;\n    frames = this.animation.frames;\n    frame = frames[number];\n    prev = frames[number - 1];\n    if (number === 0) {\n      ctx.clearRect(0, 0, this.width, this.height);\n    }\n    if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND\n    ) {\n      ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);\n    } else if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS\n    ) {\n      ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);\n    }\n    if (frame.blendOp === APNG_BLEND_OP_SOURCE) {\n      ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);\n    }\n    return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);\n  };\n\n  PNG.prototype.animate = function(ctx) {\n    var doFrame,\n      frameNumber,\n      frames,\n      numFrames,\n      numPlays,\n      _ref,\n      _this = this;\n    frameNumber = 0;\n    (_ref = this.animation),\n      (numFrames = _ref.numFrames),\n      (frames = _ref.frames),\n      (numPlays = _ref.numPlays);\n    return (doFrame = function() {\n      var f, frame;\n      f = frameNumber++ % numFrames;\n      frame = frames[f];\n      _this.renderFrame(ctx, f);\n      if (numFrames > 1 && frameNumber / numFrames < numPlays) {\n        return (_this.animation._timeout = setTimeout(doFrame, frame.delay));\n      }\n    })();\n  };\n\n  PNG.prototype.stopAnimation = function() {\n    var _ref;\n    return clearTimeout(\n      (_ref = this.animation) != null ? _ref._timeout : void 0\n    );\n  };\n\n  PNG.prototype.render = function(canvas) {\n    var ctx, data;\n    if (canvas._png) {\n      canvas._png.stopAnimation();\n    }\n    canvas._png = this;\n    canvas.width = this.width;\n    canvas.height = this.height;\n    ctx = canvas.getContext(\"2d\");\n    if (this.animation) {\n      this.decodeFrames(ctx);\n      return this.animate(ctx);\n    } else {\n      data = ctx.createImageData(this.width, this.height);\n      this.copyToImageData(data, this.decodePixels());\n      return ctx.putImageData(data, 0, 0);\n    }\n  };\n\n  return PNG;\n})();\n\nexport { PNG };\n","/** @license\n * MIT license.\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF split_text_to_size plugin\n *\n * @name split_text_to_size\n * @module\n */\n(function(API) {\n  \"use strict\";\n  /**\n   * Returns an array of length matching length of the 'word' string, with each\n   * cell occupied by the width of the char in that position.\n   *\n   * @name getCharWidthsArray\n   * @function\n   * @param {string} text\n   * @param {Object} options\n   * @returns {Array}\n   */\n  var getCharWidthsArray = (API.getCharWidthsArray = function(text, options) {\n    options = options || {};\n\n    var activeFont = options.font || this.internal.getFont();\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n\n    var widths = options.widths\n      ? options.widths\n      : activeFont.metadata.Unicode.widths;\n    var widthsFractionOf = widths.fof ? widths.fof : 1;\n    var kerning = options.kerning\n      ? options.kerning\n      : activeFont.metadata.Unicode.kerning;\n    var kerningFractionOf = kerning.fof ? kerning.fof : 1;\n    var doKerning = options.doKerning === false ? false : true;\n    var kerningValue = 0;\n\n    var i;\n    var length = text.length;\n    var char_code;\n    var prior_char_code = 0; //for kerning\n    var default_char_width = widths[0] || widthsFractionOf;\n    var output = [];\n\n    for (i = 0; i < length; i++) {\n      char_code = text.charCodeAt(i);\n\n      if (typeof activeFont.metadata.widthOfString === \"function\") {\n        output.push(\n          (activeFont.metadata.widthOfGlyph(\n            activeFont.metadata.characterToGlyph(char_code)\n          ) +\n            charSpace * (1000 / fontSize) || 0) / 1000\n        );\n      } else {\n        if (\n          doKerning &&\n          typeof kerning[char_code] === \"object\" &&\n          !isNaN(parseInt(kerning[char_code][prior_char_code], 10))\n        ) {\n          kerningValue =\n            kerning[char_code][prior_char_code] / kerningFractionOf;\n        } else {\n          kerningValue = 0;\n        }\n        output.push(\n          (widths[char_code] || default_char_width) / widthsFractionOf +\n            kerningValue\n        );\n      }\n      prior_char_code = char_code;\n    }\n\n    return output;\n  });\n\n  /**\n   * Returns a widths of string in a given font, if the font size is set as 1 point.\n   *\n   * In other words, this is \"proportional\" value. For 1 unit of font size, the length\n   * of the string will be that much.\n   *\n   * Multiply by font size to get actual width in *points*\n   * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.\n   *\n   * @name getStringUnitWidth\n   * @public\n   * @function\n   * @param {string} text\n   * @param {string} options\n   * @returns {number} result\n   */\n  var getStringUnitWidth = (API.getStringUnitWidth = function(text, options) {\n    options = options || {};\n\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var font = options.font || this.internal.getFont();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n    var result = 0;\n\n    if (API.processArabic) {\n      text = API.processArabic(text);\n    }\n\n    if (typeof font.metadata.widthOfString === \"function\") {\n      result =\n        font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;\n    } else {\n      result = getCharWidthsArray\n        .apply(this, arguments)\n        .reduce(function(pv, cv) {\n          return pv + cv;\n        }, 0);\n    }\n    return result;\n  });\n\n  /**\n  returns array of lines\n  */\n  var splitLongWord = function(word, widths_array, firstLineMaxLen, maxLen) {\n    var answer = [];\n\n    // 1st, chop off the piece that can fit on the hanging line.\n    var i = 0,\n      l = word.length,\n      workingLen = 0;\n    while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {\n      workingLen += widths_array[i];\n      i++;\n    }\n    // this is first line.\n    answer.push(word.slice(0, i));\n\n    // 2nd. Split the rest into maxLen pieces.\n    var startOfLine = i;\n    workingLen = 0;\n    while (i !== l) {\n      if (workingLen + widths_array[i] > maxLen) {\n        answer.push(word.slice(startOfLine, i));\n        workingLen = 0;\n        startOfLine = i;\n      }\n      workingLen += widths_array[i];\n      i++;\n    }\n    if (startOfLine !== i) {\n      answer.push(word.slice(startOfLine, i));\n    }\n\n    return answer;\n  };\n\n  // Note, all sizing inputs for this function must be in \"font measurement units\"\n  // By default, for PDF, it's \"point\".\n  var splitParagraphIntoLines = function(text, maxlen, options) {\n    // at this time works only on Western scripts, ones with space char\n    // separating the words. Feel free to expand.\n\n    if (!options) {\n      options = {};\n    }\n\n    var line = [],\n      lines = [line],\n      line_length = options.textIndent || 0,\n      separator_length = 0,\n      current_word_length = 0,\n      word,\n      widths_array,\n      words = text.split(\" \"),\n      spaceCharWidth = getCharWidthsArray.apply(this, [\" \", options])[0],\n      i,\n      l,\n      tmp,\n      lineIndent;\n\n    if (options.lineIndent === -1) {\n      lineIndent = words[0].length + 2;\n    } else {\n      lineIndent = options.lineIndent || 0;\n    }\n    if (lineIndent) {\n      var pad = Array(lineIndent).join(\" \"),\n        wrds = [];\n      words.map(function(wrd) {\n        wrd = wrd.split(/\\s*\\n/);\n        if (wrd.length > 1) {\n          wrds = wrds.concat(\n            wrd.map(function(wrd, idx) {\n              return (idx && wrd.length ? \"\\n\" : \"\") + wrd;\n            })\n          );\n        } else {\n          wrds.push(wrd[0]);\n        }\n      });\n      words = wrds;\n      lineIndent = getStringUnitWidth.apply(this, [pad, options]);\n    }\n\n    for (i = 0, l = words.length; i < l; i++) {\n      var force = 0;\n\n      word = words[i];\n      if (lineIndent && word[0] == \"\\n\") {\n        word = word.substr(1);\n        force = 1;\n      }\n      widths_array = getCharWidthsArray.apply(this, [word, options]);\n      current_word_length = widths_array.reduce(function(pv, cv) {\n        return pv + cv;\n      }, 0);\n\n      if (\n        line_length + separator_length + current_word_length > maxlen ||\n        force\n      ) {\n        if (current_word_length > maxlen) {\n          // this happens when you have space-less long URLs for example.\n          // we just chop these to size. We do NOT insert hiphens\n          tmp = splitLongWord.apply(this, [\n            word,\n            widths_array,\n            maxlen - (line_length + separator_length),\n            maxlen\n          ]);\n          // first line we add to existing line object\n          line.push(tmp.shift()); // it's ok to have extra space indicator there\n          // last line we make into new line object\n          line = [tmp.pop()];\n          // lines in the middle we apped to lines object as whole lines\n          while (tmp.length) {\n            lines.push([tmp.shift()]); // single fragment occupies whole line\n          }\n          current_word_length = widths_array\n            .slice(word.length - (line[0] ? line[0].length : 0))\n            .reduce(function(pv, cv) {\n              return pv + cv;\n            }, 0);\n        } else {\n          // just put it on a new line\n          line = [word];\n        }\n\n        // now we attach new line to lines\n        lines.push(line);\n        line_length = current_word_length + lineIndent;\n        separator_length = spaceCharWidth;\n      } else {\n        line.push(word);\n\n        line_length += separator_length + current_word_length;\n        separator_length = spaceCharWidth;\n      }\n    }\n\n    var postProcess;\n    if (lineIndent) {\n      postProcess = function(ln, idx) {\n        return (idx ? pad : \"\") + ln.join(\" \");\n      };\n    } else {\n      postProcess = function(ln) {\n        return ln.join(\" \");\n      };\n    }\n\n    return lines.map(postProcess);\n  };\n\n  /**\n   * Splits a given string into an array of strings. Uses 'size' value\n   * (in measurement units declared as default for the jsPDF instance)\n   * and the font's \"widths\" and \"Kerning\" tables, where available, to\n   * determine display length of a given string for a given font.\n   *\n   * We use character's 100% of unit size (height) as width when Width\n   * table or other default width is not available.\n   *\n   * @name splitTextToSize\n   * @public\n   * @function\n   * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.\n   * @param {number} size Nominal number, measured in units default to this instance of jsPDF.\n   * @param {Object} options Optional flags needed for chopper to do the right thing.\n   * @returns {Array} array Array with strings chopped to size.\n   */\n  API.splitTextToSize = function(text, maxlen, options) {\n    \"use strict\";\n\n    options = options || {};\n\n    var fsize = options.fontSize || this.internal.getFontSize(),\n      newOptions = function(options) {\n        var widths = {\n            0: 1\n          },\n          kerning = {};\n\n        if (!options.widths || !options.kerning) {\n          var f = this.internal.getFont(options.fontName, options.fontStyle),\n            encoding = \"Unicode\";\n          // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE\n          // Actual JavaScript-native String's 16bit char codes used.\n          // no multi-byte logic here\n\n          if (f.metadata[encoding]) {\n            return {\n              widths: f.metadata[encoding].widths || widths,\n              kerning: f.metadata[encoding].kerning || kerning\n            };\n          } else {\n            return {\n              font: f.metadata,\n              fontSize: this.internal.getFontSize(),\n              charSpace: this.internal.getCharSpace()\n            };\n          }\n        } else {\n          return {\n            widths: options.widths,\n            kerning: options.kerning\n          };\n        }\n      }.call(this, options);\n\n    // first we split on end-of-line chars\n    var paragraphs;\n    if (Array.isArray(text)) {\n      paragraphs = text;\n    } else {\n      paragraphs = String(text).split(/\\r?\\n/);\n    }\n\n    // now we convert size (max length of line) into \"font size units\"\n    // at present time, the \"font size unit\" is always 'point'\n    // 'proportional' means, \"in proportion to font size\"\n    var fontUnit_maxLen = (1.0 * this.internal.scaleFactor * maxlen) / fsize;\n    // at this time, fsize is always in \"points\" regardless of the default measurement unit of the doc.\n    // this may change in the future?\n    // until then, proportional_maxlen is likely to be in 'points'\n\n    // If first line is to be indented (shorter or longer) than maxLen\n    // we indicate that by using CSS-style \"text-indent\" option.\n    // here it's in font units too (which is likely 'points')\n    // it can be negative (which makes the first line longer than maxLen)\n    newOptions.textIndent = options.textIndent\n      ? (options.textIndent * 1.0 * this.internal.scaleFactor) / fsize\n      : 0;\n    newOptions.lineIndent = options.lineIndent;\n\n    var i,\n      l,\n      output = [];\n    for (i = 0, l = paragraphs.length; i < l; i++) {\n      output = output.concat(\n        splitParagraphIntoLines.apply(this, [\n          paragraphs[i],\n          fontUnit_maxLen,\n          newOptions\n        ])\n      );\n    }\n\n    return output;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * (c) Dean McNamee <dean@gmail.com>, 2013.\n *\n * https://github.com/deanm/omggif\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,\n * including animation and compression.  It does not rely on any specific\n * underlying system, so should run in the browser, Node, or Plask.\n */\n\n\"use strict\";\n\nimport { console } from \"./console.js\";\n\nfunction GifWriter(buf, width, height, gopts) {\n  var p = 0;\n\n  var gopts = gopts === undefined ? {} : gopts;\n  var loop_count = gopts.loop === undefined ? null : gopts.loop;\n  var global_palette = gopts.palette === undefined ? null : gopts.palette;\n\n  if (width <= 0 || height <= 0 || width > 65535 || height > 65535)\n    throw new Error(\"Width/Height invalid.\");\n\n  function check_palette_and_num_colors(palette) {\n    var num_colors = palette.length;\n    if (num_colors < 2 || num_colors > 256 || num_colors & (num_colors - 1)) {\n      throw new Error(\n        \"Invalid code/color length, must be power of 2 and 2 .. 256.\"\n      );\n    }\n    return num_colors;\n  }\n\n  // - Header.\n  buf[p++] = 0x47;\n  buf[p++] = 0x49;\n  buf[p++] = 0x46; // GIF\n  buf[p++] = 0x38;\n  buf[p++] = 0x39;\n  buf[p++] = 0x61; // 89a\n\n  // Handling of Global Color Table (palette) and background index.\n  var gp_num_colors_pow2 = 0;\n  var background = 0;\n  if (global_palette !== null) {\n    var gp_num_colors = check_palette_and_num_colors(global_palette);\n    while ((gp_num_colors >>= 1)) ++gp_num_colors_pow2;\n    gp_num_colors = 1 << gp_num_colors_pow2;\n    --gp_num_colors_pow2;\n    if (gopts.background !== undefined) {\n      background = gopts.background;\n      if (background >= gp_num_colors)\n        throw new Error(\"Background index out of range.\");\n      // The GIF spec states that a background index of 0 should be ignored, so\n      // this is probably a mistake and you really want to set it to another\n      // slot in the palette.  But actually in the end most browsers, etc end\n      // up ignoring this almost completely (including for dispose background).\n      if (background === 0)\n        throw new Error(\"Background index explicitly passed as 0.\");\n    }\n  }\n\n  // - Logical Screen Descriptor.\n  // NOTE(deanm): w/h apparently ignored by implementations, but set anyway.\n  buf[p++] = width & 0xff;\n  buf[p++] = (width >> 8) & 0xff;\n  buf[p++] = height & 0xff;\n  buf[p++] = (height >> 8) & 0xff;\n  // NOTE: Indicates 0-bpp original color resolution (unused?).\n  buf[p++] = (global_palette !== null ? 0x80 : 0) | gp_num_colors_pow2; // Global Color Table Flag. // NOTE: No sort flag (unused?).\n  buf[p++] = background; // Background Color Index.\n  buf[p++] = 0; // Pixel aspect ratio (unused?).\n\n  // - Global Color Table\n  if (global_palette !== null) {\n    for (var i = 0, il = global_palette.length; i < il; ++i) {\n      var rgb = global_palette[i];\n      buf[p++] = (rgb >> 16) & 0xff;\n      buf[p++] = (rgb >> 8) & 0xff;\n      buf[p++] = rgb & 0xff;\n    }\n  }\n\n  if (loop_count !== null) {\n    // Netscape block for looping.\n    if (loop_count < 0 || loop_count > 65535)\n      throw new Error(\"Loop count invalid.\");\n    // Extension code, label, and length.\n    buf[p++] = 0x21;\n    buf[p++] = 0xff;\n    buf[p++] = 0x0b;\n    // NETSCAPE2.0\n    buf[p++] = 0x4e;\n    buf[p++] = 0x45;\n    buf[p++] = 0x54;\n    buf[p++] = 0x53;\n    buf[p++] = 0x43;\n    buf[p++] = 0x41;\n    buf[p++] = 0x50;\n    buf[p++] = 0x45;\n    buf[p++] = 0x32;\n    buf[p++] = 0x2e;\n    buf[p++] = 0x30;\n    // Sub-block\n    buf[p++] = 0x03;\n    buf[p++] = 0x01;\n    buf[p++] = loop_count & 0xff;\n    buf[p++] = (loop_count >> 8) & 0xff;\n    buf[p++] = 0x00; // Terminator.\n  }\n\n  var ended = false;\n\n  this.addFrame = function(x, y, w, h, indexed_pixels, opts) {\n    if (ended === true) {\n      --p;\n      ended = false;\n    } // Un-end.\n\n    opts = opts === undefined ? {} : opts;\n\n    // TODO(deanm): Bounds check x, y.  Do they need to be within the virtual\n    // canvas width/height, I imagine?\n    if (x < 0 || y < 0 || x > 65535 || y > 65535)\n      throw new Error(\"x/y invalid.\");\n\n    if (w <= 0 || h <= 0 || w > 65535 || h > 65535)\n      throw new Error(\"Width/Height invalid.\");\n\n    if (indexed_pixels.length < w * h)\n      throw new Error(\"Not enough pixels for the frame size.\");\n\n    var using_local_palette = true;\n    var palette = opts.palette;\n    if (palette === undefined || palette === null) {\n      using_local_palette = false;\n      palette = global_palette;\n    }\n\n    if (palette === undefined || palette === null)\n      throw new Error(\"Must supply either a local or global palette.\");\n\n    var num_colors = check_palette_and_num_colors(palette);\n\n    // Compute the min_code_size (power of 2), destroying num_colors.\n    var min_code_size = 0;\n    while ((num_colors >>= 1)) ++min_code_size;\n    num_colors = 1 << min_code_size; // Now we can easily get it back.\n\n    var delay = opts.delay === undefined ? 0 : opts.delay;\n\n    // From the spec:\n    //     0 -   No disposal specified. The decoder is\n    //           not required to take any action.\n    //     1 -   Do not dispose. The graphic is to be left\n    //           in place.\n    //     2 -   Restore to background color. The area used by the\n    //           graphic must be restored to the background color.\n    //     3 -   Restore to previous. The decoder is required to\n    //           restore the area overwritten by the graphic with\n    //           what was there prior to rendering the graphic.\n    //  4-7 -    To be defined.\n    // NOTE(deanm): Dispose background doesn't really work, apparently most\n    // browsers ignore the background palette index and clear to transparency.\n    var disposal = opts.disposal === undefined ? 0 : opts.disposal;\n    if (disposal < 0 || disposal > 3)\n      // 4-7 is reserved.\n      throw new Error(\"Disposal out of range.\");\n\n    var use_transparency = false;\n    var transparent_index = 0;\n    if (opts.transparent !== undefined && opts.transparent !== null) {\n      use_transparency = true;\n      transparent_index = opts.transparent;\n      if (transparent_index < 0 || transparent_index >= num_colors)\n        throw new Error(\"Transparent color index.\");\n    }\n\n    if (disposal !== 0 || use_transparency || delay !== 0) {\n      // - Graphics Control Extension\n      buf[p++] = 0x21;\n      buf[p++] = 0xf9; // Extension / Label.\n      buf[p++] = 4; // Byte size.\n\n      buf[p++] = (disposal << 2) | (use_transparency === true ? 1 : 0);\n      buf[p++] = delay & 0xff;\n      buf[p++] = (delay >> 8) & 0xff;\n      buf[p++] = transparent_index; // Transparent color index.\n      buf[p++] = 0; // Block Terminator.\n    }\n\n    // - Image Descriptor\n    buf[p++] = 0x2c; // Image Seperator.\n    buf[p++] = x & 0xff;\n    buf[p++] = (x >> 8) & 0xff; // Left.\n    buf[p++] = y & 0xff;\n    buf[p++] = (y >> 8) & 0xff; // Top.\n    buf[p++] = w & 0xff;\n    buf[p++] = (w >> 8) & 0xff;\n    buf[p++] = h & 0xff;\n    buf[p++] = (h >> 8) & 0xff;\n    // NOTE: No sort flag (unused?).\n    // TODO(deanm): Support interlace.\n    buf[p++] = using_local_palette === true ? 0x80 | (min_code_size - 1) : 0;\n\n    // - Local Color Table\n    if (using_local_palette === true) {\n      for (var i = 0, il = palette.length; i < il; ++i) {\n        var rgb = palette[i];\n        buf[p++] = (rgb >> 16) & 0xff;\n        buf[p++] = (rgb >> 8) & 0xff;\n        buf[p++] = rgb & 0xff;\n      }\n    }\n\n    p = GifWriterOutputLZWCodeStream(\n      buf,\n      p,\n      min_code_size < 2 ? 2 : min_code_size,\n      indexed_pixels\n    );\n\n    return p;\n  };\n\n  this.end = function() {\n    if (ended === false) {\n      buf[p++] = 0x3b; // Trailer.\n      ended = true;\n    }\n    return p;\n  };\n\n  this.getOutputBuffer = function() {\n    return buf;\n  };\n  this.setOutputBuffer = function(v) {\n    buf = v;\n  };\n  this.getOutputBufferPosition = function() {\n    return p;\n  };\n  this.setOutputBufferPosition = function(v) {\n    p = v;\n  };\n}\n\n// Main compression routine, palette indexes -> LZW code stream.\n// |index_stream| must have at least one entry.\nfunction GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) {\n  buf[p++] = min_code_size;\n  var cur_subblock = p++; // Pointing at the length field.\n\n  var clear_code = 1 << min_code_size;\n  var code_mask = clear_code - 1;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  var cur_shift = 0;\n  // We have at most 12-bit codes, so we should have to hold a max of 19\n  // bits here (and then we would write out).\n  var cur = 0;\n\n  function emit_bytes_to_buffer(bit_block_size) {\n    while (cur_shift >= bit_block_size) {\n      buf[p++] = cur & 0xff;\n      cur >>= 8;\n      cur_shift -= 8;\n      if (p === cur_subblock + 256) {\n        // Finished a subblock.\n        buf[cur_subblock] = 255;\n        cur_subblock = p++;\n      }\n    }\n  }\n\n  function emit_code(c) {\n    cur |= c << cur_shift;\n    cur_shift += cur_code_size;\n    emit_bytes_to_buffer(8);\n  }\n\n  // I am not an expert on the topic, and I don't want to write a thesis.\n  // However, it is good to outline here the basic algorithm and the few data\n  // structures and optimizations here that make this implementation fast.\n  // The basic idea behind LZW is to build a table of previously seen runs\n  // addressed by a short id (herein called output code).  All data is\n  // referenced by a code, which represents one or more values from the\n  // original input stream.  All input bytes can be referenced as the same\n  // value as an output code.  So if you didn't want any compression, you\n  // could more or less just output the original bytes as codes (there are\n  // some details to this, but it is the idea).  In order to achieve\n  // compression, values greater then the input range (codes can be up to\n  // 12-bit while input only 8-bit) represent a sequence of previously seen\n  // inputs.  The decompressor is able to build the same mapping while\n  // decoding, so there is always a shared common knowledge between the\n  // encoding and decoder, which is also important for \"timing\" aspects like\n  // how to handle variable bit width code encoding.\n  //\n  // One obvious but very important consequence of the table system is there\n  // is always a unique id (at most 12-bits) to map the runs.  'A' might be\n  // 4, then 'AA' might be 10, 'AAA' 11, 'AAAA' 12, etc.  This relationship\n  // can be used for an effecient lookup strategy for the code mapping.  We\n  // need to know if a run has been seen before, and be able to map that run\n  // to the output code.  Since we start with known unique ids (input bytes),\n  // and then from those build more unique ids (table entries), we can\n  // continue this chain (almost like a linked list) to always have small\n  // integer values that represent the current byte chains in the encoder.\n  // This means instead of tracking the input bytes (AAAABCD) to know our\n  // current state, we can track the table entry for AAAABC (it is guaranteed\n  // to exist by the nature of the algorithm) and the next character D.\n  // Therefor the tuple of (table_entry, byte) is guaranteed to also be\n  // unique.  This allows us to create a simple lookup key for mapping input\n  // sequences to codes (table indices) without having to store or search\n  // any of the code sequences.  So if 'AAAA' has a table entry of 12, the\n  // tuple of ('AAAA', K) for any input byte K will be unique, and can be our\n  // key.  This leads to a integer value at most 20-bits, which can always\n  // fit in an SMI value and be used as a fast sparse array / object key.\n\n  // Output code for the current contents of the index buffer.\n  var ib_code = index_stream[0] & code_mask; // Load first input index.\n  var code_table = {}; // Key'd on our 20-bit \"tuple\".\n\n  emit_code(clear_code); // Spec says first code should be a clear code.\n\n  // First index already loaded, process the rest of the stream.\n  for (var i = 1, il = index_stream.length; i < il; ++i) {\n    var k = index_stream[i] & code_mask;\n    var cur_key = (ib_code << 8) | k; // (prev, k) unique tuple.\n    var cur_code = code_table[cur_key]; // buffer + k.\n\n    // Check if we have to create a new code table entry.\n    if (cur_code === undefined) {\n      // We don't have buffer + k.\n      // Emit index buffer (without k).\n      // This is an inline version of emit_code, because this is the core\n      // writing routine of the compressor (and V8 cannot inline emit_code\n      // because it is a closure here in a different context).  Additionally\n      // we can call emit_byte_to_buffer less often, because we can have\n      // 30-bits (from our 31-bit signed SMI), and we know our codes will only\n      // be 12-bits, so can safely have 18-bits there without overflow.\n      // emit_code(ib_code);\n      cur |= ib_code << cur_shift;\n      cur_shift += cur_code_size;\n      while (cur_shift >= 8) {\n        buf[p++] = cur & 0xff;\n        cur >>= 8;\n        cur_shift -= 8;\n        if (p === cur_subblock + 256) {\n          // Finished a subblock.\n          buf[cur_subblock] = 255;\n          cur_subblock = p++;\n        }\n      }\n\n      if (next_code === 4096) {\n        // Table full, need a clear.\n        emit_code(clear_code);\n        next_code = eoi_code + 1;\n        cur_code_size = min_code_size + 1;\n        code_table = {};\n      } else {\n        // Table not full, insert a new entry.\n        // Increase our variable bit code sizes if necessary.  This is a bit\n        // tricky as it is based on \"timing\" between the encoding and\n        // decoder.  From the encoders perspective this should happen after\n        // we've already emitted the index buffer and are about to create the\n        // first table entry that would overflow our current code bit size.\n        if (next_code >= 1 << cur_code_size) ++cur_code_size;\n        code_table[cur_key] = next_code++; // Insert into code table.\n      }\n\n      ib_code = k; // Index buffer to single input k.\n    } else {\n      ib_code = cur_code; // Index buffer to sequence in code table.\n    }\n  }\n\n  emit_code(ib_code); // There will still be something in the index buffer.\n  emit_code(eoi_code); // End Of Information.\n\n  // Flush / finalize the sub-blocks stream to the buffer.\n  emit_bytes_to_buffer(1);\n\n  // Finish the sub-blocks, writing out any unfinished lengths and\n  // terminating with a sub-block of length 0.  If we have already started\n  // but not yet used a sub-block it can just become the terminator.\n  if (cur_subblock + 1 === p) {\n    // Started but unused.\n    buf[cur_subblock] = 0;\n  } else {\n    // Started and used, write length and additional terminator block.\n    buf[cur_subblock] = p - cur_subblock - 1;\n    buf[p++] = 0;\n  }\n  return p;\n}\n\nfunction GifReader(buf) {\n  var p = 0;\n\n  // - Header (GIF87a or GIF89a).\n  if (\n    buf[p++] !== 0x47 ||\n    buf[p++] !== 0x49 ||\n    buf[p++] !== 0x46 ||\n    buf[p++] !== 0x38 ||\n    ((buf[p++] + 1) & 0xfd) !== 0x38 ||\n    buf[p++] !== 0x61\n  ) {\n    throw new Error(\"Invalid GIF 87a/89a header.\");\n  }\n\n  // - Logical Screen Descriptor.\n  var width = buf[p++] | (buf[p++] << 8);\n  var height = buf[p++] | (buf[p++] << 8);\n  var pf0 = buf[p++]; // <Packed Fields>.\n  var global_palette_flag = pf0 >> 7;\n  var num_global_colors_pow2 = pf0 & 0x7;\n  var num_global_colors = 1 << (num_global_colors_pow2 + 1);\n  var background = buf[p++];\n  buf[p++]; // Pixel aspect ratio (unused?).\n\n  var global_palette_offset = null;\n  var global_palette_size = null;\n\n  if (global_palette_flag) {\n    global_palette_offset = p;\n    global_palette_size = num_global_colors;\n    p += num_global_colors * 3; // Seek past palette.\n  }\n\n  var no_eof = true;\n\n  var frames = [];\n\n  var delay = 0;\n  var transparent_index = null;\n  var disposal = 0; // 0 - No disposal specified.\n  var loop_count = null;\n\n  this.width = width;\n  this.height = height;\n\n  while (no_eof && p < buf.length) {\n    switch (buf[p++]) {\n      case 0x21: // Graphics Control Extension Block\n        switch (buf[p++]) {\n          case 0xff: // Application specific block\n            // Try if it's a Netscape block (with animation loop counter).\n            if (\n              buf[p] !== 0x0b || // 21 FF already read, check block size.\n              // NETSCAPE2.0\n              (buf[p + 1] == 0x4e &&\n                buf[p + 2] == 0x45 &&\n                buf[p + 3] == 0x54 &&\n                buf[p + 4] == 0x53 &&\n                buf[p + 5] == 0x43 &&\n                buf[p + 6] == 0x41 &&\n                buf[p + 7] == 0x50 &&\n                buf[p + 8] == 0x45 &&\n                buf[p + 9] == 0x32 &&\n                buf[p + 10] == 0x2e &&\n                buf[p + 11] == 0x30 &&\n                // Sub-block\n                buf[p + 12] == 0x03 &&\n                buf[p + 13] == 0x01 &&\n                buf[p + 16] == 0)\n            ) {\n              p += 14;\n              loop_count = buf[p++] | (buf[p++] << 8);\n              p++; // Skip terminator.\n            } else {\n              // We don't know what it is, just try to get past it.\n              p += 12;\n              while (true) {\n                // Seek through subblocks.\n                var block_size = buf[p++];\n                // Bad block size (ex: undefined from an out of bounds read).\n                if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n                if (block_size === 0) break; // 0 size is terminator\n                p += block_size;\n              }\n            }\n            break;\n\n          case 0xf9: // Graphics Control Extension\n            if (buf[p++] !== 0x4 || buf[p + 4] !== 0)\n              throw new Error(\"Invalid graphics extension block.\");\n            var pf1 = buf[p++];\n            delay = buf[p++] | (buf[p++] << 8);\n            transparent_index = buf[p++];\n            if ((pf1 & 1) === 0) transparent_index = null;\n            disposal = (pf1 >> 2) & 0x7;\n            p++; // Skip terminator.\n            break;\n\n          case 0xfe: // Comment Extension.\n            while (true) {\n              // Seek through subblocks.\n              var block_size = buf[p++];\n              // Bad block size (ex: undefined from an out of bounds read).\n              if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n              if (block_size === 0) break; // 0 size is terminator\n              // console.log(buf.slice(p, p+block_size).toString('ascii'));\n              p += block_size;\n            }\n            break;\n\n          default:\n            throw new Error(\n              \"Unknown graphic control label: 0x\" + buf[p - 1].toString(16)\n            );\n        }\n        break;\n\n      case 0x2c: // Image Descriptor.\n        var x = buf[p++] | (buf[p++] << 8);\n        var y = buf[p++] | (buf[p++] << 8);\n        var w = buf[p++] | (buf[p++] << 8);\n        var h = buf[p++] | (buf[p++] << 8);\n        var pf2 = buf[p++];\n        var local_palette_flag = pf2 >> 7;\n        var interlace_flag = (pf2 >> 6) & 1;\n        var num_local_colors_pow2 = pf2 & 0x7;\n        var num_local_colors = 1 << (num_local_colors_pow2 + 1);\n        var palette_offset = global_palette_offset;\n        var palette_size = global_palette_size;\n        var has_local_palette = false;\n        if (local_palette_flag) {\n          var has_local_palette = true;\n          palette_offset = p; // Override with local palette.\n          palette_size = num_local_colors;\n          p += num_local_colors * 3; // Seek past palette.\n        }\n\n        var data_offset = p;\n\n        p++; // codesize\n        while (true) {\n          var block_size = buf[p++];\n          // Bad block size (ex: undefined from an out of bounds read).\n          if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n          if (block_size === 0) break; // 0 size is terminator\n          p += block_size;\n        }\n\n        frames.push({\n          x: x,\n          y: y,\n          width: w,\n          height: h,\n          has_local_palette: has_local_palette,\n          palette_offset: palette_offset,\n          palette_size: palette_size,\n          data_offset: data_offset,\n          data_length: p - data_offset,\n          transparent_index: transparent_index,\n          interlaced: !!interlace_flag,\n          delay: delay,\n          disposal: disposal\n        });\n        break;\n\n      case 0x3b: // Trailer Marker (end of file).\n        no_eof = false;\n        break;\n\n      default:\n        throw new Error(\"Unknown gif block: 0x\" + buf[p - 1].toString(16));\n        break;\n    }\n  }\n\n  this.numFrames = function() {\n    return frames.length;\n  };\n\n  this.loopCount = function() {\n    return loop_count;\n  };\n\n  this.frameInfo = function(frame_num) {\n    if (frame_num < 0 || frame_num >= frames.length)\n      throw new Error(\"Frame index out of range.\");\n    return frames[frame_num];\n  };\n\n  this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = b;\n        pixels[op++] = g;\n        pixels[op++] = r;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n\n  // I will go to copy and paste hell one day...\n  this.decodeAndBlitFrameRGBA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = r;\n        pixels[op++] = g;\n        pixels[op++] = b;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n}\n\nfunction GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {\n  var min_code_size = code_stream[p++];\n\n  var clear_code = 1 << min_code_size;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  // NOTE: This shares the same name as the encoder, but has a different\n  // meaning here.  Here this masks each code coming from the code stream.\n  var code_mask = (1 << cur_code_size) - 1;\n  var cur_shift = 0;\n  var cur = 0;\n\n  var op = 0; // Output pointer.\n\n  var subblock_size = code_stream[p++];\n\n  // TODO(deanm): Would using a TypedArray be any faster?  At least it would\n  // solve the fast mode / backing store uncertainty.\n  // var code_table = Array(4096);\n  var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.\n\n  var prev_code = null; // Track code-1.\n\n  while (true) {\n    // Read up to two bytes, making sure we always 12-bits for max sized code.\n    while (cur_shift < 16) {\n      if (subblock_size === 0) break; // No more data to be read.\n\n      cur |= code_stream[p++] << cur_shift;\n      cur_shift += 8;\n\n      if (subblock_size === 1) {\n        // Never let it get to 0 to hold logic above.\n        subblock_size = code_stream[p++]; // Next subblock.\n      } else {\n        --subblock_size;\n      }\n    }\n\n    // TODO(deanm): We should never really get here, we should have received\n    // and EOI.\n    if (cur_shift < cur_code_size) break;\n\n    var code = cur & code_mask;\n    cur >>= cur_code_size;\n    cur_shift -= cur_code_size;\n\n    // TODO(deanm): Maybe should check that the first code was a clear code,\n    // at least this is what you're supposed to do.  But actually our encoder\n    // now doesn't emit a clear code first anyway.\n    if (code === clear_code) {\n      // We don't actually have to clear the table.  This could be a good idea\n      // for greater error checking, but we don't really do any anyway.  We\n      // will just track it with next_code and overwrite old entries.\n\n      next_code = eoi_code + 1;\n      cur_code_size = min_code_size + 1;\n      code_mask = (1 << cur_code_size) - 1;\n\n      // Don't update prev_code ?\n      prev_code = null;\n      continue;\n    } else if (code === eoi_code) {\n      break;\n    }\n\n    // We have a similar situation as the decoder, where we want to store\n    // variable length entries (code table entries), but we want to do in a\n    // faster manner than an array of arrays.  The code below stores sort of a\n    // linked list within the code table, and then \"chases\" through it to\n    // construct the dictionary entries.  When a new entry is created, just the\n    // last byte is stored, and the rest (prefix) of the entry is only\n    // referenced by its table entry.  Then the code chases through the\n    // prefixes until it reaches a single byte code.  We have to chase twice,\n    // first to compute the length, and then to actually copy the data to the\n    // output (backwards, since we know the length).  The alternative would be\n    // storing something in an intermediate stack, but that doesn't make any\n    // more sense.  I implemented an approach where it also stored the length\n    // in the code table, although it's a bit tricky because you run out of\n    // bits (12 + 12 + 8), but I didn't measure much improvements (the table\n    // entries are generally not the long).  Even when I created benchmarks for\n    // very long table entries the complexity did not seem worth it.\n    // The code table stores the prefix entry in 12 bits and then the suffix\n    // byte in 8 bits, so each entry is 20 bits.\n\n    var chase_code = code < next_code ? code : prev_code;\n\n    // Chase what we will output, either {CODE} or {CODE-1}.\n    var chase_length = 0;\n    var chase = chase_code;\n    while (chase > clear_code) {\n      chase = code_table[chase] >> 8;\n      ++chase_length;\n    }\n\n    var k = chase;\n\n    var op_end = op + chase_length + (chase_code !== code ? 1 : 0);\n    if (op_end > output_length) {\n      console.log(\"Warning, gif stream longer than expected.\");\n      return;\n    }\n\n    // Already have the first byte from the chase, might as well write it fast.\n    output[op++] = k;\n\n    op += chase_length;\n    var b = op; // Track pointer, writing backwards.\n\n    if (chase_code !== code)\n      // The case of emitting {CODE-1} + k.\n      output[op++] = k;\n\n    chase = chase_code;\n    while (chase_length--) {\n      chase = code_table[chase];\n      output[--b] = chase & 0xff; // Write backwards.\n      chase >>= 8; // Pull down to the prefix code.\n    }\n\n    if (prev_code !== null && next_code < 4096) {\n      code_table[next_code++] = (prev_code << 8) | k;\n      // TODO(deanm): Figure out this clearing vs code growth logic better.  I\n      // have an feeling that it should just happen somewhere else, for now it\n      // is awkward between when we grow past the max and then hit a clear code.\n      // For now just check if we hit the max 12-bits (then a clear code should\n      // follow, also of course encoded in 12-bits).\n      if (next_code >= code_mask + 1 && cur_code_size < 12) {\n        ++cur_code_size;\n        code_mask = (code_mask << 1) | 1;\n      }\n    }\n\n    prev_code = code;\n  }\n\n  if (op !== output_length) {\n    console.log(\"Warning, gif stream shorter than expected.\");\n  }\n\n  return output;\n}\n\nexport { GifReader, GifWriter };\n","/**\n * @license\n  Copyright (c) 2008, Adobe Systems Incorporated\n  All rights reserved.\n\n  Redistribution and use in source and binary forms, with or without \n  modification, are permitted provided that the following conditions are\n  met:\n\n  * Redistributions of source code must retain the above copyright notice, \n    this list of conditions and the following disclaimer.\n  \n  * Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the \n    documentation and/or other materials provided with the distribution.\n  \n  * Neither the name of Adobe Systems Incorporated nor the names of its \n    contributors may be used to endorse or promote products derived from \n    this software without specific prior written permission.\n\n  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n  IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \n  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*\nJPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n\nBasic GUI blocking jpeg encoder\n*/\n\nfunction JPEGEncoder(quality) {\n  var ffloor = Math.floor;\n  var YTable = new Array(64);\n  var UVTable = new Array(64);\n  var fdtbl_Y = new Array(64);\n  var fdtbl_UV = new Array(64);\n  var YDC_HT;\n  var UVDC_HT;\n  var YAC_HT;\n  var UVAC_HT;\n\n  var bitcode = new Array(65535);\n  var category = new Array(65535);\n  var outputfDCTQuant = new Array(64);\n  var DU = new Array(64);\n  var byteout = [];\n  var bytenew = 0;\n  var bytepos = 7;\n\n  var YDU = new Array(64);\n  var UDU = new Array(64);\n  var VDU = new Array(64);\n  var clt = new Array(256);\n  var RGB_YUV_TABLE = new Array(2048);\n  var currentQuality;\n\n  var ZigZag = [\n    0,\n    1,\n    5,\n    6,\n    14,\n    15,\n    27,\n    28,\n    2,\n    4,\n    7,\n    13,\n    16,\n    26,\n    29,\n    42,\n    3,\n    8,\n    12,\n    17,\n    25,\n    30,\n    41,\n    43,\n    9,\n    11,\n    18,\n    24,\n    31,\n    40,\n    44,\n    53,\n    10,\n    19,\n    23,\n    32,\n    39,\n    45,\n    52,\n    54,\n    20,\n    22,\n    33,\n    38,\n    46,\n    51,\n    55,\n    60,\n    21,\n    34,\n    37,\n    47,\n    50,\n    56,\n    59,\n    61,\n    35,\n    36,\n    48,\n    49,\n    57,\n    58,\n    62,\n    63\n  ];\n\n  var std_dc_luminance_nrcodes = [\n    0,\n    0,\n    1,\n    5,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_luminance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    3,\n    3,\n    2,\n    4,\n    3,\n    5,\n    5,\n    4,\n    4,\n    0,\n    0,\n    1,\n    0x7d\n  ];\n  var std_ac_luminance_values = [\n    0x01,\n    0x02,\n    0x03,\n    0x00,\n    0x04,\n    0x11,\n    0x05,\n    0x12,\n    0x21,\n    0x31,\n    0x41,\n    0x06,\n    0x13,\n    0x51,\n    0x61,\n    0x07,\n    0x22,\n    0x71,\n    0x14,\n    0x32,\n    0x81,\n    0x91,\n    0xa1,\n    0x08,\n    0x23,\n    0x42,\n    0xb1,\n    0xc1,\n    0x15,\n    0x52,\n    0xd1,\n    0xf0,\n    0x24,\n    0x33,\n    0x62,\n    0x72,\n    0x82,\n    0x09,\n    0x0a,\n    0x16,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x25,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x34,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe1,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf1,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  var std_dc_chrominance_nrcodes = [\n    0,\n    0,\n    3,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_chrominance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    2,\n    4,\n    4,\n    3,\n    4,\n    7,\n    5,\n    4,\n    4,\n    0,\n    1,\n    2,\n    0x77\n  ];\n  var std_ac_chrominance_values = [\n    0x00,\n    0x01,\n    0x02,\n    0x03,\n    0x11,\n    0x04,\n    0x05,\n    0x21,\n    0x31,\n    0x06,\n    0x12,\n    0x41,\n    0x51,\n    0x07,\n    0x61,\n    0x71,\n    0x13,\n    0x22,\n    0x32,\n    0x81,\n    0x08,\n    0x14,\n    0x42,\n    0x91,\n    0xa1,\n    0xb1,\n    0xc1,\n    0x09,\n    0x23,\n    0x33,\n    0x52,\n    0xf0,\n    0x15,\n    0x62,\n    0x72,\n    0xd1,\n    0x0a,\n    0x16,\n    0x24,\n    0x34,\n    0xe1,\n    0x25,\n    0xf1,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x82,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  function initQuantTables(sf) {\n    var YQT = [\n      16,\n      11,\n      10,\n      16,\n      24,\n      40,\n      51,\n      61,\n      12,\n      12,\n      14,\n      19,\n      26,\n      58,\n      60,\n      55,\n      14,\n      13,\n      16,\n      24,\n      40,\n      57,\n      69,\n      56,\n      14,\n      17,\n      22,\n      29,\n      51,\n      87,\n      80,\n      62,\n      18,\n      22,\n      37,\n      56,\n      68,\n      109,\n      103,\n      77,\n      24,\n      35,\n      55,\n      64,\n      81,\n      104,\n      113,\n      92,\n      49,\n      64,\n      78,\n      87,\n      103,\n      121,\n      120,\n      101,\n      72,\n      92,\n      95,\n      98,\n      112,\n      100,\n      103,\n      99\n    ];\n\n    for (var i = 0; i < 64; i++) {\n      var t = ffloor((YQT[i] * sf + 50) / 100);\n      t = Math.min(Math.max(t, 1), 255);\n      YTable[ZigZag[i]] = t;\n    }\n    var UVQT = [\n      17,\n      18,\n      24,\n      47,\n      99,\n      99,\n      99,\n      99,\n      18,\n      21,\n      26,\n      66,\n      99,\n      99,\n      99,\n      99,\n      24,\n      26,\n      56,\n      99,\n      99,\n      99,\n      99,\n      99,\n      47,\n      66,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99\n    ];\n    for (var j = 0; j < 64; j++) {\n      var u = ffloor((UVQT[j] * sf + 50) / 100);\n      u = Math.min(Math.max(u, 1), 255);\n      UVTable[ZigZag[j]] = u;\n    }\n    var aasf = [\n      1.0,\n      1.387039845,\n      1.306562965,\n      1.175875602,\n      1.0,\n      0.785694958,\n      0.5411961,\n      0.275899379\n    ];\n    var k = 0;\n    for (var row = 0; row < 8; row++) {\n      for (var col = 0; col < 8; col++) {\n        fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        k++;\n      }\n    }\n  }\n\n  function computeHuffmanTbl(nrcodes, std_table) {\n    var codevalue = 0;\n    var pos_in_table = 0;\n    var HT = new Array();\n    for (var k = 1; k <= 16; k++) {\n      for (var j = 1; j <= nrcodes[k]; j++) {\n        HT[std_table[pos_in_table]] = [];\n        HT[std_table[pos_in_table]][0] = codevalue;\n        HT[std_table[pos_in_table]][1] = k;\n        pos_in_table++;\n        codevalue++;\n      }\n      codevalue *= 2;\n    }\n    return HT;\n  }\n\n  function initHuffmanTbl() {\n    YDC_HT = computeHuffmanTbl(\n      std_dc_luminance_nrcodes,\n      std_dc_luminance_values\n    );\n    UVDC_HT = computeHuffmanTbl(\n      std_dc_chrominance_nrcodes,\n      std_dc_chrominance_values\n    );\n    YAC_HT = computeHuffmanTbl(\n      std_ac_luminance_nrcodes,\n      std_ac_luminance_values\n    );\n    UVAC_HT = computeHuffmanTbl(\n      std_ac_chrominance_nrcodes,\n      std_ac_chrominance_values\n    );\n  }\n\n  function initCategoryNumber() {\n    var nrlower = 1;\n    var nrupper = 2;\n    for (var cat = 1; cat <= 15; cat++) {\n      //Positive numbers\n      for (var nr = nrlower; nr < nrupper; nr++) {\n        category[32767 + nr] = cat;\n        bitcode[32767 + nr] = [];\n        bitcode[32767 + nr][1] = cat;\n        bitcode[32767 + nr][0] = nr;\n      }\n      //Negative numbers\n      for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {\n        category[32767 + nrneg] = cat;\n        bitcode[32767 + nrneg] = [];\n        bitcode[32767 + nrneg][1] = cat;\n        bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;\n      }\n      nrlower <<= 1;\n      nrupper <<= 1;\n    }\n  }\n\n  function initRGBYUVTable() {\n    for (var i = 0; i < 256; i++) {\n      RGB_YUV_TABLE[i] = 19595 * i;\n      RGB_YUV_TABLE[(i + 256) >> 0] = 38470 * i;\n      RGB_YUV_TABLE[(i + 512) >> 0] = 7471 * i + 0x8000;\n      RGB_YUV_TABLE[(i + 768) >> 0] = -11059 * i;\n      RGB_YUV_TABLE[(i + 1024) >> 0] = -21709 * i;\n      RGB_YUV_TABLE[(i + 1280) >> 0] = 32768 * i + 0x807fff;\n      RGB_YUV_TABLE[(i + 1536) >> 0] = -27439 * i;\n      RGB_YUV_TABLE[(i + 1792) >> 0] = -5329 * i;\n    }\n  }\n\n  // IO functions\n  function writeBits(bs) {\n    var value = bs[0];\n    var posval = bs[1] - 1;\n    while (posval >= 0) {\n      if (value & (1 << posval)) {\n        bytenew |= 1 << bytepos;\n      }\n      posval--;\n      bytepos--;\n      if (bytepos < 0) {\n        if (bytenew == 0xff) {\n          writeByte(0xff);\n          writeByte(0);\n        } else {\n          writeByte(bytenew);\n        }\n        bytepos = 7;\n        bytenew = 0;\n      }\n    }\n  }\n\n  function writeByte(value) {\n    //byteout.push(clt[value]); // write char directly instead of converting later\n    byteout.push(value);\n  }\n\n  function writeWord(value) {\n    writeByte((value >> 8) & 0xff);\n    writeByte(value & 0xff);\n  }\n\n  // DCT & quantization core\n  function fDCTQuant(data, fdtbl) {\n    var d0, d1, d2, d3, d4, d5, d6, d7;\n    /* Pass 1: process rows. */\n    var dataOff = 0;\n    var i;\n    var I8 = 8;\n    var I64 = 64;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 1];\n      d2 = data[dataOff + 2];\n      d3 = data[dataOff + 3];\n      d4 = data[dataOff + 4];\n      d5 = data[dataOff + 5];\n      d6 = data[dataOff + 6];\n      d7 = data[dataOff + 7];\n\n      var tmp0 = d0 + d7;\n      var tmp7 = d0 - d7;\n      var tmp1 = d1 + d6;\n      var tmp6 = d1 - d6;\n      var tmp2 = d2 + d5;\n      var tmp5 = d2 - d5;\n      var tmp3 = d3 + d4;\n      var tmp4 = d3 - d4;\n\n      /* Even part */\n      var tmp10 = tmp0 + tmp3; /* phase 2 */\n      var tmp13 = tmp0 - tmp3;\n      var tmp11 = tmp1 + tmp2;\n      var tmp12 = tmp1 - tmp2;\n\n      data[dataOff] = tmp10 + tmp11; /* phase 3 */\n      data[dataOff + 4] = tmp10 - tmp11;\n\n      var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n      data[dataOff + 2] = tmp13 + z1; /* phase 5 */\n      data[dataOff + 6] = tmp13 - z1;\n\n      /* Odd part */\n      tmp10 = tmp4 + tmp5; /* phase 2 */\n      tmp11 = tmp5 + tmp6;\n      tmp12 = tmp6 + tmp7;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n      var z2 = 0.5411961 * tmp10 + z5; /* c2-c6 */\n      var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n      var z3 = tmp11 * 0.707106781; /* c4 */\n\n      var z11 = tmp7 + z3; /* phase 5 */\n      var z13 = tmp7 - z3;\n\n      data[dataOff + 5] = z13 + z2; /* phase 6 */\n      data[dataOff + 3] = z13 - z2;\n      data[dataOff + 1] = z11 + z4;\n      data[dataOff + 7] = z11 - z4;\n\n      dataOff += 8; /* advance pointer to next row */\n    }\n\n    /* Pass 2: process columns. */\n    dataOff = 0;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 8];\n      d2 = data[dataOff + 16];\n      d3 = data[dataOff + 24];\n      d4 = data[dataOff + 32];\n      d5 = data[dataOff + 40];\n      d6 = data[dataOff + 48];\n      d7 = data[dataOff + 56];\n\n      var tmp0p2 = d0 + d7;\n      var tmp7p2 = d0 - d7;\n      var tmp1p2 = d1 + d6;\n      var tmp6p2 = d1 - d6;\n      var tmp2p2 = d2 + d5;\n      var tmp5p2 = d2 - d5;\n      var tmp3p2 = d3 + d4;\n      var tmp4p2 = d3 - d4;\n\n      /* Even part */\n      var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n      var tmp13p2 = tmp0p2 - tmp3p2;\n      var tmp11p2 = tmp1p2 + tmp2p2;\n      var tmp12p2 = tmp1p2 - tmp2p2;\n\n      data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n      data[dataOff + 32] = tmp10p2 - tmp11p2;\n\n      var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n      data[dataOff + 16] = tmp13p2 + z1p2; /* phase 5 */\n      data[dataOff + 48] = tmp13p2 - z1p2;\n\n      /* Odd part */\n      tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n      tmp11p2 = tmp5p2 + tmp6p2;\n      tmp12p2 = tmp6p2 + tmp7p2;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n      var z2p2 = 0.5411961 * tmp10p2 + z5p2; /* c2-c6 */\n      var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n      var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\n      var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n      var z13p2 = tmp7p2 - z3p2;\n\n      data[dataOff + 40] = z13p2 + z2p2; /* phase 6 */\n      data[dataOff + 24] = z13p2 - z2p2;\n      data[dataOff + 8] = z11p2 + z4p2;\n      data[dataOff + 56] = z11p2 - z4p2;\n\n      dataOff++; /* advance pointer to next column */\n    }\n\n    // Quantize/descale the coefficients\n    var fDCTQuant;\n    for (i = 0; i < I64; ++i) {\n      // Apply the quantization and scaling factor & Round to nearest integer\n      fDCTQuant = data[i] * fdtbl[i];\n      outputfDCTQuant[i] =\n        fDCTQuant > 0.0 ? (fDCTQuant + 0.5) | 0 : (fDCTQuant - 0.5) | 0;\n      //outputfDCTQuant[i] = fround(fDCTQuant);\n    }\n    return outputfDCTQuant;\n  }\n\n  function writeAPP0() {\n    writeWord(0xffe0); // marker\n    writeWord(16); // length\n    writeByte(0x4a); // J\n    writeByte(0x46); // F\n    writeByte(0x49); // I\n    writeByte(0x46); // F\n    writeByte(0); // = \"JFIF\",'\\0'\n    writeByte(1); // versionhi\n    writeByte(1); // versionlo\n    writeByte(0); // xyunits\n    writeWord(1); // xdensity\n    writeWord(1); // ydensity\n    writeByte(0); // thumbnwidth\n    writeByte(0); // thumbnheight\n  }\n\n  function writeSOF0(width, height) {\n    writeWord(0xffc0); // marker\n    writeWord(17); // length, truecolor YUV JPG\n    writeByte(8); // precision\n    writeWord(height);\n    writeWord(width);\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0x11); // HVY\n    writeByte(0); // QTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HVU\n    writeByte(1); // QTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HVV\n    writeByte(1); // QTV\n  }\n\n  function writeDQT() {\n    writeWord(0xffdb); // marker\n    writeWord(132); // length\n    writeByte(0);\n    for (var i = 0; i < 64; i++) {\n      writeByte(YTable[i]);\n    }\n    writeByte(1);\n    for (var j = 0; j < 64; j++) {\n      writeByte(UVTable[j]);\n    }\n  }\n\n  function writeDHT() {\n    writeWord(0xffc4); // marker\n    writeWord(0x01a2); // length\n\n    writeByte(0); // HTYDCinfo\n    for (var i = 0; i < 16; i++) {\n      writeByte(std_dc_luminance_nrcodes[i + 1]);\n    }\n    for (var j = 0; j <= 11; j++) {\n      writeByte(std_dc_luminance_values[j]);\n    }\n\n    writeByte(0x10); // HTYACinfo\n    for (var k = 0; k < 16; k++) {\n      writeByte(std_ac_luminance_nrcodes[k + 1]);\n    }\n    for (var l = 0; l <= 161; l++) {\n      writeByte(std_ac_luminance_values[l]);\n    }\n\n    writeByte(1); // HTUDCinfo\n    for (var m = 0; m < 16; m++) {\n      writeByte(std_dc_chrominance_nrcodes[m + 1]);\n    }\n    for (var n = 0; n <= 11; n++) {\n      writeByte(std_dc_chrominance_values[n]);\n    }\n\n    writeByte(0x11); // HTUACinfo\n    for (var o = 0; o < 16; o++) {\n      writeByte(std_ac_chrominance_nrcodes[o + 1]);\n    }\n    for (var p = 0; p <= 161; p++) {\n      writeByte(std_ac_chrominance_values[p]);\n    }\n  }\n\n  function writeSOS() {\n    writeWord(0xffda); // marker\n    writeWord(12); // length\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0); // HTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HTV\n    writeByte(0); // Ss\n    writeByte(0x3f); // Se\n    writeByte(0); // Bf\n  }\n\n  function processDU(CDU, fdtbl, DC, HTDC, HTAC) {\n    var EOB = HTAC[0x00];\n    var M16zeroes = HTAC[0xf0];\n    var pos;\n    var I16 = 16;\n    var I63 = 63;\n    var I64 = 64;\n    var DU_DCT = fDCTQuant(CDU, fdtbl);\n    //ZigZag reorder\n    for (var j = 0; j < I64; ++j) {\n      DU[ZigZag[j]] = DU_DCT[j];\n    }\n    var Diff = DU[0] - DC;\n    DC = DU[0];\n    //Encode DC\n    if (Diff == 0) {\n      writeBits(HTDC[0]); // Diff might be 0\n    } else {\n      pos = 32767 + Diff;\n      writeBits(HTDC[category[pos]]);\n      writeBits(bitcode[pos]);\n    }\n    //Encode ACs\n    var end0pos = 63; // was const... which is crazy\n    while (end0pos > 0 && DU[end0pos] == 0) {\n      end0pos--;\n    }\n    //end0pos = first element in reverse order !=0\n    if (end0pos == 0) {\n      writeBits(EOB);\n      return DC;\n    }\n    var i = 1;\n    var lng;\n    while (i <= end0pos) {\n      var startpos = i;\n      while (DU[i] == 0 && i <= end0pos) {\n        ++i;\n      }\n      var nrzeroes = i - startpos;\n      if (nrzeroes >= I16) {\n        lng = nrzeroes >> 4;\n        for (var nrmarker = 1; nrmarker <= lng; ++nrmarker)\n          writeBits(M16zeroes);\n        nrzeroes = nrzeroes & 0xf;\n      }\n      pos = 32767 + DU[i];\n      writeBits(HTAC[(nrzeroes << 4) + category[pos]]);\n      writeBits(bitcode[pos]);\n      i++;\n    }\n    if (end0pos != I63) {\n      writeBits(EOB);\n    }\n    return DC;\n  }\n\n  function initCharLookupTable() {\n    var sfcc = String.fromCharCode;\n    for (var i = 0; i < 256; i++) {\n      ///// ACHTUNG // 255\n      clt[i] = sfcc(i);\n    }\n  }\n\n  this.encode = function(\n    image,\n    quality // image data object\n  ) {\n    if (quality) setQuality(quality);\n\n    // Initialize bit writer\n    byteout = new Array();\n    bytenew = 0;\n    bytepos = 7;\n\n    // Add JPEG headers\n    writeWord(0xffd8); // SOI\n    writeAPP0();\n    writeDQT();\n    writeSOF0(image.width, image.height);\n    writeDHT();\n    writeSOS();\n\n    // Encode 8x8 macroblocks\n    var DCY = 0;\n    var DCU = 0;\n    var DCV = 0;\n\n    bytenew = 0;\n    bytepos = 7;\n\n    this.encode.displayName = \"_encode_\";\n\n    var imageData = image.data;\n    var width = image.width;\n    var height = image.height;\n\n    var quadWidth = width * 4;\n\n    var x,\n      y = 0;\n    var r, g, b;\n    var start, p, col, row, pos;\n    while (y < height) {\n      x = 0;\n      while (x < quadWidth) {\n        start = quadWidth * y + x;\n        col = -1;\n        row = 0;\n\n        for (pos = 0; pos < 64; pos++) {\n          row = pos >> 3; // /8\n          col = (pos & 7) * 4; // %8\n          p = start + row * quadWidth + col;\n\n          if (y + row >= height) {\n            // padding bottom\n            p -= quadWidth * (y + 1 + row - height);\n          }\n\n          if (x + col >= quadWidth) {\n            // padding right\n            p -= x + col - quadWidth + 4;\n          }\n\n          r = imageData[p++];\n          g = imageData[p++];\n          b = imageData[p++];\n\n          /* // calculate YUV values dynamically\n\t\t\t\t\tYDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n\t\t\t\t\tUDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n\t\t\t\t\tVDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n\t\t\t\t\t*/\n\n          // use lookup table (slightly faster)\n          YDU[pos] =\n            ((RGB_YUV_TABLE[r] +\n              RGB_YUV_TABLE[(g + 256) >> 0] +\n              RGB_YUV_TABLE[(b + 512) >> 0]) >>\n              16) -\n            128;\n          UDU[pos] =\n            ((RGB_YUV_TABLE[(r + 768) >> 0] +\n              RGB_YUV_TABLE[(g + 1024) >> 0] +\n              RGB_YUV_TABLE[(b + 1280) >> 0]) >>\n              16) -\n            128;\n          VDU[pos] =\n            ((RGB_YUV_TABLE[(r + 1280) >> 0] +\n              RGB_YUV_TABLE[(g + 1536) >> 0] +\n              RGB_YUV_TABLE[(b + 1792) >> 0]) >>\n              16) -\n            128;\n        }\n\n        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n        x += 32;\n      }\n      y += 8;\n    }\n\n    ////////////////////////////////////////////////////////////////\n\n    // Do the bit alignment of the EOI marker\n    if (bytepos >= 0) {\n      var fillbits = [];\n      fillbits[1] = bytepos + 1;\n      fillbits[0] = (1 << (bytepos + 1)) - 1;\n      writeBits(fillbits);\n    }\n\n    writeWord(0xffd9); //EOI\n\n    return new Uint8Array(byteout);\n  };\n\n  function setQuality(quality) {\n    quality = Math.min(Math.max(quality, 1), 100);\n\n    if (currentQuality == quality) return; // don't recalc if unchanged\n\n    var sf =\n      quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);\n\n    initQuantTables(sf);\n    currentQuality = quality;\n    //console.log('Quality set to: '+quality +'%');\n  }\n\n  function init() {\n    quality = quality || 50;\n    // Create tables\n    initCharLookupTable();\n    initHuffmanTbl();\n    initCategoryNumber();\n    initRGBYUVTable();\n\n    setQuality(quality);\n  }\n  init();\n}\n\nexport { JPEGEncoder };\n","/**\n * @author shaozilee\n *\n * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp\n *\n */\n\nimport { console } from \"./console.js\";\n\nfunction BmpDecoder(buffer, is_with_alpha) {\n  this.pos = 0;\n  this.buffer = buffer;\n  this.datav = new DataView(buffer.buffer);\n  this.is_with_alpha = !!is_with_alpha;\n  this.bottom_up = true;\n  this.flag =\n    String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);\n  this.pos += 2;\n  if ([\"BM\", \"BA\", \"CI\", \"CP\", \"IC\", \"PT\"].indexOf(this.flag) === -1)\n    throw new Error(\"Invalid BMP File\");\n  this.parseHeader();\n  this.parseBGR();\n}\n\nBmpDecoder.prototype.parseHeader = function() {\n  this.fileSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.reserved = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.offset = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.headerSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.width = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.height = this.datav.getInt32(this.pos, true);\n  this.pos += 4;\n  this.planes = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.bitPP = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.compress = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.rawSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.hr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.vr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.colors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.importantColors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n\n  if (this.bitPP === 16 && this.is_with_alpha) {\n    this.bitPP = 15;\n  }\n  if (this.bitPP < 15) {\n    var len = this.colors === 0 ? 1 << this.bitPP : this.colors;\n    this.palette = new Array(len);\n    for (var i = 0; i < len; i++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var quad = this.datav.getUint8(this.pos++, true);\n      this.palette[i] = {\n        red: red,\n        green: green,\n        blue: blue,\n        quad: quad\n      };\n    }\n  }\n  if (this.height < 0) {\n    this.height *= -1;\n    this.bottom_up = false;\n  }\n};\n\nBmpDecoder.prototype.parseBGR = function() {\n  this.pos = this.offset;\n  try {\n    var bitn = \"bit\" + this.bitPP;\n    var len = this.width * this.height * 4;\n    this.data = new Uint8Array(len);\n\n    this[bitn]();\n  } catch (e) {\n    console.log(\"bit decode error:\" + e);\n  }\n};\n\nBmpDecoder.prototype.bit1 = function() {\n  var xlen = Math.ceil(this.width / 8);\n  var mode = xlen % 4;\n  var y;\n  for (y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 8 * 4;\n      for (var i = 0; i < 8; i++) {\n        if (x * 8 + i < this.width) {\n          var rgb = this.palette[(b >> (7 - i)) & 0x1];\n          this.data[location + i * 4] = rgb.blue;\n          this.data[location + i * 4 + 1] = rgb.green;\n          this.data[location + i * 4 + 2] = rgb.red;\n          this.data[location + i * 4 + 3] = 0xff;\n        } else {\n          break;\n        }\n      }\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit4 = function() {\n  var xlen = Math.ceil(this.width / 2);\n  var mode = xlen % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 2 * 4;\n\n      var before = b >> 4;\n      var after = b & 0x0f;\n\n      var rgb = this.palette[before];\n      this.data[location] = rgb.blue;\n      this.data[location + 1] = rgb.green;\n      this.data[location + 2] = rgb.red;\n      this.data[location + 3] = 0xff;\n\n      if (x * 2 + 1 >= this.width) break;\n\n      rgb = this.palette[after];\n      this.data[location + 4] = rgb.blue;\n      this.data[location + 4 + 1] = rgb.green;\n      this.data[location + 4 + 2] = rgb.red;\n      this.data[location + 4 + 3] = 0xff;\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit8 = function() {\n  var mode = this.width % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      if (b < this.palette.length) {\n        var rgb = this.palette[b];\n        this.data[location] = rgb.red;\n        this.data[location + 1] = rgb.green;\n        this.data[location + 2] = rgb.blue;\n        this.data[location + 3] = 0xff;\n      } else {\n        this.data[location] = 0xff;\n        this.data[location + 1] = 0xff;\n        this.data[location + 2] = 0xff;\n        this.data[location + 3] = 0xff;\n      }\n    }\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit15 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_5) / _1_5) * 255) | 0;\n      var red = ((((B >> 10) & _1_5) / _1_5) * 255) | 0;\n      var alpha = B >> 15 ? 0xff : 0x00;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit16 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  var _111111 = parseInt(\"111111\", 2),\n    _1_6 = _111111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var alpha = 0xff;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_6) / _1_6) * 255) | 0;\n      var red = (((B >> 11) / _1_5) * 255) | 0;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit24 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = 0xff;\n    }\n    //skip extra bytes\n    this.pos += this.width % 4;\n  }\n};\n\n/**\n * add 32bit decode func\n * @author soubok\n */\nBmpDecoder.prototype.bit32 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var alpha = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    //this.pos += (this.width % 4);\n  }\n};\n\nBmpDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { BmpDecoder };\n","function WebPDecoder(imageData) {\n  /** @license\n   * Copyright 2011 Google Inc.\n   *\n   * This code is licensed under the same terms as WebM:\n   *  Software License Agreement:  http://www.webmproject.org/license/software/\n   *  Additional IP Rights Grant:  http://www.webmproject.org/license/additional/\n   * -----------------------------------------------------------------------------\n   *\n   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n   * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n   * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n   * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n   *\n   * -----------------------------------------------------------------------------\n   *\n   * Copyright 2011-2017 Dominik Homberger\n   * Libwebp Javascript / libwebpjs - the libwebp implementation in javascript (v0.6.0)\n   *\n   * Author: Dominik Homberger (dominik.homberger@gmail.com)\n   */\n\n  var self = this;\n  var UpsampleRgbLinePair,\n    UpsampleBgrLinePair,\n    UpsampleRgbaLinePair,\n    UpsampleBgraLinePair,\n    UpsampleArgbLinePair,\n    UpsampleArgbLinePair,\n    UpsampleRgba4444LinePair,\n    UpsampleRgb565LinePair;\n\n  function x(F) {\n    if (!F) throw Error(\"assert :P\");\n  }\n  function fa(F, L, J) {\n    for (var H = 0; 4 > H; H++) if (F[L + H] != J.charCodeAt(H)) return !0;\n    return !1;\n  }\n  function I(F, L, J, H, Z) {\n    for (var O = 0; O < Z; O++) F[L + O] = J[H + O];\n  }\n  function M(F, L, J, H) {\n    for (var Z = 0; Z < H; Z++) F[L + Z] = J;\n  }\n  function V(F) {\n    return new Int32Array(F);\n  }\n  function wa(F, L) {\n    for (var J = [], H = 0; H < F; H++) J.push(new L());\n    return J;\n  }\n  function wb() {\n    function F(J, H, Z) {\n      for (var O = Z[H], L = 0; L < O; L++) {\n        J.push(Z.length > H + 1 ? [] : 0);\n        if (Z.length < H + 1) break;\n        F(J[L], H + 1, Z);\n      }\n    }\n    var L = [];\n    F(L, 0, [3, 11]);\n    return L;\n  }\n  function Ed(F, L) {\n    function J(H, O, F) {\n      for (var Z = F[O], ma = 0; ma < Z; ma++) {\n        H.push(F.length > O + 1 ? [] : new L());\n        if (F.length < O + 1) break;\n        J(H[ma], O + 1, F);\n      }\n    }\n    var H = [];\n    J(H, 0, F);\n    return H;\n  }\n  var _WebPDecoder = function() {\n    var self = this;\n    function F() {\n      V(55);\n    }\n    function L(a, b) {\n      for (var c = (1 << (b - 1)) >>> 0; a & c; ) c >>>= 1;\n      return c ? (a & (c - 1)) + c : a;\n    }\n    function J(a, b, c, d, e) {\n      x(!(d % c));\n      do (d -= c), (a[b + d] = e);\n      while (0 < d);\n    }\n    function H(a, b, c, d, e, f) {\n      var g = b,\n        h = 1 << c,\n        k,\n        l,\n        m = V(16),\n        n = V(16);\n      x(0 != e);\n      x(null != d);\n      x(null != a);\n      x(0 < c);\n      for (l = 0; l < e; ++l) {\n        if (15 < d[l]) return 0;\n        ++m[d[l]];\n      }\n      if (m[0] == e) return 0;\n      n[1] = 0;\n      for (k = 1; 15 > k; ++k) {\n        if (m[k] > 1 << k) return 0;\n        n[k + 1] = n[k] + m[k];\n      }\n      for (l = 0; l < e; ++l) (k = d[l]), 0 < d[l] && (f[n[k]++] = l);\n      if (1 == n[15])\n        return (d = new O()), (d.g = 0), (d.value = f[0]), J(a, g, 1, h, d), h;\n      var r = -1,\n        q = h - 1,\n        t = 0,\n        v = 1,\n        p = 1,\n        u,\n        w = 1 << c;\n      l = 0;\n      k = 1;\n      for (e = 2; k <= c; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k])\n          (d = new O()),\n            (d.g = k),\n            (d.value = f[l++]),\n            J(a, g + t, e, w, d),\n            (t = L(t, k));\n      }\n      k = c + 1;\n      for (e = 2; 15 >= k; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k]) {\n          d = new O();\n          if ((t & q) != r) {\n            g += w;\n            r = k;\n            for (u = 1 << (r - c); 15 > r; ) {\n              u -= m[r];\n              if (0 >= u) break;\n              ++r;\n              u <<= 1;\n            }\n            u = r - c;\n            w = 1 << u;\n            h += w;\n            r = t & q;\n            a[b + r].g = u + c;\n            a[b + r].value = g - b - r;\n          }\n          d.g = k - c;\n          d.value = f[l++];\n          J(a, g + (t >> c), e, w, d);\n          t = L(t, k);\n        }\n      }\n      return v != 2 * n[15] - 1 ? 0 : h;\n    }\n    function Z(a, b, c, d, e) {\n      x(2328 >= e);\n      if (512 >= e) var f = V(512);\n      else if (((f = V(e)), null == f)) return 0;\n      return H(a, b, c, d, e, f);\n    }\n    function O() {\n      this.value = this.g = 0;\n    }\n    function Fd() {\n      this.value = this.g = 0;\n    }\n    function Ub() {\n      this.G = wa(5, O);\n      this.H = V(5);\n      this.jc = this.Qb = this.qb = this.nd = 0;\n      this.pd = wa(xb, Fd);\n    }\n    function ma(a, b, c, d) {\n      x(null != a);\n      x(null != b);\n      x(2147483648 > d);\n      a.Ca = 254;\n      a.I = 0;\n      a.b = -8;\n      a.Ka = 0;\n      a.oa = b;\n      a.pa = c;\n      a.Jd = b;\n      a.Yc = c + d;\n      a.Zc = 4 <= d ? c + d - 4 + 1 : c;\n      Qa(a);\n    }\n    function na(a, b) {\n      for (var c = 0; 0 < b--; ) c |= K(a, 128) << b;\n      return c;\n    }\n    function ca(a, b) {\n      var c = na(a, b);\n      return G(a) ? -c : c;\n    }\n    function cb(a, b, c, d) {\n      var e,\n        f = 0;\n      x(null != a);\n      x(null != b);\n      x(4294967288 > d);\n      a.Sb = d;\n      a.Ra = 0;\n      a.u = 0;\n      a.h = 0;\n      4 < d && (d = 4);\n      for (e = 0; e < d; ++e) f += b[c + e] << (8 * e);\n      a.Ra = f;\n      a.bb = d;\n      a.oa = b;\n      a.pa = c;\n    }\n    function Vb(a) {\n      for (; 8 <= a.u && a.bb < a.Sb; )\n        (a.Ra >>>= 8),\n          (a.Ra += (a.oa[a.pa + a.bb] << (ob - 8)) >>> 0),\n          ++a.bb,\n          (a.u -= 8);\n      db(a) && ((a.h = 1), (a.u = 0));\n    }\n    function D(a, b) {\n      x(0 <= b);\n      if (!a.h && b <= Gd) {\n        var c = pb(a) & Hd[b];\n        a.u += b;\n        Vb(a);\n        return c;\n      }\n      a.h = 1;\n      return (a.u = 0);\n    }\n    function Wb() {\n      this.b = this.Ca = this.I = 0;\n      this.oa = [];\n      this.pa = 0;\n      this.Jd = [];\n      this.Yc = 0;\n      this.Zc = [];\n      this.Ka = 0;\n    }\n    function Ra() {\n      this.Ra = 0;\n      this.oa = [];\n      this.h = this.u = this.bb = this.Sb = this.pa = 0;\n    }\n    function pb(a) {\n      return (a.Ra >>> (a.u & (ob - 1))) >>> 0;\n    }\n    function db(a) {\n      x(a.bb <= a.Sb);\n      return a.h || (a.bb == a.Sb && a.u > ob);\n    }\n    function qb(a, b) {\n      a.u = b;\n      a.h = db(a);\n    }\n    function Sa(a) {\n      a.u >= Xb && (x(a.u >= Xb), Vb(a));\n    }\n    function Qa(a) {\n      x(null != a && null != a.oa);\n      a.pa < a.Zc\n        ? ((a.I = (a.oa[a.pa++] | (a.I << 8)) >>> 0), (a.b += 8))\n        : (x(null != a && null != a.oa),\n          a.pa < a.Yc\n            ? ((a.b += 8), (a.I = a.oa[a.pa++] | (a.I << 8)))\n            : a.Ka\n            ? (a.b = 0)\n            : ((a.I <<= 8), (a.b += 8), (a.Ka = 1)));\n    }\n    function G(a) {\n      return na(a, 1);\n    }\n    function K(a, b) {\n      var c = a.Ca;\n      0 > a.b && Qa(a);\n      var d = a.b,\n        e = (c * b) >>> 8,\n        f = (a.I >>> d > e) + 0;\n      f ? ((c -= e), (a.I -= ((e + 1) << d) >>> 0)) : (c = e + 1);\n      d = c;\n      for (e = 0; 256 <= d; ) (e += 8), (d >>= 8);\n      d = 7 ^ (e + Id[d]);\n      a.b -= d;\n      a.Ca = (c << d) - 1;\n      return f;\n    }\n    function ra(a, b, c) {\n      a[b + 0] = (c >> 24) & 255;\n      a[b + 1] = (c >> 16) & 255;\n      a[b + 2] = (c >> 8) & 255;\n      a[b + 3] = (c >> 0) & 255;\n    }\n    function Ta(a, b) {\n      return (a[b + 0] << 0) | (a[b + 1] << 8);\n    }\n    function Yb(a, b) {\n      return Ta(a, b) | (a[b + 2] << 16);\n    }\n    function Ha(a, b) {\n      return Ta(a, b) | (Ta(a, b + 2) << 16);\n    }\n    function Zb(a, b) {\n      var c = 1 << b;\n      x(null != a);\n      x(0 < b);\n      a.X = V(c);\n      if (null == a.X) return 0;\n      a.Mb = 32 - b;\n      a.Xa = b;\n      return 1;\n    }\n    function $b(a, b) {\n      x(null != a);\n      x(null != b);\n      x(a.Xa == b.Xa);\n      I(b.X, 0, a.X, 0, 1 << b.Xa);\n    }\n    function ac() {\n      this.X = [];\n      this.Xa = this.Mb = 0;\n    }\n    function bc(a, b, c, d) {\n      x(null != c);\n      x(null != d);\n      var e = c[0],\n        f = d[0];\n      0 == e && (e = (a * f + b / 2) / b);\n      0 == f && (f = (b * e + a / 2) / a);\n      if (0 >= e || 0 >= f) return 0;\n      c[0] = e;\n      d[0] = f;\n      return 1;\n    }\n    function xa(a, b) {\n      return (a + (1 << b) - 1) >>> b;\n    }\n    function yb(a, b) {\n      return (\n        (((((a & 4278255360) + (b & 4278255360)) >>> 0) & 4278255360) +\n          ((((a & 16711935) + (b & 16711935)) >>> 0) & 16711935)) >>>\n        0\n      );\n    }\n    function X(a, b) {\n      self[b] = function(b, d, e, f, g, h, k) {\n        var c;\n        for (c = 0; c < g; ++c) {\n          var m = self[a](h[k + c - 1], e, f + c);\n          h[k + c] = yb(b[d + c], m);\n        }\n      };\n    }\n    function Jd() {\n      this.ud = this.hd = this.jd = 0;\n    }\n    function aa(a, b) {\n      return ((((a ^ b) & 4278124286) >>> 1) + (a & b)) >>> 0;\n    }\n    function sa(a) {\n      if (0 <= a && 256 > a) return a;\n      if (0 > a) return 0;\n      if (255 < a) return 255;\n    }\n    function eb(a, b) {\n      return sa(a + ((a - b + 0.5) >> 1));\n    }\n    function Ia(a, b, c) {\n      return Math.abs(b - c) - Math.abs(a - c);\n    }\n    function cc(a, b, c, d, e, f, g) {\n      d = f[g - 1];\n      for (c = 0; c < e; ++c) f[g + c] = d = yb(a[b + c], d);\n    }\n    function Kd(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < c; ++f) {\n        var g = a[b + f],\n          h = (g >> 8) & 255,\n          k = g & 16711935,\n          k = k + ((h << 16) + h),\n          k = k & 16711935;\n        d[e + f] = ((g & 4278255360) + k) >>> 0;\n      }\n    }\n    function dc(a, b) {\n      b.jd = (a >> 0) & 255;\n      b.hd = (a >> 8) & 255;\n      b.ud = (a >> 16) & 255;\n    }\n    function Ld(a, b, c, d, e, f) {\n      var g;\n      for (g = 0; g < d; ++g) {\n        var h = b[c + g],\n          k = h >>> 8,\n          l = h >>> 16,\n          m = h,\n          l = l + ((((a.jd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          l = l & 255,\n          m = m + ((((a.hd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          m = m + ((((a.ud << 24) >> 24) * ((l << 24) >> 24)) >>> 5),\n          m = m & 255;\n        e[f + g] = (h & 4278255360) + (l << 16) + m;\n      }\n    }\n    function ec(a, b, c, d, e) {\n      self[b] = function(a, b, c, k, l, m, n, r, q) {\n        for (k = n; k < r; ++k)\n          for (n = 0; n < q; ++n) l[m++] = e(c[d(a[b++])]);\n      };\n      self[a] = function(a, b, h, k, l, m, n) {\n        var f = 8 >> a.b,\n          g = a.Ea,\n          t = a.K[0],\n          v = a.w;\n        if (8 > f)\n          for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {\n            var p = 0,\n              u;\n            for (u = 0; u < g; ++u)\n              u & a || (p = d(k[l++])), (m[n++] = e(t[p & v])), (p >>= f);\n          }\n        else self[\"VP8LMapColor\" + c](k, l, t, v, m, n, b, h, g);\n      };\n    }\n    function Md(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n      }\n    }\n    function Nd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 24) & 255;\n      }\n    }\n    function Od(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 240) | ((f >> 12) & 15),\n          f = ((f >> 0) & 240) | ((f >> 28) & 15);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Pd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 248) | ((f >> 13) & 7),\n          f = ((f >> 5) & 224) | ((f >> 3) & 31);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Qd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 16) & 255;\n      }\n    }\n    function fb(a, b, c, d, e, f) {\n      if (0 == f)\n        for (c = b + c; b < c; )\n          (f = a[b++]),\n            ra(\n              d,\n              ((f[0] >> 24) |\n                ((f[1] >> 8) & 65280) |\n                ((f[2] << 8) & 16711680) |\n                (f[3] << 24)) >>>\n                0\n            ),\n            (e += 32);\n      else I(d, e, a, b, c);\n    }\n    function gb(a, b) {\n      self[b][0] = self[a + \"0\"];\n      self[b][1] = self[a + \"1\"];\n      self[b][2] = self[a + \"2\"];\n      self[b][3] = self[a + \"3\"];\n      self[b][4] = self[a + \"4\"];\n      self[b][5] = self[a + \"5\"];\n      self[b][6] = self[a + \"6\"];\n      self[b][7] = self[a + \"7\"];\n      self[b][8] = self[a + \"8\"];\n      self[b][9] = self[a + \"9\"];\n      self[b][10] = self[a + \"10\"];\n      self[b][11] = self[a + \"11\"];\n      self[b][12] = self[a + \"12\"];\n      self[b][13] = self[a + \"13\"];\n      self[b][14] = self[a + \"0\"];\n      self[b][15] = self[a + \"0\"];\n    }\n    function hb(a) {\n      return a == zb || a == Ab || a == Ja || a == Bb;\n    }\n    function Rd() {\n      this.eb = [];\n      this.size = this.A = this.fb = 0;\n    }\n    function Sd() {\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.F = [];\n      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;\n    }\n    function Cb() {\n      this.Rd = this.height = this.width = this.S = 0;\n      this.f = {};\n      this.f.RGBA = new Rd();\n      this.f.kb = new Sd();\n      this.sd = null;\n    }\n    function Td() {\n      this.width = [0];\n      this.height = [0];\n      this.Pd = [0];\n      this.Qd = [0];\n      this.format = [0];\n    }\n    function Ud() {\n      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;\n    }\n    function Vd(a) {\n      alert(\"todo:WebPSamplerProcessPlane\");\n      return a.T;\n    }\n    function Wd(a, b) {\n      var c = a.T,\n        d = b.ba.f.RGBA,\n        e = d.eb,\n        f = d.fb + a.ka * d.A,\n        g = P[b.ba.S],\n        h = a.y,\n        k = a.O,\n        l = a.f,\n        m = a.N,\n        n = a.ea,\n        r = a.W,\n        q = b.cc,\n        t = b.dc,\n        v = b.Mc,\n        p = b.Nc,\n        u = a.ka,\n        w = a.ka + a.T,\n        y = a.U,\n        A = (y + 1) >> 1;\n      0 == u\n        ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y)\n        : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y),\n          ++c);\n      for (; u + 2 < w; u += 2)\n        (q = l),\n          (t = m),\n          (v = n),\n          (p = r),\n          (m += a.Rc),\n          (r += a.Rc),\n          (f += 2 * d.A),\n          (k += 2 * a.fa),\n          g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);\n      k += a.fa;\n      a.j + w < a.o\n        ? (I(b.ec, b.fc, h, k, y),\n          I(b.cc, b.dc, l, m, A),\n          I(b.Mc, b.Nc, n, r, A),\n          c--)\n        : w & 1 ||\n          g(\n            h,\n            k,\n            null,\n            null,\n            l,\n            m,\n            n,\n            r,\n            l,\n            m,\n            n,\n            r,\n            e,\n            f + d.A,\n            null,\n            null,\n            y\n          );\n      return c;\n    }\n    function Xd(a, b, c) {\n      var d = a.F,\n        e = [a.J];\n      if (null != d) {\n        var f = a.U,\n          g = b.ba.S,\n          h = g == ya || g == Ja;\n        b = b.ba.f.RGBA;\n        var k = [0],\n          l = a.ka;\n        k[0] = a.T;\n        a.Kb &&\n          (0 == l ? --k[0] : (--l, (e[0] -= a.width)),\n          a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));\n        var m = b.eb,\n          l = b.fb + l * b.A;\n        a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);\n        x(c == k);\n        a && hb(g) && za(m, l, h, f, k, b.A);\n      }\n      return 0;\n    }\n    function gc(a) {\n      var b = a.ma,\n        c = b.ba.S,\n        d = 11 > c,\n        e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);\n      b.memory = null;\n      b.Ib = null;\n      b.Jb = null;\n      b.Nd = null;\n      if (!hc(b.Oa, a, e ? 11 : 12)) return 0;\n      e && hb(c) && ic();\n      if (a.da) alert(\"todo:use_scaling\");\n      else {\n        if (d) {\n          if (((b.Ib = Vd), a.Kb)) {\n            c = (a.U + 1) >> 1;\n            b.memory = V(a.U + 2 * c);\n            if (null == b.memory) return 0;\n            b.ec = b.memory;\n            b.fc = 0;\n            b.cc = b.ec;\n            b.dc = b.fc + a.U;\n            b.Mc = b.cc;\n            b.Nc = b.dc + c;\n            b.Ib = Wd;\n            ic();\n          }\n        } else alert(\"todo:EmitYUV\");\n        e && ((b.Jb = Xd), d && Aa());\n      }\n      if (d && !jc) {\n        for (a = 0; 256 > a; ++a)\n          (Yd[a] = (89858 * (a - 128) + Ba) >> Wa),\n            (Zd[a] = -22014 * (a - 128) + Ba),\n            ($d[a] = -45773 * (a - 128)),\n            (ae[a] = (113618 * (a - 128) + Ba) >> Wa);\n        for (a = ta; a < Eb; ++a)\n          (b = (76283 * (a - 16) + Ba) >> Wa),\n            (be[a - ta] = ga(b, 255)),\n            (ce[a - ta] = ga((b + 8) >> 4, 15));\n        jc = 1;\n      }\n      return 1;\n    }\n    function kc(a) {\n      var b = a.ma,\n        c = a.U,\n        d = a.T;\n      x(!(a.ka & 1));\n      if (0 >= c || 0 >= d) return 0;\n      c = b.Ib(a, b);\n      null != b.Jb && b.Jb(a, b, c);\n      b.Dc += c;\n      return 1;\n    }\n    function lc(a) {\n      a.ma.memory = null;\n    }\n    function mc(a, b, c, d) {\n      if (47 != D(a, 8)) return 0;\n      b[0] = D(a, 14) + 1;\n      c[0] = D(a, 14) + 1;\n      d[0] = D(a, 1);\n      return 0 != D(a, 3) ? 0 : !a.h;\n    }\n    function ib(a, b) {\n      if (4 > a) return a + 1;\n      var c = (a - 2) >> 1;\n      return ((2 + (a & 1)) << c) + D(b, c) + 1;\n    }\n    function nc(a, b) {\n      if (120 < b) return b - 120;\n      var c = de[b - 1],\n        c = (c >> 4) * a + (8 - (c & 15));\n      return 1 <= c ? c : 1;\n    }\n    function ua(a, b, c) {\n      var d = pb(c);\n      b += d & 255;\n      var e = a[b].g - 8;\n      0 < e &&\n        (qb(c, c.u + 8),\n        (d = pb(c)),\n        (b += a[b].value),\n        (b += d & ((1 << e) - 1)));\n      qb(c, c.u + a[b].g);\n      return a[b].value;\n    }\n    function ub(a, b, c) {\n      c.g += a.g;\n      c.value += (a.value << b) >>> 0;\n      x(8 >= c.g);\n      return a.g;\n    }\n    function ha(a, b, c) {\n      var d = a.xc;\n      b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];\n      x(b < a.Wb);\n      return a.Ya[b];\n    }\n    function oc(a, b, c, d) {\n      var e = a.ab,\n        f = a.c * b,\n        g = a.C;\n      b = g + b;\n      var h = c,\n        k = d;\n      d = a.Ta;\n      for (c = a.Ua; 0 < e--; ) {\n        var l = a.gc[e],\n          m = g,\n          n = b,\n          r = h,\n          q = k,\n          k = d,\n          h = c,\n          t = l.Ea;\n        x(m < n);\n        x(n <= l.nc);\n        switch (l.hc) {\n          case 2:\n            pc(r, q, (n - m) * t, k, h);\n            break;\n          case 0:\n            var v = l,\n              p = m,\n              u = n,\n              w = k,\n              y = h,\n              A = v.Ea;\n            0 == p &&\n              (ee(r, q, null, null, 1, w, y),\n              cc(r, q + 1, 0, 0, A - 1, w, y + 1),\n              (q += A),\n              (y += A),\n              ++p);\n            for (\n              var E = 1 << v.b,\n                B = E - 1,\n                C = xa(A, v.b),\n                N = v.K,\n                v = v.w + (p >> v.b) * C;\n              p < u;\n\n            ) {\n              var z = N,\n                Q = v,\n                S = 1;\n              for (fe(r, q, w, y - A, 1, w, y); S < A; ) {\n                var K = qc[(z[Q++] >> 8) & 15],\n                  D = (S & ~B) + E;\n                D > A && (D = A);\n                K(r, q + +S, w, y + S - A, D - S, w, y + S);\n                S = D;\n              }\n              q += A;\n              y += A;\n              ++p;\n              p & B || (v += C);\n            }\n            n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);\n            break;\n          case 1:\n            t = r;\n            u = q;\n            r = l.Ea;\n            q = 1 << l.b;\n            w = q - 1;\n            y = r & ~w;\n            A = r - y;\n            p = xa(r, l.b);\n            E = l.K;\n            for (l = l.w + (m >> l.b) * p; m < n; ) {\n              B = E;\n              C = l;\n              N = new Jd();\n              v = u + y;\n              for (z = u + r; u < v; )\n                dc(B[C++], N), Fb(N, t, u, q, k, h), (u += q), (h += q);\n              u < z &&\n                (dc(B[C++], N), Fb(N, t, u, A, k, h), (u += A), (h += A));\n              ++m;\n              m & w || (l += p);\n            }\n            break;\n          case 3:\n            if (r == k && q == h && 0 < l.b) {\n              y = (n - m) * xa(l.Ea, l.b);\n              t = h + (n - m) * t - y;\n              u = k;\n              r = t;\n              q = k;\n              w = h;\n              A = y;\n              p = [];\n              for (y = A - 1; 0 <= y; --y) p[y] = q[w + y];\n              for (y = A - 1; 0 <= y; --y) u[r + y] = p[y];\n              rc(l, m, n, k, t, k, h);\n            } else rc(l, m, n, r, q, k, h);\n        }\n        h = d;\n        k = c;\n      }\n      k != c && I(d, c, h, k, f);\n    }\n    function ge(a, b) {\n      var c = a.V,\n        d = a.Ba + a.c * a.C,\n        e = b - a.C;\n      x(b <= a.l.o);\n      x(16 >= e);\n      if (0 < e) {\n        var f = a.l,\n          g = a.Ta,\n          h = a.Ua,\n          k = f.width;\n        oc(a, e, c, d);\n        h = [h];\n        c = a.C;\n        d = b;\n        e = h;\n        x(c < d);\n        x(f.v < f.va);\n        d > f.o && (d = f.o);\n        if (c < f.j) {\n          var l = f.j - c,\n            c = f.j;\n          e[0] += l * k;\n        }\n        c >= d\n          ? (c = 0)\n          : ((e[0] += 4 * f.v),\n            (f.ka = c - f.j),\n            (f.U = f.va - f.v),\n            (f.T = d - c),\n            (c = 1));\n        if (c) {\n          h = h[0];\n          c = a.ca;\n          if (11 > c.S) {\n            for (\n              var m = c.f.RGBA,\n                d = c.S,\n                e = f.U,\n                f = f.T,\n                l = m.eb,\n                n = m.A,\n                r = f,\n                m = m.fb + a.Ma * m.A;\n              0 < r--;\n\n            ) {\n              var q = g,\n                t = h,\n                v = e,\n                p = l,\n                u = m;\n              switch (d) {\n                case Ca:\n                  sc(q, t, v, p, u);\n                  break;\n                case Ua:\n                  Gb(q, t, v, p, u);\n                  break;\n                case zb:\n                  Gb(q, t, v, p, u);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case tc:\n                  uc(q, t, v, p, u);\n                  break;\n                case Va:\n                  fb(q, t, v, p, u, 1);\n                  break;\n                case Ab:\n                  fb(q, t, v, p, u, 1);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case ya:\n                  fb(q, t, v, p, u, 0);\n                  break;\n                case Ja:\n                  fb(q, t, v, p, u, 0);\n                  za(p, u, 1, v, 1, 0);\n                  break;\n                case Db:\n                  Hb(q, t, v, p, u);\n                  break;\n                case Bb:\n                  Hb(q, t, v, p, u);\n                  vc(p, u, v, 1, 0);\n                  break;\n                case wc:\n                  xc(q, t, v, p, u);\n                  break;\n                default:\n                  x(0);\n              }\n              h += k;\n              m += n;\n            }\n            a.Ma += f;\n          } else alert(\"todo:EmitRescaledRowsYUVA\");\n          x(a.Ma <= c.height);\n        }\n      }\n      a.C = b;\n      x(a.C <= a.i);\n    }\n    function yc(a) {\n      var b;\n      if (0 < a.ua) return 0;\n      for (b = 0; b < a.Wb; ++b) {\n        var c = a.Ya[b].G,\n          d = a.Ya[b].H;\n        if (\n          0 < c[1][d[1] + 0].g ||\n          0 < c[2][d[2] + 0].g ||\n          0 < c[3][d[3] + 0].g\n        )\n          return 0;\n      }\n      return 1;\n    }\n    function zc(a, b, c, d, e, f) {\n      if (0 != a.Z) {\n        var g = a.qd,\n          h = a.rd;\n        for (x(null != ia[a.Z]); b < c; ++b)\n          ia[a.Z](g, h, d, e, d, e, f), (g = d), (h = e), (e += f);\n        a.qd = g;\n        a.rd = h;\n      }\n    }\n    function Ib(a, b) {\n      var c = a.l.ma,\n        d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,\n        d = a.C < d ? d : a.C;\n      x(b <= a.l.o);\n      if (b > d) {\n        var e = a.l.width,\n          f = c.ca,\n          g = c.tb + e * d,\n          h = a.V,\n          k = a.Ba + a.c * d,\n          l = a.gc;\n        x(1 == a.ab);\n        x(3 == l[0].hc);\n        he(l[0], d, b, h, k, f, g);\n        zc(c, d, b, f, g, e);\n      }\n      a.C = a.Ma = b;\n    }\n    function Jb(a, b, c, d, e, f, g) {\n      var h = a.$ / d,\n        k = a.$ % d,\n        l = a.m,\n        m = a.s,\n        n = c + a.$,\n        r = n;\n      e = c + d * e;\n      var q = c + d * f,\n        t = 280 + m.ua,\n        v = a.Pb ? h : 16777216,\n        p = 0 < m.ua ? m.Wa : null,\n        u = m.wc,\n        w = n < q ? ha(m, k, h) : null;\n      x(a.C < f);\n      x(q <= e);\n      var y = !1;\n      a: for (;;) {\n        for (; y || n < q; ) {\n          var A = 0;\n          if (h >= v) {\n            var v = a,\n              E = n - c;\n            x(v.Pb);\n            v.wd = v.m;\n            v.xd = E;\n            0 < v.s.ua && $b(v.s.Wa, v.s.vb);\n            v = h + ie;\n          }\n          k & u || (w = ha(m, k, h));\n          x(null != w);\n          w.Qb && ((b[n] = w.qb), (y = !0));\n          if (!y)\n            if ((Sa(l), w.jc)) {\n              var A = l,\n                E = b,\n                B = n,\n                C = w.pd[pb(A) & (xb - 1)];\n              x(w.jc);\n              256 > C.g\n                ? (qb(A, A.u + C.g), (E[B] = C.value), (A = 0))\n                : (qb(A, A.u + C.g - 256), x(256 <= C.value), (A = C.value));\n              0 == A && (y = !0);\n            } else A = ua(w.G[0], w.H[0], l);\n          if (l.h) break;\n          if (y || 256 > A) {\n            if (!y)\n              if (w.nd) b[n] = (w.qb | (A << 8)) >>> 0;\n              else {\n                Sa(l);\n                y = ua(w.G[1], w.H[1], l);\n                Sa(l);\n                E = ua(w.G[2], w.H[2], l);\n                B = ua(w.G[3], w.H[3], l);\n                if (l.h) break;\n                b[n] = ((B << 24) | (y << 16) | (A << 8) | E) >>> 0;\n              }\n            y = !1;\n            ++n;\n            ++k;\n            if (\n              k >= d &&\n              ((k = 0),\n              ++h,\n              null != g && h <= f && !(h % 16) && g(a, h),\n              null != p)\n            )\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (280 > A) {\n            A = ib(A - 256, l);\n            E = ua(w.G[4], w.H[4], l);\n            Sa(l);\n            E = ib(E, l);\n            E = nc(d, E);\n            if (l.h) break;\n            if (n - c < E || e - n < A) break a;\n            else for (B = 0; B < A; ++B) b[n + B] = b[n + B - E];\n            n += A;\n            for (k += A; k >= d; )\n              (k -= d), ++h, null != g && h <= f && !(h % 16) && g(a, h);\n            x(n <= e);\n            k & u && (w = ha(m, k, h));\n            if (null != p)\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (A < t) {\n            y = A - 280;\n            for (x(null != p); r < n; )\n              (A = b[r++]), (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n            A = n;\n            E = p;\n            x(!(y >>> E.Xa));\n            b[A] = E.X[y];\n            y = !0;\n          } else break a;\n          y || x(l.h == db(l));\n        }\n        if (a.Pb && l.h && n < e)\n          x(a.m.h),\n            (a.a = 5),\n            (a.m = a.wd),\n            (a.$ = a.xd),\n            0 < a.s.ua && $b(a.s.vb, a.s.Wa);\n        else if (l.h) break a;\n        else null != g && g(a, h > f ? f : h), (a.a = 0), (a.$ = n - c);\n        return 1;\n      }\n      a.a = 3;\n      return 0;\n    }\n    function Ac(a) {\n      x(null != a);\n      a.vc = null;\n      a.yc = null;\n      a.Ya = null;\n      var b = a.Wa;\n      null != b && (b.X = null);\n      a.vb = null;\n      x(null != a);\n    }\n    function Bc() {\n      var a = new je();\n      if (null == a) return null;\n      a.a = 0;\n      a.xb = Cc;\n      gb(\"Predictor\", \"VP8LPredictors\");\n      gb(\"Predictor\", \"VP8LPredictors_C\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd_C\");\n      pc = Kd;\n      Fb = Ld;\n      sc = Md;\n      Gb = Nd;\n      Hb = Od;\n      xc = Pd;\n      uc = Qd;\n      self.VP8LMapColor32b = ke;\n      self.VP8LMapColor8b = le;\n      return a;\n    }\n    function rb(a, b, c, d, e) {\n      var f = 1,\n        g = [a],\n        h = [b],\n        k = d.m,\n        l = d.s,\n        m = null,\n        n = 0;\n      a: for (;;) {\n        if (c)\n          for (; f && D(k, 1); ) {\n            var r = g,\n              q = h,\n              t = d,\n              v = 1,\n              p = t.m,\n              u = t.gc[t.ab],\n              w = D(p, 2);\n            if (t.Oc & (1 << w)) f = 0;\n            else {\n              t.Oc |= 1 << w;\n              u.hc = w;\n              u.Ea = r[0];\n              u.nc = q[0];\n              u.K = [null];\n              ++t.ab;\n              x(4 >= t.ab);\n              switch (w) {\n                case 0:\n                case 1:\n                  u.b = D(p, 3) + 2;\n                  v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);\n                  u.K = u.K[0];\n                  break;\n                case 3:\n                  var y = D(p, 8) + 1,\n                    A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;\n                  r[0] = xa(u.Ea, A);\n                  u.b = A;\n                  var v = rb(y, 1, 0, t, u.K),\n                    E;\n                  if ((E = v)) {\n                    var B,\n                      C = y,\n                      N = u,\n                      z = 1 << (8 >> N.b),\n                      Q = V(z);\n                    if (null == Q) E = 0;\n                    else {\n                      var S = N.K[0],\n                        K = N.w;\n                      Q[0] = N.K[0][0];\n                      for (B = 1; B < 1 * C; ++B) Q[B] = yb(S[K + B], Q[B - 1]);\n                      for (; B < 4 * z; ++B) Q[B] = 0;\n                      N.K[0] = null;\n                      N.K[0] = Q;\n                      E = 1;\n                    }\n                  }\n                  v = E;\n                  break;\n                case 2:\n                  break;\n                default:\n                  x(0);\n              }\n              f = v;\n            }\n          }\n        g = g[0];\n        h = h[0];\n        if (f && D(k, 1) && ((n = D(k, 4)), (f = 1 <= n && 11 >= n), !f)) {\n          d.a = 3;\n          break a;\n        }\n        var H;\n        if ((H = f))\n          b: {\n            var F = d,\n              G = g,\n              L = h,\n              J = n,\n              T = c,\n              Da,\n              ba,\n              X = F.m,\n              R = F.s,\n              P = [null],\n              U,\n              W = 1,\n              aa = 0,\n              na = me[J];\n            c: for (;;) {\n              if (T && D(X, 1)) {\n                var ca = D(X, 3) + 2,\n                  ga = xa(G, ca),\n                  ka = xa(L, ca),\n                  qa = ga * ka;\n                if (!rb(ga, ka, 0, F, P)) break c;\n                P = P[0];\n                R.xc = ca;\n                for (Da = 0; Da < qa; ++Da) {\n                  var ia = (P[Da] >> 8) & 65535;\n                  P[Da] = ia;\n                  ia >= W && (W = ia + 1);\n                }\n              }\n              if (X.h) break c;\n              for (ba = 0; 5 > ba; ++ba) {\n                var Y = Dc[ba];\n                !ba && 0 < J && (Y += 1 << J);\n                aa < Y && (aa = Y);\n              }\n              var ma = wa(W * na, O);\n              var ua = W,\n                va = wa(ua, Ub);\n              if (null == va) var la = null;\n              else x(65536 >= ua), (la = va);\n              var ha = V(aa);\n              if (null == la || null == ha || null == ma) {\n                F.a = 1;\n                break c;\n              }\n              var pa = ma;\n              for (Da = U = 0; Da < W; ++Da) {\n                var ja = la[Da],\n                  da = ja.G,\n                  ea = ja.H,\n                  Fa = 0,\n                  ra = 1,\n                  Ha = 0;\n                for (ba = 0; 5 > ba; ++ba) {\n                  Y = Dc[ba];\n                  da[ba] = pa;\n                  ea[ba] = U;\n                  !ba && 0 < J && (Y += 1 << J);\n                  d: {\n                    var sa,\n                      za = Y,\n                      ta = F,\n                      oa = ha,\n                      db = pa,\n                      eb = U,\n                      Ia = 0,\n                      Ka = ta.m,\n                      fb = D(Ka, 1);\n                    M(oa, 0, 0, za);\n                    if (fb) {\n                      var gb = D(Ka, 1) + 1,\n                        hb = D(Ka, 1),\n                        Ja = D(Ka, 0 == hb ? 1 : 8);\n                      oa[Ja] = 1;\n                      2 == gb && ((Ja = D(Ka, 8)), (oa[Ja] = 1));\n                      var ya = 1;\n                    } else {\n                      var Ua = V(19),\n                        Va = D(Ka, 4) + 4;\n                      if (19 < Va) {\n                        ta.a = 3;\n                        var Aa = 0;\n                        break d;\n                      }\n                      for (sa = 0; sa < Va; ++sa) Ua[ne[sa]] = D(Ka, 3);\n                      var Ba = void 0,\n                        sb = void 0,\n                        Wa = ta,\n                        ib = Ua,\n                        Ca = za,\n                        Xa = oa,\n                        Oa = 0,\n                        La = Wa.m,\n                        Ya = 8,\n                        Za = wa(128, O);\n                      e: for (;;) {\n                        if (!Z(Za, 0, 7, ib, 19)) break e;\n                        if (D(La, 1)) {\n                          var kb = 2 + 2 * D(La, 3),\n                            Ba = 2 + D(La, kb);\n                          if (Ba > Ca) break e;\n                        } else Ba = Ca;\n                        for (sb = 0; sb < Ca && Ba--; ) {\n                          Sa(La);\n                          var $a = Za[0 + (pb(La) & 127)];\n                          qb(La, La.u + $a.g);\n                          var jb = $a.value;\n                          if (16 > jb) (Xa[sb++] = jb), 0 != jb && (Ya = jb);\n                          else {\n                            var lb = 16 == jb,\n                              ab = jb - 16,\n                              mb = oe[ab],\n                              bb = D(La, pe[ab]) + mb;\n                            if (sb + bb > Ca) break e;\n                            else\n                              for (var nb = lb ? Ya : 0; 0 < bb--; )\n                                Xa[sb++] = nb;\n                          }\n                        }\n                        Oa = 1;\n                        break e;\n                      }\n                      Oa || (Wa.a = 3);\n                      ya = Oa;\n                    }\n                    (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));\n                    ya && 0 != Ia ? (Aa = Ia) : ((ta.a = 3), (Aa = 0));\n                  }\n                  if (0 == Aa) break c;\n                  ra && 1 == qe[ba] && (ra = 0 == pa[U].g);\n                  Fa += pa[U].g;\n                  U += Aa;\n                  if (3 >= ba) {\n                    var Pa = ha[0],\n                      tb;\n                    for (tb = 1; tb < Y; ++tb) ha[tb] > Pa && (Pa = ha[tb]);\n                    Ha += Pa;\n                  }\n                }\n                ja.nd = ra;\n                ja.Qb = 0;\n                ra &&\n                  ((ja.qb =\n                    ((da[3][ea[3] + 0].value << 24) |\n                      (da[1][ea[1] + 0].value << 16) |\n                      da[2][ea[2] + 0].value) >>>\n                    0),\n                  0 == Fa &&\n                    256 > da[0][ea[0] + 0].value &&\n                    ((ja.Qb = 1), (ja.qb += da[0][ea[0] + 0].value << 8)));\n                ja.jc = !ja.Qb && 6 > Ha;\n                if (ja.jc) {\n                  var Ga,\n                    Ea = ja;\n                  for (Ga = 0; Ga < xb; ++Ga) {\n                    var Ma = Ga,\n                      Na = Ea.pd[Ma],\n                      vb = Ea.G[0][Ea.H[0] + Ma];\n                    256 <= vb.value\n                      ? ((Na.g = vb.g + 256), (Na.value = vb.value))\n                      : ((Na.g = 0),\n                        (Na.value = 0),\n                        (Ma >>= ub(vb, 8, Na)),\n                        (Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na)),\n                        (Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na)),\n                        ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));\n                  }\n                }\n              }\n              R.vc = P;\n              R.Wb = W;\n              R.Ya = la;\n              R.yc = ma;\n              H = 1;\n              break b;\n            }\n            H = 0;\n          }\n        f = H;\n        if (!f) {\n          d.a = 3;\n          break a;\n        }\n        if (0 < n) {\n          if (((l.ua = 1 << n), !Zb(l.Wa, n))) {\n            d.a = 1;\n            f = 0;\n            break a;\n          }\n        } else l.ua = 0;\n        var Qa = d,\n          cb = g,\n          ob = h,\n          Ra = Qa.s,\n          Ta = Ra.xc;\n        Qa.c = cb;\n        Qa.i = ob;\n        Ra.md = xa(cb, Ta);\n        Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;\n        if (c) {\n          d.xb = re;\n          break a;\n        }\n        m = V(g * h);\n        if (null == m) {\n          d.a = 1;\n          f = 0;\n          break a;\n        }\n        f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;\n        break a;\n      }\n      f\n        ? (null != e ? (e[0] = m) : (x(null == m), x(c)), (d.$ = 0), c || Ac(l))\n        : Ac(l);\n      return f;\n    }\n    function Ec(a, b) {\n      var c = a.c * a.i,\n        d = c + b + 16 * b;\n      x(a.c <= b);\n      a.V = V(d);\n      if (null == a.V) return (a.Ta = null), (a.Ua = 0), (a.a = 1), 0;\n      a.Ta = a.V;\n      a.Ua = a.Ba + c + b;\n      return 1;\n    }\n    function se(a, b) {\n      var c = a.C,\n        d = b - c,\n        e = a.V,\n        f = a.Ba + a.c * c;\n      for (x(b <= a.l.o); 0 < d; ) {\n        var g = 16 < d ? 16 : d,\n          h = a.l.ma,\n          k = a.l.width,\n          l = k * g,\n          m = h.ca,\n          n = h.tb + k * c,\n          r = a.Ta,\n          q = a.Ua;\n        oc(a, g, e, f);\n        Fc(r, q, m, n, l);\n        zc(h, c, c + g, m, n, k);\n        d -= g;\n        e += g * a.c;\n        c += g;\n      }\n      x(c == b);\n      a.C = a.Ma = b;\n    }\n    function te(a, b) {\n      var c = [0],\n        d = [0],\n        e = [0];\n      a: for (;;) {\n        if (null == a) return 0;\n        if (null == b) return (a.a = 2), 0;\n        a.l = b;\n        a.a = 0;\n        cb(a.m, b.data, b.w, b.ha);\n        if (!mc(a.m, c, d, e)) {\n          a.a = 3;\n          break a;\n        }\n        a.xb = Cc;\n        b.width = c[0];\n        b.height = d[0];\n        if (!rb(c[0], d[0], 1, a, null)) break a;\n        return 1;\n      }\n      x(0 != a.a);\n      return 0;\n    }\n    function ue() {\n      this.ub = this.yd = this.td = this.Rb = 0;\n    }\n    function ve() {\n      this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;\n    }\n    function we() {\n      this.Fb = this.Bb = this.Cb = 0;\n      this.Zb = V(4);\n      this.Lb = V(4);\n    }\n    function Gc() {\n      this.Yb = wb();\n    }\n    function xe() {\n      this.jb = V(3);\n      this.Wc = Ed([4, 8], Gc);\n      this.Xc = Ed([4, 17], Gc);\n    }\n    function ye() {\n      this.Pc = this.wb = this.Tb = this.zd = 0;\n      this.vd = new V(4);\n      this.od = new V(4);\n    }\n    function Xa() {\n      this.ld = this.La = this.dd = this.tc = 0;\n    }\n    function Hc() {\n      this.Na = this.la = 0;\n    }\n    function ze() {\n      this.Sc = [0, 0];\n      this.Eb = [0, 0];\n      this.Qc = [0, 0];\n      this.ia = this.lc = 0;\n    }\n    function Kb() {\n      this.ad = V(384);\n      this.Za = 0;\n      this.Ob = V(16);\n      this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;\n    }\n    function Ae() {\n      this.uc = this.M = this.Nb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.ya = Array(new Kb());\n      this.aa = 0;\n      this.l = new Oa();\n    }\n    function Ic() {\n      this.y = V(16);\n      this.f = V(8);\n      this.ea = V(8);\n    }\n    function Be() {\n      this.cb = this.a = 0;\n      this.sc = \"\";\n      this.m = new Wb();\n      this.Od = new ue();\n      this.Kc = new ve();\n      this.ed = new ye();\n      this.Qa = new we();\n      this.Ic = this.$c = this.Aa = 0;\n      this.D = new Ae();\n      this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;\n      this.Jc = wa(8, Wb);\n      this.ia = 0;\n      new F();\n      this.pb = wa(4, ze);\n      this.Pa = new xe();\n      this.Bd = this.kc = 0;\n      this.Ac = [];\n      this.Bc = 0;\n      this.zc = [0, 0, 0, 0];\n      this.Gd = Array(new Ic());\n      this.Hd = 0;\n      this.rb = Array(new Hc());\n      this.sb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.oc = [];\n      this.pc = 0;\n      this.sa = [];\n      this.ta = 0;\n      this.qa = [];\n      this.ra = 0;\n      this.Ha = [];\n      this.B = this.R = this.Ia = 0;\n      this.Ec = [];\n      this.M = this.ja = this.Vb = this.Fc = 0;\n      this.ya = Array(new Kb());\n      this.L = this.aa = 0;\n      this.gd = Ed([4, 2], Xa);\n      this.ga = null;\n      this.Fa = [];\n      this.Cc = this.qc = this.P = 0;\n      this.Gb = [];\n      this.Uc = 0;\n      this.mb = [];\n      this.nb = 0;\n      this.rc = [];\n      this.Ga = this.Vc = 0;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function Oa() {\n      this.T = this.U = this.ka = this.height = this.width = 0;\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.Rc = this.fa = this.W = this.N = this.O = 0;\n      this.ma = \"void\";\n      this.put = \"VP8IoPutHook\";\n      this.ac = \"VP8IoSetupHook\";\n      this.bc = \"VP8IoTeardownHook\";\n      this.ha = this.Kb = 0;\n      this.data = [];\n      this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0;\n      this.F = [];\n      this.J = 0;\n    }\n    function Ce() {\n      var a = new Be();\n      null != a &&\n        ((a.a = 0), (a.sc = \"OK\"), (a.cb = 0), (a.Xb = 0), oa || (oa = De));\n      return a;\n    }\n    function T(a, b, c) {\n      0 == a.a && ((a.a = b), (a.sc = c), (a.cb = 0));\n      return 0;\n    }\n    function Jc(a, b, c) {\n      return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];\n    }\n    function Kc(a, b) {\n      if (null == a) return 0;\n      a.a = 0;\n      a.sc = \"OK\";\n      if (null == b) return T(a, 2, \"null VP8Io passed to VP8GetHeaders()\");\n      var c = b.data;\n      var d = b.w;\n      var e = b.ha;\n      if (4 > e) return T(a, 7, \"Truncated header.\");\n      var f = c[d + 0] | (c[d + 1] << 8) | (c[d + 2] << 16);\n      var g = a.Od;\n      g.Rb = !(f & 1);\n      g.td = (f >> 1) & 7;\n      g.yd = (f >> 4) & 1;\n      g.ub = f >> 5;\n      if (3 < g.td) return T(a, 3, \"Incorrect keyframe parameters.\");\n      if (!g.yd) return T(a, 4, \"Frame not displayable.\");\n      d += 3;\n      e -= 3;\n      var h = a.Kc;\n      if (g.Rb) {\n        if (7 > e) return T(a, 7, \"cannot parse picture header\");\n        if (!Jc(c, d, e)) return T(a, 3, \"Bad code word\");\n        h.c = ((c[d + 4] << 8) | c[d + 3]) & 16383;\n        h.Td = c[d + 4] >> 6;\n        h.i = ((c[d + 6] << 8) | c[d + 5]) & 16383;\n        h.Ud = c[d + 6] >> 6;\n        d += 7;\n        e -= 7;\n        a.za = (h.c + 15) >> 4;\n        a.Ub = (h.i + 15) >> 4;\n        b.width = h.c;\n        b.height = h.i;\n        b.Da = 0;\n        b.j = 0;\n        b.v = 0;\n        b.va = b.width;\n        b.o = b.height;\n        b.da = 0;\n        b.ib = b.width;\n        b.hb = b.height;\n        b.U = b.width;\n        b.T = b.height;\n        f = a.Pa;\n        M(f.jb, 0, 255, f.jb.length);\n        f = a.Qa;\n        x(null != f);\n        f.Cb = 0;\n        f.Bb = 0;\n        f.Fb = 1;\n        M(f.Zb, 0, 0, f.Zb.length);\n        M(f.Lb, 0, 0, f.Lb);\n      }\n      if (g.ub > e) return T(a, 7, \"bad partition length\");\n      f = a.m;\n      ma(f, c, d, g.ub);\n      d += g.ub;\n      e -= g.ub;\n      g.Rb && ((h.Ld = G(f)), (h.Kd = G(f)));\n      h = a.Qa;\n      var k = a.Pa,\n        l;\n      x(null != f);\n      x(null != h);\n      h.Cb = G(f);\n      if (h.Cb) {\n        h.Bb = G(f);\n        if (G(f)) {\n          h.Fb = G(f);\n          for (l = 0; 4 > l; ++l) h.Zb[l] = G(f) ? ca(f, 7) : 0;\n          for (l = 0; 4 > l; ++l) h.Lb[l] = G(f) ? ca(f, 6) : 0;\n        }\n        if (h.Bb) for (l = 0; 3 > l; ++l) k.jb[l] = G(f) ? na(f, 8) : 255;\n      } else h.Bb = 0;\n      if (f.Ka) return T(a, 3, \"cannot parse segment header\");\n      h = a.ed;\n      h.zd = G(f);\n      h.Tb = na(f, 6);\n      h.wb = na(f, 3);\n      h.Pc = G(f);\n      if (h.Pc && G(f)) {\n        for (k = 0; 4 > k; ++k) G(f) && (h.vd[k] = ca(f, 6));\n        for (k = 0; 4 > k; ++k) G(f) && (h.od[k] = ca(f, 6));\n      }\n      a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;\n      if (f.Ka) return T(a, 3, \"cannot parse filter header\");\n      l = d;\n      var m = e;\n      e = l;\n      d = l + m;\n      h = m;\n      a.Xb = (1 << na(a.m, 2)) - 1;\n      k = a.Xb;\n      if (m < 3 * k) c = 7;\n      else {\n        l += 3 * k;\n        h -= 3 * k;\n        for (m = 0; m < k; ++m) {\n          var n = c[e + 0] | (c[e + 1] << 8) | (c[e + 2] << 16);\n          n > h && (n = h);\n          ma(a.Jc[+m], c, l, n);\n          l += n;\n          h -= n;\n          e += 3;\n        }\n        ma(a.Jc[+k], c, l, h);\n        c = l < d ? 0 : 5;\n      }\n      if (0 != c) return T(a, c, \"cannot parse partitions\");\n      l = a.m;\n      c = na(l, 7);\n      e = G(l) ? ca(l, 4) : 0;\n      d = G(l) ? ca(l, 4) : 0;\n      h = G(l) ? ca(l, 4) : 0;\n      k = G(l) ? ca(l, 4) : 0;\n      l = G(l) ? ca(l, 4) : 0;\n      m = a.Qa;\n      for (n = 0; 4 > n; ++n) {\n        if (m.Cb) {\n          var r = m.Zb[n];\n          m.Fb || (r += c);\n        } else if (0 < n) {\n          a.pb[n] = a.pb[0];\n          continue;\n        } else r = c;\n        var q = a.pb[n];\n        q.Sc[0] = Lb[ga(r + e, 127)];\n        q.Sc[1] = Mb[ga(r + 0, 127)];\n        q.Eb[0] = 2 * Lb[ga(r + d, 127)];\n        q.Eb[1] = (101581 * Mb[ga(r + h, 127)]) >> 16;\n        8 > q.Eb[1] && (q.Eb[1] = 8);\n        q.Qc[0] = Lb[ga(r + k, 117)];\n        q.Qc[1] = Mb[ga(r + l, 127)];\n        q.lc = r + l;\n      }\n      if (!g.Rb) return T(a, 4, \"Not a key frame.\");\n      G(f);\n      g = a.Pa;\n      for (c = 0; 4 > c; ++c) {\n        for (e = 0; 8 > e; ++e)\n          for (d = 0; 3 > d; ++d)\n            for (h = 0; 11 > h; ++h)\n              (k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h]),\n                (g.Wc[c][e].Yb[d][h] = k);\n        for (e = 0; 17 > e; ++e) g.Xc[c][e] = g.Wc[c][Ge[e]];\n      }\n      a.kc = G(f);\n      a.kc && (a.Bd = na(f, 8));\n      return (a.cb = 1);\n    }\n    function De(a, b, c, d, e, f, g) {\n      var h = b[e].Yb[c];\n      for (c = 0; 16 > e; ++e) {\n        if (!K(a, h[c + 0])) return e;\n        for (; !K(a, h[c + 1]); )\n          if (((h = b[++e].Yb[0]), (c = 0), 16 == e)) return 16;\n        var k = b[e + 1].Yb;\n        if (K(a, h[c + 2])) {\n          var l = a,\n            m = h,\n            n = c;\n          var r = 0;\n          if (K(l, m[n + 3]))\n            if (K(l, m[n + 6])) {\n              h = 0;\n              r = K(l, m[n + 8]);\n              m = K(l, m[n + 9 + r]);\n              n = 2 * r + m;\n              r = 0;\n              for (m = He[n]; m[h]; ++h) r += r + K(l, m[h]);\n              r += 3 + (8 << n);\n            } else\n              K(l, m[n + 7])\n                ? ((r = 7 + 2 * K(l, 165)), (r += K(l, 145)))\n                : (r = 5 + K(l, 159));\n          else K(l, m[n + 4]) ? (r = 3 + K(l, m[n + 5])) : (r = 2);\n          h = k[2];\n        } else (r = 1), (h = k[1]);\n        k = g + Ie[e];\n        l = a;\n        0 > l.b && Qa(l);\n        var m = l.b,\n          n = l.Ca >> 1,\n          q = (n - (l.I >> m)) >> 31;\n        --l.b;\n        l.Ca += q;\n        l.Ca |= 1;\n        l.I -= ((n + 1) & q) << m;\n        f[k] = ((r ^ q) - q) * d[(0 < e) + 0];\n      }\n      return 16;\n    }\n    function Lc(a) {\n      var b = a.rb[a.sb - 1];\n      b.la = 0;\n      b.Na = 0;\n      M(a.zc, 0, 0, a.zc.length);\n      a.ja = 0;\n    }\n    function Je(a, b) {\n      for (a.M = 0; a.M < a.Va; ++a.M) {\n        var c = a.Jc[a.M & a.Xb],\n          d = a.m,\n          e = a,\n          f;\n        for (f = 0; f < e.za; ++f) {\n          var g = d;\n          var h = e;\n          var k = h.Ac,\n            l = h.Bc + 4 * f,\n            m = h.zc,\n            n = h.ya[h.aa + f];\n          h.Qa.Bb\n            ? (n.$b = K(g, h.Pa.jb[0])\n                ? 2 + K(g, h.Pa.jb[2])\n                : K(g, h.Pa.jb[1]))\n            : (n.$b = 0);\n          h.kc && (n.Ad = K(g, h.Bd));\n          n.Za = !K(g, 145) + 0;\n          if (n.Za) {\n            var r = n.Ob,\n              q = 0;\n            for (h = 0; 4 > h; ++h) {\n              var t = m[0 + h];\n              var v;\n              for (v = 0; 4 > v; ++v) {\n                t = Ke[k[l + v]][t];\n                for (var p = Mc[K(g, t[0])]; 0 < p; )\n                  p = Mc[2 * p + K(g, t[p])];\n                t = -p;\n                k[l + v] = t;\n              }\n              I(r, q, k, l, 4);\n              q += 4;\n              m[0 + h] = t;\n            }\n          } else\n            (t = K(g, 156) ? (K(g, 128) ? 1 : 3) : K(g, 163) ? 2 : 0),\n              (n.Ob[0] = t),\n              M(k, l, t, 4),\n              M(m, 0, t, 4);\n          n.Dd = K(g, 142) ? (K(g, 114) ? (K(g, 183) ? 1 : 3) : 2) : 0;\n        }\n        if (e.m.Ka) return T(a, 7, \"Premature end-of-partition0 encountered.\");\n        for (; a.ja < a.za; ++a.ja) {\n          d = a;\n          e = c;\n          g = d.rb[d.sb - 1];\n          k = d.rb[d.sb + d.ja];\n          f = d.ya[d.aa + d.ja];\n          if ((l = d.kc ? f.Ad : 0))\n            (g.la = k.la = 0),\n              f.Za || (g.Na = k.Na = 0),\n              (f.Hc = 0),\n              (f.Gc = 0),\n              (f.ia = 0);\n          else {\n            var u,\n              w,\n              g = k,\n              k = e,\n              l = d.Pa.Xc,\n              m = d.ya[d.aa + d.ja],\n              n = d.pb[m.$b];\n            h = m.ad;\n            r = 0;\n            q = d.rb[d.sb - 1];\n            t = v = 0;\n            M(h, r, 0, 384);\n            if (m.Za) {\n              var y = 0;\n              var A = l[3];\n            } else {\n              p = V(16);\n              var E = g.Na + q.Na;\n              E = oa(k, l[1], E, n.Eb, 0, p, 0);\n              g.Na = q.Na = (0 < E) + 0;\n              if (1 < E) Nc(p, 0, h, r);\n              else {\n                var B = (p[0] + 3) >> 3;\n                for (p = 0; 256 > p; p += 16) h[r + p] = B;\n              }\n              y = 1;\n              A = l[0];\n            }\n            var C = g.la & 15;\n            var N = q.la & 15;\n            for (p = 0; 4 > p; ++p) {\n              var z = N & 1;\n              for (B = w = 0; 4 > B; ++B)\n                (E = z + (C & 1)),\n                  (E = oa(k, A, E, n.Sc, y, h, r)),\n                  (z = E > y),\n                  (C = (C >> 1) | (z << 7)),\n                  (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                  (r += 16);\n              C >>= 4;\n              N = (N >> 1) | (z << 7);\n              v = ((v << 8) | w) >>> 0;\n            }\n            A = C;\n            y = N >> 4;\n            for (u = 0; 4 > u; u += 2) {\n              w = 0;\n              C = g.la >> (4 + u);\n              N = q.la >> (4 + u);\n              for (p = 0; 2 > p; ++p) {\n                z = N & 1;\n                for (B = 0; 2 > B; ++B)\n                  (E = z + (C & 1)),\n                    (E = oa(k, l[2], E, n.Qc, 0, h, r)),\n                    (z = 0 < E),\n                    (C = (C >> 1) | (z << 3)),\n                    (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                    (r += 16);\n                C >>= 2;\n                N = (N >> 1) | (z << 5);\n              }\n              t |= w << (4 * u);\n              A |= (C << 4) << u;\n              y |= (N & 240) << u;\n            }\n            g.la = A;\n            q.la = y;\n            m.Hc = v;\n            m.Gc = t;\n            m.ia = t & 43690 ? 0 : n.ia;\n            l = !(v | t);\n          }\n          0 < d.L &&\n            ((d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za]),\n            (d.wa[d.Y + d.ja].La |= !l));\n          if (e.Ka) return T(a, 7, \"Premature end-of-file encountered.\");\n        }\n        Lc(a);\n        c = a;\n        d = b;\n        e = 1;\n        f = c.D;\n        g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;\n        if (0 == c.Aa)\n          a: {\n            (f.M = c.M), (f.uc = g), Oc(c, f), (e = 1);\n            w = c.D;\n            f = w.Nb;\n            t = Ya[c.L];\n            g = t * c.R;\n            k = (t / 2) * c.B;\n            p = 16 * f * c.R;\n            B = 8 * f * c.B;\n            l = c.sa;\n            m = c.ta - g + p;\n            n = c.qa;\n            h = c.ra - k + B;\n            r = c.Ha;\n            q = c.Ia - k + B;\n            C = w.M;\n            N = 0 == C;\n            v = C >= c.Va - 1;\n            2 == c.Aa && Oc(c, w);\n            if (w.uc)\n              for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {\n                var Q = E;\n                y = w;\n                A = z;\n                var S = Q.D,\n                  D = S.Nb;\n                u = Q.R;\n                var S = S.wa[S.Y + y],\n                  F = Q.sa,\n                  H = Q.ta + 16 * D * u + 16 * y,\n                  J = S.dd,\n                  G = S.tc;\n                if (0 != G)\n                  if ((x(3 <= G), 1 == Q.L))\n                    0 < y && Pc(F, H, u, G + 4),\n                      S.La && Qc(F, H, u, G),\n                      0 < A && Rc(F, H, u, G + 4),\n                      S.La && Sc(F, H, u, G);\n                  else {\n                    var L = Q.B,\n                      O = Q.qa,\n                      P = Q.ra + 8 * D * L + 8 * y,\n                      R = Q.Ha,\n                      Q = Q.Ia + 8 * D * L + 8 * y,\n                      D = S.ld;\n                    0 < y &&\n                      (Tc(F, H, u, G + 4, J, D),\n                      Uc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));\n                    0 < A &&\n                      (Xc(F, H, u, G + 4, J, D),\n                      Yc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));\n                  }\n              }\n            c.ia && alert(\"todo:DitherRow\");\n            if (null != d.put) {\n              w = 16 * C;\n              C = 16 * (C + 1);\n              N\n                ? ((d.y = c.sa),\n                  (d.O = c.ta + p),\n                  (d.f = c.qa),\n                  (d.N = c.ra + B),\n                  (d.ea = c.Ha),\n                  (d.W = c.Ia + B))\n                : ((w -= t),\n                  (d.y = l),\n                  (d.O = m),\n                  (d.f = n),\n                  (d.N = h),\n                  (d.ea = r),\n                  (d.W = q));\n              v || (C -= t);\n              C > d.o && (C = d.o);\n              d.F = null;\n              d.J = null;\n              if (\n                null != c.Fa &&\n                0 < c.Fa.length &&\n                w < C &&\n                ((d.J = Le(c, d, w, C - w)),\n                (d.F = c.mb),\n                null == d.F && 0 == d.F.length)\n              ) {\n                e = T(c, 3, \"Could not decode alpha data.\");\n                break a;\n              }\n              w < d.j &&\n                ((t = d.j - w),\n                (w = d.j),\n                x(!(t & 1)),\n                (d.O += c.R * t),\n                (d.N += c.B * (t >> 1)),\n                (d.W += c.B * (t >> 1)),\n                null != d.F && (d.J += d.width * t));\n              w < C &&\n                ((d.O += d.v),\n                (d.N += d.v >> 1),\n                (d.W += d.v >> 1),\n                null != d.F && (d.J += d.v),\n                (d.ka = w - d.j),\n                (d.U = d.va - d.v),\n                (d.T = C - w),\n                (e = d.put(d)));\n            }\n            f + 1 != c.Ic ||\n              v ||\n              (I(c.sa, c.ta - g, l, m + 16 * c.R, g),\n              I(c.qa, c.ra - k, n, h + 8 * c.B, k),\n              I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));\n          }\n        if (!e) return T(a, 6, \"Output aborted.\");\n      }\n      return 1;\n    }\n    function Me(a, b) {\n      if (null == a) return 0;\n      if (null == b) return T(a, 2, \"NULL VP8Io parameter in VP8Decode().\");\n      if (!a.cb && !Kc(a, b)) return 0;\n      x(a.cb);\n      if (null == b.ac || b.ac(b)) {\n        b.ob && (a.L = 0);\n        var c = Ya[a.L];\n        2 == a.L\n          ? ((a.yb = 0), (a.zb = 0))\n          : ((a.yb = (b.v - c) >> 4),\n            (a.zb = (b.j - c) >> 4),\n            0 > a.yb && (a.yb = 0),\n            0 > a.zb && (a.zb = 0));\n        a.Va = (b.o + 15 + c) >> 4;\n        a.Hb = (b.va + 15 + c) >> 4;\n        a.Hb > a.za && (a.Hb = a.za);\n        a.Va > a.Ub && (a.Va = a.Ub);\n        if (0 < a.L) {\n          var d = a.ed;\n          for (c = 0; 4 > c; ++c) {\n            var e;\n            if (a.Qa.Cb) {\n              var f = a.Qa.Lb[c];\n              a.Qa.Fb || (f += d.Tb);\n            } else f = d.Tb;\n            for (e = 0; 1 >= e; ++e) {\n              var g = a.gd[c][e],\n                h = f;\n              d.Pc && ((h += d.vd[0]), e && (h += d.od[0]));\n              h = 0 > h ? 0 : 63 < h ? 63 : h;\n              if (0 < h) {\n                var k = h;\n                0 < d.wb &&\n                  ((k = 4 < d.wb ? k >> 2 : k >> 1),\n                  k > 9 - d.wb && (k = 9 - d.wb));\n                1 > k && (k = 1);\n                g.dd = k;\n                g.tc = 2 * h + k;\n                g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;\n              } else g.tc = 0;\n              g.La = e;\n            }\n          }\n        }\n        c = 0;\n      } else T(a, 6, \"Frame setup failed\"), (c = a.a);\n      if ((c = 0 == c)) {\n        if (c) {\n          a.$c = 0;\n          0 < a.Aa || (a.Ic = Ne);\n          b: {\n            c = a.Ic;\n            var k = a.za,\n              d = 4 * k,\n              l = 32 * k,\n              m = k + 1,\n              n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,\n              r = (2 == a.Aa ? 2 : 1) * k;\n            e = ((3 * (16 * c + Ya[a.L])) / 2) * l;\n            f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;\n            g = d + 832 + e + f;\n            if (g != g) c = 0;\n            else {\n              if (g > a.Vb) {\n                a.Vb = 0;\n                a.Ec = V(g);\n                a.Fc = 0;\n                if (null == a.Ec) {\n                  c = T(a, 1, \"no memory during frame initialization.\");\n                  break b;\n                }\n                a.Vb = g;\n              }\n              g = a.Ec;\n              h = a.Fc;\n              a.Ac = g;\n              a.Bc = h;\n              h += d;\n              a.Gd = wa(l, Ic);\n              a.Hd = 0;\n              a.rb = wa(m + 1, Hc);\n              a.sb = 1;\n              a.wa = n ? wa(n, Xa) : null;\n              a.Y = 0;\n              a.D.Nb = 0;\n              a.D.wa = a.wa;\n              a.D.Y = a.Y;\n              0 < a.Aa && (a.D.Y += k);\n              x(!0);\n              a.oc = g;\n              a.pc = h;\n              h += 832;\n              a.ya = wa(r, Kb);\n              a.aa = 0;\n              a.D.ya = a.ya;\n              a.D.aa = a.aa;\n              2 == a.Aa && (a.D.aa += k);\n              a.R = 16 * k;\n              a.B = 8 * k;\n              l = Ya[a.L];\n              k = l * a.R;\n              l = (l / 2) * a.B;\n              a.sa = g;\n              a.ta = h + k;\n              a.qa = a.sa;\n              a.ra = a.ta + 16 * c * a.R + l;\n              a.Ha = a.qa;\n              a.Ia = a.ra + 8 * c * a.B + l;\n              a.$c = 0;\n              h += e;\n              a.mb = f ? g : null;\n              a.nb = f ? h : null;\n              x(h + f <= a.Fc + a.Vb);\n              Lc(a);\n              M(a.Ac, a.Bc, 0, d);\n              c = 1;\n            }\n          }\n          if (c) {\n            b.ka = 0;\n            b.y = a.sa;\n            b.O = a.ta;\n            b.f = a.qa;\n            b.N = a.ra;\n            b.ea = a.Ha;\n            b.Vd = a.Ia;\n            b.fa = a.R;\n            b.Rc = a.B;\n            b.F = null;\n            b.J = 0;\n            if (!ad) {\n              for (c = -255; 255 >= c; ++c) bd[255 + c] = 0 > c ? -c : c;\n              for (c = -1020; 1020 >= c; ++c)\n                cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;\n              for (c = -112; 112 >= c; ++c)\n                dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;\n              for (c = -255; 510 >= c; ++c)\n                ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;\n              ad = 1;\n            }\n            Nc = Oe;\n            Za = Pe;\n            Nb = Qe;\n            pa = Re;\n            Ob = Se;\n            fd = Te;\n            Xc = Ue;\n            Tc = Ve;\n            Yc = We;\n            Uc = Xe;\n            Zc = Ye;\n            Vc = Ze;\n            $c = $e;\n            Wc = af;\n            Rc = gd;\n            Pc = hd;\n            Sc = bf;\n            Qc = cf;\n            W[0] = df;\n            W[1] = ef;\n            W[2] = ff;\n            W[3] = gf;\n            W[4] = hf;\n            W[5] = jf;\n            W[6] = kf;\n            W[7] = lf;\n            W[8] = mf;\n            W[9] = nf;\n            Y[0] = of;\n            Y[1] = pf;\n            Y[2] = qf;\n            Y[3] = rf;\n            Y[4] = sf;\n            Y[5] = tf;\n            Y[6] = uf;\n            ka[0] = vf;\n            ka[1] = wf;\n            ka[2] = xf;\n            ka[3] = yf;\n            ka[4] = zf;\n            ka[5] = Af;\n            ka[6] = Bf;\n            c = 1;\n          } else c = 0;\n        }\n        c && (c = Je(a, b));\n        null != b.bc && b.bc(b);\n        c &= 1;\n      }\n      if (!c) return 0;\n      a.cb = 0;\n      return c;\n    }\n    function qa(a, b, c, d, e) {\n      e = a[b + c + 32 * d] + (e >> 3);\n      a[b + c + 32 * d] = e & -256 ? (0 > e ? 0 : 255) : e;\n    }\n    function kb(a, b, c, d, e, f) {\n      qa(a, b, 0, c, d + e);\n      qa(a, b, 1, c, d + f);\n      qa(a, b, 2, c, d - f);\n      qa(a, b, 3, c, d - e);\n    }\n    function da(a) {\n      return ((20091 * a) >> 16) + a;\n    }\n    function id(a, b, c, d) {\n      var e = 0,\n        f;\n      var g = V(16);\n      for (f = 0; 4 > f; ++f) {\n        var h = a[b + 0] + a[b + 8];\n        var k = a[b + 0] - a[b + 8];\n        var l = ((35468 * a[b + 4]) >> 16) - da(a[b + 12]);\n        var m = da(a[b + 4]) + ((35468 * a[b + 12]) >> 16);\n        g[e + 0] = h + m;\n        g[e + 1] = k + l;\n        g[e + 2] = k - l;\n        g[e + 3] = h - m;\n        e += 4;\n        b++;\n      }\n      for (f = e = 0; 4 > f; ++f)\n        (a = g[e + 0] + 4),\n          (h = a + g[e + 8]),\n          (k = a - g[e + 8]),\n          (l = ((35468 * g[e + 4]) >> 16) - da(g[e + 12])),\n          (m = da(g[e + 4]) + ((35468 * g[e + 12]) >> 16)),\n          qa(c, d, 0, 0, h + m),\n          qa(c, d, 1, 0, k + l),\n          qa(c, d, 2, 0, k - l),\n          qa(c, d, 3, 0, h - m),\n          e++,\n          (d += 32);\n    }\n    function Te(a, b, c, d) {\n      var e = a[b + 0] + 4,\n        f = (35468 * a[b + 4]) >> 16,\n        g = da(a[b + 4]),\n        h = (35468 * a[b + 1]) >> 16;\n      a = da(a[b + 1]);\n      kb(c, d, 0, e + g, a, h);\n      kb(c, d, 1, e + f, a, h);\n      kb(c, d, 2, e - f, a, h);\n      kb(c, d, 3, e - g, a, h);\n    }\n    function Pe(a, b, c, d, e) {\n      id(a, b, c, d);\n      e && id(a, b + 16, c, d + 4);\n    }\n    function Qe(a, b, c, d) {\n      Za(a, b + 0, c, d, 1);\n      Za(a, b + 32, c, d + 128, 1);\n    }\n    function Re(a, b, c, d) {\n      a = a[b + 0] + 4;\n      var e;\n      for (e = 0; 4 > e; ++e) for (b = 0; 4 > b; ++b) qa(c, d, b, e, a);\n    }\n    function Se(a, b, c, d) {\n      a[b + 0] && pa(a, b + 0, c, d);\n      a[b + 16] && pa(a, b + 16, c, d + 4);\n      a[b + 32] && pa(a, b + 32, c, d + 128);\n      a[b + 48] && pa(a, b + 48, c, d + 128 + 4);\n    }\n    function Oe(a, b, c, d) {\n      var e = V(16),\n        f;\n      for (f = 0; 4 > f; ++f) {\n        var g = a[b + 0 + f] + a[b + 12 + f];\n        var h = a[b + 4 + f] + a[b + 8 + f];\n        var k = a[b + 4 + f] - a[b + 8 + f];\n        var l = a[b + 0 + f] - a[b + 12 + f];\n        e[0 + f] = g + h;\n        e[8 + f] = g - h;\n        e[4 + f] = l + k;\n        e[12 + f] = l - k;\n      }\n      for (f = 0; 4 > f; ++f)\n        (a = e[0 + 4 * f] + 3),\n          (g = a + e[3 + 4 * f]),\n          (h = e[1 + 4 * f] + e[2 + 4 * f]),\n          (k = e[1 + 4 * f] - e[2 + 4 * f]),\n          (l = a - e[3 + 4 * f]),\n          (c[d + 0] = (g + h) >> 3),\n          (c[d + 16] = (l + k) >> 3),\n          (c[d + 32] = (g - h) >> 3),\n          (c[d + 48] = (l - k) >> 3),\n          (d += 64);\n    }\n    function Pb(a, b, c) {\n      var d = b - 32,\n        e = R,\n        f = 255 - a[d - 1],\n        g;\n      for (g = 0; g < c; ++g) {\n        var h = e,\n          k = f + a[b - 1],\n          l;\n        for (l = 0; l < c; ++l) a[b + l] = h[k + a[d + l]];\n        b += 32;\n      }\n    }\n    function ef(a, b) {\n      Pb(a, b, 4);\n    }\n    function wf(a, b) {\n      Pb(a, b, 8);\n    }\n    function pf(a, b) {\n      Pb(a, b, 16);\n    }\n    function qf(a, b) {\n      var c;\n      for (c = 0; 16 > c; ++c) I(a, b + 32 * c, a, b - 32, 16);\n    }\n    function rf(a, b) {\n      var c;\n      for (c = 16; 0 < c; --c) M(a, b, a[b - 1], 16), (b += 32);\n    }\n    function $a(a, b, c) {\n      var d;\n      for (d = 0; 16 > d; ++d) M(b, c + 32 * d, a, 16);\n    }\n    function of(a, b) {\n      var c = 16,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d] + a[b + d - 32];\n      $a(c >> 5, a, b);\n    }\n    function sf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d];\n      $a(c >> 4, a, b);\n    }\n    function tf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b + d - 32];\n      $a(c >> 4, a, b);\n    }\n    function uf(a, b) {\n      $a(128, a, b);\n    }\n    function z(a, b, c) {\n      return (a + 2 * b + c + 2) >> 2;\n    }\n    function ff(a, b) {\n      var c = b - 32,\n        c = new Uint8Array([\n          z(a[c - 1], a[c + 0], a[c + 1]),\n          z(a[c + 0], a[c + 1], a[c + 2]),\n          z(a[c + 1], a[c + 2], a[c + 3]),\n          z(a[c + 2], a[c + 3], a[c + 4])\n        ]),\n        d;\n      for (d = 0; 4 > d; ++d) I(a, b + 32 * d, c, 0, c.length);\n    }\n    function gf(a, b) {\n      var c = a[b - 1],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));\n      ra(a, b + 32, 16843009 * z(c, d, e));\n      ra(a, b + 64, 16843009 * z(d, e, f));\n      ra(a, b + 96, 16843009 * z(e, f, f));\n    }\n    function df(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 4 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      c >>= 3;\n      for (d = 0; 4 > d; ++d) M(a, b + 32 * d, c, 4);\n    }\n    function hf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);\n      a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);\n      a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);\n      a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);\n      a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);\n      a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);\n      a[b + 3 + 0] = z(l, k, h);\n    }\n    function kf(a, b) {\n      var c = a[b + 1 - 32],\n        d = a[b + 2 - 32],\n        e = a[b + 3 - 32],\n        f = a[b + 4 - 32],\n        g = a[b + 5 - 32],\n        h = a[b + 6 - 32],\n        k = a[b + 7 - 32];\n      a[b + 0 + 0] = z(a[b + 0 - 32], c, d);\n      a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);\n      a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);\n      a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);\n      a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, k);\n    }\n    function jf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 0] = a[b + 1 + 64] = (f + g + 1) >> 1;\n      a[b + 1 + 0] = a[b + 2 + 64] = (g + h + 1) >> 1;\n      a[b + 2 + 0] = a[b + 3 + 64] = (h + k + 1) >> 1;\n      a[b + 3 + 0] = (k + l + 1) >> 1;\n      a[b + 0 + 96] = z(e, d, c);\n      a[b + 0 + 64] = z(d, c, f);\n      a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);\n      a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);\n      a[b + 3 + 32] = z(h, k, l);\n    }\n    function lf(a, b) {\n      var c = a[b + 0 - 32],\n        d = a[b + 1 - 32],\n        e = a[b + 2 - 32],\n        f = a[b + 3 - 32],\n        g = a[b + 4 - 32],\n        h = a[b + 5 - 32],\n        k = a[b + 6 - 32],\n        l = a[b + 7 - 32];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 1 + 0] = a[b + 0 + 64] = (d + e + 1) >> 1;\n      a[b + 2 + 0] = a[b + 1 + 64] = (e + f + 1) >> 1;\n      a[b + 3 + 0] = a[b + 2 + 64] = (f + g + 1) >> 1;\n      a[b + 0 + 32] = z(c, d, e);\n      a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);\n      a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 3 + 64] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, l);\n    }\n    function nf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 2 + 0] = a[b + 0 + 32] = (d + e + 1) >> 1;\n      a[b + 2 + 32] = a[b + 0 + 64] = (e + f + 1) >> 1;\n      a[b + 1 + 0] = z(c, d, e);\n      a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);\n      a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);\n      a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[\n        b + 2 + 96\n      ] = a[b + 3 + 96] = f;\n    }\n    function mf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96],\n        g = a[b - 1 - 32],\n        h = a[b + 0 - 32],\n        k = a[b + 1 - 32],\n        l = a[b + 2 - 32];\n      a[b + 0 + 0] = a[b + 2 + 32] = (c + g + 1) >> 1;\n      a[b + 0 + 32] = a[b + 2 + 64] = (d + c + 1) >> 1;\n      a[b + 0 + 64] = a[b + 2 + 96] = (e + d + 1) >> 1;\n      a[b + 0 + 96] = (f + e + 1) >> 1;\n      a[b + 3 + 0] = z(h, k, l);\n      a[b + 2 + 0] = z(g, h, k);\n      a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);\n      a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);\n      a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);\n      a[b + 1 + 96] = z(f, e, d);\n    }\n    function xf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) I(a, b + 32 * c, a, b - 32, 8);\n    }\n    function yf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) M(a, b, a[b - 1], 8), (b += 32);\n    }\n    function lb(a, b, c) {\n      var d;\n      for (d = 0; 8 > d; ++d) M(b, c + 32 * d, a, 8);\n    }\n    function vf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      lb(c >> 4, a, b);\n    }\n    function Af(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32];\n      lb(c >> 3, a, b);\n    }\n    function zf(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b - 1 + 32 * d];\n      lb(c >> 3, a, b);\n    }\n    function Bf(a, b) {\n      lb(128, a, b);\n    }\n    function ab(a, b, c) {\n      var d = a[b - c],\n        e = a[b + 0],\n        f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],\n        g = mb[112 + ((f + 4) >> 3)];\n      a[b - c] = R[255 + d + mb[112 + ((f + 3) >> 3)]];\n      a[b + 0] = R[255 + e - g];\n    }\n    function jd(a, b, c, d) {\n      var e = a[b + 0],\n        f = a[b + c];\n      return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;\n    }\n    function kd(a, b, c, d) {\n      return (\n        4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d\n      );\n    }\n    function ld(a, b, c, d, e) {\n      var f = a[b - 3 * c],\n        g = a[b - 2 * c],\n        h = a[b - c],\n        k = a[b + 0],\n        l = a[b + c],\n        m = a[b + 2 * c],\n        n = a[b + 3 * c];\n      return 4 * U[255 + h - k] + U[255 + g - l] > d\n        ? 0\n        : U[255 + a[b - 4 * c] - f] <= e &&\n            U[255 + f - g] <= e &&\n            U[255 + g - h] <= e &&\n            U[255 + n - m] <= e &&\n            U[255 + m - l] <= e &&\n            U[255 + l - k] <= e;\n    }\n    function gd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d, c, e) && ab(a, b + d, c);\n    }\n    function hd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);\n    }\n    function bf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4 * c), gd(a, b, c, d);\n    }\n    function cf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4), hd(a, b, c, d);\n    }\n    function ea(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - 2 * m],\n              r = k[l - m],\n              q = k[l + 0],\n              t = k[l + m],\n              v = k[l + 2 * m],\n              p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],\n              u = (27 * p + 63) >> 7,\n              w = (18 * p + 63) >> 7,\n              p = (9 * p + 63) >> 7;\n            k[l - 3 * m] = R[255 + k[l - 3 * m] + p];\n            k[l - 2 * m] = R[255 + n + w];\n            k[l - m] = R[255 + r + u];\n            k[l + 0] = R[255 + q - u];\n            k[l + m] = R[255 + t - w];\n            k[l + 2 * m] = R[255 + v - p];\n          }\n        b += d;\n      }\n    }\n    function Fa(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - m],\n              r = k[l + 0],\n              q = k[l + m],\n              t = 3 * (r - n),\n              v = mb[112 + ((t + 4) >> 3)],\n              t = mb[112 + ((t + 3) >> 3)],\n              p = (v + 1) >> 1;\n            k[l - 2 * m] = R[255 + k[l - 2 * m] + p];\n            k[l - m] = R[255 + n + t];\n            k[l + 0] = R[255 + r - v];\n            k[l + m] = R[255 + q - p];\n          }\n        b += d;\n      }\n    }\n    function Ue(a, b, c, d, e, f) {\n      ea(a, b, c, 1, 16, d, e, f);\n    }\n    function Ve(a, b, c, d, e, f) {\n      ea(a, b, 1, c, 16, d, e, f);\n    }\n    function Ye(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4 * c), Fa(a, b, c, 1, 16, d, e, f);\n    }\n    function Ze(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4), Fa(a, b, 1, c, 16, d, e, f);\n    }\n    function We(a, b, c, d, e, f, g, h) {\n      ea(a, b, e, 1, 8, f, g, h);\n      ea(c, d, e, 1, 8, f, g, h);\n    }\n    function Xe(a, b, c, d, e, f, g, h) {\n      ea(a, b, 1, e, 8, f, g, h);\n      ea(c, d, 1, e, 8, f, g, h);\n    }\n    function $e(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4 * e, e, 1, 8, f, g, h);\n      Fa(c, d + 4 * e, e, 1, 8, f, g, h);\n    }\n    function af(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4, 1, e, 8, f, g, h);\n      Fa(c, d + 4, 1, e, 8, f, g, h);\n    }\n    function Cf() {\n      this.ba = new Cb();\n      this.ec = [];\n      this.cc = [];\n      this.Mc = [];\n      this.Dc = this.Nc = this.dc = this.fc = 0;\n      this.Oa = new Ud();\n      this.memory = 0;\n      this.Ib = \"OutputFunc\";\n      this.Jb = \"OutputAlphaFunc\";\n      this.Nd = \"OutputRowFunc\";\n    }\n    function md() {\n      this.data = [];\n      this.offset = this.kd = this.ha = this.w = 0;\n      this.na = [];\n      this.xa = this.gb = this.Ja = this.Sa = this.P = 0;\n    }\n    function Df() {\n      this.nc = this.Ea = this.b = this.hc = 0;\n      this.K = [];\n      this.w = 0;\n    }\n    function Ef() {\n      this.ua = 0;\n      this.Wa = new ac();\n      this.vb = new ac();\n      this.md = this.xc = this.wc = 0;\n      this.vc = [];\n      this.Wb = 0;\n      this.Ya = new Ub();\n      this.yc = new O();\n    }\n    function je() {\n      this.xb = this.a = 0;\n      this.l = new Oa();\n      this.ca = new Cb();\n      this.V = [];\n      this.Ba = 0;\n      this.Ta = [];\n      this.Ua = 0;\n      this.m = new Ra();\n      this.Pb = 0;\n      this.wd = new Ra();\n      this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;\n      this.s = new Ef();\n      this.ab = 0;\n      this.gc = wa(4, Df);\n      this.Oc = 0;\n    }\n    function Ff() {\n      this.Lc = this.Z = this.$a = this.i = this.c = 0;\n      this.l = new Oa();\n      this.ic = 0;\n      this.ca = [];\n      this.tb = 0;\n      this.qd = null;\n      this.rd = 0;\n    }\n    function Rb(a, b, c, d, e, f, g) {\n      a = null == a ? 0 : a[b + 0];\n      for (b = 0; b < g; ++b) (e[f + b] = (a + c[d + b]) & 255), (a = e[f + b]);\n    }\n    function Gf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h;\n        for (h = 0; h < g; ++h) e[f + h] = (a[b + h] + c[d + h]) & 255;\n      }\n    }\n    function Hf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h = a[b + 0],\n          k = h,\n          l = h,\n          m;\n        for (m = 0; m < g; ++m)\n          (h = a[b + m]),\n            (k = l + h - k),\n            (l = (c[d + m] + (k & -256 ? (0 > k ? 0 : 255) : k)) & 255),\n            (k = h),\n            (e[f + m] = l);\n      }\n    }\n    function Le(a, b, c, d) {\n      var e = b.width,\n        f = b.o;\n      x(null != a && null != b);\n      if (0 > c || 0 >= d || c + d > f) return null;\n      if (!a.Cc) {\n        if (null == a.ga) {\n          a.ga = new Ff();\n          var g;\n          (g = null == a.ga) ||\n            ((g = b.width * b.o),\n            x(0 == a.Gb.length),\n            (a.Gb = V(g)),\n            (a.Uc = 0),\n            null == a.Gb\n              ? (g = 0)\n              : ((a.mb = a.Gb), (a.nb = a.Uc), (a.rc = null), (g = 1)),\n            (g = !g));\n          if (!g) {\n            g = a.ga;\n            var h = a.Fa,\n              k = a.P,\n              l = a.qc,\n              m = a.mb,\n              n = a.nb,\n              r = k + 1,\n              q = l - 1,\n              t = g.l;\n            x(null != h && null != m && null != b);\n            ia[0] = null;\n            ia[1] = Rb;\n            ia[2] = Gf;\n            ia[3] = Hf;\n            g.ca = m;\n            g.tb = n;\n            g.c = b.width;\n            g.i = b.height;\n            x(0 < g.c && 0 < g.i);\n            if (1 >= l) b = 0;\n            else if (\n              ((g.$a = (h[k + 0] >> 0) & 3),\n              (g.Z = (h[k + 0] >> 2) & 3),\n              (g.Lc = (h[k + 0] >> 4) & 3),\n              (k = (h[k + 0] >> 6) & 3),\n              0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k)\n            )\n              b = 0;\n            else if (\n              ((t.put = kc),\n              (t.ac = gc),\n              (t.bc = lc),\n              (t.ma = g),\n              (t.width = b.width),\n              (t.height = b.height),\n              (t.Da = b.Da),\n              (t.v = b.v),\n              (t.va = b.va),\n              (t.j = b.j),\n              (t.o = b.o),\n              g.$a)\n            )\n              b: {\n                x(1 == g.$a), (b = Bc());\n                c: for (;;) {\n                  if (null == b) {\n                    b = 0;\n                    break b;\n                  }\n                  x(null != g);\n                  g.mc = b;\n                  b.c = g.c;\n                  b.i = g.i;\n                  b.l = g.l;\n                  b.l.ma = g;\n                  b.l.width = g.c;\n                  b.l.height = g.i;\n                  b.a = 0;\n                  cb(b.m, h, r, q);\n                  if (!rb(g.c, g.i, 1, b, null)) break c;\n                  1 == b.ab && 3 == b.gc[0].hc && yc(b.s)\n                    ? ((g.ic = 1),\n                      (h = b.c * b.i),\n                      (b.Ta = null),\n                      (b.Ua = 0),\n                      (b.V = V(h)),\n                      (b.Ba = 0),\n                      null == b.V ? ((b.a = 1), (b = 0)) : (b = 1))\n                    : ((g.ic = 0), (b = Ec(b, g.c)));\n                  if (!b) break c;\n                  b = 1;\n                  break b;\n                }\n                g.mc = null;\n                b = 0;\n              }\n            else b = q >= g.c * g.i;\n            g = !b;\n          }\n          if (g) return null;\n          1 != a.ga.Lc ? (a.Ga = 0) : (d = f - c);\n        }\n        x(null != a.ga);\n        x(c + d <= f);\n        a: {\n          h = a.ga;\n          b = h.c;\n          f = h.l.o;\n          if (0 == h.$a) {\n            r = a.rc;\n            q = a.Vc;\n            t = a.Fa;\n            k = a.P + 1 + c * b;\n            l = a.mb;\n            m = a.nb + c * b;\n            x(k <= a.P + a.qc);\n            if (0 != h.Z)\n              for (x(null != ia[h.Z]), g = 0; g < d; ++g)\n                ia[h.Z](r, q, t, k, l, m, b),\n                  (r = l),\n                  (q = m),\n                  (m += b),\n                  (k += b);\n            else\n              for (g = 0; g < d; ++g)\n                I(l, m, t, k, b), (r = l), (q = m), (m += b), (k += b);\n            a.rc = r;\n            a.Vc = q;\n          } else {\n            x(null != h.mc);\n            b = c + d;\n            g = h.mc;\n            x(null != g);\n            x(b <= g.i);\n            if (g.C >= b) b = 1;\n            else if ((h.ic || Aa(), h.ic)) {\n              var h = g.V,\n                r = g.Ba,\n                q = g.c,\n                v = g.i,\n                t = 1,\n                k = g.$ / q,\n                l = g.$ % q,\n                m = g.m,\n                n = g.s,\n                p = g.$,\n                u = q * v,\n                w = q * b,\n                y = n.wc,\n                A = p < w ? ha(n, l, k) : null;\n              x(p <= u);\n              x(b <= v);\n              x(yc(n));\n              c: for (;;) {\n                for (; !m.h && p < w; ) {\n                  l & y || (A = ha(n, l, k));\n                  x(null != A);\n                  Sa(m);\n                  v = ua(A.G[0], A.H[0], m);\n                  if (256 > v)\n                    (h[r + p] = v),\n                      ++p,\n                      ++l,\n                      l >= q && ((l = 0), ++k, k <= b && !(k % 16) && Ib(g, k));\n                  else if (280 > v) {\n                    var v = ib(v - 256, m);\n                    var E = ua(A.G[4], A.H[4], m);\n                    Sa(m);\n                    E = ib(E, m);\n                    E = nc(q, E);\n                    if (p >= E && u - p >= v) {\n                      var B;\n                      for (B = 0; B < v; ++B) h[r + p + B] = h[r + p + B - E];\n                    } else {\n                      t = 0;\n                      break c;\n                    }\n                    p += v;\n                    for (l += v; l >= q; )\n                      (l -= q), ++k, k <= b && !(k % 16) && Ib(g, k);\n                    p < w && l & y && (A = ha(n, l, k));\n                  } else {\n                    t = 0;\n                    break c;\n                  }\n                  x(m.h == db(m));\n                }\n                Ib(g, k > b ? b : k);\n                break c;\n              }\n              !t || (m.h && p < u) ? ((t = 0), (g.a = m.h ? 5 : 3)) : (g.$ = p);\n              b = t;\n            } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);\n            if (!b) {\n              d = 0;\n              break a;\n            }\n          }\n          c + d >= f && (a.Cc = 1);\n          d = 1;\n        }\n        if (!d) return null;\n        if (\n          a.Cc &&\n          ((d = a.ga), null != d && (d.mc = null), (a.ga = null), 0 < a.Ga)\n        )\n          return alert(\"todo:WebPDequantizeLevels\"), null;\n      }\n      return a.nb + c * e;\n    }\n    function If(a, b, c, d, e, f) {\n      for (; 0 < e--; ) {\n        var g = a,\n          h = b + (c ? 1 : 0),\n          k = a,\n          l = b + (c ? 0 : 3),\n          m;\n        for (m = 0; m < d; ++m) {\n          var n = k[l + 4 * m];\n          255 != n &&\n            ((n *= 32897),\n            (g[h + 4 * m + 0] = (g[h + 4 * m + 0] * n) >> 23),\n            (g[h + 4 * m + 1] = (g[h + 4 * m + 1] * n) >> 23),\n            (g[h + 4 * m + 2] = (g[h + 4 * m + 2] * n) >> 23));\n        }\n        b += f;\n      }\n    }\n    function Jf(a, b, c, d, e) {\n      for (; 0 < d--; ) {\n        var f;\n        for (f = 0; f < c; ++f) {\n          var g = a[b + 2 * f + 0],\n            h = a[b + 2 * f + 1],\n            k = h & 15,\n            l = 4369 * k,\n            h = (((h & 240) | (h >> 4)) * l) >> 16;\n          a[b + 2 * f + 0] =\n            (((((g & 240) | (g >> 4)) * l) >> 16) & 240) |\n            ((((((g & 15) | (g << 4)) * l) >> 16) >> 4) & 15);\n          a[b + 2 * f + 1] = (h & 240) | k;\n        }\n        b += e;\n      }\n    }\n    function Kf(a, b, c, d, e, f, g, h) {\n      var k = 255,\n        l,\n        m;\n      for (m = 0; m < e; ++m) {\n        for (l = 0; l < d; ++l) {\n          var n = a[b + l];\n          f[g + 4 * l] = n;\n          k &= n;\n        }\n        b += c;\n        g += h;\n      }\n      return 255 != k;\n    }\n    function Lf(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < e; ++f) c[d + f] = a[b + f] >> 8;\n    }\n    function Aa() {\n      za = If;\n      vc = Jf;\n      fc = Kf;\n      Fc = Lf;\n    }\n    function va(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {\n        var d,\n          E = (y - 1) >> 1;\n        var B = h[k + 0] | (l[m + 0] << 16);\n        var C = n[r + 0] | (q[t + 0] << 16);\n        x(null != a);\n        var z = (3 * B + C + 131074) >> 2;\n        b(a[e + 0], z & 255, z >> 16, v, p);\n        null != f &&\n          ((z = (3 * C + B + 131074) >> 2),\n          b(f[g + 0], z & 255, z >> 16, u, w));\n        for (d = 1; d <= E; ++d) {\n          var D = h[k + d] | (l[m + d] << 16);\n          var G = n[r + d] | (q[t + d] << 16);\n          var F = B + D + C + G + 524296;\n          var H = (F + 2 * (D + C)) >> 3;\n          F = (F + 2 * (B + G)) >> 3;\n          z = (H + B) >> 1;\n          B = (F + D) >> 1;\n          b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);\n          b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);\n          null != f &&\n            ((z = (F + C) >> 1),\n            (B = (H + G) >> 1),\n            b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c),\n            b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));\n          B = D;\n          C = G;\n        }\n        y & 1 ||\n          ((z = (3 * B + C + 131074) >> 2),\n          b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c),\n          null != f &&\n            ((z = (3 * C + B + 131074) >> 2),\n            b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));\n      };\n    }\n    function ic() {\n      P[Ca] = Mf;\n      P[Ua] = nd;\n      P[tc] = Nf;\n      P[Va] = od;\n      P[ya] = pd;\n      P[Db] = qd;\n      P[wc] = Of;\n      P[zb] = nd;\n      P[Ab] = od;\n      P[Ja] = pd;\n      P[Bb] = qd;\n    }\n    function Sb(a) {\n      return a & ~Pf ? (0 > a ? 0 : 255) : a >> rd;\n    }\n    function bb(a, b) {\n      return Sb(((19077 * a) >> 8) + ((26149 * b) >> 8) - 14234);\n    }\n    function nb(a, b, c) {\n      return Sb(\n        ((19077 * a) >> 8) - ((6419 * b) >> 8) - ((13320 * c) >> 8) + 8708\n      );\n    }\n    function Pa(a, b) {\n      return Sb(((19077 * a) >> 8) + ((33050 * b) >> 8) - 17685);\n    }\n    function Ga(a, b, c, d, e) {\n      d[e + 0] = bb(a, c);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = Pa(a, b);\n    }\n    function Tb(a, b, c, d, e) {\n      d[e + 0] = Pa(a, b);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = bb(a, c);\n    }\n    function sd(a, b, c, d, e) {\n      var f = nb(a, b, c);\n      b = ((f << 3) & 224) | (Pa(a, b) >> 3);\n      d[e + 0] = (bb(a, c) & 248) | (f >> 5);\n      d[e + 1] = b;\n    }\n    function td(a, b, c, d, e) {\n      var f = (Pa(a, b) & 240) | 15;\n      d[e + 0] = (bb(a, c) & 240) | (nb(a, b, c) >> 4);\n      d[e + 1] = f;\n    }\n    function ud(a, b, c, d, e) {\n      d[e + 0] = 255;\n      Ga(a, b, c, d, e + 1);\n    }\n    function vd(a, b, c, d, e) {\n      Tb(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function wd(a, b, c, d, e) {\n      Ga(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function la(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n) {\n        for (var d = m + (n & -2) * c; m != d; )\n          b(a[e + 0], f[g + 0], h[k + 0], l, m),\n            b(a[e + 1], f[g + 0], h[k + 0], l, m + c),\n            (e += 2),\n            ++g,\n            ++k,\n            (m += 2 * c);\n        n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);\n      };\n    }\n    function xd(a, b, c) {\n      return 0 == c ? (0 == a ? (0 == b ? 6 : 5) : 0 == b ? 4 : 0) : c;\n    }\n    function yd(a, b, c, d, e) {\n      switch (a >>> 30) {\n        case 3:\n          Za(b, c, d, e, 0);\n          break;\n        case 2:\n          fd(b, c, d, e);\n          break;\n        case 1:\n          pa(b, c, d, e);\n      }\n    }\n    function Oc(a, b) {\n      var c,\n        d,\n        e = b.M,\n        f = b.Nb,\n        g = a.oc,\n        h = a.pc + 40,\n        k = a.oc,\n        l = a.pc + 584,\n        m = a.oc,\n        n = a.pc + 600;\n      for (c = 0; 16 > c; ++c) g[h + 32 * c - 1] = 129;\n      for (c = 0; 8 > c; ++c)\n        (k[l + 32 * c - 1] = 129), (m[n + 32 * c - 1] = 129);\n      0 < e\n        ? (g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129)\n        : (M(g, h - 32 - 1, 127, 21),\n          M(k, l - 32 - 1, 127, 9),\n          M(m, n - 32 - 1, 127, 9));\n      for (d = 0; d < a.za; ++d) {\n        var r = b.ya[b.aa + d];\n        if (0 < d) {\n          for (c = -1; 16 > c; ++c) I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);\n          for (c = -1; 8 > c; ++c)\n            I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4),\n              I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);\n        }\n        var q = a.Gd,\n          t = a.Hd + d,\n          v = r.ad,\n          p = r.Hc;\n        0 < e &&\n          (I(g, h - 32, q[t].y, 0, 16),\n          I(k, l - 32, q[t].f, 0, 8),\n          I(m, n - 32, q[t].ea, 0, 8));\n        if (r.Za) {\n          var u = g;\n          var w = h - 32 + 16;\n          0 < e &&\n            (d >= a.za - 1\n              ? M(u, w, q[t].y[15], 4)\n              : I(u, w, q[t + 1].y, 0, 4));\n          for (c = 0; 4 > c; c++)\n            u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];\n          for (c = 0; 16 > c; ++c, p <<= 2)\n            (u = g), (w = h + zd[c]), W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);\n        } else if (((u = xd(d, e, r.Ob[0])), Y[u](g, h), 0 != p))\n          for (c = 0; 16 > c; ++c, p <<= 2) yd(p, v, 16 * +c, g, h + zd[c]);\n        c = r.Gc;\n        u = xd(d, e, r.Dd);\n        ka[u](k, l);\n        ka[u](m, n);\n        r = c >> 0;\n        p = v;\n        u = k;\n        w = l;\n        r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));\n        c >>= 8;\n        r = m;\n        p = n;\n        c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));\n        e < a.Ub - 1 &&\n          (I(q[t].y, 0, g, h + 480, 16),\n          I(q[t].f, 0, k, l + 224, 8),\n          I(q[t].ea, 0, m, n + 224, 8));\n        c = 8 * f * a.B;\n        q = a.sa;\n        t = a.ta + 16 * d + 16 * f * a.R;\n        v = a.qa;\n        r = a.ra + 8 * d + c;\n        p = a.Ha;\n        u = a.Ia + 8 * d + c;\n        for (c = 0; 16 > c; ++c) I(q, t + c * a.R, g, h + 32 * c, 16);\n        for (c = 0; 8 > c; ++c)\n          I(v, r + c * a.B, k, l + 32 * c, 8),\n            I(p, u + c * a.B, m, n + 32 * c, 8);\n      }\n    }\n    function Ad(a, b, c, d, e, f, g, h, k) {\n      var l = [0],\n        m = [0],\n        n = 0,\n        r = null != k ? k.kd : 0,\n        q = null != k ? k : new md();\n      if (null == a || 12 > c) return 7;\n      q.data = a;\n      q.w = b;\n      q.ha = c;\n      b = [b];\n      c = [c];\n      q.gb = [q.gb];\n      a: {\n        var t = b;\n        var v = c;\n        var p = q.gb;\n        x(null != a);\n        x(null != v);\n        x(null != p);\n        p[0] = 0;\n        if (12 <= v[0] && !fa(a, t[0], \"RIFF\")) {\n          if (fa(a, t[0] + 8, \"WEBP\")) {\n            p = 3;\n            break a;\n          }\n          var u = Ha(a, t[0] + 4);\n          if (12 > u || 4294967286 < u) {\n            p = 3;\n            break a;\n          }\n          if (r && u > v[0] - 8) {\n            p = 7;\n            break a;\n          }\n          p[0] = u;\n          t[0] += 12;\n          v[0] -= 12;\n        }\n        p = 0;\n      }\n      if (0 != p) return p;\n      u = 0 < q.gb[0];\n      for (c = c[0]; ; ) {\n        t = [0];\n        n = [n];\n        a: {\n          var w = a;\n          v = b;\n          p = c;\n          var y = n,\n            A = l,\n            z = m,\n            B = t;\n          y[0] = 0;\n          if (8 > p[0]) p = 7;\n          else {\n            if (!fa(w, v[0], \"VP8X\")) {\n              if (10 != Ha(w, v[0] + 4)) {\n                p = 3;\n                break a;\n              }\n              if (18 > p[0]) {\n                p = 7;\n                break a;\n              }\n              var C = Ha(w, v[0] + 8);\n              var D = 1 + Yb(w, v[0] + 12);\n              w = 1 + Yb(w, v[0] + 15);\n              if (2147483648 <= D * w) {\n                p = 3;\n                break a;\n              }\n              null != B && (B[0] = C);\n              null != A && (A[0] = D);\n              null != z && (z[0] = w);\n              v[0] += 18;\n              p[0] -= 18;\n              y[0] = 1;\n            }\n            p = 0;\n          }\n        }\n        n = n[0];\n        t = t[0];\n        if (0 != p) return p;\n        v = !!(t & 2);\n        if (!u && n) return 3;\n        null != f && (f[0] = !!(t & 16));\n        null != g && (g[0] = v);\n        null != h && (h[0] = 0);\n        g = l[0];\n        t = m[0];\n        if (n && v && null == k) {\n          p = 0;\n          break;\n        }\n        if (4 > c) {\n          p = 7;\n          break;\n        }\n        if ((u && n) || (!u && !n && !fa(a, b[0], \"ALPH\"))) {\n          c = [c];\n          q.na = [q.na];\n          q.P = [q.P];\n          q.Sa = [q.Sa];\n          a: {\n            C = a;\n            p = b;\n            u = c;\n            var y = q.gb,\n              A = q.na,\n              z = q.P,\n              B = q.Sa;\n            D = 22;\n            x(null != C);\n            x(null != u);\n            w = p[0];\n            var F = u[0];\n            x(null != A);\n            x(null != B);\n            A[0] = null;\n            z[0] = null;\n            for (B[0] = 0; ; ) {\n              p[0] = w;\n              u[0] = F;\n              if (8 > F) {\n                p = 7;\n                break a;\n              }\n              var G = Ha(C, w + 4);\n              if (4294967286 < G) {\n                p = 3;\n                break a;\n              }\n              var H = (8 + G + 1) & -2;\n              D += H;\n              if (0 < y && D > y) {\n                p = 3;\n                break a;\n              }\n              if (!fa(C, w, \"VP8 \") || !fa(C, w, \"VP8L\")) {\n                p = 0;\n                break a;\n              }\n              if (F[0] < H) {\n                p = 7;\n                break a;\n              }\n              fa(C, w, \"ALPH\") || ((A[0] = C), (z[0] = w + 8), (B[0] = G));\n              w += H;\n              F -= H;\n            }\n          }\n          c = c[0];\n          q.na = q.na[0];\n          q.P = q.P[0];\n          q.Sa = q.Sa[0];\n          if (0 != p) break;\n        }\n        c = [c];\n        q.Ja = [q.Ja];\n        q.xa = [q.xa];\n        a: if (\n          ((y = a),\n          (p = b),\n          (u = c),\n          (A = q.gb[0]),\n          (z = q.Ja),\n          (B = q.xa),\n          (C = p[0]),\n          (w = !fa(y, C, \"VP8 \")),\n          (D = !fa(y, C, \"VP8L\")),\n          x(null != y),\n          x(null != u),\n          x(null != z),\n          x(null != B),\n          8 > u[0])\n        )\n          p = 7;\n        else {\n          if (w || D) {\n            y = Ha(y, C + 4);\n            if (12 <= A && y > A - 12) {\n              p = 3;\n              break a;\n            }\n            if (r && y > u[0] - 8) {\n              p = 7;\n              break a;\n            }\n            z[0] = y;\n            p[0] += 8;\n            u[0] -= 8;\n            B[0] = D;\n          } else\n            (B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5)),\n              (z[0] = u[0]);\n          p = 0;\n        }\n        c = c[0];\n        q.Ja = q.Ja[0];\n        q.xa = q.xa[0];\n        b = b[0];\n        if (0 != p) break;\n        if (4294967286 < q.Ja) return 3;\n        null == h || v || (h[0] = q.xa ? 2 : 1);\n        g = [g];\n        t = [t];\n        if (q.xa) {\n          if (5 > c) {\n            p = 7;\n            break;\n          }\n          h = g;\n          r = t;\n          v = f;\n          null == a || 5 > c\n            ? (a = 0)\n            : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5)\n            ? ((u = [0]),\n              (y = [0]),\n              (A = [0]),\n              (z = new Ra()),\n              cb(z, a, b, c),\n              mc(z, u, y, A)\n                ? (null != h && (h[0] = u[0]),\n                  null != r && (r[0] = y[0]),\n                  null != v && (v[0] = A[0]),\n                  (a = 1))\n                : (a = 0))\n            : (a = 0);\n        } else {\n          if (10 > c) {\n            p = 7;\n            break;\n          }\n          h = t;\n          null == a || 10 > c || !Jc(a, b + 3, c - 3)\n            ? (a = 0)\n            : ((r = a[b + 0] | (a[b + 1] << 8) | (a[b + 2] << 16)),\n              (v = ((a[b + 7] << 8) | a[b + 6]) & 16383),\n              (a = ((a[b + 9] << 8) | a[b + 8]) & 16383),\n              r & 1 ||\n              3 < ((r >> 1) & 7) ||\n              !((r >> 4) & 1) ||\n              r >> 5 >= q.Ja ||\n              !v ||\n              !a\n                ? (a = 0)\n                : (g && (g[0] = v), h && (h[0] = a), (a = 1)));\n        }\n        if (!a) return 3;\n        g = g[0];\n        t = t[0];\n        if (n && (l[0] != g || m[0] != t)) return 3;\n        null != k &&\n          ((k[0] = q),\n          (k.offset = b - k.w),\n          x(4294967286 > b - k.w),\n          x(k.offset == k.ha - c));\n        break;\n      }\n      return 0 == p || (7 == p && n && null == k)\n        ? (null != f && (f[0] |= null != q.na && 0 < q.na.length),\n          null != d && (d[0] = g),\n          null != e && (e[0] = t),\n          0)\n        : p;\n    }\n    function hc(a, b, c) {\n      var d = b.width,\n        e = b.height,\n        f = 0,\n        g = 0,\n        h = d,\n        k = e;\n      b.Da = null != a && 0 < a.Da;\n      if (\n        b.Da &&\n        ((h = a.cd),\n        (k = a.bd),\n        (f = a.v),\n        (g = a.j),\n        11 > c || ((f &= -2), (g &= -2)),\n        0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)\n      )\n        return 0;\n      b.v = f;\n      b.j = g;\n      b.va = f + h;\n      b.o = g + k;\n      b.U = h;\n      b.T = k;\n      b.da = null != a && 0 < a.da;\n      if (b.da) {\n        c = [a.ib];\n        f = [a.hb];\n        if (!bc(h, k, c, f)) return 0;\n        b.ib = c[0];\n        b.hb = f[0];\n      }\n      b.ob = null != a && a.ob;\n      b.Kb = null == a || !a.Sd;\n      b.da && ((b.ob = b.ib < (3 * d) / 4 && b.hb < (3 * e) / 4), (b.Kb = 0));\n      return 1;\n    }\n    function Bd(a) {\n      if (null == a) return 2;\n      if (11 > a.S) {\n        var b = a.f.RGBA;\n        b.fb += (a.height - 1) * b.A;\n        b.A = -b.A;\n      } else\n        (b = a.f.kb),\n          (a = a.height),\n          (b.O += (a - 1) * b.fa),\n          (b.fa = -b.fa),\n          (b.N += ((a - 1) >> 1) * b.Ab),\n          (b.Ab = -b.Ab),\n          (b.W += ((a - 1) >> 1) * b.Db),\n          (b.Db = -b.Db),\n          null != b.F && ((b.J += (a - 1) * b.lb), (b.lb = -b.lb));\n      return 0;\n    }\n    function Cd(a, b, c, d) {\n      if (null == d || 0 >= a || 0 >= b) return 2;\n      if (null != c) {\n        if (c.Da) {\n          var e = c.cd,\n            f = c.bd,\n            g = c.v & -2,\n            h = c.j & -2;\n          if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b)\n            return 2;\n          a = e;\n          b = f;\n        }\n        if (c.da) {\n          e = [c.ib];\n          f = [c.hb];\n          if (!bc(a, b, e, f)) return 2;\n          a = e[0];\n          b = f[0];\n        }\n      }\n      d.width = a;\n      d.height = b;\n      a: {\n        var k = d.width;\n        var l = d.height;\n        a = d.S;\n        if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;\n        else {\n          if (0 >= d.Rd && null == d.sd) {\n            var g = (f = e = b = 0),\n              h = k * Dd[a],\n              m = h * l;\n            11 > a ||\n              ((b = (k + 1) / 2),\n              (f = ((l + 1) / 2) * b),\n              12 == a && ((e = k), (g = e * l)));\n            l = V(m + 2 * f + g);\n            if (null == l) {\n              a = 1;\n              break a;\n            }\n            d.sd = l;\n            11 > a\n              ? ((k = d.f.RGBA),\n                (k.eb = l),\n                (k.fb = 0),\n                (k.A = h),\n                (k.size = m))\n              : ((k = d.f.kb),\n                (k.y = l),\n                (k.O = 0),\n                (k.fa = h),\n                (k.Fd = m),\n                (k.f = l),\n                (k.N = 0 + m),\n                (k.Ab = b),\n                (k.Cd = f),\n                (k.ea = l),\n                (k.W = 0 + m + f),\n                (k.Db = b),\n                (k.Ed = f),\n                12 == a && ((k.F = l), (k.J = 0 + m + 2 * f)),\n                (k.Tc = g),\n                (k.lb = e));\n          }\n          b = 1;\n          e = d.S;\n          f = d.width;\n          g = d.height;\n          if (e >= Ca && 13 > e)\n            if (11 > e)\n              (a = d.f.RGBA),\n                (h = Math.abs(a.A)),\n                (b &= h * (g - 1) + f <= a.size),\n                (b &= h >= f * Dd[e]),\n                (b &= null != a.eb);\n            else {\n              a = d.f.kb;\n              h = (f + 1) / 2;\n              m = (g + 1) / 2;\n              k = Math.abs(a.fa);\n              var l = Math.abs(a.Ab),\n                n = Math.abs(a.Db),\n                r = Math.abs(a.lb),\n                q = r * (g - 1) + f;\n              b &= k * (g - 1) + f <= a.Fd;\n              b &= l * (m - 1) + h <= a.Cd;\n              b &= n * (m - 1) + h <= a.Ed;\n              b = b & (k >= f) & (l >= h) & (n >= h);\n              b &= null != a.y;\n              b &= null != a.f;\n              b &= null != a.ea;\n              12 == e && ((b &= r >= f), (b &= q <= a.Tc), (b &= null != a.F));\n            }\n          else b = 0;\n          a = b ? 0 : 2;\n        }\n      }\n      if (0 != a) return a;\n      null != c && c.fd && (a = Bd(d));\n      return a;\n    }\n    var xb = 64,\n      Hd = [\n        0,\n        1,\n        3,\n        7,\n        15,\n        31,\n        63,\n        127,\n        255,\n        511,\n        1023,\n        2047,\n        4095,\n        8191,\n        16383,\n        32767,\n        65535,\n        131071,\n        262143,\n        524287,\n        1048575,\n        2097151,\n        4194303,\n        8388607,\n        16777215\n      ],\n      Gd = 24,\n      ob = 32,\n      Xb = 8,\n      Id = [\n        0,\n        0,\n        1,\n        1,\n        2,\n        2,\n        2,\n        2,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7\n      ];\n    X(\"Predictor0\", \"PredictorAdd0\");\n    self.Predictor0 = function() {\n      return 4278190080;\n    };\n    self.Predictor1 = function(a) {\n      return a;\n    };\n    self.Predictor2 = function(a, b, c) {\n      return b[c + 0];\n    };\n    self.Predictor3 = function(a, b, c) {\n      return b[c + 1];\n    };\n    self.Predictor4 = function(a, b, c) {\n      return b[c - 1];\n    };\n    self.Predictor5 = function(a, b, c) {\n      return aa(aa(a, b[c + 1]), b[c + 0]);\n    };\n    self.Predictor6 = function(a, b, c) {\n      return aa(a, b[c - 1]);\n    };\n    self.Predictor7 = function(a, b, c) {\n      return aa(a, b[c + 0]);\n    };\n    self.Predictor8 = function(a, b, c) {\n      return aa(b[c - 1], b[c + 0]);\n    };\n    self.Predictor9 = function(a, b, c) {\n      return aa(b[c + 0], b[c + 1]);\n    };\n    self.Predictor10 = function(a, b, c) {\n      return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));\n    };\n    self.Predictor11 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return 0 >=\n        Ia((d >> 24) & 255, (a >> 24) & 255, (b >> 24) & 255) +\n          Ia((d >> 16) & 255, (a >> 16) & 255, (b >> 16) & 255) +\n          Ia((d >> 8) & 255, (a >> 8) & 255, (b >> 8) & 255) +\n          Ia(d & 255, a & 255, b & 255)\n        ? d\n        : a;\n    };\n    self.Predictor12 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return (\n        ((sa(((a >> 24) & 255) + ((d >> 24) & 255) - ((b >> 24) & 255)) << 24) |\n          (sa(((a >> 16) & 255) + ((d >> 16) & 255) - ((b >> 16) & 255)) <<\n            16) |\n          (sa(((a >> 8) & 255) + ((d >> 8) & 255) - ((b >> 8) & 255)) << 8) |\n          sa((a & 255) + (d & 255) - (b & 255))) >>>\n        0\n      );\n    };\n    self.Predictor13 = function(a, b, c) {\n      var d = b[c - 1];\n      a = aa(a, b[c + 0]);\n      return (\n        ((eb((a >> 24) & 255, (d >> 24) & 255) << 24) |\n          (eb((a >> 16) & 255, (d >> 16) & 255) << 16) |\n          (eb((a >> 8) & 255, (d >> 8) & 255) << 8) |\n          eb((a >> 0) & 255, (d >> 0) & 255)) >>>\n        0\n      );\n    };\n    var ee = self.PredictorAdd0;\n    self.PredictorAdd1 = cc;\n    X(\"Predictor2\", \"PredictorAdd2\");\n    X(\"Predictor3\", \"PredictorAdd3\");\n    X(\"Predictor4\", \"PredictorAdd4\");\n    X(\"Predictor5\", \"PredictorAdd5\");\n    X(\"Predictor6\", \"PredictorAdd6\");\n    X(\"Predictor7\", \"PredictorAdd7\");\n    X(\"Predictor8\", \"PredictorAdd8\");\n    X(\"Predictor9\", \"PredictorAdd9\");\n    X(\"Predictor10\", \"PredictorAdd10\");\n    X(\"Predictor11\", \"PredictorAdd11\");\n    X(\"Predictor12\", \"PredictorAdd12\");\n    X(\"Predictor13\", \"PredictorAdd13\");\n    var fe = self.PredictorAdd2;\n    ec(\n      \"ColorIndexInverseTransform\",\n      \"MapARGB\",\n      \"32b\",\n      function(a) {\n        return (a >> 8) & 255;\n      },\n      function(a) {\n        return a;\n      }\n    );\n    ec(\n      \"VP8LColorIndexInverseTransformAlpha\",\n      \"MapAlpha\",\n      \"8b\",\n      function(a) {\n        return a;\n      },\n      function(a) {\n        return (a >> 8) & 255;\n      }\n    );\n    var rc = self.ColorIndexInverseTransform,\n      ke = self.MapARGB,\n      he = self.VP8LColorIndexInverseTransformAlpha,\n      le = self.MapAlpha,\n      pc,\n      qc = (self.VP8LPredictorsAdd = []);\n    qc.length = 16;\n    (self.VP8LPredictors = []).length = 16;\n    (self.VP8LPredictorsAdd_C = []).length = 16;\n    (self.VP8LPredictors_C = []).length = 16;\n    var Fb,\n      sc,\n      Gb,\n      Hb,\n      xc,\n      uc,\n      bd = V(511),\n      cd = V(2041),\n      dd = V(225),\n      ed = V(767),\n      ad = 0,\n      Qb = cd,\n      mb = dd,\n      R = ed,\n      U = bd,\n      Ca = 0,\n      Ua = 1,\n      tc = 2,\n      Va = 3,\n      ya = 4,\n      Db = 5,\n      wc = 6,\n      zb = 7,\n      Ab = 8,\n      Ja = 9,\n      Bb = 10,\n      pe = [2, 3, 7],\n      oe = [3, 3, 11],\n      Dc = [280, 256, 256, 256, 40],\n      qe = [0, 1, 1, 1, 0],\n      ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n      de = [\n        24,\n        7,\n        23,\n        25,\n        40,\n        6,\n        39,\n        41,\n        22,\n        26,\n        38,\n        42,\n        56,\n        5,\n        55,\n        57,\n        21,\n        27,\n        54,\n        58,\n        37,\n        43,\n        72,\n        4,\n        71,\n        73,\n        20,\n        28,\n        53,\n        59,\n        70,\n        74,\n        36,\n        44,\n        88,\n        69,\n        75,\n        52,\n        60,\n        3,\n        87,\n        89,\n        19,\n        29,\n        86,\n        90,\n        35,\n        45,\n        68,\n        76,\n        85,\n        91,\n        51,\n        61,\n        104,\n        2,\n        103,\n        105,\n        18,\n        30,\n        102,\n        106,\n        34,\n        46,\n        84,\n        92,\n        67,\n        77,\n        101,\n        107,\n        50,\n        62,\n        120,\n        1,\n        119,\n        121,\n        83,\n        93,\n        17,\n        31,\n        100,\n        108,\n        66,\n        78,\n        118,\n        122,\n        33,\n        47,\n        117,\n        123,\n        49,\n        63,\n        99,\n        109,\n        82,\n        94,\n        0,\n        116,\n        124,\n        65,\n        79,\n        16,\n        32,\n        98,\n        110,\n        48,\n        115,\n        125,\n        81,\n        95,\n        64,\n        114,\n        126,\n        97,\n        111,\n        80,\n        113,\n        127,\n        96,\n        112\n      ],\n      me = [\n        2954,\n        2956,\n        2958,\n        2962,\n        2970,\n        2986,\n        3018,\n        3082,\n        3212,\n        3468,\n        3980,\n        5004\n      ],\n      ie = 8,\n      Lb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        17,\n        18,\n        19,\n        20,\n        20,\n        21,\n        21,\n        22,\n        22,\n        23,\n        23,\n        24,\n        25,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        59,\n        60,\n        61,\n        62,\n        63,\n        64,\n        65,\n        66,\n        67,\n        68,\n        69,\n        70,\n        71,\n        72,\n        73,\n        74,\n        75,\n        76,\n        76,\n        77,\n        78,\n        79,\n        80,\n        81,\n        82,\n        83,\n        84,\n        85,\n        86,\n        87,\n        88,\n        89,\n        91,\n        93,\n        95,\n        96,\n        98,\n        100,\n        101,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        118,\n        122,\n        124,\n        126,\n        128,\n        130,\n        132,\n        134,\n        136,\n        138,\n        140,\n        143,\n        145,\n        148,\n        151,\n        154,\n        157\n      ],\n      Mb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        18,\n        19,\n        20,\n        21,\n        22,\n        23,\n        24,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        60,\n        62,\n        64,\n        66,\n        68,\n        70,\n        72,\n        74,\n        76,\n        78,\n        80,\n        82,\n        84,\n        86,\n        88,\n        90,\n        92,\n        94,\n        96,\n        98,\n        100,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        119,\n        122,\n        125,\n        128,\n        131,\n        134,\n        137,\n        140,\n        143,\n        146,\n        149,\n        152,\n        155,\n        158,\n        161,\n        164,\n        167,\n        170,\n        173,\n        177,\n        181,\n        185,\n        189,\n        193,\n        197,\n        201,\n        205,\n        209,\n        213,\n        217,\n        221,\n        225,\n        229,\n        234,\n        239,\n        245,\n        249,\n        254,\n        259,\n        264,\n        269,\n        274,\n        279,\n        284\n      ],\n      oa = null,\n      He = [\n        [173, 148, 140, 0],\n        [176, 155, 140, 135, 0],\n        [180, 157, 141, 134, 130, 0],\n        [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]\n      ],\n      Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],\n      Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],\n      Fe = [\n        [\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],\n            [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128],\n            [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],\n            [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],\n            [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]\n          ],\n          [\n            [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],\n            [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],\n            [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],\n            [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],\n            [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128],\n            [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],\n            [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],\n            [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],\n            [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],\n            [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],\n            [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]\n          ],\n          [\n            [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],\n            [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],\n            [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]\n          ],\n          [\n            [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],\n            [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],\n            [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]\n          ],\n          [\n            [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],\n            [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],\n            [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],\n            [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],\n            [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]\n          ],\n          [\n            [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],\n            [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],\n            [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],\n            [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],\n            [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]\n          ],\n          [\n            [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],\n            [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],\n            [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128],\n            [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]\n          ],\n          [\n            [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],\n            [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],\n            [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],\n            [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],\n            [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]\n          ],\n          [\n            [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],\n            [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],\n            [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],\n            [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],\n            [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],\n            [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],\n            [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],\n            [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]\n          ],\n          [\n            [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],\n            [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],\n            [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]\n          ],\n          [\n            [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],\n            [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],\n            [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]\n          ],\n          [\n            [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],\n            [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128],\n            [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]\n          ],\n          [\n            [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],\n            [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],\n            [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]\n          ],\n          [\n            [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],\n            [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],\n            [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],\n            [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],\n            [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ]\n      ],\n      Ke = [\n        [\n          [231, 120, 48, 89, 115, 113, 120, 152, 112],\n          [152, 179, 64, 126, 170, 118, 46, 70, 95],\n          [175, 69, 143, 80, 85, 82, 72, 155, 103],\n          [56, 58, 10, 171, 218, 189, 17, 13, 152],\n          [114, 26, 17, 163, 44, 195, 21, 10, 173],\n          [121, 24, 80, 195, 26, 62, 44, 64, 85],\n          [144, 71, 10, 38, 171, 213, 144, 34, 26],\n          [170, 46, 55, 19, 136, 160, 33, 206, 71],\n          [63, 20, 8, 114, 114, 208, 12, 9, 226],\n          [81, 40, 11, 96, 182, 84, 29, 16, 36]\n        ],\n        [\n          [134, 183, 89, 137, 98, 101, 106, 165, 148],\n          [72, 187, 100, 130, 157, 111, 32, 75, 80],\n          [66, 102, 167, 99, 74, 62, 40, 234, 128],\n          [41, 53, 9, 178, 241, 141, 26, 8, 107],\n          [74, 43, 26, 146, 73, 166, 49, 23, 157],\n          [65, 38, 105, 160, 51, 52, 31, 115, 128],\n          [104, 79, 12, 27, 217, 255, 87, 17, 7],\n          [87, 68, 71, 44, 114, 51, 15, 186, 23],\n          [47, 41, 14, 110, 182, 183, 21, 17, 194],\n          [66, 45, 25, 102, 197, 189, 23, 18, 22]\n        ],\n        [\n          [88, 88, 147, 150, 42, 46, 45, 196, 205],\n          [43, 97, 183, 117, 85, 38, 35, 179, 61],\n          [39, 53, 200, 87, 26, 21, 43, 232, 171],\n          [56, 34, 51, 104, 114, 102, 29, 93, 77],\n          [39, 28, 85, 171, 58, 165, 90, 98, 64],\n          [34, 22, 116, 206, 23, 34, 43, 166, 73],\n          [107, 54, 32, 26, 51, 1, 81, 43, 31],\n          [68, 25, 106, 22, 64, 171, 36, 225, 114],\n          [34, 19, 21, 102, 132, 188, 16, 76, 124],\n          [62, 18, 78, 95, 85, 57, 50, 48, 51]\n        ],\n        [\n          [193, 101, 35, 159, 215, 111, 89, 46, 111],\n          [60, 148, 31, 172, 219, 228, 21, 18, 111],\n          [112, 113, 77, 85, 179, 255, 38, 120, 114],\n          [40, 42, 1, 196, 245, 209, 10, 25, 109],\n          [88, 43, 29, 140, 166, 213, 37, 43, 154],\n          [61, 63, 30, 155, 67, 45, 68, 1, 209],\n          [100, 80, 8, 43, 154, 1, 51, 26, 71],\n          [142, 78, 78, 16, 255, 128, 34, 197, 171],\n          [41, 40, 5, 102, 211, 183, 4, 1, 221],\n          [51, 50, 17, 168, 209, 192, 23, 25, 82]\n        ],\n        [\n          [138, 31, 36, 171, 27, 166, 38, 44, 229],\n          [67, 87, 58, 169, 82, 115, 26, 59, 179],\n          [63, 59, 90, 180, 59, 166, 93, 73, 154],\n          [40, 40, 21, 116, 143, 209, 34, 39, 175],\n          [47, 15, 16, 183, 34, 223, 49, 45, 183],\n          [46, 17, 33, 183, 6, 98, 15, 32, 183],\n          [57, 46, 22, 24, 128, 1, 54, 17, 37],\n          [65, 32, 73, 115, 28, 128, 23, 128, 205],\n          [40, 3, 9, 115, 51, 192, 18, 6, 223],\n          [87, 37, 9, 115, 59, 77, 64, 21, 47]\n        ],\n        [\n          [104, 55, 44, 218, 9, 54, 53, 130, 226],\n          [64, 90, 70, 205, 40, 41, 23, 26, 57],\n          [54, 57, 112, 184, 5, 41, 38, 166, 213],\n          [30, 34, 26, 133, 152, 116, 10, 32, 134],\n          [39, 19, 53, 221, 26, 114, 32, 73, 255],\n          [31, 9, 65, 234, 2, 15, 1, 118, 73],\n          [75, 32, 12, 51, 192, 255, 160, 43, 51],\n          [88, 31, 35, 67, 102, 85, 55, 186, 85],\n          [56, 21, 23, 111, 59, 205, 45, 37, 192],\n          [55, 38, 70, 124, 73, 102, 1, 34, 98]\n        ],\n        [\n          [125, 98, 42, 88, 104, 85, 117, 175, 82],\n          [95, 84, 53, 89, 128, 100, 113, 101, 45],\n          [75, 79, 123, 47, 51, 128, 81, 171, 1],\n          [57, 17, 5, 71, 102, 57, 53, 41, 49],\n          [38, 33, 13, 121, 57, 73, 26, 1, 85],\n          [41, 10, 67, 138, 77, 110, 90, 47, 114],\n          [115, 21, 2, 10, 102, 255, 166, 23, 6],\n          [101, 29, 16, 10, 85, 128, 101, 196, 26],\n          [57, 18, 10, 102, 102, 213, 34, 20, 43],\n          [117, 20, 15, 36, 163, 128, 68, 1, 26]\n        ],\n        [\n          [102, 61, 71, 37, 34, 53, 31, 243, 192],\n          [69, 60, 71, 38, 73, 119, 28, 222, 37],\n          [68, 45, 128, 34, 1, 47, 11, 245, 171],\n          [62, 17, 19, 70, 146, 85, 55, 62, 70],\n          [37, 43, 37, 154, 100, 163, 85, 160, 1],\n          [63, 9, 92, 136, 28, 64, 32, 201, 85],\n          [75, 15, 9, 9, 64, 255, 184, 119, 16],\n          [86, 6, 28, 5, 64, 255, 25, 248, 1],\n          [56, 8, 17, 132, 137, 255, 55, 116, 128],\n          [58, 15, 20, 82, 135, 57, 26, 121, 40]\n        ],\n        [\n          [164, 50, 31, 137, 154, 133, 25, 35, 218],\n          [51, 103, 44, 131, 131, 123, 31, 6, 158],\n          [86, 40, 64, 135, 148, 224, 45, 183, 128],\n          [22, 26, 17, 131, 240, 154, 14, 1, 209],\n          [45, 16, 21, 91, 64, 222, 7, 1, 197],\n          [56, 21, 39, 155, 60, 138, 23, 102, 213],\n          [83, 12, 13, 54, 192, 255, 68, 47, 28],\n          [85, 26, 85, 85, 128, 128, 32, 146, 171],\n          [18, 11, 7, 63, 144, 171, 4, 4, 246],\n          [35, 27, 10, 146, 174, 171, 12, 26, 128]\n        ],\n        [\n          [190, 80, 35, 99, 180, 80, 126, 54, 45],\n          [85, 126, 47, 87, 176, 51, 41, 20, 32],\n          [101, 75, 128, 139, 118, 146, 116, 128, 85],\n          [56, 41, 15, 176, 236, 85, 37, 9, 62],\n          [71, 30, 17, 119, 118, 255, 17, 18, 138],\n          [101, 38, 60, 138, 55, 70, 43, 26, 142],\n          [146, 36, 19, 30, 171, 255, 97, 27, 20],\n          [138, 45, 61, 62, 219, 1, 81, 188, 64],\n          [32, 41, 20, 117, 151, 142, 20, 21, 163],\n          [112, 19, 12, 61, 195, 128, 48, 4, 24]\n        ]\n      ],\n      Ee = [\n        [\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],\n            [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255],\n            [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],\n            [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ]\n      ],\n      Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],\n      Nc,\n      Y = [],\n      W = [],\n      ka = [],\n      Za,\n      fd,\n      Nb,\n      pa,\n      Ob,\n      Xc,\n      Tc,\n      Yc,\n      Uc,\n      Zc,\n      Vc,\n      $c,\n      Wc,\n      Rc,\n      Pc,\n      Sc,\n      Qc,\n      re = 1,\n      Cc = 2,\n      ia = [],\n      za,\n      vc,\n      fc,\n      Fc,\n      P = [];\n    va(\"UpsampleRgbLinePair\", Ga, 3);\n    va(\"UpsampleBgrLinePair\", Tb, 3);\n    va(\"UpsampleRgbaLinePair\", wd, 4);\n    va(\"UpsampleBgraLinePair\", vd, 4);\n    va(\"UpsampleArgbLinePair\", ud, 4);\n    va(\"UpsampleRgba4444LinePair\", td, 2);\n    va(\"UpsampleRgb565LinePair\", sd, 2);\n    var Mf = self.UpsampleRgbLinePair,\n      Nf = self.UpsampleBgrLinePair,\n      nd = self.UpsampleRgbaLinePair,\n      od = self.UpsampleBgraLinePair,\n      pd = self.UpsampleArgbLinePair,\n      qd = self.UpsampleRgba4444LinePair,\n      Of = self.UpsampleRgb565LinePair,\n      Wa = 16,\n      Ba = 1 << (Wa - 1),\n      ta = -227,\n      Eb = 482,\n      rd = 6,\n      Pf = (256 << rd) - 1,\n      jc = 0,\n      Yd = V(256),\n      ae = V(256),\n      $d = V(256),\n      Zd = V(256),\n      be = V(Eb - ta),\n      ce = V(Eb - ta);\n    la(\"YuvToRgbRow\", Ga, 3);\n    la(\"YuvToBgrRow\", Tb, 3);\n    la(\"YuvToRgbaRow\", wd, 4);\n    la(\"YuvToBgraRow\", vd, 4);\n    la(\"YuvToArgbRow\", ud, 4);\n    la(\"YuvToRgba4444Row\", td, 2);\n    la(\"YuvToRgb565Row\", sd, 2);\n    var zd = [\n        0,\n        4,\n        8,\n        12,\n        128,\n        132,\n        136,\n        140,\n        256,\n        260,\n        264,\n        268,\n        384,\n        388,\n        392,\n        396\n      ],\n      Ya = [0, 2, 8],\n      Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],\n      Ne = 1;\n    this.WebPDecodeRGBA = function(a, b, c, d, e) {\n      var f = Ua;\n      var g = new Cf(),\n        h = new Cb();\n      g.ba = h;\n      h.S = f;\n      h.width = [h.width];\n      h.height = [h.height];\n      var k = h.width;\n      var l = h.height,\n        m = new Td();\n      if (null == m || null == a) var n = 2;\n      else\n        x(null != m),\n          (n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null));\n      0 != n\n        ? (k = 0)\n        : (null != k && (k[0] = m.width[0]),\n          null != l && (l[0] = m.height[0]),\n          (k = 1));\n      if (k) {\n        h.width = h.width[0];\n        h.height = h.height[0];\n        null != d && (d[0] = h.width);\n        null != e && (e[0] = h.height);\n        b: {\n          d = new Oa();\n          e = new md();\n          e.data = a;\n          e.w = b;\n          e.ha = c;\n          e.kd = 1;\n          b = [0];\n          x(null != e);\n          a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);\n          (0 == a || 7 == a) && b[0] && (a = 4);\n          b = a;\n          if (0 == b) {\n            x(null != g);\n            d.data = e.data;\n            d.w = e.w + e.offset;\n            d.ha = e.ha - e.offset;\n            d.put = kc;\n            d.ac = gc;\n            d.bc = lc;\n            d.ma = g;\n            if (e.xa) {\n              a = Bc();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              if (te(a, d)) {\n                b = Cd(d.width, d.height, g.Oa, g.ba);\n                if ((d = 0 == b)) {\n                  c: {\n                    d = a;\n                    d: for (;;) {\n                      if (null == d) {\n                        d = 0;\n                        break c;\n                      }\n                      x(null != d.s.yc);\n                      x(null != d.s.Ya);\n                      x(0 < d.s.Wb);\n                      c = d.l;\n                      x(null != c);\n                      e = c.ma;\n                      x(null != e);\n                      if (0 != d.xb) {\n                        d.ca = e.ba;\n                        d.tb = e.tb;\n                        x(null != d.ca);\n                        if (!hc(e.Oa, c, Va)) {\n                          d.a = 2;\n                          break d;\n                        }\n                        if (!Ec(d, c.width)) break d;\n                        if (c.da) break d;\n                        (c.da || hb(d.ca.S)) && Aa();\n                        11 > d.ca.S ||\n                          (alert(\"todo:WebPInitConvertARGBToYUV\"),\n                          null != d.ca.f.kb.F && Aa());\n                        if (\n                          d.Pb &&\n                          0 < d.s.ua &&\n                          null == d.s.vb.X &&\n                          !Zb(d.s.vb, d.s.Wa.Xa)\n                        ) {\n                          d.a = 1;\n                          break d;\n                        }\n                        d.xb = 0;\n                      }\n                      if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;\n                      e.Dc = d.Ma;\n                      d = 1;\n                      break c;\n                    }\n                    x(0 != d.a);\n                    d = 0;\n                  }\n                  d = !d;\n                }\n                d && (b = a.a);\n              } else b = a.a;\n            } else {\n              a = new Ce();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              a.Fa = e.na;\n              a.P = e.P;\n              a.qc = e.Sa;\n              if (Kc(a, d)) {\n                if (((b = Cd(d.width, d.height, g.Oa, g.ba)), 0 == b)) {\n                  a.Aa = 0;\n                  c = g.Oa;\n                  e = a;\n                  x(null != e);\n                  if (null != c) {\n                    k = c.Md;\n                    k = 0 > k ? 0 : 100 < k ? 255 : (255 * k) / 100;\n                    if (0 < k) {\n                      for (l = m = 0; 4 > l; ++l)\n                        (n = e.pb[l]),\n                          12 > n.lc &&\n                            (n.ia = (k * Qf[0 > n.lc ? 0 : n.lc]) >> 3),\n                          (m |= n.ia);\n                      m && (alert(\"todo:VP8InitRandom\"), (e.ia = 1));\n                    }\n                    e.Ga = c.Id;\n                    100 < e.Ga ? (e.Ga = 100) : 0 > e.Ga && (e.Ga = 0);\n                  }\n                  Me(a, d) || (b = a.a);\n                }\n              } else b = a.a;\n            }\n            0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));\n          }\n          g = b;\n        }\n        f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;\n      } else f = null;\n      return f;\n    };\n    var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];\n  };\n  new _WebPDecoder();\n\n  /** @license\n   * Copyright (c) 2017 Dominik Homberger\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nhttps://webpjs.appspot.com\nWebPRiffParser dominikhlbg@gmail.com\n*/\n\n  function memcmp(data, data_off, str, size) {\n    for (var i = 0; i < size; i++)\n      if (data[data_off + i] != str.charCodeAt(i)) return true;\n    return false;\n  }\n\n  function GetTag(data, data_off) {\n    var str = \"\";\n    for (var i = 0; i < 4; i++) str += String.fromCharCode(data[data_off++]);\n    return str;\n  }\n\n  function GetLE16(data, data_off) {\n    return (data[data_off + 0] << 0) | (data[data_off + 1] << 8);\n  }\n\n  function GetLE24(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16)) >>>\n      0\n    );\n  }\n\n  function GetLE32(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16) |\n        (data[data_off + 3] << 24)) >>>\n      0\n    );\n  }\n\n  function WebPRiffParser(src, src_off) {\n    var imagearray = {};\n    var i = 0;\n    var alpha_chunk = false;\n    var alpha_size = 0;\n    var alpha_offset = 0;\n    imagearray[\"frames\"] = [];\n    if (memcmp(src, src_off, \"RIFF\", 4)) return;\n    src_off += 4;\n    var riff_size = GetLE32(src, src_off) + 8;\n    src_off += 8;\n\n    while (src_off < src.length) {\n      var fourcc = GetTag(src, src_off);\n      src_off += 4;\n\n      var payload_size = GetLE32(src, src_off);\n      src_off += 4;\n      var payload_size_padded = payload_size + (payload_size & 1);\n\n      switch (fourcc) {\n        case \"VP8 \":\n        case \"VP8L\":\n          if (typeof imagearray[\"frames\"][i] === \"undefined\")\n            imagearray[\"frames\"][i] = {};\n          var obj = imagearray[\"frames\"][i];\n          var height = [0];\n          var width = [0];\n          obj[\"src_off\"] = alpha_chunk ? alpha_offset : src_off - 8;\n          obj[\"src_size\"] = alpha_size + payload_size + 8;\n          //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);\n          //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};\n          i++;\n          if (alpha_chunk) {\n            alpha_chunk = false;\n            alpha_size = 0;\n            alpha_offset = 0;\n          }\n          break;\n        case \"VP8X\":\n          var obj = (imagearray[\"header\"] = {});\n          var feature_flags = (obj[\"feature_flags\"] = src[src_off]);\n          var src_off_ = src_off + 4;\n          var canvas_width = (obj[\"canvas_width\"] = 1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          var canvas_height = (obj[\"canvas_height\"] =\n            1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          break;\n        case \"ALPH\":\n          alpha_chunk = true;\n          alpha_size = payload_size_padded + 8;\n          alpha_offset = src_off - 8;\n          break;\n\n        case \"ANIM\":\n          var obj = imagearray[\"header\"];\n          var bgcolor = (obj[\"bgcolor\"] = GetLE32(src, src_off));\n          src_off_ = src_off + 4;\n\n          var loop_count = (obj[\"loop_count\"] = GetLE16(src, src_off_));\n          src_off_ += 2;\n          break;\n        case \"ANMF\":\n          var offset_x = 0,\n            offset_y = 0,\n            width = 0,\n            height = 0,\n            duration = 0,\n            blend = 0,\n            dispose = 0,\n            temp = 0;\n          var obj = (imagearray[\"frames\"][i] = {});\n          obj[\"offset_x\"] = offset_x = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"offset_y\"] = offset_y = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"width\"] = width = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"height\"] = height = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"duration\"] = duration = GetLE24(src, src_off);\n          src_off += 3;\n          temp = src[src_off++];\n          obj[\"dispose\"] = dispose = temp & 1;\n          obj[\"blend\"] = blend = (temp >> 1) & 1;\n          break;\n        default:\n      }\n      if (fourcc != \"ANMF\") src_off += payload_size_padded;\n    }\n    return imagearray;\n  }\n\n  var height = [0];\n  var width = [0];\n  var pixels = [];\n  var webpdecoder = new _WebPDecoder();\n\n  var response = imageData;\n  var imagearray = WebPRiffParser(response, 0);\n  imagearray[\"response\"] = response;\n  imagearray[\"rgbaoutput\"] = true;\n  imagearray[\"dataurl\"] = false;\n\n  var header = imagearray[\"header\"] ? imagearray[\"header\"] : null;\n  var frames = imagearray[\"frames\"] ? imagearray[\"frames\"] : null;\n\n  if (header) {\n    header[\"loop_counter\"] = header[\"loop_count\"];\n    height = [header[\"canvas_height\"]];\n    width = [header[\"canvas_width\"]];\n\n    var blend = false;\n    for (var f = 0; f < frames.length; f++)\n      if (frames[f][\"blend\"] == 0) {\n        blend = true;\n        break;\n      }\n  }\n\n  var frame = frames[0];\n  var rgba = webpdecoder.WebPDecodeRGBA(\n    response,\n    frame[\"src_off\"],\n    frame[\"src_size\"],\n    width,\n    height\n  );\n  frame[\"rgba\"] = rgba;\n  frame[\"imgwidth\"] = width[0];\n  frame[\"imgheight\"] = height[0];\n\n  for (var i = 0; i < width[0] * height[0] * 4; i++) {\n    pixels[i] = rgba[i];\n  }\n\n  this.width = width;\n  this.height = height;\n  this.data = pixels;\n  return this;\n}\n\nWebPDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { WebPDecoder };\n","/**\n * @license\n *\n * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\nimport { PNG } from \"../libs/png.js\";\n\n/**\n * jsPDF PNG PlugIn\n * @name png_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /*\n   * @see http://www.w3.org/TR/PNG-Chunks.html\n   *\n   Color    Allowed      Interpretation\n   Type     Bit Depths\n\n     0       1,2,4,8,16  Each pixel is a grayscale sample.\n\n     2       8,16        Each pixel is an R,G,B triple.\n\n     3       1,2,4,8     Each pixel is a palette index;\n                         a PLTE chunk must appear.\n\n     4       8,16        Each pixel is a grayscale sample,\n                         followed by an alpha sample.\n\n     6       8,16        Each pixel is an R,G,B triple,\n                         followed by an alpha sample.\n  */\n\n  /*\n   * PNG filter method types\n   *\n   * @see http://www.w3.org/TR/PNG-Filters.html\n   * @see http://www.libpng.org/pub/png/book/chapter09.html\n   *\n   * This is what the value 'Predictor' in decode params relates to\n   *\n   * 15 is \"optimal prediction\", which means the prediction algorithm can change from line to line.\n   * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.\n   *\n     0       None\n     1       Sub\n     2       Up\n     3       Average\n     4       Paeth\n   */\n\n  var canCompress = function(value) {\n    return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();\n  };\n\n  var hasCompressionJS = function() {\n    return typeof zlibSync === \"function\";\n  };\n  var compressBytes = function(bytes, lineLength, colorsPerPixel, compression) {\n    var level = 4;\n    var filter_method = filterUp;\n\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        level = 1;\n        filter_method = filterSub;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        level = 6;\n        filter_method = filterAverage;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        level = 9;\n        filter_method = filterPaeth;\n        break;\n    }\n\n    bytes = applyPngFilterMethod(\n      bytes,\n      lineLength,\n      colorsPerPixel,\n      filter_method\n    );\n    var dat = zlibSync(bytes, { level: level });\n    return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);\n  };\n\n  var applyPngFilterMethod = function(\n    bytes,\n    lineLength,\n    colorsPerPixel,\n    filter_method\n  ) {\n    var lines = bytes.length / lineLength,\n      result = new Uint8Array(bytes.length + lines),\n      filter_methods = getFilterMethods(),\n      line,\n      prevLine,\n      offset;\n\n    for (var i = 0; i < lines; i += 1) {\n      offset = i * lineLength;\n      line = bytes.subarray(offset, offset + lineLength);\n\n      if (filter_method) {\n        result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);\n      } else {\n        var len = filter_methods.length,\n          results = [];\n\n        for (var j; j < len; j += 1) {\n          results[j] = filter_methods[j](line, colorsPerPixel, prevLine);\n        }\n\n        var ind = getIndexOfSmallestSum(results.concat());\n\n        result.set(results[ind], offset + i);\n      }\n\n      prevLine = line;\n    }\n\n    return result;\n  };\n\n  var filterNone = function(line) {\n    /*var result = new Uint8Array(line.length + 1);\n    result[0] = 0;\n    result.set(line, 1);*/\n\n    var result = Array.apply([], line);\n    result.unshift(0);\n\n    return result;\n  };\n\n  var filterSub = function(line, colorsPerPixel) {\n    var result = [],\n      len = line.length,\n      left;\n\n    result[0] = 1;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      result[i + 1] = (line[i] - left + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterUp = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      up;\n\n    result[0] = 2;\n\n    for (var i = 0; i < len; i += 1) {\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] - up + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterAverage = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up;\n\n    result[0] = 3;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] + 0x0100 - ((left + up) >>> 1)) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterPaeth = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up,\n      upLeft,\n      paeth;\n\n    result[0] = 4;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      upLeft = (prevLine && prevLine[i - colorsPerPixel]) || 0;\n      paeth = paethPredictor(left, up, upLeft);\n      result[i + 1] = (line[i] - paeth + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var paethPredictor = function(left, up, upLeft) {\n    if (left === up && up === upLeft) {\n      return left;\n    }\n    var pLeft = Math.abs(up - upLeft),\n      pUp = Math.abs(left - upLeft),\n      pUpLeft = Math.abs(left + up - upLeft - upLeft);\n    return pLeft <= pUp && pLeft <= pUpLeft\n      ? left\n      : pUp <= pUpLeft\n      ? up\n      : upLeft;\n  };\n\n  var getFilterMethods = function() {\n    return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];\n  };\n\n  var getIndexOfSmallestSum = function(arrays) {\n    var sum = arrays.map(function(value) {\n      return value.reduce(function(pv, cv) {\n        return pv + Math.abs(cv);\n      }, 0);\n    });\n    return sum.indexOf(Math.min.apply(null, sum));\n  };\n\n  var getPredictorFromCompression = function(compression) {\n    var predictor;\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        predictor = 11;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        predictor = 13;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        predictor = 14;\n        break;\n\n      default:\n        predictor = 12;\n        break;\n    }\n    return predictor;\n  };\n\n  /**\n   * @name processPNG\n   * @function\n   * @ignore\n   */\n  jsPDFAPI.processPNG = function(imageData, index, alias, compression) {\n    \"use strict\";\n\n    var colorSpace,\n      filter = this.decode.FLATE_DECODE,\n      bitsPerComponent,\n      image,\n      decodeParameters = \"\",\n      trns,\n      colors,\n      pal,\n      smask,\n      pixels,\n      len,\n      alphaData,\n      imgData,\n      hasColors,\n      pixel,\n      i,\n      n;\n\n    if (this.__addimage__.isArrayBuffer(imageData))\n      imageData = new Uint8Array(imageData);\n\n    if (this.__addimage__.isArrayBufferView(imageData)) {\n      image = new PNG(imageData);\n      imageData = image.imgData;\n      bitsPerComponent = image.bits;\n      colorSpace = image.colorSpace;\n      colors = image.colors;\n\n      /*\n       * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.\n       *\n       * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.\n       *\n       * Extract alpha to create two separate images, using the alpha as a sMask\n       */\n      if ([4, 6].indexOf(image.colorType) !== -1) {\n        /*\n         * processes 8 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 8) {\n          pixels =\n            image.pixelBitlength == 32\n              ? new Uint32Array(image.decodePixels().buffer)\n              : image.pixelBitlength == 16\n              ? new Uint16Array(image.decodePixels().buffer)\n              : new Uint8Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(len * image.colors);\n          alphaData = new Uint8Array(len);\n          var pDiff = image.pixelBitlength - image.bits;\n          i = 0;\n          n = 0;\n          var pbl;\n\n          for (; i < len; i++) {\n            pixel = pixels[i];\n            pbl = 0;\n\n            while (pbl < pDiff) {\n              imgData[n++] = (pixel >>> pbl) & 0xff;\n              pbl = pbl + image.bits;\n            }\n\n            alphaData[i] = (pixel >>> pbl) & 0xff;\n          }\n        }\n\n        /*\n         * processes 16 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 16) {\n          pixels = new Uint32Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(\n            len * (32 / image.pixelBitlength) * image.colors\n          );\n          alphaData = new Uint8Array(len * (32 / image.pixelBitlength));\n          hasColors = image.colors > 1;\n          i = 0;\n          n = 0;\n          var a = 0;\n\n          while (i < len) {\n            pixel = pixels[i++];\n\n            imgData[n++] = (pixel >>> 0) & 0xff;\n\n            if (hasColors) {\n              imgData[n++] = (pixel >>> 16) & 0xff;\n\n              pixel = pixels[i++];\n              imgData[n++] = (pixel >>> 0) & 0xff;\n            }\n\n            alphaData[a++] = (pixel >>> 16) & 0xff;\n          }\n          bitsPerComponent = 8;\n        }\n\n        if (canCompress(compression)) {\n          imageData = compressBytes(\n            imgData,\n            image.width * image.colors,\n            image.colors,\n            compression\n          );\n          smask = compressBytes(alphaData, image.width, 1, compression);\n        } else {\n          imageData = imgData;\n          smask = alphaData;\n          filter = undefined;\n        }\n      }\n\n      /*\n       * Indexed png. Each pixel is a palette index.\n       */\n      if (image.colorType === 3) {\n        colorSpace = this.color_spaces.INDEXED;\n        pal = image.palette;\n\n        if (image.transparency.indexed) {\n          var trans = image.transparency.indexed;\n          var total = 0;\n          i = 0;\n          len = trans.length;\n\n          for (; i < len; ++i) {\n            total += trans[i];\n          }\n\n          total = total / 255;\n\n          /*\n           * a single color is specified as 100% transparent (0),\n           * so we set trns to use a /Mask with that index\n           */\n          if (total === len - 1 && trans.indexOf(0) !== -1) {\n            trns = [trans.indexOf(0)];\n\n            /*\n             * there's more than one colour within the palette that specifies\n             * a transparency value less than 255, so we unroll the pixels to create an image sMask\n             */\n          } else if (total !== len) {\n            pixels = image.decodePixels();\n            alphaData = new Uint8Array(pixels.length);\n            i = 0;\n            len = pixels.length;\n\n            for (; i < len; i++) {\n              alphaData[i] = trans[pixels[i]];\n            }\n\n            smask = compressBytes(alphaData, image.width, 1);\n          }\n        }\n      }\n\n      var predictor = getPredictorFromCompression(compression);\n\n      if (filter === this.decode.FLATE_DECODE) {\n        decodeParameters = \"/Predictor \" + predictor + \" \";\n      }\n      decodeParameters +=\n        \"/Colors \" +\n        colors +\n        \" /BitsPerComponent \" +\n        bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n\n      if (\n        this.__addimage__.isArrayBuffer(imageData) ||\n        this.__addimage__.isArrayBufferView(imageData)\n      ) {\n        imageData = this.__addimage__.arrayBufferToBinaryString(imageData);\n      }\n\n      if (\n        (smask && this.__addimage__.isArrayBuffer(smask)) ||\n        this.__addimage__.isArrayBufferView(smask)\n      ) {\n        smask = this.__addimage__.arrayBufferToBinaryString(smask);\n      }\n\n      return {\n        alias: alias,\n        data: imageData,\n        index: index,\n        filter: filter,\n        decodeParameters: decodeParameters,\n        transparency: trns,\n        palette: pal,\n        sMask: smask,\n        predictor: predictor,\n        width: image.width,\n        height: image.height,\n        bitsPerComponent: bitsPerComponent,\n        colorSpace: colorSpace\n      };\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { GifReader } from \"../libs/omggif.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\n\n/**\n * jsPDF Gif Support PlugIn\n *\n * @name gif_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processGIF89A = function(imageData, index, alias, compression) {\n    var reader = new GifReader(imageData);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = [];\n\n    reader.decodeAndBlitFrameRGBA(0, pixels);\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n\n  jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;\n})(jsPDF.API);\n","import { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { BmpDecoder } from \"../libs/BMPDecoder.js\";\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @license\n * Copyright (c) 2018 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF bmp Support PlugIn\n * @name bmp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processBMP = function(imageData, index, alias, compression) {\n    var reader = new BmpDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2019 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { WebPDecoder } from \"../libs/WebPDecoder.js\";\n\n/**\n * jsPDF webp Support PlugIn\n *\n * @name webp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processWEBP = function(imageData, index, alias, compression) {\n    var reader = new WebPDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","/**\n * @license\n *\n * Copyright (c) 2021 Antti Palola, https://github.com/Pantura\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF RGBA array PlugIn\n * @name rgba_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name processRGBA\n   * @function\n   *\n   * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].\n   * RGBA array data can be obtained from DOM canvas getImageData.\n   * @ignore\n   */\n  jsPDFAPI.processRGBA = function(imageData, index, alias) {\n    \"use strict\";\n\n    var imagePixels = imageData.data;\n    var length = imagePixels.length;\n    // jsPDF takes alpha data separately so extract that.\n    var rgbOut = new Uint8Array((length / 4) * 3);\n    var alphaOut = new Uint8Array(length / 4);\n    var outIndex = 0;\n    var alphaIndex = 0;\n\n    for (var i = 0; i < length; i += 4) {\n      var r = imagePixels[i];\n      var g = imagePixels[i + 1];\n      var b = imagePixels[i + 2];\n      var alpha = imagePixels[i + 3];\n      rgbOut[outIndex++] = r;\n      rgbOut[outIndex++] = g;\n      rgbOut[outIndex++] = b;\n      alphaOut[alphaIndex++] = alpha;\n    }\n\n    var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);\n    var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);\n\n    return {\n      alpha: alphaData,\n      data: rgbData,\n      index: index,\n      alias: alias,\n      colorSpace: \"DeviceRGB\",\n      bitsPerComponent: 8,\n      width: imageData.width,\n      height: imageData.height\n    };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF setLanguage Plugin\n *\n * @name setLanguage\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Add Language Tag to the generated PDF\n   *\n   * @name setLanguage\n   * @function\n   * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF()\n   * doc.text(10, 10, 'This is a test')\n   * doc.setLanguage(\"en-US\")\n   * doc.save('english.pdf')\n   */\n  jsPDFAPI.setLanguage = function(langCode) {\n    \"use strict\";\n\n    var langCodes = {\n      af: \"Afrikaans\",\n      sq: \"Albanian\",\n      ar: \"Arabic (Standard)\",\n      \"ar-DZ\": \"Arabic (Algeria)\",\n      \"ar-BH\": \"Arabic (Bahrain)\",\n      \"ar-EG\": \"Arabic (Egypt)\",\n      \"ar-IQ\": \"Arabic (Iraq)\",\n      \"ar-JO\": \"Arabic (Jordan)\",\n      \"ar-KW\": \"Arabic (Kuwait)\",\n      \"ar-LB\": \"Arabic (Lebanon)\",\n      \"ar-LY\": \"Arabic (Libya)\",\n      \"ar-MA\": \"Arabic (Morocco)\",\n      \"ar-OM\": \"Arabic (Oman)\",\n      \"ar-QA\": \"Arabic (Qatar)\",\n      \"ar-SA\": \"Arabic (Saudi Arabia)\",\n      \"ar-SY\": \"Arabic (Syria)\",\n      \"ar-TN\": \"Arabic (Tunisia)\",\n      \"ar-AE\": \"Arabic (U.A.E.)\",\n      \"ar-YE\": \"Arabic (Yemen)\",\n      an: \"Aragonese\",\n      hy: \"Armenian\",\n      as: \"Assamese\",\n      ast: \"Asturian\",\n      az: \"Azerbaijani\",\n      eu: \"Basque\",\n      be: \"Belarusian\",\n      bn: \"Bengali\",\n      bs: \"Bosnian\",\n      br: \"Breton\",\n      bg: \"Bulgarian\",\n      my: \"Burmese\",\n      ca: \"Catalan\",\n      ch: \"Chamorro\",\n      ce: \"Chechen\",\n      zh: \"Chinese\",\n      \"zh-HK\": \"Chinese (Hong Kong)\",\n      \"zh-CN\": \"Chinese (PRC)\",\n      \"zh-SG\": \"Chinese (Singapore)\",\n      \"zh-TW\": \"Chinese (Taiwan)\",\n      cv: \"Chuvash\",\n      co: \"Corsican\",\n      cr: \"Cree\",\n      hr: \"Croatian\",\n      cs: \"Czech\",\n      da: \"Danish\",\n      nl: \"Dutch (Standard)\",\n      \"nl-BE\": \"Dutch (Belgian)\",\n      en: \"English\",\n      \"en-AU\": \"English (Australia)\",\n      \"en-BZ\": \"English (Belize)\",\n      \"en-CA\": \"English (Canada)\",\n      \"en-IE\": \"English (Ireland)\",\n      \"en-JM\": \"English (Jamaica)\",\n      \"en-NZ\": \"English (New Zealand)\",\n      \"en-PH\": \"English (Philippines)\",\n      \"en-ZA\": \"English (South Africa)\",\n      \"en-TT\": \"English (Trinidad & Tobago)\",\n      \"en-GB\": \"English (United Kingdom)\",\n      \"en-US\": \"English (United States)\",\n      \"en-ZW\": \"English (Zimbabwe)\",\n      eo: \"Esperanto\",\n      et: \"Estonian\",\n      fo: \"Faeroese\",\n      fj: \"Fijian\",\n      fi: \"Finnish\",\n      fr: \"French (Standard)\",\n      \"fr-BE\": \"French (Belgium)\",\n      \"fr-CA\": \"French (Canada)\",\n      \"fr-FR\": \"French (France)\",\n      \"fr-LU\": \"French (Luxembourg)\",\n      \"fr-MC\": \"French (Monaco)\",\n      \"fr-CH\": \"French (Switzerland)\",\n      fy: \"Frisian\",\n      fur: \"Friulian\",\n      gd: \"Gaelic (Scots)\",\n      \"gd-IE\": \"Gaelic (Irish)\",\n      gl: \"Galacian\",\n      ka: \"Georgian\",\n      de: \"German (Standard)\",\n      \"de-AT\": \"German (Austria)\",\n      \"de-DE\": \"German (Germany)\",\n      \"de-LI\": \"German (Liechtenstein)\",\n      \"de-LU\": \"German (Luxembourg)\",\n      \"de-CH\": \"German (Switzerland)\",\n      el: \"Greek\",\n      gu: \"Gujurati\",\n      ht: \"Haitian\",\n      he: \"Hebrew\",\n      hi: \"Hindi\",\n      hu: \"Hungarian\",\n      is: \"Icelandic\",\n      id: \"Indonesian\",\n      iu: \"Inuktitut\",\n      ga: \"Irish\",\n      it: \"Italian (Standard)\",\n      \"it-CH\": \"Italian (Switzerland)\",\n      ja: \"Japanese\",\n      kn: \"Kannada\",\n      ks: \"Kashmiri\",\n      kk: \"Kazakh\",\n      km: \"Khmer\",\n      ky: \"Kirghiz\",\n      tlh: \"Klingon\",\n      ko: \"Korean\",\n      \"ko-KP\": \"Korean (North Korea)\",\n      \"ko-KR\": \"Korean (South Korea)\",\n      la: \"Latin\",\n      lv: \"Latvian\",\n      lt: \"Lithuanian\",\n      lb: \"Luxembourgish\",\n      mk: \"North Macedonia\",\n      ms: \"Malay\",\n      ml: \"Malayalam\",\n      mt: \"Maltese\",\n      mi: \"Maori\",\n      mr: \"Marathi\",\n      mo: \"Moldavian\",\n      nv: \"Navajo\",\n      ng: \"Ndonga\",\n      ne: \"Nepali\",\n      no: \"Norwegian\",\n      nb: \"Norwegian (Bokmal)\",\n      nn: \"Norwegian (Nynorsk)\",\n      oc: \"Occitan\",\n      or: \"Oriya\",\n      om: \"Oromo\",\n      fa: \"Persian\",\n      \"fa-IR\": \"Persian/Iran\",\n      pl: \"Polish\",\n      pt: \"Portuguese\",\n      \"pt-BR\": \"Portuguese (Brazil)\",\n      pa: \"Punjabi\",\n      \"pa-IN\": \"Punjabi (India)\",\n      \"pa-PK\": \"Punjabi (Pakistan)\",\n      qu: \"Quechua\",\n      rm: \"Rhaeto-Romanic\",\n      ro: \"Romanian\",\n      \"ro-MO\": \"Romanian (Moldavia)\",\n      ru: \"Russian\",\n      \"ru-MO\": \"Russian (Moldavia)\",\n      sz: \"Sami (Lappish)\",\n      sg: \"Sango\",\n      sa: \"Sanskrit\",\n      sc: \"Sardinian\",\n      sd: \"Sindhi\",\n      si: \"Singhalese\",\n      sr: \"Serbian\",\n      sk: \"Slovak\",\n      sl: \"Slovenian\",\n      so: \"Somani\",\n      sb: \"Sorbian\",\n      es: \"Spanish\",\n      \"es-AR\": \"Spanish (Argentina)\",\n      \"es-BO\": \"Spanish (Bolivia)\",\n      \"es-CL\": \"Spanish (Chile)\",\n      \"es-CO\": \"Spanish (Colombia)\",\n      \"es-CR\": \"Spanish (Costa Rica)\",\n      \"es-DO\": \"Spanish (Dominican Republic)\",\n      \"es-EC\": \"Spanish (Ecuador)\",\n      \"es-SV\": \"Spanish (El Salvador)\",\n      \"es-GT\": \"Spanish (Guatemala)\",\n      \"es-HN\": \"Spanish (Honduras)\",\n      \"es-MX\": \"Spanish (Mexico)\",\n      \"es-NI\": \"Spanish (Nicaragua)\",\n      \"es-PA\": \"Spanish (Panama)\",\n      \"es-PY\": \"Spanish (Paraguay)\",\n      \"es-PE\": \"Spanish (Peru)\",\n      \"es-PR\": \"Spanish (Puerto Rico)\",\n      \"es-ES\": \"Spanish (Spain)\",\n      \"es-UY\": \"Spanish (Uruguay)\",\n      \"es-VE\": \"Spanish (Venezuela)\",\n      sx: \"Sutu\",\n      sw: \"Swahili\",\n      sv: \"Swedish\",\n      \"sv-FI\": \"Swedish (Finland)\",\n      \"sv-SV\": \"Swedish (Sweden)\",\n      ta: \"Tamil\",\n      tt: \"Tatar\",\n      te: \"Teluga\",\n      th: \"Thai\",\n      tig: \"Tigre\",\n      ts: \"Tsonga\",\n      tn: \"Tswana\",\n      tr: \"Turkish\",\n      tk: \"Turkmen\",\n      uk: \"Ukrainian\",\n      hsb: \"Upper Sorbian\",\n      ur: \"Urdu\",\n      ve: \"Venda\",\n      vi: \"Vietnamese\",\n      vo: \"Volapuk\",\n      wa: \"Walloon\",\n      cy: \"Welsh\",\n      xh: \"Xhosa\",\n      ji: \"Yiddish\",\n      zu: \"Zulu\"\n    };\n\n    if (this.internal.languageSettings === undefined) {\n      this.internal.languageSettings = {};\n      this.internal.languageSettings.isSubscribed = false;\n    }\n\n    if (langCodes[langCode] !== undefined) {\n      this.internal.languageSettings.languageCode = langCode;\n      if (this.internal.languageSettings.isSubscribed === false) {\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.write(\n            \"/Lang (\" + this.internal.languageSettings.languageCode + \")\"\n          );\n        });\n        this.internal.languageSettings.isSubscribed = true;\n      }\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/** @license\n jsPDF standard_fonts_metrics plugin\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n * MIT license.\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * This file adds the standard font metrics to jsPDF.\n *\n * Font metrics data is reprocessed derivative of contents of\n * \"Font Metrics for PDF Core 14 Fonts\" package, which exhibits the following copyright and license:\n *\n * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.\n *\n * This file and the 14 PostScript(R) AFM files it accompanies may be used,\n * copied, and distributed for any purpose and without charge, with or without\n * modification, provided that all copyright notices are retained; that the AFM\n * files are not distributed without this file; that all modifications to this\n * file or any of the AFM files are prominently noted in the modified file(s);\n * and that this paragraph is not modified. Adobe Systems has no responsibility\n * or obligation to support the use of the AFM files.\n *\n * @name standard_fonts_metrics\n * @module\n */\n\n(function(API) {\n  \"use strict\";\n  API.__fontmetrics__ = API.__fontmetrics__ || {};\n\n  var decoded = \"0123456789abcdef\",\n    encoded = \"klmnopqrstuvwxyz\",\n    mappingUncompress = {},\n    mappingCompress = {};\n\n  for (var i = 0; i < encoded.length; i++) {\n    mappingUncompress[encoded[i]] = decoded[i];\n    mappingCompress[decoded[i]] = encoded[i];\n  }\n\n  var hex = function(value) {\n    return \"0x\" + parseInt(value, 10).toString(16);\n  };\n\n  var compress = (API.__fontmetrics__.compress = function(data) {\n    var vals = [\"{\"];\n    var value, keystring, valuestring, numberprefix;\n\n    for (var key in data) {\n      value = data[key];\n\n      if (!isNaN(parseInt(key, 10))) {\n        key = parseInt(key, 10);\n        keystring = hex(key).slice(2);\n        keystring =\n          keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];\n      } else {\n        keystring = \"'\" + key + \"'\";\n      }\n\n      if (typeof value == \"number\") {\n        if (value < 0) {\n          valuestring = hex(value).slice(3);\n          numberprefix = \"-\";\n        } else {\n          valuestring = hex(value).slice(2);\n          numberprefix = \"\";\n        }\n        valuestring =\n          numberprefix +\n          valuestring.slice(0, -1) +\n          mappingCompress[valuestring.slice(-1)];\n      } else {\n        if (typeof value === \"object\") {\n          valuestring = compress(value);\n        } else {\n          throw new Error(\n            \"Don't know what to do with value type \" + typeof value + \".\"\n          );\n        }\n      }\n      vals.push(keystring + valuestring);\n    }\n    vals.push(\"}\");\n    return vals.join(\"\");\n  });\n\n  /**\n   * Uncompresses data compressed into custom, base16-like format.\n   *\n   * @public\n   * @function\n   * @param\n   * @returns {Type}\n   */\n  var uncompress = (API.__fontmetrics__.uncompress = function(data) {\n    if (typeof data !== \"string\") {\n      throw new Error(\"Invalid argument passed to uncompress.\");\n    }\n\n    var output = {},\n      sign = 1,\n      stringparts, // undef. will be [] in string mode\n      activeobject = output,\n      parentchain = [],\n      parent_key_pair,\n      keyparts = \"\",\n      valueparts = \"\",\n      key, // undef. will be Truthy when Key is resolved.\n      datalen = data.length - 1, // stripping ending }\n      ch;\n\n    for (var i = 1; i < datalen; i += 1) {\n      // - { } ' are special.\n\n      ch = data[i];\n\n      if (ch == \"'\") {\n        if (stringparts) {\n          // end of string mode\n          key = stringparts.join(\"\");\n          stringparts = undefined;\n        } else {\n          // start of string mode\n          stringparts = [];\n        }\n      } else if (stringparts) {\n        stringparts.push(ch);\n      } else if (ch == \"{\") {\n        // start of object\n        parentchain.push([activeobject, key]);\n        activeobject = {};\n        key = undefined;\n      } else if (ch == \"}\") {\n        // end of object\n        parent_key_pair = parentchain.pop();\n        parent_key_pair[0][parent_key_pair[1]] = activeobject;\n        key = undefined;\n        activeobject = parent_key_pair[0];\n      } else if (ch == \"-\") {\n        sign = -1;\n      } else {\n        // must be number\n        if (key === undefined) {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            keyparts += mappingUncompress[ch];\n            key = parseInt(keyparts, 16) * sign;\n            sign = +1;\n            keyparts = \"\";\n          } else {\n            keyparts += ch;\n          }\n        } else {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            valueparts += mappingUncompress[ch];\n            activeobject[key] = parseInt(valueparts, 16) * sign;\n            sign = +1;\n            key = undefined;\n            valueparts = \"\";\n          } else {\n            valueparts += ch;\n          }\n        }\n      }\n    }\n    return output;\n  });\n\n  // encoding = 'Unicode'\n  // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior\n  // Actual 16bit char codes used.\n  // no multi-byte logic here\n\n  // Unicode characters to WinAnsiEncoding:\n  // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}\n  // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.\n  // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly\n  // as well as give strings with some (supported by these fonts) Unicode characters and\n  // these will be mapped to win cp1252\n  // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting \"Euro\" glyph displayed in both cases.\n\n  var encodingBlock = {\n    codePages: [\"WinAnsiEncoding\"],\n    WinAnsiEncoding: uncompress(\n      \"{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}\"\n    )\n  };\n  var encodings = {\n    Unicode: {\n      Courier: encodingBlock,\n      \"Courier-Bold\": encodingBlock,\n      \"Courier-BoldOblique\": encodingBlock,\n      \"Courier-Oblique\": encodingBlock,\n      Helvetica: encodingBlock,\n      \"Helvetica-Bold\": encodingBlock,\n      \"Helvetica-BoldOblique\": encodingBlock,\n      \"Helvetica-Oblique\": encodingBlock,\n      \"Times-Roman\": encodingBlock,\n      \"Times-Bold\": encodingBlock,\n      \"Times-BoldItalic\": encodingBlock,\n      \"Times-Italic\": encodingBlock\n      //\t, 'Symbol'\n      //\t, 'ZapfDingbats'\n    }\n  };\n\n  var fontMetrics = {\n    Unicode: {\n      // all sizing numbers are n/fontMetricsFractionOf = one font size unit\n      // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's\n      // width is 476/1000 or 47.6% of its height (regardless of font size)\n      // At this time this value applies to \"widths\" and \"kerning\" numbers.\n\n      // char code 0 represents \"default\" (average) width - use it for chars missing in this table.\n      // key 'fof' represents the \"fontMetricsFractionOf\" value\n\n      \"Courier-Oblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-BoldItalic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Courier: uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-BoldOblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Symbol: uncompress(\n        \"{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}\"\n      ),\n      Helvetica: uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-BoldOblique\": uncompress(\n        \"{'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}}}\"\n      ),\n      ZapfDingbats: uncompress(\"{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-Bold\": uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Times-Italic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Times-Roman\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Oblique\": uncompress(\n        \"{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201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{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}}}\"\n      )\n    }\n  };\n\n  /*\n\tThis event handler is fired when a new jsPDF object is initialized\n\tThis event handler appends metrics data to standard fonts within\n\tthat jsPDF instance. The metrics are mapped over Unicode character\n\tcodes, NOT CIDs or other codes matching the StandardEncoding table of the\n\tstandard PDF fonts.\n\tFuture:\n\tAlso included is the encoding maping table, converting Unicode (UCS-2, UTF-16)\n\tchar codes to StandardEncoding character codes. The encoding table is to be used\n\tsomewhere around \"pdfEscape\" call.\n\t*/\n  API.events.push([\n    \"addFont\",\n    function(data) {\n      var font = data.font;\n\n      var metrics = fontMetrics[\"Unicode\"][font.postScriptName];\n      if (metrics) {\n        font.metadata[\"Unicode\"] = {};\n        font.metadata[\"Unicode\"].widths = metrics.widths;\n        font.metadata[\"Unicode\"].kerning = metrics.kerning;\n      }\n\n      var encodingBlock = encodings[\"Unicode\"][font.postScriptName];\n      if (encodingBlock) {\n        font.metadata[\"Unicode\"].encoding = encodingBlock;\n        font.encoding = encodingBlock.codePages[0];\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob } from \"../libs/AtobBtoa.js\";\n\n/**\n * @name ttfsupport\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n\n  var binaryStringToUint8Array = function(binary_string) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  };\n\n  var addFont = function(font, file) {\n    // eslint-disable-next-line no-control-regex\n    if (/^\\x00\\x01\\x00\\x00/.test(file)) {\n      file = binaryStringToUint8Array(file);\n    } else {\n      file = binaryStringToUint8Array(atob(file));\n    }\n    font.metadata = jsPDF.API.TTFFont.open(file);\n    font.metadata.Unicode = font.metadata.Unicode || {\n      encoding: {},\n      kerning: {},\n      widths: []\n    };\n    font.metadata.glyIdsUsed = [0];\n  };\n\n  jsPDF.API.events.push([\n    \"addFont\",\n    function(data) {\n      var file = undefined;\n      var font = data.font;\n      var instance = data.instance;\n      if (font.isStandardFont) {\n        return;\n      }\n      if (typeof instance !== \"undefined\") {\n        if (instance.existsFileInVFS(font.postScriptName) === false) {\n          file = instance.loadFile(font.postScriptName);\n        } else {\n          file = instance.getFileFromVFS(font.postScriptName);\n        }\n        if (typeof file !== \"string\") {\n          throw new Error(\n            \"Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('\" +\n              font.postScriptName +\n              \"').\"\n          );\n        }\n        addFont(font, file);\n      } else {\n        throw new Error(\n          \"Font does not exist in vFS, import fonts or remove declaration doc.addFont('\" +\n            font.postScriptName +\n            \"').\"\n        );\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF);\n","/** @license\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { console } from \"../libs/console.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF SVG plugin\n *\n * @name svg\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadCanvg() {\n    return (function() {\n      if (globalObject[\"canvg\"]) {\n        return Promise.resolve(globalObject[\"canvg\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"canvg\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"canvg\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load canvg\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load canvg: \" + e));\n      })\n      .then(function(canvg) {\n        return canvg.default ? canvg.default : canvg;\n      });\n  }\n\n  /**\n   * Parses SVG XML and saves it as image into the PDF.\n   *\n   * Depends on canvas-element and canvg\n   *\n   * @name addSvgAsImage\n   * @public\n   * @function\n   * @param {string} SVG-Data as Text\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width of SVG-Image (in units declared at inception of PDF document)\n   * @param {number} height of SVG-Image (in units declared at inception of PDF document)\n   * @param {string} alias of SVG-Image (if used multiple times)\n   * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF jsPDF-instance\n   */\n  jsPDFAPI.addSvgAsImage = function(\n    svg,\n    x,\n    y,\n    w,\n    h,\n    alias,\n    compression,\n    rotation\n  ) {\n    if (isNaN(x) || isNaN(y)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid coordinates\", arguments);\n      throw new Error(\"Invalid coordinates passed to jsPDF.addSvgAsImage\");\n    }\n\n    if (isNaN(w) || isNaN(h)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid measurements\", arguments);\n      throw new Error(\n        \"Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage\"\n      );\n    }\n\n    var canvas = document.createElement(\"canvas\");\n    canvas.width = w;\n    canvas.height = h;\n    var ctx = canvas.getContext(\"2d\");\n    ctx.fillStyle = \"#fff\"; /// set white fill style\n    ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n    var options = {\n      ignoreMouse: true,\n      ignoreAnimation: true,\n      ignoreDimensions: true\n    };\n    var doc = this;\n    return loadCanvg()\n      .then(\n        function(canvg) {\n          return canvg.fromString(ctx, svg, options);\n        },\n        function() {\n          return Promise.reject(new Error(\"Could not load canvg.\"));\n        }\n      )\n      .then(function(instance) {\n        return instance.render(options);\n      })\n      .then(function() {\n        doc.addImage(\n          canvas.toDataURL(\"image/jpeg\", 1.0),\n          x,\n          y,\n          w,\n          h,\n          compression,\n          rotation\n        );\n      });\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF total_pages plugin\n * @name total_pages\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * @name putTotalPages\n   * @function\n   * @param {string} pageExpression Regular Expression\n   * @returns {jsPDF} jsPDF-instance\n   */\n\n  jsPDFAPI.putTotalPages = function(pageExpression) {\n    \"use strict\";\n\n    var replaceExpression;\n    var totalNumberOfPages = 0;\n    if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {\n      replaceExpression = new RegExp(pageExpression, \"g\");\n      totalNumberOfPages = this.internal.getNumberOfPages();\n    } else {\n      replaceExpression = new RegExp(\n        this.pdfEscape16(pageExpression, this.internal.getFont()),\n        \"g\"\n      );\n      totalNumberOfPages = this.pdfEscape16(\n        this.internal.getNumberOfPages() + \"\",\n        this.internal.getFont()\n      );\n    }\n\n    for (var n = 1; n <= this.internal.getNumberOfPages(); n++) {\n      for (var i = 0; i < this.internal.pages[n].length; i++) {\n        this.internal.pages[n][i] = this.internal.pages[n][i].replace(\n          replaceExpression,\n          totalNumberOfPages\n        );\n      }\n    }\n\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF viewerPreferences Plugin\n * @author Aras Abbasi (github.com/arasabbasi)\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Adds the ability to set ViewerPreferences and by thus\n * controlling the way the document is to be presented on the\n * screen or in print.\n * @name viewerpreferences\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * Set the ViewerPreferences of the generated PDF\n   *\n   * @name viewerPreferences\n   * @function\n   * @public\n   * @param {Object} options Array with the ViewerPreferences<br />\n   * Example: doc.viewerPreferences({\"FitWindow\":true});<br />\n   * <br />\n   * You can set following preferences:<br />\n   * <br/>\n   * <b>HideToolbar</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>HideMenubar</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>HideWindowUI</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>FitWindow</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>CenterWindow</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>DisplayDocTitle</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>NonFullScreenPageMode</b> <i>(string)</i><br />\n   * Possible values: UseNone, UseOutlines, UseThumbs, UseOC<br />\n   * Default value: UseNone<br/>\n   * <br />\n   * <b>Direction</b> <i>(string)</i><br />\n   * Possible values: L2R, R2L<br />\n   * Default value: L2R.<br />\n   * <br />\n   * <b>ViewArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>ViewClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>PrintScaling</b> <i>(string)</i><br />\n   * Possible values: AppDefault, None<br />\n   * Default value: AppDefault.<br />\n   * <br />\n   * <b>Duplex</b> <i>(string)</i><br />\n   * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge\n   * Default value: none<br />\n   * <br />\n   * <b>PickTrayByPDFSize</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>PrintPageRange</b> <i>(Array)</i><br />\n   * Example: [[1,5], [7,9]]<br />\n   * Default value: as defined by PDF viewer application<br />\n   * <br />\n   * <b>NumCopies</b> <i>(Number)</i><br />\n   * Possible values: 1, 2, 3, 4, 5<br />\n   * Default value: 1<br />\n   * <br />\n   * For more information see the PDF Reference, sixth edition on Page 577\n   * @param {boolean} doReset True to reset the settings\n   * @function\n   * @returns jsPDF jsPDF-instance\n   * @example\n   * var doc = new jsPDF()\n   * doc.text('This is a test', 10, 10)\n   * doc.viewerPreferences({'FitWindow': true}, true)\n   * doc.save(\"viewerPreferences.pdf\")\n   *\n   * // Example printing 10 copies, using cropbox, and hiding UI.\n   * doc.viewerPreferences({\n   *   'HideWindowUI': true,\n   *   'PrintArea': 'CropBox',\n   *   'NumCopies': 10\n   * })\n   */\n  jsPDFAPI.viewerPreferences = function(options, doReset) {\n    options = options || {};\n    doReset = doReset || false;\n\n    var configuration;\n    var configurationTemplate = {\n      HideToolbar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideMenubar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideWindowUI: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      FitWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      CenterWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      DisplayDocTitle: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.4\n      },\n      NonFullScreenPageMode: {\n        defaultValue: \"UseNone\",\n        value: \"UseNone\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"UseNone\", \"UseOutlines\", \"UseThumbs\", \"UseOC\"],\n        pdfVersion: 1.3\n      },\n      Direction: {\n        defaultValue: \"L2R\",\n        value: \"L2R\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"L2R\", \"R2L\"],\n        pdfVersion: 1.3\n      },\n      ViewArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      ViewClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintScaling: {\n        defaultValue: \"AppDefault\",\n        value: \"AppDefault\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"AppDefault\", \"None\"],\n        pdfVersion: 1.6\n      },\n      Duplex: {\n        defaultValue: \"\",\n        value: \"none\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\n          \"Simplex\",\n          \"DuplexFlipShortEdge\",\n          \"DuplexFlipLongEdge\",\n          \"none\"\n        ],\n        pdfVersion: 1.7\n      },\n      PickTrayByPDFSize: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.7\n      },\n      PrintPageRange: {\n        defaultValue: \"\",\n        value: \"\",\n        type: \"array\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      },\n      NumCopies: {\n        defaultValue: 1,\n        value: 1,\n        type: \"integer\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      }\n    };\n\n    var configurationKeys = Object.keys(configurationTemplate);\n\n    var rangeArray = [];\n    var i = 0;\n    var j = 0;\n    var k = 0;\n    var isValid;\n\n    var method;\n    var value;\n\n    function arrayContainsElement(array, element) {\n      var iterator;\n      var result = false;\n\n      for (iterator = 0; iterator < array.length; iterator += 1) {\n        if (array[iterator] === element) {\n          result = true;\n        }\n      }\n      return result;\n    }\n\n    if (this.internal.viewerpreferences === undefined) {\n      this.internal.viewerpreferences = {};\n      this.internal.viewerpreferences.configuration = JSON.parse(\n        JSON.stringify(configurationTemplate)\n      );\n      this.internal.viewerpreferences.isSubscribed = false;\n    }\n    configuration = this.internal.viewerpreferences.configuration;\n\n    if (options === \"reset\" || doReset === true) {\n      var len = configurationKeys.length;\n\n      for (k = 0; k < len; k += 1) {\n        configuration[configurationKeys[k]].value =\n          configuration[configurationKeys[k]].defaultValue;\n        configuration[configurationKeys[k]].explicitSet = false;\n      }\n    }\n\n    if (typeof options === \"object\") {\n      for (method in options) {\n        value = options[method];\n        if (\n          arrayContainsElement(configurationKeys, method) &&\n          value !== undefined\n        ) {\n          if (\n            configuration[method].type === \"boolean\" &&\n            typeof value === \"boolean\"\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"name\" &&\n            arrayContainsElement(configuration[method].valueSet, value)\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"integer\" &&\n            Number.isInteger(value)\n          ) {\n            configuration[method].value = value;\n          } else if (configuration[method].type === \"array\") {\n            for (i = 0; i < value.length; i += 1) {\n              isValid = true;\n              if (value[i].length === 1 && typeof value[i][0] === \"number\") {\n                rangeArray.push(String(value[i] - 1));\n              } else if (value[i].length > 1) {\n                for (j = 0; j < value[i].length; j += 1) {\n                  if (typeof value[i][j] !== \"number\") {\n                    isValid = false;\n                  }\n                }\n                if (isValid === true) {\n                  rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(\" \"));\n                }\n              }\n            }\n            configuration[method].value = \"[\" + rangeArray.join(\" \") + \"]\";\n          } else {\n            configuration[method].value = configuration[method].defaultValue;\n          }\n\n          configuration[method].explicitSet = true;\n        }\n      }\n    }\n\n    if (this.internal.viewerpreferences.isSubscribed === false) {\n      this.internal.events.subscribe(\"putCatalog\", function() {\n        var pdfDict = [];\n        var vPref;\n        for (vPref in configuration) {\n          if (configuration[vPref].explicitSet === true) {\n            if (configuration[vPref].type === \"name\") {\n              pdfDict.push(\"/\" + vPref + \" /\" + configuration[vPref].value);\n            } else {\n              pdfDict.push(\"/\" + vPref + \" \" + configuration[vPref].value);\n            }\n          }\n        }\n        if (pdfDict.length !== 0) {\n          this.internal.write(\n            \"/ViewerPreferences\\n<<\\n\" + pdfDict.join(\"\\n\") + \"\\n>>\"\n          );\n        }\n      });\n      this.internal.viewerpreferences.isSubscribed = true;\n    }\n\n    this.internal.viewerpreferences.configuration = configuration;\n    return this;\n  };\n})(jsPDF.API);\n","/** ====================================================================\n * @license\n * jsPDF XMP metadata plugin\n * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name xmp_metadata\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var postPutResources = function() {\n    var xmpmeta_beginning = '<x:xmpmeta xmlns:x=\"adobe:ns:meta/\">';\n    var rdf_beginning =\n      '<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\" xmlns:jspdf=\"' +\n      this.internal.__metadata__.namespaceuri +\n      '\"><jspdf:metadata>';\n    var rdf_ending = \"</jspdf:metadata></rdf:Description></rdf:RDF>\";\n    var xmpmeta_ending = \"</x:xmpmeta>\";\n    var utf8_xmpmeta_beginning = unescape(\n      encodeURIComponent(xmpmeta_beginning)\n    );\n    var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));\n    var utf8_metadata = unescape(\n      encodeURIComponent(this.internal.__metadata__.metadata)\n    );\n    var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));\n    var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));\n\n    var total_len =\n      utf8_rdf_beginning.length +\n      utf8_metadata.length +\n      utf8_rdf_ending.length +\n      utf8_xmpmeta_beginning.length +\n      utf8_xmpmeta_ending.length;\n\n    this.internal.__metadata__.metadata_object_number = this.internal.newObject();\n    this.internal.write(\n      \"<< /Type /Metadata /Subtype /XML /Length \" + total_len + \" >>\"\n    );\n    this.internal.write(\"stream\");\n    this.internal.write(\n      utf8_xmpmeta_beginning +\n        utf8_rdf_beginning +\n        utf8_metadata +\n        utf8_rdf_ending +\n        utf8_xmpmeta_ending\n    );\n    this.internal.write(\"endstream\");\n    this.internal.write(\"endobj\");\n  };\n\n  var putCatalog = function() {\n    if (this.internal.__metadata__.metadata_object_number) {\n      this.internal.write(\n        \"/Metadata \" +\n          this.internal.__metadata__.metadata_object_number +\n          \" 0 R\"\n      );\n    }\n  };\n\n  /**\n   * Adds XMP formatted metadata to PDF\n   *\n   * @name addMetadata\n   * @function\n   * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters \"<\", \">\" or \"&\", those characters should be written using XML entities.\n   * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.\n   * @returns {jsPDF} jsPDF-instance\n   */\n  jsPDFAPI.addMetadata = function(metadata, namespaceuri) {\n    if (typeof this.internal.__metadata__ === \"undefined\") {\n      this.internal.__metadata__ = {\n        metadata: metadata,\n        namespaceuri: namespaceuri || \"http://jspdf.default.namespaceuri/\"\n      };\n      this.internal.events.subscribe(\"putCatalog\", putCatalog);\n\n      this.internal.events.subscribe(\"postPutResources\", postPutResources);\n    }\n    return this;\n  };\n})(jsPDF.API);\n","import { jsPDF } from \"../jspdf.js\";\nimport { toPDFName } from \"../libs/pdfname.js\";\n\n/**\n * @name utf8\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n  var jsPDFAPI = jsPDF.API;\n\n  /***************************************************************************************************/\n  /* function : pdfEscape16                                                                          */\n  /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */\n  /*   the corresponding glyph id and width, and then adding padding to the string.                  */\n  /***************************************************************************************************/\n  var pdfEscape16 = (jsPDFAPI.pdfEscape16 = function(text, font) {\n    var widths = font.metadata.Unicode.widths;\n    var padz = [\"\", \"0\", \"00\", \"000\", \"0000\"];\n    var ar = [\"\"];\n    for (var i = 0, l = text.length, t; i < l; ++i) {\n      t = font.metadata.characterToGlyph(text.charCodeAt(i));\n      font.metadata.glyIdsUsed.push(t);\n      font.metadata.toUnicode[t] = text.charCodeAt(i);\n      if (widths.indexOf(t) == -1) {\n        widths.push(t);\n        widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);\n      }\n      if (t == \"0\") {\n        //Spaces are not allowed in cmap.\n        return ar.join(\"\");\n      } else {\n        t = t.toString(16);\n        ar.push(padz[4 - t.length], t);\n      }\n    }\n    return ar.join(\"\");\n  });\n\n  var toUnicodeCmap = function(map) {\n    var code, codes, range, unicode, unicodeMap, _i, _len;\n    unicodeMap =\n      \"/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    codes = Object.keys(map).sort(function(a, b) {\n      return a - b;\n    });\n\n    range = [];\n    for (_i = 0, _len = codes.length; _i < _len; _i++) {\n      code = codes[_i];\n      if (range.length >= 100) {\n        unicodeMap +=\n          \"\\n\" +\n          range.length +\n          \" beginbfchar\\n\" +\n          range.join(\"\\n\") +\n          \"\\nendbfchar\";\n        range = [];\n      }\n\n      if (\n        map[code] !== undefined &&\n        map[code] !== null &&\n        typeof map[code].toString === \"function\"\n      ) {\n        unicode = (\"0000\" + map[code].toString(16)).slice(-4);\n        code = (\"0000\" + (+code).toString(16)).slice(-4);\n        range.push(\"<\" + code + \"><\" + unicode + \">\");\n      }\n    }\n\n    if (range.length) {\n      unicodeMap +=\n        \"\\n\" +\n        range.length +\n        \" beginbfchar\\n\" +\n        range.join(\"\\n\") +\n        \"\\nendbfchar\\n\";\n    }\n    unicodeMap +=\n      \"endcmap\\nCMapName currentdict /CMap defineresource pop\\nend\\nend\";\n    return unicodeMap;\n  };\n\n  var identityHFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"Identity-H\"\n    ) {\n      //Tag with Identity-H\n      var widths = font.metadata.Unicode.widths;\n      var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/Flags \" + font.metadata.flags);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\">>\");\n      out(\"endobj\");\n\n      var DescendantFont = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/FontDescriptor \" + fontDescriptor + \" 0 R\");\n      out(\"/W \" + jsPDF.API.PDFObject.convert(widths));\n      out(\"/CIDToGIDMap /Identity\");\n      out(\"/DW 1000\");\n      out(\"/Subtype /CIDFontType2\");\n      out(\"/CIDSystemInfo\");\n      out(\"<<\");\n      out(\"/Supplement 0\");\n      out(\"/Registry (Adobe)\");\n      out(\"/Ordering (\" + font.encoding + \")\");\n      out(\">>\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.objectNumber = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/Subtype /Type0\");\n      out(\"/ToUnicode \" + cmap + \" 0 R\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/Encoding /\" + font.encoding);\n      out(\"/DescendantFonts [\" + DescendantFont + \" 0 R]\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      identityHFunction(args);\n    }\n  ]);\n\n  var winAnsiEncodingFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"WinAnsiEncoding\"\n    ) {\n      //Tag with WinAnsi encoding\n      var data = font.metadata.rawData;\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/Flags 96\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\">>\");\n      out(\"endobj\");\n      font.objectNumber = newObject();\n      for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {\n        font.metadata.hmtx.widths[j] = parseInt(\n          font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)\n        ); //Change the width of Em units to Point units.\n      }\n      out(\n        \"<</Subtype/TrueType/Type/Font/ToUnicode \" +\n          cmap +\n          \" 0 R/BaseFont/\" +\n          toPDFName(font.fontName) +\n          \"/FontDescriptor \" +\n          fontDescriptor +\n          \" 0 R\" +\n          \"/Encoding/\" +\n          font.encoding +\n          \" /FirstChar 29 /LastChar 255 /Widths \" +\n          jsPDF.API.PDFObject.convert(font.metadata.hmtx.widths) +\n          \">>\"\n      );\n      out(\"endobj\");\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      winAnsiEncodingFunction(args);\n    }\n  ]);\n\n  var utf8TextFunction = function(args) {\n    var text = args.text || \"\";\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n\n    var pdfEscape = mutex.pdfEscape;\n    var activeFontKey = mutex.activeFontKey;\n    var fonts = mutex.fonts;\n    var key = activeFontKey;\n\n    var str = \"\",\n      s = 0,\n      cmapConfirm;\n    var strText = \"\";\n    var encoding = fonts[key].encoding;\n\n    if (fonts[key].encoding !== \"Identity-H\") {\n      return {\n        text: text,\n        x: x,\n        y: y,\n        options: options,\n        mutex: mutex\n      };\n    }\n    strText = text;\n\n    key = activeFontKey;\n    if (Array.isArray(text)) {\n      strText = text[0];\n    }\n    for (s = 0; s < strText.length; s += 1) {\n      if (fonts[key].metadata.hasOwnProperty(\"cmap\")) {\n        cmapConfirm =\n          fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];\n        /*\n             if (Object.prototype.toString.call(text) === '[object Array]') {\n                var i = 0;\n               // for (i = 0; i < text.length; i += 1) {\n                    if (Object.prototype.toString.call(text[s]) === '[object Array]') {\n                        cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n                    } else {\n\n                    }\n                //}\n\n            } else {\n                cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n            }*/\n      }\n      if (!cmapConfirm) {\n        if (\n          strText[s].charCodeAt(0) < 256 &&\n          fonts[key].metadata.hasOwnProperty(\"Unicode\")\n        ) {\n          str += strText[s];\n        } else {\n          str += \"\";\n        }\n      } else {\n        str += strText[s];\n      }\n    }\n    var result = \"\";\n    if (parseInt(key.slice(1)) < 14 || encoding === \"WinAnsiEncoding\") {\n      //For the default 13 font\n      result = pdfEscape(str, key)\n        .split(\"\")\n        .map(function(cv) {\n          return cv.charCodeAt(0).toString(16);\n        })\n        .join(\"\");\n    } else if (encoding === \"Identity-H\") {\n      result = pdfEscape16(str, fonts[key]);\n    }\n    mutex.isHex = true;\n\n    return {\n      text: result,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n  };\n\n  var utf8EscapeFunction = function(parms) {\n    var text = parms.text || \"\",\n      x = parms.x,\n      y = parms.y,\n      options = parms.options,\n      mutex = parms.mutex;\n    var tmpText = [];\n    var args = {\n      text: text,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          if (text[i].length === 3) {\n            tmpText.push([\n              utf8TextFunction(Object.assign({}, args, { text: text[i][0] }))\n                .text,\n              text[i][1],\n              text[i][2]\n            ]);\n          } else {\n            tmpText.push(\n              utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n            );\n          }\n        } else {\n          tmpText.push(\n            utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n          );\n        }\n      }\n      parms.text = tmpText;\n    } else {\n      parms.text = utf8TextFunction(\n        Object.assign({}, args, { text: text })\n      ).text;\n    }\n  };\n\n  jsPDFAPI.events.push([\"postProcessText\", utf8EscapeFunction]);\n})(jsPDF);\n","/**\n * @license\n * jsPDF virtual FileSystem functionality\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Use the vFS to handle files\n *\n * @name vFS\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var _initializeVFS = function() {\n    if (typeof this.internal.vFS === \"undefined\") {\n      this.internal.vFS = {};\n    }\n    return true;\n  };\n\n  /**\n   * Check if the file exists in the vFS\n   *\n   * @name existsFileInVFS\n   * @function\n   * @param {string} Possible filename in the vFS.\n   * @returns {boolean}\n   * @example\n   * doc.existsFileInVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.existsFileInVFS = function(filename) {\n    _initializeVFS.call(this);\n    return typeof this.internal.vFS[filename] !== \"undefined\";\n  };\n\n  /**\n   * Add a file to the vFS\n   *\n   * @name addFileToVFS\n   * @function\n   * @param {string} filename The name of the file which should be added.\n   * @param {string} filecontent The content of the file.\n   * @returns {jsPDF}\n   * @example\n   * doc.addFileToVFS(\"someFile.txt\", \"BADFACE1\");\n   */\n  jsPDFAPI.addFileToVFS = function(filename, filecontent) {\n    _initializeVFS.call(this);\n    this.internal.vFS[filename] = filecontent;\n    return this;\n  };\n\n  /**\n   * Get the file from the vFS\n   *\n   * @name getFileFromVFS\n   * @function\n   * @param {string} The name of the file which gets requested.\n   * @returns {string}\n   * @example\n   * doc.getFileFromVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.getFileFromVFS = function(filename) {\n    _initializeVFS.call(this);\n\n    if (typeof this.internal.vFS[filename] !== \"undefined\") {\n      return this.internal.vFS[filename];\n    }\n    return null;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)\n * MIT License\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDF) {\n  \"use strict\";\n  /**\n   * Table of Unicode types.\n   *\n   * Generated by:\n   *\n   * var bidi = require(\"./bidi/index\");\n   * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).\n   * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).\n   * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));\n   *\n   * for( var i = 0; i < bidi_accumulate.length; i++) {\n   * \tif(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')\n   * \t\tbidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined\n   * }\n   * var bidiAccumulateStr = 'return [ \"' + bidi_accumulate.toString().replace(/,/g, '\", \"') + '\" ];';\n   * require(\"fs\").writeFile('unicode-types.js', bidiAccumulateStr);\n   *\n   * Based on:\n   * https://github.com/mathiasbynens/unicode-8.0.0\n   */\n  var bidiUnicodeTypes = [\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"S\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"B\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"CS\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"EN\",\n    \"EN\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"ET\",\n    \"ET\",\n    \"AL\",\n    \"CS\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"ET\",\n    \"AN\",\n    \"AN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\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    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"L\",\n    \"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\",\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\",\n    \"B\",\n    \"LRE\",\n    \"RLE\",\n    \"PDF\",\n    \"LRO\",\n    \"RLO\",\n    \"CS\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"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\",\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    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"N\",\n    \"LRI\",\n    \"RLI\",\n    \"FSI\",\n    \"PDI\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"ES\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\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\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\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\",\n    \"CS\",\n    \"N\",\n    \"CS\",\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    \"ET\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"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    \"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   * Unicode Bidi algorithm compliant Bidi engine.\n   * For reference see http://unicode.org/reports/tr9/\n   */\n\n  /**\n   * constructor ( options )\n   *\n   * Initializes Bidi engine\n   *\n   * @param {Object} See 'setOptions' below for detailed description.\n   * options are cashed between invocation of 'doBidiReorder' method\n   *\n   * sample usage pattern of BidiEngine:\n   * var opt = {\n   * \tisInputVisual: true,\n   * \tisInputRtl: false,\n   * \tisOutputVisual: false,\n   * \tisOutputRtl: false,\n   * \tisSymmetricSwapping: true\n   * }\n   * var sourceToTarget = [], levels = [];\n   * var bidiEng = Globalize.bidiEngine(opt);\n   * var src = \"text string to be reordered\";\n   * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);\n   */\n\n  jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function(options) {\n    var _UNICODE_TYPES = _bidiUnicodeTypes;\n\n    var _STATE_TABLE_LTR = [\n      [0, 3, 0, 1, 0, 0, 0],\n      [0, 3, 0, 1, 2, 2, 0],\n      [0, 3, 0, 0x11, 2, 0, 1],\n      [0, 3, 5, 5, 4, 1, 0],\n      [0, 3, 0x15, 0x15, 4, 0, 1],\n      [0, 3, 5, 5, 4, 2, 0]\n    ];\n\n    var _STATE_TABLE_RTL = [\n      [2, 0, 1, 1, 0, 1, 0],\n      [2, 0, 1, 1, 0, 2, 0],\n      [2, 0, 2, 1, 3, 2, 0],\n      [2, 0, 2, 0x21, 3, 1, 1]\n    ];\n\n    var _TYPE_NAMES_MAP = { L: 0, R: 1, EN: 2, AN: 3, N: 4, B: 5, S: 6 };\n\n    var _UNICODE_RANGES_MAP = {\n      0: 0,\n      5: 1,\n      6: 2,\n      7: 3,\n      0x20: 4,\n      0xfb: 5,\n      0xfe: 6,\n      0xff: 7\n    };\n\n    var _SWAP_TABLE = [\n      \"\\u0028\",\n      \"\\u0029\",\n      \"\\u0028\",\n      \"\\u003C\",\n      \"\\u003E\",\n      \"\\u003C\",\n      \"\\u005B\",\n      \"\\u005D\",\n      \"\\u005B\",\n      \"\\u007B\",\n      \"\\u007D\",\n      \"\\u007B\",\n      \"\\u00AB\",\n      \"\\u00BB\",\n      \"\\u00AB\",\n      \"\\u2039\",\n      \"\\u203A\",\n      \"\\u2039\",\n      \"\\u2045\",\n      \"\\u2046\",\n      \"\\u2045\",\n      \"\\u207D\",\n      \"\\u207E\",\n      \"\\u207D\",\n      \"\\u208D\",\n      \"\\u208E\",\n      \"\\u208D\",\n      \"\\u2264\",\n      \"\\u2265\",\n      \"\\u2264\",\n      \"\\u2329\",\n      \"\\u232A\",\n      \"\\u2329\",\n      \"\\uFE59\",\n      \"\\uFE5A\",\n      \"\\uFE59\",\n      \"\\uFE5B\",\n      \"\\uFE5C\",\n      \"\\uFE5B\",\n      \"\\uFE5D\",\n      \"\\uFE5E\",\n      \"\\uFE5D\",\n      \"\\uFE64\",\n      \"\\uFE65\",\n      \"\\uFE64\"\n    ];\n\n    var _LTR_RANGES_REG_EXPR = new RegExp(\n      /^([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)$/\n    );\n\n    var _lastArabic = false,\n      _hasUbatAl,\n      _hasUbatB,\n      _hasUbatS,\n      DIR_LTR = 0,\n      DIR_RTL = 1,\n      _isInVisual,\n      _isInRtl,\n      _isOutVisual,\n      _isOutRtl,\n      _isSymmetricSwapping,\n      _dir = DIR_LTR;\n\n    this.__bidiEngine__ = {};\n\n    var _init = function(text, sourceToTargetMap) {\n      if (sourceToTargetMap) {\n        for (var i = 0; i < text.length; i++) {\n          sourceToTargetMap[i] = i;\n        }\n      }\n      if (_isInRtl === undefined) {\n        _isInRtl = _isContextualDirRtl(text);\n      }\n      if (_isOutRtl === undefined) {\n        _isOutRtl = _isContextualDirRtl(text);\n      }\n    };\n\n    // for reference see 3.2 in http://unicode.org/reports/tr9/\n    //\n    var _getCharType = function(ch) {\n      var charCode = ch.charCodeAt(),\n        range = charCode >> 8,\n        rangeIdx = _UNICODE_RANGES_MAP[range];\n\n      if (rangeIdx !== undefined) {\n        return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];\n      } else if (range === 0xfc || range === 0xfd) {\n        return \"AL\";\n      } else if (_LTR_RANGES_REG_EXPR.test(range)) {\n        //unlikely case\n        return \"L\";\n      } else if (range === 8) {\n        // even less likely\n        return \"R\";\n      }\n      return \"N\"; //undefined type, mark as neutral\n    };\n\n    var _isContextualDirRtl = function(text) {\n      for (var i = 0, charType; i < text.length; i++) {\n        charType = _getCharType(text.charAt(i));\n        if (charType === \"L\") {\n          return false;\n        } else if (charType === \"R\") {\n          return true;\n        }\n      }\n      return false;\n    };\n\n    // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/\n    //\n    var _resolveCharType = function(chars, types, resolvedTypes, index) {\n      var cType = types[index],\n        wType,\n        nType,\n        i,\n        len;\n      switch (cType) {\n        case \"L\":\n        case \"R\":\n          _lastArabic = false;\n          break;\n        case \"N\":\n        case \"AN\":\n          break;\n\n        case \"EN\":\n          if (_lastArabic) {\n            cType = \"AN\";\n          }\n          break;\n\n        case \"AL\":\n          _lastArabic = true;\n          _hasUbatAl = true;\n          cType = \"R\";\n          break;\n\n        case \"WS\":\n          cType = \"N\";\n          break;\n\n        case \"CS\":\n          if (\n            index < 1 ||\n            index + 1 >= types.length ||\n            ((wType = resolvedTypes[index - 1]) !== \"EN\" && wType !== \"AN\") ||\n            ((nType = types[index + 1]) !== \"EN\" && nType !== \"AN\")\n          ) {\n            cType = \"N\";\n          } else if (_lastArabic) {\n            nType = \"AN\";\n          }\n          cType = nType === wType ? nType : \"N\";\n          break;\n\n        case \"ES\":\n          wType = index > 0 ? resolvedTypes[index - 1] : \"B\";\n          cType =\n            wType === \"EN\" &&\n            index + 1 < types.length &&\n            types[index + 1] === \"EN\"\n              ? \"EN\"\n              : \"N\";\n          break;\n\n        case \"ET\":\n          if (index > 0 && resolvedTypes[index - 1] === \"EN\") {\n            cType = \"EN\";\n            break;\n          } else if (_lastArabic) {\n            cType = \"N\";\n            break;\n          }\n          i = index + 1;\n          len = types.length;\n          while (i < len && types[i] === \"ET\") {\n            i++;\n          }\n          if (i < len && types[i] === \"EN\") {\n            cType = \"EN\";\n          } else {\n            cType = \"N\";\n          }\n          break;\n\n        case \"NSM\":\n          if (_isInVisual && !_isInRtl) {\n            //V->L\n            len = types.length;\n            i = index + 1;\n            while (i < len && types[i] === \"NSM\") {\n              i++;\n            }\n            if (i < len) {\n              var c = chars[index];\n              var rtlCandidate = (c >= 0x0591 && c <= 0x08ff) || c === 0xfb1e;\n              wType = types[i];\n              if (rtlCandidate && (wType === \"R\" || wType === \"AL\")) {\n                cType = \"R\";\n                break;\n              }\n            }\n          }\n          if (index < 1 || (wType = types[index - 1]) === \"B\") {\n            cType = \"N\";\n          } else {\n            cType = resolvedTypes[index - 1];\n          }\n          break;\n\n        case \"B\":\n          _lastArabic = false;\n          _hasUbatB = true;\n          cType = _dir;\n          break;\n\n        case \"S\":\n          _hasUbatS = true;\n          cType = \"N\";\n          break;\n\n        case \"LRE\":\n        case \"RLE\":\n        case \"LRO\":\n        case \"RLO\":\n        case \"PDF\":\n          _lastArabic = false;\n          break;\n        case \"BN\":\n          cType = \"N\";\n          break;\n      }\n      return cType;\n    };\n\n    var _handleUbatS = function(types, levels, length) {\n      for (var i = 0; i < length; i++) {\n        if (types[i] === \"S\") {\n          levels[i] = _dir;\n          for (var j = i - 1; j >= 0; j--) {\n            if (types[j] === \"WS\") {\n              levels[j] = _dir;\n            } else {\n              break;\n            }\n          }\n        }\n      }\n    };\n\n    var _invertString = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\");\n      if (levels) {\n        _computeLevels(charArray, levels, { hiLevel: _dir });\n      }\n      charArray.reverse();\n      sourceToTargetMap && sourceToTargetMap.reverse();\n      return charArray.join(\"\");\n    };\n\n    // For reference see 3.3 in http://unicode.org/reports/tr9/\n    //\n    var _computeLevels = function(chars, levels, params) {\n      var action,\n        condition,\n        i,\n        index,\n        newLevel,\n        prevState,\n        condPos = -1,\n        len = chars.length,\n        newState = 0,\n        resolvedTypes = [],\n        stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,\n        types = [];\n\n      _lastArabic = false;\n      _hasUbatAl = false;\n      _hasUbatB = false;\n      _hasUbatS = false;\n      for (i = 0; i < len; i++) {\n        types[i] = _getCharType(chars[i]);\n      }\n      for (index = 0; index < len; index++) {\n        prevState = newState;\n        resolvedTypes[index] = _resolveCharType(\n          chars,\n          types,\n          resolvedTypes,\n          index\n        );\n        newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];\n        action = newState & 0xf0;\n        newState &= 0x0f;\n        levels[index] = newLevel = stateTable[newState][5];\n        if (action > 0) {\n          if (action === 0x10) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = 1;\n            }\n            condPos = -1;\n          } else {\n            condPos = -1;\n          }\n        }\n        condition = stateTable[newState][6];\n        if (condition) {\n          if (condPos === -1) {\n            condPos = index;\n          }\n        } else {\n          if (condPos > -1) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = newLevel;\n            }\n            condPos = -1;\n          }\n        }\n        if (types[index] === \"B\") {\n          levels[index] = 0;\n        }\n        params.hiLevel |= newLevel;\n      }\n      if (_hasUbatS) {\n        _handleUbatS(types, levels, len);\n      }\n    };\n\n    // for reference see 3.4 in http://unicode.org/reports/tr9/\n    //\n    var _invertByLevel = function(\n      level,\n      charArray,\n      sourceToTargetMap,\n      levels,\n      params\n    ) {\n      if (params.hiLevel < level) {\n        return;\n      }\n      if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {\n        charArray.reverse();\n        sourceToTargetMap && sourceToTargetMap.reverse();\n        return;\n      }\n      var ch,\n        high,\n        end,\n        low,\n        len = charArray.length,\n        start = 0;\n\n      while (start < len) {\n        if (levels[start] >= level) {\n          end = start + 1;\n          while (end < len && levels[end] >= level) {\n            end++;\n          }\n          for (low = start, high = end - 1; low < high; low++, high--) {\n            ch = charArray[low];\n            charArray[low] = charArray[high];\n            charArray[high] = ch;\n            if (sourceToTargetMap) {\n              ch = sourceToTargetMap[low];\n              sourceToTargetMap[low] = sourceToTargetMap[high];\n              sourceToTargetMap[high] = ch;\n            }\n          }\n          start = end;\n        }\n        start++;\n      }\n    };\n\n    // for reference see 7 & BD16 in http://unicode.org/reports/tr9/\n    //\n    var _symmetricSwap = function(charArray, levels, params) {\n      if (params.hiLevel !== 0 && _isSymmetricSwapping) {\n        for (var i = 0, index; i < charArray.length; i++) {\n          if (levels[i] === 1) {\n            index = _SWAP_TABLE.indexOf(charArray[i]);\n            if (index >= 0) {\n              charArray[i] = _SWAP_TABLE[index + 1];\n            }\n          }\n        }\n      }\n    };\n\n    var _reorder = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\"),\n        params = { hiLevel: _dir };\n\n      if (!levels) {\n        levels = [];\n      }\n      _computeLevels(charArray, levels, params);\n      _symmetricSwap(charArray, levels, params);\n      _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);\n      _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);\n      return charArray.join(\"\");\n    };\n\n    // doBidiReorder( text, sourceToTargetMap, levels )\n    // Performs Bidi reordering by implementing Unicode Bidi algorithm.\n    // Returns reordered string\n    // @text [String]:\n    // - input string to be reordered, this is input parameter\n    // $sourceToTargetMap [Array] (optional)\n    // - resultant mapping between input and output strings, this is output parameter\n    // $levels [Array] (optional)\n    // - array of calculated Bidi levels, , this is output parameter\n    this.__bidiEngine__.doBidiReorder = function(\n      text,\n      sourceToTargetMap,\n      levels\n    ) {\n      _init(text, sourceToTargetMap);\n      if (!_isInVisual && _isOutVisual && !_isOutRtl) {\n        // LLTR->VLTR, LRTL->VLTR\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VRTL->VLTR, VLTR->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _invertString(text, sourceToTargetMap, levels);\n      } else if (!_isInVisual && _isOutVisual && _isOutRtl) {\n        // LLTR->VRTL, LRTL->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {\n        // VLTR->LLTR\n        _dir = DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VLTR->LRTL, VRTL->LLTR\n        text = _invertString(text, sourceToTargetMap);\n        if (_isInRtl) {\n          //LLTR -> VLTR\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n        } else {\n          //LRTL -> VRTL\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n        }\n      } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {\n        //  VRTL->LRTL\n        _dir = DIR_RTL;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // LRTL->LLTR, LLTR->LRTL\n        var isSymmetricSwappingOrig = _isSymmetricSwapping;\n        if (_isInRtl) {\n          //LRTL->LLTR\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _dir = DIR_LTR;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n        } else {\n          //LLTR->LRTL\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n          _dir = DIR_RTL;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n          text = _invertString(text, sourceToTargetMap);\n        }\n      }\n      return text;\n    };\n\n    /**\n     * @name setOptions( options )\n     * @function\n     * Sets options for Bidi conversion\n     * @param {Object}:\n     * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)\n     * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)\n     * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),\n     */\n    this.__bidiEngine__.setOptions = function(options) {\n      if (options) {\n        _isInVisual = options.isInputVisual;\n        _isOutVisual = options.isOutputVisual;\n        _isInRtl = options.isInputRtl;\n        _isOutRtl = options.isOutputRtl;\n        _isSymmetricSwapping = options.isSymmetricSwapping;\n      }\n    };\n\n    this.__bidiEngine__.setOptions(options);\n    return this.__bidiEngine__;\n  };\n\n  var _bidiUnicodeTypes = bidiUnicodeTypes;\n\n  var bidiEngine = new jsPDF.__bidiEngine__({ isInputVisual: true });\n\n  var bidiEngineFunction = function(args) {\n    var text = args.text;\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n    var lang = options.lang;\n    var tmpText = [];\n\n    options.isInputVisual =\n      typeof options.isInputVisual === \"boolean\" ? options.isInputVisual : true;\n    bidiEngine.setOptions(options);\n\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Object.prototype.toString.call(text[i]) === \"[object Array]\") {\n          tmpText.push([\n            bidiEngine.doBidiReorder(text[i][0]),\n            text[i][1],\n            text[i][2]\n          ]);\n        } else {\n          tmpText.push([bidiEngine.doBidiReorder(text[i])]);\n        }\n      }\n      args.text = tmpText;\n    } else {\n      args.text = bidiEngine.doBidiReorder(text);\n    }\n    bidiEngine.setOptions({ isInputVisual: true });\n  };\n\n  jsPDF.API.events.push([\"postProcessText\", bidiEngineFunction]);\n})(jsPDF);\n","/* eslint-disable no-control-regex */\n/************************************************\n * Title : custom font                          *\n * Start Data : 2017. 01. 22.                   *\n * Comment : TEXT API                           *\n ************************************************/\n\n/******************************\n * jsPDF extension API Design *\n * ****************************/\n\nimport { jsPDF } from \"../jspdf.js\";\n\njsPDF.API.TTFFont = (function() {\n  /************************************************************************/\n  /* function : open                                                       */\n  /* comment : Decode the encoded ttf content and create a TTFFont object. */\n  /************************************************************************/\n  TTFFont.open = function(file) {\n    return new TTFFont(file);\n  };\n  /***************************************************************/\n  /* function : TTFFont gernerator                               */\n  /* comment : Decode TTF contents are parsed, Data,             */\n  /* Subset object is created, and registerTTF function is called.*/\n  /***************************************************************/\n  function TTFFont(rawData) {\n    var data;\n    this.rawData = rawData;\n    data = this.contents = new Data(rawData);\n    this.contents.pos = 4;\n    if (data.readString(4) === \"ttcf\") {\n      throw new Error(\"TTCF not supported.\");\n    } else {\n      data.pos = 0;\n      this.parse();\n      this.subset = new Subset(this);\n      this.registerTTF();\n    }\n  }\n  /********************************************************/\n  /* function : parse                                     */\n  /* comment : TTF Parses the file contents by each table.*/\n  /********************************************************/\n  TTFFont.prototype.parse = function() {\n    this.directory = new Directory(this.contents);\n    this.head = new HeadTable(this);\n    this.name = new NameTable(this);\n    this.cmap = new CmapTable(this);\n    this.toUnicode = {};\n    this.hhea = new HheaTable(this);\n    this.maxp = new MaxpTable(this);\n    this.hmtx = new HmtxTable(this);\n    this.post = new PostTable(this);\n    this.os2 = new OS2Table(this);\n    this.loca = new LocaTable(this);\n    this.glyf = new GlyfTable(this);\n    this.ascender =\n      (this.os2.exists && this.os2.ascender) || this.hhea.ascender;\n    this.decender =\n      (this.os2.exists && this.os2.decender) || this.hhea.decender;\n    this.lineGap = (this.os2.exists && this.os2.lineGap) || this.hhea.lineGap;\n    return (this.bbox = [\n      this.head.xMin,\n      this.head.yMin,\n      this.head.xMax,\n      this.head.yMax\n    ]);\n  };\n  /***************************************************************/\n  /* function : registerTTF                                      */\n  /* comment : Get the value to assign pdf font descriptors.     */\n  /***************************************************************/\n  TTFFont.prototype.registerTTF = function() {\n    var e, hi, low, raw, _ref;\n    this.scaleFactor = 1000.0 / this.head.unitsPerEm;\n    this.bbox = function() {\n      var _i, _len, _ref, _results;\n      _ref = this.bbox;\n      _results = [];\n      for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n        e = _ref[_i];\n        _results.push(Math.round(e * this.scaleFactor));\n      }\n      return _results;\n    }.call(this);\n    this.stemV = 0;\n    if (this.post.exists) {\n      raw = this.post.italic_angle;\n      hi = raw >> 16;\n      low = raw & 0xff;\n      if ((hi & 0x8000) !== 0) {\n        hi = -((hi ^ 0xffff) + 1);\n      }\n      this.italicAngle = +(\"\" + hi + \".\" + low);\n    } else {\n      this.italicAngle = 0;\n    }\n    this.ascender = Math.round(this.ascender * this.scaleFactor);\n    this.decender = Math.round(this.decender * this.scaleFactor);\n    this.lineGap = Math.round(this.lineGap * this.scaleFactor);\n    this.capHeight = (this.os2.exists && this.os2.capHeight) || this.ascender;\n    this.xHeight = (this.os2.exists && this.os2.xHeight) || 0;\n    this.familyClass = ((this.os2.exists && this.os2.familyClass) || 0) >> 8;\n    this.isSerif =\n      (_ref = this.familyClass) === 1 ||\n      _ref === 2 ||\n      _ref === 3 ||\n      _ref === 4 ||\n      _ref === 5 ||\n      _ref === 7;\n    this.isScript = this.familyClass === 10;\n    this.flags = 0;\n    if (this.post.isFixedPitch) {\n      this.flags |= 1 << 0;\n    }\n    if (this.isSerif) {\n      this.flags |= 1 << 1;\n    }\n    if (this.isScript) {\n      this.flags |= 1 << 3;\n    }\n    if (this.italicAngle !== 0) {\n      this.flags |= 1 << 6;\n    }\n    this.flags |= 1 << 5;\n    if (!this.cmap.unicode) {\n      throw new Error(\"No unicode cmap for font\");\n    }\n  };\n  TTFFont.prototype.characterToGlyph = function(character) {\n    var _ref;\n    return (\n      ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) ||\n      0\n    );\n  };\n  TTFFont.prototype.widthOfGlyph = function(glyph) {\n    var scale;\n    scale = 1000.0 / this.head.unitsPerEm;\n    return this.hmtx.forGlyph(glyph).advance * scale;\n  };\n  TTFFont.prototype.widthOfString = function(string, size, charSpace) {\n    var charCode, i, scale, width, _ref;\n    string = \"\" + string;\n    width = 0;\n    for (\n      i = 0, _ref = string.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      charCode = string.charCodeAt(i);\n      width +=\n        this.widthOfGlyph(this.characterToGlyph(charCode)) +\n          charSpace * (1000 / size) || 0;\n    }\n    scale = size / 1000;\n    return width * scale;\n  };\n  TTFFont.prototype.lineHeight = function(size, includeGap) {\n    var gap;\n    if (includeGap == null) {\n      includeGap = false;\n    }\n    gap = includeGap ? this.lineGap : 0;\n    return ((this.ascender + gap - this.decender) / 1000) * size;\n  };\n  return TTFFont;\n})();\n\n/************************************************************************************************/\n/* function : Data                                                                              */\n/* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/\n/************************************************************************************************/\nvar Data = (function() {\n  function Data(data) {\n    this.data = data != null ? data : [];\n    this.pos = 0;\n    this.length = this.data.length;\n  }\n  Data.prototype.readByte = function() {\n    return this.data[this.pos++];\n  };\n  Data.prototype.writeByte = function(byte) {\n    return (this.data[this.pos++] = byte);\n  };\n  Data.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.readByte() * 0x1000000;\n    b2 = this.readByte() << 16;\n    b3 = this.readByte() << 8;\n    b4 = this.readByte();\n    return b1 + b2 + b3 + b4;\n  };\n  Data.prototype.writeUInt32 = function(val) {\n    this.writeByte((val >>> 24) & 0xff);\n    this.writeByte((val >> 16) & 0xff);\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt32 = function() {\n    var int;\n    int = this.readUInt32();\n    if (int >= 0x80000000) {\n      return int - 0x100000000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt32 = function(val) {\n    if (val < 0) {\n      val += 0x100000000;\n    }\n    return this.writeUInt32(val);\n  };\n  Data.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.readByte() << 8;\n    b2 = this.readByte();\n    return b1 | b2;\n  };\n  Data.prototype.writeUInt16 = function(val) {\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt16 = function() {\n    var int;\n    int = this.readUInt16();\n    if (int >= 0x8000) {\n      return int - 0x10000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt16 = function(val) {\n    if (val < 0) {\n      val += 0x10000;\n    }\n    return this.writeUInt16(val);\n  };\n  Data.prototype.readString = function(length) {\n    var i, ret;\n    ret = [];\n    for (\n      i = 0;\n      0 <= length ? i < length : i > length;\n      i = 0 <= length ? ++i : --i\n    ) {\n      ret[i] = String.fromCharCode(this.readByte());\n    }\n    return ret.join(\"\");\n  };\n  Data.prototype.writeString = function(val) {\n    var i, _ref, _results;\n    _results = [];\n    for (\n      i = 0, _ref = val.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      _results.push(this.writeByte(val.charCodeAt(i)));\n    }\n    return _results;\n  };\n  /*Data.prototype.stringAt = function (pos, length) {\n            this.pos = pos;\n            return this.readString(length);\n        };*/\n  Data.prototype.readShort = function() {\n    return this.readInt16();\n  };\n  Data.prototype.writeShort = function(val) {\n    return this.writeInt16(val);\n  };\n  Data.prototype.readLongLong = function() {\n    var b1, b2, b3, b4, b5, b6, b7, b8;\n    b1 = this.readByte();\n    b2 = this.readByte();\n    b3 = this.readByte();\n    b4 = this.readByte();\n    b5 = this.readByte();\n    b6 = this.readByte();\n    b7 = this.readByte();\n    b8 = this.readByte();\n    if (b1 & 0x80) {\n      return (\n        ((b1 ^ 0xff) * 0x100000000000000 +\n          (b2 ^ 0xff) * 0x1000000000000 +\n          (b3 ^ 0xff) * 0x10000000000 +\n          (b4 ^ 0xff) * 0x100000000 +\n          (b5 ^ 0xff) * 0x1000000 +\n          (b6 ^ 0xff) * 0x10000 +\n          (b7 ^ 0xff) * 0x100 +\n          (b8 ^ 0xff) +\n          1) *\n        -1\n      );\n    }\n    return (\n      b1 * 0x100000000000000 +\n      b2 * 0x1000000000000 +\n      b3 * 0x10000000000 +\n      b4 * 0x100000000 +\n      b5 * 0x1000000 +\n      b6 * 0x10000 +\n      b7 * 0x100 +\n      b8\n    );\n  };\n  Data.prototype.writeLongLong = function(val) {\n    var high, low;\n    high = Math.floor(val / 0x100000000);\n    low = val & 0xffffffff;\n    this.writeByte((high >> 24) & 0xff);\n    this.writeByte((high >> 16) & 0xff);\n    this.writeByte((high >> 8) & 0xff);\n    this.writeByte(high & 0xff);\n    this.writeByte((low >> 24) & 0xff);\n    this.writeByte((low >> 16) & 0xff);\n    this.writeByte((low >> 8) & 0xff);\n    return this.writeByte(low & 0xff);\n  };\n  Data.prototype.readInt = function() {\n    return this.readInt32();\n  };\n  Data.prototype.writeInt = function(val) {\n    return this.writeInt32(val);\n  };\n  /*Data.prototype.slice = function (start, end) {\n            return this.data.slice(start, end);\n        };*/\n  Data.prototype.read = function(bytes) {\n    var buf, i;\n    buf = [];\n    for (\n      i = 0;\n      0 <= bytes ? i < bytes : i > bytes;\n      i = 0 <= bytes ? ++i : --i\n    ) {\n      buf.push(this.readByte());\n    }\n    return buf;\n  };\n  Data.prototype.write = function(bytes) {\n    var byte, i, _len, _results;\n    _results = [];\n    for (i = 0, _len = bytes.length; i < _len; i++) {\n      byte = bytes[i];\n      _results.push(this.writeByte(byte));\n    }\n    return _results;\n  };\n  return Data;\n})();\n\nvar Directory = (function() {\n  var checksum;\n\n  /*****************************************************************************************************/\n  /* function : Directory generator                                                                    */\n  /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/\n  /*****************************************************************************************************/\n  function Directory(data) {\n    var entry, i, _ref;\n    this.scalarType = data.readInt();\n    this.tableCount = data.readShort();\n    this.searchRange = data.readShort();\n    this.entrySelector = data.readShort();\n    this.rangeShift = data.readShort();\n    this.tables = {};\n    for (\n      i = 0, _ref = this.tableCount;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      entry = {\n        tag: data.readString(4),\n        checksum: data.readInt(),\n        offset: data.readInt(),\n        length: data.readInt()\n      };\n      this.tables[entry.tag] = entry;\n    }\n  }\n  /********************************************************************************************************/\n  /* function : encode                                                                                    */\n  /* comment : It encodes and stores the font table object and information used for the directory object. */\n  /********************************************************************************************************/\n  Directory.prototype.encode = function(tables) {\n    var adjustment,\n      directory,\n      directoryLength,\n      entrySelector,\n      headOffset,\n      log2,\n      offset,\n      rangeShift,\n      searchRange,\n      sum,\n      table,\n      tableCount,\n      tableData,\n      tag;\n    tableCount = Object.keys(tables).length;\n    log2 = Math.log(2);\n    searchRange = Math.floor(Math.log(tableCount) / log2) * 16;\n    entrySelector = Math.floor(searchRange / log2);\n    rangeShift = tableCount * 16 - searchRange;\n    directory = new Data();\n    directory.writeInt(this.scalarType);\n    directory.writeShort(tableCount);\n    directory.writeShort(searchRange);\n    directory.writeShort(entrySelector);\n    directory.writeShort(rangeShift);\n    directoryLength = tableCount * 16;\n    offset = directory.pos + directoryLength;\n    headOffset = null;\n    tableData = [];\n    for (tag in tables) {\n      table = tables[tag];\n      directory.writeString(tag);\n      directory.writeInt(checksum(table));\n      directory.writeInt(offset);\n      directory.writeInt(table.length);\n      tableData = tableData.concat(table);\n      if (tag === \"head\") {\n        headOffset = offset;\n      }\n      offset += table.length;\n      while (offset % 4) {\n        tableData.push(0);\n        offset++;\n      }\n    }\n    directory.write(tableData);\n    sum = checksum(directory.data);\n    adjustment = 0xb1b0afba - sum;\n    directory.pos = headOffset + 8;\n    directory.writeUInt32(adjustment);\n    return directory.data;\n  };\n  /***************************************************************/\n  /* function : checksum                                         */\n  /* comment : Duplicate the table for the tag.                  */\n  /***************************************************************/\n  checksum = function(data) {\n    var i, sum, tmp, _ref;\n    data = __slice.call(data);\n    while (data.length % 4) {\n      data.push(0);\n    }\n    tmp = new Data(data);\n    sum = 0;\n    for (i = 0, _ref = data.length; i < _ref; i = i += 4) {\n      sum += tmp.readUInt32();\n    }\n    return sum & 0xffffffff;\n  };\n  return Directory;\n})();\n\nvar Table,\n  __hasProp = {}.hasOwnProperty,\n  __extends = function(child, parent) {\n    for (var key in parent) {\n      if (__hasProp.call(parent, key)) child[key] = parent[key];\n    }\n\n    function ctor() {\n      this.constructor = child;\n    }\n    ctor.prototype = parent.prototype;\n    child.prototype = new ctor();\n    child.__super__ = parent.prototype;\n    return child;\n  };\n\n/***************************************************************/\n/* function : Table                                            */\n/* comment : Save info for each table, and parse the table.    */\n/***************************************************************/\nTable = (function() {\n  function Table(file) {\n    var info;\n    this.file = file;\n    info = this.file.directory.tables[this.tag];\n    this.exists = !!info;\n    if (info) {\n      (this.offset = info.offset), (this.length = info.length);\n      this.parse(this.file.contents);\n    }\n  }\n  Table.prototype.parse = function() {};\n  Table.prototype.encode = function() {};\n  Table.prototype.raw = function() {\n    if (!this.exists) {\n      return null;\n    }\n    this.file.contents.pos = this.offset;\n    return this.file.contents.read(this.length);\n  };\n  return Table;\n})();\n\nvar HeadTable = (function(_super) {\n  __extends(HeadTable, _super);\n\n  function HeadTable() {\n    return HeadTable.__super__.constructor.apply(this, arguments);\n  }\n  HeadTable.prototype.tag = \"head\";\n  HeadTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.revision = data.readInt();\n    this.checkSumAdjustment = data.readInt();\n    this.magicNumber = data.readInt();\n    this.flags = data.readShort();\n    this.unitsPerEm = data.readShort();\n    this.created = data.readLongLong();\n    this.modified = data.readLongLong();\n    this.xMin = data.readShort();\n    this.yMin = data.readShort();\n    this.xMax = data.readShort();\n    this.yMax = data.readShort();\n    this.macStyle = data.readShort();\n    this.lowestRecPPEM = data.readShort();\n    this.fontDirectionHint = data.readShort();\n    this.indexToLocFormat = data.readShort();\n    return (this.glyphDataFormat = data.readShort());\n  };\n  HeadTable.prototype.encode = function(indexToLocFormat) {\n    var table;\n    table = new Data();\n    table.writeInt(this.version);\n    table.writeInt(this.revision);\n    table.writeInt(this.checkSumAdjustment);\n    table.writeInt(this.magicNumber);\n    table.writeShort(this.flags);\n    table.writeShort(this.unitsPerEm);\n    table.writeLongLong(this.created);\n    table.writeLongLong(this.modified);\n    table.writeShort(this.xMin);\n    table.writeShort(this.yMin);\n    table.writeShort(this.xMax);\n    table.writeShort(this.yMax);\n    table.writeShort(this.macStyle);\n    table.writeShort(this.lowestRecPPEM);\n    table.writeShort(this.fontDirectionHint);\n    table.writeShort(indexToLocFormat);\n    table.writeShort(this.glyphDataFormat);\n    return table.data;\n  };\n  return HeadTable;\n})(Table);\n\n/************************************************************************************/\n/* function : CmapEntry                                                             */\n/* comment : Cmap Initializes and encodes object information (required by pdf spec).*/\n/************************************************************************************/\nvar CmapEntry = (function() {\n  function CmapEntry(data, offset) {\n    var code,\n      count,\n      endCode,\n      glyphId,\n      glyphIds,\n      i,\n      idDelta,\n      idRangeOffset,\n      index,\n      saveOffset,\n      segCount,\n      segCountX2,\n      start,\n      startCode,\n      tail,\n      _j,\n      _k,\n      _len;\n    this.platformID = data.readUInt16();\n    this.encodingID = data.readShort();\n    this.offset = offset + data.readInt();\n    saveOffset = data.pos;\n    data.pos = this.offset;\n    this.format = data.readUInt16();\n    this.length = data.readUInt16();\n    this.language = data.readUInt16();\n    this.isUnicode =\n      (this.platformID === 3 && this.encodingID === 1 && this.format === 4) ||\n      (this.platformID === 0 && this.format === 4);\n    this.codeMap = {};\n    switch (this.format) {\n      case 0:\n        for (i = 0; i < 256; ++i) {\n          this.codeMap[i] = data.readByte();\n        }\n        break;\n      case 4:\n        segCountX2 = data.readUInt16();\n        segCount = segCountX2 / 2;\n        data.pos += 6;\n        endCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        data.pos += 2;\n        startCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idDelta = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idRangeOffset = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        count = (this.length - data.pos + this.offset) / 2;\n        glyphIds = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= count ? _j < count : _j > count;\n            i = 0 <= count ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {\n          tail = endCode[i];\n          start = startCode[i];\n          for (\n            code = _k = start;\n            start <= tail ? _k <= tail : _k >= tail;\n            code = start <= tail ? ++_k : --_k\n          ) {\n            if (idRangeOffset[i] === 0) {\n              glyphId = code + idDelta[i];\n            } else {\n              index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);\n              glyphId = glyphIds[index] || 0;\n              if (glyphId !== 0) {\n                glyphId += idDelta[i];\n              }\n            }\n            this.codeMap[code] = glyphId & 0xffff;\n          }\n        }\n    }\n    data.pos = saveOffset;\n  }\n  CmapEntry.encode = function(charmap, encoding) {\n    var charMap,\n      code,\n      codeMap,\n      codes,\n      delta,\n      deltas,\n      diff,\n      endCode,\n      endCodes,\n      entrySelector,\n      glyphIDs,\n      i,\n      id,\n      indexes,\n      last,\n      map,\n      nextID,\n      offset,\n      old,\n      rangeOffsets,\n      rangeShift,\n      searchRange,\n      segCount,\n      segCountX2,\n      startCode,\n      startCodes,\n      startGlyph,\n      subtable,\n      _i,\n      _j,\n      _k,\n      _l,\n      _len,\n      _len1,\n      _len2,\n      _len3,\n      _len4,\n      _len5,\n      _len6,\n      _len7,\n      _m,\n      _n,\n      _name,\n      _o,\n      _p,\n      _q;\n    subtable = new Data();\n    codes = Object.keys(charmap).sort(function(a, b) {\n      return a - b;\n    });\n    switch (encoding) {\n      case \"macroman\":\n        id = 0;\n        indexes = (function() {\n          var _results = [];\n          for (i = 0; i < 256; ++i) {\n            _results.push(0);\n          }\n          return _results;\n        })();\n        map = {\n          0: 0\n        };\n        codeMap = {};\n        for (_i = 0, _len = codes.length; _i < _len; _i++) {\n          code = codes[_i];\n          if (map[(_name = charmap[code])] == null) {\n            map[_name] = ++id;\n          }\n          codeMap[code] = {\n            old: charmap[code],\n            new: map[charmap[code]]\n          };\n          indexes[code] = map[charmap[code]];\n        }\n        subtable.writeUInt16(1);\n        subtable.writeUInt16(0);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(262);\n        subtable.writeUInt16(0);\n        subtable.write(indexes);\n        return {\n          charMap: codeMap,\n          subtable: subtable.data,\n          maxGlyphID: id + 1\n        };\n      case \"unicode\":\n        startCodes = [];\n        endCodes = [];\n        nextID = 0;\n        map = {};\n        charMap = {};\n        last = diff = null;\n        for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {\n          code = codes[_j];\n          old = charmap[code];\n          if (map[old] == null) {\n            map[old] = ++nextID;\n          }\n          charMap[code] = {\n            old: old,\n            new: map[old]\n          };\n          delta = map[old] - code;\n          if (last == null || delta !== diff) {\n            if (last) {\n              endCodes.push(last);\n            }\n            startCodes.push(code);\n            diff = delta;\n          }\n          last = code;\n        }\n        if (last) {\n          endCodes.push(last);\n        }\n        endCodes.push(0xffff);\n        startCodes.push(0xffff);\n        segCount = startCodes.length;\n        segCountX2 = segCount * 2;\n        searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);\n        entrySelector = Math.log(searchRange / 2) / Math.LN2;\n        rangeShift = 2 * segCount - searchRange;\n        deltas = [];\n        rangeOffsets = [];\n        glyphIDs = [];\n        for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {\n          startCode = startCodes[i];\n          endCode = endCodes[i];\n          if (startCode === 0xffff) {\n            deltas.push(0);\n            rangeOffsets.push(0);\n            break;\n          }\n          startGlyph = charMap[startCode][\"new\"];\n          if (startCode - startGlyph >= 0x8000) {\n            deltas.push(0);\n            rangeOffsets.push(2 * (glyphIDs.length + segCount - i));\n            for (\n              code = _l = startCode;\n              startCode <= endCode ? _l <= endCode : _l >= endCode;\n              code = startCode <= endCode ? ++_l : --_l\n            ) {\n              glyphIDs.push(charMap[code][\"new\"]);\n            }\n          } else {\n            deltas.push(startGlyph - startCode);\n            rangeOffsets.push(0);\n          }\n        }\n        subtable.writeUInt16(3);\n        subtable.writeUInt16(1);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(4);\n        subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(segCountX2);\n        subtable.writeUInt16(searchRange);\n        subtable.writeUInt16(entrySelector);\n        subtable.writeUInt16(rangeShift);\n        for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {\n          code = endCodes[_m];\n          subtable.writeUInt16(code);\n        }\n        subtable.writeUInt16(0);\n        for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {\n          code = startCodes[_n];\n          subtable.writeUInt16(code);\n        }\n        for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {\n          delta = deltas[_o];\n          subtable.writeUInt16(delta);\n        }\n        for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {\n          offset = rangeOffsets[_p];\n          subtable.writeUInt16(offset);\n        }\n        for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {\n          id = glyphIDs[_q];\n          subtable.writeUInt16(id);\n        }\n        return {\n          charMap: charMap,\n          subtable: subtable.data,\n          maxGlyphID: nextID + 1\n        };\n    }\n  };\n  return CmapEntry;\n})();\n\nvar CmapTable = (function(_super) {\n  __extends(CmapTable, _super);\n\n  function CmapTable() {\n    return CmapTable.__super__.constructor.apply(this, arguments);\n  }\n  CmapTable.prototype.tag = \"cmap\";\n  CmapTable.prototype.parse = function(data) {\n    var entry, i, tableCount;\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    tableCount = data.readUInt16();\n    this.tables = [];\n    this.unicode = null;\n    for (\n      i = 0;\n      0 <= tableCount ? i < tableCount : i > tableCount;\n      i = 0 <= tableCount ? ++i : --i\n    ) {\n      entry = new CmapEntry(data, this.offset);\n      this.tables.push(entry);\n      if (entry.isUnicode) {\n        if (this.unicode == null) {\n          this.unicode = entry;\n        }\n      }\n    }\n    return true;\n  };\n  /*************************************************************************/\n  /* function : encode                                                     */\n  /* comment : Encode the cmap table corresponding to the input character. */\n  /*************************************************************************/\n  CmapTable.encode = function(charmap, encoding) {\n    var result, table;\n    if (encoding == null) {\n      encoding = \"macroman\";\n    }\n    result = CmapEntry.encode(charmap, encoding);\n    table = new Data();\n    table.writeUInt16(0);\n    table.writeUInt16(1);\n    result.table = table.data.concat(result.subtable);\n    return result;\n  };\n  return CmapTable;\n})(Table);\n\nvar HheaTable = (function(_super) {\n  __extends(HheaTable, _super);\n\n  function HheaTable() {\n    return HheaTable.__super__.constructor.apply(this, arguments);\n  }\n  HheaTable.prototype.tag = \"hhea\";\n  HheaTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.ascender = data.readShort();\n    this.decender = data.readShort();\n    this.lineGap = data.readShort();\n    this.advanceWidthMax = data.readShort();\n    this.minLeftSideBearing = data.readShort();\n    this.minRightSideBearing = data.readShort();\n    this.xMaxExtent = data.readShort();\n    this.caretSlopeRise = data.readShort();\n    this.caretSlopeRun = data.readShort();\n    this.caretOffset = data.readShort();\n    data.pos += 4 * 2;\n    this.metricDataFormat = data.readShort();\n    return (this.numberOfMetrics = data.readUInt16());\n  };\n  /*HheaTable.prototype.encode = function (ids) {\n            var i, table, _i, _ref;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeShort(this.ascender);\n            table.writeShort(this.decender);\n            table.writeShort(this.lineGap);\n            table.writeShort(this.advanceWidthMax);\n            table.writeShort(this.minLeftSideBearing);\n            table.writeShort(this.minRightSideBearing);\n            table.writeShort(this.xMaxExtent);\n            table.writeShort(this.caretSlopeRise);\n            table.writeShort(this.caretSlopeRun);\n            table.writeShort(this.caretOffset);\n            for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                table.writeByte(0);\n            }\n            table.writeShort(this.metricDataFormat);\n            table.writeUInt16(ids.length);\n            return table.data;\n        };*/\n  return HheaTable;\n})(Table);\n\nvar OS2Table = (function(_super) {\n  __extends(OS2Table, _super);\n\n  function OS2Table() {\n    return OS2Table.__super__.constructor.apply(this, arguments);\n  }\n  OS2Table.prototype.tag = \"OS/2\";\n  OS2Table.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    this.averageCharWidth = data.readShort();\n    this.weightClass = data.readUInt16();\n    this.widthClass = data.readUInt16();\n    this.type = data.readShort();\n    this.ySubscriptXSize = data.readShort();\n    this.ySubscriptYSize = data.readShort();\n    this.ySubscriptXOffset = data.readShort();\n    this.ySubscriptYOffset = data.readShort();\n    this.ySuperscriptXSize = data.readShort();\n    this.ySuperscriptYSize = data.readShort();\n    this.ySuperscriptXOffset = data.readShort();\n    this.ySuperscriptYOffset = data.readShort();\n    this.yStrikeoutSize = data.readShort();\n    this.yStrikeoutPosition = data.readShort();\n    this.familyClass = data.readShort();\n    this.panose = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 10; ++i) {\n        _results.push(data.readByte());\n      }\n      return _results;\n    })();\n    this.charRange = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 4; ++i) {\n        _results.push(data.readInt());\n      }\n      return _results;\n    })();\n    this.vendorID = data.readString(4);\n    this.selection = data.readShort();\n    this.firstCharIndex = data.readShort();\n    this.lastCharIndex = data.readShort();\n    if (this.version > 0) {\n      this.ascent = data.readShort();\n      this.descent = data.readShort();\n      this.lineGap = data.readShort();\n      this.winAscent = data.readShort();\n      this.winDescent = data.readShort();\n      this.codePageRange = (function() {\n        var i, _results;\n        _results = [];\n        for (i = 0; i < 2; i = ++i) {\n          _results.push(data.readInt());\n        }\n        return _results;\n      })();\n      if (this.version > 1) {\n        this.xHeight = data.readShort();\n        this.capHeight = data.readShort();\n        this.defaultChar = data.readShort();\n        this.breakChar = data.readShort();\n        return (this.maxContext = data.readShort());\n      }\n    }\n  };\n  /*OS2Table.prototype.encode = function () {\n            return this.raw();\n        };*/\n  return OS2Table;\n})(Table);\n\nvar PostTable = (function(_super) {\n  var POSTSCRIPT_GLYPHS;\n  __extends(PostTable, _super);\n\n  function PostTable() {\n    return PostTable.__super__.constructor.apply(this, arguments);\n  }\n  PostTable.prototype.tag = \"post\";\n  PostTable.prototype.parse = function(data) {\n    var length, numberOfGlyphs, _results;\n    data.pos = this.offset;\n    this.format = data.readInt();\n    this.italicAngle = data.readInt();\n    this.underlinePosition = data.readShort();\n    this.underlineThickness = data.readShort();\n    this.isFixedPitch = data.readInt();\n    this.minMemType42 = data.readInt();\n    this.maxMemType42 = data.readInt();\n    this.minMemType1 = data.readInt();\n    this.maxMemType1 = data.readInt();\n    switch (this.format) {\n      case 0x00010000:\n        break;\n      case 0x00020000:\n        numberOfGlyphs = data.readUInt16();\n        this.glyphNameIndex = [];\n        var i;\n        for (\n          i = 0;\n          0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs;\n          i = 0 <= numberOfGlyphs ? ++i : --i\n        ) {\n          this.glyphNameIndex.push(data.readUInt16());\n        }\n        this.names = [];\n        _results = [];\n        while (data.pos < this.offset + this.length) {\n          length = data.readByte();\n          _results.push(this.names.push(data.readString(length)));\n        }\n        return _results;\n      case 0x00025000:\n        numberOfGlyphs = data.readUInt16();\n        return (this.offsets = data.read(numberOfGlyphs));\n      case 0x00030000:\n        break;\n      case 0x00040000:\n        return (this.map = function() {\n          var _j, _ref, _results1;\n          _results1 = [];\n          for (\n            i = _j = 0, _ref = this.file.maxp.numGlyphs;\n            0 <= _ref ? _j < _ref : _j > _ref;\n            i = 0 <= _ref ? ++_j : --_j\n          ) {\n            _results1.push(data.readUInt32());\n          }\n          return _results1;\n        }.call(this));\n    }\n  };\n  /*PostTable.prototype.glyphFor = function (code) {\n            var index;\n            switch (this.format) {\n            case 0x00010000:\n                return POSTSCRIPT_GLYPHS[code] || '.notdef';\n            case 0x00020000:\n                index = this.glyphNameIndex[code];\n                if (index <= 257) {\n                    return POSTSCRIPT_GLYPHS[index];\n                }\n                else {\n                    return this.names[index - 258] || '.notdef';\n                }\n                break;\n            case 0x00025000:\n                return POSTSCRIPT_GLYPHS[code + this.offsets[code]] || '.notdef';\n            case 0x00030000:\n                return '.notdef';\n            case 0x00040000:\n                return this.map[code] || 0xFFFF;\n            }\n        };*/\n  /*PostTable.prototype.encode = function (mapping) {\n            var id, index, indexes, position, post, raw, string, strings, table, _i, _j, _k, _len, _len1, _len2;\n            if (!this.exists) {\n                return null;\n            }\n            raw = this.raw();\n            if (this.format === 0x00030000) {\n                return raw;\n            }\n            table = new Data(raw.slice(0, 32));\n            table.writeUInt32(0x00020000);\n            table.pos = 32;\n            indexes = [];\n            strings = [];\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                post = this.glyphFor(id);\n                position = POSTSCRIPT_GLYPHS.indexOf(post);\n                if (position !== -1) {\n                    indexes.push(position);\n                }\n                else {\n                    indexes.push(257 + strings.length);\n                    strings.push(post);\n                }\n            }\n            table.writeUInt16(Object.keys(mapping).length);\n            for (_j = 0, _len1 = indexes.length; _j < _len1; _j++) {\n                index = indexes[_j];\n                table.writeUInt16(index);\n            }\n            for (_k = 0, _len2 = strings.length; _k < _len2; _k++) {\n                string = strings[_k];\n                table.writeByte(string.length);\n                table.writeString(string);\n            }\n            return table.data;\n        };*/\n  POSTSCRIPT_GLYPHS = \".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\\nzero one two three four five six seven eight nine colon semicolon less equal greater\\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\\nbracketleft backslash bracketright asciicircum underscore grave\\na b c d e f g h i j k l m n o p q r s t u v w x y z\\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\\nsterling section bullet paragraph germandbls registered copyright trademark acute\\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\\nCacute cacute Ccaron ccaron dcroat\".split(\n    /\\s+/g\n  );\n  return PostTable;\n})(Table);\n\n/*********************************************************************************************************/\n/* function : NameEntry                                                                                  */\n/* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/\n/*********************************************************************************************************/\nvar NameEntry = (function() {\n  function NameEntry(raw, entry) {\n    this.raw = raw;\n    this.length = raw.length;\n    this.platformID = entry.platformID;\n    this.encodingID = entry.encodingID;\n    this.languageID = entry.languageID;\n  }\n  return NameEntry;\n})();\n\nvar NameTable = (function(_super) {\n  var subsetTag;\n  __extends(NameTable, _super);\n\n  function NameTable() {\n    return NameTable.__super__.constructor.apply(this, arguments);\n  }\n  NameTable.prototype.tag = \"name\";\n  NameTable.prototype.parse = function(data) {\n    var count,\n      entries,\n      entry,\n      i,\n      name,\n      stringOffset,\n      strings,\n      text,\n      _j,\n      _len,\n      _name;\n    data.pos = this.offset;\n    data.readShort(); //format\n    count = data.readShort();\n    stringOffset = data.readShort();\n    entries = [];\n    for (\n      i = 0;\n      0 <= count ? i < count : i > count;\n      i = 0 <= count ? ++i : --i\n    ) {\n      entries.push({\n        platformID: data.readShort(),\n        encodingID: data.readShort(),\n        languageID: data.readShort(),\n        nameID: data.readShort(),\n        length: data.readShort(),\n        offset: this.offset + stringOffset + data.readShort()\n      });\n    }\n    strings = {};\n    for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {\n      entry = entries[i];\n      data.pos = entry.offset;\n      text = data.readString(entry.length);\n      name = new NameEntry(text, entry);\n      if (strings[(_name = entry.nameID)] == null) {\n        strings[_name] = [];\n      }\n      strings[entry.nameID].push(name);\n    }\n    this.strings = strings;\n    this.copyright = strings[0];\n    this.fontFamily = strings[1];\n    this.fontSubfamily = strings[2];\n    this.uniqueSubfamily = strings[3];\n    this.fontName = strings[4];\n    this.version = strings[5];\n    try {\n      this.postscriptName = strings[6][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    } catch (e) {\n      this.postscriptName = strings[4][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    }\n    this.trademark = strings[7];\n    this.manufacturer = strings[8];\n    this.designer = strings[9];\n    this.description = strings[10];\n    this.vendorUrl = strings[11];\n    this.designerUrl = strings[12];\n    this.license = strings[13];\n    this.licenseUrl = strings[14];\n    this.preferredFamily = strings[15];\n    this.preferredSubfamily = strings[17];\n    this.compatibleFull = strings[18];\n    return (this.sampleText = strings[19]);\n  };\n  subsetTag = \"AAAAAA\";\n  /*NameTable.prototype.encode = function () {\n            var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;\n            strings = {};\n            _ref = this.strings;\n            for (id in _ref) {\n                val = _ref[id];\n                strings[id] = val;\n            }\n            postscriptName = new NameEntry(\"\" + subsetTag + \"+\" + this.postscriptName, {\n                platformID: 1\n                , encodingID: 0\n                , languageID: 0\n            });\n            strings[6] = [postscriptName];\n            subsetTag = successorOf(subsetTag);\n            strCount = 0;\n            for (id in strings) {\n                list = strings[id];\n                if (list != null) {\n                    strCount += list.length;\n                }\n            }\n            table = new Data;\n            strTable = new Data;\n            table.writeShort(0);\n            table.writeShort(strCount);\n            table.writeShort(6 + 12 * strCount);\n            for (nameID in strings) {\n                list = strings[nameID];\n                if (list != null) {\n                    for (_i = 0, _len = list.length; _i < _len; _i++) {\n                        string = list[_i];\n                        table.writeShort(string.platformID);\n                        table.writeShort(string.encodingID);\n                        table.writeShort(string.languageID);\n                        table.writeShort(nameID);\n                        table.writeShort(string.length);\n                        table.writeShort(strTable.pos);\n                        strTable.writeString(string.raw);\n                    }\n                }\n            }\n            return nameTable = {\n                postscriptName: postscriptName.raw\n                , table: table.data.concat(strTable.data)\n            };\n        };*/\n  return NameTable;\n})(Table);\n\nvar MaxpTable = (function(_super) {\n  __extends(MaxpTable, _super);\n\n  function MaxpTable() {\n    return MaxpTable.__super__.constructor.apply(this, arguments);\n  }\n  MaxpTable.prototype.tag = \"maxp\";\n  MaxpTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.numGlyphs = data.readUInt16();\n    this.maxPoints = data.readUInt16();\n    this.maxContours = data.readUInt16();\n    this.maxCompositePoints = data.readUInt16();\n    this.maxComponentContours = data.readUInt16();\n    this.maxZones = data.readUInt16();\n    this.maxTwilightPoints = data.readUInt16();\n    this.maxStorage = data.readUInt16();\n    this.maxFunctionDefs = data.readUInt16();\n    this.maxInstructionDefs = data.readUInt16();\n    this.maxStackElements = data.readUInt16();\n    this.maxSizeOfInstructions = data.readUInt16();\n    this.maxComponentElements = data.readUInt16();\n    return (this.maxComponentDepth = data.readUInt16());\n  };\n  /*MaxpTable.prototype.encode = function (ids) {\n            var table;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeUInt16(ids.length);\n            table.writeUInt16(this.maxPoints);\n            table.writeUInt16(this.maxContours);\n            table.writeUInt16(this.maxCompositePoints);\n            table.writeUInt16(this.maxComponentContours);\n            table.writeUInt16(this.maxZones);\n            table.writeUInt16(this.maxTwilightPoints);\n            table.writeUInt16(this.maxStorage);\n            table.writeUInt16(this.maxFunctionDefs);\n            table.writeUInt16(this.maxInstructionDefs);\n            table.writeUInt16(this.maxStackElements);\n            table.writeUInt16(this.maxSizeOfInstructions);\n            table.writeUInt16(this.maxComponentElements);\n            table.writeUInt16(this.maxComponentDepth);\n            return table.data;\n        };*/\n  return MaxpTable;\n})(Table);\n\nvar HmtxTable = (function(_super) {\n  __extends(HmtxTable, _super);\n\n  function HmtxTable() {\n    return HmtxTable.__super__.constructor.apply(this, arguments);\n  }\n  HmtxTable.prototype.tag = \"hmtx\";\n  HmtxTable.prototype.parse = function(data) {\n    var i, last, lsbCount, m, _j, _ref, _results;\n    data.pos = this.offset;\n    this.metrics = [];\n    for (\n      i = 0, _ref = this.file.hhea.numberOfMetrics;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      this.metrics.push({\n        advance: data.readUInt16(),\n        lsb: data.readInt16()\n      });\n    }\n    lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;\n    this.leftSideBearings = (function() {\n      var _j, _results;\n      _results = [];\n      for (\n        i = _j = 0;\n        0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n        i = 0 <= lsbCount ? ++_j : --_j\n      ) {\n        _results.push(data.readInt16());\n      }\n      return _results;\n    })();\n    this.widths = function() {\n      var _j, _len, _ref1, _results;\n      _ref1 = this.metrics;\n      _results = [];\n      for (_j = 0, _len = _ref1.length; _j < _len; _j++) {\n        m = _ref1[_j];\n        _results.push(m.advance);\n      }\n      return _results;\n    }.call(this);\n    last = this.widths[this.widths.length - 1];\n    _results = [];\n    for (\n      i = _j = 0;\n      0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n      i = 0 <= lsbCount ? ++_j : --_j\n    ) {\n      _results.push(this.widths.push(last));\n    }\n    return _results;\n  };\n  /***************************************************************/\n  /* function : forGlyph                                         */\n  /* comment : Returns the advance width and lsb for this glyph. */\n  /***************************************************************/\n  HmtxTable.prototype.forGlyph = function(id) {\n    if (id in this.metrics) {\n      return this.metrics[id];\n    }\n    return {\n      advance: this.metrics[this.metrics.length - 1].advance,\n      lsb: this.leftSideBearings[id - this.metrics.length]\n    };\n  };\n  /*HmtxTable.prototype.encode = function (mapping) {\n            var id, metric, table, _i, _len;\n            table = new Data;\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                metric = this.forGlyph(id);\n                table.writeUInt16(metric.advance);\n                table.writeUInt16(metric.lsb);\n            }\n            return table.data;\n        };*/\n  return HmtxTable;\n})(Table);\n\nvar __slice = [].slice;\n\nvar GlyfTable = (function(_super) {\n  __extends(GlyfTable, _super);\n\n  function GlyfTable() {\n    return GlyfTable.__super__.constructor.apply(this, arguments);\n  }\n  GlyfTable.prototype.tag = \"glyf\";\n  GlyfTable.prototype.parse = function() {\n    return (this.cache = {});\n  };\n  GlyfTable.prototype.glyphFor = function(id) {\n    var data,\n      index,\n      length,\n      loca,\n      numberOfContours,\n      raw,\n      xMax,\n      xMin,\n      yMax,\n      yMin;\n    if (id in this.cache) {\n      return this.cache[id];\n    }\n    loca = this.file.loca;\n    data = this.file.contents;\n    index = loca.indexOf(id);\n    length = loca.lengthOf(id);\n    if (length === 0) {\n      return (this.cache[id] = null);\n    }\n    data.pos = this.offset + index;\n    raw = new Data(data.read(length));\n    numberOfContours = raw.readShort();\n    xMin = raw.readShort();\n    yMin = raw.readShort();\n    xMax = raw.readShort();\n    yMax = raw.readShort();\n    if (numberOfContours === -1) {\n      this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);\n    } else {\n      this.cache[id] = new SimpleGlyph(\n        raw,\n        numberOfContours,\n        xMin,\n        yMin,\n        xMax,\n        yMax\n      );\n    }\n    return this.cache[id];\n  };\n  GlyfTable.prototype.encode = function(glyphs, mapping, old2new) {\n    var glyph, id, offsets, table, _i, _len;\n    table = [];\n    offsets = [];\n    for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n      id = mapping[_i];\n      glyph = glyphs[id];\n      offsets.push(table.length);\n      if (glyph) {\n        table = table.concat(glyph.encode(old2new));\n      }\n    }\n    offsets.push(table.length);\n    return {\n      table: table,\n      offsets: offsets\n    };\n  };\n  return GlyfTable;\n})(Table);\n\nvar SimpleGlyph = (function() {\n  /**************************************************************************/\n  /* function : SimpleGlyph                                                 */\n  /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/\n  /**************************************************************************/\n  function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {\n    this.raw = raw;\n    this.numberOfContours = numberOfContours;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = false;\n  }\n  SimpleGlyph.prototype.encode = function() {\n    return this.raw.data;\n  };\n  return SimpleGlyph;\n})();\n\nvar CompoundGlyph = (function() {\n  var ARG_1_AND_2_ARE_WORDS,\n    MORE_COMPONENTS,\n    WE_HAVE_AN_X_AND_Y_SCALE,\n    WE_HAVE_A_SCALE,\n    WE_HAVE_A_TWO_BY_TWO,\n    WE_HAVE_INSTRUCTIONS;\n  ARG_1_AND_2_ARE_WORDS = 0x0001;\n  WE_HAVE_A_SCALE = 0x0008;\n  MORE_COMPONENTS = 0x0020;\n  WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;\n  WE_HAVE_A_TWO_BY_TWO = 0x0080;\n  WE_HAVE_INSTRUCTIONS = 0x0100;\n\n  /********************************************************************************************************************/\n  /* function : CompoundGlypg generator                                                                               */\n  /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/\n  /********************************************************************************************************************/\n  function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {\n    var data, flags;\n    this.raw = raw;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = true;\n    this.glyphIDs = [];\n    this.glyphOffsets = [];\n    data = this.raw;\n    while (true) {\n      flags = data.readShort();\n      this.glyphOffsets.push(data.pos);\n      this.glyphIDs.push(data.readUInt16());\n      if (!(flags & MORE_COMPONENTS)) {\n        break;\n      }\n      if (flags & ARG_1_AND_2_ARE_WORDS) {\n        data.pos += 4;\n      } else {\n        data.pos += 2;\n      }\n      if (flags & WE_HAVE_A_TWO_BY_TWO) {\n        data.pos += 8;\n      } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n        data.pos += 4;\n      } else if (flags & WE_HAVE_A_SCALE) {\n        data.pos += 2;\n      }\n    }\n  }\n  /****************************************************************************************************************/\n  /* function : CompoundGlypg encode                                                                              */\n  /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/\n  /****************************************************************************************************************/\n  CompoundGlyph.prototype.encode = function() {\n    var i, result, _len, _ref;\n    result = new Data(__slice.call(this.raw.data));\n    _ref = this.glyphIDs;\n    for (i = 0, _len = _ref.length; i < _len; ++i) {\n      result.pos = this.glyphOffsets[i];\n    }\n    return result.data;\n  };\n  return CompoundGlyph;\n})();\n\nvar LocaTable = (function(_super) {\n  __extends(LocaTable, _super);\n\n  function LocaTable() {\n    return LocaTable.__super__.constructor.apply(this, arguments);\n  }\n  LocaTable.prototype.tag = \"loca\";\n  LocaTable.prototype.parse = function(data) {\n    var format, i;\n    data.pos = this.offset;\n    format = this.file.head.indexToLocFormat;\n    if (format === 0) {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 2) {\n          _results.push(data.readUInt16() * 2);\n        }\n        return _results;\n      }.call(this));\n    } else {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 4) {\n          _results.push(data.readUInt32());\n        }\n        return _results;\n      }.call(this));\n    }\n  };\n  LocaTable.prototype.indexOf = function(id) {\n    return this.offsets[id];\n  };\n  LocaTable.prototype.lengthOf = function(id) {\n    return this.offsets[id + 1] - this.offsets[id];\n  };\n  LocaTable.prototype.encode = function(offsets, activeGlyphs) {\n    var LocaTable = new Uint32Array(this.offsets.length);\n    var glyfPtr = 0;\n    var listGlyf = 0;\n    for (var k = 0; k < LocaTable.length; ++k) {\n      LocaTable[k] = glyfPtr;\n      if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {\n        ++listGlyf;\n        LocaTable[k] = glyfPtr;\n        var start = this.offsets[k];\n        var len = this.offsets[k + 1] - start;\n        if (len > 0) {\n          glyfPtr += len;\n        }\n      }\n    }\n    var newLocaTable = new Array(LocaTable.length * 4);\n    for (var j = 0; j < LocaTable.length; ++j) {\n      newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;\n      newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;\n      newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;\n      newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;\n    }\n    return newLocaTable;\n  };\n  return LocaTable;\n})(Table);\n\n/************************************************************************************/\n/* function : invert                                                                */\n/* comment : Change the object's (key: value) to create an object with (value: key).*/\n/************************************************************************************/\nvar invert = function(object) {\n  var key, ret, val;\n  ret = {};\n  for (key in object) {\n    val = object[key];\n    ret[val] = key;\n  }\n  return ret;\n};\n\n/*var successorOf = function (input) {\n        var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;\n        alphabet = 'abcdefghijklmnopqrstuvwxyz';\n        length = alphabet.length;\n        result = input;\n        i = input.length;\n        while (i >= 0) {\n            last = input.charAt(--i);\n            if (isNaN(last)) {\n                index = alphabet.indexOf(last.toLowerCase());\n                if (index === -1) {\n                    next = last;\n                    carry = true;\n                }\n                else {\n                    next = alphabet.charAt((index + 1) % length);\n                    isUpperCase = last === last.toUpperCase();\n                    if (isUpperCase) {\n                        next = next.toUpperCase();\n                    }\n                    carry = index + 1 >= length;\n                    if (carry && i === 0) {\n                        added = isUpperCase ? 'A' : 'a';\n                        result = added + next + result.slice(1);\n                        break;\n                    }\n                }\n            }\n            else {\n                next = +last + 1;\n                carry = next > 9;\n                if (carry) {\n                    next = 0;\n                }\n                if (carry && i === 0) {\n                    result = '1' + next + result.slice(1);\n                    break;\n                }\n            }\n            result = result.slice(0, i) + next + result.slice(i + 1);\n            if (!carry) {\n                break;\n            }\n        }\n        return result;\n    };*/\n\nvar Subset = (function() {\n  function Subset(font) {\n    this.font = font;\n    this.subset = {};\n    this.unicodes = {};\n    this.next = 33;\n  }\n  /*Subset.prototype.use = function (character) {\n            var i, _i, _ref;\n            if (typeof character === 'string') {\n                for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                    this.use(character.charCodeAt(i));\n                }\n                return;\n            }\n            if (!this.unicodes[character]) {\n                this.subset[this.next] = character;\n                return this.unicodes[character] = this.next++;\n            }\n        };*/\n  /*Subset.prototype.encodeText = function (text) {\n            var char, i, string, _i, _ref;\n            string = '';\n            for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                char = this.unicodes[text.charCodeAt(i)];\n                string += String.fromCharCode(char);\n            }\n            return string;\n        };*/\n  /***************************************************************/\n  /* function : generateCmap                                     */\n  /* comment : Returns the unicode cmap for this font.         */\n  /***************************************************************/\n  Subset.prototype.generateCmap = function() {\n    var mapping, roman, unicode, unicodeCmap, _ref;\n    unicodeCmap = this.font.cmap.tables[0].codeMap;\n    mapping = {};\n    _ref = this.subset;\n    for (roman in _ref) {\n      unicode = _ref[roman];\n      mapping[roman] = unicodeCmap[unicode];\n    }\n    return mapping;\n  };\n  /*Subset.prototype.glyphIDs = function () {\n            var ret, roman, unicode, unicodeCmap, val, _ref;\n            unicodeCmap = this.font.cmap.tables[0].codeMap;\n            ret = [0];\n            _ref = this.subset;\n            for (roman in _ref) {\n                unicode = _ref[roman];\n                val = unicodeCmap[unicode];\n                if ((val != null) && __indexOf.call(ret, val) < 0) {\n                    ret.push(val);\n                }\n            }\n            return ret.sort();\n        };*/\n  /******************************************************************/\n  /* function : glyphsFor                                           */\n  /* comment : Returns simple glyph objects for the input character.*/\n  /******************************************************************/\n  Subset.prototype.glyphsFor = function(glyphIDs) {\n    var additionalIDs, glyph, glyphs, id, _i, _len, _ref;\n    glyphs = {};\n    for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {\n      id = glyphIDs[_i];\n      glyphs[id] = this.font.glyf.glyphFor(id);\n    }\n    additionalIDs = [];\n    for (id in glyphs) {\n      glyph = glyphs[id];\n      if (glyph != null ? glyph.compound : void 0) {\n        additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);\n      }\n    }\n    if (additionalIDs.length > 0) {\n      _ref = this.glyphsFor(additionalIDs);\n      for (id in _ref) {\n        glyph = _ref[id];\n        glyphs[id] = glyph;\n      }\n    }\n    return glyphs;\n  };\n  /***************************************************************/\n  /* function : encode                                           */\n  /* comment : Encode various tables for the characters you use. */\n  /***************************************************************/\n  Subset.prototype.encode = function(glyID, indexToLocFormat) {\n    var cmap,\n      code,\n      glyf,\n      glyphs,\n      id,\n      ids,\n      loca,\n      new2old,\n      newIDs,\n      nextGlyphID,\n      old2new,\n      oldID,\n      oldIDs,\n      tables,\n      _ref;\n    cmap = CmapTable.encode(this.generateCmap(), \"unicode\");\n    glyphs = this.glyphsFor(glyID);\n    old2new = {\n      0: 0\n    };\n    _ref = cmap.charMap;\n    for (code in _ref) {\n      ids = _ref[code];\n      old2new[ids.old] = ids[\"new\"];\n    }\n    nextGlyphID = cmap.maxGlyphID;\n    for (oldID in glyphs) {\n      if (!(oldID in old2new)) {\n        old2new[oldID] = nextGlyphID++;\n      }\n    }\n    new2old = invert(old2new);\n    newIDs = Object.keys(new2old).sort(function(a, b) {\n      return a - b;\n    });\n    oldIDs = (function() {\n      var _i, _len, _results;\n      _results = [];\n      for (_i = 0, _len = newIDs.length; _i < _len; _i++) {\n        id = newIDs[_i];\n        _results.push(new2old[id]);\n      }\n      return _results;\n    })();\n    glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);\n    loca = this.font.loca.encode(glyf.offsets, oldIDs);\n    tables = {\n      cmap: this.font.cmap.raw(),\n      glyf: glyf.table,\n      loca: loca,\n      hmtx: this.font.hmtx.raw(),\n      hhea: this.font.hhea.raw(),\n      maxp: this.font.maxp.raw(),\n      post: this.font.post.raw(),\n      name: this.font.name.raw(),\n      head: this.font.head.encode(indexToLocFormat)\n    };\n    if (this.font.os2.exists) {\n      tables[\"OS/2\"] = this.font.os2.raw();\n    }\n    return this.font.directory.encode(tables);\n  };\n  return Subset;\n})();\n\njsPDF.API.PDFObject = (function() {\n  var pad;\n\n  function PDFObject() {}\n  pad = function(str, length) {\n    return (Array(length + 1).join(\"0\") + str).slice(-length);\n  };\n  /*****************************************************************************/\n  /* function : convert                                                        */\n  /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */\n  /*****************************************************************************/\n  PDFObject.convert = function(object) {\n    var e, items, key, out, val;\n    if (Array.isArray(object)) {\n      items = (function() {\n        var _i, _len, _results;\n        _results = [];\n        for (_i = 0, _len = object.length; _i < _len; _i++) {\n          e = object[_i];\n          _results.push(PDFObject.convert(e));\n        }\n        return _results;\n      })().join(\" \");\n      return \"[\" + items + \"]\";\n    } else if (typeof object === \"string\") {\n      return \"/\" + object;\n    } else if (object != null ? object.isString : void 0) {\n      return \"(\" + object + \")\";\n    } else if (object instanceof Date) {\n      return (\n        \"(D:\" +\n        pad(object.getUTCFullYear(), 4) +\n        pad(object.getUTCMonth(), 2) +\n        pad(object.getUTCDate(), 2) +\n        pad(object.getUTCHours(), 2) +\n        pad(object.getUTCMinutes(), 2) +\n        pad(object.getUTCSeconds(), 2) +\n        \"Z)\"\n      );\n    } else if ({}.toString.call(object) === \"[object Object]\") {\n      out = [\"<<\"];\n      for (key in object) {\n        val = object[key];\n        out.push(\"/\" + key + \" \" + PDFObject.convert(val));\n      }\n      out.push(\">>\");\n      return out.join(\"\\n\");\n    } else {\n      return \"\" + object;\n    }\n  };\n  return PDFObject;\n})();\n"],"names":["atob","btoa","globalObject","window","global","self","this","RGBColor","color_string","channels","ok","charAt","substr","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","feldspar","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslateblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","violetred","wheat","white","whitesmoke","yellow","yellowgreen","replace","toLowerCase","color_defs","re","example","process","bits","parseInt","i","length","processor","exec","r","g","b","isNaN","toRGB","toHex","toString","consoleLog","console","log","apply","arguments","require","warn","str","call","error","md5cycle","x","k","a","c","d","ff","gg","hh","ii","add32","cmn","q","s","t","md51","n","state","md5blk","substring","tail","charCodeAt","md5blks","hex_chr","split","rhex","j","singleToByteString","String","fromCharCode","md5Bin","map","join","md5Check","hex","lsw","rc4","key","data","lastKey","lastState","num","Array","out","permissionOptions","print","modify","copy","annot-forms","PDFSecurity","permissions","userPassword","ownerPassword","fileId","v","protection","forEach","perm","Error","padding","paddedUserPassword","paddedOwnerPassword","O","processOwnerPassword","P","encryptionKey","lsbFirstWord","hexToBytes","U","toPDFName","test","result","strLength","charCode","slice","PubSub","context","topics","subscribe","topic","callback","once","hasOwnProperty","token","Math","random","unsubscribe","Object","keys","publish","args","prototype","tokens","sub","ex","message","push","getTopics","GState","parameters","supported","p","indexOf","id","objectNumber","Pattern","gState","matrix","ShadingPattern","type","coords","colors","TilingPattern","boundingBox","xStep","yStep","stream","cloneIndex","jsPDF","options","precision","orientation","unit","format","compressPdf","filters","userUnit","floatPrecision","defaultPathOperation","encryptionOptions","compress","encryption","userPermissions","abs","putOnlyUsedFonts","usedFonts","API","internal","__private__","pdfVersion","getPdfVersion","setPdfVersion","value","pageFormats","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","b10","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","dl","letter","government-letter","legal","junior-legal","ledger","tabloid","credit-card","getPageFormats","getPageFormat","ApiMode","COMPAT","ADVANCED","apiMode","advancedAPI","saveGraphicsState","Matrix","scaleFactor","getPageHeight","setFontSize","getFontSize","compatAPI","restoreGraphicsState","combineFontStyleAndFontWeight","fontStyle","fontWeight","body","doSwitch","isAdvancedAPI","hpf","advancedApiModeTrap","methodName","roundToPrecision","number","parmPrecision","tmpPrecision","toFixed","f2","f3","scale","transformY","y","transformScaleY","setPrecision","creationDate","getFileId","setFileId","toUpperCase","floor","convertDateToPDFDate","parmDate","tzoffset","getTimezoneOffset","tzsign","tzhour","tzmin","timeZoneString","padd2","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","convertPDFDateToDate","parmPDFDate","year","month","date","hour","minutes","seconds","Date","setCreationDate","tmpCreationDateString","getCreationDate","currentPage","padd2Hex","hexString","offsets","content","contentLength","additionalObjects","pages","hasCustomDestination","outputDestination","resetDocument","rootDictionaryObjId","newObjectDeferred","resourceDictionaryObjId","setCustomOutputDestination","destination","setOutputDestination","resetCustomOutputDestination","string","write","getArrayBuffer","len","ab","ArrayBuffer","u8","Uint8Array","standardFonts","getStandardFonts","activeFontSize","fontSize","size","zoomMode","R2L","setR2L","getR2L","pageMode","setZoomMode","zoom","validZoomModes","undefined","getZoomMode","layoutMode","setPageMode","pmode","getPageMode","setLayoutMode","layout","getLayoutMode","setDisplayMode","documentProperties","title","subject","author","keywords","creator","getDocumentProperty","getDocumentProperties","setDocumentProperties","setProperties","properties","property","setDocumentProperty","activeFontKey","pageX","pageY","pageMatrix","fonts","fontmap","fontStateStack","patterns","patternMap","gStates","gStatesMap","activeGState","page","pagesContext","events","hotfixes","renderTargets","renderTargetMap","renderTargetStack","sx","shy","shx","sy","tx","ty","_matrix","defineProperty","get","set","atan2","decompose","separator","multiply","e","f","scaleX","sqrt","shear","scaleY","translate","rotate","skew","inversed","quot","aInv","bInv","cInv","dInv","applyToPoint","pt","Point","applyToRectangle","rect","pt1","pt2","w","h","Rectangle","clone","matrixMult","m1","m2","identityMatrix","unitMatrix","addPattern","pattern","patternKey","addShadingPattern","beginTilingPattern","beginNewRenderTarget","endTilingPattern","pop","restore","newObject","oid","newObjectDeferredBegin","doOutput","newAdditionalObject","obj","objId","decodeColorString","color","colorEncoded","floatVal","parseFloat","colorAsRGB","encodeColorString","ch1","ch2","ch3","ch4","letterArray","pdfColorType","rgbColor","getFilters","putStream","alreadyAppliedFilters","addLength1","valueOfLength1","objectId","encryptor","processedData","keyValues","additionalKeyValues","filterAsString","processDataByFilters","reverseChain","isArray","decodeParmsArray","putPage","pageNumber","pageObjectNumber","pageContentsObjId","contentsObjId","mediaBox","bottomLeftX","bottomLeftY","topRightX","topRightY","cropBox","bleedBox","trimBox","artBox","pageContext","pageContent","putPages","pageObjectNumbers","kids","putFont","font","isAlreadyPutted","postScriptName","encoding","putFonts","fontKey","putXObject","xObject","width","height","putXObjects","xObjectKey","interpolateAndEncodeRGBStream","numberSamples","tValues","dT","offset","unshift","index","aColor","bColor","round","trim","putShadingPattern","funcObjectNumber","putTilingPattern","deferredResourceDictionaryIds","resourcesObjectId","patternObjectId","resourcesOid","objectOid","putPatterns","putGState","putGStates","gStateKey","putXobjectDict","putEncryptionDict","toHexString","putFontDict","putShadingPatternDict","putTilingPatternDict","putGStatesDict","putResourceDictionary","objectIds","putResources","Number","MAX_SAFE_INTEGER","putAdditionalObjects","addFontToFontDictionary","fontName","addFont","isStandardFont","metadata","instance","addFonts","arrayOfFonts","l","parts","dictionary","SAFE","fn","foo","stack","m","alert","bar","to8bitStream","text","flags","sourceEncoding","encodingBlock","outputEncoding","newtext","isUnicode","ch","bch","autoencode","codePages","noBOM","pdfEscape","beginPage","_setPage","_addPage","parmFormat","parmOrientation","dimensions","min","setLineWidth","lineWidth","strokeColor","lineCapID","lineJoinID","_deletePage","splice","setPage","getNumberOfPages","getFont","fontNameLowerCase","disableWarning","noFallback","putInfo","version","putCatalog","tmpRootDictionaryObjId","pcn","putTrailer","putHeader","putXRef","buildDocument","offsetOfXRef","getBlob","Blob","output","filename","save","URL","createObjectURL","dataURI","pdfDocument","unescape","encodeURIComponent","pdfObjectUrl","integrity","htmlForNewWindow","JSON","stringify","nW","open","document","htmlForPDFjsNewWindow","pdfJsUrl","PDFjsNewWindow","scope","documentElement","querySelector","onload","contentWindow","PDFViewerApplication","htmlForDataURLNewWindow","dataURLNewWindow","safari","location","href","hasHotfix","hotfixName","getEncryptor","getPageInfo","pageNumberOneBased","getPageInfoByObjId","getCurrentPageInfo","addPage","insertPage","beforePage","movePage","targetPage","tmpPages","tmpPagesContext","deletePage","transform","payload","da","angle","align","charSpace","maxWidth","horizontalScale","transformationMatrix","tmp","xtra","isHex","lineHeight","lineHeightFactor","ESC","TabLen","transformTextToSpecialArray","curDa","sa","concat","shift","processTextByFunction","processingFunction","tmpResult","textIsOfTypeString","tmpTextIsOfTypeString","match","descent","baseline","splitTextToSize","reduce","acc","textLine","mutex","PI","rotationDirection","cos","sin","activeCharSpace","setCharSpace","getCharSpace","lang","renderingMode","parmRenderingMode","stroke","usedRenderingMode","lineWidths","leading","pageWidth","pageSize","getWidth","activeFont","assign","wordSpacingPerLine","findWidth","getStringUnitWidth","doKerning","newY","newX","prevWidth","getHorizontalCoordinate","getVerticalCoordinate","backToStartX","spacing","words","shiftAmount","doReversing","posX","posY","reverse","activeFontEncoding","STRING","ARRAY","variant","wordSpacing","generatePosition","parmPosX","parmPosY","parmTransformationMatrix","position","lineIndex","textColor","clip","rule","clipEvenOdd","discardPath","isValidStyle","style","setDefaultPathOperation","operator","getStyle","op","close","fill","fillWithOptionalPattern","fillEvenOdd","fillStroke","fillStrokeEvenOdd","fillWithPattern","putStyle","cloneTilingPattern","patternData","patternId","clipRuleFromStyle","setGState","moveTo","lineTo","curveTo","x1","y1","x2","y2","x3","y3","line","lines","closed","scalex","scaley","leg","x4","y4","path","triangle","roundedRect","rx","ry","MyArc","SQRT2","ellipse","lx","ly","circle","setFont","getFontEntry","getFontList","list","encodingOptions","getLineWidth","setLineDash","setLineDashPattern","dashArray","dashPhase","getLineHeight","setLineHeightFactor","getLineHeightFactor","getHorizontalCoordinateString","getVerticalCoordinateString","getStrokeColor","getDrawColor","setStrokeColor","setDrawColor","fillColor","getFillColor","setFillColor","getTextColor","setTextColor","CapJoinStyles","0","butt","but","miter","1","rounded","2","projecting","project","square","bevel","setLineCap","setLineJoin","setLineMiterLimit","setMiterLimit","addGState","equals","duplicate","fontState","setCurrentTransformationMatrix","comment","_x","enumerable","_y","_type","_w","_h","RenderTarget","getPageWidth","setPageWidth","setPageHeight","endFormObject","newXObject","xObjectId","plugin","beginFormObject","doFormObject","getFormObject","returnPromise","fs","buffer","Buffer","from","Promise","resolve","reject","writeFile","err","writeFileSync","newEvents","eventname","handler_and_args","getCoordinateString","collections","setWidth","getHeight","setHeight","getPDFVersion","configurable","byteString","byte","bytes","generation","other","ignore","count","jsPDFAPI","pdfUnescape","f5","__acroform__","inherit","child","parent","create","constructor","createFormXObject","formObject","xobj","AcroFormXObject","AcroFormAppearance","BBox","setBit","bitPosition","clearBit","getBit","getBitForPdf","setBitForPdf","clearBitForPdf","calculateCoordinates","coordinates","lowerLeft_X","lowerLeft_Y","upperRight_X","upperRight_Y","calculateAppearanceStream","appearanceStreamContent","V","DV","_V","calcRes","calculateX","maxFontSize","returnValue","textSplit","multiline","word","isSmallerThanWidth","lastLine","calculateFontSpace","FontSize","startX","lastLength","textHeight","startY","lastY","firstWordInLine","lastWordInLine","currWord","lineCount","isWithNewLine","nextLineIsSmaller","isLastWord","currLine","textAlign","acroformPluginTemplate","fields","xForms","acroFormDictionaryRoot","printedOut","isInitialized","createAnnotationReference","object","annotations","find","entry","createXFormObjectCallback","fieldArray","fieldObject","initializeAcroForm","acroformPlugin","AcroFormField","FieldNum","parse","AcroFormDictionary","_eventID","AcroFormDictionaryCallback","Fields","hasAnnotation","annotReferenceCallback","putCatalogCallback","standardFields","Kids","keyValueList","oldRect","Rect","DA","createDefaultAppearanceStream","getKeyValueListForStream","hasAppearanceStream","appearance","appearanceStreamString","createFieldCallback","arrayToPdfArray","array","toPdfString","AcroFormPDFObject","_objId","_scope","writable","getOwnPropertyNames","filter","getOwnPropertyDescriptor","_stream","_BBox","_DA","_Kids","_F","Boolean","F","_Ff","_Rect","_FT","_T","AcroFormChildClass","_fontName","_fontStyle","_fontSize","_maxFontSize","_color","AcroFormTextField","_DV","AcroFormButton","_page","_hasAppearanceStream","Ff","_Q","AcroFormChoiceField","FT","_TI","_Opt","regex","matches","getMatches","getOptions","setOptions","sort","addOption","removeOption","allEntries","combo","AcroFormListBox","AcroFormComboBox","AcroFormEditBox","edit","_AS","_MK","CA","AcroFormPushButton","pushButton","AcroFormRadioButton","radio","_parent","_optionName","caption","appearanceState","_AppearanceType","RadioButton","Circle","createAppearanceStream","optionName","setAppearance","getCA","createOption","name","Parent","addField","AcroFormCheckBox","CheckBox","_MaxLen","isInteger","AcroFormPasswordField","password","N","On","YesNormal","D","YesPushDown","Off","OffPushDown","encodedColor","DotRadius","Bezier_C","DotRadiusBezier","kc","dc","Cross","cross","calculateCross","AcroForm","ChoiceField","ListBox","ComboBox","EditBox","Button","PushButton","TextField","PasswordField","Appearance","toLookup","arr","lookup","__addimage__","UNKNOWN","imageFileTypeHeaders","PNG","TIFF","JPEG","JPEG2000","GIF87a","GIF89a","WEBP","BMP","getImageFileTypeByImageData","imageData","fallbackFormat","headerSchemata","compareResult","fileType","Uint8ClampedArray","isArrayBufferView","putImage","image","colorSpace","color_spaces","INDEXED","palette","sMask","DEVICE_CMYK","bitsPerComponent","decodeParameters","transparency","predictor","arrayBufferToBinaryString","putResourcesCallback","images","putXObjectsDictCallback","initialize","getImages","getImageIndex","isImageTypeSupported","isDOMElement","nodeType","getImageDataFromElement","element","nodeName","hasAttribute","src","getAttribute","tmpImageData","loadFile","mimeType","toDataURL","checkImagesForAlias","alias","determineWidthAndHeight","writeImageToPDF","rotation","dims","coord","vcoord","f4","rotationTransformationMatrix","DEVICE_RGB","DEVICE_GRAY","CAL_GREY","CAL_RGB","LAB","ICC_BASED","PATTERN","SEPARATION","DEVICE_N","decode","DCT_DECODE","FLATE_DECODE","LZW_DECODE","JPX_DECODE","JBIG2_DECODE","ASCII85_DECODE","ASCII_HEX_DECODE","RUN_LENGTH_DECODE","CCITT_FAX_DECODE","image_compression","NONE","FAST","MEDIUM","SLOW","sHashCode","hash","byteLength","validateStringAsBase64","possibleBase64String","extractImageFromDataUrl","dataUrl","dataUrlParts","extractedInfo","charset","supportsArrayBuffer","isArrayBuffer","Uint32Array","Int8Array","Int16Array","Uint16Array","Int32Array","Float32Array","Float64Array","binaryStringToUint8Array","binary_string","buf","subarray","addImage","compression","processImageData","dataAsBinaryString","convertBase64ToBinaryString","generateAliasFromImageData","checkCompressValue","stringData","throwError","base64Info","rawData","getImageProperties","notEmpty","addPageData","putPageData","anno","pageInfo","pageAnnos","found","url","escape","objText","objPopup","encryptorText","bounds","contents","loc","_nameMap","top","finalBounds","magFactor","left","createAnnotation","link","textWithLink","linkHeight","linkWidth","totalLineWidth","getTextWidth","numOfLines","ceil","arabicSubstitionA","1569","1570","1571","1572","1573","1574","1575","1576","1577","1578","1579","1580","1581","1582","1583","1584","1585","1586","1587","1588","1589","1590","1591","1592","1593","1594","1601","1602","1603","1604","1605","1606","1607","1608","1609","1610","1649","1655","1657","1658","1659","1662","1663","1664","1667","1668","1670","1671","1672","1676","1677","1678","1681","1688","1700","1702","1705","1709","1711","1713","1715","1722","1723","1726","1728","1729","1733","1734","1735","1736","1737","1739","1740","1744","1746","1747","ligatures","65247","65154","65156","65160","65166","65248","65165","65258","1617","1612","1613","1614","1615","1616","arabic_diacritics","alfletter","__arabicParser__","isInArabicSubstitutionA","isArabicLetter","isArabicEndLetter","isArabicAlfLetter","arabicLetterHasIsolatedForm","arabicLetterHasFinalForm","arabicLetterHasInitialForm","arabicLetterHasMedialForm","resolveLigatures","letters","tmpLigatures","effectedLetters","isArabicDiacritic","getCorrectForm","currentChar","beforeChar","nextChar","parseArabic","currentLetter","prevLetter","nextLetter","newWords","processArabic","tmpText","autoPrint","refAutoPrintTag","addJS","Canvas","jsPdfInstance","_width","getContext","pageWrapXEnabled","pageWrapX","_height","pageWrapYEnabled","pageWrapY","_childNodes","_style","contextType","contextAttributes","pdf","context2d","_canvas","canvas","NO_MARGINS","bottom","right","printingHeaderRow","_initialize","__cell__","headerFunction","margins","_reset","lastCell","Cell","_text","_lineNumber","_align","lineNumber","toArray","setHeaderFunction","func","getTextDimensions","amountOfLines","tempWidth","max","cellAddPage","cell","currentCell","tableHeaderRow","printHeaders","printHeaderRow","table","headers","config","column","headerName","headerNames","headerLabels","headerAligns","columnMatrix","columnWidths","columnMinWidths","tableHeaderConfigs","autoSize","css","headerBackgroundColor","headerTextColor","table_font_size","header","prompt","rec","row","rowHeight","calculateLineHeight","setTableHeaderRow","pv","cv","rowStart","Function","cellData","cellStart","col","table_x","table_y","model","new_page","tableHeaderCell","tempHeaderConf","currentTextColor","fontStyleOrder","italic","oblique","normal","fontStretchOrder","fontStretchLookup","fontWeights","fontWeightsLookup","normalizeFontFace","fontFace","family","normalizeFontStyle","weight","normalizeFontWeight","stretch","normalizeFontStretch","ref","searchFromPivot","matchingSet","order","pivot","dir","defaultGenericFontFamilies","sans-serif","fixed","monospace","terminal","cursive","fantasy","serif","systemFonts","icon","menu","message-box","small-caption","status-bar","ruleToString","resolveFontFace","fontFaceMap","rules","opts","defaultFontFamily","genericFontFamilies","resolveFontStretch","ordering","resolveFontStyle","resolveFontWeight","eatWhiteSpace","input","trimLeft","parseQuotedFontFamily","quote","parseNonQuotedFontFamily","jsNamesObj","jsJsObj","defaultFont","_ctx","ContextLayer","ctx","isStrokeTransparent","strokeOpacity","strokeStyle","fillStyle","isFillTransparent","fillOpacity","textBaseline","lineJoin","lineCap","globalCompositeOperation","globalAlpha","clip_path","currentPoint","miterLimit","lastPoint","lineDashOffset","lineDash","margin","prevPageLastElemOffset","ignoreClearRect","Context2D","parentNode","_pdf","_pageWrapXEnabled","_pageWrapYEnabled","_posX","_posY","_autoPaging","lastBreak","pageBreaks","_ctxStack","rgba","getRGBA","_fontFaceMap","getFontFaceMap","fontFaces","convertedFontFaces","fontMap","convertToFontFaces","normalized","buildFontFaceMap","_fontFaces","fontFamily","fontSizeUnit","parsed","remaining","parseFontFamily","jsPdfFontName","fallbackFonts","arial","Arial","verdana","Verdana","helvetica","Helvetica","getLineDash","pathPreProcess","beginPath","closePath","pathBegin","quadraticCurveTo","cpx","cpy","pt0","bezierCurveTo","cp1x","cp1y","cp2x","cp2y","arc","radius","startAngle","endAngle","counterclockwise","isIdentity","xpt","x_radPt","x_radPt0","pow","arcTo","fillRect","strokeRect","clearRect","doStackPush","tmpPageNumber","ctxStack","doStackPop","isCanvasGradient","getColor","fillText","degs","rad2deg","putText","strokeText","measureText","txtWidth","TextMetrics","scalewidth","scaleheight","setTransform","hasMargins","drawImage","img","swidth","sheight","imageProperties","factorX","factorY","clipFactorX","clipFactorY","clipPath","decomposedTransformationMatrix","xRect","pageArray","getPagesByPath","sortPages","autoPaging","pageWidthMinusMargins","topMargin","firstPageHeight","pageHeightMinusMargins","previousPageHeightSum","tmpPaths","pathPositionRedo","drawPaths","tmpRect","needsClipping","yOffset","rectOfQuadraticCurve","getQuadraticCurveBoundary","rectOfBezierCurve","getBezierCurveBoundary","paths","isClip","tmpPath","oldLineWidth","origPath","xPath","delta","moves","begin","start","deltas","iii","began","arcs","drawArc","drawLine","drawLines","doClip","getBaseline","getTextBottom","yBaseLine","createLinearGradient","canvasGradient","colorStops","addColorStop","createPattern","createRadialGradient","includeMove","curves","createArc","curve","doMove","drawCurve","textDimensions","yTop","oldSize","baselineRect","textBounds","pageHeightMinusBottomMargin","pageWidthMinusRightMargin","textBoundsOnPage","doSlice","croppedText","baseLineRectOnPage","prevX","prevY","anticlockwise","twoPi","halfPi","totalAngle","sgn","createSmallArc","q1","q2","k2","ar","cos_ar","sin_ar","ey","midX1","midY1","midX2","midY2","resultX1","resultX2","resultY1","resultY2","ax","ay","bx","by","cx","cy","dx","dy","px","py","qx","qy","minx","miny","maxx","maxy","tobx","toby","tocx","tocy","todx","tody","prevLineDash","nextLineDash","ASCII85Encode","ASCII85Decode","z","ASCIIHexDecode","regexCheckIfHex","RegExp","FlateEncode","zlibSync","origData","filterChain","sync","readFileSync","readFile","nodeReadFile","loadImageFile","loadHtml2Canvas","exports","module","define","amd","catch","then","html2canvas","default","loadDomPurify","dompurify","objType","createElement","tagName","opt","el","className","innerHTML","sanitize","cloneNode","node","javascriptEnabled","createTextNode","nodeValue","firstChild","nextSibling","appendChild","addEventListener","scrollTop","scrollLeft","Worker","root","convert","template","setProgress","promise","__proto__","prop","container","overlay","progress","val","enableLinks","backgroundColor","getType","to","target","toContainer","toCanvas","toImg","toPdf","thenList","setPageSize","containerCSS","display","windowWidth","clientWidth","scrollWidth","offsetWidth","source","scrollHeight","offsetHeight","clientHeight","overflow","zIndex","clear","border","float","prereqs","contains","onrendered","removeChild","toContext2d","async","allowTaint","scrollX","scrollY","imageTimeout","logging","proxy","removeContainer","foreignObjectRendering","useCORS","windowHeight","imgData","quality","outputImg","outputPdf","doCallback","fns","setMargin","bind","cbk","toPx","getPageSize","inner","ratio","updateProgress","onFulfilled","onRejected","thenCore","thenBase","selfPromise","returnVal","thenExternal","catchExternal","msg","using","saveAs","export","run","format_as_string","pageHeight","html","worker","javascript","namesOid","outline","children","render","createNamedDestinations","totalPages","dests","info","names2Oid","makeRef","add","item","genIds_r","renderRoot","renderItems","objStart","count_r","objEnd","makeString","markers","processJPEG","blockLength","numcomponents","getJpegInfo","getCharWidthsArray","splitLongWord","splitParagraphIntoLines","makeImage","scratchCanvas","scratchCtx","chunkSize","palLen","delayDen","delayNum","frame","section","palShort","_i","_j","_ref","pos","animation","readUInt32","_results","colorType","compressionMethod","filterMethod","interlaceMethod","numFrames","numPlays","Infinity","frames","read","xOffset","readUInt16","delay","disposeOp","blendOp","indexed","grayscale","rgb","hasAlphaChannel","pixelBitlength","decodePixels","pixelBytes","fullPixels","_this","pass","x0","y0","abyte","pa","paeth","pb","pc","pixels","scanlineLength","upper","upperLeft","_k","_l","_m","isFull","fullPos","partPos","unzlibSync","decodePalette","ret","_ref1","copyToImageData","alpha","_decodedPalette","hasBrowserCanvas","putImageData","Image","decodeFrames","_len","createImageData","renderFrame","prev","animate","doFrame","frameNumber","_timeout","setTimeout","stopAnimation","clearTimeout","_png","GifReader","pf0","global_palette_flag","num_global_colors","global_palette_offset","global_palette_size","no_eof","transparent_index","disposal","loop_count","block_size","pf1","pf2","interlace_flag","num_local_colors","palette_offset","palette_size","has_local_palette","data_offset","data_length","interlaced","loopCount","frameInfo","frame_num","decodeAndBlitFrameBGRA","num_pixels","index_stream","GifReaderLZWOutputIndexStream","trans","framewidth","framestride","xleft","opbeg","opend","scanstride","interlaceskip","il","decodeAndBlitFrameRGBA","code_stream","output_length","min_code_size","clear_code","eoi_code","next_code","cur_code_size","code_mask","cur_shift","cur","subblock_size","code_table","prev_code","code","chase_code","chase_length","chase","JPEGEncoder","YDC_HT","UVDC_HT","YAC_HT","UVAC_HT","currentQuality","ffloor","YTable","UVTable","fdtbl_Y","fdtbl_UV","bitcode","category","outputfDCTQuant","DU","byteout","bytenew","bytepos","YDU","UDU","VDU","clt","RGB_YUV_TABLE","ZigZag","std_dc_luminance_nrcodes","std_dc_luminance_values","std_ac_luminance_nrcodes","std_ac_luminance_values","std_dc_chrominance_nrcodes","std_dc_chrominance_values","std_ac_chrominance_nrcodes","std_ac_chrominance_values","computeHuffmanTbl","nrcodes","std_table","codevalue","pos_in_table","HT","writeBits","bs","posval","writeByte","writeWord","processDU","CDU","fdtbl","DC","HTDC","HTAC","EOB","M16zeroes","DU_DCT","d0","d1","d2","d3","d4","d5","d6","d7","fDCTQuant","dataOff","tmp0","tmp7","tmp1","tmp6","tmp2","tmp5","tmp3","tmp4","tmp10","tmp13","tmp11","tmp12","z1","z5","z2","z4","z3","z11","z13","tmp0p2","tmp7p2","tmp1p2","tmp6p2","tmp2p2","tmp5p2","tmp3p2","tmp4p2","tmp10p2","tmp13p2","tmp11p2","tmp12p2","z1p2","z5p2","z2p2","z4p2","z3p2","z11p2","z13p2","Diff","end0pos","lng","startpos","nrzeroes","nrmarker","setQuality","sf","YQT","UVQT","u","aasf","initQuantTables","encode","writeDQT","writeSOF0","o","writeDHT","DCY","DCU","DCV","displayName","quadWidth","fillbits","sfcc","initCharLookupTable","nrlower","nrupper","cat","nr","nrneg","initCategoryNumber","initRGBYUVTable","BmpDecoder","is_with_alpha","datav","DataView","bottom_up","flag","parseHeader","parseBGR","WebPDecoder","fa","L","J","H","I","Z","M","wa","Ed","ma","_WebPDecoder","Fd","Ub","G","jc","Qb","qb","nd","pd","xb","Ca","Ka","oa","Jd","Yc","Zc","Qa","na","K","ca","cb","Sb","Ra","bb","Vb","ob","db","Gd","Hd","Wb","Sa","Xb","Id","ra","Ta","Yb","Ha","Zb","X","Mb","Xa","$b","ac","bc","xa","yb","ud","hd","jd","aa","eb","Ia","cc","Kd","Ld","ec","Ea","Md","Nd","Od","Pd","Qd","fb","gb","hb","zb","Ab","Ja","Bb","Rd","A","Sd","ea","Tc","Cd","lb","Db","W","Cb","S","RGBA","kb","sd","Td","Ud","fd","ib","bd","cd","Da","Vd","T","Wd","ba","ka","Mc","Nc","fc","Rc","Xd","ya","Kb","za","gc","Ua","Va","memory","Ib","Jb","hc","Oa","ic","Aa","Yd","Ba","Wa","Zd","$d","ae","ta","Eb","be","ga","ce","Dc","lc","mc","nc","de","ua","ub","ha","xc","vc","md","Ya","oc","C","ee","E","B","Q","fe","qc","Fb","rc","ge","va","Ma","sc","Gb","tc","uc","Hb","wc","yc","zc","qd","rd","ia","tb","he","$","Pb","wd","xd","vb","ie","Ac","Bc","je","Cc","VP8LMapColor32b","ke","VP8LMapColor8b","le","rb","Oc","R","me","qa","Y","la","ja","Fa","ne","sb","La","Za","$a","jb","mb","oe","pe","nb","qe","Pa","Ga","Na","Ec","se","Fc","ue","yd","td","Rb","ve","we","Lb","Gc","wb","xe","Wc","Xc","ye","Pc","Tb","zd","vd","od","ld","dd","Hc","ze","Sc","Qc","ad","Ob","Ad","Dd","Ae","Nb","Ic","Be","Kc","ed","$c","Jc","Bd","gd","Uc","Vc","put","Ce","De","Ee","Fe","Ge","He","Ie","Lc","Me","Ne","Oe","Pe","Qe","Re","Se","Te","Ue","Ve","We","Xe","Ye","Ze","$e","af","bf","cf","df","ef","gf","hf","jf","kf","lf","mf","nf","of","pf","qf","rf","tf","uf","vf","wf","xf","yf","zf","Af","Bf","Ke","Le","Je","kd","Cf","Df","Ef","Gf","Hf","If","Jf","Kf","Lf","Mf","Nf","Of","Pf","Predictor0","Predictor1","Predictor2","Predictor3","Predictor4","Predictor5","Predictor6","Predictor7","Predictor8","Predictor9","Predictor10","Predictor11","Predictor12","Predictor13","PredictorAdd0","PredictorAdd1","PredictorAdd2","ColorIndexInverseTransform","MapARGB","VP8LColorIndexInverseTransformAlpha","MapAlpha","VP8LPredictorsAdd","VP8LPredictors","VP8LPredictorsAdd_C","VP8LPredictors_C","UpsampleRgbLinePair","UpsampleBgrLinePair","UpsampleRgbaLinePair","UpsampleBgraLinePair","UpsampleArgbLinePair","UpsampleRgba4444LinePair","UpsampleRgb565LinePair","Qf","WebPDecodeRGBA","te","GetTag","data_off","GetLE24","GetLE32","webpdecoder","response","imagearray","src_off","alpha_chunk","alpha_size","alpha_offset","memcmp","fourcc","payload_size","payload_size_padded","src_off_","temp","WebPRiffParser","hasCompressionJS","compressBytes","lineLength","colorsPerPixel","level","filter_method","filterUp","filterSub","filterAverage","filterPaeth","applyPngFilterMethod","dat","prevLine","filter_methods","getFilterMethods","results","ind","getIndexOfSmallestSum","filterNone","up","upLeft","paethPredictor","pLeft","pUp","pUpLeft","arrays","sum","processPNG","trns","pal","smask","alphaData","hasColors","pixel","pbl","pDiff","total","getPredictorFromCompression","processGIF89A","reader","rawImageData","processGIF87A","fileSize","getUint32","reserved","headerSize","getInt32","planes","getUint16","bitPP","rawSize","hr","vr","importantColors","getUint8","quad","bitn","bit1","xlen","mode","bit4","before","after","bit8","bit15","dif_w","_1_5","bit16","_1_6","bit24","bit32","getData","processBMP","processWEBP","processRGBA","imagePixels","rgbOut","alphaOut","outIndex","alphaIndex","rgbData","setLanguage","langCode","languageSettings","isSubscribed","sq","ar-DZ","ar-BH","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-MA","ar-OM","ar-QA","ar-SA","ar-SY","ar-TN","ar-AE","ar-YE","an","hy","as","ast","az","eu","bn","br","bg","my","zh","zh-HK","zh-CN","zh-SG","zh-TW","co","cr","cs","nl","nl-BE","en","en-AU","en-BZ","en-CA","en-IE","en-JM","en-NZ","en-PH","en-ZA","en-TT","en-GB","en-US","en-ZW","eo","et","fo","fj","fi","fr","fr-BE","fr-CA","fr-FR","fr-LU","fr-MC","fr-CH","fy","fur","gd-IE","gl","de-AT","de-DE","de-LI","de-LU","de-CH","gu","ht","hi","hu","is","iu","it","it-CH","kn","ks","kk","km","ky","tlh","ko","ko-KP","ko-KR","lv","lt","mk","ms","ml","mt","mi","mr","mo","nv","ng","no","nn","or","om","fa-IR","pl","pt-BR","pa-IN","pa-PK","qu","rm","ro","ro-MO","ru","ru-MO","sz","sg","si","sr","sk","sl","so","es","es-AR","es-BO","es-CL","es-CO","es-CR","es-DO","es-EC","es-SV","es-GT","es-HN","es-MX","es-NI","es-PA","es-PY","es-PE","es-PR","es-ES","es-UY","es-VE","sw","sv","sv-FI","sv-SV","tt","th","tig","ts","tn","tr","tk","uk","hsb","ur","vi","vo","xh","ji","zu","languageCode","char_code","widths","Unicode","widthsFractionOf","fof","kerning","kerningFractionOf","kerningValue","prior_char_code","default_char_width","widthOfString","widthOfGlyph","characterToGlyph","widths_array","firstLineMaxLen","maxLen","answer","workingLen","startOfLine","maxlen","lineIndent","postProcess","line_length","textIndent","separator_length","current_word_length","spaceCharWidth","pad","wrds","wrd","idx","force","ln","paragraphs","fsize","newOptions","fontUnit_maxLen","__fontmetrics__","encoded","mappingUncompress","mappingCompress","keystring","valuestring","numberprefix","vals","uncompress","stringparts","parent_key_pair","sign","activeobject","parentchain","keyparts","valueparts","datalen","WinAnsiEncoding","encodings","Courier","Courier-Bold","Courier-BoldOblique","Courier-Oblique","Helvetica-Bold","Helvetica-BoldOblique","Helvetica-Oblique","Times-Roman","Times-Bold","Times-BoldItalic","Times-Italic","fontMetrics","Symbol","ZapfDingbats","metrics","file","existsFileInVFS","getFileFromVFS","TTFFont","glyIdsUsed","loadCanvg","canvg","addSvgAsImage","svg","ignoreMouse","ignoreAnimation","ignoreDimensions","doc","fromString","putTotalPages","pageExpression","replaceExpression","totalNumberOfPages","pdfEscape16","viewerPreferences","doReset","configuration","isValid","method","configurationTemplate","HideToolbar","defaultValue","explicitSet","valueSet","HideMenubar","HideWindowUI","FitWindow","CenterWindow","DisplayDocTitle","NonFullScreenPageMode","Direction","ViewArea","ViewClip","PrintArea","PrintClip","PrintScaling","Duplex","PickTrayByPDFSize","PrintPageRange","NumCopies","configurationKeys","rangeArray","arrayContainsElement","iterator","viewerpreferences","vPref","pdfDict","postPutResources","rdf_beginning","__metadata__","namespaceuri","utf8_xmpmeta_beginning","utf8_rdf_beginning","utf8_metadata","utf8_rdf_ending","utf8_xmpmeta_ending","total_len","metadata_object_number","addMetadata","padz","toUnicode","toUnicodeCmap","codes","range","unicode","unicodeMap","pdfOutput","subset","pdfOutput2","fontTable","cmap","fontDescriptor","PDFObject","bbox","stemV","italicAngle","ascender","decender","capHeight","DescendantFont","identityHFunction","hmtx","head","unitsPerEm","winAnsiEncodingFunction","utf8TextFunction","cmapConfirm","strText","codeMap","parms","_initializeVFS","vFS","addFileToVFS","filecontent","__bidiEngine__","_hasUbatB","_hasUbatS","_isInVisual","_isInRtl","_isOutVisual","_isOutRtl","_isSymmetricSwapping","_UNICODE_TYPES","_bidiUnicodeTypes","_STATE_TABLE_LTR","_STATE_TABLE_RTL","_TYPE_NAMES_MAP","EN","AN","_UNICODE_RANGES_MAP","5","6","7","32","251","254","255","_SWAP_TABLE","_LTR_RANGES_REG_EXPR","_lastArabic","_dir","_getCharType","rangeIdx","_isContextualDirRtl","charType","_resolveCharType","chars","types","resolvedTypes","wType","nType","cType","rtlCandidate","_invertString","sourceToTargetMap","levels","charArray","_computeLevels","hiLevel","params","action","newLevel","prevState","condPos","newState","stateTable","_handleUbatS","_invertByLevel","high","end","low","_reorder","_symmetricSwap","DIR_RTL","doBidiReorder","_init","isSymmetricSwappingOrig","isInputVisual","isOutputVisual","isInputRtl","isOutputRtl","isSymmetricSwapping","bidiEngine","Data","readString","Subset","registerTTF","directory","Directory","HeadTable","NameTable","CmapTable","hhea","HheaTable","maxp","MaxpTable","HmtxTable","post","PostTable","os2","OS2Table","loca","LocaTable","glyf","GlyfTable","exists","lineGap","xMin","yMin","xMax","yMax","raw","italic_angle","xHeight","familyClass","isSerif","isScript","isFixedPitch","character","glyph","forGlyph","advance","includeGap","gap","Table","readByte","writeUInt32","readInt32","int","writeInt32","writeUInt16","readInt16","writeInt16","writeString","readShort","writeShort","readLongLong","writeLongLong","readInt","writeInt","checksum","scalarType","tableCount","searchRange","entrySelector","rangeShift","tables","tag","adjustment","directoryLength","headOffset","log2","tableData","__slice","__hasProp","__extends","ctor","__super__","_super","revision","checkSumAdjustment","magicNumber","created","modified","macStyle","lowestRecPPEM","fontDirectionHint","indexToLocFormat","glyphDataFormat","CmapEntry","endCode","glyphId","glyphIds","idDelta","idRangeOffset","saveOffset","segCount","segCountX2","startCode","platformID","encodingID","language","charmap","charMap","diff","endCodes","glyphIDs","indexes","last","nextID","old","rangeOffsets","startCodes","startGlyph","subtable","_len1","_len2","_len3","_len4","_len5","_len6","_len7","_n","_name","_o","_p","_q","new","maxGlyphID","LN2","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","metricDataFormat","numberOfMetrics","averageCharWidth","weightClass","widthClass","ySubscriptXSize","ySubscriptYSize","ySubscriptXOffset","ySubscriptYOffset","ySuperscriptXSize","ySuperscriptYSize","ySuperscriptXOffset","ySuperscriptYOffset","yStrikeoutSize","yStrikeoutPosition","panose","charRange","vendorID","selection","firstCharIndex","lastCharIndex","ascent","winAscent","winDescent","codePageRange","defaultChar","breakChar","maxContext","numberOfGlyphs","underlinePosition","underlineThickness","minMemType42","maxMemType42","minMemType1","maxMemType1","glyphNameIndex","names","_results1","numGlyphs","NameEntry","languageID","entries","stringOffset","strings","nameID","copyright","fontSubfamily","uniqueSubfamily","postscriptName","trademark","manufacturer","designer","description","vendorUrl","designerUrl","license","licenseUrl","preferredFamily","preferredSubfamily","compatibleFull","sampleText","maxPoints","maxContours","maxCompositePoints","maxComponentContours","maxZones","maxTwilightPoints","maxStorage","maxFunctionDefs","maxInstructionDefs","maxStackElements","maxSizeOfInstructions","maxComponentElements","maxComponentDepth","lsbCount","lsb","leftSideBearings","cache","glyphFor","numberOfContours","lengthOf","CompoundGlyph","SimpleGlyph","glyphs","mapping","old2new","compound","glyphOffsets","activeGlyphs","glyfPtr","listGlyf","newLocaTable","unicodes","next","generateCmap","roman","unicodeCmap","glyphsFor","additionalIDs","glyID","ids","new2old","newIDs","nextGlyphID","oldID","oldIDs","invert","isString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEAEIA,EAAMC,sBCFCC,EAAe,WACxB,MAAO,oBAAuBC,OAC1BA,OACA,oBAAuBC,OACvBA,OACA,oBAAuBC,KACvBA,KACAC,KAPoB;;;;;;;ACO1B,SAASC,EAASC,GAahB,IAAIC,EAZJD,EAAeA,GAAgB,GAC/BF,KAAKI,IAAK,EAGoB,KAA1BF,EAAaG,OAAO,KAEtBH,EAAeA,EAAaI,OAAO,EAAG,IA2JxCJ,EAjJoB,CAClBK,UAAW,SACXC,aAAc,SACdC,KAAM,SACNC,WAAY,SACZC,MAAO,SACPC,MAAO,SACPC,OAAQ,SACRC,MAAO,SACPC,eAAgB,SAChBC,KAAM,SACNC,WAAY,SACZC,MAAO,SACPC,UAAW,SACXC,UAAW,SACXC,WAAY,SACZC,UAAW,SACXC,MAAO,SACPC,eAAgB,SAChBC,SAAU,SACVC,QAAS,SACTC,KAAM,SACNC,SAAU,SACVC,SAAU,SACVC,cAAe,SACfC,SAAU,SACVC,UAAW,SACXC,UAAW,SACXC,YAAa,SACbC,eAAgB,SAChBC,WAAY,SACZC,WAAY,SACZC,QAAS,SACTC,WAAY,SACZC,aAAc,SACdC,cAAe,SACfC,cAAe,SACfC,cAAe,SACfC,WAAY,SACZC,SAAU,SACVC,YAAa,SACbC,QAAS,SACTC,WAAY,SACZC,SAAU,SACVC,UAAW,SACXC,YAAa,SACbC,YAAa,SACbC,QAAS,SACTC,UAAW,SACXC,WAAY,SACZC,KAAM,SACNC,UAAW,SACXC,KAAM,SACNC,MAAO,SACPC,YAAa,SACbC,SAAU,SACVC,QAAS,SACTC,UAAW,SACXC,OAAQ,SACRC,MAAO,SACPC,MAAO,SACPC,SAAU,SACVC,cAAe,SACfC,UAAW,SACXC,aAAc,SACdC,UAAW,SACXC,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,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IAGEC,EAA2B,CAC7B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEEC,EAA0B,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,IAC7DC,EAA2B,CAC7B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KAEEC,EAA0B,CAC5B,EACA,EACA,EACA,EACA,EACA,GACA,EACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,EACA,GACA,IACA,GACA,GACA,IACA,IACA,IACA,EACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,IACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAGEC,EAA6B,CAC/B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEEC,EAA4B,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,IAC/DC,EAA6B,CAC/B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KAEEC,EAA4B,CAC9B,EACA,EACA,EACA,EACA,GACA,EACA,EACA,GACA,GACA,EACA,GACA,GACA,GACA,EACA,GACA,IACA,GACA,GACA,GACA,IACA,EACA,GACA,GACA,IACA,IACA,IACA,IACA,EACA,GACA,GACA,GACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,GACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAuKF,SAASC,EAAkBC,EAASC,GAIlC,IAHA,IAAIC,EAAY,EACZC,EAAe,EACfC,EAAK,IAAIp6D,MACJxC,EAAI,EAAGA,GAAK,GAAIA,IAAK,CAC5B,IAAK,IAAIwB,EAAI,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EAEDA,GAAKmiE,GAAS,CAEnB,IADA,IAAIE,EAAWriE,EACC,GAAT48D,EAAG58D,IAAWA,GAAKmiE,KACtBniE,EAEJ,IAAIsiE,EAAWtiE,EAAIqiE,EACnB,GAAIC,GApCI,GAoCa,CACnBF,EAAME,GAAY,EAClB,IAAK,IAAIC,EAAW,EAAGA,GAAYH,IAAOG,EACxCnE,EAAUY,GACZsD,GAAsB,GAExBnO,EAAM,MAAQyI,EAAG58D,GACjBo+D,EAAUU,GAAMwD,GAAY,GAAK5F,EAASvI,KAC1CiK,EAAU3B,EAAQtI,IAClBn0D,IAKF,OAjDU,IA8CNmiE,GACF/D,EAAUW,GAELH,EA8HT,SAAS4D,EAAW5S,IAClBA,EAAUnpD,KAAK8b,IAAI9b,KAAKwuC,IAAI2a,EAAS,GAAI,KAErCuM,GAAkBvM,MA1qBxB,SAAyB6S,GAoEvB,IAnEA,IAAIC,EAAM,CACR,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IAGO1iE,EAAI,EAAGA,EAAI,GAAIA,IAAK,CAC3B,IAAImC,EAAIi6D,GAAQsG,EAAI1iE,GAAKyiE,EAAK,IAAM,KACpCtgE,EAAIsE,KAAK8b,IAAI9b,KAAKwuC,IAAI9yC,EAAG,GAAI,KAC7Bk6D,EAAOgB,EAAOr9D,IAAMmC,EAoEtB,IAlEA,IAAIwgE,EAAO,CACT,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GAC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AIqG,KAAKiD,IAAIlI,EAAEyoE,IACfhoE,EAAI7B,GAAKC,EAAI,GAAK6W,EACpB5W,GAAKiB,GAAKlB,EAAI,GAAK6W,GAAK1V,EAAE+jE,GAC1BjlE,GAAKmgB,GAAKO,EAAI,GAAKxI,GAAKhX,EAAEwoE,GAE1B1pE,GADAA,GAAK+B,GAAK2e,EAAI,GAAKxI,GAAKhX,EAAE4jE,IACjB7jE,GAAK2V,EAAMuJ,GAAKjI,EAAMnW,GAAKmW,EACpClY,GAAK,MAAQkB,EAAEuN,EACfzO,GAAK,MAAQkB,EAAE0V,EACf5W,GAAK,MAAQkB,EAAEsoE,GACf,IAAM7yD,IAAO3W,GAAKF,GAAK8W,EAAK5W,GAAK2B,GAAKT,EAAEuoE,GAAMzpE,GAAK,MAAQkB,EAAEu6B,QAE5Dz7B,EAAI,EACTkB,EAAIlB,EAAI,EAAI,GAGhB,OAAI,GAAKkB,GACT,MAAQC,GAAKA,EAAEkpE,KAAOnpE,EAAI4yE,GAAG1yE,IADVF,EAIrB,IAAIukE,GAAK,GACPmB,GAAK,CACH,EACA,EACA,EACA,EACA,GACA,GACA,GACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,OACA,OACA,OACA,QACA,QACA,QACA,QACA,UAEFD,GAAK,GACLF,GAAK,GACLM,GAAK,EACLC,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEJM,EAAE,aAAc,iBAChB3xE,EAAKyiF,WAAa,WAChB,OAAO,YAETziF,EAAK0iF,WAAa,SAASn3E,GACzB,OAAOA,GAETvL,EAAK2iF,WAAa,SAASp3E,EAAGlB,EAAGmB,GAC/B,OAAOnB,EAAEmB,EAAI,IAEfxL,EAAK4iF,WAAa,SAASr3E,EAAGlB,EAAGmB,GAC/B,OAAOnB,EAAEmB,EAAI,IAEfxL,EAAK6iF,WAAa,SAASt3E,EAAGlB,EAAGmB,GAC/B,OAAOnB,EAAEmB,EAAI,IAEfxL,EAAK8iF,WAAa,SAASv3E,EAAGlB,EAAGmB,GA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F,SAEVzL,GAAMp4E,EAAK8jF,kBAAoB,GACjC1L,GAAGpuE,OAAS,IACXhK,EAAK+jF,eAAiB,IAAI/5E,OAAS,IACnChK,EAAKgkF,oBAAsB,IAAIh6E,OAAS,IACxChK,EAAKikF,iBAAmB,IAAIj6E,OAAS,GACtC,IAAIquE,GACFK,GACAC,GACAG,GACArB,GACAoB,GA+3BAxD,GAIA4F,GACAvG,GACAkJ,GACA3d,GACAud,GACAd,GACA5I,GACA3D,GACAkO,GACAjO,GACAkO,GACAL,GACAxB,GACAlH,GACAqH,GACAS,GACAC,GAIA3H,GACA+B,GACApC,GACAwG,GAz5BAlH,GAAKh0C,EAAE,KACPi0C,GAAKj0C,EAAE,MACPs8C,GAAKt8C,EAAE,KACPo9C,GAAKp9C,EAAE,KACP28C,GAAK,EACL7N,GAAKmF,GACLuG,GAAK8B,GACL3C,GAAIyD,GACJxuE,GAAIolE,GACJ7E,GAAK,EACL8F,GAAK,EACL+C,GAAK,EACL9C,GAAK,EACLL,GAAK,EACLxB,GAAK,EACL8E,GAAK,EACLzF,GAAK,EACLC,GAAK,EACLC,GAAK,EACLC,GAAK,GACL6H,GAAK,CAAC,EAAG,EAAG,GACZD,GAAK,CAAC,EAAG,EAAG,IACZpE,GAAK,CAAC,IAAK,IAAK,IAAK,IAAK,IAC1BuE,GAAK,CAAC,EAAG,EAAG,EAAG,EAAG,GAClBV,GAAK,CAAC,GAAI,GAAI,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,EAAG,EAAG,EAAG,EAAG,GAAI,GAAI,GAAI,GAAI,GAAI,IACpEzD,GAAK,CACH,GACA,EACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,EACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,EACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,GACA,GACA,EACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,IACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,IACA,GACA,IACA,GACA,IACA,IACA,GACA,KAEFmD,GAAK,CACH,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MAEFZ,GAAK,EACLyC,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAEFzK,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAEF3B,GAAK,KACL4O,GAAK,CACH,CAAC,IAAK,IAAK,IAAK,GAChB,CAAC,IAAK,IAAK,IAAK,IAAK,GACrB,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,GAC1B,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAE1DC,GAAK,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,GAAI,GAAI,EAAG,GAAI,GAAI,IACxD1J,GAAK,EAAE,EAAG,GAAI,EAAG,GAAI,EAAG,EAAG,EAAG,GAAI,EAAG,GAAI,GAAI,GAAI,EAAG,GAAI,EAAG,GAAI,GAAI,GACnEuJ,GAAK,CACH,CACE,CACE,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KACnD,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KACnD,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,MAErD,CACE,CAAC,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,IAAK,KACnD,CAA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AGvBpC,EAhaM,EAiaNr2E,EAAOo4E,EAASp4E,EAAMm3E,EAAmBC,GACzCp3E,EAAOk3E,EAAcl3E,EAAMm3E,GAC3Bd,EAlaM,EAmaNnB,GAAuB,EACvBl1E,EAAOo4E,EAASp4E,EAAMm3E,EAAmBC,GACzClC,EAAuBuD,EACvBz4E,EAAOk3E,EAAcl3E,EAAMm3E,UAxC7Bd,EA/XQ,EAgYRr2E,EAAOo4E,EAASp4E,EAAMm3E,EAAmBC,QAdzCf,EAAOtB,EAjXC,EADA,EAmXR/0E,EAAOo4E,EAASp4E,EAAMm3E,EAAmBC,GAuD3C,OAAOp3E,GAcTlrB,KAAK6/F,eAAet4D,WAAa,SAAS70B,GACpCA,IACFstF,EAActtF,EAAQkxF,cACtB1D,EAAextF,EAAQmxF,eACvB5D,EAAWvtF,EAAQoxF,WACnB3D,EAAYztF,EAAQqxF,YACpB3D,EAAuB1tF,EAAQsxF,sBAInChkG,KAAK6/F,eAAet4D,WAAW70B,GACxB1S,KAAK6/F,gBAGd,IAAIS,EA5jFmB,CACrB,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,MACA,IACA,MACA,MACA,IACA,MACA,MACA,IACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,IACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KA8jBE2D,EAAa,IAAIxxF,EAAMotF,eAAe,CAAE+D,eAAe,IAoC3DnxF,EAAMkB,IAAIiM,OAAOzO,KAAK,CAAC,kBAlCE,SAASN,GAChC,IAAIqa,EAAOra,EAAKqa,KAGZxY,GAFI7B,EAAKzF,EACLyF,EAAKgI,EACChI,EAAK6B,SAAW,IAG1B2pC,GAFQxrC,EAAKiiB,MACNpgB,EAAQ4gB,KACL,IAMd,GAJA5gB,EAAQkxF,cAC2B,kBAA1BlxF,EAAQkxF,eAA8BlxF,EAAQkxF,cACvDK,EAAW18D,WAAW70B,GAEuB,mBAAzChC,OAAOI,UAAUtG,SAASS,KAAKigB,GAA4B,CAC7D,IAAIphB,EAAI,EAER,IADAuyC,EAAU,GACLvyC,EAAI,EAAGA,EAAIohB,EAAKnhB,OAAQD,GAAK,EACgB,mBAA5C4G,OAAOI,UAAUtG,SAASS,KAAKigB,EAAKphB,IACtCuyC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rD,EAAIX,KAAK,MAEhB,MAAO,GAAK21B,GAGTy7D,EAnDa"}
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.umd.js
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.umd.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.umd.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,28942 @@
+/** @license
+ *
+ * jsPDF - PDF Document creation from JavaScript
+ * Version 2.5.2 Built on 2024-09-17T13:29:57.856Z
+ *                      CommitID 00000000
+ *
+ * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
+ *               2015-2021 yWorks GmbH, http://www.yworks.com
+ *               2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
+ *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
+ *               2010 Aaron Spike, https://github.com/acspike
+ *               2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2012 Pablo Hess, https://github.com/pablohess
+ *               2012 Florian Jenett, https://github.com/fjenett
+ *               2013 Warren Weckesser, https://github.com/warrenweckesser
+ *               2013 Youssef Beddad, https://github.com/lifof
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2013 Stefan Slonevskiy, https://github.com/stefslon
+ *               2013 Jeremy Morel, https://github.com/jmorel
+ *               2013 Christoph Hartmann, https://github.com/chris-rock
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Makes, https://github.com/dollaruw
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 Steven Spungin, https://github.com/Flamenco
+ *               2014 Kenneth Glassey, https://github.com/Gavvers
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Contributor(s):
+ *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
+ *    kim3er, mfo, alnorth, Flamenco
+ */
+
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
+  typeof define === 'function' && define.amd ? define(['exports'], factory) :
+  (global = global || self, factory(global.jspdf = {}));
+}(this, (function (exports) { 'use strict';
+
+  function _typeof(obj) {
+    "@babel/helpers - typeof";
+
+    if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
+      _typeof = function (obj) {
+        return typeof obj;
+      };
+    } else {
+      _typeof = function (obj) {
+        return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
+      };
+    }
+
+    return _typeof(obj);
+  }
+
+  var globalObject = function () {
+    return "undefined" !== typeof window ? window : "undefined" !== typeof global ? global : "undefined" !== typeof self ? self : this;
+  }();
+
+  function consoleLog() {
+    if (globalObject.console && typeof globalObject.console.log === "function") {
+      globalObject.console.log.apply(globalObject.console, arguments);
+    }
+  }
+
+  function consoleWarn(str) {
+    if (globalObject.console) {
+      if (typeof globalObject.console.warn === "function") {
+        globalObject.console.warn.apply(globalObject.console, arguments);
+      } else {
+        consoleLog.call(null, arguments);
+      }
+    }
+  }
+
+  function consoleError(str) {
+    if (globalObject.console) {
+      if (typeof globalObject.console.error === "function") {
+        globalObject.console.error.apply(globalObject.console, arguments);
+      } else {
+        consoleLog(str);
+      }
+    }
+  }
+
+  var console = {
+    log: consoleLog,
+    warn: consoleWarn,
+    error: consoleError
+  };
+
+  function bom(blob, opts) {
+    if (typeof opts === "undefined") opts = {
+      autoBom: false
+    };else if (_typeof(opts) !== "object") {
+      console.warn("Deprecated: Expected third argument to be a object");
+      opts = {
+        autoBom: !opts
+      };
+    } // prepend BOM for UTF-8 XML and text/* types (including HTML)
+    // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF
+
+    if (opts.autoBom && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(blob.type)) {
+      return new Blob([String.fromCharCode(0xfeff), blob], {
+        type: blob.type
+      });
+    }
+
+    return blob;
+  }
+
+  function download(url, name, opts) {
+    var xhr = new XMLHttpRequest();
+    xhr.open("GET", url);
+    xhr.responseType = "blob";
+
+    xhr.onload = function () {
+      saveAs(xhr.response, name, opts);
+    };
+
+    xhr.onerror = function () {
+      console.error("could not download file");
+    };
+
+    xhr.send();
+  }
+
+  function corsEnabled(url) {
+    var xhr = new XMLHttpRequest(); // use sync to avoid popup blocker
+
+    xhr.open("HEAD", url, false);
+
+    try {
+      xhr.send();
+    } catch (e) {}
+
+    return xhr.status >= 200 && xhr.status <= 299;
+  } // `a.click()` doesn't work for all browsers (#465)
+
+
+  function click(node) {
+    try {
+      node.dispatchEvent(new MouseEvent("click"));
+    } catch (e) {
+      var evt = document.createEvent("MouseEvents");
+      evt.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
+      node.dispatchEvent(evt);
+    }
+  }
+
+  var saveAs = globalObject.saveAs || ( // probably in some web worker
+  (typeof window === "undefined" ? "undefined" : _typeof(window)) !== "object" || window !== globalObject ? function saveAs() {
+    /* noop */
+  } : // Use download attribute first if possible (#193 Lumia mobile) unless this is a native app
+  typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype ? function saveAs(blob, name, opts) {
+    var URL = globalObject.URL || globalObject.webkitURL;
+    var a = document.createElement("a");
+    name = name || blob.name || "download";
+    a.download = name;
+    a.rel = "noopener"; // tabnabbing
+    // TODO: detect chrome extensions & packaged apps
+    // a.target = '_blank'
+
+    if (typeof blob === "string") {
+      // Support regular links
+      a.href = blob;
+
+      if (a.origin !== location.origin) {
+        corsEnabled(a.href) ? download(blob, name, opts) : click(a, a.target = "_blank");
+      } else {
+        click(a);
+      }
+    } else {
+      // Support blobs
+      a.href = URL.createObjectURL(blob);
+      setTimeout(function () {
+        URL.revokeObjectURL(a.href);
+      }, 4e4); // 40s
+
+      setTimeout(function () {
+        click(a);
+      }, 0);
+    }
+  } : // Use msSaveOrOpenBlob as a second approach
+  "msSaveOrOpenBlob" in navigator ? function saveAs(blob, name, opts) {
+    name = name || blob.name || "download";
+
+    if (typeof blob === "string") {
+      if (corsEnabled(blob)) {
+        download(blob, name, opts);
+      } else {
+        var a = document.createElement("a");
+        a.href = blob;
+        a.target = "_blank";
+        setTimeout(function () {
+          click(a);
+        });
+      }
+    } else {
+      navigator.msSaveOrOpenBlob(bom(blob, opts), name);
+    }
+  } : // Fallback to using FileReader and a popup
+  function saveAs(blob, name, opts, popup) {
+    // Open a popup immediately do go around popup blocker
+    // Mostly only available on user interaction and the fileReader is async so...
+    popup = popup || open("", "_blank");
+
+    if (popup) {
+      popup.document.title = popup.document.body.innerText = "downloading...";
+    }
+
+    if (typeof blob === "string") return download(blob, name, opts);
+    var force = blob.type === "application/octet-stream";
+
+    var isSafari = /constructor/i.test(globalObject.HTMLElement) || globalObject.safari;
+
+    var isChromeIOS = /CriOS\/[\d]+/.test(navigator.userAgent);
+
+    if ((isChromeIOS || force && isSafari) && (typeof FileReader === "undefined" ? "undefined" : _typeof(FileReader)) === "object") {
+      // Safari doesn't allow downloading of blob URLs
+      var reader = new FileReader();
+
+      reader.onloadend = function () {
+        var url = reader.result;
+        url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, "data:attachment/file;");
+        if (popup) popup.location.href = url;else location = url;
+        popup = null; // reverse-tabnabbing #460
+      };
+
+      reader.readAsDataURL(blob);
+    } else {
+      var URL = globalObject.URL || globalObject.webkitURL;
+      var url = URL.createObjectURL(blob);
+      if (popup) popup.location = url;else location.href = url;
+      popup = null; // reverse-tabnabbing #460
+
+      setTimeout(function () {
+        URL.revokeObjectURL(url);
+      }, 4e4); // 40s
+    }
+  });
+
+  /**
+   * A class to parse color values
+   * @author Stoyan Stefanov <sstoo@gmail.com>
+   * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
+   * @license Use it if you like it
+   */
+  function RGBColor(color_string) {
+    color_string = color_string || "";
+    this.ok = false; // strip any leading #
+
+    if (color_string.charAt(0) == "#") {
+      // remove # if any
+      color_string = color_string.substr(1, 6);
+    }
+
+    color_string = color_string.replace(/ /g, "");
+    color_string = color_string.toLowerCase();
+    var channels; // before getting into regexps, try simple matches
+    // and overwrite the input
+
+    var simple_colors = {
+      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"
+    };
+    color_string = simple_colors[color_string] || color_string; // array of color definition objects
+
+    var color_defs = [{
+      re: /^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,
+      example: ["rgb(123, 234, 45)", "rgb(255,234,245)"],
+      process: function process(bits) {
+        return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];
+      }
+    }, {
+      re: /^(\w{2})(\w{2})(\w{2})$/,
+      example: ["#00ff00", "336699"],
+      process: function process(bits) {
+        return [parseInt(bits[1], 16), parseInt(bits[2], 16), parseInt(bits[3], 16)];
+      }
+    }, {
+      re: /^(\w{1})(\w{1})(\w{1})$/,
+      example: ["#fb0", "f0f"],
+      process: function process(bits) {
+        return [parseInt(bits[1] + bits[1], 16), parseInt(bits[2] + bits[2], 16), parseInt(bits[3] + bits[3], 16)];
+      }
+    }]; // search through the definitions to find a match
+
+    for (var i = 0; i < color_defs.length; i++) {
+      var re = color_defs[i].re;
+      var processor = color_defs[i].process;
+      var bits = re.exec(color_string);
+
+      if (bits) {
+        channels = processor(bits);
+        this.r = channels[0];
+        this.g = channels[1];
+        this.b = channels[2];
+        this.ok = true;
+      }
+    } // validate/cleanup values
+
+
+    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; // some getters
+
+    this.toRGB = function () {
+      return "rgb(" + this.r + ", " + this.g + ", " + this.b + ")";
+    };
+
+    this.toHex = function () {
+      var r = this.r.toString(16);
+      var g = this.g.toString(16);
+      var b = this.b.toString(16);
+      if (r.length == 1) r = "0" + r;
+      if (g.length == 1) g = "0" + g;
+      if (b.length == 1) b = "0" + b;
+      return "#" + r + g + b;
+    };
+  }
+
+  var atob, btoa;
+
+  (function () {
+    atob = globalObject.atob.bind(globalObject);
+    btoa = globalObject.btoa.bind(globalObject);
+    return;
+  })();
+
+  /**
+   * @license
+   * Joseph Myers does not specify a particular license for his work.
+   *
+   * Author: Joseph Myers
+   * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
+   *
+   * Modified by: Owen Leong
+   */
+  function md5cycle(x, k) {
+    var a = x[0],
+        b = x[1],
+        c = x[2],
+        d = x[3];
+    a = ff(a, b, c, d, k[0], 7, -680876936);
+    d = ff(d, a, b, c, k[1], 12, -389564586);
+    c = ff(c, d, a, b, k[2], 17, 606105819);
+    b = ff(b, c, d, a, k[3], 22, -1044525330);
+    a = ff(a, b, c, d, k[4], 7, -176418897);
+    d = ff(d, a, b, c, k[5], 12, 1200080426);
+    c = ff(c, d, a, b, k[6], 17, -1473231341);
+    b = ff(b, c, d, a, k[7], 22, -45705983);
+    a = ff(a, b, c, d, k[8], 7, 1770035416);
+    d = ff(d, a, b, c, k[9], 12, -1958414417);
+    c = ff(c, d, a, b, k[10], 17, -42063);
+    b = ff(b, c, d, a, k[11], 22, -1990404162);
+    a = ff(a, b, c, d, k[12], 7, 1804603682);
+    d = ff(d, a, b, c, k[13], 12, -40341101);
+    c = ff(c, d, a, b, k[14], 17, -1502002290);
+    b = ff(b, c, d, a, k[15], 22, 1236535329);
+    a = gg(a, b, c, d, k[1], 5, -165796510);
+    d = gg(d, a, b, c, k[6], 9, -1069501632);
+    c = gg(c, d, a, b, k[11], 14, 643717713);
+    b = gg(b, c, d, a, k[0], 20, -373897302);
+    a = gg(a, b, c, d, k[5], 5, -701558691);
+    d = gg(d, a, b, c, k[10], 9, 38016083);
+    c = gg(c, d, a, b, k[15], 14, -660478335);
+    b = gg(b, c, d, a, k[4], 20, -405537848);
+    a = gg(a, b, c, d, k[9], 5, 568446438);
+    d = gg(d, a, b, c, k[14], 9, -1019803690);
+    c = gg(c, d, a, b, k[3], 14, -187363961);
+    b = gg(b, c, d, a, k[8], 20, 1163531501);
+    a = gg(a, b, c, d, k[13], 5, -1444681467);
+    d = gg(d, a, b, c, k[2], 9, -51403784);
+    c = gg(c, d, a, b, k[7], 14, 1735328473);
+    b = gg(b, c, d, a, k[12], 20, -1926607734);
+    a = hh(a, b, c, d, k[5], 4, -378558);
+    d = hh(d, a, b, c, k[8], 11, -2022574463);
+    c = hh(c, d, a, b, k[11], 16, 1839030562);
+    b = hh(b, c, d, a, k[14], 23, -35309556);
+    a = hh(a, b, c, d, k[1], 4, -1530992060);
+    d = hh(d, a, b, c, k[4], 11, 1272893353);
+    c = hh(c, d, a, b, k[7], 16, -155497632);
+    b = hh(b, c, d, a, k[10], 23, -1094730640);
+    a = hh(a, b, c, d, k[13], 4, 681279174);
+    d = hh(d, a, b, c, k[0], 11, -358537222);
+    c = hh(c, d, a, b, k[3], 16, -722521979);
+    b = hh(b, c, d, a, k[6], 23, 76029189);
+    a = hh(a, b, c, d, k[9], 4, -640364487);
+    d = hh(d, a, b, c, k[12], 11, -421815835);
+    c = hh(c, d, a, b, k[15], 16, 530742520);
+    b = hh(b, c, d, a, k[2], 23, -995338651);
+    a = ii(a, b, c, d, k[0], 6, -198630844);
+    d = ii(d, a, b, c, k[7], 10, 1126891415);
+    c = ii(c, d, a, b, k[14], 15, -1416354905);
+    b = ii(b, c, d, a, k[5], 21, -57434055);
+    a = ii(a, b, c, d, k[12], 6, 1700485571);
+    d = ii(d, a, b, c, k[3], 10, -1894986606);
+    c = ii(c, d, a, b, k[10], 15, -1051523);
+    b = ii(b, c, d, a, k[1], 21, -2054922799);
+    a = ii(a, b, c, d, k[8], 6, 1873313359);
+    d = ii(d, a, b, c, k[15], 10, -30611744);
+    c = ii(c, d, a, b, k[6], 15, -1560198380);
+    b = ii(b, c, d, a, k[13], 21, 1309151649);
+    a = ii(a, b, c, d, k[4], 6, -145523070);
+    d = ii(d, a, b, c, k[11], 10, -1120210379);
+    c = ii(c, d, a, b, k[2], 15, 718787259);
+    b = ii(b, c, d, a, k[9], 21, -343485551);
+    x[0] = add32(a, x[0]);
+    x[1] = add32(b, x[1]);
+    x[2] = add32(c, x[2]);
+    x[3] = add32(d, x[3]);
+  }
+
+  function cmn(q, a, b, x, s, t) {
+    a = add32(add32(a, q), add32(x, t));
+    return add32(a << s | a >>> 32 - s, b);
+  }
+
+  function ff(a, b, c, d, x, s, t) {
+    return cmn(b & c | ~b & d, a, b, x, s, t);
+  }
+
+  function gg(a, b, c, d, x, s, t) {
+    return cmn(b & d | c & ~d, a, b, x, s, t);
+  }
+
+  function hh(a, b, c, d, x, s, t) {
+    return cmn(b ^ c ^ d, a, b, x, s, t);
+  }
+
+  function ii(a, b, c, d, x, s, t) {
+    return cmn(c ^ (b | ~d), a, b, x, s, t);
+  }
+
+  function md51(s) {
+    // txt = '';
+    var n = s.length,
+        state = [1732584193, -271733879, -1732584194, 271733878],
+        i;
+
+    for (i = 64; i <= s.length; i += 64) {
+      md5cycle(state, md5blk(s.substring(i - 64, i)));
+    }
+
+    s = s.substring(i - 64);
+    var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+
+    for (i = 0; i < s.length; i++) {
+      tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);
+    }
+
+    tail[i >> 2] |= 0x80 << (i % 4 << 3);
+
+    if (i > 55) {
+      md5cycle(state, tail);
+
+      for (i = 0; i < 16; i++) {
+        tail[i] = 0;
+      }
+    }
+
+    tail[14] = n * 8;
+    md5cycle(state, tail);
+    return state;
+  }
+  /* there needs to be support for Unicode here,
+   * unless we pretend that we can redefine the MD-5
+   * algorithm for multi-byte characters (perhaps
+   * by adding every four 16-bit characters and
+   * shortening the sum to 32 bits). Otherwise
+   * I suggest performing MD-5 as if every character
+   * was two bytes--e.g., 0040 0025 = @%--but then
+   * how will an ordinary MD-5 sum be matched?
+   * There is no way to standardize text to something
+   * like UTF-8 before transformation; speed cost is
+   * utterly prohibitive. The JavaScript standard
+   * itself needs to look at this: it should start
+   * providing access to strings as preformed UTF-8
+   * 8-bit unsigned value arrays.
+   */
+
+
+  function md5blk(s) {
+    /* I figured global was faster.   */
+    var md5blks = [],
+        i;
+    /* Andy King said do it this way. */
+
+    for (i = 0; i < 64; i += 4) {
+      md5blks[i >> 2] = s.charCodeAt(i) + (s.charCodeAt(i + 1) << 8) + (s.charCodeAt(i + 2) << 16) + (s.charCodeAt(i + 3) << 24);
+    }
+
+    return md5blks;
+  }
+
+  var hex_chr = "0123456789abcdef".split("");
+
+  function rhex(n) {
+    var s = "",
+        j = 0;
+
+    for (; j < 4; j++) {
+      s += hex_chr[n >> j * 8 + 4 & 0x0f] + hex_chr[n >> j * 8 & 0x0f];
+    }
+
+    return s;
+  }
+
+  function hex(x) {
+    for (var i = 0; i < x.length; i++) {
+      x[i] = rhex(x[i]);
+    }
+
+    return x.join("");
+  } // Converts a 4-byte number to byte string
+
+
+  function singleToByteString(n) {
+    return String.fromCharCode((n & 0xff) >> 0, (n & 0xff00) >> 8, (n & 0xff0000) >> 16, (n & 0xff000000) >> 24);
+  } // Converts an array of numbers to a byte string
+
+
+  function toByteString(x) {
+    return x.map(singleToByteString).join("");
+  } // Returns the MD5 hash as a byte string
+
+
+  function md5Bin(s) {
+    return toByteString(md51(s));
+  } // Returns MD5 hash as a hex string
+
+
+  function md5(s) {
+    return hex(md51(s));
+  }
+
+  var md5Check = md5("hello") != "5d41402abc4b2a76b9719d911017c592";
+
+  function add32(a, b) {
+    if (md5Check) {
+      /* if the md5Check does not match
+       the expected value, we're dealing
+       with an old browser and need
+       this function. */
+      var lsw = (a & 0xffff) + (b & 0xffff),
+          msw = (a >> 16) + (b >> 16) + (lsw >> 16);
+      return msw << 16 | lsw & 0xffff;
+    } else {
+      /* this function is much faster,
+      so if possible we use it. Some IEs
+      are the only ones I know of that
+      need the idiotic second function,
+      generated by an if clause.  */
+      return a + b & 0xffffffff;
+    }
+  }
+
+  /**
+   * @license
+   * FPDF is released under a permissive license: there is no usage restriction.
+   * You may embed it freely in your application (commercial or not), with or
+   * without modifications.
+   *
+   * Reference: http://www.fpdf.org/en/script/script37.php
+   */
+  function repeat(str, num) {
+    return new Array(num + 1).join(str);
+  }
+  /**
+   * Converts a byte string to a hex string
+   *
+   * @name rc4
+   * @function
+   * @param {string} key Byte string of encryption key
+   * @param {string} data Byte string of data to be encrypted
+   * @returns {string} Encrypted string
+   */
+
+
+  function rc4(key, data) {
+    var lastKey, lastState;
+
+    if (key !== lastKey) {
+      var k = repeat(key, (256 / key.length >> 0) + 1);
+      var state = [];
+
+      for (var i = 0; i < 256; i++) {
+        state[i] = i;
+      }
+
+      var j = 0;
+
+      for (var i = 0; i < 256; i++) {
+        var t = state[i];
+        j = (j + t + k.charCodeAt(i)) % 256;
+        state[i] = state[j];
+        state[j] = t;
+      }
+
+      lastKey = key;
+      lastState = state;
+    } else {
+      state = lastState;
+    }
+
+    var length = data.length;
+    var a = 0;
+    var b = 0;
+    var out = "";
+
+    for (var i = 0; i < length; i++) {
+      a = (a + 1) % 256;
+      t = state[a];
+      b = (b + t) % 256;
+      state[a] = state[b];
+      state[b] = t;
+      k = state[(state[a] + state[b]) % 256];
+      out += String.fromCharCode(data.charCodeAt(i) ^ k);
+    }
+
+    return out;
+  }
+
+  /**
+   * @license
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   * Author: Owen Leong (@owenl131)
+   * Date: 15 Oct 2020
+   * References:
+   * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
+   * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
+   * http://www.fpdf.org/en/script/script37.php
+   */
+  var permissionOptions = {
+    print: 4,
+    modify: 8,
+    copy: 16,
+    "annot-forms": 32
+  };
+  /**
+   * Initializes encryption settings
+   *
+   * @name constructor
+   * @function
+   * @param {Array} permissions Permissions allowed for user, "print", "modify", "copy" and "annot-forms".
+   * @param {String} userPassword Permissions apply to this user. Leaving this empty means the document
+   *                              is not password protected but viewer has the above permissions.
+   * @param {String} ownerPassword Owner has full functionalities to the file.
+   * @param {String} fileId As hex string, should be same as the file ID in the trailer.
+   * @example
+   * var security = new PDFSecurity(["print"])
+   */
+
+  function PDFSecurity(permissions, userPassword, ownerPassword, fileId) {
+    this.v = 1; // algorithm 1, future work can add in more recent encryption schemes
+
+    this.r = 2; // revision 2
+    // set flags for what functionalities the user can access
+
+    var protection = 192;
+    permissions.forEach(function (perm) {
+      if (typeof permissionOptions.perm !== "undefined") {
+        throw new Error("Invalid permission: " + perm);
+      }
+
+      protection += permissionOptions[perm];
+    }); // padding is used to pad the passwords to 32 bytes, also is hashed and stored in the final PDF
+
+    this.padding = "\x28\xBF\x4E\x5E\x4E\x75\x8A\x41\x64\x00\x4E\x56\xFF\xFA\x01\x08" + "\x2E\x2E\x00\xB6\xD0\x68\x3E\x80\x2F\x0C\xA9\xFE\x64\x53\x69\x7A";
+    var paddedUserPassword = (userPassword + this.padding).substr(0, 32);
+    var paddedOwnerPassword = (ownerPassword + this.padding).substr(0, 32);
+    this.O = this.processOwnerPassword(paddedUserPassword, paddedOwnerPassword);
+    this.P = -((protection ^ 255) + 1);
+    this.encryptionKey = md5Bin(paddedUserPassword + this.O + this.lsbFirstWord(this.P) + this.hexToBytes(fileId)).substr(0, 5);
+    this.U = rc4(this.encryptionKey, this.padding);
+  }
+  /**
+   * Breaks down a 4-byte number into its individual bytes, with the least significant bit first
+   *
+   * @name lsbFirstWord
+   * @function
+   * @param {number} data 32-bit number
+   * @returns {Array}
+   */
+
+
+  PDFSecurity.prototype.lsbFirstWord = function (data) {
+    return String.fromCharCode(data >> 0 & 0xff, data >> 8 & 0xff, data >> 16 & 0xff, data >> 24 & 0xff);
+  };
+  /**
+   * Converts a byte string to a hex string
+   *
+   * @name toHexString
+   * @function
+   * @param {String} byteString Byte string
+   * @returns {String}
+   */
+
+
+  PDFSecurity.prototype.toHexString = function (byteString) {
+    return byteString.split("").map(function (byte) {
+      return ("0" + (byte.charCodeAt(0) & 0xff).toString(16)).slice(-2);
+    }).join("");
+  };
+  /**
+   * Converts a hex string to a byte string
+   *
+   * @name hexToBytes
+   * @function
+   * @param {String} hex Hex string
+   * @returns {String}
+   */
+
+
+  PDFSecurity.prototype.hexToBytes = function (hex) {
+    for (var bytes = [], c = 0; c < hex.length; c += 2) {
+      bytes.push(String.fromCharCode(parseInt(hex.substr(c, 2), 16)));
+    }
+
+    return bytes.join("");
+  };
+  /**
+   * Computes the 'O' field in the encryption dictionary
+   *
+   * @name processOwnerPassword
+   * @function
+   * @param {String} paddedUserPassword Byte string of padded user password
+   * @param {String} paddedOwnerPassword Byte string of padded owner password
+   * @returns {String}
+   */
+
+
+  PDFSecurity.prototype.processOwnerPassword = function (paddedUserPassword, paddedOwnerPassword) {
+    var key = md5Bin(paddedOwnerPassword).substr(0, 5);
+    return rc4(key, paddedUserPassword);
+  };
+  /**
+   * Returns an encryptor function which can take in a byte string and returns the encrypted version
+   *
+   * @name encryptor
+   * @function
+   * @param {number} objectId
+   * @param {number} generation Not sure what this is for, you can set it to 0
+   * @returns {Function}
+   * @example
+   * out("stream");
+   * encryptor = security.encryptor(object.id, 0);
+   * out(encryptor(data));
+   * out("endstream");
+   */
+
+
+  PDFSecurity.prototype.encryptor = function (objectId, generation) {
+    var key = md5Bin(this.encryptionKey + String.fromCharCode(objectId & 0xff, objectId >> 8 & 0xff, objectId >> 16 & 0xff, generation & 0xff, generation >> 8 & 0xff)).substr(0, 10);
+    return function (data) {
+      return rc4(key, data);
+    };
+  };
+
+  /**
+   * Convert string to `PDF Name Object`.
+   * Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object
+   * @param str
+   */
+  function toPDFName(str) {
+    // eslint-disable-next-line no-control-regex
+    if (/[^\u0000-\u00ff]/.test(str)) {
+      // non ascii string
+      throw new Error("Invalid PDF Name Object: " + str + ", Only accept ASCII characters.");
+    }
+
+    var result = "",
+        strLength = str.length;
+
+    for (var i = 0; i < strLength; i++) {
+      var charCode = str.charCodeAt(i);
+
+      if (charCode < 0x21 || charCode === 0x23
+      /* # */
+      || charCode === 0x25
+      /* % */
+      || charCode === 0x28
+      /* ( */
+      || charCode === 0x29
+      /* ) */
+      || charCode === 0x2f
+      /* / */
+      || charCode === 0x3c
+      /* < */
+      || charCode === 0x3e
+      /* > */
+      || charCode === 0x5b
+      /* [ */
+      || charCode === 0x5d
+      /* ] */
+      || charCode === 0x7b
+      /* { */
+      || charCode === 0x7d
+      /* } */
+      || charCode > 0x7e) {
+        // Char    CharCode    hexStr   paddingHexStr    Result
+        // "\t"    9           9        09               #09
+        // " "     32          20       20               #20
+        // "©"     169         a9       a9               #a9
+        var hexStr = charCode.toString(16),
+            paddingHexStr = ("0" + hexStr).slice(-2);
+        result += "#" + paddingHexStr;
+      } else {
+        // Other ASCII printable characters between 0x21 <= X <= 0x7e
+        result += str[i];
+      }
+    }
+
+    return result;
+  }
+
+  /**
+   * jsPDF's Internal PubSub Implementation.
+   * Backward compatible rewritten on 2014 by
+   * Diego Casorran, https://github.com/diegocr
+   *
+   * @class
+   * @name PubSub
+   * @ignore
+   */
+
+  function PubSub(context) {
+    if (_typeof(context) !== "object") {
+      throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");
+    }
+
+    var topics = {};
+
+    this.subscribe = function (topic, callback, once) {
+      once = once || false;
+
+      if (typeof topic !== "string" || typeof callback !== "function" || typeof once !== "boolean") {
+        throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");
+      }
+
+      if (!topics.hasOwnProperty(topic)) {
+        topics[topic] = {};
+      }
+
+      var token = Math.random().toString(35);
+      topics[topic][token] = [callback, !!once];
+      return token;
+    };
+
+    this.unsubscribe = function (token) {
+      for (var topic in topics) {
+        if (topics[topic][token]) {
+          delete topics[topic][token];
+
+          if (Object.keys(topics[topic]).length === 0) {
+            delete topics[topic];
+          }
+
+          return true;
+        }
+      }
+
+      return false;
+    };
+
+    this.publish = function (topic) {
+      if (topics.hasOwnProperty(topic)) {
+        var args = Array.prototype.slice.call(arguments, 1),
+            tokens = [];
+
+        for (var token in topics[topic]) {
+          var sub = topics[topic][token];
+
+          try {
+            sub[0].apply(context, args);
+          } catch (ex) {
+            if (globalObject.console) {
+              console.error("jsPDF PubSub Error", ex.message, ex);
+            }
+          }
+
+          if (sub[1]) tokens.push(token);
+        }
+
+        if (tokens.length) tokens.forEach(this.unsubscribe);
+      }
+    };
+
+    this.getTopics = function () {
+      return topics;
+    };
+  }
+
+  function GState(parameters) {
+    if (!(this instanceof GState)) {
+      return new GState(parameters);
+    }
+    /**
+     * @name GState#opacity
+     * @type {any}
+     */
+
+    /**
+     * @name GState#stroke-opacity
+     * @type {any}
+     */
+
+
+    var supported = "opacity,stroke-opacity".split(",");
+
+    for (var p in parameters) {
+      if (parameters.hasOwnProperty(p) && supported.indexOf(p) >= 0) {
+        this[p] = parameters[p];
+      }
+    }
+    /**
+     * @name GState#id
+     * @type {string}
+     */
+
+
+    this.id = ""; // set by addGState()
+
+    /**
+     * @name GState#objectNumber
+     * @type {number}
+     */
+
+    this.objectNumber = -1; // will be set by putGState()
+  }
+
+  GState.prototype.equals = function equals(other) {
+    var ignore = "id,objectNumber,equals";
+    var p;
+    if (!other || _typeof(other) !== _typeof(this)) return false;
+    var count = 0;
+
+    for (p in this) {
+      if (ignore.indexOf(p) >= 0) continue;
+      if (this.hasOwnProperty(p) && !other.hasOwnProperty(p)) return false;
+      if (this[p] !== other[p]) return false;
+      count++;
+    }
+
+    for (p in other) {
+      if (other.hasOwnProperty(p) && ignore.indexOf(p) < 0) count--;
+    }
+
+    return count === 0;
+  };
+
+  function Pattern(gState, matrix) {
+    this.gState = gState;
+    this.matrix = matrix;
+    this.id = ""; // set by addPattern()
+
+    this.objectNumber = -1; // will be set by putPattern()
+  }
+
+  function ShadingPattern(type, coords, colors, gState, matrix) {
+    if (!(this instanceof ShadingPattern)) {
+      return new ShadingPattern(type, coords, colors, gState, matrix);
+    } // see putPattern() for information how they are realized
+
+
+    this.type = type === "axial" ? 2 : 3;
+    this.coords = coords;
+    this.colors = colors;
+    Pattern.call(this, gState, matrix);
+  }
+
+  function TilingPattern(boundingBox, xStep, yStep, gState, matrix) {
+    if (!(this instanceof TilingPattern)) {
+      return new TilingPattern(boundingBox, xStep, yStep, gState, matrix);
+    }
+
+    this.boundingBox = boundingBox;
+    this.xStep = xStep;
+    this.yStep = yStep;
+    this.stream = ""; // set by endTilingPattern();
+
+    this.cloneIndex = 0;
+    Pattern.call(this, gState, matrix);
+  }
+  /**
+   * Creates new jsPDF document object instance.
+   * @name jsPDF
+   * @class
+   * @param {Object} [options] - Collection of settings initializing the jsPDF-instance
+   * @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are "portrait" or "landscape" (or shortcuts "p" or "l").<br />
+   * @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />
+   * Possible values are "pt" (points), "mm", "cm", "in", "px", "pc", "em" or "ex". Note that in order to get the correct scaling for "px"
+   * units, you need to enable the hotfix "px_scaling" by setting options.hotfixes = ["px_scaling"].
+   * @param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />
+   * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
+   * @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.
+   * @param {boolean} [options.compress=false] Compress the generated PDF.
+   * @param {number} [options.precision=16] Precision of the element-positions.
+   * @param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.
+   * @param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.
+   * @param {Object} [options.encryption]
+   * @param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.
+   * @param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.
+   * @param {string[]} [options.encryption.userPermissions] Array of permissions "print", "modify", "copy", "annot-forms", accessible by the user.
+   * @param {number|"smart"} [options.floatPrecision=16]
+   * @returns {jsPDF} jsPDF-instance
+   * @description
+   * ```
+   * {
+   *  orientation: 'p',
+   *  unit: 'mm',
+   *  format: 'a4',
+   *  putOnlyUsedFonts:true,
+   *  floatPrecision: 16 // or "smart", default is 16
+   * }
+   * ```
+   *
+   * @constructor
+   */
+
+
+  function jsPDF(options) {
+    var orientation = typeof arguments[0] === "string" ? arguments[0] : "p";
+    var unit = arguments[1];
+    var format = arguments[2];
+    var compressPdf = arguments[3];
+    var filters = [];
+    var userUnit = 1.0;
+    var precision;
+    var floatPrecision = 16;
+    var defaultPathOperation = "S";
+    var encryptionOptions = null;
+    options = options || {};
+
+    if (_typeof(options) === "object") {
+      orientation = options.orientation;
+      unit = options.unit || unit;
+      format = options.format || format;
+      compressPdf = options.compress || options.compressPdf || compressPdf;
+      encryptionOptions = options.encryption || null;
+
+      if (encryptionOptions !== null) {
+        encryptionOptions.userPassword = encryptionOptions.userPassword || "";
+        encryptionOptions.ownerPassword = encryptionOptions.ownerPassword || "";
+        encryptionOptions.userPermissions = encryptionOptions.userPermissions || [];
+      }
+
+      userUnit = typeof options.userUnit === "number" ? Math.abs(options.userUnit) : 1.0;
+
+      if (typeof options.precision !== "undefined") {
+        precision = options.precision;
+      }
+
+      if (typeof options.floatPrecision !== "undefined") {
+        floatPrecision = options.floatPrecision;
+      }
+
+      defaultPathOperation = options.defaultPathOperation || "S";
+    }
+
+    filters = options.filters || (compressPdf === true ? ["FlateEncode"] : filters);
+    unit = unit || "mm";
+    orientation = ("" + (orientation || "P")).toLowerCase();
+    var putOnlyUsedFonts = options.putOnlyUsedFonts || false;
+    var usedFonts = {};
+    var API = {
+      internal: {},
+      __private__: {}
+    };
+    API.__private__.PubSub = PubSub;
+    var pdfVersion = "1.3";
+
+    var getPdfVersion = API.__private__.getPdfVersion = function () {
+      return pdfVersion;
+    };
+
+    API.__private__.setPdfVersion = function (value) {
+      pdfVersion = value;
+    }; // Size in pt of various paper formats
+
+
+    var pageFormats = {
+      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]
+    };
+
+    API.__private__.getPageFormats = function () {
+      return pageFormats;
+    };
+
+    var getPageFormat = API.__private__.getPageFormat = function (value) {
+      return pageFormats[value];
+    };
+
+    format = format || "a4";
+    var ApiMode = {
+      COMPAT: "compat",
+      ADVANCED: "advanced"
+    };
+    var apiMode = ApiMode.COMPAT;
+
+    function advancedAPI() {
+      // prepend global change of basis matrix
+      // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix
+      // that does this job for us (however, texts, images and similar objects must be drawn bottom up))
+      this.saveGraphicsState();
+      out(new Matrix(scaleFactor, 0, 0, -scaleFactor, 0, getPageHeight() * scaleFactor).toString() + " cm");
+      this.setFontSize(this.getFontSize() / scaleFactor); // The default in MrRio's implementation is "S" (stroke), whereas the default in the yWorks implementation
+      // was "n" (none). Although this has nothing to do with transforms, we should use the API switch here.
+
+      defaultPathOperation = "n";
+      apiMode = ApiMode.ADVANCED;
+    }
+
+    function compatAPI() {
+      this.restoreGraphicsState();
+      defaultPathOperation = "S";
+      apiMode = ApiMode.COMPAT;
+    }
+    /**
+     * @function combineFontStyleAndFontWeight
+     * @param {string} fontStyle Fontstyle or variant. Example: "italic".
+     * @param {number | string} fontWeight Weight of the Font. Example: "normal" | 400
+     * @returns {string}
+     * @private
+     */
+
+
+    var combineFontStyleAndFontWeight = API.__private__.combineFontStyleAndFontWeight = function (fontStyle, fontWeight) {
+      if (fontStyle == "bold" && fontWeight == "normal" || fontStyle == "bold" && fontWeight == 400 || fontStyle == "normal" && fontWeight == "italic" || fontStyle == "bold" && fontWeight == "italic") {
+        throw new Error("Invalid Combination of fontweight and fontstyle");
+      }
+
+      if (fontWeight) {
+        fontStyle = fontWeight == 400 || fontWeight === "normal" ? fontStyle === "italic" ? "italic" : "normal" : (fontWeight == 700 || fontWeight === "bold") && fontStyle === "normal" ? "bold" : (fontWeight == 700 ? "bold" : fontWeight) + "" + fontStyle;
+      }
+
+      return fontStyle;
+    };
+    /**
+     * @callback ApiSwitchBody
+     * @param {jsPDF} pdf
+     */
+
+    /**
+     * For compatibility reasons jsPDF offers two API modes which differ in the way they convert between the the usual
+     * screen coordinates and the PDF coordinate system.
+     *   - "compat": Offers full compatibility across all plugins but does not allow arbitrary transforms
+     *   - "advanced": Allows arbitrary transforms and more advanced features like pattern fills. Some plugins might
+     *     not support this mode, though.
+     * Initial mode is "compat".
+     *
+     * You can either provide a callback to the body argument, which means that jsPDF will automatically switch back to
+     * the original API mode afterwards; or you can omit the callback and switch back manually using {@link compatAPI}.
+     *
+     * Note, that the calls to {@link saveGraphicsState} and {@link restoreGraphicsState} need to be balanced within the
+     * callback or between calls of this method and its counterpart {@link compatAPI}. Calls to {@link beginFormObject}
+     * or {@link beginTilingPattern} need to be closed by their counterparts before switching back to "compat" API mode.
+     *
+     * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.
+     * The API mode will be switched back automatically afterwards.
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name advancedAPI
+     */
+
+
+    API.advancedAPI = function (body) {
+      var doSwitch = apiMode === ApiMode.COMPAT;
+
+      if (doSwitch) {
+        advancedAPI.call(this);
+      }
+
+      if (typeof body !== "function") {
+        return this;
+      }
+
+      body(this);
+
+      if (doSwitch) {
+        compatAPI.call(this);
+      }
+
+      return this;
+    };
+    /**
+     * Switches to "compat" API mode. See {@link advancedAPI} for more details.
+     *
+     * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.
+     * The API mode will be switched back automatically afterwards.
+     * @return {jsPDF}
+     * @memberof jsPDF#
+     * @name compatApi
+     */
+
+
+    API.compatAPI = function (body) {
+      var doSwitch = apiMode === ApiMode.ADVANCED;
+
+      if (doSwitch) {
+        compatAPI.call(this);
+      }
+
+      if (typeof body !== "function") {
+        return this;
+      }
+
+      body(this);
+
+      if (doSwitch) {
+        advancedAPI.call(this);
+      }
+
+      return this;
+    };
+    /**
+     * @return {boolean} True iff the current API mode is "advanced". See {@link advancedAPI}.
+     * @memberof jsPDF#
+     * @name isAdvancedAPI
+     */
+
+
+    API.isAdvancedAPI = function () {
+      return apiMode === ApiMode.ADVANCED;
+    };
+
+    var advancedApiModeTrap = function advancedApiModeTrap(methodName) {
+      if (apiMode !== ApiMode.ADVANCED) {
+        throw new Error(methodName + " is only available in 'advanced' API mode. " + "You need to call advancedAPI() first.");
+      }
+    };
+
+    var roundToPrecision = API.roundToPrecision = API.__private__.roundToPrecision = function (number, parmPrecision) {
+      var tmpPrecision = precision || parmPrecision;
+
+      if (isNaN(number) || isNaN(tmpPrecision)) {
+        throw new Error("Invalid argument passed to jsPDF.roundToPrecision");
+      }
+
+      return number.toFixed(tmpPrecision).replace(/0+$/, "");
+    }; // high precision float
+
+
+    var hpf;
+
+    if (typeof floatPrecision === "number") {
+      hpf = API.hpf = API.__private__.hpf = function (number) {
+        if (isNaN(number)) {
+          throw new Error("Invalid argument passed to jsPDF.hpf");
+        }
+
+        return roundToPrecision(number, floatPrecision);
+      };
+    } else if (floatPrecision === "smart") {
+      hpf = API.hpf = API.__private__.hpf = function (number) {
+        if (isNaN(number)) {
+          throw new Error("Invalid argument passed to jsPDF.hpf");
+        }
+
+        if (number > -1 && number < 1) {
+          return roundToPrecision(number, 16);
+        } else {
+          return roundToPrecision(number, 5);
+        }
+      };
+    } else {
+      hpf = API.hpf = API.__private__.hpf = function (number) {
+        if (isNaN(number)) {
+          throw new Error("Invalid argument passed to jsPDF.hpf");
+        }
+
+        return roundToPrecision(number, 16);
+      };
+    }
+
+    var f2 = API.f2 = API.__private__.f2 = function (number) {
+      if (isNaN(number)) {
+        throw new Error("Invalid argument passed to jsPDF.f2");
+      }
+
+      return roundToPrecision(number, 2);
+    };
+
+    var f3 = API.__private__.f3 = function (number) {
+      if (isNaN(number)) {
+        throw new Error("Invalid argument passed to jsPDF.f3");
+      }
+
+      return roundToPrecision(number, 3);
+    };
+
+    var scale = API.scale = API.__private__.scale = function (number) {
+      if (isNaN(number)) {
+        throw new Error("Invalid argument passed to jsPDF.scale");
+      }
+
+      if (apiMode === ApiMode.COMPAT) {
+        return number * scaleFactor;
+      } else if (apiMode === ApiMode.ADVANCED) {
+        return number;
+      }
+    };
+
+    var transformY = function transformY(y) {
+      if (apiMode === ApiMode.COMPAT) {
+        return getPageHeight() - y;
+      } else if (apiMode === ApiMode.ADVANCED) {
+        return y;
+      }
+    };
+
+    var transformScaleY = function transformScaleY(y) {
+      return scale(transformY(y));
+    };
+    /**
+     * @name setPrecision
+     * @memberof jsPDF#
+     * @function
+     * @instance
+     * @param {string} precision
+     * @returns {jsPDF}
+     */
+
+
+    API.__private__.setPrecision = API.setPrecision = function (value) {
+      if (typeof parseInt(value, 10) === "number") {
+        precision = parseInt(value, 10);
+      }
+    };
+
+    var fileId = "00000000000000000000000000000000";
+
+    var getFileId = API.__private__.getFileId = function () {
+      return fileId;
+    };
+
+    var setFileId = API.__private__.setFileId = function (value) {
+      if (typeof value !== "undefined" && /^[a-fA-F0-9]{32}$/.test(value)) {
+        fileId = value.toUpperCase();
+      } else {
+        fileId = fileId.split("").map(function () {
+          return "ABCDEF0123456789".charAt(Math.floor(Math.random() * 16));
+        }).join("");
+      }
+
+      if (encryptionOptions !== null) {
+        encryption = new PDFSecurity(encryptionOptions.userPermissions, encryptionOptions.userPassword, encryptionOptions.ownerPassword, fileId);
+      }
+
+      return fileId;
+    };
+    /**
+     * @name setFileId
+     * @memberof jsPDF#
+     * @function
+     * @instance
+     * @param {string} value GUID.
+     * @returns {jsPDF}
+     */
+
+
+    API.setFileId = function (value) {
+      setFileId(value);
+      return this;
+    };
+    /**
+     * @name getFileId
+     * @memberof jsPDF#
+     * @function
+     * @instance
+     *
+     * @returns {string} GUID.
+     */
+
+
+    API.getFileId = function () {
+      return getFileId();
+    };
+
+    var creationDate;
+
+    var convertDateToPDFDate = API.__private__.convertDateToPDFDate = function (parmDate) {
+      var result = "";
+      var tzoffset = parmDate.getTimezoneOffset(),
+          tzsign = tzoffset < 0 ? "+" : "-",
+          tzhour = Math.floor(Math.abs(tzoffset / 60)),
+          tzmin = Math.abs(tzoffset % 60),
+          timeZoneString = [tzsign, padd2(tzhour), "'", padd2(tzmin), "'"].join("");
+      result = ["D:", parmDate.getFullYear(), padd2(parmDate.getMonth() + 1), padd2(parmDate.getDate()), padd2(parmDate.getHours()), padd2(parmDate.getMinutes()), padd2(parmDate.getSeconds()), timeZoneString].join("");
+      return result;
+    };
+
+    var convertPDFDateToDate = API.__private__.convertPDFDateToDate = function (parmPDFDate) {
+      var year = parseInt(parmPDFDate.substr(2, 4), 10);
+      var month = parseInt(parmPDFDate.substr(6, 2), 10) - 1;
+      var date = parseInt(parmPDFDate.substr(8, 2), 10);
+      var hour = parseInt(parmPDFDate.substr(10, 2), 10);
+      var minutes = parseInt(parmPDFDate.substr(12, 2), 10);
+      var seconds = parseInt(parmPDFDate.substr(14, 2), 10); // var timeZoneHour = parseInt(parmPDFDate.substr(16, 2), 10);
+      // var timeZoneMinutes = parseInt(parmPDFDate.substr(20, 2), 10);
+
+      var resultingDate = new Date(year, month, date, hour, minutes, seconds, 0);
+      return resultingDate;
+    };
+
+    var setCreationDate = API.__private__.setCreationDate = function (date) {
+      var tmpCreationDateString;
+      var regexPDFCreationDate = /^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])'?$/;
+
+      if (typeof date === "undefined") {
+        date = new Date();
+      }
+
+      if (date instanceof Date) {
+        tmpCreationDateString = convertDateToPDFDate(date);
+      } else if (regexPDFCreationDate.test(date)) {
+        tmpCreationDateString = date;
+      } else {
+        throw new Error("Invalid argument passed to jsPDF.setCreationDate");
+      }
+
+      creationDate = tmpCreationDateString;
+      return creationDate;
+    };
+
+    var getCreationDate = API.__private__.getCreationDate = function (type) {
+      var result = creationDate;
+
+      if (type === "jsDate") {
+        result = convertPDFDateToDate(creationDate);
+      }
+
+      return result;
+    };
+    /**
+     * @name setCreationDate
+     * @memberof jsPDF#
+     * @function
+     * @instance
+     * @param {Object} date
+     * @returns {jsPDF}
+     */
+
+
+    API.setCreationDate = function (date) {
+      setCreationDate(date);
+      return this;
+    };
+    /**
+     * @name getCreationDate
+     * @memberof jsPDF#
+     * @function
+     * @instance
+     * @param {Object} type
+     * @returns {Object}
+     */
+
+
+    API.getCreationDate = function (type) {
+      return getCreationDate(type);
+    };
+
+    var padd2 = API.__private__.padd2 = function (number) {
+      return ("0" + parseInt(number)).slice(-2);
+    };
+
+    var padd2Hex = API.__private__.padd2Hex = function (hexString) {
+      hexString = hexString.toString();
+      return ("00" + hexString).substr(hexString.length);
+    };
+
+    var objectNumber = 0; // 'n' Current object number
+
+    var offsets = []; // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.
+
+    var content = [];
+    var contentLength = 0;
+    var additionalObjects = [];
+    var pages = [];
+    var currentPage;
+    var hasCustomDestination = false;
+    var outputDestination = content;
+
+    var resetDocument = function resetDocument() {
+      //reset fields relevant for objectNumber generation and xref.
+      objectNumber = 0;
+      contentLength = 0;
+      content = [];
+      offsets = [];
+      additionalObjects = [];
+      rootDictionaryObjId = newObjectDeferred();
+      resourceDictionaryObjId = newObjectDeferred();
+    };
+
+    API.__private__.setCustomOutputDestination = function (destination) {
+      hasCustomDestination = true;
+      outputDestination = destination;
+    };
+
+    var setOutputDestination = function setOutputDestination(destination) {
+      if (!hasCustomDestination) {
+        outputDestination = destination;
+      }
+    };
+
+    API.__private__.resetCustomOutputDestination = function () {
+      hasCustomDestination = false;
+      outputDestination = content;
+    };
+
+    var out = API.__private__.out = function (string) {
+      string = string.toString();
+      contentLength += string.length + 1;
+      outputDestination.push(string);
+      return outputDestination;
+    };
+
+    var write = API.__private__.write = function (value) {
+      return out(arguments.length === 1 ? value.toString() : Array.prototype.join.call(arguments, " "));
+    };
+
+    var getArrayBuffer = API.__private__.getArrayBuffer = function (data) {
+      var len = data.length,
+          ab = new ArrayBuffer(len),
+          u8 = new Uint8Array(ab);
+
+      while (len--) {
+        u8[len] = data.charCodeAt(len);
+      }
+
+      return ab;
+    };
+
+    var standardFonts = [["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]];
+
+    API.__private__.getStandardFonts = function () {
+      return standardFonts;
+    };
+
+    var activeFontSize = options.fontSize || 16;
+    /**
+     * Sets font size for upcoming text elements.
+     *
+     * @param {number} size Font size in points.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setFontSize
+     */
+
+    API.__private__.setFontSize = API.setFontSize = function (size) {
+      if (apiMode === ApiMode.ADVANCED) {
+        activeFontSize = size / scaleFactor;
+      } else {
+        activeFontSize = size;
+      }
+
+      return this;
+    };
+    /**
+     * Gets the fontsize for upcoming text elements.
+     *
+     * @function
+     * @instance
+     * @returns {number}
+     * @memberof jsPDF#
+     * @name getFontSize
+     */
+
+
+    var getFontSize = API.__private__.getFontSize = API.getFontSize = function () {
+      if (apiMode === ApiMode.COMPAT) {
+        return activeFontSize;
+      } else {
+        return activeFontSize * scaleFactor;
+      }
+    };
+
+    var R2L = options.R2L || false;
+    /**
+     * Set value of R2L functionality.
+     *
+     * @param {boolean} value
+     * @function
+     * @instance
+     * @returns {jsPDF} jsPDF-instance
+     * @memberof jsPDF#
+     * @name setR2L
+     */
+
+    API.__private__.setR2L = API.setR2L = function (value) {
+      R2L = value;
+      return this;
+    };
+    /**
+     * Get value of R2L functionality.
+     *
+     * @function
+     * @instance
+     * @returns {boolean} jsPDF-instance
+     * @memberof jsPDF#
+     * @name getR2L
+     */
+
+
+    API.__private__.getR2L = API.getR2L = function () {
+      return R2L;
+    };
+
+    var zoomMode; // default: 1;
+
+    var setZoomMode = API.__private__.setZoomMode = function (zoom) {
+      var validZoomModes = [undefined, null, "fullwidth", "fullheight", "fullpage", "original"];
+
+      if (/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(zoom)) {
+        zoomMode = zoom;
+      } else if (!isNaN(zoom)) {
+        zoomMode = parseInt(zoom, 10);
+      } else if (validZoomModes.indexOf(zoom) !== -1) {
+        zoomMode = zoom;
+      } else {
+        throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "' + zoom + '" is not recognized.');
+      }
+    };
+
+    API.__private__.getZoomMode = function () {
+      return zoomMode;
+    };
+
+    var pageMode; // default: 'UseOutlines';
+
+    var setPageMode = API.__private__.setPageMode = function (pmode) {
+      var validPageModes = [undefined, null, "UseNone", "UseOutlines", "UseThumbs", "FullScreen"];
+
+      if (validPageModes.indexOf(pmode) == -1) {
+        throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "' + pmode + '" is not recognized.');
+      }
+
+      pageMode = pmode;
+    };
+
+    API.__private__.getPageMode = function () {
+      return pageMode;
+    };
+
+    var layoutMode; // default: 'continuous';
+
+    var setLayoutMode = API.__private__.setLayoutMode = function (layout) {
+      var validLayoutModes = [undefined, null, "continuous", "single", "twoleft", "tworight", "two"];
+
+      if (validLayoutModes.indexOf(layout) == -1) {
+        throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "' + layout + '" is not recognized.');
+      }
+
+      layoutMode = layout;
+    };
+
+    API.__private__.getLayoutMode = function () {
+      return layoutMode;
+    };
+    /**
+     * Set the display mode options of the page like zoom and layout.
+     *
+     * @name setDisplayMode
+     * @memberof jsPDF#
+     * @function
+     * @instance
+     * @param {integer|String} zoom   You can pass an integer or percentage as
+     * a string. 2 will scale the document up 2x, '200%' will scale up by the
+     * same amount. You can also set it to 'fullwidth', 'fullheight',
+     * 'fullpage', or 'original'.
+     *
+     * Only certain PDF readers support this, such as Adobe Acrobat.
+     *
+     * @param {string} layout Layout mode can be: 'continuous' - this is the
+     * default continuous scroll. 'single' - the single page mode only shows one
+     * page at a time. 'twoleft' - two column left mode, first page starts on
+     * the left, and 'tworight' - pages are laid out in two columns, with the
+     * first page on the right. This would be used for books.
+     * @param {string} pmode 'UseOutlines' - it shows the
+     * outline of the document on the left. 'UseThumbs' - shows thumbnails along
+     * the left. 'FullScreen' - prompts the user to enter fullscreen mode.
+     *
+     * @returns {jsPDF}
+     */
+
+
+    API.__private__.setDisplayMode = API.setDisplayMode = function (zoom, layout, pmode) {
+      setZoomMode(zoom);
+      setLayoutMode(layout);
+      setPageMode(pmode);
+      return this;
+    };
+
+    var documentProperties = {
+      title: "",
+      subject: "",
+      author: "",
+      keywords: "",
+      creator: ""
+    };
+
+    API.__private__.getDocumentProperty = function (key) {
+      if (Object.keys(documentProperties).indexOf(key) === -1) {
+        throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");
+      }
+
+      return documentProperties[key];
+    };
+
+    API.__private__.getDocumentProperties = function () {
+      return documentProperties;
+    };
+    /**
+     * Adds a properties to the PDF document.
+     *
+     * @param {Object} A property_name-to-property_value object structure.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setDocumentProperties
+     */
+
+
+    API.__private__.setDocumentProperties = API.setProperties = API.setDocumentProperties = function (properties) {
+      // copying only those properties we can render.
+      for (var property in documentProperties) {
+        if (documentProperties.hasOwnProperty(property) && properties[property]) {
+          documentProperties[property] = properties[property];
+        }
+      }
+
+      return this;
+    };
+
+    API.__private__.setDocumentProperty = function (key, value) {
+      if (Object.keys(documentProperties).indexOf(key) === -1) {
+        throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");
+      }
+
+      return documentProperties[key] = value;
+    };
+
+    var fonts = {}; // collection of font objects, where key is fontKey - a dynamically created label for a given font.
+
+    var fontmap = {}; // mapping structure fontName > fontStyle > font key - performance layer. See addFont()
+
+    var activeFontKey; // will be string representing the KEY of the font as combination of fontName + fontStyle
+
+    var fontStateStack = []; //
+
+    var patterns = {}; // collection of pattern objects
+
+    var patternMap = {}; // see fonts
+
+    var gStates = {}; // collection of graphic state objects
+
+    var gStatesMap = {}; // see fonts
+
+    var activeGState = null;
+    var scaleFactor; // Scale factor
+
+    var page = 0;
+    var pagesContext = [];
+    var events = new PubSub(API);
+    var hotfixes = options.hotfixes || [];
+    var renderTargets = {};
+    var renderTargetMap = {};
+    var renderTargetStack = [];
+    var pageX;
+    var pageY;
+    var pageMatrix; // only used for FormObjects
+
+    /**
+     * A matrix object for 2D homogenous transformations: <br>
+     * | a b 0 | <br>
+     * | c d 0 | <br>
+     * | e f 1 | <br>
+     * pdf multiplies matrices righthand: v' = v x m1 x m2 x ...
+     *
+     * @class
+     * @name Matrix
+     * @param {number} sx
+     * @param {number} shy
+     * @param {number} shx
+     * @param {number} sy
+     * @param {number} tx
+     * @param {number} ty
+     * @constructor
+     */
+
+    var Matrix = function Matrix(sx, shy, shx, sy, tx, ty) {
+      if (!(this instanceof Matrix)) {
+        return new Matrix(sx, shy, shx, sy, tx, ty);
+      }
+
+      if (isNaN(sx)) sx = 1;
+      if (isNaN(shy)) shy = 0;
+      if (isNaN(shx)) shx = 0;
+      if (isNaN(sy)) sy = 1;
+      if (isNaN(tx)) tx = 0;
+      if (isNaN(ty)) ty = 0;
+      this._matrix = [sx, shy, shx, sy, tx, ty];
+    };
+    /**
+     * @name sx
+     * @memberof Matrix#
+     */
+
+
+    Object.defineProperty(Matrix.prototype, "sx", {
+      get: function get() {
+        return this._matrix[0];
+      },
+      set: function set(value) {
+        this._matrix[0] = value;
+      }
+    });
+    /**
+     * @name shy
+     * @memberof Matrix#
+     */
+
+    Object.defineProperty(Matrix.prototype, "shy", {
+      get: function get() {
+        return this._matrix[1];
+      },
+      set: function set(value) {
+        this._matrix[1] = value;
+      }
+    });
+    /**
+     * @name shx
+     * @memberof Matrix#
+     */
+
+    Object.defineProperty(Matrix.prototype, "shx", {
+      get: function get() {
+        return this._matrix[2];
+      },
+      set: function set(value) {
+        this._matrix[2] = value;
+      }
+    });
+    /**
+     * @name sy
+     * @memberof Matrix#
+     */
+
+    Object.defineProperty(Matrix.prototype, "sy", {
+      get: function get() {
+        return this._matrix[3];
+      },
+      set: function set(value) {
+        this._matrix[3] = value;
+      }
+    });
+    /**
+     * @name tx
+     * @memberof Matrix#
+     */
+
+    Object.defineProperty(Matrix.prototype, "tx", {
+      get: function get() {
+        return this._matrix[4];
+      },
+      set: function set(value) {
+        this._matrix[4] = value;
+      }
+    });
+    /**
+     * @name ty
+     * @memberof Matrix#
+     */
+
+    Object.defineProperty(Matrix.prototype, "ty", {
+      get: function get() {
+        return this._matrix[5];
+      },
+      set: function set(value) {
+        this._matrix[5] = value;
+      }
+    });
+    Object.defineProperty(Matrix.prototype, "a", {
+      get: function get() {
+        return this._matrix[0];
+      },
+      set: function set(value) {
+        this._matrix[0] = value;
+      }
+    });
+    Object.defineProperty(Matrix.prototype, "b", {
+      get: function get() {
+        return this._matrix[1];
+      },
+      set: function set(value) {
+        this._matrix[1] = value;
+      }
+    });
+    Object.defineProperty(Matrix.prototype, "c", {
+      get: function get() {
+        return this._matrix[2];
+      },
+      set: function set(value) {
+        this._matrix[2] = value;
+      }
+    });
+    Object.defineProperty(Matrix.prototype, "d", {
+      get: function get() {
+        return this._matrix[3];
+      },
+      set: function set(value) {
+        this._matrix[3] = value;
+      }
+    });
+    Object.defineProperty(Matrix.prototype, "e", {
+      get: function get() {
+        return this._matrix[4];
+      },
+      set: function set(value) {
+        this._matrix[4] = value;
+      }
+    });
+    Object.defineProperty(Matrix.prototype, "f", {
+      get: function get() {
+        return this._matrix[5];
+      },
+      set: function set(value) {
+        this._matrix[5] = value;
+      }
+    });
+    /**
+     * @name rotation
+     * @memberof Matrix#
+     */
+
+    Object.defineProperty(Matrix.prototype, "rotation", {
+      get: function get() {
+        return Math.atan2(this.shx, this.sx);
+      }
+    });
+    /**
+     * @name scaleX
+     * @memberof Matrix#
+     */
+
+    Object.defineProperty(Matrix.prototype, "scaleX", {
+      get: function get() {
+        return this.decompose().scale.sx;
+      }
+    });
+    /**
+     * @name scaleY
+     * @memberof Matrix#
+     */
+
+    Object.defineProperty(Matrix.prototype, "scaleY", {
+      get: function get() {
+        return this.decompose().scale.sy;
+      }
+    });
+    /**
+     * @name isIdentity
+     * @memberof Matrix#
+     */
+
+    Object.defineProperty(Matrix.prototype, "isIdentity", {
+      get: function get() {
+        if (this.sx !== 1) {
+          return false;
+        }
+
+        if (this.shy !== 0) {
+          return false;
+        }
+
+        if (this.shx !== 0) {
+          return false;
+        }
+
+        if (this.sy !== 1) {
+          return false;
+        }
+
+        if (this.tx !== 0) {
+          return false;
+        }
+
+        if (this.ty !== 0) {
+          return false;
+        }
+
+        return true;
+      }
+    });
+    /**
+     * Join the Matrix Values to a String
+     *
+     * @function join
+     * @param {string} separator Specifies a string to separate each pair of adjacent elements of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma (","). If separator is an empty string, all elements are joined without any characters in between them.
+     * @returns {string} A string with all array elements joined.
+     * @memberof Matrix#
+     */
+
+    Matrix.prototype.join = function (separator) {
+      return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty].map(hpf).join(separator);
+    };
+    /**
+     * Multiply the matrix with given Matrix
+     *
+     * @function multiply
+     * @param matrix
+     * @returns {Matrix}
+     * @memberof Matrix#
+     */
+
+
+    Matrix.prototype.multiply = function (matrix) {
+      var sx = matrix.sx * this.sx + matrix.shy * this.shx;
+      var shy = matrix.sx * this.shy + matrix.shy * this.sy;
+      var shx = matrix.shx * this.sx + matrix.sy * this.shx;
+      var sy = matrix.shx * this.shy + matrix.sy * this.sy;
+      var tx = matrix.tx * this.sx + matrix.ty * this.shx + this.tx;
+      var ty = matrix.tx * this.shy + matrix.ty * this.sy + this.ty;
+      return new Matrix(sx, shy, shx, sy, tx, ty);
+    };
+    /**
+     * @function decompose
+     * @memberof Matrix#
+     */
+
+
+    Matrix.prototype.decompose = function () {
+      var a = this.sx;
+      var b = this.shy;
+      var c = this.shx;
+      var d = this.sy;
+      var e = this.tx;
+      var f = this.ty;
+      var scaleX = Math.sqrt(a * a + b * b);
+      a /= scaleX;
+      b /= scaleX;
+      var shear = a * c + b * d;
+      c -= a * shear;
+      d -= b * shear;
+      var scaleY = Math.sqrt(c * c + d * d);
+      c /= scaleY;
+      d /= scaleY;
+      shear /= scaleY;
+
+      if (a * d < b * c) {
+        a = -a;
+        b = -b;
+        shear = -shear;
+        scaleX = -scaleX;
+      }
+
+      return {
+        scale: new Matrix(scaleX, 0, 0, scaleY, 0, 0),
+        translate: new Matrix(1, 0, 0, 1, e, f),
+        rotate: new Matrix(a, b, -b, a, 0, 0),
+        skew: new Matrix(1, 0, shear, 1, 0, 0)
+      };
+    };
+    /**
+     * @function toString
+     * @memberof Matrix#
+     */
+
+
+    Matrix.prototype.toString = function (parmPrecision) {
+      return this.join(" ");
+    };
+    /**
+     * @function inversed
+     * @memberof Matrix#
+     */
+
+
+    Matrix.prototype.inversed = function () {
+      var a = this.sx,
+          b = this.shy,
+          c = this.shx,
+          d = this.sy,
+          e = this.tx,
+          f = this.ty;
+      var quot = 1 / (a * d - b * c);
+      var aInv = d * quot;
+      var bInv = -b * quot;
+      var cInv = -c * quot;
+      var dInv = a * quot;
+      var eInv = -aInv * e - cInv * f;
+      var fInv = -bInv * e - dInv * f;
+      return new Matrix(aInv, bInv, cInv, dInv, eInv, fInv);
+    };
+    /**
+     * @function applyToPoint
+     * @memberof Matrix#
+     */
+
+
+    Matrix.prototype.applyToPoint = function (pt) {
+      var x = pt.x * this.sx + pt.y * this.shx + this.tx;
+      var y = pt.x * this.shy + pt.y * this.sy + this.ty;
+      return new Point(x, y);
+    };
+    /**
+     * @function applyToRectangle
+     * @memberof Matrix#
+     */
+
+
+    Matrix.prototype.applyToRectangle = function (rect) {
+      var pt1 = this.applyToPoint(rect);
+      var pt2 = this.applyToPoint(new Point(rect.x + rect.w, rect.y + rect.h));
+      return new Rectangle(pt1.x, pt1.y, pt2.x - pt1.x, pt2.y - pt1.y);
+    };
+    /**
+     * Clone the Matrix
+     *
+     * @function clone
+     * @memberof Matrix#
+     * @name clone
+     * @instance
+     */
+
+
+    Matrix.prototype.clone = function () {
+      var sx = this.sx;
+      var shy = this.shy;
+      var shx = this.shx;
+      var sy = this.sy;
+      var tx = this.tx;
+      var ty = this.ty;
+      return new Matrix(sx, shy, shx, sy, tx, ty);
+    };
+
+    API.Matrix = Matrix;
+    /**
+     * Multiplies two matrices. (see {@link Matrix})
+     * @param {Matrix} m1
+     * @param {Matrix} m2
+     * @memberof jsPDF#
+     * @name matrixMult
+     */
+
+    var matrixMult = API.matrixMult = function (m1, m2) {
+      return m2.multiply(m1);
+    };
+    /**
+     * The identity matrix (equivalent to new Matrix(1, 0, 0, 1, 0, 0)).
+     * @type {Matrix}
+     * @memberof! jsPDF#
+     * @name identityMatrix
+     */
+
+
+    var identityMatrix = new Matrix(1, 0, 0, 1, 0, 0);
+    API.unitMatrix = API.identityMatrix = identityMatrix;
+    /**
+     * Adds a new pattern for later use.
+     * @param {String} key The key by it can be referenced later. The keys must be unique!
+     * @param {API.Pattern} pattern The pattern
+     */
+
+    var addPattern = function addPattern(key, pattern) {
+      // only add it if it is not already present (the keys provided by the user must be unique!)
+      if (patternMap[key]) return;
+      var prefix = pattern instanceof ShadingPattern ? "Sh" : "P";
+      var patternKey = prefix + (Object.keys(patterns).length + 1).toString(10);
+      pattern.id = patternKey;
+      patternMap[key] = patternKey;
+      patterns[patternKey] = pattern;
+      events.publish("addPattern", pattern);
+    };
+    /**
+     * A pattern describing a shading pattern.
+     *
+     * Only available in "advanced" API mode.
+     *
+     * @param {String} type One of "axial" or "radial"
+     * @param {Array<Number>} coords Either [x1, y1, x2, y2] for "axial" type describing the two interpolation points
+     * or [x1, y1, r, x2, y2, r2] for "radial" describing inner and the outer circle.
+     * @param {Array<Object>} colors An array of objects with the fields "offset" and "color". "offset" describes
+     * the offset in parameter space [0, 1]. "color" is an array of length 3 describing RGB values in [0, 255].
+     * @param {GState=} gState An additional graphics state that gets applied to the pattern (optional).
+     * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system
+     * and the use coordinate system (optional).
+     * @constructor
+     * @extends API.Pattern
+     */
+
+
+    API.ShadingPattern = ShadingPattern;
+    /**
+     * A PDF Tiling pattern.
+     *
+     * Only available in "advanced" API mode.
+     *
+     * @param {Array.<Number>} boundingBox The bounding box at which one pattern cell gets clipped.
+     * @param {Number} xStep Horizontal spacing between pattern cells.
+     * @param {Number} yStep Vertical spacing between pattern cells.
+     * @param {API.GState=} gState An additional graphics state that gets applied to the pattern (optional).
+     * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system
+     * and the use coordinate system (optional).
+     * @constructor
+     * @extends API.Pattern
+     */
+
+    API.TilingPattern = TilingPattern;
+    /**
+     * Adds a new {@link API.ShadingPattern} for later use. Only available in "advanced" API mode.
+     * @param {String} key
+     * @param {Pattern} pattern
+     * @function
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name addPattern
+     */
+
+    API.addShadingPattern = function (key, pattern) {
+      advancedApiModeTrap("addShadingPattern()");
+      addPattern(key, pattern);
+      return this;
+    };
+    /**
+     * Begins a new tiling pattern. All subsequent render calls are drawn to this pattern until {@link API.endTilingPattern}
+     * gets called. Only available in "advanced" API mode.
+     * @param {API.Pattern} pattern
+     * @memberof jsPDF#
+     * @name beginTilingPattern
+     */
+
+
+    API.beginTilingPattern = function (pattern) {
+      advancedApiModeTrap("beginTilingPattern()");
+      beginNewRenderTarget(pattern.boundingBox[0], pattern.boundingBox[1], pattern.boundingBox[2] - pattern.boundingBox[0], pattern.boundingBox[3] - pattern.boundingBox[1], pattern.matrix);
+    };
+    /**
+     * Ends a tiling pattern and sets the render target to the one active before {@link API.beginTilingPattern} has been called.
+     *
+     * Only available in "advanced" API mode.
+     *
+     * @param {string} key A unique key that is used to reference this pattern at later use.
+     * @param {API.Pattern} pattern The pattern to end.
+     * @memberof jsPDF#
+     * @name endTilingPattern
+     */
+
+
+    API.endTilingPattern = function (key, pattern) {
+      advancedApiModeTrap("endTilingPattern()"); // retrieve the stream
+
+      pattern.stream = pages[currentPage].join("\n");
+      addPattern(key, pattern);
+      events.publish("endTilingPattern", pattern); // restore state from stack
+
+      renderTargetStack.pop().restore();
+    };
+
+    var newObject = API.__private__.newObject = function () {
+      var oid = newObjectDeferred();
+      newObjectDeferredBegin(oid, true);
+      return oid;
+    }; // Does not output the object.  The caller must call newObjectDeferredBegin(oid) before outputing any data
+
+
+    var newObjectDeferred = API.__private__.newObjectDeferred = function () {
+      objectNumber++;
+
+      offsets[objectNumber] = function () {
+        return contentLength;
+      };
+
+      return objectNumber;
+    };
+
+    var newObjectDeferredBegin = function newObjectDeferredBegin(oid, doOutput) {
+      doOutput = typeof doOutput === "boolean" ? doOutput : false;
+      offsets[oid] = contentLength;
+
+      if (doOutput) {
+        out(oid + " 0 obj");
+      }
+
+      return oid;
+    }; // Does not output the object until after the pages have been output.
+    // Returns an object containing the objectId and content.
+    // All pages have been added so the object ID can be estimated to start right after.
+    // This does not modify the current objectNumber;  It must be updated after the newObjects are output.
+
+
+    var newAdditionalObject = API.__private__.newAdditionalObject = function () {
+      var objId = newObjectDeferred();
+      var obj = {
+        objId: objId,
+        content: ""
+      };
+      additionalObjects.push(obj);
+      return obj;
+    };
+
+    var rootDictionaryObjId = newObjectDeferred();
+    var resourceDictionaryObjId = newObjectDeferred(); /////////////////////
+    // Private functions
+    /////////////////////
+
+    var decodeColorString = API.__private__.decodeColorString = function (color) {
+      var colorEncoded = color.split(" ");
+
+      if (colorEncoded.length === 2 && (colorEncoded[1] === "g" || colorEncoded[1] === "G")) {
+        // convert grayscale value to rgb so that it can be converted to hex for consistency
+        var floatVal = parseFloat(colorEncoded[0]);
+        colorEncoded = [floatVal, floatVal, floatVal, "r"];
+      } else if (colorEncoded.length === 5 && (colorEncoded[4] === "k" || colorEncoded[4] === "K")) {
+        // convert CMYK values to rbg so that it can be converted to hex for consistency
+        var red = (1.0 - colorEncoded[0]) * (1.0 - colorEncoded[3]);
+        var green = (1.0 - colorEncoded[1]) * (1.0 - colorEncoded[3]);
+        var blue = (1.0 - colorEncoded[2]) * (1.0 - colorEncoded[3]);
+        colorEncoded = [red, green, blue, "r"];
+      }
+
+      var colorAsRGB = "#";
+
+      for (var i = 0; i < 3; i++) {
+        colorAsRGB += ("0" + Math.floor(parseFloat(colorEncoded[i]) * 255).toString(16)).slice(-2);
+      }
+
+      return colorAsRGB;
+    };
+
+    var encodeColorString = API.__private__.encodeColorString = function (options) {
+      var color;
+
+      if (typeof options === "string") {
+        options = {
+          ch1: options
+        };
+      }
+
+      var ch1 = options.ch1;
+      var ch2 = options.ch2;
+      var ch3 = options.ch3;
+      var ch4 = options.ch4;
+      var letterArray = options.pdfColorType === "draw" ? ["G", "RG", "K"] : ["g", "rg", "k"];
+
+      if (typeof ch1 === "string" && ch1.charAt(0) !== "#") {
+        var rgbColor = new RGBColor(ch1);
+
+        if (rgbColor.ok) {
+          ch1 = rgbColor.toHex();
+        } else if (!/^\d*\.?\d*$/.test(ch1)) {
+          throw new Error('Invalid color "' + ch1 + '" passed to jsPDF.encodeColorString.');
+        }
+      } //convert short rgb to long form
+
+
+      if (typeof ch1 === "string" && /^#[0-9A-Fa-f]{3}$/.test(ch1)) {
+        ch1 = "#" + ch1[1] + ch1[1] + ch1[2] + ch1[2] + ch1[3] + ch1[3];
+      }
+
+      if (typeof ch1 === "string" && /^#[0-9A-Fa-f]{6}$/.test(ch1)) {
+        var hex = parseInt(ch1.substr(1), 16);
+        ch1 = hex >> 16 & 255;
+        ch2 = hex >> 8 & 255;
+        ch3 = hex & 255;
+      }
+
+      if (typeof ch2 === "undefined" || typeof ch4 === "undefined" && ch1 === ch2 && ch2 === ch3) {
+        // Gray color space.
+        if (typeof ch1 === "string") {
+          color = ch1 + " " + letterArray[0];
+        } else {
+          switch (options.precision) {
+            case 2:
+              color = f2(ch1 / 255) + " " + letterArray[0];
+              break;
+
+            case 3:
+            default:
+              color = f3(ch1 / 255) + " " + letterArray[0];
+          }
+        }
+      } else if (typeof ch4 === "undefined" || _typeof(ch4) === "object") {
+        // assume RGBA
+        if (ch4 && !isNaN(ch4.a)) {
+          //TODO Implement transparency.
+          //WORKAROUND use white for now, if transparent, otherwise handle as rgb
+          if (ch4.a === 0) {
+            color = ["1.", "1.", "1.", letterArray[1]].join(" ");
+            return color;
+          }
+        } // assume RGB
+
+
+        if (typeof ch1 === "string") {
+          color = [ch1, ch2, ch3, letterArray[1]].join(" ");
+        } else {
+          switch (options.precision) {
+            case 2:
+              color = [f2(ch1 / 255), f2(ch2 / 255), f2(ch3 / 255), letterArray[1]].join(" ");
+              break;
+
+            default:
+            case 3:
+              color = [f3(ch1 / 255), f3(ch2 / 255), f3(ch3 / 255), letterArray[1]].join(" ");
+          }
+        }
+      } else {
+        // assume CMYK
+        if (typeof ch1 === "string") {
+          color = [ch1, ch2, ch3, ch4, letterArray[2]].join(" ");
+        } else {
+          switch (options.precision) {
+            case 2:
+              color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), letterArray[2]].join(" ");
+              break;
+
+            case 3:
+            default:
+              color = [f3(ch1), f3(ch2), f3(ch3), f3(ch4), letterArray[2]].join(" ");
+          }
+        }
+      }
+
+      return color;
+    };
+
+    var getFilters = API.__private__.getFilters = function () {
+      return filters;
+    };
+
+    var putStream = API.__private__.putStream = function (options) {
+      options = options || {};
+      var data = options.data || "";
+      var filters = options.filters || getFilters();
+      var alreadyAppliedFilters = options.alreadyAppliedFilters || [];
+      var addLength1 = options.addLength1 || false;
+      var valueOfLength1 = data.length;
+      var objectId = options.objectId;
+
+      var encryptor = function encryptor(data) {
+        return data;
+      };
+
+      if (encryptionOptions !== null && typeof objectId == "undefined") {
+        throw new Error("ObjectId must be passed to putStream for file encryption");
+      }
+
+      if (encryptionOptions !== null) {
+        encryptor = encryption.encryptor(objectId, 0);
+      }
+
+      var processedData = {};
+
+      if (filters === true) {
+        filters = ["FlateEncode"];
+      }
+
+      var keyValues = options.additionalKeyValues || [];
+
+      if (typeof jsPDF.API.processDataByFilters !== "undefined") {
+        processedData = jsPDF.API.processDataByFilters(data, filters);
+      } else {
+        processedData = {
+          data: data,
+          reverseChain: []
+        };
+      }
+
+      var filterAsString = processedData.reverseChain + (Array.isArray(alreadyAppliedFilters) ? alreadyAppliedFilters.join(" ") : alreadyAppliedFilters.toString());
+
+      if (processedData.data.length !== 0) {
+        keyValues.push({
+          key: "Length",
+          value: processedData.data.length
+        });
+
+        if (addLength1 === true) {
+          keyValues.push({
+            key: "Length1",
+            value: valueOfLength1
+          });
+        }
+      }
+
+      if (filterAsString.length != 0) {
+        if (filterAsString.split("/").length - 1 === 1) {
+          keyValues.push({
+            key: "Filter",
+            value: filterAsString
+          });
+        } else {
+          keyValues.push({
+            key: "Filter",
+            value: "[" + filterAsString + "]"
+          });
+
+          for (var j = 0; j < keyValues.length; j += 1) {
+            if (keyValues[j].key === "DecodeParms") {
+              var decodeParmsArray = [];
+
+              for (var i = 0; i < processedData.reverseChain.split("/").length - 1; i += 1) {
+                decodeParmsArray.push("null");
+              }
+
+              decodeParmsArray.push(keyValues[j].value);
+              keyValues[j].value = "[" + decodeParmsArray.join(" ") + "]";
+            }
+          }
+        }
+      }
+
+      out("<<");
+
+      for (var k = 0; k < keyValues.length; k++) {
+        out("/" + keyValues[k].key + " " + keyValues[k].value);
+      }
+
+      out(">>");
+
+      if (processedData.data.length !== 0) {
+        out("stream");
+        out(encryptor(processedData.data));
+        out("endstream");
+      }
+    };
+
+    var putPage = API.__private__.putPage = function (page) {
+      var pageNumber = page.number;
+      var data = page.data;
+      var pageObjectNumber = page.objId;
+      var pageContentsObjId = page.contentsObjId;
+      newObjectDeferredBegin(pageObjectNumber, true);
+      out("<</Type /Page");
+      out("/Parent " + page.rootDictionaryObjId + " 0 R");
+      out("/Resources " + page.resourceDictionaryObjId + " 0 R");
+      out("/MediaBox [" + parseFloat(hpf(page.mediaBox.bottomLeftX)) + " " + parseFloat(hpf(page.mediaBox.bottomLeftY)) + " " + hpf(page.mediaBox.topRightX) + " " + hpf(page.mediaBox.topRightY) + "]");
+
+      if (page.cropBox !== null) {
+        out("/CropBox [" + hpf(page.cropBox.bottomLeftX) + " " + hpf(page.cropBox.bottomLeftY) + " " + hpf(page.cropBox.topRightX) + " " + hpf(page.cropBox.topRightY) + "]");
+      }
+
+      if (page.bleedBox !== null) {
+        out("/BleedBox [" + hpf(page.bleedBox.bottomLeftX) + " " + hpf(page.bleedBox.bottomLeftY) + " " + hpf(page.bleedBox.topRightX) + " " + hpf(page.bleedBox.topRightY) + "]");
+      }
+
+      if (page.trimBox !== null) {
+        out("/TrimBox [" + hpf(page.trimBox.bottomLeftX) + " " + hpf(page.trimBox.bottomLeftY) + " " + hpf(page.trimBox.topRightX) + " " + hpf(page.trimBox.topRightY) + "]");
+      }
+
+      if (page.artBox !== null) {
+        out("/ArtBox [" + hpf(page.artBox.bottomLeftX) + " " + hpf(page.artBox.bottomLeftY) + " " + hpf(page.artBox.topRightX) + " " + hpf(page.artBox.topRightY) + "]");
+      }
+
+      if (typeof page.userUnit === "number" && page.userUnit !== 1.0) {
+        out("/UserUnit " + page.userUnit);
+      }
+
+      events.publish("putPage", {
+        objId: pageObjectNumber,
+        pageContext: pagesContext[pageNumber],
+        pageNumber: pageNumber,
+        page: data
+      });
+      out("/Contents " + pageContentsObjId + " 0 R");
+      out(">>");
+      out("endobj"); // Page content
+
+      var pageContent = data.join("\n");
+
+      if (apiMode === ApiMode.ADVANCED) {
+        // if the user forgot to switch back to COMPAT mode, we must balance the graphics stack again
+        pageContent += "\nQ";
+      }
+
+      newObjectDeferredBegin(pageContentsObjId, true);
+      putStream({
+        data: pageContent,
+        filters: getFilters(),
+        objectId: pageContentsObjId
+      });
+      out("endobj");
+      return pageObjectNumber;
+    };
+
+    var putPages = API.__private__.putPages = function () {
+      var n,
+          i,
+          pageObjectNumbers = [];
+
+      for (n = 1; n <= page; n++) {
+        pagesContext[n].objId = newObjectDeferred();
+        pagesContext[n].contentsObjId = newObjectDeferred();
+      }
+
+      for (n = 1; n <= page; n++) {
+        pageObjectNumbers.push(putPage({
+          number: n,
+          data: pages[n],
+          objId: pagesContext[n].objId,
+          contentsObjId: pagesContext[n].contentsObjId,
+          mediaBox: pagesContext[n].mediaBox,
+          cropBox: pagesContext[n].cropBox,
+          bleedBox: pagesContext[n].bleedBox,
+          trimBox: pagesContext[n].trimBox,
+          artBox: pagesContext[n].artBox,
+          userUnit: pagesContext[n].userUnit,
+          rootDictionaryObjId: rootDictionaryObjId,
+          resourceDictionaryObjId: resourceDictionaryObjId
+        }));
+      }
+
+      newObjectDeferredBegin(rootDictionaryObjId, true);
+      out("<</Type /Pages");
+      var kids = "/Kids [";
+
+      for (i = 0; i < page; i++) {
+        kids += pageObjectNumbers[i] + " 0 R ";
+      }
+
+      out(kids + "]");
+      out("/Count " + page);
+      out(">>");
+      out("endobj");
+      events.publish("postPutPages");
+    };
+
+    var putFont = function putFont(font) {
+      events.publish("putFont", {
+        font: font,
+        out: out,
+        newObject: newObject,
+        putStream: putStream
+      });
+
+      if (font.isAlreadyPutted !== true) {
+        font.objectNumber = newObject();
+        out("<<");
+        out("/Type /Font");
+        out("/BaseFont /" + toPDFName(font.postScriptName));
+        out("/Subtype /Type1");
+
+        if (typeof font.encoding === "string") {
+          out("/Encoding /" + font.encoding);
+        }
+
+        out("/FirstChar 32");
+        out("/LastChar 255");
+        out(">>");
+        out("endobj");
+      }
+    };
+
+    var putFonts = function putFonts() {
+      for (var fontKey in fonts) {
+        if (fonts.hasOwnProperty(fontKey)) {
+          if (putOnlyUsedFonts === false || putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey)) {
+            putFont(fonts[fontKey]);
+          }
+        }
+      }
+    };
+
+    var putXObject = function putXObject(xObject) {
+      xObject.objectNumber = newObject();
+      var options = [];
+      options.push({
+        key: "Type",
+        value: "/XObject"
+      });
+      options.push({
+        key: "Subtype",
+        value: "/Form"
+      });
+      options.push({
+        key: "BBox",
+        value: "[" + [hpf(xObject.x), hpf(xObject.y), hpf(xObject.x + xObject.width), hpf(xObject.y + xObject.height)].join(" ") + "]"
+      });
+      options.push({
+        key: "Matrix",
+        value: "[" + xObject.matrix.toString() + "]"
+      }); // TODO: /Resources
+
+      var stream = xObject.pages[1].join("\n");
+      putStream({
+        data: stream,
+        additionalKeyValues: options,
+        objectId: xObject.objectNumber
+      });
+      out("endobj");
+    };
+
+    var putXObjects = function putXObjects() {
+      for (var xObjectKey in renderTargets) {
+        if (renderTargets.hasOwnProperty(xObjectKey)) {
+          putXObject(renderTargets[xObjectKey]);
+        }
+      }
+    };
+
+    var interpolateAndEncodeRGBStream = function interpolateAndEncodeRGBStream(colors, numberSamples) {
+      var tValues = [];
+      var t;
+      var dT = 1.0 / (numberSamples - 1);
+
+      for (t = 0.0; t < 1.0; t += dT) {
+        tValues.push(t);
+      }
+
+      tValues.push(1.0); // add first and last control point if not present
+
+      if (colors[0].offset != 0.0) {
+        var c0 = {
+          offset: 0.0,
+          color: colors[0].color
+        };
+        colors.unshift(c0);
+      }
+
+      if (colors[colors.length - 1].offset != 1.0) {
+        var c1 = {
+          offset: 1.0,
+          color: colors[colors.length - 1].color
+        };
+        colors.push(c1);
+      }
+
+      var out = "";
+      var index = 0;
+
+      for (var i = 0; i < tValues.length; i++) {
+        t = tValues[i];
+
+        while (t > colors[index + 1].offset) {
+          index++;
+        }
+
+        var a = colors[index].offset;
+        var b = colors[index + 1].offset;
+        var d = (t - a) / (b - a);
+        var aColor = colors[index].color;
+        var bColor = colors[index + 1].color;
+        out += padd2Hex(Math.round((1 - d) * aColor[0] + d * bColor[0]).toString(16)) + padd2Hex(Math.round((1 - d) * aColor[1] + d * bColor[1]).toString(16)) + padd2Hex(Math.round((1 - d) * aColor[2] + d * bColor[2]).toString(16));
+      }
+
+      return out.trim();
+    };
+
+    var putShadingPattern = function putShadingPattern(pattern, numberSamples) {
+      /*
+         Axial patterns shade between the two points specified in coords, radial patterns between the inner
+         and outer circle.
+         The user can specify an array (colors) that maps t-Values in [0, 1] to RGB colors. These are now
+         interpolated to equidistant samples and written to pdf as a sample (type 0) function.
+         */
+      // The number of color samples that should be used to describe the shading.
+      // The higher, the more accurate the gradient will be.
+      numberSamples || (numberSamples = 21);
+      var funcObjectNumber = newObject();
+      var stream = interpolateAndEncodeRGBStream(pattern.colors, numberSamples);
+      var options = [];
+      options.push({
+        key: "FunctionType",
+        value: "0"
+      });
+      options.push({
+        key: "Domain",
+        value: "[0.0 1.0]"
+      });
+      options.push({
+        key: "Size",
+        value: "[" + numberSamples + "]"
+      });
+      options.push({
+        key: "BitsPerSample",
+        value: "8"
+      });
+      options.push({
+        key: "Range",
+        value: "[0.0 1.0 0.0 1.0 0.0 1.0]"
+      });
+      options.push({
+        key: "Decode",
+        value: "[0.0 1.0 0.0 1.0 0.0 1.0]"
+      });
+      putStream({
+        data: stream,
+        additionalKeyValues: options,
+        alreadyAppliedFilters: ["/ASCIIHexDecode"],
+        objectId: funcObjectNumber
+      });
+      out("endobj");
+      pattern.objectNumber = newObject();
+      out("<< /ShadingType " + pattern.type);
+      out("/ColorSpace /DeviceRGB");
+      var coords = "/Coords [" + hpf(parseFloat(pattern.coords[0])) + " " + // x1
+      hpf(parseFloat(pattern.coords[1])) + " "; // y1
+
+      if (pattern.type === 2) {
+        // axial
+        coords += hpf(parseFloat(pattern.coords[2])) + " " + // x2
+        hpf(parseFloat(pattern.coords[3])); // y2
+      } else {
+        // radial
+        coords += hpf(parseFloat(pattern.coords[2])) + " " + // r1
+        hpf(parseFloat(pattern.coords[3])) + " " + // x2
+        hpf(parseFloat(pattern.coords[4])) + " " + // y2
+        hpf(parseFloat(pattern.coords[5])); // r2
+      }
+
+      coords += "]";
+      out(coords);
+
+      if (pattern.matrix) {
+        out("/Matrix [" + pattern.matrix.toString() + "]");
+      }
+
+      out("/Function " + funcObjectNumber + " 0 R");
+      out("/Extend [true true]");
+      out(">>");
+      out("endobj");
+    };
+
+    var putTilingPattern = function putTilingPattern(pattern, deferredResourceDictionaryIds) {
+      var resourcesObjectId = newObjectDeferred();
+      var patternObjectId = newObject();
+      deferredResourceDictionaryIds.push({
+        resourcesOid: resourcesObjectId,
+        objectOid: patternObjectId
+      });
+      pattern.objectNumber = patternObjectId;
+      var options = [];
+      options.push({
+        key: "Type",
+        value: "/Pattern"
+      });
+      options.push({
+        key: "PatternType",
+        value: "1"
+      }); // tiling pattern
+
+      options.push({
+        key: "PaintType",
+        value: "1"
+      }); // colored tiling pattern
+
+      options.push({
+        key: "TilingType",
+        value: "1"
+      }); // constant spacing
+
+      options.push({
+        key: "BBox",
+        value: "[" + pattern.boundingBox.map(hpf).join(" ") + "]"
+      });
+      options.push({
+        key: "XStep",
+        value: hpf(pattern.xStep)
+      });
+      options.push({
+        key: "YStep",
+        value: hpf(pattern.yStep)
+      });
+      options.push({
+        key: "Resources",
+        value: resourcesObjectId + " 0 R"
+      });
+
+      if (pattern.matrix) {
+        options.push({
+          key: "Matrix",
+          value: "[" + pattern.matrix.toString() + "]"
+        });
+      }
+
+      putStream({
+        data: pattern.stream,
+        additionalKeyValues: options,
+        objectId: pattern.objectNumber
+      });
+      out("endobj");
+    };
+
+    var putPatterns = function putPatterns(deferredResourceDictionaryIds) {
+      var patternKey;
+
+      for (patternKey in patterns) {
+        if (patterns.hasOwnProperty(patternKey)) {
+          if (patterns[patternKey] instanceof ShadingPattern) {
+            putShadingPattern(patterns[patternKey]);
+          } else if (patterns[patternKey] instanceof TilingPattern) {
+            putTilingPattern(patterns[patternKey], deferredResourceDictionaryIds);
+          }
+        }
+      }
+    };
+
+    var putGState = function putGState(gState) {
+      gState.objectNumber = newObject();
+      out("<<");
+
+      for (var p in gState) {
+        switch (p) {
+          case "opacity":
+            out("/ca " + f2(gState[p]));
+            break;
+
+          case "stroke-opacity":
+            out("/CA " + f2(gState[p]));
+            break;
+        }
+      }
+
+      out(">>");
+      out("endobj");
+    };
+
+    var putGStates = function putGStates() {
+      var gStateKey;
+
+      for (gStateKey in gStates) {
+        if (gStates.hasOwnProperty(gStateKey)) {
+          putGState(gStates[gStateKey]);
+        }
+      }
+    };
+
+    var putXobjectDict = function putXobjectDict() {
+      out("/XObject <<");
+
+      for (var xObjectKey in renderTargets) {
+        if (renderTargets.hasOwnProperty(xObjectKey) && renderTargets[xObjectKey].objectNumber >= 0) {
+          out("/" + xObjectKey + " " + renderTargets[xObjectKey].objectNumber + " 0 R");
+        }
+      } // Loop through images, or other data objects
+
+
+      events.publish("putXobjectDict");
+      out(">>");
+    };
+
+    var putEncryptionDict = function putEncryptionDict() {
+      encryption.oid = newObject();
+      out("<<");
+      out("/Filter /Standard");
+      out("/V " + encryption.v);
+      out("/R " + encryption.r);
+      out("/U <" + encryption.toHexString(encryption.U) + ">");
+      out("/O <" + encryption.toHexString(encryption.O) + ">");
+      out("/P " + encryption.P);
+      out(">>");
+      out("endobj");
+    };
+
+    var putFontDict = function putFontDict() {
+      out("/Font <<");
+
+      for (var fontKey in fonts) {
+        if (fonts.hasOwnProperty(fontKey)) {
+          if (putOnlyUsedFonts === false || putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey)) {
+            out("/" + fontKey + " " + fonts[fontKey].objectNumber + " 0 R");
+          }
+        }
+      }
+
+      out(">>");
+    };
+
+    var putShadingPatternDict = function putShadingPatternDict() {
+      if (Object.keys(patterns).length > 0) {
+        out("/Shading <<");
+
+        for (var patternKey in patterns) {
+          if (patterns.hasOwnProperty(patternKey) && patterns[patternKey] instanceof ShadingPattern && patterns[patternKey].objectNumber >= 0) {
+            out("/" + patternKey + " " + patterns[patternKey].objectNumber + " 0 R");
+          }
+        }
+
+        events.publish("putShadingPatternDict");
+        out(">>");
+      }
+    };
+
+    var putTilingPatternDict = function putTilingPatternDict(objectOid) {
+      if (Object.keys(patterns).length > 0) {
+        out("/Pattern <<");
+
+        for (var patternKey in patterns) {
+          if (patterns.hasOwnProperty(patternKey) && patterns[patternKey] instanceof API.TilingPattern && patterns[patternKey].objectNumber >= 0 && patterns[patternKey].objectNumber < objectOid // prevent cyclic dependencies
+          ) {
+              out("/" + patternKey + " " + patterns[patternKey].objectNumber + " 0 R");
+            }
+        }
+
+        events.publish("putTilingPatternDict");
+        out(">>");
+      }
+    };
+
+    var putGStatesDict = function putGStatesDict() {
+      if (Object.keys(gStates).length > 0) {
+        var gStateKey;
+        out("/ExtGState <<");
+
+        for (gStateKey in gStates) {
+          if (gStates.hasOwnProperty(gStateKey) && gStates[gStateKey].objectNumber >= 0) {
+            out("/" + gStateKey + " " + gStates[gStateKey].objectNumber + " 0 R");
+          }
+        }
+
+        events.publish("putGStateDict");
+        out(">>");
+      }
+    };
+
+    var putResourceDictionary = function putResourceDictionary(objectIds) {
+      newObjectDeferredBegin(objectIds.resourcesOid, true);
+      out("<<");
+      out("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]");
+      putFontDict();
+      putShadingPatternDict();
+      putTilingPatternDict(objectIds.objectOid);
+      putGStatesDict();
+      putXobjectDict();
+      out(">>");
+      out("endobj");
+    };
+
+    var putResources = function putResources() {
+      // FormObjects, Patterns etc. might use other FormObjects/Patterns/Images
+      // which means their resource dictionaries must contain the already resolved
+      // object ids. For this reason we defer the serialization of the resource
+      // dicts until all objects have been serialized and have object ids.
+      //
+      // In order to prevent cyclic dependencies (which Adobe Reader doesn't like),
+      // we only put all oids that are smaller than the oid of the object the
+      // resource dict belongs to. This is correct behavior, since the streams
+      // may only use other objects that have already been defined and thus appear
+      // earlier in their respective collection.
+      // Currently, this only affects tiling patterns, but a (more) correct
+      // implementation of FormObjects would also define their own resource dicts.
+      var deferredResourceDictionaryIds = [];
+      putFonts();
+      putGStates();
+      putXObjects();
+      putPatterns(deferredResourceDictionaryIds);
+      events.publish("putResources");
+      deferredResourceDictionaryIds.forEach(putResourceDictionary);
+      putResourceDictionary({
+        resourcesOid: resourceDictionaryObjId,
+        objectOid: Number.MAX_SAFE_INTEGER // output all objects
+
+      });
+      events.publish("postPutResources");
+    };
+
+    var putAdditionalObjects = function putAdditionalObjects() {
+      events.publish("putAdditionalObjects");
+
+      for (var i = 0; i < additionalObjects.length; i++) {
+        var obj = additionalObjects[i];
+        newObjectDeferredBegin(obj.objId, true);
+        out(obj.content);
+        out("endobj");
+      }
+
+      events.publish("postPutAdditionalObjects");
+    };
+
+    var addFontToFontDictionary = function addFontToFontDictionary(font) {
+      fontmap[font.fontName] = fontmap[font.fontName] || {};
+      fontmap[font.fontName][font.fontStyle] = font.id;
+    };
+
+    var addFont = function addFont(postScriptName, fontName, fontStyle, encoding, isStandardFont) {
+      var font = {
+        id: "F" + (Object.keys(fonts).length + 1).toString(10),
+        postScriptName: postScriptName,
+        fontName: fontName,
+        fontStyle: fontStyle,
+        encoding: encoding,
+        isStandardFont: isStandardFont || false,
+        metadata: {}
+      };
+      events.publish("addFont", {
+        font: font,
+        instance: this
+      });
+      fonts[font.id] = font;
+      addFontToFontDictionary(font);
+      return font.id;
+    };
+
+    var addFonts = function addFonts(arrayOfFonts) {
+      for (var i = 0, l = standardFonts.length; i < l; i++) {
+        var fontKey = addFont.call(this, arrayOfFonts[i][0], arrayOfFonts[i][1], arrayOfFonts[i][2], standardFonts[i][3], true);
+
+        if (putOnlyUsedFonts === false) {
+          usedFonts[fontKey] = true;
+        } // adding aliases for standard fonts, this time matching the capitalization
+
+
+        var parts = arrayOfFonts[i][0].split("-");
+        addFontToFontDictionary({
+          id: fontKey,
+          fontName: parts[0],
+          fontStyle: parts[1] || ""
+        });
+      }
+
+      events.publish("addFonts", {
+        fonts: fonts,
+        dictionary: fontmap
+      });
+    };
+
+    var SAFE = function __safeCall(fn) {
+      fn.foo = function __safeCallWrapper() {
+        try {
+          return fn.apply(this, arguments);
+        } catch (e) {
+          var stack = e.stack || "";
+          if (~stack.indexOf(" at ")) stack = stack.split(" at ")[1];
+          var m = "Error in function " + stack.split("\n")[0].split("<")[0] + ": " + e.message;
+
+          if (globalObject.console) {
+            globalObject.console.error(m, e);
+            if (globalObject.alert) alert(m);
+          } else {
+            throw new Error(m);
+          }
+        }
+      };
+
+      fn.foo.bar = fn;
+      return fn.foo;
+    };
+
+    var to8bitStream = function to8bitStream(text, flags) {
+      /**
+       * PDF 1.3 spec:
+       * "For text strings encoded in Unicode, the first two bytes must be 254 followed by
+       * 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts
+       * with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely
+       * to be a meaningful beginning of a word or phrase.) The remainder of the
+       * string consists of Unicode character codes, according to the UTF-16 encoding
+       * specified in the Unicode standard, version 2.0. Commonly used Unicode values
+       * are represented as 2 bytes per character, with the high-order byte appearing first
+       * in the string."
+       *
+       * In other words, if there are chars in a string with char code above 255, we
+       * recode the string to UCS2 BE - string doubles in length and BOM is prepended.
+       *
+       * HOWEVER!
+       * Actual *content* (body) text (as opposed to strings used in document properties etc)
+       * does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)
+       *
+       * Because of Adobe's focus on "you subset your fonts!" you are not supposed to have
+       * a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could
+       * fudge it with "Identity-H" encoding and custom CIDtoGID map that mimics Unicode
+       * code page. There, however, all characters in the stream are treated as GIDs,
+       * including BOM, which is the reason we need to skip BOM in content text (i.e. that
+       * that is tied to a font).
+       *
+       * To signal this "special" PDFEscape / to8bitStream handling mode,
+       * API.text() function sets (unless you overwrite it with manual values
+       * given to API.text(.., flags) )
+       * flags.autoencode = true
+       * flags.noBOM = true
+       *
+       * ===================================================================================
+       * `flags` properties relied upon:
+       *   .sourceEncoding = string with encoding label.
+       *                     "Unicode" by default. = encoding of the incoming text.
+       *                     pass some non-existing encoding name
+       *                     (ex: 'Do not touch my strings! I know what I am doing.')
+       *                     to make encoding code skip the encoding step.
+       *   .outputEncoding = Either valid PDF encoding name
+       *                     (must be supported by jsPDF font metrics, otherwise no encoding)
+       *                     or a JS object, where key = sourceCharCode, value = outputCharCode
+       *                     missing keys will be treated as: sourceCharCode === outputCharCode
+       *   .noBOM
+       *       See comment higher above for explanation for why this is important
+       *   .autoencode
+       *       See comment higher above for explanation for why this is important
+       */
+      var i, l, sourceEncoding, encodingBlock, outputEncoding, newtext, isUnicode, ch, bch;
+      flags = flags || {};
+      sourceEncoding = flags.sourceEncoding || "Unicode";
+      outputEncoding = flags.outputEncoding; // This 'encoding' section relies on font metrics format
+      // attached to font objects by, among others,
+      // "Willow Systems' standard_font_metrics plugin"
+      // see jspdf.plugin.standard_font_metrics.js for format
+      // of the font.metadata.encoding Object.
+      // It should be something like
+      //   .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}
+      //   .widths = {0:width, code:width, ..., 'fof':divisor}
+      //   .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}
+
+      if ((flags.autoencode || outputEncoding) && fonts[activeFontKey].metadata && fonts[activeFontKey].metadata[sourceEncoding] && fonts[activeFontKey].metadata[sourceEncoding].encoding) {
+        encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding; // each font has default encoding. Some have it clearly defined.
+
+        if (!outputEncoding && fonts[activeFontKey].encoding) {
+          outputEncoding = fonts[activeFontKey].encoding;
+        } // Hmmm, the above did not work? Let's try again, in different place.
+
+
+        if (!outputEncoding && encodingBlock.codePages) {
+          outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default
+        }
+
+        if (typeof outputEncoding === "string") {
+          outputEncoding = encodingBlock[outputEncoding];
+        } // we want output encoding to be a JS Object, where
+        // key = sourceEncoding's character code and
+        // value = outputEncoding's character code.
+
+
+        if (outputEncoding) {
+          isUnicode = false;
+          newtext = [];
+
+          for (i = 0, l = text.length; i < l; i++) {
+            ch = outputEncoding[text.charCodeAt(i)];
+
+            if (ch) {
+              newtext.push(String.fromCharCode(ch));
+            } else {
+              newtext.push(text[i]);
+            } // since we are looping over chars anyway, might as well
+            // check for residual unicodeness
+
+
+            if (newtext[i].charCodeAt(0) >> 8) {
+              /* more than 255 */
+              isUnicode = true;
+            }
+          }
+
+          text = newtext.join("");
+        }
+      }
+
+      i = text.length; // isUnicode may be set to false above. Hence the triple-equal to undefined
+
+      while (isUnicode === undefined && i !== 0) {
+        if (text.charCodeAt(i - 1) >> 8) {
+          /* more than 255 */
+          isUnicode = true;
+        }
+
+        i--;
+      }
+
+      if (!isUnicode) {
+        return text;
+      }
+
+      newtext = flags.noBOM ? [] : [254, 255];
+
+      for (i = 0, l = text.length; i < l; i++) {
+        ch = text.charCodeAt(i);
+        bch = ch >> 8; // divide by 256
+
+        if (bch >> 8) {
+          /* something left after dividing by 256 second time */
+          throw new Error("Character at position " + i + " of string '" + text + "' exceeds 16bits. Cannot be encoded into UCS-2 BE");
+        }
+
+        newtext.push(bch);
+        newtext.push(ch - (bch << 8));
+      }
+
+      return String.fromCharCode.apply(undefined, newtext);
+    };
+
+    var pdfEscape = API.__private__.pdfEscape = API.pdfEscape = function (text, flags) {
+      /**
+       * Replace '/', '(', and ')' with pdf-safe versions
+       *
+       * Doing to8bitStream does NOT make this PDF display unicode text. For that
+       * we also need to reference a unicode font and embed it - royal pain in the rear.
+       *
+       * There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,
+       * which JavaScript Strings are happy to provide. So, while we still cannot display
+       * 2-byte characters property, at least CONDITIONALLY converting (entire string containing)
+       * 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF
+       * is still parseable.
+       * This will allow immediate support for unicode in document properties strings.
+       */
+      return to8bitStream(text, flags).replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
+    };
+
+    var beginPage = API.__private__.beginPage = function (format) {
+      pages[++page] = [];
+      pagesContext[page] = {
+        objId: 0,
+        contentsObjId: 0,
+        userUnit: Number(userUnit),
+        artBox: null,
+        bleedBox: null,
+        cropBox: null,
+        trimBox: null,
+        mediaBox: {
+          bottomLeftX: 0,
+          bottomLeftY: 0,
+          topRightX: Number(format[0]),
+          topRightY: Number(format[1])
+        }
+      };
+
+      _setPage(page);
+
+      setOutputDestination(pages[currentPage]);
+    };
+
+    var _addPage = function _addPage(parmFormat, parmOrientation) {
+      var dimensions, width, height;
+      orientation = parmOrientation || orientation;
+
+      if (typeof parmFormat === "string") {
+        dimensions = getPageFormat(parmFormat.toLowerCase());
+
+        if (Array.isArray(dimensions)) {
+          width = dimensions[0];
+          height = dimensions[1];
+        }
+      }
+
+      if (Array.isArray(parmFormat)) {
+        width = parmFormat[0] * scaleFactor;
+        height = parmFormat[1] * scaleFactor;
+      }
+
+      if (isNaN(width)) {
+        width = format[0];
+        height = format[1];
+      }
+
+      if (width > 14400 || height > 14400) {
+        console.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400");
+        width = Math.min(14400, width);
+        height = Math.min(14400, height);
+      }
+
+      format = [width, height];
+
+      switch (orientation.substr(0, 1)) {
+        case "l":
+          if (height > width) {
+            format = [height, width];
+          }
+
+          break;
+
+        case "p":
+          if (width > height) {
+            format = [height, width];
+          }
+
+          break;
+      }
+
+      beginPage(format); // Set line width
+
+      setLineWidth(lineWidth); // Set draw color
+
+      out(strokeColor); // resurrecting non-default line caps, joins
+
+      if (lineCapID !== 0) {
+        out(lineCapID + " J");
+      }
+
+      if (lineJoinID !== 0) {
+        out(lineJoinID + " j");
+      }
+
+      events.publish("addPage", {
+        pageNumber: page
+      });
+    };
+
+    var _deletePage = function _deletePage(n) {
+      if (n > 0 && n <= page) {
+        pages.splice(n, 1);
+        pagesContext.splice(n, 1);
+        page--;
+
+        if (currentPage > page) {
+          currentPage = page;
+        }
+
+        this.setPage(currentPage);
+      }
+    };
+
+    var _setPage = function _setPage(n) {
+      if (n > 0 && n <= page) {
+        currentPage = n;
+      }
+    };
+
+    var getNumberOfPages = API.__private__.getNumberOfPages = API.getNumberOfPages = function () {
+      return pages.length - 1;
+    };
+    /**
+     * Returns a document-specific font key - a label assigned to a
+     * font name + font type combination at the time the font was added
+     * to the font inventory.
+     *
+     * Font key is used as label for the desired font for a block of text
+     * to be added to the PDF document stream.
+     * @private
+     * @function
+     * @param fontName {string} can be undefined on "falthy" to indicate "use current"
+     * @param fontStyle {string} can be undefined on "falthy" to indicate "use current"
+     * @returns {string} Font key.
+     * @ignore
+     */
+
+
+    var getFont = function getFont(fontName, fontStyle, options) {
+      var key = undefined,
+          fontNameLowerCase;
+      options = options || {};
+      fontName = fontName !== undefined ? fontName : fonts[activeFontKey].fontName;
+      fontStyle = fontStyle !== undefined ? fontStyle : fonts[activeFontKey].fontStyle;
+      fontNameLowerCase = fontName.toLowerCase();
+
+      if (fontmap[fontNameLowerCase] !== undefined && fontmap[fontNameLowerCase][fontStyle] !== undefined) {
+        key = fontmap[fontNameLowerCase][fontStyle];
+      } else if (fontmap[fontName] !== undefined && fontmap[fontName][fontStyle] !== undefined) {
+        key = fontmap[fontName][fontStyle];
+      } else {
+        if (options.disableWarning === false) {
+          console.warn("Unable to look up font label for font '" + fontName + "', '" + fontStyle + "'. Refer to getFontList() for available fonts.");
+        }
+      }
+
+      if (!key && !options.noFallback) {
+        key = fontmap["times"][fontStyle];
+
+        if (key == null) {
+          key = fontmap["times"]["normal"];
+        }
+      }
+
+      return key;
+    };
+
+    var putInfo = API.__private__.putInfo = function () {
+      var objectId = newObject();
+
+      var encryptor = function encryptor(data) {
+        return data;
+      };
+
+      if (encryptionOptions !== null) {
+        encryptor = encryption.encryptor(objectId, 0);
+      }
+
+      out("<<");
+      out("/Producer (" + pdfEscape(encryptor("jsPDF " + jsPDF.version)) + ")");
+
+      for (var key in documentProperties) {
+        if (documentProperties.hasOwnProperty(key) && documentProperties[key]) {
+          out("/" + key.substr(0, 1).toUpperCase() + key.substr(1) + " (" + pdfEscape(encryptor(documentProperties[key])) + ")");
+        }
+      }
+
+      out("/CreationDate (" + pdfEscape(encryptor(creationDate)) + ")");
+      out(">>");
+      out("endobj");
+    };
+
+    var putCatalog = API.__private__.putCatalog = function (options) {
+      options = options || {};
+      var tmpRootDictionaryObjId = options.rootDictionaryObjId || rootDictionaryObjId;
+      newObject();
+      out("<<");
+      out("/Type /Catalog");
+      out("/Pages " + tmpRootDictionaryObjId + " 0 R"); // PDF13ref Section 7.2.1
+
+      if (!zoomMode) zoomMode = "fullwidth";
+
+      switch (zoomMode) {
+        case "fullwidth":
+          out("/OpenAction [3 0 R /FitH null]");
+          break;
+
+        case "fullheight":
+          out("/OpenAction [3 0 R /FitV null]");
+          break;
+
+        case "fullpage":
+          out("/OpenAction [3 0 R /Fit]");
+          break;
+
+        case "original":
+          out("/OpenAction [3 0 R /XYZ null null 1]");
+          break;
+
+        default:
+          var pcn = "" + zoomMode;
+          if (pcn.substr(pcn.length - 1) === "%") zoomMode = parseInt(zoomMode) / 100;
+
+          if (typeof zoomMode === "number") {
+            out("/OpenAction [3 0 R /XYZ null null " + f2(zoomMode) + "]");
+          }
+
+      }
+
+      if (!layoutMode) layoutMode = "continuous";
+
+      switch (layoutMode) {
+        case "continuous":
+          out("/PageLayout /OneColumn");
+          break;
+
+        case "single":
+          out("/PageLayout /SinglePage");
+          break;
+
+        case "two":
+        case "twoleft":
+          out("/PageLayout /TwoColumnLeft");
+          break;
+
+        case "tworight":
+          out("/PageLayout /TwoColumnRight");
+          break;
+      }
+
+      if (pageMode) {
+        /**
+         * A name object specifying how the document should be displayed when opened:
+         * UseNone      : Neither document outline nor thumbnail images visible -- DEFAULT
+         * UseOutlines  : Document outline visible
+         * UseThumbs    : Thumbnail images visible
+         * FullScreen   : Full-screen mode, with no menu bar, window controls, or any other window visible
+         */
+        out("/PageMode /" + pageMode);
+      }
+
+      events.publish("putCatalog");
+      out(">>");
+      out("endobj");
+    };
+
+    var putTrailer = API.__private__.putTrailer = function () {
+      out("trailer");
+      out("<<");
+      out("/Size " + (objectNumber + 1)); // Root and Info must be the last and second last objects written respectively
+
+      out("/Root " + objectNumber + " 0 R");
+      out("/Info " + (objectNumber - 1) + " 0 R");
+
+      if (encryptionOptions !== null) {
+        out("/Encrypt " + encryption.oid + " 0 R");
+      }
+
+      out("/ID [ <" + fileId + "> <" + fileId + "> ]");
+      out(">>");
+    };
+
+    var putHeader = API.__private__.putHeader = function () {
+      out("%PDF-" + pdfVersion);
+      out("%\xBA\xDF\xAC\xE0");
+    };
+
+    var putXRef = API.__private__.putXRef = function () {
+      var p = "0000000000";
+      out("xref");
+      out("0 " + (objectNumber + 1));
+      out("0000000000 65535 f ");
+
+      for (var i = 1; i <= objectNumber; i++) {
+        var offset = offsets[i];
+
+        if (typeof offset === "function") {
+          out((p + offsets[i]()).slice(-10) + " 00000 n ");
+        } else {
+          if (typeof offsets[i] !== "undefined") {
+            out((p + offsets[i]).slice(-10) + " 00000 n ");
+          } else {
+            out("0000000000 00000 n ");
+          }
+        }
+      }
+    };
+
+    var buildDocument = API.__private__.buildDocument = function () {
+      resetDocument();
+      setOutputDestination(content);
+      events.publish("buildDocument");
+      putHeader();
+      putPages();
+      putAdditionalObjects();
+      putResources();
+      if (encryptionOptions !== null) putEncryptionDict();
+      putInfo();
+      putCatalog();
+      var offsetOfXRef = contentLength;
+      putXRef();
+      putTrailer();
+      out("startxref");
+      out("" + offsetOfXRef);
+      out("%%EOF");
+      setOutputDestination(pages[currentPage]);
+      return content.join("\n");
+    };
+
+    var getBlob = API.__private__.getBlob = function (data) {
+      return new Blob([getArrayBuffer(data)], {
+        type: "application/pdf"
+      });
+    };
+    /**
+     * Generates the PDF document.
+     *
+     * If `type` argument is undefined, output is raw body of resulting PDF returned as a string.
+     *
+     * @param {string} type A string identifying one of the possible output types.<br/>
+     *                      Possible values are: <br/>
+     *                          'arraybuffer' -> (ArrayBuffer)<br/>
+     *                          'blob' -> (Blob)<br/>
+     *                          'bloburi'/'bloburl' -> (string)<br/>
+     *                          'datauristring'/'dataurlstring' -> (string)<br/>
+     *                          'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>
+     *                          'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>
+     *                          'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>
+     *                          'pdfjsnewwindow' -> (wind | null)
+     * @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>
+     *                                Possible options are 'filename'.<br/>
+     *                                A string can be passed instead of {filename:string} and defaults to 'generated.pdf'
+     * @function
+     * @instance
+     * @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}
+     * @memberof jsPDF#
+     * @name output
+     */
+
+
+    var output = API.output = API.__private__.output = SAFE(function output(type, options) {
+      options = options || {};
+
+      if (typeof options === "string") {
+        options = {
+          filename: options
+        };
+      } else {
+        options.filename = options.filename || "generated.pdf";
+      }
+
+      switch (type) {
+        case undefined:
+          return buildDocument();
+
+        case "save":
+          API.save(options.filename);
+          break;
+
+        case "arraybuffer":
+          return getArrayBuffer(buildDocument());
+
+        case "blob":
+          return getBlob(buildDocument());
+
+        case "bloburi":
+        case "bloburl":
+          // Developer is responsible of calling revokeObjectURL
+          if (typeof globalObject.URL !== "undefined" && typeof globalObject.URL.createObjectURL === "function") {
+            return globalObject.URL && globalObject.URL.createObjectURL(getBlob(buildDocument())) || void 0;
+          } else {
+            console.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");
+          }
+
+          break;
+
+        case "datauristring":
+        case "dataurlstring":
+          var dataURI = "";
+          var pdfDocument = buildDocument();
+
+          try {
+            dataURI = btoa(pdfDocument);
+          } catch (e) {
+            dataURI = btoa(unescape(encodeURIComponent(pdfDocument)));
+          }
+
+          return "data:application/pdf;filename=" + options.filename + ";base64," + dataURI;
+
+        case "pdfobjectnewwindow":
+          if (Object.prototype.toString.call(globalObject) === "[object Window]") {
+            var pdfObjectUrl = "https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js";
+            var integrity = ' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';
+
+            if (options.pdfObjectUrl) {
+              pdfObjectUrl = options.pdfObjectUrl;
+              integrity = "";
+            }
+
+            var htmlForNewWindow = "<html>" + '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="' + pdfObjectUrl + '"' + integrity + '></script><script >PDFObject.embed("' + this.output("dataurlstring") + '", ' + JSON.stringify(options) + ");</script></body></html>";
+            var nW = globalObject.open();
+
+            if (nW !== null) {
+              nW.document.write(htmlForNewWindow);
+            }
+
+            return nW;
+          } else {
+            throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");
+          }
+
+        case "pdfjsnewwindow":
+          if (Object.prototype.toString.call(globalObject) === "[object Window]") {
+            var pdfJsUrl = options.pdfJsUrl || "examples/PDF.js/web/viewer.html";
+            var htmlForPDFjsNewWindow = "<html>" + "<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>" + '<body><iframe id="pdfViewer" src="' + pdfJsUrl + "?file=&downloadName=" + options.filename + '" width="500px" height="400px" />' + "</body></html>";
+            var PDFjsNewWindow = globalObject.open();
+
+            if (PDFjsNewWindow !== null) {
+              PDFjsNewWindow.document.write(htmlForPDFjsNewWindow);
+              var scope = this;
+
+              PDFjsNewWindow.document.documentElement.querySelector("#pdfViewer").onload = function () {
+                PDFjsNewWindow.document.title = options.filename;
+                PDFjsNewWindow.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(scope.output("bloburl"));
+              };
+            }
+
+            return PDFjsNewWindow;
+          } else {
+            throw new Error("The option pdfjsnewwindow just works in a browser-environment.");
+          }
+
+        case "dataurlnewwindow":
+          if (Object.prototype.toString.call(globalObject) === "[object Window]") {
+            var htmlForDataURLNewWindow = "<html>" + "<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>" + "<body>" + '<iframe src="' + this.output("datauristring", options) + '"></iframe>' + "</body></html>";
+            var dataURLNewWindow = globalObject.open();
+
+            if (dataURLNewWindow !== null) {
+              dataURLNewWindow.document.write(htmlForDataURLNewWindow);
+              dataURLNewWindow.document.title = options.filename;
+            }
+
+            if (dataURLNewWindow || typeof safari === "undefined") return dataURLNewWindow;
+          } else {
+            throw new Error("The option dataurlnewwindow just works in a browser-environment.");
+          }
+
+          break;
+
+        case "datauri":
+        case "dataurl":
+          return globalObject.document.location.href = this.output("datauristring", options);
+
+        default:
+          return null;
+      }
+    });
+    /**
+     * Used to see if a supplied hotfix was requested when the pdf instance was created.
+     * @param {string} hotfixName - The name of the hotfix to check.
+     * @returns {boolean}
+     */
+
+    var hasHotfix = function hasHotfix(hotfixName) {
+      return Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1;
+    };
+
+    switch (unit) {
+      case "pt":
+        scaleFactor = 1;
+        break;
+
+      case "mm":
+        scaleFactor = 72 / 25.4;
+        break;
+
+      case "cm":
+        scaleFactor = 72 / 2.54;
+        break;
+
+      case "in":
+        scaleFactor = 72;
+        break;
+
+      case "px":
+        if (hasHotfix("px_scaling") == true) {
+          scaleFactor = 72 / 96;
+        } else {
+          scaleFactor = 96 / 72;
+        }
+
+        break;
+
+      case "pc":
+        scaleFactor = 12;
+        break;
+
+      case "em":
+        scaleFactor = 12;
+        break;
+
+      case "ex":
+        scaleFactor = 6;
+        break;
+
+      default:
+        if (typeof unit === "number") {
+          scaleFactor = unit;
+        } else {
+          throw new Error("Invalid unit: " + unit);
+        }
+
+    }
+
+    var encryption = null;
+    setCreationDate();
+    setFileId();
+
+    var getEncryptor = function getEncryptor(objectId) {
+      if (encryptionOptions !== null) {
+        return encryption.encryptor(objectId, 0);
+      }
+
+      return function (data) {
+        return data;
+      };
+    }; //---------------------------------------
+    // Public API
+
+
+    var getPageInfo = API.__private__.getPageInfo = API.getPageInfo = function (pageNumberOneBased) {
+      if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {
+        throw new Error("Invalid argument passed to jsPDF.getPageInfo");
+      }
+
+      var objId = pagesContext[pageNumberOneBased].objId;
+      return {
+        objId: objId,
+        pageNumber: pageNumberOneBased,
+        pageContext: pagesContext[pageNumberOneBased]
+      };
+    };
+
+    var getPageInfoByObjId = API.__private__.getPageInfoByObjId = function (objId) {
+      if (isNaN(objId) || objId % 1 !== 0) {
+        throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");
+      }
+
+      for (var pageNumber in pagesContext) {
+        if (pagesContext[pageNumber].objId === objId) {
+          break;
+        }
+      }
+
+      return getPageInfo(pageNumber);
+    };
+
+    var getCurrentPageInfo = API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function () {
+      return {
+        objId: pagesContext[currentPage].objId,
+        pageNumber: currentPage,
+        pageContext: pagesContext[currentPage]
+      };
+    };
+    /**
+     * Adds (and transfers the focus to) new page to the PDF document.
+     * @param format {String/Array} The format of the new page. Can be: <ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />
+     * Default is "a4". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]
+     * @param orientation {string} Orientation of the new page. Possible values are "portrait" or "landscape" (or shortcuts "p" (Default), "l").
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     *
+     * @memberof jsPDF#
+     * @name addPage
+     */
+
+
+    API.addPage = function () {
+      _addPage.apply(this, arguments);
+
+      return this;
+    };
+    /**
+     * Adds (and transfers the focus to) new page to the PDF document.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     *
+     * @memberof jsPDF#
+     * @name setPage
+     * @param {number} page Switch the active page to the page number specified (indexed starting at 1).
+     * @example
+     * doc = jsPDF()
+     * doc.addPage()
+     * doc.addPage()
+     * doc.text('I am on page 3', 10, 10)
+     * doc.setPage(1)
+     * doc.text('I am on page 1', 10, 10)
+     */
+
+
+    API.setPage = function () {
+      _setPage.apply(this, arguments);
+
+      setOutputDestination.call(this, pages[currentPage]);
+      return this;
+    };
+    /**
+     * @name insertPage
+     * @memberof jsPDF#
+     *
+     * @function
+     * @instance
+     * @param {Object} beforePage
+     * @returns {jsPDF}
+     */
+
+
+    API.insertPage = function (beforePage) {
+      this.addPage();
+      this.movePage(currentPage, beforePage);
+      return this;
+    };
+    /**
+     * @name movePage
+     * @memberof jsPDF#
+     * @function
+     * @instance
+     * @param {number} targetPage
+     * @param {number} beforePage
+     * @returns {jsPDF}
+     */
+
+
+    API.movePage = function (targetPage, beforePage) {
+      var tmpPages, tmpPagesContext;
+
+      if (targetPage > beforePage) {
+        tmpPages = pages[targetPage];
+        tmpPagesContext = pagesContext[targetPage];
+
+        for (var i = targetPage; i > beforePage; i--) {
+          pages[i] = pages[i - 1];
+          pagesContext[i] = pagesContext[i - 1];
+        }
+
+        pages[beforePage] = tmpPages;
+        pagesContext[beforePage] = tmpPagesContext;
+        this.setPage(beforePage);
+      } else if (targetPage < beforePage) {
+        tmpPages = pages[targetPage];
+        tmpPagesContext = pagesContext[targetPage];
+
+        for (var j = targetPage; j < beforePage; j++) {
+          pages[j] = pages[j + 1];
+          pagesContext[j] = pagesContext[j + 1];
+        }
+
+        pages[beforePage] = tmpPages;
+        pagesContext[beforePage] = tmpPagesContext;
+        this.setPage(beforePage);
+      }
+
+      return this;
+    };
+    /**
+     * Deletes a page from the PDF.
+     * @name deletePage
+     * @memberof jsPDF#
+     * @function
+     * @param {number} targetPage
+     * @instance
+     * @returns {jsPDF}
+     */
+
+
+    API.deletePage = function () {
+      _deletePage.apply(this, arguments);
+
+      return this;
+    };
+    /**
+     * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.
+     *
+     * @function
+     * @instance
+     * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.
+     * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.
+     * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.
+     * @param {Object} [options] - Collection of settings signaling how the text must be encoded.
+     * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.
+     * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging
+     * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.
+     * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.
+     * @param {number} [options.charSpace=0] - The space between each letter.
+     * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.
+     * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.
+     * @param {Object} [options.flags] - Flags for to8bitStream.
+     * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.
+     * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.
+     * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.
+     * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.
+     * @param {boolean} [options.isInputVisual] - Option for the BidiEngine
+     * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine
+     * @param {boolean} [options.isInputRtl] - Option for the BidiEngine
+     * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine
+     * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine
+     * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.
+     *
+     * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing
+     * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this
+     * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a
+     * DIFFERENT result. A matrix is only allowed in "advanced" API mode.
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name text
+     */
+
+
+    API.__private__.text = API.text = function (text, x, y, options, transform) {
+      /*
+       * Inserts something like this into PDF
+       *   BT
+       *    /F1 16 Tf  % Font name + size
+       *    16 TL % How many units down for next line in multiline text
+       *    0 g % color
+       *    28.35 813.54 Td % position
+       *    (line one) Tj
+       *    T* (line two) Tj
+       *    T* (line three) Tj
+       *   ET
+       */
+      options = options || {};
+      var scope = options.scope || this;
+      var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale; // Pre-August-2012 the order of arguments was function(x, y, text, flags)
+      // in effort to make all calls have similar signature like
+      //   function(data, coordinates... , miscellaneous)
+      // this method had its args flipped.
+      // code below allows backward compatibility with old arg order.
+
+      if (typeof text === "number" && typeof x === "number" && (typeof y === "string" || Array.isArray(y))) {
+        var tmp = y;
+        y = x;
+        x = text;
+        text = tmp;
+      }
+
+      var transformationMatrix;
+
+      if (arguments[3] instanceof Matrix === false) {
+        flags = arguments[3];
+        angle = arguments[4];
+        align = arguments[5];
+
+        if (_typeof(flags) !== "object" || flags === null) {
+          if (typeof angle === "string") {
+            align = angle;
+            angle = null;
+          }
+
+          if (typeof flags === "string") {
+            align = flags;
+            flags = null;
+          }
+
+          if (typeof flags === "number") {
+            angle = flags;
+            flags = null;
+          }
+
+          options = {
+            flags: flags,
+            angle: angle,
+            align: align
+          };
+        }
+      } else {
+        advancedApiModeTrap("The transform parameter of text() with a Matrix value");
+        transformationMatrix = transform;
+      }
+
+      if (isNaN(x) || isNaN(y) || typeof text === "undefined" || text === null) {
+        throw new Error("Invalid arguments passed to jsPDF.text");
+      }
+
+      if (text.length === 0) {
+        return scope;
+      }
+
+      var xtra = "";
+      var isHex = false;
+      var lineHeight = typeof options.lineHeightFactor === "number" ? options.lineHeightFactor : lineHeightFactor;
+      var scaleFactor = scope.internal.scaleFactor;
+
+      function ESC(s) {
+        s = s.split("\t").join(Array(options.TabLen || 9).join(" "));
+        return pdfEscape(s, flags);
+      }
+
+      function transformTextToSpecialArray(text) {
+        //we don't want to destroy original text array, so cloning it
+        var sa = text.concat();
+        var da = [];
+        var len = sa.length;
+        var curDa; //we do array.join('text that must not be PDFescaped")
+        //thus, pdfEscape each component separately
+
+        while (len--) {
+          curDa = sa.shift();
+
+          if (typeof curDa === "string") {
+            da.push(curDa);
+          } else {
+            if (Array.isArray(text) && (curDa.length === 1 || curDa[1] === undefined && curDa[2] === undefined)) {
+              da.push(curDa[0]);
+            } else {
+              da.push([curDa[0], curDa[1], curDa[2]]);
+            }
+          }
+        }
+
+        return da;
+      }
+
+      function processTextByFunction(text, processingFunction) {
+        var result;
+
+        if (typeof text === "string") {
+          result = processingFunction(text)[0];
+        } else if (Array.isArray(text)) {
+          //we don't want to destroy original text array, so cloning it
+          var sa = text.concat();
+          var da = [];
+          var len = sa.length;
+          var curDa;
+          var tmpResult; //we do array.join('text that must not be PDFescaped")
+          //thus, pdfEscape each component separately
+
+          while (len--) {
+            curDa = sa.shift();
+
+            if (typeof curDa === "string") {
+              da.push(processingFunction(curDa)[0]);
+            } else if (Array.isArray(curDa) && typeof curDa[0] === "string") {
+              tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);
+              da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);
+            }
+          }
+
+          result = da;
+        }
+
+        return result;
+      } //Check if text is of type String
+
+
+      var textIsOfTypeString = false;
+      var tmpTextIsOfTypeString = true;
+
+      if (typeof text === "string") {
+        textIsOfTypeString = true;
+      } else if (Array.isArray(text)) {
+        //we don't want to destroy original text array, so cloning it
+        var sa = text.concat();
+        da = [];
+        var len = sa.length;
+        var curDa; //we do array.join('text that must not be PDFescaped")
+        //thus, pdfEscape each component separately
+
+        while (len--) {
+          curDa = sa.shift();
+
+          if (typeof curDa !== "string" || Array.isArray(curDa) && typeof curDa[0] !== "string") {
+            tmpTextIsOfTypeString = false;
+          }
+        }
+
+        textIsOfTypeString = tmpTextIsOfTypeString;
+      }
+
+      if (textIsOfTypeString === false) {
+        throw new Error('Type of text must be string or Array. "' + text + '" is not recognized.');
+      } //If there are any newlines in text, we assume
+      //the user wanted to print multiple lines, so break the
+      //text up into an array. If the text is already an array,
+      //we assume the user knows what they are doing.
+      //Convert text into an array anyway to simplify
+      //later code.
+
+
+      if (typeof text === "string") {
+        if (text.match(/[\r?\n]/)) {
+          text = text.split(/\r\n|\r|\n/g);
+        } else {
+          text = [text];
+        }
+      } //baseline
+
+
+      var height = activeFontSize / scope.internal.scaleFactor;
+      var descent = height * (lineHeight - 1);
+
+      switch (options.baseline) {
+        case "bottom":
+          y -= descent;
+          break;
+
+        case "top":
+          y += height - descent;
+          break;
+
+        case "hanging":
+          y += height - 2 * descent;
+          break;
+
+        case "middle":
+          y += height / 2 - descent;
+          break;
+      } //multiline
+
+
+      maxWidth = options.maxWidth || 0;
+
+      if (maxWidth > 0) {
+        if (typeof text === "string") {
+          text = scope.splitTextToSize(text, maxWidth);
+        } else if (Object.prototype.toString.call(text) === "[object Array]") {
+          text = text.reduce(function (acc, textLine) {
+            return acc.concat(scope.splitTextToSize(textLine, maxWidth));
+          }, []);
+        }
+      } //creating Payload-Object to make text byRef
+
+
+      payload = {
+        text: text,
+        x: x,
+        y: y,
+        options: options,
+        mutex: {
+          pdfEscape: pdfEscape,
+          activeFontKey: activeFontKey,
+          fonts: fonts,
+          activeFontSize: activeFontSize
+        }
+      };
+      events.publish("preProcessText", payload);
+      text = payload.text;
+      options = payload.options; //angle
+
+      angle = options.angle;
+
+      if (transformationMatrix instanceof Matrix === false && angle && typeof angle === "number") {
+        angle *= Math.PI / 180;
+
+        if (options.rotationDirection === 0) {
+          angle = -angle;
+        }
+
+        if (apiMode === ApiMode.ADVANCED) {
+          angle = -angle;
+        }
+
+        var c = Math.cos(angle);
+        var s = Math.sin(angle);
+        transformationMatrix = new Matrix(c, s, -s, c, 0, 0);
+      } else if (angle && angle instanceof Matrix) {
+        transformationMatrix = angle;
+      }
+
+      if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {
+        transformationMatrix = identityMatrix;
+      } //charSpace
+
+
+      charSpace = options.charSpace || activeCharSpace;
+
+      if (typeof charSpace !== "undefined") {
+        xtra += hpf(scale(charSpace)) + " Tc\n";
+        this.setCharSpace(this.getCharSpace() || 0);
+      }
+
+      horizontalScale = options.horizontalScale;
+
+      if (typeof horizontalScale !== "undefined") {
+        xtra += hpf(horizontalScale * 100) + " Tz\n";
+      } //lang
+
+
+      var lang = options.lang;
+
+
+      var renderingMode = -1;
+      var parmRenderingMode = typeof options.renderingMode !== "undefined" ? options.renderingMode : options.stroke;
+      var pageContext = scope.internal.getCurrentPageInfo().pageContext;
+
+      switch (parmRenderingMode) {
+        case 0:
+        case false:
+        case "fill":
+          renderingMode = 0;
+          break;
+
+        case 1:
+        case true:
+        case "stroke":
+          renderingMode = 1;
+          break;
+
+        case 2:
+        case "fillThenStroke":
+          renderingMode = 2;
+          break;
+
+        case 3:
+        case "invisible":
+          renderingMode = 3;
+          break;
+
+        case 4:
+        case "fillAndAddForClipping":
+          renderingMode = 4;
+          break;
+
+        case 5:
+        case "strokeAndAddPathForClipping":
+          renderingMode = 5;
+          break;
+
+        case 6:
+        case "fillThenStrokeAndAddToPathForClipping":
+          renderingMode = 6;
+          break;
+
+        case 7:
+        case "addToPathForClipping":
+          renderingMode = 7;
+          break;
+      }
+
+      var usedRenderingMode = typeof pageContext.usedRenderingMode !== "undefined" ? pageContext.usedRenderingMode : -1; //if the coder wrote it explicitly to use a specific
+      //renderingMode, then use it
+
+      if (renderingMode !== -1) {
+        xtra += renderingMode + " Tr\n"; //otherwise check if we used the rendering Mode already
+        //if so then set the rendering Mode...
+      } else if (usedRenderingMode !== -1) {
+        xtra += "0 Tr\n";
+      }
+
+      if (renderingMode !== -1) {
+        pageContext.usedRenderingMode = renderingMode;
+      } //align
+
+
+      align = options.align || "left";
+      var leading = activeFontSize * lineHeight;
+      var pageWidth = scope.internal.pageSize.getWidth();
+      var activeFont = fonts[activeFontKey];
+      charSpace = options.charSpace || activeCharSpace;
+      maxWidth = options.maxWidth || 0;
+      var lineWidths;
+      flags = Object.assign({
+        autoencode: true,
+        noBOM: true
+      }, options.flags);
+      var wordSpacingPerLine = [];
+
+      var findWidth = function findWidth(v) {
+        return scope.getStringUnitWidth(v, {
+          font: activeFont,
+          charSpace: charSpace,
+          fontSize: activeFontSize,
+          doKerning: false
+        }) * activeFontSize / scaleFactor;
+      };
+
+      if (Object.prototype.toString.call(text) === "[object Array]") {
+        da = transformTextToSpecialArray(text);
+        var newY;
+
+        if (align !== "left") {
+          lineWidths = da.map(findWidth);
+        } //The first line uses the "main" Td setting,
+        //and the subsequent lines are offset by the
+        //previous line's x coordinate.
+
+
+        var prevWidth = 0;
+        var newX;
+
+        if (align === "right") {
+          //The passed in x coordinate defines the
+          //rightmost point of the text.
+          x -= lineWidths[0];
+          text = [];
+          len = da.length;
+
+          for (var i = 0; i < len; i++) {
+            if (i === 0) {
+              newX = getHorizontalCoordinate(x);
+              newY = getVerticalCoordinate(y);
+            } else {
+              newX = scale(prevWidth - lineWidths[i]);
+              newY = -leading;
+            }
+
+            text.push([da[i], newX, newY]);
+            prevWidth = lineWidths[i];
+          }
+        } else if (align === "center") {
+          //The passed in x coordinate defines
+          //the center point.
+          x -= lineWidths[0] / 2;
+          text = [];
+          len = da.length;
+
+          for (var j = 0; j < len; j++) {
+            if (j === 0) {
+              newX = getHorizontalCoordinate(x);
+              newY = getVerticalCoordinate(y);
+            } else {
+              newX = scale((prevWidth - lineWidths[j]) / 2);
+              newY = -leading;
+            }
+
+            text.push([da[j], newX, newY]);
+            prevWidth = lineWidths[j];
+          }
+        } else if (align === "left") {
+          text = [];
+          len = da.length;
+
+          for (var h = 0; h < len; h++) {
+            text.push(da[h]);
+          }
+        } else if (align === "justify" && activeFont.encoding === "Identity-H") {
+          // when using unicode fonts, wordSpacePerLine does not apply
+          text = [];
+          len = da.length;
+          maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;
+          var backToStartX = 0;
+
+          for (var l = 0; l < len; l++) {
+            newY = l === 0 ? getVerticalCoordinate(y) : -leading;
+            newX = l === 0 ? getHorizontalCoordinate(x) : backToStartX;
+
+            if (l < len - 1) {
+              var spacing = scale((maxWidth - lineWidths[l]) / (da[l].split(" ").length - 1));
+              var words = da[l].split(" ");
+              text.push([words[0] + " ", newX, newY]);
+              backToStartX = 0; // distance to reset back to the left
+
+              for (var _i = 1; _i < words.length; _i++) {
+                var shiftAmount = (findWidth(words[_i - 1] + " " + words[_i]) - findWidth(words[_i])) * scaleFactor + spacing;
+                if (_i == words.length - 1) text.push([words[_i], shiftAmount, 0]);else text.push([words[_i] + " ", shiftAmount, 0]);
+                backToStartX -= shiftAmount;
+              }
+            } else {
+              text.push([da[l], newX, newY]);
+            }
+          }
+
+          text.push(["", backToStartX, 0]);
+        } else if (align === "justify") {
+          text = [];
+          len = da.length;
+          maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;
+
+          for (var l = 0; l < len; l++) {
+            newY = l === 0 ? getVerticalCoordinate(y) : -leading;
+            newX = l === 0 ? getHorizontalCoordinate(x) : 0;
+
+            if (l < len - 1) {
+              wordSpacingPerLine.push(hpf(scale((maxWidth - lineWidths[l]) / (da[l].split(" ").length - 1))));
+            } else {
+              wordSpacingPerLine.push(0);
+            }
+
+            text.push([da[l], newX, newY]);
+          }
+        } else {
+          throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');
+        }
+      } //R2L
+
+
+      var doReversing = typeof options.R2L === "boolean" ? options.R2L : R2L;
+
+      if (doReversing === true) {
+        text = processTextByFunction(text, function (text, posX, posY) {
+          return [text.split("").reverse().join(""), posX, posY];
+        });
+      } //creating Payload-Object to make text byRef
+
+
+      payload = {
+        text: text,
+        x: x,
+        y: y,
+        options: options,
+        mutex: {
+          pdfEscape: pdfEscape,
+          activeFontKey: activeFontKey,
+          fonts: fonts,
+          activeFontSize: activeFontSize
+        }
+      };
+      events.publish("postProcessText", payload);
+      text = payload.text;
+      isHex = payload.mutex.isHex || false; //Escaping
+
+      var activeFontEncoding = fonts[activeFontKey].encoding;
+
+      if (activeFontEncoding === "WinAnsiEncoding" || activeFontEncoding === "StandardEncoding") {
+        text = processTextByFunction(text, function (text, posX, posY) {
+          return [ESC(text), posX, posY];
+        });
+      }
+
+      da = transformTextToSpecialArray(text);
+      text = [];
+      var STRING = 0;
+      var ARRAY = 1;
+      var variant = Array.isArray(da[0]) ? ARRAY : STRING;
+      var posX;
+      var posY;
+      var content;
+      var wordSpacing = "";
+
+      var generatePosition = function generatePosition(parmPosX, parmPosY, parmTransformationMatrix) {
+        var position = "";
+
+        if (parmTransformationMatrix instanceof Matrix) {
+          // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y
+          // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied
+          // in the coordinate system established by this matrix
+          if (typeof options.angle === "number") {
+            parmTransformationMatrix = matrixMult(parmTransformationMatrix, new Matrix(1, 0, 0, 1, parmPosX, parmPosY));
+          } else {
+            parmTransformationMatrix = matrixMult(new Matrix(1, 0, 0, 1, parmPosX, parmPosY), parmTransformationMatrix);
+          }
+
+          if (apiMode === ApiMode.ADVANCED) {
+            parmTransformationMatrix = matrixMult(new Matrix(1, 0, 0, -1, 0, 0), parmTransformationMatrix);
+          }
+
+          position = parmTransformationMatrix.join(" ") + " Tm\n";
+        } else {
+          position = hpf(parmPosX) + " " + hpf(parmPosY) + " Td\n";
+        }
+
+        return position;
+      };
+
+      for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {
+        wordSpacing = "";
+
+        switch (variant) {
+          case ARRAY:
+            content = (isHex ? "<" : "(") + da[lineIndex][0] + (isHex ? ">" : ")");
+            posX = parseFloat(da[lineIndex][1]);
+            posY = parseFloat(da[lineIndex][2]);
+            break;
+
+          case STRING:
+            content = (isHex ? "<" : "(") + da[lineIndex] + (isHex ? ">" : ")");
+            posX = getHorizontalCoordinate(x);
+            posY = getVerticalCoordinate(y);
+            break;
+        }
+
+        if (typeof wordSpacingPerLine !== "undefined" && typeof wordSpacingPerLine[lineIndex] !== "undefined") {
+          wordSpacing = wordSpacingPerLine[lineIndex] + " Tw\n";
+        }
+
+        if (lineIndex === 0) {
+          text.push(wordSpacing + generatePosition(posX, posY, transformationMatrix) + content);
+        } else if (variant === STRING) {
+          text.push(wordSpacing + content);
+        } else if (variant === ARRAY) {
+          text.push(wordSpacing + generatePosition(posX, posY, transformationMatrix) + content);
+        }
+      }
+
+      text = variant === STRING ? text.join(" Tj\nT* ") : text.join(" Tj\n");
+      text += " Tj\n";
+      var result = "BT\n/";
+      result += activeFontKey + " " + activeFontSize + " Tf\n"; // font face, style, size
+
+      result += hpf(activeFontSize * lineHeight) + " TL\n"; // line spacing
+
+      result += textColor + "\n";
+      result += xtra;
+      result += text;
+      result += "ET";
+      out(result);
+      usedFonts[activeFontKey] = true;
+      return scope;
+    }; // PDF supports these path painting and clip path operators:
+    //
+    // S - stroke
+    // s - close/stroke
+    // f (F) - fill non-zero
+    // f* - fill evenodd
+    // B - fill stroke nonzero
+    // B* - fill stroke evenodd
+    // b - close fill stroke nonzero
+    // b* - close fill stroke evenodd
+    // n - nothing (consume path)
+    // W - clip nonzero
+    // W* - clip evenodd
+    //
+    // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()
+    // method.
+
+    /**
+     *
+     * @name clip
+     * @function
+     * @instance
+     * @param {string} rule Only possible value is 'evenodd'
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @description All .clip() after calling drawing ops with a style argument of null.
+     */
+
+
+    var clip = API.__private__.clip = API.clip = function (rule) {
+      // Call .clip() after calling drawing ops with a style argument of null
+      // W is the PDF clipping op
+      if ("evenodd" === rule) {
+        out("W*");
+      } else {
+        out("W");
+      }
+
+      return this;
+    };
+    /**
+     * @name clipEvenOdd
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note
+     * that this will NOT consume the current path. In order to only use this path for clipping call
+     * {@link API.discardPath} afterwards.
+     */
+
+
+    API.clipEvenOdd = function () {
+      return clip("evenodd");
+    };
+    /**
+     * Consumes the current path without any effect. Mainly used in combination with {@link clip} or
+     * {@link clipEvenOdd}. The PDF "n" operator.
+     * @name discardPath
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     */
+
+
+    API.__private__.discardPath = API.discardPath = function () {
+      out("n");
+      return this;
+    };
+
+    var isValidStyle = API.__private__.isValidStyle = function (style) {
+      var validStyleVariants = [undefined, null, "S", "D", "F", "DF", "FD", "f", "f*", "B", "B*", "n"];
+      var result = false;
+
+      if (validStyleVariants.indexOf(style) !== -1) {
+        result = true;
+      }
+
+      return result;
+    };
+
+    API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function (operator) {
+      if (isValidStyle(operator)) {
+        defaultPathOperation = operator;
+      }
+
+      return this;
+    };
+
+    var getStyle = API.__private__.getStyle = API.getStyle = function (style) {
+      // see path-painting operators in PDF spec
+      var op = defaultPathOperation; // stroke
+
+      switch (style) {
+        case "D":
+        case "S":
+          op = "S"; // stroke
+
+          break;
+
+        case "F":
+          op = "f"; // fill
+
+          break;
+
+        case "FD":
+        case "DF":
+          op = "B";
+          break;
+
+        case "f":
+        case "f*":
+        case "B":
+        case "B*":
+          /*
+                 Allow direct use of these PDF path-painting operators:
+                 - f    fill using nonzero winding number rule
+                 - f*    fill using even-odd rule
+                 - B    fill then stroke with fill using non-zero winding number rule
+                 - B*    fill then stroke with fill using even-odd rule
+                 */
+          op = style;
+          break;
+      }
+
+      return op;
+    };
+    /**
+     * Close the current path. The PDF "h" operator.
+     * @name close
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     */
+
+
+    var close = API.close = function () {
+      out("h");
+      return this;
+    };
+    /**
+     * Stroke the path. The PDF "S" operator.
+     * @name stroke
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     */
+
+
+    API.stroke = function () {
+      out("S");
+      return this;
+    };
+    /**
+     * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled
+     * with this pattern, otherwise with the current fill color. Equivalent to the PDF "f" operator.
+     * @name fill
+     * @function
+     * @instance
+     * @param {PatternData=} pattern If provided the path will be filled with this pattern
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     */
+
+
+    API.fill = function (pattern) {
+      fillWithOptionalPattern("f", pattern);
+      return this;
+    };
+    /**
+     * Fill the current path using the even-odd rule. The PDF f* operator.
+     * @see API.fill
+     * @name fillEvenOdd
+     * @function
+     * @instance
+     * @param {PatternData=} pattern If provided the path will be filled with this pattern
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     */
+
+
+    API.fillEvenOdd = function (pattern) {
+      fillWithOptionalPattern("f*", pattern);
+      return this;
+    };
+    /**
+     * Fill using the nonzero winding number rule and then stroke the current Path. The PDF "B" operator.
+     * @see API.fill
+     * @name fillStroke
+     * @function
+     * @instance
+     * @param {PatternData=} pattern If provided the path will be stroked with this pattern
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     */
+
+
+    API.fillStroke = function (pattern) {
+      fillWithOptionalPattern("B", pattern);
+      return this;
+    };
+    /**
+     * Fill using the even-odd rule and then stroke the current Path. The PDF "B" operator.
+     * @see API.fill
+     * @name fillStrokeEvenOdd
+     * @function
+     * @instance
+     * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     */
+
+
+    API.fillStrokeEvenOdd = function (pattern) {
+      fillWithOptionalPattern("B*", pattern);
+      return this;
+    };
+
+    var fillWithOptionalPattern = function fillWithOptionalPattern(style, pattern) {
+      if (_typeof(pattern) === "object") {
+        fillWithPattern(pattern, style);
+      } else {
+        out(style);
+      }
+    };
+
+    var putStyle = function putStyle(style) {
+      if (style === null || apiMode === ApiMode.ADVANCED && style === undefined) {
+        return;
+      }
+
+      style = getStyle(style); // stroking / filling / both the path
+
+      out(style);
+    };
+
+    function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {
+      var clone = new TilingPattern(boundingBox || this.boundingBox, xStep || this.xStep, yStep || this.yStep, this.gState, matrix || this.matrix);
+      clone.stream = this.stream;
+      var key = patternKey + "$$" + this.cloneIndex++ + "$$";
+      addPattern(key, clone);
+      return clone;
+    }
+
+    var fillWithPattern = function fillWithPattern(patternData, style) {
+      var patternId = patternMap[patternData.key];
+      var pattern = patterns[patternId];
+
+      if (pattern instanceof ShadingPattern) {
+        out("q");
+        out(clipRuleFromStyle(style));
+
+        if (pattern.gState) {
+          API.setGState(pattern.gState);
+        }
+
+        out(patternData.matrix.toString() + " cm");
+        out("/" + patternId + " sh");
+        out("Q");
+      } else if (pattern instanceof TilingPattern) {
+        // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,
+        // so we must flip them
+        var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());
+
+        if (patternData.matrix) {
+          matrix = matrix.multiply(patternData.matrix || identityMatrix); // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances
+          // for each use
+
+          patternId = cloneTilingPattern.call(pattern, patternData.key, patternData.boundingBox, patternData.xStep, patternData.yStep, matrix).id;
+        }
+
+        out("q");
+        out("/Pattern cs");
+        out("/" + patternId + " scn");
+
+        if (pattern.gState) {
+          API.setGState(pattern.gState);
+        }
+
+        out(style);
+        out("Q");
+      }
+    };
+
+    var clipRuleFromStyle = function clipRuleFromStyle(style) {
+      switch (style) {
+        case "f":
+        case "F":
+          return "W n";
+
+        case "f*":
+          return "W* n";
+
+        case "B":
+          return "W S";
+
+        case "B*":
+          return "W* S";
+        // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern
+        // and "n"/"S" as style would still fill/fill and stroke the path)
+
+        case "S":
+          return "W S";
+
+        case "n":
+          return "W n";
+      }
+    };
+    /**
+     * Begin a new subpath by moving the current point to coordinates (x, y). The PDF "m" operator.
+     * @param {number} x
+     * @param {number} y
+     * @name moveTo
+     * @function
+     * @instance
+     * @memberof jsPDF#
+     * @returns {jsPDF}
+     */
+
+
+    var moveTo = API.moveTo = function (x, y) {
+      out(hpf(scale(x)) + " " + hpf(transformScaleY(y)) + " m");
+      return this;
+    };
+    /**
+     * Append a straight line segment from the current point to the point (x, y). The PDF "l" operator.
+     * @param {number} x
+     * @param {number} y
+     * @memberof jsPDF#
+     * @name lineTo
+     * @function
+     * @instance
+     * @memberof jsPDF#
+     * @returns {jsPDF}
+     */
+
+
+    var lineTo = API.lineTo = function (x, y) {
+      out(hpf(scale(x)) + " " + hpf(transformScaleY(y)) + " l");
+      return this;
+    };
+    /**
+     * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point
+     * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).
+     * @param {number} x1
+     * @param {number} y1
+     * @param {number} x2
+     * @param {number} y2
+     * @param {number} x3
+     * @param {number} y3
+     * @memberof jsPDF#
+     * @name curveTo
+     * @function
+     * @instance
+     * @memberof jsPDF#
+     * @returns {jsPDF}
+     */
+
+
+    var curveTo = API.curveTo = function (x1, y1, x2, y2, x3, y3) {
+      out([hpf(scale(x1)), hpf(transformScaleY(y1)), hpf(scale(x2)), hpf(transformScaleY(y2)), hpf(scale(x3)), hpf(transformScaleY(y3)), "c"].join(" "));
+      return this;
+    };
+    /**
+     * Draw a line on the current page.
+     *
+     * @name line
+     * @function
+     * @instance
+     * @param {number} x1
+     * @param {number} y1
+     * @param {number} x2
+     * @param {number} y2
+     * @param {string} style A string specifying the painting style or null.  Valid styles include: 'S' [default] - stroke, 'F' - fill,  and 'DF' (or 'FD') -  fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     */
+
+
+    API.__private__.line = API.line = function (x1, y1, x2, y2, style) {
+      if (isNaN(x1) || isNaN(y1) || isNaN(x2) || isNaN(y2) || !isValidStyle(style)) {
+        throw new Error("Invalid arguments passed to jsPDF.line");
+      }
+
+      if (apiMode === ApiMode.COMPAT) {
+        return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || "S");
+      } else {
+        return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();
+      }
+    };
+    /**
+     * @typedef {Object} PatternData
+     * {Matrix|undefined} matrix
+     * {Number|undefined} xStep
+     * {Number|undefined} yStep
+     * {Array.<Number>|undefined} boundingBox
+     */
+
+    /**
+     * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.
+     * All data points in `lines` are relative to last line origin.
+     * `x`, `y` become x1,y1 for first line / curve in the set.
+     * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.
+     * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.
+     *
+     * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line
+     * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).
+     * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+     * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+     * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.
+     * @param {string=} style A string specifying the painting style or null. Valid styles include:
+     * 'S' [default] - stroke,
+     * 'F' - fill,
+     * and 'DF' (or 'FD') -  fill then stroke.
+     * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+     * method calls. The last drawing method call used to define the shape should not have a null style argument.
+     *
+     * In "advanced" API mode this parameter is deprecated.
+     * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name lines
+     */
+
+
+    API.__private__.lines = API.lines = function (lines, x, y, scale, style, closed) {
+      var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp; // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)
+      // in effort to make all calls have similar signature like
+      //   function(content, coordinateX, coordinateY , miscellaneous)
+      // this method had its args flipped.
+      // code below allows backward compatibility with old arg order.
+
+      if (typeof lines === "number") {
+        tmp = y;
+        y = x;
+        x = lines;
+        lines = tmp;
+      }
+
+      scale = scale || [1, 1];
+      closed = closed || false;
+
+      if (isNaN(x) || isNaN(y) || !Array.isArray(lines) || !Array.isArray(scale) || !isValidStyle(style) || typeof closed !== "boolean") {
+        throw new Error("Invalid arguments passed to jsPDF.lines");
+      } // starting point
+
+
+      moveTo(x, y);
+      scalex = scale[0];
+      scaley = scale[1];
+      l = lines.length; //, x2, y2 // bezier only. In page default measurement "units", *after* scaling
+      //, x3, y3 // bezier only. In page default measurement "units", *after* scaling
+      // ending point for all, lines and bezier. . In page default measurement "units", *after* scaling
+
+      x4 = x; // last / ending point = starting point for first item.
+
+      y4 = y; // last / ending point = starting point for first item.
+
+      for (i = 0; i < l; i++) {
+        leg = lines[i];
+
+        if (leg.length === 2) {
+          // simple line
+          x4 = leg[0] * scalex + x4; // here last x4 was prior ending point
+
+          y4 = leg[1] * scaley + y4; // here last y4 was prior ending point
+
+          lineTo(x4, y4);
+        } else {
+          // bezier curve
+          x2 = leg[0] * scalex + x4; // here last x4 is prior ending point
+
+          y2 = leg[1] * scaley + y4; // here last y4 is prior ending point
+
+          x3 = leg[2] * scalex + x4; // here last x4 is prior ending point
+
+          y3 = leg[3] * scaley + y4; // here last y4 is prior ending point
+
+          x4 = leg[4] * scalex + x4; // here last x4 was prior ending point
+
+          y4 = leg[5] * scaley + y4; // here last y4 was prior ending point
+
+          curveTo(x2, y2, x3, y3, x4, y4);
+        }
+      }
+
+      if (closed) {
+        close();
+      }
+
+      putStyle(style);
+      return this;
+    };
+    /**
+     * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.
+     * @param {Array<Object>} lines An array of {op: operator, c: coordinates} object, where op is one of "m" (move to), "l" (line to)
+     * "c" (cubic bezier curve) and "h" (close (sub)path)). c is an array of coordinates. "m" and "l" expect two, "c"
+     * six and "h" an empty array (or undefined).
+     * @function
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name path
+     */
+
+
+    API.path = function (lines) {
+      for (var i = 0; i < lines.length; i++) {
+        var leg = lines[i];
+        var coords = leg.c;
+
+        switch (leg.op) {
+          case "m":
+            moveTo(coords[0], coords[1]);
+            break;
+
+          case "l":
+            lineTo(coords[0], coords[1]);
+            break;
+
+          case "c":
+            curveTo.apply(this, coords);
+            break;
+
+          case "h":
+            close();
+            break;
+        }
+      }
+
+      return this;
+    };
+    /**
+     * Adds a rectangle to PDF.
+     *
+     * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+     * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+     * @param {number} w Width (in units declared at inception of PDF document)
+     * @param {number} h Height (in units declared at inception of PDF document)
+     * @param {string=} style A string specifying the painting style or null. Valid styles include:
+     * 'S' [default] - stroke,
+     * 'F' - fill,
+     * and 'DF' (or 'FD') -  fill then stroke.
+     * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+     * method calls. The last drawing method call used to define the shape should not have a null style argument.
+     *
+     * In "advanced" API mode this parameter is deprecated.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name rect
+     */
+
+
+    API.__private__.rect = API.rect = function (x, y, w, h, style) {
+      if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {
+        throw new Error("Invalid arguments passed to jsPDF.rect");
+      }
+
+      if (apiMode === ApiMode.COMPAT) {
+        h = -h;
+      }
+
+      out([hpf(scale(x)), hpf(transformScaleY(y)), hpf(scale(w)), hpf(scale(h)), "re"].join(" "));
+      putStyle(style);
+      return this;
+    };
+    /**
+     * Adds a triangle to PDF.
+     *
+     * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page
+     * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+     * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page
+     * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+     * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page
+     * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page
+     * @param {string=} style A string specifying the painting style or null. Valid styles include:
+     * 'S' [default] - stroke,
+     * 'F' - fill,
+     * and 'DF' (or 'FD') -  fill then stroke.
+     * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+     * method calls. The last drawing method call used to define the shape should not have a null style argument.
+     *
+     * In "advanced" API mode this parameter is deprecated.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name triangle
+     */
+
+
+    API.__private__.triangle = API.triangle = function (x1, y1, x2, y2, x3, y3, style) {
+      if (isNaN(x1) || isNaN(y1) || isNaN(x2) || isNaN(y2) || isNaN(x3) || isNaN(y3) || !isValidStyle(style)) {
+        throw new Error("Invalid arguments passed to jsPDF.triangle");
+      }
+
+      this.lines([[x2 - x1, y2 - y1], // vector to point 2
+      [x3 - x2, y3 - y2], // vector to point 3
+      [x1 - x3, y1 - y3] // closing vector back to point 1
+      ], x1, y1, // start of path
+      [1, 1], style, true);
+      return this;
+    };
+    /**
+     * Adds a rectangle with rounded corners to PDF.
+     *
+     * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+     * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+     * @param {number} w Width (in units declared at inception of PDF document)
+     * @param {number} h Height (in units declared at inception of PDF document)
+     * @param {number} rx Radius along x axis (in units declared at inception of PDF document)
+     * @param {number} ry Radius along y axis (in units declared at inception of PDF document)
+     * @param {string=} style A string specifying the painting style or null. Valid styles include:
+     * 'S' [default] - stroke,
+     * 'F' - fill,
+     * and 'DF' (or 'FD') -  fill then stroke.
+     * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+     * method calls. The last drawing method call used to define the shape should not have a null style argument.
+     *
+     * In "advanced" API mode this parameter is deprecated.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name roundedRect
+     */
+
+
+    API.__private__.roundedRect = API.roundedRect = function (x, y, w, h, rx, ry, style) {
+      if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || isNaN(rx) || isNaN(ry) || !isValidStyle(style)) {
+        throw new Error("Invalid arguments passed to jsPDF.roundedRect");
+      }
+
+      var MyArc = 4 / 3 * (Math.SQRT2 - 1);
+      rx = Math.min(rx, w * 0.5);
+      ry = Math.min(ry, h * 0.5);
+      this.lines([[w - 2 * rx, 0], [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry], [0, h - 2 * ry], [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry], [-w + 2 * rx, 0], [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry], [0, -h + 2 * ry], [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]], x + rx, y, // start of path
+      [1, 1], style, true);
+      return this;
+    };
+    /**
+     * Adds an ellipse to PDF.
+     *
+     * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+     * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+     * @param {number} rx Radius along x axis (in units declared at inception of PDF document)
+     * @param {number} ry Radius along y axis (in units declared at inception of PDF document)
+     * @param {string=} style A string specifying the painting style or null. Valid styles include:
+     * 'S' [default] - stroke,
+     * 'F' - fill,
+     * and 'DF' (or 'FD') -  fill then stroke.
+     * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+     * method calls. The last drawing method call used to define the shape should not have a null style argument.
+     *
+     * In "advanced" API mode this parameter is deprecated.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name ellipse
+     */
+
+
+    API.__private__.ellipse = API.ellipse = function (x, y, rx, ry, style) {
+      if (isNaN(x) || isNaN(y) || isNaN(rx) || isNaN(ry) || !isValidStyle(style)) {
+        throw new Error("Invalid arguments passed to jsPDF.ellipse");
+      }
+
+      var lx = 4 / 3 * (Math.SQRT2 - 1) * rx,
+          ly = 4 / 3 * (Math.SQRT2 - 1) * ry;
+      moveTo(x + rx, y);
+      curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);
+      curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);
+      curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);
+      curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);
+      putStyle(style);
+      return this;
+    };
+    /**
+     * Adds an circle to PDF.
+     *
+     * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+     * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+     * @param {number} r Radius (in units declared at inception of PDF document)
+     * @param {string=} style A string specifying the painting style or null. Valid styles include:
+     * 'S' [default] - stroke,
+     * 'F' - fill,
+     * and 'DF' (or 'FD') -  fill then stroke.
+     * In "compat" API mode, a null value postpones setting the style so that a shape may be composed using multiple
+     * method calls. The last drawing method call used to define the shape should not have a null style argument.
+     *
+     * In "advanced" API mode this parameter is deprecated.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name circle
+     */
+
+
+    API.__private__.circle = API.circle = function (x, y, r, style) {
+      if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {
+        throw new Error("Invalid arguments passed to jsPDF.circle");
+      }
+
+      return this.ellipse(x, y, r, r, style);
+    };
+    /**
+     * Sets text font face, variant for upcoming text elements.
+     * See output of jsPDF.getFontList() for possible font names, styles.
+     *
+     * @param {string} fontName Font name or family. Example: "times".
+     * @param {string} fontStyle Font style or variant. Example: "italic".
+     * @param {number | string} fontWeight Weight of the Font. Example: "normal" | 400
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setFont
+     */
+
+
+    API.setFont = function (fontName, fontStyle, fontWeight) {
+      if (fontWeight) {
+        fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);
+      }
+
+      activeFontKey = getFont(fontName, fontStyle, {
+        disableWarning: false
+      });
+      return this;
+    };
+    /**
+     * Gets text font face, variant for upcoming text elements.
+     *
+     * @function
+     * @instance
+     * @returns {Object}
+     * @memberof jsPDF#
+     * @name getFont
+     */
+
+
+    var getFontEntry = API.__private__.getFont = API.getFont = function () {
+      return fonts[getFont.apply(API, arguments)];
+    };
+    /**
+     * Returns an object - a tree of fontName to fontStyle relationships available to
+     * active PDF document.
+     *
+     * @public
+     * @function
+     * @instance
+     * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }
+     * @memberof jsPDF#
+     * @name getFontList
+     */
+
+
+    API.__private__.getFontList = API.getFontList = function () {
+      var list = {},
+          fontName,
+          fontStyle;
+
+      for (fontName in fontmap) {
+        if (fontmap.hasOwnProperty(fontName)) {
+          list[fontName] = [];
+
+          for (fontStyle in fontmap[fontName]) {
+            if (fontmap[fontName].hasOwnProperty(fontStyle)) {
+              list[fontName].push(fontStyle);
+            }
+          }
+        }
+      }
+
+      return list;
+    };
+    /**
+     * Add a custom font to the current instance.
+     *
+     * @param {string} postScriptName PDF specification full name for the font.
+     * @param {string} id PDF-document-instance-specific label assinged to the font.
+     * @param {string} fontStyle Style of the Font.
+     * @param {number | string} fontWeight Weight of the Font.
+     * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.
+     * @function
+     * @instance
+     * @memberof jsPDF#
+     * @name addFont
+     * @returns {string} fontId
+     */
+
+
+    API.addFont = function (postScriptName, fontName, fontStyle, fontWeight, encoding) {
+      var encodingOptions = ["StandardEncoding", "MacRomanEncoding", "Identity-H", "WinAnsiEncoding"];
+
+      if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {
+        //IE 11 fix
+        encoding = arguments[3];
+      } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {
+        fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);
+      }
+
+      encoding = encoding || "Identity-H";
+      return addFont.call(this, postScriptName, fontName, fontStyle, encoding);
+    };
+
+    var lineWidth = options.lineWidth || 0.200025; // 2mm
+
+    /**
+     * Gets the line width, default: 0.200025.
+     *
+     * @function
+     * @instance
+     * @returns {number} lineWidth
+     * @memberof jsPDF#
+     * @name getLineWidth
+     */
+
+    var getLineWidth = API.__private__.getLineWidth = API.getLineWidth = function () {
+      return lineWidth;
+    };
+    /**
+     * Sets line width for upcoming lines.
+     *
+     * @param {number} width Line width (in units declared at inception of PDF document).
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setLineWidth
+     */
+
+
+    var setLineWidth = API.__private__.setLineWidth = API.setLineWidth = function (width) {
+      lineWidth = width;
+      out(hpf(scale(width)) + " w");
+      return this;
+    };
+    /**
+     * Sets the dash pattern for upcoming lines.
+     *
+     * To reset the settings simply call the method without any parameters.
+     * @param {Array<number>} dashArray An array containing 0-2 numbers. The first number sets the length of the
+     * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered
+     * to be as long as the dashes. An empty array means solid, unbroken lines.
+     * @param {number} dashPhase The phase lines start with.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setLineDashPattern
+     */
+
+
+    API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function (dashArray, dashPhase) {
+      dashArray = dashArray || [];
+      dashPhase = dashPhase || 0;
+
+      if (isNaN(dashPhase) || !Array.isArray(dashArray)) {
+        throw new Error("Invalid arguments passed to jsPDF.setLineDash");
+      }
+
+      dashArray = dashArray.map(function (x) {
+        return hpf(scale(x));
+      }).join(" ");
+      dashPhase = hpf(scale(dashPhase));
+      out("[" + dashArray + "] " + dashPhase + " d");
+      return this;
+    };
+
+    var lineHeightFactor;
+
+    var getLineHeight = API.__private__.getLineHeight = API.getLineHeight = function () {
+      return activeFontSize * lineHeightFactor;
+    };
+
+    API.__private__.getLineHeight = API.getLineHeight = function () {
+      return activeFontSize * lineHeightFactor;
+    };
+    /**
+     * Sets the LineHeightFactor of proportion.
+     *
+     * @param {number} value LineHeightFactor value. Default: 1.15.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setLineHeightFactor
+     */
+
+
+    var setLineHeightFactor = API.__private__.setLineHeightFactor = API.setLineHeightFactor = function (value) {
+      value = value || 1.15;
+
+      if (typeof value === "number") {
+        lineHeightFactor = value;
+      }
+
+      return this;
+    };
+    /**
+     * Gets the LineHeightFactor, default: 1.15.
+     *
+     * @function
+     * @instance
+     * @returns {number} lineHeightFactor
+     * @memberof jsPDF#
+     * @name getLineHeightFactor
+     */
+
+
+    var getLineHeightFactor = API.__private__.getLineHeightFactor = API.getLineHeightFactor = function () {
+      return lineHeightFactor;
+    };
+
+    setLineHeightFactor(options.lineHeight);
+
+    var getHorizontalCoordinate = API.__private__.getHorizontalCoordinate = function (value) {
+      return scale(value);
+    };
+
+    var getVerticalCoordinate = API.__private__.getVerticalCoordinate = function (value) {
+      if (apiMode === ApiMode.ADVANCED) {
+        return value;
+      } else {
+        var pageHeight = pagesContext[currentPage].mediaBox.topRightY - pagesContext[currentPage].mediaBox.bottomLeftY;
+        return pageHeight - scale(value);
+      }
+    };
+
+    var getHorizontalCoordinateString = API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function (value) {
+      return hpf(getHorizontalCoordinate(value));
+    };
+
+    var getVerticalCoordinateString = API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function (value) {
+      return hpf(getVerticalCoordinate(value));
+    };
+
+    var strokeColor = options.strokeColor || "0 G";
+    /**
+     *  Gets the stroke color for upcoming elements.
+     *
+     * @function
+     * @instance
+     * @returns {string} colorAsHex
+     * @memberof jsPDF#
+     * @name getDrawColor
+     */
+
+    API.__private__.getStrokeColor = API.getDrawColor = function () {
+      return decodeColorString(strokeColor);
+    };
+    /**
+     * Sets the stroke color for upcoming elements.
+     *
+     * Depending on the number of arguments given, Gray, RGB, or CMYK
+     * color space is implied.
+     *
+     * When only ch1 is given, "Gray" color space is implied and it
+     * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+     * if values are communicated as String types, or in range from 0 (black)
+     * to 255 (white) if communicated as Number type.
+     * The RGB-like 0-255 range is provided for backward compatibility.
+     *
+     * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+     * value must be in the range from 0.00 (minimum intensity) to to 1.00
+     * (max intensity) if values are communicated as String types, or
+     * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+     * as Number types.
+     * The RGB-like 0-255 range is provided for backward compatibility.
+     *
+     * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+     * value must be a in the range from 0.00 (0% concentration) to to
+     * 1.00 (100% concentration)
+     *
+     * Because JavaScript treats fixed point numbers badly (rounds to
+     * floating point nearest to binary representation) it is highly advised to
+     * communicate the fractional numbers as String types, not JavaScript Number type.
+     *
+     * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+     * @param {Number} ch2 Color channel value.
+     * @param {Number} ch3 Color channel value.
+     * @param {Number} ch4 Color channel value.
+     *
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setDrawColor
+     */
+
+
+    API.__private__.setStrokeColor = API.setDrawColor = function (ch1, ch2, ch3, ch4) {
+      var options = {
+        ch1: ch1,
+        ch2: ch2,
+        ch3: ch3,
+        ch4: ch4,
+        pdfColorType: "draw",
+        precision: 2
+      };
+      strokeColor = encodeColorString(options);
+      out(strokeColor);
+      return this;
+    };
+
+    var fillColor = options.fillColor || "0 g";
+    /**
+     * Gets the fill color for upcoming elements.
+     *
+     * @function
+     * @instance
+     * @returns {string} colorAsHex
+     * @memberof jsPDF#
+     * @name getFillColor
+     */
+
+    API.__private__.getFillColor = API.getFillColor = function () {
+      return decodeColorString(fillColor);
+    };
+    /**
+     * Sets the fill color for upcoming elements.
+     *
+     * Depending on the number of arguments given, Gray, RGB, or CMYK
+     * color space is implied.
+     *
+     * When only ch1 is given, "Gray" color space is implied and it
+     * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+     * if values are communicated as String types, or in range from 0 (black)
+     * to 255 (white) if communicated as Number type.
+     * The RGB-like 0-255 range is provided for backward compatibility.
+     *
+     * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+     * value must be in the range from 0.00 (minimum intensity) to to 1.00
+     * (max intensity) if values are communicated as String types, or
+     * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+     * as Number types.
+     * The RGB-like 0-255 range is provided for backward compatibility.
+     *
+     * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+     * value must be a in the range from 0.00 (0% concentration) to to
+     * 1.00 (100% concentration)
+     *
+     * Because JavaScript treats fixed point numbers badly (rounds to
+     * floating point nearest to binary representation) it is highly advised to
+     * communicate the fractional numbers as String types, not JavaScript Number type.
+     *
+     * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+     * @param {Number} ch2 Color channel value.
+     * @param {Number} ch3 Color channel value.
+     * @param {Number} ch4 Color channel value.
+     *
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setFillColor
+     */
+
+
+    API.__private__.setFillColor = API.setFillColor = function (ch1, ch2, ch3, ch4) {
+      var options = {
+        ch1: ch1,
+        ch2: ch2,
+        ch3: ch3,
+        ch4: ch4,
+        pdfColorType: "fill",
+        precision: 2
+      };
+      fillColor = encodeColorString(options);
+      out(fillColor);
+      return this;
+    };
+
+    var textColor = options.textColor || "0 g";
+    /**
+     * Gets the text color for upcoming elements.
+     *
+     * @function
+     * @instance
+     * @returns {string} colorAsHex
+     * @memberof jsPDF#
+     * @name getTextColor
+     */
+
+    var getTextColor = API.__private__.getTextColor = API.getTextColor = function () {
+      return decodeColorString(textColor);
+    };
+    /**
+     * Sets the text color for upcoming elements.
+     *
+     * Depending on the number of arguments given, Gray, RGB, or CMYK
+     * color space is implied.
+     *
+     * When only ch1 is given, "Gray" color space is implied and it
+     * must be a value in the range from 0.00 (solid black) to to 1.00 (white)
+     * if values are communicated as String types, or in range from 0 (black)
+     * to 255 (white) if communicated as Number type.
+     * The RGB-like 0-255 range is provided for backward compatibility.
+     *
+     * When only ch1,ch2,ch3 are given, "RGB" color space is implied and each
+     * value must be in the range from 0.00 (minimum intensity) to to 1.00
+     * (max intensity) if values are communicated as String types, or
+     * from 0 (min intensity) to to 255 (max intensity) if values are communicated
+     * as Number types.
+     * The RGB-like 0-255 range is provided for backward compatibility.
+     *
+     * When ch1,ch2,ch3,ch4 are given, "CMYK" color space is implied and each
+     * value must be a in the range from 0.00 (0% concentration) to to
+     * 1.00 (100% concentration)
+     *
+     * Because JavaScript treats fixed point numbers badly (rounds to
+     * floating point nearest to binary representation) it is highly advised to
+     * communicate the fractional numbers as String types, not JavaScript Number type.
+     *
+     * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.
+     * @param {Number} ch2 Color channel value.
+     * @param {Number} ch3 Color channel value.
+     * @param {Number} ch4 Color channel value.
+     *
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setTextColor
+     */
+
+
+    API.__private__.setTextColor = API.setTextColor = function (ch1, ch2, ch3, ch4) {
+      var options = {
+        ch1: ch1,
+        ch2: ch2,
+        ch3: ch3,
+        ch4: ch4,
+        pdfColorType: "text",
+        precision: 3
+      };
+      textColor = encodeColorString(options);
+      return this;
+    };
+
+    var activeCharSpace = options.charSpace;
+    /**
+     * Get global value of CharSpace.
+     *
+     * @function
+     * @instance
+     * @returns {number} charSpace
+     * @memberof jsPDF#
+     * @name getCharSpace
+     */
+
+    var getCharSpace = API.__private__.getCharSpace = API.getCharSpace = function () {
+      return parseFloat(activeCharSpace || 0);
+    };
+    /**
+     * Set global value of CharSpace.
+     *
+     * @param {number} charSpace
+     * @function
+     * @instance
+     * @returns {jsPDF} jsPDF-instance
+     * @memberof jsPDF#
+     * @name setCharSpace
+     */
+
+
+    API.__private__.setCharSpace = API.setCharSpace = function (charSpace) {
+      if (isNaN(charSpace)) {
+        throw new Error("Invalid argument passed to jsPDF.setCharSpace");
+      }
+
+      activeCharSpace = charSpace;
+      return this;
+    };
+
+    var lineCapID = 0;
+    /**
+     * Is an Object providing a mapping from human-readable to
+     * integer flag values designating the varieties of line cap
+     * and join styles.
+     *
+     * @memberof jsPDF#
+     * @name CapJoinStyles
+     */
+
+    API.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
+    };
+    /**
+     * Sets the line cap styles.
+     * See {jsPDF.CapJoinStyles} for variants.
+     *
+     * @param {String|Number} style A string or number identifying the type of line cap.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setLineCap
+     */
+
+    API.__private__.setLineCap = API.setLineCap = function (style) {
+      var id = API.CapJoinStyles[style];
+
+      if (id === undefined) {
+        throw new Error("Line cap style of '" + style + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
+      }
+
+      lineCapID = id;
+      out(id + " J");
+      return this;
+    };
+
+    var lineJoinID = 0;
+    /**
+     * Sets the line join styles.
+     * See {jsPDF.CapJoinStyles} for variants.
+     *
+     * @param {String|Number} style A string or number identifying the type of line join.
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setLineJoin
+     */
+
+    API.__private__.setLineJoin = API.setLineJoin = function (style) {
+      var id = API.CapJoinStyles[style];
+
+      if (id === undefined) {
+        throw new Error("Line join style of '" + style + "' is not recognized. See or extend .CapJoinStyles property for valid styles");
+      }
+
+      lineJoinID = id;
+      out(id + " j");
+      return this;
+    };
+    /**
+     * Sets the miterLimit property, which effects the maximum miter length.
+     *
+     * @param {number} length The length of the miter
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setLineMiterLimit
+     */
+
+    API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function (length) {
+      length = length || 0;
+
+      if (isNaN(length)) {
+        throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");
+      }
+
+      out(hpf(scale(length)) + " M");
+      return this;
+    };
+    /**
+     * An object representing a pdf graphics state.
+     * @class GState
+     */
+
+    /**
+     *
+     * @param parameters A parameter object that contains all properties this graphics state wants to set.
+     * Supported are: opacity, stroke-opacity
+     * @constructor
+     */
+
+
+    API.GState = GState;
+    /**
+     * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.
+     * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState
+     * it will be added before use.
+     * @function
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setGState
+     */
+
+    API.setGState = function (gState) {
+      if (typeof gState === "string") {
+        gState = gStates[gStatesMap[gState]];
+      } else {
+        gState = addGState(null, gState);
+      }
+
+      if (!gState.equals(activeGState)) {
+        out("/" + gState.id + " gs");
+        activeGState = gState;
+      }
+    };
+    /**
+     * Adds a new Graphics State. Duplicates are automatically eliminated.
+     * @param {String} key Might also be null, if no later reference to this gState is needed
+     * @param {Object} gState The gState object
+     */
+
+
+    var addGState = function addGState(key, gState) {
+      // only add it if it is not already present (the keys provided by the user must be unique!)
+      if (key && gStatesMap[key]) return;
+      var duplicate = false;
+
+      for (var s in gStates) {
+        if (gStates.hasOwnProperty(s)) {
+          if (gStates[s].equals(gState)) {
+            duplicate = true;
+            break;
+          }
+        }
+      }
+
+      if (duplicate) {
+        gState = gStates[s];
+      } else {
+        var gStateKey = "GS" + (Object.keys(gStates).length + 1).toString(10);
+        gStates[gStateKey] = gState;
+        gState.id = gStateKey;
+      } // several user keys may point to the same GState object
+
+
+      key && (gStatesMap[key] = gState.id);
+      events.publish("addGState", gState);
+      return gState;
+    };
+    /**
+     * Adds a new {@link GState} for later use. See {@link setGState}.
+     * @param {String} key
+     * @param {GState} gState
+     * @function
+     * @instance
+     * @returns {jsPDF}
+     *
+     * @memberof jsPDF#
+     * @name addGState
+     */
+
+
+    API.addGState = function (key, gState) {
+      addGState(key, gState);
+      return this;
+    };
+    /**
+     * Saves the current graphics state ("pushes it on the stack"). It can be restored by {@link restoreGraphicsState}
+     * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,
+     * fill and stroke colors etc.
+     * @function
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name saveGraphicsState
+     */
+
+
+    API.saveGraphicsState = function () {
+      out("q"); // as we cannot set font key and size independently we must keep track of both
+
+      fontStateStack.push({
+        key: activeFontKey,
+        size: activeFontSize,
+        color: textColor
+      });
+      return this;
+    };
+    /**
+     * Restores a previously saved graphics state saved by {@link saveGraphicsState} ("pops the stack").
+     * @function
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name restoreGraphicsState
+     */
+
+
+    API.restoreGraphicsState = function () {
+      out("Q"); // restore previous font state
+
+      var fontState = fontStateStack.pop();
+      activeFontKey = fontState.key;
+      activeFontSize = fontState.size;
+      textColor = fontState.color;
+      activeGState = null;
+      return this;
+    };
+    /**
+     * Appends this matrix to the left of all previously applied matrices.
+     *
+     * @param {Matrix} matrix
+     * @function
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name setCurrentTransformationMatrix
+     */
+
+
+    API.setCurrentTransformationMatrix = function (matrix) {
+      out(matrix.toString() + " cm");
+      return this;
+    };
+    /**
+     * Inserts a debug comment into the generated pdf.
+     * @function
+     * @instance
+     * @param {String} text
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name comment
+     */
+
+
+    API.comment = function (text) {
+      out("#" + text);
+      return this;
+    };
+    /**
+     * Point
+     */
+
+
+    var Point = function Point(x, y) {
+      var _x = x || 0;
+
+      Object.defineProperty(this, "x", {
+        enumerable: true,
+        get: function get() {
+          return _x;
+        },
+        set: function set(value) {
+          if (!isNaN(value)) {
+            _x = parseFloat(value);
+          }
+        }
+      });
+
+      var _y = y || 0;
+
+      Object.defineProperty(this, "y", {
+        enumerable: true,
+        get: function get() {
+          return _y;
+        },
+        set: function set(value) {
+          if (!isNaN(value)) {
+            _y = parseFloat(value);
+          }
+        }
+      });
+      var _type = "pt";
+      Object.defineProperty(this, "type", {
+        enumerable: true,
+        get: function get() {
+          return _type;
+        },
+        set: function set(value) {
+          _type = value.toString();
+        }
+      });
+      return this;
+    };
+    /**
+     * Rectangle
+     */
+
+
+    var Rectangle = function Rectangle(x, y, w, h) {
+      Point.call(this, x, y);
+      this.type = "rect";
+
+      var _w = w || 0;
+
+      Object.defineProperty(this, "w", {
+        enumerable: true,
+        get: function get() {
+          return _w;
+        },
+        set: function set(value) {
+          if (!isNaN(value)) {
+            _w = parseFloat(value);
+          }
+        }
+      });
+
+      var _h = h || 0;
+
+      Object.defineProperty(this, "h", {
+        enumerable: true,
+        get: function get() {
+          return _h;
+        },
+        set: function set(value) {
+          if (!isNaN(value)) {
+            _h = parseFloat(value);
+          }
+        }
+      });
+      return this;
+    };
+    /**
+     * FormObject/RenderTarget
+     */
+
+
+    var RenderTarget = function RenderTarget() {
+      this.page = page;
+      this.currentPage = currentPage;
+      this.pages = pages.slice(0);
+      this.pagesContext = pagesContext.slice(0);
+      this.x = pageX;
+      this.y = pageY;
+      this.matrix = pageMatrix;
+      this.width = getPageWidth(currentPage);
+      this.height = getPageHeight(currentPage);
+      this.outputDestination = outputDestination;
+      this.id = ""; // set by endFormObject()
+
+      this.objectNumber = -1; // will be set by putXObject()
+    };
+
+    RenderTarget.prototype.restore = function () {
+      page = this.page;
+      currentPage = this.currentPage;
+      pagesContext = this.pagesContext;
+      pages = this.pages;
+      pageX = this.x;
+      pageY = this.y;
+      pageMatrix = this.matrix;
+      setPageWidth(currentPage, this.width);
+      setPageHeight(currentPage, this.height);
+      outputDestination = this.outputDestination;
+    };
+
+    var beginNewRenderTarget = function beginNewRenderTarget(x, y, width, height, matrix) {
+      // save current state
+      renderTargetStack.push(new RenderTarget()); // clear pages
+
+      page = currentPage = 0;
+      pages = [];
+      pageX = x;
+      pageY = y;
+      pageMatrix = matrix;
+      beginPage([width, height]);
+    };
+
+    var endFormObject = function endFormObject(key) {
+      // only add it if it is not already present (the keys provided by the user must be unique!)
+      if (renderTargetMap[key]) {
+        renderTargetStack.pop().restore();
+        return;
+      } // save the created xObject
+
+
+      var newXObject = new RenderTarget();
+      var xObjectId = "Xo" + (Object.keys(renderTargets).length + 1).toString(10);
+      newXObject.id = xObjectId;
+      renderTargetMap[key] = xObjectId;
+      renderTargets[xObjectId] = newXObject;
+      events.publish("addFormObject", newXObject); // restore state from stack
+
+      renderTargetStack.pop().restore();
+    };
+    /**
+     * Starts a new pdf form object, which means that all consequent draw calls target a new independent object
+     * until {@link endFormObject} is called. The created object can be referenced and drawn later using
+     * {@link doFormObject}. Nested form objects are possible.
+     * x, y, width, height set the bounding box that is used to clip the content.
+     *
+     * @param {number} x
+     * @param {number} y
+     * @param {number} width
+     * @param {number} height
+     * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to
+     * the parent's.
+     * @function
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name beginFormObject
+     */
+
+
+    API.beginFormObject = function (x, y, width, height, matrix) {
+      // The user can set the output target to a new form object. Nested form objects are possible.
+      // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as
+      // the PDF-Spec states:
+      // "In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which
+      // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,
+      // form XObjects may be independent of the content streams in which they appear, and this is strongly
+      // recommended although not required"
+      beginNewRenderTarget(x, y, width, height, matrix);
+      return this;
+    };
+    /**
+     * Completes and saves the form object.
+     * @param {String} key The key by which this form object can be referenced.
+     * @function
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name endFormObject
+     */
+
+
+    API.endFormObject = function (key) {
+      endFormObject(key);
+      return this;
+    };
+    /**
+     * Draws the specified form object by referencing to the respective pdf XObject created with
+     * {@link API.beginFormObject} and {@link endFormObject}.
+     * The location is determined by matrix.
+     *
+     * @param {String} key The key to the form object.
+     * @param {Matrix} matrix The matrix applied before drawing the form object.
+     * @function
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name doFormObject
+     */
+
+
+    API.doFormObject = function (key, matrix) {
+      var xObject = renderTargets[renderTargetMap[key]];
+      out("q");
+      out(matrix.toString() + " cm");
+      out("/" + xObject.id + " Do");
+      out("Q");
+      return this;
+    };
+    /**
+     * Returns the form object specified by key.
+     * @param key {String}
+     * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}
+     * @function
+     * @returns {jsPDF}
+     * @memberof jsPDF#
+     * @name getFormObject
+     */
+
+
+    API.getFormObject = function (key) {
+      var xObject = renderTargets[renderTargetMap[key]];
+      return {
+        x: xObject.x,
+        y: xObject.y,
+        width: xObject.width,
+        height: xObject.height,
+        matrix: xObject.matrix
+      };
+    };
+    /**
+     * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').
+     * Uses FileSaver.js-method saveAs.
+     *
+     * @memberof jsPDF#
+     * @name save
+     * @function
+     * @instance
+     * @param  {string} filename The filename including extension.
+     * @param  {Object} options An Object with additional options, possible options: 'returnPromise'.
+     * @returns {jsPDF|Promise} jsPDF-instance     */
+
+
+    API.save = function (filename, options) {
+      filename = filename || "generated.pdf";
+      options = options || {};
+      options.returnPromise = options.returnPromise || false;
+
+      if (options.returnPromise === false) {
+        saveAs(getBlob(buildDocument()), filename);
+
+        if (typeof saveAs.unload === "function") {
+          if (globalObject.setTimeout) {
+            setTimeout(saveAs.unload, 911);
+          }
+        }
+
+        return this;
+      } else {
+        return new Promise(function (resolve, reject) {
+          try {
+            var result = saveAs(getBlob(buildDocument()), filename);
+
+            if (typeof saveAs.unload === "function") {
+              if (globalObject.setTimeout) {
+                setTimeout(saveAs.unload, 911);
+              }
+            }
+
+            resolve(result);
+          } catch (e) {
+            reject(e.message);
+          }
+        });
+      }
+    }; // applying plugins (more methods) ON TOP of built-in API.
+    // this is intentional as we allow plugins to override
+    // built-ins
+
+
+    for (var plugin in jsPDF.API) {
+      if (jsPDF.API.hasOwnProperty(plugin)) {
+        if (plugin === "events" && jsPDF.API.events.length) {
+          (function (events, newEvents) {
+            // jsPDF.API.events is a JS Array of Arrays
+            // where each Array is a pair of event name, handler
+            // Events were added by plugins to the jsPDF instantiator.
+            // These are always added to the new instance and some ran
+            // during instantiation.
+            var eventname, handler_and_args, i;
+
+            for (i = newEvents.length - 1; i !== -1; i--) {
+              // subscribe takes 3 args: 'topic', function, runonce_flag
+              // if undefined, runonce is false.
+              // users can attach callback directly,
+              // or they can attach an array with [callback, runonce_flag]
+              // that's what the "apply" magic is for below.
+              eventname = newEvents[i][0];
+              handler_and_args = newEvents[i][1];
+              events.subscribe.apply(events, [eventname].concat(typeof handler_and_args === "function" ? [handler_and_args] : handler_and_args));
+            }
+          })(events, jsPDF.API.events);
+        } else {
+          API[plugin] = jsPDF.API[plugin];
+        }
+      }
+    }
+
+    var getPageWidth = API.getPageWidth = function (pageNumber) {
+      pageNumber = pageNumber || currentPage;
+      return (pagesContext[pageNumber].mediaBox.topRightX - pagesContext[pageNumber].mediaBox.bottomLeftX) / scaleFactor;
+    };
+
+    var setPageWidth = API.setPageWidth = function (pageNumber, value) {
+      pagesContext[pageNumber].mediaBox.topRightX = value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;
+    };
+
+    var getPageHeight = API.getPageHeight = function (pageNumber) {
+      pageNumber = pageNumber || currentPage;
+      return (pagesContext[pageNumber].mediaBox.topRightY - pagesContext[pageNumber].mediaBox.bottomLeftY) / scaleFactor;
+    };
+
+    var setPageHeight = API.setPageHeight = function (pageNumber, value) {
+      pagesContext[pageNumber].mediaBox.topRightY = value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;
+    };
+    /**
+     * Object exposing internal API to plugins
+     * @public
+     * @ignore
+     */
+
+
+    API.internal = {
+      pdfEscape: pdfEscape,
+      getStyle: getStyle,
+      getFont: getFontEntry,
+      getFontSize: getFontSize,
+      getCharSpace: getCharSpace,
+      getTextColor: getTextColor,
+      getLineHeight: getLineHeight,
+      getLineHeightFactor: getLineHeightFactor,
+      getLineWidth: getLineWidth,
+      write: write,
+      getHorizontalCoordinate: getHorizontalCoordinate,
+      getVerticalCoordinate: getVerticalCoordinate,
+      getCoordinateString: getHorizontalCoordinateString,
+      getVerticalCoordinateString: getVerticalCoordinateString,
+      collections: {},
+      newObject: newObject,
+      newAdditionalObject: newAdditionalObject,
+      newObjectDeferred: newObjectDeferred,
+      newObjectDeferredBegin: newObjectDeferredBegin,
+      getFilters: getFilters,
+      putStream: putStream,
+      events: events,
+      scaleFactor: scaleFactor,
+      pageSize: {
+        getWidth: function getWidth() {
+          return getPageWidth(currentPage);
+        },
+        setWidth: function setWidth(value) {
+          setPageWidth(currentPage, value);
+        },
+        getHeight: function getHeight() {
+          return getPageHeight(currentPage);
+        },
+        setHeight: function setHeight(value) {
+          setPageHeight(currentPage, value);
+        }
+      },
+      encryptionOptions: encryptionOptions,
+      encryption: encryption,
+      getEncryptor: getEncryptor,
+      output: output,
+      getNumberOfPages: getNumberOfPages,
+      pages: pages,
+      out: out,
+      f2: f2,
+      f3: f3,
+      getPageInfo: getPageInfo,
+      getPageInfoByObjId: getPageInfoByObjId,
+      getCurrentPageInfo: getCurrentPageInfo,
+      getPDFVersion: getPdfVersion,
+      Point: Point,
+      Rectangle: Rectangle,
+      Matrix: Matrix,
+      hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.
+
+    };
+    Object.defineProperty(API.internal.pageSize, "width", {
+      get: function get() {
+        return getPageWidth(currentPage);
+      },
+      set: function set(value) {
+        setPageWidth(currentPage, value);
+      },
+      enumerable: true,
+      configurable: true
+    });
+    Object.defineProperty(API.internal.pageSize, "height", {
+      get: function get() {
+        return getPageHeight(currentPage);
+      },
+      set: function set(value) {
+        setPageHeight(currentPage, value);
+      },
+      enumerable: true,
+      configurable: true
+    }); //////////////////////////////////////////////////////
+    // continuing initialization of jsPDF Document object
+    //////////////////////////////////////////////////////
+    // Add the first page automatically
+
+    addFonts.call(API, standardFonts);
+    activeFontKey = "F1";
+
+    _addPage(format, orientation);
+
+    events.publish("initialized");
+    return API;
+  }
+  /**
+   * jsPDF.API is a STATIC property of jsPDF class.
+   * jsPDF.API is an object you can add methods and properties to.
+   * The methods / properties you add will show up in new jsPDF objects.
+   *
+   * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,
+   * callbacks to this object. These will be reassigned to all new instances of jsPDF.
+   *
+   * @static
+   * @public
+   * @memberof jsPDF#
+   * @name API
+   *
+   * @example
+   * jsPDF.API.mymethod = function(){
+   *   // 'this' will be ref to internal API object. see jsPDF source
+   *   // , so you can refer to built-in methods like so:
+   *   //     this.line(....)
+   *   //     this.text(....)
+   * }
+   * var pdfdoc = new jsPDF()
+   * pdfdoc.mymethod() // <- !!!!!!
+   */
+
+
+  jsPDF.API = {
+    events: []
+  };
+  /**
+   * The version of jsPDF.
+   * @name version
+   * @type {string}
+   * @memberof jsPDF#
+   */
+
+  jsPDF.version = "2.5.2";
+
+  var jsPDFAPI = jsPDF.API;
+  var scaleFactor = 1;
+
+  var pdfEscape = function pdfEscape(value) {
+    return value.replace(/\\/g, "\\\\").replace(/\(/g, "\\(").replace(/\)/g, "\\)");
+  };
+
+  var pdfUnescape = function pdfUnescape(value) {
+    return value.replace(/\\\\/g, "\\").replace(/\\\(/g, "(").replace(/\\\)/g, ")");
+  };
+
+  var f2 = function f2(number) {
+    return number.toFixed(2); // Ie, %.2f
+  };
+
+  var f5 = function f5(number) {
+    return number.toFixed(5); // Ie, %.2f
+  };
+
+  jsPDFAPI.__acroform__ = {};
+
+  var inherit = function inherit(child, parent) {
+    child.prototype = Object.create(parent.prototype);
+    child.prototype.constructor = child;
+  };
+
+  var scale = function scale(x) {
+    return x * scaleFactor;
+  };
+
+  var createFormXObject = function createFormXObject(formObject) {
+    var xobj = new AcroFormXObject();
+    var height = AcroFormAppearance.internal.getHeight(formObject) || 0;
+    var width = AcroFormAppearance.internal.getWidth(formObject) || 0;
+    xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];
+    return xobj;
+  };
+  /**
+   * Bit-Operations
+   */
+
+
+  var setBit = jsPDFAPI.__acroform__.setBit = function (number, bitPosition) {
+    number = number || 0;
+    bitPosition = bitPosition || 0;
+
+    if (isNaN(number) || isNaN(bitPosition)) {
+      throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");
+    }
+
+    var bitMask = 1 << bitPosition;
+    number |= bitMask;
+    return number;
+  };
+
+  var clearBit = jsPDFAPI.__acroform__.clearBit = function (number, bitPosition) {
+    number = number || 0;
+    bitPosition = bitPosition || 0;
+
+    if (isNaN(number) || isNaN(bitPosition)) {
+      throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");
+    }
+
+    var bitMask = 1 << bitPosition;
+    number &= ~bitMask;
+    return number;
+  };
+
+  var getBit = jsPDFAPI.__acroform__.getBit = function (number, bitPosition) {
+    if (isNaN(number) || isNaN(bitPosition)) {
+      throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");
+    }
+
+    return (number & 1 << bitPosition) === 0 ? 0 : 1;
+  };
+  /*
+   * Ff starts counting the bit position at 1 and not like javascript at 0
+   */
+
+
+  var getBitForPdf = jsPDFAPI.__acroform__.getBitForPdf = function (number, bitPosition) {
+    if (isNaN(number) || isNaN(bitPosition)) {
+      throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");
+    }
+
+    return getBit(number, bitPosition - 1);
+  };
+
+  var setBitForPdf = jsPDFAPI.__acroform__.setBitForPdf = function (number, bitPosition) {
+    if (isNaN(number) || isNaN(bitPosition)) {
+      throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");
+    }
+
+    return setBit(number, bitPosition - 1);
+  };
+
+  var clearBitForPdf = jsPDFAPI.__acroform__.clearBitForPdf = function (number, bitPosition) {
+    if (isNaN(number) || isNaN(bitPosition)) {
+      throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");
+    }
+
+    return clearBit(number, bitPosition - 1);
+  };
+
+  var calculateCoordinates = jsPDFAPI.__acroform__.calculateCoordinates = function (args, scope) {
+    var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;
+    var getVerticalCoordinate = scope.internal.getVerticalCoordinate;
+    var x = args[0];
+    var y = args[1];
+    var w = args[2];
+    var h = args[3];
+    var coordinates = {};
+    coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;
+    coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;
+    coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;
+    coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;
+    return [Number(f2(coordinates.lowerLeft_X)), Number(f2(coordinates.lowerLeft_Y)), Number(f2(coordinates.upperRight_X)), Number(f2(coordinates.upperRight_Y))];
+  };
+
+  var calculateAppearanceStream = function calculateAppearanceStream(formObject) {
+    if (formObject.appearanceStreamContent) {
+      return formObject.appearanceStreamContent;
+    }
+
+    if (!formObject.V && !formObject.DV) {
+      return;
+    } // else calculate it
+
+
+    var stream = [];
+    var text = formObject._V || formObject.DV;
+    var calcRes = calculateX(formObject, text);
+    var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id; //PDF 32000-1:2008, page 444
+
+    stream.push("/Tx BMC");
+    stream.push("q");
+    stream.push("BT"); // Begin Text
+
+    stream.push(formObject.scope.__private__.encodeColorString(formObject.color));
+    stream.push("/" + fontKey + " " + f2(calcRes.fontSize) + " Tf");
+    stream.push("1 0 0 1 0 0 Tm"); // Transformation Matrix
+
+    stream.push(calcRes.text);
+    stream.push("ET"); // End Text
+
+    stream.push("Q");
+    stream.push("EMC");
+    var appearanceStreamContent = createFormXObject(formObject);
+    appearanceStreamContent.scope = formObject.scope;
+    appearanceStreamContent.stream = stream.join("\n");
+    return appearanceStreamContent;
+  };
+
+  var calculateX = function calculateX(formObject, text) {
+    var maxFontSize = formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;
+    var returnValue = {
+      text: "",
+      fontSize: ""
+    }; // Remove Brackets
+
+    text = text.substr(0, 1) == "(" ? text.substr(1) : text;
+    text = text.substr(text.length - 1) == ")" ? text.substr(0, text.length - 1) : text; // split into array of words
+
+    var textSplit = text.split(" ");
+
+    if (formObject.multiline) {
+      textSplit = textSplit.map(function (word) {
+        return word.split("\n");
+      });
+    } else {
+      textSplit = textSplit.map(function (word) {
+        return [word];
+      });
+    }
+
+    var fontSize = maxFontSize; // The Starting fontSize (The Maximum)
+
+    var lineSpacing = 2;
+    var borderPadding = 2;
+    var height = AcroFormAppearance.internal.getHeight(formObject) || 0;
+    height = height < 0 ? -height : height;
+    var width = AcroFormAppearance.internal.getWidth(formObject) || 0;
+    width = width < 0 ? -width : width;
+
+    var isSmallerThanWidth = function isSmallerThanWidth(i, lastLine, fontSize) {
+      if (i + 1 < textSplit.length) {
+        var tmp = lastLine + " " + textSplit[i + 1][0];
+        var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;
+        var FieldWidth = width - 2 * borderPadding;
+        return TextWidth <= FieldWidth;
+      } else {
+        return false;
+      }
+    };
+
+    fontSize++;
+
+    FontSize: while (fontSize > 0) {
+      text = "";
+      fontSize--;
+      var textHeight = calculateFontSpace("3", formObject, fontSize).height;
+      var startY = formObject.multiline ? height - fontSize : (height - textHeight) / 2;
+      startY += lineSpacing;
+      var startX;
+      var lastY = startY;
+      var firstWordInLine = 0,
+          lastWordInLine = 0;
+      var lastLength;
+      var currWord = 0;
+
+      if (fontSize <= 0) {
+        // In case, the Text doesn't fit at all
+        fontSize = 12;
+        text = "(...) Tj\n";
+        text += "% Width of Text: " + calculateFontSpace(text, formObject, fontSize).width + ", FieldWidth:" + width + "\n";
+        break;
+      }
+
+      var lastLine = "";
+      var lineCount = 0;
+
+      Line: for (var i = 0; i < textSplit.length; i++) {
+        if (textSplit.hasOwnProperty(i)) {
+          var isWithNewLine = false;
+
+          if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {
+            if ((textHeight + lineSpacing) * (lineCount + 2) + lineSpacing > height) {
+              continue FontSize;
+            }
+
+            lastLine += textSplit[i][currWord];
+            isWithNewLine = true;
+            lastWordInLine = i;
+            i--;
+          } else {
+            lastLine += textSplit[i][currWord] + " ";
+            lastLine = lastLine.substr(lastLine.length - 1) == " " ? lastLine.substr(0, lastLine.length - 1) : lastLine;
+            var key = parseInt(i);
+            var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);
+            var isLastWord = i >= textSplit.length - 1;
+
+            if (nextLineIsSmaller && !isLastWord) {
+              lastLine += " ";
+              currWord = 0;
+              continue; // Line
+            } else if (!nextLineIsSmaller && !isLastWord) {
+              if (!formObject.multiline) {
+                continue FontSize;
+              } else {
+                if ((textHeight + lineSpacing) * (lineCount + 2) + lineSpacing > height) {
+                  // If the Text is higher than the
+                  // FieldObject
+                  continue FontSize;
+                }
+
+                lastWordInLine = key; // go on
+              }
+            } else if (isLastWord) {
+              lastWordInLine = key;
+            } else {
+              if (formObject.multiline && (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing > height) {
+                // If the Text is higher than the FieldObject
+                continue FontSize;
+              }
+            }
+          } // Remove last blank
+
+
+          var line = "";
+
+          for (var x = firstWordInLine; x <= lastWordInLine; x++) {
+            var currLine = textSplit[x];
+
+            if (formObject.multiline) {
+              if (x === lastWordInLine) {
+                line += currLine[currWord] + " ";
+                currWord = (currWord + 1) % currLine.length;
+                continue;
+              }
+
+              if (x === firstWordInLine) {
+                line += currLine[currLine.length - 1] + " ";
+                continue;
+              }
+            }
+
+            line += currLine[0] + " ";
+          } // Remove last blank
+
+
+          line = line.substr(line.length - 1) == " " ? line.substr(0, line.length - 1) : line; // lastLength -= blankSpace.width;
+
+          lastLength = calculateFontSpace(line, formObject, fontSize).width; // Calculate startX
+
+          switch (formObject.textAlign) {
+            case "right":
+              startX = width - lastLength - borderPadding;
+              break;
+
+            case "center":
+              startX = (width - lastLength) / 2;
+              break;
+
+            case "left":
+            default:
+              startX = borderPadding;
+              break;
+          }
+
+          text += f2(startX) + " " + f2(lastY) + " Td\n";
+          text += "(" + pdfEscape(line) + ") Tj\n"; // reset X in PDF
+
+          text += -f2(startX) + " 0 Td\n"; // After a Line, adjust y position
+
+          lastY = -(fontSize + lineSpacing); // Reset for next iteration step
+
+          lastLength = 0;
+          firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;
+          lineCount++;
+          lastLine = "";
+          continue Line;
+        }
+      }
+
+      break;
+    }
+
+    returnValue.text = text;
+    returnValue.fontSize = fontSize;
+    return returnValue;
+  };
+  /**
+   * Small workaround for calculating the TextMetric approximately.
+   *
+   * @param text
+   * @param fontsize
+   * @returns {TextMetrics} (Has Height and Width)
+   */
+
+
+  var calculateFontSpace = function calculateFontSpace(text, formObject, fontSize) {
+    var font = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle);
+    var width = formObject.scope.getStringUnitWidth(text, {
+      font: font,
+      fontSize: parseFloat(fontSize),
+      charSpace: 0
+    }) * parseFloat(fontSize);
+    var height = formObject.scope.getStringUnitWidth("3", {
+      font: font,
+      fontSize: parseFloat(fontSize),
+      charSpace: 0
+    }) * parseFloat(fontSize) * 1.5;
+    return {
+      height: height,
+      width: width
+    };
+  };
+
+  var acroformPluginTemplate = {
+    fields: [],
+    xForms: [],
+
+    /**
+     * acroFormDictionaryRoot contains information about the AcroForm
+     * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has
+     * 1: The Object ID of the Root
+     */
+    acroFormDictionaryRoot: null,
+
+    /**
+     * After the PDF gets evaluated, the reference to the root has to be
+     * reset, this indicates, whether the root has already been printed
+     * out
+     */
+    printedOut: false,
+    internal: null,
+    isInitialized: false
+  };
+
+  var annotReferenceCallback = function annotReferenceCallback(scope) {
+    //set objId to undefined and force it to get a new objId on buildDocument
+    scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;
+    var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;
+
+    for (var i in fields) {
+      if (fields.hasOwnProperty(i)) {
+        var formObject = fields[i]; //set objId to undefined and force it to get a new objId on buildDocument
+
+        formObject.objId = undefined; // add Annot Reference!
+
+        if (formObject.hasAnnotation) {
+          // If theres an Annotation Widget in the Form Object, put the
+          // Reference in the /Annot array
+          createAnnotationReference(formObject, scope);
+        }
+      }
+    }
+  };
+
+  var putForm = function putForm(formObject) {
+    if (formObject.scope.internal.acroformPlugin.printedOut) {
+      formObject.scope.internal.acroformPlugin.printedOut = false;
+      formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;
+    }
+
+    formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(formObject);
+  };
+  /**
+   * Create the Reference to the widgetAnnotation, so that it gets referenced
+   * in the Annot[] int the+ (Requires the Annotation Plugin)
+   */
+
+
+  var createAnnotationReference = function createAnnotationReference(object, scope) {
+    var options = {
+      type: "reference",
+      object: object
+    };
+
+    var findEntry = function findEntry(entry) {
+      return entry.type === options.type && entry.object === options.object;
+    };
+
+    if (scope.internal.getPageInfo(object.page).pageContext.annotations.find(findEntry) === undefined) {
+      scope.internal.getPageInfo(object.page).pageContext.annotations.push(options);
+    }
+  }; // Callbacks
+
+
+  var putCatalogCallback = function putCatalogCallback(scope) {
+    // Put reference to AcroForm to DocumentCatalog
+    if (typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== "undefined") {
+      // for safety, shouldn't normally be the case
+      scope.internal.write("/AcroForm " + scope.internal.acroformPlugin.acroFormDictionaryRoot.objId + " " + 0 + " R");
+    } else {
+      throw new Error("putCatalogCallback: Root missing.");
+    }
+  };
+  /**
+   * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm
+   * Dictionary
+   */
+
+
+  var AcroFormDictionaryCallback = function AcroFormDictionaryCallback(scope) {
+    // Remove event
+    scope.internal.events.unsubscribe(scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID);
+    delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;
+    scope.internal.acroformPlugin.printedOut = true;
+  };
+  /**
+   * Creates the single Fields and writes them into the Document
+   *
+   * If fieldArray is set, use the fields that are inside it instead of the
+   * fields from the AcroRoot (for the FormXObjects...)
+   */
+
+
+  var createFieldCallback = function createFieldCallback(fieldArray, scope) {
+    var standardFields = !fieldArray;
+
+    if (!fieldArray) {
+      // in case there is no fieldArray specified, we want to print out
+      // the Fields of the AcroForm
+      // Print out Root
+      scope.internal.newObjectDeferredBegin(scope.internal.acroformPlugin.acroFormDictionaryRoot.objId, true);
+      scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();
+    }
+
+    fieldArray = fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;
+
+    for (var i in fieldArray) {
+      if (fieldArray.hasOwnProperty(i)) {
+        var fieldObject = fieldArray[i];
+        var keyValueList = [];
+        var oldRect = fieldObject.Rect;
+
+        if (fieldObject.Rect) {
+          fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);
+        } // Start Writing the Object
+
+
+        scope.internal.newObjectDeferredBegin(fieldObject.objId, true);
+        fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(fieldObject);
+
+        if (_typeof(fieldObject) === "object" && typeof fieldObject.getKeyValueListForStream === "function") {
+          keyValueList = fieldObject.getKeyValueListForStream();
+        }
+
+        fieldObject.Rect = oldRect;
+
+        if (fieldObject.hasAppearanceStream && !fieldObject.appearanceStreamContent) {
+          // Calculate Appearance
+          var appearance = calculateAppearanceStream(fieldObject);
+          keyValueList.push({
+            key: "AP",
+            value: "<</N " + appearance + ">>"
+          });
+          scope.internal.acroformPlugin.xForms.push(appearance);
+        } // Assume AppearanceStreamContent is a Array with N,R,D (at least
+        // one of them!)
+
+
+        if (fieldObject.appearanceStreamContent) {
+          var appearanceStreamString = ""; // Iterate over N,R and D
+
+          for (var k in fieldObject.appearanceStreamContent) {
+            if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {
+              var value = fieldObject.appearanceStreamContent[k];
+              appearanceStreamString += "/" + k + " ";
+              appearanceStreamString += "<<";
+
+              if (Object.keys(value).length >= 1 || Array.isArray(value)) {
+                // appearanceStream is an Array or Object!
+                for (var i in value) {
+                  if (value.hasOwnProperty(i)) {
+                    var obj = value[i];
+
+                    if (typeof obj === "function") {
+                      // if Function is referenced, call it in order
+                      // to get the FormXObject
+                      obj = obj.call(scope, fieldObject);
+                    }
+
+                    appearanceStreamString += "/" + i + " " + obj + " "; // In case the XForm is already used, e.g. OffState
+                    // of CheckBoxes, don't add it
+
+                    if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0)) scope.internal.acroformPlugin.xForms.push(obj);
+                  }
+                }
+              } else {
+                obj = value;
+
+                if (typeof obj === "function") {
+                  // if Function is referenced, call it in order to
+                  // get the FormXObject
+                  obj = obj.call(scope, fieldObject);
+                }
+
+                appearanceStreamString += "/" + i + " " + obj;
+                if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0)) scope.internal.acroformPlugin.xForms.push(obj);
+              }
+
+              appearanceStreamString += ">>";
+            }
+          } // appearance stream is a normal Object..
+
+
+          keyValueList.push({
+            key: "AP",
+            value: "<<\n" + appearanceStreamString + ">>"
+          });
+        }
+
+        scope.internal.putStream({
+          additionalKeyValues: keyValueList,
+          objectId: fieldObject.objId
+        });
+        scope.internal.out("endobj");
+      }
+    }
+
+    if (standardFields) {
+      createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);
+    }
+  };
+
+  var createXFormObjectCallback = function createXFormObjectCallback(fieldArray, scope) {
+    for (var i in fieldArray) {
+      if (fieldArray.hasOwnProperty(i)) {
+        var key = i;
+        var fieldObject = fieldArray[i]; // Start Writing the Object
+
+        scope.internal.newObjectDeferredBegin(fieldObject.objId, true);
+
+        if (_typeof(fieldObject) === "object" && typeof fieldObject.putStream === "function") {
+          fieldObject.putStream();
+        }
+
+        delete fieldArray[key];
+      }
+    }
+  };
+
+  var initializeAcroForm = function initializeAcroForm(scope, formObject) {
+    formObject.scope = scope;
+
+    if (scope.internal !== undefined && (scope.internal.acroformPlugin === undefined || scope.internal.acroformPlugin.isInitialized === false)) {
+      AcroFormField.FieldNum = 0;
+      scope.internal.acroformPlugin = JSON.parse(JSON.stringify(acroformPluginTemplate));
+
+      if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {
+        throw new Error("Exception while creating AcroformDictionary");
+      }
+
+      scaleFactor = scope.internal.scaleFactor; // The Object Number of the AcroForm Dictionary
+
+      scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();
+      scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope; // add Callback for creating the AcroForm Dictionary
+
+      scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe("postPutResources", function () {
+        AcroFormDictionaryCallback(scope);
+      });
+      scope.internal.events.subscribe("buildDocument", function () {
+        annotReferenceCallback(scope);
+      }); // buildDocument
+      // Register event, that is triggered when the DocumentCatalog is
+      // written, in order to add /AcroForm
+
+      scope.internal.events.subscribe("putCatalog", function () {
+        putCatalogCallback(scope);
+      }); // Register event, that creates all Fields
+
+      scope.internal.events.subscribe("postPutPages", function (fieldArray) {
+        createFieldCallback(fieldArray, scope);
+      });
+      scope.internal.acroformPlugin.isInitialized = true;
+    }
+  }; //PDF 32000-1:2008, page 26, 7.3.6
+
+
+  var arrayToPdfArray = jsPDFAPI.__acroform__.arrayToPdfArray = function (array, objId, scope) {
+    var encryptor = function encryptor(data) {
+      return data;
+    };
+
+    if (Array.isArray(array)) {
+      var content = "[";
+
+      for (var i = 0; i < array.length; i++) {
+        if (i !== 0) {
+          content += " ";
+        }
+
+        switch (_typeof(array[i])) {
+          case "boolean":
+          case "number":
+          case "object":
+            content += array[i].toString();
+            break;
+
+          case "string":
+            if (array[i].substr(0, 1) !== "/") {
+              if (typeof objId !== "undefined" && scope) encryptor = scope.internal.getEncryptor(objId);
+              content += "(" + pdfEscape(encryptor(array[i].toString())) + ")";
+            } else {
+              content += array[i].toString();
+            }
+
+            break;
+        }
+      }
+
+      content += "]";
+      return content;
+    }
+
+    throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray");
+  };
+
+  function getMatches(string, regex, index) {
+    index || (index = 1); // default to the first capturing group
+
+    var matches = [];
+    var match;
+
+    while (match = regex.exec(string)) {
+      matches.push(match[index]);
+    }
+
+    return matches;
+  }
+
+  var pdfArrayToStringArray = function pdfArrayToStringArray(array) {
+    var result = [];
+
+    if (typeof array === "string") {
+      result = getMatches(array, /\((.*?)\)/g);
+    }
+
+    return result;
+  };
+
+  var toPdfString = function toPdfString(string, objId, scope) {
+    var encryptor = function encryptor(data) {
+      return data;
+    };
+
+    if (typeof objId !== "undefined" && scope) encryptor = scope.internal.getEncryptor(objId);
+    string = string || "";
+    string.toString();
+    string = "(" + pdfEscape(encryptor(string)) + ")";
+    return string;
+  }; // ##########################
+  // Classes
+  // ##########################
+
+  /**
+   * @class AcroFormPDFObject
+   * @classdesc A AcroFormPDFObject
+   */
+
+
+  var AcroFormPDFObject = function AcroFormPDFObject() {
+    this._objId = undefined;
+    this._scope = undefined;
+    /**
+     * @name AcroFormPDFObject#objId
+     * @type {any}
+     */
+
+    Object.defineProperty(this, "objId", {
+      get: function get() {
+        if (typeof this._objId === "undefined") {
+          if (typeof this.scope === "undefined") {
+            return undefined;
+          }
+
+          this._objId = this.scope.internal.newObjectDeferred();
+        }
+
+        return this._objId;
+      },
+      set: function set(value) {
+        this._objId = value;
+      }
+    });
+    Object.defineProperty(this, "scope", {
+      value: this._scope,
+      writable: true
+    });
+  };
+  /**
+   * @function AcroFormPDFObject.toString
+   */
+
+
+  AcroFormPDFObject.prototype.toString = function () {
+    return this.objId + " 0 R";
+  };
+
+  AcroFormPDFObject.prototype.putStream = function () {
+    var keyValueList = this.getKeyValueListForStream();
+    this.scope.internal.putStream({
+      data: this.stream,
+      additionalKeyValues: keyValueList,
+      objectId: this.objId
+    });
+    this.scope.internal.out("endobj");
+  };
+  /**
+   * Returns an key-value-List of all non-configurable Variables from the Object
+   *
+   * @name getKeyValueListForStream
+   * @returns {string}
+   */
+
+
+  AcroFormPDFObject.prototype.getKeyValueListForStream = function () {
+    var keyValueList = [];
+    var keys = Object.getOwnPropertyNames(this).filter(function (key) {
+      return key != "content" && key != "appearanceStreamContent" && key != "scope" && key != "objId" && key.substring(0, 1) != "_";
+    });
+
+    for (var i in keys) {
+      if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {
+        var key = keys[i];
+        var value = this[key];
+
+        if (value) {
+          if (Array.isArray(value)) {
+            keyValueList.push({
+              key: key,
+              value: arrayToPdfArray(value, this.objId, this.scope)
+            });
+          } else if (value instanceof AcroFormPDFObject) {
+            // In case it is a reference to another PDFObject,
+            // take the reference number
+            value.scope = this.scope;
+            keyValueList.push({
+              key: key,
+              value: value.objId + " 0 R"
+            });
+          } else if (typeof value !== "function") {
+            keyValueList.push({
+              key: key,
+              value: value
+            });
+          }
+        }
+      }
+    }
+
+    return keyValueList;
+  };
+
+  var AcroFormXObject = function AcroFormXObject() {
+    AcroFormPDFObject.call(this);
+    Object.defineProperty(this, "Type", {
+      value: "/XObject",
+      configurable: false,
+      writable: true
+    });
+    Object.defineProperty(this, "Subtype", {
+      value: "/Form",
+      configurable: false,
+      writable: true
+    });
+    Object.defineProperty(this, "FormType", {
+      value: 1,
+      configurable: false,
+      writable: true
+    });
+    var _BBox = [];
+    Object.defineProperty(this, "BBox", {
+      configurable: false,
+      get: function get() {
+        return _BBox;
+      },
+      set: function set(value) {
+        _BBox = value;
+      }
+    });
+    Object.defineProperty(this, "Resources", {
+      value: "2 0 R",
+      configurable: false,
+      writable: true
+    });
+
+    var _stream;
+
+    Object.defineProperty(this, "stream", {
+      enumerable: false,
+      configurable: true,
+      set: function set(value) {
+        _stream = value.trim();
+      },
+      get: function get() {
+        if (_stream) {
+          return _stream;
+        } else {
+          return null;
+        }
+      }
+    });
+  };
+
+  inherit(AcroFormXObject, AcroFormPDFObject);
+
+  var AcroFormDictionary = function AcroFormDictionary() {
+    AcroFormPDFObject.call(this);
+    var _Kids = [];
+    Object.defineProperty(this, "Kids", {
+      enumerable: false,
+      configurable: true,
+      get: function get() {
+        if (_Kids.length > 0) {
+          return _Kids;
+        } else {
+          return undefined;
+        }
+      }
+    });
+    Object.defineProperty(this, "Fields", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        return _Kids;
+      }
+    }); // Default Appearance
+
+    var _DA;
+
+    Object.defineProperty(this, "DA", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        if (!_DA) {
+          return undefined;
+        }
+
+        var encryptor = function encryptor(data) {
+          return data;
+        };
+
+        if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+        return "(" + pdfEscape(encryptor(_DA)) + ")";
+      },
+      set: function set(value) {
+        _DA = value;
+      }
+    });
+  };
+
+  inherit(AcroFormDictionary, AcroFormPDFObject);
+  /**
+   * The Field Object contains the Variables, that every Field needs
+   *
+   * @class AcroFormField
+   * @classdesc An AcroForm FieldObject
+   */
+
+  var AcroFormField = function AcroFormField() {
+    AcroFormPDFObject.call(this); //Annotation-Flag See Table 165
+
+    var _F = 4;
+    Object.defineProperty(this, "F", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        return _F;
+      },
+      set: function set(value) {
+        if (!isNaN(value)) {
+          _F = value;
+        } else {
+          throw new Error('Invalid value "' + value + '" for attribute F supplied.');
+        }
+      }
+    });
+    /**
+     * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.
+     * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.
+     *
+     * @name AcroFormField#showWhenPrinted
+     * @default true
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "showWhenPrinted", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(_F, 3));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.F = setBitForPdf(_F, 3);
+        } else {
+          this.F = clearBitForPdf(_F, 3);
+        }
+      }
+    });
+    var _Ff = 0;
+    Object.defineProperty(this, "Ff", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        return _Ff;
+      },
+      set: function set(value) {
+        if (!isNaN(value)) {
+          _Ff = value;
+        } else {
+          throw new Error('Invalid value "' + value + '" for attribute Ff supplied.');
+        }
+      }
+    });
+    var _Rect = [];
+    Object.defineProperty(this, "Rect", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        if (_Rect.length === 0) {
+          return undefined;
+        }
+
+        return _Rect;
+      },
+      set: function set(value) {
+        if (typeof value !== "undefined") {
+          _Rect = value;
+        } else {
+          _Rect = [];
+        }
+      }
+    });
+    /**
+     * The x-position of the field.
+     *
+     * @name AcroFormField#x
+     * @default null
+     * @type {number}
+     */
+
+    Object.defineProperty(this, "x", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        if (!_Rect || isNaN(_Rect[0])) {
+          return 0;
+        }
+
+        return _Rect[0];
+      },
+      set: function set(value) {
+        _Rect[0] = value;
+      }
+    });
+    /**
+     * The y-position of the field.
+     *
+     * @name AcroFormField#y
+     * @default null
+     * @type {number}
+     */
+
+    Object.defineProperty(this, "y", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        if (!_Rect || isNaN(_Rect[1])) {
+          return 0;
+        }
+
+        return _Rect[1];
+      },
+      set: function set(value) {
+        _Rect[1] = value;
+      }
+    });
+    /**
+     * The width of the field.
+     *
+     * @name AcroFormField#width
+     * @default null
+     * @type {number}
+     */
+
+    Object.defineProperty(this, "width", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        if (!_Rect || isNaN(_Rect[2])) {
+          return 0;
+        }
+
+        return _Rect[2];
+      },
+      set: function set(value) {
+        _Rect[2] = value;
+      }
+    });
+    /**
+     * The height of the field.
+     *
+     * @name AcroFormField#height
+     * @default null
+     * @type {number}
+     */
+
+    Object.defineProperty(this, "height", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        if (!_Rect || isNaN(_Rect[3])) {
+          return 0;
+        }
+
+        return _Rect[3];
+      },
+      set: function set(value) {
+        _Rect[3] = value;
+      }
+    });
+    var _FT = "";
+    Object.defineProperty(this, "FT", {
+      enumerable: true,
+      configurable: false,
+      get: function get() {
+        return _FT;
+      },
+      set: function set(value) {
+        switch (value) {
+          case "/Btn":
+          case "/Tx":
+          case "/Ch":
+          case "/Sig":
+            _FT = value;
+            break;
+
+          default:
+            throw new Error('Invalid value "' + value + '" for attribute FT supplied.');
+        }
+      }
+    });
+    var _T = null;
+    Object.defineProperty(this, "T", {
+      enumerable: true,
+      configurable: false,
+      get: function get() {
+        if (!_T || _T.length < 1) {
+          // In case of a Child from a Radio´Group, you don't need a FieldName
+          if (this instanceof AcroFormChildClass) {
+            return undefined;
+          }
+
+          _T = "FieldObject" + AcroFormField.FieldNum++;
+        }
+
+        var encryptor = function encryptor(data) {
+          return data;
+        };
+
+        if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+        return "(" + pdfEscape(encryptor(_T)) + ")";
+      },
+      set: function set(value) {
+        _T = value.toString();
+      }
+    });
+    /**
+     * (Optional) The partial field name (see 12.7.3.2, “Field Names”).
+     *
+     * @name AcroFormField#fieldName
+     * @default null
+     * @type {string}
+     */
+
+    Object.defineProperty(this, "fieldName", {
+      configurable: true,
+      enumerable: true,
+      get: function get() {
+        return _T;
+      },
+      set: function set(value) {
+        _T = value;
+      }
+    });
+    var _fontName = "helvetica";
+    /**
+     * The fontName of the font to be used.
+     *
+     * @name AcroFormField#fontName
+     * @default 'helvetica'
+     * @type {string}
+     */
+
+    Object.defineProperty(this, "fontName", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _fontName;
+      },
+      set: function set(value) {
+        _fontName = value;
+      }
+    });
+    var _fontStyle = "normal";
+    /**
+     * The fontStyle of the font to be used.
+     *
+     * @name AcroFormField#fontStyle
+     * @default 'normal'
+     * @type {string}
+     */
+
+    Object.defineProperty(this, "fontStyle", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _fontStyle;
+      },
+      set: function set(value) {
+        _fontStyle = value;
+      }
+    });
+    var _fontSize = 0;
+    /**
+     * The fontSize of the font to be used.
+     *
+     * @name AcroFormField#fontSize
+     * @default 0 (for auto)
+     * @type {number}
+     */
+
+    Object.defineProperty(this, "fontSize", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _fontSize;
+      },
+      set: function set(value) {
+        _fontSize = value;
+      }
+    });
+    var _maxFontSize = undefined;
+    /**
+     * The maximum fontSize of the font to be used.
+     *
+     * @name AcroFormField#maxFontSize
+     * @default 0 (for auto)
+     * @type {number}
+     */
+
+    Object.defineProperty(this, "maxFontSize", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        if (_maxFontSize === undefined) {
+          // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)
+          // ("50" is transformed to the "user space" but then used in "pdf space")
+          return 50 / scaleFactor;
+        } else {
+          return _maxFontSize;
+        }
+      },
+      set: function set(value) {
+        _maxFontSize = value;
+      }
+    });
+    var _color = "black";
+    /**
+     * The color of the text
+     *
+     * @name AcroFormField#color
+     * @default 'black'
+     * @type {string|rgba}
+     */
+
+    Object.defineProperty(this, "color", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _color;
+      },
+      set: function set(value) {
+        _color = value;
+      }
+    });
+    var _DA = "/F1 0 Tf 0 g"; // Defines the default appearance (Needed for variable Text)
+
+    Object.defineProperty(this, "DA", {
+      enumerable: true,
+      configurable: false,
+      get: function get() {
+        if (!_DA || this instanceof AcroFormChildClass || this instanceof AcroFormTextField) {
+          return undefined;
+        }
+
+        return toPdfString(_DA, this.objId, this.scope);
+      },
+      set: function set(value) {
+        value = value.toString();
+        _DA = value;
+      }
+    });
+    var _DV = null;
+    Object.defineProperty(this, "DV", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        if (!_DV) {
+          return undefined;
+        }
+
+        if (this instanceof AcroFormButton === false) {
+          return toPdfString(_DV, this.objId, this.scope);
+        }
+
+        return _DV;
+      },
+      set: function set(value) {
+        value = value.toString();
+
+        if (this instanceof AcroFormButton === false) {
+          if (value.substr(0, 1) === "(") {
+            _DV = pdfUnescape(value.substr(1, value.length - 2));
+          } else {
+            _DV = pdfUnescape(value);
+          }
+        } else {
+          _DV = value;
+        }
+      }
+    });
+    /**
+     * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.
+     *
+     * @name AcroFormField#defaultValue
+     * @default null
+     * @type {any}
+     */
+
+    Object.defineProperty(this, "defaultValue", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        if (this instanceof AcroFormButton === true) {
+          return pdfUnescape(_DV.substr(1, _DV.length - 1));
+        } else {
+          return _DV;
+        }
+      },
+      set: function set(value) {
+        value = value.toString();
+
+        if (this instanceof AcroFormButton === true) {
+          _DV = "/" + value;
+        } else {
+          _DV = value;
+        }
+      }
+    });
+    var _V = null;
+    Object.defineProperty(this, "_V", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        if (!_V) {
+          return undefined;
+        }
+
+        return _V;
+      },
+      set: function set(value) {
+        this.V = value;
+      }
+    });
+    Object.defineProperty(this, "V", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        if (!_V) {
+          return undefined;
+        }
+
+        if (this instanceof AcroFormButton === false) {
+          return toPdfString(_V, this.objId, this.scope);
+        }
+
+        return _V;
+      },
+      set: function set(value) {
+        value = value.toString();
+
+        if (this instanceof AcroFormButton === false) {
+          if (value.substr(0, 1) === "(") {
+            _V = pdfUnescape(value.substr(1, value.length - 2));
+          } else {
+            _V = pdfUnescape(value);
+          }
+        } else {
+          _V = value;
+        }
+      }
+    });
+    /**
+     * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.
+     *
+     * @name AcroFormField#value
+     * @default null
+     * @type {any}
+     */
+
+    Object.defineProperty(this, "value", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        if (this instanceof AcroFormButton === true) {
+          return pdfUnescape(_V.substr(1, _V.length - 1));
+        } else {
+          return _V;
+        }
+      },
+      set: function set(value) {
+        value = value.toString();
+
+        if (this instanceof AcroFormButton === true) {
+          _V = "/" + value;
+        } else {
+          _V = value;
+        }
+      }
+    });
+    /**
+     * Check if field has annotations
+     *
+     * @name AcroFormField#hasAnnotation
+     * @readonly
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "hasAnnotation", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return this.Rect;
+      }
+    });
+    Object.defineProperty(this, "Type", {
+      enumerable: true,
+      configurable: false,
+      get: function get() {
+        return this.hasAnnotation ? "/Annot" : null;
+      }
+    });
+    Object.defineProperty(this, "Subtype", {
+      enumerable: true,
+      configurable: false,
+      get: function get() {
+        return this.hasAnnotation ? "/Widget" : null;
+      }
+    });
+    var _hasAppearanceStream = false;
+    /**
+     * true if field has an appearanceStream
+     *
+     * @name AcroFormField#hasAppearanceStream
+     * @readonly
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "hasAppearanceStream", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _hasAppearanceStream;
+      },
+      set: function set(value) {
+        value = Boolean(value);
+        _hasAppearanceStream = value;
+      }
+    });
+    /**
+     * The page on which the AcroFormField is placed
+     *
+     * @name AcroFormField#page
+     * @type {number}
+     */
+
+    var _page;
+
+    Object.defineProperty(this, "page", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        if (!_page) {
+          return undefined;
+        }
+
+        return _page;
+      },
+      set: function set(value) {
+        _page = value;
+      }
+    });
+    /**
+     * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.
+     *
+     * @name AcroFormField#readOnly
+     * @default false
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "readOnly", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 1));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 1);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 1);
+        }
+      }
+    });
+    /**
+     * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).
+     *
+     * @name AcroFormField#required
+     * @default false
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "required", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 2));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 2);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 2);
+        }
+      }
+    });
+    /**
+     * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)
+     *
+     * @name AcroFormField#noExport
+     * @default false
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "noExport", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 3));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 3);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 3);
+        }
+      }
+    });
+    var _Q = null;
+    Object.defineProperty(this, "Q", {
+      enumerable: true,
+      configurable: false,
+      get: function get() {
+        if (_Q === null) {
+          return undefined;
+        }
+
+        return _Q;
+      },
+      set: function set(value) {
+        if ([0, 1, 2].indexOf(value) !== -1) {
+          _Q = value;
+        } else {
+          throw new Error('Invalid value "' + value + '" for attribute Q supplied.');
+        }
+      }
+    });
+    /**
+     * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:
+     * 'left', 'center', 'right'
+     *
+     * @name AcroFormField#textAlign
+     * @default 'left'
+     * @type {string}
+     */
+
+    Object.defineProperty(this, "textAlign", {
+      get: function get() {
+        var result;
+
+        switch (_Q) {
+          case 0:
+          default:
+            result = "left";
+            break;
+
+          case 1:
+            result = "center";
+            break;
+
+          case 2:
+            result = "right";
+            break;
+        }
+
+        return result;
+      },
+      configurable: true,
+      enumerable: true,
+      set: function set(value) {
+        switch (value) {
+          case "right":
+          case 2:
+            _Q = 2;
+            break;
+
+          case "center":
+          case 1:
+            _Q = 1;
+            break;
+
+          case "left":
+          case 0:
+          default:
+            _Q = 0;
+        }
+      }
+    });
+  };
+
+  inherit(AcroFormField, AcroFormPDFObject);
+  /**
+   * @class AcroFormChoiceField
+   * @extends AcroFormField
+   */
+
+  var AcroFormChoiceField = function AcroFormChoiceField() {
+    AcroFormField.call(this); // Field Type = Choice Field
+
+    this.FT = "/Ch"; // options
+
+    this.V = "()";
+    this.fontName = "zapfdingbats"; // Top Index
+
+    var _TI = 0;
+    Object.defineProperty(this, "TI", {
+      enumerable: true,
+      configurable: false,
+      get: function get() {
+        return _TI;
+      },
+      set: function set(value) {
+        _TI = value;
+      }
+    });
+    /**
+     * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.
+     *
+     * @name AcroFormChoiceField#topIndex
+     * @default 0
+     * @type {number}
+     */
+
+    Object.defineProperty(this, "topIndex", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _TI;
+      },
+      set: function set(value) {
+        _TI = value;
+      }
+    });
+    var _Opt = [];
+    Object.defineProperty(this, "Opt", {
+      enumerable: true,
+      configurable: false,
+      get: function get() {
+        return arrayToPdfArray(_Opt, this.objId, this.scope);
+      },
+      set: function set(value) {
+        _Opt = pdfArrayToStringArray(value);
+      }
+    });
+    /**
+     * @memberof AcroFormChoiceField
+     * @name getOptions
+     * @function
+     * @instance
+     * @returns {array} array of Options
+     */
+
+    this.getOptions = function () {
+      return _Opt;
+    };
+    /**
+     * @memberof AcroFormChoiceField
+     * @name setOptions
+     * @function
+     * @instance
+     * @param {array} value
+     */
+
+
+    this.setOptions = function (value) {
+      _Opt = value;
+
+      if (this.sort) {
+        _Opt.sort();
+      }
+    };
+    /**
+     * @memberof AcroFormChoiceField
+     * @name addOption
+     * @function
+     * @instance
+     * @param {string} value
+     */
+
+
+    this.addOption = function (value) {
+      value = value || "";
+      value = value.toString();
+
+      _Opt.push(value);
+
+      if (this.sort) {
+        _Opt.sort();
+      }
+    };
+    /**
+     * @memberof AcroFormChoiceField
+     * @name removeOption
+     * @function
+     * @instance
+     * @param {string} value
+     * @param {boolean} allEntries (default: false)
+     */
+
+
+    this.removeOption = function (value, allEntries) {
+      allEntries = allEntries || false;
+      value = value || "";
+      value = value.toString();
+
+      while (_Opt.indexOf(value) !== -1) {
+        _Opt.splice(_Opt.indexOf(value), 1);
+
+        if (allEntries === false) {
+          break;
+        }
+      }
+    };
+    /**
+     * If set, the field is a combo box; if clear, the field is a list box.
+     *
+     * @name AcroFormChoiceField#combo
+     * @default false
+     * @type {boolean}
+     */
+
+
+    Object.defineProperty(this, "combo", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 18));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 18);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 18);
+        }
+      }
+    });
+    /**
+     * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.
+     *
+     * @name AcroFormChoiceField#edit
+     * @default false
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "edit", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 19));
+      },
+      set: function set(value) {
+        //PDF 32000-1:2008, page 444
+        if (this.combo === true) {
+          if (Boolean(value) === true) {
+            this.Ff = setBitForPdf(this.Ff, 19);
+          } else {
+            this.Ff = clearBitForPdf(this.Ff, 19);
+          }
+        }
+      }
+    });
+    /**
+     * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).
+     *
+     * @name AcroFormChoiceField#sort
+     * @default false
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "sort", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 20));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 20);
+
+          _Opt.sort();
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 20);
+        }
+      }
+    });
+    /**
+     * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected
+     *
+     * @name AcroFormChoiceField#multiSelect
+     * @default false
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "multiSelect", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 22));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 22);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 22);
+        }
+      }
+    });
+    /**
+     * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.
+     *
+     * @name AcroFormChoiceField#doNotSpellCheck
+     * @default false
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "doNotSpellCheck", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 23));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 23);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 23);
+        }
+      }
+    });
+    /**
+     * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.
+     * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.
+     *
+     * @name AcroFormChoiceField#commitOnSelChange
+     * @default false
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "commitOnSelChange", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 27));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 27);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 27);
+        }
+      }
+    });
+    this.hasAppearanceStream = false;
+  };
+
+  inherit(AcroFormChoiceField, AcroFormField);
+  /**
+   * @class AcroFormListBox
+   * @extends AcroFormChoiceField
+   * @extends AcroFormField
+   */
+
+  var AcroFormListBox = function AcroFormListBox() {
+    AcroFormChoiceField.call(this);
+    this.fontName = "helvetica"; //PDF 32000-1:2008, page 444
+
+    this.combo = false;
+  };
+
+  inherit(AcroFormListBox, AcroFormChoiceField);
+  /**
+   * @class AcroFormComboBox
+   * @extends AcroFormListBox
+   * @extends AcroFormChoiceField
+   * @extends AcroFormField
+   */
+
+  var AcroFormComboBox = function AcroFormComboBox() {
+    AcroFormListBox.call(this);
+    this.combo = true;
+  };
+
+  inherit(AcroFormComboBox, AcroFormListBox);
+  /**
+   * @class AcroFormEditBox
+   * @extends AcroFormComboBox
+   * @extends AcroFormListBox
+   * @extends AcroFormChoiceField
+   * @extends AcroFormField
+   */
+
+  var AcroFormEditBox = function AcroFormEditBox() {
+    AcroFormComboBox.call(this);
+    this.edit = true;
+  };
+
+  inherit(AcroFormEditBox, AcroFormComboBox);
+  /**
+   * @class AcroFormButton
+   * @extends AcroFormField
+   */
+
+  var AcroFormButton = function AcroFormButton() {
+    AcroFormField.call(this);
+    this.FT = "/Btn";
+    /**
+     * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.
+     *
+     * @name AcroFormButton#noToggleToOff
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "noToggleToOff", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 15));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 15);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 15);
+        }
+      }
+    });
+    /**
+     * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.
+     *
+     * @name AcroFormButton#radio
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "radio", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 16));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 16);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 16);
+        }
+      }
+    });
+    /**
+     * If set, the field is a pushbutton that does not retain a permanent value.
+     *
+     * @name AcroFormButton#pushButton
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "pushButton", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 17));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 17);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 17);
+        }
+      }
+    });
+    /**
+     * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).
+     *
+     * @name AcroFormButton#radioIsUnison
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "radioIsUnison", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 26));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 26);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 26);
+        }
+      }
+    });
+    var _MK = {};
+    Object.defineProperty(this, "MK", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        var encryptor = function encryptor(data) {
+          return data;
+        };
+
+        if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+
+        if (Object.keys(_MK).length !== 0) {
+          var result = [];
+          result.push("<<");
+          var key;
+
+          for (key in _MK) {
+            result.push("/" + key + " (" + pdfEscape(encryptor(_MK[key])) + ")");
+          }
+
+          result.push(">>");
+          return result.join("\n");
+        }
+
+        return undefined;
+      },
+      set: function set(value) {
+        if (_typeof(value) === "object") {
+          _MK = value;
+        }
+      }
+    });
+    /**
+     * From the PDF reference:
+     * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.
+     * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields").
+     *
+     * - '8' = Cross,
+     * - 'l' =  Circle,
+     * - '' = nothing
+     * @name AcroFormButton#caption
+     * @type {string}
+     */
+
+    Object.defineProperty(this, "caption", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _MK.CA || "";
+      },
+      set: function set(value) {
+        if (typeof value === "string") {
+          _MK.CA = value;
+        }
+      }
+    });
+
+    var _AS;
+
+    Object.defineProperty(this, "AS", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        return _AS;
+      },
+      set: function set(value) {
+        _AS = value;
+      }
+    });
+    /**
+     * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams")
+     *
+     * @name AcroFormButton#appearanceState
+     * @type {any}
+     */
+
+    Object.defineProperty(this, "appearanceState", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _AS.substr(1, _AS.length - 1);
+      },
+      set: function set(value) {
+        _AS = "/" + value;
+      }
+    });
+  };
+
+  inherit(AcroFormButton, AcroFormField);
+  /**
+   * @class AcroFormPushButton
+   * @extends AcroFormButton
+   * @extends AcroFormField
+   */
+
+  var AcroFormPushButton = function AcroFormPushButton() {
+    AcroFormButton.call(this);
+    this.pushButton = true;
+  };
+
+  inherit(AcroFormPushButton, AcroFormButton);
+  /**
+   * @class AcroFormRadioButton
+   * @extends AcroFormButton
+   * @extends AcroFormField
+   */
+
+  var AcroFormRadioButton = function AcroFormRadioButton() {
+    AcroFormButton.call(this);
+    this.radio = true;
+    this.pushButton = false;
+    var _Kids = [];
+    Object.defineProperty(this, "Kids", {
+      enumerable: true,
+      configurable: false,
+      get: function get() {
+        return _Kids;
+      },
+      set: function set(value) {
+        if (typeof value !== "undefined") {
+          _Kids = value;
+        } else {
+          _Kids = [];
+        }
+      }
+    });
+  };
+
+  inherit(AcroFormRadioButton, AcroFormButton);
+  /**
+   * The Child class of a RadioButton (the radioGroup) -> The single Buttons
+   *
+   * @class AcroFormChildClass
+   * @extends AcroFormField
+   * @ignore
+   */
+
+  var AcroFormChildClass = function AcroFormChildClass() {
+    AcroFormField.call(this);
+
+    var _parent;
+
+    Object.defineProperty(this, "Parent", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        return _parent;
+      },
+      set: function set(value) {
+        _parent = value;
+      }
+    });
+
+    var _optionName;
+
+    Object.defineProperty(this, "optionName", {
+      enumerable: false,
+      configurable: true,
+      get: function get() {
+        return _optionName;
+      },
+      set: function set(value) {
+        _optionName = value;
+      }
+    });
+    var _MK = {};
+    Object.defineProperty(this, "MK", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        var encryptor = function encryptor(data) {
+          return data;
+        };
+
+        if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);
+        var result = [];
+        result.push("<<");
+        var key;
+
+        for (key in _MK) {
+          result.push("/" + key + " (" + pdfEscape(encryptor(_MK[key])) + ")");
+        }
+
+        result.push(">>");
+        return result.join("\n");
+      },
+      set: function set(value) {
+        if (_typeof(value) === "object") {
+          _MK = value;
+        }
+      }
+    });
+    /**
+     * From the PDF reference:
+     * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.
+     * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, "Button Fields"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, "Button Fields") and radio buttons (Radio Buttons in 12.7.4.2, "Button Fields").
+     *
+     * - '8' = Cross,
+     * - 'l' =  Circle,
+     * - '' = nothing
+     * @name AcroFormButton#caption
+     * @type {string}
+     */
+
+    Object.defineProperty(this, "caption", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _MK.CA || "";
+      },
+      set: function set(value) {
+        if (typeof value === "string") {
+          _MK.CA = value;
+        }
+      }
+    });
+
+    var _AS;
+
+    Object.defineProperty(this, "AS", {
+      enumerable: false,
+      configurable: false,
+      get: function get() {
+        return _AS;
+      },
+      set: function set(value) {
+        _AS = value;
+      }
+    });
+    /**
+     * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, "Appearance Streams")
+     *
+     * @name AcroFormButton#appearanceState
+     * @type {any}
+     */
+
+    Object.defineProperty(this, "appearanceState", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _AS.substr(1, _AS.length - 1);
+      },
+      set: function set(value) {
+        _AS = "/" + value;
+      }
+    });
+    this.caption = "l";
+    this.appearanceState = "Off"; // todo: set AppearanceType as variable that can be set from the
+    // outside...
+
+    this._AppearanceType = AcroFormAppearance.RadioButton.Circle; // The Default appearanceType is the Circle
+
+    this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(this.optionName);
+  };
+
+  inherit(AcroFormChildClass, AcroFormField);
+
+  AcroFormRadioButton.prototype.setAppearance = function (appearance) {
+    if (!("createAppearanceStream" in appearance && "getCA" in appearance)) {
+      throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");
+    }
+
+    for (var objId in this.Kids) {
+      if (this.Kids.hasOwnProperty(objId)) {
+        var child = this.Kids[objId];
+        child.appearanceStreamContent = appearance.createAppearanceStream(child.optionName);
+        child.caption = appearance.getCA();
+      }
+    }
+  };
+
+  AcroFormRadioButton.prototype.createOption = function (name) {
+    // Create new Child for RadioGroup
+    var child = new AcroFormChildClass();
+    child.Parent = this;
+    child.optionName = name; // Add to Parent
+
+    this.Kids.push(child);
+    addField.call(this.scope, child);
+    return child;
+  };
+  /**
+   * @class AcroFormCheckBox
+   * @extends AcroFormButton
+   * @extends AcroFormField
+   */
+
+
+  var AcroFormCheckBox = function AcroFormCheckBox() {
+    AcroFormButton.call(this);
+    this.fontName = "zapfdingbats";
+    this.caption = "3";
+    this.appearanceState = "On";
+    this.value = "On";
+    this.textAlign = "center";
+    this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();
+  };
+
+  inherit(AcroFormCheckBox, AcroFormButton);
+  /**
+   * @class AcroFormTextField
+   * @extends AcroFormField
+   */
+
+  var AcroFormTextField = function AcroFormTextField() {
+    AcroFormField.call(this);
+    this.FT = "/Tx";
+    /**
+     * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.
+     *
+     * @name AcroFormTextField#multiline
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "multiline", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 13));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 13);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 13);
+        }
+      }
+    });
+    /**
+     * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.
+     *
+     * @name AcroFormTextField#fileSelect
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "fileSelect", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 21));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 21);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 21);
+        }
+      }
+    });
+    /**
+     * (PDF 1.4) If set, text entered in the field shall not be spell-checked.
+     *
+     * @name AcroFormTextField#doNotSpellCheck
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "doNotSpellCheck", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 23));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 23);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 23);
+        }
+      }
+    });
+    /**
+     * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.
+     *
+     * @name AcroFormTextField#doNotScroll
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "doNotScroll", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 24));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 24);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 24);
+        }
+      }
+    });
+    /**
+     * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.
+     *
+     * @name AcroFormTextField#comb
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "comb", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 25));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 25);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 25);
+        }
+      }
+    });
+    /**
+     * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.
+     *
+     * @name AcroFormTextField#richText
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "richText", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 26));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 26);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 26);
+        }
+      }
+    });
+    var _MaxLen = null;
+    Object.defineProperty(this, "MaxLen", {
+      enumerable: true,
+      configurable: false,
+      get: function get() {
+        return _MaxLen;
+      },
+      set: function set(value) {
+        _MaxLen = value;
+      }
+    });
+    /**
+     * (Optional; inheritable) The maximum length of the field’s text, in characters.
+     *
+     * @name AcroFormTextField#maxLength
+     * @type {number}
+     */
+
+    Object.defineProperty(this, "maxLength", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return _MaxLen;
+      },
+      set: function set(value) {
+        if (Number.isInteger(value)) {
+          _MaxLen = value;
+        }
+      }
+    });
+    Object.defineProperty(this, "hasAppearanceStream", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return this.V || this.DV;
+      }
+    });
+  };
+
+  inherit(AcroFormTextField, AcroFormField);
+  /**
+   * @class AcroFormPasswordField
+   * @extends AcroFormTextField
+   * @extends AcroFormField
+   */
+
+  var AcroFormPasswordField = function AcroFormPasswordField() {
+    AcroFormTextField.call(this);
+    /**
+     * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.
+     * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.
+     *
+     * @name AcroFormTextField#password
+     * @type {boolean}
+     */
+
+    Object.defineProperty(this, "password", {
+      enumerable: true,
+      configurable: true,
+      get: function get() {
+        return Boolean(getBitForPdf(this.Ff, 14));
+      },
+      set: function set(value) {
+        if (Boolean(value) === true) {
+          this.Ff = setBitForPdf(this.Ff, 14);
+        } else {
+          this.Ff = clearBitForPdf(this.Ff, 14);
+        }
+      }
+    });
+    this.password = true;
+  };
+
+  inherit(AcroFormPasswordField, AcroFormTextField); // Contains Methods for creating standard appearances
+
+  var AcroFormAppearance = {
+    CheckBox: {
+      createAppearanceStream: function createAppearanceStream() {
+        var appearance = {
+          N: {
+            On: AcroFormAppearance.CheckBox.YesNormal
+          },
+          D: {
+            On: AcroFormAppearance.CheckBox.YesPushDown,
+            Off: AcroFormAppearance.CheckBox.OffPushDown
+          }
+        };
+        return appearance;
+      },
+
+      /**
+       * Returns the standard On Appearance for a CheckBox
+       *
+       * @returns {AcroFormXObject}
+       */
+      YesPushDown: function YesPushDown(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;
+
+        var encodedColor = formObject.scope.__private__.encodeColorString(formObject.color);
+
+        var calcRes = calculateX(formObject, formObject.caption);
+        stream.push("0.749023 g");
+        stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re");
+        stream.push("f");
+        stream.push("BMC");
+        stream.push("q");
+        stream.push("0 0 1 rg");
+        stream.push("/" + fontKey + " " + f2(calcRes.fontSize) + " Tf " + encodedColor);
+        stream.push("BT");
+        stream.push(calcRes.text);
+        stream.push("ET");
+        stream.push("Q");
+        stream.push("EMC");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      },
+      YesNormal: function YesNormal(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;
+
+        var encodedColor = formObject.scope.__private__.encodeColorString(formObject.color);
+
+        var stream = [];
+        var height = AcroFormAppearance.internal.getHeight(formObject);
+        var width = AcroFormAppearance.internal.getWidth(formObject);
+        var calcRes = calculateX(formObject, formObject.caption);
+        stream.push("1 g");
+        stream.push("0 0 " + f2(width) + " " + f2(height) + " re");
+        stream.push("f");
+        stream.push("q");
+        stream.push("0 0 1 rg");
+        stream.push("0 0 " + f2(width - 1) + " " + f2(height - 1) + " re");
+        stream.push("W");
+        stream.push("n");
+        stream.push("0 g");
+        stream.push("BT");
+        stream.push("/" + fontKey + " " + f2(calcRes.fontSize) + " Tf " + encodedColor);
+        stream.push(calcRes.text);
+        stream.push("ET");
+        stream.push("Q");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      },
+
+      /**
+       * Returns the standard Off Appearance for a CheckBox
+       *
+       * @returns {AcroFormXObject}
+       */
+      OffPushDown: function OffPushDown(formObject) {
+        var xobj = createFormXObject(formObject);
+        xobj.scope = formObject.scope;
+        var stream = [];
+        stream.push("0.749023 g");
+        stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re");
+        stream.push("f");
+        xobj.stream = stream.join("\n");
+        return xobj;
+      }
+    },
+    RadioButton: {
+      Circle: {
+        createAppearanceStream: function createAppearanceStream(name) {
+          var appearanceStreamContent = {
+            D: {
+              Off: AcroFormAppearance.RadioButton.Circle.OffPushDown
+            },
+            N: {}
+          };
+          appearanceStreamContent.N[name] = AcroFormAppearance.RadioButton.Circle.YesNormal;
+          appearanceStreamContent.D[name] = AcroFormAppearance.RadioButton.Circle.YesPushDown;
+          return appearanceStreamContent;
+        },
+        getCA: function getCA() {
+          return "l";
+        },
+        YesNormal: function YesNormal(formObject) {
+          var xobj = createFormXObject(formObject);
+          xobj.scope = formObject.scope;
+          var stream = []; // Make the Radius of the Circle relative to min(height, width) of formObject
+
+          var DotRadius = AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4; // The Borderpadding...
+
+          DotRadius = Number((DotRadius * 0.9).toFixed(5));
+          var c = AcroFormAppearance.internal.Bezier_C;
+          var DotRadiusBezier = Number((DotRadius * c).toFixed(5));
+          /*
+           * The Following is a Circle created with Bezier-Curves.
+           */
+
+          stream.push("q");
+          stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm");
+          stream.push(DotRadius + " 0 m");
+          stream.push(DotRadius + " " + DotRadiusBezier + " " + DotRadiusBezier + " " + DotRadius + " 0 " + DotRadius + " c");
+          stream.push("-" + DotRadiusBezier + " " + DotRadius + " -" + DotRadius + " " + DotRadiusBezier + " -" + DotRadius + " 0 c");
+          stream.push("-" + DotRadius + " -" + DotRadiusBezier + " -" + DotRadiusBezier + " -" + DotRadius + " 0 -" + DotRadius + " c");
+          stream.push(DotRadiusBezier + " -" + DotRadius + " " + DotRadius + " -" + DotRadiusBezier + " " + DotRadius + " 0 c");
+          stream.push("f");
+          stream.push("Q");
+          xobj.stream = stream.join("\n");
+          return xobj;
+        },
+        YesPushDown: function YesPushDown(formObject) {
+          var xobj = createFormXObject(formObject);
+          xobj.scope = formObject.scope;
+          var stream = [];
+          var DotRadius = AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4; // The Borderpadding...
+
+          DotRadius = Number((DotRadius * 0.9).toFixed(5)); // Save results for later use; no need to waste
+          // processor ticks on doing math
+
+          var k = Number((DotRadius * 2).toFixed(5));
+          var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));
+          var dc = Number((DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5));
+          stream.push("0.749023 g");
+          stream.push("q");
+          stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm");
+          stream.push(k + " 0 m");
+          stream.push(k + " " + kc + " " + kc + " " + k + " 0 " + k + " c");
+          stream.push("-" + kc + " " + k + " -" + k + " " + kc + " -" + k + " 0 c");
+          stream.push("-" + k + " -" + kc + " -" + kc + " -" + k + " 0 -" + k + " c");
+          stream.push(kc + " -" + k + " " + k + " -" + kc + " " + k + " 0 c");
+          stream.push("f");
+          stream.push("Q");
+          stream.push("0 g");
+          stream.push("q");
+          stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm");
+          stream.push(DotRadius + " 0 m");
+          stream.push("" + DotRadius + " " + dc + " " + dc + " " + DotRadius + " 0 " + DotRadius + " c");
+          stream.push("-" + dc + " " + DotRadius + " -" + DotRadius + " " + dc + " -" + DotRadius + " 0 c");
+          stream.push("-" + DotRadius + " -" + dc + " -" + dc + " -" + DotRadius + " 0 -" + DotRadius + " c");
+          stream.push(dc + " -" + DotRadius + " " + DotRadius + " -" + dc + " " + DotRadius + " 0 c");
+          stream.push("f");
+          stream.push("Q");
+          xobj.stream = stream.join("\n");
+          return xobj;
+        },
+        OffPushDown: function OffPushDown(formObject) {
+          var xobj = createFormXObject(formObject);
+          xobj.scope = formObject.scope;
+          var stream = [];
+          var DotRadius = AcroFormAppearance.internal.getWidth(formObject) <= AcroFormAppearance.internal.getHeight(formObject) ? AcroFormAppearance.internal.getWidth(formObject) / 4 : AcroFormAppearance.internal.getHeight(formObject) / 4; // The Borderpadding...
+
+          DotRadius = Number((DotRadius * 0.9).toFixed(5)); // Save results for later use; no need to waste
+          // processor ticks on doing math
+
+          var k = Number((DotRadius * 2).toFixed(5));
+          var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));
+          stream.push("0.749023 g");
+          stream.push("q");
+          stream.push("1 0 0 1 " + f5(AcroFormAppearance.internal.getWidth(formObject) / 2) + " " + f5(AcroFormAppearance.internal.getHeight(formObject) / 2) + " cm");
+          stream.push(k + " 0 m");
+          stream.push(k + " " + kc + " " + kc + " " + k + " 0 " + k + " c");
+          stream.push("-" + kc + " " + k + " -" + k + " " + kc + " -" + k + " 0 c");
+          stream.push("-" + k + " -" + kc + " -" + kc + " -" + k + " 0 -" + k + " c");
+          stream.push(kc + " -" + k + " " + k + " -" + kc + " " + k + " 0 c");
+          stream.push("f");
+          stream.push("Q");
+          xobj.stream = stream.join("\n");
+          return xobj;
+        }
+      },
+      Cross: {
+        /**
+         * Creates the Actual AppearanceDictionary-References
+         *
+         * @param {string} name
+         * @returns {Object}
+         * @ignore
+         */
+        createAppearanceStream: function createAppearanceStream(name) {
+          var appearanceStreamContent = {
+            D: {
+              Off: AcroFormAppearance.RadioButton.Cross.OffPushDown
+            },
+            N: {}
+          };
+          appearanceStreamContent.N[name] = AcroFormAppearance.RadioButton.Cross.YesNormal;
+          appearanceStreamContent.D[name] = AcroFormAppearance.RadioButton.Cross.YesPushDown;
+          return appearanceStreamContent;
+        },
+        getCA: function getCA() {
+          return "8";
+        },
+        YesNormal: function YesNormal(formObject) {
+          var xobj = createFormXObject(formObject);
+          xobj.scope = formObject.scope;
+          var stream = [];
+          var cross = AcroFormAppearance.internal.calculateCross(formObject);
+          stream.push("q");
+          stream.push("1 1 " + f2(AcroFormAppearance.internal.getWidth(formObject) - 2) + " " + f2(AcroFormAppearance.internal.getHeight(formObject) - 2) + " re");
+          stream.push("W");
+          stream.push("n");
+          stream.push(f2(cross.x1.x) + " " + f2(cross.x1.y) + " m");
+          stream.push(f2(cross.x2.x) + " " + f2(cross.x2.y) + " l");
+          stream.push(f2(cross.x4.x) + " " + f2(cross.x4.y) + " m");
+          stream.push(f2(cross.x3.x) + " " + f2(cross.x3.y) + " l");
+          stream.push("s");
+          stream.push("Q");
+          xobj.stream = stream.join("\n");
+          return xobj;
+        },
+        YesPushDown: function YesPushDown(formObject) {
+          var xobj = createFormXObject(formObject);
+          xobj.scope = formObject.scope;
+          var cross = AcroFormAppearance.internal.calculateCross(formObject);
+          var stream = [];
+          stream.push("0.749023 g");
+          stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re");
+          stream.push("f");
+          stream.push("q");
+          stream.push("1 1 " + f2(AcroFormAppearance.internal.getWidth(formObject) - 2) + " " + f2(AcroFormAppearance.internal.getHeight(formObject) - 2) + " re");
+          stream.push("W");
+          stream.push("n");
+          stream.push(f2(cross.x1.x) + " " + f2(cross.x1.y) + " m");
+          stream.push(f2(cross.x2.x) + " " + f2(cross.x2.y) + " l");
+          stream.push(f2(cross.x4.x) + " " + f2(cross.x4.y) + " m");
+          stream.push(f2(cross.x3.x) + " " + f2(cross.x3.y) + " l");
+          stream.push("s");
+          stream.push("Q");
+          xobj.stream = stream.join("\n");
+          return xobj;
+        },
+        OffPushDown: function OffPushDown(formObject) {
+          var xobj = createFormXObject(formObject);
+          xobj.scope = formObject.scope;
+          var stream = [];
+          stream.push("0.749023 g");
+          stream.push("0 0 " + f2(AcroFormAppearance.internal.getWidth(formObject)) + " " + f2(AcroFormAppearance.internal.getHeight(formObject)) + " re");
+          stream.push("f");
+          xobj.stream = stream.join("\n");
+          return xobj;
+        }
+      }
+    },
+
+    /**
+     * Returns the standard Appearance
+     *
+     * @returns {AcroFormXObject}
+     */
+    createDefaultAppearanceStream: function createDefaultAppearanceStream(formObject) {
+      // Set Helvetica to Standard Font (size: auto)
+      // Color: Black
+      var fontKey = formObject.scope.internal.getFont(formObject.fontName, formObject.fontStyle).id;
+
+      var encodedColor = formObject.scope.__private__.encodeColorString(formObject.color);
+
+      var fontSize = formObject.fontSize;
+      var result = "/" + fontKey + " " + fontSize + " Tf " + encodedColor;
+      return result;
+    }
+  };
+  AcroFormAppearance.internal = {
+    Bezier_C: 0.551915024494,
+    calculateCross: function calculateCross(formObject) {
+      var width = AcroFormAppearance.internal.getWidth(formObject);
+      var height = AcroFormAppearance.internal.getHeight(formObject);
+      var a = Math.min(width, height);
+      var cross = {
+        x1: {
+          // upperLeft
+          x: (width - a) / 2,
+          y: (height - a) / 2 + a // height - borderPadding
+
+        },
+        x2: {
+          // lowerRight
+          x: (width - a) / 2 + a,
+          y: (height - a) / 2 // borderPadding
+
+        },
+        x3: {
+          // lowerLeft
+          x: (width - a) / 2,
+          y: (height - a) / 2 // borderPadding
+
+        },
+        x4: {
+          // upperRight
+          x: (width - a) / 2 + a,
+          y: (height - a) / 2 + a // height - borderPadding
+
+        }
+      };
+      return cross;
+    }
+  };
+
+  AcroFormAppearance.internal.getWidth = function (formObject) {
+    var result = 0;
+
+    if (_typeof(formObject) === "object") {
+      result = scale(formObject.Rect[2]);
+    }
+
+    return result;
+  };
+
+  AcroFormAppearance.internal.getHeight = function (formObject) {
+    var result = 0;
+
+    if (_typeof(formObject) === "object") {
+      result = scale(formObject.Rect[3]);
+    }
+
+    return result;
+  }; // Public:
+
+  /**
+   * Add an AcroForm-Field to the jsPDF-instance
+   *
+   * @name addField
+   * @function
+   * @instance
+   * @param {Object} fieldObject
+   * @returns {jsPDF}
+   */
+
+
+  var addField = jsPDFAPI.addField = function (fieldObject) {
+    initializeAcroForm(this, fieldObject);
+
+    if (fieldObject instanceof AcroFormField) {
+      putForm(fieldObject);
+    } else {
+      throw new Error("Invalid argument passed to jsPDF.addField.");
+    }
+
+    fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;
+    return this;
+  };
+
+  jsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;
+  jsPDFAPI.AcroFormListBox = AcroFormListBox;
+  jsPDFAPI.AcroFormComboBox = AcroFormComboBox;
+  jsPDFAPI.AcroFormEditBox = AcroFormEditBox;
+  jsPDFAPI.AcroFormButton = AcroFormButton;
+  jsPDFAPI.AcroFormPushButton = AcroFormPushButton;
+  jsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;
+  jsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;
+  jsPDFAPI.AcroFormTextField = AcroFormTextField;
+  jsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;
+  jsPDFAPI.AcroFormAppearance = AcroFormAppearance;
+  jsPDFAPI.AcroForm = {
+    ChoiceField: AcroFormChoiceField,
+    ListBox: AcroFormListBox,
+    ComboBox: AcroFormComboBox,
+    EditBox: AcroFormEditBox,
+    Button: AcroFormButton,
+    PushButton: AcroFormPushButton,
+    RadioButton: AcroFormRadioButton,
+    CheckBox: AcroFormCheckBox,
+    TextField: AcroFormTextField,
+    PasswordField: AcroFormPasswordField,
+    Appearance: AcroFormAppearance
+  };
+  jsPDF.AcroForm = {
+    ChoiceField: AcroFormChoiceField,
+    ListBox: AcroFormListBox,
+    ComboBox: AcroFormComboBox,
+    EditBox: AcroFormEditBox,
+    Button: AcroFormButton,
+    PushButton: AcroFormPushButton,
+    RadioButton: AcroFormRadioButton,
+    CheckBox: AcroFormCheckBox,
+    TextField: AcroFormTextField,
+    PasswordField: AcroFormPasswordField,
+    Appearance: AcroFormAppearance
+  };
+  var AcroForm = jsPDF.AcroForm;
+
+  (function (jsPDFAPI) {
+
+    var namespace = "addImage_";
+    jsPDFAPI.__addimage__ = {};
+    var UNKNOWN = "UNKNOWN"; // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.
+    // With too small batch iteration will be slow as more calls are made,
+    // higher values cause larger and slower garbage collection.
+
+    var ARRAY_APPLY_BATCH = 8192;
+    var imageFileTypeHeaders = {
+      PNG: [[0x89, 0x50, 0x4e, 0x47]],
+      TIFF: [[0x4d, 0x4d, 0x00, 0x2a], //Motorola
+      [0x49, 0x49, 0x2a, 0x00] //Intel
+      ],
+      JPEG: [[0xff, 0xd8, 0xff, 0xe0, undefined, undefined, 0x4a, 0x46, 0x49, 0x46, 0x00], //JFIF
+      [0xff, 0xd8, 0xff, 0xe1, undefined, undefined, 0x45, 0x78, 0x69, 0x66, 0x00, 0x00], //Exif
+      [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW
+      [0xff, 0xd8, 0xff, 0xee] //EXIF RAW
+      ],
+      JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],
+      GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],
+      GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],
+      WEBP: [[0x52, 0x49, 0x46, 0x46, undefined, undefined, undefined, undefined, 0x57, 0x45, 0x42, 0x50]],
+      BMP: [[0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.
+      [0x42, 0x41], //BA - OS/2 struct bitmap array
+      [0x43, 0x49], //CI - OS/2 struct color icon
+      [0x43, 0x50], //CP - OS/2 const color pointer
+      [0x49, 0x43], //IC - OS/2 struct icon
+      [0x50, 0x54] //PT - OS/2 pointer
+      ]
+    };
+    /**
+     * Recognize filetype of Image by magic-bytes
+     *
+     * https://en.wikipedia.org/wiki/List_of_file_signatures
+     *
+     * @name getImageFileTypeByImageData
+     * @public
+     * @function
+     * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer
+     * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'
+     *
+     * @returns {string} filetype of Image
+     */
+
+    var getImageFileTypeByImageData = jsPDFAPI.__addimage__.getImageFileTypeByImageData = function (imageData, fallbackFormat) {
+      fallbackFormat = fallbackFormat || UNKNOWN;
+      var i;
+      var j;
+      var result = UNKNOWN;
+      var headerSchemata;
+      var compareResult;
+      var fileType;
+
+      if (fallbackFormat === "RGBA" || imageData.data !== undefined && imageData.data instanceof Uint8ClampedArray && "height" in imageData && "width" in imageData) {
+        return "RGBA";
+      }
+
+      if (isArrayBufferView(imageData)) {
+        for (fileType in imageFileTypeHeaders) {
+          headerSchemata = imageFileTypeHeaders[fileType];
+
+          for (i = 0; i < headerSchemata.length; i += 1) {
+            compareResult = true;
+
+            for (j = 0; j < headerSchemata[i].length; j += 1) {
+              if (headerSchemata[i][j] === undefined) {
+                continue;
+              }
+
+              if (headerSchemata[i][j] !== imageData[j]) {
+                compareResult = false;
+                break;
+              }
+            }
+
+            if (compareResult === true) {
+              result = fileType;
+              break;
+            }
+          }
+        }
+      } else {
+        for (fileType in imageFileTypeHeaders) {
+          headerSchemata = imageFileTypeHeaders[fileType];
+
+          for (i = 0; i < headerSchemata.length; i += 1) {
+            compareResult = true;
+
+            for (j = 0; j < headerSchemata[i].length; j += 1) {
+              if (headerSchemata[i][j] === undefined) {
+                continue;
+              }
+
+              if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {
+                compareResult = false;
+                break;
+              }
+            }
+
+            if (compareResult === true) {
+              result = fileType;
+              break;
+            }
+          }
+        }
+      }
+
+      if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {
+        result = fallbackFormat;
+      }
+
+      return result;
+    }; // Image functionality ported from pdf.js
+
+
+    var putImage = function putImage(image) {
+      var out = this.internal.write;
+      var putStream = this.internal.putStream;
+      var getFilters = this.internal.getFilters;
+      var filter = getFilters();
+
+      while (filter.indexOf("FlateEncode") !== -1) {
+        filter.splice(filter.indexOf("FlateEncode"), 1);
+      }
+
+      image.objectId = this.internal.newObject();
+      var additionalKeyValues = [];
+      additionalKeyValues.push({
+        key: "Type",
+        value: "/XObject"
+      });
+      additionalKeyValues.push({
+        key: "Subtype",
+        value: "/Image"
+      });
+      additionalKeyValues.push({
+        key: "Width",
+        value: image.width
+      });
+      additionalKeyValues.push({
+        key: "Height",
+        value: image.height
+      });
+
+      if (image.colorSpace === color_spaces.INDEXED) {
+        additionalKeyValues.push({
+          key: "ColorSpace",
+          value: "[/Indexed /DeviceRGB " + ( // if an indexed png defines more than one colour with transparency, we've created a sMask
+          image.palette.length / 3 - 1) + " " + ("sMask" in image && typeof image.sMask !== "undefined" ? image.objectId + 2 : image.objectId + 1) + " 0 R]"
+        });
+      } else {
+        additionalKeyValues.push({
+          key: "ColorSpace",
+          value: "/" + image.colorSpace
+        });
+
+        if (image.colorSpace === color_spaces.DEVICE_CMYK) {
+          additionalKeyValues.push({
+            key: "Decode",
+            value: "[1 0 1 0 1 0 1 0]"
+          });
+        }
+      }
+
+      additionalKeyValues.push({
+        key: "BitsPerComponent",
+        value: image.bitsPerComponent
+      });
+
+      if ("decodeParameters" in image && typeof image.decodeParameters !== "undefined") {
+        additionalKeyValues.push({
+          key: "DecodeParms",
+          value: "<<" + image.decodeParameters + ">>"
+        });
+      }
+
+      if ("transparency" in image && Array.isArray(image.transparency)) {
+        var transparency = "",
+            i = 0,
+            len = image.transparency.length;
+
+        for (; i < len; i++) {
+          transparency += image.transparency[i] + " " + image.transparency[i] + " ";
+        }
+
+        additionalKeyValues.push({
+          key: "Mask",
+          value: "[" + transparency + "]"
+        });
+      }
+
+      if (typeof image.sMask !== "undefined") {
+        additionalKeyValues.push({
+          key: "SMask",
+          value: image.objectId + 1 + " 0 R"
+        });
+      }
+
+      var alreadyAppliedFilters = typeof image.filter !== "undefined" ? ["/" + image.filter] : undefined;
+      putStream({
+        data: image.data,
+        additionalKeyValues: additionalKeyValues,
+        alreadyAppliedFilters: alreadyAppliedFilters,
+        objectId: image.objectId
+      });
+      out("endobj"); // Soft mask
+
+      if ("sMask" in image && typeof image.sMask !== "undefined") {
+        var decodeParameters = "/Predictor " + image.predictor + " /Colors 1 /BitsPerComponent " + image.bitsPerComponent + " /Columns " + image.width;
+        var sMask = {
+          width: image.width,
+          height: image.height,
+          colorSpace: "DeviceGray",
+          bitsPerComponent: image.bitsPerComponent,
+          decodeParameters: decodeParameters,
+          data: image.sMask
+        };
+
+        if ("filter" in image) {
+          sMask.filter = image.filter;
+        }
+
+        putImage.call(this, sMask);
+      } //Palette
+
+
+      if (image.colorSpace === color_spaces.INDEXED) {
+        var objId = this.internal.newObject(); //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');
+        //putStream(zlib.compress(img['pal']));
+
+        putStream({
+          data: arrayBufferToBinaryString(new Uint8Array(image.palette)),
+          objectId: objId
+        });
+        out("endobj");
+      }
+    };
+
+    var putResourcesCallback = function putResourcesCallback() {
+      var images = this.internal.collections[namespace + "images"];
+
+      for (var i in images) {
+        putImage.call(this, images[i]);
+      }
+    };
+
+    var putXObjectsDictCallback = function putXObjectsDictCallback() {
+      var images = this.internal.collections[namespace + "images"],
+          out = this.internal.write,
+          image;
+
+      for (var i in images) {
+        image = images[i];
+        out("/I" + image.index, image.objectId, "0", "R");
+      }
+    };
+
+    var checkCompressValue = function checkCompressValue(value) {
+      if (value && typeof value === "string") value = value.toUpperCase();
+      return value in jsPDFAPI.image_compression ? value : image_compression.NONE;
+    };
+
+    var initialize = function initialize() {
+      if (!this.internal.collections[namespace + "images"]) {
+        this.internal.collections[namespace + "images"] = {};
+        this.internal.events.subscribe("putResources", putResourcesCallback);
+        this.internal.events.subscribe("putXobjectDict", putXObjectsDictCallback);
+      }
+    };
+
+    var getImages = function getImages() {
+      var images = this.internal.collections[namespace + "images"];
+      initialize.call(this);
+      return images;
+    };
+
+    var getImageIndex = function getImageIndex() {
+      return Object.keys(this.internal.collections[namespace + "images"]).length;
+    };
+
+    var notDefined = function notDefined(value) {
+      return typeof value === "undefined" || value === null || value.length === 0;
+    };
+
+    var generateAliasFromImageData = function generateAliasFromImageData(imageData) {
+      if (typeof imageData === "string" || isArrayBufferView(imageData)) {
+        return sHashCode(imageData);
+      } else if (isArrayBufferView(imageData.data)) {
+        return sHashCode(imageData.data);
+      }
+
+      return null;
+    };
+
+    var isImageTypeSupported = function isImageTypeSupported(type) {
+      return typeof jsPDFAPI["process" + type.toUpperCase()] === "function";
+    };
+
+    var isDOMElement = function isDOMElement(object) {
+      return _typeof(object) === "object" && object.nodeType === 1;
+    };
+
+    var getImageDataFromElement = function getImageDataFromElement(element, format) {
+      //if element is an image which uses data url definition, just return the dataurl
+      if (element.nodeName === "IMG" && element.hasAttribute("src")) {
+        var src = "" + element.getAttribute("src"); //is base64 encoded dataUrl, directly process it
+
+        if (src.indexOf("data:image/") === 0) {
+          return atob(unescape(src).split("base64,").pop());
+        } //it is probably an url, try to load it
+
+
+        var tmpImageData = jsPDFAPI.loadFile(src, true);
+
+        if (tmpImageData !== undefined) {
+          return tmpImageData;
+        }
+      }
+
+      if (element.nodeName === "CANVAS") {
+        if (element.width === 0 || element.height === 0) {
+          throw new Error("Given canvas must have data. Canvas width: " + element.width + ", height: " + element.height);
+        }
+
+        var mimeType;
+
+        switch (format) {
+          case "PNG":
+            mimeType = "image/png";
+            break;
+
+          case "WEBP":
+            mimeType = "image/webp";
+            break;
+
+          case "JPEG":
+          case "JPG":
+          default:
+            mimeType = "image/jpeg";
+            break;
+        }
+
+        return atob(element.toDataURL(mimeType, 1.0).split("base64,").pop());
+      }
+    };
+
+    var checkImagesForAlias = function checkImagesForAlias(alias) {
+      var images = this.internal.collections[namespace + "images"];
+
+      if (images) {
+        for (var e in images) {
+          if (alias === images[e].alias) {
+            return images[e];
+          }
+        }
+      }
+    };
+
+    var determineWidthAndHeight = function determineWidthAndHeight(width, height, image) {
+      if (!width && !height) {
+        width = -96;
+        height = -96;
+      }
+
+      if (width < 0) {
+        width = -1 * image.width * 72 / width / this.internal.scaleFactor;
+      }
+
+      if (height < 0) {
+        height = -1 * image.height * 72 / height / this.internal.scaleFactor;
+      }
+
+      if (width === 0) {
+        width = height * image.width / image.height;
+      }
+
+      if (height === 0) {
+        height = width * image.height / image.width;
+      }
+
+      return [width, height];
+    };
+
+    var writeImageToPDF = function writeImageToPDF(x, y, width, height, image, rotation) {
+      var dims = determineWidthAndHeight.call(this, width, height, image),
+          coord = this.internal.getCoordinateString,
+          vcoord = this.internal.getVerticalCoordinateString;
+      var images = getImages.call(this);
+      width = dims[0];
+      height = dims[1];
+      images[image.index] = image;
+
+      if (rotation) {
+        rotation *= Math.PI / 180;
+        var c = Math.cos(rotation);
+        var s = Math.sin(rotation); //like in pdf Reference do it 4 digits instead of 2
+
+        var f4 = function f4(number) {
+          return number.toFixed(4);
+        };
+
+        var rotationTransformationMatrix = [f4(c), f4(s), f4(s * -1), f4(c), 0, 0, "cm"];
+      }
+
+      this.internal.write("q"); //Save graphics state
+
+      if (rotation) {
+        this.internal.write([1, "0", "0", 1, coord(x), vcoord(y + height), "cm"].join(" ")); //Translate
+
+        this.internal.write(rotationTransformationMatrix.join(" ")); //Rotate
+
+        this.internal.write([coord(width), "0", "0", coord(height), "0", "0", "cm"].join(" ")); //Scale
+      } else {
+        this.internal.write([coord(width), "0", "0", coord(height), coord(x), vcoord(y + height), "cm"].join(" ")); //Translate and Scale
+      }
+
+      if (this.isAdvancedAPI()) {
+        // draw image bottom up when in "advanced" API mode
+        this.internal.write([1, 0, 0, -1, 0, 0, "cm"].join(" "));
+      }
+
+      this.internal.write("/I" + image.index + " Do"); //Paint Image
+
+      this.internal.write("Q"); //Restore graphics state
+    };
+    /**
+     * COLOR SPACES
+     */
+
+
+    var color_spaces = jsPDFAPI.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"
+    };
+    /**
+     * DECODE METHODS
+     */
+
+    jsPDFAPI.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"
+    };
+    /**
+     * IMAGE COMPRESSION TYPES
+     */
+
+    var image_compression = jsPDFAPI.image_compression = {
+      NONE: "NONE",
+      FAST: "FAST",
+      MEDIUM: "MEDIUM",
+      SLOW: "SLOW"
+    };
+    /**
+     * @name sHashCode
+     * @function
+     * @param {string} data
+     * @returns {string}
+     */
+
+    var sHashCode = jsPDFAPI.__addimage__.sHashCode = function (data) {
+      var hash = 0,
+          i,
+          len;
+
+      if (typeof data === "string") {
+        len = data.length;
+
+        for (i = 0; i < len; i++) {
+          hash = (hash << 5) - hash + data.charCodeAt(i);
+          hash |= 0; // Convert to 32bit integer
+        }
+      } else if (isArrayBufferView(data)) {
+        len = data.byteLength / 2;
+
+        for (i = 0; i < len; i++) {
+          hash = (hash << 5) - hash + data[i];
+          hash |= 0; // Convert to 32bit integer
+        }
+      }
+
+      return hash;
+    };
+    /**
+     * Validates if given String is a valid Base64-String
+     *
+     * @name validateStringAsBase64
+     * @public
+     * @function
+     * @param {String} possible Base64-String
+     *
+     * @returns {boolean}
+     */
+
+
+    var validateStringAsBase64 = jsPDFAPI.__addimage__.validateStringAsBase64 = function (possibleBase64String) {
+      possibleBase64String = possibleBase64String || "";
+      possibleBase64String.toString().trim();
+      var result = true;
+
+      if (possibleBase64String.length === 0) {
+        result = false;
+      }
+
+      if (possibleBase64String.length % 4 !== 0) {
+        result = false;
+      }
+
+      if (/^[A-Za-z0-9+/]+$/.test(possibleBase64String.substr(0, possibleBase64String.length - 2)) === false) {
+        result = false;
+      }
+
+      if (/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(possibleBase64String.substr(-2)) === false) {
+        result = false;
+      }
+
+      return result;
+    };
+    /**
+     * Strips out and returns info from a valid base64 data URI
+     *
+     * @name extractImageFromDataUrl
+     * @function
+     * @param {string} dataUrl a valid data URI of format 'data:[<MIME-type>][;base64],<data>'
+     * @returns {Array}an Array containing the following
+     * [0] the complete data URI
+     * [1] <MIME-type>
+     * [2] format - the second part of the mime-type i.e 'png' in 'image/png'
+     * [4] <data>
+     */
+
+
+    var extractImageFromDataUrl = jsPDFAPI.__addimage__.extractImageFromDataUrl = function (dataUrl) {
+      dataUrl = dataUrl || "";
+      var dataUrlParts = dataUrl.split("base64,");
+      var result = null;
+
+      if (dataUrlParts.length === 2) {
+        var extractedInfo = /^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(dataUrlParts[0]);
+
+        if (Array.isArray(extractedInfo)) {
+          result = {
+            mimeType: extractedInfo[1],
+            charset: extractedInfo[2],
+            data: dataUrlParts[1]
+          };
+        }
+      }
+
+      return result;
+    };
+    /**
+     * Check to see if ArrayBuffer is supported
+     *
+     * @name supportsArrayBuffer
+     * @function
+     * @returns {boolean}
+     */
+
+
+    var supportsArrayBuffer = jsPDFAPI.__addimage__.supportsArrayBuffer = function () {
+      return typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined";
+    };
+    /**
+     * Tests supplied object to determine if ArrayBuffer
+     *
+     * @name isArrayBuffer
+     * @function
+     * @param {Object} object an Object
+     *
+     * @returns {boolean}
+     */
+
+
+    jsPDFAPI.__addimage__.isArrayBuffer = function (object) {
+      return supportsArrayBuffer() && object instanceof ArrayBuffer;
+    };
+    /**
+     * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface
+     *
+     * @name isArrayBufferView
+     * @function
+     * @param {Object} object an Object
+     * @returns {boolean}
+     */
+
+
+    var isArrayBufferView = jsPDFAPI.__addimage__.isArrayBufferView = function (object) {
+      return supportsArrayBuffer() && typeof Uint32Array !== "undefined" && (object instanceof Int8Array || object instanceof Uint8Array || typeof Uint8ClampedArray !== "undefined" && object instanceof Uint8ClampedArray || object instanceof Int16Array || object instanceof Uint16Array || object instanceof Int32Array || object instanceof Uint32Array || object instanceof Float32Array || object instanceof Float64Array);
+    };
+    /**
+     * Convert Binary String to ArrayBuffer
+     *
+     * @name binaryStringToUint8Array
+     * @public
+     * @function
+     * @param {string} BinaryString with ImageData
+     * @returns {Uint8Array}
+     */
+
+
+    var binaryStringToUint8Array = jsPDFAPI.__addimage__.binaryStringToUint8Array = function (binary_string) {
+      var len = binary_string.length;
+      var bytes = new Uint8Array(len);
+
+      for (var i = 0; i < len; i++) {
+        bytes[i] = binary_string.charCodeAt(i);
+      }
+
+      return bytes;
+    };
+    /**
+     * Convert the Buffer to a Binary String
+     *
+     * @name arrayBufferToBinaryString
+     * @public
+     * @function
+     * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData
+     *
+     * @returns {String}
+     */
+
+
+    var arrayBufferToBinaryString = jsPDFAPI.__addimage__.arrayBufferToBinaryString = function (buffer) {
+      var out = ""; // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.
+      // Do not copy the array if input is already an array.
+
+      var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);
+
+      for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {
+        // Limit the amount of characters being parsed to prevent overflow.
+        // Note that while TextDecoder would be faster, it does not have the same
+        // functionality as fromCharCode with any provided encodings as of 3/2021.
+        out += String.fromCharCode.apply(null, buf.subarray(i, i + ARRAY_APPLY_BATCH));
+      }
+
+      return out;
+    };
+    /**
+     * Possible parameter for addImage, an RGBA buffer with size.
+     *
+     * @typedef {Object} RGBAData
+     * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.
+     * @property {number} width - Image width as the data does not carry this information in itself.
+     * @property {number} height - Image height as the data does not carry this information in itself.
+     */
+
+    /**
+     * Adds an Image to the PDF.
+     *
+     * @name addImage
+     * @public
+     * @function
+     * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).
+     * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'
+     * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page
+     * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+     * @param {number} width width of the image (in units declared at inception of PDF document)
+     * @param {number} height height of the Image (in units declared at inception of PDF document)
+     * @param {string} alias alias of the image (if used multiple times)
+     * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'
+     * @param {number} rotation rotation of the image in degrees (0-359)
+     *
+     * @returns jsPDF
+     */
+
+
+    jsPDFAPI.addImage = function () {
+      var imageData, format, x, y, w, h, alias, compression, rotation;
+      imageData = arguments[0];
+
+      if (typeof arguments[1] === "number") {
+        format = UNKNOWN;
+        x = arguments[1];
+        y = arguments[2];
+        w = arguments[3];
+        h = arguments[4];
+        alias = arguments[5];
+        compression = arguments[6];
+        rotation = arguments[7];
+      } else {
+        format = arguments[1];
+        x = arguments[2];
+        y = arguments[3];
+        w = arguments[4];
+        h = arguments[5];
+        alias = arguments[6];
+        compression = arguments[7];
+        rotation = arguments[8];
+      }
+
+      if (_typeof(imageData) === "object" && !isDOMElement(imageData) && "imageData" in imageData) {
+        var options = imageData;
+        imageData = options.imageData;
+        format = options.format || format || UNKNOWN;
+        x = options.x || x || 0;
+        y = options.y || y || 0;
+        w = options.w || options.width || w;
+        h = options.h || options.height || h;
+        alias = options.alias || alias;
+        compression = options.compression || compression;
+        rotation = options.rotation || options.angle || rotation;
+      } //If compression is not explicitly set, determine if we should use compression
+
+
+      var filter = this.internal.getFilters();
+
+      if (compression === undefined && filter.indexOf("FlateEncode") !== -1) {
+        compression = "SLOW";
+      }
+
+      if (isNaN(x) || isNaN(y)) {
+        throw new Error("Invalid coordinates passed to jsPDF.addImage");
+      }
+
+      initialize.call(this);
+      var image = processImageData.call(this, imageData, format, alias, compression);
+      writeImageToPDF.call(this, x, y, w, h, image, rotation);
+      return this;
+    };
+
+    var processImageData = function processImageData(imageData, format, alias, compression) {
+      var result, dataAsBinaryString;
+
+      if (typeof imageData === "string" && getImageFileTypeByImageData(imageData) === UNKNOWN) {
+        imageData = unescape(imageData);
+        var tmpImageData = convertBase64ToBinaryString(imageData, false);
+
+        if (tmpImageData !== "") {
+          imageData = tmpImageData;
+        } else {
+          tmpImageData = jsPDFAPI.loadFile(imageData, true);
+
+          if (tmpImageData !== undefined) {
+            imageData = tmpImageData;
+          }
+        }
+      }
+
+      if (isDOMElement(imageData)) {
+        imageData = getImageDataFromElement(imageData, format);
+      }
+
+      format = getImageFileTypeByImageData(imageData, format);
+
+      if (!isImageTypeSupported(format)) {
+        throw new Error("addImage does not support files of type '" + format + "', please ensure that a plugin for '" + format + "' support is added.");
+      } // now do the heavy lifting
+
+
+      if (notDefined(alias)) {
+        alias = generateAliasFromImageData(imageData);
+      }
+
+      result = checkImagesForAlias.call(this, alias);
+
+      if (!result) {
+        if (supportsArrayBuffer()) {
+          // no need to convert if imageData is already uint8array
+          if (!(imageData instanceof Uint8Array) && format !== "RGBA") {
+            dataAsBinaryString = imageData;
+            imageData = binaryStringToUint8Array(imageData);
+          }
+        }
+
+        result = this["process" + format.toUpperCase()](imageData, getImageIndex.call(this), alias, checkCompressValue(compression), dataAsBinaryString);
+      }
+
+      if (!result) {
+        throw new Error("An unknown error occurred whilst processing the image.");
+      }
+
+      return result;
+    };
+    /**
+     * @name convertBase64ToBinaryString
+     * @function
+     * @param {string} stringData
+     * @returns {string} binary string
+     */
+
+
+    var convertBase64ToBinaryString = jsPDFAPI.__addimage__.convertBase64ToBinaryString = function (stringData, throwError) {
+      throwError = typeof throwError === "boolean" ? throwError : true;
+      var base64Info;
+      var imageData = "";
+      var rawData;
+
+      if (typeof stringData === "string") {
+        base64Info = extractImageFromDataUrl(stringData);
+        rawData = base64Info !== null ? base64Info.data : stringData;
+
+        try {
+          imageData = atob(rawData);
+        } catch (e) {
+          if (throwError) {
+            if (!validateStringAsBase64(rawData)) {
+              throw new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ");
+            } else {
+              throw new Error("atob-Error in jsPDF.convertBase64ToBinaryString " + e.message);
+            }
+          }
+        }
+      }
+
+      return imageData;
+    };
+    /**
+     * @name getImageProperties
+     * @function
+     * @param {Object} imageData
+     * @returns {Object}
+     */
+
+
+    jsPDFAPI.getImageProperties = function (imageData) {
+      var image;
+      var tmpImageData = "";
+      var format;
+
+      if (isDOMElement(imageData)) {
+        imageData = getImageDataFromElement(imageData);
+      }
+
+      if (typeof imageData === "string" && getImageFileTypeByImageData(imageData) === UNKNOWN) {
+        tmpImageData = convertBase64ToBinaryString(imageData, false);
+
+        if (tmpImageData === "") {
+          tmpImageData = jsPDFAPI.loadFile(imageData) || "";
+        }
+
+        imageData = tmpImageData;
+      }
+
+      format = getImageFileTypeByImageData(imageData);
+
+      if (!isImageTypeSupported(format)) {
+        throw new Error("addImage does not support files of type '" + format + "', please ensure that a plugin for '" + format + "' support is added.");
+      }
+
+      if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {
+        imageData = binaryStringToUint8Array(imageData);
+      }
+
+      image = this["process" + format.toUpperCase()](imageData);
+
+      if (!image) {
+        throw new Error("An unknown error occurred whilst processing the image");
+      }
+
+      image.fileType = format;
+      return image;
+    };
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+
+  (function (jsPDFAPI) {
+
+    var notEmpty = function notEmpty(obj) {
+      if (typeof obj != "undefined") {
+        if (obj != "") {
+          return true;
+        }
+      }
+    };
+
+    jsPDF.API.events.push(["addPage", function (addPageData) {
+      var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);
+      pageInfo.pageContext.annotations = [];
+    }]);
+    jsPDFAPI.events.push(["putPage", function (putPageData) {
+      var getHorizontalCoordinateString = this.internal.getCoordinateString;
+      var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;
+      var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);
+      var pageAnnos = putPageData.pageContext.annotations;
+      var anno, rect, line;
+      var found = false;
+
+      for (var a = 0; a < pageAnnos.length && !found; a++) {
+        anno = pageAnnos[a];
+
+        switch (anno.type) {
+          case "link":
+            if (notEmpty(anno.options.url) || notEmpty(anno.options.pageNumber)) {
+              found = true;
+            }
+
+            break;
+
+          case "reference":
+          case "text":
+          case "freetext":
+            found = true;
+            break;
+        }
+      }
+
+      if (found == false) {
+        return;
+      }
+
+      this.internal.write("/Annots [");
+
+      for (var i = 0; i < pageAnnos.length; i++) {
+        anno = pageAnnos[i];
+        var escape = this.internal.pdfEscape;
+        var encryptor = this.internal.getEncryptor(putPageData.objId);
+
+        switch (anno.type) {
+          case "reference":
+            // References to Widget Annotations (for AcroForm Fields)
+            this.internal.write(" " + anno.object.objId + " 0 R ");
+            break;
+
+          case "text":
+            // Create a an object for both the text and the popup
+            var objText = this.internal.newAdditionalObject();
+            var objPopup = this.internal.newAdditionalObject();
+            var encryptorText = this.internal.getEncryptor(objText.objId);
+            var title = anno.title || "Note";
+            rect = "/Rect [" + getHorizontalCoordinateString(anno.bounds.x) + " " + getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) + " " + getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) + " " + getVerticalCoordinateString(anno.bounds.y) + "] ";
+            line = "<</Type /Annot /Subtype /" + "Text" + " " + rect + "/Contents (" + escape(encryptorText(anno.contents)) + ")";
+            line += " /Popup " + objPopup.objId + " 0 R";
+            line += " /P " + pageInfo.objId + " 0 R";
+            line += " /T (" + escape(encryptorText(title)) + ") >>";
+            objText.content = line;
+            var parent = objText.objId + " 0 R";
+            var popoff = 30;
+            rect = "/Rect [" + getHorizontalCoordinateString(anno.bounds.x + popoff) + " " + getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) + " " + getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w + popoff) + " " + getVerticalCoordinateString(anno.bounds.y) + "] ";
+            line = "<</Type /Annot /Subtype /" + "Popup" + " " + rect + " /Parent " + parent;
+
+            if (anno.open) {
+              line += " /Open true";
+            }
+
+            line += " >>";
+            objPopup.content = line;
+            this.internal.write(objText.objId, "0 R", objPopup.objId, "0 R");
+            break;
+
+          case "freetext":
+            rect = "/Rect [" + getHorizontalCoordinateString(anno.bounds.x) + " " + getVerticalCoordinateString(anno.bounds.y) + " " + getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) + " " + getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) + "] ";
+            var color = anno.color || "#000000";
+            line = "<</Type /Annot /Subtype /" + "FreeText" + " " + rect + "/Contents (" + escape(encryptor(anno.contents)) + ")";
+            line += " /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#" + color + ")";
+            line += " /Border [0 0 0]";
+            line += " >>";
+            this.internal.write(line);
+            break;
+
+          case "link":
+            if (anno.options.name) {
+              var loc = this.annotations._nameMap[anno.options.name];
+              anno.options.pageNumber = loc.page;
+              anno.options.top = loc.y;
+            } else {
+              if (!anno.options.top) {
+                anno.options.top = 0;
+              }
+            }
+
+            rect = "/Rect [" + anno.finalBounds.x + " " + anno.finalBounds.y + " " + anno.finalBounds.w + " " + anno.finalBounds.h + "] ";
+            line = "";
+
+            if (anno.options.url) {
+              line = "<</Type /Annot /Subtype /Link " + rect + "/Border [0 0 0] /A <</S /URI /URI (" + escape(encryptor(anno.options.url)) + ") >>";
+            } else if (anno.options.pageNumber) {
+              // first page is 0
+              var info = this.internal.getPageInfo(anno.options.pageNumber);
+              line = "<</Type /Annot /Subtype /Link " + rect + "/Border [0 0 0] /Dest [" + info.objId + " 0 R";
+              anno.options.magFactor = anno.options.magFactor || "XYZ";
+
+              switch (anno.options.magFactor) {
+                case "Fit":
+                  line += " /Fit]";
+                  break;
+
+                case "FitH":
+                  line += " /FitH " + anno.options.top + "]";
+                  break;
+
+                case "FitV":
+                  anno.options.left = anno.options.left || 0;
+                  line += " /FitV " + anno.options.left + "]";
+                  break;
+
+                case "XYZ":
+                default:
+                  var top = getVerticalCoordinateString(anno.options.top);
+                  anno.options.left = anno.options.left || 0; // 0 or null zoom will not change zoom factor
+
+                  if (typeof anno.options.zoom === "undefined") {
+                    anno.options.zoom = 0;
+                  }
+
+                  line += " /XYZ " + anno.options.left + " " + top + " " + anno.options.zoom + "]";
+                  break;
+              }
+            }
+
+            if (line != "") {
+              line += " >>";
+              this.internal.write(line);
+            }
+
+            break;
+        }
+      }
+
+      this.internal.write("]");
+    }]);
+    /**
+     * @name createAnnotation
+     * @function
+     * @param {Object} options
+     */
+
+    jsPDFAPI.createAnnotation = function (options) {
+      var pageInfo = this.internal.getCurrentPageInfo();
+
+      switch (options.type) {
+        case "link":
+          this.link(options.bounds.x, options.bounds.y, options.bounds.w, options.bounds.h, options);
+          break;
+
+        case "text":
+        case "freetext":
+          pageInfo.pageContext.annotations.push(options);
+          break;
+      }
+    };
+    /**
+     * Create a link
+     *
+     * valid options
+     * <li> pageNumber or url [required]
+     * <p>If pageNumber is specified, top and zoom may also be specified</p>
+     * @name link
+     * @function
+     * @param {number} x
+     * @param {number} y
+     * @param {number} w
+     * @param {number} h
+     * @param {Object} options
+     */
+
+
+    jsPDFAPI.link = function (x, y, w, h, options) {
+      var pageInfo = this.internal.getCurrentPageInfo();
+      var getHorizontalCoordinateString = this.internal.getCoordinateString;
+      var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;
+      pageInfo.pageContext.annotations.push({
+        finalBounds: {
+          x: getHorizontalCoordinateString(x),
+          y: getVerticalCoordinateString(y),
+          w: getHorizontalCoordinateString(x + w),
+          h: getVerticalCoordinateString(y + h)
+        },
+        options: options,
+        type: "link"
+      });
+    };
+    /**
+     * Currently only supports single line text.
+     * Returns the width of the text/link
+     *
+     * @name textWithLink
+     * @function
+     * @param {string} text
+     * @param {number} x
+     * @param {number} y
+     * @param {Object} options
+     * @returns {number} width the width of the text/link
+     */
+
+
+    jsPDFAPI.textWithLink = function (text, x, y, options) {
+      var totalLineWidth = this.getTextWidth(text);
+      var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;
+      var linkHeight, linkWidth; // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line
+
+      if (options.maxWidth !== undefined) {
+        var maxWidth = options.maxWidth;
+        linkWidth = maxWidth;
+        var numOfLines = this.splitTextToSize(text, linkWidth).length;
+        linkHeight = Math.ceil(lineHeight * numOfLines);
+      } else {
+        linkWidth = totalLineWidth;
+        linkHeight = lineHeight;
+      }
+
+      this.text(text, x, y, options); //TODO We really need the text baseline height to do this correctly.
+      // Or ability to draw text on top, bottom, center, or baseline.
+
+      y += lineHeight * 0.2; //handle x position based on the align option
+
+      if (options.align === "center") {
+        x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width
+      }
+
+      if (options.align === "right") {
+        x = x - totalLineWidth;
+      }
+
+      this.link(x, y - lineHeight, linkWidth, linkHeight, options);
+      return totalLineWidth;
+    }; //TODO move into external library
+
+    /**
+     * @name getTextWidth
+     * @function
+     * @param {string} text
+     * @returns {number} txtWidth
+     */
+
+
+    jsPDFAPI.getTextWidth = function (text) {
+      var fontSize = this.internal.getFontSize();
+      var txtWidth = this.getStringUnitWidth(text) * fontSize / this.internal.scaleFactor;
+      return txtWidth;
+    };
+
+    return this;
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * Copyright (c) 2017 Aras Abbasi
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * jsPDF arabic parser PlugIn
+   *
+   * @name arabic
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+    /**
+     * Arabic shape substitutions: char code => (isolated, final, initial, medial).
+     * Arabic Substition A
+     */
+
+    var arabicSubstitionA = {
+      0x0621: [0xfe80],
+      // ARABIC LETTER HAMZA
+      0x0622: [0xfe81, 0xfe82],
+      // ARABIC LETTER ALEF WITH MADDA ABOVE
+      0x0623: [0xfe83, 0xfe84],
+      // ARABIC LETTER ALEF WITH HAMZA ABOVE
+      0x0624: [0xfe85, 0xfe86],
+      // ARABIC LETTER WAW WITH HAMZA ABOVE
+      0x0625: [0xfe87, 0xfe88],
+      // ARABIC LETTER ALEF WITH HAMZA BELOW
+      0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c],
+      // ARABIC LETTER YEH WITH HAMZA ABOVE
+      0x0627: [0xfe8d, 0xfe8e],
+      // ARABIC LETTER ALEF
+      0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92],
+      // ARABIC LETTER BEH
+      0x0629: [0xfe93, 0xfe94],
+      // ARABIC LETTER TEH MARBUTA
+      0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98],
+      // ARABIC LETTER TEH
+      0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c],
+      // ARABIC LETTER THEH
+      0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0],
+      // ARABIC LETTER JEEM
+      0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4],
+      // ARABIC LETTER HAH
+      0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8],
+      // ARABIC LETTER KHAH
+      0x062f: [0xfea9, 0xfeaa],
+      // ARABIC LETTER DAL
+      0x0630: [0xfeab, 0xfeac],
+      // ARABIC LETTER THAL
+      0x0631: [0xfead, 0xfeae],
+      // ARABIC LETTER REH
+      0x0632: [0xfeaf, 0xfeb0],
+      // ARABIC LETTER ZAIN
+      0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4],
+      // ARABIC LETTER SEEN
+      0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8],
+      // ARABIC LETTER SHEEN
+      0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc],
+      // ARABIC LETTER SAD
+      0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0],
+      // ARABIC LETTER DAD
+      0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4],
+      // ARABIC LETTER TAH
+      0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8],
+      // ARABIC LETTER ZAH
+      0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc],
+      // ARABIC LETTER AIN
+      0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0],
+      // ARABIC LETTER GHAIN
+      0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4],
+      // ARABIC LETTER FEH
+      0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8],
+      // ARABIC LETTER QAF
+      0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc],
+      // ARABIC LETTER KAF
+      0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0],
+      // ARABIC LETTER LAM
+      0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4],
+      // ARABIC LETTER MEEM
+      0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8],
+      // ARABIC LETTER NOON
+      0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec],
+      // ARABIC LETTER HEH
+      0x0648: [0xfeed, 0xfeee],
+      // ARABIC LETTER WAW
+      0x0649: [0xfeef, 0xfef0, 64488, 64489],
+      // ARABIC LETTER ALEF MAKSURA
+      0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4],
+      // ARABIC LETTER YEH
+      0x0671: [0xfb50, 0xfb51],
+      // ARABIC LETTER ALEF WASLA
+      0x0677: [0xfbdd],
+      // ARABIC LETTER U WITH HAMZA ABOVE
+      0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69],
+      // ARABIC LETTER TTEH
+      0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61],
+      // ARABIC LETTER TTEHEH
+      0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55],
+      // ARABIC LETTER BEEH
+      0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59],
+      // ARABIC LETTER PEH
+      0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65],
+      // ARABIC LETTER TEHEH
+      0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d],
+      // ARABIC LETTER BEHEH
+      0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79],
+      // ARABIC LETTER NYEH
+      0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75],
+      // ARABIC LETTER DYEH
+      0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d],
+      // ARABIC LETTER TCHEH
+      0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81],
+      // ARABIC LETTER TCHEHEH
+      0x0688: [0xfb88, 0xfb89],
+      // ARABIC LETTER DDAL
+      0x068c: [0xfb84, 0xfb85],
+      // ARABIC LETTER DAHAL
+      0x068d: [0xfb82, 0xfb83],
+      // ARABIC LETTER DDAHAL
+      0x068e: [0xfb86, 0xfb87],
+      // ARABIC LETTER DUL
+      0x0691: [0xfb8c, 0xfb8d],
+      // ARABIC LETTER RREH
+      0x0698: [0xfb8a, 0xfb8b],
+      // ARABIC LETTER JEH
+      0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d],
+      // ARABIC LETTER VEH
+      0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71],
+      // ARABIC LETTER PEHEH
+      0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91],
+      // ARABIC LETTER KEHEH
+      0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6],
+      // ARABIC LETTER NG
+      0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95],
+      // ARABIC LETTER GAF
+      0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d],
+      // ARABIC LETTER NGOEH
+      0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99],
+      // ARABIC LETTER GUEH
+      0x06ba: [0xfb9e, 0xfb9f],
+      // ARABIC LETTER NOON GHUNNA
+      0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3],
+      // ARABIC LETTER RNOON
+      0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad],
+      // ARABIC LETTER HEH DOACHASHMEE
+      0x06c0: [0xfba4, 0xfba5],
+      // ARABIC LETTER HEH WITH YEH ABOVE
+      0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9],
+      // ARABIC LETTER HEH GOAL
+      0x06c5: [0xfbe0, 0xfbe1],
+      // ARABIC LETTER KIRGHIZ OE
+      0x06c6: [0xfbd9, 0xfbda],
+      // ARABIC LETTER OE
+      0x06c7: [0xfbd7, 0xfbd8],
+      // ARABIC LETTER U
+      0x06c8: [0xfbdb, 0xfbdc],
+      // ARABIC LETTER YU
+      0x06c9: [0xfbe2, 0xfbe3],
+      // ARABIC LETTER KIRGHIZ YU
+      0x06cb: [0xfbde, 0xfbdf],
+      // ARABIC LETTER VE
+      0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff],
+      // ARABIC LETTER FARSI YEH
+      0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7],
+      //ARABIC LETTER E
+      0x06d2: [0xfbae, 0xfbaf],
+      // ARABIC LETTER YEH BARREE
+      0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE
+
+    };
+    /*
+      var ligaturesSubstitutionA = {
+          0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM
+      };
+      */
+
+    var ligatures = {
+      0xfedf: {
+        0xfe82: 0xfef5,
+        // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM
+        0xfe84: 0xfef7,
+        // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM
+        0xfe88: 0xfef9,
+        // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM
+        0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM
+
+      },
+      0xfee0: {
+        0xfe82: 0xfef6,
+        // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM
+        0xfe84: 0xfef8,
+        // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM
+        0xfe88: 0xfefa,
+        // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM
+        0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM
+
+      },
+      0xfe8d: {
+        0xfedf: {
+          0xfee0: {
+            0xfeea: 0xfdf2
+          }
+        }
+      },
+      // ALLAH
+      0x0651: {
+        0x064c: 0xfc5e,
+        // Shadda + Dammatan
+        0x064d: 0xfc5f,
+        // Shadda + Kasratan
+        0x064e: 0xfc60,
+        // Shadda + Fatha
+        0x064f: 0xfc61,
+        // Shadda + Damma
+        0x0650: 0xfc62 // Shadda + Kasra
+
+      }
+    };
+    var arabic_diacritics = {
+      1612: 64606,
+      // Shadda + Dammatan
+      1613: 64607,
+      // Shadda + Kasratan
+      1614: 64608,
+      // Shadda + Fatha
+      1615: 64609,
+      // Shadda + Damma
+      1616: 64610 // Shadda + Kasra
+
+    };
+    var alfletter = [1570, 1571, 1573, 1575];
+    var noChangeInForm = -1;
+    var isolatedForm = 0;
+    var finalForm = 1;
+    var initialForm = 2;
+    var medialForm = 3;
+    jsPDFAPI.__arabicParser__ = {}; //private
+
+    var isInArabicSubstitutionA = jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function (letter) {
+      return typeof arabicSubstitionA[letter.charCodeAt(0)] !== "undefined";
+    };
+
+    var isArabicLetter = jsPDFAPI.__arabicParser__.isArabicLetter = function (letter) {
+      return typeof letter === "string" && /^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(letter);
+    };
+
+    var isArabicEndLetter = jsPDFAPI.__arabicParser__.isArabicEndLetter = function (letter) {
+      return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length <= 2;
+    };
+
+    var isArabicAlfLetter = jsPDFAPI.__arabicParser__.isArabicAlfLetter = function (letter) {
+      return isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0;
+    };
+
+    jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function (letter) {
+      return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length >= 1;
+    };
+
+    var arabicLetterHasFinalForm = jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function (letter) {
+      return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length >= 2;
+    };
+
+    jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function (letter) {
+      return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length >= 3;
+    };
+
+    var arabicLetterHasMedialForm = jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function (letter) {
+      return isArabicLetter(letter) && isInArabicSubstitutionA(letter) && arabicSubstitionA[letter.charCodeAt(0)].length == 4;
+    };
+
+    var resolveLigatures = jsPDFAPI.__arabicParser__.resolveLigatures = function (letters) {
+      var i = 0;
+      var tmpLigatures = ligatures;
+      var result = "";
+      var effectedLetters = 0;
+
+      for (i = 0; i < letters.length; i += 1) {
+        if (typeof tmpLigatures[letters.charCodeAt(i)] !== "undefined") {
+          effectedLetters++;
+          tmpLigatures = tmpLigatures[letters.charCodeAt(i)];
+
+          if (typeof tmpLigatures === "number") {
+            result += String.fromCharCode(tmpLigatures);
+            tmpLigatures = ligatures;
+            effectedLetters = 0;
+          }
+
+          if (i === letters.length - 1) {
+            tmpLigatures = ligatures;
+            result += letters.charAt(i - (effectedLetters - 1));
+            i = i - (effectedLetters - 1);
+            effectedLetters = 0;
+          }
+        } else {
+          tmpLigatures = ligatures;
+          result += letters.charAt(i - effectedLetters);
+          i = i - effectedLetters;
+          effectedLetters = 0;
+        }
+      }
+
+      return result;
+    };
+
+    jsPDFAPI.__arabicParser__.isArabicDiacritic = function (letter) {
+      return letter !== undefined && arabic_diacritics[letter.charCodeAt(0)] !== undefined;
+    };
+
+    var getCorrectForm = jsPDFAPI.__arabicParser__.getCorrectForm = function (currentChar, beforeChar, nextChar) {
+      if (!isArabicLetter(currentChar)) {
+        return -1;
+      }
+
+      if (isInArabicSubstitutionA(currentChar) === false) {
+        return noChangeInForm;
+      }
+
+      if (!arabicLetterHasFinalForm(currentChar) || !isArabicLetter(beforeChar) && !isArabicLetter(nextChar) || !isArabicLetter(nextChar) && isArabicEndLetter(beforeChar) || isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar) || isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar) || isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar)) {
+        return isolatedForm;
+      }
+
+      if (arabicLetterHasMedialForm(currentChar) && isArabicLetter(beforeChar) && !isArabicEndLetter(beforeChar) && isArabicLetter(nextChar) && arabicLetterHasFinalForm(nextChar)) {
+        return medialForm;
+      }
+
+      if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {
+        return finalForm;
+      }
+
+      return initialForm;
+    };
+    /**
+     * @name processArabic
+     * @function
+     * @param {string} text
+     * @returns {string}
+     */
+
+
+    var parseArabic = function parseArabic(text) {
+      text = text || "";
+      var result = "";
+      var i = 0;
+      var j = 0;
+      var position = 0;
+      var currentLetter = "";
+      var prevLetter = "";
+      var nextLetter = "";
+      var words = text.split("\\s+");
+      var newWords = [];
+
+      for (i = 0; i < words.length; i += 1) {
+        newWords.push("");
+
+        for (j = 0; j < words[i].length; j += 1) {
+          currentLetter = words[i][j];
+          prevLetter = words[i][j - 1];
+          nextLetter = words[i][j + 1];
+
+          if (isArabicLetter(currentLetter)) {
+            position = getCorrectForm(currentLetter, prevLetter, nextLetter);
+
+            if (position !== -1) {
+              newWords[i] += String.fromCharCode(arabicSubstitionA[currentLetter.charCodeAt(0)][position]);
+            } else {
+              newWords[i] += currentLetter;
+            }
+          } else {
+            newWords[i] += currentLetter;
+          }
+        }
+
+        newWords[i] = resolveLigatures(newWords[i]);
+      }
+
+      result = newWords.join(" ");
+      return result;
+    };
+
+    var processArabic = jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function () {
+      var text = typeof arguments[0] === "string" ? arguments[0] : arguments[0].text;
+      var tmpText = [];
+      var result;
+
+      if (Array.isArray(text)) {
+        var i = 0;
+        tmpText = [];
+
+        for (i = 0; i < text.length; i += 1) {
+          if (Array.isArray(text[i])) {
+            tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);
+          } else {
+            tmpText.push([parseArabic(text[i])]);
+          }
+        }
+
+        result = tmpText;
+      } else {
+        result = parseArabic(text);
+      }
+
+      if (typeof arguments[0] === "string") {
+        return result;
+      } else {
+        arguments[0].text = result;
+        return arguments[0];
+      }
+    };
+
+    jsPDFAPI.events.push(["preProcessText", processArabic]);
+  })(jsPDF.API);
+
+  /** @license
+   * jsPDF Autoprint Plugin
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * @name autoprint
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+    /**
+     * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.
+     *
+     * @name autoPrint
+     * @function
+     * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .
+     * @returns {jsPDF}
+     * @example
+     * var doc = new jsPDF();
+     * doc.text(10, 10, 'This is a test');
+     * doc.autoPrint({variant: 'non-conform'});
+     * doc.save('autoprint.pdf');
+     */
+
+    jsPDFAPI.autoPrint = function (options) {
+
+      var refAutoPrintTag;
+      options = options || {};
+      options.variant = options.variant || "non-conform";
+
+      switch (options.variant) {
+        case "javascript":
+          //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb
+          this.addJS("print({});");
+          break;
+
+        case "non-conform":
+        default:
+          this.internal.events.subscribe("postPutResources", function () {
+            refAutoPrintTag = 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 " + refAutoPrintTag + " 0 R");
+          });
+          break;
+      }
+
+      return this;
+    };
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * jsPDF Canvas PlugIn
+   * This plugin mimics the HTML5 Canvas
+   *
+   * The goal is to provide a way for current canvas users to print directly to a PDF.
+   * @name canvas
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+    /**
+     * @class Canvas
+     * @classdesc A Canvas Wrapper for jsPDF
+     */
+
+    var Canvas = function Canvas() {
+      var jsPdfInstance = undefined;
+      Object.defineProperty(this, "pdf", {
+        get: function get() {
+          return jsPdfInstance;
+        },
+        set: function set(value) {
+          jsPdfInstance = value;
+        }
+      });
+      var _width = 150;
+      /**
+       * The height property is a positive integer reflecting the height HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.
+       * This is one of the two properties, the other being width, that controls the size of the canvas.
+       *
+       * @name width
+       */
+
+      Object.defineProperty(this, "width", {
+        get: function get() {
+          return _width;
+        },
+        set: function set(value) {
+          if (isNaN(value) || Number.isInteger(value) === false || value < 0) {
+            _width = 150;
+          } else {
+            _width = value;
+          }
+
+          if (this.getContext("2d").pageWrapXEnabled) {
+            this.getContext("2d").pageWrapX = _width + 1;
+          }
+        }
+      });
+      var _height = 300;
+      /**
+       * The width property is a positive integer reflecting the width HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.
+       * This is one of the two properties, the other being height, that controls the size of the canvas.
+       *
+       * @name height
+       */
+
+      Object.defineProperty(this, "height", {
+        get: function get() {
+          return _height;
+        },
+        set: function set(value) {
+          if (isNaN(value) || Number.isInteger(value) === false || value < 0) {
+            _height = 300;
+          } else {
+            _height = value;
+          }
+
+          if (this.getContext("2d").pageWrapYEnabled) {
+            this.getContext("2d").pageWrapY = _height + 1;
+          }
+        }
+      });
+      var _childNodes = [];
+      Object.defineProperty(this, "childNodes", {
+        get: function get() {
+          return _childNodes;
+        },
+        set: function set(value) {
+          _childNodes = value;
+        }
+      });
+      var _style = {};
+      Object.defineProperty(this, "style", {
+        get: function get() {
+          return _style;
+        },
+        set: function set(value) {
+          _style = value;
+        }
+      });
+      Object.defineProperty(this, "parentNode", {});
+    };
+    /**
+     * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.
+     *
+     * @name getContext
+     * @function
+     * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is "2d", leading to the creation of a Context2D object representing a two-dimensional rendering context.
+     * @param {object} contextAttributes
+     */
+
+
+    Canvas.prototype.getContext = function (contextType, contextAttributes) {
+      contextType = contextType || "2d";
+      var key;
+
+      if (contextType !== "2d") {
+        return null;
+      }
+
+      for (key in contextAttributes) {
+        if (this.pdf.context2d.hasOwnProperty(key)) {
+          this.pdf.context2d[key] = contextAttributes[key];
+        }
+      }
+
+      this.pdf.context2d._canvas = this;
+      return this.pdf.context2d;
+    };
+    /**
+     * The toDataURL() method is just a stub to throw an error if accidently called.
+     *
+     * @name toDataURL
+     * @function
+     */
+
+
+    Canvas.prototype.toDataURL = function () {
+      throw new Error("toDataURL is not implemented.");
+    };
+
+    jsPDFAPI.events.push(["initialized", function () {
+      this.canvas = new Canvas();
+      this.canvas.pdf = this;
+    }]);
+    return this;
+  })(jsPDF.API);
+
+  /**
+   * @name cell
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    var NO_MARGINS = {
+      left: 0,
+      top: 0,
+      bottom: 0,
+      right: 0
+    };
+    var px2pt = 0.264583 * 72 / 25.4;
+    var printingHeaderRow = false;
+
+    var _initialize = function _initialize() {
+      if (typeof this.internal.__cell__ === "undefined") {
+        this.internal.__cell__ = {};
+        this.internal.__cell__.padding = 3;
+        this.internal.__cell__.headerFunction = undefined;
+        this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);
+        this.internal.__cell__.margins.width = this.getPageWidth();
+
+        _reset.call(this);
+      }
+    };
+
+    var _reset = function _reset() {
+      this.internal.__cell__.lastCell = new Cell();
+      this.internal.__cell__.pages = 1;
+    };
+
+    var Cell = function Cell() {
+      var _x = arguments[0];
+      Object.defineProperty(this, "x", {
+        enumerable: true,
+        get: function get() {
+          return _x;
+        },
+        set: function set(value) {
+          _x = value;
+        }
+      });
+      var _y = arguments[1];
+      Object.defineProperty(this, "y", {
+        enumerable: true,
+        get: function get() {
+          return _y;
+        },
+        set: function set(value) {
+          _y = value;
+        }
+      });
+      var _width = arguments[2];
+      Object.defineProperty(this, "width", {
+        enumerable: true,
+        get: function get() {
+          return _width;
+        },
+        set: function set(value) {
+          _width = value;
+        }
+      });
+      var _height = arguments[3];
+      Object.defineProperty(this, "height", {
+        enumerable: true,
+        get: function get() {
+          return _height;
+        },
+        set: function set(value) {
+          _height = value;
+        }
+      });
+      var _text = arguments[4];
+      Object.defineProperty(this, "text", {
+        enumerable: true,
+        get: function get() {
+          return _text;
+        },
+        set: function set(value) {
+          _text = value;
+        }
+      });
+      var _lineNumber = arguments[5];
+      Object.defineProperty(this, "lineNumber", {
+        enumerable: true,
+        get: function get() {
+          return _lineNumber;
+        },
+        set: function set(value) {
+          _lineNumber = value;
+        }
+      });
+      var _align = arguments[6];
+      Object.defineProperty(this, "align", {
+        enumerable: true,
+        get: function get() {
+          return _align;
+        },
+        set: function set(value) {
+          _align = value;
+        }
+      });
+      return this;
+    };
+
+    Cell.prototype.clone = function () {
+      return new Cell(this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align);
+    };
+
+    Cell.prototype.toArray = function () {
+      return [this.x, this.y, this.width, this.height, this.text, this.lineNumber, this.align];
+    };
+    /**
+     * @name setHeaderFunction
+     * @function
+     * @param {function} func
+     */
+
+
+    jsPDFAPI.setHeaderFunction = function (func) {
+      _initialize.call(this);
+
+      this.internal.__cell__.headerFunction = typeof func === "function" ? func : undefined;
+      return this;
+    };
+    /**
+     * @name getTextDimensions
+     * @function
+     * @param {string} txt
+     * @returns {Object} dimensions
+     */
+
+
+    jsPDFAPI.getTextDimensions = function (text, options) {
+      _initialize.call(this);
+
+      options = options || {};
+      var fontSize = options.fontSize || this.getFontSize();
+      var font = options.font || this.getFont();
+      var scaleFactor = options.scaleFactor || this.internal.scaleFactor;
+      var width = 0;
+      var amountOfLines = 0;
+      var height = 0;
+      var tempWidth = 0;
+      var scope = this;
+
+      if (!Array.isArray(text) && typeof text !== "string") {
+        if (typeof text === "number") {
+          text = String(text);
+        } else {
+          throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");
+        }
+      }
+
+      var maxWidth = options.maxWidth;
+
+      if (maxWidth > 0) {
+        if (typeof text === "string") {
+          text = this.splitTextToSize(text, maxWidth);
+        } else if (Object.prototype.toString.call(text) === "[object Array]") {
+          text = text.reduce(function (acc, textLine) {
+            return acc.concat(scope.splitTextToSize(textLine, maxWidth));
+          }, []);
+        }
+      } else {
+        // Without the else clause, it will not work if you do not pass along maxWidth
+        text = Array.isArray(text) ? text : [text];
+      }
+
+      for (var i = 0; i < text.length; i++) {
+        tempWidth = this.getStringUnitWidth(text[i], {
+          font: font
+        }) * fontSize;
+
+        if (width < tempWidth) {
+          width = tempWidth;
+        }
+      }
+
+      if (width !== 0) {
+        amountOfLines = text.length;
+      }
+
+      width = width / scaleFactor;
+      height = Math.max((amountOfLines * fontSize * this.getLineHeightFactor() - fontSize * (this.getLineHeightFactor() - 1)) / scaleFactor, 0);
+      return {
+        w: width,
+        h: height
+      };
+    };
+    /**
+     * @name cellAddPage
+     * @function
+     */
+
+
+    jsPDFAPI.cellAddPage = function () {
+      _initialize.call(this);
+
+      this.addPage();
+      var margins = this.internal.__cell__.margins || NO_MARGINS;
+      this.internal.__cell__.lastCell = new Cell(margins.left, margins.top, undefined, undefined);
+      this.internal.__cell__.pages += 1;
+      return this;
+    };
+    /**
+     * @name cell
+     * @function
+     * @param {number} x
+     * @param {number} y
+     * @param {number} width
+     * @param {number} height
+     * @param {string} text
+     * @param {number} lineNumber lineNumber
+     * @param {string} align
+     * @return {jsPDF} jsPDF-instance
+     */
+
+
+    var cell = jsPDFAPI.cell = function () {
+      var currentCell;
+
+      if (arguments[0] instanceof Cell) {
+        currentCell = arguments[0];
+      } else {
+        currentCell = new Cell(arguments[0], arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
+      }
+
+      _initialize.call(this);
+
+      var lastCell = this.internal.__cell__.lastCell;
+      var padding = this.internal.__cell__.padding;
+      var margins = this.internal.__cell__.margins || NO_MARGINS;
+      var tableHeaderRow = this.internal.__cell__.tableHeaderRow;
+      var printHeaders = this.internal.__cell__.printHeaders; // If this is not the first cell, we must change its position
+
+      if (typeof lastCell.lineNumber !== "undefined") {
+        if (lastCell.lineNumber === currentCell.lineNumber) {
+          //Same line
+          currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);
+          currentCell.y = lastCell.y || 0;
+        } else {
+          //New line
+          if (lastCell.y + lastCell.height + currentCell.height + margins.bottom > this.getPageHeight()) {
+            this.cellAddPage();
+            currentCell.y = margins.top;
+
+            if (printHeaders && tableHeaderRow) {
+              this.printHeaderRow(currentCell.lineNumber, true);
+              currentCell.y += tableHeaderRow[0].height;
+            }
+          } else {
+            currentCell.y = lastCell.y + lastCell.height || currentCell.y;
+          }
+        }
+      }
+
+      if (typeof currentCell.text[0] !== "undefined") {
+        this.rect(currentCell.x, currentCell.y, currentCell.width, currentCell.height, printingHeaderRow === true ? "FD" : undefined);
+
+        if (currentCell.align === "right") {
+          this.text(currentCell.text, currentCell.x + currentCell.width - padding, currentCell.y + padding, {
+            align: "right",
+            baseline: "top"
+          });
+        } else if (currentCell.align === "center") {
+          this.text(currentCell.text, currentCell.x + currentCell.width / 2, currentCell.y + padding, {
+            align: "center",
+            baseline: "top",
+            maxWidth: currentCell.width - padding - padding
+          });
+        } else {
+          this.text(currentCell.text, currentCell.x + padding, currentCell.y + padding, {
+            align: "left",
+            baseline: "top",
+            maxWidth: currentCell.width - padding - padding
+          });
+        }
+      }
+
+      this.internal.__cell__.lastCell = currentCell;
+      return this;
+    };
+    /**
+       * Create a table from a set of data.
+       * @name table
+       * @function
+       * @param {Integer} [x] : left-position for top-left corner of table
+       * @param {Integer} [y] top-position for top-left corner of table
+       * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.
+       * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost
+        * @param {Object} [config.printHeaders] True to print column headers at the top of every page
+       * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value
+       * @param {Object} [config.margins] margin values for left, top, bottom, and width
+       * @param {Object} [config.fontSize] Integer fontSize to use (optional)
+       * @param {Object} [config.padding] cell-padding in pt to use (optional)
+       * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)
+       * @param {Object} [config.headerTextColor] default is #000 (optional)
+       * @param {Object} [config.rowStart] callback to handle before print each row (optional)
+       * @param {Object} [config.cellStart] callback to handle before print each cell (optional)
+       * @returns {jsPDF} jsPDF-instance
+       */
+
+
+    jsPDFAPI.table = function (x, y, data, headers, config) {
+      _initialize.call(this);
+
+      if (!data) {
+        throw new Error("No data for PDF table.");
+      }
+
+      config = config || {};
+      var headerNames = [],
+          headerLabels = [],
+          headerAligns = [],
+          i,
+          columnMatrix = {},
+          columnWidths = {},
+          column,
+          columnMinWidths = [],
+          j,
+          tableHeaderConfigs = [],
+          //set up defaults. If a value is provided in config, defaults will be overwritten:
+      autoSize = config.autoSize || false,
+          printHeaders = config.printHeaders === false ? false : true,
+          fontSize = config.css && typeof config.css["font-size"] !== "undefined" ? config.css["font-size"] * 16 : config.fontSize || 12,
+          margins = config.margins || Object.assign({
+        width: this.getPageWidth()
+      }, NO_MARGINS),
+          padding = typeof config.padding === "number" ? config.padding : 3,
+          headerBackgroundColor = config.headerBackgroundColor || "#c8c8c8",
+          headerTextColor = config.headerTextColor || "#000";
+
+      _reset.call(this);
+
+      this.internal.__cell__.printHeaders = printHeaders;
+      this.internal.__cell__.margins = margins;
+      this.internal.__cell__.table_font_size = fontSize;
+      this.internal.__cell__.padding = padding;
+      this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;
+      this.internal.__cell__.headerTextColor = headerTextColor;
+      this.setFontSize(fontSize); // Set header values
+
+      if (headers === undefined || headers === null) {
+        // No headers defined so we derive from data
+        headerNames = Object.keys(data[0]);
+        headerLabels = headerNames;
+        headerAligns = headerNames.map(function () {
+          return "left";
+        });
+      } else if (Array.isArray(headers) && _typeof(headers[0]) === "object") {
+        headerNames = headers.map(function (header) {
+          return header.name;
+        });
+        headerLabels = headers.map(function (header) {
+          return header.prompt || header.name || "";
+        });
+        headerAligns = headers.map(function (header) {
+          return header.align || "left";
+        }); // Split header configs into names and prompts
+
+        for (i = 0; i < headers.length; i += 1) {
+          columnWidths[headers[i].name] = headers[i].width * px2pt;
+        }
+      } else if (Array.isArray(headers) && typeof headers[0] === "string") {
+        headerNames = headers;
+        headerLabels = headerNames;
+        headerAligns = headerNames.map(function () {
+          return "left";
+        });
+      }
+
+      if (autoSize || Array.isArray(headers) && typeof headers[0] === "string") {
+        var headerName;
+
+        for (i = 0; i < headerNames.length; i += 1) {
+          headerName = headerNames[i]; // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}
+
+          columnMatrix[headerName] = data.map(function (rec) {
+            return rec[headerName];
+          }); // get header width
+
+          this.setFont(undefined, "bold");
+          columnMinWidths.push(this.getTextDimensions(headerLabels[i], {
+            fontSize: this.internal.__cell__.table_font_size,
+            scaleFactor: this.internal.scaleFactor
+          }).w);
+          column = columnMatrix[headerName]; // get cell widths
+
+          this.setFont(undefined, "normal");
+
+          for (j = 0; j < column.length; j += 1) {
+            columnMinWidths.push(this.getTextDimensions(column[j], {
+              fontSize: this.internal.__cell__.table_font_size,
+              scaleFactor: this.internal.scaleFactor
+            }).w);
+          } // get final column width
+
+
+          columnWidths[headerName] = Math.max.apply(null, columnMinWidths) + padding + padding; //have to reset
+
+          columnMinWidths = [];
+        }
+      } // -- Construct the table
+
+
+      if (printHeaders) {
+        var row = {};
+
+        for (i = 0; i < headerNames.length; i += 1) {
+          row[headerNames[i]] = {};
+          row[headerNames[i]].text = headerLabels[i];
+          row[headerNames[i]].align = headerAligns[i];
+        }
+
+        var rowHeight = calculateLineHeight.call(this, row, columnWidths); // Construct the header row
+
+        tableHeaderConfigs = headerNames.map(function (value) {
+          return new Cell(x, y, columnWidths[value], rowHeight, row[value].text, undefined, row[value].align);
+        }); // Store the table header config
+
+        this.setTableHeaderRow(tableHeaderConfigs); // Print the header for the start of the table
+
+        this.printHeaderRow(1, false);
+      } // Construct the data rows
+
+
+      var align = headers.reduce(function (pv, cv) {
+        pv[cv.name] = cv.align;
+        return pv;
+      }, {});
+
+      for (i = 0; i < data.length; i += 1) {
+        if ("rowStart" in config && config.rowStart instanceof Function) {
+          config.rowStart({
+            row: i,
+            data: data[i]
+          }, this);
+        }
+
+        var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);
+
+        for (j = 0; j < headerNames.length; j += 1) {
+          var cellData = data[i][headerNames[j]];
+
+          if ("cellStart" in config && config.cellStart instanceof Function) {
+            config.cellStart({
+              row: i,
+              col: j,
+              data: cellData
+            }, this);
+          }
+
+          cell.call(this, new Cell(x, y, columnWidths[headerNames[j]], lineHeight, cellData, i + 2, align[headerNames[j]]));
+        }
+      }
+
+      this.internal.__cell__.table_x = x;
+      this.internal.__cell__.table_y = y;
+      return this;
+    };
+    /**
+     * Calculate the height for containing the highest column
+     *
+     * @name calculateLineHeight
+     * @function
+     * @param {Object[]} model is the line of data we want to calculate the height of
+     * @param {Integer[]} columnWidths is size of each column
+     * @returns {number} lineHeight
+     * @private
+     */
+
+
+    var calculateLineHeight = function calculateLineHeight(model, columnWidths) {
+      var padding = this.internal.__cell__.padding;
+      var fontSize = this.internal.__cell__.table_font_size;
+      var scaleFactor = this.internal.scaleFactor;
+      return Object.keys(model).map(function (key) {
+        var value = model[key];
+        return this.splitTextToSize(value.hasOwnProperty("text") ? value.text : value, columnWidths[key] - padding - padding);
+      }, this).map(function (value) {
+        return this.getLineHeightFactor() * value.length * fontSize / scaleFactor + padding + padding;
+      }, this).reduce(function (pv, cv) {
+        return Math.max(pv, cv);
+      }, 0);
+    };
+    /**
+     * Store the config for outputting a table header
+     *
+     * @name setTableHeaderRow
+     * @function
+     * @param {Object[]} config
+     * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell
+     * except the lineNumber parameter is excluded
+     */
+
+
+    jsPDFAPI.setTableHeaderRow = function (config) {
+      _initialize.call(this);
+
+      this.internal.__cell__.tableHeaderRow = config;
+    };
+    /**
+     * Output the store header row
+     *
+     * @name printHeaderRow
+     * @function
+     * @param {number} lineNumber The line number to output the header at
+     * @param {boolean} new_page
+     */
+
+
+    jsPDFAPI.printHeaderRow = function (lineNumber, new_page) {
+      _initialize.call(this);
+
+      if (!this.internal.__cell__.tableHeaderRow) {
+        throw new Error("Property tableHeaderRow does not exist.");
+      }
+
+      var tableHeaderCell;
+      printingHeaderRow = true;
+
+      if (typeof this.internal.__cell__.headerFunction === "function") {
+        var position = this.internal.__cell__.headerFunction(this, this.internal.__cell__.pages);
+
+        this.internal.__cell__.lastCell = new Cell(position[0], position[1], position[2], position[3], undefined, -1);
+      }
+
+      this.setFont(undefined, "bold");
+      var tempHeaderConf = [];
+
+      for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {
+        tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();
+
+        if (new_page) {
+          tableHeaderCell.y = this.internal.__cell__.margins.top || 0;
+          tempHeaderConf.push(tableHeaderCell);
+        }
+
+        tableHeaderCell.lineNumber = lineNumber;
+        var currentTextColor = this.getTextColor();
+        this.setTextColor(this.internal.__cell__.headerTextColor);
+        this.setFillColor(this.internal.__cell__.headerBackgroundColor);
+        cell.call(this, tableHeaderCell);
+        this.setTextColor(currentTextColor);
+      }
+
+      if (tempHeaderConf.length > 0) {
+        this.setTableHeaderRow(tempHeaderConf);
+      }
+
+      this.setFont(undefined, "normal");
+      printingHeaderRow = false;
+    };
+  })(jsPDF.API);
+
+  function toLookup(arr) {
+    return arr.reduce(function (lookup, name, index) {
+      lookup[name] = index;
+      return lookup;
+    }, {});
+  }
+
+  var fontStyleOrder = {
+    italic: ["italic", "oblique", "normal"],
+    oblique: ["oblique", "italic", "normal"],
+    normal: ["normal", "oblique", "italic"]
+  };
+  var fontStretchOrder = ["ultra-condensed", "extra-condensed", "condensed", "semi-condensed", "normal", "semi-expanded", "expanded", "extra-expanded", "ultra-expanded"]; // For a given font-stretch value, we need to know where to start our search
+  // from in the fontStretchOrder list.
+
+  var fontStretchLookup = toLookup(fontStretchOrder);
+  var fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];
+  var fontWeightsLookup = toLookup(fontWeights);
+
+  function normalizeFontStretch(stretch) {
+    stretch = stretch || "normal";
+    return typeof fontStretchLookup[stretch] === "number" ? stretch : "normal";
+  }
+
+  function normalizeFontStyle(style) {
+    style = style || "normal";
+    return fontStyleOrder[style] ? style : "normal";
+  }
+
+  function normalizeFontWeight(weight) {
+    if (!weight) {
+      return 400;
+    }
+
+    if (typeof weight === "number") {
+      // Ignore values which aren't valid font-weights.
+      return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;
+    }
+
+    if (/^\d00$/.test(weight)) {
+      return parseInt(weight);
+    }
+
+    switch (weight) {
+      case "bold":
+        return 700;
+
+      case "normal":
+      default:
+        return 400;
+    }
+  }
+
+  function normalizeFontFace(fontFace) {
+    var family = fontFace.family.replace(/"|'/g, "").toLowerCase();
+    var style = normalizeFontStyle(fontFace.style);
+    var weight = normalizeFontWeight(fontFace.weight);
+    var stretch = normalizeFontStretch(fontFace.stretch);
+    return {
+      family: family,
+      style: style,
+      weight: weight,
+      stretch: stretch,
+      src: fontFace.src || [],
+      // The ref property maps this font-face to the font
+      // added by the .addFont() method.
+      ref: fontFace.ref || {
+        name: family,
+        style: [stretch, style, weight].join(" ")
+      }
+    };
+  }
+  /**
+   * Turns a list of font-faces into a map, for easier lookup when resolving
+   * fonts.
+   * @private
+   */
+
+  function buildFontFaceMap(fontFaces) {
+    var map = {};
+
+    for (var i = 0; i < fontFaces.length; ++i) {
+      var normalized = normalizeFontFace(fontFaces[i]);
+      var name = normalized.family;
+      var stretch = normalized.stretch;
+      var style = normalized.style;
+      var weight = normalized.weight;
+      map[name] = map[name] || {};
+      map[name][stretch] = map[name][stretch] || {};
+      map[name][stretch][style] = map[name][stretch][style] || {};
+      map[name][stretch][style][weight] = normalized;
+    }
+
+    return map;
+  }
+  /**
+   * Searches a map of stretches, weights, etc. in the given direction and
+   * then, if no match has been found, in the opposite directions.
+   *
+   * @param {Object.<string, any>} matchingSet A map of the various font variations.
+   * @param {any[]} order The order of the different variations
+   * @param {number} pivot The starting point of the search in the order list.
+   * @param {number} dir The initial direction of the search (desc = -1, asc = 1)
+   * @private
+   */
+
+  function searchFromPivot(matchingSet, order, pivot, dir) {
+    var i;
+
+    for (i = pivot; i >= 0 && i < order.length; i += dir) {
+      if (matchingSet[order[i]]) {
+        return matchingSet[order[i]];
+      }
+    }
+
+    for (i = pivot; i >= 0 && i < order.length; i -= dir) {
+      if (matchingSet[order[i]]) {
+        return matchingSet[order[i]];
+      }
+    }
+  }
+
+  function resolveFontStretch(stretch, matchingSet) {
+    if (matchingSet[stretch]) {
+      return matchingSet[stretch];
+    }
+
+    var pivot = fontStretchLookup[stretch]; // If the font-stretch value is normal or more condensed, we want to
+    // start with a descending search, otherwise we should do ascending.
+
+    var dir = pivot <= fontStretchLookup["normal"] ? -1 : 1;
+    var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);
+
+    if (!match) {
+      // Since a font-family cannot exist without having at least one stretch value
+      // we should never reach this point.
+      throw new Error("Could not find a matching font-stretch value for " + stretch);
+    }
+
+    return match;
+  }
+
+  function resolveFontStyle(fontStyle, matchingSet) {
+    if (matchingSet[fontStyle]) {
+      return matchingSet[fontStyle];
+    }
+
+    var ordering = fontStyleOrder[fontStyle];
+
+    for (var i = 0; i < ordering.length; ++i) {
+      if (matchingSet[ordering[i]]) {
+        return matchingSet[ordering[i]];
+      }
+    } // Since a font-family cannot exist without having at least one style value
+    // we should never reach this point.
+
+
+    throw new Error("Could not find a matching font-style for " + fontStyle);
+  }
+
+  function resolveFontWeight(weight, matchingSet) {
+    if (matchingSet[weight]) {
+      return matchingSet[weight];
+    }
+
+    if (weight === 400 && matchingSet[500]) {
+      return matchingSet[500];
+    }
+
+    if (weight === 500 && matchingSet[400]) {
+      return matchingSet[400];
+    }
+
+    var pivot = fontWeightsLookup[weight]; // If the font-stretch value is normal or more condensed, we want to
+    // start with a descending search, otherwise we should do ascending.
+
+    var dir = weight < 400 ? -1 : 1;
+    var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);
+
+    if (!match) {
+      // Since a font-family cannot exist without having at least one stretch value
+      // we should never reach this point.
+      throw new Error("Could not find a matching font-weight for value " + weight);
+    }
+
+    return match;
+  }
+
+  var defaultGenericFontFamilies = {
+    "sans-serif": "helvetica",
+    fixed: "courier",
+    monospace: "courier",
+    terminal: "courier",
+    cursive: "times",
+    fantasy: "times",
+    serif: "times"
+  };
+  var systemFonts = {
+    caption: "times",
+    icon: "times",
+    menu: "times",
+    "message-box": "times",
+    "small-caption": "times",
+    "status-bar": "times"
+  };
+
+  function ruleToString(rule) {
+    return [rule.stretch, rule.style, rule.weight, rule.family].join(" ");
+  }
+
+  function resolveFontFace(fontFaceMap, rules, opts) {
+    opts = opts || {};
+    var defaultFontFamily = opts.defaultFontFamily || "times";
+    var genericFontFamilies = Object.assign({}, defaultGenericFontFamilies, opts.genericFontFamilies || {});
+    var rule = null;
+    var matches = null;
+
+    for (var i = 0; i < rules.length; ++i) {
+      rule = normalizeFontFace(rules[i]);
+
+      if (genericFontFamilies[rule.family]) {
+        rule.family = genericFontFamilies[rule.family];
+      }
+
+      if (fontFaceMap.hasOwnProperty(rule.family)) {
+        matches = fontFaceMap[rule.family];
+        break;
+      }
+    } // Always fallback to a known font family.
+
+
+    matches = matches || fontFaceMap[defaultFontFamily];
+
+    if (!matches) {
+      // At this point we should definitiely have a font family, but if we
+      // don't there is something wrong with our configuration
+      throw new Error("Could not find a font-family for the rule '" + ruleToString(rule) + "' and default family '" + defaultFontFamily + "'.");
+    }
+
+    matches = resolveFontStretch(rule.stretch, matches);
+    matches = resolveFontStyle(rule.style, matches);
+    matches = resolveFontWeight(rule.weight, matches);
+
+    if (!matches) {
+      // We should've fount
+      throw new Error("Failed to resolve a font for the rule '" + ruleToString(rule) + "'.");
+    }
+
+    return matches;
+  }
+
+  function eatWhiteSpace(input) {
+    return input.trimLeft();
+  }
+
+  function parseQuotedFontFamily(input, quote) {
+    var index = 0;
+
+    while (index < input.length) {
+      var current = input.charAt(index);
+
+      if (current === quote) {
+        return [input.substring(0, index), input.substring(index + 1)];
+      }
+
+      index += 1;
+    } // Unexpected end of input
+
+
+    return null;
+  }
+
+  function parseNonQuotedFontFamily(input) {
+    // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+    //
+    // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.
+    //
+    // Breakdown of regexp:
+    // -[a-z_]     - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit
+    // [a-z_]      - allow a-z and underscore at beginning of input
+    // [a-z0-9_-]* - after that, anything goes
+    var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i); // non quoted value contains illegal characters
+
+    if (match === null) {
+      return null;
+    }
+
+    return [match[0], input.substring(match[0].length)];
+  }
+
+  var defaultFont = ["times"];
+  function parseFontFamily(input) {
+    var result = [];
+    var ch, parsed;
+    var remaining = input.trim();
+
+    if (remaining === "") {
+      return defaultFont;
+    }
+
+    if (remaining in systemFonts) {
+      return [systemFonts[remaining]];
+    }
+
+    while (remaining !== "") {
+      parsed = null;
+      remaining = eatWhiteSpace(remaining);
+      ch = remaining.charAt(0);
+
+      switch (ch) {
+        case '"':
+        case "'":
+          parsed = parseQuotedFontFamily(remaining.substring(1), ch);
+          break;
+
+        default:
+          parsed = parseNonQuotedFontFamily(remaining);
+          break;
+      }
+
+      if (parsed === null) {
+        return defaultFont;
+      }
+
+      result.push(parsed[0]);
+      remaining = eatWhiteSpace(parsed[1]); // We expect end of input or a comma separator here
+
+      if (remaining !== "" && remaining.charAt(0) !== ",") {
+        return defaultFont;
+      }
+
+      remaining = remaining.replace(/^,/, "");
+    }
+
+    return result;
+  }
+
+  /**
+   * This plugin mimics the HTML5 CanvasRenderingContext2D.
+   *
+   * The goal is to provide a way for current canvas implementations to print directly to a PDF.
+   *
+   * @name context2d
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    var ContextLayer = function ContextLayer(ctx) {
+      ctx = ctx || {};
+      this.isStrokeTransparent = ctx.isStrokeTransparent || false;
+      this.strokeOpacity = ctx.strokeOpacity || 1;
+      this.strokeStyle = ctx.strokeStyle || "#000000";
+      this.fillStyle = ctx.fillStyle || "#000000";
+      this.isFillTransparent = ctx.isFillTransparent || false;
+      this.fillOpacity = ctx.fillOpacity || 1;
+      this.font = ctx.font || "10px sans-serif";
+      this.textBaseline = ctx.textBaseline || "alphabetic";
+      this.textAlign = ctx.textAlign || "left";
+      this.lineWidth = ctx.lineWidth || 1;
+      this.lineJoin = ctx.lineJoin || "miter";
+      this.lineCap = ctx.lineCap || "butt";
+      this.path = ctx.path || [];
+      this.transform = typeof ctx.transform !== "undefined" ? ctx.transform.clone() : new Matrix();
+      this.globalCompositeOperation = ctx.globalCompositeOperation || "normal";
+      this.globalAlpha = ctx.globalAlpha || 1.0;
+      this.clip_path = ctx.clip_path || [];
+      this.currentPoint = ctx.currentPoint || new Point();
+      this.miterLimit = ctx.miterLimit || 10.0;
+      this.lastPoint = ctx.lastPoint || new Point();
+      this.lineDashOffset = ctx.lineDashOffset || 0.0;
+      this.lineDash = ctx.lineDash || [];
+      this.margin = ctx.margin || [0, 0, 0, 0];
+      this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;
+      this.ignoreClearRect = typeof ctx.ignoreClearRect === "boolean" ? ctx.ignoreClearRect : true;
+      return this;
+    }; //stub
+
+
+    var f2, getHorizontalCoordinateString, getVerticalCoordinateString, getHorizontalCoordinate, getVerticalCoordinate, Point, Rectangle, Matrix, _ctx;
+
+    jsPDFAPI.events.push(["initialized", function () {
+      this.context2d = new Context2D(this);
+      f2 = this.internal.f2;
+      getHorizontalCoordinateString = this.internal.getCoordinateString;
+      getVerticalCoordinateString = this.internal.getVerticalCoordinateString;
+      getHorizontalCoordinate = this.internal.getHorizontalCoordinate;
+      getVerticalCoordinate = this.internal.getVerticalCoordinate;
+      Point = this.internal.Point;
+      Rectangle = this.internal.Rectangle;
+      Matrix = this.internal.Matrix;
+      _ctx = new ContextLayer();
+    }]);
+
+    var Context2D = function Context2D(pdf) {
+      Object.defineProperty(this, "canvas", {
+        get: function get() {
+          return {
+            parentNode: false,
+            style: false
+          };
+        }
+      });
+      var _pdf = pdf;
+      Object.defineProperty(this, "pdf", {
+        get: function get() {
+          return _pdf;
+        }
+      });
+      var _pageWrapXEnabled = false;
+      /**
+       * @name pageWrapXEnabled
+       * @type {boolean}
+       * @default false
+       */
+
+      Object.defineProperty(this, "pageWrapXEnabled", {
+        get: function get() {
+          return _pageWrapXEnabled;
+        },
+        set: function set(value) {
+          _pageWrapXEnabled = Boolean(value);
+        }
+      });
+      var _pageWrapYEnabled = false;
+      /**
+       * @name pageWrapYEnabled
+       * @type {boolean}
+       * @default true
+       */
+
+      Object.defineProperty(this, "pageWrapYEnabled", {
+        get: function get() {
+          return _pageWrapYEnabled;
+        },
+        set: function set(value) {
+          _pageWrapYEnabled = Boolean(value);
+        }
+      });
+      var _posX = 0;
+      /**
+       * @name posX
+       * @type {number}
+       * @default 0
+       */
+
+      Object.defineProperty(this, "posX", {
+        get: function get() {
+          return _posX;
+        },
+        set: function set(value) {
+          if (!isNaN(value)) {
+            _posX = value;
+          }
+        }
+      });
+      var _posY = 0;
+      /**
+       * @name posY
+       * @type {number}
+       * @default 0
+       */
+
+      Object.defineProperty(this, "posY", {
+        get: function get() {
+          return _posY;
+        },
+        set: function set(value) {
+          if (!isNaN(value)) {
+            _posY = value;
+          }
+        }
+      });
+      /**
+       * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.
+       * @name margin
+       * @type {number|number[]}
+       * @default [0, 0, 0, 0]
+       */
+
+      Object.defineProperty(this, "margin", {
+        get: function get() {
+          return _ctx.margin;
+        },
+        set: function set(value) {
+          var margin;
+
+          if (typeof value === "number") {
+            margin = [value, value, value, value];
+          } else {
+            margin = new Array(4);
+            margin[0] = value[0];
+            margin[1] = value.length >= 2 ? value[1] : margin[0];
+            margin[2] = value.length >= 3 ? value[2] : margin[0];
+            margin[3] = value.length >= 4 ? value[3] : margin[1];
+          }
+
+          _ctx.margin = margin;
+        }
+      });
+      var _autoPaging = false;
+      /**
+       * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the
+       * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new
+       * pages if required.
+       *
+       * Context2d supports different modes:
+       * <ul>
+       * <li>
+       *   <code>false</code>: Auto paging is disabled.
+       * </li>
+       * <li>
+       *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly
+       *   slice text in half, making it difficult to read.
+       * </li>
+       * <li>
+       *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting
+       *   mostly of a single column of text.
+       * </li>
+       * </ul>
+       * @name Context2D#autoPaging
+       * @type {boolean|"slice"|"text"}
+       * @default false
+       */
+
+      Object.defineProperty(this, "autoPaging", {
+        get: function get() {
+          return _autoPaging;
+        },
+        set: function set(value) {
+          _autoPaging = value;
+        }
+      });
+      var lastBreak = 0;
+      /**
+       * @name lastBreak
+       * @type {number}
+       * @default 0
+       */
+
+      Object.defineProperty(this, "lastBreak", {
+        get: function get() {
+          return lastBreak;
+        },
+        set: function set(value) {
+          lastBreak = value;
+        }
+      });
+      var pageBreaks = [];
+      /**
+       * Y Position of page breaks.
+       * @name pageBreaks
+       * @type {number}
+       * @default 0
+       */
+
+      Object.defineProperty(this, "pageBreaks", {
+        get: function get() {
+          return pageBreaks;
+        },
+        set: function set(value) {
+          pageBreaks = value;
+        }
+      });
+      /**
+       * @name ctx
+       * @type {object}
+       * @default {}
+       */
+
+      Object.defineProperty(this, "ctx", {
+        get: function get() {
+          return _ctx;
+        },
+        set: function set(value) {
+          if (value instanceof ContextLayer) {
+            _ctx = value;
+          }
+        }
+      });
+      /**
+       * @name path
+       * @type {array}
+       * @default []
+       */
+
+      Object.defineProperty(this, "path", {
+        get: function get() {
+          return _ctx.path;
+        },
+        set: function set(value) {
+          _ctx.path = value;
+        }
+      });
+      /**
+       * @name ctxStack
+       * @type {array}
+       * @default []
+       */
+
+      var _ctxStack = [];
+      Object.defineProperty(this, "ctxStack", {
+        get: function get() {
+          return _ctxStack;
+        },
+        set: function set(value) {
+          _ctxStack = value;
+        }
+      });
+      /**
+       * Sets or returns the color, gradient, or pattern used to fill the drawing
+       *
+       * @name fillStyle
+       * @default #000000
+       * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />
+       * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />
+       * A pattern object to use to fill the drawing (not supported by context2d)
+       */
+
+      Object.defineProperty(this, "fillStyle", {
+        get: function get() {
+          return this.ctx.fillStyle;
+        },
+        set: function set(value) {
+          var rgba;
+          rgba = getRGBA(value);
+          this.ctx.fillStyle = rgba.style;
+          this.ctx.isFillTransparent = rgba.a === 0;
+          this.ctx.fillOpacity = rgba.a;
+          this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, {
+            a: rgba.a
+          });
+          this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, {
+            a: rgba.a
+          });
+        }
+      });
+      /**
+       * Sets or returns the color, gradient, or pattern used for strokes
+       *
+       * @name strokeStyle
+       * @default #000000
+       * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)
+       * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)
+       * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)
+       */
+
+      Object.defineProperty(this, "strokeStyle", {
+        get: function get() {
+          return this.ctx.strokeStyle;
+        },
+        set: function set(value) {
+          var rgba = getRGBA(value);
+          this.ctx.strokeStyle = rgba.style;
+          this.ctx.isStrokeTransparent = rgba.a === 0;
+          this.ctx.strokeOpacity = rgba.a;
+
+          if (rgba.a === 0) {
+            this.pdf.setDrawColor(255, 255, 255);
+          } else if (rgba.a === 1) {
+            this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);
+          } else {
+            this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);
+          }
+        }
+      });
+      /**
+       * Sets or returns the style of the end caps for a line
+       *
+       * @name lineCap
+       * @default butt
+       * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line <br/>
+       * round A rounded end cap is added to each end of the line<br/>
+       * square A square end cap is added to each end of the line<br/>
+       */
+
+      Object.defineProperty(this, "lineCap", {
+        get: function get() {
+          return this.ctx.lineCap;
+        },
+        set: function set(value) {
+          if (["butt", "round", "square"].indexOf(value) !== -1) {
+            this.ctx.lineCap = value;
+            this.pdf.setLineCap(value);
+          }
+        }
+      });
+      /**
+       * Sets or returns the current line width
+       *
+       * @name lineWidth
+       * @default 1
+       * @property {number} lineWidth The current line width, in pixels
+       */
+
+      Object.defineProperty(this, "lineWidth", {
+        get: function get() {
+          return this.ctx.lineWidth;
+        },
+        set: function set(value) {
+          if (!isNaN(value)) {
+            this.ctx.lineWidth = value;
+            this.pdf.setLineWidth(value);
+          }
+        }
+      });
+      /**
+       * Sets or returns the type of corner created, when two lines meet
+       */
+
+      Object.defineProperty(this, "lineJoin", {
+        get: function get() {
+          return this.ctx.lineJoin;
+        },
+        set: function set(value) {
+          if (["bevel", "round", "miter"].indexOf(value) !== -1) {
+            this.ctx.lineJoin = value;
+            this.pdf.setLineJoin(value);
+          }
+        }
+      });
+      /**
+       * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.
+       *
+       * @name miterLimit
+       * @default 10
+       */
+
+      Object.defineProperty(this, "miterLimit", {
+        get: function get() {
+          return this.ctx.miterLimit;
+        },
+        set: function set(value) {
+          if (!isNaN(value)) {
+            this.ctx.miterLimit = value;
+            this.pdf.setMiterLimit(value);
+          }
+        }
+      });
+      Object.defineProperty(this, "textBaseline", {
+        get: function get() {
+          return this.ctx.textBaseline;
+        },
+        set: function set(value) {
+          this.ctx.textBaseline = value;
+        }
+      });
+      Object.defineProperty(this, "textAlign", {
+        get: function get() {
+          return this.ctx.textAlign;
+        },
+        set: function set(value) {
+          if (["right", "end", "center", "left", "start"].indexOf(value) !== -1) {
+            this.ctx.textAlign = value;
+          }
+        }
+      });
+      var _fontFaceMap = null;
+
+      function getFontFaceMap(pdf, fontFaces) {
+        if (_fontFaceMap === null) {
+          var fontMap = pdf.getFontList();
+          var convertedFontFaces = convertToFontFaces(fontMap);
+          _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));
+        }
+
+        return _fontFaceMap;
+      }
+
+      function convertToFontFaces(fontMap) {
+        var fontFaces = [];
+        Object.keys(fontMap).forEach(function (family) {
+          var styles = fontMap[family];
+          styles.forEach(function (style) {
+            var fontFace = null;
+
+            switch (style) {
+              case "bold":
+                fontFace = {
+                  family: family,
+                  weight: "bold"
+                };
+                break;
+
+              case "italic":
+                fontFace = {
+                  family: family,
+                  style: "italic"
+                };
+                break;
+
+              case "bolditalic":
+                fontFace = {
+                  family: family,
+                  weight: "bold",
+                  style: "italic"
+                };
+                break;
+
+              case "":
+              case "normal":
+                fontFace = {
+                  family: family
+                };
+                break;
+            } // If font-face is still null here, it is a font with some styling we don't recognize and
+            // cannot map or it is a font added via the fontFaces option of .html().
+
+
+            if (fontFace !== null) {
+              fontFace.ref = {
+                name: family,
+                style: style
+              };
+              fontFaces.push(fontFace);
+            }
+          });
+        });
+        return fontFaces;
+      }
+
+      var _fontFaces = null;
+      /**
+       * A map of available font-faces, as passed in the options of
+       * .html(). If set a limited implementation of the font style matching
+       * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm
+       * will be used. If not set it will fallback to previous behavior.
+       */
+
+      Object.defineProperty(this, "fontFaces", {
+        get: function get() {
+          return _fontFaces;
+        },
+        set: function set(value) {
+          _fontFaceMap = null;
+          _fontFaces = value;
+        }
+      });
+      Object.defineProperty(this, "font", {
+        get: function get() {
+          return this.ctx.font;
+        },
+        set: function set(value) {
+          this.ctx.font = value;
+          var rx, matches; //source: https://stackoverflow.com/a/10136041
+          // eslint-disable-next-line no-useless-escape
+
+          rx = /^\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;
+          matches = rx.exec(value);
+
+          if (matches !== null) {
+            var fontStyle = matches[1];
+            var fontVariant = matches[2];
+            var fontWeight = matches[3];
+            var fontSize = matches[4];
+            var lineHeight = matches[5];
+            var fontFamily = matches[6];
+          } else {
+            return;
+          }
+
+          var rxFontSize = /^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;
+          var fontSizeUnit = rxFontSize.exec(fontSize)[2];
+
+          if ("px" === fontSizeUnit) {
+            fontSize = Math.floor(parseFloat(fontSize) * this.pdf.internal.scaleFactor);
+          } else if ("em" === fontSizeUnit) {
+            fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());
+          } else {
+            fontSize = Math.floor(parseFloat(fontSize) * this.pdf.internal.scaleFactor);
+          }
+
+          this.pdf.setFontSize(fontSize);
+          var parts = parseFontFamily(fontFamily);
+
+          if (this.fontFaces) {
+            var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);
+            var rules = parts.map(function (ff) {
+              return {
+                family: ff,
+                stretch: "normal",
+                // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)
+                weight: fontWeight,
+                style: fontStyle
+              };
+            });
+            var font = resolveFontFace(fontFaceMap, rules);
+            this.pdf.setFont(font.ref.name, font.ref.style);
+            return;
+          }
+
+          var style = "";
+
+          if (fontWeight === "bold" || parseInt(fontWeight, 10) >= 700 || fontStyle === "bold") {
+            style = "bold";
+          }
+
+          if (fontStyle === "italic") {
+            style += "italic";
+          }
+
+          if (style.length === 0) {
+            style = "normal";
+          }
+
+          var jsPdfFontName = "";
+          var fallbackFonts = {
+            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"
+          };
+
+          for (var i = 0; i < parts.length; i++) {
+            if (this.pdf.internal.getFont(parts[i], style, {
+              noFallback: true,
+              disableWarning: true
+            }) !== undefined) {
+              jsPdfFontName = parts[i];
+              break;
+            } else if (style === "bolditalic" && this.pdf.internal.getFont(parts[i], "bold", {
+              noFallback: true,
+              disableWarning: true
+            }) !== undefined) {
+              jsPdfFontName = parts[i];
+              style = "bold";
+            } else if (this.pdf.internal.getFont(parts[i], "normal", {
+              noFallback: true,
+              disableWarning: true
+            }) !== undefined) {
+              jsPdfFontName = parts[i];
+              style = "normal";
+              break;
+            }
+          }
+
+          if (jsPdfFontName === "") {
+            for (var j = 0; j < parts.length; j++) {
+              if (fallbackFonts[parts[j]]) {
+                jsPdfFontName = fallbackFonts[parts[j]];
+                break;
+              }
+            }
+          }
+
+          jsPdfFontName = jsPdfFontName === "" ? "Times" : jsPdfFontName;
+          this.pdf.setFont(jsPdfFontName, style);
+        }
+      });
+      Object.defineProperty(this, "globalCompositeOperation", {
+        get: function get() {
+          return this.ctx.globalCompositeOperation;
+        },
+        set: function set(value) {
+          this.ctx.globalCompositeOperation = value;
+        }
+      });
+      Object.defineProperty(this, "globalAlpha", {
+        get: function get() {
+          return this.ctx.globalAlpha;
+        },
+        set: function set(value) {
+          this.ctx.globalAlpha = value;
+        }
+      });
+      /**
+       * A float specifying the amount of the line dash offset. The default value is 0.0.
+       *
+       * @name lineDashOffset
+       * @default 0.0
+       */
+
+      Object.defineProperty(this, "lineDashOffset", {
+        get: function get() {
+          return this.ctx.lineDashOffset;
+        },
+        set: function set(value) {
+          this.ctx.lineDashOffset = value;
+          setLineDash.call(this);
+        }
+      }); // Not HTML API
+
+      Object.defineProperty(this, "lineDash", {
+        get: function get() {
+          return this.ctx.lineDash;
+        },
+        set: function set(value) {
+          this.ctx.lineDash = value;
+          setLineDash.call(this);
+        }
+      }); // Not HTML API
+
+      Object.defineProperty(this, "ignoreClearRect", {
+        get: function get() {
+          return this.ctx.ignoreClearRect;
+        },
+        set: function set(value) {
+          this.ctx.ignoreClearRect = Boolean(value);
+        }
+      });
+    };
+    /**
+     * Sets the line dash pattern used when stroking lines.
+     * @name setLineDash
+     * @function
+     * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.
+     */
+
+
+    Context2D.prototype.setLineDash = function (dashArray) {
+      this.lineDash = dashArray;
+    };
+    /**
+     * gets the current line dash pattern.
+     * @name getLineDash
+     * @function
+     * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].
+     */
+
+
+    Context2D.prototype.getLineDash = function () {
+      if (this.lineDash.length % 2) {
+        // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value
+        return this.lineDash.concat(this.lineDash);
+      } else {
+        // The copied value is returned to prevent contamination from outside.
+        return this.lineDash.slice();
+      }
+    };
+
+    Context2D.prototype.fill = function () {
+      pathPreProcess.call(this, "fill", false);
+    };
+    /**
+     * Actually draws the path you have defined
+     *
+     * @name stroke
+     * @function
+     * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.
+     */
+
+
+    Context2D.prototype.stroke = function () {
+      pathPreProcess.call(this, "stroke", false);
+    };
+    /**
+     * Begins a path, or resets the current
+     *
+     * @name beginPath
+     * @function
+     * @description The beginPath() method begins a path, or resets the current path.
+     */
+
+
+    Context2D.prototype.beginPath = function () {
+      this.path = [{
+        type: "begin"
+      }];
+    };
+    /**
+     * Moves the path to the specified point in the canvas, without creating a line
+     *
+     * @name moveTo
+     * @function
+     * @param x {Number} The x-coordinate of where to move the path to
+     * @param y {Number} The y-coordinate of where to move the path to
+     */
+
+
+    Context2D.prototype.moveTo = function (x, y) {
+      if (isNaN(x) || isNaN(y)) {
+        console.error("jsPDF.context2d.moveTo: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.moveTo");
+      }
+
+      var pt = this.ctx.transform.applyToPoint(new Point(x, y));
+      this.path.push({
+        type: "mt",
+        x: pt.x,
+        y: pt.y
+      });
+      this.ctx.lastPoint = new Point(x, y);
+    };
+    /**
+     * Creates a path from the current point back to the starting point
+     *
+     * @name closePath
+     * @function
+     * @description The closePath() method creates a path from the current point back to the starting point.
+     */
+
+
+    Context2D.prototype.closePath = function () {
+      var pathBegin = new Point(0, 0);
+      var i = 0;
+
+      for (i = this.path.length - 1; i !== -1; i--) {
+        if (this.path[i].type === "begin") {
+          if (_typeof(this.path[i + 1]) === "object" && typeof this.path[i + 1].x === "number") {
+            pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);
+            break;
+          }
+        }
+      }
+
+      this.path.push({
+        type: "close"
+      });
+      this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);
+    };
+    /**
+     * Adds a new point and creates a line to that point from the last specified point in the canvas
+     *
+     * @name lineTo
+     * @function
+     * @param x The x-coordinate of where to create the line to
+     * @param y The y-coordinate of where to create the line to
+     * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).
+     */
+
+
+    Context2D.prototype.lineTo = function (x, y) {
+      if (isNaN(x) || isNaN(y)) {
+        console.error("jsPDF.context2d.lineTo: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.lineTo");
+      }
+
+      var pt = this.ctx.transform.applyToPoint(new Point(x, y));
+      this.path.push({
+        type: "lt",
+        x: pt.x,
+        y: pt.y
+      });
+      this.ctx.lastPoint = new Point(pt.x, pt.y);
+    };
+    /**
+     * Clips a region of any shape and size from the original canvas
+     *
+     * @name clip
+     * @function
+     * @description The clip() method clips a region of any shape and size from the original canvas.
+     */
+
+
+    Context2D.prototype.clip = function () {
+      this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));
+      pathPreProcess.call(this, null, true);
+    };
+    /**
+     * Creates a cubic Bézier curve
+     *
+     * @name quadraticCurveTo
+     * @function
+     * @param cpx {Number} The x-coordinate of the Bézier control point
+     * @param cpy {Number} The y-coordinate of the Bézier control point
+     * @param x {Number} The x-coordinate of the ending point
+     * @param y {Number} The y-coordinate of the ending point
+     * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.<br /><br /> A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.
+     */
+
+
+    Context2D.prototype.quadraticCurveTo = function (cpx, cpy, x, y) {
+      if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {
+        console.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");
+      }
+
+      var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));
+      var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));
+      this.path.push({
+        type: "qct",
+        x1: pt1.x,
+        y1: pt1.y,
+        x: pt0.x,
+        y: pt0.y
+      });
+      this.ctx.lastPoint = new Point(pt0.x, pt0.y);
+    };
+    /**
+     * Creates a cubic Bézier curve
+     *
+     * @name bezierCurveTo
+     * @function
+     * @param cp1x {Number} The x-coordinate of the first Bézier control point
+     * @param cp1y {Number} The y-coordinate of the first Bézier control point
+     * @param cp2x {Number} The x-coordinate of the second Bézier control point
+     * @param cp2y {Number} The y-coordinate of the second Bézier control point
+     * @param x {Number} The x-coordinate of the ending point
+     * @param y {Number} The y-coordinate of the ending point
+     * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve. <br /><br />A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve.  The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.
+     */
+
+
+    Context2D.prototype.bezierCurveTo = function (cp1x, cp1y, cp2x, cp2y, x, y) {
+      if (isNaN(x) || isNaN(y) || isNaN(cp1x) || isNaN(cp1y) || isNaN(cp2x) || isNaN(cp2y)) {
+        console.error("jsPDF.context2d.bezierCurveTo: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");
+      }
+
+      var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));
+      var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));
+      var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));
+      this.path.push({
+        type: "bct",
+        x1: pt1.x,
+        y1: pt1.y,
+        x2: pt2.x,
+        y2: pt2.y,
+        x: pt0.x,
+        y: pt0.y
+      });
+      this.ctx.lastPoint = new Point(pt0.x, pt0.y);
+    };
+    /**
+     * Creates an arc/curve (used to create circles, or parts of circles)
+     *
+     * @name arc
+     * @function
+     * @param x {Number} The x-coordinate of the center of the circle
+     * @param y {Number} The y-coordinate of the center of the circle
+     * @param radius {Number} The radius of the circle
+     * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)
+     * @param endAngle {Number} The ending angle, in radians
+     * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.
+     * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).
+     */
+
+
+    Context2D.prototype.arc = function (x, y, radius, startAngle, endAngle, counterclockwise) {
+      if (isNaN(x) || isNaN(y) || isNaN(radius) || isNaN(startAngle) || isNaN(endAngle)) {
+        console.error("jsPDF.context2d.arc: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.arc");
+      }
+
+      counterclockwise = Boolean(counterclockwise);
+
+      if (!this.ctx.transform.isIdentity) {
+        var xpt = this.ctx.transform.applyToPoint(new Point(x, y));
+        x = xpt.x;
+        y = xpt.y;
+        var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));
+        var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));
+        radius = Math.sqrt(Math.pow(x_radPt.x - x_radPt0.x, 2) + Math.pow(x_radPt.y - x_radPt0.y, 2));
+      }
+
+      if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {
+        startAngle = 0;
+        endAngle = 2 * Math.PI;
+      }
+
+      this.path.push({
+        type: "arc",
+        x: x,
+        y: y,
+        radius: radius,
+        startAngle: startAngle,
+        endAngle: endAngle,
+        counterclockwise: counterclockwise
+      }); // this.ctx.lastPoint(new Point(pt.x,pt.y));
+    };
+    /**
+     * Creates an arc/curve between two tangents
+     *
+     * @name arcTo
+     * @function
+     * @param x1 {Number} The x-coordinate of the first tangent
+     * @param y1 {Number} The y-coordinate of the first tangent
+     * @param x2 {Number} The x-coordinate of the second tangent
+     * @param y2 {Number} The y-coordinate of the second tangent
+     * @param radius The radius of the arc
+     * @description The arcTo() method creates an arc/curve between two tangents on the canvas.
+     */
+    // eslint-disable-next-line no-unused-vars
+
+
+    Context2D.prototype.arcTo = function (x1, y1, x2, y2, radius) {
+      throw new Error("arcTo not implemented.");
+    };
+    /**
+     * Creates a rectangle
+     *
+     * @name rect
+     * @function
+     * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+     * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+     * @param w {Number} The width of the rectangle, in pixels
+     * @param h {Number} The height of the rectangle, in pixels
+     * @description The rect() method creates a rectangle.
+     */
+
+
+    Context2D.prototype.rect = function (x, y, w, h) {
+      if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+        console.error("jsPDF.context2d.rect: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.rect");
+      }
+
+      this.moveTo(x, y);
+      this.lineTo(x + w, y);
+      this.lineTo(x + w, y + h);
+      this.lineTo(x, y + h);
+      this.lineTo(x, y);
+      this.lineTo(x + w, y);
+      this.lineTo(x, y);
+    };
+    /**
+     * Draws a "filled" rectangle
+     *
+     * @name fillRect
+     * @function
+     * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+     * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+     * @param w {Number} The width of the rectangle, in pixels
+     * @param h {Number} The height of the rectangle, in pixels
+     * @description The fillRect() method draws a "filled" rectangle. The default color of the fill is black.
+     */
+
+
+    Context2D.prototype.fillRect = function (x, y, w, h) {
+      if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+        console.error("jsPDF.context2d.fillRect: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.fillRect");
+      }
+
+      if (isFillTransparent.call(this)) {
+        return;
+      }
+
+      var tmp = {};
+
+      if (this.lineCap !== "butt") {
+        tmp.lineCap = this.lineCap;
+        this.lineCap = "butt";
+      }
+
+      if (this.lineJoin !== "miter") {
+        tmp.lineJoin = this.lineJoin;
+        this.lineJoin = "miter";
+      }
+
+      this.beginPath();
+      this.rect(x, y, w, h);
+      this.fill();
+
+      if (tmp.hasOwnProperty("lineCap")) {
+        this.lineCap = tmp.lineCap;
+      }
+
+      if (tmp.hasOwnProperty("lineJoin")) {
+        this.lineJoin = tmp.lineJoin;
+      }
+    };
+    /**
+     *     Draws a rectangle (no fill)
+     *
+     * @name strokeRect
+     * @function
+     * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+     * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+     * @param w {Number} The width of the rectangle, in pixels
+     * @param h {Number} The height of the rectangle, in pixels
+     * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.
+     */
+
+
+    Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {
+      if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+        console.error("jsPDF.context2d.strokeRect: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");
+      }
+
+      if (isStrokeTransparent.call(this)) {
+        return;
+      }
+
+      this.beginPath();
+      this.rect(x, y, w, h);
+      this.stroke();
+    };
+    /**
+     * Clears the specified pixels within a given rectangle
+     *
+     * @name clearRect
+     * @function
+     * @param x {Number} The x-coordinate of the upper-left corner of the rectangle
+     * @param y {Number} The y-coordinate of the upper-left corner of the rectangle
+     * @param w {Number} The width of the rectangle to clear, in pixels
+     * @param h {Number} The height of the rectangle to clear, in pixels
+     * @description We cannot clear PDF commands that were already written to PDF, so we use white instead. <br />
+     * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.
+     * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.
+     * This flag is stored in the save/restore context and is managed the same way as other drawing states.
+     *
+     */
+
+
+    Context2D.prototype.clearRect = function (x, y, w, h) {
+      if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {
+        console.error("jsPDF.context2d.clearRect: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.clearRect");
+      }
+
+      if (this.ignoreClearRect) {
+        return;
+      }
+
+      this.fillStyle = "#ffffff";
+      this.fillRect(x, y, w, h);
+    };
+    /**
+     * Saves the state of the current context
+     *
+     * @name save
+     * @function
+     */
+
+
+    Context2D.prototype.save = function (doStackPush) {
+      doStackPush = typeof doStackPush === "boolean" ? doStackPush : true;
+      var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;
+
+      for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {
+        this.pdf.setPage(i + 1);
+        this.pdf.internal.out("q");
+      }
+
+      this.pdf.setPage(tmpPageNumber);
+
+      if (doStackPush) {
+        this.ctx.fontSize = this.pdf.internal.getFontSize();
+        var ctx = new ContextLayer(this.ctx);
+        this.ctxStack.push(this.ctx);
+        this.ctx = ctx;
+      }
+    };
+    /**
+     * Returns previously saved path state and attributes
+     *
+     * @name restore
+     * @function
+     */
+
+
+    Context2D.prototype.restore = function (doStackPop) {
+      doStackPop = typeof doStackPop === "boolean" ? doStackPop : true;
+      var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;
+
+      for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {
+        this.pdf.setPage(i + 1);
+        this.pdf.internal.out("Q");
+      }
+
+      this.pdf.setPage(tmpPageNumber);
+
+      if (doStackPop && this.ctxStack.length !== 0) {
+        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;
+      }
+    };
+    /**
+     * @name toDataURL
+     * @function
+     */
+
+
+    Context2D.prototype.toDataURL = function () {
+      throw new Error("toDataUrl not implemented.");
+    }; //helper functions
+
+    /**
+     * Get the decimal values of r, g, b and a
+     *
+     * @name getRGBA
+     * @function
+     * @private
+     * @ignore
+     */
+
+
+    var getRGBA = function getRGBA(style) {
+      var rxRgb = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/;
+      var rxRgba = /rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/;
+      var rxTransparent = /transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/;
+      var r, g, b, a;
+
+      if (style.isCanvasGradient === true) {
+        style = style.getColor();
+      }
+
+      if (!style) {
+        return {
+          r: 0,
+          g: 0,
+          b: 0,
+          a: 0,
+          style: style
+        };
+      }
+
+      if (rxTransparent.test(style)) {
+        r = 0;
+        g = 0;
+        b = 0;
+        a = 0;
+      } else {
+        var matches = rxRgb.exec(style);
+
+        if (matches !== null) {
+          r = parseInt(matches[1]);
+          g = parseInt(matches[2]);
+          b = parseInt(matches[3]);
+          a = 1;
+        } else {
+          matches = rxRgba.exec(style);
+
+          if (matches !== null) {
+            r = parseInt(matches[1]);
+            g = parseInt(matches[2]);
+            b = parseInt(matches[3]);
+            a = parseFloat(matches[4]);
+          } else {
+            a = 1;
+
+            if (typeof style === "string" && style.charAt(0) !== "#") {
+              var rgbColor = new RGBColor(style);
+
+              if (rgbColor.ok) {
+                style = rgbColor.toHex();
+              } else {
+                style = "#000000";
+              }
+            }
+
+            if (style.length === 4) {
+              r = style.substring(1, 2);
+              r += r;
+              g = style.substring(2, 3);
+              g += g;
+              b = style.substring(3, 4);
+              b += b;
+            } else {
+              r = style.substring(1, 3);
+              g = style.substring(3, 5);
+              b = style.substring(5, 7);
+            }
+
+            r = parseInt(r, 16);
+            g = parseInt(g, 16);
+            b = parseInt(b, 16);
+          }
+        }
+      }
+
+      return {
+        r: r,
+        g: g,
+        b: b,
+        a: a,
+        style: style
+      };
+    };
+    /**
+     * @name isFillTransparent
+     * @function
+     * @private
+     * @ignore
+     * @returns {Boolean}
+     */
+
+
+    var isFillTransparent = function isFillTransparent() {
+      return this.ctx.isFillTransparent || this.globalAlpha == 0;
+    };
+    /**
+     * @name isStrokeTransparent
+     * @function
+     * @private
+     * @ignore
+     * @returns {Boolean}
+     */
+
+
+    var isStrokeTransparent = function isStrokeTransparent() {
+      return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);
+    };
+    /**
+     * Draws "filled" text on the canvas
+     *
+     * @name fillText
+     * @function
+     * @param text {String} Specifies the text that will be written on the canvas
+     * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)
+     * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
+     * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
+     * @description The fillText() method draws filled text on the canvas. The default color of the text is black.
+     */
+
+
+    Context2D.prototype.fillText = function (text, x, y, maxWidth) {
+      if (isNaN(x) || isNaN(y) || typeof text !== "string") {
+        console.error("jsPDF.context2d.fillText: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.fillText");
+      }
+
+      maxWidth = isNaN(maxWidth) ? undefined : maxWidth;
+
+      if (isFillTransparent.call(this)) {
+        return;
+      }
+
+      var degs = rad2deg(this.ctx.transform.rotation); // We only use X axis as scale hint
+
+      var scale = this.ctx.transform.scaleX;
+      putText.call(this, {
+        text: text,
+        x: x,
+        y: y,
+        scale: scale,
+        angle: degs,
+        align: this.textAlign,
+        maxWidth: maxWidth
+      });
+    };
+    /**
+     * Draws text on the canvas (no fill)
+     *
+     * @name strokeText
+     * @function
+     * @param text {String} Specifies the text that will be written on the canvas
+     * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)
+     * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)
+     * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels
+     * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.
+     */
+
+
+    Context2D.prototype.strokeText = function (text, x, y, maxWidth) {
+      if (isNaN(x) || isNaN(y) || typeof text !== "string") {
+        console.error("jsPDF.context2d.strokeText: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.strokeText");
+      }
+
+      if (isStrokeTransparent.call(this)) {
+        return;
+      }
+
+      maxWidth = isNaN(maxWidth) ? undefined : maxWidth;
+      var degs = rad2deg(this.ctx.transform.rotation);
+      var scale = this.ctx.transform.scaleX;
+      putText.call(this, {
+        text: text,
+        x: x,
+        y: y,
+        scale: scale,
+        renderingMode: "stroke",
+        angle: degs,
+        align: this.textAlign,
+        maxWidth: maxWidth
+      });
+    };
+    /**
+     * Returns an object that contains the width of the specified text
+     *
+     * @name measureText
+     * @function
+     * @param text {String} The text to be measured
+     * @description The measureText() method returns an object that contains the width of the specified text, in pixels.
+     * @returns {Number}
+     */
+
+
+    Context2D.prototype.measureText = function (text) {
+      if (typeof text !== "string") {
+        console.error("jsPDF.context2d.measureText: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.measureText");
+      }
+
+      var pdf = this.pdf;
+      var k = this.pdf.internal.scaleFactor;
+      var fontSize = pdf.internal.getFontSize();
+      var txtWidth = pdf.getStringUnitWidth(text) * fontSize / pdf.internal.scaleFactor;
+      txtWidth *= Math.round(k * 96 / 72 * 10000) / 10000;
+
+      var TextMetrics = function TextMetrics(options) {
+        options = options || {};
+
+        var _width = options.width || 0;
+
+        Object.defineProperty(this, "width", {
+          get: function get() {
+            return _width;
+          }
+        });
+        return this;
+      };
+
+      return new TextMetrics({
+        width: txtWidth
+      });
+    }; //Transformations
+
+    /**
+     * Scales the current drawing bigger or smaller
+     *
+     * @name scale
+     * @function
+     * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)
+     * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)
+     * @description The scale() method scales the current drawing, bigger or smaller.
+     */
+
+
+    Context2D.prototype.scale = function (scalewidth, scaleheight) {
+      if (isNaN(scalewidth) || isNaN(scaleheight)) {
+        console.error("jsPDF.context2d.scale: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.scale");
+      }
+
+      var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);
+      this.ctx.transform = this.ctx.transform.multiply(matrix);
+    };
+    /**
+     * Rotates the current drawing
+     *
+     * @name rotate
+     * @function
+     * @param angle {Number} The rotation angle, in radians.
+     * @description To calculate from degrees to radians: degrees*Math.PI/180. <br />
+     * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180
+     */
+
+
+    Context2D.prototype.rotate = function (angle) {
+      if (isNaN(angle)) {
+        console.error("jsPDF.context2d.rotate: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.rotate");
+      }
+
+      var matrix = new Matrix(Math.cos(angle), Math.sin(angle), -Math.sin(angle), Math.cos(angle), 0.0, 0.0);
+      this.ctx.transform = this.ctx.transform.multiply(matrix);
+    };
+    /**
+     * Remaps the (0,0) position on the canvas
+     *
+     * @name translate
+     * @function
+     * @param x {Number} The value to add to horizontal (x) coordinates
+     * @param y {Number} The value to add to vertical (y) coordinates
+     * @description The translate() method remaps the (0,0) position on the canvas.
+     */
+
+
+    Context2D.prototype.translate = function (x, y) {
+      if (isNaN(x) || isNaN(y)) {
+        console.error("jsPDF.context2d.translate: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.translate");
+      }
+
+      var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);
+      this.ctx.transform = this.ctx.transform.multiply(matrix);
+    };
+    /**
+     * Replaces the current transformation matrix for the drawing
+     *
+     * @name transform
+     * @function
+     * @param a {Number} Horizontal scaling
+     * @param b {Number} Horizontal skewing
+     * @param c {Number} Vertical skewing
+     * @param d {Number} Vertical scaling
+     * @param e {Number} Horizontal moving
+     * @param f {Number} Vertical moving
+     * @description Each object on the canvas has a current transformation matrix.<br /><br />The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:<br /><br /><br /><br />a    c    e<br /><br />b    d    f<br /><br />0    0    1<br /><br />In other words, the transform() method lets you scale, rotate, move, and skew the current context.
+     */
+
+
+    Context2D.prototype.transform = function (a, b, c, d, e, f) {
+      if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {
+        console.error("jsPDF.context2d.transform: Invalid arguments", arguments);
+        throw new Error("Invalid arguments passed to jsPDF.context2d.transform");
+      }
+
+      var matrix = new Matrix(a, b, c, d, e, f);
+      this.ctx.transform = this.ctx.transform.multiply(matrix);
+    };
+    /**
+     * Resets the current transform to the identity matrix. Then runs transform()
+     *
+     * @name setTransform
+     * @function
+     * @param a {Number} Horizontal scaling
+     * @param b {Number} Horizontal skewing
+     * @param c {Number} Vertical skewing
+     * @param d {Number} Vertical scaling
+     * @param e {Number} Horizontal moving
+     * @param f {Number} Vertical moving
+     * @description Each object on the canvas has a current transformation matrix. <br /><br />The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.<br /><br />In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.
+     */
+
+
+    Context2D.prototype.setTransform = function (a, b, c, d, e, f) {
+      a = isNaN(a) ? 1 : a;
+      b = isNaN(b) ? 0 : b;
+      c = isNaN(c) ? 0 : c;
+      d = isNaN(d) ? 1 : d;
+      e = isNaN(e) ? 0 : e;
+      f = isNaN(f) ? 0 : f;
+      this.ctx.transform = new Matrix(a, b, c, d, e, f);
+    };
+
+    var hasMargins = function hasMargins() {
+      return this.margin[0] > 0 || this.margin[1] > 0 || this.margin[2] > 0 || this.margin[3] > 0;
+    };
+    /**
+     * Draws an image, canvas, or video onto the canvas
+     *
+     * @function
+     * @param img {} Specifies the image, canvas, or video element to use
+     * @param sx {Number} Optional. The x coordinate where to start clipping
+     * @param sy {Number} Optional. The y coordinate where to start clipping
+     * @param swidth {Number} Optional. The width of the clipped image
+     * @param sheight {Number} Optional. The height of the clipped image
+     * @param x {Number} The x coordinate where to place the image on the canvas
+     * @param y {Number} The y coordinate where to place the image on the canvas
+     * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)
+     * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)
+     */
+
+
+    Context2D.prototype.drawImage = function (img, sx, sy, swidth, sheight, x, y, width, height) {
+      var imageProperties = this.pdf.getImageProperties(img);
+      var factorX = 1;
+      var factorY = 1;
+      var clipFactorX = 1;
+      var clipFactorY = 1;
+
+      if (typeof swidth !== "undefined" && typeof width !== "undefined") {
+        clipFactorX = width / swidth;
+        clipFactorY = height / sheight;
+        factorX = imageProperties.width / swidth * width / swidth;
+        factorY = imageProperties.height / sheight * height / sheight;
+      } //is sx and sy are set and x and y not, set x and y with values of sx and sy
+
+
+      if (typeof x === "undefined") {
+        x = sx;
+        y = sy;
+        sx = 0;
+        sy = 0;
+      }
+
+      if (typeof swidth !== "undefined" && typeof width === "undefined") {
+        width = swidth;
+        height = sheight;
+      }
+
+      if (typeof swidth === "undefined" && typeof width === "undefined") {
+        width = imageProperties.width;
+        height = imageProperties.height;
+      }
+
+      var decomposedTransformationMatrix = this.ctx.transform.decompose();
+      var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);
+      var matrix = new Matrix();
+      matrix = matrix.multiply(decomposedTransformationMatrix.translate);
+      matrix = matrix.multiply(decomposedTransformationMatrix.skew);
+      matrix = matrix.multiply(decomposedTransformationMatrix.scale);
+      var xRect = matrix.applyToRectangle(new Rectangle(x - sx * clipFactorX, y - sy * clipFactorY, swidth * factorX, sheight * factorY));
+      var pageArray = getPagesByPath.call(this, xRect);
+      var pages = [];
+
+      for (var ii = 0; ii < pageArray.length; ii += 1) {
+        if (pages.indexOf(pageArray[ii]) === -1) {
+          pages.push(pageArray[ii]);
+        }
+      }
+
+      sortPages(pages);
+      var clipPath;
+
+      if (this.autoPaging) {
+        var min = pages[0];
+        var max = pages[pages.length - 1];
+
+        for (var i = min; i < max + 1; i++) {
+          this.pdf.setPage(i);
+          var pageWidthMinusMargins = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];
+          var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];
+          var firstPageHeight = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2];
+          var pageHeightMinusMargins = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
+          var previousPageHeightSum = i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;
+
+          if (this.ctx.clip_path.length !== 0) {
+            var tmpPaths = this.path;
+            clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));
+            this.path = pathPositionRedo(clipPath, this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset);
+            drawPaths.call(this, "fill", true);
+            this.path = tmpPaths;
+          }
+
+          var tmpRect = JSON.parse(JSON.stringify(xRect));
+          tmpRect = pathPositionRedo([tmpRect], this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset)[0];
+          var needsClipping = (i > min || i < max) && hasMargins.call(this);
+
+          if (needsClipping) {
+            this.pdf.saveGraphicsState();
+            this.pdf.rect(this.margin[3], this.margin[0], pageWidthMinusMargins, pageHeightMinusMargins, null).clip().discardPath();
+          }
+
+          this.pdf.addImage(img, "JPEG", tmpRect.x, tmpRect.y, tmpRect.w, tmpRect.h, null, null, angle);
+
+          if (needsClipping) {
+            this.pdf.restoreGraphicsState();
+          }
+        }
+      } else {
+        this.pdf.addImage(img, "JPEG", xRect.x, xRect.y, xRect.w, xRect.h, null, null, angle);
+      }
+    };
+
+    var getPagesByPath = function getPagesByPath(path, pageWrapX, pageWrapY) {
+      var result = [];
+      pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;
+      pageWrapY = pageWrapY || this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
+      var yOffset = this.posY + this.ctx.prevPageLastElemOffset;
+
+      switch (path.type) {
+        default:
+        case "mt":
+        case "lt":
+          result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);
+          break;
+
+        case "arc":
+          result.push(Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1);
+          result.push(Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1);
+          break;
+
+        case "qct":
+          var rectOfQuadraticCurve = getQuadraticCurveBoundary(this.ctx.lastPoint.x, this.ctx.lastPoint.y, path.x1, path.y1, path.x, path.y);
+          result.push(Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1);
+          result.push(Math.floor((rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) / pageWrapY) + 1);
+          break;
+
+        case "bct":
+          var rectOfBezierCurve = getBezierCurveBoundary(this.ctx.lastPoint.x, this.ctx.lastPoint.y, path.x1, path.y1, path.x2, path.y2, path.x, path.y);
+          result.push(Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1);
+          result.push(Math.floor((rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY) + 1);
+          break;
+
+        case "rect":
+          result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);
+          result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);
+      }
+
+      for (var i = 0; i < result.length; i += 1) {
+        while (this.pdf.internal.getNumberOfPages() < result[i]) {
+          addPage.call(this);
+        }
+      }
+
+      return result;
+    };
+
+    var addPage = function addPage() {
+      var fillStyle = this.fillStyle;
+      var strokeStyle = this.strokeStyle;
+      var font = this.font;
+      var lineCap = this.lineCap;
+      var lineWidth = this.lineWidth;
+      var lineJoin = this.lineJoin;
+      this.pdf.addPage();
+      this.fillStyle = fillStyle;
+      this.strokeStyle = strokeStyle;
+      this.font = font;
+      this.lineCap = lineCap;
+      this.lineWidth = lineWidth;
+      this.lineJoin = lineJoin;
+    };
+
+    var pathPositionRedo = function pathPositionRedo(paths, x, y) {
+      for (var i = 0; i < paths.length; i++) {
+        switch (paths[i].type) {
+          case "bct":
+            paths[i].x2 += x;
+            paths[i].y2 += y;
+
+          case "qct":
+            paths[i].x1 += x;
+            paths[i].y1 += y;
+
+          case "mt":
+          case "lt":
+          case "arc":
+          default:
+            paths[i].x += x;
+            paths[i].y += y;
+        }
+      }
+
+      return paths;
+    };
+
+    var sortPages = function sortPages(pages) {
+      return pages.sort(function (a, b) {
+        return a - b;
+      });
+    };
+
+    var pathPreProcess = function pathPreProcess(rule, isClip) {
+      var fillStyle = this.fillStyle;
+      var strokeStyle = this.strokeStyle;
+      var lineCap = this.lineCap;
+      var oldLineWidth = this.lineWidth;
+      var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);
+      var lineJoin = this.lineJoin;
+      var origPath = JSON.parse(JSON.stringify(this.path));
+      var xPath = JSON.parse(JSON.stringify(this.path));
+      var clipPath;
+      var tmpPath;
+      var pages = [];
+
+      for (var i = 0; i < xPath.length; i++) {
+        if (typeof xPath[i].x !== "undefined") {
+          var page = getPagesByPath.call(this, xPath[i]);
+
+          for (var ii = 0; ii < page.length; ii += 1) {
+            if (pages.indexOf(page[ii]) === -1) {
+              pages.push(page[ii]);
+            }
+          }
+        }
+      }
+
+      for (var j = 0; j < pages.length; j++) {
+        while (this.pdf.internal.getNumberOfPages() < pages[j]) {
+          addPage.call(this);
+        }
+      }
+
+      sortPages(pages);
+
+      if (this.autoPaging) {
+        var min = pages[0];
+        var max = pages[pages.length - 1];
+
+        for (var k = min; k < max + 1; k++) {
+          this.pdf.setPage(k);
+          this.fillStyle = fillStyle;
+          this.strokeStyle = strokeStyle;
+          this.lineCap = lineCap;
+          this.lineWidth = lineWidth;
+          this.lineJoin = lineJoin;
+          var pageWidthMinusMargins = this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];
+          var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];
+          var firstPageHeight = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2];
+          var pageHeightMinusMargins = this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];
+          var previousPageHeightSum = k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;
+
+          if (this.ctx.clip_path.length !== 0) {
+            var tmpPaths = this.path;
+            clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));
+            this.path = pathPositionRedo(clipPath, this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset);
+            drawPaths.call(this, rule, true);
+            this.path = tmpPaths;
+          }
+
+          tmpPath = JSON.parse(JSON.stringify(origPath));
+          this.path = pathPositionRedo(tmpPath, this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset);
+
+          if (isClip === false || k === 0) {
+            var needsClipping = (k > min || k < max) && hasMargins.call(this);
+
+            if (needsClipping) {
+              this.pdf.saveGraphicsState();
+              this.pdf.rect(this.margin[3], this.margin[0], pageWidthMinusMargins, pageHeightMinusMargins, null).clip().discardPath();
+            }
+
+            drawPaths.call(this, rule, isClip);
+
+            if (needsClipping) {
+              this.pdf.restoreGraphicsState();
+            }
+          }
+
+          this.lineWidth = oldLineWidth;
+        }
+      } else {
+        this.lineWidth = lineWidth;
+        drawPaths.call(this, rule, isClip);
+        this.lineWidth = oldLineWidth;
+      }
+
+      this.path = origPath;
+    };
+    /**
+     * Processes the paths
+     *
+     * @function
+     * @param rule {String}
+     * @param isClip {Boolean}
+     * @private
+     * @ignore
+     */
+
+
+    var drawPaths = function drawPaths(rule, isClip) {
+      if (rule === "stroke" && !isClip && isStrokeTransparent.call(this)) {
+        return;
+      }
+
+      if (rule !== "stroke" && !isClip && isFillTransparent.call(this)) {
+        return;
+      }
+
+      var moves = []; //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;
+
+      var delta;
+      var xPath = this.path;
+
+      for (var i = 0; i < xPath.length; i++) {
+        var pt = xPath[i];
+
+        switch (pt.type) {
+          case "begin":
+            moves.push({
+              begin: true
+            });
+            break;
+
+          case "close":
+            moves.push({
+              close: true
+            });
+            break;
+
+          case "mt":
+            moves.push({
+              start: pt,
+              deltas: [],
+              abs: []
+            });
+            break;
+
+          case "lt":
+            var iii = moves.length;
+
+            if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {
+              delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];
+
+              if (iii > 0) {
+                for (iii; iii >= 0; iii--) {
+                  if (moves[iii - 1].close !== true && moves[iii - 1].begin !== true) {
+                    moves[iii - 1].deltas.push(delta);
+                    moves[iii - 1].abs.push(pt);
+                    break;
+                  }
+                }
+              }
+            }
+
+            break;
+
+          case "bct":
+            delta = [pt.x1 - xPath[i - 1].x, pt.y1 - xPath[i - 1].y, pt.x2 - xPath[i - 1].x, pt.y2 - xPath[i - 1].y, pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];
+            moves[moves.length - 1].deltas.push(delta);
+            break;
+
+          case "qct":
+            var x1 = xPath[i - 1].x + 2.0 / 3.0 * (pt.x1 - xPath[i - 1].x);
+            var y1 = xPath[i - 1].y + 2.0 / 3.0 * (pt.y1 - xPath[i - 1].y);
+            var x2 = pt.x + 2.0 / 3.0 * (pt.x1 - pt.x);
+            var y2 = pt.y + 2.0 / 3.0 * (pt.y1 - pt.y);
+            var x3 = pt.x;
+            var y3 = pt.y;
+            delta = [x1 - xPath[i - 1].x, y1 - xPath[i - 1].y, x2 - xPath[i - 1].x, y2 - xPath[i - 1].y, x3 - xPath[i - 1].x, y3 - xPath[i - 1].y];
+            moves[moves.length - 1].deltas.push(delta);
+            break;
+
+          case "arc":
+            moves.push({
+              deltas: [],
+              abs: [],
+              arc: true
+            });
+
+            if (Array.isArray(moves[moves.length - 1].abs)) {
+              moves[moves.length - 1].abs.push(pt);
+            }
+
+            break;
+        }
+      }
+
+      var style;
+
+      if (!isClip) {
+        if (rule === "stroke") {
+          style = "stroke";
+        } else {
+          style = "fill";
+        }
+      } else {
+        style = null;
+      }
+
+      var began = false;
+
+      for (var k = 0; k < moves.length; k++) {
+        if (moves[k].arc) {
+          var arcs = moves[k].abs;
+
+          for (var ii = 0; ii < arcs.length; ii++) {
+            var arc = arcs[ii];
+
+            if (arc.type === "arc") {
+              drawArc.call(this, arc.x, arc.y, arc.radius, arc.startAngle, arc.endAngle, arc.counterclockwise, undefined, isClip, !began);
+            } else {
+              drawLine.call(this, arc.x, arc.y);
+            }
+
+            began = true;
+          }
+        } else if (moves[k].close === true) {
+          this.pdf.internal.out("h");
+          began = false;
+        } else if (moves[k].begin !== true) {
+          var x = moves[k].start.x;
+          var y = moves[k].start.y;
+          drawLines.call(this, moves[k].deltas, x, y);
+          began = true;
+        }
+      }
+
+      if (style) {
+        putStyle.call(this, style);
+      }
+
+      if (isClip) {
+        doClip.call(this);
+      }
+    };
+
+    var getBaseline = function getBaseline(y) {
+      var height = this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;
+      var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);
+
+      switch (this.ctx.textBaseline) {
+        case "bottom":
+          return y - descent;
+
+        case "top":
+          return y + height - descent;
+
+        case "hanging":
+          return y + height - 2 * descent;
+
+        case "middle":
+          return y + height / 2 - descent;
+
+        case "ideographic":
+          // TODO not implemented
+          return y;
+
+        case "alphabetic":
+        default:
+          return y;
+      }
+    };
+
+    var getTextBottom = function getTextBottom(yBaseLine) {
+      var height = this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;
+      var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);
+      return yBaseLine + descent;
+    };
+
+    Context2D.prototype.createLinearGradient = function createLinearGradient() {
+      var canvasGradient = function canvasGradient() {};
+
+      canvasGradient.colorStops = [];
+
+      canvasGradient.addColorStop = function (offset, color) {
+        this.colorStops.push([offset, color]);
+      };
+
+      canvasGradient.getColor = function () {
+        if (this.colorStops.length === 0) {
+          return "#000000";
+        }
+
+        return this.colorStops[0][1];
+      };
+
+      canvasGradient.isCanvasGradient = true;
+      return canvasGradient;
+    };
+
+    Context2D.prototype.createPattern = function createPattern() {
+      return this.createLinearGradient();
+    };
+
+    Context2D.prototype.createRadialGradient = function createRadialGradient() {
+      return this.createLinearGradient();
+    };
+    /**
+     *
+     * @param x Edge point X
+     * @param y Edge point Y
+     * @param r Radius
+     * @param a1 start angle
+     * @param a2 end angle
+     * @param counterclockwise
+     * @param style
+     * @param isClip
+     */
+
+
+    var drawArc = function drawArc(x, y, r, a1, a2, counterclockwise, style, isClip, includeMove) {
+      // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html
+      var curves = createArc.call(this, r, a1, a2, counterclockwise);
+
+      for (var i = 0; i < curves.length; i++) {
+        var curve = curves[i];
+
+        if (i === 0) {
+          if (includeMove) {
+            doMove.call(this, curve.x1 + x, curve.y1 + y);
+          } else {
+            drawLine.call(this, curve.x1 + x, curve.y1 + y);
+          }
+        }
+
+        drawCurve.call(this, x, y, curve.x2, curve.y2, curve.x3, curve.y3, curve.x4, curve.y4);
+      }
+
+      if (!isClip) {
+        putStyle.call(this, style);
+      } else {
+        doClip.call(this);
+      }
+    };
+
+    var putStyle = function putStyle(style) {
+      switch (style) {
+        case "stroke":
+          this.pdf.internal.out("S");
+          break;
+
+        case "fill":
+          this.pdf.internal.out("f");
+          break;
+      }
+    };
+
+    var doClip = function doClip() {
+      this.pdf.clip();
+      this.pdf.discardPath();
+    };
+
+    var doMove = function doMove(x, y) {
+      this.pdf.internal.out(getHorizontalCoordinateString(x) + " " + getVerticalCoordinateString(y) + " m");
+    };
+
+    var putText = function putText(options) {
+      var textAlign;
+
+      switch (options.align) {
+        case "right":
+        case "end":
+          textAlign = "right";
+          break;
+
+        case "center":
+          textAlign = "center";
+          break;
+
+        case "left":
+        case "start":
+        default:
+          textAlign = "left";
+          break;
+      }
+
+      var textDimensions = this.pdf.getTextDimensions(options.text);
+      var yBaseLine = getBaseline.call(this, options.y);
+      var yBottom = getTextBottom.call(this, yBaseLine);
+      var yTop = yBottom - textDimensions.h;
+      var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));
+      var decomposedTransformationMatrix = this.ctx.transform.decompose();
+      var matrix = new Matrix();
+      matrix = matrix.multiply(decomposedTransformationMatrix.translate);
+      matrix = matrix.multiply(decomposedTransformationMatrix.skew);
+      matrix = matrix.multiply(decomposedTransformationMatrix.scale);
+      var baselineRect = this.ctx.transform.applyToRectangle(new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h));
+      var textBounds = matrix.applyToRectangle(new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h));
+      var pageArray = getPagesByPath.call(this, textBounds);
+      var pages = [];
+
+      for (var ii = 0; ii < pageArray.length; ii += 1) {
+        if (pages.indexOf(pageArray[ii]) === -1) {
+          pages.push(pageArray[ii]);
+        }
+      }
+
+      sortPages(pages);
+      var clipPath, oldSize, oldLineWidth;
+
+      if (this.autoPaging) {
+        var min = pages[0];
+        var max = pages[pages.length - 1];
+
+        for (var i = min; i < max + 1; i++) {
+          this.pdf.setPage(i);
+          var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];
+          var firstPageHeight = this.pdf.internal.pageSize.height - this.posY - this.margin[0] - this.margin[2];
+          var pageHeightMinusBottomMargin = this.pdf.internal.pageSize.height - this.margin[2];
+          var pageHeightMinusMargins = pageHeightMinusBottomMargin - this.margin[0];
+          var pageWidthMinusRightMargin = this.pdf.internal.pageSize.width - this.margin[1];
+          var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];
+          var previousPageHeightSum = i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;
+
+          if (this.ctx.clip_path.length !== 0) {
+            var tmpPaths = this.path;
+            clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));
+            this.path = pathPositionRedo(clipPath, this.posX + this.margin[3], -1 * previousPageHeightSum + topMargin);
+            drawPaths.call(this, "fill", true);
+            this.path = tmpPaths;
+          }
+
+          var textBoundsOnPage = pathPositionRedo([JSON.parse(JSON.stringify(textBounds))], this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset)[0];
+
+          if (options.scale >= 0.01) {
+            oldSize = this.pdf.internal.getFontSize();
+            this.pdf.setFontSize(oldSize * options.scale);
+            oldLineWidth = this.lineWidth;
+            this.lineWidth = oldLineWidth * options.scale;
+          }
+
+          var doSlice = this.autoPaging !== "text";
+
+          if (doSlice || textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin) {
+            if (doSlice || textBoundsOnPage.y >= topMargin && textBoundsOnPage.x <= pageWidthMinusRightMargin) {
+              var croppedText = doSlice ? options.text : this.pdf.splitTextToSize(options.text, options.maxWidth || pageWidthMinusRightMargin - textBoundsOnPage.x)[0];
+              var baseLineRectOnPage = pathPositionRedo([JSON.parse(JSON.stringify(baselineRect))], this.posX + this.margin[3], -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset)[0];
+              var needsClipping = doSlice && (i > min || i < max) && hasMargins.call(this);
+
+              if (needsClipping) {
+                this.pdf.saveGraphicsState();
+                this.pdf.rect(this.margin[3], this.margin[0], pageWidthMinusMargins, pageHeightMinusMargins, null).clip().discardPath();
+              }
+
+              this.pdf.text(croppedText, baseLineRectOnPage.x, baseLineRectOnPage.y, {
+                angle: options.angle,
+                align: textAlign,
+                renderingMode: options.renderingMode
+              });
+
+              if (needsClipping) {
+                this.pdf.restoreGraphicsState();
+              }
+            }
+          } else {
+            // This text is the last element of the page, but it got cut off due to the margin
+            // so we render it in the next page
+            if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {
+              // As a result, all other elements have their y offset increased
+              this.ctx.prevPageLastElemOffset += pageHeightMinusBottomMargin - textBoundsOnPage.y;
+            }
+          }
+
+          if (options.scale >= 0.01) {
+            this.pdf.setFontSize(oldSize);
+            this.lineWidth = oldLineWidth;
+          }
+        }
+      } else {
+        if (options.scale >= 0.01) {
+          oldSize = this.pdf.internal.getFontSize();
+          this.pdf.setFontSize(oldSize * options.scale);
+          oldLineWidth = this.lineWidth;
+          this.lineWidth = oldLineWidth * options.scale;
+        }
+
+        this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {
+          angle: options.angle,
+          align: textAlign,
+          renderingMode: options.renderingMode,
+          maxWidth: options.maxWidth
+        });
+
+        if (options.scale >= 0.01) {
+          this.pdf.setFontSize(oldSize);
+          this.lineWidth = oldLineWidth;
+        }
+      }
+    };
+
+    var drawLine = function drawLine(x, y, prevX, prevY) {
+      prevX = prevX || 0;
+      prevY = prevY || 0;
+      this.pdf.internal.out(getHorizontalCoordinateString(x + prevX) + " " + getVerticalCoordinateString(y + prevY) + " l");
+    };
+
+    var drawLines = function drawLines(lines, x, y) {
+      return this.pdf.lines(lines, x, y, null, null);
+    };
+
+    var drawCurve = function drawCurve(x, y, x1, y1, x2, y2, x3, y3) {
+      this.pdf.internal.out([f2(getHorizontalCoordinate(x1 + x)), f2(getVerticalCoordinate(y1 + y)), f2(getHorizontalCoordinate(x2 + x)), f2(getVerticalCoordinate(y2 + y)), f2(getHorizontalCoordinate(x3 + x)), f2(getVerticalCoordinate(y3 + y)), "c"].join(" "));
+    };
+    /**
+     * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.
+     *
+     * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.
+     * @function createArc
+     */
+
+
+    var createArc = function createArc(radius, startAngle, endAngle, anticlockwise) {
+      var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below
+
+      var twoPi = Math.PI * 2;
+      var halfPi = Math.PI / 2.0;
+
+      while (startAngle > endAngle) {
+        startAngle = startAngle - twoPi;
+      }
+
+      var totalAngle = Math.abs(endAngle - startAngle);
+
+      if (totalAngle < twoPi) {
+        if (anticlockwise) {
+          totalAngle = twoPi - totalAngle;
+        }
+      } // Compute the sequence of arc curves, up to PI/2 at a time.
+
+
+      var curves = []; // clockwise or counterclockwise
+
+      var sgn = anticlockwise ? -1 : +1;
+      var a1 = startAngle;
+
+      for (; totalAngle > EPSILON;) {
+        var remain = sgn * Math.min(totalAngle, halfPi);
+        var a2 = a1 + remain;
+        curves.push(createSmallArc.call(this, radius, a1, a2));
+        totalAngle -= Math.abs(a2 - a1);
+        a1 = a2;
+      }
+
+      return curves;
+    };
+    /**
+     * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.
+     *
+     * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.
+     *
+     * This algorithm is based on the approach described in: A. Riškus, "Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa," Information Technology and Control, 35(4), 2006 pp. 371-378.
+     */
+
+
+    var createSmallArc = function createSmallArc(r, a1, a2) {
+      var a = (a2 - a1) / 2.0;
+      var x4 = r * Math.cos(a);
+      var y4 = r * Math.sin(a);
+      var x1 = x4;
+      var y1 = -y4;
+      var q1 = x1 * x1 + y1 * y1;
+      var q2 = q1 + x1 * x4 + y1 * y4;
+      var k2 = 4 / 3 * (Math.sqrt(2 * q1 * q2) - q2) / (x1 * y4 - y1 * x4);
+      var x2 = x1 - k2 * y1;
+      var y2 = y1 + k2 * x1;
+      var x3 = x2;
+      var y3 = -y2;
+      var ar = a + a1;
+      var cos_ar = Math.cos(ar);
+      var sin_ar = Math.sin(ar);
+      return {
+        x1: r * Math.cos(a1),
+        y1: r * Math.sin(a1),
+        x2: x2 * cos_ar - y2 * sin_ar,
+        y2: x2 * sin_ar + y2 * cos_ar,
+        x3: x3 * cos_ar - y3 * sin_ar,
+        y3: x3 * sin_ar + y3 * cos_ar,
+        x4: r * Math.cos(a2),
+        y4: r * Math.sin(a2)
+      };
+    };
+
+    var rad2deg = function rad2deg(value) {
+      return value * 180 / Math.PI;
+    };
+
+    var getQuadraticCurveBoundary = function getQuadraticCurveBoundary(sx, sy, cpx, cpy, ex, ey) {
+      var midX1 = sx + (cpx - sx) * 0.5;
+      var midY1 = sy + (cpy - sy) * 0.5;
+      var midX2 = ex + (cpx - ex) * 0.5;
+      var midY2 = ey + (cpy - ey) * 0.5;
+      var resultX1 = Math.min(sx, ex, midX1, midX2);
+      var resultX2 = Math.max(sx, ex, midX1, midX2);
+      var resultY1 = Math.min(sy, ey, midY1, midY2);
+      var resultY2 = Math.max(sy, ey, midY1, midY2);
+      return new Rectangle(resultX1, resultY1, resultX2 - resultX1, resultY2 - resultY1);
+    }; //De Casteljau algorithm
+
+
+    var getBezierCurveBoundary = function getBezierCurveBoundary(ax, ay, bx, by, cx, cy, dx, dy) {
+      var tobx = bx - ax;
+      var toby = by - ay;
+      var tocx = cx - bx;
+      var tocy = cy - by;
+      var todx = dx - cx;
+      var tody = dy - cy;
+      var precision = 40;
+      var d, i, px, py, qx, qy, rx, ry, tx, ty, sx, sy, x, y, minx, miny, maxx, maxy, toqx, toqy, torx, tory, totx, toty;
+
+      for (i = 0; i < precision + 1; i++) {
+        d = i / precision;
+        px = ax + d * tobx;
+        py = ay + d * toby;
+        qx = bx + d * tocx;
+        qy = by + d * tocy;
+        rx = cx + d * todx;
+        ry = cy + d * tody;
+        toqx = qx - px;
+        toqy = qy - py;
+        torx = rx - qx;
+        tory = ry - qy;
+        sx = px + d * toqx;
+        sy = py + d * toqy;
+        tx = qx + d * torx;
+        ty = qy + d * tory;
+        totx = tx - sx;
+        toty = ty - sy;
+        x = sx + d * totx;
+        y = sy + d * toty;
+
+        if (i == 0) {
+          minx = x;
+          miny = y;
+          maxx = x;
+          maxy = y;
+        } else {
+          minx = Math.min(minx, x);
+          miny = Math.min(miny, y);
+          maxx = Math.max(maxx, x);
+          maxy = Math.max(maxy, y);
+        }
+      }
+
+      return new Rectangle(Math.round(minx), Math.round(miny), Math.round(maxx - minx), Math.round(maxy - miny));
+    };
+
+    var getPrevLineDashValue = function getPrevLineDashValue(lineDash, lineDashOffset) {
+      return JSON.stringify({
+        lineDash: lineDash,
+        lineDashOffset: lineDashOffset
+      });
+    };
+
+    var setLineDash = function setLineDash() {
+      // Avoid unnecessary line dash declarations.
+      if (!this.prevLineDash && !this.ctx.lineDash.length && !this.ctx.lineDashOffset) {
+        return;
+      } // Avoid unnecessary line dash declarations.
+
+
+      var nextLineDash = getPrevLineDashValue(this.ctx.lineDash, this.ctx.lineDashOffset);
+
+      if (this.prevLineDash !== nextLineDash) {
+        this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);
+        this.prevLineDash = nextLineDash;
+      }
+    };
+  })(jsPDF.API);
+
+  // DEFLATE is a complex format; to read this code, you should probably check the RFC first:
+
+
+  var u8 = Uint8Array,
+      u16 = Uint16Array,
+      i32 = Int32Array; // fixed length extra bits
+
+  var fleb = new u8([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,
+  /* unused */
+  0, 0,
+  /* impossible */
+  0]); // fixed distance extra bits
+
+  var fdeb = new u8([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,
+  /* unused */
+  0, 0]); // code length index map
+
+  var clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); // get base, reverse index map from extra bits
+
+  var freb = function (eb, start) {
+    var b = new u16(31);
+
+    for (var i = 0; i < 31; ++i) {
+      b[i] = start += 1 << eb[i - 1];
+    } // numbers here are at max 18 bits
+
+
+    var r = new i32(b[30]);
+
+    for (var i = 1; i < 30; ++i) {
+      for (var j = b[i]; j < b[i + 1]; ++j) {
+        r[j] = j - b[i] << 5 | i;
+      }
+    }
+
+    return {
+      b: b,
+      r: r
+    };
+  };
+
+  var _a = freb(fleb, 2),
+      fl = _a.b,
+      revfl = _a.r; // we can ignore the fact that the other numbers are wrong; they never happen anyway
+
+
+  fl[28] = 258, revfl[258] = 28;
+
+  var _b = freb(fdeb, 0),
+      fd = _b.b,
+      revfd = _b.r; // map of value to reverse (assuming 16 bits)
+
+
+  var rev = new u16(32768);
+
+  for (var i = 0; i < 32768; ++i) {
+    // reverse table algorithm from SO
+    var x = (i & 0xAAAA) >> 1 | (i & 0x5555) << 1;
+    x = (x & 0xCCCC) >> 2 | (x & 0x3333) << 2;
+    x = (x & 0xF0F0) >> 4 | (x & 0x0F0F) << 4;
+    rev[i] = ((x & 0xFF00) >> 8 | (x & 0x00FF) << 8) >> 1;
+  } // create huffman tree from u8 "map": index -> code length for code index
+  // mb (max bits) must be at most 15
+  // TODO: optimize/split up?
+
+
+  var hMap = function (cd, mb, r) {
+    var s = cd.length; // index
+
+    var i = 0; // u16 "map": index -> # of codes with bit length = index
+
+    var l = new u16(mb); // length of cd must be 288 (total # of codes)
+
+    for (; i < s; ++i) {
+      if (cd[i]) ++l[cd[i] - 1];
+    } // u16 "map": index -> minimum code for bit length = index
+
+
+    var le = new u16(mb);
+
+    for (i = 1; i < mb; ++i) {
+      le[i] = le[i - 1] + l[i - 1] << 1;
+    }
+
+    var co;
+
+    if (r) {
+      // u16 "map": index -> number of actual bits, symbol for code
+      co = new u16(1 << mb); // bits to remove for reverser
+
+      var rvb = 15 - mb;
+
+      for (i = 0; i < s; ++i) {
+        // ignore 0 lengths
+        if (cd[i]) {
+          // num encoding both symbol and bits read
+          var sv = i << 4 | cd[i]; // free bits
+
+          var r_1 = mb - cd[i]; // start value
+
+          var v = le[cd[i] - 1]++ << r_1; // m is end value
+
+          for (var m = v | (1 << r_1) - 1; v <= m; ++v) {
+            // every 16 bit value starting with the code yields the same result
+            co[rev[v] >> rvb] = sv;
+          }
+        }
+      }
+    } else {
+      co = new u16(s);
+
+      for (i = 0; i < s; ++i) {
+        if (cd[i]) {
+          co[i] = rev[le[cd[i] - 1]++] >> 15 - cd[i];
+        }
+      }
+    }
+
+    return co;
+  }; // fixed length tree
+
+
+  var flt = new u8(288);
+
+  for (var i = 0; i < 144; ++i) flt[i] = 8;
+
+  for (var i = 144; i < 256; ++i) flt[i] = 9;
+
+  for (var i = 256; i < 280; ++i) flt[i] = 7;
+
+  for (var i = 280; i < 288; ++i) flt[i] = 8; // fixed distance tree
+
+
+  var fdt = new u8(32);
+
+  for (var i = 0; i < 32; ++i) fdt[i] = 5; // fixed length map
+
+
+  var flm = /*#__PURE__*/hMap(flt, 9, 0),
+      flrm = /*#__PURE__*/hMap(flt, 9, 1); // fixed distance map
+
+  var fdm = /*#__PURE__*/hMap(fdt, 5, 0),
+      fdrm = /*#__PURE__*/hMap(fdt, 5, 1); // find max of array
+
+  var max = function (a) {
+    var m = a[0];
+
+    for (var i = 1; i < a.length; ++i) {
+      if (a[i] > m) m = a[i];
+    }
+
+    return m;
+  }; // read d, starting at bit p and mask with m
+
+
+  var bits = function (d, p, m) {
+    var o = p / 8 | 0;
+    return (d[o] | d[o + 1] << 8) >> (p & 7) & m;
+  }; // read d, starting at bit p continuing for at least 16 bits
+
+
+  var bits16 = function (d, p) {
+    var o = p / 8 | 0;
+    return (d[o] | d[o + 1] << 8 | d[o + 2] << 16) >> (p & 7);
+  }; // get end of byte
+
+
+  var shft = function (p) {
+    return (p + 7) / 8 | 0;
+  }; // typed array slice - allows garbage collector to free original reference,
+  // while being more compatible than .slice
+
+
+  var slc = function (v, s, e) {
+    if (s == null || s < 0) s = 0;
+    if (e == null || e > v.length) e = v.length; // can't use .constructor in case user-supplied
+
+    return new u8(v.subarray(s, e));
+  };
+
+  var ec = ['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' // determined by unknown compression method
+  ];
+
+  var err = function (ind, msg, nt) {
+    var e = new Error(msg || ec[ind]);
+    e.code = ind;
+    if (Error.captureStackTrace) Error.captureStackTrace(e, err);
+    if (!nt) throw e;
+    return e;
+  }; // expands raw DEFLATE data
+
+
+  var inflt = function (dat, st, buf, dict) {
+    // source length       dict length
+    var sl = dat.length,
+        dl = dict ? dict.length : 0;
+    if (!sl || st.f && !st.l) return buf || new u8(0);
+    var noBuf = !buf; // have to estimate size
+
+    var resize = noBuf || st.i != 2; // no state
+
+    var noSt = st.i; // Assumes roughly 33% compression ratio average
+
+    if (noBuf) buf = new u8(sl * 3); // ensure buffer can fit at least l elements
+
+    var cbuf = function (l) {
+      var bl = buf.length; // need to increase size to fit
+
+      if (l > bl) {
+        // Double or set to necessary, whichever is greater
+        var nbuf = new u8(Math.max(bl * 2, l));
+        nbuf.set(buf);
+        buf = nbuf;
+      }
+    }; //  last chunk         bitpos           bytes
+
+
+    var final = st.f || 0,
+        pos = st.p || 0,
+        bt = st.b || 0,
+        lm = st.l,
+        dm = st.d,
+        lbt = st.m,
+        dbt = st.n; // total bits
+
+    var tbts = sl * 8;
+
+    do {
+      if (!lm) {
+        // BFINAL - this is only 1 when last chunk is next
+        final = bits(dat, pos, 1); // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman
+
+        var type = bits(dat, pos + 1, 3);
+        pos += 3;
+
+        if (!type) {
+          // go to end of byte boundary
+          var s = shft(pos) + 4,
+              l = dat[s - 4] | dat[s - 3] << 8,
+              t = s + l;
+
+          if (t > sl) {
+            if (noSt) err(0);
+            break;
+          } // ensure size
+
+
+          if (resize) cbuf(bt + l); // Copy over uncompressed data
+
+          buf.set(dat.subarray(s, t), bt); // Get new bitpos, update byte count
+
+          st.b = bt += l, st.p = pos = t * 8, st.f = final;
+          continue;
+        } else if (type == 1) lm = flrm, dm = fdrm, lbt = 9, dbt = 5;else if (type == 2) {
+          //  literal                            lengths
+          var hLit = bits(dat, pos, 31) + 257,
+              hcLen = bits(dat, pos + 10, 15) + 4;
+          var tl = hLit + bits(dat, pos + 5, 31) + 1;
+          pos += 14; // length+distance tree
+
+          var ldt = new u8(tl); // code length tree
+
+          var clt = new u8(19);
+
+          for (var i = 0; i < hcLen; ++i) {
+            // use index map to get real code
+            clt[clim[i]] = bits(dat, pos + i * 3, 7);
+          }
+
+          pos += hcLen * 3; // code lengths bits
+
+          var clb = max(clt),
+              clbmsk = (1 << clb) - 1; // code lengths map
+
+          var clm = hMap(clt, clb, 1);
+
+          for (var i = 0; i < tl;) {
+            var r = clm[bits(dat, pos, clbmsk)]; // bits read
+
+            pos += r & 15; // symbol
+
+            var s = r >> 4; // code length to copy
+
+            if (s < 16) {
+              ldt[i++] = s;
+            } else {
+              //  copy   count
+              var c = 0,
+                  n = 0;
+              if (s == 16) n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];else if (s == 17) n = 3 + bits(dat, pos, 7), pos += 3;else if (s == 18) n = 11 + bits(dat, pos, 127), pos += 7;
+
+              while (n--) ldt[i++] = c;
+            }
+          } //    length tree                 distance tree
+
+
+          var lt = ldt.subarray(0, hLit),
+              dt = ldt.subarray(hLit); // max length bits
+
+          lbt = max(lt); // max dist bits
+
+          dbt = max(dt);
+          lm = hMap(lt, lbt, 1);
+          dm = hMap(dt, dbt, 1);
+        } else err(1);
+
+        if (pos > tbts) {
+          if (noSt) err(0);
+          break;
+        }
+      } // Make sure the buffer can hold this + the largest possible addition
+      // Maximum chunk size (practically, theoretically infinite) is 2^17
+
+
+      if (resize) cbuf(bt + 131072);
+      var lms = (1 << lbt) - 1,
+          dms = (1 << dbt) - 1;
+      var lpos = pos;
+
+      for (;; lpos = pos) {
+        // bits read, code
+        var c = lm[bits16(dat, pos) & lms],
+            sym = c >> 4;
+        pos += c & 15;
+
+        if (pos > tbts) {
+          if (noSt) err(0);
+          break;
+        }
+
+        if (!c) err(2);
+        if (sym < 256) buf[bt++] = sym;else if (sym == 256) {
+          lpos = pos, lm = null;
+          break;
+        } else {
+          var add = sym - 254; // no extra bits needed if less
+
+          if (sym > 264) {
+            // index
+            var i = sym - 257,
+                b = fleb[i];
+            add = bits(dat, pos, (1 << b) - 1) + fl[i];
+            pos += b;
+          } // dist
+
+
+          var d = dm[bits16(dat, pos) & dms],
+              dsym = d >> 4;
+          if (!d) err(3);
+          pos += d & 15;
+          var dt = fd[dsym];
+
+          if (dsym > 3) {
+            var b = fdeb[dsym];
+            dt += bits16(dat, pos) & (1 << b) - 1, pos += b;
+          }
+
+          if (pos > tbts) {
+            if (noSt) err(0);
+            break;
+          }
+
+          if (resize) cbuf(bt + 131072);
+          var end = bt + add;
+
+          if (bt < dt) {
+            var shift = dl - dt,
+                dend = Math.min(dt, end);
+            if (shift + bt < 0) err(3);
+
+            for (; bt < dend; ++bt) buf[bt] = dict[shift + bt];
+          }
+
+          for (; bt < end; ++bt) buf[bt] = buf[bt - dt];
+        }
+      }
+
+      st.l = lm, st.p = lpos, st.b = bt, st.f = final;
+      if (lm) final = 1, st.m = lbt, st.d = dm, st.n = dbt;
+    } while (!final); // don't reallocate for streams or user buffers
+
+
+    return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt);
+  }; // starting at p, write the minimum number of bits that can hold v to d
+
+
+  var wbits = function (d, p, v) {
+    v <<= p & 7;
+    var o = p / 8 | 0;
+    d[o] |= v;
+    d[o + 1] |= v >> 8;
+  }; // starting at p, write the minimum number of bits (>8) that can hold v to d
+
+
+  var wbits16 = function (d, p, v) {
+    v <<= p & 7;
+    var o = p / 8 | 0;
+    d[o] |= v;
+    d[o + 1] |= v >> 8;
+    d[o + 2] |= v >> 16;
+  }; // creates code lengths from a frequency table
+
+
+  var hTree = function (d, mb) {
+    // Need extra info to make a tree
+    var t = [];
+
+    for (var i = 0; i < d.length; ++i) {
+      if (d[i]) t.push({
+        s: i,
+        f: d[i]
+      });
+    }
+
+    var s = t.length;
+    var t2 = t.slice();
+    if (!s) return {
+      t: et,
+      l: 0
+    };
+
+    if (s == 1) {
+      var v = new u8(t[0].s + 1);
+      v[t[0].s] = 1;
+      return {
+        t: v,
+        l: 1
+      };
+    }
+
+    t.sort(function (a, b) {
+      return a.f - b.f;
+    }); // after i2 reaches last ind, will be stopped
+    // freq must be greater than largest possible number of symbols
+
+    t.push({
+      s: -1,
+      f: 25001
+    });
+    var l = t[0],
+        r = t[1],
+        i0 = 0,
+        i1 = 1,
+        i2 = 2;
+    t[0] = {
+      s: -1,
+      f: l.f + r.f,
+      l: l,
+      r: r
+    }; // efficient algorithm from UZIP.js
+    // i0 is lookbehind, i2 is lookahead - after processing two low-freq
+    // symbols that combined have high freq, will start processing i2 (high-freq,
+    // non-composite) symbols instead
+    // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/
+
+    while (i1 != s - 1) {
+      l = t[t[i0].f < t[i2].f ? i0++ : i2++];
+      r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];
+      t[i1++] = {
+        s: -1,
+        f: l.f + r.f,
+        l: l,
+        r: r
+      };
+    }
+
+    var maxSym = t2[0].s;
+
+    for (var i = 1; i < s; ++i) {
+      if (t2[i].s > maxSym) maxSym = t2[i].s;
+    } // code lengths
+
+
+    var tr = new u16(maxSym + 1); // max bits in tree
+
+    var mbt = ln(t[i1 - 1], tr, 0);
+
+    if (mbt > mb) {
+      // more algorithms from UZIP.js
+      // TODO: find out how this code works (debt)
+      //  ind    debt
+      var i = 0,
+          dt = 0; //    left            cost
+
+      var lft = mbt - mb,
+          cst = 1 << lft;
+      t2.sort(function (a, b) {
+        return tr[b.s] - tr[a.s] || a.f - b.f;
+      });
+
+      for (; i < s; ++i) {
+        var i2_1 = t2[i].s;
+
+        if (tr[i2_1] > mb) {
+          dt += cst - (1 << mbt - tr[i2_1]);
+          tr[i2_1] = mb;
+        } else break;
+      }
+
+      dt >>= lft;
+
+      while (dt > 0) {
+        var i2_2 = t2[i].s;
+        if (tr[i2_2] < mb) dt -= 1 << mb - tr[i2_2]++ - 1;else ++i;
+      }
+
+      for (; i >= 0 && dt; --i) {
+        var i2_3 = t2[i].s;
+
+        if (tr[i2_3] == mb) {
+          --tr[i2_3];
+          ++dt;
+        }
+      }
+
+      mbt = mb;
+    }
+
+    return {
+      t: new u8(tr),
+      l: mbt
+    };
+  }; // get the max length and assign length codes
+
+
+  var ln = function (n, l, d) {
+    return n.s == -1 ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1)) : l[n.s] = d;
+  }; // length codes generation
+
+
+  var lc = function (c) {
+    var s = c.length; // Note that the semicolon was intentional
+
+    while (s && !c[--s]);
+
+    var cl = new u16(++s); //  ind      num         streak
+
+    var cli = 0,
+        cln = c[0],
+        cls = 1;
+
+    var w = function (v) {
+      cl[cli++] = v;
+    };
+
+    for (var i = 1; i <= s; ++i) {
+      if (c[i] == cln && i != s) ++cls;else {
+        if (!cln && cls > 2) {
+          for (; cls > 138; cls -= 138) w(32754);
+
+          if (cls > 2) {
+            w(cls > 10 ? cls - 11 << 5 | 28690 : cls - 3 << 5 | 12305);
+            cls = 0;
+          }
+        } else if (cls > 3) {
+          w(cln), --cls;
+
+          for (; cls > 6; cls -= 6) w(8304);
+
+          if (cls > 2) w(cls - 3 << 5 | 8208), cls = 0;
+        }
+
+        while (cls--) w(cln);
+
+        cls = 1;
+        cln = c[i];
+      }
+    }
+
+    return {
+      c: cl.subarray(0, cli),
+      n: s
+    };
+  }; // calculate the length of output from tree, code lengths
+
+
+  var clen = function (cf, cl) {
+    var l = 0;
+
+    for (var i = 0; i < cl.length; ++i) l += cf[i] * cl[i];
+
+    return l;
+  }; // writes a fixed block
+  // returns the new bit pos
+
+
+  var wfblk = function (out, pos, dat) {
+    // no need to write 00 as type: TypedArray defaults to 0
+    var s = dat.length;
+    var o = shft(pos + 2);
+    out[o] = s & 255;
+    out[o + 1] = s >> 8;
+    out[o + 2] = out[o] ^ 255;
+    out[o + 3] = out[o + 1] ^ 255;
+
+    for (var i = 0; i < s; ++i) out[o + i + 4] = dat[i];
+
+    return (o + 4 + s) * 8;
+  }; // writes a block
+
+
+  var wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {
+    wbits(out, p++, final);
+    ++lf[256];
+
+    var _a = hTree(lf, 15),
+        dlt = _a.t,
+        mlb = _a.l;
+
+    var _b = hTree(df, 15),
+        ddt = _b.t,
+        mdb = _b.l;
+
+    var _c = lc(dlt),
+        lclt = _c.c,
+        nlc = _c.n;
+
+    var _d = lc(ddt),
+        lcdt = _d.c,
+        ndc = _d.n;
+
+    var lcfreq = new u16(19);
+
+    for (var i = 0; i < lclt.length; ++i) ++lcfreq[lclt[i] & 31];
+
+    for (var i = 0; i < lcdt.length; ++i) ++lcfreq[lcdt[i] & 31];
+
+    var _e = hTree(lcfreq, 7),
+        lct = _e.t,
+        mlcb = _e.l;
+
+    var nlcc = 19;
+
+    for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc);
+
+    var flen = bl + 5 << 3;
+    var ftlen = clen(lf, flt) + clen(df, fdt) + eb;
+    var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];
+    if (bs >= 0 && flen <= ftlen && flen <= dtlen) return wfblk(out, p, dat.subarray(bs, bs + bl));
+    var lm, ll, dm, dl;
+    wbits(out, p, 1 + (dtlen < ftlen)), p += 2;
+
+    if (dtlen < ftlen) {
+      lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;
+      var llm = hMap(lct, mlcb, 0);
+      wbits(out, p, nlc - 257);
+      wbits(out, p + 5, ndc - 1);
+      wbits(out, p + 10, nlcc - 4);
+      p += 14;
+
+      for (var i = 0; i < nlcc; ++i) wbits(out, p + 3 * i, lct[clim[i]]);
+
+      p += 3 * nlcc;
+      var lcts = [lclt, lcdt];
+
+      for (var it = 0; it < 2; ++it) {
+        var clct = lcts[it];
+
+        for (var i = 0; i < clct.length; ++i) {
+          var len = clct[i] & 31;
+          wbits(out, p, llm[len]), p += lct[len];
+          if (len > 15) wbits(out, p, clct[i] >> 5 & 127), p += clct[i] >> 12;
+        }
+      }
+    } else {
+      lm = flm, ll = flt, dm = fdm, dl = fdt;
+    }
+
+    for (var i = 0; i < li; ++i) {
+      var sym = syms[i];
+
+      if (sym > 255) {
+        var len = sym >> 18 & 31;
+        wbits16(out, p, lm[len + 257]), p += ll[len + 257];
+        if (len > 7) wbits(out, p, sym >> 23 & 31), p += fleb[len];
+        var dst = sym & 31;
+        wbits16(out, p, dm[dst]), p += dl[dst];
+        if (dst > 3) wbits16(out, p, sym >> 5 & 8191), p += fdeb[dst];
+      } else {
+        wbits16(out, p, lm[sym]), p += ll[sym];
+      }
+    }
+
+    wbits16(out, p, lm[256]);
+    return p + ll[256];
+  }; // deflate options (nice << 13) | chain
+
+
+  var deo = /*#__PURE__*/new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]); // empty
+
+  var et = /*#__PURE__*/new u8(0); // compresses data into a raw DEFLATE buffer
+
+  var dflt = function (dat, lvl, plvl, pre, post, st) {
+    var s = st.z || dat.length;
+    var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post); // writing to this writes to the output buffer
+
+    var w = o.subarray(pre, o.length - post);
+    var lst = st.l;
+    var pos = (st.r || 0) & 7;
+
+    if (lvl) {
+      if (pos) w[0] = st.r >> 3;
+      var opt = deo[lvl - 1];
+      var n = opt >> 13,
+          c = opt & 8191;
+      var msk_1 = (1 << plvl) - 1; //    prev 2-byte val map    curr 2-byte val map
+
+      var prev = st.p || new u16(32768),
+          head = st.h || new u16(msk_1 + 1);
+      var bs1_1 = Math.ceil(plvl / 3),
+          bs2_1 = 2 * bs1_1;
+
+      var hsh = function (i) {
+        return (dat[i] ^ dat[i + 1] << bs1_1 ^ dat[i + 2] << bs2_1) & msk_1;
+      }; // 24576 is an arbitrary number of maximum symbols per block
+      // 424 buffer for last block
+
+
+      var syms = new i32(25000); // length/literal freq   distance freq
+
+      var lf = new u16(288),
+          df = new u16(32); //  l/lcnt  exbits  index          l/lind  waitdx          blkpos
+
+      var lc_1 = 0,
+          eb = 0,
+          i = st.i || 0,
+          li = 0,
+          wi = st.w || 0,
+          bs = 0;
+
+      for (; i + 2 < s; ++i) {
+        // hash value
+        var hv = hsh(i); // index mod 32768    previous index mod
+
+        var imod = i & 32767,
+            pimod = head[hv];
+        prev[imod] = pimod;
+        head[hv] = imod; // We always should modify head and prev, but only add symbols if
+        // this data is not yet processed ("wait" for wait index)
+
+        if (wi <= i) {
+          // bytes remaining
+          var rem = s - i;
+
+          if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) {
+            pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);
+            li = lc_1 = eb = 0, bs = i;
+
+            for (var j = 0; j < 286; ++j) lf[j] = 0;
+
+            for (var j = 0; j < 30; ++j) df[j] = 0;
+          } //  len    dist   chain
+
+
+          var l = 2,
+              d = 0,
+              ch_1 = c,
+              dif = imod - pimod & 32767;
+
+          if (rem > 2 && hv == hsh(i - dif)) {
+            var maxn = Math.min(n, rem) - 1;
+            var maxd = Math.min(32767, i); // max possible length
+            // not capped at dif because decompressors implement "rolling" index population
+
+            var ml = Math.min(258, rem);
+
+            while (dif <= maxd && --ch_1 && imod != pimod) {
+              if (dat[i + l] == dat[i + l - dif]) {
+                var nl = 0;
+
+                for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl);
+
+                if (nl > l) {
+                  l = nl, d = dif; // break out early when we reach "nice" (we are satisfied enough)
+
+                  if (nl > maxn) break; // now, find the rarest 2-byte sequence within this
+                  // length of literals and search for that instead.
+                  // Much faster than just using the start
+
+                  var mmd = Math.min(dif, nl - 2);
+                  var md = 0;
+
+                  for (var j = 0; j < mmd; ++j) {
+                    var ti = i - dif + j & 32767;
+                    var pti = prev[ti];
+                    var cd = ti - pti & 32767;
+                    if (cd > md) md = cd, pimod = ti;
+                  }
+                }
+              } // check the previous match
+
+
+              imod = pimod, pimod = prev[imod];
+              dif += imod - pimod & 32767;
+            }
+          } // d will be nonzero only when a match was found
+
+
+          if (d) {
+            // store both dist and len data in one int32
+            // Make sure this is recognized as a len/dist with 28th bit (2^28)
+            syms[li++] = 268435456 | revfl[l] << 18 | revfd[d];
+            var lin = revfl[l] & 31,
+                din = revfd[d] & 31;
+            eb += fleb[lin] + fdeb[din];
+            ++lf[257 + lin];
+            ++df[din];
+            wi = i + l;
+            ++lc_1;
+          } else {
+            syms[li++] = dat[i];
+            ++lf[dat[i]];
+          }
+        }
+      }
+
+      for (i = Math.max(i, wi); i < s; ++i) {
+        syms[li++] = dat[i];
+        ++lf[dat[i]];
+      }
+
+      pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);
+
+      if (!lst) {
+        st.r = pos & 7 | w[pos / 8 | 0] << 3; // shft(pos) now 1 less if pos & 7 != 0
+
+        pos -= 7;
+        st.h = head, st.p = prev, st.i = i, st.w = wi;
+      }
+    } else {
+      for (var i = st.w || 0; i < s + lst; i += 65535) {
+        // end
+        var e = i + 65535;
+
+        if (e >= s) {
+          // write final block
+          w[pos / 8 | 0] = lst;
+          e = s;
+        }
+
+        pos = wfblk(w, pos + 1, dat.subarray(i, e));
+      }
+
+      st.i = s;
+    }
+
+    return slc(o, 0, pre + shft(pos) + post);
+  }; // CRC32 table
+
+
+  var adler = function () {
+    var a = 1,
+        b = 0;
+    return {
+      p: function (d) {
+        // closures have awful performance
+        var n = a,
+            m = b;
+        var l = d.length | 0;
+
+        for (var i = 0; i != l;) {
+          var e = Math.min(i + 2655, l);
+
+          for (; i < e; ++i) m += n += d[i];
+
+          n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);
+        }
+
+        a = n, b = m;
+      },
+      d: function () {
+        a %= 65521, b %= 65521;
+        return (a & 255) << 24 | (a & 0xFF00) << 8 | (b & 255) << 8 | b >> 8;
+      }
+    };
+  };
+
+  var dopt = function (dat, opt, pre, post, st) {
+    if (!st) {
+      st = {
+        l: 1
+      };
+
+      if (opt.dictionary) {
+        var dict = opt.dictionary.subarray(-32768);
+        var newDat = new u8(dict.length + dat.length);
+        newDat.set(dict);
+        newDat.set(dat, dict.length);
+        dat = newDat;
+        st.w = dict.length;
+      }
+    }
+
+    return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : 12 + opt.mem, pre, post, st);
+  }; // Walmart object spread
+
+
+  var wbytes = function (d, b, v) {
+    for (; v; ++b) d[b] = v, v >>>= 8;
+  }; // gzip header
+
+
+  var zlh = function (c, o) {
+    var lv = o.level,
+        fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;
+    c[0] = 120, c[1] = fl << 6 | (o.dictionary && 32);
+    c[1] |= 31 - (c[0] << 8 | c[1]) % 31;
+
+    if (o.dictionary) {
+      var h = adler();
+      h.p(o.dictionary);
+      wbytes(c, 2, h.d());
+    }
+  }; // zlib start
+
+
+  var zls = function (d, dict) {
+    if ((d[0] & 15) != 8 || d[0] >> 4 > 7 || (d[0] << 8 | d[1]) % 31) err(6, 'invalid zlib data');
+    if ((d[1] >> 5 & 1) == +!dict) err(6, 'invalid zlib data: ' + (d[1] & 32 ? 'need' : 'unexpected') + ' dictionary');
+    return (d[1] >> 3 & 4) + 2;
+  };
+  /**
+   * Compress data with Zlib
+   * @param data The data to compress
+   * @param opts The compression options
+   * @returns The zlib-compressed version of the data
+   */
+
+  function zlibSync(data, opts) {
+    if (!opts) opts = {};
+    var a = adler();
+    a.p(data);
+    var d = dopt(data, opts, opts.dictionary ? 6 : 2, 4);
+    return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;
+  }
+  /**
+   * Expands Zlib data
+   * @param data The data to decompress
+   * @param opts The decompression options
+   * @returns The decompressed version of the data
+   */
+
+  function unzlibSync(data, opts) {
+    return inflt(data.subarray(zls(data, opts && opts.dictionary), -4), {
+      i: 2
+    }, opts && opts.out, opts && opts.dictionary);
+  } // Default algorithm for compression (used because having a known output size allows faster decompression)
+
+  var td = typeof TextDecoder != 'undefined' && /*#__PURE__*/new TextDecoder(); // text decoder stream
+
+  var tds = 0;
+
+  try {
+    td.decode(et, {
+      stream: true
+    });
+    tds = 1;
+  } catch (e) {} // decode UTF8
+
+  /**
+   * @license
+   * jsPDF filters PlugIn
+   * Copyright (c) 2014 Aras Abbasi
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+
+  (function (jsPDFAPI) {
+
+    var ASCII85Encode = function ASCII85Encode(a) {
+      var b, c, d, e, f, g, h, i, j, k; // eslint-disable-next-line no-control-regex
+
+      for (!/[^\x00-\xFF]/.test(a), b = "\x00\x00\x00\x00".slice(a.length % 4 || 4), a += b, c = [], d = 0, e = a.length; e > d; d += 4) {
+        f = (a.charCodeAt(d) << 24) + (a.charCodeAt(d + 1) << 16) + (a.charCodeAt(d + 2) << 8) + a.charCodeAt(d + 3), 0 !== f ? (k = f % 85, f = (f - k) / 85, j = f % 85, f = (f - j) / 85, i = f % 85, f = (f - i) / 85, h = f % 85, f = (f - h) / 85, g = f % 85, c.push(g + 33, h + 33, i + 33, j + 33, k + 33)) : c.push(122);
+      }
+
+      return function (a, b) {
+        for (var c = b; c > 0; c--) {
+          a.pop();
+        }
+      }(c, b.length), String.fromCharCode.apply(String, c) + "~>";
+    };
+
+    var ASCII85Decode = function ASCII85Decode(a) {
+      var c,
+          d,
+          e,
+          f,
+          g,
+          h = String,
+          l = "length",
+          w = 255,
+          x = "charCodeAt",
+          y = "slice",
+          z = "replace";
+
+      for ("~>" === a[y](-2), a = a[y](0, -2)[z](/\s/g, "")[z]("z", "!!!!!"), c = "uuuuu"[y](a[l] % 5 || 5), a += c, e = [], f = 0, g = a[l]; g > f; f += 5) {
+        d = 52200625 * (a[x](f) - 33) + 614125 * (a[x](f + 1) - 33) + 7225 * (a[x](f + 2) - 33) + 85 * (a[x](f + 3) - 33) + (a[x](f + 4) - 33), e.push(w & d >> 24, w & d >> 16, w & d >> 8, w & d);
+      }
+
+      return function (a, b) {
+        for (var c = b; c > 0; c--) {
+          a.pop();
+        }
+      }(e, c[l]), h.fromCharCode.apply(h, e);
+    };
+
+    var ASCIIHexEncode = function ASCIIHexEncode(value) {
+      return value.split("").map(function (value) {
+        return ("0" + value.charCodeAt().toString(16)).slice(-2);
+      }).join("") + ">";
+    };
+
+    var ASCIIHexDecode = function ASCIIHexDecode(value) {
+      var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);
+      value = value.replace(/\s/g, "");
+
+      if (value.indexOf(">") !== -1) {
+        value = value.substr(0, value.indexOf(">"));
+      }
+
+      if (value.length % 2) {
+        value += "0";
+      }
+
+      if (regexCheckIfHex.test(value) === false) {
+        return "";
+      }
+
+      var result = "";
+
+      for (var i = 0; i < value.length; i += 2) {
+        result += String.fromCharCode("0x" + (value[i] + value[i + 1]));
+      }
+
+      return result;
+    };
+    /*
+    var FlatePredictors = {
+        None: 1,
+        TIFF: 2,
+        PNG_None: 10,
+        PNG_Sub: 11,
+        PNG_Up: 12,
+        PNG_Average: 13,
+        PNG_Paeth: 14,
+        PNG_Optimum: 15
+    };
+    */
+
+
+    var FlateEncode = function FlateEncode(data) {
+      var arr = new Uint8Array(data.length);
+      var i = data.length;
+
+      while (i--) {
+        arr[i] = data.charCodeAt(i);
+      }
+
+      arr = zlibSync(arr);
+      data = arr.reduce(function (data, byte) {
+        return data + String.fromCharCode(byte);
+      }, "");
+      return data;
+    };
+
+    jsPDFAPI.processDataByFilters = function (origData, filterChain) {
+
+      var i = 0;
+      var data = origData || "";
+      var reverseChain = [];
+      filterChain = filterChain || [];
+
+      if (typeof filterChain === "string") {
+        filterChain = [filterChain];
+      }
+
+      for (i = 0; i < filterChain.length; i += 1) {
+        switch (filterChain[i]) {
+          case "ASCII85Decode":
+          case "/ASCII85Decode":
+            data = ASCII85Decode(data);
+            reverseChain.push("/ASCII85Encode");
+            break;
+
+          case "ASCII85Encode":
+          case "/ASCII85Encode":
+            data = ASCII85Encode(data);
+            reverseChain.push("/ASCII85Decode");
+            break;
+
+          case "ASCIIHexDecode":
+          case "/ASCIIHexDecode":
+            data = ASCIIHexDecode(data);
+            reverseChain.push("/ASCIIHexEncode");
+            break;
+
+          case "ASCIIHexEncode":
+          case "/ASCIIHexEncode":
+            data = ASCIIHexEncode(data);
+            reverseChain.push("/ASCIIHexDecode");
+            break;
+
+          case "FlateEncode":
+          case "/FlateEncode":
+            data = FlateEncode(data);
+            reverseChain.push("/FlateDecode");
+            break;
+
+          default:
+            throw new Error('The filter: "' + filterChain[i] + '" is not implemented');
+        }
+      }
+
+      return {
+        data: data,
+        reverseChain: reverseChain.reverse().join(" ")
+      };
+    };
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * jsPDF fileloading PlugIn
+   * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * @name fileloading
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+    /**
+     * @name loadFile
+     * @function
+     * @param {string} url
+     * @param {boolean} sync
+     * @param {function} callback
+     * @returns {string|undefined} result
+     */
+
+    jsPDFAPI.loadFile = function (url, sync, callback) {
+      return browserRequest(url, sync, callback);
+    };
+    /**
+     * @name loadImageFile
+     * @function
+     * @param {string} path
+     * @param {boolean} sync
+     * @param {function} callback
+     */
+
+
+    jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;
+
+    function browserRequest(url, sync, callback) {
+      sync = sync === false ? false : true;
+      callback = typeof callback === "function" ? callback : function () {};
+      var result = undefined;
+
+      var xhr = function xhr(url, sync, callback) {
+        var request = new XMLHttpRequest();
+        var i = 0;
+
+        var sanitizeUnicode = function sanitizeUnicode(data) {
+          var dataLength = data.length;
+          var charArray = [];
+          var StringFromCharCode = String.fromCharCode; //Transform Unicode to ASCII
+
+          for (i = 0; i < dataLength; i += 1) {
+            charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff));
+          }
+
+          return charArray.join("");
+        };
+
+        request.open("GET", url, !sync); // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]
+
+        request.overrideMimeType("text/plain; charset=x-user-defined");
+
+        if (sync === false) {
+          request.onload = function () {
+            if (request.status === 200) {
+              callback(sanitizeUnicode(this.responseText));
+            } else {
+              callback(undefined);
+            }
+          };
+        }
+
+        request.send(null);
+
+        if (sync && request.status === 200) {
+          return sanitizeUnicode(request.responseText);
+        }
+      };
+
+      try {
+        result = xhr(url, sync, callback); // eslint-disable-next-line no-empty
+      } catch (e) {}
+
+      return result;
+    }
+  })(jsPDF.API);
+
+  /**
+   * jsPDF html PlugIn
+   *
+   * @name html
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    function loadHtml2Canvas() {
+      return function () {
+        if (globalObject["html2canvas"]) {
+          return Promise.resolve(globalObject["html2canvas"]);
+        }
+
+        if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") {
+          return new Promise(function (resolve, reject) {
+            try {
+              resolve(require("html2canvas"));
+            } catch (e) {
+              reject(e);
+            }
+          });
+        }
+
+        if (typeof define === "function" && define.amd) {
+          return new Promise(function (resolve, reject) {
+            try {
+              require(["html2canvas"], resolve);
+            } catch (e) {
+              reject(e);
+            }
+          });
+        }
+
+        return Promise.reject(new Error("Could not load html2canvas"));
+      }().catch(function (e) {
+        return Promise.reject(new Error("Could not load html2canvas: " + e));
+      }).then(function (html2canvas) {
+        return html2canvas.default ? html2canvas.default : html2canvas;
+      });
+    }
+
+    function loadDomPurify() {
+      return function () {
+        if (globalObject["DOMPurify"]) {
+          return Promise.resolve(globalObject["DOMPurify"]);
+        }
+
+        if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") {
+          return new Promise(function (resolve, reject) {
+            try {
+              resolve(require("dompurify"));
+            } catch (e) {
+              reject(e);
+            }
+          });
+        }
+
+        if (typeof define === "function" && define.amd) {
+          return new Promise(function (resolve, reject) {
+            try {
+              require(["dompurify"], resolve);
+            } catch (e) {
+              reject(e);
+            }
+          });
+        }
+
+        return Promise.reject(new Error("Could not load dompurify"));
+      }().catch(function (e) {
+        return Promise.reject(new Error("Could not load dompurify: " + e));
+      }).then(function (dompurify) {
+        return dompurify.default ? dompurify.default : dompurify;
+      });
+    }
+    /**
+     * Determine the type of a variable/object.
+     *
+     * @private
+     * @ignore
+     */
+
+
+    var objType = function objType(obj) {
+      var type = _typeof(obj);
+
+      if (type === "undefined") return "undefined";else if (type === "string" || obj instanceof String) return "string";else if (type === "number" || obj instanceof Number) return "number";else if (type === "function" || obj instanceof Function) return "function";else if (!!obj && obj.constructor === Array) return "array";else if (obj && obj.nodeType === 1) return "element";else if (type === "object") return "object";else return "unknown";
+    };
+    /**
+     * Create an HTML element with optional className, innerHTML, and style.
+     *
+     * @private
+     * @ignore
+     */
+
+
+    var createElement = function createElement(tagName, opt) {
+      var el = document.createElement(tagName);
+      if (opt.className) el.className = opt.className;
+
+      if (opt.innerHTML && opt.dompurify) {
+        el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);
+      }
+
+      for (var key in opt.style) {
+        el.style[key] = opt.style[key];
+      }
+
+      return el;
+    };
+    /**
+     * Deep-clone a node and preserve contents/properties.
+     *
+     * @private
+     * @ignore
+     */
+
+
+    var cloneNode = function cloneNode(node, javascriptEnabled) {
+      // Recursively clone the node.
+      var clone = node.nodeType === 3 ? document.createTextNode(node.nodeValue) : node.cloneNode(false);
+
+      for (var child = node.firstChild; child; child = child.nextSibling) {
+        if (javascriptEnabled === true || child.nodeType !== 1 || child.nodeName !== "SCRIPT") {
+          clone.appendChild(cloneNode(child, javascriptEnabled));
+        }
+      }
+
+      if (node.nodeType === 1) {
+        // Preserve contents/properties of special nodes.
+        if (node.nodeName === "CANVAS") {
+          clone.width = node.width;
+          clone.height = node.height;
+          clone.getContext("2d").drawImage(node, 0, 0);
+        } else if (node.nodeName === "TEXTAREA" || node.nodeName === "SELECT") {
+          clone.value = node.value;
+        } // Preserve the node's scroll position when it loads.
+
+
+        clone.addEventListener("load", function () {
+          clone.scrollTop = node.scrollTop;
+          clone.scrollLeft = node.scrollLeft;
+        }, true);
+      } // Return the cloned node.
+
+
+      return clone;
+    };
+    /* ----- CONSTRUCTOR ----- */
+
+
+    var Worker = function Worker(opt) {
+      // Create the root parent for the proto chain, and the starting Worker.
+      var root = Object.assign(Worker.convert(Promise.resolve()), JSON.parse(JSON.stringify(Worker.template)));
+      var self = Worker.convert(Promise.resolve(), root); // Set progress, optional settings, and return.
+
+      self = self.setProgress(1, Worker, 1, [Worker]);
+      self = self.set(opt);
+      return self;
+    }; // Boilerplate for subclassing Promise.
+
+
+    Worker.prototype = Object.create(Promise.prototype);
+    Worker.prototype.constructor = Worker; // Converts/casts promises into Workers.
+
+    Worker.convert = function convert(promise, inherit) {
+      // Uses prototypal inheritance to receive changes made to ancestors' properties.
+      promise.__proto__ = inherit || Worker.prototype;
+      return promise;
+    };
+
+    Worker.template = {
+      prop: {
+        src: null,
+        container: null,
+        overlay: null,
+        canvas: null,
+        img: null,
+        pdf: null,
+        pageSize: null,
+        callback: function callback() {}
+      },
+      progress: {
+        val: 0,
+        state: null,
+        n: 0,
+        stack: []
+      },
+      opt: {
+        filename: "file.pdf",
+        margin: [0, 0, 0, 0],
+        enableLinks: true,
+        x: 0,
+        y: 0,
+        html2canvas: {},
+        jsPDF: {},
+        backgroundColor: "transparent"
+      }
+    };
+    /* ----- FROM / TO ----- */
+
+    Worker.prototype.from = function from(src, type) {
+      function getType(src) {
+        switch (objType(src)) {
+          case "string":
+            return "string";
+
+          case "element":
+            return src.nodeName.toLowerCase() === "canvas" ? "canvas" : "element";
+
+          default:
+            return "unknown";
+        }
+      }
+
+      return this.then(function from_main() {
+        type = type || getType(src);
+
+        switch (type) {
+          case "string":
+            return this.then(loadDomPurify).then(function (dompurify) {
+              return this.set({
+                src: createElement("div", {
+                  innerHTML: src,
+                  dompurify: dompurify
+                })
+              });
+            });
+
+          case "element":
+            return this.set({
+              src: src
+            });
+
+          case "canvas":
+            return this.set({
+              canvas: src
+            });
+
+          case "img":
+            return this.set({
+              img: src
+            });
+
+          default:
+            return this.error("Unknown source type.");
+        }
+      });
+    };
+
+    Worker.prototype.to = function to(target) {
+      // Route the 'to' request to the appropriate method.
+      switch (target) {
+        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.");
+      }
+    };
+
+    Worker.prototype.toContainer = function toContainer() {
+      // Set up function prerequisites.
+      var prereqs = [function checkSrc() {
+        return this.prop.src || this.error("Cannot duplicate - no source HTML.");
+      }, function checkPageSize() {
+        return this.prop.pageSize || this.setPageSize();
+      }];
+      return this.thenList(prereqs).then(function toContainer_main() {
+        // Define the CSS styles for the container and its overlay parent.
+        var overlayCSS = {
+          position: "fixed",
+          overflow: "hidden",
+          zIndex: 1000,
+          left: "-100000px",
+          right: 0,
+          bottom: 0,
+          top: 0
+        };
+        var containerCSS = {
+          position: "relative",
+          display: "inline-block",
+          width: (typeof this.opt.width === "number" && !isNaN(this.opt.width) && typeof this.opt.windowWidth === "number" && !isNaN(this.opt.windowWidth) ? this.opt.windowWidth : Math.max(this.prop.src.clientWidth, this.prop.src.scrollWidth, this.prop.src.offsetWidth)) + "px",
+          left: 0,
+          right: 0,
+          top: 0,
+          margin: "auto",
+          backgroundColor: this.opt.backgroundColor
+        }; // Set the overlay to hidden (could be changed in the future to provide a print preview).
+
+        var source = cloneNode(this.prop.src, this.opt.html2canvas.javascriptEnabled);
+
+        if (source.tagName === "BODY") {
+          containerCSS.height = Math.max(document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight) + "px";
+        }
+
+        this.prop.overlay = createElement("div", {
+          className: "html2pdf__overlay",
+          style: overlayCSS
+        });
+        this.prop.container = createElement("div", {
+          className: "html2pdf__container",
+          style: containerCSS
+        });
+        this.prop.container.appendChild(source);
+        this.prop.container.firstChild.appendChild(createElement("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";
+      });
+    };
+
+    Worker.prototype.toCanvas = function toCanvas() {
+      // Set up function prerequisites.
+      var prereqs = [function checkContainer() {
+        return document.body.contains(this.prop.container) || this.toContainer();
+      }]; // Fulfill prereqs then create the canvas.
+
+      return this.thenList(prereqs).then(loadHtml2Canvas).then(function toCanvas_main(html2canvas) {
+        // Handle old-fashioned 'onrendered' argument.
+        var options = Object.assign({}, this.opt.html2canvas);
+        delete options.onrendered;
+        return html2canvas(this.prop.container, options);
+      }).then(function toCanvas_post(canvas) {
+        // Handle old-fashioned 'onrendered' argument.
+        var onRendered = this.opt.html2canvas.onrendered || function () {};
+
+        onRendered(canvas);
+        this.prop.canvas = canvas;
+        document.body.removeChild(this.prop.overlay);
+      });
+    };
+
+    Worker.prototype.toContext2d = function toContext2d() {
+      // Set up function prerequisites.
+      var prereqs = [function checkContainer() {
+        return document.body.contains(this.prop.container) || this.toContainer();
+      }]; // Fulfill prereqs then create the canvas.
+
+      return this.thenList(prereqs).then(loadHtml2Canvas).then(function toContext2d_main(html2canvas) {
+        // Handle old-fashioned 'onrendered' argument.
+        var pdf = this.opt.jsPDF;
+        var fontFaces = this.opt.fontFaces;
+        var scale = typeof this.opt.width === "number" && !isNaN(this.opt.width) && typeof this.opt.windowWidth === "number" && !isNaN(this.opt.windowWidth) ? this.opt.width / this.opt.windowWidth : 1;
+        var options = Object.assign({
+          async: true,
+          allowTaint: true,
+          scale: scale,
+          scrollX: this.opt.scrollX || 0,
+          scrollY: this.opt.scrollY || 0,
+          backgroundColor: "#ffffff",
+          imageTimeout: 15000,
+          logging: true,
+          proxy: null,
+          removeContainer: true,
+          foreignObjectRendering: false,
+          useCORS: false
+        }, this.opt.html2canvas);
+        delete options.onrendered;
+        pdf.context2d.autoPaging = typeof this.opt.autoPaging === "undefined" ? true : this.opt.autoPaging;
+        pdf.context2d.posX = this.opt.x;
+        pdf.context2d.posY = this.opt.y;
+        pdf.context2d.margin = this.opt.margin;
+        pdf.context2d.fontFaces = fontFaces;
+
+        if (fontFaces) {
+          for (var i = 0; i < fontFaces.length; ++i) {
+            var font = fontFaces[i];
+            var src = font.src.find(function (src) {
+              return src.format === "truetype";
+            });
+
+            if (src) {
+              pdf.addFont(src.url, font.ref.name, font.ref.style);
+            }
+          }
+        }
+
+        options.windowHeight = options.windowHeight || 0;
+        options.windowHeight = options.windowHeight == 0 ? Math.max(this.prop.container.clientHeight, this.prop.container.scrollHeight, this.prop.container.offsetHeight) : options.windowHeight;
+        pdf.context2d.save(true);
+        return html2canvas(this.prop.container, options);
+      }).then(function toContext2d_post(canvas) {
+        this.opt.jsPDF.context2d.restore(true); // Handle old-fashioned 'onrendered' argument.
+
+        var onRendered = this.opt.html2canvas.onrendered || function () {};
+
+        onRendered(canvas);
+        this.prop.canvas = canvas;
+        document.body.removeChild(this.prop.overlay);
+      });
+    };
+
+    Worker.prototype.toImg = function toImg() {
+      // Set up function prerequisites.
+      var prereqs = [function checkCanvas() {
+        return this.prop.canvas || this.toCanvas();
+      }]; // Fulfill prereqs then create the image.
+
+      return this.thenList(prereqs).then(function toImg_main() {
+        var imgData = this.prop.canvas.toDataURL("image/" + this.opt.image.type, this.opt.image.quality);
+        this.prop.img = document.createElement("img");
+        this.prop.img.src = imgData;
+      });
+    };
+
+    Worker.prototype.toPdf = function toPdf() {
+      // Set up function prerequisites.
+      var prereqs = [function checkContext2d() {
+        return this.toContext2d();
+      } //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }
+      ]; // Fulfill prereqs then create the image.
+
+      return this.thenList(prereqs).then(function toPdf_main() {
+        // Create local copies of frequently used properties.
+        this.prop.pdf = this.prop.pdf || this.opt.jsPDF;
+      });
+    };
+    /* ----- OUTPUT / SAVE ----- */
+
+
+    Worker.prototype.output = function output(type, options, src) {
+      // Redirect requests to the correct function (outputPdf / outputImg).
+      src = src || "pdf";
+
+      if (src.toLowerCase() === "img" || src.toLowerCase() === "image") {
+        return this.outputImg(type, options);
+      } else {
+        return this.outputPdf(type, options);
+      }
+    };
+
+    Worker.prototype.outputPdf = function outputPdf(type, options) {
+      // Set up function prerequisites.
+      var prereqs = [function checkPdf() {
+        return this.prop.pdf || this.toPdf();
+      }]; // Fulfill prereqs then perform the appropriate output.
+
+      return this.thenList(prereqs).then(function outputPdf_main() {
+        /* Currently implemented output types:
+         *    https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992
+         *  save(options), arraybuffer, blob, bloburi/bloburl,
+         *  datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl
+         */
+        return this.prop.pdf.output(type, options);
+      });
+    };
+
+    Worker.prototype.outputImg = function outputImg(type) {
+      // Set up function prerequisites.
+      var prereqs = [function checkImg() {
+        return this.prop.img || this.toImg();
+      }]; // Fulfill prereqs then perform the appropriate output.
+
+      return this.thenList(prereqs).then(function outputImg_main() {
+        switch (type) {
+          case undefined:
+          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 "' + type + '" is not supported.';
+        }
+      });
+    };
+
+    Worker.prototype.save = function save(filename) {
+      // Set up function prerequisites.
+      var prereqs = [function checkPdf() {
+        return this.prop.pdf || this.toPdf();
+      }]; // Fulfill prereqs, update the filename (if provided), and save the PDF.
+
+      return this.thenList(prereqs).set(filename ? {
+        filename: filename
+      } : null).then(function save_main() {
+        this.prop.pdf.save(this.opt.filename);
+      });
+    };
+
+    Worker.prototype.doCallback = function doCallback() {
+      // Set up function prerequisites.
+      var prereqs = [function checkPdf() {
+        return this.prop.pdf || this.toPdf();
+      }]; // Fulfill prereqs, update the filename (if provided), and save the PDF.
+
+      return this.thenList(prereqs).then(function doCallback_main() {
+        this.prop.callback(this.prop.pdf);
+      });
+    };
+    /* ----- SET / GET ----- */
+
+
+    Worker.prototype.set = function set(opt) {
+      // TODO: Implement ordered pairs?
+      // Silently ignore invalid or empty input.
+      if (objType(opt) !== "object") {
+        return this;
+      } // Build an array of setter functions to queue.
+
+
+      var fns = Object.keys(opt || {}).map(function (key) {
+        if (key in Worker.template.prop) {
+          // Set pre-defined properties.
+          return function set_prop() {
+            this.prop[key] = opt[key];
+          };
+        } else {
+          switch (key) {
+            case "margin":
+              return this.setMargin.bind(this, opt.margin);
+
+            case "jsPDF":
+              return function set_jsPDF() {
+                this.opt.jsPDF = opt.jsPDF;
+                return this.setPageSize();
+              };
+
+            case "pageSize":
+              return this.setPageSize.bind(this, opt.pageSize);
+
+            default:
+              // Set any other properties in opt.
+              return function set_opt() {
+                this.opt[key] = opt[key];
+              };
+          }
+        }
+      }, this); // Set properties within the promise chain.
+
+      return this.then(function set_main() {
+        return this.thenList(fns);
+      });
+    };
+
+    Worker.prototype.get = function get(key, cbk) {
+      return this.then(function get_main() {
+        // Fetch the requested property, either as a predefined prop or in opt.
+        var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];
+        return cbk ? cbk(val) : val;
+      });
+    };
+
+    Worker.prototype.setMargin = function setMargin(margin) {
+      return this.then(function setMargin_main() {
+        // Parse the margin property.
+        switch (objType(margin)) {
+          case "number":
+            margin = [margin, margin, margin, margin];
+          // eslint-disable-next-line no-fallthrough
+
+          case "array":
+            if (margin.length === 2) {
+              margin = [margin[0], margin[1], margin[0], margin[1]];
+            }
+
+            if (margin.length === 4) {
+              break;
+            }
+
+          // eslint-disable-next-line no-fallthrough
+
+          default:
+            return this.error("Invalid margin array.");
+        } // Set the margin property, then update pageSize.
+
+
+        this.opt.margin = margin;
+      }).then(this.setPageSize);
+    };
+
+    Worker.prototype.setPageSize = function setPageSize(pageSize) {
+      function toPx(val, k) {
+        return Math.floor(val * k / 72 * 96);
+      }
+
+      return this.then(function setPageSize_main() {
+        // Retrieve page-size based on jsPDF settings, if not explicitly provided.
+        pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF); // Add 'inner' field if not present.
+
+        if (!pageSize.hasOwnProperty("inner")) {
+          pageSize.inner = {
+            width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],
+            height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]
+          };
+          pageSize.inner.px = {
+            width: toPx(pageSize.inner.width, pageSize.k),
+            height: toPx(pageSize.inner.height, pageSize.k)
+          };
+          pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;
+        } // Attach pageSize to this.
+
+
+        this.prop.pageSize = pageSize;
+      });
+    };
+
+    Worker.prototype.setProgress = function setProgress(val, state, n, stack) {
+      // Immediately update all progress values.
+      if (val != null) this.progress.val = val;
+      if (state != null) this.progress.state = state;
+      if (n != null) this.progress.n = n;
+      if (stack != null) this.progress.stack = stack;
+      this.progress.ratio = this.progress.val / this.progress.state; // Return this for command chaining.
+
+      return this;
+    };
+
+    Worker.prototype.updateProgress = function updateProgress(val, state, n, stack) {
+      // Immediately update all progress values, using setProgress.
+      return this.setProgress(val ? this.progress.val + val : null, state ? state : null, n ? this.progress.n + n : null, stack ? this.progress.stack.concat(stack) : null);
+    };
+    /* ----- PROMISE MAPPING ----- */
+
+
+    Worker.prototype.then = function then(onFulfilled, onRejected) {
+      // Wrap `this` for encapsulation.
+      var self = this;
+      return this.thenCore(onFulfilled, onRejected, function then_main(onFulfilled, onRejected) {
+        // Update progress while queuing, calling, and resolving `then`.
+        self.updateProgress(null, null, 1, [onFulfilled]);
+        return Promise.prototype.then.call(this, function then_pre(val) {
+          self.updateProgress(null, onFulfilled);
+          return val;
+        }).then(onFulfilled, onRejected).then(function then_post(val) {
+          self.updateProgress(1);
+          return val;
+        });
+      });
+    };
+
+    Worker.prototype.thenCore = function thenCore(onFulfilled, onRejected, thenBase) {
+      // Handle optional thenBase parameter.
+      thenBase = thenBase || Promise.prototype.then; // Wrap `this` for encapsulation and bind it to the promise handlers.
+
+      var self = this;
+
+      if (onFulfilled) {
+        onFulfilled = onFulfilled.bind(self);
+      }
+
+      if (onRejected) {
+        onRejected = onRejected.bind(self);
+      } // Cast self into a Promise to avoid polyfills recursively defining `then`.
+
+
+      var isNative = Promise.toString().indexOf("[native code]") !== -1 && Promise.name === "Promise";
+      var selfPromise = isNative ? self : Worker.convert(Object.assign({}, self), Promise.prototype); // Return the promise, after casting it into a Worker and preserving props.
+
+      var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);
+      return Worker.convert(returnVal, self.__proto__);
+    };
+
+    Worker.prototype.thenExternal = function thenExternal(onFulfilled, onRejected) {
+      // Call `then` and return a standard promise (exits the Worker chain).
+      return Promise.prototype.then.call(this, onFulfilled, onRejected);
+    };
+
+    Worker.prototype.thenList = function thenList(fns) {
+      // Queue a series of promise 'factories' into the promise chain.
+      var self = this;
+      fns.forEach(function thenList_forEach(fn) {
+        self = self.thenCore(fn);
+      });
+      return self;
+    };
+
+    Worker.prototype["catch"] = function (onRejected) {
+      // Bind `this` to the promise handler, call `catch`, and return a Worker.
+      if (onRejected) {
+        onRejected = onRejected.bind(this);
+      }
+
+      var returnVal = Promise.prototype["catch"].call(this, onRejected);
+      return Worker.convert(returnVal, this);
+    };
+
+    Worker.prototype.catchExternal = function catchExternal(onRejected) {
+      // Call `catch` and return a standard promise (exits the Worker chain).
+      return Promise.prototype["catch"].call(this, onRejected);
+    };
+
+    Worker.prototype.error = function error(msg) {
+      // Throw the error in the Promise chain.
+      return this.then(function error_main() {
+        throw new Error(msg);
+      });
+    };
+    /* ----- ALIASES ----- */
+
+
+    Worker.prototype.using = Worker.prototype.set;
+    Worker.prototype.saveAs = Worker.prototype.save;
+    Worker.prototype.export = Worker.prototype.output;
+    Worker.prototype.run = Worker.prototype.then; // Get dimensions of a PDF page, as determined by jsPDF.
+
+    jsPDF.getPageSize = function (orientation, unit, format) {
+      // Decode options object
+      if (_typeof(orientation) === "object") {
+        var options = orientation;
+        orientation = options.orientation;
+        unit = options.unit || unit;
+        format = options.format || format;
+      } // Default options
+
+
+      unit = unit || "mm";
+      format = format || "a4";
+      orientation = ("" + (orientation || "P")).toLowerCase();
+      var format_as_string = ("" + format).toLowerCase(); // Size in pt of various paper formats
+
+      var pageFormats = {
+        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]
+      };
+      var k; // Unit conversion
+
+      switch (unit) {
+        case "pt":
+          k = 1;
+          break;
+
+        case "mm":
+          k = 72 / 25.4;
+          break;
+
+        case "cm":
+          k = 72 / 2.54;
+          break;
+
+        case "in":
+          k = 72;
+          break;
+
+        case "px":
+          k = 72 / 96;
+          break;
+
+        case "pc":
+          k = 12;
+          break;
+
+        case "em":
+          k = 12;
+          break;
+
+        case "ex":
+          k = 6;
+          break;
+
+        default:
+          throw "Invalid unit: " + unit;
+      }
+
+      var pageHeight = 0;
+      var pageWidth = 0; // Dimensions are stored as user units and converted to points on output
+
+      if (pageFormats.hasOwnProperty(format_as_string)) {
+        pageHeight = pageFormats[format_as_string][1] / k;
+        pageWidth = pageFormats[format_as_string][0] / k;
+      } else {
+        try {
+          pageHeight = format[1];
+          pageWidth = format[0];
+        } catch (err) {
+          throw new Error("Invalid format: " + format);
+        }
+      }
+
+      var tmp; // Handle page orientation
+
+      if (orientation === "p" || orientation === "portrait") {
+        orientation = "p";
+
+        if (pageWidth > pageHeight) {
+          tmp = pageWidth;
+          pageWidth = pageHeight;
+          pageHeight = tmp;
+        }
+      } else if (orientation === "l" || orientation === "landscape") {
+        orientation = "l";
+
+        if (pageHeight > pageWidth) {
+          tmp = pageWidth;
+          pageWidth = pageHeight;
+          pageHeight = tmp;
+        }
+      } else {
+        throw "Invalid orientation: " + orientation;
+      } // Return information (k is the unit conversion ratio from pts)
+
+
+      var info = {
+        width: pageWidth,
+        height: pageHeight,
+        unit: unit,
+        k: k,
+        orientation: orientation
+      };
+      return info;
+    };
+    /**
+     * @typedef FontFace
+     *
+     * The font-face type implements an interface similar to that of the font-face CSS rule,
+     * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D
+     * is updated.
+     *
+     * All properties expect values similar to those in the font-face CSS rule. A difference
+     * is the font-family, which do not need to be enclosed in double-quotes when containing
+     * spaces like in CSS.
+     *
+     * @property {string} family The name of the font-family.
+     * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.
+     * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)
+     * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.
+     * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.
+     * @property {string} [src] url A URL to a font of a specific format.
+     * @property {string} [src] format Format of the font referenced by the URL.
+     */
+
+    /**
+     * Generate a PDF from an HTML element or string using.
+     *
+     * @name html
+     * @function
+     * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.
+     * @param {Object} [options] Collection of settings
+     * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance
+     * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.
+     * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.
+     * <ul>
+     * <li>
+     *   <code>false</code>: Auto paging is disabled.
+     * </li>
+     * <li>
+     *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly
+     *   slice text in half, making it difficult to read.
+     * </li>
+     * <li>
+     *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting
+     *   mostly of a single column of text.
+     * </li>
+     * </ul>
+     * Default is <code>true</code>.
+     * @param {string} [options.filename] name of the file
+     * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image
+     * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options
+     * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.
+     * @param {jsPDF} [options.jsPDF] jsPDF instance
+     * @param {number=} [options.x] x position on the PDF document in jsPDF units.
+     * @param {number=} [options.y] y position on the PDF document in jsPDF units.
+     * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be
+     * scaled such that it fits into the specified width. Has no effect if either the <code>html2canvas.scale<code> is
+     * specified or the <code>windowWidth</code> option is NOT specified.
+     * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the
+     * <code>html2canvas.windowWidth</code> option, this option affects the actual container size while rendering and
+     * does NOT affect CSS media queries. This option only has an effect, if the <code>width<code> option is also specified.
+     *
+     * @example
+     * var doc = new jsPDF();
+     *
+     * doc.html(document.body, {
+     *    callback: function (doc) {
+     *      doc.save();
+     *    },
+     *    x: 10,
+     *    y: 10
+     * });
+     */
+
+
+    jsPDFAPI.html = function (src, options) {
+
+      options = options || {};
+
+      options.callback = options.callback || function () {};
+
+      options.html2canvas = options.html2canvas || {};
+      options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;
+      options.jsPDF = options.jsPDF || this;
+      options.fontFaces = options.fontFaces ? options.fontFaces.map(normalizeFontFace) : null; // Create a new worker with the given options.
+
+      var worker = new Worker(options);
+
+      if (!options.worker) {
+        // If worker is not set to true, perform the traditional 'simple' operation.
+        return worker.from(src).doCallback();
+      } else {
+        // Otherwise, return the worker for new Promise-based operation.
+        return worker;
+      }
+    };
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * ====================================================================
+   * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining
+   * a copy of this software and associated documentation files (the
+   * "Software"), to deal in the Software without restriction, including
+   * without limitation the rights to use, copy, modify, merge, publish,
+   * distribute, sublicense, and/or sell copies of the Software, and to
+   * permit persons to whom the Software is furnished to do so, subject to
+   * the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be
+   * included in all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   * ====================================================================
+   */
+  /**
+   * jsPDF JavaScript plugin
+   *
+   * @name javascript
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    var jsNamesObj, jsJsObj, text;
+    /**
+     * @name addJS
+     * @function
+     * @param {string} javascript The javascript to be embedded into the PDF-file.
+     * @returns {jsPDF}
+     */
+
+    jsPDFAPI.addJS = function (javascript) {
+      text = javascript;
+      this.internal.events.subscribe("postPutResources", function () {
+        jsNamesObj = this.internal.newObject();
+        this.internal.out("<<");
+        this.internal.out("/Names [(EmbeddedJS) " + (jsNamesObj + 1) + " 0 R]");
+        this.internal.out(">>");
+        this.internal.out("endobj");
+        jsJsObj = this.internal.newObject();
+        this.internal.out("<<");
+        this.internal.out("/S /JavaScript");
+        this.internal.out("/JS (" + text + ")");
+        this.internal.out(">>");
+        this.internal.out("endobj");
+      });
+      this.internal.events.subscribe("putCatalog", function () {
+        if (jsNamesObj !== undefined && jsJsObj !== undefined) {
+          this.internal.out("/Names <</JavaScript " + jsNamesObj + " 0 R>>");
+        }
+      });
+      return this;
+    };
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * jsPDF Outline PlugIn
+   *
+   * Generates a PDF Outline
+   * @name outline
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    var namesOid; //var destsGoto = [];
+
+    jsPDFAPI.events.push(["postPutResources", function () {
+      var pdf = this;
+      var rx = /^(\d+) 0 obj$/; // Write action goto objects for each page
+      // this.outline.destsGoto = [];
+      // for (var i = 0; i < totalPages; i++) {
+      // var id = pdf.internal.newObject();
+      // this.outline.destsGoto.push(id);
+      // pdf.internal.write("<</D[" + (i * 2 + 3) + " 0 R /XYZ null
+      // null null]/S/GoTo>> endobj");
+      // }
+      //
+      // for (var i = 0; i < dests.length; i++) {
+      // pdf.internal.write("(page_" + (i + 1) + ")" + dests[i] + " 0
+      // R");
+      // }
+      //
+
+      if (this.outline.root.children.length > 0) {
+        var lines = pdf.outline.render().split(/\r\n/);
+
+        for (var i = 0; i < lines.length; i++) {
+          var line = lines[i];
+          var m = rx.exec(line);
+
+          if (m != null) {
+            var oid = m[1];
+            pdf.internal.newObjectDeferredBegin(oid, false);
+          }
+
+          pdf.internal.write(line);
+        }
+      } // This code will write named destination for each page reference
+      // (page_1, etc)
+
+
+      if (this.outline.createNamedDestinations) {
+        var totalPages = this.internal.pages.length; // WARNING: this assumes jsPDF starts on page 3 and pageIDs
+        // follow 5, 7, 9, etc
+        // Write destination objects for each page
+
+        var dests = [];
+
+        for (var i = 0; i < totalPages; i++) {
+          var id = pdf.internal.newObject();
+          dests.push(id);
+          var info = pdf.internal.getPageInfo(i + 1);
+          pdf.internal.write("<< /D[" + info.objId + " 0 R /XYZ null null null]>> endobj");
+        } // assign a name for each destination
+
+
+        var names2Oid = pdf.internal.newObject();
+        pdf.internal.write("<< /Names [ ");
+
+        for (var i = 0; i < dests.length; i++) {
+          pdf.internal.write("(page_" + (i + 1) + ")" + dests[i] + " 0 R");
+        }
+
+        pdf.internal.write(" ] >>", "endobj"); // var kids = pdf.internal.newObject();
+        // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');
+        // pdf.internal.write(' ] >>', 'endobj');
+
+        namesOid = pdf.internal.newObject();
+        pdf.internal.write("<< /Dests " + names2Oid + " 0 R");
+        pdf.internal.write(">>", "endobj");
+      }
+    }]);
+    jsPDFAPI.events.push(["putCatalog", function () {
+      var pdf = this;
+
+      if (pdf.outline.root.children.length > 0) {
+        pdf.internal.write("/Outlines", this.outline.makeRef(this.outline.root));
+
+        if (this.outline.createNamedDestinations) {
+          pdf.internal.write("/Names " + namesOid + " 0 R");
+        } // Open with Bookmarks showing
+        // pdf.internal.write("/PageMode /UseOutlines");
+
+      }
+    }]);
+    jsPDFAPI.events.push(["initialized", function () {
+      var pdf = this;
+      pdf.outline = {
+        createNamedDestinations: false,
+        root: {
+          children: []
+        }
+      };
+      /**
+       * Options: pageNumber
+       */
+
+      pdf.outline.add = function (parent, title, options) {
+        var item = {
+          title: title,
+          options: options,
+          children: []
+        };
+
+        if (parent == null) {
+          parent = this.root;
+        }
+
+        parent.children.push(item);
+        return item;
+      };
+
+      pdf.outline.render = function () {
+        this.ctx = {};
+        this.ctx.val = "";
+        this.ctx.pdf = pdf;
+        this.genIds_r(this.root);
+        this.renderRoot(this.root);
+        this.renderItems(this.root);
+        return this.ctx.val;
+      };
+
+      pdf.outline.genIds_r = function (node) {
+        node.id = pdf.internal.newObjectDeferred();
+
+        for (var i = 0; i < node.children.length; i++) {
+          this.genIds_r(node.children[i]);
+        }
+      };
+
+      pdf.outline.renderRoot = function (node) {
+        this.objStart(node);
+        this.line("/Type /Outlines");
+
+        if (node.children.length > 0) {
+          this.line("/First " + this.makeRef(node.children[0]));
+          this.line("/Last " + this.makeRef(node.children[node.children.length - 1]));
+        }
+
+        this.line("/Count " + this.count_r({
+          count: 0
+        }, node));
+        this.objEnd();
+      };
+
+      pdf.outline.renderItems = function (node) {
+        var getVerticalCoordinateString = this.ctx.pdf.internal.getVerticalCoordinateString;
+
+        for (var i = 0; i < node.children.length; i++) {
+          var item = node.children[i];
+          this.objStart(item);
+          this.line("/Title " + this.makeString(item.title));
+          this.line("/Parent " + this.makeRef(node));
+
+          if (i > 0) {
+            this.line("/Prev " + this.makeRef(node.children[i - 1]));
+          }
+
+          if (i < node.children.length - 1) {
+            this.line("/Next " + this.makeRef(node.children[i + 1]));
+          }
+
+          if (item.children.length > 0) {
+            this.line("/First " + this.makeRef(item.children[0]));
+            this.line("/Last " + this.makeRef(item.children[item.children.length - 1]));
+          }
+
+          var count = this.count = this.count_r({
+            count: 0
+          }, item);
+
+          if (count > 0) {
+            this.line("/Count " + count);
+          }
+
+          if (item.options) {
+            if (item.options.pageNumber) {
+              // Explicit Destination
+              //WARNING this assumes page ids are 3,5,7, etc.
+              var info = pdf.internal.getPageInfo(item.options.pageNumber);
+              this.line("/Dest " + "[" + info.objId + " 0 R /XYZ 0 " + getVerticalCoordinateString(0) + " 0]"); // this line does not work on all clients (pageNumber instead of page ref)
+              //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');
+              // Named Destination
+              // this.line('/Dest (page_' + (item.options.pageNumber) + ')');
+              // Action Destination
+              // var id = pdf.internal.newObject();
+              // pdf.internal.write('<</D[' + (item.options.pageNumber - 1) + ' /XYZ null null null]/S/GoTo>> endobj');
+              // this.line('/A ' + id + ' 0 R' );
+            }
+          }
+
+          this.objEnd();
+        }
+
+        for (var z = 0; z < node.children.length; z++) {
+          this.renderItems(node.children[z]);
+        }
+      };
+
+      pdf.outline.line = function (text) {
+        this.ctx.val += text + "\r\n";
+      };
+
+      pdf.outline.makeRef = function (node) {
+        return node.id + " 0 R";
+      };
+
+      pdf.outline.makeString = function (val) {
+        return "(" + pdf.internal.pdfEscape(val) + ")";
+      };
+
+      pdf.outline.objStart = function (node) {
+        this.ctx.val += "\r\n" + node.id + " 0 obj" + "\r\n<<\r\n";
+      };
+
+      pdf.outline.objEnd = function () {
+        this.ctx.val += ">> \r\n" + "endobj" + "\r\n";
+      };
+
+      pdf.outline.count_r = function (ctx, node) {
+        for (var i = 0; i < node.children.length; i++) {
+          ctx.count++;
+          this.count_r(ctx, node.children[i]);
+        }
+
+        return ctx.count;
+      };
+    }]);
+    return this;
+  })(jsPDF.API);
+
+  /**
+   * @license
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * jsPDF jpeg Support PlugIn
+   *
+   * @name jpeg_support
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+    /**
+     * 0xc0 (SOF) Huffman  - Baseline DCT
+     * 0xc1 (SOF) Huffman  - Extended sequential DCT
+     * 0xc2 Progressive DCT (SOF2)
+     * 0xc3 Spatial (sequential) lossless (SOF3)
+     * 0xc4 Differential sequential DCT (SOF5)
+     * 0xc5 Differential progressive DCT (SOF6)
+     * 0xc6 Differential spatial (SOF7)
+     * 0xc7
+     */
+
+    var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7]; //takes a string imgData containing the raw bytes of
+    //a jpeg image and returns [width, height]
+    //Algorithm from: http://www.64lines.com/jpeg-width-height
+
+    var getJpegInfo = function getJpegInfo(imgData) {
+      var width, height, numcomponents;
+      var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);
+      var len = imgData.length;
+      var result = {
+        width: 0,
+        height: 0,
+        numcomponents: 1
+      };
+
+      for (var i = 4; i < len; i += 2) {
+        i += blockLength;
+
+        if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {
+          height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);
+          width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);
+          numcomponents = imgData.charCodeAt(i + 9);
+          result = {
+            width: width,
+            height: height,
+            numcomponents: numcomponents
+          };
+          break;
+        } else {
+          blockLength = imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);
+        }
+      }
+
+      return result;
+    };
+    /**
+     * @ignore
+     */
+
+
+    jsPDFAPI.processJPEG = function (data, index, alias, compression, dataAsBinaryString, colorSpace) {
+      var filter = this.decode.DCT_DECODE,
+          bpc = 8,
+          dims,
+          result = null;
+
+      if (typeof data === "string" || this.__addimage__.isArrayBuffer(data) || this.__addimage__.isArrayBufferView(data)) {
+        // if we already have a stored binary string rep use that
+        data = dataAsBinaryString || data;
+        data = this.__addimage__.isArrayBuffer(data) ? new Uint8Array(data) : data;
+        data = this.__addimage__.isArrayBufferView(data) ? this.__addimage__.arrayBufferToBinaryString(data) : data;
+        dims = getJpegInfo(data);
+
+        switch (dims.numcomponents) {
+          case 1:
+            colorSpace = this.color_spaces.DEVICE_GRAY;
+            break;
+
+          case 4:
+            colorSpace = this.color_spaces.DEVICE_CMYK;
+            break;
+
+          case 3:
+            colorSpace = this.color_spaces.DEVICE_RGB;
+            break;
+        }
+
+        result = {
+          data: data,
+          width: dims.width,
+          height: dims.height,
+          colorSpace: colorSpace,
+          bitsPerComponent: bpc,
+          filter: filter,
+          index: index,
+          alias: alias
+        };
+      }
+
+      return result;
+    };
+  })(jsPDF.API);
+
+  // Generated by CoffeeScript 1.4.0
+
+  var PNG = function () {
+    var APNG_BLEND_OP_SOURCE, APNG_DISPOSE_OP_BACKGROUND, APNG_DISPOSE_OP_PREVIOUS, makeImage, scratchCanvas, scratchCtx;
+    APNG_DISPOSE_OP_BACKGROUND = 1;
+    APNG_DISPOSE_OP_PREVIOUS = 2;
+    APNG_BLEND_OP_SOURCE = 0;
+
+    function PNG(data) {
+      var chunkSize, colors, palLen, delayDen, delayNum, frame, i, index, key, section, palShort, text, _i, _j, _ref;
+
+      this.data = data;
+      this.pos = 8;
+      this.palette = [];
+      this.imgData = [];
+      this.transparency = {};
+      this.animation = null;
+      this.text = {};
+      frame = null;
+
+      while (true) {
+        chunkSize = this.readUInt32();
+
+        section = function () {
+          var _i, _results;
+
+          _results = [];
+
+          for (i = _i = 0; _i < 4; i = ++_i) {
+            _results.push(String.fromCharCode(this.data[this.pos++]));
+          }
+
+          return _results;
+        }.call(this).join("");
+
+        switch (section) {
+          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() || Infinity,
+              frames: []
+            };
+            break;
+
+          case "PLTE":
+            this.palette = this.read(chunkSize);
+            break;
+
+          case "fcTL":
+            if (frame) {
+              this.animation.frames.push(frame);
+            }
+
+            this.pos += 4;
+            frame = {
+              width: this.readUInt32(),
+              height: this.readUInt32(),
+              xOffset: this.readUInt32(),
+              yOffset: this.readUInt32()
+            };
+            delayNum = this.readUInt16();
+            delayDen = this.readUInt16() || 100;
+            frame.delay = 1000 * delayNum / delayDen;
+            frame.disposeOp = this.data[this.pos++];
+            frame.blendOp = this.data[this.pos++];
+            frame.data = [];
+            break;
+
+          case "IDAT":
+          case "fdAT":
+            if (section === "fdAT") {
+              this.pos += 4;
+              chunkSize -= 4;
+            }
+
+            data = (frame != null ? frame.data : void 0) || this.imgData;
+
+            for (i = _i = 0; 0 <= chunkSize ? _i < chunkSize : _i > chunkSize; i = 0 <= chunkSize ? ++_i : --_i) {
+              data.push(this.data[this.pos++]);
+            }
+
+            break;
+
+          case "tRNS":
+            this.transparency = {};
+
+            switch (this.colorType) {
+              case 3:
+                palLen = this.palette.length / 3;
+                this.transparency.indexed = this.read(chunkSize);
+                if (this.transparency.indexed.length > palLen) throw new Error("More transparent colors than palette size");
+                /*
+                 * According to the PNG spec trns should be increased to the same size as palette if shorter
+                 */
+                //palShort = 255 - this.transparency.indexed.length;
+
+                palShort = palLen - this.transparency.indexed.length;
+
+                if (palShort > 0) {
+                  for (i = _j = 0; 0 <= palShort ? _j < palShort : _j > palShort; i = 0 <= palShort ? ++_j : --_j) {
+                    this.transparency.indexed.push(255);
+                  }
+                }
+
+                break;
+
+              case 0:
+                this.transparency.grayscale = this.read(chunkSize)[0];
+                break;
+
+              case 2:
+                this.transparency.rgb = this.read(chunkSize);
+            }
+
+            break;
+
+          case "tEXt":
+            text = this.read(chunkSize);
+            index = text.indexOf(0);
+            key = String.fromCharCode.apply(String, text.slice(0, index));
+            this.text[key] = String.fromCharCode.apply(String, text.slice(index + 1));
+            break;
+
+          case "IEND":
+            if (frame) {
+              this.animation.frames.push(frame);
+            }
+
+            this.colors = function () {
+              switch (this.colorType) {
+                case 0:
+                case 3:
+                case 4:
+                  return 1;
+
+                case 2:
+                case 6:
+                  return 3;
+              }
+            }.call(this);
+
+            this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;
+            colors = this.colors + (this.hasAlphaChannel ? 1 : 0);
+            this.pixelBitlength = this.bits * colors;
+
+            this.colorSpace = function () {
+              switch (this.colors) {
+                case 1:
+                  return "DeviceGray";
+
+                case 3:
+                  return "DeviceRGB";
+              }
+            }.call(this);
+
+            this.imgData = new Uint8Array(this.imgData);
+            return;
+
+          default:
+            this.pos += chunkSize;
+        }
+
+        this.pos += 4;
+
+        if (this.pos > this.data.length) {
+          throw new Error("Incomplete or corrupt PNG file");
+        }
+      }
+    }
+
+    PNG.prototype.read = function (bytes) {
+      var i, _i, _results;
+
+      _results = [];
+
+      for (i = _i = 0; 0 <= bytes ? _i < bytes : _i > bytes; i = 0 <= bytes ? ++_i : --_i) {
+        _results.push(this.data[this.pos++]);
+      }
+
+      return _results;
+    };
+
+    PNG.prototype.readUInt32 = function () {
+      var b1, b2, b3, b4;
+      b1 = this.data[this.pos++] << 24;
+      b2 = this.data[this.pos++] << 16;
+      b3 = this.data[this.pos++] << 8;
+      b4 = this.data[this.pos++];
+      return b1 | b2 | b3 | b4;
+    };
+
+    PNG.prototype.readUInt16 = function () {
+      var b1, b2;
+      b1 = this.data[this.pos++] << 8;
+      b2 = this.data[this.pos++];
+      return b1 | b2;
+    };
+
+    PNG.prototype.decodePixels = function (data) {
+      var pixelBytes = this.pixelBitlength / 8;
+      var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);
+      var pos = 0;
+
+      var _this = this;
+
+      if (data == null) {
+        data = this.imgData;
+      }
+
+      if (data.length === 0) {
+        return new Uint8Array(0);
+      }
+
+      data = unzlibSync(data);
+
+      function pass(x0, y0, dx, dy) {
+        var abyte, c, col, i, left, length, p, pa, paeth, pb, pc, pixels, row, scanlineLength, upper, upperLeft, _i, _j, _k, _l, _m;
+
+        var w = Math.ceil((_this.width - x0) / dx),
+            h = Math.ceil((_this.height - y0) / dy);
+        var isFull = _this.width == w && _this.height == h;
+        scanlineLength = pixelBytes * w;
+        pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);
+        length = data.length;
+        row = 0;
+        c = 0;
+
+        while (row < h && pos < length) {
+          switch (data[pos++]) {
+            case 0:
+              for (i = _i = 0; _i < scanlineLength; i = _i += 1) {
+                pixels[c++] = data[pos++];
+              }
+
+              break;
+
+            case 1:
+              for (i = _j = 0; _j < scanlineLength; i = _j += 1) {
+                abyte = data[pos++];
+                left = i < pixelBytes ? 0 : pixels[c - pixelBytes];
+                pixels[c++] = (abyte + left) % 256;
+              }
+
+              break;
+
+            case 2:
+              for (i = _k = 0; _k < scanlineLength; i = _k += 1) {
+                abyte = data[pos++];
+                col = (i - i % pixelBytes) / pixelBytes;
+                upper = row && pixels[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
+                pixels[c++] = (upper + abyte) % 256;
+              }
+
+              break;
+
+            case 3:
+              for (i = _l = 0; _l < scanlineLength; i = _l += 1) {
+                abyte = data[pos++];
+                col = (i - i % pixelBytes) / pixelBytes;
+                left = i < pixelBytes ? 0 : pixels[c - pixelBytes];
+                upper = row && pixels[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
+                pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;
+              }
+
+              break;
+
+            case 4:
+              for (i = _m = 0; _m < scanlineLength; i = _m += 1) {
+                abyte = data[pos++];
+                col = (i - i % pixelBytes) / pixelBytes;
+                left = i < pixelBytes ? 0 : pixels[c - pixelBytes];
+
+                if (row === 0) {
+                  upper = upperLeft = 0;
+                } else {
+                  upper = pixels[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
+                  upperLeft = col && pixels[(row - 1) * scanlineLength + (col - 1) * pixelBytes + i % pixelBytes];
+                }
+
+                p = left + upper - upperLeft;
+                pa = Math.abs(p - left);
+                pb = Math.abs(p - upper);
+                pc = Math.abs(p - upperLeft);
+
+                if (pa <= pb && pa <= pc) {
+                  paeth = left;
+                } else if (pb <= pc) {
+                  paeth = upper;
+                } else {
+                  paeth = upperLeft;
+                }
+
+                pixels[c++] = (abyte + paeth) % 256;
+              }
+
+              break;
+
+            default:
+              throw new Error("Invalid filter algorithm: " + data[pos - 1]);
+          }
+
+          if (!isFull) {
+            var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;
+            var partPos = row * scanlineLength;
+
+            for (i = 0; i < w; i += 1) {
+              for (var j = 0; j < pixelBytes; j += 1) {
+                fullPixels[fullPos++] = pixels[partPos++];
+              }
+
+              fullPos += (dx - 1) * pixelBytes;
+            }
+          }
+
+          row++;
+        }
+      }
+
+      if (_this.interlaceMethod == 1) {
+        /*
+            1 6 4 6 2 6 4 6
+            7 7 7 7 7 7 7 7
+            5 6 5 6 5 6 5 6
+            7 7 7 7 7 7 7 7
+            3 6 4 6 3 6 4 6
+            7 7 7 7 7 7 7 7
+            5 6 5 6 5 6 5 6
+            7 7 7 7 7 7 7 7
+          */
+        pass(0, 0, 8, 8); // 1
+
+        /* NOTE these seem to follow the pattern:
+         * pass(x, 0, 2*x, 2*x);
+         * pass(0, x,   x, 2*x);
+         * with x being 4, 2, 1.
+         */
+
+        pass(4, 0, 8, 8); // 2
+
+        pass(0, 4, 4, 8); // 3
+
+        pass(2, 0, 4, 4); // 4
+
+        pass(0, 2, 2, 4); // 5
+
+        pass(1, 0, 2, 2); // 6
+
+        pass(0, 1, 1, 2); // 7
+      } else {
+        pass(0, 0, 1, 1);
+      }
+
+      return fullPixels;
+    };
+
+    PNG.prototype.decodePalette = function () {
+      var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;
+
+      palette = this.palette;
+      transparency = this.transparency.indexed || [];
+      ret = new Uint8Array((transparency.length || 0) + palette.length);
+      pos = 0;
+      length = palette.length;
+      c = 0;
+
+      for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {
+        ret[pos++] = palette[i];
+        ret[pos++] = palette[i + 1];
+        ret[pos++] = palette[i + 2];
+        ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;
+      }
+
+      return ret;
+    };
+
+    PNG.prototype.copyToImageData = function (imageData, pixels) {
+      var alpha, colors, data, i, input, j, k, length, palette, v, _ref;
+
+      colors = this.colors;
+      palette = null;
+      alpha = this.hasAlphaChannel;
+
+      if (this.palette.length) {
+        palette = (_ref = this._decodedPalette) != null ? _ref : this._decodedPalette = this.decodePalette();
+        colors = 4;
+        alpha = true;
+      }
+
+      data = imageData.data || imageData;
+      length = data.length;
+      input = palette || pixels;
+      i = j = 0;
+
+      if (colors === 1) {
+        while (i < length) {
+          k = palette ? pixels[i / 4] * 4 : j;
+          v = input[k++];
+          data[i++] = v;
+          data[i++] = v;
+          data[i++] = v;
+          data[i++] = alpha ? input[k++] : 255;
+          j = k;
+        }
+      } else {
+        while (i < length) {
+          k = palette ? pixels[i / 4] * 4 : j;
+          data[i++] = input[k++];
+          data[i++] = input[k++];
+          data[i++] = input[k++];
+          data[i++] = alpha ? input[k++] : 255;
+          j = k;
+        }
+      }
+    };
+
+    PNG.prototype.decode = function () {
+      var ret;
+      ret = new Uint8Array(this.width * this.height * 4);
+      this.copyToImageData(ret, this.decodePixels());
+      return ret;
+    };
+
+    var hasBrowserCanvas = function hasBrowserCanvas() {
+      if (Object.prototype.toString.call(globalObject) === "[object Window]") {
+        try {
+          scratchCanvas = globalObject.document.createElement("canvas");
+          scratchCtx = scratchCanvas.getContext("2d");
+        } catch (e) {
+          return false;
+        }
+
+        return true;
+      }
+
+      return false;
+    };
+
+    hasBrowserCanvas();
+
+    makeImage = function makeImage(imageData) {
+      if (hasBrowserCanvas() === true) {
+        var img;
+        scratchCtx.width = imageData.width;
+        scratchCtx.height = imageData.height;
+        scratchCtx.clearRect(0, 0, imageData.width, imageData.height);
+        scratchCtx.putImageData(imageData, 0, 0);
+        img = new Image();
+        img.src = scratchCanvas.toDataURL();
+        return img;
+      }
+
+      throw new Error("This method requires a Browser with Canvas-capability.");
+    };
+
+    PNG.prototype.decodeFrames = function (ctx) {
+      var frame, i, imageData, pixels, _i, _len, _ref, _results;
+
+      if (!this.animation) {
+        return;
+      }
+
+      _ref = this.animation.frames;
+      _results = [];
+
+      for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {
+        frame = _ref[i];
+        imageData = ctx.createImageData(frame.width, frame.height);
+        pixels = this.decodePixels(new Uint8Array(frame.data));
+        this.copyToImageData(imageData, pixels);
+        frame.imageData = imageData;
+
+        _results.push(frame.image = makeImage(imageData));
+      }
+
+      return _results;
+    };
+
+    PNG.prototype.renderFrame = function (ctx, number) {
+      var frame, frames, prev;
+      frames = this.animation.frames;
+      frame = frames[number];
+      prev = frames[number - 1];
+
+      if (number === 0) {
+        ctx.clearRect(0, 0, this.width, this.height);
+      }
+
+      if ((prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND) {
+        ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);
+      } else if ((prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS) {
+        ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);
+      }
+
+      if (frame.blendOp === APNG_BLEND_OP_SOURCE) {
+        ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);
+      }
+
+      return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);
+    };
+
+    PNG.prototype.animate = function (ctx) {
+      var _doFrame,
+          frameNumber,
+          frames,
+          numFrames,
+          numPlays,
+          _ref,
+          _this = this;
+
+      frameNumber = 0;
+      _ref = this.animation, numFrames = _ref.numFrames, frames = _ref.frames, numPlays = _ref.numPlays;
+      return (_doFrame = function doFrame() {
+        var f, frame;
+        f = frameNumber++ % numFrames;
+        frame = frames[f];
+
+        _this.renderFrame(ctx, f);
+
+        if (numFrames > 1 && frameNumber / numFrames < numPlays) {
+          return _this.animation._timeout = setTimeout(_doFrame, frame.delay);
+        }
+      })();
+    };
+
+    PNG.prototype.stopAnimation = function () {
+      var _ref;
+
+      return clearTimeout((_ref = this.animation) != null ? _ref._timeout : void 0);
+    };
+
+    PNG.prototype.render = function (canvas) {
+      var ctx, data;
+
+      if (canvas._png) {
+        canvas._png.stopAnimation();
+      }
+
+      canvas._png = this;
+      canvas.width = this.width;
+      canvas.height = this.height;
+      ctx = canvas.getContext("2d");
+
+      if (this.animation) {
+        this.decodeFrames(ctx);
+        return this.animate(ctx);
+      } else {
+        data = ctx.createImageData(this.width, this.height);
+        this.copyToImageData(data, this.decodePixels());
+        return ctx.putImageData(data, 0, 0);
+      }
+    };
+
+    return PNG;
+  }();
+
+  /**
+   * @license
+   *
+   * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining
+   * a copy of this software and associated documentation files (the
+   * "Software"), to deal in the Software without restriction, including
+   * without limitation the rights to use, copy, modify, merge, publish,
+   * distribute, sublicense, and/or sell copies of the Software, and to
+   * permit persons to whom the Software is furnished to do so, subject to
+   * the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be
+   * included in all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   * ====================================================================
+   */
+  /**
+   * jsPDF PNG PlugIn
+   * @name png_support
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+    /*
+     * @see http://www.w3.org/TR/PNG-Chunks.html
+     *
+     Color    Allowed      Interpretation
+     Type     Bit Depths
+        0       1,2,4,8,16  Each pixel is a grayscale sample.
+        2       8,16        Each pixel is an R,G,B triple.
+        3       1,2,4,8     Each pixel is a palette index;
+                           a PLTE chunk must appear.
+        4       8,16        Each pixel is a grayscale sample,
+                           followed by an alpha sample.
+        6       8,16        Each pixel is an R,G,B triple,
+                           followed by an alpha sample.
+    */
+
+    /*
+     * PNG filter method types
+     *
+     * @see http://www.w3.org/TR/PNG-Filters.html
+     * @see http://www.libpng.org/pub/png/book/chapter09.html
+     *
+     * This is what the value 'Predictor' in decode params relates to
+     *
+     * 15 is "optimal prediction", which means the prediction algorithm can change from line to line.
+     * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.
+     *
+       0       None
+       1       Sub
+       2       Up
+       3       Average
+       4       Paeth
+     */
+
+    var canCompress = function canCompress(value) {
+      return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();
+    };
+
+    var hasCompressionJS = function hasCompressionJS() {
+      return typeof zlibSync === "function";
+    };
+
+    var compressBytes = function compressBytes(bytes, lineLength, colorsPerPixel, compression) {
+      var level = 4;
+      var filter_method = filterUp;
+
+      switch (compression) {
+        case jsPDFAPI.image_compression.FAST:
+          level = 1;
+          filter_method = filterSub;
+          break;
+
+        case jsPDFAPI.image_compression.MEDIUM:
+          level = 6;
+          filter_method = filterAverage;
+          break;
+
+        case jsPDFAPI.image_compression.SLOW:
+          level = 9;
+          filter_method = filterPaeth;
+          break;
+      }
+
+      bytes = applyPngFilterMethod(bytes, lineLength, colorsPerPixel, filter_method);
+      var dat = zlibSync(bytes, {
+        level: level
+      });
+      return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);
+    };
+
+    var applyPngFilterMethod = function applyPngFilterMethod(bytes, lineLength, colorsPerPixel, filter_method) {
+      var lines = bytes.length / lineLength,
+          result = new Uint8Array(bytes.length + lines),
+          filter_methods = getFilterMethods(),
+          line,
+          prevLine,
+          offset;
+
+      for (var i = 0; i < lines; i += 1) {
+        offset = i * lineLength;
+        line = bytes.subarray(offset, offset + lineLength);
+
+        if (filter_method) {
+          result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);
+        } else {
+          var len = filter_methods.length,
+              results = [];
+
+          for (var j; j < len; j += 1) {
+            results[j] = filter_methods[j](line, colorsPerPixel, prevLine);
+          }
+
+          var ind = getIndexOfSmallestSum(results.concat());
+          result.set(results[ind], offset + i);
+        }
+
+        prevLine = line;
+      }
+
+      return result;
+    };
+
+    var filterNone = function filterNone(line) {
+      /*var result = new Uint8Array(line.length + 1);
+      result[0] = 0;
+      result.set(line, 1);*/
+      var result = Array.apply([], line);
+      result.unshift(0);
+      return result;
+    };
+
+    var filterSub = function filterSub(line, colorsPerPixel) {
+      var result = [],
+          len = line.length,
+          left;
+      result[0] = 1;
+
+      for (var i = 0; i < len; i += 1) {
+        left = line[i - colorsPerPixel] || 0;
+        result[i + 1] = line[i] - left + 0x0100 & 0xff;
+      }
+
+      return result;
+    };
+
+    var filterUp = function filterUp(line, colorsPerPixel, prevLine) {
+      var result = [],
+          len = line.length,
+          up;
+      result[0] = 2;
+
+      for (var i = 0; i < len; i += 1) {
+        up = prevLine && prevLine[i] || 0;
+        result[i + 1] = line[i] - up + 0x0100 & 0xff;
+      }
+
+      return result;
+    };
+
+    var filterAverage = function filterAverage(line, colorsPerPixel, prevLine) {
+      var result = [],
+          len = line.length,
+          left,
+          up;
+      result[0] = 3;
+
+      for (var i = 0; i < len; i += 1) {
+        left = line[i - colorsPerPixel] || 0;
+        up = prevLine && prevLine[i] || 0;
+        result[i + 1] = line[i] + 0x0100 - (left + up >>> 1) & 0xff;
+      }
+
+      return result;
+    };
+
+    var filterPaeth = function filterPaeth(line, colorsPerPixel, prevLine) {
+      var result = [],
+          len = line.length,
+          left,
+          up,
+          upLeft,
+          paeth;
+      result[0] = 4;
+
+      for (var i = 0; i < len; i += 1) {
+        left = line[i - colorsPerPixel] || 0;
+        up = prevLine && prevLine[i] || 0;
+        upLeft = prevLine && prevLine[i - colorsPerPixel] || 0;
+        paeth = paethPredictor(left, up, upLeft);
+        result[i + 1] = line[i] - paeth + 0x0100 & 0xff;
+      }
+
+      return result;
+    };
+
+    var paethPredictor = function paethPredictor(left, up, upLeft) {
+      if (left === up && up === upLeft) {
+        return left;
+      }
+
+      var pLeft = Math.abs(up - upLeft),
+          pUp = Math.abs(left - upLeft),
+          pUpLeft = Math.abs(left + up - upLeft - upLeft);
+      return pLeft <= pUp && pLeft <= pUpLeft ? left : pUp <= pUpLeft ? up : upLeft;
+    };
+
+    var getFilterMethods = function getFilterMethods() {
+      return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];
+    };
+
+    var getIndexOfSmallestSum = function getIndexOfSmallestSum(arrays) {
+      var sum = arrays.map(function (value) {
+        return value.reduce(function (pv, cv) {
+          return pv + Math.abs(cv);
+        }, 0);
+      });
+      return sum.indexOf(Math.min.apply(null, sum));
+    };
+
+    var getPredictorFromCompression = function getPredictorFromCompression(compression) {
+      var predictor;
+
+      switch (compression) {
+        case jsPDFAPI.image_compression.FAST:
+          predictor = 11;
+          break;
+
+        case jsPDFAPI.image_compression.MEDIUM:
+          predictor = 13;
+          break;
+
+        case jsPDFAPI.image_compression.SLOW:
+          predictor = 14;
+          break;
+
+        default:
+          predictor = 12;
+          break;
+      }
+
+      return predictor;
+    };
+    /**
+     * @name processPNG
+     * @function
+     * @ignore
+     */
+
+
+    jsPDFAPI.processPNG = function (imageData, index, alias, compression) {
+
+      var colorSpace,
+          filter = this.decode.FLATE_DECODE,
+          bitsPerComponent,
+          image,
+          decodeParameters = "",
+          trns,
+          colors,
+          pal,
+          smask,
+          pixels,
+          len,
+          alphaData,
+          imgData,
+          hasColors,
+          pixel,
+          i,
+          n;
+      if (this.__addimage__.isArrayBuffer(imageData)) imageData = new Uint8Array(imageData);
+
+      if (this.__addimage__.isArrayBufferView(imageData)) {
+        image = new PNG(imageData);
+        imageData = image.imgData;
+        bitsPerComponent = image.bits;
+        colorSpace = image.colorSpace;
+        colors = image.colors;
+        /*
+         * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.
+         *
+         * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.
+         *
+         * Extract alpha to create two separate images, using the alpha as a sMask
+         */
+
+        if ([4, 6].indexOf(image.colorType) !== -1) {
+          /*
+           * processes 8 bit RGBA and grayscale + alpha images
+           */
+          if (image.bits === 8) {
+            pixels = image.pixelBitlength == 32 ? new Uint32Array(image.decodePixels().buffer) : image.pixelBitlength == 16 ? new Uint16Array(image.decodePixels().buffer) : new Uint8Array(image.decodePixels().buffer);
+            len = pixels.length;
+            imgData = new Uint8Array(len * image.colors);
+            alphaData = new Uint8Array(len);
+            var pDiff = image.pixelBitlength - image.bits;
+            i = 0;
+            n = 0;
+            var pbl;
+
+            for (; i < len; i++) {
+              pixel = pixels[i];
+              pbl = 0;
+
+              while (pbl < pDiff) {
+                imgData[n++] = pixel >>> pbl & 0xff;
+                pbl = pbl + image.bits;
+              }
+
+              alphaData[i] = pixel >>> pbl & 0xff;
+            }
+          }
+          /*
+           * processes 16 bit RGBA and grayscale + alpha images
+           */
+
+
+          if (image.bits === 16) {
+            pixels = new Uint32Array(image.decodePixels().buffer);
+            len = pixels.length;
+            imgData = new Uint8Array(len * (32 / image.pixelBitlength) * image.colors);
+            alphaData = new Uint8Array(len * (32 / image.pixelBitlength));
+            hasColors = image.colors > 1;
+            i = 0;
+            n = 0;
+            var a = 0;
+
+            while (i < len) {
+              pixel = pixels[i++];
+              imgData[n++] = pixel >>> 0 & 0xff;
+
+              if (hasColors) {
+                imgData[n++] = pixel >>> 16 & 0xff;
+                pixel = pixels[i++];
+                imgData[n++] = pixel >>> 0 & 0xff;
+              }
+
+              alphaData[a++] = pixel >>> 16 & 0xff;
+            }
+
+            bitsPerComponent = 8;
+          }
+
+          if (canCompress(compression)) {
+            imageData = compressBytes(imgData, image.width * image.colors, image.colors, compression);
+            smask = compressBytes(alphaData, image.width, 1, compression);
+          } else {
+            imageData = imgData;
+            smask = alphaData;
+            filter = undefined;
+          }
+        }
+        /*
+         * Indexed png. Each pixel is a palette index.
+         */
+
+
+        if (image.colorType === 3) {
+          colorSpace = this.color_spaces.INDEXED;
+          pal = image.palette;
+
+          if (image.transparency.indexed) {
+            var trans = image.transparency.indexed;
+            var total = 0;
+            i = 0;
+            len = trans.length;
+
+            for (; i < len; ++i) {
+              total += trans[i];
+            }
+
+            total = total / 255;
+            /*
+             * a single color is specified as 100% transparent (0),
+             * so we set trns to use a /Mask with that index
+             */
+
+            if (total === len - 1 && trans.indexOf(0) !== -1) {
+              trns = [trans.indexOf(0)];
+              /*
+               * there's more than one colour within the palette that specifies
+               * a transparency value less than 255, so we unroll the pixels to create an image sMask
+               */
+            } else if (total !== len) {
+              pixels = image.decodePixels();
+              alphaData = new Uint8Array(pixels.length);
+              i = 0;
+              len = pixels.length;
+
+              for (; i < len; i++) {
+                alphaData[i] = trans[pixels[i]];
+              }
+
+              smask = compressBytes(alphaData, image.width, 1);
+            }
+          }
+        }
+
+        var predictor = getPredictorFromCompression(compression);
+
+        if (filter === this.decode.FLATE_DECODE) {
+          decodeParameters = "/Predictor " + predictor + " ";
+        }
+
+        decodeParameters += "/Colors " + colors + " /BitsPerComponent " + bitsPerComponent + " /Columns " + image.width;
+
+        if (this.__addimage__.isArrayBuffer(imageData) || this.__addimage__.isArrayBufferView(imageData)) {
+          imageData = this.__addimage__.arrayBufferToBinaryString(imageData);
+        }
+
+        if (smask && this.__addimage__.isArrayBuffer(smask) || this.__addimage__.isArrayBufferView(smask)) {
+          smask = this.__addimage__.arrayBufferToBinaryString(smask);
+        }
+
+        return {
+          alias: alias,
+          data: imageData,
+          index: index,
+          filter: filter,
+          decodeParameters: decodeParameters,
+          transparency: trns,
+          palette: pal,
+          sMask: smask,
+          predictor: predictor,
+          width: image.width,
+          height: image.height,
+          bitsPerComponent: bitsPerComponent,
+          colorSpace: colorSpace
+        };
+      }
+    };
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * (c) Dean McNamee <dean@gmail.com>, 2013.
+   *
+   * https://github.com/deanm/omggif
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining a copy
+   * of this software and associated documentation files (the "Software"), to
+   * deal in the Software without restriction, including without limitation the
+   * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+   * sell copies of the Software, and to permit persons to whom the Software is
+   * furnished to do so, subject to the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be included in
+   * all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+   * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+   * IN THE SOFTWARE.
+   *
+   * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
+   * including animation and compression.  It does not rely on any specific
+   * underlying system, so should run in the browser, Node, or Plask.
+   */
+
+  function GifReader(buf) {
+    var p = 0; // - Header (GIF87a or GIF89a).
+
+    if (buf[p++] !== 0x47 || buf[p++] !== 0x49 || buf[p++] !== 0x46 || buf[p++] !== 0x38 || (buf[p++] + 1 & 0xfd) !== 0x38 || buf[p++] !== 0x61) {
+      throw new Error("Invalid GIF 87a/89a header.");
+    } // - Logical Screen Descriptor.
+
+
+    var width = buf[p++] | buf[p++] << 8;
+    var height = buf[p++] | buf[p++] << 8;
+    var pf0 = buf[p++]; // <Packed Fields>.
+
+    var global_palette_flag = pf0 >> 7;
+    var num_global_colors_pow2 = pf0 & 0x7;
+    var num_global_colors = 1 << num_global_colors_pow2 + 1;
+    var background = buf[p++];
+    buf[p++]; // Pixel aspect ratio (unused?).
+
+    var global_palette_offset = null;
+    var global_palette_size = null;
+
+    if (global_palette_flag) {
+      global_palette_offset = p;
+      global_palette_size = num_global_colors;
+      p += num_global_colors * 3; // Seek past palette.
+    }
+
+    var no_eof = true;
+    var frames = [];
+    var delay = 0;
+    var transparent_index = null;
+    var disposal = 0; // 0 - No disposal specified.
+
+    var loop_count = null;
+    this.width = width;
+    this.height = height;
+
+    while (no_eof && p < buf.length) {
+      switch (buf[p++]) {
+        case 0x21:
+          // Graphics Control Extension Block
+          switch (buf[p++]) {
+            case 0xff:
+              // Application specific block
+              // Try if it's a Netscape block (with animation loop counter).
+              if (buf[p] !== 0x0b || // 21 FF already read, check block size.
+              // NETSCAPE2.0
+              buf[p + 1] == 0x4e && buf[p + 2] == 0x45 && buf[p + 3] == 0x54 && buf[p + 4] == 0x53 && buf[p + 5] == 0x43 && buf[p + 6] == 0x41 && buf[p + 7] == 0x50 && buf[p + 8] == 0x45 && buf[p + 9] == 0x32 && buf[p + 10] == 0x2e && buf[p + 11] == 0x30 && // Sub-block
+              buf[p + 12] == 0x03 && buf[p + 13] == 0x01 && buf[p + 16] == 0) {
+                p += 14;
+                loop_count = buf[p++] | buf[p++] << 8;
+                p++; // Skip terminator.
+              } else {
+                // We don't know what it is, just try to get past it.
+                p += 12;
+
+                while (true) {
+                  // Seek through subblocks.
+                  var block_size = buf[p++]; // Bad block size (ex: undefined from an out of bounds read).
+
+                  if (!(block_size >= 0)) throw Error("Invalid block size");
+                  if (block_size === 0) break; // 0 size is terminator
+
+                  p += block_size;
+                }
+              }
+
+              break;
+
+            case 0xf9:
+              // Graphics Control Extension
+              if (buf[p++] !== 0x4 || buf[p + 4] !== 0) throw new Error("Invalid graphics extension block.");
+              var pf1 = buf[p++];
+              delay = buf[p++] | buf[p++] << 8;
+              transparent_index = buf[p++];
+              if ((pf1 & 1) === 0) transparent_index = null;
+              disposal = pf1 >> 2 & 0x7;
+              p++; // Skip terminator.
+
+              break;
+
+            case 0xfe:
+              // Comment Extension.
+              while (true) {
+                // Seek through subblocks.
+                var block_size = buf[p++]; // Bad block size (ex: undefined from an out of bounds read).
+
+                if (!(block_size >= 0)) throw Error("Invalid block size");
+                if (block_size === 0) break; // 0 size is terminator
+                // console.log(buf.slice(p, p+block_size).toString('ascii'));
+
+                p += block_size;
+              }
+
+              break;
+
+            default:
+              throw new Error("Unknown graphic control label: 0x" + buf[p - 1].toString(16));
+          }
+
+          break;
+
+        case 0x2c:
+          // Image Descriptor.
+          var x = buf[p++] | buf[p++] << 8;
+          var y = buf[p++] | buf[p++] << 8;
+          var w = buf[p++] | buf[p++] << 8;
+          var h = buf[p++] | buf[p++] << 8;
+          var pf2 = buf[p++];
+          var local_palette_flag = pf2 >> 7;
+          var interlace_flag = pf2 >> 6 & 1;
+          var num_local_colors_pow2 = pf2 & 0x7;
+          var num_local_colors = 1 << num_local_colors_pow2 + 1;
+          var palette_offset = global_palette_offset;
+          var palette_size = global_palette_size;
+          var has_local_palette = false;
+
+          if (local_palette_flag) {
+            var has_local_palette = true;
+            palette_offset = p; // Override with local palette.
+
+            palette_size = num_local_colors;
+            p += num_local_colors * 3; // Seek past palette.
+          }
+
+          var data_offset = p;
+          p++; // codesize
+
+          while (true) {
+            var block_size = buf[p++]; // Bad block size (ex: undefined from an out of bounds read).
+
+            if (!(block_size >= 0)) throw Error("Invalid block size");
+            if (block_size === 0) break; // 0 size is terminator
+
+            p += block_size;
+          }
+
+          frames.push({
+            x: x,
+            y: y,
+            width: w,
+            height: h,
+            has_local_palette: has_local_palette,
+            palette_offset: palette_offset,
+            palette_size: palette_size,
+            data_offset: data_offset,
+            data_length: p - data_offset,
+            transparent_index: transparent_index,
+            interlaced: !!interlace_flag,
+            delay: delay,
+            disposal: disposal
+          });
+          break;
+
+        case 0x3b:
+          // Trailer Marker (end of file).
+          no_eof = false;
+          break;
+
+        default:
+          throw new Error("Unknown gif block: 0x" + buf[p - 1].toString(16));
+      }
+    }
+
+    this.numFrames = function () {
+      return frames.length;
+    };
+
+    this.loopCount = function () {
+      return loop_count;
+    };
+
+    this.frameInfo = function (frame_num) {
+      if (frame_num < 0 || frame_num >= frames.length) throw new Error("Frame index out of range.");
+      return frames[frame_num];
+    };
+
+    this.decodeAndBlitFrameBGRA = function (frame_num, pixels) {
+      var frame = this.frameInfo(frame_num);
+      var num_pixels = frame.width * frame.height;
+      var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.
+
+      GifReaderLZWOutputIndexStream(buf, frame.data_offset, index_stream, num_pixels);
+      var palette_offset = frame.palette_offset; // NOTE(deanm): It seems to be much faster to compare index to 256 than
+      // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in
+      // the profile, not sure if it's related to using a Uint8Array.
+
+      var trans = frame.transparent_index;
+      if (trans === null) trans = 256; // We are possibly just blitting to a portion of the entire frame.
+      // That is a subrect within the framerect, so the additional pixels
+      // must be skipped over after we finished a scanline.
+
+      var framewidth = frame.width;
+      var framestride = width - framewidth;
+      var xleft = framewidth; // Number of subrect pixels left in scanline.
+      // Output indices of the top left and bottom right corners of the subrect.
+
+      var opbeg = (frame.y * width + frame.x) * 4;
+      var opend = ((frame.y + frame.height) * width + frame.x) * 4;
+      var op = opbeg;
+      var scanstride = framestride * 4; // Use scanstride to skip past the rows when interlacing.  This is skipping
+      // 7 rows for the first two passes, then 3 then 1.
+
+      if (frame.interlaced === true) {
+        scanstride += width * 4 * 7; // Pass 1.
+      }
+
+      var interlaceskip = 8; // Tracking the row interval in the current pass.
+
+      for (var i = 0, il = index_stream.length; i < il; ++i) {
+        var index = index_stream[i];
+
+        if (xleft === 0) {
+          // Beginning of new scan line
+          op += scanstride;
+          xleft = framewidth;
+
+          if (op >= opend) {
+            // Catch the wrap to switch passes when interlacing.
+            scanstride = framestride * 4 + width * 4 * (interlaceskip - 1); // interlaceskip / 2 * 4 is interlaceskip << 1.
+
+            op = opbeg + (framewidth + framestride) * (interlaceskip << 1);
+            interlaceskip >>= 1;
+          }
+        }
+
+        if (index === trans) {
+          op += 4;
+        } else {
+          var r = buf[palette_offset + index * 3];
+          var g = buf[palette_offset + index * 3 + 1];
+          var b = buf[palette_offset + index * 3 + 2];
+          pixels[op++] = b;
+          pixels[op++] = g;
+          pixels[op++] = r;
+          pixels[op++] = 255;
+        }
+
+        --xleft;
+      }
+    }; // I will go to copy and paste hell one day...
+
+
+    this.decodeAndBlitFrameRGBA = function (frame_num, pixels) {
+      var frame = this.frameInfo(frame_num);
+      var num_pixels = frame.width * frame.height;
+      var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.
+
+      GifReaderLZWOutputIndexStream(buf, frame.data_offset, index_stream, num_pixels);
+      var palette_offset = frame.palette_offset; // NOTE(deanm): It seems to be much faster to compare index to 256 than
+      // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in
+      // the profile, not sure if it's related to using a Uint8Array.
+
+      var trans = frame.transparent_index;
+      if (trans === null) trans = 256; // We are possibly just blitting to a portion of the entire frame.
+      // That is a subrect within the framerect, so the additional pixels
+      // must be skipped over after we finished a scanline.
+
+      var framewidth = frame.width;
+      var framestride = width - framewidth;
+      var xleft = framewidth; // Number of subrect pixels left in scanline.
+      // Output indices of the top left and bottom right corners of the subrect.
+
+      var opbeg = (frame.y * width + frame.x) * 4;
+      var opend = ((frame.y + frame.height) * width + frame.x) * 4;
+      var op = opbeg;
+      var scanstride = framestride * 4; // Use scanstride to skip past the rows when interlacing.  This is skipping
+      // 7 rows for the first two passes, then 3 then 1.
+
+      if (frame.interlaced === true) {
+        scanstride += width * 4 * 7; // Pass 1.
+      }
+
+      var interlaceskip = 8; // Tracking the row interval in the current pass.
+
+      for (var i = 0, il = index_stream.length; i < il; ++i) {
+        var index = index_stream[i];
+
+        if (xleft === 0) {
+          // Beginning of new scan line
+          op += scanstride;
+          xleft = framewidth;
+
+          if (op >= opend) {
+            // Catch the wrap to switch passes when interlacing.
+            scanstride = framestride * 4 + width * 4 * (interlaceskip - 1); // interlaceskip / 2 * 4 is interlaceskip << 1.
+
+            op = opbeg + (framewidth + framestride) * (interlaceskip << 1);
+            interlaceskip >>= 1;
+          }
+        }
+
+        if (index === trans) {
+          op += 4;
+        } else {
+          var r = buf[palette_offset + index * 3];
+          var g = buf[palette_offset + index * 3 + 1];
+          var b = buf[palette_offset + index * 3 + 2];
+          pixels[op++] = r;
+          pixels[op++] = g;
+          pixels[op++] = b;
+          pixels[op++] = 255;
+        }
+
+        --xleft;
+      }
+    };
+  }
+
+  function GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {
+    var min_code_size = code_stream[p++];
+    var clear_code = 1 << min_code_size;
+    var eoi_code = clear_code + 1;
+    var next_code = eoi_code + 1;
+    var cur_code_size = min_code_size + 1; // Number of bits per code.
+    // NOTE: This shares the same name as the encoder, but has a different
+    // meaning here.  Here this masks each code coming from the code stream.
+
+    var code_mask = (1 << cur_code_size) - 1;
+    var cur_shift = 0;
+    var cur = 0;
+    var op = 0; // Output pointer.
+
+    var subblock_size = code_stream[p++]; // TODO(deanm): Would using a TypedArray be any faster?  At least it would
+    // solve the fast mode / backing store uncertainty.
+    // var code_table = Array(4096);
+
+    var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.
+
+    var prev_code = null; // Track code-1.
+
+    while (true) {
+      // Read up to two bytes, making sure we always 12-bits for max sized code.
+      while (cur_shift < 16) {
+        if (subblock_size === 0) break; // No more data to be read.
+
+        cur |= code_stream[p++] << cur_shift;
+        cur_shift += 8;
+
+        if (subblock_size === 1) {
+          // Never let it get to 0 to hold logic above.
+          subblock_size = code_stream[p++]; // Next subblock.
+        } else {
+          --subblock_size;
+        }
+      } // TODO(deanm): We should never really get here, we should have received
+      // and EOI.
+
+
+      if (cur_shift < cur_code_size) break;
+      var code = cur & code_mask;
+      cur >>= cur_code_size;
+      cur_shift -= cur_code_size; // TODO(deanm): Maybe should check that the first code was a clear code,
+      // at least this is what you're supposed to do.  But actually our encoder
+      // now doesn't emit a clear code first anyway.
+
+      if (code === clear_code) {
+        // We don't actually have to clear the table.  This could be a good idea
+        // for greater error checking, but we don't really do any anyway.  We
+        // will just track it with next_code and overwrite old entries.
+        next_code = eoi_code + 1;
+        cur_code_size = min_code_size + 1;
+        code_mask = (1 << cur_code_size) - 1; // Don't update prev_code ?
+
+        prev_code = null;
+        continue;
+      } else if (code === eoi_code) {
+        break;
+      } // We have a similar situation as the decoder, where we want to store
+      // variable length entries (code table entries), but we want to do in a
+      // faster manner than an array of arrays.  The code below stores sort of a
+      // linked list within the code table, and then "chases" through it to
+      // construct the dictionary entries.  When a new entry is created, just the
+      // last byte is stored, and the rest (prefix) of the entry is only
+      // referenced by its table entry.  Then the code chases through the
+      // prefixes until it reaches a single byte code.  We have to chase twice,
+      // first to compute the length, and then to actually copy the data to the
+      // output (backwards, since we know the length).  The alternative would be
+      // storing something in an intermediate stack, but that doesn't make any
+      // more sense.  I implemented an approach where it also stored the length
+      // in the code table, although it's a bit tricky because you run out of
+      // bits (12 + 12 + 8), but I didn't measure much improvements (the table
+      // entries are generally not the long).  Even when I created benchmarks for
+      // very long table entries the complexity did not seem worth it.
+      // The code table stores the prefix entry in 12 bits and then the suffix
+      // byte in 8 bits, so each entry is 20 bits.
+
+
+      var chase_code = code < next_code ? code : prev_code; // Chase what we will output, either {CODE} or {CODE-1}.
+
+      var chase_length = 0;
+      var chase = chase_code;
+
+      while (chase > clear_code) {
+        chase = code_table[chase] >> 8;
+        ++chase_length;
+      }
+
+      var k = chase;
+      var op_end = op + chase_length + (chase_code !== code ? 1 : 0);
+
+      if (op_end > output_length) {
+        console.log("Warning, gif stream longer than expected.");
+        return;
+      } // Already have the first byte from the chase, might as well write it fast.
+
+
+      output[op++] = k;
+      op += chase_length;
+      var b = op; // Track pointer, writing backwards.
+
+      if (chase_code !== code) // The case of emitting {CODE-1} + k.
+        output[op++] = k;
+      chase = chase_code;
+
+      while (chase_length--) {
+        chase = code_table[chase];
+        output[--b] = chase & 0xff; // Write backwards.
+
+        chase >>= 8; // Pull down to the prefix code.
+      }
+
+      if (prev_code !== null && next_code < 4096) {
+        code_table[next_code++] = prev_code << 8 | k; // TODO(deanm): Figure out this clearing vs code growth logic better.  I
+        // have an feeling that it should just happen somewhere else, for now it
+        // is awkward between when we grow past the max and then hit a clear code.
+        // For now just check if we hit the max 12-bits (then a clear code should
+        // follow, also of course encoded in 12-bits).
+
+        if (next_code >= code_mask + 1 && cur_code_size < 12) {
+          ++cur_code_size;
+          code_mask = code_mask << 1 | 1;
+        }
+      }
+
+      prev_code = code;
+    }
+
+    if (op !== output_length) {
+      console.log("Warning, gif stream shorter than expected.");
+    }
+
+    return output;
+  }
+
+  /**
+   * @license
+    Copyright (c) 2008, Adobe Systems Incorporated
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without 
+    modification, are permitted provided that the following conditions are
+    met:
+
+    * Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+    
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the 
+      documentation and/or other materials provided with the distribution.
+    
+    * Neither the name of Adobe Systems Incorporated nor the names of its 
+      contributors may be used to endorse or promote products derived from 
+      this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+    IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+    PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+
+  /*
+  JPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009
+
+  Basic GUI blocking jpeg encoder
+  */
+  function JPEGEncoder(quality) {
+    var ffloor = Math.floor;
+    var YTable = new Array(64);
+    var UVTable = new Array(64);
+    var fdtbl_Y = new Array(64);
+    var fdtbl_UV = new Array(64);
+    var YDC_HT;
+    var UVDC_HT;
+    var YAC_HT;
+    var UVAC_HT;
+    var bitcode = new Array(65535);
+    var category = new Array(65535);
+    var outputfDCTQuant = new Array(64);
+    var DU = new Array(64);
+    var byteout = [];
+    var bytenew = 0;
+    var bytepos = 7;
+    var YDU = new Array(64);
+    var UDU = new Array(64);
+    var VDU = new Array(64);
+    var clt = new Array(256);
+    var RGB_YUV_TABLE = new Array(2048);
+    var currentQuality;
+    var ZigZag = [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];
+    var std_dc_luminance_nrcodes = [0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0];
+    var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
+    var std_ac_luminance_nrcodes = [0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d];
+    var std_ac_luminance_values = [0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa];
+    var std_dc_chrominance_nrcodes = [0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0];
+    var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
+    var std_ac_chrominance_nrcodes = [0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77];
+    var std_ac_chrominance_values = [0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa];
+
+    function initQuantTables(sf) {
+      var YQT = [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];
+
+      for (var i = 0; i < 64; i++) {
+        var t = ffloor((YQT[i] * sf + 50) / 100);
+        t = Math.min(Math.max(t, 1), 255);
+        YTable[ZigZag[i]] = t;
+      }
+
+      var UVQT = [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];
+
+      for (var j = 0; j < 64; j++) {
+        var u = ffloor((UVQT[j] * sf + 50) / 100);
+        u = Math.min(Math.max(u, 1), 255);
+        UVTable[ZigZag[j]] = u;
+      }
+
+      var aasf = [1.0, 1.387039845, 1.306562965, 1.175875602, 1.0, 0.785694958, 0.5411961, 0.275899379];
+      var k = 0;
+
+      for (var row = 0; row < 8; row++) {
+        for (var col = 0; col < 8; col++) {
+          fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);
+          fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);
+          k++;
+        }
+      }
+    }
+
+    function computeHuffmanTbl(nrcodes, std_table) {
+      var codevalue = 0;
+      var pos_in_table = 0;
+      var HT = new Array();
+
+      for (var k = 1; k <= 16; k++) {
+        for (var j = 1; j <= nrcodes[k]; j++) {
+          HT[std_table[pos_in_table]] = [];
+          HT[std_table[pos_in_table]][0] = codevalue;
+          HT[std_table[pos_in_table]][1] = k;
+          pos_in_table++;
+          codevalue++;
+        }
+
+        codevalue *= 2;
+      }
+
+      return HT;
+    }
+
+    function initHuffmanTbl() {
+      YDC_HT = computeHuffmanTbl(std_dc_luminance_nrcodes, std_dc_luminance_values);
+      UVDC_HT = computeHuffmanTbl(std_dc_chrominance_nrcodes, std_dc_chrominance_values);
+      YAC_HT = computeHuffmanTbl(std_ac_luminance_nrcodes, std_ac_luminance_values);
+      UVAC_HT = computeHuffmanTbl(std_ac_chrominance_nrcodes, std_ac_chrominance_values);
+    }
+
+    function initCategoryNumber() {
+      var nrlower = 1;
+      var nrupper = 2;
+
+      for (var cat = 1; cat <= 15; cat++) {
+        //Positive numbers
+        for (var nr = nrlower; nr < nrupper; nr++) {
+          category[32767 + nr] = cat;
+          bitcode[32767 + nr] = [];
+          bitcode[32767 + nr][1] = cat;
+          bitcode[32767 + nr][0] = nr;
+        } //Negative numbers
+
+
+        for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {
+          category[32767 + nrneg] = cat;
+          bitcode[32767 + nrneg] = [];
+          bitcode[32767 + nrneg][1] = cat;
+          bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;
+        }
+
+        nrlower <<= 1;
+        nrupper <<= 1;
+      }
+    }
+
+    function initRGBYUVTable() {
+      for (var i = 0; i < 256; i++) {
+        RGB_YUV_TABLE[i] = 19595 * i;
+        RGB_YUV_TABLE[i + 256 >> 0] = 38470 * i;
+        RGB_YUV_TABLE[i + 512 >> 0] = 7471 * i + 0x8000;
+        RGB_YUV_TABLE[i + 768 >> 0] = -11059 * i;
+        RGB_YUV_TABLE[i + 1024 >> 0] = -21709 * i;
+        RGB_YUV_TABLE[i + 1280 >> 0] = 32768 * i + 0x807fff;
+        RGB_YUV_TABLE[i + 1536 >> 0] = -27439 * i;
+        RGB_YUV_TABLE[i + 1792 >> 0] = -5329 * i;
+      }
+    } // IO functions
+
+
+    function writeBits(bs) {
+      var value = bs[0];
+      var posval = bs[1] - 1;
+
+      while (posval >= 0) {
+        if (value & 1 << posval) {
+          bytenew |= 1 << bytepos;
+        }
+
+        posval--;
+        bytepos--;
+
+        if (bytepos < 0) {
+          if (bytenew == 0xff) {
+            writeByte(0xff);
+            writeByte(0);
+          } else {
+            writeByte(bytenew);
+          }
+
+          bytepos = 7;
+          bytenew = 0;
+        }
+      }
+    }
+
+    function writeByte(value) {
+      //byteout.push(clt[value]); // write char directly instead of converting later
+      byteout.push(value);
+    }
+
+    function writeWord(value) {
+      writeByte(value >> 8 & 0xff);
+      writeByte(value & 0xff);
+    } // DCT & quantization core
+
+
+    function fDCTQuant(data, fdtbl) {
+      var d0, d1, d2, d3, d4, d5, d6, d7;
+      /* Pass 1: process rows. */
+
+      var dataOff = 0;
+      var i;
+      var I8 = 8;
+      var I64 = 64;
+
+      for (i = 0; i < I8; ++i) {
+        d0 = data[dataOff];
+        d1 = data[dataOff + 1];
+        d2 = data[dataOff + 2];
+        d3 = data[dataOff + 3];
+        d4 = data[dataOff + 4];
+        d5 = data[dataOff + 5];
+        d6 = data[dataOff + 6];
+        d7 = data[dataOff + 7];
+        var tmp0 = d0 + d7;
+        var tmp7 = d0 - d7;
+        var tmp1 = d1 + d6;
+        var tmp6 = d1 - d6;
+        var tmp2 = d2 + d5;
+        var tmp5 = d2 - d5;
+        var tmp3 = d3 + d4;
+        var tmp4 = d3 - d4;
+        /* Even part */
+
+        var tmp10 = tmp0 + tmp3;
+        /* phase 2 */
+
+        var tmp13 = tmp0 - tmp3;
+        var tmp11 = tmp1 + tmp2;
+        var tmp12 = tmp1 - tmp2;
+        data[dataOff] = tmp10 + tmp11;
+        /* phase 3 */
+
+        data[dataOff + 4] = tmp10 - tmp11;
+        var z1 = (tmp12 + tmp13) * 0.707106781;
+        /* c4 */
+
+        data[dataOff + 2] = tmp13 + z1;
+        /* phase 5 */
+
+        data[dataOff + 6] = tmp13 - z1;
+        /* Odd part */
+
+        tmp10 = tmp4 + tmp5;
+        /* phase 2 */
+
+        tmp11 = tmp5 + tmp6;
+        tmp12 = tmp6 + tmp7;
+        /* The rotator is modified from fig 4-8 to avoid extra negations. */
+
+        var z5 = (tmp10 - tmp12) * 0.382683433;
+        /* c6 */
+
+        var z2 = 0.5411961 * tmp10 + z5;
+        /* c2-c6 */
+
+        var z4 = 1.306562965 * tmp12 + z5;
+        /* c2+c6 */
+
+        var z3 = tmp11 * 0.707106781;
+        /* c4 */
+
+        var z11 = tmp7 + z3;
+        /* phase 5 */
+
+        var z13 = tmp7 - z3;
+        data[dataOff + 5] = z13 + z2;
+        /* phase 6 */
+
+        data[dataOff + 3] = z13 - z2;
+        data[dataOff + 1] = z11 + z4;
+        data[dataOff + 7] = z11 - z4;
+        dataOff += 8;
+        /* advance pointer to next row */
+      }
+      /* Pass 2: process columns. */
+
+
+      dataOff = 0;
+
+      for (i = 0; i < I8; ++i) {
+        d0 = data[dataOff];
+        d1 = data[dataOff + 8];
+        d2 = data[dataOff + 16];
+        d3 = data[dataOff + 24];
+        d4 = data[dataOff + 32];
+        d5 = data[dataOff + 40];
+        d6 = data[dataOff + 48];
+        d7 = data[dataOff + 56];
+        var tmp0p2 = d0 + d7;
+        var tmp7p2 = d0 - d7;
+        var tmp1p2 = d1 + d6;
+        var tmp6p2 = d1 - d6;
+        var tmp2p2 = d2 + d5;
+        var tmp5p2 = d2 - d5;
+        var tmp3p2 = d3 + d4;
+        var tmp4p2 = d3 - d4;
+        /* Even part */
+
+        var tmp10p2 = tmp0p2 + tmp3p2;
+        /* phase 2 */
+
+        var tmp13p2 = tmp0p2 - tmp3p2;
+        var tmp11p2 = tmp1p2 + tmp2p2;
+        var tmp12p2 = tmp1p2 - tmp2p2;
+        data[dataOff] = tmp10p2 + tmp11p2;
+        /* phase 3 */
+
+        data[dataOff + 32] = tmp10p2 - tmp11p2;
+        var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781;
+        /* c4 */
+
+        data[dataOff + 16] = tmp13p2 + z1p2;
+        /* phase 5 */
+
+        data[dataOff + 48] = tmp13p2 - z1p2;
+        /* Odd part */
+
+        tmp10p2 = tmp4p2 + tmp5p2;
+        /* phase 2 */
+
+        tmp11p2 = tmp5p2 + tmp6p2;
+        tmp12p2 = tmp6p2 + tmp7p2;
+        /* The rotator is modified from fig 4-8 to avoid extra negations. */
+
+        var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433;
+        /* c6 */
+
+        var z2p2 = 0.5411961 * tmp10p2 + z5p2;
+        /* c2-c6 */
+
+        var z4p2 = 1.306562965 * tmp12p2 + z5p2;
+        /* c2+c6 */
+
+        var z3p2 = tmp11p2 * 0.707106781;
+        /* c4 */
+
+        var z11p2 = tmp7p2 + z3p2;
+        /* phase 5 */
+
+        var z13p2 = tmp7p2 - z3p2;
+        data[dataOff + 40] = z13p2 + z2p2;
+        /* phase 6 */
+
+        data[dataOff + 24] = z13p2 - z2p2;
+        data[dataOff + 8] = z11p2 + z4p2;
+        data[dataOff + 56] = z11p2 - z4p2;
+        dataOff++;
+        /* advance pointer to next column */
+      } // Quantize/descale the coefficients
+
+
+      var fDCTQuant;
+
+      for (i = 0; i < I64; ++i) {
+        // Apply the quantization and scaling factor & Round to nearest integer
+        fDCTQuant = data[i] * fdtbl[i];
+        outputfDCTQuant[i] = fDCTQuant > 0.0 ? fDCTQuant + 0.5 | 0 : fDCTQuant - 0.5 | 0; //outputfDCTQuant[i] = fround(fDCTQuant);
+      }
+
+      return outputfDCTQuant;
+    }
+
+    function writeAPP0() {
+      writeWord(0xffe0); // marker
+
+      writeWord(16); // length
+
+      writeByte(0x4a); // J
+
+      writeByte(0x46); // F
+
+      writeByte(0x49); // I
+
+      writeByte(0x46); // F
+
+      writeByte(0); // = "JFIF",'\0'
+
+      writeByte(1); // versionhi
+
+      writeByte(1); // versionlo
+
+      writeByte(0); // xyunits
+
+      writeWord(1); // xdensity
+
+      writeWord(1); // ydensity
+
+      writeByte(0); // thumbnwidth
+
+      writeByte(0); // thumbnheight
+    }
+
+    function writeSOF0(width, height) {
+      writeWord(0xffc0); // marker
+
+      writeWord(17); // length, truecolor YUV JPG
+
+      writeByte(8); // precision
+
+      writeWord(height);
+      writeWord(width);
+      writeByte(3); // nrofcomponents
+
+      writeByte(1); // IdY
+
+      writeByte(0x11); // HVY
+
+      writeByte(0); // QTY
+
+      writeByte(2); // IdU
+
+      writeByte(0x11); // HVU
+
+      writeByte(1); // QTU
+
+      writeByte(3); // IdV
+
+      writeByte(0x11); // HVV
+
+      writeByte(1); // QTV
+    }
+
+    function writeDQT() {
+      writeWord(0xffdb); // marker
+
+      writeWord(132); // length
+
+      writeByte(0);
+
+      for (var i = 0; i < 64; i++) {
+        writeByte(YTable[i]);
+      }
+
+      writeByte(1);
+
+      for (var j = 0; j < 64; j++) {
+        writeByte(UVTable[j]);
+      }
+    }
+
+    function writeDHT() {
+      writeWord(0xffc4); // marker
+
+      writeWord(0x01a2); // length
+
+      writeByte(0); // HTYDCinfo
+
+      for (var i = 0; i < 16; i++) {
+        writeByte(std_dc_luminance_nrcodes[i + 1]);
+      }
+
+      for (var j = 0; j <= 11; j++) {
+        writeByte(std_dc_luminance_values[j]);
+      }
+
+      writeByte(0x10); // HTYACinfo
+
+      for (var k = 0; k < 16; k++) {
+        writeByte(std_ac_luminance_nrcodes[k + 1]);
+      }
+
+      for (var l = 0; l <= 161; l++) {
+        writeByte(std_ac_luminance_values[l]);
+      }
+
+      writeByte(1); // HTUDCinfo
+
+      for (var m = 0; m < 16; m++) {
+        writeByte(std_dc_chrominance_nrcodes[m + 1]);
+      }
+
+      for (var n = 0; n <= 11; n++) {
+        writeByte(std_dc_chrominance_values[n]);
+      }
+
+      writeByte(0x11); // HTUACinfo
+
+      for (var o = 0; o < 16; o++) {
+        writeByte(std_ac_chrominance_nrcodes[o + 1]);
+      }
+
+      for (var p = 0; p <= 161; p++) {
+        writeByte(std_ac_chrominance_values[p]);
+      }
+    }
+
+    function writeSOS() {
+      writeWord(0xffda); // marker
+
+      writeWord(12); // length
+
+      writeByte(3); // nrofcomponents
+
+      writeByte(1); // IdY
+
+      writeByte(0); // HTY
+
+      writeByte(2); // IdU
+
+      writeByte(0x11); // HTU
+
+      writeByte(3); // IdV
+
+      writeByte(0x11); // HTV
+
+      writeByte(0); // Ss
+
+      writeByte(0x3f); // Se
+
+      writeByte(0); // Bf
+    }
+
+    function processDU(CDU, fdtbl, DC, HTDC, HTAC) {
+      var EOB = HTAC[0x00];
+      var M16zeroes = HTAC[0xf0];
+      var pos;
+      var I16 = 16;
+      var I63 = 63;
+      var I64 = 64;
+      var DU_DCT = fDCTQuant(CDU, fdtbl); //ZigZag reorder
+
+      for (var j = 0; j < I64; ++j) {
+        DU[ZigZag[j]] = DU_DCT[j];
+      }
+
+      var Diff = DU[0] - DC;
+      DC = DU[0]; //Encode DC
+
+      if (Diff == 0) {
+        writeBits(HTDC[0]); // Diff might be 0
+      } else {
+        pos = 32767 + Diff;
+        writeBits(HTDC[category[pos]]);
+        writeBits(bitcode[pos]);
+      } //Encode ACs
+
+
+      var end0pos = 63; // was const... which is crazy
+
+      while (end0pos > 0 && DU[end0pos] == 0) {
+        end0pos--;
+      } //end0pos = first element in reverse order !=0
+
+
+      if (end0pos == 0) {
+        writeBits(EOB);
+        return DC;
+      }
+
+      var i = 1;
+      var lng;
+
+      while (i <= end0pos) {
+        var startpos = i;
+
+        while (DU[i] == 0 && i <= end0pos) {
+          ++i;
+        }
+
+        var nrzeroes = i - startpos;
+
+        if (nrzeroes >= I16) {
+          lng = nrzeroes >> 4;
+
+          for (var nrmarker = 1; nrmarker <= lng; ++nrmarker) {
+            writeBits(M16zeroes);
+          }
+
+          nrzeroes = nrzeroes & 0xf;
+        }
+
+        pos = 32767 + DU[i];
+        writeBits(HTAC[(nrzeroes << 4) + category[pos]]);
+        writeBits(bitcode[pos]);
+        i++;
+      }
+
+      if (end0pos != I63) {
+        writeBits(EOB);
+      }
+
+      return DC;
+    }
+
+    function initCharLookupTable() {
+      var sfcc = String.fromCharCode;
+
+      for (var i = 0; i < 256; i++) {
+        ///// ACHTUNG // 255
+        clt[i] = sfcc(i);
+      }
+    }
+
+    this.encode = function (image, quality // image data object
+    ) {
+      if (quality) setQuality(quality); // Initialize bit writer
+
+      byteout = new Array();
+      bytenew = 0;
+      bytepos = 7; // Add JPEG headers
+
+      writeWord(0xffd8); // SOI
+
+      writeAPP0();
+      writeDQT();
+      writeSOF0(image.width, image.height);
+      writeDHT();
+      writeSOS(); // Encode 8x8 macroblocks
+
+      var DCY = 0;
+      var DCU = 0;
+      var DCV = 0;
+      bytenew = 0;
+      bytepos = 7;
+      this.encode.displayName = "_encode_";
+      var imageData = image.data;
+      var width = image.width;
+      var height = image.height;
+      var quadWidth = width * 4;
+      var x,
+          y = 0;
+      var r, g, b;
+      var start, p, col, row, pos;
+
+      while (y < height) {
+        x = 0;
+
+        while (x < quadWidth) {
+          start = quadWidth * y + x;
+          col = -1;
+          row = 0;
+
+          for (pos = 0; pos < 64; pos++) {
+            row = pos >> 3; // /8
+
+            col = (pos & 7) * 4; // %8
+
+            p = start + row * quadWidth + col;
+
+            if (y + row >= height) {
+              // padding bottom
+              p -= quadWidth * (y + 1 + row - height);
+            }
+
+            if (x + col >= quadWidth) {
+              // padding right
+              p -= x + col - quadWidth + 4;
+            }
+
+            r = imageData[p++];
+            g = imageData[p++];
+            b = imageData[p++];
+            /* // calculate YUV values dynamically
+            YDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80
+            UDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));
+            VDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));
+            */
+            // use lookup table (slightly faster)
+
+            YDU[pos] = (RGB_YUV_TABLE[r] + RGB_YUV_TABLE[g + 256 >> 0] + RGB_YUV_TABLE[b + 512 >> 0] >> 16) - 128;
+            UDU[pos] = (RGB_YUV_TABLE[r + 768 >> 0] + RGB_YUV_TABLE[g + 1024 >> 0] + RGB_YUV_TABLE[b + 1280 >> 0] >> 16) - 128;
+            VDU[pos] = (RGB_YUV_TABLE[r + 1280 >> 0] + RGB_YUV_TABLE[g + 1536 >> 0] + RGB_YUV_TABLE[b + 1792 >> 0] >> 16) - 128;
+          }
+
+          DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);
+          DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);
+          DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);
+          x += 32;
+        }
+
+        y += 8;
+      } ////////////////////////////////////////////////////////////////
+      // Do the bit alignment of the EOI marker
+
+
+      if (bytepos >= 0) {
+        var fillbits = [];
+        fillbits[1] = bytepos + 1;
+        fillbits[0] = (1 << bytepos + 1) - 1;
+        writeBits(fillbits);
+      }
+
+      writeWord(0xffd9); //EOI
+
+      return new Uint8Array(byteout);
+    };
+
+    function setQuality(quality) {
+      quality = Math.min(Math.max(quality, 1), 100);
+      if (currentQuality == quality) return; // don't recalc if unchanged
+
+      var sf = quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);
+      initQuantTables(sf);
+      currentQuality = quality; //console.log('Quality set to: '+quality +'%');
+    }
+
+    function init() {
+      quality = quality || 50; // Create tables
+
+      initCharLookupTable();
+      initHuffmanTbl();
+      initCategoryNumber();
+      initRGBYUVTable();
+      setQuality(quality);
+    }
+
+    init();
+  }
+
+  /**
+   * @license
+   * Copyright (c) 2017 Aras Abbasi
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * jsPDF Gif Support PlugIn
+   *
+   * @name gif_support
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    jsPDFAPI.processGIF89A = function (imageData, index, alias, compression) {
+      var reader = new GifReader(imageData);
+      var width = reader.width,
+          height = reader.height;
+      var qu = 100;
+      var pixels = [];
+      reader.decodeAndBlitFrameRGBA(0, pixels);
+      var rawImageData = {
+        data: pixels,
+        width: width,
+        height: height
+      };
+      var encoder = new JPEGEncoder(qu);
+      var data = encoder.encode(rawImageData, qu);
+      return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);
+    };
+
+    jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;
+  })(jsPDF.API);
+
+  /**
+   * @author shaozilee
+   *
+   * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp
+   *
+   */
+
+  function BmpDecoder(buffer, is_with_alpha) {
+    this.pos = 0;
+    this.buffer = buffer;
+    this.datav = new DataView(buffer.buffer);
+    this.is_with_alpha = !!is_with_alpha;
+    this.bottom_up = true;
+    this.flag = String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);
+    this.pos += 2;
+    if (["BM", "BA", "CI", "CP", "IC", "PT"].indexOf(this.flag) === -1) throw new Error("Invalid BMP File");
+    this.parseHeader();
+    this.parseBGR();
+  }
+
+  BmpDecoder.prototype.parseHeader = function () {
+    this.fileSize = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+    this.reserved = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+    this.offset = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+    this.headerSize = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+    this.width = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+    this.height = this.datav.getInt32(this.pos, true);
+    this.pos += 4;
+    this.planes = this.datav.getUint16(this.pos, true);
+    this.pos += 2;
+    this.bitPP = this.datav.getUint16(this.pos, true);
+    this.pos += 2;
+    this.compress = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+    this.rawSize = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+    this.hr = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+    this.vr = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+    this.colors = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+    this.importantColors = this.datav.getUint32(this.pos, true);
+    this.pos += 4;
+
+    if (this.bitPP === 16 && this.is_with_alpha) {
+      this.bitPP = 15;
+    }
+
+    if (this.bitPP < 15) {
+      var len = this.colors === 0 ? 1 << this.bitPP : this.colors;
+      this.palette = new Array(len);
+
+      for (var i = 0; i < len; i++) {
+        var blue = this.datav.getUint8(this.pos++, true);
+        var green = this.datav.getUint8(this.pos++, true);
+        var red = this.datav.getUint8(this.pos++, true);
+        var quad = this.datav.getUint8(this.pos++, true);
+        this.palette[i] = {
+          red: red,
+          green: green,
+          blue: blue,
+          quad: quad
+        };
+      }
+    }
+
+    if (this.height < 0) {
+      this.height *= -1;
+      this.bottom_up = false;
+    }
+  };
+
+  BmpDecoder.prototype.parseBGR = function () {
+    this.pos = this.offset;
+
+    try {
+      var bitn = "bit" + this.bitPP;
+      var len = this.width * this.height * 4;
+      this.data = new Uint8Array(len);
+      this[bitn]();
+    } catch (e) {
+      console.log("bit decode error:" + e);
+    }
+  };
+
+  BmpDecoder.prototype.bit1 = function () {
+    var xlen = Math.ceil(this.width / 8);
+    var mode = xlen % 4;
+    var y;
+
+    for (y = this.height - 1; y >= 0; y--) {
+      var line = this.bottom_up ? y : this.height - 1 - y;
+
+      for (var x = 0; x < xlen; x++) {
+        var b = this.datav.getUint8(this.pos++, true);
+        var location = line * this.width * 4 + x * 8 * 4;
+
+        for (var i = 0; i < 8; i++) {
+          if (x * 8 + i < this.width) {
+            var rgb = this.palette[b >> 7 - i & 0x1];
+            this.data[location + i * 4] = rgb.blue;
+            this.data[location + i * 4 + 1] = rgb.green;
+            this.data[location + i * 4 + 2] = rgb.red;
+            this.data[location + i * 4 + 3] = 0xff;
+          } else {
+            break;
+          }
+        }
+      }
+
+      if (mode !== 0) {
+        this.pos += 4 - mode;
+      }
+    }
+  };
+
+  BmpDecoder.prototype.bit4 = function () {
+    var xlen = Math.ceil(this.width / 2);
+    var mode = xlen % 4;
+
+    for (var y = this.height - 1; y >= 0; y--) {
+      var line = this.bottom_up ? y : this.height - 1 - y;
+
+      for (var x = 0; x < xlen; x++) {
+        var b = this.datav.getUint8(this.pos++, true);
+        var location = line * this.width * 4 + x * 2 * 4;
+        var before = b >> 4;
+        var after = b & 0x0f;
+        var rgb = this.palette[before];
+        this.data[location] = rgb.blue;
+        this.data[location + 1] = rgb.green;
+        this.data[location + 2] = rgb.red;
+        this.data[location + 3] = 0xff;
+        if (x * 2 + 1 >= this.width) break;
+        rgb = this.palette[after];
+        this.data[location + 4] = rgb.blue;
+        this.data[location + 4 + 1] = rgb.green;
+        this.data[location + 4 + 2] = rgb.red;
+        this.data[location + 4 + 3] = 0xff;
+      }
+
+      if (mode !== 0) {
+        this.pos += 4 - mode;
+      }
+    }
+  };
+
+  BmpDecoder.prototype.bit8 = function () {
+    var mode = this.width % 4;
+
+    for (var y = this.height - 1; y >= 0; y--) {
+      var line = this.bottom_up ? y : this.height - 1 - y;
+
+      for (var x = 0; x < this.width; x++) {
+        var b = this.datav.getUint8(this.pos++, true);
+        var location = line * this.width * 4 + x * 4;
+
+        if (b < this.palette.length) {
+          var rgb = this.palette[b];
+          this.data[location] = rgb.red;
+          this.data[location + 1] = rgb.green;
+          this.data[location + 2] = rgb.blue;
+          this.data[location + 3] = 0xff;
+        } else {
+          this.data[location] = 0xff;
+          this.data[location + 1] = 0xff;
+          this.data[location + 2] = 0xff;
+          this.data[location + 3] = 0xff;
+        }
+      }
+
+      if (mode !== 0) {
+        this.pos += 4 - mode;
+      }
+    }
+  };
+
+  BmpDecoder.prototype.bit15 = function () {
+    var dif_w = this.width % 3;
+
+    var _11111 = parseInt("11111", 2),
+        _1_5 = _11111;
+
+    for (var y = this.height - 1; y >= 0; y--) {
+      var line = this.bottom_up ? y : this.height - 1 - y;
+
+      for (var x = 0; x < this.width; x++) {
+        var B = this.datav.getUint16(this.pos, true);
+        this.pos += 2;
+        var blue = (B & _1_5) / _1_5 * 255 | 0;
+        var green = (B >> 5 & _1_5) / _1_5 * 255 | 0;
+        var red = (B >> 10 & _1_5) / _1_5 * 255 | 0;
+        var alpha = B >> 15 ? 0xff : 0x00;
+        var location = line * this.width * 4 + x * 4;
+        this.data[location] = red;
+        this.data[location + 1] = green;
+        this.data[location + 2] = blue;
+        this.data[location + 3] = alpha;
+      } //skip extra bytes
+
+
+      this.pos += dif_w;
+    }
+  };
+
+  BmpDecoder.prototype.bit16 = function () {
+    var dif_w = this.width % 3;
+
+    var _11111 = parseInt("11111", 2),
+        _1_5 = _11111;
+
+    var _111111 = parseInt("111111", 2),
+        _1_6 = _111111;
+
+    for (var y = this.height - 1; y >= 0; y--) {
+      var line = this.bottom_up ? y : this.height - 1 - y;
+
+      for (var x = 0; x < this.width; x++) {
+        var B = this.datav.getUint16(this.pos, true);
+        this.pos += 2;
+        var alpha = 0xff;
+        var blue = (B & _1_5) / _1_5 * 255 | 0;
+        var green = (B >> 5 & _1_6) / _1_6 * 255 | 0;
+        var red = (B >> 11) / _1_5 * 255 | 0;
+        var location = line * this.width * 4 + x * 4;
+        this.data[location] = red;
+        this.data[location + 1] = green;
+        this.data[location + 2] = blue;
+        this.data[location + 3] = alpha;
+      } //skip extra bytes
+
+
+      this.pos += dif_w;
+    }
+  };
+
+  BmpDecoder.prototype.bit24 = function () {
+    //when height > 0
+    for (var y = this.height - 1; y >= 0; y--) {
+      var line = this.bottom_up ? y : this.height - 1 - y;
+
+      for (var x = 0; x < this.width; x++) {
+        var blue = this.datav.getUint8(this.pos++, true);
+        var green = this.datav.getUint8(this.pos++, true);
+        var red = this.datav.getUint8(this.pos++, true);
+        var location = line * this.width * 4 + x * 4;
+        this.data[location] = red;
+        this.data[location + 1] = green;
+        this.data[location + 2] = blue;
+        this.data[location + 3] = 0xff;
+      } //skip extra bytes
+
+
+      this.pos += this.width % 4;
+    }
+  };
+  /**
+   * add 32bit decode func
+   * @author soubok
+   */
+
+
+  BmpDecoder.prototype.bit32 = function () {
+    //when height > 0
+    for (var y = this.height - 1; y >= 0; y--) {
+      var line = this.bottom_up ? y : this.height - 1 - y;
+
+      for (var x = 0; x < this.width; x++) {
+        var blue = this.datav.getUint8(this.pos++, true);
+        var green = this.datav.getUint8(this.pos++, true);
+        var red = this.datav.getUint8(this.pos++, true);
+        var alpha = this.datav.getUint8(this.pos++, true);
+        var location = line * this.width * 4 + x * 4;
+        this.data[location] = red;
+        this.data[location + 1] = green;
+        this.data[location + 2] = blue;
+        this.data[location + 3] = alpha;
+      } //skip extra bytes
+      //this.pos += (this.width % 4);
+
+    }
+  };
+
+  BmpDecoder.prototype.getData = function () {
+    return this.data;
+  };
+
+  /**
+   * @license
+   * Copyright (c) 2018 Aras Abbasi
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+
+  /**
+   * jsPDF bmp Support PlugIn
+   * @name bmp_support
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    jsPDFAPI.processBMP = function (imageData, index, alias, compression) {
+      var reader = new BmpDecoder(imageData, false);
+      var width = reader.width,
+          height = reader.height;
+      var qu = 100;
+      var pixels = reader.getData();
+      var rawImageData = {
+        data: pixels,
+        width: width,
+        height: height
+      };
+      var encoder = new JPEGEncoder(qu);
+      var data = encoder.encode(rawImageData, qu);
+      return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);
+    };
+  })(jsPDF.API);
+
+  function WebPDecoder(imageData) {
+
+    function x(F) {
+      if (!F) throw Error("assert :P");
+    }
+
+    function fa(F, L, J) {
+      for (var H = 0; 4 > H; H++) {
+        if (F[L + H] != J.charCodeAt(H)) return !0;
+      }
+
+      return !1;
+    }
+
+    function I(F, L, J, H, Z) {
+      for (var O = 0; O < Z; O++) {
+        F[L + O] = J[H + O];
+      }
+    }
+
+    function M(F, L, J, H) {
+      for (var Z = 0; Z < H; Z++) {
+        F[L + Z] = J;
+      }
+    }
+
+    function V(F) {
+      return new Int32Array(F);
+    }
+
+    function wa(F, L) {
+      for (var J = [], H = 0; H < F; H++) {
+        J.push(new L());
+      }
+
+      return J;
+    }
+
+    function wb() {
+      function F(J, H, Z) {
+        for (var O = Z[H], L = 0; L < O; L++) {
+          J.push(Z.length > H + 1 ? [] : 0);
+          if (Z.length < H + 1) break;
+          F(J[L], H + 1, Z);
+        }
+      }
+
+      var L = [];
+      F(L, 0, [3, 11]);
+      return L;
+    }
+
+    function Ed(F, L) {
+      function J(H, O, F) {
+        for (var Z = F[O], ma = 0; ma < Z; ma++) {
+          H.push(F.length > O + 1 ? [] : new L());
+          if (F.length < O + 1) break;
+          J(H[ma], O + 1, F);
+        }
+      }
+
+      var H = [];
+      J(H, 0, F);
+      return H;
+    }
+
+    var _WebPDecoder = function _WebPDecoder() {
+      var self = this;
+
+      function L(a, b) {
+        for (var c = 1 << b - 1 >>> 0; a & c;) {
+          c >>>= 1;
+        }
+
+        return c ? (a & c - 1) + c : a;
+      }
+
+      function J(a, b, c, d, e) {
+        x(!(d % c));
+
+        do {
+          d -= c, a[b + d] = e;
+        } while (0 < d);
+      }
+
+      function H(a, b, c, d, e, f) {
+        var g = b,
+            h = 1 << c,
+            k,
+            l,
+            m = V(16),
+            n = V(16);
+        x(0 != e);
+        x(null != d);
+        x(null != a);
+        x(0 < c);
+
+        for (l = 0; l < e; ++l) {
+          if (15 < d[l]) return 0;
+          ++m[d[l]];
+        }
+
+        if (m[0] == e) return 0;
+        n[1] = 0;
+
+        for (k = 1; 15 > k; ++k) {
+          if (m[k] > 1 << k) return 0;
+          n[k + 1] = n[k] + m[k];
+        }
+
+        for (l = 0; l < e; ++l) {
+          k = d[l], 0 < d[l] && (f[n[k]++] = l);
+        }
+
+        if (1 == n[15]) return d = new O(), d.g = 0, d.value = f[0], J(a, g, 1, h, d), h;
+        var r = -1,
+            q = h - 1,
+            t = 0,
+            v = 1,
+            p = 1,
+            u,
+            w = 1 << c;
+        l = 0;
+        k = 1;
+
+        for (e = 2; k <= c; ++k, e <<= 1) {
+          p <<= 1;
+          v += p;
+          p -= m[k];
+          if (0 > p) return 0;
+
+          for (; 0 < m[k]; --m[k]) {
+            d = new O(), d.g = k, d.value = f[l++], J(a, g + t, e, w, d), t = L(t, k);
+          }
+        }
+
+        k = c + 1;
+
+        for (e = 2; 15 >= k; ++k, e <<= 1) {
+          p <<= 1;
+          v += p;
+          p -= m[k];
+          if (0 > p) return 0;
+
+          for (; 0 < m[k]; --m[k]) {
+            d = new O();
+
+            if ((t & q) != r) {
+              g += w;
+              r = k;
+
+              for (u = 1 << r - c; 15 > r;) {
+                u -= m[r];
+                if (0 >= u) break;
+                ++r;
+                u <<= 1;
+              }
+
+              u = r - c;
+              w = 1 << u;
+              h += w;
+              r = t & q;
+              a[b + r].g = u + c;
+              a[b + r].value = g - b - r;
+            }
+
+            d.g = k - c;
+            d.value = f[l++];
+            J(a, g + (t >> c), e, w, d);
+            t = L(t, k);
+          }
+        }
+
+        return v != 2 * n[15] - 1 ? 0 : h;
+      }
+
+      function Z(a, b, c, d, e) {
+        x(2328 >= e);
+        if (512 >= e) var f = V(512);else if (f = V(e), null == f) return 0;
+        return H(a, b, c, d, e, f);
+      }
+
+      function O() {
+        this.value = this.g = 0;
+      }
+
+      function Fd() {
+        this.value = this.g = 0;
+      }
+
+      function Ub() {
+        this.G = wa(5, O);
+        this.H = V(5);
+        this.jc = this.Qb = this.qb = this.nd = 0;
+        this.pd = wa(xb, Fd);
+      }
+
+      function ma(a, b, c, d) {
+        x(null != a);
+        x(null != b);
+        x(2147483648 > d);
+        a.Ca = 254;
+        a.I = 0;
+        a.b = -8;
+        a.Ka = 0;
+        a.oa = b;
+        a.pa = c;
+        a.Jd = b;
+        a.Yc = c + d;
+        a.Zc = 4 <= d ? c + d - 4 + 1 : c;
+        Qa(a);
+      }
+
+      function na(a, b) {
+        for (var c = 0; 0 < b--;) {
+          c |= K(a, 128) << b;
+        }
+
+        return c;
+      }
+
+      function ca(a, b) {
+        var c = na(a, b);
+        return G(a) ? -c : c;
+      }
+
+      function cb(a, b, c, d) {
+        var e,
+            f = 0;
+        x(null != a);
+        x(null != b);
+        x(4294967288 > d);
+        a.Sb = d;
+        a.Ra = 0;
+        a.u = 0;
+        a.h = 0;
+        4 < d && (d = 4);
+
+        for (e = 0; e < d; ++e) {
+          f += b[c + e] << 8 * e;
+        }
+
+        a.Ra = f;
+        a.bb = d;
+        a.oa = b;
+        a.pa = c;
+      }
+
+      function Vb(a) {
+        for (; 8 <= a.u && a.bb < a.Sb;) {
+          a.Ra >>>= 8, a.Ra += a.oa[a.pa + a.bb] << ob - 8 >>> 0, ++a.bb, a.u -= 8;
+        }
+
+        db(a) && (a.h = 1, a.u = 0);
+      }
+
+      function D(a, b) {
+        x(0 <= b);
+
+        if (!a.h && b <= Gd) {
+          var c = pb(a) & Hd[b];
+          a.u += b;
+          Vb(a);
+          return c;
+        }
+
+        a.h = 1;
+        return a.u = 0;
+      }
+
+      function Wb() {
+        this.b = this.Ca = this.I = 0;
+        this.oa = [];
+        this.pa = 0;
+        this.Jd = [];
+        this.Yc = 0;
+        this.Zc = [];
+        this.Ka = 0;
+      }
+
+      function Ra() {
+        this.Ra = 0;
+        this.oa = [];
+        this.h = this.u = this.bb = this.Sb = this.pa = 0;
+      }
+
+      function pb(a) {
+        return a.Ra >>> (a.u & ob - 1) >>> 0;
+      }
+
+      function db(a) {
+        x(a.bb <= a.Sb);
+        return a.h || a.bb == a.Sb && a.u > ob;
+      }
+
+      function qb(a, b) {
+        a.u = b;
+        a.h = db(a);
+      }
+
+      function Sa(a) {
+        a.u >= Xb && (x(a.u >= Xb), Vb(a));
+      }
+
+      function Qa(a) {
+        x(null != a && null != a.oa);
+        a.pa < a.Zc ? (a.I = (a.oa[a.pa++] | a.I << 8) >>> 0, a.b += 8) : (x(null != a && null != a.oa), a.pa < a.Yc ? (a.b += 8, a.I = a.oa[a.pa++] | a.I << 8) : a.Ka ? a.b = 0 : (a.I <<= 8, a.b += 8, a.Ka = 1));
+      }
+
+      function G(a) {
+        return na(a, 1);
+      }
+
+      function K(a, b) {
+        var c = a.Ca;
+        0 > a.b && Qa(a);
+        var d = a.b,
+            e = c * b >>> 8,
+            f = (a.I >>> d > e) + 0;
+        f ? (c -= e, a.I -= e + 1 << d >>> 0) : c = e + 1;
+        d = c;
+
+        for (e = 0; 256 <= d;) {
+          e += 8, d >>= 8;
+        }
+
+        d = 7 ^ e + Id[d];
+        a.b -= d;
+        a.Ca = (c << d) - 1;
+        return f;
+      }
+
+      function ra(a, b, c) {
+        a[b + 0] = c >> 24 & 255;
+        a[b + 1] = c >> 16 & 255;
+        a[b + 2] = c >> 8 & 255;
+        a[b + 3] = c >> 0 & 255;
+      }
+
+      function Ta(a, b) {
+        return a[b + 0] << 0 | a[b + 1] << 8;
+      }
+
+      function Yb(a, b) {
+        return Ta(a, b) | a[b + 2] << 16;
+      }
+
+      function Ha(a, b) {
+        return Ta(a, b) | Ta(a, b + 2) << 16;
+      }
+
+      function Zb(a, b) {
+        var c = 1 << b;
+        x(null != a);
+        x(0 < b);
+        a.X = V(c);
+        if (null == a.X) return 0;
+        a.Mb = 32 - b;
+        a.Xa = b;
+        return 1;
+      }
+
+      function $b(a, b) {
+        x(null != a);
+        x(null != b);
+        x(a.Xa == b.Xa);
+        I(b.X, 0, a.X, 0, 1 << b.Xa);
+      }
+
+      function ac() {
+        this.X = [];
+        this.Xa = this.Mb = 0;
+      }
+
+      function bc(a, b, c, d) {
+        x(null != c);
+        x(null != d);
+        var e = c[0],
+            f = d[0];
+        0 == e && (e = (a * f + b / 2) / b);
+        0 == f && (f = (b * e + a / 2) / a);
+        if (0 >= e || 0 >= f) return 0;
+        c[0] = e;
+        d[0] = f;
+        return 1;
+      }
+
+      function xa(a, b) {
+        return a + (1 << b) - 1 >>> b;
+      }
+
+      function yb(a, b) {
+        return ((a & 4278255360) + (b & 4278255360) >>> 0 & 4278255360) + ((a & 16711935) + (b & 16711935) >>> 0 & 16711935) >>> 0;
+      }
+
+      function X(a, b) {
+        self[b] = function (b, d, e, f, g, h, k) {
+          var c;
+
+          for (c = 0; c < g; ++c) {
+            var m = self[a](h[k + c - 1], e, f + c);
+            h[k + c] = yb(b[d + c], m);
+          }
+        };
+      }
+
+      function Jd() {
+        this.ud = this.hd = this.jd = 0;
+      }
+
+      function aa(a, b) {
+        return (((a ^ b) & 4278124286) >>> 1) + (a & b) >>> 0;
+      }
+
+      function sa(a) {
+        if (0 <= a && 256 > a) return a;
+        if (0 > a) return 0;
+        if (255 < a) return 255;
+      }
+
+      function eb(a, b) {
+        return sa(a + (a - b + 0.5 >> 1));
+      }
+
+      function Ia(a, b, c) {
+        return Math.abs(b - c) - Math.abs(a - c);
+      }
+
+      function cc(a, b, c, d, e, f, g) {
+        d = f[g - 1];
+
+        for (c = 0; c < e; ++c) {
+          f[g + c] = d = yb(a[b + c], d);
+        }
+      }
+
+      function Kd(a, b, c, d, e) {
+        var f;
+
+        for (f = 0; f < c; ++f) {
+          var g = a[b + f],
+              h = g >> 8 & 255,
+              k = g & 16711935,
+              k = k + ((h << 16) + h),
+              k = k & 16711935;
+          d[e + f] = (g & 4278255360) + k >>> 0;
+        }
+      }
+
+      function dc(a, b) {
+        b.jd = a >> 0 & 255;
+        b.hd = a >> 8 & 255;
+        b.ud = a >> 16 & 255;
+      }
+
+      function Ld(a, b, c, d, e, f) {
+        var g;
+
+        for (g = 0; g < d; ++g) {
+          var h = b[c + g],
+              k = h >>> 8,
+              l = h >>> 16,
+              m = h,
+              l = l + ((a.jd << 24 >> 24) * (k << 24 >> 24) >>> 5),
+              l = l & 255,
+              m = m + ((a.hd << 24 >> 24) * (k << 24 >> 24) >>> 5),
+              m = m + ((a.ud << 24 >> 24) * (l << 24 >> 24) >>> 5),
+              m = m & 255;
+          e[f + g] = (h & 4278255360) + (l << 16) + m;
+        }
+      }
+
+      function ec(a, b, c, d, e) {
+        self[b] = function (a, b, c, k, l, m, n, r, q) {
+          for (k = n; k < r; ++k) {
+            for (n = 0; n < q; ++n) {
+              l[m++] = e(c[d(a[b++])]);
+            }
+          }
+        };
+
+        self[a] = function (a, b, h, k, l, m, n) {
+          var f = 8 >> a.b,
+              g = a.Ea,
+              t = a.K[0],
+              v = a.w;
+          if (8 > f) for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {
+            var p = 0,
+                u;
+
+            for (u = 0; u < g; ++u) {
+              u & a || (p = d(k[l++])), m[n++] = e(t[p & v]), p >>= f;
+            }
+          } else self["VP8LMapColor" + c](k, l, t, v, m, n, b, h, g);
+        };
+      }
+
+      function Md(a, b, c, d, e) {
+        for (c = b + c; b < c;) {
+          var f = a[b++];
+          d[e++] = f >> 16 & 255;
+          d[e++] = f >> 8 & 255;
+          d[e++] = f >> 0 & 255;
+        }
+      }
+
+      function Nd(a, b, c, d, e) {
+        for (c = b + c; b < c;) {
+          var f = a[b++];
+          d[e++] = f >> 16 & 255;
+          d[e++] = f >> 8 & 255;
+          d[e++] = f >> 0 & 255;
+          d[e++] = f >> 24 & 255;
+        }
+      }
+
+      function Od(a, b, c, d, e) {
+        for (c = b + c; b < c;) {
+          var f = a[b++],
+              g = f >> 16 & 240 | f >> 12 & 15,
+              f = f >> 0 & 240 | f >> 28 & 15;
+          d[e++] = g;
+          d[e++] = f;
+        }
+      }
+
+      function Pd(a, b, c, d, e) {
+        for (c = b + c; b < c;) {
+          var f = a[b++],
+              g = f >> 16 & 248 | f >> 13 & 7,
+              f = f >> 5 & 224 | f >> 3 & 31;
+          d[e++] = g;
+          d[e++] = f;
+        }
+      }
+
+      function Qd(a, b, c, d, e) {
+        for (c = b + c; b < c;) {
+          var f = a[b++];
+          d[e++] = f >> 0 & 255;
+          d[e++] = f >> 8 & 255;
+          d[e++] = f >> 16 & 255;
+        }
+      }
+
+      function fb(a, b, c, d, e, f) {
+        if (0 == f) for (c = b + c; b < c;) {
+          f = a[b++], ra(d, (f[0] >> 24 | f[1] >> 8 & 65280 | f[2] << 8 & 16711680 | f[3] << 24) >>> 0), e += 32;
+        } else I(d, e, a, b, c);
+      }
+
+      function gb(a, b) {
+        self[b][0] = self[a + "0"];
+        self[b][1] = self[a + "1"];
+        self[b][2] = self[a + "2"];
+        self[b][3] = self[a + "3"];
+        self[b][4] = self[a + "4"];
+        self[b][5] = self[a + "5"];
+        self[b][6] = self[a + "6"];
+        self[b][7] = self[a + "7"];
+        self[b][8] = self[a + "8"];
+        self[b][9] = self[a + "9"];
+        self[b][10] = self[a + "10"];
+        self[b][11] = self[a + "11"];
+        self[b][12] = self[a + "12"];
+        self[b][13] = self[a + "13"];
+        self[b][14] = self[a + "0"];
+        self[b][15] = self[a + "0"];
+      }
+
+      function hb(a) {
+        return a == zb || a == Ab || a == Ja || a == Bb;
+      }
+
+      function Rd() {
+        this.eb = [];
+        this.size = this.A = this.fb = 0;
+      }
+
+      function Sd() {
+        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 Cb() {
+        this.Rd = this.height = this.width = this.S = 0;
+        this.f = {};
+        this.f.RGBA = new Rd();
+        this.f.kb = new Sd();
+        this.sd = null;
+      }
+
+      function Td() {
+        this.width = [0];
+        this.height = [0];
+        this.Pd = [0];
+        this.Qd = [0];
+        this.format = [0];
+      }
+
+      function Ud() {
+        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 Vd(a) {
+        alert("todo:WebPSamplerProcessPlane");
+        return a.T;
+      }
+
+      function Wd(a, b) {
+        var c = a.T,
+            d = b.ba.f.RGBA,
+            e = d.eb,
+            f = d.fb + a.ka * d.A,
+            g = P[b.ba.S],
+            h = a.y,
+            k = a.O,
+            l = a.f,
+            m = a.N,
+            n = a.ea,
+            r = a.W,
+            q = b.cc,
+            t = b.dc,
+            v = b.Mc,
+            p = b.Nc,
+            u = a.ka,
+            w = a.ka + a.T,
+            y = a.U,
+            A = y + 1 >> 1;
+        0 == u ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y) : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y), ++c);
+
+        for (; u + 2 < w; u += 2) {
+          q = l, t = m, v = n, p = r, m += a.Rc, r += a.Rc, f += 2 * d.A, k += 2 * a.fa, g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);
+        }
+
+        k += a.fa;
+        a.j + w < a.o ? (I(b.ec, b.fc, h, k, y), I(b.cc, b.dc, l, m, A), I(b.Mc, b.Nc, n, r, A), c--) : w & 1 || g(h, k, null, null, l, m, n, r, l, m, n, r, e, f + d.A, null, null, y);
+        return c;
+      }
+
+      function Xd(a, b, c) {
+        var d = a.F,
+            e = [a.J];
+
+        if (null != d) {
+          var f = a.U,
+              g = b.ba.S,
+              h = g == ya || g == Ja;
+          b = b.ba.f.RGBA;
+          var k = [0],
+              l = a.ka;
+          k[0] = a.T;
+          a.Kb && (0 == l ? --k[0] : (--l, e[0] -= a.width), a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));
+          var m = b.eb,
+              l = b.fb + l * b.A;
+          a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);
+          x(c == k);
+          a && hb(g) && za(m, l, h, f, k, b.A);
+        }
+
+        return 0;
+      }
+
+      function gc(a) {
+        var b = a.ma,
+            c = b.ba.S,
+            d = 11 > c,
+            e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);
+        b.memory = null;
+        b.Ib = null;
+        b.Jb = null;
+        b.Nd = null;
+        if (!hc(b.Oa, a, e ? 11 : 12)) return 0;
+        e && hb(c) && ic();
+        if (a.da) alert("todo:use_scaling");else {
+          if (d) {
+            if (b.Ib = Vd, a.Kb) {
+              c = a.U + 1 >> 1;
+              b.memory = V(a.U + 2 * c);
+              if (null == b.memory) return 0;
+              b.ec = b.memory;
+              b.fc = 0;
+              b.cc = b.ec;
+              b.dc = b.fc + a.U;
+              b.Mc = b.cc;
+              b.Nc = b.dc + c;
+              b.Ib = Wd;
+              ic();
+            }
+          } else alert("todo:EmitYUV");
+
+          e && (b.Jb = Xd, d && Aa());
+        }
+
+        if (d && !jc) {
+          for (a = 0; 256 > a; ++a) {
+            Yd[a] = 89858 * (a - 128) + Ba >> Wa, Zd[a] = -22014 * (a - 128) + Ba, $d[a] = -45773 * (a - 128), ae[a] = 113618 * (a - 128) + Ba >> Wa;
+          }
+
+          for (a = ta; a < Eb; ++a) {
+            b = 76283 * (a - 16) + Ba >> Wa, be[a - ta] = ga(b, 255), ce[a - ta] = ga(b + 8 >> 4, 15);
+          }
+
+          jc = 1;
+        }
+
+        return 1;
+      }
+
+      function kc(a) {
+        var b = a.ma,
+            c = a.U,
+            d = a.T;
+        x(!(a.ka & 1));
+        if (0 >= c || 0 >= d) return 0;
+        c = b.Ib(a, b);
+        null != b.Jb && b.Jb(a, b, c);
+        b.Dc += c;
+        return 1;
+      }
+
+      function lc(a) {
+        a.ma.memory = null;
+      }
+
+      function mc(a, b, c, d) {
+        if (47 != D(a, 8)) return 0;
+        b[0] = D(a, 14) + 1;
+        c[0] = D(a, 14) + 1;
+        d[0] = D(a, 1);
+        return 0 != D(a, 3) ? 0 : !a.h;
+      }
+
+      function ib(a, b) {
+        if (4 > a) return a + 1;
+        var c = a - 2 >> 1;
+        return (2 + (a & 1) << c) + D(b, c) + 1;
+      }
+
+      function nc(a, b) {
+        if (120 < b) return b - 120;
+        var c = de[b - 1],
+            c = (c >> 4) * a + (8 - (c & 15));
+        return 1 <= c ? c : 1;
+      }
+
+      function ua(a, b, c) {
+        var d = pb(c);
+        b += d & 255;
+        var e = a[b].g - 8;
+        0 < e && (qb(c, c.u + 8), d = pb(c), b += a[b].value, b += d & (1 << e) - 1);
+        qb(c, c.u + a[b].g);
+        return a[b].value;
+      }
+
+      function ub(a, b, c) {
+        c.g += a.g;
+        c.value += a.value << b >>> 0;
+        x(8 >= c.g);
+        return a.g;
+      }
+
+      function ha(a, b, c) {
+        var d = a.xc;
+        b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];
+        x(b < a.Wb);
+        return a.Ya[b];
+      }
+
+      function oc(a, b, c, d) {
+        var e = a.ab,
+            f = a.c * b,
+            g = a.C;
+        b = g + b;
+        var h = c,
+            k = d;
+        d = a.Ta;
+
+        for (c = a.Ua; 0 < e--;) {
+          var l = a.gc[e],
+              m = g,
+              n = b,
+              r = h,
+              q = k,
+              k = d,
+              h = c,
+              t = l.Ea;
+          x(m < n);
+          x(n <= l.nc);
+
+          switch (l.hc) {
+            case 2:
+              pc(r, q, (n - m) * t, k, h);
+              break;
+
+            case 0:
+              var v = l,
+                  p = m,
+                  u = n,
+                  w = k,
+                  y = h,
+                  A = v.Ea;
+              0 == p && (ee(r, q, null, null, 1, w, y), cc(r, q + 1, 0, 0, A - 1, w, y + 1), q += A, y += A, ++p);
+
+              for (var E = 1 << v.b, B = E - 1, C = xa(A, v.b), N = v.K, v = v.w + (p >> v.b) * C; p < u;) {
+                var z = N,
+                    Q = v,
+                    S = 1;
+
+                for (fe(r, q, w, y - A, 1, w, y); S < A;) {
+                  var K = qc[z[Q++] >> 8 & 15],
+                      D = (S & ~B) + E;
+                  D > A && (D = A);
+                  K(r, q + +S, w, y + S - A, D - S, w, y + S);
+                  S = D;
+                }
+
+                q += A;
+                y += A;
+                ++p;
+                p & B || (v += C);
+              }
+
+              n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);
+              break;
+
+            case 1:
+              t = r;
+              u = q;
+              r = l.Ea;
+              q = 1 << l.b;
+              w = q - 1;
+              y = r & ~w;
+              A = r - y;
+              p = xa(r, l.b);
+              E = l.K;
+
+              for (l = l.w + (m >> l.b) * p; m < n;) {
+                B = E;
+                C = l;
+                N = new Jd();
+                v = u + y;
+
+                for (z = u + r; u < v;) {
+                  dc(B[C++], N), Fb(N, t, u, q, k, h), u += q, h += q;
+                }
+
+                u < z && (dc(B[C++], N), Fb(N, t, u, A, k, h), u += A, h += A);
+                ++m;
+                m & w || (l += p);
+              }
+
+              break;
+
+            case 3:
+              if (r == k && q == h && 0 < l.b) {
+                y = (n - m) * xa(l.Ea, l.b);
+                t = h + (n - m) * t - y;
+                u = k;
+                r = t;
+                q = k;
+                w = h;
+                A = y;
+                p = [];
+
+                for (y = A - 1; 0 <= y; --y) {
+                  p[y] = q[w + y];
+                }
+
+                for (y = A - 1; 0 <= y; --y) {
+                  u[r + y] = p[y];
+                }
+
+                rc(l, m, n, k, t, k, h);
+              } else rc(l, m, n, r, q, k, h);
+
+          }
+
+          h = d;
+          k = c;
+        }
+
+        k != c && I(d, c, h, k, f);
+      }
+
+      function ge(a, b) {
+        var c = a.V,
+            d = a.Ba + a.c * a.C,
+            e = b - a.C;
+        x(b <= a.l.o);
+        x(16 >= e);
+
+        if (0 < e) {
+          var f = a.l,
+              g = a.Ta,
+              h = a.Ua,
+              k = f.width;
+          oc(a, e, c, d);
+          h = [h];
+          c = a.C;
+          d = b;
+          e = h;
+          x(c < d);
+          x(f.v < f.va);
+          d > f.o && (d = f.o);
+
+          if (c < f.j) {
+            var l = f.j - c,
+                c = f.j;
+            e[0] += l * k;
+          }
+
+          c >= d ? c = 0 : (e[0] += 4 * f.v, f.ka = c - f.j, f.U = f.va - f.v, f.T = d - c, c = 1);
+
+          if (c) {
+            h = h[0];
+            c = a.ca;
+
+            if (11 > c.S) {
+              for (var m = c.f.RGBA, d = c.S, e = f.U, f = f.T, l = m.eb, n = m.A, r = f, m = m.fb + a.Ma * m.A; 0 < r--;) {
+                var q = g,
+                    t = h,
+                    v = e,
+                    p = l,
+                    u = m;
+
+                switch (d) {
+                  case Ca:
+                    sc(q, t, v, p, u);
+                    break;
+
+                  case Ua:
+                    Gb(q, t, v, p, u);
+                    break;
+
+                  case zb:
+                    Gb(q, t, v, p, u);
+                    za(p, u, 0, v, 1, 0);
+                    break;
+
+                  case tc:
+                    uc(q, t, v, p, u);
+                    break;
+
+                  case Va:
+                    fb(q, t, v, p, u, 1);
+                    break;
+
+                  case Ab:
+                    fb(q, t, v, p, u, 1);
+                    za(p, u, 0, v, 1, 0);
+                    break;
+
+                  case ya:
+                    fb(q, t, v, p, u, 0);
+                    break;
+
+                  case Ja:
+                    fb(q, t, v, p, u, 0);
+                    za(p, u, 1, v, 1, 0);
+                    break;
+
+                  case Db:
+                    Hb(q, t, v, p, u);
+                    break;
+
+                  case Bb:
+                    Hb(q, t, v, p, u);
+                    vc(p, u, v, 1, 0);
+                    break;
+
+                  case wc:
+                    xc(q, t, v, p, u);
+                    break;
+
+                  default:
+                    x(0);
+                }
+
+                h += k;
+                m += n;
+              }
+
+              a.Ma += f;
+            } else alert("todo:EmitRescaledRowsYUVA");
+
+            x(a.Ma <= c.height);
+          }
+        }
+
+        a.C = b;
+        x(a.C <= a.i);
+      }
+
+      function yc(a) {
+        var b;
+        if (0 < a.ua) return 0;
+
+        for (b = 0; b < a.Wb; ++b) {
+          var c = a.Ya[b].G,
+              d = a.Ya[b].H;
+          if (0 < c[1][d[1] + 0].g || 0 < c[2][d[2] + 0].g || 0 < c[3][d[3] + 0].g) return 0;
+        }
+
+        return 1;
+      }
+
+      function zc(a, b, c, d, e, f) {
+        if (0 != a.Z) {
+          var g = a.qd,
+              h = a.rd;
+
+          for (x(null != ia[a.Z]); b < c; ++b) {
+            ia[a.Z](g, h, d, e, d, e, f), g = d, h = e, e += f;
+          }
+
+          a.qd = g;
+          a.rd = h;
+        }
+      }
+
+      function Ib(a, b) {
+        var c = a.l.ma,
+            d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,
+            d = a.C < d ? d : a.C;
+        x(b <= a.l.o);
+
+        if (b > d) {
+          var e = a.l.width,
+              f = c.ca,
+              g = c.tb + e * d,
+              h = a.V,
+              k = a.Ba + a.c * d,
+              l = a.gc;
+          x(1 == a.ab);
+          x(3 == l[0].hc);
+          he(l[0], d, b, h, k, f, g);
+          zc(c, d, b, f, g, e);
+        }
+
+        a.C = a.Ma = b;
+      }
+
+      function Jb(a, b, c, d, e, f, g) {
+        var h = a.$ / d,
+            k = a.$ % d,
+            l = a.m,
+            m = a.s,
+            n = c + a.$,
+            r = n;
+        e = c + d * e;
+        var q = c + d * f,
+            t = 280 + m.ua,
+            v = a.Pb ? h : 16777216,
+            p = 0 < m.ua ? m.Wa : null,
+            u = m.wc,
+            w = n < q ? ha(m, k, h) : null;
+        x(a.C < f);
+        x(q <= e);
+        var y = !1;
+
+        a: for (;;) {
+          for (; y || n < q;) {
+            var A = 0;
+
+            if (h >= v) {
+              var v = a,
+                  E = n - c;
+              x(v.Pb);
+              v.wd = v.m;
+              v.xd = E;
+              0 < v.s.ua && $b(v.s.Wa, v.s.vb);
+              v = h + ie;
+            }
+
+            k & u || (w = ha(m, k, h));
+            x(null != w);
+            w.Qb && (b[n] = w.qb, y = !0);
+            if (!y) if (Sa(l), w.jc) {
+              var A = l,
+                  E = b,
+                  B = n,
+                  C = w.pd[pb(A) & xb - 1];
+              x(w.jc);
+              256 > C.g ? (qb(A, A.u + C.g), E[B] = C.value, A = 0) : (qb(A, A.u + C.g - 256), x(256 <= C.value), A = C.value);
+              0 == A && (y = !0);
+            } else A = ua(w.G[0], w.H[0], l);
+            if (l.h) break;
+
+            if (y || 256 > A) {
+              if (!y) if (w.nd) b[n] = (w.qb | A << 8) >>> 0;else {
+                Sa(l);
+                y = ua(w.G[1], w.H[1], l);
+                Sa(l);
+                E = ua(w.G[2], w.H[2], l);
+                B = ua(w.G[3], w.H[3], l);
+                if (l.h) break;
+                b[n] = (B << 24 | y << 16 | A << 8 | E) >>> 0;
+              }
+              y = !1;
+              ++n;
+              ++k;
+              if (k >= d && (k = 0, ++h, null != g && h <= f && !(h % 16) && g(a, h), null != p)) for (; r < n;) {
+                A = b[r++], p.X[(506832829 * A & 4294967295) >>> p.Mb] = A;
+              }
+            } else if (280 > A) {
+              A = ib(A - 256, l);
+              E = ua(w.G[4], w.H[4], l);
+              Sa(l);
+              E = ib(E, l);
+              E = nc(d, E);
+              if (l.h) break;
+              if (n - c < E || e - n < A) break a;else for (B = 0; B < A; ++B) {
+                b[n + B] = b[n + B - E];
+              }
+              n += A;
+
+              for (k += A; k >= d;) {
+                k -= d, ++h, null != g && h <= f && !(h % 16) && g(a, h);
+              }
+
+              x(n <= e);
+              k & u && (w = ha(m, k, h));
+              if (null != p) for (; r < n;) {
+                A = b[r++], p.X[(506832829 * A & 4294967295) >>> p.Mb] = A;
+              }
+            } else if (A < t) {
+              y = A - 280;
+
+              for (x(null != p); r < n;) {
+                A = b[r++], p.X[(506832829 * A & 4294967295) >>> p.Mb] = A;
+              }
+
+              A = n;
+              E = p;
+              x(!(y >>> E.Xa));
+              b[A] = E.X[y];
+              y = !0;
+            } else break a;
+
+            y || x(l.h == db(l));
+          }
+
+          if (a.Pb && l.h && n < e) x(a.m.h), a.a = 5, a.m = a.wd, a.$ = a.xd, 0 < a.s.ua && $b(a.s.vb, a.s.Wa);else if (l.h) break a;else null != g && g(a, h > f ? f : h), a.a = 0, a.$ = n - c;
+          return 1;
+        }
+
+        a.a = 3;
+        return 0;
+      }
+
+      function Ac(a) {
+        x(null != a);
+        a.vc = null;
+        a.yc = null;
+        a.Ya = null;
+        var b = a.Wa;
+        null != b && (b.X = null);
+        a.vb = null;
+        x(null != a);
+      }
+
+      function Bc() {
+        var a = new je();
+        if (null == a) return null;
+        a.a = 0;
+        a.xb = Cc;
+        gb("Predictor", "VP8LPredictors");
+        gb("Predictor", "VP8LPredictors_C");
+        gb("PredictorAdd", "VP8LPredictorsAdd");
+        gb("PredictorAdd", "VP8LPredictorsAdd_C");
+        pc = Kd;
+        Fb = Ld;
+        sc = Md;
+        Gb = Nd;
+        Hb = Od;
+        xc = Pd;
+        uc = Qd;
+        self.VP8LMapColor32b = ke;
+        self.VP8LMapColor8b = le;
+        return a;
+      }
+
+      function rb(a, b, c, d, e) {
+        var f = 1,
+            g = [a],
+            h = [b],
+            k = d.m,
+            l = d.s,
+            m = null,
+            n = 0;
+
+        a: for (;;) {
+          if (c) for (; f && D(k, 1);) {
+            var r = g,
+                q = h,
+                t = d,
+                v = 1,
+                p = t.m,
+                u = t.gc[t.ab],
+                w = D(p, 2);
+            if (t.Oc & 1 << w) f = 0;else {
+              t.Oc |= 1 << w;
+              u.hc = w;
+              u.Ea = r[0];
+              u.nc = q[0];
+              u.K = [null];
+              ++t.ab;
+              x(4 >= t.ab);
+
+              switch (w) {
+                case 0:
+                case 1:
+                  u.b = D(p, 3) + 2;
+                  v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);
+                  u.K = u.K[0];
+                  break;
+
+                case 3:
+                  var y = D(p, 8) + 1,
+                      A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;
+                  r[0] = xa(u.Ea, A);
+                  u.b = A;
+                  var v = rb(y, 1, 0, t, u.K),
+                      E;
+
+                  if (E = v) {
+                    var B,
+                        C = y,
+                        N = u,
+                        z = 1 << (8 >> N.b),
+                        Q = V(z);
+                    if (null == Q) E = 0;else {
+                      var S = N.K[0],
+                          K = N.w;
+                      Q[0] = N.K[0][0];
+
+                      for (B = 1; B < 1 * C; ++B) {
+                        Q[B] = yb(S[K + B], Q[B - 1]);
+                      }
+
+                      for (; B < 4 * z; ++B) {
+                        Q[B] = 0;
+                      }
+
+                      N.K[0] = null;
+                      N.K[0] = Q;
+                      E = 1;
+                    }
+                  }
+
+                  v = E;
+                  break;
+
+                case 2:
+                  break;
+
+                default:
+                  x(0);
+              }
+
+              f = v;
+            }
+          }
+          g = g[0];
+          h = h[0];
+
+          if (f && D(k, 1) && (n = D(k, 4), f = 1 <= n && 11 >= n, !f)) {
+            d.a = 3;
+            break a;
+          }
+
+          var H;
+          if (H = f) b: {
+            var F = d,
+                G = g,
+                L = h,
+                J = n,
+                T = c,
+                Da,
+                ba,
+                X = F.m,
+                R = F.s,
+                P = [null],
+                U,
+                W = 1,
+                aa = 0,
+                na = me[J];
+
+            c: for (;;) {
+              if (T && D(X, 1)) {
+                var ca = D(X, 3) + 2,
+                    ga = xa(G, ca),
+                    ka = xa(L, ca),
+                    qa = ga * ka;
+                if (!rb(ga, ka, 0, F, P)) break c;
+                P = P[0];
+                R.xc = ca;
+
+                for (Da = 0; Da < qa; ++Da) {
+                  var ia = P[Da] >> 8 & 65535;
+                  P[Da] = ia;
+                  ia >= W && (W = ia + 1);
+                }
+              }
+
+              if (X.h) break c;
+
+              for (ba = 0; 5 > ba; ++ba) {
+                var Y = Dc[ba];
+                !ba && 0 < J && (Y += 1 << J);
+                aa < Y && (aa = Y);
+              }
+
+              var ma = wa(W * na, O);
+              var ua = W,
+                  va = wa(ua, Ub);
+              if (null == va) var la = null;else x(65536 >= ua), la = va;
+              var ha = V(aa);
+
+              if (null == la || null == ha || null == ma) {
+                F.a = 1;
+                break c;
+              }
+
+              var pa = ma;
+
+              for (Da = U = 0; Da < W; ++Da) {
+                var ja = la[Da],
+                    da = ja.G,
+                    ea = ja.H,
+                    Fa = 0,
+                    ra = 1,
+                    Ha = 0;
+
+                for (ba = 0; 5 > ba; ++ba) {
+                  Y = Dc[ba];
+                  da[ba] = pa;
+                  ea[ba] = U;
+                  !ba && 0 < J && (Y += 1 << J);
+
+                  d: {
+                    var sa,
+                        za = Y,
+                        ta = F,
+                        oa = ha,
+                        db = pa,
+                        eb = U,
+                        Ia = 0,
+                        Ka = ta.m,
+                        fb = D(Ka, 1);
+                    M(oa, 0, 0, za);
+
+                    if (fb) {
+                      var gb = D(Ka, 1) + 1,
+                          hb = D(Ka, 1),
+                          Ja = D(Ka, 0 == hb ? 1 : 8);
+                      oa[Ja] = 1;
+                      2 == gb && (Ja = D(Ka, 8), oa[Ja] = 1);
+                      var ya = 1;
+                    } else {
+                      var Ua = V(19),
+                          Va = D(Ka, 4) + 4;
+
+                      if (19 < Va) {
+                        ta.a = 3;
+                        var Aa = 0;
+                        break d;
+                      }
+
+                      for (sa = 0; sa < Va; ++sa) {
+                        Ua[ne[sa]] = D(Ka, 3);
+                      }
+
+                      var Ba = void 0,
+                          sb = void 0,
+                          Wa = ta,
+                          ib = Ua,
+                          Ca = za,
+                          Xa = oa,
+                          Oa = 0,
+                          La = Wa.m,
+                          Ya = 8,
+                          Za = wa(128, O);
+
+                      e: for (;;) {
+                        if (!Z(Za, 0, 7, ib, 19)) break e;
+
+                        if (D(La, 1)) {
+                          var kb = 2 + 2 * D(La, 3),
+                              Ba = 2 + D(La, kb);
+                          if (Ba > Ca) break e;
+                        } else Ba = Ca;
+
+                        for (sb = 0; sb < Ca && Ba--;) {
+                          Sa(La);
+                          var $a = Za[0 + (pb(La) & 127)];
+                          qb(La, La.u + $a.g);
+                          var jb = $a.value;
+                          if (16 > jb) Xa[sb++] = jb, 0 != jb && (Ya = jb);else {
+                            var lb = 16 == jb,
+                                ab = jb - 16,
+                                mb = oe[ab],
+                                bb = D(La, pe[ab]) + mb;
+                            if (sb + bb > Ca) break e;else for (var nb = lb ? Ya : 0; 0 < bb--;) {
+                              Xa[sb++] = nb;
+                            }
+                          }
+                        }
+
+                        Oa = 1;
+                        break e;
+                      }
+
+                      Oa || (Wa.a = 3);
+                      ya = Oa;
+                    }
+
+                    (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));
+                    ya && 0 != Ia ? Aa = Ia : (ta.a = 3, Aa = 0);
+                  }
+
+                  if (0 == Aa) break c;
+                  ra && 1 == qe[ba] && (ra = 0 == pa[U].g);
+                  Fa += pa[U].g;
+                  U += Aa;
+
+                  if (3 >= ba) {
+                    var Pa = ha[0],
+                        tb;
+
+                    for (tb = 1; tb < Y; ++tb) {
+                      ha[tb] > Pa && (Pa = ha[tb]);
+                    }
+
+                    Ha += Pa;
+                  }
+                }
+
+                ja.nd = ra;
+                ja.Qb = 0;
+                ra && (ja.qb = (da[3][ea[3] + 0].value << 24 | da[1][ea[1] + 0].value << 16 | da[2][ea[2] + 0].value) >>> 0, 0 == Fa && 256 > da[0][ea[0] + 0].value && (ja.Qb = 1, ja.qb += da[0][ea[0] + 0].value << 8));
+                ja.jc = !ja.Qb && 6 > Ha;
+
+                if (ja.jc) {
+                  var Ga,
+                      Ea = ja;
+
+                  for (Ga = 0; Ga < xb; ++Ga) {
+                    var Ma = Ga,
+                        Na = Ea.pd[Ma],
+                        vb = Ea.G[0][Ea.H[0] + Ma];
+                    256 <= vb.value ? (Na.g = vb.g + 256, Na.value = vb.value) : (Na.g = 0, Na.value = 0, Ma >>= ub(vb, 8, Na), Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na), Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na), ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));
+                  }
+                }
+              }
+
+              R.vc = P;
+              R.Wb = W;
+              R.Ya = la;
+              R.yc = ma;
+              H = 1;
+              break b;
+            }
+
+            H = 0;
+          }
+          f = H;
+
+          if (!f) {
+            d.a = 3;
+            break a;
+          }
+
+          if (0 < n) {
+            if (l.ua = 1 << n, !Zb(l.Wa, n)) {
+              d.a = 1;
+              f = 0;
+              break a;
+            }
+          } else l.ua = 0;
+
+          var Qa = d,
+              cb = g,
+              ob = h,
+              Ra = Qa.s,
+              Ta = Ra.xc;
+          Qa.c = cb;
+          Qa.i = ob;
+          Ra.md = xa(cb, Ta);
+          Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;
+
+          if (c) {
+            d.xb = re;
+            break a;
+          }
+
+          m = V(g * h);
+
+          if (null == m) {
+            d.a = 1;
+            f = 0;
+            break a;
+          }
+
+          f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;
+          break a;
+        }
+
+        f ? (null != e ? e[0] = m : (x(null == m), x(c)), d.$ = 0, c || Ac(l)) : Ac(l);
+        return f;
+      }
+
+      function Ec(a, b) {
+        var c = a.c * a.i,
+            d = c + b + 16 * b;
+        x(a.c <= b);
+        a.V = V(d);
+        if (null == a.V) return a.Ta = null, a.Ua = 0, a.a = 1, 0;
+        a.Ta = a.V;
+        a.Ua = a.Ba + c + b;
+        return 1;
+      }
+
+      function se(a, b) {
+        var c = a.C,
+            d = b - c,
+            e = a.V,
+            f = a.Ba + a.c * c;
+
+        for (x(b <= a.l.o); 0 < d;) {
+          var g = 16 < d ? 16 : d,
+              h = a.l.ma,
+              k = a.l.width,
+              l = k * g,
+              m = h.ca,
+              n = h.tb + k * c,
+              r = a.Ta,
+              q = a.Ua;
+          oc(a, g, e, f);
+          Fc(r, q, m, n, l);
+          zc(h, c, c + g, m, n, k);
+          d -= g;
+          e += g * a.c;
+          c += g;
+        }
+
+        x(c == b);
+        a.C = a.Ma = b;
+      }
+
+      function te(a, b) {
+        var c = [0],
+            d = [0],
+            e = [0];
+
+        a: for (;;) {
+          if (null == a) return 0;
+          if (null == b) return a.a = 2, 0;
+          a.l = b;
+          a.a = 0;
+          cb(a.m, b.data, b.w, b.ha);
+
+          if (!mc(a.m, c, d, e)) {
+            a.a = 3;
+            break a;
+          }
+
+          a.xb = Cc;
+          b.width = c[0];
+          b.height = d[0];
+          if (!rb(c[0], d[0], 1, a, null)) break a;
+          return 1;
+        }
+
+        x(0 != a.a);
+        return 0;
+      }
+
+      function ue() {
+        this.ub = this.yd = this.td = this.Rb = 0;
+      }
+
+      function ve() {
+        this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;
+      }
+
+      function we() {
+        this.Fb = this.Bb = this.Cb = 0;
+        this.Zb = V(4);
+        this.Lb = V(4);
+      }
+
+      function Gc() {
+        this.Yb = wb();
+      }
+
+      function xe() {
+        this.jb = V(3);
+        this.Wc = Ed([4, 8], Gc);
+        this.Xc = Ed([4, 17], Gc);
+      }
+
+      function ye() {
+        this.Pc = this.wb = this.Tb = this.zd = 0;
+        this.vd = new V(4);
+        this.od = new V(4);
+      }
+
+      function Xa() {
+        this.ld = this.La = this.dd = this.tc = 0;
+      }
+
+      function Hc() {
+        this.Na = this.la = 0;
+      }
+
+      function ze() {
+        this.Sc = [0, 0];
+        this.Eb = [0, 0];
+        this.Qc = [0, 0];
+        this.ia = this.lc = 0;
+      }
+
+      function Kb() {
+        this.ad = V(384);
+        this.Za = 0;
+        this.Ob = V(16);
+        this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;
+      }
+
+      function Ae() {
+        this.uc = this.M = this.Nb = 0;
+        this.wa = Array(new Xa());
+        this.Y = 0;
+        this.ya = Array(new Kb());
+        this.aa = 0;
+        this.l = new Oa();
+      }
+
+      function Ic() {
+        this.y = V(16);
+        this.f = V(8);
+        this.ea = V(8);
+      }
+
+      function Be() {
+        this.cb = this.a = 0;
+        this.sc = "";
+        this.m = new Wb();
+        this.Od = new ue();
+        this.Kc = new ve();
+        this.ed = new ye();
+        this.Qa = new we();
+        this.Ic = this.$c = this.Aa = 0;
+        this.D = new Ae();
+        this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;
+        this.Jc = wa(8, Wb);
+        this.ia = 0;
+        this.pb = wa(4, ze);
+        this.Pa = new xe();
+        this.Bd = this.kc = 0;
+        this.Ac = [];
+        this.Bc = 0;
+        this.zc = [0, 0, 0, 0];
+        this.Gd = Array(new Ic());
+        this.Hd = 0;
+        this.rb = Array(new Hc());
+        this.sb = 0;
+        this.wa = Array(new Xa());
+        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 Kb());
+        this.L = this.aa = 0;
+        this.gd = Ed([4, 2], Xa);
+        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 ga(a, b) {
+        return 0 > a ? 0 : a > b ? b : a;
+      }
+
+      function Oa() {
+        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 Ce() {
+        var a = new Be();
+        null != a && (a.a = 0, a.sc = "OK", a.cb = 0, a.Xb = 0, oa || (oa = De));
+        return a;
+      }
+
+      function T(a, b, c) {
+        0 == a.a && (a.a = b, a.sc = c, a.cb = 0);
+        return 0;
+      }
+
+      function Jc(a, b, c) {
+        return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];
+      }
+
+      function Kc(a, b) {
+        if (null == a) return 0;
+        a.a = 0;
+        a.sc = "OK";
+        if (null == b) return T(a, 2, "null VP8Io passed to VP8GetHeaders()");
+        var c = b.data;
+        var d = b.w;
+        var e = b.ha;
+        if (4 > e) return T(a, 7, "Truncated header.");
+        var f = c[d + 0] | c[d + 1] << 8 | c[d + 2] << 16;
+        var g = a.Od;
+        g.Rb = !(f & 1);
+        g.td = f >> 1 & 7;
+        g.yd = f >> 4 & 1;
+        g.ub = f >> 5;
+        if (3 < g.td) return T(a, 3, "Incorrect keyframe parameters.");
+        if (!g.yd) return T(a, 4, "Frame not displayable.");
+        d += 3;
+        e -= 3;
+        var h = a.Kc;
+
+        if (g.Rb) {
+          if (7 > e) return T(a, 7, "cannot parse picture header");
+          if (!Jc(c, d, e)) return T(a, 3, "Bad code word");
+          h.c = (c[d + 4] << 8 | c[d + 3]) & 16383;
+          h.Td = c[d + 4] >> 6;
+          h.i = (c[d + 6] << 8 | c[d + 5]) & 16383;
+          h.Ud = c[d + 6] >> 6;
+          d += 7;
+          e -= 7;
+          a.za = h.c + 15 >> 4;
+          a.Ub = h.i + 15 >> 4;
+          b.width = h.c;
+          b.height = h.i;
+          b.Da = 0;
+          b.j = 0;
+          b.v = 0;
+          b.va = b.width;
+          b.o = b.height;
+          b.da = 0;
+          b.ib = b.width;
+          b.hb = b.height;
+          b.U = b.width;
+          b.T = b.height;
+          f = a.Pa;
+          M(f.jb, 0, 255, f.jb.length);
+          f = a.Qa;
+          x(null != f);
+          f.Cb = 0;
+          f.Bb = 0;
+          f.Fb = 1;
+          M(f.Zb, 0, 0, f.Zb.length);
+          M(f.Lb, 0, 0, f.Lb);
+        }
+
+        if (g.ub > e) return T(a, 7, "bad partition length");
+        f = a.m;
+        ma(f, c, d, g.ub);
+        d += g.ub;
+        e -= g.ub;
+        g.Rb && (h.Ld = G(f), h.Kd = G(f));
+        h = a.Qa;
+        var k = a.Pa,
+            l;
+        x(null != f);
+        x(null != h);
+        h.Cb = G(f);
+
+        if (h.Cb) {
+          h.Bb = G(f);
+
+          if (G(f)) {
+            h.Fb = G(f);
+
+            for (l = 0; 4 > l; ++l) {
+              h.Zb[l] = G(f) ? ca(f, 7) : 0;
+            }
+
+            for (l = 0; 4 > l; ++l) {
+              h.Lb[l] = G(f) ? ca(f, 6) : 0;
+            }
+          }
+
+          if (h.Bb) for (l = 0; 3 > l; ++l) {
+            k.jb[l] = G(f) ? na(f, 8) : 255;
+          }
+        } else h.Bb = 0;
+
+        if (f.Ka) return T(a, 3, "cannot parse segment header");
+        h = a.ed;
+        h.zd = G(f);
+        h.Tb = na(f, 6);
+        h.wb = na(f, 3);
+        h.Pc = G(f);
+
+        if (h.Pc && G(f)) {
+          for (k = 0; 4 > k; ++k) {
+            G(f) && (h.vd[k] = ca(f, 6));
+          }
+
+          for (k = 0; 4 > k; ++k) {
+            G(f) && (h.od[k] = ca(f, 6));
+          }
+        }
+
+        a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;
+        if (f.Ka) return T(a, 3, "cannot parse filter header");
+        l = d;
+        var m = e;
+        e = l;
+        d = l + m;
+        h = m;
+        a.Xb = (1 << na(a.m, 2)) - 1;
+        k = a.Xb;
+        if (m < 3 * k) c = 7;else {
+          l += 3 * k;
+          h -= 3 * k;
+
+          for (m = 0; m < k; ++m) {
+            var n = c[e + 0] | c[e + 1] << 8 | c[e + 2] << 16;
+            n > h && (n = h);
+            ma(a.Jc[+m], c, l, n);
+            l += n;
+            h -= n;
+            e += 3;
+          }
+
+          ma(a.Jc[+k], c, l, h);
+          c = l < d ? 0 : 5;
+        }
+        if (0 != c) return T(a, c, "cannot parse partitions");
+        l = a.m;
+        c = na(l, 7);
+        e = G(l) ? ca(l, 4) : 0;
+        d = G(l) ? ca(l, 4) : 0;
+        h = G(l) ? ca(l, 4) : 0;
+        k = G(l) ? ca(l, 4) : 0;
+        l = G(l) ? ca(l, 4) : 0;
+        m = a.Qa;
+
+        for (n = 0; 4 > n; ++n) {
+          if (m.Cb) {
+            var r = m.Zb[n];
+            m.Fb || (r += c);
+          } else if (0 < n) {
+            a.pb[n] = a.pb[0];
+            continue;
+          } else r = c;
+
+          var q = a.pb[n];
+          q.Sc[0] = Lb[ga(r + e, 127)];
+          q.Sc[1] = Mb[ga(r + 0, 127)];
+          q.Eb[0] = 2 * Lb[ga(r + d, 127)];
+          q.Eb[1] = 101581 * Mb[ga(r + h, 127)] >> 16;
+          8 > q.Eb[1] && (q.Eb[1] = 8);
+          q.Qc[0] = Lb[ga(r + k, 117)];
+          q.Qc[1] = Mb[ga(r + l, 127)];
+          q.lc = r + l;
+        }
+
+        if (!g.Rb) return T(a, 4, "Not a key frame.");
+        G(f);
+        g = a.Pa;
+
+        for (c = 0; 4 > c; ++c) {
+          for (e = 0; 8 > e; ++e) {
+            for (d = 0; 3 > d; ++d) {
+              for (h = 0; 11 > h; ++h) {
+                k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h], g.Wc[c][e].Yb[d][h] = k;
+              }
+            }
+          }
+
+          for (e = 0; 17 > e; ++e) {
+            g.Xc[c][e] = g.Wc[c][Ge[e]];
+          }
+        }
+
+        a.kc = G(f);
+        a.kc && (a.Bd = na(f, 8));
+        return a.cb = 1;
+      }
+
+      function De(a, b, c, d, e, f, g) {
+        var h = b[e].Yb[c];
+
+        for (c = 0; 16 > e; ++e) {
+          if (!K(a, h[c + 0])) return e;
+
+          for (; !K(a, h[c + 1]);) {
+            if (h = b[++e].Yb[0], c = 0, 16 == e) return 16;
+          }
+
+          var k = b[e + 1].Yb;
+
+          if (K(a, h[c + 2])) {
+            var l = a,
+                m = h,
+                n = c;
+            var r = 0;
+            if (K(l, m[n + 3])) {
+              if (K(l, m[n + 6])) {
+                h = 0;
+                r = K(l, m[n + 8]);
+                m = K(l, m[n + 9 + r]);
+                n = 2 * r + m;
+                r = 0;
+
+                for (m = He[n]; m[h]; ++h) {
+                  r += r + K(l, m[h]);
+                }
+
+                r += 3 + (8 << n);
+              } else K(l, m[n + 7]) ? (r = 7 + 2 * K(l, 165), r += K(l, 145)) : r = 5 + K(l, 159);
+            } else K(l, m[n + 4]) ? r = 3 + K(l, m[n + 5]) : r = 2;
+            h = k[2];
+          } else r = 1, h = k[1];
+
+          k = g + Ie[e];
+          l = a;
+          0 > l.b && Qa(l);
+          var m = l.b,
+              n = l.Ca >> 1,
+              q = n - (l.I >> m) >> 31;
+          --l.b;
+          l.Ca += q;
+          l.Ca |= 1;
+          l.I -= (n + 1 & q) << m;
+          f[k] = ((r ^ q) - q) * d[(0 < e) + 0];
+        }
+
+        return 16;
+      }
+
+      function Lc(a) {
+        var b = a.rb[a.sb - 1];
+        b.la = 0;
+        b.Na = 0;
+        M(a.zc, 0, 0, a.zc.length);
+        a.ja = 0;
+      }
+
+      function Je(a, b) {
+        for (a.M = 0; a.M < a.Va; ++a.M) {
+          var c = a.Jc[a.M & a.Xb],
+              d = a.m,
+              e = a,
+              f;
+
+          for (f = 0; f < e.za; ++f) {
+            var g = d;
+            var h = e;
+            var k = h.Ac,
+                l = h.Bc + 4 * f,
+                m = h.zc,
+                n = h.ya[h.aa + f];
+            h.Qa.Bb ? n.$b = K(g, h.Pa.jb[0]) ? 2 + K(g, h.Pa.jb[2]) : K(g, h.Pa.jb[1]) : n.$b = 0;
+            h.kc && (n.Ad = K(g, h.Bd));
+            n.Za = !K(g, 145) + 0;
+
+            if (n.Za) {
+              var r = n.Ob,
+                  q = 0;
+
+              for (h = 0; 4 > h; ++h) {
+                var t = m[0 + h];
+                var v;
+
+                for (v = 0; 4 > v; ++v) {
+                  t = Ke[k[l + v]][t];
+
+                  for (var p = Mc[K(g, t[0])]; 0 < p;) {
+                    p = Mc[2 * p + K(g, t[p])];
+                  }
+
+                  t = -p;
+                  k[l + v] = t;
+                }
+
+                I(r, q, k, l, 4);
+                q += 4;
+                m[0 + h] = t;
+              }
+            } else t = K(g, 156) ? K(g, 128) ? 1 : 3 : K(g, 163) ? 2 : 0, n.Ob[0] = t, M(k, l, t, 4), M(m, 0, t, 4);
+
+            n.Dd = K(g, 142) ? K(g, 114) ? K(g, 183) ? 1 : 3 : 2 : 0;
+          }
+
+          if (e.m.Ka) return T(a, 7, "Premature end-of-partition0 encountered.");
+
+          for (; a.ja < a.za; ++a.ja) {
+            d = a;
+            e = c;
+            g = d.rb[d.sb - 1];
+            k = d.rb[d.sb + d.ja];
+            f = d.ya[d.aa + d.ja];
+            if (l = d.kc ? f.Ad : 0) g.la = k.la = 0, f.Za || (g.Na = k.Na = 0), f.Hc = 0, f.Gc = 0, f.ia = 0;else {
+              var u,
+                  w,
+                  g = k,
+                  k = e,
+                  l = d.Pa.Xc,
+                  m = d.ya[d.aa + d.ja],
+                  n = d.pb[m.$b];
+              h = m.ad;
+              r = 0;
+              q = d.rb[d.sb - 1];
+              t = v = 0;
+              M(h, r, 0, 384);
+
+              if (m.Za) {
+                var y = 0;
+                var A = l[3];
+              } else {
+                p = V(16);
+                var E = g.Na + q.Na;
+                E = oa(k, l[1], E, n.Eb, 0, p, 0);
+                g.Na = q.Na = (0 < E) + 0;
+                if (1 < E) Nc(p, 0, h, r);else {
+                  var B = p[0] + 3 >> 3;
+
+                  for (p = 0; 256 > p; p += 16) {
+                    h[r + p] = B;
+                  }
+                }
+                y = 1;
+                A = l[0];
+              }
+
+              var C = g.la & 15;
+              var N = q.la & 15;
+
+              for (p = 0; 4 > p; ++p) {
+                var z = N & 1;
+
+                for (B = w = 0; 4 > B; ++B) {
+                  E = z + (C & 1), E = oa(k, A, E, n.Sc, y, h, r), z = E > y, C = C >> 1 | z << 7, w = w << 2 | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0]), r += 16;
+                }
+
+                C >>= 4;
+                N = N >> 1 | z << 7;
+                v = (v << 8 | w) >>> 0;
+              }
+
+              A = C;
+              y = N >> 4;
+
+              for (u = 0; 4 > u; u += 2) {
+                w = 0;
+                C = g.la >> 4 + u;
+                N = q.la >> 4 + u;
+
+                for (p = 0; 2 > p; ++p) {
+                  z = N & 1;
+
+                  for (B = 0; 2 > B; ++B) {
+                    E = z + (C & 1), E = oa(k, l[2], E, n.Qc, 0, h, r), z = 0 < E, C = C >> 1 | z << 3, w = w << 2 | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0]), r += 16;
+                  }
+
+                  C >>= 2;
+                  N = N >> 1 | z << 5;
+                }
+
+                t |= w << 4 * u;
+                A |= C << 4 << u;
+                y |= (N & 240) << u;
+              }
+
+              g.la = A;
+              q.la = y;
+              m.Hc = v;
+              m.Gc = t;
+              m.ia = t & 43690 ? 0 : n.ia;
+              l = !(v | t);
+            }
+            0 < d.L && (d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za], d.wa[d.Y + d.ja].La |= !l);
+            if (e.Ka) return T(a, 7, "Premature end-of-file encountered.");
+          }
+
+          Lc(a);
+          c = a;
+          d = b;
+          e = 1;
+          f = c.D;
+          g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;
+          if (0 == c.Aa) a: {
+            f.M = c.M, f.uc = g, Oc(c, f), e = 1;
+            w = c.D;
+            f = w.Nb;
+            t = Ya[c.L];
+            g = t * c.R;
+            k = t / 2 * c.B;
+            p = 16 * f * c.R;
+            B = 8 * f * c.B;
+            l = c.sa;
+            m = c.ta - g + p;
+            n = c.qa;
+            h = c.ra - k + B;
+            r = c.Ha;
+            q = c.Ia - k + B;
+            C = w.M;
+            N = 0 == C;
+            v = C >= c.Va - 1;
+            2 == c.Aa && Oc(c, w);
+            if (w.uc) for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {
+              var Q = E;
+              y = w;
+              A = z;
+              var S = Q.D,
+                  D = S.Nb;
+              u = Q.R;
+              var S = S.wa[S.Y + y],
+                  F = Q.sa,
+                  H = Q.ta + 16 * D * u + 16 * y,
+                  J = S.dd,
+                  G = S.tc;
+              if (0 != G) if (x(3 <= G), 1 == Q.L) 0 < y && Pc(F, H, u, G + 4), S.La && Qc(F, H, u, G), 0 < A && Rc(F, H, u, G + 4), S.La && Sc(F, H, u, G);else {
+                var L = Q.B,
+                    O = Q.qa,
+                    P = Q.ra + 8 * D * L + 8 * y,
+                    R = Q.Ha,
+                    Q = Q.Ia + 8 * D * L + 8 * y,
+                    D = S.ld;
+                0 < y && (Tc(F, H, u, G + 4, J, D), Uc(O, P, R, Q, L, G + 4, J, D));
+                S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));
+                0 < A && (Xc(F, H, u, G + 4, J, D), Yc(O, P, R, Q, L, G + 4, J, D));
+                S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));
+              }
+            }
+            c.ia && alert("todo:DitherRow");
+
+            if (null != d.put) {
+              w = 16 * C;
+              C = 16 * (C + 1);
+              N ? (d.y = c.sa, d.O = c.ta + p, d.f = c.qa, d.N = c.ra + B, d.ea = c.Ha, d.W = c.Ia + B) : (w -= t, d.y = l, d.O = m, d.f = n, d.N = h, d.ea = r, d.W = q);
+              v || (C -= t);
+              C > d.o && (C = d.o);
+              d.F = null;
+              d.J = null;
+
+              if (null != c.Fa && 0 < c.Fa.length && w < C && (d.J = Le(c, d, w, C - w), d.F = c.mb, null == d.F && 0 == d.F.length)) {
+                e = T(c, 3, "Could not decode alpha data.");
+                break a;
+              }
+
+              w < d.j && (t = d.j - w, w = d.j, x(!(t & 1)), d.O += c.R * t, d.N += c.B * (t >> 1), d.W += c.B * (t >> 1), null != d.F && (d.J += d.width * t));
+              w < C && (d.O += d.v, d.N += d.v >> 1, d.W += d.v >> 1, null != d.F && (d.J += d.v), d.ka = w - d.j, d.U = d.va - d.v, d.T = C - w, e = d.put(d));
+            }
+
+            f + 1 != c.Ic || v || (I(c.sa, c.ta - g, l, m + 16 * c.R, g), I(c.qa, c.ra - k, n, h + 8 * c.B, k), I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));
+          }
+          if (!e) return T(a, 6, "Output aborted.");
+        }
+
+        return 1;
+      }
+
+      function Me(a, b) {
+        if (null == a) return 0;
+        if (null == b) return T(a, 2, "NULL VP8Io parameter in VP8Decode().");
+        if (!a.cb && !Kc(a, b)) return 0;
+        x(a.cb);
+
+        if (null == b.ac || b.ac(b)) {
+          b.ob && (a.L = 0);
+          var c = Ya[a.L];
+          2 == a.L ? (a.yb = 0, a.zb = 0) : (a.yb = b.v - c >> 4, a.zb = b.j - c >> 4, 0 > a.yb && (a.yb = 0), 0 > a.zb && (a.zb = 0));
+          a.Va = b.o + 15 + c >> 4;
+          a.Hb = b.va + 15 + c >> 4;
+          a.Hb > a.za && (a.Hb = a.za);
+          a.Va > a.Ub && (a.Va = a.Ub);
+
+          if (0 < a.L) {
+            var d = a.ed;
+
+            for (c = 0; 4 > c; ++c) {
+              var e;
+
+              if (a.Qa.Cb) {
+                var f = a.Qa.Lb[c];
+                a.Qa.Fb || (f += d.Tb);
+              } else f = d.Tb;
+
+              for (e = 0; 1 >= e; ++e) {
+                var g = a.gd[c][e],
+                    h = f;
+                d.Pc && (h += d.vd[0], e && (h += d.od[0]));
+                h = 0 > h ? 0 : 63 < h ? 63 : h;
+
+                if (0 < h) {
+                  var k = h;
+                  0 < d.wb && (k = 4 < d.wb ? k >> 2 : k >> 1, k > 9 - d.wb && (k = 9 - d.wb));
+                  1 > k && (k = 1);
+                  g.dd = k;
+                  g.tc = 2 * h + k;
+                  g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;
+                } else g.tc = 0;
+
+                g.La = e;
+              }
+            }
+          }
+
+          c = 0;
+        } else T(a, 6, "Frame setup failed"), c = a.a;
+
+        if (c = 0 == c) {
+          if (c) {
+            a.$c = 0;
+            0 < a.Aa || (a.Ic = Ne);
+
+            b: {
+              c = a.Ic;
+              var k = a.za,
+                  d = 4 * k,
+                  l = 32 * k,
+                  m = k + 1,
+                  n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,
+                  r = (2 == a.Aa ? 2 : 1) * k;
+              e = 3 * (16 * c + Ya[a.L]) / 2 * l;
+              f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;
+              g = d + 832 + e + f;
+              if (g != g) c = 0;else {
+                if (g > a.Vb) {
+                  a.Vb = 0;
+                  a.Ec = V(g);
+                  a.Fc = 0;
+
+                  if (null == a.Ec) {
+                    c = T(a, 1, "no memory during frame initialization.");
+                    break b;
+                  }
+
+                  a.Vb = g;
+                }
+
+                g = a.Ec;
+                h = a.Fc;
+                a.Ac = g;
+                a.Bc = h;
+                h += d;
+                a.Gd = wa(l, Ic);
+                a.Hd = 0;
+                a.rb = wa(m + 1, Hc);
+                a.sb = 1;
+                a.wa = n ? wa(n, Xa) : null;
+                a.Y = 0;
+                a.D.Nb = 0;
+                a.D.wa = a.wa;
+                a.D.Y = a.Y;
+                0 < a.Aa && (a.D.Y += k);
+                x(!0);
+                a.oc = g;
+                a.pc = h;
+                h += 832;
+                a.ya = wa(r, Kb);
+                a.aa = 0;
+                a.D.ya = a.ya;
+                a.D.aa = a.aa;
+                2 == a.Aa && (a.D.aa += k);
+                a.R = 16 * k;
+                a.B = 8 * k;
+                l = Ya[a.L];
+                k = l * a.R;
+                l = l / 2 * a.B;
+                a.sa = g;
+                a.ta = h + k;
+                a.qa = a.sa;
+                a.ra = a.ta + 16 * c * a.R + l;
+                a.Ha = a.qa;
+                a.Ia = a.ra + 8 * c * a.B + l;
+                a.$c = 0;
+                h += e;
+                a.mb = f ? g : null;
+                a.nb = f ? h : null;
+                x(h + f <= a.Fc + a.Vb);
+                Lc(a);
+                M(a.Ac, a.Bc, 0, d);
+                c = 1;
+              }
+            }
+
+            if (c) {
+              b.ka = 0;
+              b.y = a.sa;
+              b.O = a.ta;
+              b.f = a.qa;
+              b.N = a.ra;
+              b.ea = a.Ha;
+              b.Vd = a.Ia;
+              b.fa = a.R;
+              b.Rc = a.B;
+              b.F = null;
+              b.J = 0;
+
+              if (!ad) {
+                for (c = -255; 255 >= c; ++c) {
+                  bd[255 + c] = 0 > c ? -c : c;
+                }
+
+                for (c = -1020; 1020 >= c; ++c) {
+                  cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;
+                }
+
+                for (c = -112; 112 >= c; ++c) {
+                  dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;
+                }
+
+                for (c = -255; 510 >= c; ++c) {
+                  ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;
+                }
+
+                ad = 1;
+              }
+
+              Nc = Oe;
+              Za = Pe;
+              Nb = Qe;
+              pa = Re;
+              Ob = Se;
+              fd = Te;
+              Xc = Ue;
+              Tc = Ve;
+              Yc = We;
+              Uc = Xe;
+              Zc = Ye;
+              Vc = Ze;
+              $c = $e;
+              Wc = af;
+              Rc = gd;
+              Pc = hd;
+              Sc = bf;
+              Qc = cf;
+              W[0] = df;
+              W[1] = ef;
+              W[2] = ff;
+              W[3] = gf;
+              W[4] = hf;
+              W[5] = jf;
+              W[6] = kf;
+              W[7] = lf;
+              W[8] = mf;
+              W[9] = nf;
+              Y[0] = of;
+              Y[1] = pf;
+              Y[2] = qf;
+              Y[3] = rf;
+              Y[4] = sf;
+              Y[5] = tf;
+              Y[6] = uf;
+              ka[0] = vf;
+              ka[1] = wf;
+              ka[2] = xf;
+              ka[3] = yf;
+              ka[4] = zf;
+              ka[5] = Af;
+              ka[6] = Bf;
+              c = 1;
+            } else c = 0;
+          }
+
+          c && (c = Je(a, b));
+          null != b.bc && b.bc(b);
+          c &= 1;
+        }
+
+        if (!c) return 0;
+        a.cb = 0;
+        return c;
+      }
+
+      function qa(a, b, c, d, e) {
+        e = a[b + c + 32 * d] + (e >> 3);
+        a[b + c + 32 * d] = e & -256 ? 0 > e ? 0 : 255 : e;
+      }
+
+      function kb(a, b, c, d, e, f) {
+        qa(a, b, 0, c, d + e);
+        qa(a, b, 1, c, d + f);
+        qa(a, b, 2, c, d - f);
+        qa(a, b, 3, c, d - e);
+      }
+
+      function da(a) {
+        return (20091 * a >> 16) + a;
+      }
+
+      function id(a, b, c, d) {
+        var e = 0,
+            f;
+        var g = V(16);
+
+        for (f = 0; 4 > f; ++f) {
+          var h = a[b + 0] + a[b + 8];
+          var k = a[b + 0] - a[b + 8];
+          var l = (35468 * a[b + 4] >> 16) - da(a[b + 12]);
+          var m = da(a[b + 4]) + (35468 * a[b + 12] >> 16);
+          g[e + 0] = h + m;
+          g[e + 1] = k + l;
+          g[e + 2] = k - l;
+          g[e + 3] = h - m;
+          e += 4;
+          b++;
+        }
+
+        for (f = e = 0; 4 > f; ++f) {
+          a = g[e + 0] + 4, h = a + g[e + 8], k = a - g[e + 8], l = (35468 * g[e + 4] >> 16) - da(g[e + 12]), m = da(g[e + 4]) + (35468 * g[e + 12] >> 16), qa(c, d, 0, 0, h + m), qa(c, d, 1, 0, k + l), qa(c, d, 2, 0, k - l), qa(c, d, 3, 0, h - m), e++, d += 32;
+        }
+      }
+
+      function Te(a, b, c, d) {
+        var e = a[b + 0] + 4,
+            f = 35468 * a[b + 4] >> 16,
+            g = da(a[b + 4]),
+            h = 35468 * a[b + 1] >> 16;
+        a = da(a[b + 1]);
+        kb(c, d, 0, e + g, a, h);
+        kb(c, d, 1, e + f, a, h);
+        kb(c, d, 2, e - f, a, h);
+        kb(c, d, 3, e - g, a, h);
+      }
+
+      function Pe(a, b, c, d, e) {
+        id(a, b, c, d);
+        e && id(a, b + 16, c, d + 4);
+      }
+
+      function Qe(a, b, c, d) {
+        Za(a, b + 0, c, d, 1);
+        Za(a, b + 32, c, d + 128, 1);
+      }
+
+      function Re(a, b, c, d) {
+        a = a[b + 0] + 4;
+        var e;
+
+        for (e = 0; 4 > e; ++e) {
+          for (b = 0; 4 > b; ++b) {
+            qa(c, d, b, e, a);
+          }
+        }
+      }
+
+      function Se(a, b, c, d) {
+        a[b + 0] && pa(a, b + 0, c, d);
+        a[b + 16] && pa(a, b + 16, c, d + 4);
+        a[b + 32] && pa(a, b + 32, c, d + 128);
+        a[b + 48] && pa(a, b + 48, c, d + 128 + 4);
+      }
+
+      function Oe(a, b, c, d) {
+        var e = V(16),
+            f;
+
+        for (f = 0; 4 > f; ++f) {
+          var g = a[b + 0 + f] + a[b + 12 + f];
+          var h = a[b + 4 + f] + a[b + 8 + f];
+          var k = a[b + 4 + f] - a[b + 8 + f];
+          var l = a[b + 0 + f] - a[b + 12 + f];
+          e[0 + f] = g + h;
+          e[8 + f] = g - h;
+          e[4 + f] = l + k;
+          e[12 + f] = l - k;
+        }
+
+        for (f = 0; 4 > f; ++f) {
+          a = e[0 + 4 * f] + 3, g = a + e[3 + 4 * f], h = e[1 + 4 * f] + e[2 + 4 * f], k = e[1 + 4 * f] - e[2 + 4 * f], l = a - e[3 + 4 * f], c[d + 0] = g + h >> 3, c[d + 16] = l + k >> 3, c[d + 32] = g - h >> 3, c[d + 48] = l - k >> 3, d += 64;
+        }
+      }
+
+      function Pb(a, b, c) {
+        var d = b - 32,
+            e = R,
+            f = 255 - a[d - 1],
+            g;
+
+        for (g = 0; g < c; ++g) {
+          var h = e,
+              k = f + a[b - 1],
+              l;
+
+          for (l = 0; l < c; ++l) {
+            a[b + l] = h[k + a[d + l]];
+          }
+
+          b += 32;
+        }
+      }
+
+      function ef(a, b) {
+        Pb(a, b, 4);
+      }
+
+      function wf(a, b) {
+        Pb(a, b, 8);
+      }
+
+      function pf(a, b) {
+        Pb(a, b, 16);
+      }
+
+      function qf(a, b) {
+        var c;
+
+        for (c = 0; 16 > c; ++c) {
+          I(a, b + 32 * c, a, b - 32, 16);
+        }
+      }
+
+      function rf(a, b) {
+        var c;
+
+        for (c = 16; 0 < c; --c) {
+          M(a, b, a[b - 1], 16), b += 32;
+        }
+      }
+
+      function $a(a, b, c) {
+        var d;
+
+        for (d = 0; 16 > d; ++d) {
+          M(b, c + 32 * d, a, 16);
+        }
+      }
+
+      function of(a, b) {
+        var c = 16,
+            d;
+
+        for (d = 0; 16 > d; ++d) {
+          c += a[b - 1 + 32 * d] + a[b + d - 32];
+        }
+
+        $a(c >> 5, a, b);
+      }
+
+      function sf(a, b) {
+        var c = 8,
+            d;
+
+        for (d = 0; 16 > d; ++d) {
+          c += a[b - 1 + 32 * d];
+        }
+
+        $a(c >> 4, a, b);
+      }
+
+      function tf(a, b) {
+        var c = 8,
+            d;
+
+        for (d = 0; 16 > d; ++d) {
+          c += a[b + d - 32];
+        }
+
+        $a(c >> 4, a, b);
+      }
+
+      function uf(a, b) {
+        $a(128, a, b);
+      }
+
+      function z(a, b, c) {
+        return a + 2 * b + c + 2 >> 2;
+      }
+
+      function ff(a, b) {
+        var c = b - 32,
+            c = new Uint8Array([z(a[c - 1], a[c + 0], a[c + 1]), z(a[c + 0], a[c + 1], a[c + 2]), z(a[c + 1], a[c + 2], a[c + 3]), z(a[c + 2], a[c + 3], a[c + 4])]),
+            d;
+
+        for (d = 0; 4 > d; ++d) {
+          I(a, b + 32 * d, c, 0, c.length);
+        }
+      }
+
+      function gf(a, b) {
+        var c = a[b - 1],
+            d = a[b - 1 + 32],
+            e = a[b - 1 + 64],
+            f = a[b - 1 + 96];
+        ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));
+        ra(a, b + 32, 16843009 * z(c, d, e));
+        ra(a, b + 64, 16843009 * z(d, e, f));
+        ra(a, b + 96, 16843009 * z(e, f, f));
+      }
+
+      function df(a, b) {
+        var c = 4,
+            d;
+
+        for (d = 0; 4 > d; ++d) {
+          c += a[b + d - 32] + a[b - 1 + 32 * d];
+        }
+
+        c >>= 3;
+
+        for (d = 0; 4 > d; ++d) {
+          M(a, b + 32 * d, c, 4);
+        }
+      }
+
+      function hf(a, b) {
+        var c = a[b - 1 + 0],
+            d = a[b - 1 + 32],
+            e = a[b - 1 + 64],
+            f = a[b - 1 - 32],
+            g = a[b + 0 - 32],
+            h = a[b + 1 - 32],
+            k = a[b + 2 - 32],
+            l = a[b + 3 - 32];
+        a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);
+        a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);
+        a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);
+        a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);
+        a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);
+        a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);
+        a[b + 3 + 0] = z(l, k, h);
+      }
+
+      function kf(a, b) {
+        var c = a[b + 1 - 32],
+            d = a[b + 2 - 32],
+            e = a[b + 3 - 32],
+            f = a[b + 4 - 32],
+            g = a[b + 5 - 32],
+            h = a[b + 6 - 32],
+            k = a[b + 7 - 32];
+        a[b + 0 + 0] = z(a[b + 0 - 32], c, d);
+        a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);
+        a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);
+        a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);
+        a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);
+        a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);
+        a[b + 3 + 96] = z(h, k, k);
+      }
+
+      function jf(a, b) {
+        var c = a[b - 1 + 0],
+            d = a[b - 1 + 32],
+            e = a[b - 1 + 64],
+            f = a[b - 1 - 32],
+            g = a[b + 0 - 32],
+            h = a[b + 1 - 32],
+            k = a[b + 2 - 32],
+            l = a[b + 3 - 32];
+        a[b + 0 + 0] = a[b + 1 + 64] = f + g + 1 >> 1;
+        a[b + 1 + 0] = a[b + 2 + 64] = g + h + 1 >> 1;
+        a[b + 2 + 0] = a[b + 3 + 64] = h + k + 1 >> 1;
+        a[b + 3 + 0] = k + l + 1 >> 1;
+        a[b + 0 + 96] = z(e, d, c);
+        a[b + 0 + 64] = z(d, c, f);
+        a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);
+        a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);
+        a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);
+        a[b + 3 + 32] = z(h, k, l);
+      }
+
+      function lf(a, b) {
+        var c = a[b + 0 - 32],
+            d = a[b + 1 - 32],
+            e = a[b + 2 - 32],
+            f = a[b + 3 - 32],
+            g = a[b + 4 - 32],
+            h = a[b + 5 - 32],
+            k = a[b + 6 - 32],
+            l = a[b + 7 - 32];
+        a[b + 0 + 0] = c + d + 1 >> 1;
+        a[b + 1 + 0] = a[b + 0 + 64] = d + e + 1 >> 1;
+        a[b + 2 + 0] = a[b + 1 + 64] = e + f + 1 >> 1;
+        a[b + 3 + 0] = a[b + 2 + 64] = f + g + 1 >> 1;
+        a[b + 0 + 32] = z(c, d, e);
+        a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);
+        a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);
+        a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);
+        a[b + 3 + 64] = z(g, h, k);
+        a[b + 3 + 96] = z(h, k, l);
+      }
+
+      function nf(a, b) {
+        var c = a[b - 1 + 0],
+            d = a[b - 1 + 32],
+            e = a[b - 1 + 64],
+            f = a[b - 1 + 96];
+        a[b + 0 + 0] = c + d + 1 >> 1;
+        a[b + 2 + 0] = a[b + 0 + 32] = d + e + 1 >> 1;
+        a[b + 2 + 32] = a[b + 0 + 64] = e + f + 1 >> 1;
+        a[b + 1 + 0] = z(c, d, e);
+        a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);
+        a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);
+        a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[b + 2 + 96] = a[b + 3 + 96] = f;
+      }
+
+      function mf(a, b) {
+        var c = a[b - 1 + 0],
+            d = a[b - 1 + 32],
+            e = a[b - 1 + 64],
+            f = a[b - 1 + 96],
+            g = a[b - 1 - 32],
+            h = a[b + 0 - 32],
+            k = a[b + 1 - 32],
+            l = a[b + 2 - 32];
+        a[b + 0 + 0] = a[b + 2 + 32] = c + g + 1 >> 1;
+        a[b + 0 + 32] = a[b + 2 + 64] = d + c + 1 >> 1;
+        a[b + 0 + 64] = a[b + 2 + 96] = e + d + 1 >> 1;
+        a[b + 0 + 96] = f + e + 1 >> 1;
+        a[b + 3 + 0] = z(h, k, l);
+        a[b + 2 + 0] = z(g, h, k);
+        a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);
+        a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);
+        a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);
+        a[b + 1 + 96] = z(f, e, d);
+      }
+
+      function xf(a, b) {
+        var c;
+
+        for (c = 0; 8 > c; ++c) {
+          I(a, b + 32 * c, a, b - 32, 8);
+        }
+      }
+
+      function yf(a, b) {
+        var c;
+
+        for (c = 0; 8 > c; ++c) {
+          M(a, b, a[b - 1], 8), b += 32;
+        }
+      }
+
+      function lb(a, b, c) {
+        var d;
+
+        for (d = 0; 8 > d; ++d) {
+          M(b, c + 32 * d, a, 8);
+        }
+      }
+
+      function vf(a, b) {
+        var c = 8,
+            d;
+
+        for (d = 0; 8 > d; ++d) {
+          c += a[b + d - 32] + a[b - 1 + 32 * d];
+        }
+
+        lb(c >> 4, a, b);
+      }
+
+      function Af(a, b) {
+        var c = 4,
+            d;
+
+        for (d = 0; 8 > d; ++d) {
+          c += a[b + d - 32];
+        }
+
+        lb(c >> 3, a, b);
+      }
+
+      function zf(a, b) {
+        var c = 4,
+            d;
+
+        for (d = 0; 8 > d; ++d) {
+          c += a[b - 1 + 32 * d];
+        }
+
+        lb(c >> 3, a, b);
+      }
+
+      function Bf(a, b) {
+        lb(128, a, b);
+      }
+
+      function ab(a, b, c) {
+        var d = a[b - c],
+            e = a[b + 0],
+            f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],
+            g = mb[112 + (f + 4 >> 3)];
+        a[b - c] = R[255 + d + mb[112 + (f + 3 >> 3)]];
+        a[b + 0] = R[255 + e - g];
+      }
+
+      function jd(a, b, c, d) {
+        var e = a[b + 0],
+            f = a[b + c];
+        return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;
+      }
+
+      function kd(a, b, c, d) {
+        return 4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d;
+      }
+
+      function ld(a, b, c, d, e) {
+        var f = a[b - 3 * c],
+            g = a[b - 2 * c],
+            h = a[b - c],
+            k = a[b + 0],
+            l = a[b + c],
+            m = a[b + 2 * c],
+            n = a[b + 3 * c];
+        return 4 * U[255 + h - k] + U[255 + g - l] > d ? 0 : U[255 + a[b - 4 * c] - f] <= e && U[255 + f - g] <= e && U[255 + g - h] <= e && U[255 + n - m] <= e && U[255 + m - l] <= e && U[255 + l - k] <= e;
+      }
+
+      function gd(a, b, c, d) {
+        var e = 2 * d + 1;
+
+        for (d = 0; 16 > d; ++d) {
+          kd(a, b + d, c, e) && ab(a, b + d, c);
+        }
+      }
+
+      function hd(a, b, c, d) {
+        var e = 2 * d + 1;
+
+        for (d = 0; 16 > d; ++d) {
+          kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);
+        }
+      }
+
+      function bf(a, b, c, d) {
+        var e;
+
+        for (e = 3; 0 < e; --e) {
+          b += 4 * c, gd(a, b, c, d);
+        }
+      }
+
+      function cf(a, b, c, d) {
+        var e;
+
+        for (e = 3; 0 < e; --e) {
+          b += 4, hd(a, b, c, d);
+        }
+      }
+
+      function ea(a, b, c, d, e, f, g, h) {
+        for (f = 2 * f + 1; 0 < e--;) {
+          if (ld(a, b, c, f, g)) if (jd(a, b, c, h)) ab(a, b, c);else {
+            var k = a,
+                l = b,
+                m = c,
+                n = k[l - 2 * m],
+                r = k[l - m],
+                q = k[l + 0],
+                t = k[l + m],
+                v = k[l + 2 * m],
+                p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],
+                u = 27 * p + 63 >> 7,
+                w = 18 * p + 63 >> 7,
+                p = 9 * p + 63 >> 7;
+            k[l - 3 * m] = R[255 + k[l - 3 * m] + p];
+            k[l - 2 * m] = R[255 + n + w];
+            k[l - m] = R[255 + r + u];
+            k[l + 0] = R[255 + q - u];
+            k[l + m] = R[255 + t - w];
+            k[l + 2 * m] = R[255 + v - p];
+          }
+          b += d;
+        }
+      }
+
+      function Fa(a, b, c, d, e, f, g, h) {
+        for (f = 2 * f + 1; 0 < e--;) {
+          if (ld(a, b, c, f, g)) if (jd(a, b, c, h)) ab(a, b, c);else {
+            var k = a,
+                l = b,
+                m = c,
+                n = k[l - m],
+                r = k[l + 0],
+                q = k[l + m],
+                t = 3 * (r - n),
+                v = mb[112 + (t + 4 >> 3)],
+                t = mb[112 + (t + 3 >> 3)],
+                p = v + 1 >> 1;
+            k[l - 2 * m] = R[255 + k[l - 2 * m] + p];
+            k[l - m] = R[255 + n + t];
+            k[l + 0] = R[255 + r - v];
+            k[l + m] = R[255 + q - p];
+          }
+          b += d;
+        }
+      }
+
+      function Ue(a, b, c, d, e, f) {
+        ea(a, b, c, 1, 16, d, e, f);
+      }
+
+      function Ve(a, b, c, d, e, f) {
+        ea(a, b, 1, c, 16, d, e, f);
+      }
+
+      function Ye(a, b, c, d, e, f) {
+        var g;
+
+        for (g = 3; 0 < g; --g) {
+          b += 4 * c, Fa(a, b, c, 1, 16, d, e, f);
+        }
+      }
+
+      function Ze(a, b, c, d, e, f) {
+        var g;
+
+        for (g = 3; 0 < g; --g) {
+          b += 4, Fa(a, b, 1, c, 16, d, e, f);
+        }
+      }
+
+      function We(a, b, c, d, e, f, g, h) {
+        ea(a, b, e, 1, 8, f, g, h);
+        ea(c, d, e, 1, 8, f, g, h);
+      }
+
+      function Xe(a, b, c, d, e, f, g, h) {
+        ea(a, b, 1, e, 8, f, g, h);
+        ea(c, d, 1, e, 8, f, g, h);
+      }
+
+      function $e(a, b, c, d, e, f, g, h) {
+        Fa(a, b + 4 * e, e, 1, 8, f, g, h);
+        Fa(c, d + 4 * e, e, 1, 8, f, g, h);
+      }
+
+      function af(a, b, c, d, e, f, g, h) {
+        Fa(a, b + 4, 1, e, 8, f, g, h);
+        Fa(c, d + 4, 1, e, 8, f, g, h);
+      }
+
+      function Cf() {
+        this.ba = new Cb();
+        this.ec = [];
+        this.cc = [];
+        this.Mc = [];
+        this.Dc = this.Nc = this.dc = this.fc = 0;
+        this.Oa = new Ud();
+        this.memory = 0;
+        this.Ib = "OutputFunc";
+        this.Jb = "OutputAlphaFunc";
+        this.Nd = "OutputRowFunc";
+      }
+
+      function md() {
+        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 Df() {
+        this.nc = this.Ea = this.b = this.hc = 0;
+        this.K = [];
+        this.w = 0;
+      }
+
+      function Ef() {
+        this.ua = 0;
+        this.Wa = new ac();
+        this.vb = new ac();
+        this.md = this.xc = this.wc = 0;
+        this.vc = [];
+        this.Wb = 0;
+        this.Ya = new Ub();
+        this.yc = new O();
+      }
+
+      function je() {
+        this.xb = this.a = 0;
+        this.l = new Oa();
+        this.ca = new Cb();
+        this.V = [];
+        this.Ba = 0;
+        this.Ta = [];
+        this.Ua = 0;
+        this.m = new Ra();
+        this.Pb = 0;
+        this.wd = new Ra();
+        this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;
+        this.s = new Ef();
+        this.ab = 0;
+        this.gc = wa(4, Df);
+        this.Oc = 0;
+      }
+
+      function Ff() {
+        this.Lc = this.Z = this.$a = this.i = this.c = 0;
+        this.l = new Oa();
+        this.ic = 0;
+        this.ca = [];
+        this.tb = 0;
+        this.qd = null;
+        this.rd = 0;
+      }
+
+      function Rb(a, b, c, d, e, f, g) {
+        a = null == a ? 0 : a[b + 0];
+
+        for (b = 0; b < g; ++b) {
+          e[f + b] = a + c[d + b] & 255, a = e[f + b];
+        }
+      }
+
+      function Gf(a, b, c, d, e, f, g) {
+        if (null == a) Rb(null, null, c, d, e, f, g);else {
+          var h;
+
+          for (h = 0; h < g; ++h) {
+            e[f + h] = a[b + h] + c[d + h] & 255;
+          }
+        }
+      }
+
+      function Hf(a, b, c, d, e, f, g) {
+        if (null == a) Rb(null, null, c, d, e, f, g);else {
+          var h = a[b + 0],
+              k = h,
+              l = h,
+              m;
+
+          for (m = 0; m < g; ++m) {
+            h = a[b + m], k = l + h - k, l = c[d + m] + (k & -256 ? 0 > k ? 0 : 255 : k) & 255, k = h, e[f + m] = l;
+          }
+        }
+      }
+
+      function Le(a, b, c, d) {
+        var e = b.width,
+            f = b.o;
+        x(null != a && null != b);
+        if (0 > c || 0 >= d || c + d > f) return null;
+
+        if (!a.Cc) {
+          if (null == a.ga) {
+            a.ga = new Ff();
+            var g;
+            (g = null == a.ga) || (g = b.width * b.o, x(0 == a.Gb.length), a.Gb = V(g), a.Uc = 0, null == a.Gb ? g = 0 : (a.mb = a.Gb, a.nb = a.Uc, a.rc = null, g = 1), g = !g);
+
+            if (!g) {
+              g = a.ga;
+              var h = a.Fa,
+                  k = a.P,
+                  l = a.qc,
+                  m = a.mb,
+                  n = a.nb,
+                  r = k + 1,
+                  q = l - 1,
+                  t = g.l;
+              x(null != h && null != m && null != b);
+              ia[0] = null;
+              ia[1] = Rb;
+              ia[2] = Gf;
+              ia[3] = Hf;
+              g.ca = m;
+              g.tb = n;
+              g.c = b.width;
+              g.i = b.height;
+              x(0 < g.c && 0 < g.i);
+              if (1 >= l) b = 0;else if (g.$a = h[k + 0] >> 0 & 3, g.Z = h[k + 0] >> 2 & 3, g.Lc = h[k + 0] >> 4 & 3, k = h[k + 0] >> 6 & 3, 0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k) b = 0;else if (t.put = kc, t.ac = gc, t.bc = lc, t.ma = g, t.width = b.width, t.height = b.height, t.Da = b.Da, t.v = b.v, t.va = b.va, t.j = b.j, t.o = b.o, g.$a) b: {
+                x(1 == g.$a), b = Bc();
+
+                c: for (;;) {
+                  if (null == b) {
+                    b = 0;
+                    break b;
+                  }
+
+                  x(null != g);
+                  g.mc = b;
+                  b.c = g.c;
+                  b.i = g.i;
+                  b.l = g.l;
+                  b.l.ma = g;
+                  b.l.width = g.c;
+                  b.l.height = g.i;
+                  b.a = 0;
+                  cb(b.m, h, r, q);
+                  if (!rb(g.c, g.i, 1, b, null)) break c;
+                  1 == b.ab && 3 == b.gc[0].hc && yc(b.s) ? (g.ic = 1, h = b.c * b.i, b.Ta = null, b.Ua = 0, b.V = V(h), b.Ba = 0, null == b.V ? (b.a = 1, b = 0) : b = 1) : (g.ic = 0, b = Ec(b, g.c));
+                  if (!b) break c;
+                  b = 1;
+                  break b;
+                }
+
+                g.mc = null;
+                b = 0;
+              } else b = q >= g.c * g.i;
+              g = !b;
+            }
+
+            if (g) return null;
+            1 != a.ga.Lc ? a.Ga = 0 : d = f - c;
+          }
+
+          x(null != a.ga);
+          x(c + d <= f);
+
+          a: {
+            h = a.ga;
+            b = h.c;
+            f = h.l.o;
+
+            if (0 == h.$a) {
+              r = a.rc;
+              q = a.Vc;
+              t = a.Fa;
+              k = a.P + 1 + c * b;
+              l = a.mb;
+              m = a.nb + c * b;
+              x(k <= a.P + a.qc);
+              if (0 != h.Z) for (x(null != ia[h.Z]), g = 0; g < d; ++g) {
+                ia[h.Z](r, q, t, k, l, m, b), r = l, q = m, m += b, k += b;
+              } else for (g = 0; g < d; ++g) {
+                I(l, m, t, k, b), r = l, q = m, m += b, k += b;
+              }
+              a.rc = r;
+              a.Vc = q;
+            } else {
+              x(null != h.mc);
+              b = c + d;
+              g = h.mc;
+              x(null != g);
+              x(b <= g.i);
+              if (g.C >= b) b = 1;else if (h.ic || Aa(), h.ic) {
+                var h = g.V,
+                    r = g.Ba,
+                    q = g.c,
+                    v = g.i,
+                    t = 1,
+                    k = g.$ / q,
+                    l = g.$ % q,
+                    m = g.m,
+                    n = g.s,
+                    p = g.$,
+                    u = q * v,
+                    w = q * b,
+                    y = n.wc,
+                    A = p < w ? ha(n, l, k) : null;
+                x(p <= u);
+                x(b <= v);
+                x(yc(n));
+
+                c: for (;;) {
+                  for (; !m.h && p < w;) {
+                    l & y || (A = ha(n, l, k));
+                    x(null != A);
+                    Sa(m);
+                    v = ua(A.G[0], A.H[0], m);
+                    if (256 > v) h[r + p] = v, ++p, ++l, l >= q && (l = 0, ++k, k <= b && !(k % 16) && Ib(g, k));else if (280 > v) {
+                      var v = ib(v - 256, m);
+                      var E = ua(A.G[4], A.H[4], m);
+                      Sa(m);
+                      E = ib(E, m);
+                      E = nc(q, E);
+
+                      if (p >= E && u - p >= v) {
+                        var B;
+
+                        for (B = 0; B < v; ++B) {
+                          h[r + p + B] = h[r + p + B - E];
+                        }
+                      } else {
+                        t = 0;
+                        break c;
+                      }
+
+                      p += v;
+
+                      for (l += v; l >= q;) {
+                        l -= q, ++k, k <= b && !(k % 16) && Ib(g, k);
+                      }
+
+                      p < w && l & y && (A = ha(n, l, k));
+                    } else {
+                      t = 0;
+                      break c;
+                    }
+                    x(m.h == db(m));
+                  }
+
+                  Ib(g, k > b ? b : k);
+                  break c;
+                }
+
+                !t || m.h && p < u ? (t = 0, g.a = m.h ? 5 : 3) : g.$ = p;
+                b = t;
+              } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);
+
+              if (!b) {
+                d = 0;
+                break a;
+              }
+            }
+
+            c + d >= f && (a.Cc = 1);
+            d = 1;
+          }
+
+          if (!d) return null;
+          if (a.Cc && (d = a.ga, null != d && (d.mc = null), a.ga = null, 0 < a.Ga)) return alert("todo:WebPDequantizeLevels"), null;
+        }
+
+        return a.nb + c * e;
+      }
+
+      function If(a, b, c, d, e, f) {
+        for (; 0 < e--;) {
+          var g = a,
+              h = b + (c ? 1 : 0),
+              k = a,
+              l = b + (c ? 0 : 3),
+              m;
+
+          for (m = 0; m < d; ++m) {
+            var n = k[l + 4 * m];
+            255 != n && (n *= 32897, g[h + 4 * m + 0] = g[h + 4 * m + 0] * n >> 23, g[h + 4 * m + 1] = g[h + 4 * m + 1] * n >> 23, g[h + 4 * m + 2] = g[h + 4 * m + 2] * n >> 23);
+          }
+
+          b += f;
+        }
+      }
+
+      function Jf(a, b, c, d, e) {
+        for (; 0 < d--;) {
+          var f;
+
+          for (f = 0; f < c; ++f) {
+            var g = a[b + 2 * f + 0],
+                h = a[b + 2 * f + 1],
+                k = h & 15,
+                l = 4369 * k,
+                h = (h & 240 | h >> 4) * l >> 16;
+            a[b + 2 * f + 0] = (g & 240 | g >> 4) * l >> 16 & 240 | (g & 15 | g << 4) * l >> 16 >> 4 & 15;
+            a[b + 2 * f + 1] = h & 240 | k;
+          }
+
+          b += e;
+        }
+      }
+
+      function Kf(a, b, c, d, e, f, g, h) {
+        var k = 255,
+            l,
+            m;
+
+        for (m = 0; m < e; ++m) {
+          for (l = 0; l < d; ++l) {
+            var n = a[b + l];
+            f[g + 4 * l] = n;
+            k &= n;
+          }
+
+          b += c;
+          g += h;
+        }
+
+        return 255 != k;
+      }
+
+      function Lf(a, b, c, d, e) {
+        var f;
+
+        for (f = 0; f < e; ++f) {
+          c[d + f] = a[b + f] >> 8;
+        }
+      }
+
+      function Aa() {
+        za = If;
+        vc = Jf;
+        fc = Kf;
+        Fc = Lf;
+      }
+
+      function va(a, b, c) {
+        self[a] = function (a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {
+          var d,
+              E = y - 1 >> 1;
+          var B = h[k + 0] | l[m + 0] << 16;
+          var C = n[r + 0] | q[t + 0] << 16;
+          x(null != a);
+          var z = 3 * B + C + 131074 >> 2;
+          b(a[e + 0], z & 255, z >> 16, v, p);
+          null != f && (z = 3 * C + B + 131074 >> 2, b(f[g + 0], z & 255, z >> 16, u, w));
+
+          for (d = 1; d <= E; ++d) {
+            var D = h[k + d] | l[m + d] << 16;
+            var G = n[r + d] | q[t + d] << 16;
+            var F = B + D + C + G + 524296;
+            var H = F + 2 * (D + C) >> 3;
+            F = F + 2 * (B + G) >> 3;
+            z = H + B >> 1;
+            B = F + D >> 1;
+            b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);
+            b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);
+            null != f && (z = F + C >> 1, B = H + G >> 1, b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c), b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));
+            B = D;
+            C = G;
+          }
+
+          y & 1 || (z = 3 * B + C + 131074 >> 2, b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c), null != f && (z = 3 * C + B + 131074 >> 2, b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));
+        };
+      }
+
+      function ic() {
+        P[Ca] = Mf;
+        P[Ua] = nd;
+        P[tc] = Nf;
+        P[Va] = od;
+        P[ya] = pd;
+        P[Db] = qd;
+        P[wc] = Of;
+        P[zb] = nd;
+        P[Ab] = od;
+        P[Ja] = pd;
+        P[Bb] = qd;
+      }
+
+      function Sb(a) {
+        return a & ~Pf ? 0 > a ? 0 : 255 : a >> rd;
+      }
+
+      function bb(a, b) {
+        return Sb((19077 * a >> 8) + (26149 * b >> 8) - 14234);
+      }
+
+      function nb(a, b, c) {
+        return Sb((19077 * a >> 8) - (6419 * b >> 8) - (13320 * c >> 8) + 8708);
+      }
+
+      function Pa(a, b) {
+        return Sb((19077 * a >> 8) + (33050 * b >> 8) - 17685);
+      }
+
+      function Ga(a, b, c, d, e) {
+        d[e + 0] = bb(a, c);
+        d[e + 1] = nb(a, b, c);
+        d[e + 2] = Pa(a, b);
+      }
+
+      function Tb(a, b, c, d, e) {
+        d[e + 0] = Pa(a, b);
+        d[e + 1] = nb(a, b, c);
+        d[e + 2] = bb(a, c);
+      }
+
+      function sd(a, b, c, d, e) {
+        var f = nb(a, b, c);
+        b = f << 3 & 224 | Pa(a, b) >> 3;
+        d[e + 0] = bb(a, c) & 248 | f >> 5;
+        d[e + 1] = b;
+      }
+
+      function td(a, b, c, d, e) {
+        var f = Pa(a, b) & 240 | 15;
+        d[e + 0] = bb(a, c) & 240 | nb(a, b, c) >> 4;
+        d[e + 1] = f;
+      }
+
+      function ud(a, b, c, d, e) {
+        d[e + 0] = 255;
+        Ga(a, b, c, d, e + 1);
+      }
+
+      function vd(a, b, c, d, e) {
+        Tb(a, b, c, d, e);
+        d[e + 3] = 255;
+      }
+
+      function wd(a, b, c, d, e) {
+        Ga(a, b, c, d, e);
+        d[e + 3] = 255;
+      }
+
+      function ga(a, b) {
+        return 0 > a ? 0 : a > b ? b : a;
+      }
+
+      function la(a, b, c) {
+        self[a] = function (a, e, f, g, h, k, l, m, n) {
+          for (var d = m + (n & -2) * c; m != d;) {
+            b(a[e + 0], f[g + 0], h[k + 0], l, m), b(a[e + 1], f[g + 0], h[k + 0], l, m + c), e += 2, ++g, ++k, m += 2 * c;
+          }
+
+          n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);
+        };
+      }
+
+      function xd(a, b, c) {
+        return 0 == c ? 0 == a ? 0 == b ? 6 : 5 : 0 == b ? 4 : 0 : c;
+      }
+
+      function yd(a, b, c, d, e) {
+        switch (a >>> 30) {
+          case 3:
+            Za(b, c, d, e, 0);
+            break;
+
+          case 2:
+            fd(b, c, d, e);
+            break;
+
+          case 1:
+            pa(b, c, d, e);
+        }
+      }
+
+      function Oc(a, b) {
+        var c,
+            d,
+            e = b.M,
+            f = b.Nb,
+            g = a.oc,
+            h = a.pc + 40,
+            k = a.oc,
+            l = a.pc + 584,
+            m = a.oc,
+            n = a.pc + 600;
+
+        for (c = 0; 16 > c; ++c) {
+          g[h + 32 * c - 1] = 129;
+        }
+
+        for (c = 0; 8 > c; ++c) {
+          k[l + 32 * c - 1] = 129, m[n + 32 * c - 1] = 129;
+        }
+
+        0 < e ? g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129 : (M(g, h - 32 - 1, 127, 21), M(k, l - 32 - 1, 127, 9), M(m, n - 32 - 1, 127, 9));
+
+        for (d = 0; d < a.za; ++d) {
+          var r = b.ya[b.aa + d];
+
+          if (0 < d) {
+            for (c = -1; 16 > c; ++c) {
+              I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);
+            }
+
+            for (c = -1; 8 > c; ++c) {
+              I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4), I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);
+            }
+          }
+
+          var q = a.Gd,
+              t = a.Hd + d,
+              v = r.ad,
+              p = r.Hc;
+          0 < e && (I(g, h - 32, q[t].y, 0, 16), I(k, l - 32, q[t].f, 0, 8), I(m, n - 32, q[t].ea, 0, 8));
+
+          if (r.Za) {
+            var u = g;
+            var w = h - 32 + 16;
+            0 < e && (d >= a.za - 1 ? M(u, w, q[t].y[15], 4) : I(u, w, q[t + 1].y, 0, 4));
+
+            for (c = 0; 4 > c; c++) {
+              u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];
+            }
+
+            for (c = 0; 16 > c; ++c, p <<= 2) {
+              u = g, w = h + zd[c], W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);
+            }
+          } else if (u = xd(d, e, r.Ob[0]), Y[u](g, h), 0 != p) for (c = 0; 16 > c; ++c, p <<= 2) {
+            yd(p, v, 16 * +c, g, h + zd[c]);
+          }
+
+          c = r.Gc;
+          u = xd(d, e, r.Dd);
+          ka[u](k, l);
+          ka[u](m, n);
+          r = c >> 0;
+          p = v;
+          u = k;
+          w = l;
+          r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));
+          c >>= 8;
+          r = m;
+          p = n;
+          c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));
+          e < a.Ub - 1 && (I(q[t].y, 0, g, h + 480, 16), I(q[t].f, 0, k, l + 224, 8), I(q[t].ea, 0, m, n + 224, 8));
+          c = 8 * f * a.B;
+          q = a.sa;
+          t = a.ta + 16 * d + 16 * f * a.R;
+          v = a.qa;
+          r = a.ra + 8 * d + c;
+          p = a.Ha;
+          u = a.Ia + 8 * d + c;
+
+          for (c = 0; 16 > c; ++c) {
+            I(q, t + c * a.R, g, h + 32 * c, 16);
+          }
+
+          for (c = 0; 8 > c; ++c) {
+            I(v, r + c * a.B, k, l + 32 * c, 8), I(p, u + c * a.B, m, n + 32 * c, 8);
+          }
+        }
+      }
+
+      function Ad(a, b, c, d, e, f, g, h, k) {
+        var l = [0],
+            m = [0],
+            n = 0,
+            r = null != k ? k.kd : 0,
+            q = null != k ? k : new md();
+        if (null == a || 12 > c) return 7;
+        q.data = a;
+        q.w = b;
+        q.ha = c;
+        b = [b];
+        c = [c];
+        q.gb = [q.gb];
+
+        a: {
+          var t = b;
+          var v = c;
+          var p = q.gb;
+          x(null != a);
+          x(null != v);
+          x(null != p);
+          p[0] = 0;
+
+          if (12 <= v[0] && !fa(a, t[0], "RIFF")) {
+            if (fa(a, t[0] + 8, "WEBP")) {
+              p = 3;
+              break a;
+            }
+
+            var u = Ha(a, t[0] + 4);
+
+            if (12 > u || 4294967286 < u) {
+              p = 3;
+              break a;
+            }
+
+            if (r && u > v[0] - 8) {
+              p = 7;
+              break a;
+            }
+
+            p[0] = u;
+            t[0] += 12;
+            v[0] -= 12;
+          }
+
+          p = 0;
+        }
+
+        if (0 != p) return p;
+        u = 0 < q.gb[0];
+
+        for (c = c[0];;) {
+          t = [0];
+          n = [n];
+
+          a: {
+            var w = a;
+            v = b;
+            p = c;
+            var y = n,
+                A = l,
+                z = m,
+                B = t;
+            y[0] = 0;
+            if (8 > p[0]) p = 7;else {
+              if (!fa(w, v[0], "VP8X")) {
+                if (10 != Ha(w, v[0] + 4)) {
+                  p = 3;
+                  break a;
+                }
+
+                if (18 > p[0]) {
+                  p = 7;
+                  break a;
+                }
+
+                var C = Ha(w, v[0] + 8);
+                var D = 1 + Yb(w, v[0] + 12);
+                w = 1 + Yb(w, v[0] + 15);
+
+                if (2147483648 <= D * w) {
+                  p = 3;
+                  break a;
+                }
+
+                null != B && (B[0] = C);
+                null != A && (A[0] = D);
+                null != z && (z[0] = w);
+                v[0] += 18;
+                p[0] -= 18;
+                y[0] = 1;
+              }
+
+              p = 0;
+            }
+          }
+
+          n = n[0];
+          t = t[0];
+          if (0 != p) return p;
+          v = !!(t & 2);
+          if (!u && n) return 3;
+          null != f && (f[0] = !!(t & 16));
+          null != g && (g[0] = v);
+          null != h && (h[0] = 0);
+          g = l[0];
+          t = m[0];
+
+          if (n && v && null == k) {
+            p = 0;
+            break;
+          }
+
+          if (4 > c) {
+            p = 7;
+            break;
+          }
+
+          if (u && n || !u && !n && !fa(a, b[0], "ALPH")) {
+            c = [c];
+            q.na = [q.na];
+            q.P = [q.P];
+            q.Sa = [q.Sa];
+
+            a: {
+              C = a;
+              p = b;
+              u = c;
+              var y = q.gb,
+                  A = q.na,
+                  z = q.P,
+                  B = q.Sa;
+              D = 22;
+              x(null != C);
+              x(null != u);
+              w = p[0];
+              var F = u[0];
+              x(null != A);
+              x(null != B);
+              A[0] = null;
+              z[0] = null;
+
+              for (B[0] = 0;;) {
+                p[0] = w;
+                u[0] = F;
+
+                if (8 > F) {
+                  p = 7;
+                  break a;
+                }
+
+                var G = Ha(C, w + 4);
+
+                if (4294967286 < G) {
+                  p = 3;
+                  break a;
+                }
+
+                var H = 8 + G + 1 & -2;
+                D += H;
+
+                if (0 < y && D > y) {
+                  p = 3;
+                  break a;
+                }
+
+                if (!fa(C, w, "VP8 ") || !fa(C, w, "VP8L")) {
+                  p = 0;
+                  break a;
+                }
+
+                if (F[0] < H) {
+                  p = 7;
+                  break a;
+                }
+
+                fa(C, w, "ALPH") || (A[0] = C, z[0] = w + 8, B[0] = G);
+                w += H;
+                F -= H;
+              }
+            }
+
+            c = c[0];
+            q.na = q.na[0];
+            q.P = q.P[0];
+            q.Sa = q.Sa[0];
+            if (0 != p) break;
+          }
+
+          c = [c];
+          q.Ja = [q.Ja];
+          q.xa = [q.xa];
+
+          a: if (y = a, p = b, u = c, A = q.gb[0], z = q.Ja, B = q.xa, C = p[0], w = !fa(y, C, "VP8 "), D = !fa(y, C, "VP8L"), x(null != y), x(null != u), x(null != z), x(null != B), 8 > u[0]) p = 7;else {
+            if (w || D) {
+              y = Ha(y, C + 4);
+
+              if (12 <= A && y > A - 12) {
+                p = 3;
+                break a;
+              }
+
+              if (r && y > u[0] - 8) {
+                p = 7;
+                break a;
+              }
+
+              z[0] = y;
+              p[0] += 8;
+              u[0] -= 8;
+              B[0] = D;
+            } else B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5), z[0] = u[0];
+
+            p = 0;
+          }
+
+          c = c[0];
+          q.Ja = q.Ja[0];
+          q.xa = q.xa[0];
+          b = b[0];
+          if (0 != p) break;
+          if (4294967286 < q.Ja) return 3;
+          null == h || v || (h[0] = q.xa ? 2 : 1);
+          g = [g];
+          t = [t];
+
+          if (q.xa) {
+            if (5 > c) {
+              p = 7;
+              break;
+            }
+
+            h = g;
+            r = t;
+            v = f;
+            null == a || 5 > c ? a = 0 : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5) ? (u = [0], y = [0], A = [0], z = new Ra(), cb(z, a, b, c), mc(z, u, y, A) ? (null != h && (h[0] = u[0]), null != r && (r[0] = y[0]), null != v && (v[0] = A[0]), a = 1) : a = 0) : a = 0;
+          } else {
+            if (10 > c) {
+              p = 7;
+              break;
+            }
+
+            h = t;
+            null == a || 10 > c || !Jc(a, b + 3, c - 3) ? a = 0 : (r = a[b + 0] | a[b + 1] << 8 | a[b + 2] << 16, v = (a[b + 7] << 8 | a[b + 6]) & 16383, a = (a[b + 9] << 8 | a[b + 8]) & 16383, r & 1 || 3 < (r >> 1 & 7) || !(r >> 4 & 1) || r >> 5 >= q.Ja || !v || !a ? a = 0 : (g && (g[0] = v), h && (h[0] = a), a = 1));
+          }
+
+          if (!a) return 3;
+          g = g[0];
+          t = t[0];
+          if (n && (l[0] != g || m[0] != t)) return 3;
+          null != k && (k[0] = q, k.offset = b - k.w, x(4294967286 > b - k.w), x(k.offset == k.ha - c));
+          break;
+        }
+
+        return 0 == p || 7 == p && n && null == k ? (null != f && (f[0] |= null != q.na && 0 < q.na.length), null != d && (d[0] = g), null != e && (e[0] = t), 0) : p;
+      }
+
+      function hc(a, b, c) {
+        var d = b.width,
+            e = b.height,
+            f = 0,
+            g = 0,
+            h = d,
+            k = e;
+        b.Da = null != a && 0 < a.Da;
+        if (b.Da && (h = a.cd, k = a.bd, f = a.v, g = a.j, 11 > c || (f &= -2, g &= -2), 0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)) return 0;
+        b.v = f;
+        b.j = g;
+        b.va = f + h;
+        b.o = g + k;
+        b.U = h;
+        b.T = k;
+        b.da = null != a && 0 < a.da;
+
+        if (b.da) {
+          c = [a.ib];
+          f = [a.hb];
+          if (!bc(h, k, c, f)) return 0;
+          b.ib = c[0];
+          b.hb = f[0];
+        }
+
+        b.ob = null != a && a.ob;
+        b.Kb = null == a || !a.Sd;
+        b.da && (b.ob = b.ib < 3 * d / 4 && b.hb < 3 * e / 4, b.Kb = 0);
+        return 1;
+      }
+
+      function Bd(a) {
+        if (null == a) return 2;
+
+        if (11 > a.S) {
+          var b = a.f.RGBA;
+          b.fb += (a.height - 1) * b.A;
+          b.A = -b.A;
+        } else b = a.f.kb, a = a.height, b.O += (a - 1) * b.fa, b.fa = -b.fa, b.N += (a - 1 >> 1) * b.Ab, b.Ab = -b.Ab, b.W += (a - 1 >> 1) * b.Db, b.Db = -b.Db, null != b.F && (b.J += (a - 1) * b.lb, b.lb = -b.lb);
+
+        return 0;
+      }
+
+      function Cd(a, b, c, d) {
+        if (null == d || 0 >= a || 0 >= b) return 2;
+
+        if (null != c) {
+          if (c.Da) {
+            var e = c.cd,
+                f = c.bd,
+                g = c.v & -2,
+                h = c.j & -2;
+            if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b) return 2;
+            a = e;
+            b = f;
+          }
+
+          if (c.da) {
+            e = [c.ib];
+            f = [c.hb];
+            if (!bc(a, b, e, f)) return 2;
+            a = e[0];
+            b = f[0];
+          }
+        }
+
+        d.width = a;
+        d.height = b;
+
+        a: {
+          var k = d.width;
+          var l = d.height;
+          a = d.S;
+          if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;else {
+            if (0 >= d.Rd && null == d.sd) {
+              var g = f = e = b = 0,
+                  h = k * Dd[a],
+                  m = h * l;
+              11 > a || (b = (k + 1) / 2, f = (l + 1) / 2 * b, 12 == a && (e = k, g = e * l));
+              l = V(m + 2 * f + g);
+
+              if (null == l) {
+                a = 1;
+                break a;
+              }
+
+              d.sd = l;
+              11 > a ? (k = d.f.RGBA, k.eb = l, k.fb = 0, k.A = h, k.size = m) : (k = d.f.kb, k.y = l, k.O = 0, k.fa = h, k.Fd = m, k.f = l, k.N = 0 + m, k.Ab = b, k.Cd = f, k.ea = l, k.W = 0 + m + f, k.Db = b, k.Ed = f, 12 == a && (k.F = l, k.J = 0 + m + 2 * f), k.Tc = g, k.lb = e);
+            }
+
+            b = 1;
+            e = d.S;
+            f = d.width;
+            g = d.height;
+            if (e >= Ca && 13 > e) {
+              if (11 > e) a = d.f.RGBA, h = Math.abs(a.A), b &= h * (g - 1) + f <= a.size, b &= h >= f * Dd[e], b &= null != a.eb;else {
+                a = d.f.kb;
+                h = (f + 1) / 2;
+                m = (g + 1) / 2;
+                k = Math.abs(a.fa);
+                var l = Math.abs(a.Ab),
+                    n = Math.abs(a.Db),
+                    r = Math.abs(a.lb),
+                    q = r * (g - 1) + f;
+                b &= k * (g - 1) + f <= a.Fd;
+                b &= l * (m - 1) + h <= a.Cd;
+                b &= n * (m - 1) + h <= a.Ed;
+                b = b & k >= f & l >= h & n >= h;
+                b &= null != a.y;
+                b &= null != a.f;
+                b &= null != a.ea;
+                12 == e && (b &= r >= f, b &= q <= a.Tc, b &= null != a.F);
+              }
+            } else b = 0;
+            a = b ? 0 : 2;
+          }
+        }
+
+        if (0 != a) return a;
+        null != c && c.fd && (a = Bd(d));
+        return a;
+      }
+
+      var xb = 64,
+          Hd = [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],
+          Gd = 24,
+          ob = 32,
+          Xb = 8,
+          Id = [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];
+      X("Predictor0", "PredictorAdd0");
+
+      self.Predictor0 = function () {
+        return 4278190080;
+      };
+
+      self.Predictor1 = function (a) {
+        return a;
+      };
+
+      self.Predictor2 = function (a, b, c) {
+        return b[c + 0];
+      };
+
+      self.Predictor3 = function (a, b, c) {
+        return b[c + 1];
+      };
+
+      self.Predictor4 = function (a, b, c) {
+        return b[c - 1];
+      };
+
+      self.Predictor5 = function (a, b, c) {
+        return aa(aa(a, b[c + 1]), b[c + 0]);
+      };
+
+      self.Predictor6 = function (a, b, c) {
+        return aa(a, b[c - 1]);
+      };
+
+      self.Predictor7 = function (a, b, c) {
+        return aa(a, b[c + 0]);
+      };
+
+      self.Predictor8 = function (a, b, c) {
+        return aa(b[c - 1], b[c + 0]);
+      };
+
+      self.Predictor9 = function (a, b, c) {
+        return aa(b[c + 0], b[c + 1]);
+      };
+
+      self.Predictor10 = function (a, b, c) {
+        return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));
+      };
+
+      self.Predictor11 = function (a, b, c) {
+        var d = b[c + 0];
+        b = b[c - 1];
+        return 0 >= Ia(d >> 24 & 255, a >> 24 & 255, b >> 24 & 255) + Ia(d >> 16 & 255, a >> 16 & 255, b >> 16 & 255) + Ia(d >> 8 & 255, a >> 8 & 255, b >> 8 & 255) + Ia(d & 255, a & 255, b & 255) ? d : a;
+      };
+
+      self.Predictor12 = function (a, b, c) {
+        var d = b[c + 0];
+        b = b[c - 1];
+        return (sa((a >> 24 & 255) + (d >> 24 & 255) - (b >> 24 & 255)) << 24 | sa((a >> 16 & 255) + (d >> 16 & 255) - (b >> 16 & 255)) << 16 | sa((a >> 8 & 255) + (d >> 8 & 255) - (b >> 8 & 255)) << 8 | sa((a & 255) + (d & 255) - (b & 255))) >>> 0;
+      };
+
+      self.Predictor13 = function (a, b, c) {
+        var d = b[c - 1];
+        a = aa(a, b[c + 0]);
+        return (eb(a >> 24 & 255, d >> 24 & 255) << 24 | eb(a >> 16 & 255, d >> 16 & 255) << 16 | eb(a >> 8 & 255, d >> 8 & 255) << 8 | eb(a >> 0 & 255, d >> 0 & 255)) >>> 0;
+      };
+
+      var ee = self.PredictorAdd0;
+      self.PredictorAdd1 = cc;
+      X("Predictor2", "PredictorAdd2");
+      X("Predictor3", "PredictorAdd3");
+      X("Predictor4", "PredictorAdd4");
+      X("Predictor5", "PredictorAdd5");
+      X("Predictor6", "PredictorAdd6");
+      X("Predictor7", "PredictorAdd7");
+      X("Predictor8", "PredictorAdd8");
+      X("Predictor9", "PredictorAdd9");
+      X("Predictor10", "PredictorAdd10");
+      X("Predictor11", "PredictorAdd11");
+      X("Predictor12", "PredictorAdd12");
+      X("Predictor13", "PredictorAdd13");
+      var fe = self.PredictorAdd2;
+      ec("ColorIndexInverseTransform", "MapARGB", "32b", function (a) {
+        return a >> 8 & 255;
+      }, function (a) {
+        return a;
+      });
+      ec("VP8LColorIndexInverseTransformAlpha", "MapAlpha", "8b", function (a) {
+        return a;
+      }, function (a) {
+        return a >> 8 & 255;
+      });
+      var rc = self.ColorIndexInverseTransform,
+          ke = self.MapARGB,
+          he = self.VP8LColorIndexInverseTransformAlpha,
+          le = self.MapAlpha,
+          pc,
+          qc = self.VP8LPredictorsAdd = [];
+      qc.length = 16;
+      (self.VP8LPredictors = []).length = 16;
+      (self.VP8LPredictorsAdd_C = []).length = 16;
+      (self.VP8LPredictors_C = []).length = 16;
+      var Fb,
+          sc,
+          Gb,
+          Hb,
+          xc,
+          uc,
+          bd = V(511),
+          cd = V(2041),
+          dd = V(225),
+          ed = V(767),
+          ad = 0,
+          Qb = cd,
+          mb = dd,
+          R = ed,
+          U = bd,
+          Ca = 0,
+          Ua = 1,
+          tc = 2,
+          Va = 3,
+          ya = 4,
+          Db = 5,
+          wc = 6,
+          zb = 7,
+          Ab = 8,
+          Ja = 9,
+          Bb = 10,
+          pe = [2, 3, 7],
+          oe = [3, 3, 11],
+          Dc = [280, 256, 256, 256, 40],
+          qe = [0, 1, 1, 1, 0],
+          ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
+          de = [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],
+          me = [2954, 2956, 2958, 2962, 2970, 2986, 3018, 3082, 3212, 3468, 3980, 5004],
+          ie = 8,
+          Lb = [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],
+          Mb = [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],
+          oa = null,
+          He = [[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]],
+          Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],
+          Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],
+          Fe = [[[[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]]]],
+          Ke = [[[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]]],
+          Ee = [[[[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]]]],
+          Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],
+          Nc,
+          Y = [],
+          W = [],
+          ka = [],
+          Za,
+          fd,
+          Nb,
+          pa,
+          Ob,
+          Xc,
+          Tc,
+          Yc,
+          Uc,
+          Zc,
+          Vc,
+          $c,
+          Wc,
+          Rc,
+          Pc,
+          Sc,
+          Qc,
+          re = 1,
+          Cc = 2,
+          ia = [],
+          za,
+          vc,
+          fc,
+          Fc,
+          P = [];
+      va("UpsampleRgbLinePair", Ga, 3);
+      va("UpsampleBgrLinePair", Tb, 3);
+      va("UpsampleRgbaLinePair", wd, 4);
+      va("UpsampleBgraLinePair", vd, 4);
+      va("UpsampleArgbLinePair", ud, 4);
+      va("UpsampleRgba4444LinePair", td, 2);
+      va("UpsampleRgb565LinePair", sd, 2);
+      var Mf = self.UpsampleRgbLinePair,
+          Nf = self.UpsampleBgrLinePair,
+          nd = self.UpsampleRgbaLinePair,
+          od = self.UpsampleBgraLinePair,
+          pd = self.UpsampleArgbLinePair,
+          qd = self.UpsampleRgba4444LinePair,
+          Of = self.UpsampleRgb565LinePair,
+          Wa = 16,
+          Ba = 1 << Wa - 1,
+          ta = -227,
+          Eb = 482,
+          rd = 6,
+          Pf = (256 << rd) - 1,
+          jc = 0,
+          Yd = V(256),
+          ae = V(256),
+          $d = V(256),
+          Zd = V(256),
+          be = V(Eb - ta),
+          ce = V(Eb - ta);
+      la("YuvToRgbRow", Ga, 3);
+      la("YuvToBgrRow", Tb, 3);
+      la("YuvToRgbaRow", wd, 4);
+      la("YuvToBgraRow", vd, 4);
+      la("YuvToArgbRow", ud, 4);
+      la("YuvToRgba4444Row", td, 2);
+      la("YuvToRgb565Row", sd, 2);
+      var zd = [0, 4, 8, 12, 128, 132, 136, 140, 256, 260, 264, 268, 384, 388, 392, 396],
+          Ya = [0, 2, 8],
+          Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],
+          Ne = 1;
+
+      this.WebPDecodeRGBA = function (a, b, c, d, e) {
+        var f = Ua;
+        var g = new Cf(),
+            h = new Cb();
+        g.ba = h;
+        h.S = f;
+        h.width = [h.width];
+        h.height = [h.height];
+        var k = h.width;
+        var l = h.height,
+            m = new Td();
+        if (null == m || null == a) var n = 2;else x(null != m), n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null);
+        0 != n ? k = 0 : (null != k && (k[0] = m.width[0]), null != l && (l[0] = m.height[0]), k = 1);
+
+        if (k) {
+          h.width = h.width[0];
+          h.height = h.height[0];
+          null != d && (d[0] = h.width);
+          null != e && (e[0] = h.height);
+
+          b: {
+            d = new Oa();
+            e = new md();
+            e.data = a;
+            e.w = b;
+            e.ha = c;
+            e.kd = 1;
+            b = [0];
+            x(null != e);
+            a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);
+            (0 == a || 7 == a) && b[0] && (a = 4);
+            b = a;
+
+            if (0 == b) {
+              x(null != g);
+              d.data = e.data;
+              d.w = e.w + e.offset;
+              d.ha = e.ha - e.offset;
+              d.put = kc;
+              d.ac = gc;
+              d.bc = lc;
+              d.ma = g;
+
+              if (e.xa) {
+                a = Bc();
+
+                if (null == a) {
+                  g = 1;
+                  break b;
+                }
+
+                if (te(a, d)) {
+                  b = Cd(d.width, d.height, g.Oa, g.ba);
+
+                  if (d = 0 == b) {
+                    c: {
+                      d = a;
+
+                      d: for (;;) {
+                        if (null == d) {
+                          d = 0;
+                          break c;
+                        }
+
+                        x(null != d.s.yc);
+                        x(null != d.s.Ya);
+                        x(0 < d.s.Wb);
+                        c = d.l;
+                        x(null != c);
+                        e = c.ma;
+                        x(null != e);
+
+                        if (0 != d.xb) {
+                          d.ca = e.ba;
+                          d.tb = e.tb;
+                          x(null != d.ca);
+
+                          if (!hc(e.Oa, c, Va)) {
+                            d.a = 2;
+                            break d;
+                          }
+
+                          if (!Ec(d, c.width)) break d;
+                          if (c.da) break d;
+                          (c.da || hb(d.ca.S)) && Aa();
+                          11 > d.ca.S || (alert("todo:WebPInitConvertARGBToYUV"), null != d.ca.f.kb.F && Aa());
+
+                          if (d.Pb && 0 < d.s.ua && null == d.s.vb.X && !Zb(d.s.vb, d.s.Wa.Xa)) {
+                            d.a = 1;
+                            break d;
+                          }
+
+                          d.xb = 0;
+                        }
+
+                        if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;
+                        e.Dc = d.Ma;
+                        d = 1;
+                        break c;
+                      }
+
+                      x(0 != d.a);
+                      d = 0;
+                    }
+
+                    d = !d;
+                  }
+
+                  d && (b = a.a);
+                } else b = a.a;
+              } else {
+                a = new Ce();
+
+                if (null == a) {
+                  g = 1;
+                  break b;
+                }
+
+                a.Fa = e.na;
+                a.P = e.P;
+                a.qc = e.Sa;
+
+                if (Kc(a, d)) {
+                  if (b = Cd(d.width, d.height, g.Oa, g.ba), 0 == b) {
+                    a.Aa = 0;
+                    c = g.Oa;
+                    e = a;
+                    x(null != e);
+
+                    if (null != c) {
+                      k = c.Md;
+                      k = 0 > k ? 0 : 100 < k ? 255 : 255 * k / 100;
+
+                      if (0 < k) {
+                        for (l = m = 0; 4 > l; ++l) {
+                          n = e.pb[l], 12 > n.lc && (n.ia = k * Qf[0 > n.lc ? 0 : n.lc] >> 3), m |= n.ia;
+                        }
+
+                        m && (alert("todo:VP8InitRandom"), e.ia = 1);
+                      }
+
+                      e.Ga = c.Id;
+                      100 < e.Ga ? e.Ga = 100 : 0 > e.Ga && (e.Ga = 0);
+                    }
+
+                    Me(a, d) || (b = a.a);
+                  }
+                } else b = a.a;
+              }
+
+              0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));
+            }
+
+            g = b;
+          }
+
+          f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;
+        } else f = null;
+
+        return f;
+      };
+
+      var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];
+    };
+
+    new _WebPDecoder();
+    /** @license
+     * Copyright (c) 2017 Dominik Homberger
+    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+    https://webpjs.appspot.com
+    WebPRiffParser dominikhlbg@gmail.com
+    */
+
+    function memcmp(data, data_off, str, size) {
+      for (var i = 0; i < size; i++) {
+        if (data[data_off + i] != str.charCodeAt(i)) return true;
+      }
+
+      return false;
+    }
+
+    function GetTag(data, data_off) {
+      var str = "";
+
+      for (var i = 0; i < 4; i++) {
+        str += String.fromCharCode(data[data_off++]);
+      }
+
+      return str;
+    }
+
+    function GetLE16(data, data_off) {
+      return data[data_off + 0] << 0 | data[data_off + 1] << 8;
+    }
+
+    function GetLE24(data, data_off) {
+      return (data[data_off + 0] << 0 | data[data_off + 1] << 8 | data[data_off + 2] << 16) >>> 0;
+    }
+
+    function GetLE32(data, data_off) {
+      return (data[data_off + 0] << 0 | data[data_off + 1] << 8 | data[data_off + 2] << 16 | data[data_off + 3] << 24) >>> 0;
+    }
+
+    function WebPRiffParser(src, src_off) {
+      var imagearray = {};
+      var i = 0;
+      var alpha_chunk = false;
+      var alpha_size = 0;
+      var alpha_offset = 0;
+      imagearray["frames"] = [];
+      if (memcmp(src, src_off, "RIFF", 4)) return;
+      src_off += 4;
+      var riff_size = GetLE32(src, src_off) + 8;
+      src_off += 8;
+
+      while (src_off < src.length) {
+        var fourcc = GetTag(src, src_off);
+        src_off += 4;
+        var payload_size = GetLE32(src, src_off);
+        src_off += 4;
+        var payload_size_padded = payload_size + (payload_size & 1);
+
+        switch (fourcc) {
+          case "VP8 ":
+          case "VP8L":
+            if (typeof imagearray["frames"][i] === "undefined") imagearray["frames"][i] = {};
+            var obj = imagearray["frames"][i];
+            var height = [0];
+            var width = [0];
+            obj["src_off"] = alpha_chunk ? alpha_offset : src_off - 8;
+            obj["src_size"] = alpha_size + payload_size + 8; //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);
+            //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};
+
+            i++;
+
+            if (alpha_chunk) {
+              alpha_chunk = false;
+              alpha_size = 0;
+              alpha_offset = 0;
+            }
+
+            break;
+
+          case "VP8X":
+            var obj = imagearray["header"] = {};
+            var feature_flags = obj["feature_flags"] = src[src_off];
+            var src_off_ = src_off + 4;
+            var canvas_width = obj["canvas_width"] = 1 + GetLE24(src, src_off_);
+            src_off_ += 3;
+            var canvas_height = obj["canvas_height"] = 1 + GetLE24(src, src_off_);
+            src_off_ += 3;
+            break;
+
+          case "ALPH":
+            alpha_chunk = true;
+            alpha_size = payload_size_padded + 8;
+            alpha_offset = src_off - 8;
+            break;
+
+          case "ANIM":
+            var obj = imagearray["header"];
+            var bgcolor = obj["bgcolor"] = GetLE32(src, src_off);
+            src_off_ = src_off + 4;
+            var loop_count = obj["loop_count"] = GetLE16(src, src_off_);
+            src_off_ += 2;
+            break;
+
+          case "ANMF":
+            var offset_x = 0,
+                offset_y = 0,
+                width = 0,
+                height = 0,
+                duration = 0,
+                blend = 0,
+                dispose = 0,
+                temp = 0;
+            var obj = imagearray["frames"][i] = {};
+            obj["offset_x"] = offset_x = 2 * GetLE24(src, src_off);
+            src_off += 3;
+            obj["offset_y"] = offset_y = 2 * GetLE24(src, src_off);
+            src_off += 3;
+            obj["width"] = width = 1 + GetLE24(src, src_off);
+            src_off += 3;
+            obj["height"] = height = 1 + GetLE24(src, src_off);
+            src_off += 3;
+            obj["duration"] = duration = GetLE24(src, src_off);
+            src_off += 3;
+            temp = src[src_off++];
+            obj["dispose"] = dispose = temp & 1;
+            obj["blend"] = blend = temp >> 1 & 1;
+            break;
+        }
+
+        if (fourcc != "ANMF") src_off += payload_size_padded;
+      }
+
+      return imagearray;
+    }
+
+    var height = [0];
+    var width = [0];
+    var pixels = [];
+    var webpdecoder = new _WebPDecoder();
+    var response = imageData;
+    var imagearray = WebPRiffParser(response, 0);
+    imagearray["response"] = response;
+    imagearray["rgbaoutput"] = true;
+    imagearray["dataurl"] = false;
+    var header = imagearray["header"] ? imagearray["header"] : null;
+    var frames = imagearray["frames"] ? imagearray["frames"] : null;
+
+    if (header) {
+      header["loop_counter"] = header["loop_count"];
+      height = [header["canvas_height"]];
+      width = [header["canvas_width"]];
+
+      for (var f = 0; f < frames.length; f++) {
+        if (frames[f]["blend"] == 0) {
+          break;
+        }
+      }
+    }
+
+    var frame = frames[0];
+    var rgba = webpdecoder.WebPDecodeRGBA(response, frame["src_off"], frame["src_size"], width, height);
+    frame["rgba"] = rgba;
+    frame["imgwidth"] = width[0];
+    frame["imgheight"] = height[0];
+
+    for (var i = 0; i < width[0] * height[0] * 4; i++) {
+      pixels[i] = rgba[i];
+    }
+
+    this.width = width;
+    this.height = height;
+    this.data = pixels;
+    return this;
+  }
+
+  WebPDecoder.prototype.getData = function () {
+    return this.data;
+  };
+
+  /**
+   * @license
+   * Copyright (c) 2019 Aras Abbasi
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * jsPDF webp Support PlugIn
+   *
+   * @name webp_support
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    jsPDFAPI.processWEBP = function (imageData, index, alias, compression) {
+      var reader = new WebPDecoder(imageData, false);
+      var width = reader.width,
+          height = reader.height;
+      var qu = 100;
+      var pixels = reader.getData();
+      var rawImageData = {
+        data: pixels,
+        width: width,
+        height: height
+      };
+      var encoder = new JPEGEncoder(qu);
+      var data = encoder.encode(rawImageData, qu);
+      return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);
+    };
+  })(jsPDF.API);
+
+  /**
+   * @license
+   *
+   * Copyright (c) 2021 Antti Palola, https://github.com/Pantura
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining
+   * a copy of this software and associated documentation files (the
+   * "Software"), to deal in the Software without restriction, including
+   * without limitation the rights to use, copy, modify, merge, publish,
+   * distribute, sublicense, and/or sell copies of the Software, and to
+   * permit persons to whom the Software is furnished to do so, subject to
+   * the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be
+   * included in all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   * ====================================================================
+   */
+  /**
+   * jsPDF RGBA array PlugIn
+   * @name rgba_support
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+    /**
+     * @name processRGBA
+     * @function
+     *
+     * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].
+     * RGBA array data can be obtained from DOM canvas getImageData.
+     * @ignore
+     */
+
+    jsPDFAPI.processRGBA = function (imageData, index, alias) {
+
+      var imagePixels = imageData.data;
+      var length = imagePixels.length; // jsPDF takes alpha data separately so extract that.
+
+      var rgbOut = new Uint8Array(length / 4 * 3);
+      var alphaOut = new Uint8Array(length / 4);
+      var outIndex = 0;
+      var alphaIndex = 0;
+
+      for (var i = 0; i < length; i += 4) {
+        var r = imagePixels[i];
+        var g = imagePixels[i + 1];
+        var b = imagePixels[i + 2];
+        var alpha = imagePixels[i + 3];
+        rgbOut[outIndex++] = r;
+        rgbOut[outIndex++] = g;
+        rgbOut[outIndex++] = b;
+        alphaOut[alphaIndex++] = alpha;
+      }
+
+      var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);
+
+      var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);
+
+      return {
+        alpha: alphaData,
+        data: rgbData,
+        index: index,
+        alias: alias,
+        colorSpace: "DeviceRGB",
+        bitsPerComponent: 8,
+        width: imageData.width,
+        height: imageData.height
+      };
+    };
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * jsPDF setLanguage Plugin
+   *
+   * @name setLanguage
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+    /**
+     * Add Language Tag to the generated PDF
+     *
+     * @name setLanguage
+     * @function
+     * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').
+     * @returns {jsPDF}
+     * @example
+     * var doc = new jsPDF()
+     * doc.text(10, 10, 'This is a test')
+     * doc.setLanguage("en-US")
+     * doc.save('english.pdf')
+     */
+
+    jsPDFAPI.setLanguage = function (langCode) {
+
+      var langCodes = {
+        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"
+      };
+
+      if (this.internal.languageSettings === undefined) {
+        this.internal.languageSettings = {};
+        this.internal.languageSettings.isSubscribed = false;
+      }
+
+      if (langCodes[langCode] !== undefined) {
+        this.internal.languageSettings.languageCode = langCode;
+
+        if (this.internal.languageSettings.isSubscribed === false) {
+          this.internal.events.subscribe("putCatalog", function () {
+            this.internal.write("/Lang (" + this.internal.languageSettings.languageCode + ")");
+          });
+          this.internal.languageSettings.isSubscribed = true;
+        }
+      }
+
+      return this;
+    };
+  })(jsPDF.API);
+
+  /**
+   * jsPDF split_text_to_size plugin
+   *
+   * @name split_text_to_size
+   * @module
+   */
+
+  (function (API) {
+    /**
+     * Returns an array of length matching length of the 'word' string, with each
+     * cell occupied by the width of the char in that position.
+     *
+     * @name getCharWidthsArray
+     * @function
+     * @param {string} text
+     * @param {Object} options
+     * @returns {Array}
+     */
+
+    var getCharWidthsArray = API.getCharWidthsArray = function (text, options) {
+      options = options || {};
+      var activeFont = options.font || this.internal.getFont();
+      var fontSize = options.fontSize || this.internal.getFontSize();
+      var charSpace = options.charSpace || this.internal.getCharSpace();
+      var widths = options.widths ? options.widths : activeFont.metadata.Unicode.widths;
+      var widthsFractionOf = widths.fof ? widths.fof : 1;
+      var kerning = options.kerning ? options.kerning : activeFont.metadata.Unicode.kerning;
+      var kerningFractionOf = kerning.fof ? kerning.fof : 1;
+      var doKerning = options.doKerning === false ? false : true;
+      var kerningValue = 0;
+      var i;
+      var length = text.length;
+      var char_code;
+      var prior_char_code = 0; //for kerning
+
+      var default_char_width = widths[0] || widthsFractionOf;
+      var output = [];
+
+      for (i = 0; i < length; i++) {
+        char_code = text.charCodeAt(i);
+
+        if (typeof activeFont.metadata.widthOfString === "function") {
+          output.push((activeFont.metadata.widthOfGlyph(activeFont.metadata.characterToGlyph(char_code)) + charSpace * (1000 / fontSize) || 0) / 1000);
+        } else {
+          if (doKerning && _typeof(kerning[char_code]) === "object" && !isNaN(parseInt(kerning[char_code][prior_char_code], 10))) {
+            kerningValue = kerning[char_code][prior_char_code] / kerningFractionOf;
+          } else {
+            kerningValue = 0;
+          }
+
+          output.push((widths[char_code] || default_char_width) / widthsFractionOf + kerningValue);
+        }
+
+        prior_char_code = char_code;
+      }
+
+      return output;
+    };
+    /**
+     * Returns a widths of string in a given font, if the font size is set as 1 point.
+     *
+     * In other words, this is "proportional" value. For 1 unit of font size, the length
+     * of the string will be that much.
+     *
+     * Multiply by font size to get actual width in *points*
+     * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.
+     *
+     * @name getStringUnitWidth
+     * @public
+     * @function
+     * @param {string} text
+     * @param {string} options
+     * @returns {number} result
+     */
+
+
+    var getStringUnitWidth = API.getStringUnitWidth = function (text, options) {
+      options = options || {};
+      var fontSize = options.fontSize || this.internal.getFontSize();
+      var font = options.font || this.internal.getFont();
+      var charSpace = options.charSpace || this.internal.getCharSpace();
+      var result = 0;
+
+      if (API.processArabic) {
+        text = API.processArabic(text);
+      }
+
+      if (typeof font.metadata.widthOfString === "function") {
+        result = font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;
+      } else {
+        result = getCharWidthsArray.apply(this, arguments).reduce(function (pv, cv) {
+          return pv + cv;
+        }, 0);
+      }
+
+      return result;
+    };
+    /**
+    returns array of lines
+    */
+
+
+    var splitLongWord = function splitLongWord(word, widths_array, firstLineMaxLen, maxLen) {
+      var answer = []; // 1st, chop off the piece that can fit on the hanging line.
+
+      var i = 0,
+          l = word.length,
+          workingLen = 0;
+
+      while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {
+        workingLen += widths_array[i];
+        i++;
+      } // this is first line.
+
+
+      answer.push(word.slice(0, i)); // 2nd. Split the rest into maxLen pieces.
+
+      var startOfLine = i;
+      workingLen = 0;
+
+      while (i !== l) {
+        if (workingLen + widths_array[i] > maxLen) {
+          answer.push(word.slice(startOfLine, i));
+          workingLen = 0;
+          startOfLine = i;
+        }
+
+        workingLen += widths_array[i];
+        i++;
+      }
+
+      if (startOfLine !== i) {
+        answer.push(word.slice(startOfLine, i));
+      }
+
+      return answer;
+    }; // Note, all sizing inputs for this function must be in "font measurement units"
+    // By default, for PDF, it's "point".
+
+
+    var splitParagraphIntoLines = function splitParagraphIntoLines(text, maxlen, options) {
+      // at this time works only on Western scripts, ones with space char
+      // separating the words. Feel free to expand.
+      if (!options) {
+        options = {};
+      }
+
+      var line = [],
+          lines = [line],
+          line_length = options.textIndent || 0,
+          separator_length = 0,
+          current_word_length = 0,
+          word,
+          widths_array,
+          words = text.split(" "),
+          spaceCharWidth = getCharWidthsArray.apply(this, [" ", options])[0],
+          i,
+          l,
+          tmp,
+          lineIndent;
+
+      if (options.lineIndent === -1) {
+        lineIndent = words[0].length + 2;
+      } else {
+        lineIndent = options.lineIndent || 0;
+      }
+
+      if (lineIndent) {
+        var pad = Array(lineIndent).join(" "),
+            wrds = [];
+        words.map(function (wrd) {
+          wrd = wrd.split(/\s*\n/);
+
+          if (wrd.length > 1) {
+            wrds = wrds.concat(wrd.map(function (wrd, idx) {
+              return (idx && wrd.length ? "\n" : "") + wrd;
+            }));
+          } else {
+            wrds.push(wrd[0]);
+          }
+        });
+        words = wrds;
+        lineIndent = getStringUnitWidth.apply(this, [pad, options]);
+      }
+
+      for (i = 0, l = words.length; i < l; i++) {
+        var force = 0;
+        word = words[i];
+
+        if (lineIndent && word[0] == "\n") {
+          word = word.substr(1);
+          force = 1;
+        }
+
+        widths_array = getCharWidthsArray.apply(this, [word, options]);
+        current_word_length = widths_array.reduce(function (pv, cv) {
+          return pv + cv;
+        }, 0);
+
+        if (line_length + separator_length + current_word_length > maxlen || force) {
+          if (current_word_length > maxlen) {
+            // this happens when you have space-less long URLs for example.
+            // we just chop these to size. We do NOT insert hiphens
+            tmp = splitLongWord.apply(this, [word, widths_array, maxlen - (line_length + separator_length), maxlen]); // first line we add to existing line object
+
+            line.push(tmp.shift()); // it's ok to have extra space indicator there
+            // last line we make into new line object
+
+            line = [tmp.pop()]; // lines in the middle we apped to lines object as whole lines
+
+            while (tmp.length) {
+              lines.push([tmp.shift()]); // single fragment occupies whole line
+            }
+
+            current_word_length = widths_array.slice(word.length - (line[0] ? line[0].length : 0)).reduce(function (pv, cv) {
+              return pv + cv;
+            }, 0);
+          } else {
+            // just put it on a new line
+            line = [word];
+          } // now we attach new line to lines
+
+
+          lines.push(line);
+          line_length = current_word_length + lineIndent;
+          separator_length = spaceCharWidth;
+        } else {
+          line.push(word);
+          line_length += separator_length + current_word_length;
+          separator_length = spaceCharWidth;
+        }
+      }
+
+      var postProcess;
+
+      if (lineIndent) {
+        postProcess = function postProcess(ln, idx) {
+          return (idx ? pad : "") + ln.join(" ");
+        };
+      } else {
+        postProcess = function postProcess(ln) {
+          return ln.join(" ");
+        };
+      }
+
+      return lines.map(postProcess);
+    };
+    /**
+     * Splits a given string into an array of strings. Uses 'size' value
+     * (in measurement units declared as default for the jsPDF instance)
+     * and the font's "widths" and "Kerning" tables, where available, to
+     * determine display length of a given string for a given font.
+     *
+     * We use character's 100% of unit size (height) as width when Width
+     * table or other default width is not available.
+     *
+     * @name splitTextToSize
+     * @public
+     * @function
+     * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.
+     * @param {number} size Nominal number, measured in units default to this instance of jsPDF.
+     * @param {Object} options Optional flags needed for chopper to do the right thing.
+     * @returns {Array} array Array with strings chopped to size.
+     */
+
+
+    API.splitTextToSize = function (text, maxlen, options) {
+
+      options = options || {};
+
+      var fsize = options.fontSize || this.internal.getFontSize(),
+          newOptions = function (options) {
+        var widths = {
+          0: 1
+        },
+            kerning = {};
+
+        if (!options.widths || !options.kerning) {
+          var f = this.internal.getFont(options.fontName, options.fontStyle),
+              encoding = "Unicode"; // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE
+          // Actual JavaScript-native String's 16bit char codes used.
+          // no multi-byte logic here
+
+          if (f.metadata[encoding]) {
+            return {
+              widths: f.metadata[encoding].widths || widths,
+              kerning: f.metadata[encoding].kerning || kerning
+            };
+          } else {
+            return {
+              font: f.metadata,
+              fontSize: this.internal.getFontSize(),
+              charSpace: this.internal.getCharSpace()
+            };
+          }
+        } else {
+          return {
+            widths: options.widths,
+            kerning: options.kerning
+          };
+        }
+      }.call(this, options); // first we split on end-of-line chars
+
+
+      var paragraphs;
+
+      if (Array.isArray(text)) {
+        paragraphs = text;
+      } else {
+        paragraphs = String(text).split(/\r?\n/);
+      } // now we convert size (max length of line) into "font size units"
+      // at present time, the "font size unit" is always 'point'
+      // 'proportional' means, "in proportion to font size"
+
+
+      var fontUnit_maxLen = 1.0 * this.internal.scaleFactor * maxlen / fsize; // at this time, fsize is always in "points" regardless of the default measurement unit of the doc.
+      // this may change in the future?
+      // until then, proportional_maxlen is likely to be in 'points'
+      // If first line is to be indented (shorter or longer) than maxLen
+      // we indicate that by using CSS-style "text-indent" option.
+      // here it's in font units too (which is likely 'points')
+      // it can be negative (which makes the first line longer than maxLen)
+
+      newOptions.textIndent = options.textIndent ? options.textIndent * 1.0 * this.internal.scaleFactor / fsize : 0;
+      newOptions.lineIndent = options.lineIndent;
+      var i,
+          l,
+          output = [];
+
+      for (i = 0, l = paragraphs.length; i < l; i++) {
+        output = output.concat(splitParagraphIntoLines.apply(this, [paragraphs[i], fontUnit_maxLen, newOptions]));
+      }
+
+      return output;
+    };
+  })(jsPDF.API);
+
+  /**
+   * This file adds the standard font metrics to jsPDF.
+   *
+   * Font metrics data is reprocessed derivative of contents of
+   * "Font Metrics for PDF Core 14 Fonts" package, which exhibits the following copyright and license:
+   *
+   * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.
+   *
+   * This file and the 14 PostScript(R) AFM files it accompanies may be used,
+   * copied, and distributed for any purpose and without charge, with or without
+   * modification, provided that all copyright notices are retained; that the AFM
+   * files are not distributed without this file; that all modifications to this
+   * file or any of the AFM files are prominently noted in the modified file(s);
+   * and that this paragraph is not modified. Adobe Systems has no responsibility
+   * or obligation to support the use of the AFM files.
+   *
+   * @name standard_fonts_metrics
+   * @module
+   */
+
+  (function (API) {
+
+    API.__fontmetrics__ = API.__fontmetrics__ || {};
+    var decoded = "0123456789abcdef",
+        encoded = "klmnopqrstuvwxyz",
+        mappingUncompress = {},
+        mappingCompress = {};
+
+    for (var i = 0; i < encoded.length; i++) {
+      mappingUncompress[encoded[i]] = decoded[i];
+      mappingCompress[decoded[i]] = encoded[i];
+    }
+
+    var hex = function hex(value) {
+      return "0x" + parseInt(value, 10).toString(16);
+    };
+
+    var compress = API.__fontmetrics__.compress = function (data) {
+      var vals = ["{"];
+      var value, keystring, valuestring, numberprefix;
+
+      for (var key in data) {
+        value = data[key];
+
+        if (!isNaN(parseInt(key, 10))) {
+          key = parseInt(key, 10);
+          keystring = hex(key).slice(2);
+          keystring = keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];
+        } else {
+          keystring = "'" + key + "'";
+        }
+
+        if (typeof value == "number") {
+          if (value < 0) {
+            valuestring = hex(value).slice(3);
+            numberprefix = "-";
+          } else {
+            valuestring = hex(value).slice(2);
+            numberprefix = "";
+          }
+
+          valuestring = numberprefix + valuestring.slice(0, -1) + mappingCompress[valuestring.slice(-1)];
+        } else {
+          if (_typeof(value) === "object") {
+            valuestring = compress(value);
+          } else {
+            throw new Error("Don't know what to do with value type " + _typeof(value) + ".");
+          }
+        }
+
+        vals.push(keystring + valuestring);
+      }
+
+      vals.push("}");
+      return vals.join("");
+    };
+    /**
+     * Uncompresses data compressed into custom, base16-like format.
+     *
+     * @public
+     * @function
+     * @param
+     * @returns {Type}
+     */
+
+
+    var uncompress = API.__fontmetrics__.uncompress = function (data) {
+      if (typeof data !== "string") {
+        throw new Error("Invalid argument passed to uncompress.");
+      }
+
+      var output = {},
+          sign = 1,
+          stringparts,
+          // undef. will be [] in string mode
+      activeobject = output,
+          parentchain = [],
+          parent_key_pair,
+          keyparts = "",
+          valueparts = "",
+          key,
+          // undef. will be Truthy when Key is resolved.
+      datalen = data.length - 1,
+          // stripping ending }
+      ch;
+
+      for (var i = 1; i < datalen; i += 1) {
+        // - { } ' are special.
+        ch = data[i];
+
+        if (ch == "'") {
+          if (stringparts) {
+            // end of string mode
+            key = stringparts.join("");
+            stringparts = undefined;
+          } else {
+            // start of string mode
+            stringparts = [];
+          }
+        } else if (stringparts) {
+          stringparts.push(ch);
+        } else if (ch == "{") {
+          // start of object
+          parentchain.push([activeobject, key]);
+          activeobject = {};
+          key = undefined;
+        } else if (ch == "}") {
+          // end of object
+          parent_key_pair = parentchain.pop();
+          parent_key_pair[0][parent_key_pair[1]] = activeobject;
+          key = undefined;
+          activeobject = parent_key_pair[0];
+        } else if (ch == "-") {
+          sign = -1;
+        } else {
+          // must be number
+          if (key === undefined) {
+            if (mappingUncompress.hasOwnProperty(ch)) {
+              keyparts += mappingUncompress[ch];
+              key = parseInt(keyparts, 16) * sign;
+              sign = +1;
+              keyparts = "";
+            } else {
+              keyparts += ch;
+            }
+          } else {
+            if (mappingUncompress.hasOwnProperty(ch)) {
+              valueparts += mappingUncompress[ch];
+              activeobject[key] = parseInt(valueparts, 16) * sign;
+              sign = +1;
+              key = undefined;
+              valueparts = "";
+            } else {
+              valueparts += ch;
+            }
+          }
+        }
+      }
+
+      return output;
+    }; // encoding = 'Unicode'
+    // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior
+    // Actual 16bit char codes used.
+    // no multi-byte logic here
+    // Unicode characters to WinAnsiEncoding:
+    // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}
+    // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.
+    // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly
+    // as well as give strings with some (supported by these fonts) Unicode characters and
+    // these will be mapped to win cp1252
+    // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting "Euro" glyph displayed in both cases.
+
+
+    var encodingBlock = {
+      codePages: ["WinAnsiEncoding"],
+      WinAnsiEncoding: uncompress("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")
+    };
+    var encodings = {
+      Unicode: {
+        Courier: encodingBlock,
+        "Courier-Bold": encodingBlock,
+        "Courier-BoldOblique": encodingBlock,
+        "Courier-Oblique": encodingBlock,
+        Helvetica: encodingBlock,
+        "Helvetica-Bold": encodingBlock,
+        "Helvetica-BoldOblique": encodingBlock,
+        "Helvetica-Oblique": encodingBlock,
+        "Times-Roman": encodingBlock,
+        "Times-Bold": encodingBlock,
+        "Times-BoldItalic": encodingBlock,
+        "Times-Italic": encodingBlock //	, 'Symbol'
+        //	, 'ZapfDingbats'
+
+      }
+    };
+    var fontMetrics = {
+      Unicode: {
+        // all sizing numbers are n/fontMetricsFractionOf = one font size unit
+        // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's
+        // width is 476/1000 or 47.6% of its height (regardless of font size)
+        // At this time this value applies to "widths" and "kerning" numbers.
+        // char code 0 represents "default" (average) width - use it for chars missing in this table.
+        // key 'fof' represents the "fontMetricsFractionOf" value
+        "Courier-Oblique": uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
+        "Times-BoldItalic": uncompress("{'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": uncompress("{'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: uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
+        "Courier-BoldOblique": uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
+        "Times-Bold": uncompress("{'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: uncompress("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),
+        Helvetica: uncompress("{'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": uncompress("{'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: uncompress("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),
+        "Courier-Bold": uncompress("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),
+        "Times-Italic": uncompress("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w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ru17su5tu}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": uncompress("{'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": uncompress("{'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}}}")
+      }
+    };
+    /*
+    This event handler is fired when a new jsPDF object is initialized
+    This event handler appends metrics data to standard fonts within
+    that jsPDF instance. The metrics are mapped over Unicode character
+    codes, NOT CIDs or other codes matching the StandardEncoding table of the
+    standard PDF fonts.
+    Future:
+    Also included is the encoding maping table, converting Unicode (UCS-2, UTF-16)
+    char codes to StandardEncoding character codes. The encoding table is to be used
+    somewhere around "pdfEscape" call.
+    */
+
+    API.events.push(["addFont", function (data) {
+      var font = data.font;
+      var metrics = fontMetrics["Unicode"][font.postScriptName];
+
+      if (metrics) {
+        font.metadata["Unicode"] = {};
+        font.metadata["Unicode"].widths = metrics.widths;
+        font.metadata["Unicode"].kerning = metrics.kerning;
+      }
+
+      var encodingBlock = encodings["Unicode"][font.postScriptName];
+
+      if (encodingBlock) {
+        font.metadata["Unicode"].encoding = encodingBlock;
+        font.encoding = encodingBlock.codePages[0];
+      }
+    }]); // end of adding event handler
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * @name ttfsupport
+   * @module
+   */
+
+  (function (jsPDF) {
+
+    var binaryStringToUint8Array = function binaryStringToUint8Array(binary_string) {
+      var len = binary_string.length;
+      var bytes = new Uint8Array(len);
+
+      for (var i = 0; i < len; i++) {
+        bytes[i] = binary_string.charCodeAt(i);
+      }
+
+      return bytes;
+    };
+
+    var addFont = function addFont(font, file) {
+      // eslint-disable-next-line no-control-regex
+      if (/^\x00\x01\x00\x00/.test(file)) {
+        file = binaryStringToUint8Array(file);
+      } else {
+        file = binaryStringToUint8Array(atob(file));
+      }
+
+      font.metadata = jsPDF.API.TTFFont.open(file);
+      font.metadata.Unicode = font.metadata.Unicode || {
+        encoding: {},
+        kerning: {},
+        widths: []
+      };
+      font.metadata.glyIdsUsed = [0];
+    };
+
+    jsPDF.API.events.push(["addFont", function (data) {
+      var file = undefined;
+      var font = data.font;
+      var instance = data.instance;
+
+      if (font.isStandardFont) {
+        return;
+      }
+
+      if (typeof instance !== "undefined") {
+        if (instance.existsFileInVFS(font.postScriptName) === false) {
+          file = instance.loadFile(font.postScriptName);
+        } else {
+          file = instance.getFileFromVFS(font.postScriptName);
+        }
+
+        if (typeof file !== "string") {
+          throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('" + font.postScriptName + "').");
+        }
+
+        addFont(font, file);
+      } else {
+        throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('" + font.postScriptName + "').");
+      }
+    }]); // end of adding event handler
+  })(jsPDF);
+
+  /**
+   * jsPDF SVG plugin
+   *
+   * @name svg
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    function loadCanvg() {
+      return function () {
+        if (globalObject["canvg"]) {
+          return Promise.resolve(globalObject["canvg"]);
+        }
+
+        if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object" && typeof module !== "undefined") {
+          return new Promise(function (resolve, reject) {
+            try {
+              resolve(require("canvg"));
+            } catch (e) {
+              reject(e);
+            }
+          });
+        }
+
+        if (typeof define === "function" && define.amd) {
+          return new Promise(function (resolve, reject) {
+            try {
+              require(["canvg"], resolve);
+            } catch (e) {
+              reject(e);
+            }
+          });
+        }
+
+        return Promise.reject(new Error("Could not load canvg"));
+      }().catch(function (e) {
+        return Promise.reject(new Error("Could not load canvg: " + e));
+      }).then(function (canvg) {
+        return canvg.default ? canvg.default : canvg;
+      });
+    }
+    /**
+     * Parses SVG XML and saves it as image into the PDF.
+     *
+     * Depends on canvas-element and canvg
+     *
+     * @name addSvgAsImage
+     * @public
+     * @function
+     * @param {string} SVG-Data as Text
+     * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page
+     * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page
+     * @param {number} width of SVG-Image (in units declared at inception of PDF document)
+     * @param {number} height of SVG-Image (in units declared at inception of PDF document)
+     * @param {string} alias of SVG-Image (if used multiple times)
+     * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'
+     * @param {number} rotation of the image in degrees (0-359)
+     *
+     * @returns jsPDF jsPDF-instance
+     */
+
+
+    jsPDFAPI.addSvgAsImage = function (svg, x, y, w, h, alias, compression, rotation) {
+      if (isNaN(x) || isNaN(y)) {
+        console.error("jsPDF.addSvgAsImage: Invalid coordinates", arguments);
+        throw new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");
+      }
+
+      if (isNaN(w) || isNaN(h)) {
+        console.error("jsPDF.addSvgAsImage: Invalid measurements", arguments);
+        throw new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");
+      }
+
+      var canvas = document.createElement("canvas");
+      canvas.width = w;
+      canvas.height = h;
+      var ctx = canvas.getContext("2d");
+      ctx.fillStyle = "#fff"; /// set white fill style
+
+      ctx.fillRect(0, 0, canvas.width, canvas.height);
+      var options = {
+        ignoreMouse: true,
+        ignoreAnimation: true,
+        ignoreDimensions: true
+      };
+      var doc = this;
+      return loadCanvg().then(function (canvg) {
+        return canvg.fromString(ctx, svg, options);
+      }, function () {
+        return Promise.reject(new Error("Could not load canvg."));
+      }).then(function (instance) {
+        return instance.render(options);
+      }).then(function () {
+        doc.addImage(canvas.toDataURL("image/jpeg", 1.0), x, y, w, h, compression, rotation);
+      });
+    };
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * ====================================================================
+   * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining
+   * a copy of this software and associated documentation files (the
+   * "Software"), to deal in the Software without restriction, including
+   * without limitation the rights to use, copy, modify, merge, publish,
+   * distribute, sublicense, and/or sell copies of the Software, and to
+   * permit persons to whom the Software is furnished to do so, subject to
+   * the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be
+   * included in all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   * ====================================================================
+   */
+  /**
+   * jsPDF total_pages plugin
+   * @name total_pages
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+    /**
+     * @name putTotalPages
+     * @function
+     * @param {string} pageExpression Regular Expression
+     * @returns {jsPDF} jsPDF-instance
+     */
+
+    jsPDFAPI.putTotalPages = function (pageExpression) {
+
+      var replaceExpression;
+      var totalNumberOfPages = 0;
+
+      if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {
+        replaceExpression = new RegExp(pageExpression, "g");
+        totalNumberOfPages = this.internal.getNumberOfPages();
+      } else {
+        replaceExpression = new RegExp(this.pdfEscape16(pageExpression, this.internal.getFont()), "g");
+        totalNumberOfPages = 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(replaceExpression, totalNumberOfPages);
+        }
+      }
+
+      return this;
+    };
+  })(jsPDF.API);
+
+  /**
+   * Adds the ability to set ViewerPreferences and by thus
+   * controlling the way the document is to be presented on the
+   * screen or in print.
+   * @name viewerpreferences
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+    /**
+     * Set the ViewerPreferences of the generated PDF
+     *
+     * @name viewerPreferences
+     * @function
+     * @public
+     * @param {Object} options Array with the ViewerPreferences<br />
+     * Example: doc.viewerPreferences({"FitWindow":true});<br />
+     * <br />
+     * You can set following preferences:<br />
+     * <br/>
+     * <b>HideToolbar</b> <i>(boolean)</i><br />
+     * Default value: false<br />
+     * <br />
+     * <b>HideMenubar</b> <i>(boolean)</i><br />
+     * Default value: false.<br />
+     * <br />
+     * <b>HideWindowUI</b> <i>(boolean)</i><br />
+     * Default value: false.<br />
+     * <br />
+     * <b>FitWindow</b> <i>(boolean)</i><br />
+     * Default value: false.<br />
+     * <br />
+     * <b>CenterWindow</b> <i>(boolean)</i><br />
+     * Default value: false<br />
+     * <br />
+     * <b>DisplayDocTitle</b> <i>(boolean)</i><br />
+     * Default value: false.<br />
+     * <br />
+     * <b>NonFullScreenPageMode</b> <i>(string)</i><br />
+     * Possible values: UseNone, UseOutlines, UseThumbs, UseOC<br />
+     * Default value: UseNone<br/>
+     * <br />
+     * <b>Direction</b> <i>(string)</i><br />
+     * Possible values: L2R, R2L<br />
+     * Default value: L2R.<br />
+     * <br />
+     * <b>ViewArea</b> <i>(string)</i><br />
+     * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+     * Default value: CropBox.<br />
+     * <br />
+     * <b>ViewClip</b> <i>(string)</i><br />
+     * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+     * Default value: CropBox<br />
+     * <br />
+     * <b>PrintArea</b> <i>(string)</i><br />
+     * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+     * Default value: CropBox<br />
+     * <br />
+     * <b>PrintClip</b> <i>(string)</i><br />
+     * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />
+     * Default value: CropBox.<br />
+     * <br />
+     * <b>PrintScaling</b> <i>(string)</i><br />
+     * Possible values: AppDefault, None<br />
+     * Default value: AppDefault.<br />
+     * <br />
+     * <b>Duplex</b> <i>(string)</i><br />
+     * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge
+     * Default value: none<br />
+     * <br />
+     * <b>PickTrayByPDFSize</b> <i>(boolean)</i><br />
+     * Default value: false<br />
+     * <br />
+     * <b>PrintPageRange</b> <i>(Array)</i><br />
+     * Example: [[1,5], [7,9]]<br />
+     * Default value: as defined by PDF viewer application<br />
+     * <br />
+     * <b>NumCopies</b> <i>(Number)</i><br />
+     * Possible values: 1, 2, 3, 4, 5<br />
+     * Default value: 1<br />
+     * <br />
+     * For more information see the PDF Reference, sixth edition on Page 577
+     * @param {boolean} doReset True to reset the settings
+     * @function
+     * @returns jsPDF jsPDF-instance
+     * @example
+     * var doc = new jsPDF()
+     * doc.text('This is a test', 10, 10)
+     * doc.viewerPreferences({'FitWindow': true}, true)
+     * doc.save("viewerPreferences.pdf")
+     *
+     * // Example printing 10 copies, using cropbox, and hiding UI.
+     * doc.viewerPreferences({
+     *   'HideWindowUI': true,
+     *   'PrintArea': 'CropBox',
+     *   'NumCopies': 10
+     * })
+     */
+
+    jsPDFAPI.viewerPreferences = function (options, doReset) {
+      options = options || {};
+      doReset = doReset || false;
+      var configuration;
+      var configurationTemplate = {
+        HideToolbar: {
+          defaultValue: false,
+          value: false,
+          type: "boolean",
+          explicitSet: false,
+          valueSet: [true, false],
+          pdfVersion: 1.3
+        },
+        HideMenubar: {
+          defaultValue: false,
+          value: false,
+          type: "boolean",
+          explicitSet: false,
+          valueSet: [true, false],
+          pdfVersion: 1.3
+        },
+        HideWindowUI: {
+          defaultValue: false,
+          value: false,
+          type: "boolean",
+          explicitSet: false,
+          valueSet: [true, false],
+          pdfVersion: 1.3
+        },
+        FitWindow: {
+          defaultValue: false,
+          value: false,
+          type: "boolean",
+          explicitSet: false,
+          valueSet: [true, false],
+          pdfVersion: 1.3
+        },
+        CenterWindow: {
+          defaultValue: false,
+          value: false,
+          type: "boolean",
+          explicitSet: false,
+          valueSet: [true, false],
+          pdfVersion: 1.3
+        },
+        DisplayDocTitle: {
+          defaultValue: false,
+          value: false,
+          type: "boolean",
+          explicitSet: false,
+          valueSet: [true, false],
+          pdfVersion: 1.4
+        },
+        NonFullScreenPageMode: {
+          defaultValue: "UseNone",
+          value: "UseNone",
+          type: "name",
+          explicitSet: false,
+          valueSet: ["UseNone", "UseOutlines", "UseThumbs", "UseOC"],
+          pdfVersion: 1.3
+        },
+        Direction: {
+          defaultValue: "L2R",
+          value: "L2R",
+          type: "name",
+          explicitSet: false,
+          valueSet: ["L2R", "R2L"],
+          pdfVersion: 1.3
+        },
+        ViewArea: {
+          defaultValue: "CropBox",
+          value: "CropBox",
+          type: "name",
+          explicitSet: false,
+          valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+          pdfVersion: 1.4
+        },
+        ViewClip: {
+          defaultValue: "CropBox",
+          value: "CropBox",
+          type: "name",
+          explicitSet: false,
+          valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+          pdfVersion: 1.4
+        },
+        PrintArea: {
+          defaultValue: "CropBox",
+          value: "CropBox",
+          type: "name",
+          explicitSet: false,
+          valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+          pdfVersion: 1.4
+        },
+        PrintClip: {
+          defaultValue: "CropBox",
+          value: "CropBox",
+          type: "name",
+          explicitSet: false,
+          valueSet: ["MediaBox", "CropBox", "TrimBox", "BleedBox", "ArtBox"],
+          pdfVersion: 1.4
+        },
+        PrintScaling: {
+          defaultValue: "AppDefault",
+          value: "AppDefault",
+          type: "name",
+          explicitSet: false,
+          valueSet: ["AppDefault", "None"],
+          pdfVersion: 1.6
+        },
+        Duplex: {
+          defaultValue: "",
+          value: "none",
+          type: "name",
+          explicitSet: false,
+          valueSet: ["Simplex", "DuplexFlipShortEdge", "DuplexFlipLongEdge", "none"],
+          pdfVersion: 1.7
+        },
+        PickTrayByPDFSize: {
+          defaultValue: false,
+          value: false,
+          type: "boolean",
+          explicitSet: false,
+          valueSet: [true, false],
+          pdfVersion: 1.7
+        },
+        PrintPageRange: {
+          defaultValue: "",
+          value: "",
+          type: "array",
+          explicitSet: false,
+          valueSet: null,
+          pdfVersion: 1.7
+        },
+        NumCopies: {
+          defaultValue: 1,
+          value: 1,
+          type: "integer",
+          explicitSet: false,
+          valueSet: null,
+          pdfVersion: 1.7
+        }
+      };
+      var configurationKeys = Object.keys(configurationTemplate);
+      var rangeArray = [];
+      var i = 0;
+      var j = 0;
+      var k = 0;
+      var isValid;
+      var method;
+      var value;
+
+      function arrayContainsElement(array, element) {
+        var iterator;
+        var result = false;
+
+        for (iterator = 0; iterator < array.length; iterator += 1) {
+          if (array[iterator] === element) {
+            result = true;
+          }
+        }
+
+        return result;
+      }
+
+      if (this.internal.viewerpreferences === undefined) {
+        this.internal.viewerpreferences = {};
+        this.internal.viewerpreferences.configuration = JSON.parse(JSON.stringify(configurationTemplate));
+        this.internal.viewerpreferences.isSubscribed = false;
+      }
+
+      configuration = this.internal.viewerpreferences.configuration;
+
+      if (options === "reset" || doReset === true) {
+        var len = configurationKeys.length;
+
+        for (k = 0; k < len; k += 1) {
+          configuration[configurationKeys[k]].value = configuration[configurationKeys[k]].defaultValue;
+          configuration[configurationKeys[k]].explicitSet = false;
+        }
+      }
+
+      if (_typeof(options) === "object") {
+        for (method in options) {
+          value = options[method];
+
+          if (arrayContainsElement(configurationKeys, method) && value !== undefined) {
+            if (configuration[method].type === "boolean" && typeof value === "boolean") {
+              configuration[method].value = value;
+            } else if (configuration[method].type === "name" && arrayContainsElement(configuration[method].valueSet, value)) {
+              configuration[method].value = value;
+            } else if (configuration[method].type === "integer" && Number.isInteger(value)) {
+              configuration[method].value = value;
+            } else if (configuration[method].type === "array") {
+              for (i = 0; i < value.length; i += 1) {
+                isValid = true;
+
+                if (value[i].length === 1 && typeof value[i][0] === "number") {
+                  rangeArray.push(String(value[i] - 1));
+                } else if (value[i].length > 1) {
+                  for (j = 0; j < value[i].length; j += 1) {
+                    if (typeof value[i][j] !== "number") {
+                      isValid = false;
+                    }
+                  }
+
+                  if (isValid === true) {
+                    rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(" "));
+                  }
+                }
+              }
+
+              configuration[method].value = "[" + rangeArray.join(" ") + "]";
+            } else {
+              configuration[method].value = configuration[method].defaultValue;
+            }
+
+            configuration[method].explicitSet = true;
+          }
+        }
+      }
+
+      if (this.internal.viewerpreferences.isSubscribed === false) {
+        this.internal.events.subscribe("putCatalog", function () {
+          var pdfDict = [];
+          var vPref;
+
+          for (vPref in configuration) {
+            if (configuration[vPref].explicitSet === true) {
+              if (configuration[vPref].type === "name") {
+                pdfDict.push("/" + vPref + " /" + configuration[vPref].value);
+              } else {
+                pdfDict.push("/" + vPref + " " + configuration[vPref].value);
+              }
+            }
+          }
+
+          if (pdfDict.length !== 0) {
+            this.internal.write("/ViewerPreferences\n<<\n" + pdfDict.join("\n") + "\n>>");
+          }
+        });
+        this.internal.viewerpreferences.isSubscribed = true;
+      }
+
+      this.internal.viewerpreferences.configuration = configuration;
+      return this;
+    };
+  })(jsPDF.API);
+
+  /** ====================================================================
+   * @license
+   * jsPDF XMP metadata plugin
+   * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining
+   * a copy of this software and associated documentation files (the
+   * "Software"), to deal in the Software without restriction, including
+   * without limitation the rights to use, copy, modify, merge, publish,
+   * distribute, sublicense, and/or sell copies of the Software, and to
+   * permit persons to whom the Software is furnished to do so, subject to
+   * the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be
+   * included in all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   * ====================================================================
+   */
+  /**
+   * @name xmp_metadata
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    var postPutResources = function postPutResources() {
+      var xmpmeta_beginning = '<x:xmpmeta xmlns:x="adobe:ns:meta/">';
+      var rdf_beginning = '<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>';
+      var rdf_ending = "</jspdf:metadata></rdf:Description></rdf:RDF>";
+      var xmpmeta_ending = "</x:xmpmeta>";
+      var utf8_xmpmeta_beginning = unescape(encodeURIComponent(xmpmeta_beginning));
+      var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));
+      var utf8_metadata = unescape(encodeURIComponent(this.internal.__metadata__.metadata));
+      var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));
+      var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));
+      var total_len = utf8_rdf_beginning.length + utf8_metadata.length + utf8_rdf_ending.length + utf8_xmpmeta_beginning.length + utf8_xmpmeta_ending.length;
+      this.internal.__metadata__.metadata_object_number = this.internal.newObject();
+      this.internal.write("<< /Type /Metadata /Subtype /XML /Length " + total_len + " >>");
+      this.internal.write("stream");
+      this.internal.write(utf8_xmpmeta_beginning + utf8_rdf_beginning + utf8_metadata + utf8_rdf_ending + utf8_xmpmeta_ending);
+      this.internal.write("endstream");
+      this.internal.write("endobj");
+    };
+
+    var putCatalog = function putCatalog() {
+      if (this.internal.__metadata__.metadata_object_number) {
+        this.internal.write("/Metadata " + this.internal.__metadata__.metadata_object_number + " 0 R");
+      }
+    };
+    /**
+     * Adds XMP formatted metadata to PDF
+     *
+     * @name addMetadata
+     * @function
+     * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters "<", ">" or "&", those characters should be written using XML entities.
+     * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.
+     * @returns {jsPDF} jsPDF-instance
+     */
+
+
+    jsPDFAPI.addMetadata = function (metadata, namespaceuri) {
+      if (typeof this.internal.__metadata__ === "undefined") {
+        this.internal.__metadata__ = {
+          metadata: metadata,
+          namespaceuri: namespaceuri || "http://jspdf.default.namespaceuri/"
+        };
+        this.internal.events.subscribe("putCatalog", putCatalog);
+        this.internal.events.subscribe("postPutResources", postPutResources);
+      }
+
+      return this;
+    };
+  })(jsPDF.API);
+
+  /**
+   * @name utf8
+   * @module
+   */
+
+  (function (jsPDF) {
+
+    var jsPDFAPI = jsPDF.API;
+    /***************************************************************************************************/
+
+    /* function : pdfEscape16                                                                          */
+
+    /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */
+
+    /*   the corresponding glyph id and width, and then adding padding to the string.                  */
+
+    /***************************************************************************************************/
+
+    var pdfEscape16 = jsPDFAPI.pdfEscape16 = function (text, font) {
+      var widths = font.metadata.Unicode.widths;
+      var padz = ["", "0", "00", "000", "0000"];
+      var ar = [""];
+
+      for (var i = 0, l = text.length, t; i < l; ++i) {
+        t = font.metadata.characterToGlyph(text.charCodeAt(i));
+        font.metadata.glyIdsUsed.push(t);
+        font.metadata.toUnicode[t] = text.charCodeAt(i);
+
+        if (widths.indexOf(t) == -1) {
+          widths.push(t);
+          widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);
+        }
+
+        if (t == "0") {
+          //Spaces are not allowed in cmap.
+          return ar.join("");
+        } else {
+          t = t.toString(16);
+          ar.push(padz[4 - t.length], t);
+        }
+      }
+
+      return ar.join("");
+    };
+
+    var toUnicodeCmap = function toUnicodeCmap(map) {
+      var code, codes, range, unicode, unicodeMap, _i, _len;
+
+      unicodeMap = "/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";
+      codes = Object.keys(map).sort(function (a, b) {
+        return a - b;
+      });
+      range = [];
+
+      for (_i = 0, _len = codes.length; _i < _len; _i++) {
+        code = codes[_i];
+
+        if (range.length >= 100) {
+          unicodeMap += "\n" + range.length + " beginbfchar\n" + range.join("\n") + "\nendbfchar";
+          range = [];
+        }
+
+        if (map[code] !== undefined && map[code] !== null && typeof map[code].toString === "function") {
+          unicode = ("0000" + map[code].toString(16)).slice(-4);
+          code = ("0000" + (+code).toString(16)).slice(-4);
+          range.push("<" + code + "><" + unicode + ">");
+        }
+      }
+
+      if (range.length) {
+        unicodeMap += "\n" + range.length + " beginbfchar\n" + range.join("\n") + "\nendbfchar\n";
+      }
+
+      unicodeMap += "endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend";
+      return unicodeMap;
+    };
+
+    var identityHFunction = function identityHFunction(options) {
+      var font = options.font;
+      var out = options.out;
+      var newObject = options.newObject;
+      var putStream = options.putStream;
+
+      if (font.metadata instanceof jsPDF.API.TTFFont && font.encoding === "Identity-H") {
+        //Tag with Identity-H
+        var widths = font.metadata.Unicode.widths;
+        var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);
+        var pdfOutput = data;
+        var pdfOutput2 = "";
+
+        for (var i = 0; i < pdfOutput.length; i++) {
+          pdfOutput2 += String.fromCharCode(pdfOutput[i]);
+        }
+
+        var fontTable = newObject();
+        putStream({
+          data: pdfOutput2,
+          addLength1: true,
+          objectId: fontTable
+        });
+        out("endobj");
+        var cmap = newObject();
+        var cmapData = toUnicodeCmap(font.metadata.toUnicode);
+        putStream({
+          data: cmapData,
+          addLength1: true,
+          objectId: cmap
+        });
+        out("endobj");
+        var fontDescriptor = newObject();
+        out("<<");
+        out("/Type /FontDescriptor");
+        out("/FontName /" + toPDFName(font.fontName));
+        out("/FontFile2 " + fontTable + " 0 R");
+        out("/FontBBox " + jsPDF.API.PDFObject.convert(font.metadata.bbox));
+        out("/Flags " + font.metadata.flags);
+        out("/StemV " + font.metadata.stemV);
+        out("/ItalicAngle " + font.metadata.italicAngle);
+        out("/Ascent " + font.metadata.ascender);
+        out("/Descent " + font.metadata.decender);
+        out("/CapHeight " + font.metadata.capHeight);
+        out(">>");
+        out("endobj");
+        var DescendantFont = newObject();
+        out("<<");
+        out("/Type /Font");
+        out("/BaseFont /" + toPDFName(font.fontName));
+        out("/FontDescriptor " + fontDescriptor + " 0 R");
+        out("/W " + jsPDF.API.PDFObject.convert(widths));
+        out("/CIDToGIDMap /Identity");
+        out("/DW 1000");
+        out("/Subtype /CIDFontType2");
+        out("/CIDSystemInfo");
+        out("<<");
+        out("/Supplement 0");
+        out("/Registry (Adobe)");
+        out("/Ordering (" + font.encoding + ")");
+        out(">>");
+        out(">>");
+        out("endobj");
+        font.objectNumber = newObject();
+        out("<<");
+        out("/Type /Font");
+        out("/Subtype /Type0");
+        out("/ToUnicode " + cmap + " 0 R");
+        out("/BaseFont /" + toPDFName(font.fontName));
+        out("/Encoding /" + font.encoding);
+        out("/DescendantFonts [" + DescendantFont + " 0 R]");
+        out(">>");
+        out("endobj");
+        font.isAlreadyPutted = true;
+      }
+    };
+
+    jsPDFAPI.events.push(["putFont", function (args) {
+      identityHFunction(args);
+    }]);
+
+    var winAnsiEncodingFunction = function winAnsiEncodingFunction(options) {
+      var font = options.font;
+      var out = options.out;
+      var newObject = options.newObject;
+      var putStream = options.putStream;
+
+      if (font.metadata instanceof jsPDF.API.TTFFont && font.encoding === "WinAnsiEncoding") {
+        //Tag with WinAnsi encoding
+        var data = font.metadata.rawData;
+        var pdfOutput = data;
+        var pdfOutput2 = "";
+
+        for (var i = 0; i < pdfOutput.length; i++) {
+          pdfOutput2 += String.fromCharCode(pdfOutput[i]);
+        }
+
+        var fontTable = newObject();
+        putStream({
+          data: pdfOutput2,
+          addLength1: true,
+          objectId: fontTable
+        });
+        out("endobj");
+        var cmap = newObject();
+        var cmapData = toUnicodeCmap(font.metadata.toUnicode);
+        putStream({
+          data: cmapData,
+          addLength1: true,
+          objectId: cmap
+        });
+        out("endobj");
+        var fontDescriptor = newObject();
+        out("<<");
+        out("/Descent " + font.metadata.decender);
+        out("/CapHeight " + font.metadata.capHeight);
+        out("/StemV " + font.metadata.stemV);
+        out("/Type /FontDescriptor");
+        out("/FontFile2 " + fontTable + " 0 R");
+        out("/Flags 96");
+        out("/FontBBox " + jsPDF.API.PDFObject.convert(font.metadata.bbox));
+        out("/FontName /" + toPDFName(font.fontName));
+        out("/ItalicAngle " + font.metadata.italicAngle);
+        out("/Ascent " + font.metadata.ascender);
+        out(">>");
+        out("endobj");
+        font.objectNumber = newObject();
+
+        for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {
+          font.metadata.hmtx.widths[j] = parseInt(font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)); //Change the width of Em units to Point units.
+        }
+
+        out("<</Subtype/TrueType/Type/Font/ToUnicode " + cmap + " 0 R/BaseFont/" + toPDFName(font.fontName) + "/FontDescriptor " + fontDescriptor + " 0 R" + "/Encoding/" + font.encoding + " /FirstChar 29 /LastChar 255 /Widths " + jsPDF.API.PDFObject.convert(font.metadata.hmtx.widths) + ">>");
+        out("endobj");
+        font.isAlreadyPutted = true;
+      }
+    };
+
+    jsPDFAPI.events.push(["putFont", function (args) {
+      winAnsiEncodingFunction(args);
+    }]);
+
+    var utf8TextFunction = function utf8TextFunction(args) {
+      var text = args.text || "";
+      var x = args.x;
+      var y = args.y;
+      var options = args.options || {};
+      var mutex = args.mutex || {};
+      var pdfEscape = mutex.pdfEscape;
+      var activeFontKey = mutex.activeFontKey;
+      var fonts = mutex.fonts;
+      var key = activeFontKey;
+      var str = "",
+          s = 0,
+          cmapConfirm;
+      var strText = "";
+      var encoding = fonts[key].encoding;
+
+      if (fonts[key].encoding !== "Identity-H") {
+        return {
+          text: text,
+          x: x,
+          y: y,
+          options: options,
+          mutex: mutex
+        };
+      }
+
+      strText = text;
+      key = activeFontKey;
+
+      if (Array.isArray(text)) {
+        strText = text[0];
+      }
+
+      for (s = 0; s < strText.length; s += 1) {
+        if (fonts[key].metadata.hasOwnProperty("cmap")) {
+          cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];
+          /*
+               if (Object.prototype.toString.call(text) === '[object Array]') {
+                  var i = 0;
+                 // for (i = 0; i < text.length; i += 1) {
+                      if (Object.prototype.toString.call(text[s]) === '[object Array]') {
+                          cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id
+                      } else {
+                       }
+                  //}
+               } else {
+                  cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id
+              }*/
+        }
+
+        if (!cmapConfirm) {
+          if (strText[s].charCodeAt(0) < 256 && fonts[key].metadata.hasOwnProperty("Unicode")) {
+            str += strText[s];
+          } else {
+            str += "";
+          }
+        } else {
+          str += strText[s];
+        }
+      }
+
+      var result = "";
+
+      if (parseInt(key.slice(1)) < 14 || encoding === "WinAnsiEncoding") {
+        //For the default 13 font
+        result = pdfEscape(str, key).split("").map(function (cv) {
+          return cv.charCodeAt(0).toString(16);
+        }).join("");
+      } else if (encoding === "Identity-H") {
+        result = pdfEscape16(str, fonts[key]);
+      }
+
+      mutex.isHex = true;
+      return {
+        text: result,
+        x: x,
+        y: y,
+        options: options,
+        mutex: mutex
+      };
+    };
+
+    var utf8EscapeFunction = function utf8EscapeFunction(parms) {
+      var text = parms.text || "",
+          x = parms.x,
+          y = parms.y,
+          options = parms.options,
+          mutex = parms.mutex;
+      var tmpText = [];
+      var args = {
+        text: text,
+        x: x,
+        y: y,
+        options: options,
+        mutex: mutex
+      };
+
+      if (Array.isArray(text)) {
+        var i = 0;
+
+        for (i = 0; i < text.length; i += 1) {
+          if (Array.isArray(text[i])) {
+            if (text[i].length === 3) {
+              tmpText.push([utf8TextFunction(Object.assign({}, args, {
+                text: text[i][0]
+              })).text, text[i][1], text[i][2]]);
+            } else {
+              tmpText.push(utf8TextFunction(Object.assign({}, args, {
+                text: text[i]
+              })).text);
+            }
+          } else {
+            tmpText.push(utf8TextFunction(Object.assign({}, args, {
+              text: text[i]
+            })).text);
+          }
+        }
+
+        parms.text = tmpText;
+      } else {
+        parms.text = utf8TextFunction(Object.assign({}, args, {
+          text: text
+        })).text;
+      }
+    };
+
+    jsPDFAPI.events.push(["postProcessText", utf8EscapeFunction]);
+  })(jsPDF);
+
+  /**
+   * @license
+   * jsPDF virtual FileSystem functionality
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+  /**
+   * Use the vFS to handle files
+   *
+   * @name vFS
+   * @module
+   */
+
+  (function (jsPDFAPI) {
+
+    var _initializeVFS = function _initializeVFS() {
+      if (typeof this.internal.vFS === "undefined") {
+        this.internal.vFS = {};
+      }
+
+      return true;
+    };
+    /**
+     * Check if the file exists in the vFS
+     *
+     * @name existsFileInVFS
+     * @function
+     * @param {string} Possible filename in the vFS.
+     * @returns {boolean}
+     * @example
+     * doc.existsFileInVFS("someFile.txt");
+     */
+
+
+    jsPDFAPI.existsFileInVFS = function (filename) {
+      _initializeVFS.call(this);
+
+      return typeof this.internal.vFS[filename] !== "undefined";
+    };
+    /**
+     * Add a file to the vFS
+     *
+     * @name addFileToVFS
+     * @function
+     * @param {string} filename The name of the file which should be added.
+     * @param {string} filecontent The content of the file.
+     * @returns {jsPDF}
+     * @example
+     * doc.addFileToVFS("someFile.txt", "BADFACE1");
+     */
+
+
+    jsPDFAPI.addFileToVFS = function (filename, filecontent) {
+      _initializeVFS.call(this);
+
+      this.internal.vFS[filename] = filecontent;
+      return this;
+    };
+    /**
+     * Get the file from the vFS
+     *
+     * @name getFileFromVFS
+     * @function
+     * @param {string} The name of the file which gets requested.
+     * @returns {string}
+     * @example
+     * doc.getFileFromVFS("someFile.txt");
+     */
+
+
+    jsPDFAPI.getFileFromVFS = function (filename) {
+      _initializeVFS.call(this);
+
+      if (typeof this.internal.vFS[filename] !== "undefined") {
+        return this.internal.vFS[filename];
+      }
+
+      return null;
+    };
+  })(jsPDF.API);
+
+  /**
+   * @license
+   * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
+   * MIT License
+   */
+
+  (function (jsPDF) {
+    /**
+     * Table of Unicode types.
+     *
+     * Generated by:
+     *
+     * var bidi = require("./bidi/index");
+     * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).
+     * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).
+     * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));
+     *
+     * for( var i = 0; i < bidi_accumulate.length; i++) {
+     * 	if(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')
+     * 		bidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined
+     * }
+     * var bidiAccumulateStr = 'return [ "' + bidi_accumulate.toString().replace(/,/g, '", "') + '" ];';
+     * require("fs").writeFile('unicode-types.js', bidiAccumulateStr);
+     *
+     * Based on:
+     * https://github.com/mathiasbynens/unicode-8.0.0
+     */
+
+    var bidiUnicodeTypes = ["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"];
+    /**
+     * Unicode Bidi algorithm compliant Bidi engine.
+     * For reference see http://unicode.org/reports/tr9/
+     */
+
+    /**
+     * constructor ( options )
+     *
+     * Initializes Bidi engine
+     *
+     * @param {Object} See 'setOptions' below for detailed description.
+     * options are cashed between invocation of 'doBidiReorder' method
+     *
+     * sample usage pattern of BidiEngine:
+     * var opt = {
+     * 	isInputVisual: true,
+     * 	isInputRtl: false,
+     * 	isOutputVisual: false,
+     * 	isOutputRtl: false,
+     * 	isSymmetricSwapping: true
+     * }
+     * var sourceToTarget = [], levels = [];
+     * var bidiEng = Globalize.bidiEngine(opt);
+     * var src = "text string to be reordered";
+     * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);
+     */
+
+    jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function (options) {
+      var _UNICODE_TYPES = _bidiUnicodeTypes;
+      var _STATE_TABLE_LTR = [[0, 3, 0, 1, 0, 0, 0], [0, 3, 0, 1, 2, 2, 0], [0, 3, 0, 0x11, 2, 0, 1], [0, 3, 5, 5, 4, 1, 0], [0, 3, 0x15, 0x15, 4, 0, 1], [0, 3, 5, 5, 4, 2, 0]];
+      var _STATE_TABLE_RTL = [[2, 0, 1, 1, 0, 1, 0], [2, 0, 1, 1, 0, 2, 0], [2, 0, 2, 1, 3, 2, 0], [2, 0, 2, 0x21, 3, 1, 1]];
+      var _TYPE_NAMES_MAP = {
+        L: 0,
+        R: 1,
+        EN: 2,
+        AN: 3,
+        N: 4,
+        B: 5,
+        S: 6
+      };
+      var _UNICODE_RANGES_MAP = {
+        0: 0,
+        5: 1,
+        6: 2,
+        7: 3,
+        0x20: 4,
+        0xfb: 5,
+        0xfe: 6,
+        0xff: 7
+      };
+      var _SWAP_TABLE = ["(", ")", "(", "<", ">", "<", "[", "]", "[", "{", "}", "{", "\xAB", "\xBB", "\xAB", "\u2039", "\u203A", "\u2039", "\u2045", "\u2046", "\u2045", "\u207D", "\u207E", "\u207D", "\u208D", "\u208E", "\u208D", "\u2264", "\u2265", "\u2264", "\u2329", "\u232A", "\u2329", "\uFE59", "\uFE5A", "\uFE59", "\uFE5B", "\uFE5C", "\uFE5B", "\uFE5D", "\uFE5E", "\uFE5D", "\uFE64", "\uFE65", "\uFE64"];
+
+      var _LTR_RANGES_REG_EXPR = 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)$/);
+
+      var _lastArabic = false,
+          _hasUbatB,
+          _hasUbatS,
+          DIR_LTR = 0,
+          DIR_RTL = 1,
+          _isInVisual,
+          _isInRtl,
+          _isOutVisual,
+          _isOutRtl,
+          _isSymmetricSwapping,
+          _dir = DIR_LTR;
+
+      this.__bidiEngine__ = {};
+
+      var _init = function _init(text, sourceToTargetMap) {
+        if (sourceToTargetMap) {
+          for (var i = 0; i < text.length; i++) {
+            sourceToTargetMap[i] = i;
+          }
+        }
+
+        if (_isInRtl === undefined) {
+          _isInRtl = _isContextualDirRtl(text);
+        }
+
+        if (_isOutRtl === undefined) {
+          _isOutRtl = _isContextualDirRtl(text);
+        }
+      }; // for reference see 3.2 in http://unicode.org/reports/tr9/
+      //
+
+
+      var _getCharType = function _getCharType(ch) {
+        var charCode = ch.charCodeAt(),
+            range = charCode >> 8,
+            rangeIdx = _UNICODE_RANGES_MAP[range];
+
+        if (rangeIdx !== undefined) {
+          return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];
+        } else if (range === 0xfc || range === 0xfd) {
+          return "AL";
+        } else if (_LTR_RANGES_REG_EXPR.test(range)) {
+          //unlikely case
+          return "L";
+        } else if (range === 8) {
+          // even less likely
+          return "R";
+        }
+
+        return "N"; //undefined type, mark as neutral
+      };
+
+      var _isContextualDirRtl = function _isContextualDirRtl(text) {
+        for (var i = 0, charType; i < text.length; i++) {
+          charType = _getCharType(text.charAt(i));
+
+          if (charType === "L") {
+            return false;
+          } else if (charType === "R") {
+            return true;
+          }
+        }
+
+        return false;
+      }; // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/
+      //
+
+
+      var _resolveCharType = function _resolveCharType(chars, types, resolvedTypes, index) {
+        var cType = types[index],
+            wType,
+            nType,
+            i,
+            len;
+
+        switch (cType) {
+          case "L":
+          case "R":
+            _lastArabic = false;
+            break;
+
+          case "N":
+          case "AN":
+            break;
+
+          case "EN":
+            if (_lastArabic) {
+              cType = "AN";
+            }
+
+            break;
+
+          case "AL":
+            _lastArabic = true;
+            cType = "R";
+            break;
+
+          case "WS":
+            cType = "N";
+            break;
+
+          case "CS":
+            if (index < 1 || index + 1 >= types.length || (wType = resolvedTypes[index - 1]) !== "EN" && wType !== "AN" || (nType = types[index + 1]) !== "EN" && nType !== "AN") {
+              cType = "N";
+            } else if (_lastArabic) {
+              nType = "AN";
+            }
+
+            cType = nType === wType ? nType : "N";
+            break;
+
+          case "ES":
+            wType = index > 0 ? resolvedTypes[index - 1] : "B";
+            cType = wType === "EN" && index + 1 < types.length && types[index + 1] === "EN" ? "EN" : "N";
+            break;
+
+          case "ET":
+            if (index > 0 && resolvedTypes[index - 1] === "EN") {
+              cType = "EN";
+              break;
+            } else if (_lastArabic) {
+              cType = "N";
+              break;
+            }
+
+            i = index + 1;
+            len = types.length;
+
+            while (i < len && types[i] === "ET") {
+              i++;
+            }
+
+            if (i < len && types[i] === "EN") {
+              cType = "EN";
+            } else {
+              cType = "N";
+            }
+
+            break;
+
+          case "NSM":
+            if (_isInVisual && !_isInRtl) {
+              //V->L
+              len = types.length;
+              i = index + 1;
+
+              while (i < len && types[i] === "NSM") {
+                i++;
+              }
+
+              if (i < len) {
+                var c = chars[index];
+                var rtlCandidate = c >= 0x0591 && c <= 0x08ff || c === 0xfb1e;
+                wType = types[i];
+
+                if (rtlCandidate && (wType === "R" || wType === "AL")) {
+                  cType = "R";
+                  break;
+                }
+              }
+            }
+
+            if (index < 1 || (wType = types[index - 1]) === "B") {
+              cType = "N";
+            } else {
+              cType = resolvedTypes[index - 1];
+            }
+
+            break;
+
+          case "B":
+            _lastArabic = false;
+            _hasUbatB = true;
+            cType = _dir;
+            break;
+
+          case "S":
+            _hasUbatS = true;
+            cType = "N";
+            break;
+
+          case "LRE":
+          case "RLE":
+          case "LRO":
+          case "RLO":
+          case "PDF":
+            _lastArabic = false;
+            break;
+
+          case "BN":
+            cType = "N";
+            break;
+        }
+
+        return cType;
+      };
+
+      var _handleUbatS = function _handleUbatS(types, levels, length) {
+        for (var i = 0; i < length; i++) {
+          if (types[i] === "S") {
+            levels[i] = _dir;
+
+            for (var j = i - 1; j >= 0; j--) {
+              if (types[j] === "WS") {
+                levels[j] = _dir;
+              } else {
+                break;
+              }
+            }
+          }
+        }
+      };
+
+      var _invertString = function _invertString(text, sourceToTargetMap, levels) {
+        var charArray = text.split("");
+
+        if (levels) {
+          _computeLevels(charArray, levels, {
+            hiLevel: _dir
+          });
+        }
+
+        charArray.reverse();
+        sourceToTargetMap && sourceToTargetMap.reverse();
+        return charArray.join("");
+      }; // For reference see 3.3 in http://unicode.org/reports/tr9/
+      //
+
+
+      var _computeLevels = function _computeLevels(chars, levels, params) {
+        var action,
+            condition,
+            i,
+            index,
+            newLevel,
+            prevState,
+            condPos = -1,
+            len = chars.length,
+            newState = 0,
+            resolvedTypes = [],
+            stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,
+            types = [];
+        _lastArabic = false;
+        _hasUbatB = false;
+        _hasUbatS = false;
+
+        for (i = 0; i < len; i++) {
+          types[i] = _getCharType(chars[i]);
+        }
+
+        for (index = 0; index < len; index++) {
+          prevState = newState;
+          resolvedTypes[index] = _resolveCharType(chars, types, resolvedTypes, index);
+          newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];
+          action = newState & 0xf0;
+          newState &= 0x0f;
+          levels[index] = newLevel = stateTable[newState][5];
+
+          if (action > 0) {
+            if (action === 0x10) {
+              for (i = condPos; i < index; i++) {
+                levels[i] = 1;
+              }
+
+              condPos = -1;
+            } else {
+              condPos = -1;
+            }
+          }
+
+          condition = stateTable[newState][6];
+
+          if (condition) {
+            if (condPos === -1) {
+              condPos = index;
+            }
+          } else {
+            if (condPos > -1) {
+              for (i = condPos; i < index; i++) {
+                levels[i] = newLevel;
+              }
+
+              condPos = -1;
+            }
+          }
+
+          if (types[index] === "B") {
+            levels[index] = 0;
+          }
+
+          params.hiLevel |= newLevel;
+        }
+
+        if (_hasUbatS) {
+          _handleUbatS(types, levels, len);
+        }
+      }; // for reference see 3.4 in http://unicode.org/reports/tr9/
+      //
+
+
+      var _invertByLevel = function _invertByLevel(level, charArray, sourceToTargetMap, levels, params) {
+        if (params.hiLevel < level) {
+          return;
+        }
+
+        if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {
+          charArray.reverse();
+          sourceToTargetMap && sourceToTargetMap.reverse();
+          return;
+        }
+
+        var ch,
+            high,
+            end,
+            low,
+            len = charArray.length,
+            start = 0;
+
+        while (start < len) {
+          if (levels[start] >= level) {
+            end = start + 1;
+
+            while (end < len && levels[end] >= level) {
+              end++;
+            }
+
+            for (low = start, high = end - 1; low < high; low++, high--) {
+              ch = charArray[low];
+              charArray[low] = charArray[high];
+              charArray[high] = ch;
+
+              if (sourceToTargetMap) {
+                ch = sourceToTargetMap[low];
+                sourceToTargetMap[low] = sourceToTargetMap[high];
+                sourceToTargetMap[high] = ch;
+              }
+            }
+
+            start = end;
+          }
+
+          start++;
+        }
+      }; // for reference see 7 & BD16 in http://unicode.org/reports/tr9/
+      //
+
+
+      var _symmetricSwap = function _symmetricSwap(charArray, levels, params) {
+        if (params.hiLevel !== 0 && _isSymmetricSwapping) {
+          for (var i = 0, index; i < charArray.length; i++) {
+            if (levels[i] === 1) {
+              index = _SWAP_TABLE.indexOf(charArray[i]);
+
+              if (index >= 0) {
+                charArray[i] = _SWAP_TABLE[index + 1];
+              }
+            }
+          }
+        }
+      };
+
+      var _reorder = function _reorder(text, sourceToTargetMap, levels) {
+        var charArray = text.split(""),
+            params = {
+          hiLevel: _dir
+        };
+
+        if (!levels) {
+          levels = [];
+        }
+
+        _computeLevels(charArray, levels, params);
+
+        _symmetricSwap(charArray, levels, params);
+
+        _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);
+
+        _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);
+
+        return charArray.join("");
+      }; // doBidiReorder( text, sourceToTargetMap, levels )
+      // Performs Bidi reordering by implementing Unicode Bidi algorithm.
+      // Returns reordered string
+      // @text [String]:
+      // - input string to be reordered, this is input parameter
+      // $sourceToTargetMap [Array] (optional)
+      // - resultant mapping between input and output strings, this is output parameter
+      // $levels [Array] (optional)
+      // - array of calculated Bidi levels, , this is output parameter
+
+
+      this.__bidiEngine__.doBidiReorder = function (text, sourceToTargetMap, levels) {
+        _init(text, sourceToTargetMap);
+
+        if (!_isInVisual && _isOutVisual && !_isOutRtl) {
+          // LLTR->VLTR, LRTL->VLTR
+          _dir = _isInRtl ? DIR_RTL : DIR_LTR;
+          text = _reorder(text, sourceToTargetMap, levels);
+        } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {
+          // VRTL->VLTR, VLTR->VRTL
+          _dir = _isInRtl ? DIR_RTL : DIR_LTR;
+          text = _invertString(text, sourceToTargetMap, levels);
+        } else if (!_isInVisual && _isOutVisual && _isOutRtl) {
+          // LLTR->VRTL, LRTL->VRTL
+          _dir = _isInRtl ? DIR_RTL : DIR_LTR;
+          text = _reorder(text, sourceToTargetMap, levels);
+          text = _invertString(text, sourceToTargetMap);
+        } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {
+          // VLTR->LLTR
+          _dir = DIR_LTR;
+          text = _reorder(text, sourceToTargetMap, levels);
+        } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {
+          // VLTR->LRTL, VRTL->LLTR
+          text = _invertString(text, sourceToTargetMap);
+
+          if (_isInRtl) {
+            //LLTR -> VLTR
+            _dir = DIR_LTR;
+            text = _reorder(text, sourceToTargetMap, levels);
+          } else {
+            //LRTL -> VRTL
+            _dir = DIR_RTL;
+            text = _reorder(text, sourceToTargetMap, levels);
+            text = _invertString(text, sourceToTargetMap);
+          }
+        } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {
+          //  VRTL->LRTL
+          _dir = DIR_RTL;
+          text = _reorder(text, sourceToTargetMap, levels);
+          text = _invertString(text, sourceToTargetMap);
+        } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {
+          // LRTL->LLTR, LLTR->LRTL
+          var isSymmetricSwappingOrig = _isSymmetricSwapping;
+
+          if (_isInRtl) {
+            //LRTL->LLTR
+            _dir = DIR_RTL;
+            text = _reorder(text, sourceToTargetMap, levels);
+            _dir = DIR_LTR;
+            _isSymmetricSwapping = false;
+            text = _reorder(text, sourceToTargetMap, levels);
+            _isSymmetricSwapping = isSymmetricSwappingOrig;
+          } else {
+            //LLTR->LRTL
+            _dir = DIR_LTR;
+            text = _reorder(text, sourceToTargetMap, levels);
+            text = _invertString(text, sourceToTargetMap);
+            _dir = DIR_RTL;
+            _isSymmetricSwapping = false;
+            text = _reorder(text, sourceToTargetMap, levels);
+            _isSymmetricSwapping = isSymmetricSwappingOrig;
+            text = _invertString(text, sourceToTargetMap);
+          }
+        }
+
+        return text;
+      };
+      /**
+       * @name setOptions( options )
+       * @function
+       * Sets options for Bidi conversion
+       * @param {Object}:
+       * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)
+       * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)
+       * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)
+       * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)
+       * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),
+       */
+
+
+      this.__bidiEngine__.setOptions = function (options) {
+        if (options) {
+          _isInVisual = options.isInputVisual;
+          _isOutVisual = options.isOutputVisual;
+          _isInRtl = options.isInputRtl;
+          _isOutRtl = options.isOutputRtl;
+          _isSymmetricSwapping = options.isSymmetricSwapping;
+        }
+      };
+
+      this.__bidiEngine__.setOptions(options);
+
+      return this.__bidiEngine__;
+    };
+
+    var _bidiUnicodeTypes = bidiUnicodeTypes;
+    var bidiEngine = new jsPDF.__bidiEngine__({
+      isInputVisual: true
+    });
+
+    var bidiEngineFunction = function bidiEngineFunction(args) {
+      var text = args.text;
+      var x = args.x;
+      var y = args.y;
+      var options = args.options || {};
+      var mutex = args.mutex || {};
+      var lang = options.lang;
+      var tmpText = [];
+      options.isInputVisual = typeof options.isInputVisual === "boolean" ? options.isInputVisual : true;
+      bidiEngine.setOptions(options);
+
+      if (Object.prototype.toString.call(text) === "[object Array]") {
+        var i = 0;
+        tmpText = [];
+
+        for (i = 0; i < text.length; i += 1) {
+          if (Object.prototype.toString.call(text[i]) === "[object Array]") {
+            tmpText.push([bidiEngine.doBidiReorder(text[i][0]), text[i][1], text[i][2]]);
+          } else {
+            tmpText.push([bidiEngine.doBidiReorder(text[i])]);
+          }
+        }
+
+        args.text = tmpText;
+      } else {
+        args.text = bidiEngine.doBidiReorder(text);
+      }
+
+      bidiEngine.setOptions({
+        isInputVisual: true
+      });
+    };
+
+    jsPDF.API.events.push(["postProcessText", bidiEngineFunction]);
+  })(jsPDF);
+
+  /* eslint-disable no-control-regex */
+
+  jsPDF.API.TTFFont = function () {
+    /************************************************************************/
+
+    /* function : open                                                       */
+
+    /* comment : Decode the encoded ttf content and create a TTFFont object. */
+
+    /************************************************************************/
+    TTFFont.open = function (file) {
+      return new TTFFont(file);
+    };
+    /***************************************************************/
+
+    /* function : TTFFont gernerator                               */
+
+    /* comment : Decode TTF contents are parsed, Data,             */
+
+    /* Subset object is created, and registerTTF function is called.*/
+
+    /***************************************************************/
+
+
+    function TTFFont(rawData) {
+      var data;
+      this.rawData = rawData;
+      data = this.contents = new Data(rawData);
+      this.contents.pos = 4;
+
+      if (data.readString(4) === "ttcf") {
+        throw new Error("TTCF not supported.");
+      } else {
+        data.pos = 0;
+        this.parse();
+        this.subset = new Subset(this);
+        this.registerTTF();
+      }
+    }
+    /********************************************************/
+
+    /* function : parse                                     */
+
+    /* comment : TTF Parses the file contents by each table.*/
+
+    /********************************************************/
+
+
+    TTFFont.prototype.parse = function () {
+      this.directory = new Directory(this.contents);
+      this.head = new HeadTable(this);
+      this.name = new NameTable(this);
+      this.cmap = new CmapTable(this);
+      this.toUnicode = {};
+      this.hhea = new HheaTable(this);
+      this.maxp = new MaxpTable(this);
+      this.hmtx = new HmtxTable(this);
+      this.post = new PostTable(this);
+      this.os2 = new OS2Table(this);
+      this.loca = new LocaTable(this);
+      this.glyf = new GlyfTable(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;
+      return this.bbox = [this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax];
+    };
+    /***************************************************************/
+
+    /* function : registerTTF                                      */
+
+    /* comment : Get the value to assign pdf font descriptors.     */
+
+    /***************************************************************/
+
+
+    TTFFont.prototype.registerTTF = function () {
+      var e, hi, low, raw, _ref;
+
+      this.scaleFactor = 1000.0 / this.head.unitsPerEm;
+
+      this.bbox = function () {
+        var _i, _len, _ref, _results;
+
+        _ref = this.bbox;
+        _results = [];
+
+        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
+          e = _ref[_i];
+
+          _results.push(Math.round(e * this.scaleFactor));
+        }
+
+        return _results;
+      }.call(this);
+
+      this.stemV = 0;
+
+      if (this.post.exists) {
+        raw = this.post.italic_angle;
+        hi = raw >> 16;
+        low = raw & 0xff;
+
+        if ((hi & 0x8000) !== 0) {
+          hi = -((hi ^ 0xffff) + 1);
+        }
+
+        this.italicAngle = +("" + hi + "." + low);
+      } else {
+        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 = (_ref = this.familyClass) === 1 || _ref === 2 || _ref === 3 || _ref === 4 || _ref === 5 || _ref === 7;
+      this.isScript = this.familyClass === 10;
+      this.flags = 0;
+
+      if (this.post.isFixedPitch) {
+        this.flags |= 1 << 0;
+      }
+
+      if (this.isSerif) {
+        this.flags |= 1 << 1;
+      }
+
+      if (this.isScript) {
+        this.flags |= 1 << 3;
+      }
+
+      if (this.italicAngle !== 0) {
+        this.flags |= 1 << 6;
+      }
+
+      this.flags |= 1 << 5;
+
+      if (!this.cmap.unicode) {
+        throw new Error("No unicode cmap for font");
+      }
+    };
+
+    TTFFont.prototype.characterToGlyph = function (character) {
+      var _ref;
+
+      return ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) || 0;
+    };
+
+    TTFFont.prototype.widthOfGlyph = function (glyph) {
+      var scale;
+      scale = 1000.0 / this.head.unitsPerEm;
+      return this.hmtx.forGlyph(glyph).advance * scale;
+    };
+
+    TTFFont.prototype.widthOfString = function (string, size, charSpace) {
+      var charCode, i, scale, width, _ref;
+
+      string = "" + string;
+      width = 0;
+
+      for (i = 0, _ref = string.length; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) {
+        charCode = string.charCodeAt(i);
+        width += this.widthOfGlyph(this.characterToGlyph(charCode)) + charSpace * (1000 / size) || 0;
+      }
+
+      scale = size / 1000;
+      return width * scale;
+    };
+
+    TTFFont.prototype.lineHeight = function (size, includeGap) {
+      var gap;
+
+      if (includeGap == null) {
+        includeGap = false;
+      }
+
+      gap = includeGap ? this.lineGap : 0;
+      return (this.ascender + gap - this.decender) / 1000 * size;
+    };
+
+    return TTFFont;
+  }();
+  /************************************************************************************************/
+
+  /* function : Data                                                                              */
+
+  /* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/
+
+  /************************************************************************************************/
+
+
+  var Data = function () {
+    function Data(data) {
+      this.data = data != null ? data : [];
+      this.pos = 0;
+      this.length = this.data.length;
+    }
+
+    Data.prototype.readByte = function () {
+      return this.data[this.pos++];
+    };
+
+    Data.prototype.writeByte = function (byte) {
+      return this.data[this.pos++] = byte;
+    };
+
+    Data.prototype.readUInt32 = function () {
+      var b1, b2, b3, b4;
+      b1 = this.readByte() * 0x1000000;
+      b2 = this.readByte() << 16;
+      b3 = this.readByte() << 8;
+      b4 = this.readByte();
+      return b1 + b2 + b3 + b4;
+    };
+
+    Data.prototype.writeUInt32 = function (val) {
+      this.writeByte(val >>> 24 & 0xff);
+      this.writeByte(val >> 16 & 0xff);
+      this.writeByte(val >> 8 & 0xff);
+      return this.writeByte(val & 0xff);
+    };
+
+    Data.prototype.readInt32 = function () {
+      var int;
+      int = this.readUInt32();
+
+      if (int >= 0x80000000) {
+        return int - 0x100000000;
+      } else {
+        return int;
+      }
+    };
+
+    Data.prototype.writeInt32 = function (val) {
+      if (val < 0) {
+        val += 0x100000000;
+      }
+
+      return this.writeUInt32(val);
+    };
+
+    Data.prototype.readUInt16 = function () {
+      var b1, b2;
+      b1 = this.readByte() << 8;
+      b2 = this.readByte();
+      return b1 | b2;
+    };
+
+    Data.prototype.writeUInt16 = function (val) {
+      this.writeByte(val >> 8 & 0xff);
+      return this.writeByte(val & 0xff);
+    };
+
+    Data.prototype.readInt16 = function () {
+      var int;
+      int = this.readUInt16();
+
+      if (int >= 0x8000) {
+        return int - 0x10000;
+      } else {
+        return int;
+      }
+    };
+
+    Data.prototype.writeInt16 = function (val) {
+      if (val < 0) {
+        val += 0x10000;
+      }
+
+      return this.writeUInt16(val);
+    };
+
+    Data.prototype.readString = function (length) {
+      var i, ret;
+      ret = [];
+
+      for (i = 0; 0 <= length ? i < length : i > length; i = 0 <= length ? ++i : --i) {
+        ret[i] = String.fromCharCode(this.readByte());
+      }
+
+      return ret.join("");
+    };
+
+    Data.prototype.writeString = function (val) {
+      var i, _ref, _results;
+
+      _results = [];
+
+      for (i = 0, _ref = val.length; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) {
+        _results.push(this.writeByte(val.charCodeAt(i)));
+      }
+
+      return _results;
+    };
+    /*Data.prototype.stringAt = function (pos, length) {
+              this.pos = pos;
+              return this.readString(length);
+          };*/
+
+
+    Data.prototype.readShort = function () {
+      return this.readInt16();
+    };
+
+    Data.prototype.writeShort = function (val) {
+      return this.writeInt16(val);
+    };
+
+    Data.prototype.readLongLong = function () {
+      var b1, b2, b3, b4, b5, b6, b7, b8;
+      b1 = this.readByte();
+      b2 = this.readByte();
+      b3 = this.readByte();
+      b4 = this.readByte();
+      b5 = this.readByte();
+      b6 = this.readByte();
+      b7 = this.readByte();
+      b8 = this.readByte();
+
+      if (b1 & 0x80) {
+        return ((b1 ^ 0xff) * 0x100000000000000 + (b2 ^ 0xff) * 0x1000000000000 + (b3 ^ 0xff) * 0x10000000000 + (b4 ^ 0xff) * 0x100000000 + (b5 ^ 0xff) * 0x1000000 + (b6 ^ 0xff) * 0x10000 + (b7 ^ 0xff) * 0x100 + (b8 ^ 0xff) + 1) * -1;
+      }
+
+      return b1 * 0x100000000000000 + b2 * 0x1000000000000 + b3 * 0x10000000000 + b4 * 0x100000000 + b5 * 0x1000000 + b6 * 0x10000 + b7 * 0x100 + b8;
+    };
+
+    Data.prototype.writeLongLong = function (val) {
+      var high, low;
+      high = Math.floor(val / 0x100000000);
+      low = val & 0xffffffff;
+      this.writeByte(high >> 24 & 0xff);
+      this.writeByte(high >> 16 & 0xff);
+      this.writeByte(high >> 8 & 0xff);
+      this.writeByte(high & 0xff);
+      this.writeByte(low >> 24 & 0xff);
+      this.writeByte(low >> 16 & 0xff);
+      this.writeByte(low >> 8 & 0xff);
+      return this.writeByte(low & 0xff);
+    };
+
+    Data.prototype.readInt = function () {
+      return this.readInt32();
+    };
+
+    Data.prototype.writeInt = function (val) {
+      return this.writeInt32(val);
+    };
+    /*Data.prototype.slice = function (start, end) {
+              return this.data.slice(start, end);
+          };*/
+
+
+    Data.prototype.read = function (bytes) {
+      var buf, i;
+      buf = [];
+
+      for (i = 0; 0 <= bytes ? i < bytes : i > bytes; i = 0 <= bytes ? ++i : --i) {
+        buf.push(this.readByte());
+      }
+
+      return buf;
+    };
+
+    Data.prototype.write = function (bytes) {
+      var byte, i, _len, _results;
+
+      _results = [];
+
+      for (i = 0, _len = bytes.length; i < _len; i++) {
+        byte = bytes[i];
+
+        _results.push(this.writeByte(byte));
+      }
+
+      return _results;
+    };
+
+    return Data;
+  }();
+
+  var Directory = function () {
+    var checksum;
+    /*****************************************************************************************************/
+
+    /* function : Directory generator                                                                    */
+
+    /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/
+
+    /*****************************************************************************************************/
+
+    function Directory(data) {
+      var entry, i, _ref;
+
+      this.scalarType = data.readInt();
+      this.tableCount = data.readShort();
+      this.searchRange = data.readShort();
+      this.entrySelector = data.readShort();
+      this.rangeShift = data.readShort();
+      this.tables = {};
+
+      for (i = 0, _ref = this.tableCount; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) {
+        entry = {
+          tag: data.readString(4),
+          checksum: data.readInt(),
+          offset: data.readInt(),
+          length: data.readInt()
+        };
+        this.tables[entry.tag] = entry;
+      }
+    }
+    /********************************************************************************************************/
+
+    /* function : encode                                                                                    */
+
+    /* comment : It encodes and stores the font table object and information used for the directory object. */
+
+    /********************************************************************************************************/
+
+
+    Directory.prototype.encode = function (tables) {
+      var adjustment, directory, directoryLength, entrySelector, headOffset, log2, offset, rangeShift, searchRange, sum, table, tableCount, tableData, tag;
+      tableCount = Object.keys(tables).length;
+      log2 = Math.log(2);
+      searchRange = Math.floor(Math.log(tableCount) / log2) * 16;
+      entrySelector = Math.floor(searchRange / log2);
+      rangeShift = tableCount * 16 - searchRange;
+      directory = new Data();
+      directory.writeInt(this.scalarType);
+      directory.writeShort(tableCount);
+      directory.writeShort(searchRange);
+      directory.writeShort(entrySelector);
+      directory.writeShort(rangeShift);
+      directoryLength = tableCount * 16;
+      offset = directory.pos + directoryLength;
+      headOffset = null;
+      tableData = [];
+
+      for (tag in tables) {
+        table = tables[tag];
+        directory.writeString(tag);
+        directory.writeInt(checksum(table));
+        directory.writeInt(offset);
+        directory.writeInt(table.length);
+        tableData = tableData.concat(table);
+
+        if (tag === "head") {
+          headOffset = offset;
+        }
+
+        offset += table.length;
+
+        while (offset % 4) {
+          tableData.push(0);
+          offset++;
+        }
+      }
+
+      directory.write(tableData);
+      sum = checksum(directory.data);
+      adjustment = 0xb1b0afba - sum;
+      directory.pos = headOffset + 8;
+      directory.writeUInt32(adjustment);
+      return directory.data;
+    };
+    /***************************************************************/
+
+    /* function : checksum                                         */
+
+    /* comment : Duplicate the table for the tag.                  */
+
+    /***************************************************************/
+
+
+    checksum = function checksum(data) {
+      var i, sum, tmp, _ref;
+
+      data = __slice.call(data);
+
+      while (data.length % 4) {
+        data.push(0);
+      }
+
+      tmp = new Data(data);
+      sum = 0;
+
+      for (i = 0, _ref = data.length; i < _ref; i = i += 4) {
+        sum += tmp.readUInt32();
+      }
+
+      return sum & 0xffffffff;
+    };
+
+    return Directory;
+  }();
+
+  var Table,
+      __hasProp = {}.hasOwnProperty,
+      __extends = function __extends(child, parent) {
+    for (var key in parent) {
+      if (__hasProp.call(parent, key)) child[key] = parent[key];
+    }
+
+    function ctor() {
+      this.constructor = child;
+    }
+
+    ctor.prototype = parent.prototype;
+    child.prototype = new ctor();
+    child.__super__ = parent.prototype;
+    return child;
+  };
+  /***************************************************************/
+
+  /* function : Table                                            */
+
+  /* comment : Save info for each table, and parse the table.    */
+
+  /***************************************************************/
+
+
+  Table = function () {
+    function Table(file) {
+      var info;
+      this.file = file;
+      info = this.file.directory.tables[this.tag];
+      this.exists = !!info;
+
+      if (info) {
+        this.offset = info.offset, this.length = info.length;
+        this.parse(this.file.contents);
+      }
+    }
+
+    Table.prototype.parse = function () {};
+
+    Table.prototype.encode = function () {};
+
+    Table.prototype.raw = function () {
+      if (!this.exists) {
+        return null;
+      }
+
+      this.file.contents.pos = this.offset;
+      return this.file.contents.read(this.length);
+    };
+
+    return Table;
+  }();
+
+  var HeadTable = function (_super) {
+    __extends(HeadTable, _super);
+
+    function HeadTable() {
+      return HeadTable.__super__.constructor.apply(this, arguments);
+    }
+
+    HeadTable.prototype.tag = "head";
+
+    HeadTable.prototype.parse = function (data) {
+      data.pos = this.offset;
+      this.version = data.readInt();
+      this.revision = data.readInt();
+      this.checkSumAdjustment = data.readInt();
+      this.magicNumber = data.readInt();
+      this.flags = data.readShort();
+      this.unitsPerEm = data.readShort();
+      this.created = data.readLongLong();
+      this.modified = data.readLongLong();
+      this.xMin = data.readShort();
+      this.yMin = data.readShort();
+      this.xMax = data.readShort();
+      this.yMax = data.readShort();
+      this.macStyle = data.readShort();
+      this.lowestRecPPEM = data.readShort();
+      this.fontDirectionHint = data.readShort();
+      this.indexToLocFormat = data.readShort();
+      return this.glyphDataFormat = data.readShort();
+    };
+
+    HeadTable.prototype.encode = function (indexToLocFormat) {
+      var table;
+      table = new Data();
+      table.writeInt(this.version);
+      table.writeInt(this.revision);
+      table.writeInt(this.checkSumAdjustment);
+      table.writeInt(this.magicNumber);
+      table.writeShort(this.flags);
+      table.writeShort(this.unitsPerEm);
+      table.writeLongLong(this.created);
+      table.writeLongLong(this.modified);
+      table.writeShort(this.xMin);
+      table.writeShort(this.yMin);
+      table.writeShort(this.xMax);
+      table.writeShort(this.yMax);
+      table.writeShort(this.macStyle);
+      table.writeShort(this.lowestRecPPEM);
+      table.writeShort(this.fontDirectionHint);
+      table.writeShort(indexToLocFormat);
+      table.writeShort(this.glyphDataFormat);
+      return table.data;
+    };
+
+    return HeadTable;
+  }(Table);
+  /************************************************************************************/
+
+  /* function : CmapEntry                                                             */
+
+  /* comment : Cmap Initializes and encodes object information (required by pdf spec).*/
+
+  /************************************************************************************/
+
+
+  var CmapEntry = function () {
+    function CmapEntry(data, offset) {
+      var code, count, endCode, glyphId, glyphIds, i, idDelta, idRangeOffset, index, saveOffset, segCount, segCountX2, start, startCode, tail, _j, _k, _len;
+
+      this.platformID = data.readUInt16();
+      this.encodingID = data.readShort();
+      this.offset = offset + data.readInt();
+      saveOffset = data.pos;
+      data.pos = this.offset;
+      this.format = data.readUInt16();
+      this.length = data.readUInt16();
+      this.language = data.readUInt16();
+      this.isUnicode = this.platformID === 3 && this.encodingID === 1 && this.format === 4 || this.platformID === 0 && this.format === 4;
+      this.codeMap = {};
+
+      switch (this.format) {
+        case 0:
+          for (i = 0; i < 256; ++i) {
+            this.codeMap[i] = data.readByte();
+          }
+
+          break;
+
+        case 4:
+          segCountX2 = data.readUInt16();
+          segCount = segCountX2 / 2;
+          data.pos += 6;
+
+          endCode = function () {
+            var _j, _results;
+
+            _results = [];
+
+            for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) {
+              _results.push(data.readUInt16());
+            }
+
+            return _results;
+          }();
+
+          data.pos += 2;
+
+          startCode = function () {
+            var _j, _results;
+
+            _results = [];
+
+            for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) {
+              _results.push(data.readUInt16());
+            }
+
+            return _results;
+          }();
+
+          idDelta = function () {
+            var _j, _results;
+
+            _results = [];
+
+            for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) {
+              _results.push(data.readUInt16());
+            }
+
+            return _results;
+          }();
+
+          idRangeOffset = function () {
+            var _j, _results;
+
+            _results = [];
+
+            for (i = _j = 0; 0 <= segCount ? _j < segCount : _j > segCount; i = 0 <= segCount ? ++_j : --_j) {
+              _results.push(data.readUInt16());
+            }
+
+            return _results;
+          }();
+
+          count = (this.length - data.pos + this.offset) / 2;
+
+          glyphIds = function () {
+            var _j, _results;
+
+            _results = [];
+
+            for (i = _j = 0; 0 <= count ? _j < count : _j > count; i = 0 <= count ? ++_j : --_j) {
+              _results.push(data.readUInt16());
+            }
+
+            return _results;
+          }();
+
+          for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {
+            tail = endCode[i];
+            start = startCode[i];
+
+            for (code = _k = start; start <= tail ? _k <= tail : _k >= tail; code = start <= tail ? ++_k : --_k) {
+              if (idRangeOffset[i] === 0) {
+                glyphId = code + idDelta[i];
+              } else {
+                index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);
+                glyphId = glyphIds[index] || 0;
+
+                if (glyphId !== 0) {
+                  glyphId += idDelta[i];
+                }
+              }
+
+              this.codeMap[code] = glyphId & 0xffff;
+            }
+          }
+
+      }
+
+      data.pos = saveOffset;
+    }
+
+    CmapEntry.encode = function (charmap, encoding) {
+      var charMap, code, codeMap, codes, delta, deltas, diff, endCode, endCodes, entrySelector, glyphIDs, i, id, indexes, last, map, nextID, offset, old, rangeOffsets, rangeShift, searchRange, segCount, segCountX2, startCode, startCodes, startGlyph, subtable, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _len7, _m, _n, _name, _o, _p, _q;
+
+      subtable = new Data();
+      codes = Object.keys(charmap).sort(function (a, b) {
+        return a - b;
+      });
+
+      switch (encoding) {
+        case "macroman":
+          id = 0;
+
+          indexes = function () {
+            var _results = [];
+
+            for (i = 0; i < 256; ++i) {
+              _results.push(0);
+            }
+
+            return _results;
+          }();
+
+          map = {
+            0: 0
+          };
+          codeMap = {};
+
+          for (_i = 0, _len = codes.length; _i < _len; _i++) {
+            code = codes[_i];
+
+            if (map[_name = charmap[code]] == null) {
+              map[_name] = ++id;
+            }
+
+            codeMap[code] = {
+              old: charmap[code],
+              new: map[charmap[code]]
+            };
+            indexes[code] = map[charmap[code]];
+          }
+
+          subtable.writeUInt16(1);
+          subtable.writeUInt16(0);
+          subtable.writeUInt32(12);
+          subtable.writeUInt16(0);
+          subtable.writeUInt16(262);
+          subtable.writeUInt16(0);
+          subtable.write(indexes);
+          return {
+            charMap: codeMap,
+            subtable: subtable.data,
+            maxGlyphID: id + 1
+          };
+
+        case "unicode":
+          startCodes = [];
+          endCodes = [];
+          nextID = 0;
+          map = {};
+          charMap = {};
+          last = diff = null;
+
+          for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {
+            code = codes[_j];
+            old = charmap[code];
+
+            if (map[old] == null) {
+              map[old] = ++nextID;
+            }
+
+            charMap[code] = {
+              old: old,
+              new: map[old]
+            };
+            delta = map[old] - code;
+
+            if (last == null || delta !== diff) {
+              if (last) {
+                endCodes.push(last);
+              }
+
+              startCodes.push(code);
+              diff = delta;
+            }
+
+            last = code;
+          }
+
+          if (last) {
+            endCodes.push(last);
+          }
+
+          endCodes.push(0xffff);
+          startCodes.push(0xffff);
+          segCount = startCodes.length;
+          segCountX2 = segCount * 2;
+          searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);
+          entrySelector = Math.log(searchRange / 2) / Math.LN2;
+          rangeShift = 2 * segCount - searchRange;
+          deltas = [];
+          rangeOffsets = [];
+          glyphIDs = [];
+
+          for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {
+            startCode = startCodes[i];
+            endCode = endCodes[i];
+
+            if (startCode === 0xffff) {
+              deltas.push(0);
+              rangeOffsets.push(0);
+              break;
+            }
+
+            startGlyph = charMap[startCode]["new"];
+
+            if (startCode - startGlyph >= 0x8000) {
+              deltas.push(0);
+              rangeOffsets.push(2 * (glyphIDs.length + segCount - i));
+
+              for (code = _l = startCode; startCode <= endCode ? _l <= endCode : _l >= endCode; code = startCode <= endCode ? ++_l : --_l) {
+                glyphIDs.push(charMap[code]["new"]);
+              }
+            } else {
+              deltas.push(startGlyph - startCode);
+              rangeOffsets.push(0);
+            }
+          }
+
+          subtable.writeUInt16(3);
+          subtable.writeUInt16(1);
+          subtable.writeUInt32(12);
+          subtable.writeUInt16(4);
+          subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);
+          subtable.writeUInt16(0);
+          subtable.writeUInt16(segCountX2);
+          subtable.writeUInt16(searchRange);
+          subtable.writeUInt16(entrySelector);
+          subtable.writeUInt16(rangeShift);
+
+          for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {
+            code = endCodes[_m];
+            subtable.writeUInt16(code);
+          }
+
+          subtable.writeUInt16(0);
+
+          for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {
+            code = startCodes[_n];
+            subtable.writeUInt16(code);
+          }
+
+          for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {
+            delta = deltas[_o];
+            subtable.writeUInt16(delta);
+          }
+
+          for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {
+            offset = rangeOffsets[_p];
+            subtable.writeUInt16(offset);
+          }
+
+          for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {
+            id = glyphIDs[_q];
+            subtable.writeUInt16(id);
+          }
+
+          return {
+            charMap: charMap,
+            subtable: subtable.data,
+            maxGlyphID: nextID + 1
+          };
+      }
+    };
+
+    return CmapEntry;
+  }();
+
+  var CmapTable = function (_super) {
+    __extends(CmapTable, _super);
+
+    function CmapTable() {
+      return CmapTable.__super__.constructor.apply(this, arguments);
+    }
+
+    CmapTable.prototype.tag = "cmap";
+
+    CmapTable.prototype.parse = function (data) {
+      var entry, i, tableCount;
+      data.pos = this.offset;
+      this.version = data.readUInt16();
+      tableCount = data.readUInt16();
+      this.tables = [];
+      this.unicode = null;
+
+      for (i = 0; 0 <= tableCount ? i < tableCount : i > tableCount; i = 0 <= tableCount ? ++i : --i) {
+        entry = new CmapEntry(data, this.offset);
+        this.tables.push(entry);
+
+        if (entry.isUnicode) {
+          if (this.unicode == null) {
+            this.unicode = entry;
+          }
+        }
+      }
+
+      return true;
+    };
+    /*************************************************************************/
+
+    /* function : encode                                                     */
+
+    /* comment : Encode the cmap table corresponding to the input character. */
+
+    /*************************************************************************/
+
+
+    CmapTable.encode = function (charmap, encoding) {
+      var result, table;
+
+      if (encoding == null) {
+        encoding = "macroman";
+      }
+
+      result = CmapEntry.encode(charmap, encoding);
+      table = new Data();
+      table.writeUInt16(0);
+      table.writeUInt16(1);
+      result.table = table.data.concat(result.subtable);
+      return result;
+    };
+
+    return CmapTable;
+  }(Table);
+
+  var HheaTable = function (_super) {
+    __extends(HheaTable, _super);
+
+    function HheaTable() {
+      return HheaTable.__super__.constructor.apply(this, arguments);
+    }
+
+    HheaTable.prototype.tag = "hhea";
+
+    HheaTable.prototype.parse = function (data) {
+      data.pos = this.offset;
+      this.version = data.readInt();
+      this.ascender = data.readShort();
+      this.decender = data.readShort();
+      this.lineGap = data.readShort();
+      this.advanceWidthMax = data.readShort();
+      this.minLeftSideBearing = data.readShort();
+      this.minRightSideBearing = data.readShort();
+      this.xMaxExtent = data.readShort();
+      this.caretSlopeRise = data.readShort();
+      this.caretSlopeRun = data.readShort();
+      this.caretOffset = data.readShort();
+      data.pos += 4 * 2;
+      this.metricDataFormat = data.readShort();
+      return this.numberOfMetrics = data.readUInt16();
+    };
+    /*HheaTable.prototype.encode = function (ids) {
+              var i, table, _i, _ref;
+              table = new Data;
+              table.writeInt(this.version);
+              table.writeShort(this.ascender);
+              table.writeShort(this.decender);
+              table.writeShort(this.lineGap);
+              table.writeShort(this.advanceWidthMax);
+              table.writeShort(this.minLeftSideBearing);
+              table.writeShort(this.minRightSideBearing);
+              table.writeShort(this.xMaxExtent);
+              table.writeShort(this.caretSlopeRise);
+              table.writeShort(this.caretSlopeRun);
+              table.writeShort(this.caretOffset);
+              for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+                  table.writeByte(0);
+              }
+              table.writeShort(this.metricDataFormat);
+              table.writeUInt16(ids.length);
+              return table.data;
+          };*/
+
+
+    return HheaTable;
+  }(Table);
+
+  var OS2Table = function (_super) {
+    __extends(OS2Table, _super);
+
+    function OS2Table() {
+      return OS2Table.__super__.constructor.apply(this, arguments);
+    }
+
+    OS2Table.prototype.tag = "OS/2";
+
+    OS2Table.prototype.parse = function (data) {
+      data.pos = this.offset;
+      this.version = data.readUInt16();
+      this.averageCharWidth = data.readShort();
+      this.weightClass = data.readUInt16();
+      this.widthClass = data.readUInt16();
+      this.type = data.readShort();
+      this.ySubscriptXSize = data.readShort();
+      this.ySubscriptYSize = data.readShort();
+      this.ySubscriptXOffset = data.readShort();
+      this.ySubscriptYOffset = data.readShort();
+      this.ySuperscriptXSize = data.readShort();
+      this.ySuperscriptYSize = data.readShort();
+      this.ySuperscriptXOffset = data.readShort();
+      this.ySuperscriptYOffset = data.readShort();
+      this.yStrikeoutSize = data.readShort();
+      this.yStrikeoutPosition = data.readShort();
+      this.familyClass = data.readShort();
+
+      this.panose = function () {
+        var i, _results;
+
+        _results = [];
+
+        for (i = 0; i < 10; ++i) {
+          _results.push(data.readByte());
+        }
+
+        return _results;
+      }();
+
+      this.charRange = function () {
+        var i, _results;
+
+        _results = [];
+
+        for (i = 0; i < 4; ++i) {
+          _results.push(data.readInt());
+        }
+
+        return _results;
+      }();
+
+      this.vendorID = data.readString(4);
+      this.selection = data.readShort();
+      this.firstCharIndex = data.readShort();
+      this.lastCharIndex = data.readShort();
+
+      if (this.version > 0) {
+        this.ascent = data.readShort();
+        this.descent = data.readShort();
+        this.lineGap = data.readShort();
+        this.winAscent = data.readShort();
+        this.winDescent = data.readShort();
+
+        this.codePageRange = function () {
+          var i, _results;
+
+          _results = [];
+
+          for (i = 0; i < 2; i = ++i) {
+            _results.push(data.readInt());
+          }
+
+          return _results;
+        }();
+
+        if (this.version > 1) {
+          this.xHeight = data.readShort();
+          this.capHeight = data.readShort();
+          this.defaultChar = data.readShort();
+          this.breakChar = data.readShort();
+          return this.maxContext = data.readShort();
+        }
+      }
+    };
+    /*OS2Table.prototype.encode = function () {
+              return this.raw();
+          };*/
+
+
+    return OS2Table;
+  }(Table);
+
+  var PostTable = function (_super) {
+
+    __extends(PostTable, _super);
+
+    function PostTable() {
+      return PostTable.__super__.constructor.apply(this, arguments);
+    }
+
+    PostTable.prototype.tag = "post";
+
+    PostTable.prototype.parse = function (data) {
+      var length, numberOfGlyphs, _results;
+
+      data.pos = this.offset;
+      this.format = data.readInt();
+      this.italicAngle = data.readInt();
+      this.underlinePosition = data.readShort();
+      this.underlineThickness = data.readShort();
+      this.isFixedPitch = data.readInt();
+      this.minMemType42 = data.readInt();
+      this.maxMemType42 = data.readInt();
+      this.minMemType1 = data.readInt();
+      this.maxMemType1 = data.readInt();
+
+      switch (this.format) {
+        case 0x00010000:
+          break;
+
+        case 0x00020000:
+          numberOfGlyphs = data.readUInt16();
+          this.glyphNameIndex = [];
+          var i;
+
+          for (i = 0; 0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs; i = 0 <= numberOfGlyphs ? ++i : --i) {
+            this.glyphNameIndex.push(data.readUInt16());
+          }
+
+          this.names = [];
+          _results = [];
+
+          while (data.pos < this.offset + this.length) {
+            length = data.readByte();
+
+            _results.push(this.names.push(data.readString(length)));
+          }
+
+          return _results;
+
+        case 0x00025000:
+          numberOfGlyphs = data.readUInt16();
+          return this.offsets = data.read(numberOfGlyphs);
+
+        case 0x00030000:
+          break;
+
+        case 0x00040000:
+          return this.map = function () {
+            var _j, _ref, _results1;
+
+            _results1 = [];
+
+            for (i = _j = 0, _ref = this.file.maxp.numGlyphs; 0 <= _ref ? _j < _ref : _j > _ref; i = 0 <= _ref ? ++_j : --_j) {
+              _results1.push(data.readUInt32());
+            }
+
+            return _results1;
+          }.call(this);
+      }
+    };
+    return PostTable;
+  }(Table);
+  /*********************************************************************************************************/
+
+  /* function : NameEntry                                                                                  */
+
+  /* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/
+
+  /*********************************************************************************************************/
+
+
+  var NameEntry = function () {
+    function NameEntry(raw, entry) {
+      this.raw = raw;
+      this.length = raw.length;
+      this.platformID = entry.platformID;
+      this.encodingID = entry.encodingID;
+      this.languageID = entry.languageID;
+    }
+
+    return NameEntry;
+  }();
+
+  var NameTable = function (_super) {
+
+    __extends(NameTable, _super);
+
+    function NameTable() {
+      return NameTable.__super__.constructor.apply(this, arguments);
+    }
+
+    NameTable.prototype.tag = "name";
+
+    NameTable.prototype.parse = function (data) {
+      var count, entries, entry, i, name, stringOffset, strings, text, _j, _len, _name;
+
+      data.pos = this.offset;
+      data.readShort(); //format
+
+      count = data.readShort();
+      stringOffset = data.readShort();
+      entries = [];
+
+      for (i = 0; 0 <= count ? i < count : i > count; i = 0 <= count ? ++i : --i) {
+        entries.push({
+          platformID: data.readShort(),
+          encodingID: data.readShort(),
+          languageID: data.readShort(),
+          nameID: data.readShort(),
+          length: data.readShort(),
+          offset: this.offset + stringOffset + data.readShort()
+        });
+      }
+
+      strings = {};
+
+      for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {
+        entry = entries[i];
+        data.pos = entry.offset;
+        text = data.readString(entry.length);
+        name = new NameEntry(text, entry);
+
+        if (strings[_name = entry.nameID] == null) {
+          strings[_name] = [];
+        }
+
+        strings[entry.nameID].push(name);
+      }
+
+      this.strings = strings;
+      this.copyright = strings[0];
+      this.fontFamily = strings[1];
+      this.fontSubfamily = strings[2];
+      this.uniqueSubfamily = strings[3];
+      this.fontName = strings[4];
+      this.version = strings[5];
+
+      try {
+        this.postscriptName = strings[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g, "");
+      } catch (e) {
+        this.postscriptName = strings[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g, "");
+      }
+
+      this.trademark = strings[7];
+      this.manufacturer = strings[8];
+      this.designer = strings[9];
+      this.description = strings[10];
+      this.vendorUrl = strings[11];
+      this.designerUrl = strings[12];
+      this.license = strings[13];
+      this.licenseUrl = strings[14];
+      this.preferredFamily = strings[15];
+      this.preferredSubfamily = strings[17];
+      this.compatibleFull = strings[18];
+      return this.sampleText = strings[19];
+    };
+    /*NameTable.prototype.encode = function () {
+              var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;
+              strings = {};
+              _ref = this.strings;
+              for (id in _ref) {
+                  val = _ref[id];
+                  strings[id] = val;
+              }
+              postscriptName = new NameEntry("" + subsetTag + "+" + this.postscriptName, {
+                  platformID: 1
+                  , encodingID: 0
+                  , languageID: 0
+              });
+              strings[6] = [postscriptName];
+              subsetTag = successorOf(subsetTag);
+              strCount = 0;
+              for (id in strings) {
+                  list = strings[id];
+                  if (list != null) {
+                      strCount += list.length;
+                  }
+              }
+              table = new Data;
+              strTable = new Data;
+              table.writeShort(0);
+              table.writeShort(strCount);
+              table.writeShort(6 + 12 * strCount);
+              for (nameID in strings) {
+                  list = strings[nameID];
+                  if (list != null) {
+                      for (_i = 0, _len = list.length; _i < _len; _i++) {
+                          string = list[_i];
+                          table.writeShort(string.platformID);
+                          table.writeShort(string.encodingID);
+                          table.writeShort(string.languageID);
+                          table.writeShort(nameID);
+                          table.writeShort(string.length);
+                          table.writeShort(strTable.pos);
+                          strTable.writeString(string.raw);
+                      }
+                  }
+              }
+              return nameTable = {
+                  postscriptName: postscriptName.raw
+                  , table: table.data.concat(strTable.data)
+              };
+          };*/
+
+    return NameTable;
+  }(Table);
+
+  var MaxpTable = function (_super) {
+    __extends(MaxpTable, _super);
+
+    function MaxpTable() {
+      return MaxpTable.__super__.constructor.apply(this, arguments);
+    }
+
+    MaxpTable.prototype.tag = "maxp";
+
+    MaxpTable.prototype.parse = function (data) {
+      data.pos = this.offset;
+      this.version = data.readInt();
+      this.numGlyphs = data.readUInt16();
+      this.maxPoints = data.readUInt16();
+      this.maxContours = data.readUInt16();
+      this.maxCompositePoints = data.readUInt16();
+      this.maxComponentContours = data.readUInt16();
+      this.maxZones = data.readUInt16();
+      this.maxTwilightPoints = data.readUInt16();
+      this.maxStorage = data.readUInt16();
+      this.maxFunctionDefs = data.readUInt16();
+      this.maxInstructionDefs = data.readUInt16();
+      this.maxStackElements = data.readUInt16();
+      this.maxSizeOfInstructions = data.readUInt16();
+      this.maxComponentElements = data.readUInt16();
+      return this.maxComponentDepth = data.readUInt16();
+    };
+    /*MaxpTable.prototype.encode = function (ids) {
+              var table;
+              table = new Data;
+              table.writeInt(this.version);
+              table.writeUInt16(ids.length);
+              table.writeUInt16(this.maxPoints);
+              table.writeUInt16(this.maxContours);
+              table.writeUInt16(this.maxCompositePoints);
+              table.writeUInt16(this.maxComponentContours);
+              table.writeUInt16(this.maxZones);
+              table.writeUInt16(this.maxTwilightPoints);
+              table.writeUInt16(this.maxStorage);
+              table.writeUInt16(this.maxFunctionDefs);
+              table.writeUInt16(this.maxInstructionDefs);
+              table.writeUInt16(this.maxStackElements);
+              table.writeUInt16(this.maxSizeOfInstructions);
+              table.writeUInt16(this.maxComponentElements);
+              table.writeUInt16(this.maxComponentDepth);
+              return table.data;
+          };*/
+
+
+    return MaxpTable;
+  }(Table);
+
+  var HmtxTable = function (_super) {
+    __extends(HmtxTable, _super);
+
+    function HmtxTable() {
+      return HmtxTable.__super__.constructor.apply(this, arguments);
+    }
+
+    HmtxTable.prototype.tag = "hmtx";
+
+    HmtxTable.prototype.parse = function (data) {
+      var i, last, lsbCount, m, _j, _ref, _results;
+
+      data.pos = this.offset;
+      this.metrics = [];
+
+      for (i = 0, _ref = this.file.hhea.numberOfMetrics; 0 <= _ref ? i < _ref : i > _ref; i = 0 <= _ref ? ++i : --i) {
+        this.metrics.push({
+          advance: data.readUInt16(),
+          lsb: data.readInt16()
+        });
+      }
+
+      lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;
+
+      this.leftSideBearings = function () {
+        var _j, _results;
+
+        _results = [];
+
+        for (i = _j = 0; 0 <= lsbCount ? _j < lsbCount : _j > lsbCount; i = 0 <= lsbCount ? ++_j : --_j) {
+          _results.push(data.readInt16());
+        }
+
+        return _results;
+      }();
+
+      this.widths = function () {
+        var _j, _len, _ref1, _results;
+
+        _ref1 = this.metrics;
+        _results = [];
+
+        for (_j = 0, _len = _ref1.length; _j < _len; _j++) {
+          m = _ref1[_j];
+
+          _results.push(m.advance);
+        }
+
+        return _results;
+      }.call(this);
+
+      last = this.widths[this.widths.length - 1];
+      _results = [];
+
+      for (i = _j = 0; 0 <= lsbCount ? _j < lsbCount : _j > lsbCount; i = 0 <= lsbCount ? ++_j : --_j) {
+        _results.push(this.widths.push(last));
+      }
+
+      return _results;
+    };
+    /***************************************************************/
+
+    /* function : forGlyph                                         */
+
+    /* comment : Returns the advance width and lsb for this glyph. */
+
+    /***************************************************************/
+
+
+    HmtxTable.prototype.forGlyph = function (id) {
+      if (id in this.metrics) {
+        return this.metrics[id];
+      }
+
+      return {
+        advance: this.metrics[this.metrics.length - 1].advance,
+        lsb: this.leftSideBearings[id - this.metrics.length]
+      };
+    };
+    /*HmtxTable.prototype.encode = function (mapping) {
+              var id, metric, table, _i, _len;
+              table = new Data;
+              for (_i = 0, _len = mapping.length; _i < _len; _i++) {
+                  id = mapping[_i];
+                  metric = this.forGlyph(id);
+                  table.writeUInt16(metric.advance);
+                  table.writeUInt16(metric.lsb);
+              }
+              return table.data;
+          };*/
+
+
+    return HmtxTable;
+  }(Table);
+
+  var __slice = [].slice;
+
+  var GlyfTable = function (_super) {
+    __extends(GlyfTable, _super);
+
+    function GlyfTable() {
+      return GlyfTable.__super__.constructor.apply(this, arguments);
+    }
+
+    GlyfTable.prototype.tag = "glyf";
+
+    GlyfTable.prototype.parse = function () {
+      return this.cache = {};
+    };
+
+    GlyfTable.prototype.glyphFor = function (id) {
+      var data, index, length, loca, numberOfContours, raw, xMax, xMin, yMax, yMin;
+
+      if (id in this.cache) {
+        return this.cache[id];
+      }
+
+      loca = this.file.loca;
+      data = this.file.contents;
+      index = loca.indexOf(id);
+      length = loca.lengthOf(id);
+
+      if (length === 0) {
+        return this.cache[id] = null;
+      }
+
+      data.pos = this.offset + index;
+      raw = new Data(data.read(length));
+      numberOfContours = raw.readShort();
+      xMin = raw.readShort();
+      yMin = raw.readShort();
+      xMax = raw.readShort();
+      yMax = raw.readShort();
+
+      if (numberOfContours === -1) {
+        this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);
+      } else {
+        this.cache[id] = new SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax);
+      }
+
+      return this.cache[id];
+    };
+
+    GlyfTable.prototype.encode = function (glyphs, mapping, old2new) {
+      var glyph, id, offsets, table, _i, _len;
+
+      table = [];
+      offsets = [];
+
+      for (_i = 0, _len = mapping.length; _i < _len; _i++) {
+        id = mapping[_i];
+        glyph = glyphs[id];
+        offsets.push(table.length);
+
+        if (glyph) {
+          table = table.concat(glyph.encode(old2new));
+        }
+      }
+
+      offsets.push(table.length);
+      return {
+        table: table,
+        offsets: offsets
+      };
+    };
+
+    return GlyfTable;
+  }(Table);
+
+  var SimpleGlyph = function () {
+    /**************************************************************************/
+
+    /* function : SimpleGlyph                                                 */
+
+    /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/
+
+    /**************************************************************************/
+    function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {
+      this.raw = raw;
+      this.numberOfContours = numberOfContours;
+      this.xMin = xMin;
+      this.yMin = yMin;
+      this.xMax = xMax;
+      this.yMax = yMax;
+      this.compound = false;
+    }
+
+    SimpleGlyph.prototype.encode = function () {
+      return this.raw.data;
+    };
+
+    return SimpleGlyph;
+  }();
+
+  var CompoundGlyph = function () {
+    var ARG_1_AND_2_ARE_WORDS, MORE_COMPONENTS, WE_HAVE_AN_X_AND_Y_SCALE, WE_HAVE_A_SCALE, WE_HAVE_A_TWO_BY_TWO;
+    ARG_1_AND_2_ARE_WORDS = 0x0001;
+    WE_HAVE_A_SCALE = 0x0008;
+    MORE_COMPONENTS = 0x0020;
+    WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;
+    WE_HAVE_A_TWO_BY_TWO = 0x0080;
+    /********************************************************************************************************************/
+
+    /* function : CompoundGlypg generator                                                                               */
+
+    /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/
+
+    /********************************************************************************************************************/
+
+    function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {
+      var data, flags;
+      this.raw = raw;
+      this.xMin = xMin;
+      this.yMin = yMin;
+      this.xMax = xMax;
+      this.yMax = yMax;
+      this.compound = true;
+      this.glyphIDs = [];
+      this.glyphOffsets = [];
+      data = this.raw;
+
+      while (true) {
+        flags = data.readShort();
+        this.glyphOffsets.push(data.pos);
+        this.glyphIDs.push(data.readUInt16());
+
+        if (!(flags & MORE_COMPONENTS)) {
+          break;
+        }
+
+        if (flags & ARG_1_AND_2_ARE_WORDS) {
+          data.pos += 4;
+        } else {
+          data.pos += 2;
+        }
+
+        if (flags & WE_HAVE_A_TWO_BY_TWO) {
+          data.pos += 8;
+        } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {
+          data.pos += 4;
+        } else if (flags & WE_HAVE_A_SCALE) {
+          data.pos += 2;
+        }
+      }
+    }
+    /****************************************************************************************************************/
+
+    /* function : CompoundGlypg encode                                                                              */
+
+    /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/
+
+    /****************************************************************************************************************/
+
+
+    CompoundGlyph.prototype.encode = function () {
+      var i, result, _len, _ref;
+
+      result = new Data(__slice.call(this.raw.data));
+      _ref = this.glyphIDs;
+
+      for (i = 0, _len = _ref.length; i < _len; ++i) {
+        result.pos = this.glyphOffsets[i];
+      }
+
+      return result.data;
+    };
+
+    return CompoundGlyph;
+  }();
+
+  var LocaTable = function (_super) {
+    __extends(LocaTable, _super);
+
+    function LocaTable() {
+      return LocaTable.__super__.constructor.apply(this, arguments);
+    }
+
+    LocaTable.prototype.tag = "loca";
+
+    LocaTable.prototype.parse = function (data) {
+      var format, i;
+      data.pos = this.offset;
+      format = this.file.head.indexToLocFormat;
+
+      if (format === 0) {
+        return this.offsets = function () {
+          var _ref, _results;
+
+          _results = [];
+
+          for (i = 0, _ref = this.length; i < _ref; i += 2) {
+            _results.push(data.readUInt16() * 2);
+          }
+
+          return _results;
+        }.call(this);
+      } else {
+        return this.offsets = function () {
+          var _ref, _results;
+
+          _results = [];
+
+          for (i = 0, _ref = this.length; i < _ref; i += 4) {
+            _results.push(data.readUInt32());
+          }
+
+          return _results;
+        }.call(this);
+      }
+    };
+
+    LocaTable.prototype.indexOf = function (id) {
+      return this.offsets[id];
+    };
+
+    LocaTable.prototype.lengthOf = function (id) {
+      return this.offsets[id + 1] - this.offsets[id];
+    };
+
+    LocaTable.prototype.encode = function (offsets, activeGlyphs) {
+      var LocaTable = new Uint32Array(this.offsets.length);
+      var glyfPtr = 0;
+      var listGlyf = 0;
+
+      for (var k = 0; k < LocaTable.length; ++k) {
+        LocaTable[k] = glyfPtr;
+
+        if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {
+          ++listGlyf;
+          LocaTable[k] = glyfPtr;
+          var start = this.offsets[k];
+          var len = this.offsets[k + 1] - start;
+
+          if (len > 0) {
+            glyfPtr += len;
+          }
+        }
+      }
+
+      var newLocaTable = new Array(LocaTable.length * 4);
+
+      for (var j = 0; j < LocaTable.length; ++j) {
+        newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;
+        newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;
+        newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;
+        newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;
+      }
+
+      return newLocaTable;
+    };
+
+    return LocaTable;
+  }(Table);
+  /************************************************************************************/
+
+  /* function : invert                                                                */
+
+  /* comment : Change the object's (key: value) to create an object with (value: key).*/
+
+  /************************************************************************************/
+
+
+  var invert = function invert(object) {
+    var key, ret, val;
+    ret = {};
+
+    for (key in object) {
+      val = object[key];
+      ret[val] = key;
+    }
+
+    return ret;
+  };
+  /*var successorOf = function (input) {
+          var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;
+          alphabet = 'abcdefghijklmnopqrstuvwxyz';
+          length = alphabet.length;
+          result = input;
+          i = input.length;
+          while (i >= 0) {
+              last = input.charAt(--i);
+              if (isNaN(last)) {
+                  index = alphabet.indexOf(last.toLowerCase());
+                  if (index === -1) {
+                      next = last;
+                      carry = true;
+                  }
+                  else {
+                      next = alphabet.charAt((index + 1) % length);
+                      isUpperCase = last === last.toUpperCase();
+                      if (isUpperCase) {
+                          next = next.toUpperCase();
+                      }
+                      carry = index + 1 >= length;
+                      if (carry && i === 0) {
+                          added = isUpperCase ? 'A' : 'a';
+                          result = added + next + result.slice(1);
+                          break;
+                      }
+                  }
+              }
+              else {
+                  next = +last + 1;
+                  carry = next > 9;
+                  if (carry) {
+                      next = 0;
+                  }
+                  if (carry && i === 0) {
+                      result = '1' + next + result.slice(1);
+                      break;
+                  }
+              }
+              result = result.slice(0, i) + next + result.slice(i + 1);
+              if (!carry) {
+                  break;
+              }
+          }
+          return result;
+      };*/
+
+
+  var Subset = function () {
+    function Subset(font) {
+      this.font = font;
+      this.subset = {};
+      this.unicodes = {};
+      this.next = 33;
+    }
+    /*Subset.prototype.use = function (character) {
+              var i, _i, _ref;
+              if (typeof character === 'string') {
+                  for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+                      this.use(character.charCodeAt(i));
+                  }
+                  return;
+              }
+              if (!this.unicodes[character]) {
+                  this.subset[this.next] = character;
+                  return this.unicodes[character] = this.next++;
+              }
+          };*/
+
+    /*Subset.prototype.encodeText = function (text) {
+              var char, i, string, _i, _ref;
+              string = '';
+              for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
+                  char = this.unicodes[text.charCodeAt(i)];
+                  string += String.fromCharCode(char);
+              }
+              return string;
+          };*/
+
+    /***************************************************************/
+
+    /* function : generateCmap                                     */
+
+    /* comment : Returns the unicode cmap for this font.         */
+
+    /***************************************************************/
+
+
+    Subset.prototype.generateCmap = function () {
+      var mapping, roman, unicode, unicodeCmap, _ref;
+
+      unicodeCmap = this.font.cmap.tables[0].codeMap;
+      mapping = {};
+      _ref = this.subset;
+
+      for (roman in _ref) {
+        unicode = _ref[roman];
+        mapping[roman] = unicodeCmap[unicode];
+      }
+
+      return mapping;
+    };
+    /*Subset.prototype.glyphIDs = function () {
+              var ret, roman, unicode, unicodeCmap, val, _ref;
+              unicodeCmap = this.font.cmap.tables[0].codeMap;
+              ret = [0];
+              _ref = this.subset;
+              for (roman in _ref) {
+                  unicode = _ref[roman];
+                  val = unicodeCmap[unicode];
+                  if ((val != null) && __indexOf.call(ret, val) < 0) {
+                      ret.push(val);
+                  }
+              }
+              return ret.sort();
+          };*/
+
+    /******************************************************************/
+
+    /* function : glyphsFor                                           */
+
+    /* comment : Returns simple glyph objects for the input character.*/
+
+    /******************************************************************/
+
+
+    Subset.prototype.glyphsFor = function (glyphIDs) {
+      var additionalIDs, glyph, glyphs, id, _i, _len, _ref;
+
+      glyphs = {};
+
+      for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {
+        id = glyphIDs[_i];
+        glyphs[id] = this.font.glyf.glyphFor(id);
+      }
+
+      additionalIDs = [];
+
+      for (id in glyphs) {
+        glyph = glyphs[id];
+
+        if (glyph != null ? glyph.compound : void 0) {
+          additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);
+        }
+      }
+
+      if (additionalIDs.length > 0) {
+        _ref = this.glyphsFor(additionalIDs);
+
+        for (id in _ref) {
+          glyph = _ref[id];
+          glyphs[id] = glyph;
+        }
+      }
+
+      return glyphs;
+    };
+    /***************************************************************/
+
+    /* function : encode                                           */
+
+    /* comment : Encode various tables for the characters you use. */
+
+    /***************************************************************/
+
+
+    Subset.prototype.encode = function (glyID, indexToLocFormat) {
+      var cmap, code, glyf, glyphs, id, ids, loca, new2old, newIDs, nextGlyphID, old2new, oldID, oldIDs, tables, _ref;
+
+      cmap = CmapTable.encode(this.generateCmap(), "unicode");
+      glyphs = this.glyphsFor(glyID);
+      old2new = {
+        0: 0
+      };
+      _ref = cmap.charMap;
+
+      for (code in _ref) {
+        ids = _ref[code];
+        old2new[ids.old] = ids["new"];
+      }
+
+      nextGlyphID = cmap.maxGlyphID;
+
+      for (oldID in glyphs) {
+        if (!(oldID in old2new)) {
+          old2new[oldID] = nextGlyphID++;
+        }
+      }
+
+      new2old = invert(old2new);
+      newIDs = Object.keys(new2old).sort(function (a, b) {
+        return a - b;
+      });
+
+      oldIDs = function () {
+        var _i, _len, _results;
+
+        _results = [];
+
+        for (_i = 0, _len = newIDs.length; _i < _len; _i++) {
+          id = newIDs[_i];
+
+          _results.push(new2old[id]);
+        }
+
+        return _results;
+      }();
+
+      glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);
+      loca = this.font.loca.encode(glyf.offsets, oldIDs);
+      tables = {
+        cmap: this.font.cmap.raw(),
+        glyf: glyf.table,
+        loca: loca,
+        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(indexToLocFormat)
+      };
+
+      if (this.font.os2.exists) {
+        tables["OS/2"] = this.font.os2.raw();
+      }
+
+      return this.font.directory.encode(tables);
+    };
+
+    return Subset;
+  }();
+
+  jsPDF.API.PDFObject = function () {
+    var pad;
+
+    function PDFObject() {}
+
+    pad = function pad(str, length) {
+      return (Array(length + 1).join("0") + str).slice(-length);
+    };
+    /*****************************************************************************/
+
+    /* function : convert                                                        */
+
+    /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */
+
+    /*****************************************************************************/
+
+
+    PDFObject.convert = function (object) {
+      var e, items, key, out, val;
+
+      if (Array.isArray(object)) {
+        items = function () {
+          var _i, _len, _results;
+
+          _results = [];
+
+          for (_i = 0, _len = object.length; _i < _len; _i++) {
+            e = object[_i];
+
+            _results.push(PDFObject.convert(e));
+          }
+
+          return _results;
+        }().join(" ");
+
+        return "[" + items + "]";
+      } else if (typeof object === "string") {
+        return "/" + object;
+      } else if (object != null ? object.isString : void 0) {
+        return "(" + object + ")";
+      } else if (object instanceof Date) {
+        return "(D:" + pad(object.getUTCFullYear(), 4) + pad(object.getUTCMonth(), 2) + pad(object.getUTCDate(), 2) + pad(object.getUTCHours(), 2) + pad(object.getUTCMinutes(), 2) + pad(object.getUTCSeconds(), 2) + "Z)";
+      } else if ({}.toString.call(object) === "[object Object]") {
+        out = ["<<"];
+
+        for (key in object) {
+          val = object[key];
+          out.push("/" + key + " " + PDFObject.convert(val));
+        }
+
+        out.push(">>");
+        return out.join("\n");
+      } else {
+        return "" + object;
+      }
+    };
+
+    return PDFObject;
+  }();
+
+  exports.AcroForm = AcroForm;
+  exports.AcroFormAppearance = AcroFormAppearance;
+  exports.AcroFormButton = AcroFormButton;
+  exports.AcroFormCheckBox = AcroFormCheckBox;
+  exports.AcroFormChoiceField = AcroFormChoiceField;
+  exports.AcroFormComboBox = AcroFormComboBox;
+  exports.AcroFormEditBox = AcroFormEditBox;
+  exports.AcroFormListBox = AcroFormListBox;
+  exports.AcroFormPasswordField = AcroFormPasswordField;
+  exports.AcroFormPushButton = AcroFormPushButton;
+  exports.AcroFormRadioButton = AcroFormRadioButton;
+  exports.AcroFormTextField = AcroFormTextField;
+  exports.GState = GState;
+  exports.ShadingPattern = ShadingPattern;
+  exports.TilingPattern = TilingPattern;
+  exports.default = jsPDF;
+  exports.jsPDF = jsPDF;
+
+  Object.defineProperty(exports, '__esModule', { value: true });
+
+})));
+//# sourceMappingURL=jspdf.umd.js.map
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.umd.js.map
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.umd.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.umd.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"jspdf.umd.js","sources":["../src/libs/globalObject.js","../src/libs/console.js","../src/libs/FileSaver.js","../src/libs/rgbcolor.js","../src/libs/AtobBtoa.js","../src/libs/md5.js","../src/libs/rc4.js","../src/libs/pdfsecurity.js","../src/libs/pdfname.js","../src/jspdf.js","../src/modules/acroform.js","../src/modules/addimage.js","../src/modules/annotations.js","../src/modules/arabic.js","../src/modules/autoprint.js","../src/modules/canvas.js","../src/modules/cell.js","../src/libs/fontFace.js","../src/modules/context2d.js","../node_modules/fflate/esm/browser.js","../src/modules/filters.js","../src/modules/fileloading.js","../src/modules/html.js","../src/modules/javascript.js","../src/modules/outline.js","../src/modules/jpeg_support.js","../src/libs/png.js","../src/modules/png_support.js","../src/libs/omggif.js","../src/libs/JPEGEncoder.js","../src/modules/gif_support.js","../src/libs/BMPDecoder.js","../src/modules/bmp_support.js","../src/libs/WebPDecoder.js","../src/modules/webp_support.js","../src/modules/rgba_support.js","../src/modules/setlanguage.js","../src/modules/split_text_to_size.js","../src/modules/standard_fonts_metrics.js","../src/modules/ttfsupport.js","../src/modules/svg.js","../src/modules/total_pages.js","../src/modules/viewerpreferences.js","../src/modules/xmp_metadata.js","../src/modules/utf8.js","../src/modules/vfs.js","../src/libs/bidiEngine.js","../src/libs/ttffont.js"],"sourcesContent":["export var globalObject = (function() {\n  return \"undefined\" !== typeof window\n    ? window\n    : \"undefined\" !== typeof global\n    ? global\n    : \"undefined\" !== typeof self\n    ? self\n    : this;\n})();\n","import { globalObject } from \"./globalObject.js\";\n\nfunction consoleLog() {\n  if (globalObject.console && typeof globalObject.console.log === \"function\") {\n    globalObject.console.log.apply(globalObject.console, arguments);\n  }\n}\n\nfunction consoleWarn(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.warn === \"function\") {\n      globalObject.console.warn.apply(globalObject.console, arguments);\n    } else {\n      consoleLog.call(null, arguments);\n    }\n  }\n}\n\nfunction consoleError(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.error === \"function\") {\n      globalObject.console.error.apply(globalObject.console, arguments);\n    } else {\n      consoleLog(str);\n    }\n  }\n}\nexport var console = {\n  log: consoleLog,\n  warn: consoleWarn,\n  error: consoleError\n};\n","/**\n * @license\n * FileSaver.js\n * A saveAs() FileSaver implementation.\n *\n * By Eli Grey, http://eligrey.com\n *\n * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)\n * source  : http://purl.eligrey.com/github/FileSaver.js\n */\n\nimport { globalObject as _global } from \"./globalObject.js\";\nimport { console } from \"./console.js\";\n\nfunction bom(blob, opts) {\n  if (typeof opts === \"undefined\") opts = { autoBom: false };\n  else if (typeof opts !== \"object\") {\n    console.warn(\"Deprecated: Expected third argument to be a object\");\n    opts = { autoBom: !opts };\n  }\n\n  // prepend BOM for UTF-8 XML and text/* types (including HTML)\n  // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n  if (\n    opts.autoBom &&\n    /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(\n      blob.type\n    )\n  ) {\n    return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n  }\n  return blob;\n}\n\nfunction download(url, name, opts) {\n  var xhr = new XMLHttpRequest();\n  xhr.open(\"GET\", url);\n  xhr.responseType = \"blob\";\n  xhr.onload = function() {\n    saveAs(xhr.response, name, opts);\n  };\n  xhr.onerror = function() {\n    console.error(\"could not download file\");\n  };\n  xhr.send();\n}\n\nfunction corsEnabled(url) {\n  var xhr = new XMLHttpRequest();\n  // use sync to avoid popup blocker\n  xhr.open(\"HEAD\", url, false);\n  try {\n    xhr.send();\n  } catch (e) {}\n  return xhr.status >= 200 && xhr.status <= 299;\n}\n\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n  try {\n    node.dispatchEvent(new MouseEvent(\"click\"));\n  } catch (e) {\n    var evt = document.createEvent(\"MouseEvents\");\n    evt.initMouseEvent(\n      \"click\",\n      true,\n      true,\n      window,\n      0,\n      0,\n      0,\n      80,\n      20,\n      false,\n      false,\n      false,\n      false,\n      0,\n      null\n    );\n    node.dispatchEvent(evt);\n  }\n}\n\nvar saveAs =\n  _global.saveAs ||\n  // probably in some web worker\n  (typeof window !== \"object\" || window !== _global\n    ? function saveAs() {\n        /* noop */\n      }\n    : // Use download attribute first if possible (#193 Lumia mobile) unless this is a native app\n    typeof HTMLAnchorElement !== \"undefined\" &&\n      \"download\" in HTMLAnchorElement.prototype\n    ? function saveAs(blob, name, opts) {\n        var URL = _global.URL || _global.webkitURL;\n        var a = document.createElement(\"a\");\n        name = name || blob.name || \"download\";\n\n        a.download = name;\n        a.rel = \"noopener\"; // tabnabbing\n\n        // TODO: detect chrome extensions & packaged apps\n        // a.target = '_blank'\n\n        if (typeof blob === \"string\") {\n          // Support regular links\n          a.href = blob;\n          if (a.origin !== location.origin) {\n            corsEnabled(a.href)\n              ? download(blob, name, opts)\n              : click(a, (a.target = \"_blank\"));\n          } else {\n            click(a);\n          }\n        } else {\n          // Support blobs\n          a.href = URL.createObjectURL(blob);\n          setTimeout(function() {\n            URL.revokeObjectURL(a.href);\n          }, 4e4); // 40s\n          setTimeout(function() {\n            click(a);\n          }, 0);\n        }\n      }\n    : // Use msSaveOrOpenBlob as a second approach\n    \"msSaveOrOpenBlob\" in navigator\n    ? function saveAs(blob, name, opts) {\n        name = name || blob.name || \"download\";\n\n        if (typeof blob === \"string\") {\n          if (corsEnabled(blob)) {\n            download(blob, name, opts);\n          } else {\n            var a = document.createElement(\"a\");\n            a.href = blob;\n            a.target = \"_blank\";\n            setTimeout(function() {\n              click(a);\n            });\n          }\n        } else {\n          navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n        }\n      }\n    : // Fallback to using FileReader and a popup\n      function saveAs(blob, name, opts, popup) {\n        // Open a popup immediately do go around popup blocker\n        // Mostly only available on user interaction and the fileReader is async so...\n        popup = popup || open(\"\", \"_blank\");\n        if (popup) {\n          popup.document.title = popup.document.body.innerText =\n            \"downloading...\";\n        }\n\n        if (typeof blob === \"string\") return download(blob, name, opts);\n\n        var force = blob.type === \"application/octet-stream\";\n        var isSafari =\n          /constructor/i.test(_global.HTMLElement) || _global.safari;\n        var isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n\n        if (\n          (isChromeIOS || (force && isSafari)) &&\n          typeof FileReader === \"object\"\n        ) {\n          // Safari doesn't allow downloading of blob URLs\n          var reader = new FileReader();\n          reader.onloadend = function() {\n            var url = reader.result;\n            url = isChromeIOS\n              ? url\n              : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n            if (popup) popup.location.href = url;\n            else location = url;\n            popup = null; // reverse-tabnabbing #460\n          };\n          reader.readAsDataURL(blob);\n        } else {\n          var URL = _global.URL || _global.webkitURL;\n          var url = URL.createObjectURL(blob);\n          if (popup) popup.location = url;\n          else location.href = url;\n          popup = null; // reverse-tabnabbing #460\n          setTimeout(function() {\n            URL.revokeObjectURL(url);\n          }, 4e4); // 40s\n        }\n      });\n\nexport { saveAs };\n","/**\n * A class to parse color values\n * @author Stoyan Stefanov <sstoo@gmail.com>\n * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}\n * @license Use it if you like it\n */\n\nfunction RGBColor(color_string) {\n  color_string = color_string || \"\";\n  this.ok = false;\n\n  // strip any leading #\n  if (color_string.charAt(0) == \"#\") {\n    // remove # if any\n    color_string = color_string.substr(1, 6);\n  }\n\n  color_string = color_string.replace(/ /g, \"\");\n  color_string = color_string.toLowerCase();\n\n  var channels;\n\n  // before getting into regexps, try simple matches\n  // and overwrite the input\n  var simple_colors = {\n    aliceblue: \"f0f8ff\",\n    antiquewhite: \"faebd7\",\n    aqua: \"00ffff\",\n    aquamarine: \"7fffd4\",\n    azure: \"f0ffff\",\n    beige: \"f5f5dc\",\n    bisque: \"ffe4c4\",\n    black: \"000000\",\n    blanchedalmond: \"ffebcd\",\n    blue: \"0000ff\",\n    blueviolet: \"8a2be2\",\n    brown: \"a52a2a\",\n    burlywood: \"deb887\",\n    cadetblue: \"5f9ea0\",\n    chartreuse: \"7fff00\",\n    chocolate: \"d2691e\",\n    coral: \"ff7f50\",\n    cornflowerblue: \"6495ed\",\n    cornsilk: \"fff8dc\",\n    crimson: \"dc143c\",\n    cyan: \"00ffff\",\n    darkblue: \"00008b\",\n    darkcyan: \"008b8b\",\n    darkgoldenrod: \"b8860b\",\n    darkgray: \"a9a9a9\",\n    darkgreen: \"006400\",\n    darkkhaki: \"bdb76b\",\n    darkmagenta: \"8b008b\",\n    darkolivegreen: \"556b2f\",\n    darkorange: \"ff8c00\",\n    darkorchid: \"9932cc\",\n    darkred: \"8b0000\",\n    darksalmon: \"e9967a\",\n    darkseagreen: \"8fbc8f\",\n    darkslateblue: \"483d8b\",\n    darkslategray: \"2f4f4f\",\n    darkturquoise: \"00ced1\",\n    darkviolet: \"9400d3\",\n    deeppink: \"ff1493\",\n    deepskyblue: \"00bfff\",\n    dimgray: \"696969\",\n    dodgerblue: \"1e90ff\",\n    feldspar: \"d19275\",\n    firebrick: \"b22222\",\n    floralwhite: \"fffaf0\",\n    forestgreen: \"228b22\",\n    fuchsia: \"ff00ff\",\n    gainsboro: \"dcdcdc\",\n    ghostwhite: \"f8f8ff\",\n    gold: \"ffd700\",\n    goldenrod: \"daa520\",\n    gray: \"808080\",\n    green: \"008000\",\n    greenyellow: \"adff2f\",\n    honeydew: \"f0fff0\",\n    hotpink: \"ff69b4\",\n    indianred: \"cd5c5c\",\n    indigo: \"4b0082\",\n    ivory: \"fffff0\",\n    khaki: \"f0e68c\",\n    lavender: \"e6e6fa\",\n    lavenderblush: \"fff0f5\",\n    lawngreen: \"7cfc00\",\n    lemonchiffon: \"fffacd\",\n    lightblue: \"add8e6\",\n    lightcoral: \"f08080\",\n    lightcyan: \"e0ffff\",\n    lightgoldenrodyellow: \"fafad2\",\n    lightgrey: \"d3d3d3\",\n    lightgreen: \"90ee90\",\n    lightpink: \"ffb6c1\",\n    lightsalmon: \"ffa07a\",\n    lightseagreen: \"20b2aa\",\n    lightskyblue: \"87cefa\",\n    lightslateblue: \"8470ff\",\n    lightslategray: \"778899\",\n    lightsteelblue: \"b0c4de\",\n    lightyellow: \"ffffe0\",\n    lime: \"00ff00\",\n    limegreen: \"32cd32\",\n    linen: \"faf0e6\",\n    magenta: \"ff00ff\",\n    maroon: \"800000\",\n    mediumaquamarine: \"66cdaa\",\n    mediumblue: \"0000cd\",\n    mediumorchid: \"ba55d3\",\n    mediumpurple: \"9370d8\",\n    mediumseagreen: \"3cb371\",\n    mediumslateblue: \"7b68ee\",\n    mediumspringgreen: \"00fa9a\",\n    mediumturquoise: \"48d1cc\",\n    mediumvioletred: \"c71585\",\n    midnightblue: \"191970\",\n    mintcream: \"f5fffa\",\n    mistyrose: \"ffe4e1\",\n    moccasin: \"ffe4b5\",\n    navajowhite: \"ffdead\",\n    navy: \"000080\",\n    oldlace: \"fdf5e6\",\n    olive: \"808000\",\n    olivedrab: \"6b8e23\",\n    orange: \"ffa500\",\n    orangered: \"ff4500\",\n    orchid: \"da70d6\",\n    palegoldenrod: \"eee8aa\",\n    palegreen: \"98fb98\",\n    paleturquoise: \"afeeee\",\n    palevioletred: \"d87093\",\n    papayawhip: \"ffefd5\",\n    peachpuff: \"ffdab9\",\n    peru: \"cd853f\",\n    pink: \"ffc0cb\",\n    plum: \"dda0dd\",\n    powderblue: \"b0e0e6\",\n    purple: \"800080\",\n    red: \"ff0000\",\n    rosybrown: \"bc8f8f\",\n    royalblue: \"4169e1\",\n    saddlebrown: \"8b4513\",\n    salmon: \"fa8072\",\n    sandybrown: \"f4a460\",\n    seagreen: \"2e8b57\",\n    seashell: \"fff5ee\",\n    sienna: \"a0522d\",\n    silver: \"c0c0c0\",\n    skyblue: \"87ceeb\",\n    slateblue: \"6a5acd\",\n    slategray: \"708090\",\n    snow: \"fffafa\",\n    springgreen: \"00ff7f\",\n    steelblue: \"4682b4\",\n    tan: \"d2b48c\",\n    teal: \"008080\",\n    thistle: \"d8bfd8\",\n    tomato: \"ff6347\",\n    turquoise: \"40e0d0\",\n    violet: \"ee82ee\",\n    violetred: \"d02090\",\n    wheat: \"f5deb3\",\n    white: \"ffffff\",\n    whitesmoke: \"f5f5f5\",\n    yellow: \"ffff00\",\n    yellowgreen: \"9acd32\"\n  };\n  color_string = simple_colors[color_string] || color_string;\n\n  // array of color definition objects\n  var color_defs = [\n    {\n      re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n      example: [\"rgb(123, 234, 45)\", \"rgb(255,234,245)\"],\n      process: function(bits) {\n        return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];\n      }\n    },\n    {\n      re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n      example: [\"#00ff00\", \"336699\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1], 16),\n          parseInt(bits[2], 16),\n          parseInt(bits[3], 16)\n        ];\n      }\n    },\n    {\n      re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n      example: [\"#fb0\", \"f0f\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1] + bits[1], 16),\n          parseInt(bits[2] + bits[2], 16),\n          parseInt(bits[3] + bits[3], 16)\n        ];\n      }\n    }\n  ];\n\n  // search through the definitions to find a match\n  for (var i = 0; i < color_defs.length; i++) {\n    var re = color_defs[i].re;\n    var processor = color_defs[i].process;\n    var bits = re.exec(color_string);\n    if (bits) {\n      channels = processor(bits);\n      this.r = channels[0];\n      this.g = channels[1];\n      this.b = channels[2];\n      this.ok = true;\n    }\n  }\n\n  // validate/cleanup values\n  this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r;\n  this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g;\n  this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b;\n\n  // some getters\n  this.toRGB = function() {\n    return \"rgb(\" + this.r + \", \" + this.g + \", \" + this.b + \")\";\n  };\n  this.toHex = function() {\n    var r = this.r.toString(16);\n    var g = this.g.toString(16);\n    var b = this.b.toString(16);\n    if (r.length == 1) r = \"0\" + r;\n    if (g.length == 1) g = \"0\" + g;\n    if (b.length == 1) b = \"0\" + b;\n    return \"#\" + r + g + b;\n  };\n}\n\nexport { RGBColor };\n","import { globalObject } from \"./globalObject.js\";\n\nvar atob, btoa;\n\n(function() {\n  atob = globalObject.atob.bind(globalObject);\n  btoa = globalObject.btoa.bind(globalObject);\n  return;\n\n})();\n\nexport { atob, btoa };\n","/**\n * @license\n * Joseph Myers does not specify a particular license for his work.\n *\n * Author: Joseph Myers\n * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js\n *\n * Modified by: Owen Leong\n */\n\nfunction md5cycle(x, k) {\n  var a = x[0],\n    b = x[1],\n    c = x[2],\n    d = x[3];\n\n  a = ff(a, b, c, d, k[0], 7, -680876936);\n  d = ff(d, a, b, c, k[1], 12, -389564586);\n  c = ff(c, d, a, b, k[2], 17, 606105819);\n  b = ff(b, c, d, a, k[3], 22, -1044525330);\n  a = ff(a, b, c, d, k[4], 7, -176418897);\n  d = ff(d, a, b, c, k[5], 12, 1200080426);\n  c = ff(c, d, a, b, k[6], 17, -1473231341);\n  b = ff(b, c, d, a, k[7], 22, -45705983);\n  a = ff(a, b, c, d, k[8], 7, 1770035416);\n  d = ff(d, a, b, c, k[9], 12, -1958414417);\n  c = ff(c, d, a, b, k[10], 17, -42063);\n  b = ff(b, c, d, a, k[11], 22, -1990404162);\n  a = ff(a, b, c, d, k[12], 7, 1804603682);\n  d = ff(d, a, b, c, k[13], 12, -40341101);\n  c = ff(c, d, a, b, k[14], 17, -1502002290);\n  b = ff(b, c, d, a, k[15], 22, 1236535329);\n\n  a = gg(a, b, c, d, k[1], 5, -165796510);\n  d = gg(d, a, b, c, k[6], 9, -1069501632);\n  c = gg(c, d, a, b, k[11], 14, 643717713);\n  b = gg(b, c, d, a, k[0], 20, -373897302);\n  a = gg(a, b, c, d, k[5], 5, -701558691);\n  d = gg(d, a, b, c, k[10], 9, 38016083);\n  c = gg(c, d, a, b, k[15], 14, -660478335);\n  b = gg(b, c, d, a, k[4], 20, -405537848);\n  a = gg(a, b, c, d, k[9], 5, 568446438);\n  d = gg(d, a, b, c, k[14], 9, -1019803690);\n  c = gg(c, d, a, b, k[3], 14, -187363961);\n  b = gg(b, c, d, a, k[8], 20, 1163531501);\n  a = gg(a, b, c, d, k[13], 5, -1444681467);\n  d = gg(d, a, b, c, k[2], 9, -51403784);\n  c = gg(c, d, a, b, k[7], 14, 1735328473);\n  b = gg(b, c, d, a, k[12], 20, -1926607734);\n\n  a = hh(a, b, c, d, k[5], 4, -378558);\n  d = hh(d, a, b, c, k[8], 11, -2022574463);\n  c = hh(c, d, a, b, k[11], 16, 1839030562);\n  b = hh(b, c, d, a, k[14], 23, -35309556);\n  a = hh(a, b, c, d, k[1], 4, -1530992060);\n  d = hh(d, a, b, c, k[4], 11, 1272893353);\n  c = hh(c, d, a, b, k[7], 16, -155497632);\n  b = hh(b, c, d, a, k[10], 23, -1094730640);\n  a = hh(a, b, c, d, k[13], 4, 681279174);\n  d = hh(d, a, b, c, k[0], 11, -358537222);\n  c = hh(c, d, a, b, k[3], 16, -722521979);\n  b = hh(b, c, d, a, k[6], 23, 76029189);\n  a = hh(a, b, c, d, k[9], 4, -640364487);\n  d = hh(d, a, b, c, k[12], 11, -421815835);\n  c = hh(c, d, a, b, k[15], 16, 530742520);\n  b = hh(b, c, d, a, k[2], 23, -995338651);\n\n  a = ii(a, b, c, d, k[0], 6, -198630844);\n  d = ii(d, a, b, c, k[7], 10, 1126891415);\n  c = ii(c, d, a, b, k[14], 15, -1416354905);\n  b = ii(b, c, d, a, k[5], 21, -57434055);\n  a = ii(a, b, c, d, k[12], 6, 1700485571);\n  d = ii(d, a, b, c, k[3], 10, -1894986606);\n  c = ii(c, d, a, b, k[10], 15, -1051523);\n  b = ii(b, c, d, a, k[1], 21, -2054922799);\n  a = ii(a, b, c, d, k[8], 6, 1873313359);\n  d = ii(d, a, b, c, k[15], 10, -30611744);\n  c = ii(c, d, a, b, k[6], 15, -1560198380);\n  b = ii(b, c, d, a, k[13], 21, 1309151649);\n  a = ii(a, b, c, d, k[4], 6, -145523070);\n  d = ii(d, a, b, c, k[11], 10, -1120210379);\n  c = ii(c, d, a, b, k[2], 15, 718787259);\n  b = ii(b, c, d, a, k[9], 21, -343485551);\n\n  x[0] = add32(a, x[0]);\n  x[1] = add32(b, x[1]);\n  x[2] = add32(c, x[2]);\n  x[3] = add32(d, x[3]);\n}\n\nfunction cmn(q, a, b, x, s, t) {\n  a = add32(add32(a, q), add32(x, t));\n  return add32((a << s) | (a >>> (32 - s)), b);\n}\n\nfunction ff(a, b, c, d, x, s, t) {\n  return cmn((b & c) | (~b & d), a, b, x, s, t);\n}\n\nfunction gg(a, b, c, d, x, s, t) {\n  return cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\n\nfunction hh(a, b, c, d, x, s, t) {\n  return cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction ii(a, b, c, d, x, s, t) {\n  return cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nfunction md51(s) {\n  // txt = '';\n  var n = s.length,\n    state = [1732584193, -271733879, -1732584194, 271733878],\n    i;\n  for (i = 64; i <= s.length; i += 64) {\n    md5cycle(state, md5blk(s.substring(i - 64, i)));\n  }\n  s = s.substring(i - 64);\n  var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n  for (i = 0; i < s.length; i++)\n    tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n  tail[i >> 2] |= 0x80 << (i % 4 << 3);\n  if (i > 55) {\n    md5cycle(state, tail);\n    for (i = 0; i < 16; i++) tail[i] = 0;\n  }\n  tail[14] = n * 8;\n  md5cycle(state, tail);\n  return state;\n}\n\n/* there needs to be support for Unicode here,\n * unless we pretend that we can redefine the MD-5\n * algorithm for multi-byte characters (perhaps\n * by adding every four 16-bit characters and\n * shortening the sum to 32 bits). Otherwise\n * I suggest performing MD-5 as if every character\n * was two bytes--e.g., 0040 0025 = @%--but then\n * how will an ordinary MD-5 sum be matched?\n * There is no way to standardize text to something\n * like UTF-8 before transformation; speed cost is\n * utterly prohibitive. The JavaScript standard\n * itself needs to look at this: it should start\n * providing access to strings as preformed UTF-8\n * 8-bit unsigned value arrays.\n */\nfunction md5blk(s) {\n  /* I figured global was faster.   */\n  var md5blks = [],\n    i; /* Andy King said do it this way. */\n  for (i = 0; i < 64; i += 4) {\n    md5blks[i >> 2] =\n      s.charCodeAt(i) +\n      (s.charCodeAt(i + 1) << 8) +\n      (s.charCodeAt(i + 2) << 16) +\n      (s.charCodeAt(i + 3) << 24);\n  }\n  return md5blks;\n}\n\nvar hex_chr = \"0123456789abcdef\".split(\"\");\n\nfunction rhex(n) {\n  var s = \"\",\n    j = 0;\n  for (; j < 4; j++)\n    s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];\n  return s;\n}\n\nfunction hex(x) {\n  for (var i = 0; i < x.length; i++) x[i] = rhex(x[i]);\n  return x.join(\"\");\n}\n\n// Converts a 4-byte number to byte string\nfunction singleToByteString(n) {\n  return String.fromCharCode(\n    (n & 0xff) >> 0,\n    (n & 0xff00) >> 8,\n    (n & 0xff0000) >> 16,\n    (n & 0xff000000) >> 24\n  );\n}\n\n// Converts an array of numbers to a byte string\nfunction toByteString(x) {\n  return x.map(singleToByteString).join(\"\");\n}\n\n// Returns the MD5 hash as a byte string\nfunction md5Bin(s) {\n  return toByteString(md51(s));\n}\n\n// Returns MD5 hash as a hex string\nfunction md5(s) {\n  return hex(md51(s));\n}\n\nvar md5Check = md5(\"hello\") != \"5d41402abc4b2a76b9719d911017c592\";\n\nfunction add32(a, b) {\n  if (md5Check) {\n    /* if the md5Check does not match\n     the expected value, we're dealing\n     with an old browser and need\n     this function. */\n    var lsw = (a & 0xffff) + (b & 0xffff),\n      msw = (a >> 16) + (b >> 16) + (lsw >> 16);\n    return (msw << 16) | (lsw & 0xffff);\n  } else {\n    /* this function is much faster,\n    so if possible we use it. Some IEs\n    are the only ones I know of that\n    need the idiotic second function,\n    generated by an if clause.  */\n    return (a + b) & 0xffffffff;\n  }\n}\n\nexport { md5, md5Bin };\n","/**\r\n * @license\r\n * FPDF is released under a permissive license: there is no usage restriction.\r\n * You may embed it freely in your application (commercial or not), with or\r\n * without modifications.\r\n *\r\n * Reference: http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nfunction repeat(str, num) {\r\n  return new Array(num + 1).join(str);\r\n}\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name rc4\r\n * @function\r\n * @param {string} key Byte string of encryption key\r\n * @param {string} data Byte string of data to be encrypted\r\n * @returns {string} Encrypted string\r\n */\r\nfunction rc4(key, data) {\r\n  var lastKey, lastState;\r\n  if (key !== lastKey) {\r\n    var k = repeat(key, ((256 / key.length) >> 0) + 1);\r\n    var state = [];\r\n    for (var i = 0; i < 256; i++) {\r\n      state[i] = i;\r\n    }\r\n    var j = 0;\r\n    for (var i = 0; i < 256; i++) {\r\n      var t = state[i];\r\n      j = (j + t + k.charCodeAt(i)) % 256;\r\n      state[i] = state[j];\r\n      state[j] = t;\r\n    }\r\n    lastKey = key;\r\n    lastState = state;\r\n  } else {\r\n    state = lastState;\r\n  }\r\n  var length = data.length;\r\n  var a = 0;\r\n  var b = 0;\r\n  var out = \"\";\r\n  for (var i = 0; i < length; i++) {\r\n    a = (a + 1) % 256;\r\n    t = state[a];\r\n    b = (b + t) % 256;\r\n    state[a] = state[b];\r\n    state[b] = t;\r\n    k = state[(state[a] + state[b]) % 256];\r\n    out += String.fromCharCode(data.charCodeAt(i) ^ k);\r\n  }\r\n  return out;\r\n}\r\n\r\nexport { rc4 };\r\n","/**\r\n * @license\r\n * Licensed under the MIT License.\r\n * http://opensource.org/licenses/mit-license\r\n * Author: Owen Leong (@owenl131)\r\n * Date: 15 Oct 2020\r\n * References:\r\n * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt\r\n * https://github.com/foliojs/pdfkit/blob/master/lib/security.js\r\n * http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nimport { md5Bin } from \"./md5.js\";\r\nimport { rc4 } from \"./rc4.js\";\r\n\r\nvar permissionOptions = {\r\n  print: 4,\r\n  modify: 8,\r\n  copy: 16,\r\n  \"annot-forms\": 32\r\n};\r\n\r\n/**\r\n * Initializes encryption settings\r\n *\r\n * @name constructor\r\n * @function\r\n * @param {Array} permissions Permissions allowed for user, \"print\", \"modify\", \"copy\" and \"annot-forms\".\r\n * @param {String} userPassword Permissions apply to this user. Leaving this empty means the document\r\n *                              is not password protected but viewer has the above permissions.\r\n * @param {String} ownerPassword Owner has full functionalities to the file.\r\n * @param {String} fileId As hex string, should be same as the file ID in the trailer.\r\n * @example\r\n * var security = new PDFSecurity([\"print\"])\r\n */\r\nfunction PDFSecurity(permissions, userPassword, ownerPassword, fileId) {\r\n  this.v = 1; // algorithm 1, future work can add in more recent encryption schemes\r\n  this.r = 2; // revision 2\r\n\r\n  // set flags for what functionalities the user can access\r\n  let protection = 192;\r\n  permissions.forEach(function(perm) {\r\n    if (typeof permissionOptions.perm !== \"undefined\") {\r\n      throw new Error(\"Invalid permission: \" + perm);\r\n    }\r\n    protection += permissionOptions[perm];\r\n  });\r\n\r\n  // padding is used to pad the passwords to 32 bytes, also is hashed and stored in the final PDF\r\n  this.padding =\r\n    \"\\x28\\xBF\\x4E\\x5E\\x4E\\x75\\x8A\\x41\\x64\\x00\\x4E\\x56\\xFF\\xFA\\x01\\x08\" +\r\n    \"\\x2E\\x2E\\x00\\xB6\\xD0\\x68\\x3E\\x80\\x2F\\x0C\\xA9\\xFE\\x64\\x53\\x69\\x7A\";\r\n  let paddedUserPassword = (userPassword + this.padding).substr(0, 32);\r\n  let paddedOwnerPassword = (ownerPassword + this.padding).substr(0, 32);\r\n\r\n  this.O = this.processOwnerPassword(paddedUserPassword, paddedOwnerPassword);\r\n  this.P = -((protection ^ 255) + 1);\r\n  this.encryptionKey = md5Bin(\r\n    paddedUserPassword +\r\n      this.O +\r\n      this.lsbFirstWord(this.P) +\r\n      this.hexToBytes(fileId)\r\n  ).substr(0, 5);\r\n  this.U = rc4(this.encryptionKey, this.padding);\r\n}\r\n\r\n/**\r\n * Breaks down a 4-byte number into its individual bytes, with the least significant bit first\r\n *\r\n * @name lsbFirstWord\r\n * @function\r\n * @param {number} data 32-bit number\r\n * @returns {Array}\r\n */\r\nPDFSecurity.prototype.lsbFirstWord = function(data) {\r\n  return String.fromCharCode(\r\n    (data >> 0) & 0xff,\r\n    (data >> 8) & 0xff,\r\n    (data >> 16) & 0xff,\r\n    (data >> 24) & 0xff\r\n  );\r\n};\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name toHexString\r\n * @function\r\n * @param {String} byteString Byte string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.toHexString = function(byteString) {\r\n  return byteString\r\n    .split(\"\")\r\n    .map(function(byte) {\r\n      return (\"0\" + (byte.charCodeAt(0) & 0xff).toString(16)).slice(-2);\r\n    })\r\n    .join(\"\");\r\n};\r\n\r\n/**\r\n * Converts a hex string to a byte string\r\n *\r\n * @name hexToBytes\r\n * @function\r\n * @param {String} hex Hex string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.hexToBytes = function(hex) {\r\n  for (var bytes = [], c = 0; c < hex.length; c += 2)\r\n    bytes.push(String.fromCharCode(parseInt(hex.substr(c, 2), 16)));\r\n  return bytes.join(\"\");\r\n};\r\n\r\n/**\r\n * Computes the 'O' field in the encryption dictionary\r\n *\r\n * @name processOwnerPassword\r\n * @function\r\n * @param {String} paddedUserPassword Byte string of padded user password\r\n * @param {String} paddedOwnerPassword Byte string of padded owner password\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.processOwnerPassword = function(\r\n  paddedUserPassword,\r\n  paddedOwnerPassword\r\n) {\r\n  let key = md5Bin(paddedOwnerPassword).substr(0, 5);\r\n  return rc4(key, paddedUserPassword);\r\n};\r\n\r\n/**\r\n * Returns an encryptor function which can take in a byte string and returns the encrypted version\r\n *\r\n * @name encryptor\r\n * @function\r\n * @param {number} objectId\r\n * @param {number} generation Not sure what this is for, you can set it to 0\r\n * @returns {Function}\r\n * @example\r\n * out(\"stream\");\r\n * encryptor = security.encryptor(object.id, 0);\r\n * out(encryptor(data));\r\n * out(\"endstream\");\r\n */\r\nPDFSecurity.prototype.encryptor = function(objectId, generation) {\r\n  let key = md5Bin(\r\n    this.encryptionKey +\r\n      String.fromCharCode(\r\n        objectId & 0xff,\r\n        (objectId >> 8) & 0xff,\r\n        (objectId >> 16) & 0xff,\r\n        generation & 0xff,\r\n        (generation >> 8) & 0xff\r\n      )\r\n  ).substr(0, 10);\r\n  return function(data) {\r\n    return rc4(key, data);\r\n  };\r\n};\r\n\r\nexport { PDFSecurity };\r\n","/**\n * Convert string to `PDF Name Object`.\n * Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object\n * @param str\n */\nfunction toPDFName(str) {\n  // eslint-disable-next-line no-control-regex\n  if (/[^\\u0000-\\u00ff]/.test(str)) {\n    // non ascii string\n    throw new Error(\n      \"Invalid PDF Name Object: \" + str + \", Only accept ASCII characters.\"\n    );\n  }\n  var result = \"\",\n    strLength = str.length;\n  for (var i = 0; i < strLength; i++) {\n    var charCode = str.charCodeAt(i);\n    if (\n      charCode < 0x21 ||\n      charCode === 0x23 /* # */ ||\n      charCode === 0x25 /* % */ ||\n      charCode === 0x28 /* ( */ ||\n      charCode === 0x29 /* ) */ ||\n      charCode === 0x2f /* / */ ||\n      charCode === 0x3c /* < */ ||\n      charCode === 0x3e /* > */ ||\n      charCode === 0x5b /* [ */ ||\n      charCode === 0x5d /* ] */ ||\n      charCode === 0x7b /* { */ ||\n      charCode === 0x7d /* } */ ||\n      charCode > 0x7e\n    ) {\n      // Char    CharCode    hexStr   paddingHexStr    Result\n      // \"\\t\"    9           9        09               #09\n      // \" \"     32          20       20               #20\n      // \"©\"     169         a9       a9               #a9\n      var hexStr = charCode.toString(16),\n        paddingHexStr = (\"0\" + hexStr).slice(-2);\n\n      result += \"#\" + paddingHexStr;\n    } else {\n      // Other ASCII printable characters between 0x21 <= X <= 0x7e\n      result += str[i];\n    }\n  }\n  return result;\n}\n\nexport { toPDFName };\n","/* eslint-disable no-console */\r\n\r\nimport { saveAs } from \"./libs/FileSaver.js\";\r\nimport { globalObject } from \"./libs/globalObject.js\";\r\nimport { RGBColor } from \"./libs/rgbcolor.js\";\r\nimport { btoa } from \"./libs/AtobBtoa.js\";\r\nimport { console } from \"./libs/console.js\";\r\nimport { PDFSecurity } from \"./libs/pdfsecurity.js\";\r\nimport { toPDFName } from \"./libs/pdfname.js\";\r\n/**\r\n * jsPDF's Internal PubSub Implementation.\r\n * Backward compatible rewritten on 2014 by\r\n * Diego Casorran, https://github.com/diegocr\r\n *\r\n * @class\r\n * @name PubSub\r\n * @ignore\r\n */\r\nfunction PubSub(context) {\r\n  if (typeof context !== \"object\") {\r\n    throw new Error(\r\n      \"Invalid Context passed to initialize PubSub (jsPDF-module)\"\r\n    );\r\n  }\r\n  var topics = {};\r\n\r\n  this.subscribe = function(topic, callback, once) {\r\n    once = once || false;\r\n    if (\r\n      typeof topic !== \"string\" ||\r\n      typeof callback !== \"function\" ||\r\n      typeof once !== \"boolean\"\r\n    ) {\r\n      throw new Error(\r\n        \"Invalid arguments passed to PubSub.subscribe (jsPDF-module)\"\r\n      );\r\n    }\r\n\r\n    if (!topics.hasOwnProperty(topic)) {\r\n      topics[topic] = {};\r\n    }\r\n\r\n    var token = Math.random().toString(35);\r\n    topics[topic][token] = [callback, !!once];\r\n\r\n    return token;\r\n  };\r\n\r\n  this.unsubscribe = function(token) {\r\n    for (var topic in topics) {\r\n      if (topics[topic][token]) {\r\n        delete topics[topic][token];\r\n        if (Object.keys(topics[topic]).length === 0) {\r\n          delete topics[topic];\r\n        }\r\n        return true;\r\n      }\r\n    }\r\n    return false;\r\n  };\r\n\r\n  this.publish = function(topic) {\r\n    if (topics.hasOwnProperty(topic)) {\r\n      var args = Array.prototype.slice.call(arguments, 1),\r\n        tokens = [];\r\n\r\n      for (var token in topics[topic]) {\r\n        var sub = topics[topic][token];\r\n        try {\r\n          sub[0].apply(context, args);\r\n        } catch (ex) {\r\n          if (globalObject.console) {\r\n            console.error(\"jsPDF PubSub Error\", ex.message, ex);\r\n          }\r\n        }\r\n        if (sub[1]) tokens.push(token);\r\n      }\r\n      if (tokens.length) tokens.forEach(this.unsubscribe);\r\n    }\r\n  };\r\n\r\n  this.getTopics = function() {\r\n    return topics;\r\n  };\r\n}\r\n\r\nfunction GState(parameters) {\r\n  if (!(this instanceof GState)) {\r\n    return new GState(parameters);\r\n  }\r\n\r\n  /**\r\n   * @name GState#opacity\r\n   * @type {any}\r\n   */\r\n  /**\r\n   * @name GState#stroke-opacity\r\n   * @type {any}\r\n   */\r\n  var supported = \"opacity,stroke-opacity\".split(\",\");\r\n  for (var p in parameters) {\r\n    if (parameters.hasOwnProperty(p) && supported.indexOf(p) >= 0) {\r\n      this[p] = parameters[p];\r\n    }\r\n  }\r\n  /**\r\n   * @name GState#id\r\n   * @type {string}\r\n   */\r\n  this.id = \"\"; // set by addGState()\r\n  /**\r\n   * @name GState#objectNumber\r\n   * @type {number}\r\n   */\r\n  this.objectNumber = -1; // will be set by putGState()\r\n}\r\n\r\nGState.prototype.equals = function equals(other) {\r\n  var ignore = \"id,objectNumber,equals\";\r\n  var p;\r\n  if (!other || typeof other !== typeof this) return false;\r\n  var count = 0;\r\n  for (p in this) {\r\n    if (ignore.indexOf(p) >= 0) continue;\r\n    if (this.hasOwnProperty(p) && !other.hasOwnProperty(p)) return false;\r\n    if (this[p] !== other[p]) return false;\r\n    count++;\r\n  }\r\n  for (p in other) {\r\n    if (other.hasOwnProperty(p) && ignore.indexOf(p) < 0) count--;\r\n  }\r\n  return count === 0;\r\n};\r\n\r\nfunction Pattern(gState, matrix) {\r\n  this.gState = gState;\r\n  this.matrix = matrix;\r\n\r\n  this.id = \"\"; // set by addPattern()\r\n  this.objectNumber = -1; // will be set by putPattern()\r\n}\r\n\r\nfunction ShadingPattern(type, coords, colors, gState, matrix) {\r\n  if (!(this instanceof ShadingPattern)) {\r\n    return new ShadingPattern(type, coords, colors, gState, matrix);\r\n  }\r\n\r\n  // see putPattern() for information how they are realized\r\n  this.type = type === \"axial\" ? 2 : 3;\r\n  this.coords = coords;\r\n  this.colors = colors;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\nfunction TilingPattern(boundingBox, xStep, yStep, gState, matrix) {\r\n  if (!(this instanceof TilingPattern)) {\r\n    return new TilingPattern(boundingBox, xStep, yStep, gState, matrix);\r\n  }\r\n\r\n  this.boundingBox = boundingBox;\r\n  this.xStep = xStep;\r\n  this.yStep = yStep;\r\n\r\n  this.stream = \"\"; // set by endTilingPattern();\r\n\r\n  this.cloneIndex = 0;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\n/**\r\n * Creates new jsPDF document object instance.\r\n * @name jsPDF\r\n * @class\r\n * @param {Object} [options] - Collection of settings initializing the jsPDF-instance\r\n * @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" or \"l\").<br />\r\n * @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />\r\n * Possible values are \"pt\" (points), \"mm\", \"cm\", \"in\", \"px\", \"pc\", \"em\" or \"ex\". Note that in order to get the correct scaling for \"px\"\r\n * units, you need to enable the hotfix \"px_scaling\" by setting options.hotfixes = [\"px_scaling\"].\r\n * @param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n * @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.\r\n * @param {boolean} [options.compress=false] Compress the generated PDF.\r\n * @param {number} [options.precision=16] Precision of the element-positions.\r\n * @param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.\r\n * @param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.\r\n * @param {Object} [options.encryption]\r\n * @param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.\r\n * @param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.\r\n * @param {string[]} [options.encryption.userPermissions] Array of permissions \"print\", \"modify\", \"copy\", \"annot-forms\", accessible by the user.\r\n * @param {number|\"smart\"} [options.floatPrecision=16]\r\n * @returns {jsPDF} jsPDF-instance\r\n * @description\r\n * ```\r\n * {\r\n *  orientation: 'p',\r\n *  unit: 'mm',\r\n *  format: 'a4',\r\n *  putOnlyUsedFonts:true,\r\n *  floatPrecision: 16 // or \"smart\", default is 16\r\n * }\r\n * ```\r\n *\r\n * @constructor\r\n */\r\nfunction jsPDF(options) {\r\n  var orientation = typeof arguments[0] === \"string\" ? arguments[0] : \"p\";\r\n  var unit = arguments[1];\r\n  var format = arguments[2];\r\n  var compressPdf = arguments[3];\r\n  var filters = [];\r\n  var userUnit = 1.0;\r\n  var precision;\r\n  var floatPrecision = 16;\r\n  var defaultPathOperation = \"S\";\r\n  var encryptionOptions = null;\r\n\r\n  options = options || {};\r\n\r\n  if (typeof options === \"object\") {\r\n    orientation = options.orientation;\r\n    unit = options.unit || unit;\r\n    format = options.format || format;\r\n    compressPdf = options.compress || options.compressPdf || compressPdf;\r\n    encryptionOptions = options.encryption || null;\r\n    if (encryptionOptions !== null) {\r\n      encryptionOptions.userPassword = encryptionOptions.userPassword || \"\";\r\n      encryptionOptions.ownerPassword = encryptionOptions.ownerPassword || \"\";\r\n      encryptionOptions.userPermissions =\r\n        encryptionOptions.userPermissions || [];\r\n    }\r\n    userUnit =\r\n      typeof options.userUnit === \"number\" ? Math.abs(options.userUnit) : 1.0;\r\n    if (typeof options.precision !== \"undefined\") {\r\n      precision = options.precision;\r\n    }\r\n    if (typeof options.floatPrecision !== \"undefined\") {\r\n      floatPrecision = options.floatPrecision;\r\n    }\r\n    defaultPathOperation = options.defaultPathOperation || \"S\";\r\n  }\r\n\r\n  filters =\r\n    options.filters || (compressPdf === true ? [\"FlateEncode\"] : filters);\r\n\r\n  unit = unit || \"mm\";\r\n  orientation = (\"\" + (orientation || \"P\")).toLowerCase();\r\n  var putOnlyUsedFonts = options.putOnlyUsedFonts || false;\r\n  var usedFonts = {};\r\n\r\n  var API = {\r\n    internal: {},\r\n    __private__: {}\r\n  };\r\n\r\n  API.__private__.PubSub = PubSub;\r\n\r\n  var pdfVersion = \"1.3\";\r\n  var getPdfVersion = (API.__private__.getPdfVersion = function() {\r\n    return pdfVersion;\r\n  });\r\n\r\n  API.__private__.setPdfVersion = function(value) {\r\n    pdfVersion = value;\r\n  };\r\n\r\n  // Size in pt of various paper formats\r\n  var pageFormats = {\r\n    a0: [2383.94, 3370.39],\r\n    a1: [1683.78, 2383.94],\r\n    a2: [1190.55, 1683.78],\r\n    a3: [841.89, 1190.55],\r\n    a4: [595.28, 841.89],\r\n    a5: [419.53, 595.28],\r\n    a6: [297.64, 419.53],\r\n    a7: [209.76, 297.64],\r\n    a8: [147.4, 209.76],\r\n    a9: [104.88, 147.4],\r\n    a10: [73.7, 104.88],\r\n    b0: [2834.65, 4008.19],\r\n    b1: [2004.09, 2834.65],\r\n    b2: [1417.32, 2004.09],\r\n    b3: [1000.63, 1417.32],\r\n    b4: [708.66, 1000.63],\r\n    b5: [498.9, 708.66],\r\n    b6: [354.33, 498.9],\r\n    b7: [249.45, 354.33],\r\n    b8: [175.75, 249.45],\r\n    b9: [124.72, 175.75],\r\n    b10: [87.87, 124.72],\r\n    c0: [2599.37, 3676.54],\r\n    c1: [1836.85, 2599.37],\r\n    c2: [1298.27, 1836.85],\r\n    c3: [918.43, 1298.27],\r\n    c4: [649.13, 918.43],\r\n    c5: [459.21, 649.13],\r\n    c6: [323.15, 459.21],\r\n    c7: [229.61, 323.15],\r\n    c8: [161.57, 229.61],\r\n    c9: [113.39, 161.57],\r\n    c10: [79.37, 113.39],\r\n    dl: [311.81, 623.62],\r\n    letter: [612, 792],\r\n    \"government-letter\": [576, 756],\r\n    legal: [612, 1008],\r\n    \"junior-legal\": [576, 360],\r\n    ledger: [1224, 792],\r\n    tabloid: [792, 1224],\r\n    \"credit-card\": [153, 243]\r\n  };\r\n\r\n  API.__private__.getPageFormats = function() {\r\n    return pageFormats;\r\n  };\r\n\r\n  var getPageFormat = (API.__private__.getPageFormat = function(value) {\r\n    return pageFormats[value];\r\n  });\r\n\r\n  format = format || \"a4\";\r\n\r\n  var ApiMode = {\r\n    COMPAT: \"compat\",\r\n    ADVANCED: \"advanced\"\r\n  };\r\n  var apiMode = ApiMode.COMPAT;\r\n\r\n  function advancedAPI() {\r\n    // prepend global change of basis matrix\r\n    // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix\r\n    // that does this job for us (however, texts, images and similar objects must be drawn bottom up))\r\n    this.saveGraphicsState();\r\n    out(\r\n      new Matrix(\r\n        scaleFactor,\r\n        0,\r\n        0,\r\n        -scaleFactor,\r\n        0,\r\n        getPageHeight() * scaleFactor\r\n      ).toString() + \" cm\"\r\n    );\r\n    this.setFontSize(this.getFontSize() / scaleFactor);\r\n\r\n    // The default in MrRio's implementation is \"S\" (stroke), whereas the default in the yWorks implementation\r\n    // was \"n\" (none). Although this has nothing to do with transforms, we should use the API switch here.\r\n    defaultPathOperation = \"n\";\r\n\r\n    apiMode = ApiMode.ADVANCED;\r\n  }\r\n\r\n  function compatAPI() {\r\n    this.restoreGraphicsState();\r\n    defaultPathOperation = \"S\";\r\n    apiMode = ApiMode.COMPAT;\r\n  }\r\n\r\n  /**\r\n   * @function combineFontStyleAndFontWeight\r\n   * @param {string} fontStyle Fontstyle or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @returns {string}\r\n   * @private\r\n   */\r\n  var combineFontStyleAndFontWeight = (API.__private__.combineFontStyleAndFontWeight = function(\r\n    fontStyle,\r\n    fontWeight\r\n  ) {\r\n    if (\r\n      (fontStyle == \"bold\" && fontWeight == \"normal\") ||\r\n      (fontStyle == \"bold\" && fontWeight == 400) ||\r\n      (fontStyle == \"normal\" && fontWeight == \"italic\") ||\r\n      (fontStyle == \"bold\" && fontWeight == \"italic\")\r\n    ) {\r\n      throw new Error(\"Invalid Combination of fontweight and fontstyle\");\r\n    }\r\n    if (fontWeight) {\r\n      fontStyle =\r\n        fontWeight == 400 || fontWeight === \"normal\"\r\n          ? fontStyle === \"italic\"\r\n            ? \"italic\"\r\n            : \"normal\"\r\n          : (fontWeight == 700 || fontWeight === \"bold\") &&\r\n            fontStyle === \"normal\"\r\n          ? \"bold\"\r\n          : (fontWeight == 700 ? \"bold\" : fontWeight) + \"\" + fontStyle;\r\n    }\r\n    return fontStyle;\r\n  });\r\n\r\n  /**\r\n   * @callback ApiSwitchBody\r\n   * @param {jsPDF} pdf\r\n   */\r\n\r\n  /**\r\n   * For compatibility reasons jsPDF offers two API modes which differ in the way they convert between the the usual\r\n   * screen coordinates and the PDF coordinate system.\r\n   *   - \"compat\": Offers full compatibility across all plugins but does not allow arbitrary transforms\r\n   *   - \"advanced\": Allows arbitrary transforms and more advanced features like pattern fills. Some plugins might\r\n   *     not support this mode, though.\r\n   * Initial mode is \"compat\".\r\n   *\r\n   * You can either provide a callback to the body argument, which means that jsPDF will automatically switch back to\r\n   * the original API mode afterwards; or you can omit the callback and switch back manually using {@link compatAPI}.\r\n   *\r\n   * Note, that the calls to {@link saveGraphicsState} and {@link restoreGraphicsState} need to be balanced within the\r\n   * callback or between calls of this method and its counterpart {@link compatAPI}. Calls to {@link beginFormObject}\r\n   * or {@link beginTilingPattern} need to be closed by their counterparts before switching back to \"compat\" API mode.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name advancedAPI\r\n   */\r\n  API.advancedAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.COMPAT;\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Switches to \"compat\" API mode. See {@link advancedAPI} for more details.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @return {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name compatApi\r\n   */\r\n  API.compatAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.ADVANCED;\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @return {boolean} True iff the current API mode is \"advanced\". See {@link advancedAPI}.\r\n   * @memberof jsPDF#\r\n   * @name isAdvancedAPI\r\n   */\r\n  API.isAdvancedAPI = function() {\r\n    return apiMode === ApiMode.ADVANCED;\r\n  };\r\n\r\n  var advancedApiModeTrap = function(methodName) {\r\n    if (apiMode !== ApiMode.ADVANCED) {\r\n      throw new Error(\r\n        methodName +\r\n          \" is only available in 'advanced' API mode. \" +\r\n          \"You need to call advancedAPI() first.\"\r\n      );\r\n    }\r\n  };\r\n\r\n  var roundToPrecision = (API.roundToPrecision = API.__private__.roundToPrecision = function(\r\n    number,\r\n    parmPrecision\r\n  ) {\r\n    var tmpPrecision = precision || parmPrecision;\r\n    if (isNaN(number) || isNaN(tmpPrecision)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.roundToPrecision\");\r\n    }\r\n    return number.toFixed(tmpPrecision).replace(/0+$/, \"\");\r\n  });\r\n\r\n  // high precision float\r\n  var hpf;\r\n  if (typeof floatPrecision === \"number\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, floatPrecision);\r\n    };\r\n  } else if (floatPrecision === \"smart\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      if (number > -1 && number < 1) {\r\n        return roundToPrecision(number, 16);\r\n      } else {\r\n        return roundToPrecision(number, 5);\r\n      }\r\n    };\r\n  } else {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, 16);\r\n    };\r\n  }\r\n  var f2 = (API.f2 = API.__private__.f2 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f2\");\r\n    }\r\n    return roundToPrecision(number, 2);\r\n  });\r\n\r\n  var f3 = (API.__private__.f3 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f3\");\r\n    }\r\n    return roundToPrecision(number, 3);\r\n  });\r\n\r\n  var scale = (API.scale = API.__private__.scale = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.scale\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return number * scaleFactor;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return number;\r\n    }\r\n  });\r\n\r\n  var transformY = function(y) {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return getPageHeight() - y;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return y;\r\n    }\r\n  };\r\n\r\n  var transformScaleY = function(y) {\r\n    return scale(transformY(y));\r\n  };\r\n\r\n  /**\r\n   * @name setPrecision\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} precision\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setPrecision = API.setPrecision = function(value) {\r\n    if (typeof parseInt(value, 10) === \"number\") {\r\n      precision = parseInt(value, 10);\r\n    }\r\n  };\r\n\r\n  var fileId = \"00000000000000000000000000000000\";\r\n\r\n  var getFileId = (API.__private__.getFileId = function() {\r\n    return fileId;\r\n  });\r\n\r\n  var setFileId = (API.__private__.setFileId = function(value) {\r\n    if (typeof value !== \"undefined\" && /^[a-fA-F0-9]{32}$/.test(value)) {\r\n      fileId = value.toUpperCase();\r\n    } else {\r\n      fileId = fileId\r\n        .split(\"\")\r\n        .map(function() {\r\n          return \"ABCDEF0123456789\".charAt(Math.floor(Math.random() * 16));\r\n        })\r\n        .join(\"\");\r\n    }\r\n\r\n    if (encryptionOptions !== null) {\r\n      encryption = new PDFSecurity(\r\n        encryptionOptions.userPermissions,\r\n        encryptionOptions.userPassword,\r\n        encryptionOptions.ownerPassword,\r\n        fileId\r\n      );\r\n    }\r\n    return fileId;\r\n  });\r\n\r\n  /**\r\n   * @name setFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} value GUID.\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setFileId = function(value) {\r\n    setFileId(value);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   *\r\n   * @returns {string} GUID.\r\n   */\r\n  API.getFileId = function() {\r\n    return getFileId();\r\n  };\r\n\r\n  var creationDate;\r\n\r\n  var convertDateToPDFDate = (API.__private__.convertDateToPDFDate = function(\r\n    parmDate\r\n  ) {\r\n    var result = \"\";\r\n    var tzoffset = parmDate.getTimezoneOffset(),\r\n      tzsign = tzoffset < 0 ? \"+\" : \"-\",\r\n      tzhour = Math.floor(Math.abs(tzoffset / 60)),\r\n      tzmin = Math.abs(tzoffset % 60),\r\n      timeZoneString = [tzsign, padd2(tzhour), \"'\", padd2(tzmin), \"'\"].join(\"\");\r\n\r\n    result = [\r\n      \"D:\",\r\n      parmDate.getFullYear(),\r\n      padd2(parmDate.getMonth() + 1),\r\n      padd2(parmDate.getDate()),\r\n      padd2(parmDate.getHours()),\r\n      padd2(parmDate.getMinutes()),\r\n      padd2(parmDate.getSeconds()),\r\n      timeZoneString\r\n    ].join(\"\");\r\n    return result;\r\n  });\r\n\r\n  var convertPDFDateToDate = (API.__private__.convertPDFDateToDate = function(\r\n    parmPDFDate\r\n  ) {\r\n    var year = parseInt(parmPDFDate.substr(2, 4), 10);\r\n    var month = parseInt(parmPDFDate.substr(6, 2), 10) - 1;\r\n    var date = parseInt(parmPDFDate.substr(8, 2), 10);\r\n    var hour = parseInt(parmPDFDate.substr(10, 2), 10);\r\n    var minutes = parseInt(parmPDFDate.substr(12, 2), 10);\r\n    var seconds = parseInt(parmPDFDate.substr(14, 2), 10);\r\n    // var timeZoneHour = parseInt(parmPDFDate.substr(16, 2), 10);\r\n    // var timeZoneMinutes = parseInt(parmPDFDate.substr(20, 2), 10);\r\n\r\n    var resultingDate = new Date(year, month, date, hour, minutes, seconds, 0);\r\n    return resultingDate;\r\n  });\r\n\r\n  var setCreationDate = (API.__private__.setCreationDate = function(date) {\r\n    var tmpCreationDateString;\r\n    var regexPDFCreationDate = /^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])'?$/;\r\n    if (typeof date === \"undefined\") {\r\n      date = new Date();\r\n    }\r\n\r\n    if (date instanceof Date) {\r\n      tmpCreationDateString = convertDateToPDFDate(date);\r\n    } else if (regexPDFCreationDate.test(date)) {\r\n      tmpCreationDateString = date;\r\n    } else {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCreationDate\");\r\n    }\r\n    creationDate = tmpCreationDateString;\r\n    return creationDate;\r\n  });\r\n\r\n  var getCreationDate = (API.__private__.getCreationDate = function(type) {\r\n    var result = creationDate;\r\n    if (type === \"jsDate\") {\r\n      result = convertPDFDateToDate(creationDate);\r\n    }\r\n    return result;\r\n  });\r\n\r\n  /**\r\n   * @name setCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} date\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setCreationDate = function(date) {\r\n    setCreationDate(date);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} type\r\n   * @returns {Object}\r\n   */\r\n  API.getCreationDate = function(type) {\r\n    return getCreationDate(type);\r\n  };\r\n\r\n  var padd2 = (API.__private__.padd2 = function(number) {\r\n    return (\"0\" + parseInt(number)).slice(-2);\r\n  });\r\n\r\n  var padd2Hex = (API.__private__.padd2Hex = function(hexString) {\r\n    hexString = hexString.toString();\r\n    return (\"00\" + hexString).substr(hexString.length);\r\n  });\r\n\r\n  var objectNumber = 0; // 'n' Current object number\r\n  var offsets = []; // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.\r\n  var content = [];\r\n  var contentLength = 0;\r\n  var additionalObjects = [];\r\n\r\n  var pages = [];\r\n  var currentPage;\r\n  var hasCustomDestination = false;\r\n  var outputDestination = content;\r\n\r\n  var resetDocument = function() {\r\n    //reset fields relevant for objectNumber generation and xref.\r\n    objectNumber = 0;\r\n    contentLength = 0;\r\n    content = [];\r\n    offsets = [];\r\n    additionalObjects = [];\r\n\r\n    rootDictionaryObjId = newObjectDeferred();\r\n    resourceDictionaryObjId = newObjectDeferred();\r\n  };\r\n\r\n  API.__private__.setCustomOutputDestination = function(destination) {\r\n    hasCustomDestination = true;\r\n    outputDestination = destination;\r\n  };\r\n  var setOutputDestination = function(destination) {\r\n    if (!hasCustomDestination) {\r\n      outputDestination = destination;\r\n    }\r\n  };\r\n\r\n  API.__private__.resetCustomOutputDestination = function() {\r\n    hasCustomDestination = false;\r\n    outputDestination = content;\r\n  };\r\n\r\n  var out = (API.__private__.out = function(string) {\r\n    string = string.toString();\r\n    contentLength += string.length + 1;\r\n    outputDestination.push(string);\r\n\r\n    return outputDestination;\r\n  });\r\n\r\n  var write = (API.__private__.write = function(value) {\r\n    return out(\r\n      arguments.length === 1\r\n        ? value.toString()\r\n        : Array.prototype.join.call(arguments, \" \")\r\n    );\r\n  });\r\n\r\n  var getArrayBuffer = (API.__private__.getArrayBuffer = function(data) {\r\n    var len = data.length,\r\n      ab = new ArrayBuffer(len),\r\n      u8 = new Uint8Array(ab);\r\n\r\n    while (len--) u8[len] = data.charCodeAt(len);\r\n    return ab;\r\n  });\r\n\r\n  var standardFonts = [\r\n    [\"Helvetica\", \"helvetica\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Bold\", \"helvetica\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Oblique\", \"helvetica\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-BoldOblique\", \"helvetica\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Courier\", \"courier\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Bold\", \"courier\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Oblique\", \"courier\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Courier-BoldOblique\", \"courier\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Times-Roman\", \"times\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Times-Bold\", \"times\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Times-Italic\", \"times\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Times-BoldItalic\", \"times\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"ZapfDingbats\", \"zapfdingbats\", \"normal\", null],\r\n    [\"Symbol\", \"symbol\", \"normal\", null]\r\n  ];\r\n\r\n  API.__private__.getStandardFonts = function() {\r\n    return standardFonts;\r\n  };\r\n\r\n  var activeFontSize = options.fontSize || 16;\r\n\r\n  /**\r\n   * Sets font size for upcoming text elements.\r\n   *\r\n   * @param {number} size Font size in points.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFontSize\r\n   */\r\n  API.__private__.setFontSize = API.setFontSize = function(size) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      activeFontSize = size / scaleFactor;\r\n    } else {\r\n      activeFontSize = size;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets the fontsize for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number}\r\n   * @memberof jsPDF#\r\n   * @name getFontSize\r\n   */\r\n  var getFontSize = (API.__private__.getFontSize = API.getFontSize = function() {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return activeFontSize;\r\n    } else {\r\n      return activeFontSize * scaleFactor;\r\n    }\r\n  });\r\n\r\n  var R2L = options.R2L || false;\r\n\r\n  /**\r\n   * Set value of R2L functionality.\r\n   *\r\n   * @param {boolean} value\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setR2L\r\n   */\r\n  API.__private__.setR2L = API.setR2L = function(value) {\r\n    R2L = value;\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Get value of R2L functionality.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {boolean} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name getR2L\r\n   */\r\n  API.__private__.getR2L = API.getR2L = function() {\r\n    return R2L;\r\n  };\r\n\r\n  var zoomMode; // default: 1;\r\n\r\n  var setZoomMode = (API.__private__.setZoomMode = function(zoom) {\r\n    var validZoomModes = [\r\n      undefined,\r\n      null,\r\n      \"fullwidth\",\r\n      \"fullheight\",\r\n      \"fullpage\",\r\n      \"original\"\r\n    ];\r\n\r\n    if (/^(?:\\d+\\.\\d*|\\d*\\.\\d+|\\d+)%$/.test(zoom)) {\r\n      zoomMode = zoom;\r\n    } else if (!isNaN(zoom)) {\r\n      zoomMode = parseInt(zoom, 10);\r\n    } else if (validZoomModes.indexOf(zoom) !== -1) {\r\n      zoomMode = zoom;\r\n    } else {\r\n      throw new Error(\r\n        'zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. \"' +\r\n          zoom +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n  });\r\n\r\n  API.__private__.getZoomMode = function() {\r\n    return zoomMode;\r\n  };\r\n\r\n  var pageMode; // default: 'UseOutlines';\r\n  var setPageMode = (API.__private__.setPageMode = function(pmode) {\r\n    var validPageModes = [\r\n      undefined,\r\n      null,\r\n      \"UseNone\",\r\n      \"UseOutlines\",\r\n      \"UseThumbs\",\r\n      \"FullScreen\"\r\n    ];\r\n\r\n    if (validPageModes.indexOf(pmode) == -1) {\r\n      throw new Error(\r\n        'Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. \"' +\r\n          pmode +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    pageMode = pmode;\r\n  });\r\n\r\n  API.__private__.getPageMode = function() {\r\n    return pageMode;\r\n  };\r\n\r\n  var layoutMode; // default: 'continuous';\r\n  var setLayoutMode = (API.__private__.setLayoutMode = function(layout) {\r\n    var validLayoutModes = [\r\n      undefined,\r\n      null,\r\n      \"continuous\",\r\n      \"single\",\r\n      \"twoleft\",\r\n      \"tworight\",\r\n      \"two\"\r\n    ];\r\n\r\n    if (validLayoutModes.indexOf(layout) == -1) {\r\n      throw new Error(\r\n        'Layout mode must be one of continuous, single, twoleft, tworight. \"' +\r\n          layout +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    layoutMode = layout;\r\n  });\r\n\r\n  API.__private__.getLayoutMode = function() {\r\n    return layoutMode;\r\n  };\r\n\r\n  /**\r\n   * Set the display mode options of the page like zoom and layout.\r\n   *\r\n   * @name setDisplayMode\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {integer|String} zoom   You can pass an integer or percentage as\r\n   * a string. 2 will scale the document up 2x, '200%' will scale up by the\r\n   * same amount. You can also set it to 'fullwidth', 'fullheight',\r\n   * 'fullpage', or 'original'.\r\n   *\r\n   * Only certain PDF readers support this, such as Adobe Acrobat.\r\n   *\r\n   * @param {string} layout Layout mode can be: 'continuous' - this is the\r\n   * default continuous scroll. 'single' - the single page mode only shows one\r\n   * page at a time. 'twoleft' - two column left mode, first page starts on\r\n   * the left, and 'tworight' - pages are laid out in two columns, with the\r\n   * first page on the right. This would be used for books.\r\n   * @param {string} pmode 'UseOutlines' - it shows the\r\n   * outline of the document on the left. 'UseThumbs' - shows thumbnails along\r\n   * the left. 'FullScreen' - prompts the user to enter fullscreen mode.\r\n   *\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setDisplayMode = API.setDisplayMode = function(\r\n    zoom,\r\n    layout,\r\n    pmode\r\n  ) {\r\n    setZoomMode(zoom);\r\n    setLayoutMode(layout);\r\n    setPageMode(pmode);\r\n    return this;\r\n  };\r\n\r\n  var documentProperties = {\r\n    title: \"\",\r\n    subject: \"\",\r\n    author: \"\",\r\n    keywords: \"\",\r\n    creator: \"\"\r\n  };\r\n\r\n  API.__private__.getDocumentProperty = function(key) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getDocumentProperty\");\r\n    }\r\n    return documentProperties[key];\r\n  };\r\n\r\n  API.__private__.getDocumentProperties = function() {\r\n    return documentProperties;\r\n  };\r\n\r\n  /**\r\n   * Adds a properties to the PDF document.\r\n   *\r\n   * @param {Object} A property_name-to-property_value object structure.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDocumentProperties\r\n   */\r\n  API.__private__.setDocumentProperties = API.setProperties = API.setDocumentProperties = function(\r\n    properties\r\n  ) {\r\n    // copying only those properties we can render.\r\n    for (var property in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(property) && properties[property]) {\r\n        documentProperties[property] = properties[property];\r\n      }\r\n    }\r\n    return this;\r\n  };\r\n\r\n  API.__private__.setDocumentProperty = function(key, value) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setDocumentProperty\");\r\n    }\r\n    return (documentProperties[key] = value);\r\n  };\r\n\r\n  var fonts = {}; // collection of font objects, where key is fontKey - a dynamically created label for a given font.\r\n  var fontmap = {}; // mapping structure fontName > fontStyle > font key - performance layer. See addFont()\r\n  var activeFontKey; // will be string representing the KEY of the font as combination of fontName + fontStyle\r\n  var fontStateStack = []; //\r\n  var patterns = {}; // collection of pattern objects\r\n  var patternMap = {}; // see fonts\r\n  var gStates = {}; // collection of graphic state objects\r\n  var gStatesMap = {}; // see fonts\r\n  var activeGState = null;\r\n  var scaleFactor; // Scale factor\r\n  var page = 0;\r\n  var pagesContext = [];\r\n  var events = new PubSub(API);\r\n  var hotfixes = options.hotfixes || [];\r\n\r\n  var renderTargets = {};\r\n  var renderTargetMap = {};\r\n  var renderTargetStack = [];\r\n  var pageX;\r\n  var pageY;\r\n  var pageMatrix; // only used for FormObjects\r\n\r\n  /**\r\n   * A matrix object for 2D homogenous transformations: <br>\r\n   * | a b 0 | <br>\r\n   * | c d 0 | <br>\r\n   * | e f 1 | <br>\r\n   * pdf multiplies matrices righthand: v' = v x m1 x m2 x ...\r\n   *\r\n   * @class\r\n   * @name Matrix\r\n   * @param {number} sx\r\n   * @param {number} shy\r\n   * @param {number} shx\r\n   * @param {number} sy\r\n   * @param {number} tx\r\n   * @param {number} ty\r\n   * @constructor\r\n   */\r\n  var Matrix = function(sx, shy, shx, sy, tx, ty) {\r\n    if (!(this instanceof Matrix)) {\r\n      return new Matrix(sx, shy, shx, sy, tx, ty);\r\n    }\r\n\r\n    if (isNaN(sx)) sx = 1;\r\n    if (isNaN(shy)) shy = 0;\r\n    if (isNaN(shx)) shx = 0;\r\n    if (isNaN(sy)) sy = 1;\r\n    if (isNaN(tx)) tx = 0;\r\n    if (isNaN(ty)) ty = 0;\r\n\r\n    this._matrix = [sx, shy, shx, sy, tx, ty];\r\n  };\r\n\r\n  /**\r\n   * @name sx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sx\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shy\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shx\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name sy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sy\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name tx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"tx\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name ty\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"ty\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"a\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"b\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"c\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"d\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"e\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"f\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name rotation\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"rotation\", {\r\n    get: function() {\r\n      return Math.atan2(this.shx, this.sx);\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleX\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleX\", {\r\n    get: function() {\r\n      return this.decompose().scale.sx;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleY\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleY\", {\r\n    get: function() {\r\n      return this.decompose().scale.sy;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name isIdentity\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"isIdentity\", {\r\n    get: function() {\r\n      if (this.sx !== 1) {\r\n        return false;\r\n      }\r\n      if (this.shy !== 0) {\r\n        return false;\r\n      }\r\n      if (this.shx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.sy !== 1) {\r\n        return false;\r\n      }\r\n      if (this.tx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.ty !== 0) {\r\n        return false;\r\n      }\r\n      return true;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * Join the Matrix Values to a String\r\n   *\r\n   * @function join\r\n   * @param {string} separator Specifies a string to separate each pair of adjacent elements of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma (\",\"). If separator is an empty string, all elements are joined without any characters in between them.\r\n   * @returns {string} A string with all array elements joined.\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.join = function(separator) {\r\n    return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty]\r\n      .map(hpf)\r\n      .join(separator);\r\n  };\r\n\r\n  /**\r\n   * Multiply the matrix with given Matrix\r\n   *\r\n   * @function multiply\r\n   * @param matrix\r\n   * @returns {Matrix}\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.multiply = function(matrix) {\r\n    var sx = matrix.sx * this.sx + matrix.shy * this.shx;\r\n    var shy = matrix.sx * this.shy + matrix.shy * this.sy;\r\n    var shx = matrix.shx * this.sx + matrix.sy * this.shx;\r\n    var sy = matrix.shx * this.shy + matrix.sy * this.sy;\r\n    var tx = matrix.tx * this.sx + matrix.ty * this.shx + this.tx;\r\n    var ty = matrix.tx * this.shy + matrix.ty * this.sy + this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  /**\r\n   * @function decompose\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.decompose = function() {\r\n    var a = this.sx;\r\n    var b = this.shy;\r\n    var c = this.shx;\r\n    var d = this.sy;\r\n    var e = this.tx;\r\n    var f = this.ty;\r\n\r\n    var scaleX = Math.sqrt(a * a + b * b);\r\n    a /= scaleX;\r\n    b /= scaleX;\r\n\r\n    var shear = a * c + b * d;\r\n    c -= a * shear;\r\n    d -= b * shear;\r\n\r\n    var scaleY = Math.sqrt(c * c + d * d);\r\n    c /= scaleY;\r\n    d /= scaleY;\r\n    shear /= scaleY;\r\n\r\n    if (a * d < b * c) {\r\n      a = -a;\r\n      b = -b;\r\n      shear = -shear;\r\n      scaleX = -scaleX;\r\n    }\r\n\r\n    return {\r\n      scale: new Matrix(scaleX, 0, 0, scaleY, 0, 0),\r\n      translate: new Matrix(1, 0, 0, 1, e, f),\r\n      rotate: new Matrix(a, b, -b, a, 0, 0),\r\n      skew: new Matrix(1, 0, shear, 1, 0, 0)\r\n    };\r\n  };\r\n\r\n  /**\r\n   * @function toString\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.toString = function(parmPrecision) {\r\n    return this.join(\" \");\r\n  };\r\n\r\n  /**\r\n   * @function inversed\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.inversed = function() {\r\n    var a = this.sx,\r\n      b = this.shy,\r\n      c = this.shx,\r\n      d = this.sy,\r\n      e = this.tx,\r\n      f = this.ty;\r\n\r\n    var quot = 1 / (a * d - b * c);\r\n\r\n    var aInv = d * quot;\r\n    var bInv = -b * quot;\r\n    var cInv = -c * quot;\r\n    var dInv = a * quot;\r\n    var eInv = -aInv * e - cInv * f;\r\n    var fInv = -bInv * e - dInv * f;\r\n\r\n    return new Matrix(aInv, bInv, cInv, dInv, eInv, fInv);\r\n  };\r\n\r\n  /**\r\n   * @function applyToPoint\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToPoint = function(pt) {\r\n    var x = pt.x * this.sx + pt.y * this.shx + this.tx;\r\n    var y = pt.x * this.shy + pt.y * this.sy + this.ty;\r\n    return new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * @function applyToRectangle\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToRectangle = function(rect) {\r\n    var pt1 = this.applyToPoint(rect);\r\n    var pt2 = this.applyToPoint(new Point(rect.x + rect.w, rect.y + rect.h));\r\n    return new Rectangle(pt1.x, pt1.y, pt2.x - pt1.x, pt2.y - pt1.y);\r\n  };\r\n\r\n  /**\r\n   * Clone the Matrix\r\n   *\r\n   * @function clone\r\n   * @memberof Matrix#\r\n   * @name clone\r\n   * @instance\r\n   */\r\n  Matrix.prototype.clone = function() {\r\n    var sx = this.sx;\r\n    var shy = this.shy;\r\n    var shx = this.shx;\r\n    var sy = this.sy;\r\n    var tx = this.tx;\r\n    var ty = this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  API.Matrix = Matrix;\r\n\r\n  /**\r\n   * Multiplies two matrices. (see {@link Matrix})\r\n   * @param {Matrix} m1\r\n   * @param {Matrix} m2\r\n   * @memberof jsPDF#\r\n   * @name matrixMult\r\n   */\r\n  var matrixMult = (API.matrixMult = function(m1, m2) {\r\n    return m2.multiply(m1);\r\n  });\r\n\r\n  /**\r\n   * The identity matrix (equivalent to new Matrix(1, 0, 0, 1, 0, 0)).\r\n   * @type {Matrix}\r\n   * @memberof! jsPDF#\r\n   * @name identityMatrix\r\n   */\r\n  var identityMatrix = new Matrix(1, 0, 0, 1, 0, 0);\r\n  API.unitMatrix = API.identityMatrix = identityMatrix;\r\n\r\n  /**\r\n   * Adds a new pattern for later use.\r\n   * @param {String} key The key by it can be referenced later. The keys must be unique!\r\n   * @param {API.Pattern} pattern The pattern\r\n   */\r\n  var addPattern = function(key, pattern) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (patternMap[key]) return;\r\n\r\n    var prefix = pattern instanceof ShadingPattern ? \"Sh\" : \"P\";\r\n    var patternKey = prefix + (Object.keys(patterns).length + 1).toString(10);\r\n    pattern.id = patternKey;\r\n\r\n    patternMap[key] = patternKey;\r\n    patterns[patternKey] = pattern;\r\n\r\n    events.publish(\"addPattern\", pattern);\r\n  };\r\n\r\n  /**\r\n   * A pattern describing a shading pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {String} type One of \"axial\" or \"radial\"\r\n   * @param {Array<Number>} coords Either [x1, y1, x2, y2] for \"axial\" type describing the two interpolation points\r\n   * or [x1, y1, r, x2, y2, r2] for \"radial\" describing inner and the outer circle.\r\n   * @param {Array<Object>} colors An array of objects with the fields \"offset\" and \"color\". \"offset\" describes\r\n   * the offset in parameter space [0, 1]. \"color\" is an array of length 3 describing RGB values in [0, 255].\r\n   * @param {GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.ShadingPattern = ShadingPattern;\r\n\r\n  /**\r\n   * A PDF Tiling pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {Array.<Number>} boundingBox The bounding box at which one pattern cell gets clipped.\r\n   * @param {Number} xStep Horizontal spacing between pattern cells.\r\n   * @param {Number} yStep Vertical spacing between pattern cells.\r\n   * @param {API.GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.TilingPattern = TilingPattern;\r\n\r\n  /**\r\n   * Adds a new {@link API.ShadingPattern} for later use. Only available in \"advanced\" API mode.\r\n   * @param {String} key\r\n   * @param {Pattern} pattern\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name addPattern\r\n   */\r\n  API.addShadingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"addShadingPattern()\");\r\n\r\n    addPattern(key, pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Begins a new tiling pattern. All subsequent render calls are drawn to this pattern until {@link API.endTilingPattern}\r\n   * gets called. Only available in \"advanced\" API mode.\r\n   * @param {API.Pattern} pattern\r\n   * @memberof jsPDF#\r\n   * @name beginTilingPattern\r\n   */\r\n  API.beginTilingPattern = function(pattern) {\r\n    advancedApiModeTrap(\"beginTilingPattern()\");\r\n\r\n    beginNewRenderTarget(\r\n      pattern.boundingBox[0],\r\n      pattern.boundingBox[1],\r\n      pattern.boundingBox[2] - pattern.boundingBox[0],\r\n      pattern.boundingBox[3] - pattern.boundingBox[1],\r\n      pattern.matrix\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Ends a tiling pattern and sets the render target to the one active before {@link API.beginTilingPattern} has been called.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {string} key A unique key that is used to reference this pattern at later use.\r\n   * @param {API.Pattern} pattern The pattern to end.\r\n   * @memberof jsPDF#\r\n   * @name endTilingPattern\r\n   */\r\n  API.endTilingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"endTilingPattern()\");\r\n\r\n    // retrieve the stream\r\n    pattern.stream = pages[currentPage].join(\"\\n\");\r\n\r\n    addPattern(key, pattern);\r\n\r\n    events.publish(\"endTilingPattern\", pattern);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  var newObject = (API.__private__.newObject = function() {\r\n    var oid = newObjectDeferred();\r\n    newObjectDeferredBegin(oid, true);\r\n    return oid;\r\n  });\r\n\r\n  // Does not output the object.  The caller must call newObjectDeferredBegin(oid) before outputing any data\r\n  var newObjectDeferred = (API.__private__.newObjectDeferred = function() {\r\n    objectNumber++;\r\n    offsets[objectNumber] = function() {\r\n      return contentLength;\r\n    };\r\n    return objectNumber;\r\n  });\r\n\r\n  var newObjectDeferredBegin = function(oid, doOutput) {\r\n    doOutput = typeof doOutput === \"boolean\" ? doOutput : false;\r\n    offsets[oid] = contentLength;\r\n    if (doOutput) {\r\n      out(oid + \" 0 obj\");\r\n    }\r\n    return oid;\r\n  };\r\n  // Does not output the object until after the pages have been output.\r\n  // Returns an object containing the objectId and content.\r\n  // All pages have been added so the object ID can be estimated to start right after.\r\n  // This does not modify the current objectNumber;  It must be updated after the newObjects are output.\r\n  var newAdditionalObject = (API.__private__.newAdditionalObject = function() {\r\n    var objId = newObjectDeferred();\r\n    var obj = {\r\n      objId: objId,\r\n      content: \"\"\r\n    };\r\n    additionalObjects.push(obj);\r\n    return obj;\r\n  });\r\n\r\n  var rootDictionaryObjId = newObjectDeferred();\r\n  var resourceDictionaryObjId = newObjectDeferred();\r\n\r\n  /////////////////////\r\n  // Private functions\r\n  /////////////////////\r\n\r\n  var decodeColorString = (API.__private__.decodeColorString = function(color) {\r\n    var colorEncoded = color.split(\" \");\r\n    if (\r\n      colorEncoded.length === 2 &&\r\n      (colorEncoded[1] === \"g\" || colorEncoded[1] === \"G\")\r\n    ) {\r\n      // convert grayscale value to rgb so that it can be converted to hex for consistency\r\n      var floatVal = parseFloat(colorEncoded[0]);\r\n      colorEncoded = [floatVal, floatVal, floatVal, \"r\"];\r\n    } else if (\r\n      colorEncoded.length === 5 &&\r\n      (colorEncoded[4] === \"k\" || colorEncoded[4] === \"K\")\r\n    ) {\r\n      // convert CMYK values to rbg so that it can be converted to hex for consistency\r\n      var red = (1.0 - colorEncoded[0]) * (1.0 - colorEncoded[3]);\r\n      var green = (1.0 - colorEncoded[1]) * (1.0 - colorEncoded[3]);\r\n      var blue = (1.0 - colorEncoded[2]) * (1.0 - colorEncoded[3]);\r\n\r\n      colorEncoded = [red, green, blue, \"r\"];\r\n    }\r\n    var colorAsRGB = \"#\";\r\n    for (var i = 0; i < 3; i++) {\r\n      colorAsRGB += (\r\n        \"0\" + Math.floor(parseFloat(colorEncoded[i]) * 255).toString(16)\r\n      ).slice(-2);\r\n    }\r\n    return colorAsRGB;\r\n  });\r\n\r\n  var encodeColorString = (API.__private__.encodeColorString = function(\r\n    options\r\n  ) {\r\n    var color;\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        ch1: options\r\n      };\r\n    }\r\n    var ch1 = options.ch1;\r\n    var ch2 = options.ch2;\r\n    var ch3 = options.ch3;\r\n    var ch4 = options.ch4;\r\n    var letterArray =\r\n      options.pdfColorType === \"draw\" ? [\"G\", \"RG\", \"K\"] : [\"g\", \"rg\", \"k\"];\r\n\r\n    if (typeof ch1 === \"string\" && ch1.charAt(0) !== \"#\") {\r\n      var rgbColor = new RGBColor(ch1);\r\n      if (rgbColor.ok) {\r\n        ch1 = rgbColor.toHex();\r\n      } else if (!/^\\d*\\.?\\d*$/.test(ch1)) {\r\n        throw new Error(\r\n          'Invalid color \"' + ch1 + '\" passed to jsPDF.encodeColorString.'\r\n        );\r\n      }\r\n    }\r\n    //convert short rgb to long form\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{3}$/.test(ch1)) {\r\n      ch1 = \"#\" + ch1[1] + ch1[1] + ch1[2] + ch1[2] + ch1[3] + ch1[3];\r\n    }\r\n\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{6}$/.test(ch1)) {\r\n      var hex = parseInt(ch1.substr(1), 16);\r\n      ch1 = (hex >> 16) & 255;\r\n      ch2 = (hex >> 8) & 255;\r\n      ch3 = hex & 255;\r\n    }\r\n\r\n    if (\r\n      typeof ch2 === \"undefined\" ||\r\n      (typeof ch4 === \"undefined\" && ch1 === ch2 && ch2 === ch3)\r\n    ) {\r\n      // Gray color space.\r\n      if (typeof ch1 === \"string\") {\r\n        color = ch1 + \" \" + letterArray[0];\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = f2(ch1 / 255) + \" \" + letterArray[0];\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = f3(ch1 / 255) + \" \" + letterArray[0];\r\n        }\r\n      }\r\n    } else if (typeof ch4 === \"undefined\" || typeof ch4 === \"object\") {\r\n      // assume RGBA\r\n      if (ch4 && !isNaN(ch4.a)) {\r\n        //TODO Implement transparency.\r\n        //WORKAROUND use white for now, if transparent, otherwise handle as rgb\r\n        if (ch4.a === 0) {\r\n          color = [\"1.\", \"1.\", \"1.\", letterArray[1]].join(\" \");\r\n          return color;\r\n        }\r\n      }\r\n      // assume RGB\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, letterArray[1]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [\r\n              f2(ch1 / 255),\r\n              f2(ch2 / 255),\r\n              f2(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n            break;\r\n          default:\r\n          case 3:\r\n            color = [\r\n              f3(ch1 / 255),\r\n              f3(ch2 / 255),\r\n              f3(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n        }\r\n      }\r\n    } else {\r\n      // assume CMYK\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, ch4, letterArray[2]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = [f3(ch1), f3(ch2), f3(ch3), f3(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n        }\r\n      }\r\n    }\r\n    return color;\r\n  });\r\n\r\n  var getFilters = (API.__private__.getFilters = function() {\r\n    return filters;\r\n  });\r\n\r\n  var putStream = (API.__private__.putStream = function(options) {\r\n    options = options || {};\r\n    var data = options.data || \"\";\r\n    var filters = options.filters || getFilters();\r\n    var alreadyAppliedFilters = options.alreadyAppliedFilters || [];\r\n    var addLength1 = options.addLength1 || false;\r\n    var valueOfLength1 = data.length;\r\n    var objectId = options.objectId;\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null && typeof objectId == \"undefined\") {\r\n      throw new Error(\r\n        \"ObjectId must be passed to putStream for file encryption\"\r\n      );\r\n    }\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n\r\n    var processedData = {};\r\n    if (filters === true) {\r\n      filters = [\"FlateEncode\"];\r\n    }\r\n    var keyValues = options.additionalKeyValues || [];\r\n    if (typeof jsPDF.API.processDataByFilters !== \"undefined\") {\r\n      processedData = jsPDF.API.processDataByFilters(data, filters);\r\n    } else {\r\n      processedData = { data: data, reverseChain: [] };\r\n    }\r\n    var filterAsString =\r\n      processedData.reverseChain +\r\n      (Array.isArray(alreadyAppliedFilters)\r\n        ? alreadyAppliedFilters.join(\" \")\r\n        : alreadyAppliedFilters.toString());\r\n\r\n    if (processedData.data.length !== 0) {\r\n      keyValues.push({\r\n        key: \"Length\",\r\n        value: processedData.data.length\r\n      });\r\n      if (addLength1 === true) {\r\n        keyValues.push({\r\n          key: \"Length1\",\r\n          value: valueOfLength1\r\n        });\r\n      }\r\n    }\r\n\r\n    if (filterAsString.length != 0) {\r\n      if (filterAsString.split(\"/\").length - 1 === 1) {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: filterAsString\r\n        });\r\n      } else {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: \"[\" + filterAsString + \"]\"\r\n        });\r\n\r\n        for (var j = 0; j < keyValues.length; j += 1) {\r\n          if (keyValues[j].key === \"DecodeParms\") {\r\n            var decodeParmsArray = [];\r\n\r\n            for (\r\n              var i = 0;\r\n              i < processedData.reverseChain.split(\"/\").length - 1;\r\n              i += 1\r\n            ) {\r\n              decodeParmsArray.push(\"null\");\r\n            }\r\n\r\n            decodeParmsArray.push(keyValues[j].value);\r\n            keyValues[j].value = \"[\" + decodeParmsArray.join(\" \") + \"]\";\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    out(\"<<\");\r\n    for (var k = 0; k < keyValues.length; k++) {\r\n      out(\"/\" + keyValues[k].key + \" \" + keyValues[k].value);\r\n    }\r\n    out(\">>\");\r\n    if (processedData.data.length !== 0) {\r\n      out(\"stream\");\r\n      out(encryptor(processedData.data));\r\n      out(\"endstream\");\r\n    }\r\n  });\r\n\r\n  var putPage = (API.__private__.putPage = function(page) {\r\n    var pageNumber = page.number;\r\n    var data = page.data;\r\n    var pageObjectNumber = page.objId;\r\n    var pageContentsObjId = page.contentsObjId;\r\n\r\n    newObjectDeferredBegin(pageObjectNumber, true);\r\n    out(\"<</Type /Page\");\r\n    out(\"/Parent \" + page.rootDictionaryObjId + \" 0 R\");\r\n    out(\"/Resources \" + page.resourceDictionaryObjId + \" 0 R\");\r\n    out(\r\n      \"/MediaBox [\" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftX)) +\r\n        \" \" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftY)) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightX) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightY) +\r\n        \"]\"\r\n    );\r\n    if (page.cropBox !== null) {\r\n      out(\r\n        \"/CropBox [\" +\r\n          hpf(page.cropBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.cropBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.bleedBox !== null) {\r\n      out(\r\n        \"/BleedBox [\" +\r\n          hpf(page.bleedBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.trimBox !== null) {\r\n      out(\r\n        \"/TrimBox [\" +\r\n          hpf(page.trimBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.trimBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.artBox !== null) {\r\n      out(\r\n        \"/ArtBox [\" +\r\n          hpf(page.artBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.artBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (typeof page.userUnit === \"number\" && page.userUnit !== 1.0) {\r\n      out(\"/UserUnit \" + page.userUnit);\r\n    }\r\n\r\n    events.publish(\"putPage\", {\r\n      objId: pageObjectNumber,\r\n      pageContext: pagesContext[pageNumber],\r\n      pageNumber: pageNumber,\r\n      page: data\r\n    });\r\n    out(\"/Contents \" + pageContentsObjId + \" 0 R\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    // Page content\r\n    var pageContent = data.join(\"\\n\");\r\n\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      // if the user forgot to switch back to COMPAT mode, we must balance the graphics stack again\r\n      pageContent += \"\\nQ\";\r\n    }\r\n\r\n    newObjectDeferredBegin(pageContentsObjId, true);\r\n    putStream({\r\n      data: pageContent,\r\n      filters: getFilters(),\r\n      objectId: pageContentsObjId\r\n    });\r\n    out(\"endobj\");\r\n    return pageObjectNumber;\r\n  });\r\n\r\n  var putPages = (API.__private__.putPages = function() {\r\n    var n,\r\n      i,\r\n      pageObjectNumbers = [];\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pagesContext[n].objId = newObjectDeferred();\r\n      pagesContext[n].contentsObjId = newObjectDeferred();\r\n    }\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pageObjectNumbers.push(\r\n        putPage({\r\n          number: n,\r\n          data: pages[n],\r\n          objId: pagesContext[n].objId,\r\n          contentsObjId: pagesContext[n].contentsObjId,\r\n          mediaBox: pagesContext[n].mediaBox,\r\n          cropBox: pagesContext[n].cropBox,\r\n          bleedBox: pagesContext[n].bleedBox,\r\n          trimBox: pagesContext[n].trimBox,\r\n          artBox: pagesContext[n].artBox,\r\n          userUnit: pagesContext[n].userUnit,\r\n          rootDictionaryObjId: rootDictionaryObjId,\r\n          resourceDictionaryObjId: resourceDictionaryObjId\r\n        })\r\n      );\r\n    }\r\n    newObjectDeferredBegin(rootDictionaryObjId, true);\r\n    out(\"<</Type /Pages\");\r\n    var kids = \"/Kids [\";\r\n    for (i = 0; i < page; i++) {\r\n      kids += pageObjectNumbers[i] + \" 0 R \";\r\n    }\r\n    out(kids + \"]\");\r\n    out(\"/Count \" + page);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    events.publish(\"postPutPages\");\r\n  });\r\n\r\n  var putFont = function(font) {\r\n    events.publish(\"putFont\", {\r\n      font: font,\r\n      out: out,\r\n      newObject: newObject,\r\n      putStream: putStream\r\n    });\r\n\r\n    if (font.isAlreadyPutted !== true) {\r\n      font.objectNumber = newObject();\r\n      out(\"<<\");\r\n      out(\"/Type /Font\");\r\n      out(\"/BaseFont /\" + toPDFName(font.postScriptName));\r\n      out(\"/Subtype /Type1\");\r\n      if (typeof font.encoding === \"string\") {\r\n        out(\"/Encoding /\" + font.encoding);\r\n      }\r\n      out(\"/FirstChar 32\");\r\n      out(\"/LastChar 255\");\r\n      out(\">>\");\r\n      out(\"endobj\");\r\n    }\r\n  };\r\n\r\n  var putFonts = function() {\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          putFont(fonts[fontKey]);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXObject = function(xObject) {\r\n    xObject.objectNumber = newObject();\r\n\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/XObject\" });\r\n    options.push({ key: \"Subtype\", value: \"/Form\" });\r\n    options.push({\r\n      key: \"BBox\",\r\n      value:\r\n        \"[\" +\r\n        [\r\n          hpf(xObject.x),\r\n          hpf(xObject.y),\r\n          hpf(xObject.x + xObject.width),\r\n          hpf(xObject.y + xObject.height)\r\n        ].join(\" \") +\r\n        \"]\"\r\n    });\r\n    options.push({\r\n      key: \"Matrix\",\r\n      value: \"[\" + xObject.matrix.toString() + \"]\"\r\n    });\r\n    // TODO: /Resources\r\n\r\n    var stream = xObject.pages[1].join(\"\\n\");\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      objectId: xObject.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putXObjects = function() {\r\n    for (var xObjectKey in renderTargets) {\r\n      if (renderTargets.hasOwnProperty(xObjectKey)) {\r\n        putXObject(renderTargets[xObjectKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var interpolateAndEncodeRGBStream = function(colors, numberSamples) {\r\n    var tValues = [];\r\n    var t;\r\n    var dT = 1.0 / (numberSamples - 1);\r\n    for (t = 0.0; t < 1.0; t += dT) {\r\n      tValues.push(t);\r\n    }\r\n    tValues.push(1.0);\r\n    // add first and last control point if not present\r\n    if (colors[0].offset != 0.0) {\r\n      var c0 = {\r\n        offset: 0.0,\r\n        color: colors[0].color\r\n      };\r\n      colors.unshift(c0);\r\n    }\r\n    if (colors[colors.length - 1].offset != 1.0) {\r\n      var c1 = {\r\n        offset: 1.0,\r\n        color: colors[colors.length - 1].color\r\n      };\r\n      colors.push(c1);\r\n    }\r\n    var out = \"\";\r\n    var index = 0;\r\n\r\n    for (var i = 0; i < tValues.length; i++) {\r\n      t = tValues[i];\r\n      while (t > colors[index + 1].offset) index++;\r\n      var a = colors[index].offset;\r\n      var b = colors[index + 1].offset;\r\n      var d = (t - a) / (b - a);\r\n\r\n      var aColor = colors[index].color;\r\n      var bColor = colors[index + 1].color;\r\n\r\n      out +=\r\n        padd2Hex(Math.round((1 - d) * aColor[0] + d * bColor[0]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[1] + d * bColor[1]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[2] + d * bColor[2]).toString(16));\r\n    }\r\n    return out.trim();\r\n  };\r\n\r\n  var putShadingPattern = function(pattern, numberSamples) {\r\n    /*\r\n       Axial patterns shade between the two points specified in coords, radial patterns between the inner\r\n       and outer circle.\r\n       The user can specify an array (colors) that maps t-Values in [0, 1] to RGB colors. These are now\r\n       interpolated to equidistant samples and written to pdf as a sample (type 0) function.\r\n       */\r\n    // The number of color samples that should be used to describe the shading.\r\n    // The higher, the more accurate the gradient will be.\r\n    numberSamples || (numberSamples = 21);\r\n    var funcObjectNumber = newObject();\r\n    var stream = interpolateAndEncodeRGBStream(pattern.colors, numberSamples);\r\n\r\n    var options = [];\r\n    options.push({ key: \"FunctionType\", value: \"0\" });\r\n    options.push({ key: \"Domain\", value: \"[0.0 1.0]\" });\r\n    options.push({ key: \"Size\", value: \"[\" + numberSamples + \"]\" });\r\n    options.push({ key: \"BitsPerSample\", value: \"8\" });\r\n    options.push({ key: \"Range\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n    options.push({ key: \"Decode\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      alreadyAppliedFilters: [\"/ASCIIHexDecode\"],\r\n      objectId: funcObjectNumber\r\n    });\r\n    out(\"endobj\");\r\n\r\n    pattern.objectNumber = newObject();\r\n    out(\"<< /ShadingType \" + pattern.type);\r\n    out(\"/ColorSpace /DeviceRGB\");\r\n    var coords =\r\n      \"/Coords [\" +\r\n      hpf(parseFloat(pattern.coords[0])) +\r\n      \" \" + // x1\r\n      hpf(parseFloat(pattern.coords[1])) +\r\n      \" \"; // y1\r\n    if (pattern.type === 2) {\r\n      // axial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[3])); // y2\r\n    } else {\r\n      // radial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // r1\r\n        hpf(parseFloat(pattern.coords[3])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[4])) +\r\n        \" \" + // y2\r\n        hpf(parseFloat(pattern.coords[5])); // r2\r\n    }\r\n    coords += \"]\";\r\n    out(coords);\r\n\r\n    if (pattern.matrix) {\r\n      out(\"/Matrix [\" + pattern.matrix.toString() + \"]\");\r\n    }\r\n    out(\"/Function \" + funcObjectNumber + \" 0 R\");\r\n    out(\"/Extend [true true]\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putTilingPattern = function(pattern, deferredResourceDictionaryIds) {\r\n    var resourcesObjectId = newObjectDeferred();\r\n    var patternObjectId = newObject();\r\n\r\n    deferredResourceDictionaryIds.push({\r\n      resourcesOid: resourcesObjectId,\r\n      objectOid: patternObjectId\r\n    });\r\n\r\n    pattern.objectNumber = patternObjectId;\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/Pattern\" });\r\n    options.push({ key: \"PatternType\", value: \"1\" }); // tiling pattern\r\n    options.push({ key: \"PaintType\", value: \"1\" }); // colored tiling pattern\r\n    options.push({ key: \"TilingType\", value: \"1\" }); // constant spacing\r\n    options.push({\r\n      key: \"BBox\",\r\n      value: \"[\" + pattern.boundingBox.map(hpf).join(\" \") + \"]\"\r\n    });\r\n    options.push({ key: \"XStep\", value: hpf(pattern.xStep) });\r\n    options.push({ key: \"YStep\", value: hpf(pattern.yStep) });\r\n    options.push({ key: \"Resources\", value: resourcesObjectId + \" 0 R\" });\r\n    if (pattern.matrix) {\r\n      options.push({\r\n        key: \"Matrix\",\r\n        value: \"[\" + pattern.matrix.toString() + \"]\"\r\n      });\r\n    }\r\n\r\n    putStream({\r\n      data: pattern.stream,\r\n      additionalKeyValues: options,\r\n      objectId: pattern.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putPatterns = function(deferredResourceDictionaryIds) {\r\n    var patternKey;\r\n    for (patternKey in patterns) {\r\n      if (patterns.hasOwnProperty(patternKey)) {\r\n        if (patterns[patternKey] instanceof ShadingPattern) {\r\n          putShadingPattern(patterns[patternKey]);\r\n        } else if (patterns[patternKey] instanceof TilingPattern) {\r\n          putTilingPattern(patterns[patternKey], deferredResourceDictionaryIds);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putGState = function(gState) {\r\n    gState.objectNumber = newObject();\r\n    out(\"<<\");\r\n    for (var p in gState) {\r\n      switch (p) {\r\n        case \"opacity\":\r\n          out(\"/ca \" + f2(gState[p]));\r\n          break;\r\n        case \"stroke-opacity\":\r\n          out(\"/CA \" + f2(gState[p]));\r\n          break;\r\n      }\r\n    }\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putGStates = function() {\r\n    var gStateKey;\r\n    for (gStateKey in gStates) {\r\n      if (gStates.hasOwnProperty(gStateKey)) {\r\n        putGState(gStates[gStateKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXobjectDict = function() {\r\n    out(\"/XObject <<\");\r\n    for (var xObjectKey in renderTargets) {\r\n      if (\r\n        renderTargets.hasOwnProperty(xObjectKey) &&\r\n        renderTargets[xObjectKey].objectNumber >= 0\r\n      ) {\r\n        out(\r\n          \"/\" +\r\n            xObjectKey +\r\n            \" \" +\r\n            renderTargets[xObjectKey].objectNumber +\r\n            \" 0 R\"\r\n        );\r\n      }\r\n    }\r\n\r\n    // Loop through images, or other data objects\r\n    events.publish(\"putXobjectDict\");\r\n    out(\">>\");\r\n  };\r\n\r\n  var putEncryptionDict = function() {\r\n    encryption.oid = newObject();\r\n    out(\"<<\");\r\n    out(\"/Filter /Standard\");\r\n    out(\"/V \" + encryption.v);\r\n    out(\"/R \" + encryption.r);\r\n    out(\"/U <\" + encryption.toHexString(encryption.U) + \">\");\r\n    out(\"/O <\" + encryption.toHexString(encryption.O) + \">\");\r\n    out(\"/P \" + encryption.P);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putFontDict = function() {\r\n    out(\"/Font <<\");\r\n\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          out(\"/\" + fontKey + \" \" + fonts[fontKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n    }\r\n    out(\">>\");\r\n  };\r\n\r\n  var putShadingPatternDict = function() {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Shading <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof ShadingPattern &&\r\n          patterns[patternKey].objectNumber >= 0\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n\r\n      events.publish(\"putShadingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putTilingPatternDict = function(objectOid) {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Pattern <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof API.TilingPattern &&\r\n          patterns[patternKey].objectNumber >= 0 &&\r\n          patterns[patternKey].objectNumber < objectOid // prevent cyclic dependencies\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n      events.publish(\"putTilingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putGStatesDict = function() {\r\n    if (Object.keys(gStates).length > 0) {\r\n      var gStateKey;\r\n      out(\"/ExtGState <<\");\r\n      for (gStateKey in gStates) {\r\n        if (\r\n          gStates.hasOwnProperty(gStateKey) &&\r\n          gStates[gStateKey].objectNumber >= 0\r\n        ) {\r\n          out(\"/\" + gStateKey + \" \" + gStates[gStateKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n\r\n      events.publish(\"putGStateDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putResourceDictionary = function(objectIds) {\r\n    newObjectDeferredBegin(objectIds.resourcesOid, true);\r\n    out(\"<<\");\r\n    out(\"/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\");\r\n    putFontDict();\r\n    putShadingPatternDict();\r\n    putTilingPatternDict(objectIds.objectOid);\r\n    putGStatesDict();\r\n    putXobjectDict();\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putResources = function() {\r\n    // FormObjects, Patterns etc. might use other FormObjects/Patterns/Images\r\n    // which means their resource dictionaries must contain the already resolved\r\n    // object ids. For this reason we defer the serialization of the resource\r\n    // dicts until all objects have been serialized and have object ids.\r\n    //\r\n    // In order to prevent cyclic dependencies (which Adobe Reader doesn't like),\r\n    // we only put all oids that are smaller than the oid of the object the\r\n    // resource dict belongs to. This is correct behavior, since the streams\r\n    // may only use other objects that have already been defined and thus appear\r\n    // earlier in their respective collection.\r\n    // Currently, this only affects tiling patterns, but a (more) correct\r\n    // implementation of FormObjects would also define their own resource dicts.\r\n    var deferredResourceDictionaryIds = [];\r\n\r\n    putFonts();\r\n    putGStates();\r\n    putXObjects();\r\n    putPatterns(deferredResourceDictionaryIds);\r\n\r\n    events.publish(\"putResources\");\r\n    deferredResourceDictionaryIds.forEach(putResourceDictionary);\r\n    putResourceDictionary({\r\n      resourcesOid: resourceDictionaryObjId,\r\n      objectOid: Number.MAX_SAFE_INTEGER // output all objects\r\n    });\r\n    events.publish(\"postPutResources\");\r\n  };\r\n\r\n  var putAdditionalObjects = function() {\r\n    events.publish(\"putAdditionalObjects\");\r\n    for (var i = 0; i < additionalObjects.length; i++) {\r\n      var obj = additionalObjects[i];\r\n      newObjectDeferredBegin(obj.objId, true);\r\n      out(obj.content);\r\n      out(\"endobj\");\r\n    }\r\n    events.publish(\"postPutAdditionalObjects\");\r\n  };\r\n\r\n  var addFontToFontDictionary = function(font) {\r\n    fontmap[font.fontName] = fontmap[font.fontName] || {};\r\n    fontmap[font.fontName][font.fontStyle] = font.id;\r\n  };\r\n\r\n  var addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    encoding,\r\n    isStandardFont\r\n  ) {\r\n    var font = {\r\n      id: \"F\" + (Object.keys(fonts).length + 1).toString(10),\r\n      postScriptName: postScriptName,\r\n      fontName: fontName,\r\n      fontStyle: fontStyle,\r\n      encoding: encoding,\r\n      isStandardFont: isStandardFont || false,\r\n      metadata: {}\r\n    };\r\n\r\n    events.publish(\"addFont\", {\r\n      font: font,\r\n      instance: this\r\n    });\r\n\r\n    fonts[font.id] = font;\r\n    addFontToFontDictionary(font);\r\n    return font.id;\r\n  };\r\n\r\n  var addFonts = function(arrayOfFonts) {\r\n    for (var i = 0, l = standardFonts.length; i < l; i++) {\r\n      var fontKey = addFont.call(\r\n        this,\r\n        arrayOfFonts[i][0],\r\n        arrayOfFonts[i][1],\r\n        arrayOfFonts[i][2],\r\n        standardFonts[i][3],\r\n        true\r\n      );\r\n\r\n      if (putOnlyUsedFonts === false) {\r\n        usedFonts[fontKey] = true;\r\n      }\r\n      // adding aliases for standard fonts, this time matching the capitalization\r\n      var parts = arrayOfFonts[i][0].split(\"-\");\r\n      addFontToFontDictionary({\r\n        id: fontKey,\r\n        fontName: parts[0],\r\n        fontStyle: parts[1] || \"\"\r\n      });\r\n    }\r\n    events.publish(\"addFonts\", {\r\n      fonts: fonts,\r\n      dictionary: fontmap\r\n    });\r\n  };\r\n\r\n  var SAFE = function __safeCall(fn) {\r\n    fn.foo = function __safeCallWrapper() {\r\n      try {\r\n        return fn.apply(this, arguments);\r\n      } catch (e) {\r\n        var stack = e.stack || \"\";\r\n        if (~stack.indexOf(\" at \")) stack = stack.split(\" at \")[1];\r\n        var m =\r\n          \"Error in function \" +\r\n          stack.split(\"\\n\")[0].split(\"<\")[0] +\r\n          \": \" +\r\n          e.message;\r\n        if (globalObject.console) {\r\n          globalObject.console.error(m, e);\r\n          if (globalObject.alert) alert(m);\r\n        } else {\r\n          throw new Error(m);\r\n        }\r\n      }\r\n    };\r\n    fn.foo.bar = fn;\r\n    return fn.foo;\r\n  };\r\n\r\n  var to8bitStream = function(text, flags) {\r\n    /**\r\n     * PDF 1.3 spec:\r\n     * \"For text strings encoded in Unicode, the first two bytes must be 254 followed by\r\n     * 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts\r\n     * with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely\r\n     * to be a meaningful beginning of a word or phrase.) The remainder of the\r\n     * string consists of Unicode character codes, according to the UTF-16 encoding\r\n     * specified in the Unicode standard, version 2.0. Commonly used Unicode values\r\n     * are represented as 2 bytes per character, with the high-order byte appearing first\r\n     * in the string.\"\r\n     *\r\n     * In other words, if there are chars in a string with char code above 255, we\r\n     * recode the string to UCS2 BE - string doubles in length and BOM is prepended.\r\n     *\r\n     * HOWEVER!\r\n     * Actual *content* (body) text (as opposed to strings used in document properties etc)\r\n     * does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)\r\n     *\r\n     * Because of Adobe's focus on \"you subset your fonts!\" you are not supposed to have\r\n     * a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could\r\n     * fudge it with \"Identity-H\" encoding and custom CIDtoGID map that mimics Unicode\r\n     * code page. There, however, all characters in the stream are treated as GIDs,\r\n     * including BOM, which is the reason we need to skip BOM in content text (i.e. that\r\n     * that is tied to a font).\r\n     *\r\n     * To signal this \"special\" PDFEscape / to8bitStream handling mode,\r\n     * API.text() function sets (unless you overwrite it with manual values\r\n     * given to API.text(.., flags) )\r\n     * flags.autoencode = true\r\n     * flags.noBOM = true\r\n     *\r\n     * ===================================================================================\r\n     * `flags` properties relied upon:\r\n     *   .sourceEncoding = string with encoding label.\r\n     *                     \"Unicode\" by default. = encoding of the incoming text.\r\n     *                     pass some non-existing encoding name\r\n     *                     (ex: 'Do not touch my strings! I know what I am doing.')\r\n     *                     to make encoding code skip the encoding step.\r\n     *   .outputEncoding = Either valid PDF encoding name\r\n     *                     (must be supported by jsPDF font metrics, otherwise no encoding)\r\n     *                     or a JS object, where key = sourceCharCode, value = outputCharCode\r\n     *                     missing keys will be treated as: sourceCharCode === outputCharCode\r\n     *   .noBOM\r\n     *       See comment higher above for explanation for why this is important\r\n     *   .autoencode\r\n     *       See comment higher above for explanation for why this is important\r\n     */\r\n\r\n    var i,\r\n      l,\r\n      sourceEncoding,\r\n      encodingBlock,\r\n      outputEncoding,\r\n      newtext,\r\n      isUnicode,\r\n      ch,\r\n      bch;\r\n\r\n    flags = flags || {};\r\n    sourceEncoding = flags.sourceEncoding || \"Unicode\";\r\n    outputEncoding = flags.outputEncoding;\r\n\r\n    // This 'encoding' section relies on font metrics format\r\n    // attached to font objects by, among others,\r\n    // \"Willow Systems' standard_font_metrics plugin\"\r\n    // see jspdf.plugin.standard_font_metrics.js for format\r\n    // of the font.metadata.encoding Object.\r\n    // It should be something like\r\n    //   .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}\r\n    //   .widths = {0:width, code:width, ..., 'fof':divisor}\r\n    //   .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}\r\n    if (\r\n      (flags.autoencode || outputEncoding) &&\r\n      fonts[activeFontKey].metadata &&\r\n      fonts[activeFontKey].metadata[sourceEncoding] &&\r\n      fonts[activeFontKey].metadata[sourceEncoding].encoding\r\n    ) {\r\n      encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding;\r\n\r\n      // each font has default encoding. Some have it clearly defined.\r\n      if (!outputEncoding && fonts[activeFontKey].encoding) {\r\n        outputEncoding = fonts[activeFontKey].encoding;\r\n      }\r\n\r\n      // Hmmm, the above did not work? Let's try again, in different place.\r\n      if (!outputEncoding && encodingBlock.codePages) {\r\n        outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default\r\n      }\r\n\r\n      if (typeof outputEncoding === \"string\") {\r\n        outputEncoding = encodingBlock[outputEncoding];\r\n      }\r\n      // we want output encoding to be a JS Object, where\r\n      // key = sourceEncoding's character code and\r\n      // value = outputEncoding's character code.\r\n      if (outputEncoding) {\r\n        isUnicode = false;\r\n        newtext = [];\r\n        for (i = 0, l = text.length; i < l; i++) {\r\n          ch = outputEncoding[text.charCodeAt(i)];\r\n          if (ch) {\r\n            newtext.push(String.fromCharCode(ch));\r\n          } else {\r\n            newtext.push(text[i]);\r\n          }\r\n\r\n          // since we are looping over chars anyway, might as well\r\n          // check for residual unicodeness\r\n          if (newtext[i].charCodeAt(0) >> 8) {\r\n            /* more than 255 */\r\n            isUnicode = true;\r\n          }\r\n        }\r\n        text = newtext.join(\"\");\r\n      }\r\n    }\r\n\r\n    i = text.length;\r\n    // isUnicode may be set to false above. Hence the triple-equal to undefined\r\n    while (isUnicode === undefined && i !== 0) {\r\n      if (text.charCodeAt(i - 1) >> 8) {\r\n        /* more than 255 */\r\n        isUnicode = true;\r\n      }\r\n      i--;\r\n    }\r\n    if (!isUnicode) {\r\n      return text;\r\n    }\r\n\r\n    newtext = flags.noBOM ? [] : [254, 255];\r\n    for (i = 0, l = text.length; i < l; i++) {\r\n      ch = text.charCodeAt(i);\r\n      bch = ch >> 8; // divide by 256\r\n      if (bch >> 8) {\r\n        /* something left after dividing by 256 second time */\r\n        throw new Error(\r\n          \"Character at position \" +\r\n            i +\r\n            \" of string '\" +\r\n            text +\r\n            \"' exceeds 16bits. Cannot be encoded into UCS-2 BE\"\r\n        );\r\n      }\r\n      newtext.push(bch);\r\n      newtext.push(ch - (bch << 8));\r\n    }\r\n    return String.fromCharCode.apply(undefined, newtext);\r\n  };\r\n\r\n  var pdfEscape = (API.__private__.pdfEscape = API.pdfEscape = function(\r\n    text,\r\n    flags\r\n  ) {\r\n    /**\r\n     * Replace '/', '(', and ')' with pdf-safe versions\r\n     *\r\n     * Doing to8bitStream does NOT make this PDF display unicode text. For that\r\n     * we also need to reference a unicode font and embed it - royal pain in the rear.\r\n     *\r\n     * There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,\r\n     * which JavaScript Strings are happy to provide. So, while we still cannot display\r\n     * 2-byte characters property, at least CONDITIONALLY converting (entire string containing)\r\n     * 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF\r\n     * is still parseable.\r\n     * This will allow immediate support for unicode in document properties strings.\r\n     */\r\n    return to8bitStream(text, flags)\r\n      .replace(/\\\\/g, \"\\\\\\\\\")\r\n      .replace(/\\(/g, \"\\\\(\")\r\n      .replace(/\\)/g, \"\\\\)\");\r\n  });\r\n\r\n  var beginPage = (API.__private__.beginPage = function(format) {\r\n    pages[++page] = [];\r\n    pagesContext[page] = {\r\n      objId: 0,\r\n      contentsObjId: 0,\r\n      userUnit: Number(userUnit),\r\n      artBox: null,\r\n      bleedBox: null,\r\n      cropBox: null,\r\n      trimBox: null,\r\n      mediaBox: {\r\n        bottomLeftX: 0,\r\n        bottomLeftY: 0,\r\n        topRightX: Number(format[0]),\r\n        topRightY: Number(format[1])\r\n      }\r\n    };\r\n    _setPage(page);\r\n    setOutputDestination(pages[currentPage]);\r\n  });\r\n\r\n  var _addPage = function(parmFormat, parmOrientation) {\r\n    var dimensions, width, height;\r\n\r\n    orientation = parmOrientation || orientation;\r\n\r\n    if (typeof parmFormat === \"string\") {\r\n      dimensions = getPageFormat(parmFormat.toLowerCase());\r\n      if (Array.isArray(dimensions)) {\r\n        width = dimensions[0];\r\n        height = dimensions[1];\r\n      }\r\n    }\r\n\r\n    if (Array.isArray(parmFormat)) {\r\n      width = parmFormat[0] * scaleFactor;\r\n      height = parmFormat[1] * scaleFactor;\r\n    }\r\n\r\n    if (isNaN(width)) {\r\n      width = format[0];\r\n      height = format[1];\r\n    }\r\n\r\n    if (width > 14400 || height > 14400) {\r\n      console.warn(\r\n        \"A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400\"\r\n      );\r\n      width = Math.min(14400, width);\r\n      height = Math.min(14400, height);\r\n    }\r\n\r\n    format = [width, height];\r\n\r\n    switch (orientation.substr(0, 1)) {\r\n      case \"l\":\r\n        if (height > width) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n      case \"p\":\r\n        if (width > height) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n    }\r\n\r\n    beginPage(format);\r\n\r\n    // Set line width\r\n    setLineWidth(lineWidth);\r\n    // Set draw color\r\n    out(strokeColor);\r\n    // resurrecting non-default line caps, joins\r\n    if (lineCapID !== 0) {\r\n      out(lineCapID + \" J\");\r\n    }\r\n    if (lineJoinID !== 0) {\r\n      out(lineJoinID + \" j\");\r\n    }\r\n    events.publish(\"addPage\", {\r\n      pageNumber: page\r\n    });\r\n  };\r\n\r\n  var _deletePage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      pages.splice(n, 1);\r\n      pagesContext.splice(n, 1);\r\n      page--;\r\n      if (currentPage > page) {\r\n        currentPage = page;\r\n      }\r\n      this.setPage(currentPage);\r\n    }\r\n  };\r\n\r\n  var _setPage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      currentPage = n;\r\n    }\r\n  };\r\n\r\n  var getNumberOfPages = (API.__private__.getNumberOfPages = API.getNumberOfPages = function() {\r\n    return pages.length - 1;\r\n  });\r\n\r\n  /**\r\n   * Returns a document-specific font key - a label assigned to a\r\n   * font name + font type combination at the time the font was added\r\n   * to the font inventory.\r\n   *\r\n   * Font key is used as label for the desired font for a block of text\r\n   * to be added to the PDF document stream.\r\n   * @private\r\n   * @function\r\n   * @param fontName {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @param fontStyle {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @returns {string} Font key.\r\n   * @ignore\r\n   */\r\n  var getFont = function(fontName, fontStyle, options) {\r\n    var key = undefined,\r\n      fontNameLowerCase;\r\n    options = options || {};\r\n\r\n    fontName =\r\n      fontName !== undefined ? fontName : fonts[activeFontKey].fontName;\r\n    fontStyle =\r\n      fontStyle !== undefined ? fontStyle : fonts[activeFontKey].fontStyle;\r\n    fontNameLowerCase = fontName.toLowerCase();\r\n\r\n    if (\r\n      fontmap[fontNameLowerCase] !== undefined &&\r\n      fontmap[fontNameLowerCase][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontNameLowerCase][fontStyle];\r\n    } else if (\r\n      fontmap[fontName] !== undefined &&\r\n      fontmap[fontName][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontName][fontStyle];\r\n    } else {\r\n      if (options.disableWarning === false) {\r\n        console.warn(\r\n          \"Unable to look up font label for font '\" +\r\n            fontName +\r\n            \"', '\" +\r\n            fontStyle +\r\n            \"'. Refer to getFontList() for available fonts.\"\r\n        );\r\n      }\r\n    }\r\n\r\n    if (!key && !options.noFallback) {\r\n      key = fontmap[\"times\"][fontStyle];\r\n      if (key == null) {\r\n        key = fontmap[\"times\"][\"normal\"];\r\n      }\r\n    }\r\n    return key;\r\n  };\r\n\r\n  var putInfo = (API.__private__.putInfo = function() {\r\n    var objectId = newObject();\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n    out(\"<<\");\r\n    out(\"/Producer (\" + pdfEscape(encryptor(\"jsPDF \" + jsPDF.version)) + \")\");\r\n    for (var key in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(key) && documentProperties[key]) {\r\n        out(\r\n          \"/\" +\r\n            key.substr(0, 1).toUpperCase() +\r\n            key.substr(1) +\r\n            \" (\" +\r\n            pdfEscape(encryptor(documentProperties[key])) +\r\n            \")\"\r\n        );\r\n      }\r\n    }\r\n    out(\"/CreationDate (\" + pdfEscape(encryptor(creationDate)) + \")\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putCatalog = (API.__private__.putCatalog = function(options) {\r\n    options = options || {};\r\n    var tmpRootDictionaryObjId =\r\n      options.rootDictionaryObjId || rootDictionaryObjId;\r\n    newObject();\r\n    out(\"<<\");\r\n    out(\"/Type /Catalog\");\r\n    out(\"/Pages \" + tmpRootDictionaryObjId + \" 0 R\");\r\n    // PDF13ref Section 7.2.1\r\n    if (!zoomMode) zoomMode = \"fullwidth\";\r\n    switch (zoomMode) {\r\n      case \"fullwidth\":\r\n        out(\"/OpenAction [3 0 R /FitH null]\");\r\n        break;\r\n      case \"fullheight\":\r\n        out(\"/OpenAction [3 0 R /FitV null]\");\r\n        break;\r\n      case \"fullpage\":\r\n        out(\"/OpenAction [3 0 R /Fit]\");\r\n        break;\r\n      case \"original\":\r\n        out(\"/OpenAction [3 0 R /XYZ null null 1]\");\r\n        break;\r\n      default:\r\n        var pcn = \"\" + zoomMode;\r\n        if (pcn.substr(pcn.length - 1) === \"%\")\r\n          zoomMode = parseInt(zoomMode) / 100;\r\n        if (typeof zoomMode === \"number\") {\r\n          out(\"/OpenAction [3 0 R /XYZ null null \" + f2(zoomMode) + \"]\");\r\n        }\r\n    }\r\n    if (!layoutMode) layoutMode = \"continuous\";\r\n    switch (layoutMode) {\r\n      case \"continuous\":\r\n        out(\"/PageLayout /OneColumn\");\r\n        break;\r\n      case \"single\":\r\n        out(\"/PageLayout /SinglePage\");\r\n        break;\r\n      case \"two\":\r\n      case \"twoleft\":\r\n        out(\"/PageLayout /TwoColumnLeft\");\r\n        break;\r\n      case \"tworight\":\r\n        out(\"/PageLayout /TwoColumnRight\");\r\n        break;\r\n    }\r\n    if (pageMode) {\r\n      /**\r\n       * A name object specifying how the document should be displayed when opened:\r\n       * UseNone      : Neither document outline nor thumbnail images visible -- DEFAULT\r\n       * UseOutlines  : Document outline visible\r\n       * UseThumbs    : Thumbnail images visible\r\n       * FullScreen   : Full-screen mode, with no menu bar, window controls, or any other window visible\r\n       */\r\n      out(\"/PageMode /\" + pageMode);\r\n    }\r\n    events.publish(\"putCatalog\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putTrailer = (API.__private__.putTrailer = function() {\r\n    out(\"trailer\");\r\n    out(\"<<\");\r\n    out(\"/Size \" + (objectNumber + 1));\r\n    // Root and Info must be the last and second last objects written respectively\r\n    out(\"/Root \" + objectNumber + \" 0 R\");\r\n    out(\"/Info \" + (objectNumber - 1) + \" 0 R\");\r\n    if (encryptionOptions !== null) {\r\n      out(\"/Encrypt \" + encryption.oid + \" 0 R\");\r\n    }\r\n    out(\"/ID [ <\" + fileId + \"> <\" + fileId + \"> ]\");\r\n    out(\">>\");\r\n  });\r\n\r\n  var putHeader = (API.__private__.putHeader = function() {\r\n    out(\"%PDF-\" + pdfVersion);\r\n    out(\"%\\xBA\\xDF\\xAC\\xE0\");\r\n  });\r\n\r\n  var putXRef = (API.__private__.putXRef = function() {\r\n    var p = \"0000000000\";\r\n\r\n    out(\"xref\");\r\n    out(\"0 \" + (objectNumber + 1));\r\n    out(\"0000000000 65535 f \");\r\n    for (var i = 1; i <= objectNumber; i++) {\r\n      var offset = offsets[i];\r\n      if (typeof offset === \"function\") {\r\n        out((p + offsets[i]()).slice(-10) + \" 00000 n \");\r\n      } else {\r\n        if (typeof offsets[i] !== \"undefined\") {\r\n          out((p + offsets[i]).slice(-10) + \" 00000 n \");\r\n        } else {\r\n          out(\"0000000000 00000 n \");\r\n        }\r\n      }\r\n    }\r\n  });\r\n\r\n  var buildDocument = (API.__private__.buildDocument = function() {\r\n    resetDocument();\r\n    setOutputDestination(content);\r\n\r\n    events.publish(\"buildDocument\");\r\n\r\n    putHeader();\r\n    putPages();\r\n    putAdditionalObjects();\r\n    putResources();\r\n    if (encryptionOptions !== null) putEncryptionDict();\r\n    putInfo();\r\n    putCatalog();\r\n\r\n    var offsetOfXRef = contentLength;\r\n    putXRef();\r\n    putTrailer();\r\n    out(\"startxref\");\r\n    out(\"\" + offsetOfXRef);\r\n    out(\"%%EOF\");\r\n\r\n    setOutputDestination(pages[currentPage]);\r\n\r\n    return content.join(\"\\n\");\r\n  });\r\n\r\n  var getBlob = (API.__private__.getBlob = function(data) {\r\n    return new Blob([getArrayBuffer(data)], {\r\n      type: \"application/pdf\"\r\n    });\r\n  });\r\n\r\n  /**\r\n   * Generates the PDF document.\r\n   *\r\n   * If `type` argument is undefined, output is raw body of resulting PDF returned as a string.\r\n   *\r\n   * @param {string} type A string identifying one of the possible output types.<br/>\r\n   *                      Possible values are: <br/>\r\n   *                          'arraybuffer' -> (ArrayBuffer)<br/>\r\n   *                          'blob' -> (Blob)<br/>\r\n   *                          'bloburi'/'bloburl' -> (string)<br/>\r\n   *                          'datauristring'/'dataurlstring' -> (string)<br/>\r\n   *                          'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>\r\n   *                          'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfjsnewwindow' -> (wind | null)\r\n   * @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>\r\n   *                                Possible options are 'filename'.<br/>\r\n   *                                A string can be passed instead of {filename:string} and defaults to 'generated.pdf'\r\n   * @function\r\n   * @instance\r\n   * @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}\r\n   * @memberof jsPDF#\r\n   * @name output\r\n   */\r\n  var output = (API.output = API.__private__.output = SAFE(function output(\r\n    type,\r\n    options\r\n  ) {\r\n    options = options || {};\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        filename: options\r\n      };\r\n    } else {\r\n      options.filename = options.filename || \"generated.pdf\";\r\n    }\r\n\r\n    switch (type) {\r\n      case undefined:\r\n        return buildDocument();\r\n      case \"save\":\r\n        API.save(options.filename);\r\n        break;\r\n      case \"arraybuffer\":\r\n        return getArrayBuffer(buildDocument());\r\n      case \"blob\":\r\n        return getBlob(buildDocument());\r\n      case \"bloburi\":\r\n      case \"bloburl\":\r\n        // Developer is responsible of calling revokeObjectURL\r\n        if (\r\n          typeof globalObject.URL !== \"undefined\" &&\r\n          typeof globalObject.URL.createObjectURL === \"function\"\r\n        ) {\r\n          return (\r\n            (globalObject.URL &&\r\n              globalObject.URL.createObjectURL(getBlob(buildDocument()))) ||\r\n            void 0\r\n          );\r\n        } else {\r\n          console.warn(\r\n            \"bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauristring\":\r\n      case \"dataurlstring\":\r\n        var dataURI = \"\";\r\n        var pdfDocument = buildDocument();\r\n        try {\r\n          dataURI = btoa(pdfDocument);\r\n        } catch (e) {\r\n          dataURI = btoa(unescape(encodeURIComponent(pdfDocument)));\r\n        }\r\n        return (\r\n          \"data:application/pdf;filename=\" +\r\n          options.filename +\r\n          \";base64,\" +\r\n          dataURI\r\n        );\r\n      case \"pdfobjectnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfObjectUrl =\r\n            \"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js\";\r\n          var integrity =\r\n            ' integrity=\"sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==\" crossorigin=\"anonymous\"';\r\n\r\n          if (options.pdfObjectUrl) {\r\n            pdfObjectUrl = options.pdfObjectUrl;\r\n            integrity = \"\";\r\n          }\r\n\r\n          var htmlForNewWindow =\r\n            \"<html>\" +\r\n            '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src=\"' +\r\n            pdfObjectUrl +\r\n            '\"' +\r\n            integrity +\r\n            '></script><script >PDFObject.embed(\"' +\r\n            this.output(\"dataurlstring\") +\r\n            '\", ' +\r\n            JSON.stringify(options) +\r\n            \");</script></body></html>\";\r\n          var nW = globalObject.open();\r\n\r\n          if (nW !== null) {\r\n            nW.document.write(htmlForNewWindow);\r\n          }\r\n          return nW;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfobjectnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"pdfjsnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfJsUrl = options.pdfJsUrl || \"examples/PDF.js/web/viewer.html\";\r\n          var htmlForPDFjsNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            '<body><iframe id=\"pdfViewer\" src=\"' +\r\n            pdfJsUrl +\r\n            \"?file=&downloadName=\" +\r\n            options.filename +\r\n            '\" width=\"500px\" height=\"400px\" />' +\r\n            \"</body></html>\";\r\n          var PDFjsNewWindow = globalObject.open();\r\n\r\n          if (PDFjsNewWindow !== null) {\r\n            PDFjsNewWindow.document.write(htmlForPDFjsNewWindow);\r\n            var scope = this;\r\n            PDFjsNewWindow.document.documentElement.querySelector(\r\n              \"#pdfViewer\"\r\n            ).onload = function() {\r\n              PDFjsNewWindow.document.title = options.filename;\r\n              PDFjsNewWindow.document.documentElement\r\n                .querySelector(\"#pdfViewer\")\r\n                .contentWindow.PDFViewerApplication.open(\r\n                  scope.output(\"bloburl\")\r\n                );\r\n            };\r\n          }\r\n          return PDFjsNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfjsnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"dataurlnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var htmlForDataURLNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            \"<body>\" +\r\n            '<iframe src=\"' +\r\n            this.output(\"datauristring\", options) +\r\n            '\"></iframe>' +\r\n            \"</body></html>\";\r\n          var dataURLNewWindow = globalObject.open();\r\n          if (dataURLNewWindow !== null) {\r\n            dataURLNewWindow.document.write(htmlForDataURLNewWindow);\r\n            dataURLNewWindow.document.title = options.filename;\r\n          }\r\n          if (dataURLNewWindow || typeof safari === \"undefined\")\r\n            return dataURLNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option dataurlnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauri\":\r\n      case \"dataurl\":\r\n        return (globalObject.document.location.href = this.output(\r\n          \"datauristring\",\r\n          options\r\n        ));\r\n      default:\r\n        return null;\r\n    }\r\n  }));\r\n\r\n  /**\r\n   * Used to see if a supplied hotfix was requested when the pdf instance was created.\r\n   * @param {string} hotfixName - The name of the hotfix to check.\r\n   * @returns {boolean}\r\n   */\r\n  var hasHotfix = function(hotfixName) {\r\n    return (\r\n      Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1\r\n    );\r\n  };\r\n\r\n  switch (unit) {\r\n    case \"pt\":\r\n      scaleFactor = 1;\r\n      break;\r\n    case \"mm\":\r\n      scaleFactor = 72 / 25.4;\r\n      break;\r\n    case \"cm\":\r\n      scaleFactor = 72 / 2.54;\r\n      break;\r\n    case \"in\":\r\n      scaleFactor = 72;\r\n      break;\r\n    case \"px\":\r\n      if (hasHotfix(\"px_scaling\") == true) {\r\n        scaleFactor = 72 / 96;\r\n      } else {\r\n        scaleFactor = 96 / 72;\r\n      }\r\n      break;\r\n    case \"pc\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"em\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"ex\":\r\n      scaleFactor = 6;\r\n      break;\r\n    default:\r\n      if (typeof unit === \"number\") {\r\n        scaleFactor = unit;\r\n      } else {\r\n        throw new Error(\"Invalid unit: \" + unit);\r\n      }\r\n  }\r\n\r\n  var encryption = null;\r\n  setCreationDate();\r\n  setFileId();\r\n\r\n  var getEncryptor = function(objectId) {\r\n    if (encryptionOptions !== null) {\r\n      return encryption.encryptor(objectId, 0);\r\n    }\r\n    return function(data) {\r\n      return data;\r\n    };\r\n  };\r\n\r\n  //---------------------------------------\r\n  // Public API\r\n\r\n  var getPageInfo = (API.__private__.getPageInfo = API.getPageInfo = function(\r\n    pageNumberOneBased\r\n  ) {\r\n    if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfo\");\r\n    }\r\n    var objId = pagesContext[pageNumberOneBased].objId;\r\n    return {\r\n      objId: objId,\r\n      pageNumber: pageNumberOneBased,\r\n      pageContext: pagesContext[pageNumberOneBased]\r\n    };\r\n  });\r\n\r\n  var getPageInfoByObjId = (API.__private__.getPageInfoByObjId = function(\r\n    objId\r\n  ) {\r\n    if (isNaN(objId) || objId % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfoByObjId\");\r\n    }\r\n    for (var pageNumber in pagesContext) {\r\n      if (pagesContext[pageNumber].objId === objId) {\r\n        break;\r\n      }\r\n    }\r\n    return getPageInfo(pageNumber);\r\n  });\r\n\r\n  var getCurrentPageInfo = (API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function() {\r\n    return {\r\n      objId: pagesContext[currentPage].objId,\r\n      pageNumber: currentPage,\r\n      pageContext: pagesContext[currentPage]\r\n    };\r\n  });\r\n\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @param format {String/Array} The format of the new page. Can be: <ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n   * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n   * @param orientation {string} Orientation of the new page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" (Default), \"l\").\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addPage\r\n   */\r\n  API.addPage = function() {\r\n    _addPage.apply(this, arguments);\r\n    return this;\r\n  };\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name setPage\r\n   * @param {number} page Switch the active page to the page number specified (indexed starting at 1).\r\n   * @example\r\n   * doc = jsPDF()\r\n   * doc.addPage()\r\n   * doc.addPage()\r\n   * doc.text('I am on page 3', 10, 10)\r\n   * doc.setPage(1)\r\n   * doc.text('I am on page 1', 10, 10)\r\n   */\r\n  API.setPage = function() {\r\n    _setPage.apply(this, arguments);\r\n    setOutputDestination.call(this, pages[currentPage]);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name insertPage\r\n   * @memberof jsPDF#\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {Object} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.insertPage = function(beforePage) {\r\n    this.addPage();\r\n    this.movePage(currentPage, beforePage);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name movePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {number} targetPage\r\n   * @param {number} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.movePage = function(targetPage, beforePage) {\r\n    var tmpPages, tmpPagesContext;\r\n    if (targetPage > beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var i = targetPage; i > beforePage; i--) {\r\n        pages[i] = pages[i - 1];\r\n        pagesContext[i] = pagesContext[i - 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    } else if (targetPage < beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var j = targetPage; j < beforePage; j++) {\r\n        pages[j] = pages[j + 1];\r\n        pagesContext[j] = pagesContext[j + 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Deletes a page from the PDF.\r\n   * @name deletePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @param {number} targetPage\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   */\r\n  API.deletePage = function() {\r\n    _deletePage.apply(this, arguments);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.\r\n   * @param {Object} [options] - Collection of settings signaling how the text must be encoded.\r\n   * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.\r\n   * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging\r\n   * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.\r\n   * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.\r\n   * @param {number} [options.charSpace=0] - The space between each letter.\r\n   * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.\r\n   * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.\r\n   * @param {Object} [options.flags] - Flags for to8bitStream.\r\n   * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.\r\n   * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.\r\n   * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.\r\n   * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.\r\n   * @param {boolean} [options.isInputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isInputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine\r\n   * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.\r\n   *\r\n   * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing\r\n   * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this\r\n   * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a\r\n   * DIFFERENT result. A matrix is only allowed in \"advanced\" API mode.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name text\r\n   */\r\n  API.__private__.text = API.text = function(text, x, y, options, transform) {\r\n    /*\r\n     * Inserts something like this into PDF\r\n     *   BT\r\n     *    /F1 16 Tf  % Font name + size\r\n     *    16 TL % How many units down for next line in multiline text\r\n     *    0 g % color\r\n     *    28.35 813.54 Td % position\r\n     *    (line one) Tj\r\n     *    T* (line two) Tj\r\n     *    T* (line three) Tj\r\n     *   ET\r\n     */\r\n    options = options || {};\r\n    var scope = options.scope || this;\r\n    var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, text, flags)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(data, coordinates... , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (\r\n      typeof text === \"number\" &&\r\n      typeof x === \"number\" &&\r\n      (typeof y === \"string\" || Array.isArray(y))\r\n    ) {\r\n      var tmp = y;\r\n      y = x;\r\n      x = text;\r\n      text = tmp;\r\n    }\r\n\r\n    var transformationMatrix;\r\n\r\n    if (arguments[3] instanceof Matrix === false) {\r\n      flags = arguments[3];\r\n      angle = arguments[4];\r\n      align = arguments[5];\r\n\r\n      if (typeof flags !== \"object\" || flags === null) {\r\n        if (typeof angle === \"string\") {\r\n          align = angle;\r\n          angle = null;\r\n        }\r\n        if (typeof flags === \"string\") {\r\n          align = flags;\r\n          flags = null;\r\n        }\r\n        if (typeof flags === \"number\") {\r\n          angle = flags;\r\n          flags = null;\r\n        }\r\n        options = {\r\n          flags: flags,\r\n          angle: angle,\r\n          align: align\r\n        };\r\n      }\r\n    } else {\r\n      advancedApiModeTrap(\r\n        \"The transform parameter of text() with a Matrix value\"\r\n      );\r\n      transformationMatrix = transform;\r\n    }\r\n\r\n    if (isNaN(x) || isNaN(y) || typeof text === \"undefined\" || text === null) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.text\");\r\n    }\r\n\r\n    if (text.length === 0) {\r\n      return scope;\r\n    }\r\n\r\n    var xtra = \"\";\r\n    var isHex = false;\r\n    var lineHeight =\r\n      typeof options.lineHeightFactor === \"number\"\r\n        ? options.lineHeightFactor\r\n        : lineHeightFactor;\r\n    var scaleFactor = scope.internal.scaleFactor;\r\n\r\n    function ESC(s) {\r\n      s = s.split(\"\\t\").join(Array(options.TabLen || 9).join(\" \"));\r\n      return pdfEscape(s, flags);\r\n    }\r\n\r\n    function transformTextToSpecialArray(text) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      var da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (typeof curDa === \"string\") {\r\n          da.push(curDa);\r\n        } else {\r\n          if (\r\n            Array.isArray(text) &&\r\n            (curDa.length === 1 ||\r\n              (curDa[1] === undefined && curDa[2] === undefined))\r\n          ) {\r\n            da.push(curDa[0]);\r\n          } else {\r\n            da.push([curDa[0], curDa[1], curDa[2]]);\r\n          }\r\n        }\r\n      }\r\n      return da;\r\n    }\r\n\r\n    function processTextByFunction(text, processingFunction) {\r\n      var result;\r\n      if (typeof text === \"string\") {\r\n        result = processingFunction(text)[0];\r\n      } else if (Array.isArray(text)) {\r\n        //we don't want to destroy original text array, so cloning it\r\n        var sa = text.concat();\r\n        var da = [];\r\n        var len = sa.length;\r\n        var curDa;\r\n        var tmpResult;\r\n        //we do array.join('text that must not be PDFescaped\")\r\n        //thus, pdfEscape each component separately\r\n        while (len--) {\r\n          curDa = sa.shift();\r\n          if (typeof curDa === \"string\") {\r\n            da.push(processingFunction(curDa)[0]);\r\n          } else if (Array.isArray(curDa) && typeof curDa[0] === \"string\") {\r\n            tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);\r\n            da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);\r\n          }\r\n        }\r\n        result = da;\r\n      }\r\n      return result;\r\n    }\r\n\r\n    //Check if text is of type String\r\n    var textIsOfTypeString = false;\r\n    var tmpTextIsOfTypeString = true;\r\n\r\n    if (typeof text === \"string\") {\r\n      textIsOfTypeString = true;\r\n    } else if (Array.isArray(text)) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (\r\n          typeof curDa !== \"string\" ||\r\n          (Array.isArray(curDa) && typeof curDa[0] !== \"string\")\r\n        ) {\r\n          tmpTextIsOfTypeString = false;\r\n        }\r\n      }\r\n      textIsOfTypeString = tmpTextIsOfTypeString;\r\n    }\r\n    if (textIsOfTypeString === false) {\r\n      throw new Error(\r\n        'Type of text must be string or Array. \"' +\r\n          text +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n\r\n    //If there are any newlines in text, we assume\r\n    //the user wanted to print multiple lines, so break the\r\n    //text up into an array. If the text is already an array,\r\n    //we assume the user knows what they are doing.\r\n    //Convert text into an array anyway to simplify\r\n    //later code.\r\n\r\n    if (typeof text === \"string\") {\r\n      if (text.match(/[\\r?\\n]/)) {\r\n        text = text.split(/\\r\\n|\\r|\\n/g);\r\n      } else {\r\n        text = [text];\r\n      }\r\n    }\r\n\r\n    //baseline\r\n    var height = activeFontSize / scope.internal.scaleFactor;\r\n    var descent = height * (lineHeight - 1);\r\n\r\n    switch (options.baseline) {\r\n      case \"bottom\":\r\n        y -= descent;\r\n        break;\r\n      case \"top\":\r\n        y += height - descent;\r\n        break;\r\n      case \"hanging\":\r\n        y += height - 2 * descent;\r\n        break;\r\n      case \"middle\":\r\n        y += height / 2 - descent;\r\n        break;\r\n      case \"ideographic\":\r\n      case \"alphabetic\":\r\n      default:\r\n        // do nothing, everything is fine\r\n        break;\r\n    }\r\n\r\n    //multiline\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    if (maxWidth > 0) {\r\n      if (typeof text === \"string\") {\r\n        text = scope.splitTextToSize(text, maxWidth);\r\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n        text = text.reduce(function(acc, textLine) {\r\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\r\n        }, []);\r\n      }\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"preProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    options = payload.options;\r\n\r\n    //angle\r\n    angle = options.angle;\r\n\r\n    if (\r\n      transformationMatrix instanceof Matrix === false &&\r\n      angle &&\r\n      typeof angle === \"number\"\r\n    ) {\r\n      angle *= Math.PI / 180;\r\n\r\n      if (options.rotationDirection === 0) {\r\n        angle = -angle;\r\n      }\r\n\r\n      if (apiMode === ApiMode.ADVANCED) {\r\n        angle = -angle;\r\n      }\r\n\r\n      var c = Math.cos(angle);\r\n      var s = Math.sin(angle);\r\n      transformationMatrix = new Matrix(c, s, -s, c, 0, 0);\r\n    } else if (angle && angle instanceof Matrix) {\r\n      transformationMatrix = angle;\r\n    }\r\n\r\n    if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {\r\n      transformationMatrix = identityMatrix;\r\n    }\r\n\r\n    //charSpace\r\n\r\n    charSpace = options.charSpace || activeCharSpace;\r\n\r\n    if (typeof charSpace !== \"undefined\") {\r\n      xtra += hpf(scale(charSpace)) + \" Tc\\n\";\r\n      this.setCharSpace(this.getCharSpace() || 0);\r\n    }\r\n\r\n    horizontalScale = options.horizontalScale;\r\n    if (typeof horizontalScale !== \"undefined\") {\r\n      xtra += hpf(horizontalScale * 100) + \" Tz\\n\";\r\n    }\r\n\r\n    //lang\r\n\r\n    var lang = options.lang;\r\n\r\n    if (lang) {\r\n      //    xtra += \"/Lang (\" + lang +\")\\n\";\r\n    }\r\n\r\n    //renderingMode\r\n    var renderingMode = -1;\r\n    var parmRenderingMode =\r\n      typeof options.renderingMode !== \"undefined\"\r\n        ? options.renderingMode\r\n        : options.stroke;\r\n    var pageContext = scope.internal.getCurrentPageInfo().pageContext;\r\n\r\n    switch (parmRenderingMode) {\r\n      case 0:\r\n      case false:\r\n      case \"fill\":\r\n        renderingMode = 0;\r\n        break;\r\n      case 1:\r\n      case true:\r\n      case \"stroke\":\r\n        renderingMode = 1;\r\n        break;\r\n      case 2:\r\n      case \"fillThenStroke\":\r\n        renderingMode = 2;\r\n        break;\r\n      case 3:\r\n      case \"invisible\":\r\n        renderingMode = 3;\r\n        break;\r\n      case 4:\r\n      case \"fillAndAddForClipping\":\r\n        renderingMode = 4;\r\n        break;\r\n      case 5:\r\n      case \"strokeAndAddPathForClipping\":\r\n        renderingMode = 5;\r\n        break;\r\n      case 6:\r\n      case \"fillThenStrokeAndAddToPathForClipping\":\r\n        renderingMode = 6;\r\n        break;\r\n      case 7:\r\n      case \"addToPathForClipping\":\r\n        renderingMode = 7;\r\n        break;\r\n    }\r\n\r\n    var usedRenderingMode =\r\n      typeof pageContext.usedRenderingMode !== \"undefined\"\r\n        ? pageContext.usedRenderingMode\r\n        : -1;\r\n\r\n    //if the coder wrote it explicitly to use a specific\r\n    //renderingMode, then use it\r\n    if (renderingMode !== -1) {\r\n      xtra += renderingMode + \" Tr\\n\";\r\n      //otherwise check if we used the rendering Mode already\r\n      //if so then set the rendering Mode...\r\n    } else if (usedRenderingMode !== -1) {\r\n      xtra += \"0 Tr\\n\";\r\n    }\r\n\r\n    if (renderingMode !== -1) {\r\n      pageContext.usedRenderingMode = renderingMode;\r\n    }\r\n\r\n    //align\r\n    align = options.align || \"left\";\r\n    var leading = activeFontSize * lineHeight;\r\n    var pageWidth = scope.internal.pageSize.getWidth();\r\n    var activeFont = fonts[activeFontKey];\r\n    charSpace = options.charSpace || activeCharSpace;\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    var lineWidths;\r\n    flags = Object.assign({ autoencode: true, noBOM: true }, options.flags);\r\n\r\n    var wordSpacingPerLine = [];\r\n    var findWidth = function(v) {\r\n      return (\r\n        (scope.getStringUnitWidth(v, {\r\n          font: activeFont,\r\n          charSpace: charSpace,\r\n          fontSize: activeFontSize,\r\n          doKerning: false\r\n        }) *\r\n          activeFontSize) /\r\n        scaleFactor\r\n      );\r\n    };\r\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n      da = transformTextToSpecialArray(text);\r\n      var newY;\r\n      if (align !== \"left\") {\r\n        lineWidths = da.map(findWidth);\r\n      }\r\n      //The first line uses the \"main\" Td setting,\r\n      //and the subsequent lines are offset by the\r\n      //previous line's x coordinate.\r\n      var prevWidth = 0;\r\n      var newX;\r\n      if (align === \"right\") {\r\n        //The passed in x coordinate defines the\r\n        //rightmost point of the text.\r\n        x -= lineWidths[0];\r\n        text = [];\r\n        len = da.length;\r\n        for (var i = 0; i < len; i++) {\r\n          if (i === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale(prevWidth - lineWidths[i]);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[i], newX, newY]);\r\n          prevWidth = lineWidths[i];\r\n        }\r\n      } else if (align === \"center\") {\r\n        //The passed in x coordinate defines\r\n        //the center point.\r\n        x -= lineWidths[0] / 2;\r\n        text = [];\r\n        len = da.length;\r\n        for (var j = 0; j < len; j++) {\r\n          if (j === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale((prevWidth - lineWidths[j]) / 2);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[j], newX, newY]);\r\n          prevWidth = lineWidths[j];\r\n        }\r\n      } else if (align === \"left\") {\r\n        text = [];\r\n        len = da.length;\r\n        for (var h = 0; h < len; h++) {\r\n          text.push(da[h]);\r\n        }\r\n      } else if (align === \"justify\" && activeFont.encoding === \"Identity-H\") {\r\n        // when using unicode fonts, wordSpacePerLine does not apply\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        let backToStartX = 0;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : backToStartX;\r\n          if (l < len - 1) {\r\n            let spacing = scale(\r\n              (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n            );\r\n            let words = da[l].split(\" \");\r\n            text.push([words[0] + \" \", newX, newY]);\r\n            backToStartX = 0; // distance to reset back to the left\r\n            for (let i = 1; i < words.length; i++) {\r\n              let shiftAmount =\r\n                (findWidth(words[i - 1] + \" \" + words[i]) -\r\n                  findWidth(words[i])) *\r\n                  scaleFactor +\r\n                spacing;\r\n              if (i == words.length - 1) text.push([words[i], shiftAmount, 0]);\r\n              else text.push([words[i] + \" \", shiftAmount, 0]);\r\n              backToStartX -= shiftAmount;\r\n            }\r\n          } else {\r\n            text.push([da[l], newX, newY]);\r\n          }\r\n        }\r\n        text.push([\"\", backToStartX, 0]);\r\n      } else if (align === \"justify\") {\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : 0;\r\n          if (l < len - 1) {\r\n            wordSpacingPerLine.push(\r\n              hpf(\r\n                scale(\r\n                  (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n                )\r\n              )\r\n            );\r\n          } else {\r\n            wordSpacingPerLine.push(0);\r\n          }\r\n          text.push([da[l], newX, newY]);\r\n        }\r\n      } else {\r\n        throw new Error(\r\n          'Unrecognized alignment option, use \"left\", \"center\", \"right\" or \"justify\".'\r\n        );\r\n      }\r\n    }\r\n\r\n    //R2L\r\n    var doReversing = typeof options.R2L === \"boolean\" ? options.R2L : R2L;\r\n    if (doReversing === true) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [\r\n          text\r\n            .split(\"\")\r\n            .reverse()\r\n            .join(\"\"),\r\n          posX,\r\n          posY\r\n        ];\r\n      });\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"postProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    isHex = payload.mutex.isHex || false;\r\n\r\n    //Escaping\r\n    var activeFontEncoding = fonts[activeFontKey].encoding;\r\n\r\n    if (\r\n      activeFontEncoding === \"WinAnsiEncoding\" ||\r\n      activeFontEncoding === \"StandardEncoding\"\r\n    ) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [ESC(text), posX, posY];\r\n      });\r\n    }\r\n\r\n    da = transformTextToSpecialArray(text);\r\n\r\n    text = [];\r\n    var STRING = 0;\r\n    var ARRAY = 1;\r\n    var variant = Array.isArray(da[0]) ? ARRAY : STRING;\r\n    var posX;\r\n    var posY;\r\n    var content;\r\n    var wordSpacing = \"\";\r\n\r\n    var generatePosition = function(\r\n      parmPosX,\r\n      parmPosY,\r\n      parmTransformationMatrix\r\n    ) {\r\n      var position = \"\";\r\n      if (parmTransformationMatrix instanceof Matrix) {\r\n        // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y\r\n        // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied\r\n        // in the coordinate system established by this matrix\r\n        if (typeof options.angle === \"number\") {\r\n          parmTransformationMatrix = matrixMult(\r\n            parmTransformationMatrix,\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY)\r\n          );\r\n        } else {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        if (apiMode === ApiMode.ADVANCED) {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, -1, 0, 0),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        position = parmTransformationMatrix.join(\" \") + \" Tm\\n\";\r\n      } else {\r\n        position = hpf(parmPosX) + \" \" + hpf(parmPosY) + \" Td\\n\";\r\n      }\r\n      return position;\r\n    };\r\n\r\n    for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {\r\n      wordSpacing = \"\";\r\n\r\n      switch (variant) {\r\n        case ARRAY:\r\n          content =\r\n            (isHex ? \"<\" : \"(\") + da[lineIndex][0] + (isHex ? \">\" : \")\");\r\n          posX = parseFloat(da[lineIndex][1]);\r\n          posY = parseFloat(da[lineIndex][2]);\r\n          break;\r\n        case STRING:\r\n          content = (isHex ? \"<\" : \"(\") + da[lineIndex] + (isHex ? \">\" : \")\");\r\n          posX = getHorizontalCoordinate(x);\r\n          posY = getVerticalCoordinate(y);\r\n          break;\r\n      }\r\n\r\n      if (\r\n        typeof wordSpacingPerLine !== \"undefined\" &&\r\n        typeof wordSpacingPerLine[lineIndex] !== \"undefined\"\r\n      ) {\r\n        wordSpacing = wordSpacingPerLine[lineIndex] + \" Tw\\n\";\r\n      }\r\n\r\n      if (lineIndex === 0) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      } else if (variant === STRING) {\r\n        text.push(wordSpacing + content);\r\n      } else if (variant === ARRAY) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      }\r\n    }\r\n\r\n    text = variant === STRING ? text.join(\" Tj\\nT* \") : text.join(\" Tj\\n\");\r\n    text += \" Tj\\n\";\r\n\r\n    var result = \"BT\\n/\";\r\n    result += activeFontKey + \" \" + activeFontSize + \" Tf\\n\"; // font face, style, size\r\n    result += hpf(activeFontSize * lineHeight) + \" TL\\n\"; // line spacing\r\n    result += textColor + \"\\n\";\r\n    result += xtra;\r\n    result += text;\r\n    result += \"ET\";\r\n\r\n    out(result);\r\n    usedFonts[activeFontKey] = true;\r\n    return scope;\r\n  };\r\n\r\n  // PDF supports these path painting and clip path operators:\r\n  //\r\n  // S - stroke\r\n  // s - close/stroke\r\n  // f (F) - fill non-zero\r\n  // f* - fill evenodd\r\n  // B - fill stroke nonzero\r\n  // B* - fill stroke evenodd\r\n  // b - close fill stroke nonzero\r\n  // b* - close fill stroke evenodd\r\n  // n - nothing (consume path)\r\n  // W - clip nonzero\r\n  // W* - clip evenodd\r\n  //\r\n  // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()\r\n  // method.\r\n  /**\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @instance\r\n   * @param {string} rule Only possible value is 'evenodd'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description All .clip() after calling drawing ops with a style argument of null.\r\n   */\r\n  var clip = (API.__private__.clip = API.clip = function(rule) {\r\n    // Call .clip() after calling drawing ops with a style argument of null\r\n    // W is the PDF clipping op\r\n    if (\"evenodd\" === rule) {\r\n      out(\"W*\");\r\n    } else {\r\n      out(\"W\");\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * @name clipEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note\r\n   * that this will NOT consume the current path. In order to only use this path for clipping call\r\n   * {@link API.discardPath} afterwards.\r\n   */\r\n  API.clipEvenOdd = function() {\r\n    return clip(\"evenodd\");\r\n  };\r\n\r\n  /**\r\n   * Consumes the current path without any effect. Mainly used in combination with {@link clip} or\r\n   * {@link clipEvenOdd}. The PDF \"n\" operator.\r\n   * @name discardPath\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.discardPath = API.discardPath = function() {\r\n    out(\"n\");\r\n    return this;\r\n  };\r\n\r\n  var isValidStyle = (API.__private__.isValidStyle = function(style) {\r\n    var validStyleVariants = [\r\n      undefined,\r\n      null,\r\n      \"S\",\r\n      \"D\",\r\n      \"F\",\r\n      \"DF\",\r\n      \"FD\",\r\n      \"f\",\r\n      \"f*\",\r\n      \"B\",\r\n      \"B*\",\r\n      \"n\"\r\n    ];\r\n    var result = false;\r\n    if (validStyleVariants.indexOf(style) !== -1) {\r\n      result = true;\r\n    }\r\n    return result;\r\n  });\r\n\r\n  API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function(\r\n    operator\r\n  ) {\r\n    if (isValidStyle(operator)) {\r\n      defaultPathOperation = operator;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  var getStyle = (API.__private__.getStyle = API.getStyle = function(style) {\r\n    // see path-painting operators in PDF spec\r\n    var op = defaultPathOperation; // stroke\r\n\r\n    switch (style) {\r\n      case \"D\":\r\n      case \"S\":\r\n        op = \"S\"; // stroke\r\n        break;\r\n      case \"F\":\r\n        op = \"f\"; // fill\r\n        break;\r\n      case \"FD\":\r\n      case \"DF\":\r\n        op = \"B\";\r\n        break;\r\n      case \"f\":\r\n      case \"f*\":\r\n      case \"B\":\r\n      case \"B*\":\r\n        /*\r\n               Allow direct use of these PDF path-painting operators:\r\n               - f    fill using nonzero winding number rule\r\n               - f*    fill using even-odd rule\r\n               - B    fill then stroke with fill using non-zero winding number rule\r\n               - B*    fill then stroke with fill using even-odd rule\r\n               */\r\n        op = style;\r\n        break;\r\n    }\r\n    return op;\r\n  });\r\n\r\n  /**\r\n   * Close the current path. The PDF \"h\" operator.\r\n   * @name close\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  var close = (API.close = function() {\r\n    out(\"h\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Stroke the path. The PDF \"S\" operator.\r\n   * @name stroke\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.stroke = function() {\r\n    out(\"S\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled\r\n   * with this pattern, otherwise with the current fill color. Equivalent to the PDF \"f\" operator.\r\n   * @name fill\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fill = function(pattern) {\r\n    fillWithOptionalPattern(\"f\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the even-odd rule. The PDF f* operator.\r\n   * @see API.fill\r\n   * @name fillEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"f*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the nonzero winding number rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStroke\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStroke = function(pattern) {\r\n    fillWithOptionalPattern(\"B\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the even-odd rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStrokeEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStrokeEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"B*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  var fillWithOptionalPattern = function(style, pattern) {\r\n    if (typeof pattern === \"object\") {\r\n      fillWithPattern(pattern, style);\r\n    } else {\r\n      out(style);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    if (\r\n      style === null ||\r\n      (apiMode === ApiMode.ADVANCED && style === undefined)\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    style = getStyle(style);\r\n\r\n    // stroking / filling / both the path\r\n    out(style);\r\n  };\r\n\r\n  function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {\r\n    var clone = new TilingPattern(\r\n      boundingBox || this.boundingBox,\r\n      xStep || this.xStep,\r\n      yStep || this.yStep,\r\n      this.gState,\r\n      matrix || this.matrix\r\n    );\r\n    clone.stream = this.stream;\r\n    var key = patternKey + \"$$\" + this.cloneIndex++ + \"$$\";\r\n    addPattern(key, clone);\r\n    return clone;\r\n  }\r\n\r\n  var fillWithPattern = function(patternData, style) {\r\n    var patternId = patternMap[patternData.key];\r\n    var pattern = patterns[patternId];\r\n\r\n    if (pattern instanceof ShadingPattern) {\r\n      out(\"q\");\r\n\r\n      out(clipRuleFromStyle(style));\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n      out(patternData.matrix.toString() + \" cm\");\r\n      out(\"/\" + patternId + \" sh\");\r\n      out(\"Q\");\r\n    } else if (pattern instanceof TilingPattern) {\r\n      // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,\r\n      // so we must flip them\r\n      var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());\r\n\r\n      if (patternData.matrix) {\r\n        matrix = matrix.multiply(patternData.matrix || identityMatrix);\r\n        // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances\r\n        // for each use\r\n        patternId = cloneTilingPattern.call(\r\n          pattern,\r\n          patternData.key,\r\n          patternData.boundingBox,\r\n          patternData.xStep,\r\n          patternData.yStep,\r\n          matrix\r\n        ).id;\r\n      }\r\n\r\n      out(\"q\");\r\n      out(\"/Pattern cs\");\r\n      out(\"/\" + patternId + \" scn\");\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n\r\n      out(style);\r\n      out(\"Q\");\r\n    }\r\n  };\r\n\r\n  var clipRuleFromStyle = function(style) {\r\n    switch (style) {\r\n      case \"f\":\r\n      case \"F\":\r\n        return \"W n\";\r\n      case \"f*\":\r\n        return \"W* n\";\r\n      case \"B\":\r\n        return \"W S\";\r\n      case \"B*\":\r\n        return \"W* S\";\r\n\r\n      // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern\r\n      // and \"n\"/\"S\" as style would still fill/fill and stroke the path)\r\n      case \"S\":\r\n        return \"W S\";\r\n      case \"n\":\r\n        return \"W n\";\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Begin a new subpath by moving the current point to coordinates (x, y). The PDF \"m\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @name moveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var moveTo = (API.moveTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" m\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a straight line segment from the current point to the point (x, y). The PDF \"l\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @memberof jsPDF#\r\n   * @name lineTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var lineTo = (API.lineTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" l\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point\r\n   * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {number} x3\r\n   * @param {number} y3\r\n   * @memberof jsPDF#\r\n   * @name curveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var curveTo = (API.curveTo = function(x1, y1, x2, y2, x3, y3) {\r\n    out(\r\n      [\r\n        hpf(scale(x1)),\r\n        hpf(transformScaleY(y1)),\r\n        hpf(scale(x2)),\r\n        hpf(transformScaleY(y2)),\r\n        hpf(scale(x3)),\r\n        hpf(transformScaleY(y3)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Draw a line on the current page.\r\n   *\r\n   * @name line\r\n   * @function\r\n   * @instance\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {string} style A string specifying the painting style or null.  Valid styles include: 'S' [default] - stroke, 'F' - fill,  and 'DF' (or 'FD') -  fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.line = API.line = function(x1, y1, x2, y2, style) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.line\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || \"S\");\r\n    } else {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @typedef {Object} PatternData\r\n   * {Matrix|undefined} matrix\r\n   * {Number|undefined} xStep\r\n   * {Number|undefined} yStep\r\n   * {Array.<Number>|undefined} boundingBox\r\n   */\r\n\r\n  /**\r\n   * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.\r\n   * All data points in `lines` are relative to last line origin.\r\n   * `x`, `y` become x1,y1 for first line / curve in the set.\r\n   * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.\r\n   * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.\r\n   *\r\n   * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line\r\n   * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name lines\r\n   */\r\n  API.__private__.lines = API.lines = function(\r\n    lines,\r\n    x,\r\n    y,\r\n    scale,\r\n    style,\r\n    closed\r\n  ) {\r\n    var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(content, coordinateX, coordinateY , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (typeof lines === \"number\") {\r\n      tmp = y;\r\n      y = x;\r\n      x = lines;\r\n      lines = tmp;\r\n    }\r\n\r\n    scale = scale || [1, 1];\r\n    closed = closed || false;\r\n\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      !Array.isArray(lines) ||\r\n      !Array.isArray(scale) ||\r\n      !isValidStyle(style) ||\r\n      typeof closed !== \"boolean\"\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.lines\");\r\n    }\r\n\r\n    // starting point\r\n    moveTo(x, y);\r\n\r\n    scalex = scale[0];\r\n    scaley = scale[1];\r\n    l = lines.length;\r\n    //, x2, y2 // bezier only. In page default measurement \"units\", *after* scaling\r\n    //, x3, y3 // bezier only. In page default measurement \"units\", *after* scaling\r\n    // ending point for all, lines and bezier. . In page default measurement \"units\", *after* scaling\r\n    x4 = x; // last / ending point = starting point for first item.\r\n    y4 = y; // last / ending point = starting point for first item.\r\n\r\n    for (i = 0; i < l; i++) {\r\n      leg = lines[i];\r\n      if (leg.length === 2) {\r\n        // simple line\r\n        x4 = leg[0] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[1] * scaley + y4; // here last y4 was prior ending point\r\n        lineTo(x4, y4);\r\n      } else {\r\n        // bezier curve\r\n        x2 = leg[0] * scalex + x4; // here last x4 is prior ending point\r\n        y2 = leg[1] * scaley + y4; // here last y4 is prior ending point\r\n        x3 = leg[2] * scalex + x4; // here last x4 is prior ending point\r\n        y3 = leg[3] * scaley + y4; // here last y4 is prior ending point\r\n        x4 = leg[4] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[5] * scaley + y4; // here last y4 was prior ending point\r\n        curveTo(x2, y2, x3, y3, x4, y4);\r\n      }\r\n    }\r\n\r\n    if (closed) {\r\n      close();\r\n    }\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.\r\n   * @param {Array<Object>} lines An array of {op: operator, c: coordinates} object, where op is one of \"m\" (move to), \"l\" (line to)\r\n   * \"c\" (cubic bezier curve) and \"h\" (close (sub)path)). c is an array of coordinates. \"m\" and \"l\" expect two, \"c\"\r\n   * six and \"h\" an empty array (or undefined).\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name path\r\n   */\r\n  API.path = function(lines) {\r\n    for (var i = 0; i < lines.length; i++) {\r\n      var leg = lines[i];\r\n      var coords = leg.c;\r\n      switch (leg.op) {\r\n        case \"m\":\r\n          moveTo(coords[0], coords[1]);\r\n          break;\r\n        case \"l\":\r\n          lineTo(coords[0], coords[1]);\r\n          break;\r\n        case \"c\":\r\n          curveTo.apply(this, coords);\r\n          break;\r\n        case \"h\":\r\n          close();\r\n          break;\r\n      }\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name rect\r\n   */\r\n  API.__private__.rect = API.rect = function(x, y, w, h, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.rect\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      h = -h;\r\n    }\r\n\r\n    out(\r\n      [\r\n        hpf(scale(x)),\r\n        hpf(transformScaleY(y)),\r\n        hpf(scale(w)),\r\n        hpf(scale(h)),\r\n        \"re\"\r\n      ].join(\" \")\r\n    );\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a triangle to PDF.\r\n   *\r\n   * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name triangle\r\n   */\r\n  API.__private__.triangle = API.triangle = function(\r\n    x1,\r\n    y1,\r\n    x2,\r\n    y2,\r\n    x3,\r\n    y3,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      isNaN(x3) ||\r\n      isNaN(y3) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.triangle\");\r\n    }\r\n    this.lines(\r\n      [\r\n        [x2 - x1, y2 - y1], // vector to point 2\r\n        [x3 - x2, y3 - y2], // vector to point 3\r\n        [x1 - x3, y1 - y3] // closing vector back to point 1\r\n      ],\r\n      x1,\r\n      y1, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle with rounded corners to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name roundedRect\r\n   */\r\n  API.__private__.roundedRect = API.roundedRect = function(\r\n    x,\r\n    y,\r\n    w,\r\n    h,\r\n    rx,\r\n    ry,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(w) ||\r\n      isNaN(h) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.roundedRect\");\r\n    }\r\n    var MyArc = (4 / 3) * (Math.SQRT2 - 1);\r\n\r\n    rx = Math.min(rx, w * 0.5);\r\n    ry = Math.min(ry, h * 0.5);\r\n\r\n    this.lines(\r\n      [\r\n        [w - 2 * rx, 0],\r\n        [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry],\r\n        [0, h - 2 * ry],\r\n        [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry],\r\n        [-w + 2 * rx, 0],\r\n        [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry],\r\n        [0, -h + 2 * ry],\r\n        [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]\r\n      ],\r\n      x + rx,\r\n      y, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an ellipse to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name ellipse\r\n   */\r\n  API.__private__.ellipse = API.ellipse = function(x, y, rx, ry, style) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.ellipse\");\r\n    }\r\n    var lx = (4 / 3) * (Math.SQRT2 - 1) * rx,\r\n      ly = (4 / 3) * (Math.SQRT2 - 1) * ry;\r\n\r\n    moveTo(x + rx, y);\r\n    curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);\r\n    curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);\r\n    curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);\r\n    curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an circle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} r Radius (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name circle\r\n   */\r\n  API.__private__.circle = API.circle = function(x, y, r, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.circle\");\r\n    }\r\n    return this.ellipse(x, y, r, r, style);\r\n  };\r\n\r\n  /**\r\n   * Sets text font face, variant for upcoming text elements.\r\n   * See output of jsPDF.getFontList() for possible font names, styles.\r\n   *\r\n   * @param {string} fontName Font name or family. Example: \"times\".\r\n   * @param {string} fontStyle Font style or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFont\r\n   */\r\n  API.setFont = function(fontName, fontStyle, fontWeight) {\r\n    if (fontWeight) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    activeFontKey = getFont(fontName, fontStyle, {\r\n      disableWarning: false\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets text font face, variant for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {Object}\r\n   * @memberof jsPDF#\r\n   * @name getFont\r\n   */\r\n  var getFontEntry = (API.__private__.getFont = API.getFont = function() {\r\n    return fonts[getFont.apply(API, arguments)];\r\n  });\r\n\r\n  /**\r\n   * Returns an object - a tree of fontName to fontStyle relationships available to\r\n   * active PDF document.\r\n   *\r\n   * @public\r\n   * @function\r\n   * @instance\r\n   * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }\r\n   * @memberof jsPDF#\r\n   * @name getFontList\r\n   */\r\n  API.__private__.getFontList = API.getFontList = function() {\r\n    var list = {},\r\n      fontName,\r\n      fontStyle;\r\n\r\n    for (fontName in fontmap) {\r\n      if (fontmap.hasOwnProperty(fontName)) {\r\n        list[fontName] = [];\r\n        for (fontStyle in fontmap[fontName]) {\r\n          if (fontmap[fontName].hasOwnProperty(fontStyle)) {\r\n            list[fontName].push(fontStyle);\r\n          }\r\n        }\r\n      }\r\n    }\r\n    return list;\r\n  };\r\n\r\n  /**\r\n   * Add a custom font to the current instance.\r\n   *\r\n   * @param {string} postScriptName PDF specification full name for the font.\r\n   * @param {string} id PDF-document-instance-specific label assinged to the font.\r\n   * @param {string} fontStyle Style of the Font.\r\n   * @param {number | string} fontWeight Weight of the Font.\r\n   * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @name addFont\r\n   * @returns {string} fontId\r\n   */\r\n  API.addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    fontWeight,\r\n    encoding\r\n  ) {\r\n    var encodingOptions = [\r\n      \"StandardEncoding\",\r\n      \"MacRomanEncoding\",\r\n      \"Identity-H\",\r\n      \"WinAnsiEncoding\"\r\n    ];\r\n    if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {\r\n      //IE 11 fix\r\n      encoding = arguments[3];\r\n    } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    encoding = encoding || \"Identity-H\";\r\n    return addFont.call(this, postScriptName, fontName, fontStyle, encoding);\r\n  };\r\n\r\n  var lineWidth = options.lineWidth || 0.200025; // 2mm\r\n  /**\r\n   * Gets the line width, default: 0.200025.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineWidth\r\n   * @memberof jsPDF#\r\n   * @name getLineWidth\r\n   */\r\n  var getLineWidth = (API.__private__.getLineWidth = API.getLineWidth = function() {\r\n    return lineWidth;\r\n  });\r\n\r\n  /**\r\n   * Sets line width for upcoming lines.\r\n   *\r\n   * @param {number} width Line width (in units declared at inception of PDF document).\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineWidth\r\n   */\r\n  var setLineWidth = (API.__private__.setLineWidth = API.setLineWidth = function(\r\n    width\r\n  ) {\r\n    lineWidth = width;\r\n    out(hpf(scale(width)) + \" w\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Sets the dash pattern for upcoming lines.\r\n   *\r\n   * To reset the settings simply call the method without any parameters.\r\n   * @param {Array<number>} dashArray An array containing 0-2 numbers. The first number sets the length of the\r\n   * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered\r\n   * to be as long as the dashes. An empty array means solid, unbroken lines.\r\n   * @param {number} dashPhase The phase lines start with.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineDashPattern\r\n   */\r\n  API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function(\r\n    dashArray,\r\n    dashPhase\r\n  ) {\r\n    dashArray = dashArray || [];\r\n    dashPhase = dashPhase || 0;\r\n\r\n    if (isNaN(dashPhase) || !Array.isArray(dashArray)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setLineDash\");\r\n    }\r\n\r\n    dashArray = dashArray\r\n      .map(function(x) {\r\n        return hpf(scale(x));\r\n      })\r\n      .join(\" \");\r\n    dashPhase = hpf(scale(dashPhase));\r\n\r\n    out(\"[\" + dashArray + \"] \" + dashPhase + \" d\");\r\n    return this;\r\n  };\r\n\r\n  var lineHeightFactor;\r\n\r\n  var getLineHeight = (API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  });\r\n\r\n  API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  };\r\n\r\n  /**\r\n   * Sets the LineHeightFactor of proportion.\r\n   *\r\n   * @param {number} value LineHeightFactor value. Default: 1.15.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineHeightFactor\r\n   */\r\n  var setLineHeightFactor = (API.__private__.setLineHeightFactor = API.setLineHeightFactor = function(\r\n    value\r\n  ) {\r\n    value = value || 1.15;\r\n    if (typeof value === \"number\") {\r\n      lineHeightFactor = value;\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Gets the LineHeightFactor, default: 1.15.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineHeightFactor\r\n   * @memberof jsPDF#\r\n   * @name getLineHeightFactor\r\n   */\r\n  var getLineHeightFactor = (API.__private__.getLineHeightFactor = API.getLineHeightFactor = function() {\r\n    return lineHeightFactor;\r\n  });\r\n\r\n  setLineHeightFactor(options.lineHeight);\r\n\r\n  var getHorizontalCoordinate = (API.__private__.getHorizontalCoordinate = function(\r\n    value\r\n  ) {\r\n    return scale(value);\r\n  });\r\n\r\n  var getVerticalCoordinate = (API.__private__.getVerticalCoordinate = function(\r\n    value\r\n  ) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      return value;\r\n    } else {\r\n      var pageHeight =\r\n        pagesContext[currentPage].mediaBox.topRightY -\r\n        pagesContext[currentPage].mediaBox.bottomLeftY;\r\n      return pageHeight - scale(value);\r\n    }\r\n  });\r\n\r\n  var getHorizontalCoordinateString = (API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getHorizontalCoordinate(value));\r\n  });\r\n\r\n  var getVerticalCoordinateString = (API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getVerticalCoordinate(value));\r\n  });\r\n\r\n  var strokeColor = options.strokeColor || \"0 G\";\r\n\r\n  /**\r\n   *  Gets the stroke color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getDrawColor\r\n   */\r\n  API.__private__.getStrokeColor = API.getDrawColor = function() {\r\n    return decodeColorString(strokeColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the stroke color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDrawColor\r\n   */\r\n  API.__private__.setStrokeColor = API.setDrawColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"draw\",\r\n      precision: 2\r\n    };\r\n\r\n    strokeColor = encodeColorString(options);\r\n    out(strokeColor);\r\n    return this;\r\n  };\r\n\r\n  var fillColor = options.fillColor || \"0 g\";\r\n\r\n  /**\r\n   * Gets the fill color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getFillColor\r\n   */\r\n  API.__private__.getFillColor = API.getFillColor = function() {\r\n    return decodeColorString(fillColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the fill color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFillColor\r\n   */\r\n  API.__private__.setFillColor = API.setFillColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"fill\",\r\n      precision: 2\r\n    };\r\n\r\n    fillColor = encodeColorString(options);\r\n    out(fillColor);\r\n    return this;\r\n  };\r\n\r\n  var textColor = options.textColor || \"0 g\";\r\n  /**\r\n   * Gets the text color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getTextColor\r\n   */\r\n  var getTextColor = (API.__private__.getTextColor = API.getTextColor = function() {\r\n    return decodeColorString(textColor);\r\n  });\r\n  /**\r\n   * Sets the text color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setTextColor\r\n   */\r\n  API.__private__.setTextColor = API.setTextColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"text\",\r\n      precision: 3\r\n    };\r\n    textColor = encodeColorString(options);\r\n\r\n    return this;\r\n  };\r\n\r\n  var activeCharSpace = options.charSpace;\r\n\r\n  /**\r\n   * Get global value of CharSpace.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} charSpace\r\n   * @memberof jsPDF#\r\n   * @name getCharSpace\r\n   */\r\n  var getCharSpace = (API.__private__.getCharSpace = API.getCharSpace = function() {\r\n    return parseFloat(activeCharSpace || 0);\r\n  });\r\n\r\n  /**\r\n   * Set global value of CharSpace.\r\n   *\r\n   * @param {number} charSpace\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setCharSpace\r\n   */\r\n  API.__private__.setCharSpace = API.setCharSpace = function(charSpace) {\r\n    if (isNaN(charSpace)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCharSpace\");\r\n    }\r\n    activeCharSpace = charSpace;\r\n    return this;\r\n  };\r\n\r\n  var lineCapID = 0;\r\n  /**\r\n   * Is an Object providing a mapping from human-readable to\r\n   * integer flag values designating the varieties of line cap\r\n   * and join styles.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name CapJoinStyles\r\n   */\r\n  API.CapJoinStyles = {\r\n    0: 0,\r\n    butt: 0,\r\n    but: 0,\r\n    miter: 0,\r\n    1: 1,\r\n    round: 1,\r\n    rounded: 1,\r\n    circle: 1,\r\n    2: 2,\r\n    projecting: 2,\r\n    project: 2,\r\n    square: 2,\r\n    bevel: 2\r\n  };\r\n\r\n  /**\r\n   * Sets the line cap styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line cap.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineCap\r\n   */\r\n  API.__private__.setLineCap = API.setLineCap = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line cap style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineCapID = id;\r\n    out(id + \" J\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var lineJoinID = 0;\r\n  /**\r\n   * Sets the line join styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line join.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineJoin\r\n   */\r\n  API.__private__.setLineJoin = API.setLineJoin = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line join style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineJoinID = id;\r\n    out(id + \" j\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var miterLimit;\r\n  /**\r\n   * Sets the miterLimit property, which effects the maximum miter length.\r\n   *\r\n   * @param {number} length The length of the miter\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineMiterLimit\r\n   */\r\n  API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function(\r\n    length\r\n  ) {\r\n    length = length || 0;\r\n    if (isNaN(length)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setLineMiterLimit\");\r\n    }\r\n    out(hpf(scale(length)) + \" M\");\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * An object representing a pdf graphics state.\r\n   * @class GState\r\n   */\r\n\r\n  /**\r\n   *\r\n   * @param parameters A parameter object that contains all properties this graphics state wants to set.\r\n   * Supported are: opacity, stroke-opacity\r\n   * @constructor\r\n   */\r\n  API.GState = GState;\r\n\r\n  /**\r\n   * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.\r\n   * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState\r\n   * it will be added before use.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setGState\r\n   */\r\n  API.setGState = function(gState) {\r\n    if (typeof gState === \"string\") {\r\n      gState = gStates[gStatesMap[gState]];\r\n    } else {\r\n      gState = addGState(null, gState);\r\n    }\r\n\r\n    if (!gState.equals(activeGState)) {\r\n      out(\"/\" + gState.id + \" gs\");\r\n      activeGState = gState;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Adds a new Graphics State. Duplicates are automatically eliminated.\r\n   * @param {String} key Might also be null, if no later reference to this gState is needed\r\n   * @param {Object} gState The gState object\r\n   */\r\n  var addGState = function(key, gState) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (key && gStatesMap[key]) return;\r\n    var duplicate = false;\r\n    for (var s in gStates) {\r\n      if (gStates.hasOwnProperty(s)) {\r\n        if (gStates[s].equals(gState)) {\r\n          duplicate = true;\r\n          break;\r\n        }\r\n      }\r\n    }\r\n\r\n    if (duplicate) {\r\n      gState = gStates[s];\r\n    } else {\r\n      var gStateKey = \"GS\" + (Object.keys(gStates).length + 1).toString(10);\r\n      gStates[gStateKey] = gState;\r\n      gState.id = gStateKey;\r\n    }\r\n\r\n    // several user keys may point to the same GState object\r\n    key && (gStatesMap[key] = gState.id);\r\n\r\n    events.publish(\"addGState\", gState);\r\n\r\n    return gState;\r\n  };\r\n\r\n  /**\r\n   * Adds a new {@link GState} for later use. See {@link setGState}.\r\n   * @param {String} key\r\n   * @param {GState} gState\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addGState\r\n   */\r\n  API.addGState = function(key, gState) {\r\n    addGState(key, gState);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Saves the current graphics state (\"pushes it on the stack\"). It can be restored by {@link restoreGraphicsState}\r\n   * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,\r\n   * fill and stroke colors etc.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name saveGraphicsState\r\n   */\r\n  API.saveGraphicsState = function() {\r\n    out(\"q\");\r\n    // as we cannot set font key and size independently we must keep track of both\r\n    fontStateStack.push({\r\n      key: activeFontKey,\r\n      size: activeFontSize,\r\n      color: textColor\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Restores a previously saved graphics state saved by {@link saveGraphicsState} (\"pops the stack\").\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name restoreGraphicsState\r\n   */\r\n  API.restoreGraphicsState = function() {\r\n    out(\"Q\");\r\n\r\n    // restore previous font state\r\n    var fontState = fontStateStack.pop();\r\n    activeFontKey = fontState.key;\r\n    activeFontSize = fontState.size;\r\n    textColor = fontState.color;\r\n\r\n    activeGState = null;\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Appends this matrix to the left of all previously applied matrices.\r\n   *\r\n   * @param {Matrix} matrix\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setCurrentTransformationMatrix\r\n   */\r\n  API.setCurrentTransformationMatrix = function(matrix) {\r\n    out(matrix.toString() + \" cm\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Inserts a debug comment into the generated pdf.\r\n   * @function\r\n   * @instance\r\n   * @param {String} text\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name comment\r\n   */\r\n  API.comment = function(text) {\r\n    out(\"#\" + text);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Point\r\n   */\r\n  var Point = function(x, y) {\r\n    var _x = x || 0;\r\n    Object.defineProperty(this, \"x\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _x;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _x = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _y = y || 0;\r\n    Object.defineProperty(this, \"y\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _y;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _y = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _type = \"pt\";\r\n    Object.defineProperty(this, \"type\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _type;\r\n      },\r\n      set: function(value) {\r\n        _type = value.toString();\r\n      }\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Rectangle\r\n   */\r\n  var Rectangle = function(x, y, w, h) {\r\n    Point.call(this, x, y);\r\n    this.type = \"rect\";\r\n\r\n    var _w = w || 0;\r\n    Object.defineProperty(this, \"w\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _w;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _w = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _h = h || 0;\r\n    Object.defineProperty(this, \"h\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _h;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _h = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * FormObject/RenderTarget\r\n   */\r\n\r\n  var RenderTarget = function() {\r\n    this.page = page;\r\n    this.currentPage = currentPage;\r\n    this.pages = pages.slice(0);\r\n    this.pagesContext = pagesContext.slice(0);\r\n    this.x = pageX;\r\n    this.y = pageY;\r\n    this.matrix = pageMatrix;\r\n    this.width = getPageWidth(currentPage);\r\n    this.height = getPageHeight(currentPage);\r\n    this.outputDestination = outputDestination;\r\n\r\n    this.id = \"\"; // set by endFormObject()\r\n    this.objectNumber = -1; // will be set by putXObject()\r\n  };\r\n\r\n  RenderTarget.prototype.restore = function() {\r\n    page = this.page;\r\n    currentPage = this.currentPage;\r\n    pagesContext = this.pagesContext;\r\n    pages = this.pages;\r\n    pageX = this.x;\r\n    pageY = this.y;\r\n    pageMatrix = this.matrix;\r\n    setPageWidth(currentPage, this.width);\r\n    setPageHeight(currentPage, this.height);\r\n    outputDestination = this.outputDestination;\r\n  };\r\n\r\n  var beginNewRenderTarget = function(x, y, width, height, matrix) {\r\n    // save current state\r\n    renderTargetStack.push(new RenderTarget());\r\n\r\n    // clear pages\r\n    page = currentPage = 0;\r\n    pages = [];\r\n    pageX = x;\r\n    pageY = y;\r\n\r\n    pageMatrix = matrix;\r\n\r\n    beginPage([width, height]);\r\n  };\r\n\r\n  var endFormObject = function(key) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (renderTargetMap[key]) {\r\n      renderTargetStack.pop().restore();\r\n      return;\r\n    }\r\n\r\n    // save the created xObject\r\n    var newXObject = new RenderTarget();\r\n\r\n    var xObjectId = \"Xo\" + (Object.keys(renderTargets).length + 1).toString(10);\r\n    newXObject.id = xObjectId;\r\n\r\n    renderTargetMap[key] = xObjectId;\r\n    renderTargets[xObjectId] = newXObject;\r\n\r\n    events.publish(\"addFormObject\", newXObject);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  /**\r\n   * Starts a new pdf form object, which means that all consequent draw calls target a new independent object\r\n   * until {@link endFormObject} is called. The created object can be referenced and drawn later using\r\n   * {@link doFormObject}. Nested form objects are possible.\r\n   * x, y, width, height set the bounding box that is used to clip the content.\r\n   *\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @param {number} width\r\n   * @param {number} height\r\n   * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to\r\n   * the parent's.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name beginFormObject\r\n   */\r\n  API.beginFormObject = function(x, y, width, height, matrix) {\r\n    // The user can set the output target to a new form object. Nested form objects are possible.\r\n    // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as\r\n    // the PDF-Spec states:\r\n    // \"In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which\r\n    // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,\r\n    // form XObjects may be independent of the content streams in which they appear, and this is strongly\r\n    // recommended although not required\"\r\n    beginNewRenderTarget(x, y, width, height, matrix);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Completes and saves the form object.\r\n   * @param {String} key The key by which this form object can be referenced.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name endFormObject\r\n   */\r\n  API.endFormObject = function(key) {\r\n    endFormObject(key);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Draws the specified form object by referencing to the respective pdf XObject created with\r\n   * {@link API.beginFormObject} and {@link endFormObject}.\r\n   * The location is determined by matrix.\r\n   *\r\n   * @param {String} key The key to the form object.\r\n   * @param {Matrix} matrix The matrix applied before drawing the form object.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name doFormObject\r\n   */\r\n  API.doFormObject = function(key, matrix) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    out(\"q\");\r\n    out(matrix.toString() + \" cm\");\r\n    out(\"/\" + xObject.id + \" Do\");\r\n    out(\"Q\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Returns the form object specified by key.\r\n   * @param key {String}\r\n   * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name getFormObject\r\n   */\r\n  API.getFormObject = function(key) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    return {\r\n      x: xObject.x,\r\n      y: xObject.y,\r\n      width: xObject.width,\r\n      height: xObject.height,\r\n      matrix: xObject.matrix\r\n    };\r\n  };\r\n\r\n  /**\r\n   * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').\r\n   * Uses FileSaver.js-method saveAs.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name save\r\n   * @function\r\n   * @instance\r\n   * @param  {string} filename The filename including extension.\r\n   * @param  {Object} options An Object with additional options, possible options: 'returnPromise'.\r\n   * @returns {jsPDF|Promise} jsPDF-instance     */\r\n  API.save = function(filename, options) {\r\n    filename = filename || \"generated.pdf\";\r\n\r\n    options = options || {};\r\n    options.returnPromise = options.returnPromise || false;\r\n\r\n    if (options.returnPromise === false) {\r\n      saveAs(getBlob(buildDocument()), filename);\r\n      if (typeof saveAs.unload === \"function\") {\r\n        if (globalObject.setTimeout) {\r\n          setTimeout(saveAs.unload, 911);\r\n        }\r\n      }\r\n      return this;\r\n    } else {\r\n      return new Promise(function(resolve, reject) {\r\n        try {\r\n          var result = saveAs(getBlob(buildDocument()), filename);\r\n          if (typeof saveAs.unload === \"function\") {\r\n            if (globalObject.setTimeout) {\r\n              setTimeout(saveAs.unload, 911);\r\n            }\r\n          }\r\n          resolve(result);\r\n        } catch (e) {\r\n          reject(e.message);\r\n        }\r\n      });\r\n    }\r\n\r\n  };\r\n\r\n  // applying plugins (more methods) ON TOP of built-in API.\r\n  // this is intentional as we allow plugins to override\r\n  // built-ins\r\n  for (var plugin in jsPDF.API) {\r\n    if (jsPDF.API.hasOwnProperty(plugin)) {\r\n      if (plugin === \"events\" && jsPDF.API.events.length) {\r\n        (function(events, newEvents) {\r\n          // jsPDF.API.events is a JS Array of Arrays\r\n          // where each Array is a pair of event name, handler\r\n          // Events were added by plugins to the jsPDF instantiator.\r\n          // These are always added to the new instance and some ran\r\n          // during instantiation.\r\n          var eventname, handler_and_args, i;\r\n\r\n          for (i = newEvents.length - 1; i !== -1; i--) {\r\n            // subscribe takes 3 args: 'topic', function, runonce_flag\r\n            // if undefined, runonce is false.\r\n            // users can attach callback directly,\r\n            // or they can attach an array with [callback, runonce_flag]\r\n            // that's what the \"apply\" magic is for below.\r\n            eventname = newEvents[i][0];\r\n            handler_and_args = newEvents[i][1];\r\n            events.subscribe.apply(\r\n              events,\r\n              [eventname].concat(\r\n                typeof handler_and_args === \"function\"\r\n                  ? [handler_and_args]\r\n                  : handler_and_args\r\n              )\r\n            );\r\n          }\r\n        })(events, jsPDF.API.events);\r\n      } else {\r\n        API[plugin] = jsPDF.API[plugin];\r\n      }\r\n    }\r\n  }\r\n\r\n  var getPageWidth = (API.getPageWidth = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightX -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftX) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageWidth = (API.setPageWidth = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightX =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;\r\n  });\r\n\r\n  var getPageHeight = (API.getPageHeight = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightY -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftY) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageHeight = (API.setPageHeight = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightY =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;\r\n  });\r\n\r\n  /**\r\n   * Object exposing internal API to plugins\r\n   * @public\r\n   * @ignore\r\n   */\r\n  API.internal = {\r\n    pdfEscape: pdfEscape,\r\n    getStyle: getStyle,\r\n    getFont: getFontEntry,\r\n    getFontSize: getFontSize,\r\n    getCharSpace: getCharSpace,\r\n    getTextColor: getTextColor,\r\n    getLineHeight: getLineHeight,\r\n    getLineHeightFactor: getLineHeightFactor,\r\n    getLineWidth: getLineWidth,\r\n    write: write,\r\n    getHorizontalCoordinate: getHorizontalCoordinate,\r\n    getVerticalCoordinate: getVerticalCoordinate,\r\n    getCoordinateString: getHorizontalCoordinateString,\r\n    getVerticalCoordinateString: getVerticalCoordinateString,\r\n    collections: {},\r\n    newObject: newObject,\r\n    newAdditionalObject: newAdditionalObject,\r\n    newObjectDeferred: newObjectDeferred,\r\n    newObjectDeferredBegin: newObjectDeferredBegin,\r\n    getFilters: getFilters,\r\n    putStream: putStream,\r\n    events: events,\r\n    scaleFactor: scaleFactor,\r\n    pageSize: {\r\n      getWidth: function() {\r\n        return getPageWidth(currentPage);\r\n      },\r\n      setWidth: function(value) {\r\n        setPageWidth(currentPage, value);\r\n      },\r\n      getHeight: function() {\r\n        return getPageHeight(currentPage);\r\n      },\r\n      setHeight: function(value) {\r\n        setPageHeight(currentPage, value);\r\n      }\r\n    },\r\n    encryptionOptions: encryptionOptions,\r\n    encryption: encryption,\r\n    getEncryptor: getEncryptor,\r\n    output: output,\r\n    getNumberOfPages: getNumberOfPages,\r\n    pages: pages,\r\n    out: out,\r\n    f2: f2,\r\n    f3: f3,\r\n    getPageInfo: getPageInfo,\r\n    getPageInfoByObjId: getPageInfoByObjId,\r\n    getCurrentPageInfo: getCurrentPageInfo,\r\n    getPDFVersion: getPdfVersion,\r\n    Point: Point,\r\n    Rectangle: Rectangle,\r\n    Matrix: Matrix,\r\n    hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.\r\n  };\r\n\r\n  Object.defineProperty(API.internal.pageSize, \"width\", {\r\n    get: function() {\r\n      return getPageWidth(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageWidth(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n  Object.defineProperty(API.internal.pageSize, \"height\", {\r\n    get: function() {\r\n      return getPageHeight(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageHeight(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n\r\n  //////////////////////////////////////////////////////\r\n  // continuing initialization of jsPDF Document object\r\n  //////////////////////////////////////////////////////\r\n  // Add the first page automatically\r\n  addFonts.call(API, standardFonts);\r\n  activeFontKey = \"F1\";\r\n  _addPage(format, orientation);\r\n\r\n  events.publish(\"initialized\");\r\n  return API;\r\n}\r\n\r\n/**\r\n * jsPDF.API is a STATIC property of jsPDF class.\r\n * jsPDF.API is an object you can add methods and properties to.\r\n * The methods / properties you add will show up in new jsPDF objects.\r\n *\r\n * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,\r\n * callbacks to this object. These will be reassigned to all new instances of jsPDF.\r\n *\r\n * @static\r\n * @public\r\n * @memberof jsPDF#\r\n * @name API\r\n *\r\n * @example\r\n * jsPDF.API.mymethod = function(){\r\n *   // 'this' will be ref to internal API object. see jsPDF source\r\n *   // , so you can refer to built-in methods like so:\r\n *   //     this.line(....)\r\n *   //     this.text(....)\r\n * }\r\n * var pdfdoc = new jsPDF()\r\n * pdfdoc.mymethod() // <- !!!!!!\r\n */\r\njsPDF.API = {\r\n  events: []\r\n};\r\n/**\r\n * The version of jsPDF.\r\n * @name version\r\n * @type {string}\r\n * @memberof jsPDF#\r\n */\r\njsPDF.version = \"0.0.0\";\r\n\r\nexport { jsPDF, ShadingPattern, TilingPattern, GState };\r\nexport default jsPDF;\r\n","/* global jsPDF */\n/**\n * @license\n * Copyright (c) 2016 Alexander Weidt,\n * https://github.com/BiggA94\n *\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF AcroForm Plugin\n * @module AcroForm\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\nvar jsPDFAPI = jsPDF.API;\nvar scaleFactor = 1;\n\nvar pdfEscape = function(value) {\n  return value\n    .replace(/\\\\/g, \"\\\\\\\\\")\n    .replace(/\\(/g, \"\\\\(\")\n    .replace(/\\)/g, \"\\\\)\");\n};\nvar pdfUnescape = function(value) {\n  return value\n    .replace(/\\\\\\\\/g, \"\\\\\")\n    .replace(/\\\\\\(/g, \"(\")\n    .replace(/\\\\\\)/g, \")\");\n};\n\nvar f2 = function(number) {\n  return number.toFixed(2); // Ie, %.2f\n};\n\nvar f5 = function(number) {\n  return number.toFixed(5); // Ie, %.2f\n};\n\njsPDFAPI.__acroform__ = {};\nvar inherit = function(child, parent) {\n  child.prototype = Object.create(parent.prototype);\n  child.prototype.constructor = child;\n};\n\nvar scale = function(x) {\n  return x * scaleFactor;\n};\n\nvar createFormXObject = function(formObject) {\n  var xobj = new AcroFormXObject();\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];\n  return xobj;\n};\n\n/**\n * Bit-Operations\n */\nvar setBit = (jsPDFAPI.__acroform__.setBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number |= bitMask;\n\n  return number;\n});\n\nvar clearBit = (jsPDFAPI.__acroform__.clearBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number &= ~bitMask;\n\n  return number;\n});\n\nvar getBit = (jsPDFAPI.__acroform__.getBit = function(number, bitPosition) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBit\"\n    );\n  }\n  return (number & (1 << bitPosition)) === 0 ? 0 : 1;\n});\n\n/*\n * Ff starts counting the bit position at 1 and not like javascript at 0\n */\nvar getBitForPdf = (jsPDFAPI.__acroform__.getBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf\"\n    );\n  }\n  return getBit(number, bitPosition - 1);\n});\n\nvar setBitForPdf = (jsPDFAPI.__acroform__.setBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf\"\n    );\n  }\n  return setBit(number, bitPosition - 1);\n});\n\nvar clearBitForPdf = (jsPDFAPI.__acroform__.clearBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf\"\n    );\n  }\n  return clearBit(number, bitPosition - 1);\n});\n\nvar calculateCoordinates = (jsPDFAPI.__acroform__.calculateCoordinates = function(\n  args,\n  scope\n) {\n  var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;\n  var getVerticalCoordinate = scope.internal.getVerticalCoordinate;\n  var x = args[0];\n  var y = args[1];\n  var w = args[2];\n  var h = args[3];\n\n  var coordinates = {};\n\n  coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;\n  coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;\n  coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;\n  coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;\n\n  return [\n    Number(f2(coordinates.lowerLeft_X)),\n    Number(f2(coordinates.lowerLeft_Y)),\n    Number(f2(coordinates.upperRight_X)),\n    Number(f2(coordinates.upperRight_Y))\n  ];\n});\n\nvar calculateAppearanceStream = function(formObject) {\n  if (formObject.appearanceStreamContent) {\n    return formObject.appearanceStreamContent;\n  }\n\n  if (!formObject.V && !formObject.DV) {\n    return;\n  }\n\n  // else calculate it\n\n  var stream = [];\n  var text = formObject._V || formObject.DV;\n  var calcRes = calculateX(formObject, text);\n  var fontKey = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  ).id;\n\n  //PDF 32000-1:2008, page 444\n  stream.push(\"/Tx BMC\");\n  stream.push(\"q\");\n  stream.push(\"BT\"); // Begin Text\n  stream.push(formObject.scope.__private__.encodeColorString(formObject.color));\n  stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf\");\n  stream.push(\"1 0 0 1 0 0 Tm\"); // Transformation Matrix\n  stream.push(calcRes.text);\n  stream.push(\"ET\"); // End Text\n  stream.push(\"Q\");\n  stream.push(\"EMC\");\n\n  var appearanceStreamContent = createFormXObject(formObject);\n  appearanceStreamContent.scope = formObject.scope;\n  appearanceStreamContent.stream = stream.join(\"\\n\");\n  return appearanceStreamContent;\n};\n\nvar calculateX = function(formObject, text) {\n  var maxFontSize =\n    formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;\n  var returnValue = {\n    text: \"\",\n    fontSize: \"\"\n  };\n  // Remove Brackets\n  text = text.substr(0, 1) == \"(\" ? text.substr(1) : text;\n  text =\n    text.substr(text.length - 1) == \")\"\n      ? text.substr(0, text.length - 1)\n      : text;\n  // split into array of words\n  var textSplit = text.split(\" \");\n  if (formObject.multiline) {\n    textSplit = textSplit.map(word => word.split(\"\\n\"));\n  } else {\n    textSplit = textSplit.map(word => [word]);\n  }\n\n  var fontSize = maxFontSize; // The Starting fontSize (The Maximum)\n  var lineSpacing = 2;\n  var borderPadding = 2;\n\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  height = height < 0 ? -height : height;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  width = width < 0 ? -width : width;\n\n  var isSmallerThanWidth = function(i, lastLine, fontSize) {\n    if (i + 1 < textSplit.length) {\n      var tmp = lastLine + \" \" + textSplit[i + 1][0];\n      var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;\n      var FieldWidth = width - 2 * borderPadding;\n      return TextWidth <= FieldWidth;\n    } else {\n      return false;\n    }\n  };\n\n  fontSize++;\n  FontSize: while (fontSize > 0) {\n    text = \"\";\n    fontSize--;\n    var textHeight = calculateFontSpace(\"3\", formObject, fontSize).height;\n    var startY = formObject.multiline\n      ? height - fontSize\n      : (height - textHeight) / 2;\n    startY += lineSpacing;\n    var startX;\n\n    var lastY = startY;\n    var firstWordInLine = 0,\n      lastWordInLine = 0;\n    var lastLength;\n    var currWord = 0;\n\n    if (fontSize <= 0) {\n      // In case, the Text doesn't fit at all\n      fontSize = 12;\n      text = \"(...) Tj\\n\";\n      text +=\n        \"% Width of Text: \" +\n        calculateFontSpace(text, formObject, fontSize).width +\n        \", FieldWidth:\" +\n        width +\n        \"\\n\";\n      break;\n    }\n\n    var lastLine = \"\";\n    var lineCount = 0;\n    Line: for (var i = 0; i < textSplit.length; i++) {\n      if (textSplit.hasOwnProperty(i)) {\n        let isWithNewLine = false;\n        if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {\n          if (\n            (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n            height\n          ) {\n            continue FontSize;\n          }\n\n          lastLine += textSplit[i][currWord];\n          isWithNewLine = true;\n          lastWordInLine = i;\n          i--;\n        } else {\n          lastLine += textSplit[i][currWord] + \" \";\n          lastLine =\n            lastLine.substr(lastLine.length - 1) == \" \"\n              ? lastLine.substr(0, lastLine.length - 1)\n              : lastLine;\n          var key = parseInt(i);\n          var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);\n          var isLastWord = i >= textSplit.length - 1;\n\n          if (nextLineIsSmaller && !isLastWord) {\n            lastLine += \" \";\n            currWord = 0;\n            continue; // Line\n          } else if (!nextLineIsSmaller && !isLastWord) {\n            if (!formObject.multiline) {\n              continue FontSize;\n            } else {\n              if (\n                (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n              ) {\n                // If the Text is higher than the\n                // FieldObject\n                continue FontSize;\n              }\n              lastWordInLine = key;\n              // go on\n            }\n          } else if (isLastWord) {\n            lastWordInLine = key;\n          } else {\n            if (\n              formObject.multiline &&\n              (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n            ) {\n              // If the Text is higher than the FieldObject\n              continue FontSize;\n            }\n          }\n        }\n        // Remove last blank\n\n        var line = \"\";\n\n        for (var x = firstWordInLine; x <= lastWordInLine; x++) {\n          var currLine = textSplit[x];\n          if (formObject.multiline) {\n            if (x === lastWordInLine) {\n              line += currLine[currWord] + \" \";\n              currWord = (currWord + 1) % currLine.length;\n              continue;\n            }\n            if (x === firstWordInLine) {\n              line += currLine[currLine.length - 1] + \" \";\n              continue;\n            }\n          }\n          line += currLine[0] + \" \";\n        }\n\n        // Remove last blank\n        line =\n          line.substr(line.length - 1) == \" \"\n            ? line.substr(0, line.length - 1)\n            : line;\n        // lastLength -= blankSpace.width;\n        lastLength = calculateFontSpace(line, formObject, fontSize).width;\n\n        // Calculate startX\n        switch (formObject.textAlign) {\n          case \"right\":\n            startX = width - lastLength - borderPadding;\n            break;\n          case \"center\":\n            startX = (width - lastLength) / 2;\n            break;\n          case \"left\":\n          default:\n            startX = borderPadding;\n            break;\n        }\n        text += f2(startX) + \" \" + f2(lastY) + \" Td\\n\";\n        text += \"(\" + pdfEscape(line) + \") Tj\\n\";\n        // reset X in PDF\n        text += -f2(startX) + \" 0 Td\\n\";\n\n        // After a Line, adjust y position\n        lastY = -(fontSize + lineSpacing);\n\n        // Reset for next iteration step\n        lastLength = 0;\n        firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;\n        lineCount++;\n\n        lastLine = \"\";\n        continue Line;\n      }\n    }\n    break;\n  }\n\n  returnValue.text = text;\n  returnValue.fontSize = fontSize;\n\n  return returnValue;\n};\n\n/**\n * Small workaround for calculating the TextMetric approximately.\n *\n * @param text\n * @param fontsize\n * @returns {TextMetrics} (Has Height and Width)\n */\nvar calculateFontSpace = function(text, formObject, fontSize) {\n  var font = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  );\n  var width =\n    formObject.scope.getStringUnitWidth(text, {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) * parseFloat(fontSize);\n  var height =\n    formObject.scope.getStringUnitWidth(\"3\", {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) *\n    parseFloat(fontSize) *\n    1.5;\n  return { height: height, width: width };\n};\n\nvar acroformPluginTemplate = {\n  fields: [],\n  xForms: [],\n  /**\n   * acroFormDictionaryRoot contains information about the AcroForm\n   * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has\n   * 1: The Object ID of the Root\n   */\n  acroFormDictionaryRoot: null,\n  /**\n   * After the PDF gets evaluated, the reference to the root has to be\n   * reset, this indicates, whether the root has already been printed\n   * out\n   */\n  printedOut: false,\n  internal: null,\n  isInitialized: false\n};\n\nvar annotReferenceCallback = function(scope) {\n  //set objId to undefined and force it to get a new objId on buildDocument\n  scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;\n  var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n  for (var i in fields) {\n    if (fields.hasOwnProperty(i)) {\n      var formObject = fields[i];\n      //set objId to undefined and force it to get a new objId on buildDocument\n      formObject.objId = undefined;\n      // add Annot Reference!\n      if (formObject.hasAnnotation) {\n        // If theres an Annotation Widget in the Form Object, put the\n        // Reference in the /Annot array\n        createAnnotationReference(formObject, scope);\n      }\n    }\n  }\n};\n\nvar putForm = function(formObject) {\n  if (formObject.scope.internal.acroformPlugin.printedOut) {\n    formObject.scope.internal.acroformPlugin.printedOut = false;\n    formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;\n  }\n  formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(\n    formObject\n  );\n};\n/**\n * Create the Reference to the widgetAnnotation, so that it gets referenced\n * in the Annot[] int the+ (Requires the Annotation Plugin)\n */\nvar createAnnotationReference = function(object, scope) {\n  var options = {\n    type: \"reference\",\n    object: object\n  };\n  var findEntry = function(entry) {\n    return entry.type === options.type && entry.object === options.object;\n  };\n  if (\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.find(findEntry) === undefined\n  ) {\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.push(options);\n  }\n};\n\n// Callbacks\n\nvar putCatalogCallback = function(scope) {\n  // Put reference to AcroForm to DocumentCatalog\n  if (\n    typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== \"undefined\"\n  ) {\n    // for safety, shouldn't normally be the case\n    scope.internal.write(\n      \"/AcroForm \" +\n        scope.internal.acroformPlugin.acroFormDictionaryRoot.objId +\n        \" \" +\n        0 +\n        \" R\"\n    );\n  } else {\n    throw new Error(\"putCatalogCallback: Root missing.\");\n  }\n};\n\n/**\n * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm\n * Dictionary\n */\nvar AcroFormDictionaryCallback = function(scope) {\n  // Remove event\n  scope.internal.events.unsubscribe(\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID\n  );\n  delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;\n  scope.internal.acroformPlugin.printedOut = true;\n};\n\n/**\n * Creates the single Fields and writes them into the Document\n *\n * If fieldArray is set, use the fields that are inside it instead of the\n * fields from the AcroRoot (for the FormXObjects...)\n */\nvar createFieldCallback = function(fieldArray, scope) {\n  var standardFields = !fieldArray;\n\n  if (!fieldArray) {\n    // in case there is no fieldArray specified, we want to print out\n    // the Fields of the AcroForm\n    // Print out Root\n    scope.internal.newObjectDeferredBegin(\n      scope.internal.acroformPlugin.acroFormDictionaryRoot.objId,\n      true\n    );\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();\n  }\n\n  fieldArray =\n    fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;\n\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var fieldObject = fieldArray[i];\n      var keyValueList = [];\n      var oldRect = fieldObject.Rect;\n\n      if (fieldObject.Rect) {\n        fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);\n      }\n\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(\n        fieldObject\n      );\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.getKeyValueListForStream === \"function\"\n      ) {\n        keyValueList = fieldObject.getKeyValueListForStream();\n      }\n\n      fieldObject.Rect = oldRect;\n\n      if (\n        fieldObject.hasAppearanceStream &&\n        !fieldObject.appearanceStreamContent\n      ) {\n        // Calculate Appearance\n        var appearance = calculateAppearanceStream(fieldObject);\n        keyValueList.push({ key: \"AP\", value: \"<</N \" + appearance + \">>\" });\n\n        scope.internal.acroformPlugin.xForms.push(appearance);\n      }\n\n      // Assume AppearanceStreamContent is a Array with N,R,D (at least\n      // one of them!)\n      if (fieldObject.appearanceStreamContent) {\n        var appearanceStreamString = \"\";\n        // Iterate over N,R and D\n        for (var k in fieldObject.appearanceStreamContent) {\n          if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {\n            var value = fieldObject.appearanceStreamContent[k];\n            appearanceStreamString += \"/\" + k + \" \";\n            appearanceStreamString += \"<<\";\n            if (Object.keys(value).length >= 1 || Array.isArray(value)) {\n              // appearanceStream is an Array or Object!\n              for (var i in value) {\n                if (value.hasOwnProperty(i)) {\n                  var obj = value[i];\n                  if (typeof obj === \"function\") {\n                    // if Function is referenced, call it in order\n                    // to get the FormXObject\n                    obj = obj.call(scope, fieldObject);\n                  }\n                  appearanceStreamString += \"/\" + i + \" \" + obj + \" \";\n\n                  // In case the XForm is already used, e.g. OffState\n                  // of CheckBoxes, don't add it\n                  if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                    scope.internal.acroformPlugin.xForms.push(obj);\n                }\n              }\n            } else {\n              obj = value;\n              if (typeof obj === \"function\") {\n                // if Function is referenced, call it in order to\n                // get the FormXObject\n                obj = obj.call(scope, fieldObject);\n              }\n              appearanceStreamString += \"/\" + i + \" \" + obj;\n              if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                scope.internal.acroformPlugin.xForms.push(obj);\n            }\n            appearanceStreamString += \">>\";\n          }\n        }\n\n        // appearance stream is a normal Object..\n        keyValueList.push({\n          key: \"AP\",\n          value: \"<<\\n\" + appearanceStreamString + \">>\"\n        });\n      }\n\n      scope.internal.putStream({\n        additionalKeyValues: keyValueList,\n        objectId: fieldObject.objId\n      });\n\n      scope.internal.out(\"endobj\");\n    }\n  }\n  if (standardFields) {\n    createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);\n  }\n};\n\nvar createXFormObjectCallback = function(fieldArray, scope) {\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var key = i;\n      var fieldObject = fieldArray[i];\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.putStream === \"function\"\n      ) {\n        fieldObject.putStream();\n      }\n      delete fieldArray[key];\n    }\n  }\n};\n\nvar initializeAcroForm = function(scope, formObject) {\n  formObject.scope = scope;\n  if (\n    scope.internal !== undefined &&\n    (scope.internal.acroformPlugin === undefined ||\n      scope.internal.acroformPlugin.isInitialized === false)\n  ) {\n    AcroFormField.FieldNum = 0;\n    scope.internal.acroformPlugin = JSON.parse(\n      JSON.stringify(acroformPluginTemplate)\n    );\n    if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {\n      throw new Error(\"Exception while creating AcroformDictionary\");\n    }\n    scaleFactor = scope.internal.scaleFactor;\n    // The Object Number of the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope;\n\n    // add Callback for creating the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe(\n      \"postPutResources\",\n      function() {\n        AcroFormDictionaryCallback(scope);\n      }\n    );\n\n    scope.internal.events.subscribe(\"buildDocument\", function() {\n      annotReferenceCallback(scope);\n    }); // buildDocument\n\n    // Register event, that is triggered when the DocumentCatalog is\n    // written, in order to add /AcroForm\n\n    scope.internal.events.subscribe(\"putCatalog\", function() {\n      putCatalogCallback(scope);\n    });\n\n    // Register event, that creates all Fields\n    scope.internal.events.subscribe(\"postPutPages\", function(fieldArray) {\n      createFieldCallback(fieldArray, scope);\n    });\n\n    scope.internal.acroformPlugin.isInitialized = true;\n  }\n};\n\n//PDF 32000-1:2008, page 26, 7.3.6\nvar arrayToPdfArray = (jsPDFAPI.__acroform__.arrayToPdfArray = function(\n  array,\n  objId,\n  scope\n) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (Array.isArray(array)) {\n    var content = \"[\";\n    for (var i = 0; i < array.length; i++) {\n      if (i !== 0) {\n        content += \" \";\n      }\n      switch (typeof array[i]) {\n        case \"boolean\":\n        case \"number\":\n        case \"object\":\n          content += array[i].toString();\n          break;\n        case \"string\":\n          if (array[i].substr(0, 1) !== \"/\") {\n            if (typeof objId !== \"undefined\" && scope)\n              encryptor = scope.internal.getEncryptor(objId);\n            content += \"(\" + pdfEscape(encryptor(array[i].toString())) + \")\";\n          } else {\n            content += array[i].toString();\n          }\n          break;\n      }\n    }\n    content += \"]\";\n    return content;\n  }\n  throw new Error(\n    \"Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray\"\n  );\n});\nfunction getMatches(string, regex, index) {\n  index || (index = 1); // default to the first capturing group\n  var matches = [];\n  var match;\n  while ((match = regex.exec(string))) {\n    matches.push(match[index]);\n  }\n  return matches;\n}\nvar pdfArrayToStringArray = function(array) {\n  var result = [];\n  if (typeof array === \"string\") {\n    result = getMatches(array, /\\((.*?)\\)/g);\n  }\n  return result;\n};\n\nvar toPdfString = function(string, objId, scope) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (typeof objId !== \"undefined\" && scope)\n    encryptor = scope.internal.getEncryptor(objId);\n  string = string || \"\";\n  string.toString();\n  string = \"(\" + pdfEscape(encryptor(string)) + \")\";\n  return string;\n};\n\n// ##########################\n// Classes\n// ##########################\n\n/**\n * @class AcroFormPDFObject\n * @classdesc A AcroFormPDFObject\n */\nvar AcroFormPDFObject = function() {\n  this._objId = undefined;\n  this._scope = undefined;\n\n  /**\n   * @name AcroFormPDFObject#objId\n   * @type {any}\n   */\n  Object.defineProperty(this, \"objId\", {\n    get: function() {\n      if (typeof this._objId === \"undefined\") {\n        if (typeof this.scope === \"undefined\") {\n          return undefined;\n        }\n        this._objId = this.scope.internal.newObjectDeferred();\n      }\n      return this._objId;\n    },\n    set: function(value) {\n      this._objId = value;\n    }\n  });\n  Object.defineProperty(this, \"scope\", {\n    value: this._scope,\n    writable: true\n  });\n};\n\n/**\n * @function AcroFormPDFObject.toString\n */\nAcroFormPDFObject.prototype.toString = function() {\n  return this.objId + \" 0 R\";\n};\n\nAcroFormPDFObject.prototype.putStream = function() {\n  var keyValueList = this.getKeyValueListForStream();\n  this.scope.internal.putStream({\n    data: this.stream,\n    additionalKeyValues: keyValueList,\n    objectId: this.objId\n  });\n  this.scope.internal.out(\"endobj\");\n};\n\n/**\n * Returns an key-value-List of all non-configurable Variables from the Object\n *\n * @name getKeyValueListForStream\n * @returns {string}\n */\nAcroFormPDFObject.prototype.getKeyValueListForStream = function() {\n  var keyValueList = [];\n  var keys = Object.getOwnPropertyNames(this).filter(function(key) {\n    return (\n      key != \"content\" &&\n      key != \"appearanceStreamContent\" &&\n      key != \"scope\" &&\n      key != \"objId\" &&\n      key.substring(0, 1) != \"_\"\n    );\n  });\n\n  for (var i in keys) {\n    if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {\n      var key = keys[i];\n      var value = this[key];\n\n      if (value) {\n        if (Array.isArray(value)) {\n          keyValueList.push({\n            key: key,\n            value: arrayToPdfArray(value, this.objId, this.scope)\n          });\n        } else if (value instanceof AcroFormPDFObject) {\n          // In case it is a reference to another PDFObject,\n          // take the reference number\n          value.scope = this.scope;\n          keyValueList.push({ key: key, value: value.objId + \" 0 R\" });\n        } else if (typeof value !== \"function\") {\n          keyValueList.push({ key: key, value: value });\n        }\n      }\n    }\n  }\n  return keyValueList;\n};\n\nvar AcroFormXObject = function() {\n  AcroFormPDFObject.call(this);\n\n  Object.defineProperty(this, \"Type\", {\n    value: \"/XObject\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    value: \"/Form\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"FormType\", {\n    value: 1,\n    configurable: false,\n    writable: true\n  });\n\n  var _BBox = [];\n  Object.defineProperty(this, \"BBox\", {\n    configurable: false,\n    get: function() {\n      return _BBox;\n    },\n    set: function(value) {\n      _BBox = value;\n    }\n  });\n\n  Object.defineProperty(this, \"Resources\", {\n    value: \"2 0 R\",\n    configurable: false,\n    writable: true\n  });\n\n  var _stream;\n  Object.defineProperty(this, \"stream\", {\n    enumerable: false,\n    configurable: true,\n    set: function(value) {\n      _stream = value.trim();\n    },\n    get: function() {\n      if (_stream) {\n        return _stream;\n      } else {\n        return null;\n      }\n    }\n  });\n};\n\ninherit(AcroFormXObject, AcroFormPDFObject);\n\nvar AcroFormDictionary = function() {\n  AcroFormPDFObject.call(this);\n\n  var _Kids = [];\n\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      if (_Kids.length > 0) {\n        return _Kids;\n      } else {\n        return undefined;\n      }\n    }\n  });\n  Object.defineProperty(this, \"Fields\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    }\n  });\n\n  // Default Appearance\n  var _DA;\n  Object.defineProperty(this, \"DA\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DA) {\n        return undefined;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_DA)) + \")\";\n    },\n    set: function(value) {\n      _DA = value;\n    }\n  });\n};\n\ninherit(AcroFormDictionary, AcroFormPDFObject);\n\n/**\n * The Field Object contains the Variables, that every Field needs\n *\n * @class AcroFormField\n * @classdesc An AcroForm FieldObject\n */\nvar AcroFormField = function() {\n  AcroFormPDFObject.call(this);\n\n  //Annotation-Flag See Table 165\n  var _F = 4;\n  Object.defineProperty(this, \"F\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _F;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _F = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute F supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.\n   * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.\n   *\n   * @name AcroFormField#showWhenPrinted\n   * @default true\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"showWhenPrinted\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(_F, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.F = setBitForPdf(_F, 3);\n      } else {\n        this.F = clearBitForPdf(_F, 3);\n      }\n    }\n  });\n\n  var _Ff = 0;\n  Object.defineProperty(this, \"Ff\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Ff;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _Ff = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Ff supplied.'\n        );\n      }\n    }\n  });\n\n  var _Rect = [];\n  Object.defineProperty(this, \"Rect\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (_Rect.length === 0) {\n        return undefined;\n      }\n      return _Rect;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Rect = value;\n      } else {\n        _Rect = [];\n      }\n    }\n  });\n\n  /**\n   * The x-position of the field.\n   *\n   * @name AcroFormField#x\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"x\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[0])) {\n        return 0;\n      }\n      return _Rect[0];\n    },\n    set: function(value) {\n      _Rect[0] = value;\n    }\n  });\n\n  /**\n   * The y-position of the field.\n   *\n   * @name AcroFormField#y\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"y\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[1])) {\n        return 0;\n      }\n      return _Rect[1];\n    },\n    set: function(value) {\n      _Rect[1] = value;\n    }\n  });\n\n  /**\n   * The width of the field.\n   *\n   * @name AcroFormField#width\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"width\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[2])) {\n        return 0;\n      }\n      return _Rect[2];\n    },\n    set: function(value) {\n      _Rect[2] = value;\n    }\n  });\n\n  /**\n   * The height of the field.\n   *\n   * @name AcroFormField#height\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"height\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[3])) {\n        return 0;\n      }\n      return _Rect[3];\n    },\n    set: function(value) {\n      _Rect[3] = value;\n    }\n  });\n\n  var _FT = \"\";\n  Object.defineProperty(this, \"FT\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _FT;\n    },\n    set: function(value) {\n      switch (value) {\n        case \"/Btn\":\n        case \"/Tx\":\n        case \"/Ch\":\n        case \"/Sig\":\n          _FT = value;\n          break;\n        default:\n          throw new Error(\n            'Invalid value \"' + value + '\" for attribute FT supplied.'\n          );\n      }\n    }\n  });\n\n  var _T = null;\n\n  Object.defineProperty(this, \"T\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (!_T || _T.length < 1) {\n        // In case of a Child from a Radio´Group, you don't need a FieldName\n        if (this instanceof AcroFormChildClass) {\n          return undefined;\n        }\n        _T = \"FieldObject\" + AcroFormField.FieldNum++;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_T)) + \")\";\n    },\n    set: function(value) {\n      _T = value.toString();\n    }\n  });\n\n  /**\n   * (Optional) The partial field name (see 12.7.3.2, “Field Names”).\n   *\n   * @name AcroFormField#fieldName\n   * @default null\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fieldName\", {\n    configurable: true,\n    enumerable: true,\n    get: function() {\n      return _T;\n    },\n    set: function(value) {\n      _T = value;\n    }\n  });\n\n  var _fontName = \"helvetica\";\n  /**\n   * The fontName of the font to be used.\n   *\n   * @name AcroFormField#fontName\n   * @default 'helvetica'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontName\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontName;\n    },\n    set: function(value) {\n      _fontName = value;\n    }\n  });\n\n  var _fontStyle = \"normal\";\n  /**\n   * The fontStyle of the font to be used.\n   *\n   * @name AcroFormField#fontStyle\n   * @default 'normal'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontStyle\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontStyle;\n    },\n    set: function(value) {\n      _fontStyle = value;\n    }\n  });\n\n  var _fontSize = 0;\n  /**\n   * The fontSize of the font to be used.\n   *\n   * @name AcroFormField#fontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"fontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontSize;\n    },\n    set: function(value) {\n      _fontSize = value;\n    }\n  });\n\n  var _maxFontSize = undefined;\n  /**\n   * The maximum fontSize of the font to be used.\n   *\n   * @name AcroFormField#maxFontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxFontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (_maxFontSize === undefined) {\n        // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)\n        // (\"50\" is transformed to the \"user space\" but then used in \"pdf space\")\n        return 50 / scaleFactor;\n      } else {\n        return _maxFontSize;\n      }\n    },\n    set: function(value) {\n      _maxFontSize = value;\n    }\n  });\n\n  var _color = \"black\";\n  /**\n   * The color of the text\n   *\n   * @name AcroFormField#color\n   * @default 'black'\n   * @type {string|rgba}\n   */\n  Object.defineProperty(this, \"color\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _color;\n    },\n    set: function(value) {\n      _color = value;\n    }\n  });\n\n  var _DA = \"/F1 0 Tf 0 g\";\n  // Defines the default appearance (Needed for variable Text)\n  Object.defineProperty(this, \"DA\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (\n        !_DA ||\n        this instanceof AcroFormChildClass ||\n        this instanceof AcroFormTextField\n      ) {\n        return undefined;\n      }\n      return toPdfString(_DA, this.objId, this.scope);\n    },\n    set: function(value) {\n      value = value.toString();\n      _DA = value;\n    }\n  });\n\n  var _DV = null;\n  Object.defineProperty(this, \"DV\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DV) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_DV, this.objId, this.scope);\n      }\n      return _DV;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _DV = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _DV = pdfUnescape(value);\n        }\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.\n   *\n   * @name AcroFormField#defaultValue\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"defaultValue\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_DV.substr(1, _DV.length - 1));\n      } else {\n        return _DV;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _DV = \"/\" + value;\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  var _V = null;\n  Object.defineProperty(this, \"_V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      return _V;\n    },\n    set: function(value) {\n      this.V = value;\n    }\n  });\n  Object.defineProperty(this, \"V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_V, this.objId, this.scope);\n      }\n      return _V;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _V = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _V = pdfUnescape(value);\n        }\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.\n   *\n   * @name AcroFormField#value\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"value\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_V.substr(1, _V.length - 1));\n      } else {\n        return _V;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _V = \"/\" + value;\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * Check if field has annotations\n   *\n   * @name AcroFormField#hasAnnotation\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAnnotation\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.Rect;\n    }\n  });\n\n  Object.defineProperty(this, \"Type\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Annot\" : null;\n    }\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Widget\" : null;\n    }\n  });\n\n  var _hasAppearanceStream = false;\n  /**\n   * true if field has an appearanceStream\n   *\n   * @name AcroFormField#hasAppearanceStream\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _hasAppearanceStream;\n    },\n    set: function(value) {\n      value = Boolean(value);\n      _hasAppearanceStream = value;\n    }\n  });\n\n  /**\n   * The page on which the AcroFormField is placed\n   *\n   * @name AcroFormField#page\n   * @type {number}\n   */\n  var _page;\n  Object.defineProperty(this, \"page\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_page) {\n        return undefined;\n      }\n      return _page;\n    },\n    set: function(value) {\n      _page = value;\n    }\n  });\n\n  /**\n   * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.\n   *\n   * @name AcroFormField#readOnly\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"readOnly\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 1));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 1);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 1);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).\n   *\n   * @name AcroFormField#required\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"required\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 2));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 2);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 2);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)\n   *\n   * @name AcroFormField#noExport\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noExport\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 3);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 3);\n      }\n    }\n  });\n\n  var _Q = null;\n  Object.defineProperty(this, \"Q\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (_Q === null) {\n        return undefined;\n      }\n      return _Q;\n    },\n    set: function(value) {\n      if ([0, 1, 2].indexOf(value) !== -1) {\n        _Q = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Q supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:\n   * 'left', 'center', 'right'\n   *\n   * @name AcroFormField#textAlign\n   * @default 'left'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"textAlign\", {\n    get: function() {\n      var result;\n      switch (_Q) {\n        case 0:\n        default:\n          result = \"left\";\n          break;\n        case 1:\n          result = \"center\";\n          break;\n        case 2:\n          result = \"right\";\n          break;\n      }\n      return result;\n    },\n    configurable: true,\n    enumerable: true,\n    set: function(value) {\n      switch (value) {\n        case \"right\":\n        case 2:\n          _Q = 2;\n          break;\n        case \"center\":\n        case 1:\n          _Q = 1;\n          break;\n        case \"left\":\n        case 0:\n        default:\n          _Q = 0;\n      }\n    }\n  });\n};\n\ninherit(AcroFormField, AcroFormPDFObject);\n\n/**\n * @class AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormChoiceField = function() {\n  AcroFormField.call(this);\n  // Field Type = Choice Field\n  this.FT = \"/Ch\";\n  // options\n  this.V = \"()\";\n\n  this.fontName = \"zapfdingbats\";\n  // Top Index\n  var _TI = 0;\n\n  Object.defineProperty(this, \"TI\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  /**\n   * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.\n   *\n   * @name AcroFormChoiceField#topIndex\n   * @default 0\n   * @type {number}\n   */\n  Object.defineProperty(this, \"topIndex\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  var _Opt = [];\n  Object.defineProperty(this, \"Opt\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return arrayToPdfArray(_Opt, this.objId, this.scope);\n    },\n    set: function(value) {\n      _Opt = pdfArrayToStringArray(value);\n    }\n  });\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name getOptions\n   * @function\n   * @instance\n   * @returns {array} array of Options\n   */\n  this.getOptions = function() {\n    return _Opt;\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name setOptions\n   * @function\n   * @instance\n   * @param {array} value\n   */\n  this.setOptions = function(value) {\n    _Opt = value;\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name addOption\n   * @function\n   * @instance\n   * @param {string} value\n   */\n  this.addOption = function(value) {\n    value = value || \"\";\n    value = value.toString();\n    _Opt.push(value);\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name removeOption\n   * @function\n   * @instance\n   * @param {string} value\n   * @param {boolean} allEntries (default: false)\n   */\n  this.removeOption = function(value, allEntries) {\n    allEntries = allEntries || false;\n    value = value || \"\";\n    value = value.toString();\n\n    while (_Opt.indexOf(value) !== -1) {\n      _Opt.splice(_Opt.indexOf(value), 1);\n      if (allEntries === false) {\n        break;\n      }\n    }\n  };\n\n  /**\n   * If set, the field is a combo box; if clear, the field is a list box.\n   *\n   * @name AcroFormChoiceField#combo\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"combo\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 18));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 18);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 18);\n      }\n    }\n  });\n\n  /**\n   * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.\n   *\n   * @name AcroFormChoiceField#edit\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"edit\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 19));\n    },\n    set: function(value) {\n      //PDF 32000-1:2008, page 444\n      if (this.combo === true) {\n        if (Boolean(value) === true) {\n          this.Ff = setBitForPdf(this.Ff, 19);\n        } else {\n          this.Ff = clearBitForPdf(this.Ff, 19);\n        }\n      }\n    }\n  });\n\n  /**\n   * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).\n   *\n   * @name AcroFormChoiceField#sort\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"sort\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 20));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 20);\n        _Opt.sort();\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 20);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected\n   *\n   * @name AcroFormChoiceField#multiSelect\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 22));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 22);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 22);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.\n   *\n   * @name AcroFormChoiceField#doNotSpellCheck\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.\n   * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.\n   *\n   * @name AcroFormChoiceField#commitOnSelChange\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"commitOnSelChange\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 27));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 27);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 27);\n      }\n    }\n  });\n\n  this.hasAppearanceStream = false;\n};\ninherit(AcroFormChoiceField, AcroFormField);\n\n/**\n * @class AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormListBox = function() {\n  AcroFormChoiceField.call(this);\n  this.fontName = \"helvetica\";\n\n  //PDF 32000-1:2008, page 444\n  this.combo = false;\n};\ninherit(AcroFormListBox, AcroFormChoiceField);\n\n/**\n * @class AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormComboBox = function() {\n  AcroFormListBox.call(this);\n  this.combo = true;\n};\ninherit(AcroFormComboBox, AcroFormListBox);\n\n/**\n * @class AcroFormEditBox\n * @extends AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormEditBox = function() {\n  AcroFormComboBox.call(this);\n  this.edit = true;\n};\ninherit(AcroFormEditBox, AcroFormComboBox);\n\n/**\n * @class AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormButton = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Btn\";\n\n  /**\n   * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.\n   *\n   * @name AcroFormButton#noToggleToOff\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noToggleToOff\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 15));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 15);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 15);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.\n   *\n   * @name AcroFormButton#radio\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radio\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 16));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 16);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 16);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a pushbutton that does not retain a permanent value.\n   *\n   * @name AcroFormButton#pushButton\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"pushButton\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 17));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 17);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 17);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).\n   *\n   * @name AcroFormButton#radioIsUnison\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radioIsUnison\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      if (Object.keys(_MK).length !== 0) {\n        var result = [];\n        result.push(\"<<\");\n        var key;\n        for (key in _MK) {\n          result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n        }\n        result.push(\">>\");\n        return result.join(\"\\n\");\n      }\n      return undefined;\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n};\ninherit(AcroFormButton, AcroFormField);\n\n/**\n * @class AcroFormPushButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormPushButton = function() {\n  AcroFormButton.call(this);\n  this.pushButton = true;\n};\ninherit(AcroFormPushButton, AcroFormButton);\n\n/**\n * @class AcroFormRadioButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormRadioButton = function() {\n  AcroFormButton.call(this);\n  this.radio = true;\n  this.pushButton = false;\n\n  var _Kids = [];\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Kids = value;\n      } else {\n        _Kids = [];\n      }\n    }\n  });\n};\ninherit(AcroFormRadioButton, AcroFormButton);\n\n/**\n * The Child class of a RadioButton (the radioGroup) -> The single Buttons\n *\n * @class AcroFormChildClass\n * @extends AcroFormField\n * @ignore\n */\nvar AcroFormChildClass = function() {\n  AcroFormField.call(this);\n\n  var _parent;\n  Object.defineProperty(this, \"Parent\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _parent;\n    },\n    set: function(value) {\n      _parent = value;\n    }\n  });\n\n  var _optionName;\n  Object.defineProperty(this, \"optionName\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      return _optionName;\n    },\n    set: function(value) {\n      _optionName = value;\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      var result = [];\n      result.push(\"<<\");\n      var key;\n      for (key in _MK) {\n        result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n      }\n      result.push(\">>\");\n      return result.join(\"\\n\");\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n  this.caption = \"l\";\n  this.appearanceState = \"Off\";\n  // todo: set AppearanceType as variable that can be set from the\n  // outside...\n  this._AppearanceType = AcroFormAppearance.RadioButton.Circle;\n  // The Default appearanceType is the Circle\n  this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(\n    this.optionName\n  );\n};\ninherit(AcroFormChildClass, AcroFormField);\n\nAcroFormRadioButton.prototype.setAppearance = function(appearance) {\n  if (!(\"createAppearanceStream\" in appearance && \"getCA\" in appearance)) {\n    throw new Error(\n      \"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\"\n    );\n  }\n  for (var objId in this.Kids) {\n    if (this.Kids.hasOwnProperty(objId)) {\n      var child = this.Kids[objId];\n      child.appearanceStreamContent = appearance.createAppearanceStream(\n        child.optionName\n      );\n      child.caption = appearance.getCA();\n    }\n  }\n};\n\nAcroFormRadioButton.prototype.createOption = function(name) {\n  // Create new Child for RadioGroup\n  var child = new AcroFormChildClass();\n  child.Parent = this;\n  child.optionName = name;\n  // Add to Parent\n  this.Kids.push(child);\n\n  addField.call(this.scope, child);\n\n  return child;\n};\n\n/**\n * @class AcroFormCheckBox\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormCheckBox = function() {\n  AcroFormButton.call(this);\n\n  this.fontName = \"zapfdingbats\";\n  this.caption = \"3\";\n  this.appearanceState = \"On\";\n  this.value = \"On\";\n  this.textAlign = \"center\";\n  this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();\n};\ninherit(AcroFormCheckBox, AcroFormButton);\n\n/**\n * @class AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormTextField = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Tx\";\n\n  /**\n   * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.\n   *\n   * @name AcroFormTextField#multiline\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiline\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 13));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 13);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 13);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.\n   *\n   * @name AcroFormTextField#fileSelect\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"fileSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 21));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 21);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 21);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spell-checked.\n   *\n   * @name AcroFormTextField#doNotSpellCheck\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.\n   *\n   * @name AcroFormTextField#doNotScroll\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotScroll\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 24));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 24);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 24);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.\n   *\n   * @name AcroFormTextField#comb\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"comb\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 25));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 25);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 25);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.\n   *\n   * @name AcroFormTextField#richText\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"richText\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MaxLen = null;\n  Object.defineProperty(this, \"MaxLen\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      _MaxLen = value;\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The maximum length of the field’s text, in characters.\n   *\n   * @name AcroFormTextField#maxLength\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxLength\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      if (Number.isInteger(value)) {\n        _MaxLen = value;\n      }\n    }\n  });\n\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.V || this.DV;\n    }\n  });\n};\ninherit(AcroFormTextField, AcroFormField);\n\n/**\n * @class AcroFormPasswordField\n * @extends AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormPasswordField = function() {\n  AcroFormTextField.call(this);\n\n  /**\n   * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.\n   * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.\n   *\n   * @name AcroFormTextField#password\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"password\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 14));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 14);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 14);\n      }\n    }\n  });\n  this.password = true;\n};\ninherit(AcroFormPasswordField, AcroFormTextField);\n\n// Contains Methods for creating standard appearances\nvar AcroFormAppearance = {\n  CheckBox: {\n    createAppearanceStream: function() {\n      var appearance = {\n        N: {\n          On: AcroFormAppearance.CheckBox.YesNormal\n        },\n        D: {\n          On: AcroFormAppearance.CheckBox.YesPushDown,\n          Off: AcroFormAppearance.CheckBox.OffPushDown\n        }\n      };\n\n      return appearance;\n    },\n    /**\n     * Returns the standard On Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    YesPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      stream.push(\"BMC\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(\"BT\");\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      stream.push(\"EMC\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    YesNormal: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var stream = [];\n      var height = AcroFormAppearance.internal.getHeight(formObject);\n      var width = AcroFormAppearance.internal.getWidth(formObject);\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"1 g\");\n      stream.push(\"0 0 \" + f2(width) + \" \" + f2(height) + \" re\");\n      stream.push(\"f\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\"0 0 \" + f2(width - 1) + \" \" + f2(height - 1) + \" re\");\n      stream.push(\"W\");\n      stream.push(\"n\");\n      stream.push(\"0 g\");\n      stream.push(\"BT\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    /**\n     * Returns the standard Off Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    OffPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    }\n  },\n\n  RadioButton: {\n    Circle: {\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Circle.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Circle.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Circle.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"l\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        // Make the Radius of the Circle relative to min(height, width) of formObject\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        var c = AcroFormAppearance.internal.Bezier_C;\n        var DotRadiusBezier = Number((DotRadius * c).toFixed(5));\n        /*\n         * The Following is a Circle created with Bezier-Curves.\n         */\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n        var dc = Number(\n          (DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5)\n        );\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        stream.push(\"0 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          \"\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" \" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" -\" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          dc +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    },\n\n    Cross: {\n      /**\n       * Creates the Actual AppearanceDictionary-References\n       *\n       * @param {string} name\n       * @returns {Object}\n       * @ignore\n       */\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Cross.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Cross.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Cross.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"8\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    }\n  },\n\n  /**\n   * Returns the standard Appearance\n   *\n   * @returns {AcroFormXObject}\n   */\n  createDefaultAppearanceStream: function(formObject) {\n    // Set Helvetica to Standard Font (size: auto)\n    // Color: Black\n    var fontKey = formObject.scope.internal.getFont(\n      formObject.fontName,\n      formObject.fontStyle\n    ).id;\n    var encodedColor = formObject.scope.__private__.encodeColorString(\n      formObject.color\n    );\n    var fontSize = formObject.fontSize;\n    var result = \"/\" + fontKey + \" \" + fontSize + \" Tf \" + encodedColor;\n    return result;\n  }\n};\n\nAcroFormAppearance.internal = {\n  Bezier_C: 0.551915024494,\n\n  calculateCross: function(formObject) {\n    var width = AcroFormAppearance.internal.getWidth(formObject);\n    var height = AcroFormAppearance.internal.getHeight(formObject);\n    var a = Math.min(width, height);\n\n    var cross = {\n      x1: {\n        // upperLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 + a // height - borderPadding\n      },\n      x2: {\n        // lowerRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 // borderPadding\n      },\n      x3: {\n        // lowerLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 // borderPadding\n      },\n      x4: {\n        // upperRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 + a // height - borderPadding\n      }\n    };\n\n    return cross;\n  }\n};\nAcroFormAppearance.internal.getWidth = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[2]);\n  }\n  return result;\n};\nAcroFormAppearance.internal.getHeight = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[3]);\n  }\n  return result;\n};\n\n// Public:\n\n/**\n * Add an AcroForm-Field to the jsPDF-instance\n *\n * @name addField\n * @function\n * @instance\n * @param {Object} fieldObject\n * @returns {jsPDF}\n */\nvar addField = (jsPDFAPI.addField = function(fieldObject) {\n  initializeAcroForm(this, fieldObject);\n\n  if (fieldObject instanceof AcroFormField) {\n    putForm(fieldObject);\n  } else {\n    throw new Error(\"Invalid argument passed to jsPDF.addField.\");\n  }\n  fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;\n  return this;\n});\n\njsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;\njsPDFAPI.AcroFormListBox = AcroFormListBox;\njsPDFAPI.AcroFormComboBox = AcroFormComboBox;\njsPDFAPI.AcroFormEditBox = AcroFormEditBox;\njsPDFAPI.AcroFormButton = AcroFormButton;\njsPDFAPI.AcroFormPushButton = AcroFormPushButton;\njsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;\njsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;\njsPDFAPI.AcroFormTextField = AcroFormTextField;\njsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;\njsPDFAPI.AcroFormAppearance = AcroFormAppearance;\n\njsPDFAPI.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\njsPDF.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\nvar AcroForm = jsPDF.AcroForm;\n\nexport {\n  AcroForm,\n  AcroFormChoiceField,\n  AcroFormListBox,\n  AcroFormComboBox,\n  AcroFormEditBox,\n  AcroFormButton,\n  AcroFormPushButton,\n  AcroFormRadioButton,\n  AcroFormCheckBox,\n  AcroFormTextField,\n  AcroFormPasswordField,\n  AcroFormAppearance\n};\n","/** @license\n * jsPDF addImage plugin\n * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/\n *               2013 Chris Dowling, https://github.com/gingerchris\n *               2013 Trinh Ho, https://github.com/ineedfat\n *               2013 Edwin Alejandro Perez, https://github.com/eaparango\n *               2013 Norah Smith, https://github.com/burnburnrocket\n *               2014 Diego Casorran, https://github.com/diegocr\n *               2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * @name addImage\n * @module\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob, btoa } from \"../libs/AtobBtoa.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namespace = \"addImage_\";\n  jsPDFAPI.__addimage__ = {};\n\n  var UNKNOWN = \"UNKNOWN\";\n\n  // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.\n  // With too small batch iteration will be slow as more calls are made,\n  // higher values cause larger and slower garbage collection.\n  var ARRAY_APPLY_BATCH = 8192;\n\n  var imageFileTypeHeaders = {\n    PNG: [[0x89, 0x50, 0x4e, 0x47]],\n    TIFF: [\n      [0x4d, 0x4d, 0x00, 0x2a], //Motorola\n      [0x49, 0x49, 0x2a, 0x00] //Intel\n    ],\n    JPEG: [\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe0,\n        undefined,\n        undefined,\n        0x4a,\n        0x46,\n        0x49,\n        0x46,\n        0x00\n      ], //JFIF\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe1,\n        undefined,\n        undefined,\n        0x45,\n        0x78,\n        0x69,\n        0x66,\n        0x00,\n        0x00\n      ], //Exif\n      [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW\n      [0xff, 0xd8, 0xff, 0xee] //EXIF RAW\n    ],\n    JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],\n    GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],\n    GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],\n    WEBP: [\n      [\n        0x52,\n        0x49,\n        0x46,\n        0x46,\n        undefined,\n        undefined,\n        undefined,\n        undefined,\n        0x57,\n        0x45,\n        0x42,\n        0x50\n      ]\n    ],\n    BMP: [\n      [0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.\n      [0x42, 0x41], //BA - OS/2 struct bitmap array\n      [0x43, 0x49], //CI - OS/2 struct color icon\n      [0x43, 0x50], //CP - OS/2 const color pointer\n      [0x49, 0x43], //IC - OS/2 struct icon\n      [0x50, 0x54] //PT - OS/2 pointer\n    ]\n  };\n\n  /**\n   * Recognize filetype of Image by magic-bytes\n   *\n   * https://en.wikipedia.org/wiki/List_of_file_signatures\n   *\n   * @name getImageFileTypeByImageData\n   * @public\n   * @function\n   * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer\n   * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'\n   *\n   * @returns {string} filetype of Image\n   */\n  var getImageFileTypeByImageData = (jsPDFAPI.__addimage__.getImageFileTypeByImageData = function(\n    imageData,\n    fallbackFormat\n  ) {\n    fallbackFormat = fallbackFormat || UNKNOWN;\n    var i;\n    var j;\n    var result = UNKNOWN;\n    var headerSchemata;\n    var compareResult;\n    var fileType;\n\n    if (\n      fallbackFormat === \"RGBA\" ||\n      (imageData.data !== undefined &&\n        imageData.data instanceof Uint8ClampedArray &&\n        \"height\" in imageData &&\n        \"width\" in imageData)\n    ) {\n      return \"RGBA\";\n    }\n\n    if (isArrayBufferView(imageData)) {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData[j]) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    } else {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    }\n\n    if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {\n      result = fallbackFormat;\n    }\n    return result;\n  });\n\n  // Image functionality ported from pdf.js\n  var putImage = function(image) {\n    var out = this.internal.write;\n    var putStream = this.internal.putStream;\n    var getFilters = this.internal.getFilters;\n\n    var filter = getFilters();\n    while (filter.indexOf(\"FlateEncode\") !== -1) {\n      filter.splice(filter.indexOf(\"FlateEncode\"), 1);\n    }\n\n    image.objectId = this.internal.newObject();\n\n    var additionalKeyValues = [];\n    additionalKeyValues.push({ key: \"Type\", value: \"/XObject\" });\n    additionalKeyValues.push({ key: \"Subtype\", value: \"/Image\" });\n    additionalKeyValues.push({ key: \"Width\", value: image.width });\n    additionalKeyValues.push({ key: \"Height\", value: image.height });\n\n    if (image.colorSpace === color_spaces.INDEXED) {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value:\n          \"[/Indexed /DeviceRGB \" +\n          // if an indexed png defines more than one colour with transparency, we've created a sMask\n          (image.palette.length / 3 - 1) +\n          \" \" +\n          (\"sMask\" in image && typeof image.sMask !== \"undefined\"\n            ? image.objectId + 2\n            : image.objectId + 1) +\n          \" 0 R]\"\n      });\n    } else {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value: \"/\" + image.colorSpace\n      });\n      if (image.colorSpace === color_spaces.DEVICE_CMYK) {\n        additionalKeyValues.push({ key: \"Decode\", value: \"[1 0 1 0 1 0 1 0]\" });\n      }\n    }\n    additionalKeyValues.push({\n      key: \"BitsPerComponent\",\n      value: image.bitsPerComponent\n    });\n    if (\n      \"decodeParameters\" in image &&\n      typeof image.decodeParameters !== \"undefined\"\n    ) {\n      additionalKeyValues.push({\n        key: \"DecodeParms\",\n        value: \"<<\" + image.decodeParameters + \">>\"\n      });\n    }\n    if (\"transparency\" in image && Array.isArray(image.transparency)) {\n      var transparency = \"\",\n        i = 0,\n        len = image.transparency.length;\n      for (; i < len; i++)\n        transparency +=\n          image.transparency[i] + \" \" + image.transparency[i] + \" \";\n\n      additionalKeyValues.push({\n        key: \"Mask\",\n        value: \"[\" + transparency + \"]\"\n      });\n    }\n    if (typeof image.sMask !== \"undefined\") {\n      additionalKeyValues.push({\n        key: \"SMask\",\n        value: image.objectId + 1 + \" 0 R\"\n      });\n    }\n\n    var alreadyAppliedFilters =\n      typeof image.filter !== \"undefined\" ? [\"/\" + image.filter] : undefined;\n\n    putStream({\n      data: image.data,\n      additionalKeyValues: additionalKeyValues,\n      alreadyAppliedFilters: alreadyAppliedFilters,\n      objectId: image.objectId\n    });\n\n    out(\"endobj\");\n\n    // Soft mask\n    if (\"sMask\" in image && typeof image.sMask !== \"undefined\") {\n      var decodeParameters =\n        \"/Predictor \" +\n        image.predictor +\n        \" /Colors 1 /BitsPerComponent \" +\n        image.bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n      var sMask = {\n        width: image.width,\n        height: image.height,\n        colorSpace: \"DeviceGray\",\n        bitsPerComponent: image.bitsPerComponent,\n        decodeParameters: decodeParameters,\n        data: image.sMask\n      };\n      if (\"filter\" in image) {\n        sMask.filter = image.filter;\n      }\n      putImage.call(this, sMask);\n    }\n\n    //Palette\n    if (image.colorSpace === color_spaces.INDEXED) {\n      var objId = this.internal.newObject();\n      //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');\n      //putStream(zlib.compress(img['pal']));\n      putStream({\n        data: arrayBufferToBinaryString(new Uint8Array(image.palette)),\n        objectId: objId\n      });\n      out(\"endobj\");\n    }\n  };\n  var putResourcesCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    for (var i in images) {\n      putImage.call(this, images[i]);\n    }\n  };\n  var putXObjectsDictCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"],\n      out = this.internal.write,\n      image;\n    for (var i in images) {\n      image = images[i];\n      out(\"/I\" + image.index, image.objectId, \"0\", \"R\");\n    }\n  };\n\n  var checkCompressValue = function(value) {\n    if (value && typeof value === \"string\") value = value.toUpperCase();\n    return value in jsPDFAPI.image_compression ? value : image_compression.NONE;\n  };\n\n  var initialize = function() {\n    if (!this.internal.collections[namespace + \"images\"]) {\n      this.internal.collections[namespace + \"images\"] = {};\n      this.internal.events.subscribe(\"putResources\", putResourcesCallback);\n      this.internal.events.subscribe(\"putXobjectDict\", putXObjectsDictCallback);\n    }\n  };\n\n  var getImages = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    initialize.call(this);\n    return images;\n  };\n  var getImageIndex = function() {\n    return Object.keys(this.internal.collections[namespace + \"images\"]).length;\n  };\n  var notDefined = function(value) {\n    return typeof value === \"undefined\" || value === null || value.length === 0;\n  };\n  var generateAliasFromImageData = function(imageData) {\n    if (typeof imageData === \"string\" || isArrayBufferView(imageData)) {\n      return sHashCode(imageData);\n    } else if (isArrayBufferView(imageData.data)) {\n      return sHashCode(imageData.data);\n    }\n\n    return null;\n  };\n\n  var isImageTypeSupported = function(type) {\n    return typeof jsPDFAPI[\"process\" + type.toUpperCase()] === \"function\";\n  };\n\n  var isDOMElement = function(object) {\n    return typeof object === \"object\" && object.nodeType === 1;\n  };\n\n  var getImageDataFromElement = function(element, format) {\n    //if element is an image which uses data url definition, just return the dataurl\n    if (element.nodeName === \"IMG\" && element.hasAttribute(\"src\")) {\n      var src = \"\" + element.getAttribute(\"src\");\n\n      //is base64 encoded dataUrl, directly process it\n      if (src.indexOf(\"data:image/\") === 0) {\n        return atob(\n          unescape(src)\n            .split(\"base64,\")\n            .pop()\n        );\n      }\n\n      //it is probably an url, try to load it\n      var tmpImageData = jsPDFAPI.loadFile(src, true);\n      if (tmpImageData !== undefined) {\n        return tmpImageData;\n      }\n    }\n\n    if (element.nodeName === \"CANVAS\") {\n      if (element.width === 0 || element.height === 0) {\n        throw new Error(\n          \"Given canvas must have data. Canvas width: \" +\n            element.width +\n            \", height: \" +\n            element.height\n        );\n      }\n      var mimeType;\n      switch (format) {\n        case \"PNG\":\n          mimeType = \"image/png\";\n          break;\n        case \"WEBP\":\n          mimeType = \"image/webp\";\n          break;\n        case \"JPEG\":\n        case \"JPG\":\n        default:\n          mimeType = \"image/jpeg\";\n          break;\n      }\n      return atob(\n        element\n          .toDataURL(mimeType, 1.0)\n          .split(\"base64,\")\n          .pop()\n      );\n    }\n  };\n\n  var checkImagesForAlias = function(alias) {\n    var images = this.internal.collections[namespace + \"images\"];\n    if (images) {\n      for (var e in images) {\n        if (alias === images[e].alias) {\n          return images[e];\n        }\n      }\n    }\n  };\n\n  var determineWidthAndHeight = function(width, height, image) {\n    if (!width && !height) {\n      width = -96;\n      height = -96;\n    }\n    if (width < 0) {\n      width = (-1 * image.width * 72) / width / this.internal.scaleFactor;\n    }\n    if (height < 0) {\n      height = (-1 * image.height * 72) / height / this.internal.scaleFactor;\n    }\n    if (width === 0) {\n      width = (height * image.width) / image.height;\n    }\n    if (height === 0) {\n      height = (width * image.height) / image.width;\n    }\n\n    return [width, height];\n  };\n\n  var writeImageToPDF = function(x, y, width, height, image, rotation) {\n    var dims = determineWidthAndHeight.call(this, width, height, image),\n      coord = this.internal.getCoordinateString,\n      vcoord = this.internal.getVerticalCoordinateString;\n\n    var images = getImages.call(this);\n\n    width = dims[0];\n    height = dims[1];\n    images[image.index] = image;\n\n    if (rotation) {\n      rotation *= Math.PI / 180;\n      var c = Math.cos(rotation);\n      var s = Math.sin(rotation);\n      //like in pdf Reference do it 4 digits instead of 2\n      var f4 = function(number) {\n        return number.toFixed(4);\n      };\n      var rotationTransformationMatrix = [\n        f4(c),\n        f4(s),\n        f4(s * -1),\n        f4(c),\n        0,\n        0,\n        \"cm\"\n      ];\n    }\n    this.internal.write(\"q\"); //Save graphics state\n    if (rotation) {\n      this.internal.write(\n        [1, \"0\", \"0\", 1, coord(x), vcoord(y + height), \"cm\"].join(\" \")\n      ); //Translate\n      this.internal.write(rotationTransformationMatrix.join(\" \")); //Rotate\n      this.internal.write(\n        [coord(width), \"0\", \"0\", coord(height), \"0\", \"0\", \"cm\"].join(\" \")\n      ); //Scale\n    } else {\n      this.internal.write(\n        [\n          coord(width),\n          \"0\",\n          \"0\",\n          coord(height),\n          coord(x),\n          vcoord(y + height),\n          \"cm\"\n        ].join(\" \")\n      ); //Translate and Scale\n    }\n\n    if (this.isAdvancedAPI()) {\n      // draw image bottom up when in \"advanced\" API mode\n      this.internal.write([1, 0, 0, -1, 0, 0, \"cm\"].join(\" \"));\n    }\n\n    this.internal.write(\"/I\" + image.index + \" Do\"); //Paint Image\n    this.internal.write(\"Q\"); //Restore graphics state\n  };\n\n  /**\n   * COLOR SPACES\n   */\n  var color_spaces = (jsPDFAPI.color_spaces = {\n    DEVICE_RGB: \"DeviceRGB\",\n    DEVICE_GRAY: \"DeviceGray\",\n    DEVICE_CMYK: \"DeviceCMYK\",\n    CAL_GREY: \"CalGray\",\n    CAL_RGB: \"CalRGB\",\n    LAB: \"Lab\",\n    ICC_BASED: \"ICCBased\",\n    INDEXED: \"Indexed\",\n    PATTERN: \"Pattern\",\n    SEPARATION: \"Separation\",\n    DEVICE_N: \"DeviceN\"\n  });\n\n  /**\n   * DECODE METHODS\n   */\n  jsPDFAPI.decode = {\n    DCT_DECODE: \"DCTDecode\",\n    FLATE_DECODE: \"FlateDecode\",\n    LZW_DECODE: \"LZWDecode\",\n    JPX_DECODE: \"JPXDecode\",\n    JBIG2_DECODE: \"JBIG2Decode\",\n    ASCII85_DECODE: \"ASCII85Decode\",\n    ASCII_HEX_DECODE: \"ASCIIHexDecode\",\n    RUN_LENGTH_DECODE: \"RunLengthDecode\",\n    CCITT_FAX_DECODE: \"CCITTFaxDecode\"\n  };\n\n  /**\n   * IMAGE COMPRESSION TYPES\n   */\n  var image_compression = (jsPDFAPI.image_compression = {\n    NONE: \"NONE\",\n    FAST: \"FAST\",\n    MEDIUM: \"MEDIUM\",\n    SLOW: \"SLOW\"\n  });\n\n  /**\n   * @name sHashCode\n   * @function\n   * @param {string} data\n   * @returns {string}\n   */\n  var sHashCode = (jsPDFAPI.__addimage__.sHashCode = function(data) {\n    var hash = 0,\n      i,\n      len;\n\n    if (typeof data === \"string\") {\n      len = data.length;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data.charCodeAt(i);\n        hash |= 0; // Convert to 32bit integer\n      }\n    } else if (isArrayBufferView(data)) {\n      len = data.byteLength / 2;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data[i];\n        hash |= 0; // Convert to 32bit integer\n      }\n    }\n    return hash;\n  });\n\n  /**\n   * Validates if given String is a valid Base64-String\n   *\n   * @name validateStringAsBase64\n   * @public\n   * @function\n   * @param {String} possible Base64-String\n   *\n   * @returns {boolean}\n   */\n  var validateStringAsBase64 = (jsPDFAPI.__addimage__.validateStringAsBase64 = function(\n    possibleBase64String\n  ) {\n    possibleBase64String = possibleBase64String || \"\";\n    possibleBase64String.toString().trim();\n\n    var result = true;\n\n    if (possibleBase64String.length === 0) {\n      result = false;\n    }\n\n    if (possibleBase64String.length % 4 !== 0) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9+/]+$/.test(\n        possibleBase64String.substr(0, possibleBase64String.length - 2)\n      ) === false\n    ) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(\n        possibleBase64String.substr(-2)\n      ) === false\n    ) {\n      result = false;\n    }\n    return result;\n  });\n\n  /**\n   * Strips out and returns info from a valid base64 data URI\n   *\n   * @name extractImageFromDataUrl\n   * @function\n   * @param {string} dataUrl a valid data URI of format 'data:[<MIME-type>][;base64],<data>'\n   * @returns {Array}an Array containing the following\n   * [0] the complete data URI\n   * [1] <MIME-type>\n   * [2] format - the second part of the mime-type i.e 'png' in 'image/png'\n   * [4] <data>\n   */\n  var extractImageFromDataUrl = (jsPDFAPI.__addimage__.extractImageFromDataUrl = function(\n    dataUrl\n  ) {\n    dataUrl = dataUrl || \"\";\n    var dataUrlParts = dataUrl.split(\"base64,\");\n    var result = null;\n\n    if (dataUrlParts.length === 2) {\n      var extractedInfo = /^data:(\\w*\\/\\w*);*(charset=(?!charset=)[\\w=-]*)*;*$/.exec(\n        dataUrlParts[0]\n      );\n      if (Array.isArray(extractedInfo)) {\n        result = {\n          mimeType: extractedInfo[1],\n          charset: extractedInfo[2],\n          data: dataUrlParts[1]\n        };\n      }\n    }\n    return result;\n  });\n\n  /**\n   * Check to see if ArrayBuffer is supported\n   *\n   * @name supportsArrayBuffer\n   * @function\n   * @returns {boolean}\n   */\n  var supportsArrayBuffer = (jsPDFAPI.__addimage__.supportsArrayBuffer = function() {\n    return (\n      typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\"\n    );\n  });\n\n  /**\n   * Tests supplied object to determine if ArrayBuffer\n   *\n   * @name isArrayBuffer\n   * @function\n   * @param {Object} object an Object\n   *\n   * @returns {boolean}\n   */\n  jsPDFAPI.__addimage__.isArrayBuffer = function(object) {\n    return supportsArrayBuffer() && object instanceof ArrayBuffer;\n  };\n\n  /**\n   * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface\n   *\n   * @name isArrayBufferView\n   * @function\n   * @param {Object} object an Object\n   * @returns {boolean}\n   */\n  var isArrayBufferView = (jsPDFAPI.__addimage__.isArrayBufferView = function(\n    object\n  ) {\n    return (\n      supportsArrayBuffer() &&\n      typeof Uint32Array !== \"undefined\" &&\n      (object instanceof Int8Array ||\n        object instanceof Uint8Array ||\n        (typeof Uint8ClampedArray !== \"undefined\" &&\n          object instanceof Uint8ClampedArray) ||\n        object instanceof Int16Array ||\n        object instanceof Uint16Array ||\n        object instanceof Int32Array ||\n        object instanceof Uint32Array ||\n        object instanceof Float32Array ||\n        object instanceof Float64Array)\n    );\n  });\n\n  /**\n   * Convert Binary String to ArrayBuffer\n   *\n   * @name binaryStringToUint8Array\n   * @public\n   * @function\n   * @param {string} BinaryString with ImageData\n   * @returns {Uint8Array}\n   */\n  var binaryStringToUint8Array = (jsPDFAPI.__addimage__.binaryStringToUint8Array = function(\n    binary_string\n  ) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  });\n\n  /**\n   * Convert the Buffer to a Binary String\n   *\n   * @name arrayBufferToBinaryString\n   * @public\n   * @function\n   * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData\n   *\n   * @returns {String}\n   */\n  var arrayBufferToBinaryString = (jsPDFAPI.__addimage__.arrayBufferToBinaryString = function(\n    buffer\n  ) {\n    var out = \"\";\n    // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.\n    // Do not copy the array if input is already an array.\n    var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);\n    for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {\n      // Limit the amount of characters being parsed to prevent overflow.\n      // Note that while TextDecoder would be faster, it does not have the same\n      // functionality as fromCharCode with any provided encodings as of 3/2021.\n      out += String.fromCharCode.apply(\n        null,\n        buf.subarray(i, i + ARRAY_APPLY_BATCH)\n      );\n    }\n    return out;\n  });\n\n  /**\n   * Possible parameter for addImage, an RGBA buffer with size.\n   *\n   * @typedef {Object} RGBAData\n   * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.\n   * @property {number} width - Image width as the data does not carry this information in itself.\n   * @property {number} height - Image height as the data does not carry this information in itself.\n   */\n\n  /**\n   * Adds an Image to the PDF.\n   *\n   * @name addImage\n   * @public\n   * @function\n   * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).\n   * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'\n   * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width width of the image (in units declared at inception of PDF document)\n   * @param {number} height height of the Image (in units declared at inception of PDF document)\n   * @param {string} alias alias of the image (if used multiple times)\n   * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF\n   */\n  jsPDFAPI.addImage = function() {\n    var imageData, format, x, y, w, h, alias, compression, rotation;\n\n    imageData = arguments[0];\n    if (typeof arguments[1] === \"number\") {\n      format = UNKNOWN;\n      x = arguments[1];\n      y = arguments[2];\n      w = arguments[3];\n      h = arguments[4];\n      alias = arguments[5];\n      compression = arguments[6];\n      rotation = arguments[7];\n    } else {\n      format = arguments[1];\n      x = arguments[2];\n      y = arguments[3];\n      w = arguments[4];\n      h = arguments[5];\n      alias = arguments[6];\n      compression = arguments[7];\n      rotation = arguments[8];\n    }\n\n    if (\n      typeof imageData === \"object\" &&\n      !isDOMElement(imageData) &&\n      \"imageData\" in imageData\n    ) {\n      var options = imageData;\n\n      imageData = options.imageData;\n      format = options.format || format || UNKNOWN;\n      x = options.x || x || 0;\n      y = options.y || y || 0;\n      w = options.w || options.width || w;\n      h = options.h || options.height || h;\n      alias = options.alias || alias;\n      compression = options.compression || compression;\n      rotation = options.rotation || options.angle || rotation;\n    }\n\n    //If compression is not explicitly set, determine if we should use compression\n    var filter = this.internal.getFilters();\n    if (compression === undefined && filter.indexOf(\"FlateEncode\") !== -1) {\n      compression = \"SLOW\";\n    }\n\n    if (isNaN(x) || isNaN(y)) {\n      throw new Error(\"Invalid coordinates passed to jsPDF.addImage\");\n    }\n\n    initialize.call(this);\n\n    var image = processImageData.call(\n      this,\n      imageData,\n      format,\n      alias,\n      compression\n    );\n\n    writeImageToPDF.call(this, x, y, w, h, image, rotation);\n\n    return this;\n  };\n\n  var processImageData = function(imageData, format, alias, compression) {\n    var result, dataAsBinaryString;\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      imageData = unescape(imageData);\n      var tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData !== \"\") {\n        imageData = tmpImageData;\n      } else {\n        tmpImageData = jsPDFAPI.loadFile(imageData, true);\n        if (tmpImageData !== undefined) {\n          imageData = tmpImageData;\n        }\n      }\n    }\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData, format);\n    }\n\n    format = getImageFileTypeByImageData(imageData, format);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    // now do the heavy lifting\n\n    if (notDefined(alias)) {\n      alias = generateAliasFromImageData(imageData);\n    }\n    result = checkImagesForAlias.call(this, alias);\n\n    if (!result) {\n      if (supportsArrayBuffer()) {\n        // no need to convert if imageData is already uint8array\n        if (!(imageData instanceof Uint8Array) && format !== \"RGBA\") {\n          dataAsBinaryString = imageData;\n          imageData = binaryStringToUint8Array(imageData);\n        }\n      }\n\n      result = this[\"process\" + format.toUpperCase()](\n        imageData,\n        getImageIndex.call(this),\n        alias,\n        checkCompressValue(compression),\n        dataAsBinaryString\n      );\n    }\n\n    if (!result) {\n      throw new Error(\"An unknown error occurred whilst processing the image.\");\n    }\n    return result;\n  };\n\n  /**\n   * @name convertBase64ToBinaryString\n   * @function\n   * @param {string} stringData\n   * @returns {string} binary string\n   */\n  var convertBase64ToBinaryString = (jsPDFAPI.__addimage__.convertBase64ToBinaryString = function(\n    stringData,\n    throwError\n  ) {\n    throwError = typeof throwError === \"boolean\" ? throwError : true;\n    var base64Info;\n    var imageData = \"\";\n    var rawData;\n\n    if (typeof stringData === \"string\") {\n      base64Info = extractImageFromDataUrl(stringData);\n      rawData = base64Info !== null ? base64Info.data : stringData;\n\n      try {\n        imageData = atob(rawData);\n      } catch (e) {\n        if (throwError) {\n          if (!validateStringAsBase64(rawData)) {\n            throw new Error(\n              \"Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString \"\n            );\n          } else {\n            throw new Error(\n              \"atob-Error in jsPDF.convertBase64ToBinaryString \" + e.message\n            );\n          }\n        }\n      }\n    }\n    return imageData;\n  });\n\n  /**\n   * @name getImageProperties\n   * @function\n   * @param {Object} imageData\n   * @returns {Object}\n   */\n  jsPDFAPI.getImageProperties = function(imageData) {\n    var image;\n    var tmpImageData = \"\";\n    var format;\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData);\n    }\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData === \"\") {\n        tmpImageData = jsPDFAPI.loadFile(imageData) || \"\";\n      }\n      imageData = tmpImageData;\n    }\n\n    format = getImageFileTypeByImageData(imageData);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {\n      imageData = binaryStringToUint8Array(imageData);\n    }\n\n    image = this[\"process\" + format.toUpperCase()](imageData);\n\n    if (!image) {\n      throw new Error(\"An unknown error occurred whilst processing the image\");\n    }\n\n    image.fileType = format;\n\n    return image;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF Annotations PlugIn\n *\n * There are many types of annotations in a PDF document. Annotations are placed\n * on a page at a particular location. They are not 'attached' to an object.\n * <br />\n * This plugin current supports <br />\n * <li> Goto Page (set pageNumber and top in options)\n * <li> Goto Name (set name and top in options)\n * <li> Goto URL (set url in options)\n * <p>\n * \tThe destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below)\n *  (set magFactor in options).  XYZ is the default.\n * </p>\n * <p>\n *  Links, Text, Popup, and FreeText are supported.\n * </p>\n * <p>\n * Options In PDF spec Not Implemented Yet\n * <li> link border\n * <li> named target\n * <li> page coordinates\n * <li> destination page scaling and layout\n * <li> actions other than URL and GotoPage\n * <li> background / hover actions\n * </p>\n * @name annotations\n * @module\n */\n\n/*\n    Destination Magnification Factors\n    See PDF 1.3 Page 386 for meanings and options\n\n    [supported]\n\tXYZ (options; left top zoom)\n\tFit (no options)\n\tFitH (options: top)\n\tFitV (options: left)\n\n\t[not supported]\n\tFitR\n\tFitB\n\tFitBH\n\tFitBV\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var notEmpty = function(obj) {\n    if (typeof obj != \"undefined\") {\n      if (obj != \"\") {\n        return true;\n      }\n    }\n  };\n\n  jsPDF.API.events.push([\n    \"addPage\",\n    function(addPageData) {\n      var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);\n      pageInfo.pageContext.annotations = [];\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putPage\",\n    function(putPageData) {\n      var getHorizontalCoordinateString = this.internal.getCoordinateString;\n      var getVerticalCoordinateString = this.internal\n        .getVerticalCoordinateString;\n      var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);\n      var pageAnnos = putPageData.pageContext.annotations;\n\n      var anno, rect, line;\n      var found = false;\n      for (var a = 0; a < pageAnnos.length && !found; a++) {\n        anno = pageAnnos[a];\n        switch (anno.type) {\n          case \"link\":\n            if (\n              notEmpty(anno.options.url) ||\n              notEmpty(anno.options.pageNumber)\n            ) {\n              found = true;\n            }\n            break;\n          case \"reference\":\n          case \"text\":\n          case \"freetext\":\n            found = true;\n            break;\n        }\n      }\n      if (found == false) {\n        return;\n      }\n\n      this.internal.write(\"/Annots [\");\n      for (var i = 0; i < pageAnnos.length; i++) {\n        anno = pageAnnos[i];\n        var escape = this.internal.pdfEscape;\n        var encryptor = this.internal.getEncryptor(putPageData.objId);\n\n        switch (anno.type) {\n          case \"reference\":\n            // References to Widget Annotations (for AcroForm Fields)\n            this.internal.write(\" \" + anno.object.objId + \" 0 R \");\n            break;\n          case \"text\":\n            // Create a an object for both the text and the popup\n            var objText = this.internal.newAdditionalObject();\n            var objPopup = this.internal.newAdditionalObject();\n            var encryptorText = this.internal.getEncryptor(objText.objId);\n\n            var title = anno.title || \"Note\";\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Text\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptorText(anno.contents)) +\n              \")\";\n            line += \" /Popup \" + objPopup.objId + \" 0 R\";\n            line += \" /P \" + pageInfo.objId + \" 0 R\";\n            line += \" /T (\" + escape(encryptorText(title)) + \") >>\";\n            objText.content = line;\n\n            var parent = objText.objId + \" 0 R\";\n            var popoff = 30;\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x + popoff) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(\n                anno.bounds.x + anno.bounds.w + popoff\n              ) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Popup\" +\n              \" \" +\n              rect +\n              \" /Parent \" +\n              parent;\n            if (anno.open) {\n              line += \" /Open true\";\n            }\n            line += \" >>\";\n            objPopup.content = line;\n\n            this.internal.write(objText.objId, \"0 R\", objPopup.objId, \"0 R\");\n\n            break;\n          case \"freetext\":\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \"] \";\n            var color = anno.color || \"#000000\";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"FreeText\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptor(anno.contents)) +\n              \")\";\n            line +=\n              \" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#\" +\n              color +\n              \")\";\n            line += \" /Border [0 0 0]\";\n            line += \" >>\";\n            this.internal.write(line);\n            break;\n          case \"link\":\n            if (anno.options.name) {\n              var loc = this.annotations._nameMap[anno.options.name];\n              anno.options.pageNumber = loc.page;\n              anno.options.top = loc.y;\n            } else {\n              if (!anno.options.top) {\n                anno.options.top = 0;\n              }\n            }\n\n            rect =\n              \"/Rect [\" +\n              anno.finalBounds.x +\n              \" \" +\n              anno.finalBounds.y +\n              \" \" +\n              anno.finalBounds.w +\n              \" \" +\n              anno.finalBounds.h +\n              \"] \";\n\n            line = \"\";\n            if (anno.options.url) {\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /A <</S /URI /URI (\" +\n                escape(encryptor(anno.options.url)) +\n                \") >>\";\n            } else if (anno.options.pageNumber) {\n              // first page is 0\n              var info = this.internal.getPageInfo(anno.options.pageNumber);\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /Dest [\" +\n                info.objId +\n                \" 0 R\";\n              anno.options.magFactor = anno.options.magFactor || \"XYZ\";\n              switch (anno.options.magFactor) {\n                case \"Fit\":\n                  line += \" /Fit]\";\n                  break;\n                case \"FitH\":\n                  line += \" /FitH \" + anno.options.top + \"]\";\n                  break;\n                case \"FitV\":\n                  anno.options.left = anno.options.left || 0;\n                  line += \" /FitV \" + anno.options.left + \"]\";\n                  break;\n                case \"XYZ\":\n                default:\n                  var top = getVerticalCoordinateString(anno.options.top);\n                  anno.options.left = anno.options.left || 0;\n                  // 0 or null zoom will not change zoom factor\n                  if (typeof anno.options.zoom === \"undefined\") {\n                    anno.options.zoom = 0;\n                  }\n                  line +=\n                    \" /XYZ \" +\n                    anno.options.left +\n                    \" \" +\n                    top +\n                    \" \" +\n                    anno.options.zoom +\n                    \"]\";\n                  break;\n              }\n            }\n\n            if (line != \"\") {\n              line += \" >>\";\n              this.internal.write(line);\n            }\n            break;\n        }\n      }\n      this.internal.write(\"]\");\n    }\n  ]);\n\n  /**\n   * @name createAnnotation\n   * @function\n   * @param {Object} options\n   */\n  jsPDFAPI.createAnnotation = function(options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    switch (options.type) {\n      case \"link\":\n        this.link(\n          options.bounds.x,\n          options.bounds.y,\n          options.bounds.w,\n          options.bounds.h,\n          options\n        );\n        break;\n      case \"text\":\n      case \"freetext\":\n        pageInfo.pageContext.annotations.push(options);\n        break;\n    }\n  };\n\n  /**\n   * Create a link\n   *\n   * valid options\n   * <li> pageNumber or url [required]\n   * <p>If pageNumber is specified, top and zoom may also be specified</p>\n   * @name link\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} w\n   * @param {number} h\n   * @param {Object} options\n   */\n  jsPDFAPI.link = function(x, y, w, h, options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    var getHorizontalCoordinateString = this.internal.getCoordinateString;\n    var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\n\n    pageInfo.pageContext.annotations.push({\n      finalBounds: {\n        x: getHorizontalCoordinateString(x),\n        y: getVerticalCoordinateString(y),\n        w: getHorizontalCoordinateString(x + w),\n        h: getVerticalCoordinateString(y + h)\n      },\n      options: options,\n      type: \"link\"\n    });\n  };\n\n  /**\n   * Currently only supports single line text.\n   * Returns the width of the text/link\n   *\n   * @name textWithLink\n   * @function\n   * @param {string} text\n   * @param {number} x\n   * @param {number} y\n   * @param {Object} options\n   * @returns {number} width the width of the text/link\n   */\n  jsPDFAPI.textWithLink = function(text, x, y, options) {\n    var totalLineWidth = this.getTextWidth(text);\n    var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;\n    var linkHeight, linkWidth;\n\n    // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line\n    if (options.maxWidth !== undefined) {\n      var { maxWidth } = options;\n      linkWidth = maxWidth;\n      var numOfLines = this.splitTextToSize(text, linkWidth).length;\n      linkHeight = Math.ceil(lineHeight * numOfLines);\n    } else {\n      linkWidth = totalLineWidth;\n      linkHeight = lineHeight;\n    }\n\n    this.text(text, x, y, options);\n\n    //TODO We really need the text baseline height to do this correctly.\n    // Or ability to draw text on top, bottom, center, or baseline.\n    y += lineHeight * 0.2;\n    //handle x position based on the align option\n    if (options.align === \"center\") {\n      x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width\n    }\n    if (options.align === \"right\") {\n      x = x - totalLineWidth;\n    }\n    this.link(x, y - lineHeight, linkWidth, linkHeight, options);\n    return totalLineWidth;\n  };\n\n  //TODO move into external library\n  /**\n   * @name getTextWidth\n   * @function\n   * @param {string} text\n   * @returns {number} txtWidth\n   */\n  jsPDFAPI.getTextWidth = function(text) {\n    var fontSize = this.internal.getFontSize();\n    var txtWidth =\n      (this.getStringUnitWidth(text) * fontSize) / this.internal.scaleFactor;\n    return txtWidth;\n  };\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF arabic parser PlugIn\n *\n * @name arabic\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Arabic shape substitutions: char code => (isolated, final, initial, medial).\n   * Arabic Substition A\n   */\n  var arabicSubstitionA = {\n    0x0621: [0xfe80], // ARABIC LETTER HAMZA\n    0x0622: [0xfe81, 0xfe82], // ARABIC LETTER ALEF WITH MADDA ABOVE\n    0x0623: [0xfe83, 0xfe84], // ARABIC LETTER ALEF WITH HAMZA ABOVE\n    0x0624: [0xfe85, 0xfe86], // ARABIC LETTER WAW WITH HAMZA ABOVE\n    0x0625: [0xfe87, 0xfe88], // ARABIC LETTER ALEF WITH HAMZA BELOW\n    0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c], // ARABIC LETTER YEH WITH HAMZA ABOVE\n    0x0627: [0xfe8d, 0xfe8e], // ARABIC LETTER ALEF\n    0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92], // ARABIC LETTER BEH\n    0x0629: [0xfe93, 0xfe94], // ARABIC LETTER TEH MARBUTA\n    0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98], // ARABIC LETTER TEH\n    0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c], // ARABIC LETTER THEH\n    0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0], // ARABIC LETTER JEEM\n    0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4], // ARABIC LETTER HAH\n    0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8], // ARABIC LETTER KHAH\n    0x062f: [0xfea9, 0xfeaa], // ARABIC LETTER DAL\n    0x0630: [0xfeab, 0xfeac], // ARABIC LETTER THAL\n    0x0631: [0xfead, 0xfeae], // ARABIC LETTER REH\n    0x0632: [0xfeaf, 0xfeb0], // ARABIC LETTER ZAIN\n    0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4], // ARABIC LETTER SEEN\n    0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8], // ARABIC LETTER SHEEN\n    0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc], // ARABIC LETTER SAD\n    0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0], // ARABIC LETTER DAD\n    0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4], // ARABIC LETTER TAH\n    0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8], // ARABIC LETTER ZAH\n    0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc], // ARABIC LETTER AIN\n    0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0], // ARABIC LETTER GHAIN\n    0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4], // ARABIC LETTER FEH\n    0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8], // ARABIC LETTER QAF\n    0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc], // ARABIC LETTER KAF\n    0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0], // ARABIC LETTER LAM\n    0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], // ARABIC LETTER MEEM\n    0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], // ARABIC LETTER NOON\n    0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], // ARABIC LETTER HEH\n    0x0648: [0xfeed, 0xfeee], // ARABIC LETTER WAW\n    0x0649: [0xfeef, 0xfef0, 64488, 64489], // ARABIC LETTER ALEF MAKSURA\n    0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], // ARABIC LETTER YEH\n    0x0671: [0xfb50, 0xfb51], // ARABIC LETTER ALEF WASLA\n    0x0677: [0xfbdd], // ARABIC LETTER U WITH HAMZA ABOVE\n    0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], // ARABIC LETTER TTEH\n    0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], // ARABIC LETTER TTEHEH\n    0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], // ARABIC LETTER BEEH\n    0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], // ARABIC LETTER PEH\n    0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], // ARABIC LETTER TEHEH\n    0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], // ARABIC LETTER BEHEH\n    0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], // ARABIC LETTER NYEH\n    0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], // ARABIC LETTER DYEH\n    0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], // ARABIC LETTER TCHEH\n    0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], // ARABIC LETTER TCHEHEH\n    0x0688: [0xfb88, 0xfb89], // ARABIC LETTER DDAL\n    0x068c: [0xfb84, 0xfb85], // ARABIC LETTER DAHAL\n    0x068d: [0xfb82, 0xfb83], // ARABIC LETTER DDAHAL\n    0x068e: [0xfb86, 0xfb87], // ARABIC LETTER DUL\n    0x0691: [0xfb8c, 0xfb8d], // ARABIC LETTER RREH\n    0x0698: [0xfb8a, 0xfb8b], // ARABIC LETTER JEH\n    0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], // ARABIC LETTER VEH\n    0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], // ARABIC LETTER PEHEH\n    0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], // ARABIC LETTER KEHEH\n    0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], // ARABIC LETTER NG\n    0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], // ARABIC LETTER GAF\n    0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d], // ARABIC LETTER NGOEH\n    0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99], // ARABIC LETTER GUEH\n    0x06ba: [0xfb9e, 0xfb9f], // ARABIC LETTER NOON GHUNNA\n    0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3], // ARABIC LETTER RNOON\n    0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad], // ARABIC LETTER HEH DOACHASHMEE\n    0x06c0: [0xfba4, 0xfba5], // ARABIC LETTER HEH WITH YEH ABOVE\n    0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9], // ARABIC LETTER HEH GOAL\n    0x06c5: [0xfbe0, 0xfbe1], // ARABIC LETTER KIRGHIZ OE\n    0x06c6: [0xfbd9, 0xfbda], // ARABIC LETTER OE\n    0x06c7: [0xfbd7, 0xfbd8], // ARABIC LETTER U\n    0x06c8: [0xfbdb, 0xfbdc], // ARABIC LETTER YU\n    0x06c9: [0xfbe2, 0xfbe3], // ARABIC LETTER KIRGHIZ YU\n    0x06cb: [0xfbde, 0xfbdf], // ARABIC LETTER VE\n    0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff], // ARABIC LETTER FARSI YEH\n    0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7], //ARABIC LETTER E\n    0x06d2: [0xfbae, 0xfbaf], // ARABIC LETTER YEH BARREE\n    0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE\n  };\n\n  /*\n    var ligaturesSubstitutionA = {\n        0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM\n    };\n    */\n\n  var ligatures = {\n    0xfedf: {\n      0xfe82: 0xfef5, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM\n      0xfe84: 0xfef7, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM\n      0xfe88: 0xfef9, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM\n      0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM\n    },\n    0xfee0: {\n      0xfe82: 0xfef6, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM\n      0xfe84: 0xfef8, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM\n      0xfe88: 0xfefa, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM\n      0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM\n    },\n    0xfe8d: { 0xfedf: { 0xfee0: { 0xfeea: 0xfdf2 } } }, // ALLAH\n    0x0651: {\n      0x064c: 0xfc5e, // Shadda + Dammatan\n      0x064d: 0xfc5f, // Shadda + Kasratan\n      0x064e: 0xfc60, // Shadda + Fatha\n      0x064f: 0xfc61, // Shadda + Damma\n      0x0650: 0xfc62 // Shadda + Kasra\n    }\n  };\n\n  var arabic_diacritics = {\n    1612: 64606, // Shadda + Dammatan\n    1613: 64607, // Shadda + Kasratan\n    1614: 64608, // Shadda + Fatha\n    1615: 64609, // Shadda + Damma\n    1616: 64610 // Shadda + Kasra\n  };\n\n  var alfletter = [1570, 1571, 1573, 1575];\n\n  var noChangeInForm = -1;\n  var isolatedForm = 0;\n  var finalForm = 1;\n  var initialForm = 2;\n  var medialForm = 3;\n\n  jsPDFAPI.__arabicParser__ = {};\n\n  //private\n  var isInArabicSubstitutionA = (jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function(\n    letter\n  ) {\n    return typeof arabicSubstitionA[letter.charCodeAt(0)] !== \"undefined\";\n  });\n\n  var isArabicLetter = (jsPDFAPI.__arabicParser__.isArabicLetter = function(\n    letter\n  ) {\n    return (\n      typeof letter === \"string\" &&\n      /^[\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF\\uFB50-\\uFDFF\\uFE70-\\uFEFF]+$/.test(\n        letter\n      )\n    );\n  });\n\n  var isArabicEndLetter = (jsPDFAPI.__arabicParser__.isArabicEndLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length <= 2\n    );\n  });\n\n  var isArabicAlfLetter = (jsPDFAPI.__arabicParser__.isArabicAlfLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 1\n    );\n  };\n\n  var arabicLetterHasFinalForm = (jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 2\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 3\n    );\n  };\n\n  var arabicLetterHasMedialForm = (jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length == 4\n    );\n  });\n\n  var resolveLigatures = (jsPDFAPI.__arabicParser__.resolveLigatures = function(\n    letters\n  ) {\n    var i = 0;\n    var tmpLigatures = ligatures;\n    var result = \"\";\n    var effectedLetters = 0;\n\n    for (i = 0; i < letters.length; i += 1) {\n      if (typeof tmpLigatures[letters.charCodeAt(i)] !== \"undefined\") {\n        effectedLetters++;\n        tmpLigatures = tmpLigatures[letters.charCodeAt(i)];\n\n        if (typeof tmpLigatures === \"number\") {\n          result += String.fromCharCode(tmpLigatures);\n          tmpLigatures = ligatures;\n          effectedLetters = 0;\n        }\n        if (i === letters.length - 1) {\n          tmpLigatures = ligatures;\n          result += letters.charAt(i - (effectedLetters - 1));\n          i = i - (effectedLetters - 1);\n          effectedLetters = 0;\n        }\n      } else {\n        tmpLigatures = ligatures;\n        result += letters.charAt(i - effectedLetters);\n        i = i - effectedLetters;\n        effectedLetters = 0;\n      }\n    }\n\n    return result;\n  });\n\n  jsPDFAPI.__arabicParser__.isArabicDiacritic = function(letter) {\n    return (\n      letter !== undefined &&\n      arabic_diacritics[letter.charCodeAt(0)] !== undefined\n    );\n  };\n\n  var getCorrectForm = (jsPDFAPI.__arabicParser__.getCorrectForm = function(\n    currentChar,\n    beforeChar,\n    nextChar\n  ) {\n    if (!isArabicLetter(currentChar)) {\n      return -1;\n    }\n\n    if (isInArabicSubstitutionA(currentChar) === false) {\n      return noChangeInForm;\n    }\n    if (\n      !arabicLetterHasFinalForm(currentChar) ||\n      (!isArabicLetter(beforeChar) && !isArabicLetter(nextChar)) ||\n      (!isArabicLetter(nextChar) && isArabicEndLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar))\n    ) {\n      return isolatedForm;\n    }\n\n    if (\n      arabicLetterHasMedialForm(currentChar) &&\n      isArabicLetter(beforeChar) &&\n      !isArabicEndLetter(beforeChar) &&\n      isArabicLetter(nextChar) &&\n      arabicLetterHasFinalForm(nextChar)\n    ) {\n      return medialForm;\n    }\n\n    if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {\n      return finalForm;\n    }\n    return initialForm;\n  });\n\n  /**\n   * @name processArabic\n   * @function\n   * @param {string} text\n   * @returns {string}\n   */\n  var parseArabic = function(text) {\n    text = text || \"\";\n\n    var result = \"\";\n    var i = 0;\n    var j = 0;\n    var position = 0;\n    var currentLetter = \"\";\n    var prevLetter = \"\";\n    var nextLetter = \"\";\n\n    var words = text.split(\"\\\\s+\");\n    var newWords = [];\n    for (i = 0; i < words.length; i += 1) {\n      newWords.push(\"\");\n      for (j = 0; j < words[i].length; j += 1) {\n        currentLetter = words[i][j];\n        prevLetter = words[i][j - 1];\n        nextLetter = words[i][j + 1];\n        if (isArabicLetter(currentLetter)) {\n          position = getCorrectForm(currentLetter, prevLetter, nextLetter);\n          if (position !== -1) {\n            newWords[i] += String.fromCharCode(\n              arabicSubstitionA[currentLetter.charCodeAt(0)][position]\n            );\n          } else {\n            newWords[i] += currentLetter;\n          }\n        } else {\n          newWords[i] += currentLetter;\n        }\n      }\n\n      newWords[i] = resolveLigatures(newWords[i]);\n    }\n    result = newWords.join(\" \");\n\n    return result;\n  };\n\n  var processArabic = (jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function() {\n    var text =\n      typeof arguments[0] === \"string\" ? arguments[0] : arguments[0].text;\n    var tmpText = [];\n    var result;\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);\n        } else {\n          tmpText.push([parseArabic(text[i])]);\n        }\n      }\n      result = tmpText;\n    } else {\n      result = parseArabic(text);\n    }\n    if (typeof arguments[0] === \"string\") {\n      return result;\n    } else {\n      arguments[0].text = result;\n      return arguments[0];\n    }\n  });\n\n  jsPDFAPI.events.push([\"preProcessText\", processArabic]);\n})(jsPDF.API);\n","/** @license\n * jsPDF Autoprint Plugin\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name autoprint\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.\n   *\n   * @name autoPrint\n   * @function\n   * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF();\n   * doc.text(10, 10, 'This is a test');\n   * doc.autoPrint({variant: 'non-conform'});\n   * doc.save('autoprint.pdf');\n   */\n  jsPDFAPI.autoPrint = function(options) {\n    \"use strict\";\n    var refAutoPrintTag;\n    options = options || {};\n    options.variant = options.variant || \"non-conform\";\n\n    switch (options.variant) {\n      case \"javascript\":\n        //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb\n        this.addJS(\"print({});\");\n        break;\n      case \"non-conform\":\n      default:\n        this.internal.events.subscribe(\"postPutResources\", function() {\n          refAutoPrintTag = this.internal.newObject();\n          this.internal.out(\"<<\");\n          this.internal.out(\"/S /Named\");\n          this.internal.out(\"/Type /Action\");\n          this.internal.out(\"/N /Print\");\n          this.internal.out(\">>\");\n          this.internal.out(\"endobj\");\n        });\n\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.out(\"/OpenAction \" + refAutoPrintTag + \" 0 R\");\n        });\n        break;\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Canvas PlugIn\n * This plugin mimics the HTML5 Canvas\n *\n * The goal is to provide a way for current canvas users to print directly to a PDF.\n * @name canvas\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @class Canvas\n   * @classdesc A Canvas Wrapper for jsPDF\n   */\n  var Canvas = function() {\n    var jsPdfInstance = undefined;\n    Object.defineProperty(this, \"pdf\", {\n      get: function() {\n        return jsPdfInstance;\n      },\n      set: function(value) {\n        jsPdfInstance = value;\n      }\n    });\n\n    var _width = 150;\n    /**\n     * The height property is a positive integer reflecting the height HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.\n     * This is one of the two properties, the other being width, that controls the size of the canvas.\n     *\n     * @name width\n     */\n    Object.defineProperty(this, \"width\", {\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _width = 150;\n        } else {\n          _width = value;\n        }\n        if (this.getContext(\"2d\").pageWrapXEnabled) {\n          this.getContext(\"2d\").pageWrapX = _width + 1;\n        }\n      }\n    });\n\n    var _height = 300;\n    /**\n     * The width property is a positive integer reflecting the width HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.\n     * This is one of the two properties, the other being height, that controls the size of the canvas.\n     *\n     * @name height\n     */\n    Object.defineProperty(this, \"height\", {\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _height = 300;\n        } else {\n          _height = value;\n        }\n        if (this.getContext(\"2d\").pageWrapYEnabled) {\n          this.getContext(\"2d\").pageWrapY = _height + 1;\n        }\n      }\n    });\n\n    var _childNodes = [];\n    Object.defineProperty(this, \"childNodes\", {\n      get: function() {\n        return _childNodes;\n      },\n      set: function(value) {\n        _childNodes = value;\n      }\n    });\n\n    var _style = {};\n    Object.defineProperty(this, \"style\", {\n      get: function() {\n        return _style;\n      },\n      set: function(value) {\n        _style = value;\n      }\n    });\n\n    Object.defineProperty(this, \"parentNode\", {});\n  };\n\n  /**\n   * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\n   *\n   * @name getContext\n   * @function\n   * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is \"2d\", leading to the creation of a Context2D object representing a two-dimensional rendering context.\n   * @param {object} contextAttributes\n   */\n  Canvas.prototype.getContext = function(contextType, contextAttributes) {\n    contextType = contextType || \"2d\";\n    var key;\n\n    if (contextType !== \"2d\") {\n      return null;\n    }\n    for (key in contextAttributes) {\n      if (this.pdf.context2d.hasOwnProperty(key)) {\n        this.pdf.context2d[key] = contextAttributes[key];\n      }\n    }\n    this.pdf.context2d._canvas = this;\n    return this.pdf.context2d;\n  };\n\n  /**\n   * The toDataURL() method is just a stub to throw an error if accidently called.\n   *\n   * @name toDataURL\n   * @function\n   */\n  Canvas.prototype.toDataURL = function() {\n    throw new Error(\"toDataURL is not implemented.\");\n  };\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      this.canvas = new Canvas();\n      this.canvas.pdf = this;\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *               2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *               2013 Lee Driscoll, https://github.com/lsdriscoll\n *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n *               2014 James Hall, james@parall.ax\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name cell\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var NO_MARGINS = { left: 0, top: 0, bottom: 0, right: 0 };\n\n  var px2pt = (0.264583 * 72) / 25.4;\n  var printingHeaderRow = false;\n\n  var _initialize = function() {\n    if (typeof this.internal.__cell__ === \"undefined\") {\n      this.internal.__cell__ = {};\n      this.internal.__cell__.padding = 3;\n      this.internal.__cell__.headerFunction = undefined;\n      this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);\n      this.internal.__cell__.margins.width = this.getPageWidth();\n      _reset.call(this);\n    }\n  };\n\n  var _reset = function() {\n    this.internal.__cell__.lastCell = new Cell();\n    this.internal.__cell__.pages = 1;\n  };\n\n  var Cell = function() {\n    var _x = arguments[0];\n    Object.defineProperty(this, \"x\", {\n      enumerable: true,\n      get: function() {\n        return _x;\n      },\n      set: function(value) {\n        _x = value;\n      }\n    });\n    var _y = arguments[1];\n    Object.defineProperty(this, \"y\", {\n      enumerable: true,\n      get: function() {\n        return _y;\n      },\n      set: function(value) {\n        _y = value;\n      }\n    });\n    var _width = arguments[2];\n    Object.defineProperty(this, \"width\", {\n      enumerable: true,\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        _width = value;\n      }\n    });\n    var _height = arguments[3];\n    Object.defineProperty(this, \"height\", {\n      enumerable: true,\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        _height = value;\n      }\n    });\n    var _text = arguments[4];\n    Object.defineProperty(this, \"text\", {\n      enumerable: true,\n      get: function() {\n        return _text;\n      },\n      set: function(value) {\n        _text = value;\n      }\n    });\n    var _lineNumber = arguments[5];\n    Object.defineProperty(this, \"lineNumber\", {\n      enumerable: true,\n      get: function() {\n        return _lineNumber;\n      },\n      set: function(value) {\n        _lineNumber = value;\n      }\n    });\n    var _align = arguments[6];\n    Object.defineProperty(this, \"align\", {\n      enumerable: true,\n      get: function() {\n        return _align;\n      },\n      set: function(value) {\n        _align = value;\n      }\n    });\n\n    return this;\n  };\n\n  Cell.prototype.clone = function() {\n    return new Cell(\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    );\n  };\n\n  Cell.prototype.toArray = function() {\n    return [\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    ];\n  };\n\n  /**\n   * @name setHeaderFunction\n   * @function\n   * @param {function} func\n   */\n  jsPDFAPI.setHeaderFunction = function(func) {\n    _initialize.call(this);\n    this.internal.__cell__.headerFunction =\n      typeof func === \"function\" ? func : undefined;\n    return this;\n  };\n\n  /**\n   * @name getTextDimensions\n   * @function\n   * @param {string} txt\n   * @returns {Object} dimensions\n   */\n  jsPDFAPI.getTextDimensions = function(text, options) {\n    _initialize.call(this);\n    options = options || {};\n    var fontSize = options.fontSize || this.getFontSize();\n    var font = options.font || this.getFont();\n    var scaleFactor = options.scaleFactor || this.internal.scaleFactor;\n    var width = 0;\n    var amountOfLines = 0;\n    var height = 0;\n    var tempWidth = 0;\n    var scope = this;\n\n    if (!Array.isArray(text) && typeof text !== \"string\") {\n      if (typeof text === \"number\") {\n        text = String(text);\n      } else {\n        throw new Error(\n          \"getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.\"\n        );\n      }\n    }\n\n    const maxWidth = options.maxWidth;\n    if (maxWidth > 0) {\n      if (typeof text === \"string\") {\n        text = this.splitTextToSize(text, maxWidth);\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\n        text = text.reduce(function(acc, textLine) {\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\n        }, []);\n      }\n    } else {\n      // Without the else clause, it will not work if you do not pass along maxWidth\n      text = Array.isArray(text) ? text : [text];\n    }\n\n    for (var i = 0; i < text.length; i++) {\n      tempWidth = this.getStringUnitWidth(text[i], { font: font }) * fontSize;\n      if (width < tempWidth) {\n        width = tempWidth;\n      }\n    }\n\n    if (width !== 0) {\n      amountOfLines = text.length;\n    }\n\n    width = width / scaleFactor;\n    height = Math.max(\n      (amountOfLines * fontSize * this.getLineHeightFactor() -\n        fontSize * (this.getLineHeightFactor() - 1)) /\n        scaleFactor,\n      0\n    );\n    return { w: width, h: height };\n  };\n\n  /**\n   * @name cellAddPage\n   * @function\n   */\n  jsPDFAPI.cellAddPage = function() {\n    _initialize.call(this);\n\n    this.addPage();\n\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    this.internal.__cell__.lastCell = new Cell(\n      margins.left,\n      margins.top,\n      undefined,\n      undefined\n    );\n    this.internal.__cell__.pages += 1;\n\n    return this;\n  };\n\n  /**\n   * @name cell\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} width\n   * @param {number} height\n   * @param {string} text\n   * @param {number} lineNumber lineNumber\n   * @param {string} align\n   * @return {jsPDF} jsPDF-instance\n   */\n  var cell = (jsPDFAPI.cell = function() {\n    var currentCell;\n\n    if (arguments[0] instanceof Cell) {\n      currentCell = arguments[0];\n    } else {\n      currentCell = new Cell(\n        arguments[0],\n        arguments[1],\n        arguments[2],\n        arguments[3],\n        arguments[4],\n        arguments[5]\n      );\n    }\n    _initialize.call(this);\n    var lastCell = this.internal.__cell__.lastCell;\n    var padding = this.internal.__cell__.padding;\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    var tableHeaderRow = this.internal.__cell__.tableHeaderRow;\n    var printHeaders = this.internal.__cell__.printHeaders;\n    // If this is not the first cell, we must change its position\n    if (typeof lastCell.lineNumber !== \"undefined\") {\n      if (lastCell.lineNumber === currentCell.lineNumber) {\n        //Same line\n        currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);\n        currentCell.y = lastCell.y || 0;\n      } else {\n        //New line\n        if (\n          lastCell.y + lastCell.height + currentCell.height + margins.bottom >\n          this.getPageHeight()\n        ) {\n          this.cellAddPage();\n          currentCell.y = margins.top;\n          if (printHeaders && tableHeaderRow) {\n            this.printHeaderRow(currentCell.lineNumber, true);\n            currentCell.y += tableHeaderRow[0].height;\n          }\n        } else {\n          currentCell.y = lastCell.y + lastCell.height || currentCell.y;\n        }\n      }\n    }\n\n    if (typeof currentCell.text[0] !== \"undefined\") {\n      this.rect(\n        currentCell.x,\n        currentCell.y,\n        currentCell.width,\n        currentCell.height,\n        printingHeaderRow === true ? \"FD\" : undefined\n      );\n      if (currentCell.align === \"right\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width - padding,\n          currentCell.y + padding,\n          { align: \"right\", baseline: \"top\" }\n        );\n      } else if (currentCell.align === \"center\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width / 2,\n          currentCell.y + padding,\n          {\n            align: \"center\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      } else {\n        this.text(\n          currentCell.text,\n          currentCell.x + padding,\n          currentCell.y + padding,\n          {\n            align: \"left\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      }\n    }\n    this.internal.__cell__.lastCell = currentCell;\n    return this;\n  });\n\n  /**\n     * Create a table from a set of data.\n     * @name table\n     * @function\n     * @param {Integer} [x] : left-position for top-left corner of table\n     * @param {Integer} [y] top-position for top-left corner of table\n     * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.\n     * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost\n\n     * @param {Object} [config.printHeaders] True to print column headers at the top of every page\n     * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value\n     * @param {Object} [config.margins] margin values for left, top, bottom, and width\n     * @param {Object} [config.fontSize] Integer fontSize to use (optional)\n     * @param {Object} [config.padding] cell-padding in pt to use (optional)\n     * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)\n     * @param {Object} [config.headerTextColor] default is #000 (optional)\n     * @param {Object} [config.rowStart] callback to handle before print each row (optional)\n     * @param {Object} [config.cellStart] callback to handle before print each cell (optional)\n     * @returns {jsPDF} jsPDF-instance\n     */\n\n  jsPDFAPI.table = function(x, y, data, headers, config) {\n    _initialize.call(this);\n    if (!data) {\n      throw new Error(\"No data for PDF table.\");\n    }\n\n    config = config || {};\n\n    var headerNames = [],\n      headerLabels = [],\n      headerAligns = [],\n      i,\n      columnMatrix = {},\n      columnWidths = {},\n      column,\n      columnMinWidths = [],\n      j,\n      tableHeaderConfigs = [],\n      //set up defaults. If a value is provided in config, defaults will be overwritten:\n      autoSize = config.autoSize || false,\n      printHeaders = config.printHeaders === false ? false : true,\n      fontSize =\n        config.css && typeof config.css[\"font-size\"] !== \"undefined\"\n          ? config.css[\"font-size\"] * 16\n          : config.fontSize || 12,\n      margins =\n        config.margins ||\n        Object.assign({ width: this.getPageWidth() }, NO_MARGINS),\n      padding = typeof config.padding === \"number\" ? config.padding : 3,\n      headerBackgroundColor = config.headerBackgroundColor || \"#c8c8c8\",\n      headerTextColor = config.headerTextColor || \"#000\";\n\n    _reset.call(this);\n\n    this.internal.__cell__.printHeaders = printHeaders;\n    this.internal.__cell__.margins = margins;\n    this.internal.__cell__.table_font_size = fontSize;\n    this.internal.__cell__.padding = padding;\n    this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;\n    this.internal.__cell__.headerTextColor = headerTextColor;\n    this.setFontSize(fontSize);\n\n    // Set header values\n    if (headers === undefined || headers === null) {\n      // No headers defined so we derive from data\n      headerNames = Object.keys(data[0]);\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    } else if (Array.isArray(headers) && typeof headers[0] === \"object\") {\n      headerNames = headers.map(function(header) {\n        return header.name;\n      });\n      headerLabels = headers.map(function(header) {\n        return header.prompt || header.name || \"\";\n      });\n      headerAligns = headers.map(function(header) {\n        return header.align || \"left\";\n      });\n      // Split header configs into names and prompts\n      for (i = 0; i < headers.length; i += 1) {\n        columnWidths[headers[i].name] = headers[i].width * px2pt;\n      }\n    } else if (Array.isArray(headers) && typeof headers[0] === \"string\") {\n      headerNames = headers;\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    }\n\n    if (\n      autoSize ||\n      (Array.isArray(headers) && typeof headers[0] === \"string\")\n    ) {\n      var headerName;\n      for (i = 0; i < headerNames.length; i += 1) {\n        headerName = headerNames[i];\n\n        // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}\n\n        columnMatrix[headerName] = data.map(function(rec) {\n          return rec[headerName];\n        });\n\n        // get header width\n        this.setFont(undefined, \"bold\");\n        columnMinWidths.push(\n          this.getTextDimensions(headerLabels[i], {\n            fontSize: this.internal.__cell__.table_font_size,\n            scaleFactor: this.internal.scaleFactor\n          }).w\n        );\n        column = columnMatrix[headerName];\n\n        // get cell widths\n        this.setFont(undefined, \"normal\");\n        for (j = 0; j < column.length; j += 1) {\n          columnMinWidths.push(\n            this.getTextDimensions(column[j], {\n              fontSize: this.internal.__cell__.table_font_size,\n              scaleFactor: this.internal.scaleFactor\n            }).w\n          );\n        }\n\n        // get final column width\n        columnWidths[headerName] =\n          Math.max.apply(null, columnMinWidths) + padding + padding;\n\n        //have to reset\n        columnMinWidths = [];\n      }\n    }\n\n    // -- Construct the table\n\n    if (printHeaders) {\n      var row = {};\n      for (i = 0; i < headerNames.length; i += 1) {\n        row[headerNames[i]] = {};\n        row[headerNames[i]].text = headerLabels[i];\n        row[headerNames[i]].align = headerAligns[i];\n      }\n\n      var rowHeight = calculateLineHeight.call(this, row, columnWidths);\n\n      // Construct the header row\n      tableHeaderConfigs = headerNames.map(function(value) {\n        return new Cell(\n          x,\n          y,\n          columnWidths[value],\n          rowHeight,\n          row[value].text,\n          undefined,\n          row[value].align\n        );\n      });\n\n      // Store the table header config\n      this.setTableHeaderRow(tableHeaderConfigs);\n\n      // Print the header for the start of the table\n      this.printHeaderRow(1, false);\n    }\n\n    // Construct the data rows\n\n    var align = headers.reduce(function(pv, cv) {\n      pv[cv.name] = cv.align;\n      return pv;\n    }, {});\n    for (i = 0; i < data.length; i += 1) {\n      if (\"rowStart\" in config && config.rowStart instanceof Function) {\n        config.rowStart(\n          {\n            row: i,\n            data: data[i]\n          },\n          this\n        );\n      }\n      var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);\n\n      for (j = 0; j < headerNames.length; j += 1) {\n        var cellData = data[i][headerNames[j]];\n        if (\"cellStart\" in config && config.cellStart instanceof Function) {\n          config.cellStart(\n            {\n              row: i,\n              col: j,\n              data: cellData\n            },\n            this\n          );\n        }\n        cell.call(\n          this,\n          new Cell(\n            x,\n            y,\n            columnWidths[headerNames[j]],\n            lineHeight,\n            cellData,\n            i + 2,\n            align[headerNames[j]]\n          )\n        );\n      }\n    }\n    this.internal.__cell__.table_x = x;\n    this.internal.__cell__.table_y = y;\n    return this;\n  };\n\n  /**\n   * Calculate the height for containing the highest column\n   *\n   * @name calculateLineHeight\n   * @function\n   * @param {Object[]} model is the line of data we want to calculate the height of\n   * @param {Integer[]} columnWidths is size of each column\n   * @returns {number} lineHeight\n   * @private\n   */\n  var calculateLineHeight = function calculateLineHeight(model, columnWidths) {\n    var padding = this.internal.__cell__.padding;\n    var fontSize = this.internal.__cell__.table_font_size;\n    var scaleFactor = this.internal.scaleFactor;\n\n    return Object.keys(model)\n      .map(function(key) {\n        var value = model[key];\n        return this.splitTextToSize(\n          value.hasOwnProperty(\"text\") ? value.text : value,\n          columnWidths[key] - padding - padding\n        );\n      }, this)\n      .map(function(value) {\n        return (\n          (this.getLineHeightFactor() * value.length * fontSize) / scaleFactor +\n          padding +\n          padding\n        );\n      }, this)\n      .reduce(function(pv, cv) {\n        return Math.max(pv, cv);\n      }, 0);\n  };\n\n  /**\n   * Store the config for outputting a table header\n   *\n   * @name setTableHeaderRow\n   * @function\n   * @param {Object[]} config\n   * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell\n   * except the lineNumber parameter is excluded\n   */\n  jsPDFAPI.setTableHeaderRow = function(config) {\n    _initialize.call(this);\n    this.internal.__cell__.tableHeaderRow = config;\n  };\n\n  /**\n   * Output the store header row\n   *\n   * @name printHeaderRow\n   * @function\n   * @param {number} lineNumber The line number to output the header at\n   * @param {boolean} new_page\n   */\n  jsPDFAPI.printHeaderRow = function(lineNumber, new_page) {\n    _initialize.call(this);\n    if (!this.internal.__cell__.tableHeaderRow) {\n      throw new Error(\"Property tableHeaderRow does not exist.\");\n    }\n\n    var tableHeaderCell;\n\n    printingHeaderRow = true;\n    if (typeof this.internal.__cell__.headerFunction === \"function\") {\n      var position = this.internal.__cell__.headerFunction(\n        this,\n        this.internal.__cell__.pages\n      );\n      this.internal.__cell__.lastCell = new Cell(\n        position[0],\n        position[1],\n        position[2],\n        position[3],\n        undefined,\n        -1\n      );\n    }\n    this.setFont(undefined, \"bold\");\n\n    var tempHeaderConf = [];\n    for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {\n      tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();\n      if (new_page) {\n        tableHeaderCell.y = this.internal.__cell__.margins.top || 0;\n        tempHeaderConf.push(tableHeaderCell);\n      }\n      tableHeaderCell.lineNumber = lineNumber;\n      var currentTextColor = this.getTextColor();\n      this.setTextColor(this.internal.__cell__.headerTextColor);\n      this.setFillColor(this.internal.__cell__.headerBackgroundColor);\n      cell.call(this, tableHeaderCell);\n      this.setTextColor(currentTextColor);\n    }\n    if (tempHeaderConf.length > 0) {\n      this.setTableHeaderRow(tempHeaderConf);\n    }\n    this.setFont(undefined, \"normal\");\n    printingHeaderRow = false;\n  };\n})(jsPDF.API);\n","function toLookup(arr) {\n  return arr.reduce(function(lookup, name, index) {\n    lookup[name] = index;\n\n    return lookup;\n  }, {});\n}\n\nvar fontStyleOrder = {\n  italic: [\"italic\", \"oblique\", \"normal\"],\n  oblique: [\"oblique\", \"italic\", \"normal\"],\n  normal: [\"normal\", \"oblique\", \"italic\"]\n};\n\nvar fontStretchOrder = [\n  \"ultra-condensed\",\n  \"extra-condensed\",\n  \"condensed\",\n  \"semi-condensed\",\n  \"normal\",\n  \"semi-expanded\",\n  \"expanded\",\n  \"extra-expanded\",\n  \"ultra-expanded\"\n];\n\n// For a given font-stretch value, we need to know where to start our search\n// from in the fontStretchOrder list.\nvar fontStretchLookup = toLookup(fontStretchOrder);\n\nvar fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];\nvar fontWeightsLookup = toLookup(fontWeights);\n\nfunction normalizeFontStretch(stretch) {\n  stretch = stretch || \"normal\";\n\n  return typeof fontStretchLookup[stretch] === \"number\" ? stretch : \"normal\";\n}\n\nfunction normalizeFontStyle(style) {\n  style = style || \"normal\";\n\n  return fontStyleOrder[style] ? style : \"normal\";\n}\n\nfunction normalizeFontWeight(weight) {\n  if (!weight) {\n    return 400;\n  }\n\n  if (typeof weight === \"number\") {\n    // Ignore values which aren't valid font-weights.\n    return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;\n  }\n\n  if (/^\\d00$/.test(weight)) {\n    return parseInt(weight);\n  }\n\n  switch (weight) {\n    case \"bold\":\n      return 700;\n\n    case \"normal\":\n    default:\n      return 400;\n  }\n}\n\nexport function normalizeFontFace(fontFace) {\n  var family = fontFace.family.replace(/\"|'/g, \"\").toLowerCase();\n\n  var style = normalizeFontStyle(fontFace.style);\n  var weight = normalizeFontWeight(fontFace.weight);\n  var stretch = normalizeFontStretch(fontFace.stretch);\n\n  return {\n    family: family,\n    style: style,\n    weight: weight,\n    stretch: stretch,\n    src: fontFace.src || [],\n\n    // The ref property maps this font-face to the font\n    // added by the .addFont() method.\n    ref: fontFace.ref || {\n      name: family,\n      style: [stretch, style, weight].join(\" \")\n    }\n  };\n}\n\n/**\n * Turns a list of font-faces into a map, for easier lookup when resolving\n * fonts.\n * @private\n */\nexport function buildFontFaceMap(fontFaces) {\n  var map = {};\n\n  for (var i = 0; i < fontFaces.length; ++i) {\n    var normalized = normalizeFontFace(fontFaces[i]);\n\n    var name = normalized.family;\n    var stretch = normalized.stretch;\n    var style = normalized.style;\n    var weight = normalized.weight;\n\n    map[name] = map[name] || {};\n\n    map[name][stretch] = map[name][stretch] || {};\n    map[name][stretch][style] = map[name][stretch][style] || {};\n    map[name][stretch][style][weight] = normalized;\n  }\n\n  return map;\n}\n\n/**\n * Searches a map of stretches, weights, etc. in the given direction and\n * then, if no match has been found, in the opposite directions.\n *\n * @param {Object.<string, any>} matchingSet A map of the various font variations.\n * @param {any[]} order The order of the different variations\n * @param {number} pivot The starting point of the search in the order list.\n * @param {number} dir The initial direction of the search (desc = -1, asc = 1)\n * @private\n */\n\nfunction searchFromPivot(matchingSet, order, pivot, dir) {\n  var i;\n\n  for (i = pivot; i >= 0 && i < order.length; i += dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n\n  for (i = pivot; i >= 0 && i < order.length; i -= dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n}\n\nfunction resolveFontStretch(stretch, matchingSet) {\n  if (matchingSet[stretch]) {\n    return matchingSet[stretch];\n  }\n\n  var pivot = fontStretchLookup[stretch];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = pivot <= fontStretchLookup[\"normal\"] ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-stretch value for \" + stretch\n    );\n  }\n\n  return match;\n}\n\nfunction resolveFontStyle(fontStyle, matchingSet) {\n  if (matchingSet[fontStyle]) {\n    return matchingSet[fontStyle];\n  }\n\n  var ordering = fontStyleOrder[fontStyle];\n\n  for (var i = 0; i < ordering.length; ++i) {\n    if (matchingSet[ordering[i]]) {\n      return matchingSet[ordering[i]];\n    }\n  }\n\n  // Since a font-family cannot exist without having at least one style value\n  // we should never reach this point.\n  throw new Error(\"Could not find a matching font-style for \" + fontStyle);\n}\n\nfunction resolveFontWeight(weight, matchingSet) {\n  if (matchingSet[weight]) {\n    return matchingSet[weight];\n  }\n\n  if (weight === 400 && matchingSet[500]) {\n    return matchingSet[500];\n  }\n\n  if (weight === 500 && matchingSet[400]) {\n    return matchingSet[400];\n  }\n\n  var pivot = fontWeightsLookup[weight];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = weight < 400 ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-weight for value \" + weight\n    );\n  }\n\n  return match;\n}\n\nvar defaultGenericFontFamilies = {\n  \"sans-serif\": \"helvetica\",\n  fixed: \"courier\",\n  monospace: \"courier\",\n  terminal: \"courier\",\n  cursive: \"times\",\n  fantasy: \"times\",\n  serif: \"times\"\n};\n\nvar systemFonts = {\n  caption: \"times\",\n  icon: \"times\",\n  menu: \"times\",\n  \"message-box\": \"times\",\n  \"small-caption\": \"times\",\n  \"status-bar\": \"times\"\n};\n\nfunction ruleToString(rule) {\n  return [rule.stretch, rule.style, rule.weight, rule.family].join(\" \");\n}\n\nexport function resolveFontFace(fontFaceMap, rules, opts) {\n  opts = opts || {};\n\n  var defaultFontFamily = opts.defaultFontFamily || \"times\";\n  var genericFontFamilies = Object.assign(\n    {},\n    defaultGenericFontFamilies,\n    opts.genericFontFamilies || {}\n  );\n\n  var rule = null;\n  var matches = null;\n\n  for (var i = 0; i < rules.length; ++i) {\n    rule = normalizeFontFace(rules[i]);\n\n    if (genericFontFamilies[rule.family]) {\n      rule.family = genericFontFamilies[rule.family];\n    }\n\n    if (fontFaceMap.hasOwnProperty(rule.family)) {\n      matches = fontFaceMap[rule.family];\n\n      break;\n    }\n  }\n\n  // Always fallback to a known font family.\n  matches = matches || fontFaceMap[defaultFontFamily];\n\n  if (!matches) {\n    // At this point we should definitiely have a font family, but if we\n    // don't there is something wrong with our configuration\n    throw new Error(\n      \"Could not find a font-family for the rule '\" +\n        ruleToString(rule) +\n        \"' and default family '\" +\n        defaultFontFamily +\n        \"'.\"\n    );\n  }\n\n  matches = resolveFontStretch(rule.stretch, matches);\n  matches = resolveFontStyle(rule.style, matches);\n  matches = resolveFontWeight(rule.weight, matches);\n\n  if (!matches) {\n    // We should've fount\n    throw new Error(\n      \"Failed to resolve a font for the rule '\" + ruleToString(rule) + \"'.\"\n    );\n  }\n\n  return matches;\n}\n\n/**\n * Builds a style id for use with the addFont() method.\n * @param {FontFace} font\n * @private\n */\nexport function toStyleName(font) {\n  return [font.weight, font.style, font.stretch].join(\" \");\n}\n\nfunction eatWhiteSpace(input) {\n  return input.trimLeft();\n}\n\nfunction parseQuotedFontFamily(input, quote) {\n  var index = 0;\n\n  while (index < input.length) {\n    var current = input.charAt(index);\n\n    if (current === quote) {\n      return [input.substring(0, index), input.substring(index + 1)];\n    }\n\n    index += 1;\n  }\n\n  // Unexpected end of input\n  return null;\n}\n\nfunction parseNonQuotedFontFamily(input) {\n  // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n  //\n  // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.\n  //\n  // Breakdown of regexp:\n  // -[a-z_]     - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit\n  // [a-z_]      - allow a-z and underscore at beginning of input\n  // [a-z0-9_-]* - after that, anything goes\n  var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);\n\n  // non quoted value contains illegal characters\n  if (match === null) {\n    return null;\n  }\n\n  return [match[0], input.substring(match[0].length)];\n}\n\nvar defaultFont = [\"times\"];\n\nexport function parseFontFamily(input) {\n  var result = [];\n  var ch, parsed;\n  var remaining = input.trim();\n\n  if (remaining === \"\") {\n    return defaultFont;\n  }\n\n  if (remaining in systemFonts) {\n    return [systemFonts[remaining]];\n  }\n\n  while (remaining !== \"\") {\n    parsed = null;\n    remaining = eatWhiteSpace(remaining);\n    ch = remaining.charAt(0);\n\n    switch (ch) {\n      case '\"':\n      case \"'\":\n        parsed = parseQuotedFontFamily(remaining.substring(1), ch);\n        break;\n\n      default:\n        parsed = parseNonQuotedFontFamily(remaining);\n        break;\n    }\n\n    if (parsed === null) {\n      return defaultFont;\n    }\n\n    result.push(parsed[0]);\n\n    remaining = eatWhiteSpace(parsed[1]);\n\n    // We expect end of input or a comma separator here\n    if (remaining !== \"\" && remaining.charAt(0) !== \",\") {\n      return defaultFont;\n    }\n\n    remaining = remaining.replace(/^,/, \"\");\n  }\n\n  return result;\n}\n","/* eslint-disable no-fallthrough */\r\n/* eslint-disable no-console */\r\n/**\r\n * @license\r\n * jsPDF Context2D PlugIn Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\r\n *\r\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\r\n */\r\n\r\nimport { jsPDF } from \"../jspdf.js\";\r\nimport { RGBColor } from \"../libs/rgbcolor.js\";\r\nimport { console } from \"../libs/console.js\";\r\nimport {\r\n  buildFontFaceMap,\r\n  parseFontFamily,\r\n  resolveFontFace\r\n} from \"../libs/fontFace.js\";\r\n\r\n/**\r\n * This plugin mimics the HTML5 CanvasRenderingContext2D.\r\n *\r\n * The goal is to provide a way for current canvas implementations to print directly to a PDF.\r\n *\r\n * @name context2d\r\n * @module\r\n */\r\n(function(jsPDFAPI) {\r\n  \"use strict\";\r\n  var ContextLayer = function(ctx) {\r\n    ctx = ctx || {};\r\n    this.isStrokeTransparent = ctx.isStrokeTransparent || false;\r\n    this.strokeOpacity = ctx.strokeOpacity || 1;\r\n    this.strokeStyle = ctx.strokeStyle || \"#000000\";\r\n    this.fillStyle = ctx.fillStyle || \"#000000\";\r\n    this.isFillTransparent = ctx.isFillTransparent || false;\r\n    this.fillOpacity = ctx.fillOpacity || 1;\r\n    this.font = ctx.font || \"10px sans-serif\";\r\n    this.textBaseline = ctx.textBaseline || \"alphabetic\";\r\n    this.textAlign = ctx.textAlign || \"left\";\r\n    this.lineWidth = ctx.lineWidth || 1;\r\n    this.lineJoin = ctx.lineJoin || \"miter\";\r\n    this.lineCap = ctx.lineCap || \"butt\";\r\n    this.path = ctx.path || [];\r\n    this.transform =\r\n      typeof ctx.transform !== \"undefined\"\r\n        ? ctx.transform.clone()\r\n        : new Matrix();\r\n    this.globalCompositeOperation = ctx.globalCompositeOperation || \"normal\";\r\n    this.globalAlpha = ctx.globalAlpha || 1.0;\r\n    this.clip_path = ctx.clip_path || [];\r\n    this.currentPoint = ctx.currentPoint || new Point();\r\n    this.miterLimit = ctx.miterLimit || 10.0;\r\n    this.lastPoint = ctx.lastPoint || new Point();\r\n    this.lineDashOffset = ctx.lineDashOffset || 0.0;\r\n    this.lineDash = ctx.lineDash || [];\r\n    this.margin = ctx.margin || [0, 0, 0, 0];\r\n    this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;\r\n\r\n    this.ignoreClearRect =\r\n      typeof ctx.ignoreClearRect === \"boolean\" ? ctx.ignoreClearRect : true;\r\n    return this;\r\n  };\r\n\r\n  //stub\r\n  var f2,\r\n    getHorizontalCoordinateString,\r\n    getVerticalCoordinateString,\r\n    getHorizontalCoordinate,\r\n    getVerticalCoordinate,\r\n    Point,\r\n    Rectangle,\r\n    Matrix,\r\n    _ctx;\r\n  jsPDFAPI.events.push([\r\n    \"initialized\",\r\n    function() {\r\n      this.context2d = new Context2D(this);\r\n\r\n      f2 = this.internal.f2;\r\n      getHorizontalCoordinateString = this.internal.getCoordinateString;\r\n      getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\r\n      getHorizontalCoordinate = this.internal.getHorizontalCoordinate;\r\n      getVerticalCoordinate = this.internal.getVerticalCoordinate;\r\n      Point = this.internal.Point;\r\n      Rectangle = this.internal.Rectangle;\r\n      Matrix = this.internal.Matrix;\r\n      _ctx = new ContextLayer();\r\n    }\r\n  ]);\r\n\r\n  var Context2D = function(pdf) {\r\n    Object.defineProperty(this, \"canvas\", {\r\n      get: function() {\r\n        return { parentNode: false, style: false };\r\n      }\r\n    });\r\n\r\n    var _pdf = pdf;\r\n    Object.defineProperty(this, \"pdf\", {\r\n      get: function() {\r\n        return _pdf;\r\n      }\r\n    });\r\n\r\n    var _pageWrapXEnabled = false;\r\n    /**\r\n     * @name pageWrapXEnabled\r\n     * @type {boolean}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"pageWrapXEnabled\", {\r\n      get: function() {\r\n        return _pageWrapXEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapXEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _pageWrapYEnabled = false;\r\n    /**\r\n     * @name pageWrapYEnabled\r\n     * @type {boolean}\r\n     * @default true\r\n     */\r\n    Object.defineProperty(this, \"pageWrapYEnabled\", {\r\n      get: function() {\r\n        return _pageWrapYEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapYEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _posX = 0;\r\n    /**\r\n     * @name posX\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posX\", {\r\n      get: function() {\r\n        return _posX;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posX = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _posY = 0;\r\n    /**\r\n     * @name posY\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posY\", {\r\n      get: function() {\r\n        return _posY;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posY = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.\r\n     * @name margin\r\n     * @type {number|number[]}\r\n     * @default [0, 0, 0, 0]\r\n     */\r\n    Object.defineProperty(this, \"margin\", {\r\n      get: function() {\r\n        return _ctx.margin;\r\n      },\r\n      set: function(value) {\r\n        var margin;\r\n        if (typeof value === \"number\") {\r\n          margin = [value, value, value, value];\r\n        } else {\r\n          margin = new Array(4);\r\n          margin[0] = value[0];\r\n          margin[1] = value.length >= 2 ? value[1] : margin[0];\r\n          margin[2] = value.length >= 3 ? value[2] : margin[0];\r\n          margin[3] = value.length >= 4 ? value[3] : margin[1];\r\n        }\r\n        _ctx.margin = margin;\r\n      }\r\n    });\r\n\r\n    var _autoPaging = false;\r\n    /**\r\n     * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the\r\n     * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new\r\n     * pages if required.\r\n     *\r\n     * Context2d supports different modes:\r\n     * <ul>\r\n     * <li>\r\n     *   <code>false</code>: Auto paging is disabled.\r\n     * </li>\r\n     * <li>\r\n     *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\r\n     *   slice text in half, making it difficult to read.\r\n     * </li>\r\n     * <li>\r\n     *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\r\n     *   mostly of a single column of text.\r\n     * </li>\r\n     * </ul>\r\n     * @name Context2D#autoPaging\r\n     * @type {boolean|\"slice\"|\"text\"}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"autoPaging\", {\r\n      get: function() {\r\n        return _autoPaging;\r\n      },\r\n      set: function(value) {\r\n        _autoPaging = value;\r\n      }\r\n    });\r\n\r\n    var lastBreak = 0;\r\n    /**\r\n     * @name lastBreak\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"lastBreak\", {\r\n      get: function() {\r\n        return lastBreak;\r\n      },\r\n      set: function(value) {\r\n        lastBreak = value;\r\n      }\r\n    });\r\n\r\n    var pageBreaks = [];\r\n    /**\r\n     * Y Position of page breaks.\r\n     * @name pageBreaks\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"pageBreaks\", {\r\n      get: function() {\r\n        return pageBreaks;\r\n      },\r\n      set: function(value) {\r\n        pageBreaks = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctx\r\n     * @type {object}\r\n     * @default {}\r\n     */\r\n    Object.defineProperty(this, \"ctx\", {\r\n      get: function() {\r\n        return _ctx;\r\n      },\r\n      set: function(value) {\r\n        if (value instanceof ContextLayer) {\r\n          _ctx = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name path\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    Object.defineProperty(this, \"path\", {\r\n      get: function() {\r\n        return _ctx.path;\r\n      },\r\n      set: function(value) {\r\n        _ctx.path = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctxStack\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    var _ctxStack = [];\r\n    Object.defineProperty(this, \"ctxStack\", {\r\n      get: function() {\r\n        return _ctxStack;\r\n      },\r\n      set: function(value) {\r\n        _ctxStack = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used to fill the drawing\r\n     *\r\n     * @name fillStyle\r\n     * @default #000000\r\n     * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />\r\n     * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />\r\n     * A pattern object to use to fill the drawing (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"fillStyle\", {\r\n      get: function() {\r\n        return this.ctx.fillStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba;\r\n        rgba = getRGBA(value);\r\n\r\n        this.ctx.fillStyle = rgba.style;\r\n        this.ctx.isFillTransparent = rgba.a === 0;\r\n        this.ctx.fillOpacity = rgba.a;\r\n\r\n        this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n        this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used for strokes\r\n     *\r\n     * @name strokeStyle\r\n     * @default #000000\r\n     * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)\r\n     * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)\r\n     * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"strokeStyle\", {\r\n      get: function() {\r\n        return this.ctx.strokeStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba = getRGBA(value);\r\n\r\n        this.ctx.strokeStyle = rgba.style;\r\n        this.ctx.isStrokeTransparent = rgba.a === 0;\r\n        this.ctx.strokeOpacity = rgba.a;\r\n\r\n        if (rgba.a === 0) {\r\n          this.pdf.setDrawColor(255, 255, 255);\r\n        } else if (rgba.a === 1) {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        } else {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the style of the end caps for a line\r\n     *\r\n     * @name lineCap\r\n     * @default butt\r\n     * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line <br/>\r\n     * round A rounded end cap is added to each end of the line<br/>\r\n     * square A square end cap is added to each end of the line<br/>\r\n     */\r\n    Object.defineProperty(this, \"lineCap\", {\r\n      get: function() {\r\n        return this.ctx.lineCap;\r\n      },\r\n      set: function(value) {\r\n        if ([\"butt\", \"round\", \"square\"].indexOf(value) !== -1) {\r\n          this.ctx.lineCap = value;\r\n          this.pdf.setLineCap(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the current line width\r\n     *\r\n     * @name lineWidth\r\n     * @default 1\r\n     * @property {number} lineWidth The current line width, in pixels\r\n     */\r\n    Object.defineProperty(this, \"lineWidth\", {\r\n      get: function() {\r\n        return this.ctx.lineWidth;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.lineWidth = value;\r\n          this.pdf.setLineWidth(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the type of corner created, when two lines meet\r\n     */\r\n    Object.defineProperty(this, \"lineJoin\", {\r\n      get: function() {\r\n        return this.ctx.lineJoin;\r\n      },\r\n      set: function(value) {\r\n        if ([\"bevel\", \"round\", \"miter\"].indexOf(value) !== -1) {\r\n          this.ctx.lineJoin = value;\r\n          this.pdf.setLineJoin(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.\r\n     *\r\n     * @name miterLimit\r\n     * @default 10\r\n     */\r\n    Object.defineProperty(this, \"miterLimit\", {\r\n      get: function() {\r\n        return this.ctx.miterLimit;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.miterLimit = value;\r\n          this.pdf.setMiterLimit(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textBaseline\", {\r\n      get: function() {\r\n        return this.ctx.textBaseline;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.textBaseline = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textAlign\", {\r\n      get: function() {\r\n        return this.ctx.textAlign;\r\n      },\r\n      set: function(value) {\r\n        if ([\"right\", \"end\", \"center\", \"left\", \"start\"].indexOf(value) !== -1) {\r\n          this.ctx.textAlign = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _fontFaceMap = null;\r\n\r\n    function getFontFaceMap(pdf, fontFaces) {\r\n      if (_fontFaceMap === null) {\r\n        var fontMap = pdf.getFontList();\r\n\r\n        var convertedFontFaces = convertToFontFaces(fontMap);\r\n\r\n        _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));\r\n      }\r\n\r\n      return _fontFaceMap;\r\n    }\r\n\r\n    function convertToFontFaces(fontMap) {\r\n      var fontFaces = [];\r\n\r\n      Object.keys(fontMap).forEach(function(family) {\r\n        var styles = fontMap[family];\r\n\r\n        styles.forEach(function(style) {\r\n          var fontFace = null;\r\n\r\n          switch (style) {\r\n            case \"bold\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\"\r\n              };\r\n              break;\r\n\r\n            case \"italic\":\r\n              fontFace = {\r\n                family: family,\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"bolditalic\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\",\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"\":\r\n            case \"normal\":\r\n              fontFace = {\r\n                family: family\r\n              };\r\n              break;\r\n          }\r\n\r\n          // If font-face is still null here, it is a font with some styling we don't recognize and\r\n          // cannot map or it is a font added via the fontFaces option of .html().\r\n          if (fontFace !== null) {\r\n            fontFace.ref = {\r\n              name: family,\r\n              style: style\r\n            };\r\n\r\n            fontFaces.push(fontFace);\r\n          }\r\n        });\r\n      });\r\n\r\n      return fontFaces;\r\n    }\r\n\r\n    var _fontFaces = null;\r\n    /**\r\n     * A map of available font-faces, as passed in the options of\r\n     * .html(). If set a limited implementation of the font style matching\r\n     * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm\r\n     * will be used. If not set it will fallback to previous behavior.\r\n     */\r\n\r\n    Object.defineProperty(this, \"fontFaces\", {\r\n      get: function() {\r\n        return _fontFaces;\r\n      },\r\n      set: function(value) {\r\n        _fontFaceMap = null;\r\n        _fontFaces = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"font\", {\r\n      get: function() {\r\n        return this.ctx.font;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.font = value;\r\n        var rx, matches;\r\n\r\n        //source: https://stackoverflow.com/a/10136041\r\n        // eslint-disable-next-line no-useless-escape\r\n        rx = /^\\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;\r\n        matches = rx.exec(value);\r\n        if (matches !== null) {\r\n          var fontStyle = matches[1];\r\n          var fontVariant = matches[2];\r\n          var fontWeight = matches[3];\r\n          var fontSize = matches[4];\r\n          var lineHeight = matches[5];\r\n          var fontFamily = matches[6];\r\n        } else {\r\n          return;\r\n        }\r\n        var rxFontSize = /^([.\\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;\r\n        var fontSizeUnit = rxFontSize.exec(fontSize)[2];\r\n\r\n        if (\"px\" === fontSizeUnit) {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        } else if (\"em\" === fontSizeUnit) {\r\n          fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());\r\n        } else {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        }\r\n\r\n        this.pdf.setFontSize(fontSize);\r\n        var parts = parseFontFamily(fontFamily);\r\n\r\n        if (this.fontFaces) {\r\n          var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);\r\n\r\n          var rules = parts.map(function(ff) {\r\n            return {\r\n              family: ff,\r\n              stretch: \"normal\", // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)\r\n              weight: fontWeight,\r\n              style: fontStyle\r\n            };\r\n          });\r\n\r\n          var font = resolveFontFace(fontFaceMap, rules);\r\n          this.pdf.setFont(font.ref.name, font.ref.style);\r\n          return;\r\n        }\r\n\r\n        var style = \"\";\r\n        if (\r\n          fontWeight === \"bold\" ||\r\n          parseInt(fontWeight, 10) >= 700 ||\r\n          fontStyle === \"bold\"\r\n        ) {\r\n          style = \"bold\";\r\n        }\r\n\r\n        if (fontStyle === \"italic\") {\r\n          style += \"italic\";\r\n        }\r\n\r\n        if (style.length === 0) {\r\n          style = \"normal\";\r\n        }\r\n        var jsPdfFontName = \"\";\r\n\r\n        var fallbackFonts = {\r\n          arial: \"Helvetica\",\r\n          Arial: \"Helvetica\",\r\n          verdana: \"Helvetica\",\r\n          Verdana: \"Helvetica\",\r\n          helvetica: \"Helvetica\",\r\n          Helvetica: \"Helvetica\",\r\n          \"sans-serif\": \"Helvetica\",\r\n          fixed: \"Courier\",\r\n          monospace: \"Courier\",\r\n          terminal: \"Courier\",\r\n          cursive: \"Times\",\r\n          fantasy: \"Times\",\r\n          serif: \"Times\"\r\n        };\r\n\r\n        for (var i = 0; i < parts.length; i++) {\r\n          if (\r\n            this.pdf.internal.getFont(parts[i], style, {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            break;\r\n          } else if (\r\n            style === \"bolditalic\" &&\r\n            this.pdf.internal.getFont(parts[i], \"bold\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"bold\";\r\n          } else if (\r\n            this.pdf.internal.getFont(parts[i], \"normal\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"normal\";\r\n            break;\r\n          }\r\n        }\r\n        if (jsPdfFontName === \"\") {\r\n          for (var j = 0; j < parts.length; j++) {\r\n            if (fallbackFonts[parts[j]]) {\r\n              jsPdfFontName = fallbackFonts[parts[j]];\r\n              break;\r\n            }\r\n          }\r\n        }\r\n        jsPdfFontName = jsPdfFontName === \"\" ? \"Times\" : jsPdfFontName;\r\n        this.pdf.setFont(jsPdfFontName, style);\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalCompositeOperation\", {\r\n      get: function() {\r\n        return this.ctx.globalCompositeOperation;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalCompositeOperation = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalAlpha\", {\r\n      get: function() {\r\n        return this.ctx.globalAlpha;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalAlpha = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A float specifying the amount of the line dash offset. The default value is 0.0.\r\n     *\r\n     * @name lineDashOffset\r\n     * @default 0.0\r\n     */\r\n    Object.defineProperty(this, \"lineDashOffset\", {\r\n      get: function() {\r\n        return this.ctx.lineDashOffset;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDashOffset = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"lineDash\", {\r\n      get: function() {\r\n        return this.ctx.lineDash;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDash = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"ignoreClearRect\", {\r\n      get: function() {\r\n        return this.ctx.ignoreClearRect;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.ignoreClearRect = Boolean(value);\r\n      }\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Sets the line dash pattern used when stroking lines.\r\n   * @name setLineDash\r\n   * @function\r\n   * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.\r\n   */\r\n  Context2D.prototype.setLineDash = function(dashArray) {\r\n    this.lineDash = dashArray;\r\n  };\r\n\r\n  /**\r\n   * gets the current line dash pattern.\r\n   * @name getLineDash\r\n   * @function\r\n   * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].\r\n   */\r\n  Context2D.prototype.getLineDash = function() {\r\n    if (this.lineDash.length % 2) {\r\n      // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value\r\n      return this.lineDash.concat(this.lineDash);\r\n    } else {\r\n      // The copied value is returned to prevent contamination from outside.\r\n      return this.lineDash.slice();\r\n    }\r\n  };\r\n\r\n  Context2D.prototype.fill = function() {\r\n    pathPreProcess.call(this, \"fill\", false);\r\n  };\r\n\r\n  /**\r\n   * Actually draws the path you have defined\r\n   *\r\n   * @name stroke\r\n   * @function\r\n   * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.\r\n   */\r\n  Context2D.prototype.stroke = function() {\r\n    pathPreProcess.call(this, \"stroke\", false);\r\n  };\r\n\r\n  /**\r\n   * Begins a path, or resets the current\r\n   *\r\n   * @name beginPath\r\n   * @function\r\n   * @description The beginPath() method begins a path, or resets the current path.\r\n   */\r\n  Context2D.prototype.beginPath = function() {\r\n    this.path = [\r\n      {\r\n        type: \"begin\"\r\n      }\r\n    ];\r\n  };\r\n\r\n  /**\r\n   * Moves the path to the specified point in the canvas, without creating a line\r\n   *\r\n   * @name moveTo\r\n   * @function\r\n   * @param x {Number} The x-coordinate of where to move the path to\r\n   * @param y {Number} The y-coordinate of where to move the path to\r\n   */\r\n  Context2D.prototype.moveTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.moveTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.moveTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"mt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * Creates a path from the current point back to the starting point\r\n   *\r\n   * @name closePath\r\n   * @function\r\n   * @description The closePath() method creates a path from the current point back to the starting point.\r\n   */\r\n  Context2D.prototype.closePath = function() {\r\n    var pathBegin = new Point(0, 0);\r\n    var i = 0;\r\n    for (i = this.path.length - 1; i !== -1; i--) {\r\n      if (this.path[i].type === \"begin\") {\r\n        if (\r\n          typeof this.path[i + 1] === \"object\" &&\r\n          typeof this.path[i + 1].x === \"number\"\r\n        ) {\r\n          pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);\r\n          break;\r\n        }\r\n      }\r\n    }\r\n    this.path.push({\r\n      type: \"close\"\r\n    });\r\n    this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);\r\n  };\r\n\r\n  /**\r\n   * Adds a new point and creates a line to that point from the last specified point in the canvas\r\n   *\r\n   * @name lineTo\r\n   * @function\r\n   * @param x The x-coordinate of where to create the line to\r\n   * @param y The y-coordinate of where to create the line to\r\n   * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).\r\n   */\r\n  Context2D.prototype.lineTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.lineTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.lineTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"lt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt.x, pt.y);\r\n  };\r\n\r\n  /**\r\n   * Clips a region of any shape and size from the original canvas\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @description The clip() method clips a region of any shape and size from the original canvas.\r\n   */\r\n  Context2D.prototype.clip = function() {\r\n    this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));\r\n    pathPreProcess.call(this, null, true);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name quadraticCurveTo\r\n   * @function\r\n   * @param cpx {Number} The x-coordinate of the Bézier control point\r\n   * @param cpy {Number} The y-coordinate of the Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.<br /><br /> A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {\r\n      console.error(\r\n        \"jsPDF.context2d.quadraticCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.quadraticCurveTo\"\r\n      );\r\n    }\r\n\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));\r\n\r\n    this.path.push({\r\n      type: \"qct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name bezierCurveTo\r\n   * @function\r\n   * @param cp1x {Number} The x-coordinate of the first Bézier control point\r\n   * @param cp1y {Number} The y-coordinate of the first Bézier control point\r\n   * @param cp2x {Number} The x-coordinate of the second Bézier control point\r\n   * @param cp2y {Number} The y-coordinate of the second Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve. <br /><br />A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve.  The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(cp1x) ||\r\n      isNaN(cp1y) ||\r\n      isNaN(cp2x) ||\r\n      isNaN(cp2y)\r\n    ) {\r\n      console.error(\r\n        \"jsPDF.context2d.bezierCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.bezierCurveTo\"\r\n      );\r\n    }\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));\r\n    var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));\r\n\r\n    this.path.push({\r\n      type: \"bct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x2: pt2.x,\r\n      y2: pt2.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve (used to create circles, or parts of circles)\r\n   *\r\n   * @name arc\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the center of the circle\r\n   * @param y {Number} The y-coordinate of the center of the circle\r\n   * @param radius {Number} The radius of the circle\r\n   * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)\r\n   * @param endAngle {Number} The ending angle, in radians\r\n   * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.\r\n   * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).\r\n   */\r\n  Context2D.prototype.arc = function(\r\n    x,\r\n    y,\r\n    radius,\r\n    startAngle,\r\n    endAngle,\r\n    counterclockwise\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(radius) ||\r\n      isNaN(startAngle) ||\r\n      isNaN(endAngle)\r\n    ) {\r\n      console.error(\"jsPDF.context2d.arc: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.arc\");\r\n    }\r\n    counterclockwise = Boolean(counterclockwise);\r\n\r\n    if (!this.ctx.transform.isIdentity) {\r\n      var xpt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n      x = xpt.x;\r\n      y = xpt.y;\r\n\r\n      var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));\r\n      var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));\r\n      radius = Math.sqrt(\r\n        Math.pow(x_radPt.x - x_radPt0.x, 2) +\r\n          Math.pow(x_radPt.y - x_radPt0.y, 2)\r\n      );\r\n    }\r\n    if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {\r\n      startAngle = 0;\r\n      endAngle = 2 * Math.PI;\r\n    }\r\n\r\n    this.path.push({\r\n      type: \"arc\",\r\n      x: x,\r\n      y: y,\r\n      radius: radius,\r\n      startAngle: startAngle,\r\n      endAngle: endAngle,\r\n      counterclockwise: counterclockwise\r\n    });\r\n    // this.ctx.lastPoint(new Point(pt.x,pt.y));\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve between two tangents\r\n   *\r\n   * @name arcTo\r\n   * @function\r\n   * @param x1 {Number} The x-coordinate of the first tangent\r\n   * @param y1 {Number} The y-coordinate of the first tangent\r\n   * @param x2 {Number} The x-coordinate of the second tangent\r\n   * @param y2 {Number} The y-coordinate of the second tangent\r\n   * @param radius The radius of the arc\r\n   * @description The arcTo() method creates an arc/curve between two tangents on the canvas.\r\n   */\r\n  // eslint-disable-next-line no-unused-vars\r\n  Context2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {\r\n    throw new Error(\"arcTo not implemented.\");\r\n  };\r\n\r\n  /**\r\n   * Creates a rectangle\r\n   *\r\n   * @name rect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The rect() method creates a rectangle.\r\n   */\r\n  Context2D.prototype.rect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.rect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rect\");\r\n    }\r\n    this.moveTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x + w, y + h);\r\n    this.lineTo(x, y + h);\r\n    this.lineTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x, y);\r\n  };\r\n\r\n  /**\r\n   * Draws a \"filled\" rectangle\r\n   *\r\n   * @name fillRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The fillRect() method draws a \"filled\" rectangle. The default color of the fill is black.\r\n   */\r\n  Context2D.prototype.fillRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.fillRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillRect\");\r\n    }\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n    var tmp = {};\r\n    if (this.lineCap !== \"butt\") {\r\n      tmp.lineCap = this.lineCap;\r\n      this.lineCap = \"butt\";\r\n    }\r\n    if (this.lineJoin !== \"miter\") {\r\n      tmp.lineJoin = this.lineJoin;\r\n      this.lineJoin = \"miter\";\r\n    }\r\n\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.fill();\r\n\r\n    if (tmp.hasOwnProperty(\"lineCap\")) {\r\n      this.lineCap = tmp.lineCap;\r\n    }\r\n    if (tmp.hasOwnProperty(\"lineJoin\")) {\r\n      this.lineJoin = tmp.lineJoin;\r\n    }\r\n  };\r\n\r\n  /**\r\n   *     Draws a rectangle (no fill)\r\n   *\r\n   * @name strokeRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.\r\n   */\r\n  Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.strokeRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeRect\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.stroke();\r\n  };\r\n\r\n  /**\r\n   * Clears the specified pixels within a given rectangle\r\n   *\r\n   * @name clearRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle to clear, in pixels\r\n   * @param h {Number} The height of the rectangle to clear, in pixels\r\n   * @description We cannot clear PDF commands that were already written to PDF, so we use white instead. <br />\r\n   * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.\r\n   * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.\r\n   * This flag is stored in the save/restore context and is managed the same way as other drawing states.\r\n   *\r\n   */\r\n  Context2D.prototype.clearRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.clearRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.clearRect\");\r\n    }\r\n    if (this.ignoreClearRect) {\r\n      return;\r\n    }\r\n\r\n    this.fillStyle = \"#ffffff\";\r\n    this.fillRect(x, y, w, h);\r\n  };\r\n\r\n  /**\r\n   * Saves the state of the current context\r\n   *\r\n   * @name save\r\n   * @function\r\n   */\r\n  Context2D.prototype.save = function(doStackPush) {\r\n    doStackPush = typeof doStackPush === \"boolean\" ? doStackPush : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPush) {\r\n      this.ctx.fontSize = this.pdf.internal.getFontSize();\r\n      var ctx = new ContextLayer(this.ctx);\r\n      this.ctxStack.push(this.ctx);\r\n      this.ctx = ctx;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Returns previously saved path state and attributes\r\n   *\r\n   * @name restore\r\n   * @function\r\n   */\r\n  Context2D.prototype.restore = function(doStackPop) {\r\n    doStackPop = typeof doStackPop === \"boolean\" ? doStackPop : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"Q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPop && this.ctxStack.length !== 0) {\r\n      this.ctx = this.ctxStack.pop();\r\n      this.fillStyle = this.ctx.fillStyle;\r\n      this.strokeStyle = this.ctx.strokeStyle;\r\n      this.font = this.ctx.font;\r\n      this.lineCap = this.ctx.lineCap;\r\n      this.lineWidth = this.ctx.lineWidth;\r\n      this.lineJoin = this.ctx.lineJoin;\r\n      this.lineDash = this.ctx.lineDash;\r\n      this.lineDashOffset = this.ctx.lineDashOffset;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @name toDataURL\r\n   * @function\r\n   */\r\n  Context2D.prototype.toDataURL = function() {\r\n    throw new Error(\"toDataUrl not implemented.\");\r\n  };\r\n\r\n  //helper functions\r\n\r\n  /**\r\n   * Get the decimal values of r, g, b and a\r\n   *\r\n   * @name getRGBA\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var getRGBA = function(style) {\r\n    var rxRgb = /rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/;\r\n    var rxRgba = /rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*([\\d.]+)\\s*\\)/;\r\n    var rxTransparent = /transparent|rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*0+\\s*\\)/;\r\n\r\n    var r, g, b, a;\r\n\r\n    if (style.isCanvasGradient === true) {\r\n      style = style.getColor();\r\n    }\r\n\r\n    if (!style) {\r\n      return { r: 0, g: 0, b: 0, a: 0, style: style };\r\n    }\r\n\r\n    if (rxTransparent.test(style)) {\r\n      r = 0;\r\n      g = 0;\r\n      b = 0;\r\n      a = 0;\r\n    } else {\r\n      var matches = rxRgb.exec(style);\r\n      if (matches !== null) {\r\n        r = parseInt(matches[1]);\r\n        g = parseInt(matches[2]);\r\n        b = parseInt(matches[3]);\r\n        a = 1;\r\n      } else {\r\n        matches = rxRgba.exec(style);\r\n        if (matches !== null) {\r\n          r = parseInt(matches[1]);\r\n          g = parseInt(matches[2]);\r\n          b = parseInt(matches[3]);\r\n          a = parseFloat(matches[4]);\r\n        } else {\r\n          a = 1;\r\n\r\n          if (typeof style === \"string\" && style.charAt(0) !== \"#\") {\r\n            var rgbColor = new RGBColor(style);\r\n            if (rgbColor.ok) {\r\n              style = rgbColor.toHex();\r\n            } else {\r\n              style = \"#000000\";\r\n            }\r\n          }\r\n\r\n          if (style.length === 4) {\r\n            r = style.substring(1, 2);\r\n            r += r;\r\n            g = style.substring(2, 3);\r\n            g += g;\r\n            b = style.substring(3, 4);\r\n            b += b;\r\n          } else {\r\n            r = style.substring(1, 3);\r\n            g = style.substring(3, 5);\r\n            b = style.substring(5, 7);\r\n          }\r\n          r = parseInt(r, 16);\r\n          g = parseInt(g, 16);\r\n          b = parseInt(b, 16);\r\n        }\r\n      }\r\n    }\r\n    return { r: r, g: g, b: b, a: a, style: style };\r\n  };\r\n\r\n  /**\r\n   * @name isFillTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isFillTransparent = function() {\r\n    return this.ctx.isFillTransparent || this.globalAlpha == 0;\r\n  };\r\n\r\n  /**\r\n   * @name isStrokeTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isStrokeTransparent = function() {\r\n    return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);\r\n  };\r\n\r\n  /**\r\n   * Draws \"filled\" text on the canvas\r\n   *\r\n   * @name fillText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The fillText() method draws filled text on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.fillText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.fillText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillText\");\r\n    }\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n\r\n    // We only use X axis as scale hint\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Draws text on the canvas (no fill)\r\n   *\r\n   * @name strokeText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.strokeText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.strokeText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeText\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      renderingMode: \"stroke\",\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Returns an object that contains the width of the specified text\r\n   *\r\n   * @name measureText\r\n   * @function\r\n   * @param text {String} The text to be measured\r\n   * @description The measureText() method returns an object that contains the width of the specified text, in pixels.\r\n   * @returns {Number}\r\n   */\r\n  Context2D.prototype.measureText = function(text) {\r\n    if (typeof text !== \"string\") {\r\n      console.error(\r\n        \"jsPDF.context2d.measureText: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.measureText\"\r\n      );\r\n    }\r\n    var pdf = this.pdf;\r\n    var k = this.pdf.internal.scaleFactor;\r\n\r\n    var fontSize = pdf.internal.getFontSize();\r\n    var txtWidth =\r\n      (pdf.getStringUnitWidth(text) * fontSize) / pdf.internal.scaleFactor;\r\n    txtWidth *= Math.round(((k * 96) / 72) * 10000) / 10000;\r\n\r\n    var TextMetrics = function(options) {\r\n      options = options || {};\r\n      var _width = options.width || 0;\r\n      Object.defineProperty(this, \"width\", {\r\n        get: function() {\r\n          return _width;\r\n        }\r\n      });\r\n      return this;\r\n    };\r\n    return new TextMetrics({ width: txtWidth });\r\n  };\r\n\r\n  //Transformations\r\n\r\n  /**\r\n   * Scales the current drawing bigger or smaller\r\n   *\r\n   * @name scale\r\n   * @function\r\n   * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @description The scale() method scales the current drawing, bigger or smaller.\r\n   */\r\n  Context2D.prototype.scale = function(scalewidth, scaleheight) {\r\n    if (isNaN(scalewidth) || isNaN(scaleheight)) {\r\n      console.error(\"jsPDF.context2d.scale: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.scale\");\r\n    }\r\n    var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Rotates the current drawing\r\n   *\r\n   * @name rotate\r\n   * @function\r\n   * @param angle {Number} The rotation angle, in radians.\r\n   * @description To calculate from degrees to radians: degrees*Math.PI/180. <br />\r\n   * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180\r\n   */\r\n  Context2D.prototype.rotate = function(angle) {\r\n    if (isNaN(angle)) {\r\n      console.error(\"jsPDF.context2d.rotate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rotate\");\r\n    }\r\n    var matrix = new Matrix(\r\n      Math.cos(angle),\r\n      Math.sin(angle),\r\n      -Math.sin(angle),\r\n      Math.cos(angle),\r\n      0.0,\r\n      0.0\r\n    );\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Remaps the (0,0) position on the canvas\r\n   *\r\n   * @name translate\r\n   * @function\r\n   * @param x {Number} The value to add to horizontal (x) coordinates\r\n   * @param y {Number} The value to add to vertical (y) coordinates\r\n   * @description The translate() method remaps the (0,0) position on the canvas.\r\n   */\r\n  Context2D.prototype.translate = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.translate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.translate\");\r\n    }\r\n    var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Replaces the current transformation matrix for the drawing\r\n   *\r\n   * @name transform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix.<br /><br />The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:<br /><br /><br /><br />a    c    e<br /><br />b    d    f<br /><br />0    0    1<br /><br />In other words, the transform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.transform = function(a, b, c, d, e, f) {\r\n    if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {\r\n      console.error(\"jsPDF.context2d.transform: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.transform\");\r\n    }\r\n    var matrix = new Matrix(a, b, c, d, e, f);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Resets the current transform to the identity matrix. Then runs transform()\r\n   *\r\n   * @name setTransform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix. <br /><br />The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.<br /><br />In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.setTransform = function(a, b, c, d, e, f) {\r\n    a = isNaN(a) ? 1 : a;\r\n    b = isNaN(b) ? 0 : b;\r\n    c = isNaN(c) ? 0 : c;\r\n    d = isNaN(d) ? 1 : d;\r\n    e = isNaN(e) ? 0 : e;\r\n    f = isNaN(f) ? 0 : f;\r\n    this.ctx.transform = new Matrix(a, b, c, d, e, f);\r\n  };\r\n\r\n  /**\r\n   * Should only be used if pageWrapYEnabled is true\r\n   *\r\n   * @name setPageByYPosition\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns One-based Page Number\r\n   */\r\n  var setPageByYPosition = function(y) {\r\n    if (this.pageWrapYEnabled) {\r\n      this.lastBreak = 0;\r\n      var manualBreaks = 0;\r\n      var autoBreaks = 0;\r\n      for (var i = 0; i < this.pageBreaks.length; i++) {\r\n        if (y >= this.pageBreaks[i]) {\r\n          manualBreaks++;\r\n          if (this.lastBreak === 0) {\r\n            autoBreaks++;\r\n          }\r\n          var spaceBetweenLastBreak = this.pageBreaks[i] - this.lastBreak;\r\n          this.lastBreak = this.pageBreaks[i];\r\n          var pagesSinceLastBreak = Math.floor(\r\n            spaceBetweenLastBreak / this.pageWrapY\r\n          );\r\n          autoBreaks += pagesSinceLastBreak;\r\n        }\r\n      }\r\n      if (this.lastBreak === 0) {\r\n        var pagesSinceLastBreak = Math.floor(y / this.pageWrapY) + 1;\r\n        autoBreaks += pagesSinceLastBreak;\r\n      }\r\n      return autoBreaks + manualBreaks;\r\n    } else {\r\n      return this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    }\r\n  };\r\n\r\n  var hasMargins = function() {\r\n    return (\r\n      this.margin[0] > 0 ||\r\n      this.margin[1] > 0 ||\r\n      this.margin[2] > 0 ||\r\n      this.margin[3] > 0\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Draws an image, canvas, or video onto the canvas\r\n   *\r\n   * @function\r\n   * @param img {} Specifies the image, canvas, or video element to use\r\n   * @param sx {Number} Optional. The x coordinate where to start clipping\r\n   * @param sy {Number} Optional. The y coordinate where to start clipping\r\n   * @param swidth {Number} Optional. The width of the clipped image\r\n   * @param sheight {Number} Optional. The height of the clipped image\r\n   * @param x {Number} The x coordinate where to place the image on the canvas\r\n   * @param y {Number} The y coordinate where to place the image on the canvas\r\n   * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)\r\n   * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)\r\n   */\r\n  Context2D.prototype.drawImage = function(\r\n    img,\r\n    sx,\r\n    sy,\r\n    swidth,\r\n    sheight,\r\n    x,\r\n    y,\r\n    width,\r\n    height\r\n  ) {\r\n    var imageProperties = this.pdf.getImageProperties(img);\r\n    var factorX = 1;\r\n    var factorY = 1;\r\n    var isClip;\r\n\r\n    var clipFactorX = 1;\r\n    var clipFactorY = 1;\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width !== \"undefined\") {\r\n      isClip = true;\r\n      clipFactorX = width / swidth;\r\n      clipFactorY = height / sheight;\r\n      factorX = ((imageProperties.width / swidth) * width) / swidth;\r\n      factorY = ((imageProperties.height / sheight) * height) / sheight;\r\n    }\r\n\r\n    //is sx and sy are set and x and y not, set x and y with values of sx and sy\r\n    if (typeof x === \"undefined\") {\r\n      x = sx;\r\n      y = sy;\r\n      sx = 0;\r\n      sy = 0;\r\n    }\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width === \"undefined\") {\r\n      width = swidth;\r\n      height = sheight;\r\n    }\r\n    if (typeof swidth === \"undefined\" && typeof width === \"undefined\") {\r\n      width = imageProperties.width;\r\n      height = imageProperties.height;\r\n    }\r\n\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n    var xRect = matrix.applyToRectangle(\r\n      new Rectangle(\r\n        x - sx * clipFactorX,\r\n        y - sy * clipFactorY,\r\n        swidth * factorX,\r\n        sheight * factorY\r\n      )\r\n    );\r\n    var pageArray = getPagesByPath.call(this, xRect);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var tmpRect = JSON.parse(JSON.stringify(xRect));\r\n        tmpRect = pathPositionRedo(\r\n          [tmpRect],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        const needsClipping = (i > min || i < max) && hasMargins.call(this);\r\n\r\n        if (needsClipping) {\r\n          this.pdf.saveGraphicsState();\r\n          this.pdf\r\n            .rect(\r\n              this.margin[3],\r\n              this.margin[0],\r\n              pageWidthMinusMargins,\r\n              pageHeightMinusMargins,\r\n              null\r\n            )\r\n            .clip()\r\n            .discardPath();\r\n        }\r\n        this.pdf.addImage(\r\n          img,\r\n          \"JPEG\",\r\n          tmpRect.x,\r\n          tmpRect.y,\r\n          tmpRect.w,\r\n          tmpRect.h,\r\n          null,\r\n          null,\r\n          angle\r\n        );\r\n        if (needsClipping) {\r\n          this.pdf.restoreGraphicsState();\r\n        }\r\n      }\r\n    } else {\r\n      this.pdf.addImage(\r\n        img,\r\n        \"JPEG\",\r\n        xRect.x,\r\n        xRect.y,\r\n        xRect.w,\r\n        xRect.h,\r\n        null,\r\n        null,\r\n        angle\r\n      );\r\n    }\r\n  };\r\n\r\n  var getPagesByPath = function(path, pageWrapX, pageWrapY) {\r\n    var result = [];\r\n    pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;\r\n    pageWrapY =\r\n      pageWrapY ||\r\n      this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n    var yOffset = this.posY + this.ctx.prevPageLastElemOffset;\r\n\r\n    switch (path.type) {\r\n      default:\r\n      case \"mt\":\r\n      case \"lt\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        break;\r\n      case \"arc\":\r\n        result.push(\r\n          Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1\r\n        );\r\n        break;\r\n      case \"qct\":\r\n        var rectOfQuadraticCurve = getQuadraticCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) /\r\n              pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"bct\":\r\n        var rectOfBezierCurve = getBezierCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x2,\r\n          path.y2,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"rect\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);\r\n    }\r\n\r\n    for (var i = 0; i < result.length; i += 1) {\r\n      while (this.pdf.internal.getNumberOfPages() < result[i]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    return result;\r\n  };\r\n\r\n  var addPage = function() {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var font = this.font;\r\n    var lineCap = this.lineCap;\r\n    var lineWidth = this.lineWidth;\r\n    var lineJoin = this.lineJoin;\r\n    this.pdf.addPage();\r\n    this.fillStyle = fillStyle;\r\n    this.strokeStyle = strokeStyle;\r\n    this.font = font;\r\n    this.lineCap = lineCap;\r\n    this.lineWidth = lineWidth;\r\n    this.lineJoin = lineJoin;\r\n  };\r\n\r\n  var pathPositionRedo = function(paths, x, y) {\r\n    for (var i = 0; i < paths.length; i++) {\r\n      switch (paths[i].type) {\r\n        case \"bct\":\r\n          paths[i].x2 += x;\r\n          paths[i].y2 += y;\r\n        case \"qct\":\r\n          paths[i].x1 += x;\r\n          paths[i].y1 += y;\r\n        case \"mt\":\r\n        case \"lt\":\r\n        case \"arc\":\r\n        default:\r\n          paths[i].x += x;\r\n          paths[i].y += y;\r\n      }\r\n    }\r\n    return paths;\r\n  };\r\n\r\n  var sortPages = function(pages) {\r\n    return pages.sort(function(a, b) {\r\n      return a - b;\r\n    });\r\n  };\r\n\r\n  var pathPreProcess = function(rule, isClip) {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var lineCap = this.lineCap;\r\n    var oldLineWidth = this.lineWidth;\r\n    var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);\r\n    var lineJoin = this.lineJoin;\r\n\r\n    var origPath = JSON.parse(JSON.stringify(this.path));\r\n    var xPath = JSON.parse(JSON.stringify(this.path));\r\n    var clipPath;\r\n    var tmpPath;\r\n    var pages = [];\r\n\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      if (typeof xPath[i].x !== \"undefined\") {\r\n        var page = getPagesByPath.call(this, xPath[i]);\r\n\r\n        for (var ii = 0; ii < page.length; ii += 1) {\r\n          if (pages.indexOf(page[ii]) === -1) {\r\n            pages.push(page[ii]);\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    for (var j = 0; j < pages.length; j++) {\r\n      while (this.pdf.internal.getNumberOfPages() < pages[j]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    sortPages(pages);\r\n\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var k = min; k < max + 1; k++) {\r\n        this.pdf.setPage(k);\r\n\r\n        this.fillStyle = fillStyle;\r\n        this.strokeStyle = strokeStyle;\r\n        this.lineCap = lineCap;\r\n        this.lineWidth = lineWidth;\r\n        this.lineJoin = lineJoin;\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, rule, true);\r\n          this.path = tmpPaths;\r\n        }\r\n        tmpPath = JSON.parse(JSON.stringify(origPath));\r\n        this.path = pathPositionRedo(\r\n          tmpPath,\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        );\r\n        if (isClip === false || k === 0) {\r\n          const needsClipping = (k > min || k < max) && hasMargins.call(this);\r\n          if (needsClipping) {\r\n            this.pdf.saveGraphicsState();\r\n            this.pdf\r\n              .rect(\r\n                this.margin[3],\r\n                this.margin[0],\r\n                pageWidthMinusMargins,\r\n                pageHeightMinusMargins,\r\n                null\r\n              )\r\n              .clip()\r\n              .discardPath();\r\n          }\r\n          drawPaths.call(this, rule, isClip);\r\n          if (needsClipping) {\r\n            this.pdf.restoreGraphicsState();\r\n          }\r\n        }\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    } else {\r\n      this.lineWidth = lineWidth;\r\n      drawPaths.call(this, rule, isClip);\r\n      this.lineWidth = oldLineWidth;\r\n    }\r\n    this.path = origPath;\r\n  };\r\n\r\n  /**\r\n   * Processes the paths\r\n   *\r\n   * @function\r\n   * @param rule {String}\r\n   * @param isClip {Boolean}\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var drawPaths = function(rule, isClip) {\r\n    if (rule === \"stroke\" && !isClip && isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    if (rule !== \"stroke\" && !isClip && isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var moves = [];\r\n\r\n    //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;\r\n    var delta;\r\n    var xPath = this.path;\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      var pt = xPath[i];\r\n\r\n      switch (pt.type) {\r\n        case \"begin\":\r\n          moves.push({\r\n            begin: true\r\n          });\r\n          break;\r\n\r\n        case \"close\":\r\n          moves.push({\r\n            close: true\r\n          });\r\n          break;\r\n\r\n        case \"mt\":\r\n          moves.push({\r\n            start: pt,\r\n            deltas: [],\r\n            abs: []\r\n          });\r\n          break;\r\n\r\n        case \"lt\":\r\n          var iii = moves.length;\r\n          if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {\r\n            delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];\r\n            if (iii > 0) {\r\n              for (iii; iii >= 0; iii--) {\r\n                if (\r\n                  moves[iii - 1].close !== true &&\r\n                  moves[iii - 1].begin !== true\r\n                ) {\r\n                  moves[iii - 1].deltas.push(delta);\r\n                  moves[iii - 1].abs.push(pt);\r\n                  break;\r\n                }\r\n              }\r\n            }\r\n          }\r\n          break;\r\n\r\n        case \"bct\":\r\n          delta = [\r\n            pt.x1 - xPath[i - 1].x,\r\n            pt.y1 - xPath[i - 1].y,\r\n            pt.x2 - xPath[i - 1].x,\r\n            pt.y2 - xPath[i - 1].y,\r\n            pt.x - xPath[i - 1].x,\r\n            pt.y - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"qct\":\r\n          var x1 = xPath[i - 1].x + (2.0 / 3.0) * (pt.x1 - xPath[i - 1].x);\r\n          var y1 = xPath[i - 1].y + (2.0 / 3.0) * (pt.y1 - xPath[i - 1].y);\r\n          var x2 = pt.x + (2.0 / 3.0) * (pt.x1 - pt.x);\r\n          var y2 = pt.y + (2.0 / 3.0) * (pt.y1 - pt.y);\r\n          var x3 = pt.x;\r\n          var y3 = pt.y;\r\n          delta = [\r\n            x1 - xPath[i - 1].x,\r\n            y1 - xPath[i - 1].y,\r\n            x2 - xPath[i - 1].x,\r\n            y2 - xPath[i - 1].y,\r\n            x3 - xPath[i - 1].x,\r\n            y3 - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"arc\":\r\n          moves.push({\r\n            deltas: [],\r\n            abs: [],\r\n            arc: true\r\n          });\r\n\r\n          if (Array.isArray(moves[moves.length - 1].abs)) {\r\n            moves[moves.length - 1].abs.push(pt);\r\n          }\r\n          break;\r\n      }\r\n    }\r\n    var style;\r\n    if (!isClip) {\r\n      if (rule === \"stroke\") {\r\n        style = \"stroke\";\r\n      } else {\r\n        style = \"fill\";\r\n      }\r\n    } else {\r\n      style = null;\r\n    }\r\n\r\n    var began = false;\r\n    for (var k = 0; k < moves.length; k++) {\r\n      if (moves[k].arc) {\r\n        var arcs = moves[k].abs;\r\n\r\n        for (var ii = 0; ii < arcs.length; ii++) {\r\n          var arc = arcs[ii];\r\n\r\n          if (arc.type === \"arc\") {\r\n            drawArc.call(\r\n              this,\r\n              arc.x,\r\n              arc.y,\r\n              arc.radius,\r\n              arc.startAngle,\r\n              arc.endAngle,\r\n              arc.counterclockwise,\r\n              undefined,\r\n              isClip,\r\n              !began\r\n            );\r\n          } else {\r\n            drawLine.call(this, arc.x, arc.y);\r\n          }\r\n          began = true;\r\n        }\r\n      } else if (moves[k].close === true) {\r\n        this.pdf.internal.out(\"h\");\r\n        began = false;\r\n      } else if (moves[k].begin !== true) {\r\n        var x = moves[k].start.x;\r\n        var y = moves[k].start.y;\r\n        drawLines.call(this, moves[k].deltas, x, y);\r\n        began = true;\r\n      }\r\n    }\r\n\r\n    if (style) {\r\n      putStyle.call(this, style);\r\n    }\r\n    if (isClip) {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var getBaseline = function(y) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    switch (this.ctx.textBaseline) {\r\n      case \"bottom\":\r\n        return y - descent;\r\n      case \"top\":\r\n        return y + height - descent;\r\n      case \"hanging\":\r\n        return y + height - 2 * descent;\r\n      case \"middle\":\r\n        return y + height / 2 - descent;\r\n      case \"ideographic\":\r\n        // TODO not implemented\r\n        return y;\r\n      case \"alphabetic\":\r\n      default:\r\n        return y;\r\n    }\r\n  };\r\n\r\n  var getTextBottom = function(yBaseLine) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    return yBaseLine + descent;\r\n  };\r\n\r\n  Context2D.prototype.createLinearGradient = function createLinearGradient() {\r\n    var canvasGradient = function canvasGradient() {};\r\n\r\n    canvasGradient.colorStops = [];\r\n    canvasGradient.addColorStop = function(offset, color) {\r\n      this.colorStops.push([offset, color]);\r\n    };\r\n\r\n    canvasGradient.getColor = function() {\r\n      if (this.colorStops.length === 0) {\r\n        return \"#000000\";\r\n      }\r\n\r\n      return this.colorStops[0][1];\r\n    };\r\n\r\n    canvasGradient.isCanvasGradient = true;\r\n    return canvasGradient;\r\n  };\r\n  Context2D.prototype.createPattern = function createPattern() {\r\n    return this.createLinearGradient();\r\n  };\r\n  Context2D.prototype.createRadialGradient = function createRadialGradient() {\r\n    return this.createLinearGradient();\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param x Edge point X\r\n   * @param y Edge point Y\r\n   * @param r Radius\r\n   * @param a1 start angle\r\n   * @param a2 end angle\r\n   * @param counterclockwise\r\n   * @param style\r\n   * @param isClip\r\n   */\r\n  var drawArc = function(\r\n    x,\r\n    y,\r\n    r,\r\n    a1,\r\n    a2,\r\n    counterclockwise,\r\n    style,\r\n    isClip,\r\n    includeMove\r\n  ) {\r\n    // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html\r\n    var curves = createArc.call(this, r, a1, a2, counterclockwise);\r\n\r\n    for (var i = 0; i < curves.length; i++) {\r\n      var curve = curves[i];\r\n      if (i === 0) {\r\n        if (includeMove) {\r\n          doMove.call(this, curve.x1 + x, curve.y1 + y);\r\n        } else {\r\n          drawLine.call(this, curve.x1 + x, curve.y1 + y);\r\n        }\r\n      }\r\n      drawCurve.call(\r\n        this,\r\n        x,\r\n        y,\r\n        curve.x2,\r\n        curve.y2,\r\n        curve.x3,\r\n        curve.y3,\r\n        curve.x4,\r\n        curve.y4\r\n      );\r\n    }\r\n\r\n    if (!isClip) {\r\n      putStyle.call(this, style);\r\n    } else {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    switch (style) {\r\n      case \"stroke\":\r\n        this.pdf.internal.out(\"S\");\r\n        break;\r\n      case \"fill\":\r\n        this.pdf.internal.out(\"f\");\r\n        break;\r\n    }\r\n  };\r\n\r\n  var doClip = function() {\r\n    this.pdf.clip();\r\n    this.pdf.discardPath();\r\n  };\r\n\r\n  var doMove = function(x, y) {\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y) +\r\n        \" m\"\r\n    );\r\n  };\r\n\r\n  var putText = function(options) {\r\n    var textAlign;\r\n    switch (options.align) {\r\n      case \"right\":\r\n      case \"end\":\r\n        textAlign = \"right\";\r\n        break;\r\n      case \"center\":\r\n        textAlign = \"center\";\r\n        break;\r\n      case \"left\":\r\n      case \"start\":\r\n      default:\r\n        textAlign = \"left\";\r\n        break;\r\n    }\r\n\r\n    var textDimensions = this.pdf.getTextDimensions(options.text);\r\n    var yBaseLine = getBaseline.call(this, options.y);\r\n    var yBottom = getTextBottom.call(this, yBaseLine);\r\n    var yTop = yBottom - textDimensions.h;\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n\r\n    var baselineRect = this.ctx.transform.applyToRectangle(\r\n      new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h)\r\n    );\r\n    var textBounds = matrix.applyToRectangle(\r\n      new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h)\r\n    );\r\n    var pageArray = getPagesByPath.call(this, textBounds);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath, oldSize, oldLineWidth;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusBottomMargin =\r\n          this.pdf.internal.pageSize.height - this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          pageHeightMinusBottomMargin - this.margin[0];\r\n        var pageWidthMinusRightMargin =\r\n          this.pdf.internal.pageSize.width - this.margin[1];\r\n        var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -1 * previousPageHeightSum + topMargin\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var textBoundsOnPage = pathPositionRedo(\r\n          [JSON.parse(JSON.stringify(textBounds))],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        if (options.scale >= 0.01) {\r\n          oldSize = this.pdf.internal.getFontSize();\r\n          this.pdf.setFontSize(oldSize * options.scale);\r\n          oldLineWidth = this.lineWidth;\r\n          this.lineWidth = oldLineWidth * options.scale;\r\n        }\r\n\r\n        var doSlice = this.autoPaging !== \"text\";\r\n\r\n        if (\r\n          doSlice ||\r\n          textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin\r\n        ) {\r\n          if (\r\n            doSlice ||\r\n            (textBoundsOnPage.y >= topMargin &&\r\n              textBoundsOnPage.x <= pageWidthMinusRightMargin)\r\n          ) {\r\n            var croppedText = doSlice\r\n              ? options.text\r\n              : this.pdf.splitTextToSize(\r\n                  options.text,\r\n                  options.maxWidth ||\r\n                    pageWidthMinusRightMargin - textBoundsOnPage.x\r\n                )[0];\r\n            var baseLineRectOnPage = pathPositionRedo(\r\n              [JSON.parse(JSON.stringify(baselineRect))],\r\n              this.posX + this.margin[3],\r\n              -previousPageHeightSum +\r\n                topMargin +\r\n                this.ctx.prevPageLastElemOffset\r\n            )[0];\r\n\r\n            const needsClipping =\r\n              doSlice && (i > min || i < max) && hasMargins.call(this);\r\n\r\n            if (needsClipping) {\r\n              this.pdf.saveGraphicsState();\r\n              this.pdf\r\n                .rect(\r\n                  this.margin[3],\r\n                  this.margin[0],\r\n                  pageWidthMinusMargins,\r\n                  pageHeightMinusMargins,\r\n                  null\r\n                )\r\n                .clip()\r\n                .discardPath();\r\n            }\r\n\r\n            this.pdf.text(\r\n              croppedText,\r\n              baseLineRectOnPage.x,\r\n              baseLineRectOnPage.y,\r\n              {\r\n                angle: options.angle,\r\n                align: textAlign,\r\n                renderingMode: options.renderingMode\r\n              }\r\n            );\r\n\r\n            if (needsClipping) {\r\n              this.pdf.restoreGraphicsState();\r\n            }\r\n          }\r\n        } else {\r\n          // This text is the last element of the page, but it got cut off due to the margin\r\n          // so we render it in the next page\r\n\r\n          if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {\r\n            // As a result, all other elements have their y offset increased\r\n            this.ctx.prevPageLastElemOffset +=\r\n              pageHeightMinusBottomMargin - textBoundsOnPage.y;\r\n          }\r\n        }\r\n\r\n        if (options.scale >= 0.01) {\r\n          this.pdf.setFontSize(oldSize);\r\n          this.lineWidth = oldLineWidth;\r\n        }\r\n      }\r\n    } else {\r\n      if (options.scale >= 0.01) {\r\n        oldSize = this.pdf.internal.getFontSize();\r\n        this.pdf.setFontSize(oldSize * options.scale);\r\n        oldLineWidth = this.lineWidth;\r\n        this.lineWidth = oldLineWidth * options.scale;\r\n      }\r\n      this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {\r\n        angle: options.angle,\r\n        align: textAlign,\r\n        renderingMode: options.renderingMode,\r\n        maxWidth: options.maxWidth\r\n      });\r\n\r\n      if (options.scale >= 0.01) {\r\n        this.pdf.setFontSize(oldSize);\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    }\r\n  };\r\n\r\n  var drawLine = function(x, y, prevX, prevY) {\r\n    prevX = prevX || 0;\r\n    prevY = prevY || 0;\r\n\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x + prevX) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y + prevY) +\r\n        \" l\"\r\n    );\r\n  };\r\n\r\n  var drawLines = function(lines, x, y) {\r\n    return this.pdf.lines(lines, x, y, null, null);\r\n  };\r\n\r\n  var drawCurve = function(x, y, x1, y1, x2, y2, x3, y3) {\r\n    this.pdf.internal.out(\r\n      [\r\n        f2(getHorizontalCoordinate(x1 + x)),\r\n        f2(getVerticalCoordinate(y1 + y)),\r\n        f2(getHorizontalCoordinate(x2 + x)),\r\n        f2(getVerticalCoordinate(y2 + y)),\r\n        f2(getHorizontalCoordinate(x3 + x)),\r\n        f2(getVerticalCoordinate(y3 + y)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.\r\n   *\r\n   * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   * @function createArc\r\n   */\r\n  var createArc = function(radius, startAngle, endAngle, anticlockwise) {\r\n    var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below\r\n    var twoPi = Math.PI * 2;\r\n    var halfPi = Math.PI / 2.0;\r\n\r\n    while (startAngle > endAngle) {\r\n      startAngle = startAngle - twoPi;\r\n    }\r\n    var totalAngle = Math.abs(endAngle - startAngle);\r\n    if (totalAngle < twoPi) {\r\n      if (anticlockwise) {\r\n        totalAngle = twoPi - totalAngle;\r\n      }\r\n    }\r\n\r\n    // Compute the sequence of arc curves, up to PI/2 at a time.\r\n    var curves = [];\r\n\r\n    // clockwise or counterclockwise\r\n    var sgn = anticlockwise ? -1 : +1;\r\n\r\n    var a1 = startAngle;\r\n    for (; totalAngle > EPSILON; ) {\r\n      var remain = sgn * Math.min(totalAngle, halfPi);\r\n      var a2 = a1 + remain;\r\n      curves.push(createSmallArc.call(this, radius, a1, a2));\r\n      totalAngle -= Math.abs(a2 - a1);\r\n      a1 = a2;\r\n    }\r\n\r\n    return curves;\r\n  };\r\n\r\n  /**\r\n   * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.\r\n   *\r\n   * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   *\r\n   * This algorithm is based on the approach described in: A. Riškus, \"Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa,\" Information Technology and Control, 35(4), 2006 pp. 371-378.\r\n   */\r\n  var createSmallArc = function(r, a1, a2) {\r\n    var a = (a2 - a1) / 2.0;\r\n\r\n    var x4 = r * Math.cos(a);\r\n    var y4 = r * Math.sin(a);\r\n    var x1 = x4;\r\n    var y1 = -y4;\r\n\r\n    var q1 = x1 * x1 + y1 * y1;\r\n    var q2 = q1 + x1 * x4 + y1 * y4;\r\n    var k2 = ((4 / 3) * (Math.sqrt(2 * q1 * q2) - q2)) / (x1 * y4 - y1 * x4);\r\n\r\n    var x2 = x1 - k2 * y1;\r\n    var y2 = y1 + k2 * x1;\r\n    var x3 = x2;\r\n    var y3 = -y2;\r\n\r\n    var ar = a + a1;\r\n    var cos_ar = Math.cos(ar);\r\n    var sin_ar = Math.sin(ar);\r\n\r\n    return {\r\n      x1: r * Math.cos(a1),\r\n      y1: r * Math.sin(a1),\r\n      x2: x2 * cos_ar - y2 * sin_ar,\r\n      y2: x2 * sin_ar + y2 * cos_ar,\r\n      x3: x3 * cos_ar - y3 * sin_ar,\r\n      y3: x3 * sin_ar + y3 * cos_ar,\r\n      x4: r * Math.cos(a2),\r\n      y4: r * Math.sin(a2)\r\n    };\r\n  };\r\n\r\n  var rad2deg = function(value) {\r\n    return (value * 180) / Math.PI;\r\n  };\r\n\r\n  var getQuadraticCurveBoundary = function(sx, sy, cpx, cpy, ex, ey) {\r\n    var midX1 = sx + (cpx - sx) * 0.5;\r\n    var midY1 = sy + (cpy - sy) * 0.5;\r\n    var midX2 = ex + (cpx - ex) * 0.5;\r\n    var midY2 = ey + (cpy - ey) * 0.5;\r\n    var resultX1 = Math.min(sx, ex, midX1, midX2);\r\n    var resultX2 = Math.max(sx, ex, midX1, midX2);\r\n    var resultY1 = Math.min(sy, ey, midY1, midY2);\r\n    var resultY2 = Math.max(sy, ey, midY1, midY2);\r\n    return new Rectangle(\r\n      resultX1,\r\n      resultY1,\r\n      resultX2 - resultX1,\r\n      resultY2 - resultY1\r\n    );\r\n  };\r\n\r\n  //De Casteljau algorithm\r\n  var getBezierCurveBoundary = function(ax, ay, bx, by, cx, cy, dx, dy) {\r\n    var tobx = bx - ax;\r\n    var toby = by - ay;\r\n    var tocx = cx - bx;\r\n    var tocy = cy - by;\r\n    var todx = dx - cx;\r\n    var tody = dy - cy;\r\n    var precision = 40;\r\n    var d,\r\n      i,\r\n      px,\r\n      py,\r\n      qx,\r\n      qy,\r\n      rx,\r\n      ry,\r\n      tx,\r\n      ty,\r\n      sx,\r\n      sy,\r\n      x,\r\n      y,\r\n      minx,\r\n      miny,\r\n      maxx,\r\n      maxy,\r\n      toqx,\r\n      toqy,\r\n      torx,\r\n      tory,\r\n      totx,\r\n      toty;\r\n    for (i = 0; i < precision + 1; i++) {\r\n      d = i / precision;\r\n      px = ax + d * tobx;\r\n      py = ay + d * toby;\r\n      qx = bx + d * tocx;\r\n      qy = by + d * tocy;\r\n      rx = cx + d * todx;\r\n      ry = cy + d * tody;\r\n      toqx = qx - px;\r\n      toqy = qy - py;\r\n      torx = rx - qx;\r\n      tory = ry - qy;\r\n\r\n      sx = px + d * toqx;\r\n      sy = py + d * toqy;\r\n      tx = qx + d * torx;\r\n      ty = qy + d * tory;\r\n      totx = tx - sx;\r\n      toty = ty - sy;\r\n\r\n      x = sx + d * totx;\r\n      y = sy + d * toty;\r\n      if (i == 0) {\r\n        minx = x;\r\n        miny = y;\r\n        maxx = x;\r\n        maxy = y;\r\n      } else {\r\n        minx = Math.min(minx, x);\r\n        miny = Math.min(miny, y);\r\n        maxx = Math.max(maxx, x);\r\n        maxy = Math.max(maxy, y);\r\n      }\r\n    }\r\n    return new Rectangle(\r\n      Math.round(minx),\r\n      Math.round(miny),\r\n      Math.round(maxx - minx),\r\n      Math.round(maxy - miny)\r\n    );\r\n  };\r\n\r\n  var getPrevLineDashValue = function(lineDash, lineDashOffset) {\r\n    return JSON.stringify({\r\n      lineDash: lineDash,\r\n      lineDashOffset: lineDashOffset\r\n    });\r\n  };\r\n\r\n  var setLineDash = function() {\r\n    // Avoid unnecessary line dash declarations.\r\n    if (\r\n      !this.prevLineDash &&\r\n      !this.ctx.lineDash.length &&\r\n      !this.ctx.lineDashOffset\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    // Avoid unnecessary line dash declarations.\r\n    const nextLineDash = getPrevLineDashValue(\r\n      this.ctx.lineDash,\r\n      this.ctx.lineDashOffset\r\n    );\r\n    if (this.prevLineDash !== nextLineDash) {\r\n      this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);\r\n      this.prevLineDash = nextLineDash;\r\n    }\r\n  };\r\n})(jsPDF.API);\r\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n    var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n        c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n    ], { type: 'text/javascript' }))));\n    w.onmessage = function (e) {\n        var d = e.data, ed = d.$e$;\n        if (ed) {\n            var err = new Error(ed[0]);\n            err['code'] = ed[1];\n            err.stack = ed[2];\n            cb(err, null);\n        }\n        else\n            cb(null, d);\n    };\n    w.postMessage(msg, transfer);\n    return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, i32 = Int32Array;\n// fixed length extra bits\nvar fleb = new u8([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, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\nvar fdeb = new u8([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, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n    var b = new u16(31);\n    for (var i = 0; i < 31; ++i) {\n        b[i] = start += 1 << eb[i - 1];\n    }\n    // numbers here are at max 18 bits\n    var r = new i32(b[30]);\n    for (var i = 1; i < 30; ++i) {\n        for (var j = b[i]; j < b[i + 1]; ++j) {\n            r[j] = ((j - b[i]) << 5) | i;\n        }\n    }\n    return { b: b, r: r };\n};\nvar _a = freb(fleb, 2), fl = _a.b, revfl = _a.r;\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b.b, revfd = _b.r;\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n    // reverse table algorithm from SO\n    var x = ((i & 0xAAAA) >> 1) | ((i & 0x5555) << 1);\n    x = ((x & 0xCCCC) >> 2) | ((x & 0x3333) << 2);\n    x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4);\n    rev[i] = (((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8)) >> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n    var s = cd.length;\n    // index\n    var i = 0;\n    // u16 \"map\": index -> # of codes with bit length = index\n    var l = new u16(mb);\n    // length of cd must be 288 (total # of codes)\n    for (; i < s; ++i) {\n        if (cd[i])\n            ++l[cd[i] - 1];\n    }\n    // u16 \"map\": index -> minimum code for bit length = index\n    var le = new u16(mb);\n    for (i = 1; i < mb; ++i) {\n        le[i] = (le[i - 1] + l[i - 1]) << 1;\n    }\n    var co;\n    if (r) {\n        // u16 \"map\": index -> number of actual bits, symbol for code\n        co = new u16(1 << mb);\n        // bits to remove for reverser\n        var rvb = 15 - mb;\n        for (i = 0; i < s; ++i) {\n            // ignore 0 lengths\n            if (cd[i]) {\n                // num encoding both symbol and bits read\n                var sv = (i << 4) | cd[i];\n                // free bits\n                var r_1 = mb - cd[i];\n                // start value\n                var v = le[cd[i] - 1]++ << r_1;\n                // m is end value\n                for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n                    // every 16 bit value starting with the code yields the same result\n                    co[rev[v] >> rvb] = sv;\n                }\n            }\n        }\n    }\n    else {\n        co = new u16(s);\n        for (i = 0; i < s; ++i) {\n            if (cd[i]) {\n                co[i] = rev[le[cd[i] - 1]++] >> (15 - cd[i]);\n            }\n        }\n    }\n    return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n    flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n    flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n    flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n    flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n    fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n    var m = a[0];\n    for (var i = 1; i < a.length; ++i) {\n        if (a[i] > m)\n            m = a[i];\n    }\n    return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n    var o = (p / 8) | 0;\n    return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n    var o = (p / 8) | 0;\n    return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n    if (s == null || s < 0)\n        s = 0;\n    if (e == null || e > v.length)\n        e = v.length;\n    // can't use .constructor in case user-supplied\n    return new u8(v.subarray(s, e));\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n    UnexpectedEOF: 0,\n    InvalidBlockType: 1,\n    InvalidLengthLiteral: 2,\n    InvalidDistance: 3,\n    StreamFinished: 4,\n    NoStreamHandler: 5,\n    InvalidHeader: 6,\n    NoCallback: 7,\n    InvalidUTF8: 8,\n    ExtraFieldTooLong: 9,\n    InvalidDate: 10,\n    FilenameTooLong: 11,\n    StreamFinishing: 12,\n    InvalidZipData: 13,\n    UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n    'unexpected EOF',\n    'invalid block type',\n    'invalid length/literal',\n    'invalid distance',\n    'stream finished',\n    'no stream handler',\n    ,\n    'no callback',\n    'invalid UTF-8 data',\n    'extra field too long',\n    'date not in range 1980-2099',\n    'filename too long',\n    'stream finishing',\n    'invalid zip data'\n    // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n    var e = new Error(msg || ec[ind]);\n    e.code = ind;\n    if (Error.captureStackTrace)\n        Error.captureStackTrace(e, err);\n    if (!nt)\n        throw e;\n    return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, st, buf, dict) {\n    // source length       dict length\n    var sl = dat.length, dl = dict ? dict.length : 0;\n    if (!sl || st.f && !st.l)\n        return buf || new u8(0);\n    var noBuf = !buf;\n    // have to estimate size\n    var resize = noBuf || st.i != 2;\n    // no state\n    var noSt = st.i;\n    // Assumes roughly 33% compression ratio average\n    if (noBuf)\n        buf = new u8(sl * 3);\n    // ensure buffer can fit at least l elements\n    var cbuf = function (l) {\n        var bl = buf.length;\n        // need to increase size to fit\n        if (l > bl) {\n            // Double or set to necessary, whichever is greater\n            var nbuf = new u8(Math.max(bl * 2, l));\n            nbuf.set(buf);\n            buf = nbuf;\n        }\n    };\n    //  last chunk         bitpos           bytes\n    var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n    // total bits\n    var tbts = sl * 8;\n    do {\n        if (!lm) {\n            // BFINAL - this is only 1 when last chunk is next\n            final = bits(dat, pos, 1);\n            // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n            var type = bits(dat, pos + 1, 3);\n            pos += 3;\n            if (!type) {\n                // go to end of byte boundary\n                var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n                if (t > sl) {\n                    if (noSt)\n                        err(0);\n                    break;\n                }\n                // ensure size\n                if (resize)\n                    cbuf(bt + l);\n                // Copy over uncompressed data\n                buf.set(dat.subarray(s, t), bt);\n                // Get new bitpos, update byte count\n                st.b = bt += l, st.p = pos = t * 8, st.f = final;\n                continue;\n            }\n            else if (type == 1)\n                lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n            else if (type == 2) {\n                //  literal                            lengths\n                var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n                var tl = hLit + bits(dat, pos + 5, 31) + 1;\n                pos += 14;\n                // length+distance tree\n                var ldt = new u8(tl);\n                // code length tree\n                var clt = new u8(19);\n                for (var i = 0; i < hcLen; ++i) {\n                    // use index map to get real code\n                    clt[clim[i]] = bits(dat, pos + i * 3, 7);\n                }\n                pos += hcLen * 3;\n                // code lengths bits\n                var clb = max(clt), clbmsk = (1 << clb) - 1;\n                // code lengths map\n                var clm = hMap(clt, clb, 1);\n                for (var i = 0; i < tl;) {\n                    var r = clm[bits(dat, pos, clbmsk)];\n                    // bits read\n                    pos += r & 15;\n                    // symbol\n                    var s = r >> 4;\n                    // code length to copy\n                    if (s < 16) {\n                        ldt[i++] = s;\n                    }\n                    else {\n                        //  copy   count\n                        var c = 0, n = 0;\n                        if (s == 16)\n                            n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n                        else if (s == 17)\n                            n = 3 + bits(dat, pos, 7), pos += 3;\n                        else if (s == 18)\n                            n = 11 + bits(dat, pos, 127), pos += 7;\n                        while (n--)\n                            ldt[i++] = c;\n                    }\n                }\n                //    length tree                 distance tree\n                var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n                // max length bits\n                lbt = max(lt);\n                // max dist bits\n                dbt = max(dt);\n                lm = hMap(lt, lbt, 1);\n                dm = hMap(dt, dbt, 1);\n            }\n            else\n                err(1);\n            if (pos > tbts) {\n                if (noSt)\n                    err(0);\n                break;\n            }\n        }\n        // Make sure the buffer can hold this + the largest possible addition\n        // Maximum chunk size (practically, theoretically infinite) is 2^17\n        if (resize)\n            cbuf(bt + 131072);\n        var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n        var lpos = pos;\n        for (;; lpos = pos) {\n            // bits read, code\n            var c = lm[bits16(dat, pos) & lms], sym = c >> 4;\n            pos += c & 15;\n            if (pos > tbts) {\n                if (noSt)\n                    err(0);\n                break;\n            }\n            if (!c)\n                err(2);\n            if (sym < 256)\n                buf[bt++] = sym;\n            else if (sym == 256) {\n                lpos = pos, lm = null;\n                break;\n            }\n            else {\n                var add = sym - 254;\n                // no extra bits needed if less\n                if (sym > 264) {\n                    // index\n                    var i = sym - 257, b = fleb[i];\n                    add = bits(dat, pos, (1 << b) - 1) + fl[i];\n                    pos += b;\n                }\n                // dist\n                var d = dm[bits16(dat, pos) & dms], dsym = d >> 4;\n                if (!d)\n                    err(3);\n                pos += d & 15;\n                var dt = fd[dsym];\n                if (dsym > 3) {\n                    var b = fdeb[dsym];\n                    dt += bits16(dat, pos) & (1 << b) - 1, pos += b;\n                }\n                if (pos > tbts) {\n                    if (noSt)\n                        err(0);\n                    break;\n                }\n                if (resize)\n                    cbuf(bt + 131072);\n                var end = bt + add;\n                if (bt < dt) {\n                    var shift = dl - dt, dend = Math.min(dt, end);\n                    if (shift + bt < 0)\n                        err(3);\n                    for (; bt < dend; ++bt)\n                        buf[bt] = dict[shift + bt];\n                }\n                for (; bt < end; ++bt)\n                    buf[bt] = buf[bt - dt];\n            }\n        }\n        st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n        if (lm)\n            final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n    } while (!final);\n    // don't reallocate for streams or user buffers\n    return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n    v <<= p & 7;\n    var o = (p / 8) | 0;\n    d[o] |= v;\n    d[o + 1] |= v >> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n    v <<= p & 7;\n    var o = (p / 8) | 0;\n    d[o] |= v;\n    d[o + 1] |= v >> 8;\n    d[o + 2] |= v >> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n    // Need extra info to make a tree\n    var t = [];\n    for (var i = 0; i < d.length; ++i) {\n        if (d[i])\n            t.push({ s: i, f: d[i] });\n    }\n    var s = t.length;\n    var t2 = t.slice();\n    if (!s)\n        return { t: et, l: 0 };\n    if (s == 1) {\n        var v = new u8(t[0].s + 1);\n        v[t[0].s] = 1;\n        return { t: v, l: 1 };\n    }\n    t.sort(function (a, b) { return a.f - b.f; });\n    // after i2 reaches last ind, will be stopped\n    // freq must be greater than largest possible number of symbols\n    t.push({ s: -1, f: 25001 });\n    var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n    t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n    // efficient algorithm from UZIP.js\n    // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n    // symbols that combined have high freq, will start processing i2 (high-freq,\n    // non-composite) symbols instead\n    // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n    while (i1 != s - 1) {\n        l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n        r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n        t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n    }\n    var maxSym = t2[0].s;\n    for (var i = 1; i < s; ++i) {\n        if (t2[i].s > maxSym)\n            maxSym = t2[i].s;\n    }\n    // code lengths\n    var tr = new u16(maxSym + 1);\n    // max bits in tree\n    var mbt = ln(t[i1 - 1], tr, 0);\n    if (mbt > mb) {\n        // more algorithms from UZIP.js\n        // TODO: find out how this code works (debt)\n        //  ind    debt\n        var i = 0, dt = 0;\n        //    left            cost\n        var lft = mbt - mb, cst = 1 << lft;\n        t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n        for (; i < s; ++i) {\n            var i2_1 = t2[i].s;\n            if (tr[i2_1] > mb) {\n                dt += cst - (1 << (mbt - tr[i2_1]));\n                tr[i2_1] = mb;\n            }\n            else\n                break;\n        }\n        dt >>= lft;\n        while (dt > 0) {\n            var i2_2 = t2[i].s;\n            if (tr[i2_2] < mb)\n                dt -= 1 << (mb - tr[i2_2]++ - 1);\n            else\n                ++i;\n        }\n        for (; i >= 0 && dt; --i) {\n            var i2_3 = t2[i].s;\n            if (tr[i2_3] == mb) {\n                --tr[i2_3];\n                ++dt;\n            }\n        }\n        mbt = mb;\n    }\n    return { t: new u8(tr), l: mbt };\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n    return n.s == -1\n        ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n        : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n    var s = c.length;\n    // Note that the semicolon was intentional\n    while (s && !c[--s])\n        ;\n    var cl = new u16(++s);\n    //  ind      num         streak\n    var cli = 0, cln = c[0], cls = 1;\n    var w = function (v) { cl[cli++] = v; };\n    for (var i = 1; i <= s; ++i) {\n        if (c[i] == cln && i != s)\n            ++cls;\n        else {\n            if (!cln && cls > 2) {\n                for (; cls > 138; cls -= 138)\n                    w(32754);\n                if (cls > 2) {\n                    w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n                    cls = 0;\n                }\n            }\n            else if (cls > 3) {\n                w(cln), --cls;\n                for (; cls > 6; cls -= 6)\n                    w(8304);\n                if (cls > 2)\n                    w(((cls - 3) << 5) | 8208), cls = 0;\n            }\n            while (cls--)\n                w(cln);\n            cls = 1;\n            cln = c[i];\n        }\n    }\n    return { c: cl.subarray(0, cli), n: s };\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n    var l = 0;\n    for (var i = 0; i < cl.length; ++i)\n        l += cf[i] * cl[i];\n    return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n    // no need to write 00 as type: TypedArray defaults to 0\n    var s = dat.length;\n    var o = shft(pos + 2);\n    out[o] = s & 255;\n    out[o + 1] = s >> 8;\n    out[o + 2] = out[o] ^ 255;\n    out[o + 3] = out[o + 1] ^ 255;\n    for (var i = 0; i < s; ++i)\n        out[o + i + 4] = dat[i];\n    return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n    wbits(out, p++, final);\n    ++lf[256];\n    var _a = hTree(lf, 15), dlt = _a.t, mlb = _a.l;\n    var _b = hTree(df, 15), ddt = _b.t, mdb = _b.l;\n    var _c = lc(dlt), lclt = _c.c, nlc = _c.n;\n    var _d = lc(ddt), lcdt = _d.c, ndc = _d.n;\n    var lcfreq = new u16(19);\n    for (var i = 0; i < lclt.length; ++i)\n        ++lcfreq[lclt[i] & 31];\n    for (var i = 0; i < lcdt.length; ++i)\n        ++lcfreq[lcdt[i] & 31];\n    var _e = hTree(lcfreq, 7), lct = _e.t, mlcb = _e.l;\n    var nlcc = 19;\n    for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n        ;\n    var flen = (bl + 5) << 3;\n    var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n    var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];\n    if (bs >= 0 && flen <= ftlen && flen <= dtlen)\n        return wfblk(out, p, dat.subarray(bs, bs + bl));\n    var lm, ll, dm, dl;\n    wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n    if (dtlen < ftlen) {\n        lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n        var llm = hMap(lct, mlcb, 0);\n        wbits(out, p, nlc - 257);\n        wbits(out, p + 5, ndc - 1);\n        wbits(out, p + 10, nlcc - 4);\n        p += 14;\n        for (var i = 0; i < nlcc; ++i)\n            wbits(out, p + 3 * i, lct[clim[i]]);\n        p += 3 * nlcc;\n        var lcts = [lclt, lcdt];\n        for (var it = 0; it < 2; ++it) {\n            var clct = lcts[it];\n            for (var i = 0; i < clct.length; ++i) {\n                var len = clct[i] & 31;\n                wbits(out, p, llm[len]), p += lct[len];\n                if (len > 15)\n                    wbits(out, p, (clct[i] >> 5) & 127), p += clct[i] >> 12;\n            }\n        }\n    }\n    else {\n        lm = flm, ll = flt, dm = fdm, dl = fdt;\n    }\n    for (var i = 0; i < li; ++i) {\n        var sym = syms[i];\n        if (sym > 255) {\n            var len = (sym >> 18) & 31;\n            wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n            if (len > 7)\n                wbits(out, p, (sym >> 23) & 31), p += fleb[len];\n            var dst = sym & 31;\n            wbits16(out, p, dm[dst]), p += dl[dst];\n            if (dst > 3)\n                wbits16(out, p, (sym >> 5) & 8191), p += fdeb[dst];\n        }\n        else {\n            wbits16(out, p, lm[sym]), p += ll[sym];\n        }\n    }\n    wbits16(out, p, lm[256]);\n    return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, st) {\n    var s = st.z || dat.length;\n    var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n    // writing to this writes to the output buffer\n    var w = o.subarray(pre, o.length - post);\n    var lst = st.l;\n    var pos = (st.r || 0) & 7;\n    if (lvl) {\n        if (pos)\n            w[0] = st.r >> 3;\n        var opt = deo[lvl - 1];\n        var n = opt >> 13, c = opt & 8191;\n        var msk_1 = (1 << plvl) - 1;\n        //    prev 2-byte val map    curr 2-byte val map\n        var prev = st.p || new u16(32768), head = st.h || new u16(msk_1 + 1);\n        var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n        var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n        // 24576 is an arbitrary number of maximum symbols per block\n        // 424 buffer for last block\n        var syms = new i32(25000);\n        // length/literal freq   distance freq\n        var lf = new u16(288), df = new u16(32);\n        //  l/lcnt  exbits  index          l/lind  waitdx          blkpos\n        var lc_1 = 0, eb = 0, i = st.i || 0, li = 0, wi = st.w || 0, bs = 0;\n        for (; i + 2 < s; ++i) {\n            // hash value\n            var hv = hsh(i);\n            // index mod 32768    previous index mod\n            var imod = i & 32767, pimod = head[hv];\n            prev[imod] = pimod;\n            head[hv] = imod;\n            // We always should modify head and prev, but only add symbols if\n            // this data is not yet processed (\"wait\" for wait index)\n            if (wi <= i) {\n                // bytes remaining\n                var rem = s - i;\n                if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) {\n                    pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n                    li = lc_1 = eb = 0, bs = i;\n                    for (var j = 0; j < 286; ++j)\n                        lf[j] = 0;\n                    for (var j = 0; j < 30; ++j)\n                        df[j] = 0;\n                }\n                //  len    dist   chain\n                var l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767;\n                if (rem > 2 && hv == hsh(i - dif)) {\n                    var maxn = Math.min(n, rem) - 1;\n                    var maxd = Math.min(32767, i);\n                    // max possible length\n                    // not capped at dif because decompressors implement \"rolling\" index population\n                    var ml = Math.min(258, rem);\n                    while (dif <= maxd && --ch_1 && imod != pimod) {\n                        if (dat[i + l] == dat[i + l - dif]) {\n                            var nl = 0;\n                            for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n                                ;\n                            if (nl > l) {\n                                l = nl, d = dif;\n                                // break out early when we reach \"nice\" (we are satisfied enough)\n                                if (nl > maxn)\n                                    break;\n                                // now, find the rarest 2-byte sequence within this\n                                // length of literals and search for that instead.\n                                // Much faster than just using the start\n                                var mmd = Math.min(dif, nl - 2);\n                                var md = 0;\n                                for (var j = 0; j < mmd; ++j) {\n                                    var ti = i - dif + j & 32767;\n                                    var pti = prev[ti];\n                                    var cd = ti - pti & 32767;\n                                    if (cd > md)\n                                        md = cd, pimod = ti;\n                                }\n                            }\n                        }\n                        // check the previous match\n                        imod = pimod, pimod = prev[imod];\n                        dif += imod - pimod & 32767;\n                    }\n                }\n                // d will be nonzero only when a match was found\n                if (d) {\n                    // store both dist and len data in one int32\n                    // Make sure this is recognized as a len/dist with 28th bit (2^28)\n                    syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n                    var lin = revfl[l] & 31, din = revfd[d] & 31;\n                    eb += fleb[lin] + fdeb[din];\n                    ++lf[257 + lin];\n                    ++df[din];\n                    wi = i + l;\n                    ++lc_1;\n                }\n                else {\n                    syms[li++] = dat[i];\n                    ++lf[dat[i]];\n                }\n            }\n        }\n        for (i = Math.max(i, wi); i < s; ++i) {\n            syms[li++] = dat[i];\n            ++lf[dat[i]];\n        }\n        pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n        if (!lst) {\n            st.r = (pos & 7) | w[(pos / 8) | 0] << 3;\n            // shft(pos) now 1 less if pos & 7 != 0\n            pos -= 7;\n            st.h = head, st.p = prev, st.i = i, st.w = wi;\n        }\n    }\n    else {\n        for (var i = st.w || 0; i < s + lst; i += 65535) {\n            // end\n            var e = i + 65535;\n            if (e >= s) {\n                // write final block\n                w[(pos / 8) | 0] = lst;\n                e = s;\n            }\n            pos = wfblk(w, pos + 1, dat.subarray(i, e));\n        }\n        st.i = s;\n    }\n    return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n    var t = new Int32Array(256);\n    for (var i = 0; i < 256; ++i) {\n        var c = i, k = 9;\n        while (--k)\n            c = ((c & 1) && -306674912) ^ (c >>> 1);\n        t[i] = c;\n    }\n    return t;\n})();\n// CRC32\nvar crc = function () {\n    var c = -1;\n    return {\n        p: function (d) {\n            // closures have awful performance\n            var cr = c;\n            for (var i = 0; i < d.length; ++i)\n                cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n            c = cr;\n        },\n        d: function () { return ~c; }\n    };\n};\n// Adler32\nvar adler = function () {\n    var a = 1, b = 0;\n    return {\n        p: function (d) {\n            // closures have awful performance\n            var n = a, m = b;\n            var l = d.length | 0;\n            for (var i = 0; i != l;) {\n                var e = Math.min(i + 2655, l);\n                for (; i < e; ++i)\n                    m += n += d[i];\n                n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n            }\n            a = n, b = m;\n        },\n        d: function () {\n            a %= 65521, b %= 65521;\n            return (a & 255) << 24 | (a & 0xFF00) << 8 | (b & 255) << 8 | (b >> 8);\n        }\n    };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n    if (!st) {\n        st = { l: 1 };\n        if (opt.dictionary) {\n            var dict = opt.dictionary.subarray(-32768);\n            var newDat = new u8(dict.length + dat.length);\n            newDat.set(dict);\n            newDat.set(dat, dict.length);\n            dat = newDat;\n            st.w = dict.length;\n        }\n    }\n    return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n    var o = {};\n    for (var k in a)\n        o[k] = a[k];\n    for (var k in b)\n        o[k] = b[k];\n    return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n    var dt = fn();\n    var st = fn.toString();\n    var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n    for (var i = 0; i < dt.length; ++i) {\n        var v = dt[i], k = ks[i];\n        if (typeof v == 'function') {\n            fnStr += ';' + k + '=';\n            var st_1 = v.toString();\n            if (v.prototype) {\n                // for global objects\n                if (st_1.indexOf('[native code]') != -1) {\n                    var spInd = st_1.indexOf(' ', 8) + 1;\n                    fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n                }\n                else {\n                    fnStr += st_1;\n                    for (var t in v.prototype)\n                        fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n                }\n            }\n            else\n                fnStr += st_1;\n        }\n        else\n            td[k] = v;\n    }\n    return fnStr;\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n    var tl = [];\n    for (var k in v) {\n        if (v[k].buffer) {\n            tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n        }\n    }\n    return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n    if (!ch[id]) {\n        var fnStr = '', td_1 = {}, m = fns.length - 1;\n        for (var i = 0; i < m; ++i)\n            fnStr = wcln(fns[i], fnStr, td_1);\n        ch[id] = { c: wcln(fns[m], fnStr, td_1), e: td_1 };\n    }\n    var td = mrg({}, ch[id].e);\n    return wk(ch[id].c + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, i32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gopt]; };\nvar bDflt = function () { return [u8, u16, i32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zls]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get opts\nvar gopt = function (o) { return o && {\n    out: o.size && new u8(o.size),\n    dictionary: o.dictionary\n}; };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n    var w = wrkr(fns, init, id, function (err, dat) {\n        w.terminate();\n        cb(err, dat);\n    });\n    w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n    return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n    strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n    return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id, ext) {\n    var t;\n    var w = wrkr(fns, init, id, function (err, dat) {\n        if (err)\n            w.terminate(), strm.ondata.call(strm, err);\n        else if (!Array.isArray(dat))\n            ext(dat);\n        else {\n            if (dat[1])\n                w.terminate();\n            strm.ondata.call(strm, err, dat[0], dat[1]);\n        }\n    });\n    w.postMessage(opts);\n    strm.push = function (d, f) {\n        if (!strm.ondata)\n            err(5);\n        if (t)\n            strm.ondata(err(4, 0, 1), null, !!f);\n        w.postMessage([d, t = f], [d.buffer]);\n    };\n    strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n    for (; v; ++b)\n        d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n    var fn = o.filename;\n    c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n    if (o.mtime != 0)\n        wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n    if (fn) {\n        c[3] = 8;\n        for (var i = 0; i <= fn.length; ++i)\n            c[i + 10] = fn.charCodeAt(i);\n    }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n    if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n        err(6, 'invalid gzip data');\n    var flg = d[3];\n    var st = 10;\n    if (flg & 4)\n        st += (d[10] | d[11] << 8) + 2;\n    for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n        ;\n    return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n    var l = d.length;\n    return (d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16 | d[l - 1] << 24) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + (o.filename ? o.filename.length + 1 : 0); };\n// zlib header\nvar zlh = function (c, o) {\n    var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n    c[0] = 120, c[1] = (fl << 6) | (o.dictionary && 32);\n    c[1] |= 31 - ((c[0] << 8) | c[1]) % 31;\n    if (o.dictionary) {\n        var h = adler();\n        h.p(o.dictionary);\n        wbytes(c, 2, h.d());\n    }\n};\n// zlib start\nvar zls = function (d, dict) {\n    if ((d[0] & 15) != 8 || (d[0] >> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n        err(6, 'invalid zlib data');\n    if ((d[1] >> 5 & 1) == +!dict)\n        err(6, 'invalid zlib data: ' + (d[1] & 32 ? 'need' : 'unexpected') + ' dictionary');\n    return (d[1] >> 3 & 4) + 2;\n};\nfunction StrmOpt(opts, cb) {\n    if (typeof opts == 'function')\n        cb = opts, opts = {};\n    this.ondata = cb;\n    return opts;\n}\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n    function Deflate(opts, cb) {\n        if (typeof opts == 'function')\n            cb = opts, opts = {};\n        this.ondata = cb;\n        this.o = opts || {};\n        this.s = { l: 0, i: 32768, w: 32768, z: 32768 };\n        // Buffer length must always be 0 mod 32768 for index calculations to be correct when modifying head and prev\n        // 98304 = 32768 (lookback) + 65536 (common chunk size)\n        this.b = new u8(98304);\n        if (this.o.dictionary) {\n            var dict = this.o.dictionary.subarray(-32768);\n            this.b.set(dict, 32768 - dict.length);\n            this.s.i = 32768 - dict.length;\n        }\n    }\n    Deflate.prototype.p = function (c, f) {\n        this.ondata(dopt(c, this.o, 0, 0, this.s), f);\n    };\n    /**\n     * Pushes a chunk to be deflated\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Deflate.prototype.push = function (chunk, final) {\n        if (!this.ondata)\n            err(5);\n        if (this.s.l)\n            err(4);\n        var endLen = chunk.length + this.s.z;\n        if (endLen > this.b.length) {\n            if (endLen > 2 * this.b.length - 32768) {\n                var newBuf = new u8(endLen & -32768);\n                newBuf.set(this.b.subarray(0, this.s.z));\n                this.b = newBuf;\n            }\n            var split = this.b.length - this.s.z;\n            if (split) {\n                this.b.set(chunk.subarray(0, split), this.s.z);\n                this.s.z = this.b.length;\n                this.p(this.b, false);\n            }\n            this.b.set(this.b.subarray(-32768));\n            this.b.set(chunk.subarray(split), 32768);\n            this.s.z = chunk.length - split + 32768;\n            this.s.i = 32766, this.s.w = 32768;\n        }\n        else {\n            this.b.set(chunk, this.s.z);\n            this.s.z += chunk.length;\n        }\n        this.s.l = final & 1;\n        if (this.s.z > this.s.w + 8191 || final) {\n            this.p(this.b, final || false);\n            this.s.w = this.s.i, this.s.i -= 2;\n        }\n    };\n    return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n    function AsyncDeflate(opts, cb) {\n        astrmify([\n            bDflt,\n            function () { return [astrm, Deflate]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Deflate(ev.data);\n            onmessage = astrm(strm);\n        }, 6);\n    }\n    return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bDflt,\n    ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n    return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n    function Inflate(opts, cb) {\n        // no StrmOpt here to avoid adding to workerizer\n        if (typeof opts == 'function')\n            cb = opts, opts = {};\n        this.ondata = cb;\n        var dict = opts && opts.dictionary && opts.dictionary.subarray(-32768);\n        this.s = { i: 0, b: dict ? dict.length : 0 };\n        this.o = new u8(32768);\n        this.p = new u8(0);\n        if (dict)\n            this.o.set(dict);\n    }\n    Inflate.prototype.e = function (c) {\n        if (!this.ondata)\n            err(5);\n        if (this.d)\n            err(4);\n        if (!this.p.length)\n            this.p = c;\n        else if (c.length) {\n            var n = new u8(this.p.length + c.length);\n            n.set(this.p), n.set(c, this.p.length), this.p = n;\n        }\n    };\n    Inflate.prototype.c = function (final) {\n        this.s.i = +(this.d = final || false);\n        var bts = this.s.b;\n        var dt = inflt(this.p, this.s, this.o);\n        this.ondata(slc(dt, bts, this.s.b), this.d);\n        this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n        this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n    };\n    /**\n     * Pushes a chunk to be inflated\n     * @param chunk The chunk to push\n     * @param final Whether this is the final chunk\n     */\n    Inflate.prototype.push = function (chunk, final) {\n        this.e(chunk), this.c(final);\n    };\n    return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n    function AsyncInflate(opts, cb) {\n        astrmify([\n            bInflt,\n            function () { return [astrm, Inflate]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Inflate(ev.data);\n            onmessage = astrm(strm);\n        }, 7);\n    }\n    return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bInflt\n    ], function (ev) { return pbf(inflateSync(ev.data[0], gopt(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, opts) {\n    return inflt(data, { i: 2 }, opts && opts.out, opts && opts.dictionary);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n    function Gzip(opts, cb) {\n        this.c = crc();\n        this.l = 0;\n        this.v = 1;\n        Deflate.call(this, opts, cb);\n    }\n    /**\n     * Pushes a chunk to be GZIPped\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Gzip.prototype.push = function (chunk, final) {\n        this.c.p(chunk);\n        this.l += chunk.length;\n        Deflate.prototype.push.call(this, chunk, final);\n    };\n    Gzip.prototype.p = function (c, f) {\n        var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, this.s);\n        if (this.v)\n            gzh(raw, this.o), this.v = 0;\n        if (f)\n            wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n        this.ondata(raw, f);\n    };\n    return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n    function AsyncGzip(opts, cb) {\n        astrmify([\n            bDflt,\n            gze,\n            function () { return [astrm, Deflate, Gzip]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Gzip(ev.data);\n            onmessage = astrm(strm);\n        }, 8);\n    }\n    return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bDflt,\n        gze,\n        function () { return [gzipSync]; }\n    ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n    if (!opts)\n        opts = {};\n    var c = crc(), l = data.length;\n    c.p(data);\n    var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n    return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming single or multi-member GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n    function Gunzip(opts, cb) {\n        this.v = 1;\n        this.r = 0;\n        Inflate.call(this, opts, cb);\n    }\n    /**\n     * Pushes a chunk to be GUNZIPped\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Gunzip.prototype.push = function (chunk, final) {\n        Inflate.prototype.e.call(this, chunk);\n        this.r += chunk.length;\n        if (this.v) {\n            var p = this.p.subarray(this.v - 1);\n            var s = p.length > 3 ? gzs(p) : 4;\n            if (s > p.length) {\n                if (!final)\n                    return;\n            }\n            else if (this.v > 1 && this.onmember) {\n                this.onmember(this.r - p.length);\n            }\n            this.p = p.subarray(s), this.v = 0;\n        }\n        // necessary to prevent TS from using the closure value\n        // This allows for workerization to function correctly\n        Inflate.prototype.c.call(this, final);\n        // process concatenated GZIP\n        if (this.s.f && !this.s.l) {\n            this.v = shft(this.s.p) + 9;\n            this.s = { i: 0 };\n            this.o = new u8(0);\n            if (this.p.length)\n                this.push(new u8(0), final);\n        }\n    };\n    return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming single or multi-member GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n    function AsyncGunzip(opts, cb) {\n        var _this_1 = this;\n        astrmify([\n            bInflt,\n            guze,\n            function () { return [astrm, Inflate, Gunzip]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Gunzip(ev.data);\n            strm.onmember = function (offset) { return postMessage(offset); };\n            onmessage = astrm(strm);\n        }, 9, function (offset) { return _this_1.onmember && _this_1.onmember(offset); });\n    }\n    return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bInflt,\n        guze,\n        function () { return [gunzipSync]; }\n    ], function (ev) { return pbf(gunzipSync(ev.data[0], ev.data[1])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, opts) {\n    var st = gzs(data);\n    if (st + 8 > data.length)\n        err(6, 'invalid gzip data');\n    return inflt(data.subarray(st, -8), { i: 2 }, opts && opts.out || new u8(gzl(data)), opts && opts.dictionary);\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n    function Zlib(opts, cb) {\n        this.c = adler();\n        this.v = 1;\n        Deflate.call(this, opts, cb);\n    }\n    /**\n     * Pushes a chunk to be zlibbed\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Zlib.prototype.push = function (chunk, final) {\n        this.c.p(chunk);\n        Deflate.prototype.push.call(this, chunk, final);\n    };\n    Zlib.prototype.p = function (c, f) {\n        var raw = dopt(c, this.o, this.v && (this.o.dictionary ? 6 : 2), f && 4, this.s);\n        if (this.v)\n            zlh(raw, this.o), this.v = 0;\n        if (f)\n            wbytes(raw, raw.length - 4, this.c.d());\n        this.ondata(raw, f);\n    };\n    return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n    function AsyncZlib(opts, cb) {\n        astrmify([\n            bDflt,\n            zle,\n            function () { return [astrm, Deflate, Zlib]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Zlib(ev.data);\n            onmessage = astrm(strm);\n        }, 10);\n    }\n    return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bDflt,\n        zle,\n        function () { return [zlibSync]; }\n    ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n    if (!opts)\n        opts = {};\n    var a = adler();\n    a.p(data);\n    var d = dopt(data, opts, opts.dictionary ? 6 : 2, 4);\n    return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n    function Unzlib(opts, cb) {\n        Inflate.call(this, opts, cb);\n        this.v = opts && opts.dictionary ? 2 : 1;\n    }\n    /**\n     * Pushes a chunk to be unzlibbed\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Unzlib.prototype.push = function (chunk, final) {\n        Inflate.prototype.e.call(this, chunk);\n        if (this.v) {\n            if (this.p.length < 6 && !final)\n                return;\n            this.p = this.p.subarray(zls(this.p, this.v - 1)), this.v = 0;\n        }\n        if (final) {\n            if (this.p.length < 4)\n                err(6, 'invalid zlib data');\n            this.p = this.p.subarray(0, -4);\n        }\n        // necessary to prevent TS from using the closure value\n        // This allows for workerization to function correctly\n        Inflate.prototype.c.call(this, final);\n    };\n    return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n    function AsyncUnzlib(opts, cb) {\n        astrmify([\n            bInflt,\n            zule,\n            function () { return [astrm, Inflate, Unzlib]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Unzlib(ev.data);\n            onmessage = astrm(strm);\n        }, 11);\n    }\n    return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bInflt,\n        zule,\n        function () { return [unzlibSync]; }\n    ], function (ev) { return pbf(unzlibSync(ev.data[0], gopt(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, opts) {\n    return inflt(data.subarray(zls(data, opts && opts.dictionary), -4), { i: 2 }, opts && opts.out, opts && opts.dictionary);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n    function Decompress(opts, cb) {\n        this.G = Gunzip;\n        this.I = Inflate;\n        this.Z = Unzlib;\n        this.o = StrmOpt.call(this, opts, cb) || {};\n    }\n    /**\n     * Pushes a chunk to be decompressed\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Decompress.prototype.push = function (chunk, final) {\n        if (!this.ondata)\n            err(5);\n        if (!this.s) {\n            if (this.p && this.p.length) {\n                var n = new u8(this.p.length + chunk.length);\n                n.set(this.p), n.set(chunk, this.p.length);\n            }\n            else\n                this.p = chunk;\n            if (this.p.length > 2) {\n                var _this_2 = this;\n                // enables reuse of this method by AsyncDecompress\n                var cb = function () { _this_2.ondata.apply(_this_2, arguments); };\n                this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n                    ? new this.G(this.o, cb)\n                    : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n                        ? new this.I(this.o, cb)\n                        : new this.Z(this.o, cb);\n                this.s.push(this.p, final);\n                this.p = null;\n            }\n        }\n        else\n            this.s.push(chunk, final);\n    };\n    return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n    function AsyncDecompress(opts, cb) {\n        this.G = AsyncGunzip;\n        this.I = AsyncInflate;\n        this.Z = AsyncUnzlib;\n        Decompress.call(this, opts, cb);\n    }\n    /**\n     * Pushes a chunk to be decompressed\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    AsyncDecompress.prototype.push = function (chunk, final) {\n        Decompress.prototype.push.call(this, chunk, final);\n    };\n    return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n        ? gunzip(data, opts, cb)\n        : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n            ? inflate(data, opts, cb)\n            : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, opts) {\n    return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n        ? gunzipSync(data, opts)\n        : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n            ? inflateSync(data, opts)\n            : unzlibSync(data, opts);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n    for (var k in d) {\n        var val = d[k], n = p + k, op = o;\n        if (Array.isArray(val))\n            op = mrg(o, val[1]), val = val[0];\n        if (val instanceof u8)\n            t[n] = [val, op];\n        else {\n            t[n += '/'] = [new u8(0), op];\n            fltn(val, n, t, o);\n        }\n    }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n    td.decode(et, { stream: true });\n    tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n    for (var r = '', i = 0;;) {\n        var c = d[i++];\n        var eb = (c > 127) + (c > 223) + (c > 239);\n        if (i + eb > d.length)\n            return { s: r, r: slc(d, i - 1) };\n        if (!eb)\n            r += String.fromCharCode(c);\n        else if (eb == 3) {\n            c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n                r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n        }\n        else if (eb & 1)\n            r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n        else\n            r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n    }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n    /**\n     * Creates a UTF-8 decoding stream\n     * @param cb The callback to call whenever data is decoded\n     */\n    function DecodeUTF8(cb) {\n        this.ondata = cb;\n        if (tds)\n            this.t = new TextDecoder();\n        else\n            this.p = et;\n    }\n    /**\n     * Pushes a chunk to be decoded from UTF-8 binary\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    DecodeUTF8.prototype.push = function (chunk, final) {\n        if (!this.ondata)\n            err(5);\n        final = !!final;\n        if (this.t) {\n            this.ondata(this.t.decode(chunk, { stream: true }), final);\n            if (final) {\n                if (this.t.decode().length)\n                    err(8);\n                this.t = null;\n            }\n            return;\n        }\n        if (!this.p)\n            err(4);\n        var dat = new u8(this.p.length + chunk.length);\n        dat.set(this.p);\n        dat.set(chunk, this.p.length);\n        var _a = dutf8(dat), s = _a.s, r = _a.r;\n        if (final) {\n            if (r.length)\n                err(8);\n            this.p = null;\n        }\n        else\n            this.p = r;\n        this.ondata(s, final);\n    };\n    return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n    /**\n     * Creates a UTF-8 decoding stream\n     * @param cb The callback to call whenever data is encoded\n     */\n    function EncodeUTF8(cb) {\n        this.ondata = cb;\n    }\n    /**\n     * Pushes a chunk to be encoded to UTF-8\n     * @param chunk The string data to push\n     * @param final Whether this is the last chunk\n     */\n    EncodeUTF8.prototype.push = function (chunk, final) {\n        if (!this.ondata)\n            err(5);\n        if (this.d)\n            err(4);\n        this.ondata(strToU8(chunk), this.d = final || false);\n    };\n    return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n *               not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n    if (latin1) {\n        var ar_1 = new u8(str.length);\n        for (var i = 0; i < str.length; ++i)\n            ar_1[i] = str.charCodeAt(i);\n        return ar_1;\n    }\n    if (te)\n        return te.encode(str);\n    var l = str.length;\n    var ar = new u8(str.length + (str.length >> 1));\n    var ai = 0;\n    var w = function (v) { ar[ai++] = v; };\n    for (var i = 0; i < l; ++i) {\n        if (ai + 5 > ar.length) {\n            var n = new u8(ai + 8 + ((l - i) << 1));\n            n.set(ar);\n            ar = n;\n        }\n        var c = str.charCodeAt(i);\n        if (c < 128 || latin1)\n            w(c);\n        else if (c < 2048)\n            w(192 | (c >> 6)), w(128 | (c & 63));\n        else if (c > 55295 && c < 57344)\n            c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n                w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n        else\n            w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n    }\n    return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n *               not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n    if (latin1) {\n        var r = '';\n        for (var i = 0; i < dat.length; i += 16384)\n            r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n        return r;\n    }\n    else if (td) {\n        return td.decode(dat);\n    }\n    else {\n        var _a = dutf8(dat), s = _a.s, r = _a.r;\n        if (r.length)\n            err(8);\n        return s;\n    }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n    var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n    var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n    return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n    for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n        ;\n    return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n    var le = 0;\n    if (ex) {\n        for (var k in ex) {\n            var l = ex[k].length;\n            if (l > 65535)\n                err(9);\n            le += l + 4;\n        }\n    }\n    return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n    var fl = fn.length, ex = f.extra, col = co && co.length;\n    var exl = exfl(ex);\n    wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n    if (ce != null)\n        d[b++] = 20, d[b++] = f.os;\n    d[b] = 20, b += 2; // spec compliance? what's that?\n    d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8;\n    d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n    var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n    if (y < 0 || y > 119)\n        err(10);\n    wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >> 1)), b += 4;\n    if (c != -1) {\n        wbytes(d, b, f.crc);\n        wbytes(d, b + 4, c < 0 ? -c - 2 : c);\n        wbytes(d, b + 8, f.size);\n    }\n    wbytes(d, b + 12, fl);\n    wbytes(d, b + 14, exl), b += 16;\n    if (ce != null) {\n        wbytes(d, b, col);\n        wbytes(d, b + 6, f.attrs);\n        wbytes(d, b + 10, ce), b += 14;\n    }\n    d.set(fn, b);\n    b += fl;\n    if (exl) {\n        for (var k in ex) {\n            var exf = ex[k], l = exf.length;\n            wbytes(d, b, +k);\n            wbytes(d, b + 2, l);\n            d.set(exf, b + 4), b += 4 + l;\n        }\n    }\n    if (col)\n        d.set(co, b), b += col;\n    return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n    wbytes(o, b, 0x6054B50); // skip disk\n    wbytes(o, b + 8, c);\n    wbytes(o, b + 10, c);\n    wbytes(o, b + 12, d);\n    wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n    /**\n     * Creates a pass-through stream that can be added to ZIP archives\n     * @param filename The filename to associate with this data stream\n     */\n    function ZipPassThrough(filename) {\n        this.filename = filename;\n        this.c = crc();\n        this.size = 0;\n        this.compression = 0;\n    }\n    /**\n     * Processes a chunk and pushes to the output stream. You can override this\n     * method in a subclass for custom behavior, but by default this passes\n     * the data through. You must call this.ondata(err, chunk, final) at some\n     * point in this method.\n     * @param chunk The chunk to process\n     * @param final Whether this is the last chunk\n     */\n    ZipPassThrough.prototype.process = function (chunk, final) {\n        this.ondata(null, chunk, final);\n    };\n    /**\n     * Pushes a chunk to be added. If you are subclassing this with a custom\n     * compression algorithm, note that you must push data from the source\n     * file only, pre-compression.\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    ZipPassThrough.prototype.push = function (chunk, final) {\n        if (!this.ondata)\n            err(5);\n        this.c.p(chunk);\n        this.size += chunk.length;\n        if (final)\n            this.crc = this.c.d();\n        this.process(chunk, final || false);\n    };\n    return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n    /**\n     * Creates a DEFLATE stream that can be added to ZIP archives\n     * @param filename The filename to associate with this data stream\n     * @param opts The compression options\n     */\n    function ZipDeflate(filename, opts) {\n        var _this_1 = this;\n        if (!opts)\n            opts = {};\n        ZipPassThrough.call(this, filename);\n        this.d = new Deflate(opts, function (dat, final) {\n            _this_1.ondata(null, dat, final);\n        });\n        this.compression = 8;\n        this.flag = dbf(opts.level);\n    }\n    ZipDeflate.prototype.process = function (chunk, final) {\n        try {\n            this.d.push(chunk, final);\n        }\n        catch (e) {\n            this.ondata(e, null, final);\n        }\n    };\n    /**\n     * Pushes a chunk to be deflated\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    ZipDeflate.prototype.push = function (chunk, final) {\n        ZipPassThrough.prototype.push.call(this, chunk, final);\n    };\n    return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n    /**\n     * Creates an asynchronous DEFLATE stream that can be added to ZIP archives\n     * @param filename The filename to associate with this data stream\n     * @param opts The compression options\n     */\n    function AsyncZipDeflate(filename, opts) {\n        var _this_1 = this;\n        if (!opts)\n            opts = {};\n        ZipPassThrough.call(this, filename);\n        this.d = new AsyncDeflate(opts, function (err, dat, final) {\n            _this_1.ondata(err, dat, final);\n        });\n        this.compression = 8;\n        this.flag = dbf(opts.level);\n        this.terminate = this.d.terminate;\n    }\n    AsyncZipDeflate.prototype.process = function (chunk, final) {\n        this.d.push(chunk, final);\n    };\n    /**\n     * Pushes a chunk to be deflated\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    AsyncZipDeflate.prototype.push = function (chunk, final) {\n        ZipPassThrough.prototype.push.call(this, chunk, final);\n    };\n    return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n    /**\n     * Creates an empty ZIP archive to which files can be added\n     * @param cb The callback to call whenever data for the generated ZIP archive\n     *           is available\n     */\n    function Zip(cb) {\n        this.ondata = cb;\n        this.u = [];\n        this.d = 1;\n    }\n    /**\n     * Adds a file to the ZIP archive\n     * @param file The file stream to add\n     */\n    Zip.prototype.add = function (file) {\n        var _this_1 = this;\n        if (!this.ondata)\n            err(5);\n        // finishing or finished\n        if (this.d & 2)\n            this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n        else {\n            var f = strToU8(file.filename), fl_1 = f.length;\n            var com = file.comment, o = com && strToU8(com);\n            var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n            var hl_1 = fl_1 + exfl(file.extra) + 30;\n            if (fl_1 > 65535)\n                this.ondata(err(11, 0, 1), null, false);\n            var header = new u8(hl_1);\n            wzh(header, 0, file, f, u, -1);\n            var chks_1 = [header];\n            var pAll_1 = function () {\n                for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n                    var chk = chks_2[_i];\n                    _this_1.ondata(null, chk, false);\n                }\n                chks_1 = [];\n            };\n            var tr_1 = this.d;\n            this.d = 0;\n            var ind_1 = this.u.length;\n            var uf_1 = mrg(file, {\n                f: f,\n                u: u,\n                o: o,\n                t: function () {\n                    if (file.terminate)\n                        file.terminate();\n                },\n                r: function () {\n                    pAll_1();\n                    if (tr_1) {\n                        var nxt = _this_1.u[ind_1 + 1];\n                        if (nxt)\n                            nxt.r();\n                        else\n                            _this_1.d = 1;\n                    }\n                    tr_1 = 1;\n                }\n            });\n            var cl_1 = 0;\n            file.ondata = function (err, dat, final) {\n                if (err) {\n                    _this_1.ondata(err, dat, final);\n                    _this_1.terminate();\n                }\n                else {\n                    cl_1 += dat.length;\n                    chks_1.push(dat);\n                    if (final) {\n                        var dd = new u8(16);\n                        wbytes(dd, 0, 0x8074B50);\n                        wbytes(dd, 4, file.crc);\n                        wbytes(dd, 8, cl_1);\n                        wbytes(dd, 12, file.size);\n                        chks_1.push(dd);\n                        uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n                        if (tr_1)\n                            uf_1.r();\n                        tr_1 = 1;\n                    }\n                    else if (tr_1)\n                        pAll_1();\n                }\n            };\n            this.u.push(uf_1);\n        }\n    };\n    /**\n     * Ends the process of adding files and prepares to emit the final chunks.\n     * This *must* be called after adding all desired files for the resulting\n     * ZIP file to work properly.\n     */\n    Zip.prototype.end = function () {\n        var _this_1 = this;\n        if (this.d & 2) {\n            this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n            return;\n        }\n        if (this.d)\n            this.e();\n        else\n            this.u.push({\n                r: function () {\n                    if (!(_this_1.d & 1))\n                        return;\n                    _this_1.u.splice(-1, 1);\n                    _this_1.e();\n                },\n                t: function () { }\n            });\n        this.d = 3;\n    };\n    Zip.prototype.e = function () {\n        var bt = 0, l = 0, tl = 0;\n        for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n            var f = _a[_i];\n            tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n        }\n        var out = new u8(tl + 22);\n        for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n            var f = _c[_b];\n            wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o);\n            bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n        }\n        wzf(out, bt, this.u.length, tl, l);\n        this.ondata(null, out, true);\n        this.d = 2;\n    };\n    /**\n     * A method to terminate any internal workers used by the stream. Subsequent\n     * calls to add() will fail.\n     */\n    Zip.prototype.terminate = function () {\n        for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n            var f = _a[_i];\n            f.t();\n        }\n        this.d = 2;\n    };\n    return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    var r = {};\n    fltn(data, '', r, opts);\n    var k = Object.keys(r);\n    var lft = k.length, o = 0, tot = 0;\n    var slft = lft, files = new Array(lft);\n    var term = [];\n    var tAll = function () {\n        for (var i = 0; i < term.length; ++i)\n            term[i]();\n    };\n    var cbd = function (a, b) {\n        mt(function () { cb(a, b); });\n    };\n    mt(function () { cbd = cb; });\n    var cbf = function () {\n        var out = new u8(tot + 22), oe = o, cdl = tot - o;\n        tot = 0;\n        for (var i = 0; i < slft; ++i) {\n            var f = files[i];\n            try {\n                var l = f.c.length;\n                wzh(out, tot, f, f.f, f.u, l);\n                var badd = 30 + f.f.length + exfl(f.extra);\n                var loc = tot + badd;\n                out.set(f.c, loc);\n                wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n            }\n            catch (e) {\n                return cbd(e, null);\n            }\n        }\n        wzf(out, o, files.length, cdl, oe);\n        cbd(null, out);\n    };\n    if (!lft)\n        cbf();\n    var _loop_1 = function (i) {\n        var fn = k[i];\n        var _a = r[fn], file = _a[0], p = _a[1];\n        var c = crc(), size = file.length;\n        c.p(file);\n        var f = strToU8(fn), s = f.length;\n        var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n        var exl = exfl(p.extra);\n        var compression = p.level == 0 ? 0 : 8;\n        var cbl = function (e, d) {\n            if (e) {\n                tAll();\n                cbd(e, null);\n            }\n            else {\n                var l = d.length;\n                files[i] = mrg(p, {\n                    size: size,\n                    crc: c.d(),\n                    c: d,\n                    f: f,\n                    m: m,\n                    u: s != fn.length || (m && (com.length != ms)),\n                    compression: compression\n                });\n                o += 30 + s + exl + l;\n                tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n                if (!--lft)\n                    cbf();\n            }\n        };\n        if (s > 65535)\n            cbl(err(11, 0, 1), null);\n        if (!compression)\n            cbl(null, file);\n        else if (size < 160000) {\n            try {\n                cbl(null, deflateSync(file, p));\n            }\n            catch (e) {\n                cbl(e, null);\n            }\n        }\n        else\n            term.push(deflate(file, p, cbl));\n    };\n    // Cannot use lft because it can decrease\n    for (var i = 0; i < slft; ++i) {\n        _loop_1(i);\n    }\n    return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n    if (!opts)\n        opts = {};\n    var r = {};\n    var files = [];\n    fltn(data, '', r, opts);\n    var o = 0;\n    var tot = 0;\n    for (var fn in r) {\n        var _a = r[fn], file = _a[0], p = _a[1];\n        var compression = p.level == 0 ? 0 : 8;\n        var f = strToU8(fn), s = f.length;\n        var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n        var exl = exfl(p.extra);\n        if (s > 65535)\n            err(11);\n        var d = compression ? deflateSync(file, p) : file, l = d.length;\n        var c = crc();\n        c.p(file);\n        files.push(mrg(p, {\n            size: file.length,\n            crc: c.d(),\n            c: d,\n            f: f,\n            m: m,\n            u: s != fn.length || (m && (com.length != ms)),\n            o: o,\n            compression: compression\n        }));\n        o += 30 + s + exl + l;\n        tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n    }\n    var out = new u8(tot + 22), oe = o, cdl = tot - o;\n    for (var i = 0; i < files.length; ++i) {\n        var f = files[i];\n        wzh(out, f.o, f, f.f, f.u, f.c.length);\n        var badd = 30 + f.f.length + exfl(f.extra);\n        out.set(f.c, f.o + badd);\n        wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n    }\n    wzf(out, o, files.length, cdl, oe);\n    return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n    function UnzipPassThrough() {\n    }\n    UnzipPassThrough.prototype.push = function (data, final) {\n        this.ondata(null, data, final);\n    };\n    UnzipPassThrough.compression = 0;\n    return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n    /**\n     * Creates a DEFLATE decompression that can be used in ZIP archives\n     */\n    function UnzipInflate() {\n        var _this_1 = this;\n        this.i = new Inflate(function (dat, final) {\n            _this_1.ondata(null, dat, final);\n        });\n    }\n    UnzipInflate.prototype.push = function (data, final) {\n        try {\n            this.i.push(data, final);\n        }\n        catch (e) {\n            this.ondata(e, null, final);\n        }\n    };\n    UnzipInflate.compression = 8;\n    return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n    /**\n     * Creates a DEFLATE decompression that can be used in ZIP archives\n     */\n    function AsyncUnzipInflate(_, sz) {\n        var _this_1 = this;\n        if (sz < 320000) {\n            this.i = new Inflate(function (dat, final) {\n                _this_1.ondata(null, dat, final);\n            });\n        }\n        else {\n            this.i = new AsyncInflate(function (err, dat, final) {\n                _this_1.ondata(err, dat, final);\n            });\n            this.terminate = this.i.terminate;\n        }\n    }\n    AsyncUnzipInflate.prototype.push = function (data, final) {\n        if (this.i.terminate)\n            data = slc(data, 0);\n        this.i.push(data, final);\n    };\n    AsyncUnzipInflate.compression = 8;\n    return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n    /**\n     * Creates a ZIP decompression stream\n     * @param cb The callback to call whenever a file in the ZIP archive is found\n     */\n    function Unzip(cb) {\n        this.onfile = cb;\n        this.k = [];\n        this.o = {\n            0: UnzipPassThrough\n        };\n        this.p = et;\n    }\n    /**\n     * Pushes a chunk to be unzipped\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Unzip.prototype.push = function (chunk, final) {\n        var _this_1 = this;\n        if (!this.onfile)\n            err(5);\n        if (!this.p)\n            err(4);\n        if (this.c > 0) {\n            var len = Math.min(this.c, chunk.length);\n            var toAdd = chunk.subarray(0, len);\n            this.c -= len;\n            if (this.d)\n                this.d.push(toAdd, !this.c);\n            else\n                this.k[0].push(toAdd);\n            chunk = chunk.subarray(len);\n            if (chunk.length)\n                return this.push(chunk, final);\n        }\n        else {\n            var f = 0, i = 0, is = void 0, buf = void 0;\n            if (!this.p.length)\n                buf = chunk;\n            else if (!chunk.length)\n                buf = this.p;\n            else {\n                buf = new u8(this.p.length + chunk.length);\n                buf.set(this.p), buf.set(chunk, this.p.length);\n            }\n            var l = buf.length, oc = this.c, add = oc && this.d;\n            var _loop_2 = function () {\n                var _a;\n                var sig = b4(buf, i);\n                if (sig == 0x4034B50) {\n                    f = 1, is = i;\n                    this_1.d = null;\n                    this_1.c = 0;\n                    var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n                    if (l > i + 30 + fnl + es) {\n                        var chks_3 = [];\n                        this_1.k.unshift(chks_3);\n                        f = 2;\n                        var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n                        var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n                        if (sc_1 == 4294967295) {\n                            _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n                        }\n                        else if (dd)\n                            sc_1 = -1;\n                        i += es;\n                        this_1.c = sc_1;\n                        var d_1;\n                        var file_1 = {\n                            name: fn_1,\n                            compression: cmp_1,\n                            start: function () {\n                                if (!file_1.ondata)\n                                    err(5);\n                                if (!sc_1)\n                                    file_1.ondata(null, et, true);\n                                else {\n                                    var ctr = _this_1.o[cmp_1];\n                                    if (!ctr)\n                                        file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n                                    d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n                                    d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n                                    for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n                                        var dat = chks_4[_i];\n                                        d_1.push(dat, false);\n                                    }\n                                    if (_this_1.k[0] == chks_3 && _this_1.c)\n                                        _this_1.d = d_1;\n                                    else\n                                        d_1.push(et, true);\n                                }\n                            },\n                            terminate: function () {\n                                if (d_1 && d_1.terminate)\n                                    d_1.terminate();\n                            }\n                        };\n                        if (sc_1 >= 0)\n                            file_1.size = sc_1, file_1.originalSize = su_1;\n                        this_1.onfile(file_1);\n                    }\n                    return \"break\";\n                }\n                else if (oc) {\n                    if (sig == 0x8074B50) {\n                        is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n                        return \"break\";\n                    }\n                    else if (sig == 0x2014B50) {\n                        is = i -= 4, f = 3, this_1.c = 0;\n                        return \"break\";\n                    }\n                }\n            };\n            var this_1 = this;\n            for (; i < l - 4; ++i) {\n                var state_1 = _loop_2();\n                if (state_1 === \"break\")\n                    break;\n            }\n            this.p = et;\n            if (oc < 0) {\n                var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n                if (add)\n                    add.push(dat, !!f);\n                else\n                    this.k[+(f == 2)].push(dat);\n            }\n            if (f & 2)\n                return this.push(buf.subarray(i), final);\n            this.p = buf.subarray(i);\n        }\n        if (final) {\n            if (this.c)\n                err(13);\n            this.p = null;\n        }\n    };\n    /**\n     * Registers a decoder with the stream, allowing for files compressed with\n     * the compression type provided to be expanded correctly\n     * @param decoder The decoder constructor\n     */\n    Unzip.prototype.register = function (decoder) {\n        this.o[decoder.compression] = decoder;\n    };\n    return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    var term = [];\n    var tAll = function () {\n        for (var i = 0; i < term.length; ++i)\n            term[i]();\n    };\n    var files = {};\n    var cbd = function (a, b) {\n        mt(function () { cb(a, b); });\n    };\n    mt(function () { cbd = cb; });\n    var e = data.length - 22;\n    for (; b4(data, e) != 0x6054B50; --e) {\n        if (!e || data.length - e > 65558) {\n            cbd(err(13, 0, 1), null);\n            return tAll;\n        }\n    }\n    ;\n    var lft = b2(data, e + 8);\n    if (lft) {\n        var c = lft;\n        var o = b4(data, e + 16);\n        var z = o == 4294967295 || c == 65535;\n        if (z) {\n            var ze = b4(data, e - 12);\n            z = b4(data, ze) == 0x6064B50;\n            if (z) {\n                c = lft = b4(data, ze + 32);\n                o = b4(data, ze + 48);\n            }\n        }\n        var fltr = opts && opts.filter;\n        var _loop_3 = function (i) {\n            var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n            o = no;\n            var cbl = function (e, d) {\n                if (e) {\n                    tAll();\n                    cbd(e, null);\n                }\n                else {\n                    if (d)\n                        files[fn] = d;\n                    if (!--lft)\n                        cbd(null, files);\n                }\n            };\n            if (!fltr || fltr({\n                name: fn,\n                size: sc,\n                originalSize: su,\n                compression: c_1\n            })) {\n                if (!c_1)\n                    cbl(null, slc(data, b, b + sc));\n                else if (c_1 == 8) {\n                    var infl = data.subarray(b, b + sc);\n                    if (sc < 320000) {\n                        try {\n                            cbl(null, inflateSync(infl, { out: new u8(su) }));\n                        }\n                        catch (e) {\n                            cbl(e, null);\n                        }\n                    }\n                    else\n                        term.push(inflate(infl, { size: su }, cbl));\n                }\n                else\n                    cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n            }\n            else\n                cbl(null, null);\n        };\n        for (var i = 0; i < c; ++i) {\n            _loop_3(i);\n        }\n    }\n    else\n        cbd(null, {});\n    return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n    var files = {};\n    var e = data.length - 22;\n    for (; b4(data, e) != 0x6054B50; --e) {\n        if (!e || data.length - e > 65558)\n            err(13);\n    }\n    ;\n    var c = b2(data, e + 8);\n    if (!c)\n        return {};\n    var o = b4(data, e + 16);\n    var z = o == 4294967295 || c == 65535;\n    if (z) {\n        var ze = b4(data, e - 12);\n        z = b4(data, ze) == 0x6064B50;\n        if (z) {\n            c = b4(data, ze + 32);\n            o = b4(data, ze + 48);\n        }\n    }\n    var fltr = opts && opts.filter;\n    for (var i = 0; i < c; ++i) {\n        var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n        o = no;\n        if (!fltr || fltr({\n            name: fn,\n            size: sc,\n            originalSize: su,\n            compression: c_2\n        })) {\n            if (!c_2)\n                files[fn] = slc(data, b, b + sc);\n            else if (c_2 == 8)\n                files[fn] = inflateSync(data.subarray(b, b + sc), { out: new u8(su) });\n            else\n                err(14, 'unknown compression type ' + c_2);\n        }\n    }\n    return files;\n}\n","/**\n * @license\n * jsPDF filters PlugIn\n * Copyright (c) 2014 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var ASCII85Encode = function(a) {\n    var b, c, d, e, f, g, h, i, j, k;\n    // eslint-disable-next-line no-control-regex\n    for (\n      !/[^\\x00-\\xFF]/.test(a),\n        b = \"\\x00\\x00\\x00\\x00\".slice(a.length % 4 || 4),\n        a += b,\n        c = [],\n        d = 0,\n        e = a.length;\n      e > d;\n      d += 4\n    )\n      (f =\n        (a.charCodeAt(d) << 24) +\n        (a.charCodeAt(d + 1) << 16) +\n        (a.charCodeAt(d + 2) << 8) +\n        a.charCodeAt(d + 3)),\n        0 !== f\n          ? ((k = f % 85),\n            (f = (f - k) / 85),\n            (j = f % 85),\n            (f = (f - j) / 85),\n            (i = f % 85),\n            (f = (f - i) / 85),\n            (h = f % 85),\n            (f = (f - h) / 85),\n            (g = f % 85),\n            c.push(g + 33, h + 33, i + 33, j + 33, k + 33))\n          : c.push(122);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(c, b.length),\n      String.fromCharCode.apply(String, c) + \"~>\"\n    );\n  };\n\n  var ASCII85Decode = function(a) {\n    var c,\n      d,\n      e,\n      f,\n      g,\n      h = String,\n      l = \"length\",\n      w = 255,\n      x = \"charCodeAt\",\n      y = \"slice\",\n      z = \"replace\";\n    for (\n      \"~>\" === a[y](-2),\n        a = a[y](0, -2)\n          [z](/\\s/g, \"\")\n          [z](\"z\", \"!!!!!\"),\n        c = \"uuuuu\"[y](a[l] % 5 || 5),\n        a += c,\n        e = [],\n        f = 0,\n        g = a[l];\n      g > f;\n      f += 5\n    )\n      (d =\n        52200625 * (a[x](f) - 33) +\n        614125 * (a[x](f + 1) - 33) +\n        7225 * (a[x](f + 2) - 33) +\n        85 * (a[x](f + 3) - 33) +\n        (a[x](f + 4) - 33)),\n        e.push(w & (d >> 24), w & (d >> 16), w & (d >> 8), w & d);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(e, c[l]),\n      h.fromCharCode.apply(h, e)\n    );\n  };\n\n  var ASCIIHexEncode = function(value) {\n    return (\n      value\n        .split(\"\")\n        .map(function(value) {\n          return (\"0\" + value.charCodeAt().toString(16)).slice(-2);\n        })\n        .join(\"\") + \">\"\n    );\n  };\n\n  var ASCIIHexDecode = function(value) {\n    var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);\n    value = value.replace(/\\s/g, \"\");\n    if (value.indexOf(\">\") !== -1) {\n      value = value.substr(0, value.indexOf(\">\"));\n    }\n    if (value.length % 2) {\n      value += \"0\";\n    }\n    if (regexCheckIfHex.test(value) === false) {\n      return \"\";\n    }\n    var result = \"\";\n    for (var i = 0; i < value.length; i += 2) {\n      result += String.fromCharCode(\"0x\" + (value[i] + value[i + 1]));\n    }\n    return result;\n  };\n  /*\n  var FlatePredictors = {\n      None: 1,\n      TIFF: 2,\n      PNG_None: 10,\n      PNG_Sub: 11,\n      PNG_Up: 12,\n      PNG_Average: 13,\n      PNG_Paeth: 14,\n      PNG_Optimum: 15\n  };\n  */\n\n  var FlateEncode = function(data) {\n    var arr = new Uint8Array(data.length);\n    var i = data.length;\n    while (i--) {\n      arr[i] = data.charCodeAt(i);\n    }\n    arr = zlibSync(arr);\n    data = arr.reduce(function(data, byte) {\n      return data + String.fromCharCode(byte);\n    }, \"\");\n    return data;\n  };\n\n  jsPDFAPI.processDataByFilters = function(origData, filterChain) {\n    \"use strict\";\n    var i = 0;\n    var data = origData || \"\";\n    var reverseChain = [];\n    filterChain = filterChain || [];\n\n    if (typeof filterChain === \"string\") {\n      filterChain = [filterChain];\n    }\n\n    for (i = 0; i < filterChain.length; i += 1) {\n      switch (filterChain[i]) {\n        case \"ASCII85Decode\":\n        case \"/ASCII85Decode\":\n          data = ASCII85Decode(data);\n          reverseChain.push(\"/ASCII85Encode\");\n          break;\n        case \"ASCII85Encode\":\n        case \"/ASCII85Encode\":\n          data = ASCII85Encode(data);\n          reverseChain.push(\"/ASCII85Decode\");\n          break;\n        case \"ASCIIHexDecode\":\n        case \"/ASCIIHexDecode\":\n          data = ASCIIHexDecode(data);\n          reverseChain.push(\"/ASCIIHexEncode\");\n          break;\n        case \"ASCIIHexEncode\":\n        case \"/ASCIIHexEncode\":\n          data = ASCIIHexEncode(data);\n          reverseChain.push(\"/ASCIIHexDecode\");\n          break;\n        case \"FlateEncode\":\n        case \"/FlateEncode\":\n          data = FlateEncode(data);\n          reverseChain.push(\"/FlateDecode\");\n          break;\n        default:\n          throw new Error(\n            'The filter: \"' + filterChain[i] + '\" is not implemented'\n          );\n      }\n    }\n\n    return { data: data, reverseChain: reverseChain.reverse().join(\" \") };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF fileloading PlugIn\n * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name fileloading\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name loadFile\n   * @function\n   * @param {string} url\n   * @param {boolean} sync\n   * @param {function} callback\n   * @returns {string|undefined} result\n   */\n  jsPDFAPI.loadFile = function(url, sync, callback) {\n    return browserRequest(url, sync, callback);\n\n  };\n\n  /**\n   * @name loadImageFile\n   * @function\n   * @param {string} path\n   * @param {boolean} sync\n   * @param {function} callback\n   */\n  jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;\n\n  function browserRequest(url, sync, callback) {\n    sync = sync === false ? false : true;\n    callback = typeof callback === \"function\" ? callback : function() {};\n    var result = undefined;\n\n    var xhr = function(url, sync, callback) {\n      var request = new XMLHttpRequest();\n      var i = 0;\n\n      var sanitizeUnicode = function(data) {\n        var dataLength = data.length;\n        var charArray = [];\n        var StringFromCharCode = String.fromCharCode;\n\n        //Transform Unicode to ASCII\n        for (i = 0; i < dataLength; i += 1) {\n          charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff));\n        }\n        return charArray.join(\"\");\n      };\n\n      request.open(\"GET\", url, !sync);\n      // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]\n      request.overrideMimeType(\"text/plain; charset=x-user-defined\");\n\n      if (sync === false) {\n        request.onload = function() {\n          if (request.status === 200) {\n            callback(sanitizeUnicode(this.responseText));\n          } else {\n            callback(undefined);\n          }\n        };\n      }\n      request.send(null);\n\n      if (sync && request.status === 200) {\n        return sanitizeUnicode(request.responseText);\n      }\n    };\n    try {\n      result = xhr(url, sync, callback);\n      // eslint-disable-next-line no-empty\n    } catch (e) {}\n    return result;\n  }\n\n  function nodeReadFile(url, sync, callback) {\n    sync = sync === false ? false : true;\n    var result = undefined;\n\n    var fs = require(\"fs\");\n    var path = require(\"path\");\n\n    url = path.resolve(url);\n    if (sync) {\n      try {\n        result = fs.readFileSync(url, { encoding: \"latin1\" });\n      } catch (e) {\n        return undefined;\n      }\n    } else {\n      fs.readFile(url, { encoding: \"latin1\" }, function(err, data) {\n        if (!callback) {\n          return;\n        }\n        if (err) {\n          callback(undefined);\n        }\n        callback(data);\n      });\n    }\n\n    return result;\n  }\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2018 Erik Koopmans\n * Released under the MIT License.\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { normalizeFontFace } from \"../libs/fontFace.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF html PlugIn\n *\n * @name html\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadHtml2Canvas() {\n    return (function() {\n      if (globalObject[\"html2canvas\"]) {\n        return Promise.resolve(globalObject[\"html2canvas\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"html2canvas\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"html2canvas\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load html2canvas\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load html2canvas: \" + e));\n      })\n      .then(function(html2canvas) {\n        return html2canvas.default ? html2canvas.default : html2canvas;\n      });\n  }\n\n  function loadDomPurify() {\n    return (function() {\n      if (globalObject[\"DOMPurify\"]) {\n        return Promise.resolve(globalObject[\"DOMPurify\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"dompurify\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"dompurify\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load dompurify\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load dompurify: \" + e));\n      })\n      .then(function(dompurify) {\n        return dompurify.default ? dompurify.default : dompurify;\n      });\n  }\n\n  /**\n   * Determine the type of a variable/object.\n   *\n   * @private\n   * @ignore\n   */\n  var objType = function(obj) {\n    var type = typeof obj;\n    if (type === \"undefined\") return \"undefined\";\n    else if (type === \"string\" || obj instanceof String) return \"string\";\n    else if (type === \"number\" || obj instanceof Number) return \"number\";\n    else if (type === \"function\" || obj instanceof Function) return \"function\";\n    else if (!!obj && obj.constructor === Array) return \"array\";\n    else if (obj && obj.nodeType === 1) return \"element\";\n    else if (type === \"object\") return \"object\";\n    else return \"unknown\";\n  };\n\n  /**\n   * Create an HTML element with optional className, innerHTML, and style.\n   *\n   * @private\n   * @ignore\n   */\n  var createElement = function(tagName, opt) {\n    var el = document.createElement(tagName);\n    if (opt.className) el.className = opt.className;\n    if (opt.innerHTML && opt.dompurify) {\n      el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);\n    }\n    for (var key in opt.style) {\n      el.style[key] = opt.style[key];\n    }\n    return el;\n  };\n\n  /**\n   * Deep-clone a node and preserve contents/properties.\n   *\n   * @private\n   * @ignore\n   */\n  var cloneNode = function(node, javascriptEnabled) {\n    // Recursively clone the node.\n    var clone =\n      node.nodeType === 3\n        ? document.createTextNode(node.nodeValue)\n        : node.cloneNode(false);\n    for (var child = node.firstChild; child; child = child.nextSibling) {\n      if (\n        javascriptEnabled === true ||\n        child.nodeType !== 1 ||\n        child.nodeName !== \"SCRIPT\"\n      ) {\n        clone.appendChild(cloneNode(child, javascriptEnabled));\n      }\n    }\n\n    if (node.nodeType === 1) {\n      // Preserve contents/properties of special nodes.\n      if (node.nodeName === \"CANVAS\") {\n        clone.width = node.width;\n        clone.height = node.height;\n        clone.getContext(\"2d\").drawImage(node, 0, 0);\n      } else if (node.nodeName === \"TEXTAREA\" || node.nodeName === \"SELECT\") {\n        clone.value = node.value;\n      }\n\n      // Preserve the node's scroll position when it loads.\n      clone.addEventListener(\n        \"load\",\n        function() {\n          clone.scrollTop = node.scrollTop;\n          clone.scrollLeft = node.scrollLeft;\n        },\n        true\n      );\n    }\n\n    // Return the cloned node.\n    return clone;\n  };\n\n  /* ----- CONSTRUCTOR ----- */\n\n  var Worker = function Worker(opt) {\n    // Create the root parent for the proto chain, and the starting Worker.\n    var root = Object.assign(\n      Worker.convert(Promise.resolve()),\n      JSON.parse(JSON.stringify(Worker.template))\n    );\n    var self = Worker.convert(Promise.resolve(), root);\n\n    // Set progress, optional settings, and return.\n    self = self.setProgress(1, Worker, 1, [Worker]);\n    self = self.set(opt);\n    return self;\n  };\n\n  // Boilerplate for subclassing Promise.\n  Worker.prototype = Object.create(Promise.prototype);\n  Worker.prototype.constructor = Worker;\n\n  // Converts/casts promises into Workers.\n  Worker.convert = function convert(promise, inherit) {\n    // Uses prototypal inheritance to receive changes made to ancestors' properties.\n    promise.__proto__ = inherit || Worker.prototype;\n    return promise;\n  };\n\n  Worker.template = {\n    prop: {\n      src: null,\n      container: null,\n      overlay: null,\n      canvas: null,\n      img: null,\n      pdf: null,\n      pageSize: null,\n      callback: function() {}\n    },\n    progress: {\n      val: 0,\n      state: null,\n      n: 0,\n      stack: []\n    },\n    opt: {\n      filename: \"file.pdf\",\n      margin: [0, 0, 0, 0],\n      enableLinks: true,\n      x: 0,\n      y: 0,\n      html2canvas: {},\n      jsPDF: {},\n      backgroundColor: \"transparent\"\n    }\n  };\n\n  /* ----- FROM / TO ----- */\n\n  Worker.prototype.from = function from(src, type) {\n    function getType(src) {\n      switch (objType(src)) {\n        case \"string\":\n          return \"string\";\n        case \"element\":\n          return src.nodeName.toLowerCase() === \"canvas\" ? \"canvas\" : \"element\";\n        default:\n          return \"unknown\";\n      }\n    }\n\n    return this.then(function from_main() {\n      type = type || getType(src);\n      switch (type) {\n        case \"string\":\n          return this.then(loadDomPurify).then(function(dompurify) {\n            return this.set({\n              src: createElement(\"div\", {\n                innerHTML: src,\n                dompurify: dompurify\n              })\n            });\n          });\n        case \"element\":\n          return this.set({ src: src });\n        case \"canvas\":\n          return this.set({ canvas: src });\n        case \"img\":\n          return this.set({ img: src });\n        default:\n          return this.error(\"Unknown source type.\");\n      }\n    });\n  };\n\n  Worker.prototype.to = function to(target) {\n    // Route the 'to' request to the appropriate method.\n    switch (target) {\n      case \"container\":\n        return this.toContainer();\n      case \"canvas\":\n        return this.toCanvas();\n      case \"img\":\n        return this.toImg();\n      case \"pdf\":\n        return this.toPdf();\n      default:\n        return this.error(\"Invalid target.\");\n    }\n  };\n\n  Worker.prototype.toContainer = function toContainer() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkSrc() {\n        return (\n          this.prop.src || this.error(\"Cannot duplicate - no source HTML.\")\n        );\n      },\n      function checkPageSize() {\n        return this.prop.pageSize || this.setPageSize();\n      }\n    ];\n    return this.thenList(prereqs).then(function toContainer_main() {\n      // Define the CSS styles for the container and its overlay parent.\n      var overlayCSS = {\n        position: \"fixed\",\n        overflow: \"hidden\",\n        zIndex: 1000,\n        left: \"-100000px\",\n        right: 0,\n        bottom: 0,\n        top: 0\n      };\n      var containerCSS = {\n        position: \"relative\",\n        display: \"inline-block\",\n        width:\n          (typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.windowWidth\n            : Math.max(\n                this.prop.src.clientWidth,\n                this.prop.src.scrollWidth,\n                this.prop.src.offsetWidth\n              )) + \"px\",\n        left: 0,\n        right: 0,\n        top: 0,\n        margin: \"auto\",\n        backgroundColor: this.opt.backgroundColor\n      }; // Set the overlay to hidden (could be changed in the future to provide a print preview).\n\n      var source = cloneNode(\n        this.prop.src,\n        this.opt.html2canvas.javascriptEnabled\n      );\n\n      if (source.tagName === \"BODY\") {\n        containerCSS.height =\n          Math.max(\n            document.body.scrollHeight,\n            document.body.offsetHeight,\n            document.documentElement.clientHeight,\n            document.documentElement.scrollHeight,\n            document.documentElement.offsetHeight\n          ) + \"px\";\n      }\n\n      this.prop.overlay = createElement(\"div\", {\n        className: \"html2pdf__overlay\",\n        style: overlayCSS\n      });\n      this.prop.container = createElement(\"div\", {\n        className: \"html2pdf__container\",\n        style: containerCSS\n      });\n      this.prop.container.appendChild(source);\n      this.prop.container.firstChild.appendChild(\n        createElement(\"div\", {\n          style: {\n            clear: \"both\",\n            border: \"0 none transparent\",\n            margin: 0,\n            padding: 0,\n            height: 0\n          }\n        })\n      );\n      this.prop.container.style.float = \"none\";\n      this.prop.overlay.appendChild(this.prop.container);\n      document.body.appendChild(this.prop.overlay);\n      this.prop.container.firstChild.style.position = \"relative\";\n      this.prop.container.height =\n        Math.max(\n          this.prop.container.firstChild.clientHeight,\n          this.prop.container.firstChild.scrollHeight,\n          this.prop.container.firstChild.offsetHeight\n        ) + \"px\";\n    });\n  };\n\n  Worker.prototype.toCanvas = function toCanvas() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toCanvas_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var options = Object.assign({}, this.opt.html2canvas);\n        delete options.onrendered;\n\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toCanvas_post(canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toContext2d = function toContext2d() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toContext2d_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n\n        var pdf = this.opt.jsPDF;\n        var fontFaces = this.opt.fontFaces;\n\n        var scale =\n          typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.width / this.opt.windowWidth\n            : 1;\n\n        var options = Object.assign(\n          {\n            async: true,\n            allowTaint: true,\n            scale: scale,\n            scrollX: this.opt.scrollX || 0,\n            scrollY: this.opt.scrollY || 0,\n            backgroundColor: \"#ffffff\",\n            imageTimeout: 15000,\n            logging: true,\n            proxy: null,\n            removeContainer: true,\n            foreignObjectRendering: false,\n            useCORS: false\n          },\n          this.opt.html2canvas\n        );\n        delete options.onrendered;\n\n        pdf.context2d.autoPaging =\n          typeof this.opt.autoPaging === \"undefined\"\n            ? true\n            : this.opt.autoPaging;\n        pdf.context2d.posX = this.opt.x;\n        pdf.context2d.posY = this.opt.y;\n        pdf.context2d.margin = this.opt.margin;\n        pdf.context2d.fontFaces = fontFaces;\n\n        if (fontFaces) {\n          for (var i = 0; i < fontFaces.length; ++i) {\n            var font = fontFaces[i];\n            var src = font.src.find(function(src) {\n              return src.format === \"truetype\";\n            });\n\n            if (src) {\n              pdf.addFont(src.url, font.ref.name, font.ref.style);\n            }\n          }\n        }\n\n        options.windowHeight = options.windowHeight || 0;\n        options.windowHeight =\n          options.windowHeight == 0\n            ? Math.max(\n                this.prop.container.clientHeight,\n                this.prop.container.scrollHeight,\n                this.prop.container.offsetHeight\n              )\n            : options.windowHeight;\n\n        pdf.context2d.save(true);\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toContext2d_post(canvas) {\n        this.opt.jsPDF.context2d.restore(true);\n\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toImg = function toImg() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkCanvas() {\n        return this.prop.canvas || this.toCanvas();\n      }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toImg_main() {\n      var imgData = this.prop.canvas.toDataURL(\n        \"image/\" + this.opt.image.type,\n        this.opt.image.quality\n      );\n      this.prop.img = document.createElement(\"img\");\n      this.prop.img.src = imgData;\n    });\n  };\n\n  Worker.prototype.toPdf = function toPdf() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContext2d() {\n        return this.toContext2d();\n      }\n      //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toPdf_main() {\n      // Create local copies of frequently used properties.\n      this.prop.pdf = this.prop.pdf || this.opt.jsPDF;\n    });\n  };\n\n  /* ----- OUTPUT / SAVE ----- */\n\n  Worker.prototype.output = function output(type, options, src) {\n    // Redirect requests to the correct function (outputPdf / outputImg).\n    src = src || \"pdf\";\n    if (src.toLowerCase() === \"img\" || src.toLowerCase() === \"image\") {\n      return this.outputImg(type, options);\n    } else {\n      return this.outputPdf(type, options);\n    }\n  };\n\n  Worker.prototype.outputPdf = function outputPdf(type, options) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputPdf_main() {\n      /* Currently implemented output types:\n       *    https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992\n       *  save(options), arraybuffer, blob, bloburi/bloburl,\n       *  datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl\n       */\n      return this.prop.pdf.output(type, options);\n    });\n  };\n\n  Worker.prototype.outputImg = function outputImg(type) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkImg() {\n        return this.prop.img || this.toImg();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputImg_main() {\n      switch (type) {\n        case undefined:\n        case \"img\":\n          return this.prop.img;\n        case \"datauristring\":\n        case \"dataurlstring\":\n          return this.prop.img.src;\n        case \"datauri\":\n        case \"dataurl\":\n          return (document.location.href = this.prop.img.src);\n        default:\n          throw 'Image output type \"' + type + '\" is not supported.';\n      }\n    });\n  };\n\n  Worker.prototype.save = function save(filename) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs)\n      .set(filename ? { filename: filename } : null)\n      .then(function save_main() {\n        this.prop.pdf.save(this.opt.filename);\n      });\n  };\n\n  Worker.prototype.doCallback = function doCallback() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs).then(function doCallback_main() {\n      this.prop.callback(this.prop.pdf);\n    });\n  };\n\n  /* ----- SET / GET ----- */\n\n  Worker.prototype.set = function set(opt) {\n    // TODO: Implement ordered pairs?\n\n    // Silently ignore invalid or empty input.\n    if (objType(opt) !== \"object\") {\n      return this;\n    }\n\n    // Build an array of setter functions to queue.\n    var fns = Object.keys(opt || {}).map(function(key) {\n      if (key in Worker.template.prop) {\n        // Set pre-defined properties.\n        return function set_prop() {\n          this.prop[key] = opt[key];\n        };\n      } else {\n        switch (key) {\n          case \"margin\":\n            return this.setMargin.bind(this, opt.margin);\n          case \"jsPDF\":\n            return function set_jsPDF() {\n              this.opt.jsPDF = opt.jsPDF;\n              return this.setPageSize();\n            };\n          case \"pageSize\":\n            return this.setPageSize.bind(this, opt.pageSize);\n          default:\n            // Set any other properties in opt.\n            return function set_opt() {\n              this.opt[key] = opt[key];\n            };\n        }\n      }\n    }, this);\n\n    // Set properties within the promise chain.\n    return this.then(function set_main() {\n      return this.thenList(fns);\n    });\n  };\n\n  Worker.prototype.get = function get(key, cbk) {\n    return this.then(function get_main() {\n      // Fetch the requested property, either as a predefined prop or in opt.\n      var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];\n      return cbk ? cbk(val) : val;\n    });\n  };\n\n  Worker.prototype.setMargin = function setMargin(margin) {\n    return this.then(function setMargin_main() {\n      // Parse the margin property.\n      switch (objType(margin)) {\n        case \"number\":\n          margin = [margin, margin, margin, margin];\n        // eslint-disable-next-line no-fallthrough\n        case \"array\":\n          if (margin.length === 2) {\n            margin = [margin[0], margin[1], margin[0], margin[1]];\n          }\n          if (margin.length === 4) {\n            break;\n          }\n        // eslint-disable-next-line no-fallthrough\n        default:\n          return this.error(\"Invalid margin array.\");\n      }\n\n      // Set the margin property, then update pageSize.\n      this.opt.margin = margin;\n    }).then(this.setPageSize);\n  };\n\n  Worker.prototype.setPageSize = function setPageSize(pageSize) {\n    function toPx(val, k) {\n      return Math.floor(((val * k) / 72) * 96);\n    }\n\n    return this.then(function setPageSize_main() {\n      // Retrieve page-size based on jsPDF settings, if not explicitly provided.\n      pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF);\n\n      // Add 'inner' field if not present.\n      if (!pageSize.hasOwnProperty(\"inner\")) {\n        pageSize.inner = {\n          width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],\n          height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]\n        };\n        pageSize.inner.px = {\n          width: toPx(pageSize.inner.width, pageSize.k),\n          height: toPx(pageSize.inner.height, pageSize.k)\n        };\n        pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;\n      }\n\n      // Attach pageSize to this.\n      this.prop.pageSize = pageSize;\n    });\n  };\n\n  Worker.prototype.setProgress = function setProgress(val, state, n, stack) {\n    // Immediately update all progress values.\n    if (val != null) this.progress.val = val;\n    if (state != null) this.progress.state = state;\n    if (n != null) this.progress.n = n;\n    if (stack != null) this.progress.stack = stack;\n    this.progress.ratio = this.progress.val / this.progress.state;\n\n    // Return this for command chaining.\n    return this;\n  };\n\n  Worker.prototype.updateProgress = function updateProgress(\n    val,\n    state,\n    n,\n    stack\n  ) {\n    // Immediately update all progress values, using setProgress.\n    return this.setProgress(\n      val ? this.progress.val + val : null,\n      state ? state : null,\n      n ? this.progress.n + n : null,\n      stack ? this.progress.stack.concat(stack) : null\n    );\n  };\n\n  /* ----- PROMISE MAPPING ----- */\n\n  Worker.prototype.then = function then(onFulfilled, onRejected) {\n    // Wrap `this` for encapsulation.\n    var self = this;\n\n    return this.thenCore(onFulfilled, onRejected, function then_main(\n      onFulfilled,\n      onRejected\n    ) {\n      // Update progress while queuing, calling, and resolving `then`.\n      self.updateProgress(null, null, 1, [onFulfilled]);\n      return Promise.prototype.then\n        .call(this, function then_pre(val) {\n          self.updateProgress(null, onFulfilled);\n          return val;\n        })\n        .then(onFulfilled, onRejected)\n        .then(function then_post(val) {\n          self.updateProgress(1);\n          return val;\n        });\n    });\n  };\n\n  Worker.prototype.thenCore = function thenCore(\n    onFulfilled,\n    onRejected,\n    thenBase\n  ) {\n    // Handle optional thenBase parameter.\n    thenBase = thenBase || Promise.prototype.then;\n\n    // Wrap `this` for encapsulation and bind it to the promise handlers.\n    var self = this;\n    if (onFulfilled) {\n      onFulfilled = onFulfilled.bind(self);\n    }\n    if (onRejected) {\n      onRejected = onRejected.bind(self);\n    }\n\n    // Cast self into a Promise to avoid polyfills recursively defining `then`.\n    var isNative =\n      Promise.toString().indexOf(\"[native code]\") !== -1 &&\n      Promise.name === \"Promise\";\n    var selfPromise = isNative\n      ? self\n      : Worker.convert(Object.assign({}, self), Promise.prototype);\n\n    // Return the promise, after casting it into a Worker and preserving props.\n    var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);\n    return Worker.convert(returnVal, self.__proto__);\n  };\n\n  Worker.prototype.thenExternal = function thenExternal(\n    onFulfilled,\n    onRejected\n  ) {\n    // Call `then` and return a standard promise (exits the Worker chain).\n    return Promise.prototype.then.call(this, onFulfilled, onRejected);\n  };\n\n  Worker.prototype.thenList = function thenList(fns) {\n    // Queue a series of promise 'factories' into the promise chain.\n    var self = this;\n    fns.forEach(function thenList_forEach(fn) {\n      self = self.thenCore(fn);\n    });\n    return self;\n  };\n\n  Worker.prototype[\"catch\"] = function(onRejected) {\n    // Bind `this` to the promise handler, call `catch`, and return a Worker.\n    if (onRejected) {\n      onRejected = onRejected.bind(this);\n    }\n    var returnVal = Promise.prototype[\"catch\"].call(this, onRejected);\n    return Worker.convert(returnVal, this);\n  };\n\n  Worker.prototype.catchExternal = function catchExternal(onRejected) {\n    // Call `catch` and return a standard promise (exits the Worker chain).\n    return Promise.prototype[\"catch\"].call(this, onRejected);\n  };\n\n  Worker.prototype.error = function error(msg) {\n    // Throw the error in the Promise chain.\n    return this.then(function error_main() {\n      throw new Error(msg);\n    });\n  };\n\n  /* ----- ALIASES ----- */\n\n  Worker.prototype.using = Worker.prototype.set;\n  Worker.prototype.saveAs = Worker.prototype.save;\n  Worker.prototype.export = Worker.prototype.output;\n  Worker.prototype.run = Worker.prototype.then;\n\n  // Get dimensions of a PDF page, as determined by jsPDF.\n  jsPDF.getPageSize = function(orientation, unit, format) {\n    // Decode options object\n    if (typeof orientation === \"object\") {\n      var options = orientation;\n      orientation = options.orientation;\n      unit = options.unit || unit;\n      format = options.format || format;\n    }\n\n    // Default options\n    unit = unit || \"mm\";\n    format = format || \"a4\";\n    orientation = (\"\" + (orientation || \"P\")).toLowerCase();\n    var format_as_string = (\"\" + format).toLowerCase();\n\n    // Size in pt of various paper formats\n    var pageFormats = {\n      a0: [2383.94, 3370.39],\n      a1: [1683.78, 2383.94],\n      a2: [1190.55, 1683.78],\n      a3: [841.89, 1190.55],\n      a4: [595.28, 841.89],\n      a5: [419.53, 595.28],\n      a6: [297.64, 419.53],\n      a7: [209.76, 297.64],\n      a8: [147.4, 209.76],\n      a9: [104.88, 147.4],\n      a10: [73.7, 104.88],\n      b0: [2834.65, 4008.19],\n      b1: [2004.09, 2834.65],\n      b2: [1417.32, 2004.09],\n      b3: [1000.63, 1417.32],\n      b4: [708.66, 1000.63],\n      b5: [498.9, 708.66],\n      b6: [354.33, 498.9],\n      b7: [249.45, 354.33],\n      b8: [175.75, 249.45],\n      b9: [124.72, 175.75],\n      b10: [87.87, 124.72],\n      c0: [2599.37, 3676.54],\n      c1: [1836.85, 2599.37],\n      c2: [1298.27, 1836.85],\n      c3: [918.43, 1298.27],\n      c4: [649.13, 918.43],\n      c5: [459.21, 649.13],\n      c6: [323.15, 459.21],\n      c7: [229.61, 323.15],\n      c8: [161.57, 229.61],\n      c9: [113.39, 161.57],\n      c10: [79.37, 113.39],\n      dl: [311.81, 623.62],\n      letter: [612, 792],\n      \"government-letter\": [576, 756],\n      legal: [612, 1008],\n      \"junior-legal\": [576, 360],\n      ledger: [1224, 792],\n      tabloid: [792, 1224],\n      \"credit-card\": [153, 243]\n    };\n\n    var k;\n    // Unit conversion\n    switch (unit) {\n      case \"pt\":\n        k = 1;\n        break;\n      case \"mm\":\n        k = 72 / 25.4;\n        break;\n      case \"cm\":\n        k = 72 / 2.54;\n        break;\n      case \"in\":\n        k = 72;\n        break;\n      case \"px\":\n        k = 72 / 96;\n        break;\n      case \"pc\":\n        k = 12;\n        break;\n      case \"em\":\n        k = 12;\n        break;\n      case \"ex\":\n        k = 6;\n        break;\n      default:\n        throw \"Invalid unit: \" + unit;\n    }\n    var pageHeight = 0;\n    var pageWidth = 0;\n\n    // Dimensions are stored as user units and converted to points on output\n    if (pageFormats.hasOwnProperty(format_as_string)) {\n      pageHeight = pageFormats[format_as_string][1] / k;\n      pageWidth = pageFormats[format_as_string][0] / k;\n    } else {\n      try {\n        pageHeight = format[1];\n        pageWidth = format[0];\n      } catch (err) {\n        throw new Error(\"Invalid format: \" + format);\n      }\n    }\n\n    var tmp;\n    // Handle page orientation\n    if (orientation === \"p\" || orientation === \"portrait\") {\n      orientation = \"p\";\n      if (pageWidth > pageHeight) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else if (orientation === \"l\" || orientation === \"landscape\") {\n      orientation = \"l\";\n      if (pageHeight > pageWidth) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else {\n      throw \"Invalid orientation: \" + orientation;\n    }\n\n    // Return information (k is the unit conversion ratio from pts)\n    var info = {\n      width: pageWidth,\n      height: pageHeight,\n      unit: unit,\n      k: k,\n      orientation: orientation\n    };\n    return info;\n  };\n\n  /**\n   * @typedef FontFace\n   *\n   * The font-face type implements an interface similar to that of the font-face CSS rule,\n   * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D\n   * is updated.\n   *\n   * All properties expect values similar to those in the font-face CSS rule. A difference\n   * is the font-family, which do not need to be enclosed in double-quotes when containing\n   * spaces like in CSS.\n   *\n   * @property {string} family The name of the font-family.\n   * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.\n   * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)\n   * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.\n   * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.\n   * @property {string} [src] url A URL to a font of a specific format.\n   * @property {string} [src] format Format of the font referenced by the URL.\n   */\n\n  /**\n   * Generate a PDF from an HTML element or string using.\n   *\n   * @name html\n   * @function\n   * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.\n   * @param {Object} [options] Collection of settings\n   * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance\n   * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.\n   * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.\n   * <ul>\n   * <li>\n   *   <code>false</code>: Auto paging is disabled.\n   * </li>\n   * <li>\n   *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\n   *   slice text in half, making it difficult to read.\n   * </li>\n   * <li>\n   *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\n   *   mostly of a single column of text.\n   * </li>\n   * </ul>\n   * Default is <code>true</code>.\n   * @param {string} [options.filename] name of the file\n   * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image\n   * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options\n   * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.\n   * @param {jsPDF} [options.jsPDF] jsPDF instance\n   * @param {number=} [options.x] x position on the PDF document in jsPDF units.\n   * @param {number=} [options.y] y position on the PDF document in jsPDF units.\n   * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be\n   * scaled such that it fits into the specified width. Has no effect if either the <code>html2canvas.scale<code> is\n   * specified or the <code>windowWidth</code> option is NOT specified.\n   * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the\n   * <code>html2canvas.windowWidth</code> option, this option affects the actual container size while rendering and\n   * does NOT affect CSS media queries. This option only has an effect, if the <code>width<code> option is also specified.\n   *\n   * @example\n   * var doc = new jsPDF();\n   *\n   * doc.html(document.body, {\n   *    callback: function (doc) {\n   *      doc.save();\n   *    },\n   *    x: 10,\n   *    y: 10\n   * });\n   */\n  jsPDFAPI.html = function(src, options) {\n    \"use strict\";\n\n    options = options || {};\n    options.callback = options.callback || function() {};\n    options.html2canvas = options.html2canvas || {};\n    options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;\n    options.jsPDF = options.jsPDF || this;\n    options.fontFaces = options.fontFaces\n      ? options.fontFaces.map(normalizeFontFace)\n      : null;\n\n    // Create a new worker with the given options.\n    var worker = new Worker(options);\n\n    if (!options.worker) {\n      // If worker is not set to true, perform the traditional 'simple' operation.\n      return worker.from(src).doCallback();\n    } else {\n      // Otherwise, return the worker for new Promise-based operation.\n      return worker;\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF JavaScript plugin\n *\n * @name javascript\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  var jsNamesObj, jsJsObj, text;\n  /**\n   * @name addJS\n   * @function\n   * @param {string} javascript The javascript to be embedded into the PDF-file.\n   * @returns {jsPDF}\n   */\n  jsPDFAPI.addJS = function(javascript) {\n    text = javascript;\n    this.internal.events.subscribe(\"postPutResources\", function() {\n      jsNamesObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/Names [(EmbeddedJS) \" + (jsNamesObj + 1) + \" 0 R]\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n\n      jsJsObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/S /JavaScript\");\n      this.internal.out(\"/JS (\" + text + \")\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n    });\n    this.internal.events.subscribe(\"putCatalog\", function() {\n      if (jsNamesObj !== undefined && jsJsObj !== undefined) {\n        this.internal.out(\"/Names <</JavaScript \" + jsNamesObj + \" 0 R>>\");\n      }\n    });\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Outline PlugIn\n *\n * Generates a PDF Outline\n * @name outline\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namesOid;\n  //var destsGoto = [];\n\n  jsPDFAPI.events.push([\n    \"postPutResources\",\n    function() {\n      var pdf = this;\n      var rx = /^(\\d+) 0 obj$/;\n\n      // Write action goto objects for each page\n      // this.outline.destsGoto = [];\n      // for (var i = 0; i < totalPages; i++) {\n      // var id = pdf.internal.newObject();\n      // this.outline.destsGoto.push(id);\n      // pdf.internal.write(\"<</D[\" + (i * 2 + 3) + \" 0 R /XYZ null\n      // null null]/S/GoTo>> endobj\");\n      // }\n      //\n      // for (var i = 0; i < dests.length; i++) {\n      // pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0\n      // R\");\n      // }\n      //\n      if (this.outline.root.children.length > 0) {\n        var lines = pdf.outline.render().split(/\\r\\n/);\n        for (var i = 0; i < lines.length; i++) {\n          var line = lines[i];\n          var m = rx.exec(line);\n          if (m != null) {\n            var oid = m[1];\n            pdf.internal.newObjectDeferredBegin(oid, false);\n          }\n          pdf.internal.write(line);\n        }\n      }\n\n      // This code will write named destination for each page reference\n      // (page_1, etc)\n      if (this.outline.createNamedDestinations) {\n        var totalPages = this.internal.pages.length;\n        // WARNING: this assumes jsPDF starts on page 3 and pageIDs\n        // follow 5, 7, 9, etc\n        // Write destination objects for each page\n        var dests = [];\n        for (var i = 0; i < totalPages; i++) {\n          var id = pdf.internal.newObject();\n          dests.push(id);\n          var info = pdf.internal.getPageInfo(i + 1);\n          pdf.internal.write(\n            \"<< /D[\" + info.objId + \" 0 R /XYZ null null null]>> endobj\"\n          );\n        }\n\n        // assign a name for each destination\n        var names2Oid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Names [ \");\n        for (var i = 0; i < dests.length; i++) {\n          pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0 R\");\n        }\n        pdf.internal.write(\" ] >>\", \"endobj\");\n\n        // var kids = pdf.internal.newObject();\n        // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');\n        // pdf.internal.write(' ] >>', 'endobj');\n\n        namesOid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Dests \" + names2Oid + \" 0 R\");\n        pdf.internal.write(\">>\", \"endobj\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putCatalog\",\n    function() {\n      var pdf = this;\n      if (pdf.outline.root.children.length > 0) {\n        pdf.internal.write(\n          \"/Outlines\",\n          this.outline.makeRef(this.outline.root)\n        );\n        if (this.outline.createNamedDestinations) {\n          pdf.internal.write(\"/Names \" + namesOid + \" 0 R\");\n        }\n        // Open with Bookmarks showing\n        // pdf.internal.write(\"/PageMode /UseOutlines\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      var pdf = this;\n\n      pdf.outline = {\n        createNamedDestinations: false,\n        root: {\n          children: []\n        }\n      };\n\n      /**\n       * Options: pageNumber\n       */\n      pdf.outline.add = function(parent, title, options) {\n        var item = {\n          title: title,\n          options: options,\n          children: []\n        };\n        if (parent == null) {\n          parent = this.root;\n        }\n        parent.children.push(item);\n        return item;\n      };\n\n      pdf.outline.render = function() {\n        this.ctx = {};\n        this.ctx.val = \"\";\n        this.ctx.pdf = pdf;\n\n        this.genIds_r(this.root);\n        this.renderRoot(this.root);\n        this.renderItems(this.root);\n\n        return this.ctx.val;\n      };\n\n      pdf.outline.genIds_r = function(node) {\n        node.id = pdf.internal.newObjectDeferred();\n        for (var i = 0; i < node.children.length; i++) {\n          this.genIds_r(node.children[i]);\n        }\n      };\n\n      pdf.outline.renderRoot = function(node) {\n        this.objStart(node);\n        this.line(\"/Type /Outlines\");\n        if (node.children.length > 0) {\n          this.line(\"/First \" + this.makeRef(node.children[0]));\n          this.line(\n            \"/Last \" + this.makeRef(node.children[node.children.length - 1])\n          );\n        }\n        this.line(\n          \"/Count \" +\n            this.count_r(\n              {\n                count: 0\n              },\n              node\n            )\n        );\n        this.objEnd();\n      };\n\n      pdf.outline.renderItems = function(node) {\n        var getVerticalCoordinateString = this.ctx.pdf.internal\n          .getVerticalCoordinateString;\n        for (var i = 0; i < node.children.length; i++) {\n          var item = node.children[i];\n          this.objStart(item);\n\n          this.line(\"/Title \" + this.makeString(item.title));\n\n          this.line(\"/Parent \" + this.makeRef(node));\n          if (i > 0) {\n            this.line(\"/Prev \" + this.makeRef(node.children[i - 1]));\n          }\n          if (i < node.children.length - 1) {\n            this.line(\"/Next \" + this.makeRef(node.children[i + 1]));\n          }\n          if (item.children.length > 0) {\n            this.line(\"/First \" + this.makeRef(item.children[0]));\n            this.line(\n              \"/Last \" + this.makeRef(item.children[item.children.length - 1])\n            );\n          }\n\n          var count = (this.count = this.count_r(\n            {\n              count: 0\n            },\n            item\n          ));\n          if (count > 0) {\n            this.line(\"/Count \" + count);\n          }\n\n          if (item.options) {\n            if (item.options.pageNumber) {\n              // Explicit Destination\n              //WARNING this assumes page ids are 3,5,7, etc.\n              var info = pdf.internal.getPageInfo(item.options.pageNumber);\n              this.line(\n                \"/Dest \" +\n                  \"[\" +\n                  info.objId +\n                  \" 0 R /XYZ 0 \" +\n                  getVerticalCoordinateString(0) +\n                  \" 0]\"\n              );\n              // this line does not work on all clients (pageNumber instead of page ref)\n              //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');\n\n              // Named Destination\n              // this.line('/Dest (page_' + (item.options.pageNumber) + ')');\n\n              // Action Destination\n              // var id = pdf.internal.newObject();\n              // pdf.internal.write('<</D[' + (item.options.pageNumber - 1) + ' /XYZ null null null]/S/GoTo>> endobj');\n              // this.line('/A ' + id + ' 0 R' );\n            }\n          }\n          this.objEnd();\n        }\n        for (var z = 0; z < node.children.length; z++) {\n          this.renderItems(node.children[z]);\n        }\n      };\n\n      pdf.outline.line = function(text) {\n        this.ctx.val += text + \"\\r\\n\";\n      };\n\n      pdf.outline.makeRef = function(node) {\n        return node.id + \" 0 R\";\n      };\n\n      pdf.outline.makeString = function(val) {\n        return \"(\" + pdf.internal.pdfEscape(val) + \")\";\n      };\n\n      pdf.outline.objStart = function(node) {\n        this.ctx.val += \"\\r\\n\" + node.id + \" 0 obj\" + \"\\r\\n<<\\r\\n\";\n      };\n\n      pdf.outline.objEnd = function() {\n        this.ctx.val += \">> \\r\\n\" + \"endobj\" + \"\\r\\n\";\n      };\n\n      pdf.outline.count_r = function(ctx, node) {\n        for (var i = 0; i < node.children.length; i++) {\n          ctx.count++;\n          this.count_r(ctx, node.children[i]);\n        }\n        return ctx.count;\n      };\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF jpeg Support PlugIn\n *\n * @name jpeg_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * 0xc0 (SOF) Huffman  - Baseline DCT\n   * 0xc1 (SOF) Huffman  - Extended sequential DCT\n   * 0xc2 Progressive DCT (SOF2)\n   * 0xc3 Spatial (sequential) lossless (SOF3)\n   * 0xc4 Differential sequential DCT (SOF5)\n   * 0xc5 Differential progressive DCT (SOF6)\n   * 0xc6 Differential spatial (SOF7)\n   * 0xc7\n   */\n  var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];\n\n  //takes a string imgData containing the raw bytes of\n  //a jpeg image and returns [width, height]\n  //Algorithm from: http://www.64lines.com/jpeg-width-height\n  var getJpegInfo = function(imgData) {\n    var width, height, numcomponents;\n    var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);\n    var len = imgData.length;\n    var result = { width: 0, height: 0, numcomponents: 1 };\n    for (var i = 4; i < len; i += 2) {\n      i += blockLength;\n      if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {\n        height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);\n        width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);\n        numcomponents = imgData.charCodeAt(i + 9);\n        result = { width: width, height: height, numcomponents: numcomponents };\n        break;\n      } else {\n        blockLength =\n          imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);\n      }\n    }\n    return result;\n  };\n\n  /**\n   * @ignore\n   */\n  jsPDFAPI.processJPEG = function(\n    data,\n    index,\n    alias,\n    compression,\n    dataAsBinaryString,\n    colorSpace\n  ) {\n    var filter = this.decode.DCT_DECODE,\n      bpc = 8,\n      dims,\n      result = null;\n\n    if (\n      typeof data === \"string\" ||\n      this.__addimage__.isArrayBuffer(data) ||\n      this.__addimage__.isArrayBufferView(data)\n    ) {\n      // if we already have a stored binary string rep use that\n      data = dataAsBinaryString || data;\n      data = this.__addimage__.isArrayBuffer(data)\n        ? new Uint8Array(data)\n        : data;\n      data = this.__addimage__.isArrayBufferView(data)\n        ? this.__addimage__.arrayBufferToBinaryString(data)\n        : data;\n\n      dims = getJpegInfo(data);\n      switch (dims.numcomponents) {\n        case 1:\n          colorSpace = this.color_spaces.DEVICE_GRAY;\n          break;\n        case 4:\n          colorSpace = this.color_spaces.DEVICE_CMYK;\n          break;\n        case 3:\n          colorSpace = this.color_spaces.DEVICE_RGB;\n          break;\n      }\n\n      result = {\n        data: data,\n        width: dims.width,\n        height: dims.height,\n        colorSpace: colorSpace,\n        bitsPerComponent: bpc,\n        filter: filter,\n        index: index,\n        alias: alias\n      };\n    }\n    return result;\n  };\n})(jsPDF.API);\n","// Generated by CoffeeScript 1.4.0\n\n/**\n * @license\n * PNG.js\n * Copyright (c) 2011 Devon Govett\n * MIT LICENSE\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this\n * software and associated documentation files (the \"Software\"), to deal in the Software\n * without restriction, including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons\n * to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or\n * substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\n * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport { unzlibSync } from \"./fflate.js\";\nimport { globalObject } from \"./globalObject.js\";\n\nvar PNG = (function() {\n  var APNG_BLEND_OP_OVER,\n    APNG_BLEND_OP_SOURCE,\n    APNG_DISPOSE_OP_BACKGROUND,\n    APNG_DISPOSE_OP_NONE,\n    APNG_DISPOSE_OP_PREVIOUS,\n    makeImage,\n    scratchCanvas,\n    scratchCtx;\n\n  APNG_DISPOSE_OP_NONE = 0;\n\n  APNG_DISPOSE_OP_BACKGROUND = 1;\n\n  APNG_DISPOSE_OP_PREVIOUS = 2;\n\n  APNG_BLEND_OP_SOURCE = 0;\n\n  APNG_BLEND_OP_OVER = 1;\n\n  function PNG(data) {\n    var chunkSize,\n      colors,\n      palLen,\n      delayDen,\n      delayNum,\n      frame,\n      i,\n      index,\n      key,\n      section,\n      palShort,\n      text,\n      _i,\n      _j,\n      _ref;\n    this.data = data;\n    this.pos = 8;\n    this.palette = [];\n    this.imgData = [];\n    this.transparency = {};\n    this.animation = null;\n    this.text = {};\n    frame = null;\n    while (true) {\n      chunkSize = this.readUInt32();\n      section = function() {\n        var _i, _results;\n        _results = [];\n        for (i = _i = 0; _i < 4; i = ++_i) {\n          _results.push(String.fromCharCode(this.data[this.pos++]));\n        }\n        return _results;\n      }\n        .call(this)\n        .join(\"\");\n      switch (section) {\n        case \"IHDR\":\n          this.width = this.readUInt32();\n          this.height = this.readUInt32();\n          this.bits = this.data[this.pos++];\n          this.colorType = this.data[this.pos++];\n          this.compressionMethod = this.data[this.pos++];\n          this.filterMethod = this.data[this.pos++];\n          this.interlaceMethod = this.data[this.pos++];\n          break;\n        case \"acTL\":\n          this.animation = {\n            numFrames: this.readUInt32(),\n            numPlays: this.readUInt32() || Infinity,\n            frames: []\n          };\n          break;\n        case \"PLTE\":\n          this.palette = this.read(chunkSize);\n          break;\n        case \"fcTL\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.pos += 4;\n          frame = {\n            width: this.readUInt32(),\n            height: this.readUInt32(),\n            xOffset: this.readUInt32(),\n            yOffset: this.readUInt32()\n          };\n          delayNum = this.readUInt16();\n          delayDen = this.readUInt16() || 100;\n          frame.delay = (1000 * delayNum) / delayDen;\n          frame.disposeOp = this.data[this.pos++];\n          frame.blendOp = this.data[this.pos++];\n          frame.data = [];\n          break;\n        case \"IDAT\":\n        case \"fdAT\":\n          if (section === \"fdAT\") {\n            this.pos += 4;\n            chunkSize -= 4;\n          }\n          data = (frame != null ? frame.data : void 0) || this.imgData;\n          for (\n            i = _i = 0;\n            0 <= chunkSize ? _i < chunkSize : _i > chunkSize;\n            i = 0 <= chunkSize ? ++_i : --_i\n          ) {\n            data.push(this.data[this.pos++]);\n          }\n          break;\n        case \"tRNS\":\n          this.transparency = {};\n          switch (this.colorType) {\n            case 3:\n              palLen = this.palette.length / 3;\n              this.transparency.indexed = this.read(chunkSize);\n              if (this.transparency.indexed.length > palLen)\n                throw new Error(\"More transparent colors than palette size\");\n              /*\n               * According to the PNG spec trns should be increased to the same size as palette if shorter\n               */\n              //palShort = 255 - this.transparency.indexed.length;\n              palShort = palLen - this.transparency.indexed.length;\n              if (palShort > 0) {\n                for (\n                  i = _j = 0;\n                  0 <= palShort ? _j < palShort : _j > palShort;\n                  i = 0 <= palShort ? ++_j : --_j\n                ) {\n                  this.transparency.indexed.push(255);\n                }\n              }\n              break;\n            case 0:\n              this.transparency.grayscale = this.read(chunkSize)[0];\n              break;\n            case 2:\n              this.transparency.rgb = this.read(chunkSize);\n          }\n          break;\n        case \"tEXt\":\n          text = this.read(chunkSize);\n          index = text.indexOf(0);\n          key = String.fromCharCode.apply(String, text.slice(0, index));\n          this.text[key] = String.fromCharCode.apply(\n            String,\n            text.slice(index + 1)\n          );\n          break;\n        case \"IEND\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.colors = function() {\n            switch (this.colorType) {\n              case 0:\n              case 3:\n              case 4:\n                return 1;\n              case 2:\n              case 6:\n                return 3;\n            }\n          }.call(this);\n          this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;\n          colors = this.colors + (this.hasAlphaChannel ? 1 : 0);\n          this.pixelBitlength = this.bits * colors;\n          this.colorSpace = function() {\n            switch (this.colors) {\n              case 1:\n                return \"DeviceGray\";\n              case 3:\n                return \"DeviceRGB\";\n            }\n          }.call(this);\n          this.imgData = new Uint8Array(this.imgData);\n          return;\n        default:\n          this.pos += chunkSize;\n      }\n      this.pos += 4;\n      if (this.pos > this.data.length) {\n        throw new Error(\"Incomplete or corrupt PNG file\");\n      }\n    }\n  }\n\n  PNG.prototype.read = function(bytes) {\n    var i, _i, _results;\n    _results = [];\n    for (\n      i = _i = 0;\n      0 <= bytes ? _i < bytes : _i > bytes;\n      i = 0 <= bytes ? ++_i : --_i\n    ) {\n      _results.push(this.data[this.pos++]);\n    }\n    return _results;\n  };\n\n  PNG.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.data[this.pos++] << 24;\n    b2 = this.data[this.pos++] << 16;\n    b3 = this.data[this.pos++] << 8;\n    b4 = this.data[this.pos++];\n    return b1 | b2 | b3 | b4;\n  };\n\n  PNG.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.data[this.pos++] << 8;\n    b2 = this.data[this.pos++];\n    return b1 | b2;\n  };\n\n  PNG.prototype.decodePixels = function(data) {\n    var pixelBytes = this.pixelBitlength / 8;\n    var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);\n    var pos = 0;\n    var _this = this;\n\n    if (data == null) {\n      data = this.imgData;\n    }\n    if (data.length === 0) {\n      return new Uint8Array(0);\n    }\n\n    data = unzlibSync(data);\n    function pass(x0, y0, dx, dy) {\n      var abyte,\n        c,\n        col,\n        i,\n        left,\n        length,\n        p,\n        pa,\n        paeth,\n        pb,\n        pc,\n        pixels,\n        row,\n        scanlineLength,\n        upper,\n        upperLeft,\n        _i,\n        _j,\n        _k,\n        _l,\n        _m;\n      var w = Math.ceil((_this.width - x0) / dx),\n        h = Math.ceil((_this.height - y0) / dy);\n      var isFull = _this.width == w && _this.height == h;\n      scanlineLength = pixelBytes * w;\n      pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);\n      length = data.length;\n      row = 0;\n      c = 0;\n      while (row < h && pos < length) {\n        switch (data[pos++]) {\n          case 0:\n            for (i = _i = 0; _i < scanlineLength; i = _i += 1) {\n              pixels[c++] = data[pos++];\n            }\n            break;\n          case 1:\n            for (i = _j = 0; _j < scanlineLength; i = _j += 1) {\n              abyte = data[pos++];\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              pixels[c++] = (abyte + left) % 256;\n            }\n            break;\n          case 2:\n            for (i = _k = 0; _k < scanlineLength; i = _k += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (upper + abyte) % 256;\n            }\n            break;\n          case 3:\n            for (i = _l = 0; _l < scanlineLength; i = _l += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;\n            }\n            break;\n          case 4:\n            for (i = _m = 0; _m < scanlineLength; i = _m += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              if (row === 0) {\n                upper = upperLeft = 0;\n              } else {\n                upper =\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      col * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n                upperLeft =\n                  col &&\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      (col - 1) * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n              }\n              p = left + upper - upperLeft;\n              pa = Math.abs(p - left);\n              pb = Math.abs(p - upper);\n              pc = Math.abs(p - upperLeft);\n              if (pa <= pb && pa <= pc) {\n                paeth = left;\n              } else if (pb <= pc) {\n                paeth = upper;\n              } else {\n                paeth = upperLeft;\n              }\n              pixels[c++] = (abyte + paeth) % 256;\n            }\n            break;\n          default:\n            throw new Error(\"Invalid filter algorithm: \" + data[pos - 1]);\n        }\n        if (!isFull) {\n          var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;\n          var partPos = row * scanlineLength;\n          for (i = 0; i < w; i += 1) {\n            for (var j = 0; j < pixelBytes; j += 1)\n              fullPixels[fullPos++] = pixels[partPos++];\n            fullPos += (dx - 1) * pixelBytes;\n          }\n        }\n        row++;\n      }\n    }\n    if (_this.interlaceMethod == 1) {\n      /*\n          1 6 4 6 2 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n          3 6 4 6 3 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n        */\n      pass(0, 0, 8, 8); // 1\n      /* NOTE these seem to follow the pattern:\n       * pass(x, 0, 2*x, 2*x);\n       * pass(0, x,   x, 2*x);\n       * with x being 4, 2, 1.\n       */\n      pass(4, 0, 8, 8); // 2\n      pass(0, 4, 4, 8); // 3\n\n      pass(2, 0, 4, 4); // 4\n      pass(0, 2, 2, 4); // 5\n\n      pass(1, 0, 2, 2); // 6\n      pass(0, 1, 1, 2); // 7\n    } else {\n      pass(0, 0, 1, 1);\n    }\n    return fullPixels;\n  };\n\n  PNG.prototype.decodePalette = function() {\n    var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;\n    palette = this.palette;\n    transparency = this.transparency.indexed || [];\n    ret = new Uint8Array((transparency.length || 0) + palette.length);\n    pos = 0;\n    length = palette.length;\n    c = 0;\n    for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {\n      ret[pos++] = palette[i];\n      ret[pos++] = palette[i + 1];\n      ret[pos++] = palette[i + 2];\n      ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;\n    }\n    return ret;\n  };\n\n  PNG.prototype.copyToImageData = function(imageData, pixels) {\n    var alpha, colors, data, i, input, j, k, length, palette, v, _ref;\n    colors = this.colors;\n    palette = null;\n    alpha = this.hasAlphaChannel;\n    if (this.palette.length) {\n      palette =\n        (_ref = this._decodedPalette) != null\n          ? _ref\n          : (this._decodedPalette = this.decodePalette());\n      colors = 4;\n      alpha = true;\n    }\n    data = imageData.data || imageData;\n    length = data.length;\n    input = palette || pixels;\n    i = j = 0;\n    if (colors === 1) {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        v = input[k++];\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    } else {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    }\n  };\n\n  PNG.prototype.decode = function() {\n    var ret;\n    ret = new Uint8Array(this.width * this.height * 4);\n    this.copyToImageData(ret, this.decodePixels());\n    return ret;\n  };\n\n  var hasBrowserCanvas = function() {\n    if (Object.prototype.toString.call(globalObject) === \"[object Window]\") {\n      try {\n        scratchCanvas = globalObject.document.createElement(\"canvas\");\n        scratchCtx = scratchCanvas.getContext(\"2d\");\n      } catch (e) {\n        return false;\n      }\n      return true;\n    }\n    return false;\n  };\n\n  hasBrowserCanvas();\n\n  makeImage = function(imageData) {\n    if (hasBrowserCanvas() === true) {\n      var img;\n      scratchCtx.width = imageData.width;\n      scratchCtx.height = imageData.height;\n      scratchCtx.clearRect(0, 0, imageData.width, imageData.height);\n      scratchCtx.putImageData(imageData, 0, 0);\n      img = new Image();\n      img.src = scratchCanvas.toDataURL();\n      return img;\n    }\n    throw new Error(\"This method requires a Browser with Canvas-capability.\");\n  };\n\n  PNG.prototype.decodeFrames = function(ctx) {\n    var frame, i, imageData, pixels, _i, _len, _ref, _results;\n    if (!this.animation) {\n      return;\n    }\n    _ref = this.animation.frames;\n    _results = [];\n    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {\n      frame = _ref[i];\n      imageData = ctx.createImageData(frame.width, frame.height);\n      pixels = this.decodePixels(new Uint8Array(frame.data));\n      this.copyToImageData(imageData, pixels);\n      frame.imageData = imageData;\n      _results.push((frame.image = makeImage(imageData)));\n    }\n    return _results;\n  };\n\n  PNG.prototype.renderFrame = function(ctx, number) {\n    var frame, frames, prev;\n    frames = this.animation.frames;\n    frame = frames[number];\n    prev = frames[number - 1];\n    if (number === 0) {\n      ctx.clearRect(0, 0, this.width, this.height);\n    }\n    if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND\n    ) {\n      ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);\n    } else if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS\n    ) {\n      ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);\n    }\n    if (frame.blendOp === APNG_BLEND_OP_SOURCE) {\n      ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);\n    }\n    return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);\n  };\n\n  PNG.prototype.animate = function(ctx) {\n    var doFrame,\n      frameNumber,\n      frames,\n      numFrames,\n      numPlays,\n      _ref,\n      _this = this;\n    frameNumber = 0;\n    (_ref = this.animation),\n      (numFrames = _ref.numFrames),\n      (frames = _ref.frames),\n      (numPlays = _ref.numPlays);\n    return (doFrame = function() {\n      var f, frame;\n      f = frameNumber++ % numFrames;\n      frame = frames[f];\n      _this.renderFrame(ctx, f);\n      if (numFrames > 1 && frameNumber / numFrames < numPlays) {\n        return (_this.animation._timeout = setTimeout(doFrame, frame.delay));\n      }\n    })();\n  };\n\n  PNG.prototype.stopAnimation = function() {\n    var _ref;\n    return clearTimeout(\n      (_ref = this.animation) != null ? _ref._timeout : void 0\n    );\n  };\n\n  PNG.prototype.render = function(canvas) {\n    var ctx, data;\n    if (canvas._png) {\n      canvas._png.stopAnimation();\n    }\n    canvas._png = this;\n    canvas.width = this.width;\n    canvas.height = this.height;\n    ctx = canvas.getContext(\"2d\");\n    if (this.animation) {\n      this.decodeFrames(ctx);\n      return this.animate(ctx);\n    } else {\n      data = ctx.createImageData(this.width, this.height);\n      this.copyToImageData(data, this.decodePixels());\n      return ctx.putImageData(data, 0, 0);\n    }\n  };\n\n  return PNG;\n})();\n\nexport { PNG };\n","/**\n * @license\n *\n * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\nimport { PNG } from \"../libs/png.js\";\n\n/**\n * jsPDF PNG PlugIn\n * @name png_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /*\n   * @see http://www.w3.org/TR/PNG-Chunks.html\n   *\n   Color    Allowed      Interpretation\n   Type     Bit Depths\n\n     0       1,2,4,8,16  Each pixel is a grayscale sample.\n\n     2       8,16        Each pixel is an R,G,B triple.\n\n     3       1,2,4,8     Each pixel is a palette index;\n                         a PLTE chunk must appear.\n\n     4       8,16        Each pixel is a grayscale sample,\n                         followed by an alpha sample.\n\n     6       8,16        Each pixel is an R,G,B triple,\n                         followed by an alpha sample.\n  */\n\n  /*\n   * PNG filter method types\n   *\n   * @see http://www.w3.org/TR/PNG-Filters.html\n   * @see http://www.libpng.org/pub/png/book/chapter09.html\n   *\n   * This is what the value 'Predictor' in decode params relates to\n   *\n   * 15 is \"optimal prediction\", which means the prediction algorithm can change from line to line.\n   * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.\n   *\n     0       None\n     1       Sub\n     2       Up\n     3       Average\n     4       Paeth\n   */\n\n  var canCompress = function(value) {\n    return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();\n  };\n\n  var hasCompressionJS = function() {\n    return typeof zlibSync === \"function\";\n  };\n  var compressBytes = function(bytes, lineLength, colorsPerPixel, compression) {\n    var level = 4;\n    var filter_method = filterUp;\n\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        level = 1;\n        filter_method = filterSub;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        level = 6;\n        filter_method = filterAverage;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        level = 9;\n        filter_method = filterPaeth;\n        break;\n    }\n\n    bytes = applyPngFilterMethod(\n      bytes,\n      lineLength,\n      colorsPerPixel,\n      filter_method\n    );\n    var dat = zlibSync(bytes, { level: level });\n    return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);\n  };\n\n  var applyPngFilterMethod = function(\n    bytes,\n    lineLength,\n    colorsPerPixel,\n    filter_method\n  ) {\n    var lines = bytes.length / lineLength,\n      result = new Uint8Array(bytes.length + lines),\n      filter_methods = getFilterMethods(),\n      line,\n      prevLine,\n      offset;\n\n    for (var i = 0; i < lines; i += 1) {\n      offset = i * lineLength;\n      line = bytes.subarray(offset, offset + lineLength);\n\n      if (filter_method) {\n        result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);\n      } else {\n        var len = filter_methods.length,\n          results = [];\n\n        for (var j; j < len; j += 1) {\n          results[j] = filter_methods[j](line, colorsPerPixel, prevLine);\n        }\n\n        var ind = getIndexOfSmallestSum(results.concat());\n\n        result.set(results[ind], offset + i);\n      }\n\n      prevLine = line;\n    }\n\n    return result;\n  };\n\n  var filterNone = function(line) {\n    /*var result = new Uint8Array(line.length + 1);\n    result[0] = 0;\n    result.set(line, 1);*/\n\n    var result = Array.apply([], line);\n    result.unshift(0);\n\n    return result;\n  };\n\n  var filterSub = function(line, colorsPerPixel) {\n    var result = [],\n      len = line.length,\n      left;\n\n    result[0] = 1;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      result[i + 1] = (line[i] - left + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterUp = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      up;\n\n    result[0] = 2;\n\n    for (var i = 0; i < len; i += 1) {\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] - up + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterAverage = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up;\n\n    result[0] = 3;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] + 0x0100 - ((left + up) >>> 1)) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterPaeth = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up,\n      upLeft,\n      paeth;\n\n    result[0] = 4;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      upLeft = (prevLine && prevLine[i - colorsPerPixel]) || 0;\n      paeth = paethPredictor(left, up, upLeft);\n      result[i + 1] = (line[i] - paeth + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var paethPredictor = function(left, up, upLeft) {\n    if (left === up && up === upLeft) {\n      return left;\n    }\n    var pLeft = Math.abs(up - upLeft),\n      pUp = Math.abs(left - upLeft),\n      pUpLeft = Math.abs(left + up - upLeft - upLeft);\n    return pLeft <= pUp && pLeft <= pUpLeft\n      ? left\n      : pUp <= pUpLeft\n      ? up\n      : upLeft;\n  };\n\n  var getFilterMethods = function() {\n    return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];\n  };\n\n  var getIndexOfSmallestSum = function(arrays) {\n    var sum = arrays.map(function(value) {\n      return value.reduce(function(pv, cv) {\n        return pv + Math.abs(cv);\n      }, 0);\n    });\n    return sum.indexOf(Math.min.apply(null, sum));\n  };\n\n  var getPredictorFromCompression = function(compression) {\n    var predictor;\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        predictor = 11;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        predictor = 13;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        predictor = 14;\n        break;\n\n      default:\n        predictor = 12;\n        break;\n    }\n    return predictor;\n  };\n\n  /**\n   * @name processPNG\n   * @function\n   * @ignore\n   */\n  jsPDFAPI.processPNG = function(imageData, index, alias, compression) {\n    \"use strict\";\n\n    var colorSpace,\n      filter = this.decode.FLATE_DECODE,\n      bitsPerComponent,\n      image,\n      decodeParameters = \"\",\n      trns,\n      colors,\n      pal,\n      smask,\n      pixels,\n      len,\n      alphaData,\n      imgData,\n      hasColors,\n      pixel,\n      i,\n      n;\n\n    if (this.__addimage__.isArrayBuffer(imageData))\n      imageData = new Uint8Array(imageData);\n\n    if (this.__addimage__.isArrayBufferView(imageData)) {\n      image = new PNG(imageData);\n      imageData = image.imgData;\n      bitsPerComponent = image.bits;\n      colorSpace = image.colorSpace;\n      colors = image.colors;\n\n      /*\n       * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.\n       *\n       * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.\n       *\n       * Extract alpha to create two separate images, using the alpha as a sMask\n       */\n      if ([4, 6].indexOf(image.colorType) !== -1) {\n        /*\n         * processes 8 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 8) {\n          pixels =\n            image.pixelBitlength == 32\n              ? new Uint32Array(image.decodePixels().buffer)\n              : image.pixelBitlength == 16\n              ? new Uint16Array(image.decodePixels().buffer)\n              : new Uint8Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(len * image.colors);\n          alphaData = new Uint8Array(len);\n          var pDiff = image.pixelBitlength - image.bits;\n          i = 0;\n          n = 0;\n          var pbl;\n\n          for (; i < len; i++) {\n            pixel = pixels[i];\n            pbl = 0;\n\n            while (pbl < pDiff) {\n              imgData[n++] = (pixel >>> pbl) & 0xff;\n              pbl = pbl + image.bits;\n            }\n\n            alphaData[i] = (pixel >>> pbl) & 0xff;\n          }\n        }\n\n        /*\n         * processes 16 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 16) {\n          pixels = new Uint32Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(\n            len * (32 / image.pixelBitlength) * image.colors\n          );\n          alphaData = new Uint8Array(len * (32 / image.pixelBitlength));\n          hasColors = image.colors > 1;\n          i = 0;\n          n = 0;\n          var a = 0;\n\n          while (i < len) {\n            pixel = pixels[i++];\n\n            imgData[n++] = (pixel >>> 0) & 0xff;\n\n            if (hasColors) {\n              imgData[n++] = (pixel >>> 16) & 0xff;\n\n              pixel = pixels[i++];\n              imgData[n++] = (pixel >>> 0) & 0xff;\n            }\n\n            alphaData[a++] = (pixel >>> 16) & 0xff;\n          }\n          bitsPerComponent = 8;\n        }\n\n        if (canCompress(compression)) {\n          imageData = compressBytes(\n            imgData,\n            image.width * image.colors,\n            image.colors,\n            compression\n          );\n          smask = compressBytes(alphaData, image.width, 1, compression);\n        } else {\n          imageData = imgData;\n          smask = alphaData;\n          filter = undefined;\n        }\n      }\n\n      /*\n       * Indexed png. Each pixel is a palette index.\n       */\n      if (image.colorType === 3) {\n        colorSpace = this.color_spaces.INDEXED;\n        pal = image.palette;\n\n        if (image.transparency.indexed) {\n          var trans = image.transparency.indexed;\n          var total = 0;\n          i = 0;\n          len = trans.length;\n\n          for (; i < len; ++i) {\n            total += trans[i];\n          }\n\n          total = total / 255;\n\n          /*\n           * a single color is specified as 100% transparent (0),\n           * so we set trns to use a /Mask with that index\n           */\n          if (total === len - 1 && trans.indexOf(0) !== -1) {\n            trns = [trans.indexOf(0)];\n\n            /*\n             * there's more than one colour within the palette that specifies\n             * a transparency value less than 255, so we unroll the pixels to create an image sMask\n             */\n          } else if (total !== len) {\n            pixels = image.decodePixels();\n            alphaData = new Uint8Array(pixels.length);\n            i = 0;\n            len = pixels.length;\n\n            for (; i < len; i++) {\n              alphaData[i] = trans[pixels[i]];\n            }\n\n            smask = compressBytes(alphaData, image.width, 1);\n          }\n        }\n      }\n\n      var predictor = getPredictorFromCompression(compression);\n\n      if (filter === this.decode.FLATE_DECODE) {\n        decodeParameters = \"/Predictor \" + predictor + \" \";\n      }\n      decodeParameters +=\n        \"/Colors \" +\n        colors +\n        \" /BitsPerComponent \" +\n        bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n\n      if (\n        this.__addimage__.isArrayBuffer(imageData) ||\n        this.__addimage__.isArrayBufferView(imageData)\n      ) {\n        imageData = this.__addimage__.arrayBufferToBinaryString(imageData);\n      }\n\n      if (\n        (smask && this.__addimage__.isArrayBuffer(smask)) ||\n        this.__addimage__.isArrayBufferView(smask)\n      ) {\n        smask = this.__addimage__.arrayBufferToBinaryString(smask);\n      }\n\n      return {\n        alias: alias,\n        data: imageData,\n        index: index,\n        filter: filter,\n        decodeParameters: decodeParameters,\n        transparency: trns,\n        palette: pal,\n        sMask: smask,\n        predictor: predictor,\n        width: image.width,\n        height: image.height,\n        bitsPerComponent: bitsPerComponent,\n        colorSpace: colorSpace\n      };\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * (c) Dean McNamee <dean@gmail.com>, 2013.\n *\n * https://github.com/deanm/omggif\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,\n * including animation and compression.  It does not rely on any specific\n * underlying system, so should run in the browser, Node, or Plask.\n */\n\n\"use strict\";\n\nimport { console } from \"./console.js\";\n\nfunction GifWriter(buf, width, height, gopts) {\n  var p = 0;\n\n  var gopts = gopts === undefined ? {} : gopts;\n  var loop_count = gopts.loop === undefined ? null : gopts.loop;\n  var global_palette = gopts.palette === undefined ? null : gopts.palette;\n\n  if (width <= 0 || height <= 0 || width > 65535 || height > 65535)\n    throw new Error(\"Width/Height invalid.\");\n\n  function check_palette_and_num_colors(palette) {\n    var num_colors = palette.length;\n    if (num_colors < 2 || num_colors > 256 || num_colors & (num_colors - 1)) {\n      throw new Error(\n        \"Invalid code/color length, must be power of 2 and 2 .. 256.\"\n      );\n    }\n    return num_colors;\n  }\n\n  // - Header.\n  buf[p++] = 0x47;\n  buf[p++] = 0x49;\n  buf[p++] = 0x46; // GIF\n  buf[p++] = 0x38;\n  buf[p++] = 0x39;\n  buf[p++] = 0x61; // 89a\n\n  // Handling of Global Color Table (palette) and background index.\n  var gp_num_colors_pow2 = 0;\n  var background = 0;\n  if (global_palette !== null) {\n    var gp_num_colors = check_palette_and_num_colors(global_palette);\n    while ((gp_num_colors >>= 1)) ++gp_num_colors_pow2;\n    gp_num_colors = 1 << gp_num_colors_pow2;\n    --gp_num_colors_pow2;\n    if (gopts.background !== undefined) {\n      background = gopts.background;\n      if (background >= gp_num_colors)\n        throw new Error(\"Background index out of range.\");\n      // The GIF spec states that a background index of 0 should be ignored, so\n      // this is probably a mistake and you really want to set it to another\n      // slot in the palette.  But actually in the end most browsers, etc end\n      // up ignoring this almost completely (including for dispose background).\n      if (background === 0)\n        throw new Error(\"Background index explicitly passed as 0.\");\n    }\n  }\n\n  // - Logical Screen Descriptor.\n  // NOTE(deanm): w/h apparently ignored by implementations, but set anyway.\n  buf[p++] = width & 0xff;\n  buf[p++] = (width >> 8) & 0xff;\n  buf[p++] = height & 0xff;\n  buf[p++] = (height >> 8) & 0xff;\n  // NOTE: Indicates 0-bpp original color resolution (unused?).\n  buf[p++] = (global_palette !== null ? 0x80 : 0) | gp_num_colors_pow2; // Global Color Table Flag. // NOTE: No sort flag (unused?).\n  buf[p++] = background; // Background Color Index.\n  buf[p++] = 0; // Pixel aspect ratio (unused?).\n\n  // - Global Color Table\n  if (global_palette !== null) {\n    for (var i = 0, il = global_palette.length; i < il; ++i) {\n      var rgb = global_palette[i];\n      buf[p++] = (rgb >> 16) & 0xff;\n      buf[p++] = (rgb >> 8) & 0xff;\n      buf[p++] = rgb & 0xff;\n    }\n  }\n\n  if (loop_count !== null) {\n    // Netscape block for looping.\n    if (loop_count < 0 || loop_count > 65535)\n      throw new Error(\"Loop count invalid.\");\n    // Extension code, label, and length.\n    buf[p++] = 0x21;\n    buf[p++] = 0xff;\n    buf[p++] = 0x0b;\n    // NETSCAPE2.0\n    buf[p++] = 0x4e;\n    buf[p++] = 0x45;\n    buf[p++] = 0x54;\n    buf[p++] = 0x53;\n    buf[p++] = 0x43;\n    buf[p++] = 0x41;\n    buf[p++] = 0x50;\n    buf[p++] = 0x45;\n    buf[p++] = 0x32;\n    buf[p++] = 0x2e;\n    buf[p++] = 0x30;\n    // Sub-block\n    buf[p++] = 0x03;\n    buf[p++] = 0x01;\n    buf[p++] = loop_count & 0xff;\n    buf[p++] = (loop_count >> 8) & 0xff;\n    buf[p++] = 0x00; // Terminator.\n  }\n\n  var ended = false;\n\n  this.addFrame = function(x, y, w, h, indexed_pixels, opts) {\n    if (ended === true) {\n      --p;\n      ended = false;\n    } // Un-end.\n\n    opts = opts === undefined ? {} : opts;\n\n    // TODO(deanm): Bounds check x, y.  Do they need to be within the virtual\n    // canvas width/height, I imagine?\n    if (x < 0 || y < 0 || x > 65535 || y > 65535)\n      throw new Error(\"x/y invalid.\");\n\n    if (w <= 0 || h <= 0 || w > 65535 || h > 65535)\n      throw new Error(\"Width/Height invalid.\");\n\n    if (indexed_pixels.length < w * h)\n      throw new Error(\"Not enough pixels for the frame size.\");\n\n    var using_local_palette = true;\n    var palette = opts.palette;\n    if (palette === undefined || palette === null) {\n      using_local_palette = false;\n      palette = global_palette;\n    }\n\n    if (palette === undefined || palette === null)\n      throw new Error(\"Must supply either a local or global palette.\");\n\n    var num_colors = check_palette_and_num_colors(palette);\n\n    // Compute the min_code_size (power of 2), destroying num_colors.\n    var min_code_size = 0;\n    while ((num_colors >>= 1)) ++min_code_size;\n    num_colors = 1 << min_code_size; // Now we can easily get it back.\n\n    var delay = opts.delay === undefined ? 0 : opts.delay;\n\n    // From the spec:\n    //     0 -   No disposal specified. The decoder is\n    //           not required to take any action.\n    //     1 -   Do not dispose. The graphic is to be left\n    //           in place.\n    //     2 -   Restore to background color. The area used by the\n    //           graphic must be restored to the background color.\n    //     3 -   Restore to previous. The decoder is required to\n    //           restore the area overwritten by the graphic with\n    //           what was there prior to rendering the graphic.\n    //  4-7 -    To be defined.\n    // NOTE(deanm): Dispose background doesn't really work, apparently most\n    // browsers ignore the background palette index and clear to transparency.\n    var disposal = opts.disposal === undefined ? 0 : opts.disposal;\n    if (disposal < 0 || disposal > 3)\n      // 4-7 is reserved.\n      throw new Error(\"Disposal out of range.\");\n\n    var use_transparency = false;\n    var transparent_index = 0;\n    if (opts.transparent !== undefined && opts.transparent !== null) {\n      use_transparency = true;\n      transparent_index = opts.transparent;\n      if (transparent_index < 0 || transparent_index >= num_colors)\n        throw new Error(\"Transparent color index.\");\n    }\n\n    if (disposal !== 0 || use_transparency || delay !== 0) {\n      // - Graphics Control Extension\n      buf[p++] = 0x21;\n      buf[p++] = 0xf9; // Extension / Label.\n      buf[p++] = 4; // Byte size.\n\n      buf[p++] = (disposal << 2) | (use_transparency === true ? 1 : 0);\n      buf[p++] = delay & 0xff;\n      buf[p++] = (delay >> 8) & 0xff;\n      buf[p++] = transparent_index; // Transparent color index.\n      buf[p++] = 0; // Block Terminator.\n    }\n\n    // - Image Descriptor\n    buf[p++] = 0x2c; // Image Seperator.\n    buf[p++] = x & 0xff;\n    buf[p++] = (x >> 8) & 0xff; // Left.\n    buf[p++] = y & 0xff;\n    buf[p++] = (y >> 8) & 0xff; // Top.\n    buf[p++] = w & 0xff;\n    buf[p++] = (w >> 8) & 0xff;\n    buf[p++] = h & 0xff;\n    buf[p++] = (h >> 8) & 0xff;\n    // NOTE: No sort flag (unused?).\n    // TODO(deanm): Support interlace.\n    buf[p++] = using_local_palette === true ? 0x80 | (min_code_size - 1) : 0;\n\n    // - Local Color Table\n    if (using_local_palette === true) {\n      for (var i = 0, il = palette.length; i < il; ++i) {\n        var rgb = palette[i];\n        buf[p++] = (rgb >> 16) & 0xff;\n        buf[p++] = (rgb >> 8) & 0xff;\n        buf[p++] = rgb & 0xff;\n      }\n    }\n\n    p = GifWriterOutputLZWCodeStream(\n      buf,\n      p,\n      min_code_size < 2 ? 2 : min_code_size,\n      indexed_pixels\n    );\n\n    return p;\n  };\n\n  this.end = function() {\n    if (ended === false) {\n      buf[p++] = 0x3b; // Trailer.\n      ended = true;\n    }\n    return p;\n  };\n\n  this.getOutputBuffer = function() {\n    return buf;\n  };\n  this.setOutputBuffer = function(v) {\n    buf = v;\n  };\n  this.getOutputBufferPosition = function() {\n    return p;\n  };\n  this.setOutputBufferPosition = function(v) {\n    p = v;\n  };\n}\n\n// Main compression routine, palette indexes -> LZW code stream.\n// |index_stream| must have at least one entry.\nfunction GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) {\n  buf[p++] = min_code_size;\n  var cur_subblock = p++; // Pointing at the length field.\n\n  var clear_code = 1 << min_code_size;\n  var code_mask = clear_code - 1;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  var cur_shift = 0;\n  // We have at most 12-bit codes, so we should have to hold a max of 19\n  // bits here (and then we would write out).\n  var cur = 0;\n\n  function emit_bytes_to_buffer(bit_block_size) {\n    while (cur_shift >= bit_block_size) {\n      buf[p++] = cur & 0xff;\n      cur >>= 8;\n      cur_shift -= 8;\n      if (p === cur_subblock + 256) {\n        // Finished a subblock.\n        buf[cur_subblock] = 255;\n        cur_subblock = p++;\n      }\n    }\n  }\n\n  function emit_code(c) {\n    cur |= c << cur_shift;\n    cur_shift += cur_code_size;\n    emit_bytes_to_buffer(8);\n  }\n\n  // I am not an expert on the topic, and I don't want to write a thesis.\n  // However, it is good to outline here the basic algorithm and the few data\n  // structures and optimizations here that make this implementation fast.\n  // The basic idea behind LZW is to build a table of previously seen runs\n  // addressed by a short id (herein called output code).  All data is\n  // referenced by a code, which represents one or more values from the\n  // original input stream.  All input bytes can be referenced as the same\n  // value as an output code.  So if you didn't want any compression, you\n  // could more or less just output the original bytes as codes (there are\n  // some details to this, but it is the idea).  In order to achieve\n  // compression, values greater then the input range (codes can be up to\n  // 12-bit while input only 8-bit) represent a sequence of previously seen\n  // inputs.  The decompressor is able to build the same mapping while\n  // decoding, so there is always a shared common knowledge between the\n  // encoding and decoder, which is also important for \"timing\" aspects like\n  // how to handle variable bit width code encoding.\n  //\n  // One obvious but very important consequence of the table system is there\n  // is always a unique id (at most 12-bits) to map the runs.  'A' might be\n  // 4, then 'AA' might be 10, 'AAA' 11, 'AAAA' 12, etc.  This relationship\n  // can be used for an effecient lookup strategy for the code mapping.  We\n  // need to know if a run has been seen before, and be able to map that run\n  // to the output code.  Since we start with known unique ids (input bytes),\n  // and then from those build more unique ids (table entries), we can\n  // continue this chain (almost like a linked list) to always have small\n  // integer values that represent the current byte chains in the encoder.\n  // This means instead of tracking the input bytes (AAAABCD) to know our\n  // current state, we can track the table entry for AAAABC (it is guaranteed\n  // to exist by the nature of the algorithm) and the next character D.\n  // Therefor the tuple of (table_entry, byte) is guaranteed to also be\n  // unique.  This allows us to create a simple lookup key for mapping input\n  // sequences to codes (table indices) without having to store or search\n  // any of the code sequences.  So if 'AAAA' has a table entry of 12, the\n  // tuple of ('AAAA', K) for any input byte K will be unique, and can be our\n  // key.  This leads to a integer value at most 20-bits, which can always\n  // fit in an SMI value and be used as a fast sparse array / object key.\n\n  // Output code for the current contents of the index buffer.\n  var ib_code = index_stream[0] & code_mask; // Load first input index.\n  var code_table = {}; // Key'd on our 20-bit \"tuple\".\n\n  emit_code(clear_code); // Spec says first code should be a clear code.\n\n  // First index already loaded, process the rest of the stream.\n  for (var i = 1, il = index_stream.length; i < il; ++i) {\n    var k = index_stream[i] & code_mask;\n    var cur_key = (ib_code << 8) | k; // (prev, k) unique tuple.\n    var cur_code = code_table[cur_key]; // buffer + k.\n\n    // Check if we have to create a new code table entry.\n    if (cur_code === undefined) {\n      // We don't have buffer + k.\n      // Emit index buffer (without k).\n      // This is an inline version of emit_code, because this is the core\n      // writing routine of the compressor (and V8 cannot inline emit_code\n      // because it is a closure here in a different context).  Additionally\n      // we can call emit_byte_to_buffer less often, because we can have\n      // 30-bits (from our 31-bit signed SMI), and we know our codes will only\n      // be 12-bits, so can safely have 18-bits there without overflow.\n      // emit_code(ib_code);\n      cur |= ib_code << cur_shift;\n      cur_shift += cur_code_size;\n      while (cur_shift >= 8) {\n        buf[p++] = cur & 0xff;\n        cur >>= 8;\n        cur_shift -= 8;\n        if (p === cur_subblock + 256) {\n          // Finished a subblock.\n          buf[cur_subblock] = 255;\n          cur_subblock = p++;\n        }\n      }\n\n      if (next_code === 4096) {\n        // Table full, need a clear.\n        emit_code(clear_code);\n        next_code = eoi_code + 1;\n        cur_code_size = min_code_size + 1;\n        code_table = {};\n      } else {\n        // Table not full, insert a new entry.\n        // Increase our variable bit code sizes if necessary.  This is a bit\n        // tricky as it is based on \"timing\" between the encoding and\n        // decoder.  From the encoders perspective this should happen after\n        // we've already emitted the index buffer and are about to create the\n        // first table entry that would overflow our current code bit size.\n        if (next_code >= 1 << cur_code_size) ++cur_code_size;\n        code_table[cur_key] = next_code++; // Insert into code table.\n      }\n\n      ib_code = k; // Index buffer to single input k.\n    } else {\n      ib_code = cur_code; // Index buffer to sequence in code table.\n    }\n  }\n\n  emit_code(ib_code); // There will still be something in the index buffer.\n  emit_code(eoi_code); // End Of Information.\n\n  // Flush / finalize the sub-blocks stream to the buffer.\n  emit_bytes_to_buffer(1);\n\n  // Finish the sub-blocks, writing out any unfinished lengths and\n  // terminating with a sub-block of length 0.  If we have already started\n  // but not yet used a sub-block it can just become the terminator.\n  if (cur_subblock + 1 === p) {\n    // Started but unused.\n    buf[cur_subblock] = 0;\n  } else {\n    // Started and used, write length and additional terminator block.\n    buf[cur_subblock] = p - cur_subblock - 1;\n    buf[p++] = 0;\n  }\n  return p;\n}\n\nfunction GifReader(buf) {\n  var p = 0;\n\n  // - Header (GIF87a or GIF89a).\n  if (\n    buf[p++] !== 0x47 ||\n    buf[p++] !== 0x49 ||\n    buf[p++] !== 0x46 ||\n    buf[p++] !== 0x38 ||\n    ((buf[p++] + 1) & 0xfd) !== 0x38 ||\n    buf[p++] !== 0x61\n  ) {\n    throw new Error(\"Invalid GIF 87a/89a header.\");\n  }\n\n  // - Logical Screen Descriptor.\n  var width = buf[p++] | (buf[p++] << 8);\n  var height = buf[p++] | (buf[p++] << 8);\n  var pf0 = buf[p++]; // <Packed Fields>.\n  var global_palette_flag = pf0 >> 7;\n  var num_global_colors_pow2 = pf0 & 0x7;\n  var num_global_colors = 1 << (num_global_colors_pow2 + 1);\n  var background = buf[p++];\n  buf[p++]; // Pixel aspect ratio (unused?).\n\n  var global_palette_offset = null;\n  var global_palette_size = null;\n\n  if (global_palette_flag) {\n    global_palette_offset = p;\n    global_palette_size = num_global_colors;\n    p += num_global_colors * 3; // Seek past palette.\n  }\n\n  var no_eof = true;\n\n  var frames = [];\n\n  var delay = 0;\n  var transparent_index = null;\n  var disposal = 0; // 0 - No disposal specified.\n  var loop_count = null;\n\n  this.width = width;\n  this.height = height;\n\n  while (no_eof && p < buf.length) {\n    switch (buf[p++]) {\n      case 0x21: // Graphics Control Extension Block\n        switch (buf[p++]) {\n          case 0xff: // Application specific block\n            // Try if it's a Netscape block (with animation loop counter).\n            if (\n              buf[p] !== 0x0b || // 21 FF already read, check block size.\n              // NETSCAPE2.0\n              (buf[p + 1] == 0x4e &&\n                buf[p + 2] == 0x45 &&\n                buf[p + 3] == 0x54 &&\n                buf[p + 4] == 0x53 &&\n                buf[p + 5] == 0x43 &&\n                buf[p + 6] == 0x41 &&\n                buf[p + 7] == 0x50 &&\n                buf[p + 8] == 0x45 &&\n                buf[p + 9] == 0x32 &&\n                buf[p + 10] == 0x2e &&\n                buf[p + 11] == 0x30 &&\n                // Sub-block\n                buf[p + 12] == 0x03 &&\n                buf[p + 13] == 0x01 &&\n                buf[p + 16] == 0)\n            ) {\n              p += 14;\n              loop_count = buf[p++] | (buf[p++] << 8);\n              p++; // Skip terminator.\n            } else {\n              // We don't know what it is, just try to get past it.\n              p += 12;\n              while (true) {\n                // Seek through subblocks.\n                var block_size = buf[p++];\n                // Bad block size (ex: undefined from an out of bounds read).\n                if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n                if (block_size === 0) break; // 0 size is terminator\n                p += block_size;\n              }\n            }\n            break;\n\n          case 0xf9: // Graphics Control Extension\n            if (buf[p++] !== 0x4 || buf[p + 4] !== 0)\n              throw new Error(\"Invalid graphics extension block.\");\n            var pf1 = buf[p++];\n            delay = buf[p++] | (buf[p++] << 8);\n            transparent_index = buf[p++];\n            if ((pf1 & 1) === 0) transparent_index = null;\n            disposal = (pf1 >> 2) & 0x7;\n            p++; // Skip terminator.\n            break;\n\n          case 0xfe: // Comment Extension.\n            while (true) {\n              // Seek through subblocks.\n              var block_size = buf[p++];\n              // Bad block size (ex: undefined from an out of bounds read).\n              if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n              if (block_size === 0) break; // 0 size is terminator\n              // console.log(buf.slice(p, p+block_size).toString('ascii'));\n              p += block_size;\n            }\n            break;\n\n          default:\n            throw new Error(\n              \"Unknown graphic control label: 0x\" + buf[p - 1].toString(16)\n            );\n        }\n        break;\n\n      case 0x2c: // Image Descriptor.\n        var x = buf[p++] | (buf[p++] << 8);\n        var y = buf[p++] | (buf[p++] << 8);\n        var w = buf[p++] | (buf[p++] << 8);\n        var h = buf[p++] | (buf[p++] << 8);\n        var pf2 = buf[p++];\n        var local_palette_flag = pf2 >> 7;\n        var interlace_flag = (pf2 >> 6) & 1;\n        var num_local_colors_pow2 = pf2 & 0x7;\n        var num_local_colors = 1 << (num_local_colors_pow2 + 1);\n        var palette_offset = global_palette_offset;\n        var palette_size = global_palette_size;\n        var has_local_palette = false;\n        if (local_palette_flag) {\n          var has_local_palette = true;\n          palette_offset = p; // Override with local palette.\n          palette_size = num_local_colors;\n          p += num_local_colors * 3; // Seek past palette.\n        }\n\n        var data_offset = p;\n\n        p++; // codesize\n        while (true) {\n          var block_size = buf[p++];\n          // Bad block size (ex: undefined from an out of bounds read).\n          if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n          if (block_size === 0) break; // 0 size is terminator\n          p += block_size;\n        }\n\n        frames.push({\n          x: x,\n          y: y,\n          width: w,\n          height: h,\n          has_local_palette: has_local_palette,\n          palette_offset: palette_offset,\n          palette_size: palette_size,\n          data_offset: data_offset,\n          data_length: p - data_offset,\n          transparent_index: transparent_index,\n          interlaced: !!interlace_flag,\n          delay: delay,\n          disposal: disposal\n        });\n        break;\n\n      case 0x3b: // Trailer Marker (end of file).\n        no_eof = false;\n        break;\n\n      default:\n        throw new Error(\"Unknown gif block: 0x\" + buf[p - 1].toString(16));\n        break;\n    }\n  }\n\n  this.numFrames = function() {\n    return frames.length;\n  };\n\n  this.loopCount = function() {\n    return loop_count;\n  };\n\n  this.frameInfo = function(frame_num) {\n    if (frame_num < 0 || frame_num >= frames.length)\n      throw new Error(\"Frame index out of range.\");\n    return frames[frame_num];\n  };\n\n  this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = b;\n        pixels[op++] = g;\n        pixels[op++] = r;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n\n  // I will go to copy and paste hell one day...\n  this.decodeAndBlitFrameRGBA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = r;\n        pixels[op++] = g;\n        pixels[op++] = b;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n}\n\nfunction GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {\n  var min_code_size = code_stream[p++];\n\n  var clear_code = 1 << min_code_size;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  // NOTE: This shares the same name as the encoder, but has a different\n  // meaning here.  Here this masks each code coming from the code stream.\n  var code_mask = (1 << cur_code_size) - 1;\n  var cur_shift = 0;\n  var cur = 0;\n\n  var op = 0; // Output pointer.\n\n  var subblock_size = code_stream[p++];\n\n  // TODO(deanm): Would using a TypedArray be any faster?  At least it would\n  // solve the fast mode / backing store uncertainty.\n  // var code_table = Array(4096);\n  var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.\n\n  var prev_code = null; // Track code-1.\n\n  while (true) {\n    // Read up to two bytes, making sure we always 12-bits for max sized code.\n    while (cur_shift < 16) {\n      if (subblock_size === 0) break; // No more data to be read.\n\n      cur |= code_stream[p++] << cur_shift;\n      cur_shift += 8;\n\n      if (subblock_size === 1) {\n        // Never let it get to 0 to hold logic above.\n        subblock_size = code_stream[p++]; // Next subblock.\n      } else {\n        --subblock_size;\n      }\n    }\n\n    // TODO(deanm): We should never really get here, we should have received\n    // and EOI.\n    if (cur_shift < cur_code_size) break;\n\n    var code = cur & code_mask;\n    cur >>= cur_code_size;\n    cur_shift -= cur_code_size;\n\n    // TODO(deanm): Maybe should check that the first code was a clear code,\n    // at least this is what you're supposed to do.  But actually our encoder\n    // now doesn't emit a clear code first anyway.\n    if (code === clear_code) {\n      // We don't actually have to clear the table.  This could be a good idea\n      // for greater error checking, but we don't really do any anyway.  We\n      // will just track it with next_code and overwrite old entries.\n\n      next_code = eoi_code + 1;\n      cur_code_size = min_code_size + 1;\n      code_mask = (1 << cur_code_size) - 1;\n\n      // Don't update prev_code ?\n      prev_code = null;\n      continue;\n    } else if (code === eoi_code) {\n      break;\n    }\n\n    // We have a similar situation as the decoder, where we want to store\n    // variable length entries (code table entries), but we want to do in a\n    // faster manner than an array of arrays.  The code below stores sort of a\n    // linked list within the code table, and then \"chases\" through it to\n    // construct the dictionary entries.  When a new entry is created, just the\n    // last byte is stored, and the rest (prefix) of the entry is only\n    // referenced by its table entry.  Then the code chases through the\n    // prefixes until it reaches a single byte code.  We have to chase twice,\n    // first to compute the length, and then to actually copy the data to the\n    // output (backwards, since we know the length).  The alternative would be\n    // storing something in an intermediate stack, but that doesn't make any\n    // more sense.  I implemented an approach where it also stored the length\n    // in the code table, although it's a bit tricky because you run out of\n    // bits (12 + 12 + 8), but I didn't measure much improvements (the table\n    // entries are generally not the long).  Even when I created benchmarks for\n    // very long table entries the complexity did not seem worth it.\n    // The code table stores the prefix entry in 12 bits and then the suffix\n    // byte in 8 bits, so each entry is 20 bits.\n\n    var chase_code = code < next_code ? code : prev_code;\n\n    // Chase what we will output, either {CODE} or {CODE-1}.\n    var chase_length = 0;\n    var chase = chase_code;\n    while (chase > clear_code) {\n      chase = code_table[chase] >> 8;\n      ++chase_length;\n    }\n\n    var k = chase;\n\n    var op_end = op + chase_length + (chase_code !== code ? 1 : 0);\n    if (op_end > output_length) {\n      console.log(\"Warning, gif stream longer than expected.\");\n      return;\n    }\n\n    // Already have the first byte from the chase, might as well write it fast.\n    output[op++] = k;\n\n    op += chase_length;\n    var b = op; // Track pointer, writing backwards.\n\n    if (chase_code !== code)\n      // The case of emitting {CODE-1} + k.\n      output[op++] = k;\n\n    chase = chase_code;\n    while (chase_length--) {\n      chase = code_table[chase];\n      output[--b] = chase & 0xff; // Write backwards.\n      chase >>= 8; // Pull down to the prefix code.\n    }\n\n    if (prev_code !== null && next_code < 4096) {\n      code_table[next_code++] = (prev_code << 8) | k;\n      // TODO(deanm): Figure out this clearing vs code growth logic better.  I\n      // have an feeling that it should just happen somewhere else, for now it\n      // is awkward between when we grow past the max and then hit a clear code.\n      // For now just check if we hit the max 12-bits (then a clear code should\n      // follow, also of course encoded in 12-bits).\n      if (next_code >= code_mask + 1 && cur_code_size < 12) {\n        ++cur_code_size;\n        code_mask = (code_mask << 1) | 1;\n      }\n    }\n\n    prev_code = code;\n  }\n\n  if (op !== output_length) {\n    console.log(\"Warning, gif stream shorter than expected.\");\n  }\n\n  return output;\n}\n\nexport { GifReader, GifWriter };\n","/**\n * @license\n  Copyright (c) 2008, Adobe Systems Incorporated\n  All rights reserved.\n\n  Redistribution and use in source and binary forms, with or without \n  modification, are permitted provided that the following conditions are\n  met:\n\n  * Redistributions of source code must retain the above copyright notice, \n    this list of conditions and the following disclaimer.\n  \n  * Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the \n    documentation and/or other materials provided with the distribution.\n  \n  * Neither the name of Adobe Systems Incorporated nor the names of its \n    contributors may be used to endorse or promote products derived from \n    this software without specific prior written permission.\n\n  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n  IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \n  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*\nJPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n\nBasic GUI blocking jpeg encoder\n*/\n\nfunction JPEGEncoder(quality) {\n  var ffloor = Math.floor;\n  var YTable = new Array(64);\n  var UVTable = new Array(64);\n  var fdtbl_Y = new Array(64);\n  var fdtbl_UV = new Array(64);\n  var YDC_HT;\n  var UVDC_HT;\n  var YAC_HT;\n  var UVAC_HT;\n\n  var bitcode = new Array(65535);\n  var category = new Array(65535);\n  var outputfDCTQuant = new Array(64);\n  var DU = new Array(64);\n  var byteout = [];\n  var bytenew = 0;\n  var bytepos = 7;\n\n  var YDU = new Array(64);\n  var UDU = new Array(64);\n  var VDU = new Array(64);\n  var clt = new Array(256);\n  var RGB_YUV_TABLE = new Array(2048);\n  var currentQuality;\n\n  var ZigZag = [\n    0,\n    1,\n    5,\n    6,\n    14,\n    15,\n    27,\n    28,\n    2,\n    4,\n    7,\n    13,\n    16,\n    26,\n    29,\n    42,\n    3,\n    8,\n    12,\n    17,\n    25,\n    30,\n    41,\n    43,\n    9,\n    11,\n    18,\n    24,\n    31,\n    40,\n    44,\n    53,\n    10,\n    19,\n    23,\n    32,\n    39,\n    45,\n    52,\n    54,\n    20,\n    22,\n    33,\n    38,\n    46,\n    51,\n    55,\n    60,\n    21,\n    34,\n    37,\n    47,\n    50,\n    56,\n    59,\n    61,\n    35,\n    36,\n    48,\n    49,\n    57,\n    58,\n    62,\n    63\n  ];\n\n  var std_dc_luminance_nrcodes = [\n    0,\n    0,\n    1,\n    5,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_luminance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    3,\n    3,\n    2,\n    4,\n    3,\n    5,\n    5,\n    4,\n    4,\n    0,\n    0,\n    1,\n    0x7d\n  ];\n  var std_ac_luminance_values = [\n    0x01,\n    0x02,\n    0x03,\n    0x00,\n    0x04,\n    0x11,\n    0x05,\n    0x12,\n    0x21,\n    0x31,\n    0x41,\n    0x06,\n    0x13,\n    0x51,\n    0x61,\n    0x07,\n    0x22,\n    0x71,\n    0x14,\n    0x32,\n    0x81,\n    0x91,\n    0xa1,\n    0x08,\n    0x23,\n    0x42,\n    0xb1,\n    0xc1,\n    0x15,\n    0x52,\n    0xd1,\n    0xf0,\n    0x24,\n    0x33,\n    0x62,\n    0x72,\n    0x82,\n    0x09,\n    0x0a,\n    0x16,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x25,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x34,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe1,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf1,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  var std_dc_chrominance_nrcodes = [\n    0,\n    0,\n    3,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_chrominance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    2,\n    4,\n    4,\n    3,\n    4,\n    7,\n    5,\n    4,\n    4,\n    0,\n    1,\n    2,\n    0x77\n  ];\n  var std_ac_chrominance_values = [\n    0x00,\n    0x01,\n    0x02,\n    0x03,\n    0x11,\n    0x04,\n    0x05,\n    0x21,\n    0x31,\n    0x06,\n    0x12,\n    0x41,\n    0x51,\n    0x07,\n    0x61,\n    0x71,\n    0x13,\n    0x22,\n    0x32,\n    0x81,\n    0x08,\n    0x14,\n    0x42,\n    0x91,\n    0xa1,\n    0xb1,\n    0xc1,\n    0x09,\n    0x23,\n    0x33,\n    0x52,\n    0xf0,\n    0x15,\n    0x62,\n    0x72,\n    0xd1,\n    0x0a,\n    0x16,\n    0x24,\n    0x34,\n    0xe1,\n    0x25,\n    0xf1,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x82,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  function initQuantTables(sf) {\n    var YQT = [\n      16,\n      11,\n      10,\n      16,\n      24,\n      40,\n      51,\n      61,\n      12,\n      12,\n      14,\n      19,\n      26,\n      58,\n      60,\n      55,\n      14,\n      13,\n      16,\n      24,\n      40,\n      57,\n      69,\n      56,\n      14,\n      17,\n      22,\n      29,\n      51,\n      87,\n      80,\n      62,\n      18,\n      22,\n      37,\n      56,\n      68,\n      109,\n      103,\n      77,\n      24,\n      35,\n      55,\n      64,\n      81,\n      104,\n      113,\n      92,\n      49,\n      64,\n      78,\n      87,\n      103,\n      121,\n      120,\n      101,\n      72,\n      92,\n      95,\n      98,\n      112,\n      100,\n      103,\n      99\n    ];\n\n    for (var i = 0; i < 64; i++) {\n      var t = ffloor((YQT[i] * sf + 50) / 100);\n      t = Math.min(Math.max(t, 1), 255);\n      YTable[ZigZag[i]] = t;\n    }\n    var UVQT = [\n      17,\n      18,\n      24,\n      47,\n      99,\n      99,\n      99,\n      99,\n      18,\n      21,\n      26,\n      66,\n      99,\n      99,\n      99,\n      99,\n      24,\n      26,\n      56,\n      99,\n      99,\n      99,\n      99,\n      99,\n      47,\n      66,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99\n    ];\n    for (var j = 0; j < 64; j++) {\n      var u = ffloor((UVQT[j] * sf + 50) / 100);\n      u = Math.min(Math.max(u, 1), 255);\n      UVTable[ZigZag[j]] = u;\n    }\n    var aasf = [\n      1.0,\n      1.387039845,\n      1.306562965,\n      1.175875602,\n      1.0,\n      0.785694958,\n      0.5411961,\n      0.275899379\n    ];\n    var k = 0;\n    for (var row = 0; row < 8; row++) {\n      for (var col = 0; col < 8; col++) {\n        fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        k++;\n      }\n    }\n  }\n\n  function computeHuffmanTbl(nrcodes, std_table) {\n    var codevalue = 0;\n    var pos_in_table = 0;\n    var HT = new Array();\n    for (var k = 1; k <= 16; k++) {\n      for (var j = 1; j <= nrcodes[k]; j++) {\n        HT[std_table[pos_in_table]] = [];\n        HT[std_table[pos_in_table]][0] = codevalue;\n        HT[std_table[pos_in_table]][1] = k;\n        pos_in_table++;\n        codevalue++;\n      }\n      codevalue *= 2;\n    }\n    return HT;\n  }\n\n  function initHuffmanTbl() {\n    YDC_HT = computeHuffmanTbl(\n      std_dc_luminance_nrcodes,\n      std_dc_luminance_values\n    );\n    UVDC_HT = computeHuffmanTbl(\n      std_dc_chrominance_nrcodes,\n      std_dc_chrominance_values\n    );\n    YAC_HT = computeHuffmanTbl(\n      std_ac_luminance_nrcodes,\n      std_ac_luminance_values\n    );\n    UVAC_HT = computeHuffmanTbl(\n      std_ac_chrominance_nrcodes,\n      std_ac_chrominance_values\n    );\n  }\n\n  function initCategoryNumber() {\n    var nrlower = 1;\n    var nrupper = 2;\n    for (var cat = 1; cat <= 15; cat++) {\n      //Positive numbers\n      for (var nr = nrlower; nr < nrupper; nr++) {\n        category[32767 + nr] = cat;\n        bitcode[32767 + nr] = [];\n        bitcode[32767 + nr][1] = cat;\n        bitcode[32767 + nr][0] = nr;\n      }\n      //Negative numbers\n      for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {\n        category[32767 + nrneg] = cat;\n        bitcode[32767 + nrneg] = [];\n        bitcode[32767 + nrneg][1] = cat;\n        bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;\n      }\n      nrlower <<= 1;\n      nrupper <<= 1;\n    }\n  }\n\n  function initRGBYUVTable() {\n    for (var i = 0; i < 256; i++) {\n      RGB_YUV_TABLE[i] = 19595 * i;\n      RGB_YUV_TABLE[(i + 256) >> 0] = 38470 * i;\n      RGB_YUV_TABLE[(i + 512) >> 0] = 7471 * i + 0x8000;\n      RGB_YUV_TABLE[(i + 768) >> 0] = -11059 * i;\n      RGB_YUV_TABLE[(i + 1024) >> 0] = -21709 * i;\n      RGB_YUV_TABLE[(i + 1280) >> 0] = 32768 * i + 0x807fff;\n      RGB_YUV_TABLE[(i + 1536) >> 0] = -27439 * i;\n      RGB_YUV_TABLE[(i + 1792) >> 0] = -5329 * i;\n    }\n  }\n\n  // IO functions\n  function writeBits(bs) {\n    var value = bs[0];\n    var posval = bs[1] - 1;\n    while (posval >= 0) {\n      if (value & (1 << posval)) {\n        bytenew |= 1 << bytepos;\n      }\n      posval--;\n      bytepos--;\n      if (bytepos < 0) {\n        if (bytenew == 0xff) {\n          writeByte(0xff);\n          writeByte(0);\n        } else {\n          writeByte(bytenew);\n        }\n        bytepos = 7;\n        bytenew = 0;\n      }\n    }\n  }\n\n  function writeByte(value) {\n    //byteout.push(clt[value]); // write char directly instead of converting later\n    byteout.push(value);\n  }\n\n  function writeWord(value) {\n    writeByte((value >> 8) & 0xff);\n    writeByte(value & 0xff);\n  }\n\n  // DCT & quantization core\n  function fDCTQuant(data, fdtbl) {\n    var d0, d1, d2, d3, d4, d5, d6, d7;\n    /* Pass 1: process rows. */\n    var dataOff = 0;\n    var i;\n    var I8 = 8;\n    var I64 = 64;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 1];\n      d2 = data[dataOff + 2];\n      d3 = data[dataOff + 3];\n      d4 = data[dataOff + 4];\n      d5 = data[dataOff + 5];\n      d6 = data[dataOff + 6];\n      d7 = data[dataOff + 7];\n\n      var tmp0 = d0 + d7;\n      var tmp7 = d0 - d7;\n      var tmp1 = d1 + d6;\n      var tmp6 = d1 - d6;\n      var tmp2 = d2 + d5;\n      var tmp5 = d2 - d5;\n      var tmp3 = d3 + d4;\n      var tmp4 = d3 - d4;\n\n      /* Even part */\n      var tmp10 = tmp0 + tmp3; /* phase 2 */\n      var tmp13 = tmp0 - tmp3;\n      var tmp11 = tmp1 + tmp2;\n      var tmp12 = tmp1 - tmp2;\n\n      data[dataOff] = tmp10 + tmp11; /* phase 3 */\n      data[dataOff + 4] = tmp10 - tmp11;\n\n      var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n      data[dataOff + 2] = tmp13 + z1; /* phase 5 */\n      data[dataOff + 6] = tmp13 - z1;\n\n      /* Odd part */\n      tmp10 = tmp4 + tmp5; /* phase 2 */\n      tmp11 = tmp5 + tmp6;\n      tmp12 = tmp6 + tmp7;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n      var z2 = 0.5411961 * tmp10 + z5; /* c2-c6 */\n      var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n      var z3 = tmp11 * 0.707106781; /* c4 */\n\n      var z11 = tmp7 + z3; /* phase 5 */\n      var z13 = tmp7 - z3;\n\n      data[dataOff + 5] = z13 + z2; /* phase 6 */\n      data[dataOff + 3] = z13 - z2;\n      data[dataOff + 1] = z11 + z4;\n      data[dataOff + 7] = z11 - z4;\n\n      dataOff += 8; /* advance pointer to next row */\n    }\n\n    /* Pass 2: process columns. */\n    dataOff = 0;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 8];\n      d2 = data[dataOff + 16];\n      d3 = data[dataOff + 24];\n      d4 = data[dataOff + 32];\n      d5 = data[dataOff + 40];\n      d6 = data[dataOff + 48];\n      d7 = data[dataOff + 56];\n\n      var tmp0p2 = d0 + d7;\n      var tmp7p2 = d0 - d7;\n      var tmp1p2 = d1 + d6;\n      var tmp6p2 = d1 - d6;\n      var tmp2p2 = d2 + d5;\n      var tmp5p2 = d2 - d5;\n      var tmp3p2 = d3 + d4;\n      var tmp4p2 = d3 - d4;\n\n      /* Even part */\n      var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n      var tmp13p2 = tmp0p2 - tmp3p2;\n      var tmp11p2 = tmp1p2 + tmp2p2;\n      var tmp12p2 = tmp1p2 - tmp2p2;\n\n      data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n      data[dataOff + 32] = tmp10p2 - tmp11p2;\n\n      var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n      data[dataOff + 16] = tmp13p2 + z1p2; /* phase 5 */\n      data[dataOff + 48] = tmp13p2 - z1p2;\n\n      /* Odd part */\n      tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n      tmp11p2 = tmp5p2 + tmp6p2;\n      tmp12p2 = tmp6p2 + tmp7p2;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n      var z2p2 = 0.5411961 * tmp10p2 + z5p2; /* c2-c6 */\n      var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n      var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\n      var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n      var z13p2 = tmp7p2 - z3p2;\n\n      data[dataOff + 40] = z13p2 + z2p2; /* phase 6 */\n      data[dataOff + 24] = z13p2 - z2p2;\n      data[dataOff + 8] = z11p2 + z4p2;\n      data[dataOff + 56] = z11p2 - z4p2;\n\n      dataOff++; /* advance pointer to next column */\n    }\n\n    // Quantize/descale the coefficients\n    var fDCTQuant;\n    for (i = 0; i < I64; ++i) {\n      // Apply the quantization and scaling factor & Round to nearest integer\n      fDCTQuant = data[i] * fdtbl[i];\n      outputfDCTQuant[i] =\n        fDCTQuant > 0.0 ? (fDCTQuant + 0.5) | 0 : (fDCTQuant - 0.5) | 0;\n      //outputfDCTQuant[i] = fround(fDCTQuant);\n    }\n    return outputfDCTQuant;\n  }\n\n  function writeAPP0() {\n    writeWord(0xffe0); // marker\n    writeWord(16); // length\n    writeByte(0x4a); // J\n    writeByte(0x46); // F\n    writeByte(0x49); // I\n    writeByte(0x46); // F\n    writeByte(0); // = \"JFIF\",'\\0'\n    writeByte(1); // versionhi\n    writeByte(1); // versionlo\n    writeByte(0); // xyunits\n    writeWord(1); // xdensity\n    writeWord(1); // ydensity\n    writeByte(0); // thumbnwidth\n    writeByte(0); // thumbnheight\n  }\n\n  function writeSOF0(width, height) {\n    writeWord(0xffc0); // marker\n    writeWord(17); // length, truecolor YUV JPG\n    writeByte(8); // precision\n    writeWord(height);\n    writeWord(width);\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0x11); // HVY\n    writeByte(0); // QTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HVU\n    writeByte(1); // QTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HVV\n    writeByte(1); // QTV\n  }\n\n  function writeDQT() {\n    writeWord(0xffdb); // marker\n    writeWord(132); // length\n    writeByte(0);\n    for (var i = 0; i < 64; i++) {\n      writeByte(YTable[i]);\n    }\n    writeByte(1);\n    for (var j = 0; j < 64; j++) {\n      writeByte(UVTable[j]);\n    }\n  }\n\n  function writeDHT() {\n    writeWord(0xffc4); // marker\n    writeWord(0x01a2); // length\n\n    writeByte(0); // HTYDCinfo\n    for (var i = 0; i < 16; i++) {\n      writeByte(std_dc_luminance_nrcodes[i + 1]);\n    }\n    for (var j = 0; j <= 11; j++) {\n      writeByte(std_dc_luminance_values[j]);\n    }\n\n    writeByte(0x10); // HTYACinfo\n    for (var k = 0; k < 16; k++) {\n      writeByte(std_ac_luminance_nrcodes[k + 1]);\n    }\n    for (var l = 0; l <= 161; l++) {\n      writeByte(std_ac_luminance_values[l]);\n    }\n\n    writeByte(1); // HTUDCinfo\n    for (var m = 0; m < 16; m++) {\n      writeByte(std_dc_chrominance_nrcodes[m + 1]);\n    }\n    for (var n = 0; n <= 11; n++) {\n      writeByte(std_dc_chrominance_values[n]);\n    }\n\n    writeByte(0x11); // HTUACinfo\n    for (var o = 0; o < 16; o++) {\n      writeByte(std_ac_chrominance_nrcodes[o + 1]);\n    }\n    for (var p = 0; p <= 161; p++) {\n      writeByte(std_ac_chrominance_values[p]);\n    }\n  }\n\n  function writeSOS() {\n    writeWord(0xffda); // marker\n    writeWord(12); // length\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0); // HTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HTV\n    writeByte(0); // Ss\n    writeByte(0x3f); // Se\n    writeByte(0); // Bf\n  }\n\n  function processDU(CDU, fdtbl, DC, HTDC, HTAC) {\n    var EOB = HTAC[0x00];\n    var M16zeroes = HTAC[0xf0];\n    var pos;\n    var I16 = 16;\n    var I63 = 63;\n    var I64 = 64;\n    var DU_DCT = fDCTQuant(CDU, fdtbl);\n    //ZigZag reorder\n    for (var j = 0; j < I64; ++j) {\n      DU[ZigZag[j]] = DU_DCT[j];\n    }\n    var Diff = DU[0] - DC;\n    DC = DU[0];\n    //Encode DC\n    if (Diff == 0) {\n      writeBits(HTDC[0]); // Diff might be 0\n    } else {\n      pos = 32767 + Diff;\n      writeBits(HTDC[category[pos]]);\n      writeBits(bitcode[pos]);\n    }\n    //Encode ACs\n    var end0pos = 63; // was const... which is crazy\n    while (end0pos > 0 && DU[end0pos] == 0) {\n      end0pos--;\n    }\n    //end0pos = first element in reverse order !=0\n    if (end0pos == 0) {\n      writeBits(EOB);\n      return DC;\n    }\n    var i = 1;\n    var lng;\n    while (i <= end0pos) {\n      var startpos = i;\n      while (DU[i] == 0 && i <= end0pos) {\n        ++i;\n      }\n      var nrzeroes = i - startpos;\n      if (nrzeroes >= I16) {\n        lng = nrzeroes >> 4;\n        for (var nrmarker = 1; nrmarker <= lng; ++nrmarker)\n          writeBits(M16zeroes);\n        nrzeroes = nrzeroes & 0xf;\n      }\n      pos = 32767 + DU[i];\n      writeBits(HTAC[(nrzeroes << 4) + category[pos]]);\n      writeBits(bitcode[pos]);\n      i++;\n    }\n    if (end0pos != I63) {\n      writeBits(EOB);\n    }\n    return DC;\n  }\n\n  function initCharLookupTable() {\n    var sfcc = String.fromCharCode;\n    for (var i = 0; i < 256; i++) {\n      ///// ACHTUNG // 255\n      clt[i] = sfcc(i);\n    }\n  }\n\n  this.encode = function(\n    image,\n    quality // image data object\n  ) {\n    if (quality) setQuality(quality);\n\n    // Initialize bit writer\n    byteout = new Array();\n    bytenew = 0;\n    bytepos = 7;\n\n    // Add JPEG headers\n    writeWord(0xffd8); // SOI\n    writeAPP0();\n    writeDQT();\n    writeSOF0(image.width, image.height);\n    writeDHT();\n    writeSOS();\n\n    // Encode 8x8 macroblocks\n    var DCY = 0;\n    var DCU = 0;\n    var DCV = 0;\n\n    bytenew = 0;\n    bytepos = 7;\n\n    this.encode.displayName = \"_encode_\";\n\n    var imageData = image.data;\n    var width = image.width;\n    var height = image.height;\n\n    var quadWidth = width * 4;\n\n    var x,\n      y = 0;\n    var r, g, b;\n    var start, p, col, row, pos;\n    while (y < height) {\n      x = 0;\n      while (x < quadWidth) {\n        start = quadWidth * y + x;\n        col = -1;\n        row = 0;\n\n        for (pos = 0; pos < 64; pos++) {\n          row = pos >> 3; // /8\n          col = (pos & 7) * 4; // %8\n          p = start + row * quadWidth + col;\n\n          if (y + row >= height) {\n            // padding bottom\n            p -= quadWidth * (y + 1 + row - height);\n          }\n\n          if (x + col >= quadWidth) {\n            // padding right\n            p -= x + col - quadWidth + 4;\n          }\n\n          r = imageData[p++];\n          g = imageData[p++];\n          b = imageData[p++];\n\n          /* // calculate YUV values dynamically\n\t\t\t\t\tYDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n\t\t\t\t\tUDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n\t\t\t\t\tVDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n\t\t\t\t\t*/\n\n          // use lookup table (slightly faster)\n          YDU[pos] =\n            ((RGB_YUV_TABLE[r] +\n              RGB_YUV_TABLE[(g + 256) >> 0] +\n              RGB_YUV_TABLE[(b + 512) >> 0]) >>\n              16) -\n            128;\n          UDU[pos] =\n            ((RGB_YUV_TABLE[(r + 768) >> 0] +\n              RGB_YUV_TABLE[(g + 1024) >> 0] +\n              RGB_YUV_TABLE[(b + 1280) >> 0]) >>\n              16) -\n            128;\n          VDU[pos] =\n            ((RGB_YUV_TABLE[(r + 1280) >> 0] +\n              RGB_YUV_TABLE[(g + 1536) >> 0] +\n              RGB_YUV_TABLE[(b + 1792) >> 0]) >>\n              16) -\n            128;\n        }\n\n        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n        x += 32;\n      }\n      y += 8;\n    }\n\n    ////////////////////////////////////////////////////////////////\n\n    // Do the bit alignment of the EOI marker\n    if (bytepos >= 0) {\n      var fillbits = [];\n      fillbits[1] = bytepos + 1;\n      fillbits[0] = (1 << (bytepos + 1)) - 1;\n      writeBits(fillbits);\n    }\n\n    writeWord(0xffd9); //EOI\n\n    return new Uint8Array(byteout);\n  };\n\n  function setQuality(quality) {\n    quality = Math.min(Math.max(quality, 1), 100);\n\n    if (currentQuality == quality) return; // don't recalc if unchanged\n\n    var sf =\n      quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);\n\n    initQuantTables(sf);\n    currentQuality = quality;\n    //console.log('Quality set to: '+quality +'%');\n  }\n\n  function init() {\n    quality = quality || 50;\n    // Create tables\n    initCharLookupTable();\n    initHuffmanTbl();\n    initCategoryNumber();\n    initRGBYUVTable();\n\n    setQuality(quality);\n  }\n  init();\n}\n\nexport { JPEGEncoder };\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { GifReader } from \"../libs/omggif.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\n\n/**\n * jsPDF Gif Support PlugIn\n *\n * @name gif_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processGIF89A = function(imageData, index, alias, compression) {\n    var reader = new GifReader(imageData);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = [];\n\n    reader.decodeAndBlitFrameRGBA(0, pixels);\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n\n  jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;\n})(jsPDF.API);\n","/**\n * @author shaozilee\n *\n * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp\n *\n */\n\nimport { console } from \"./console.js\";\n\nfunction BmpDecoder(buffer, is_with_alpha) {\n  this.pos = 0;\n  this.buffer = buffer;\n  this.datav = new DataView(buffer.buffer);\n  this.is_with_alpha = !!is_with_alpha;\n  this.bottom_up = true;\n  this.flag =\n    String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);\n  this.pos += 2;\n  if ([\"BM\", \"BA\", \"CI\", \"CP\", \"IC\", \"PT\"].indexOf(this.flag) === -1)\n    throw new Error(\"Invalid BMP File\");\n  this.parseHeader();\n  this.parseBGR();\n}\n\nBmpDecoder.prototype.parseHeader = function() {\n  this.fileSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.reserved = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.offset = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.headerSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.width = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.height = this.datav.getInt32(this.pos, true);\n  this.pos += 4;\n  this.planes = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.bitPP = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.compress = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.rawSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.hr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.vr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.colors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.importantColors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n\n  if (this.bitPP === 16 && this.is_with_alpha) {\n    this.bitPP = 15;\n  }\n  if (this.bitPP < 15) {\n    var len = this.colors === 0 ? 1 << this.bitPP : this.colors;\n    this.palette = new Array(len);\n    for (var i = 0; i < len; i++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var quad = this.datav.getUint8(this.pos++, true);\n      this.palette[i] = {\n        red: red,\n        green: green,\n        blue: blue,\n        quad: quad\n      };\n    }\n  }\n  if (this.height < 0) {\n    this.height *= -1;\n    this.bottom_up = false;\n  }\n};\n\nBmpDecoder.prototype.parseBGR = function() {\n  this.pos = this.offset;\n  try {\n    var bitn = \"bit\" + this.bitPP;\n    var len = this.width * this.height * 4;\n    this.data = new Uint8Array(len);\n\n    this[bitn]();\n  } catch (e) {\n    console.log(\"bit decode error:\" + e);\n  }\n};\n\nBmpDecoder.prototype.bit1 = function() {\n  var xlen = Math.ceil(this.width / 8);\n  var mode = xlen % 4;\n  var y;\n  for (y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 8 * 4;\n      for (var i = 0; i < 8; i++) {\n        if (x * 8 + i < this.width) {\n          var rgb = this.palette[(b >> (7 - i)) & 0x1];\n          this.data[location + i * 4] = rgb.blue;\n          this.data[location + i * 4 + 1] = rgb.green;\n          this.data[location + i * 4 + 2] = rgb.red;\n          this.data[location + i * 4 + 3] = 0xff;\n        } else {\n          break;\n        }\n      }\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit4 = function() {\n  var xlen = Math.ceil(this.width / 2);\n  var mode = xlen % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 2 * 4;\n\n      var before = b >> 4;\n      var after = b & 0x0f;\n\n      var rgb = this.palette[before];\n      this.data[location] = rgb.blue;\n      this.data[location + 1] = rgb.green;\n      this.data[location + 2] = rgb.red;\n      this.data[location + 3] = 0xff;\n\n      if (x * 2 + 1 >= this.width) break;\n\n      rgb = this.palette[after];\n      this.data[location + 4] = rgb.blue;\n      this.data[location + 4 + 1] = rgb.green;\n      this.data[location + 4 + 2] = rgb.red;\n      this.data[location + 4 + 3] = 0xff;\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit8 = function() {\n  var mode = this.width % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      if (b < this.palette.length) {\n        var rgb = this.palette[b];\n        this.data[location] = rgb.red;\n        this.data[location + 1] = rgb.green;\n        this.data[location + 2] = rgb.blue;\n        this.data[location + 3] = 0xff;\n      } else {\n        this.data[location] = 0xff;\n        this.data[location + 1] = 0xff;\n        this.data[location + 2] = 0xff;\n        this.data[location + 3] = 0xff;\n      }\n    }\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit15 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_5) / _1_5) * 255) | 0;\n      var red = ((((B >> 10) & _1_5) / _1_5) * 255) | 0;\n      var alpha = B >> 15 ? 0xff : 0x00;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit16 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  var _111111 = parseInt(\"111111\", 2),\n    _1_6 = _111111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var alpha = 0xff;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_6) / _1_6) * 255) | 0;\n      var red = (((B >> 11) / _1_5) * 255) | 0;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit24 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = 0xff;\n    }\n    //skip extra bytes\n    this.pos += this.width % 4;\n  }\n};\n\n/**\n * add 32bit decode func\n * @author soubok\n */\nBmpDecoder.prototype.bit32 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var alpha = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    //this.pos += (this.width % 4);\n  }\n};\n\nBmpDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { BmpDecoder };\n","import { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { BmpDecoder } from \"../libs/BMPDecoder.js\";\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @license\n * Copyright (c) 2018 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF bmp Support PlugIn\n * @name bmp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processBMP = function(imageData, index, alias, compression) {\n    var reader = new BmpDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","function WebPDecoder(imageData) {\n  /** @license\n   * Copyright 2011 Google Inc.\n   *\n   * This code is licensed under the same terms as WebM:\n   *  Software License Agreement:  http://www.webmproject.org/license/software/\n   *  Additional IP Rights Grant:  http://www.webmproject.org/license/additional/\n   * -----------------------------------------------------------------------------\n   *\n   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n   * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n   * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n   * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n   *\n   * -----------------------------------------------------------------------------\n   *\n   * Copyright 2011-2017 Dominik Homberger\n   * Libwebp Javascript / libwebpjs - the libwebp implementation in javascript (v0.6.0)\n   *\n   * Author: Dominik Homberger (dominik.homberger@gmail.com)\n   */\n\n  var self = this;\n  var UpsampleRgbLinePair,\n    UpsampleBgrLinePair,\n    UpsampleRgbaLinePair,\n    UpsampleBgraLinePair,\n    UpsampleArgbLinePair,\n    UpsampleArgbLinePair,\n    UpsampleRgba4444LinePair,\n    UpsampleRgb565LinePair;\n\n  function x(F) {\n    if (!F) throw Error(\"assert :P\");\n  }\n  function fa(F, L, J) {\n    for (var H = 0; 4 > H; H++) if (F[L + H] != J.charCodeAt(H)) return !0;\n    return !1;\n  }\n  function I(F, L, J, H, Z) {\n    for (var O = 0; O < Z; O++) F[L + O] = J[H + O];\n  }\n  function M(F, L, J, H) {\n    for (var Z = 0; Z < H; Z++) F[L + Z] = J;\n  }\n  function V(F) {\n    return new Int32Array(F);\n  }\n  function wa(F, L) {\n    for (var J = [], H = 0; H < F; H++) J.push(new L());\n    return J;\n  }\n  function wb() {\n    function F(J, H, Z) {\n      for (var O = Z[H], L = 0; L < O; L++) {\n        J.push(Z.length > H + 1 ? [] : 0);\n        if (Z.length < H + 1) break;\n        F(J[L], H + 1, Z);\n      }\n    }\n    var L = [];\n    F(L, 0, [3, 11]);\n    return L;\n  }\n  function Ed(F, L) {\n    function J(H, O, F) {\n      for (var Z = F[O], ma = 0; ma < Z; ma++) {\n        H.push(F.length > O + 1 ? [] : new L());\n        if (F.length < O + 1) break;\n        J(H[ma], O + 1, F);\n      }\n    }\n    var H = [];\n    J(H, 0, F);\n    return H;\n  }\n  var _WebPDecoder = function() {\n    var self = this;\n    function F() {\n      V(55);\n    }\n    function L(a, b) {\n      for (var c = (1 << (b - 1)) >>> 0; a & c; ) c >>>= 1;\n      return c ? (a & (c - 1)) + c : a;\n    }\n    function J(a, b, c, d, e) {\n      x(!(d % c));\n      do (d -= c), (a[b + d] = e);\n      while (0 < d);\n    }\n    function H(a, b, c, d, e, f) {\n      var g = b,\n        h = 1 << c,\n        k,\n        l,\n        m = V(16),\n        n = V(16);\n      x(0 != e);\n      x(null != d);\n      x(null != a);\n      x(0 < c);\n      for (l = 0; l < e; ++l) {\n        if (15 < d[l]) return 0;\n        ++m[d[l]];\n      }\n      if (m[0] == e) return 0;\n      n[1] = 0;\n      for (k = 1; 15 > k; ++k) {\n        if (m[k] > 1 << k) return 0;\n        n[k + 1] = n[k] + m[k];\n      }\n      for (l = 0; l < e; ++l) (k = d[l]), 0 < d[l] && (f[n[k]++] = l);\n      if (1 == n[15])\n        return (d = new O()), (d.g = 0), (d.value = f[0]), J(a, g, 1, h, d), h;\n      var r = -1,\n        q = h - 1,\n        t = 0,\n        v = 1,\n        p = 1,\n        u,\n        w = 1 << c;\n      l = 0;\n      k = 1;\n      for (e = 2; k <= c; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k])\n          (d = new O()),\n            (d.g = k),\n            (d.value = f[l++]),\n            J(a, g + t, e, w, d),\n            (t = L(t, k));\n      }\n      k = c + 1;\n      for (e = 2; 15 >= k; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k]) {\n          d = new O();\n          if ((t & q) != r) {\n            g += w;\n            r = k;\n            for (u = 1 << (r - c); 15 > r; ) {\n              u -= m[r];\n              if (0 >= u) break;\n              ++r;\n              u <<= 1;\n            }\n            u = r - c;\n            w = 1 << u;\n            h += w;\n            r = t & q;\n            a[b + r].g = u + c;\n            a[b + r].value = g - b - r;\n          }\n          d.g = k - c;\n          d.value = f[l++];\n          J(a, g + (t >> c), e, w, d);\n          t = L(t, k);\n        }\n      }\n      return v != 2 * n[15] - 1 ? 0 : h;\n    }\n    function Z(a, b, c, d, e) {\n      x(2328 >= e);\n      if (512 >= e) var f = V(512);\n      else if (((f = V(e)), null == f)) return 0;\n      return H(a, b, c, d, e, f);\n    }\n    function O() {\n      this.value = this.g = 0;\n    }\n    function Fd() {\n      this.value = this.g = 0;\n    }\n    function Ub() {\n      this.G = wa(5, O);\n      this.H = V(5);\n      this.jc = this.Qb = this.qb = this.nd = 0;\n      this.pd = wa(xb, Fd);\n    }\n    function ma(a, b, c, d) {\n      x(null != a);\n      x(null != b);\n      x(2147483648 > d);\n      a.Ca = 254;\n      a.I = 0;\n      a.b = -8;\n      a.Ka = 0;\n      a.oa = b;\n      a.pa = c;\n      a.Jd = b;\n      a.Yc = c + d;\n      a.Zc = 4 <= d ? c + d - 4 + 1 : c;\n      Qa(a);\n    }\n    function na(a, b) {\n      for (var c = 0; 0 < b--; ) c |= K(a, 128) << b;\n      return c;\n    }\n    function ca(a, b) {\n      var c = na(a, b);\n      return G(a) ? -c : c;\n    }\n    function cb(a, b, c, d) {\n      var e,\n        f = 0;\n      x(null != a);\n      x(null != b);\n      x(4294967288 > d);\n      a.Sb = d;\n      a.Ra = 0;\n      a.u = 0;\n      a.h = 0;\n      4 < d && (d = 4);\n      for (e = 0; e < d; ++e) f += b[c + e] << (8 * e);\n      a.Ra = f;\n      a.bb = d;\n      a.oa = b;\n      a.pa = c;\n    }\n    function Vb(a) {\n      for (; 8 <= a.u && a.bb < a.Sb; )\n        (a.Ra >>>= 8),\n          (a.Ra += (a.oa[a.pa + a.bb] << (ob - 8)) >>> 0),\n          ++a.bb,\n          (a.u -= 8);\n      db(a) && ((a.h = 1), (a.u = 0));\n    }\n    function D(a, b) {\n      x(0 <= b);\n      if (!a.h && b <= Gd) {\n        var c = pb(a) & Hd[b];\n        a.u += b;\n        Vb(a);\n        return c;\n      }\n      a.h = 1;\n      return (a.u = 0);\n    }\n    function Wb() {\n      this.b = this.Ca = this.I = 0;\n      this.oa = [];\n      this.pa = 0;\n      this.Jd = [];\n      this.Yc = 0;\n      this.Zc = [];\n      this.Ka = 0;\n    }\n    function Ra() {\n      this.Ra = 0;\n      this.oa = [];\n      this.h = this.u = this.bb = this.Sb = this.pa = 0;\n    }\n    function pb(a) {\n      return (a.Ra >>> (a.u & (ob - 1))) >>> 0;\n    }\n    function db(a) {\n      x(a.bb <= a.Sb);\n      return a.h || (a.bb == a.Sb && a.u > ob);\n    }\n    function qb(a, b) {\n      a.u = b;\n      a.h = db(a);\n    }\n    function Sa(a) {\n      a.u >= Xb && (x(a.u >= Xb), Vb(a));\n    }\n    function Qa(a) {\n      x(null != a && null != a.oa);\n      a.pa < a.Zc\n        ? ((a.I = (a.oa[a.pa++] | (a.I << 8)) >>> 0), (a.b += 8))\n        : (x(null != a && null != a.oa),\n          a.pa < a.Yc\n            ? ((a.b += 8), (a.I = a.oa[a.pa++] | (a.I << 8)))\n            : a.Ka\n            ? (a.b = 0)\n            : ((a.I <<= 8), (a.b += 8), (a.Ka = 1)));\n    }\n    function G(a) {\n      return na(a, 1);\n    }\n    function K(a, b) {\n      var c = a.Ca;\n      0 > a.b && Qa(a);\n      var d = a.b,\n        e = (c * b) >>> 8,\n        f = (a.I >>> d > e) + 0;\n      f ? ((c -= e), (a.I -= ((e + 1) << d) >>> 0)) : (c = e + 1);\n      d = c;\n      for (e = 0; 256 <= d; ) (e += 8), (d >>= 8);\n      d = 7 ^ (e + Id[d]);\n      a.b -= d;\n      a.Ca = (c << d) - 1;\n      return f;\n    }\n    function ra(a, b, c) {\n      a[b + 0] = (c >> 24) & 255;\n      a[b + 1] = (c >> 16) & 255;\n      a[b + 2] = (c >> 8) & 255;\n      a[b + 3] = (c >> 0) & 255;\n    }\n    function Ta(a, b) {\n      return (a[b + 0] << 0) | (a[b + 1] << 8);\n    }\n    function Yb(a, b) {\n      return Ta(a, b) | (a[b + 2] << 16);\n    }\n    function Ha(a, b) {\n      return Ta(a, b) | (Ta(a, b + 2) << 16);\n    }\n    function Zb(a, b) {\n      var c = 1 << b;\n      x(null != a);\n      x(0 < b);\n      a.X = V(c);\n      if (null == a.X) return 0;\n      a.Mb = 32 - b;\n      a.Xa = b;\n      return 1;\n    }\n    function $b(a, b) {\n      x(null != a);\n      x(null != b);\n      x(a.Xa == b.Xa);\n      I(b.X, 0, a.X, 0, 1 << b.Xa);\n    }\n    function ac() {\n      this.X = [];\n      this.Xa = this.Mb = 0;\n    }\n    function bc(a, b, c, d) {\n      x(null != c);\n      x(null != d);\n      var e = c[0],\n        f = d[0];\n      0 == e && (e = (a * f + b / 2) / b);\n      0 == f && (f = (b * e + a / 2) / a);\n      if (0 >= e || 0 >= f) return 0;\n      c[0] = e;\n      d[0] = f;\n      return 1;\n    }\n    function xa(a, b) {\n      return (a + (1 << b) - 1) >>> b;\n    }\n    function yb(a, b) {\n      return (\n        (((((a & 4278255360) + (b & 4278255360)) >>> 0) & 4278255360) +\n          ((((a & 16711935) + (b & 16711935)) >>> 0) & 16711935)) >>>\n        0\n      );\n    }\n    function X(a, b) {\n      self[b] = function(b, d, e, f, g, h, k) {\n        var c;\n        for (c = 0; c < g; ++c) {\n          var m = self[a](h[k + c - 1], e, f + c);\n          h[k + c] = yb(b[d + c], m);\n        }\n      };\n    }\n    function Jd() {\n      this.ud = this.hd = this.jd = 0;\n    }\n    function aa(a, b) {\n      return ((((a ^ b) & 4278124286) >>> 1) + (a & b)) >>> 0;\n    }\n    function sa(a) {\n      if (0 <= a && 256 > a) return a;\n      if (0 > a) return 0;\n      if (255 < a) return 255;\n    }\n    function eb(a, b) {\n      return sa(a + ((a - b + 0.5) >> 1));\n    }\n    function Ia(a, b, c) {\n      return Math.abs(b - c) - Math.abs(a - c);\n    }\n    function cc(a, b, c, d, e, f, g) {\n      d = f[g - 1];\n      for (c = 0; c < e; ++c) f[g + c] = d = yb(a[b + c], d);\n    }\n    function Kd(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < c; ++f) {\n        var g = a[b + f],\n          h = (g >> 8) & 255,\n          k = g & 16711935,\n          k = k + ((h << 16) + h),\n          k = k & 16711935;\n        d[e + f] = ((g & 4278255360) + k) >>> 0;\n      }\n    }\n    function dc(a, b) {\n      b.jd = (a >> 0) & 255;\n      b.hd = (a >> 8) & 255;\n      b.ud = (a >> 16) & 255;\n    }\n    function Ld(a, b, c, d, e, f) {\n      var g;\n      for (g = 0; g < d; ++g) {\n        var h = b[c + g],\n          k = h >>> 8,\n          l = h >>> 16,\n          m = h,\n          l = l + ((((a.jd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          l = l & 255,\n          m = m + ((((a.hd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          m = m + ((((a.ud << 24) >> 24) * ((l << 24) >> 24)) >>> 5),\n          m = m & 255;\n        e[f + g] = (h & 4278255360) + (l << 16) + m;\n      }\n    }\n    function ec(a, b, c, d, e) {\n      self[b] = function(a, b, c, k, l, m, n, r, q) {\n        for (k = n; k < r; ++k)\n          for (n = 0; n < q; ++n) l[m++] = e(c[d(a[b++])]);\n      };\n      self[a] = function(a, b, h, k, l, m, n) {\n        var f = 8 >> a.b,\n          g = a.Ea,\n          t = a.K[0],\n          v = a.w;\n        if (8 > f)\n          for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {\n            var p = 0,\n              u;\n            for (u = 0; u < g; ++u)\n              u & a || (p = d(k[l++])), (m[n++] = e(t[p & v])), (p >>= f);\n          }\n        else self[\"VP8LMapColor\" + c](k, l, t, v, m, n, b, h, g);\n      };\n    }\n    function Md(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n      }\n    }\n    function Nd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 24) & 255;\n      }\n    }\n    function Od(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 240) | ((f >> 12) & 15),\n          f = ((f >> 0) & 240) | ((f >> 28) & 15);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Pd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 248) | ((f >> 13) & 7),\n          f = ((f >> 5) & 224) | ((f >> 3) & 31);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Qd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 16) & 255;\n      }\n    }\n    function fb(a, b, c, d, e, f) {\n      if (0 == f)\n        for (c = b + c; b < c; )\n          (f = a[b++]),\n            ra(\n              d,\n              ((f[0] >> 24) |\n                ((f[1] >> 8) & 65280) |\n                ((f[2] << 8) & 16711680) |\n                (f[3] << 24)) >>>\n                0\n            ),\n            (e += 32);\n      else I(d, e, a, b, c);\n    }\n    function gb(a, b) {\n      self[b][0] = self[a + \"0\"];\n      self[b][1] = self[a + \"1\"];\n      self[b][2] = self[a + \"2\"];\n      self[b][3] = self[a + \"3\"];\n      self[b][4] = self[a + \"4\"];\n      self[b][5] = self[a + \"5\"];\n      self[b][6] = self[a + \"6\"];\n      self[b][7] = self[a + \"7\"];\n      self[b][8] = self[a + \"8\"];\n      self[b][9] = self[a + \"9\"];\n      self[b][10] = self[a + \"10\"];\n      self[b][11] = self[a + \"11\"];\n      self[b][12] = self[a + \"12\"];\n      self[b][13] = self[a + \"13\"];\n      self[b][14] = self[a + \"0\"];\n      self[b][15] = self[a + \"0\"];\n    }\n    function hb(a) {\n      return a == zb || a == Ab || a == Ja || a == Bb;\n    }\n    function Rd() {\n      this.eb = [];\n      this.size = this.A = this.fb = 0;\n    }\n    function Sd() {\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.F = [];\n      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;\n    }\n    function Cb() {\n      this.Rd = this.height = this.width = this.S = 0;\n      this.f = {};\n      this.f.RGBA = new Rd();\n      this.f.kb = new Sd();\n      this.sd = null;\n    }\n    function Td() {\n      this.width = [0];\n      this.height = [0];\n      this.Pd = [0];\n      this.Qd = [0];\n      this.format = [0];\n    }\n    function Ud() {\n      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;\n    }\n    function Vd(a) {\n      alert(\"todo:WebPSamplerProcessPlane\");\n      return a.T;\n    }\n    function Wd(a, b) {\n      var c = a.T,\n        d = b.ba.f.RGBA,\n        e = d.eb,\n        f = d.fb + a.ka * d.A,\n        g = P[b.ba.S],\n        h = a.y,\n        k = a.O,\n        l = a.f,\n        m = a.N,\n        n = a.ea,\n        r = a.W,\n        q = b.cc,\n        t = b.dc,\n        v = b.Mc,\n        p = b.Nc,\n        u = a.ka,\n        w = a.ka + a.T,\n        y = a.U,\n        A = (y + 1) >> 1;\n      0 == u\n        ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y)\n        : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y),\n          ++c);\n      for (; u + 2 < w; u += 2)\n        (q = l),\n          (t = m),\n          (v = n),\n          (p = r),\n          (m += a.Rc),\n          (r += a.Rc),\n          (f += 2 * d.A),\n          (k += 2 * a.fa),\n          g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);\n      k += a.fa;\n      a.j + w < a.o\n        ? (I(b.ec, b.fc, h, k, y),\n          I(b.cc, b.dc, l, m, A),\n          I(b.Mc, b.Nc, n, r, A),\n          c--)\n        : w & 1 ||\n          g(\n            h,\n            k,\n            null,\n            null,\n            l,\n            m,\n            n,\n            r,\n            l,\n            m,\n            n,\n            r,\n            e,\n            f + d.A,\n            null,\n            null,\n            y\n          );\n      return c;\n    }\n    function Xd(a, b, c) {\n      var d = a.F,\n        e = [a.J];\n      if (null != d) {\n        var f = a.U,\n          g = b.ba.S,\n          h = g == ya || g == Ja;\n        b = b.ba.f.RGBA;\n        var k = [0],\n          l = a.ka;\n        k[0] = a.T;\n        a.Kb &&\n          (0 == l ? --k[0] : (--l, (e[0] -= a.width)),\n          a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));\n        var m = b.eb,\n          l = b.fb + l * b.A;\n        a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);\n        x(c == k);\n        a && hb(g) && za(m, l, h, f, k, b.A);\n      }\n      return 0;\n    }\n    function gc(a) {\n      var b = a.ma,\n        c = b.ba.S,\n        d = 11 > c,\n        e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);\n      b.memory = null;\n      b.Ib = null;\n      b.Jb = null;\n      b.Nd = null;\n      if (!hc(b.Oa, a, e ? 11 : 12)) return 0;\n      e && hb(c) && ic();\n      if (a.da) alert(\"todo:use_scaling\");\n      else {\n        if (d) {\n          if (((b.Ib = Vd), a.Kb)) {\n            c = (a.U + 1) >> 1;\n            b.memory = V(a.U + 2 * c);\n            if (null == b.memory) return 0;\n            b.ec = b.memory;\n            b.fc = 0;\n            b.cc = b.ec;\n            b.dc = b.fc + a.U;\n            b.Mc = b.cc;\n            b.Nc = b.dc + c;\n            b.Ib = Wd;\n            ic();\n          }\n        } else alert(\"todo:EmitYUV\");\n        e && ((b.Jb = Xd), d && Aa());\n      }\n      if (d && !jc) {\n        for (a = 0; 256 > a; ++a)\n          (Yd[a] = (89858 * (a - 128) + Ba) >> Wa),\n            (Zd[a] = -22014 * (a - 128) + Ba),\n            ($d[a] = -45773 * (a - 128)),\n            (ae[a] = (113618 * (a - 128) + Ba) >> Wa);\n        for (a = ta; a < Eb; ++a)\n          (b = (76283 * (a - 16) + Ba) >> Wa),\n            (be[a - ta] = ga(b, 255)),\n            (ce[a - ta] = ga((b + 8) >> 4, 15));\n        jc = 1;\n      }\n      return 1;\n    }\n    function kc(a) {\n      var b = a.ma,\n        c = a.U,\n        d = a.T;\n      x(!(a.ka & 1));\n      if (0 >= c || 0 >= d) return 0;\n      c = b.Ib(a, b);\n      null != b.Jb && b.Jb(a, b, c);\n      b.Dc += c;\n      return 1;\n    }\n    function lc(a) {\n      a.ma.memory = null;\n    }\n    function mc(a, b, c, d) {\n      if (47 != D(a, 8)) return 0;\n      b[0] = D(a, 14) + 1;\n      c[0] = D(a, 14) + 1;\n      d[0] = D(a, 1);\n      return 0 != D(a, 3) ? 0 : !a.h;\n    }\n    function ib(a, b) {\n      if (4 > a) return a + 1;\n      var c = (a - 2) >> 1;\n      return ((2 + (a & 1)) << c) + D(b, c) + 1;\n    }\n    function nc(a, b) {\n      if (120 < b) return b - 120;\n      var c = de[b - 1],\n        c = (c >> 4) * a + (8 - (c & 15));\n      return 1 <= c ? c : 1;\n    }\n    function ua(a, b, c) {\n      var d = pb(c);\n      b += d & 255;\n      var e = a[b].g - 8;\n      0 < e &&\n        (qb(c, c.u + 8),\n        (d = pb(c)),\n        (b += a[b].value),\n        (b += d & ((1 << e) - 1)));\n      qb(c, c.u + a[b].g);\n      return a[b].value;\n    }\n    function ub(a, b, c) {\n      c.g += a.g;\n      c.value += (a.value << b) >>> 0;\n      x(8 >= c.g);\n      return a.g;\n    }\n    function ha(a, b, c) {\n      var d = a.xc;\n      b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];\n      x(b < a.Wb);\n      return a.Ya[b];\n    }\n    function oc(a, b, c, d) {\n      var e = a.ab,\n        f = a.c * b,\n        g = a.C;\n      b = g + b;\n      var h = c,\n        k = d;\n      d = a.Ta;\n      for (c = a.Ua; 0 < e--; ) {\n        var l = a.gc[e],\n          m = g,\n          n = b,\n          r = h,\n          q = k,\n          k = d,\n          h = c,\n          t = l.Ea;\n        x(m < n);\n        x(n <= l.nc);\n        switch (l.hc) {\n          case 2:\n            pc(r, q, (n - m) * t, k, h);\n            break;\n          case 0:\n            var v = l,\n              p = m,\n              u = n,\n              w = k,\n              y = h,\n              A = v.Ea;\n            0 == p &&\n              (ee(r, q, null, null, 1, w, y),\n              cc(r, q + 1, 0, 0, A - 1, w, y + 1),\n              (q += A),\n              (y += A),\n              ++p);\n            for (\n              var E = 1 << v.b,\n                B = E - 1,\n                C = xa(A, v.b),\n                N = v.K,\n                v = v.w + (p >> v.b) * C;\n              p < u;\n\n            ) {\n              var z = N,\n                Q = v,\n                S = 1;\n              for (fe(r, q, w, y - A, 1, w, y); S < A; ) {\n                var K = qc[(z[Q++] >> 8) & 15],\n                  D = (S & ~B) + E;\n                D > A && (D = A);\n                K(r, q + +S, w, y + S - A, D - S, w, y + S);\n                S = D;\n              }\n              q += A;\n              y += A;\n              ++p;\n              p & B || (v += C);\n            }\n            n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);\n            break;\n          case 1:\n            t = r;\n            u = q;\n            r = l.Ea;\n            q = 1 << l.b;\n            w = q - 1;\n            y = r & ~w;\n            A = r - y;\n            p = xa(r, l.b);\n            E = l.K;\n            for (l = l.w + (m >> l.b) * p; m < n; ) {\n              B = E;\n              C = l;\n              N = new Jd();\n              v = u + y;\n              for (z = u + r; u < v; )\n                dc(B[C++], N), Fb(N, t, u, q, k, h), (u += q), (h += q);\n              u < z &&\n                (dc(B[C++], N), Fb(N, t, u, A, k, h), (u += A), (h += A));\n              ++m;\n              m & w || (l += p);\n            }\n            break;\n          case 3:\n            if (r == k && q == h && 0 < l.b) {\n              y = (n - m) * xa(l.Ea, l.b);\n              t = h + (n - m) * t - y;\n              u = k;\n              r = t;\n              q = k;\n              w = h;\n              A = y;\n              p = [];\n              for (y = A - 1; 0 <= y; --y) p[y] = q[w + y];\n              for (y = A - 1; 0 <= y; --y) u[r + y] = p[y];\n              rc(l, m, n, k, t, k, h);\n            } else rc(l, m, n, r, q, k, h);\n        }\n        h = d;\n        k = c;\n      }\n      k != c && I(d, c, h, k, f);\n    }\n    function ge(a, b) {\n      var c = a.V,\n        d = a.Ba + a.c * a.C,\n        e = b - a.C;\n      x(b <= a.l.o);\n      x(16 >= e);\n      if (0 < e) {\n        var f = a.l,\n          g = a.Ta,\n          h = a.Ua,\n          k = f.width;\n        oc(a, e, c, d);\n        h = [h];\n        c = a.C;\n        d = b;\n        e = h;\n        x(c < d);\n        x(f.v < f.va);\n        d > f.o && (d = f.o);\n        if (c < f.j) {\n          var l = f.j - c,\n            c = f.j;\n          e[0] += l * k;\n        }\n        c >= d\n          ? (c = 0)\n          : ((e[0] += 4 * f.v),\n            (f.ka = c - f.j),\n            (f.U = f.va - f.v),\n            (f.T = d - c),\n            (c = 1));\n        if (c) {\n          h = h[0];\n          c = a.ca;\n          if (11 > c.S) {\n            for (\n              var m = c.f.RGBA,\n                d = c.S,\n                e = f.U,\n                f = f.T,\n                l = m.eb,\n                n = m.A,\n                r = f,\n                m = m.fb + a.Ma * m.A;\n              0 < r--;\n\n            ) {\n              var q = g,\n                t = h,\n                v = e,\n                p = l,\n                u = m;\n              switch (d) {\n                case Ca:\n                  sc(q, t, v, p, u);\n                  break;\n                case Ua:\n                  Gb(q, t, v, p, u);\n                  break;\n                case zb:\n                  Gb(q, t, v, p, u);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case tc:\n                  uc(q, t, v, p, u);\n                  break;\n                case Va:\n                  fb(q, t, v, p, u, 1);\n                  break;\n                case Ab:\n                  fb(q, t, v, p, u, 1);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case ya:\n                  fb(q, t, v, p, u, 0);\n                  break;\n                case Ja:\n                  fb(q, t, v, p, u, 0);\n                  za(p, u, 1, v, 1, 0);\n                  break;\n                case Db:\n                  Hb(q, t, v, p, u);\n                  break;\n                case Bb:\n                  Hb(q, t, v, p, u);\n                  vc(p, u, v, 1, 0);\n                  break;\n                case wc:\n                  xc(q, t, v, p, u);\n                  break;\n                default:\n                  x(0);\n              }\n              h += k;\n              m += n;\n            }\n            a.Ma += f;\n          } else alert(\"todo:EmitRescaledRowsYUVA\");\n          x(a.Ma <= c.height);\n        }\n      }\n      a.C = b;\n      x(a.C <= a.i);\n    }\n    function yc(a) {\n      var b;\n      if (0 < a.ua) return 0;\n      for (b = 0; b < a.Wb; ++b) {\n        var c = a.Ya[b].G,\n          d = a.Ya[b].H;\n        if (\n          0 < c[1][d[1] + 0].g ||\n          0 < c[2][d[2] + 0].g ||\n          0 < c[3][d[3] + 0].g\n        )\n          return 0;\n      }\n      return 1;\n    }\n    function zc(a, b, c, d, e, f) {\n      if (0 != a.Z) {\n        var g = a.qd,\n          h = a.rd;\n        for (x(null != ia[a.Z]); b < c; ++b)\n          ia[a.Z](g, h, d, e, d, e, f), (g = d), (h = e), (e += f);\n        a.qd = g;\n        a.rd = h;\n      }\n    }\n    function Ib(a, b) {\n      var c = a.l.ma,\n        d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,\n        d = a.C < d ? d : a.C;\n      x(b <= a.l.o);\n      if (b > d) {\n        var e = a.l.width,\n          f = c.ca,\n          g = c.tb + e * d,\n          h = a.V,\n          k = a.Ba + a.c * d,\n          l = a.gc;\n        x(1 == a.ab);\n        x(3 == l[0].hc);\n        he(l[0], d, b, h, k, f, g);\n        zc(c, d, b, f, g, e);\n      }\n      a.C = a.Ma = b;\n    }\n    function Jb(a, b, c, d, e, f, g) {\n      var h = a.$ / d,\n        k = a.$ % d,\n        l = a.m,\n        m = a.s,\n        n = c + a.$,\n        r = n;\n      e = c + d * e;\n      var q = c + d * f,\n        t = 280 + m.ua,\n        v = a.Pb ? h : 16777216,\n        p = 0 < m.ua ? m.Wa : null,\n        u = m.wc,\n        w = n < q ? ha(m, k, h) : null;\n      x(a.C < f);\n      x(q <= e);\n      var y = !1;\n      a: for (;;) {\n        for (; y || n < q; ) {\n          var A = 0;\n          if (h >= v) {\n            var v = a,\n              E = n - c;\n            x(v.Pb);\n            v.wd = v.m;\n            v.xd = E;\n            0 < v.s.ua && $b(v.s.Wa, v.s.vb);\n            v = h + ie;\n          }\n          k & u || (w = ha(m, k, h));\n          x(null != w);\n          w.Qb && ((b[n] = w.qb), (y = !0));\n          if (!y)\n            if ((Sa(l), w.jc)) {\n              var A = l,\n                E = b,\n                B = n,\n                C = w.pd[pb(A) & (xb - 1)];\n              x(w.jc);\n              256 > C.g\n                ? (qb(A, A.u + C.g), (E[B] = C.value), (A = 0))\n                : (qb(A, A.u + C.g - 256), x(256 <= C.value), (A = C.value));\n              0 == A && (y = !0);\n            } else A = ua(w.G[0], w.H[0], l);\n          if (l.h) break;\n          if (y || 256 > A) {\n            if (!y)\n              if (w.nd) b[n] = (w.qb | (A << 8)) >>> 0;\n              else {\n                Sa(l);\n                y = ua(w.G[1], w.H[1], l);\n                Sa(l);\n                E = ua(w.G[2], w.H[2], l);\n                B = ua(w.G[3], w.H[3], l);\n                if (l.h) break;\n                b[n] = ((B << 24) | (y << 16) | (A << 8) | E) >>> 0;\n              }\n            y = !1;\n            ++n;\n            ++k;\n            if (\n              k >= d &&\n              ((k = 0),\n              ++h,\n              null != g && h <= f && !(h % 16) && g(a, h),\n              null != p)\n            )\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (280 > A) {\n            A = ib(A - 256, l);\n            E = ua(w.G[4], w.H[4], l);\n            Sa(l);\n            E = ib(E, l);\n            E = nc(d, E);\n            if (l.h) break;\n            if (n - c < E || e - n < A) break a;\n            else for (B = 0; B < A; ++B) b[n + B] = b[n + B - E];\n            n += A;\n            for (k += A; k >= d; )\n              (k -= d), ++h, null != g && h <= f && !(h % 16) && g(a, h);\n            x(n <= e);\n            k & u && (w = ha(m, k, h));\n            if (null != p)\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (A < t) {\n            y = A - 280;\n            for (x(null != p); r < n; )\n              (A = b[r++]), (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n            A = n;\n            E = p;\n            x(!(y >>> E.Xa));\n            b[A] = E.X[y];\n            y = !0;\n          } else break a;\n          y || x(l.h == db(l));\n        }\n        if (a.Pb && l.h && n < e)\n          x(a.m.h),\n            (a.a = 5),\n            (a.m = a.wd),\n            (a.$ = a.xd),\n            0 < a.s.ua && $b(a.s.vb, a.s.Wa);\n        else if (l.h) break a;\n        else null != g && g(a, h > f ? f : h), (a.a = 0), (a.$ = n - c);\n        return 1;\n      }\n      a.a = 3;\n      return 0;\n    }\n    function Ac(a) {\n      x(null != a);\n      a.vc = null;\n      a.yc = null;\n      a.Ya = null;\n      var b = a.Wa;\n      null != b && (b.X = null);\n      a.vb = null;\n      x(null != a);\n    }\n    function Bc() {\n      var a = new je();\n      if (null == a) return null;\n      a.a = 0;\n      a.xb = Cc;\n      gb(\"Predictor\", \"VP8LPredictors\");\n      gb(\"Predictor\", \"VP8LPredictors_C\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd_C\");\n      pc = Kd;\n      Fb = Ld;\n      sc = Md;\n      Gb = Nd;\n      Hb = Od;\n      xc = Pd;\n      uc = Qd;\n      self.VP8LMapColor32b = ke;\n      self.VP8LMapColor8b = le;\n      return a;\n    }\n    function rb(a, b, c, d, e) {\n      var f = 1,\n        g = [a],\n        h = [b],\n        k = d.m,\n        l = d.s,\n        m = null,\n        n = 0;\n      a: for (;;) {\n        if (c)\n          for (; f && D(k, 1); ) {\n            var r = g,\n              q = h,\n              t = d,\n              v = 1,\n              p = t.m,\n              u = t.gc[t.ab],\n              w = D(p, 2);\n            if (t.Oc & (1 << w)) f = 0;\n            else {\n              t.Oc |= 1 << w;\n              u.hc = w;\n              u.Ea = r[0];\n              u.nc = q[0];\n              u.K = [null];\n              ++t.ab;\n              x(4 >= t.ab);\n              switch (w) {\n                case 0:\n                case 1:\n                  u.b = D(p, 3) + 2;\n                  v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);\n                  u.K = u.K[0];\n                  break;\n                case 3:\n                  var y = D(p, 8) + 1,\n                    A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;\n                  r[0] = xa(u.Ea, A);\n                  u.b = A;\n                  var v = rb(y, 1, 0, t, u.K),\n                    E;\n                  if ((E = v)) {\n                    var B,\n                      C = y,\n                      N = u,\n                      z = 1 << (8 >> N.b),\n                      Q = V(z);\n                    if (null == Q) E = 0;\n                    else {\n                      var S = N.K[0],\n                        K = N.w;\n                      Q[0] = N.K[0][0];\n                      for (B = 1; B < 1 * C; ++B) Q[B] = yb(S[K + B], Q[B - 1]);\n                      for (; B < 4 * z; ++B) Q[B] = 0;\n                      N.K[0] = null;\n                      N.K[0] = Q;\n                      E = 1;\n                    }\n                  }\n                  v = E;\n                  break;\n                case 2:\n                  break;\n                default:\n                  x(0);\n              }\n              f = v;\n            }\n          }\n        g = g[0];\n        h = h[0];\n        if (f && D(k, 1) && ((n = D(k, 4)), (f = 1 <= n && 11 >= n), !f)) {\n          d.a = 3;\n          break a;\n        }\n        var H;\n        if ((H = f))\n          b: {\n            var F = d,\n              G = g,\n              L = h,\n              J = n,\n              T = c,\n              Da,\n              ba,\n              X = F.m,\n              R = F.s,\n              P = [null],\n              U,\n              W = 1,\n              aa = 0,\n              na = me[J];\n            c: for (;;) {\n              if (T && D(X, 1)) {\n                var ca = D(X, 3) + 2,\n                  ga = xa(G, ca),\n                  ka = xa(L, ca),\n                  qa = ga * ka;\n                if (!rb(ga, ka, 0, F, P)) break c;\n                P = P[0];\n                R.xc = ca;\n                for (Da = 0; Da < qa; ++Da) {\n                  var ia = (P[Da] >> 8) & 65535;\n                  P[Da] = ia;\n                  ia >= W && (W = ia + 1);\n                }\n              }\n              if (X.h) break c;\n              for (ba = 0; 5 > ba; ++ba) {\n                var Y = Dc[ba];\n                !ba && 0 < J && (Y += 1 << J);\n                aa < Y && (aa = Y);\n              }\n              var ma = wa(W * na, O);\n              var ua = W,\n                va = wa(ua, Ub);\n              if (null == va) var la = null;\n              else x(65536 >= ua), (la = va);\n              var ha = V(aa);\n              if (null == la || null == ha || null == ma) {\n                F.a = 1;\n                break c;\n              }\n              var pa = ma;\n              for (Da = U = 0; Da < W; ++Da) {\n                var ja = la[Da],\n                  da = ja.G,\n                  ea = ja.H,\n                  Fa = 0,\n                  ra = 1,\n                  Ha = 0;\n                for (ba = 0; 5 > ba; ++ba) {\n                  Y = Dc[ba];\n                  da[ba] = pa;\n                  ea[ba] = U;\n                  !ba && 0 < J && (Y += 1 << J);\n                  d: {\n                    var sa,\n                      za = Y,\n                      ta = F,\n                      oa = ha,\n                      db = pa,\n                      eb = U,\n                      Ia = 0,\n                      Ka = ta.m,\n                      fb = D(Ka, 1);\n                    M(oa, 0, 0, za);\n                    if (fb) {\n                      var gb = D(Ka, 1) + 1,\n                        hb = D(Ka, 1),\n                        Ja = D(Ka, 0 == hb ? 1 : 8);\n                      oa[Ja] = 1;\n                      2 == gb && ((Ja = D(Ka, 8)), (oa[Ja] = 1));\n                      var ya = 1;\n                    } else {\n                      var Ua = V(19),\n                        Va = D(Ka, 4) + 4;\n                      if (19 < Va) {\n                        ta.a = 3;\n                        var Aa = 0;\n                        break d;\n                      }\n                      for (sa = 0; sa < Va; ++sa) Ua[ne[sa]] = D(Ka, 3);\n                      var Ba = void 0,\n                        sb = void 0,\n                        Wa = ta,\n                        ib = Ua,\n                        Ca = za,\n                        Xa = oa,\n                        Oa = 0,\n                        La = Wa.m,\n                        Ya = 8,\n                        Za = wa(128, O);\n                      e: for (;;) {\n                        if (!Z(Za, 0, 7, ib, 19)) break e;\n                        if (D(La, 1)) {\n                          var kb = 2 + 2 * D(La, 3),\n                            Ba = 2 + D(La, kb);\n                          if (Ba > Ca) break e;\n                        } else Ba = Ca;\n                        for (sb = 0; sb < Ca && Ba--; ) {\n                          Sa(La);\n                          var $a = Za[0 + (pb(La) & 127)];\n                          qb(La, La.u + $a.g);\n                          var jb = $a.value;\n                          if (16 > jb) (Xa[sb++] = jb), 0 != jb && (Ya = jb);\n                          else {\n                            var lb = 16 == jb,\n                              ab = jb - 16,\n                              mb = oe[ab],\n                              bb = D(La, pe[ab]) + mb;\n                            if (sb + bb > Ca) break e;\n                            else\n                              for (var nb = lb ? Ya : 0; 0 < bb--; )\n                                Xa[sb++] = nb;\n                          }\n                        }\n                        Oa = 1;\n                        break e;\n                      }\n                      Oa || (Wa.a = 3);\n                      ya = Oa;\n                    }\n                    (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));\n                    ya && 0 != Ia ? (Aa = Ia) : ((ta.a = 3), (Aa = 0));\n                  }\n                  if (0 == Aa) break c;\n                  ra && 1 == qe[ba] && (ra = 0 == pa[U].g);\n                  Fa += pa[U].g;\n                  U += Aa;\n                  if (3 >= ba) {\n                    var Pa = ha[0],\n                      tb;\n                    for (tb = 1; tb < Y; ++tb) ha[tb] > Pa && (Pa = ha[tb]);\n                    Ha += Pa;\n                  }\n                }\n                ja.nd = ra;\n                ja.Qb = 0;\n                ra &&\n                  ((ja.qb =\n                    ((da[3][ea[3] + 0].value << 24) |\n                      (da[1][ea[1] + 0].value << 16) |\n                      da[2][ea[2] + 0].value) >>>\n                    0),\n                  0 == Fa &&\n                    256 > da[0][ea[0] + 0].value &&\n                    ((ja.Qb = 1), (ja.qb += da[0][ea[0] + 0].value << 8)));\n                ja.jc = !ja.Qb && 6 > Ha;\n                if (ja.jc) {\n                  var Ga,\n                    Ea = ja;\n                  for (Ga = 0; Ga < xb; ++Ga) {\n                    var Ma = Ga,\n                      Na = Ea.pd[Ma],\n                      vb = Ea.G[0][Ea.H[0] + Ma];\n                    256 <= vb.value\n                      ? ((Na.g = vb.g + 256), (Na.value = vb.value))\n                      : ((Na.g = 0),\n                        (Na.value = 0),\n                        (Ma >>= ub(vb, 8, Na)),\n                        (Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na)),\n                        (Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na)),\n                        ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));\n                  }\n                }\n              }\n              R.vc = P;\n              R.Wb = W;\n              R.Ya = la;\n              R.yc = ma;\n              H = 1;\n              break b;\n            }\n            H = 0;\n          }\n        f = H;\n        if (!f) {\n          d.a = 3;\n          break a;\n        }\n        if (0 < n) {\n          if (((l.ua = 1 << n), !Zb(l.Wa, n))) {\n            d.a = 1;\n            f = 0;\n            break a;\n          }\n        } else l.ua = 0;\n        var Qa = d,\n          cb = g,\n          ob = h,\n          Ra = Qa.s,\n          Ta = Ra.xc;\n        Qa.c = cb;\n        Qa.i = ob;\n        Ra.md = xa(cb, Ta);\n        Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;\n        if (c) {\n          d.xb = re;\n          break a;\n        }\n        m = V(g * h);\n        if (null == m) {\n          d.a = 1;\n          f = 0;\n          break a;\n        }\n        f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;\n        break a;\n      }\n      f\n        ? (null != e ? (e[0] = m) : (x(null == m), x(c)), (d.$ = 0), c || Ac(l))\n        : Ac(l);\n      return f;\n    }\n    function Ec(a, b) {\n      var c = a.c * a.i,\n        d = c + b + 16 * b;\n      x(a.c <= b);\n      a.V = V(d);\n      if (null == a.V) return (a.Ta = null), (a.Ua = 0), (a.a = 1), 0;\n      a.Ta = a.V;\n      a.Ua = a.Ba + c + b;\n      return 1;\n    }\n    function se(a, b) {\n      var c = a.C,\n        d = b - c,\n        e = a.V,\n        f = a.Ba + a.c * c;\n      for (x(b <= a.l.o); 0 < d; ) {\n        var g = 16 < d ? 16 : d,\n          h = a.l.ma,\n          k = a.l.width,\n          l = k * g,\n          m = h.ca,\n          n = h.tb + k * c,\n          r = a.Ta,\n          q = a.Ua;\n        oc(a, g, e, f);\n        Fc(r, q, m, n, l);\n        zc(h, c, c + g, m, n, k);\n        d -= g;\n        e += g * a.c;\n        c += g;\n      }\n      x(c == b);\n      a.C = a.Ma = b;\n    }\n    function te(a, b) {\n      var c = [0],\n        d = [0],\n        e = [0];\n      a: for (;;) {\n        if (null == a) return 0;\n        if (null == b) return (a.a = 2), 0;\n        a.l = b;\n        a.a = 0;\n        cb(a.m, b.data, b.w, b.ha);\n        if (!mc(a.m, c, d, e)) {\n          a.a = 3;\n          break a;\n        }\n        a.xb = Cc;\n        b.width = c[0];\n        b.height = d[0];\n        if (!rb(c[0], d[0], 1, a, null)) break a;\n        return 1;\n      }\n      x(0 != a.a);\n      return 0;\n    }\n    function ue() {\n      this.ub = this.yd = this.td = this.Rb = 0;\n    }\n    function ve() {\n      this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;\n    }\n    function we() {\n      this.Fb = this.Bb = this.Cb = 0;\n      this.Zb = V(4);\n      this.Lb = V(4);\n    }\n    function Gc() {\n      this.Yb = wb();\n    }\n    function xe() {\n      this.jb = V(3);\n      this.Wc = Ed([4, 8], Gc);\n      this.Xc = Ed([4, 17], Gc);\n    }\n    function ye() {\n      this.Pc = this.wb = this.Tb = this.zd = 0;\n      this.vd = new V(4);\n      this.od = new V(4);\n    }\n    function Xa() {\n      this.ld = this.La = this.dd = this.tc = 0;\n    }\n    function Hc() {\n      this.Na = this.la = 0;\n    }\n    function ze() {\n      this.Sc = [0, 0];\n      this.Eb = [0, 0];\n      this.Qc = [0, 0];\n      this.ia = this.lc = 0;\n    }\n    function Kb() {\n      this.ad = V(384);\n      this.Za = 0;\n      this.Ob = V(16);\n      this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;\n    }\n    function Ae() {\n      this.uc = this.M = this.Nb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.ya = Array(new Kb());\n      this.aa = 0;\n      this.l = new Oa();\n    }\n    function Ic() {\n      this.y = V(16);\n      this.f = V(8);\n      this.ea = V(8);\n    }\n    function Be() {\n      this.cb = this.a = 0;\n      this.sc = \"\";\n      this.m = new Wb();\n      this.Od = new ue();\n      this.Kc = new ve();\n      this.ed = new ye();\n      this.Qa = new we();\n      this.Ic = this.$c = this.Aa = 0;\n      this.D = new Ae();\n      this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;\n      this.Jc = wa(8, Wb);\n      this.ia = 0;\n      new F();\n      this.pb = wa(4, ze);\n      this.Pa = new xe();\n      this.Bd = this.kc = 0;\n      this.Ac = [];\n      this.Bc = 0;\n      this.zc = [0, 0, 0, 0];\n      this.Gd = Array(new Ic());\n      this.Hd = 0;\n      this.rb = Array(new Hc());\n      this.sb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.oc = [];\n      this.pc = 0;\n      this.sa = [];\n      this.ta = 0;\n      this.qa = [];\n      this.ra = 0;\n      this.Ha = [];\n      this.B = this.R = this.Ia = 0;\n      this.Ec = [];\n      this.M = this.ja = this.Vb = this.Fc = 0;\n      this.ya = Array(new Kb());\n      this.L = this.aa = 0;\n      this.gd = Ed([4, 2], Xa);\n      this.ga = null;\n      this.Fa = [];\n      this.Cc = this.qc = this.P = 0;\n      this.Gb = [];\n      this.Uc = 0;\n      this.mb = [];\n      this.nb = 0;\n      this.rc = [];\n      this.Ga = this.Vc = 0;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function Oa() {\n      this.T = this.U = this.ka = this.height = this.width = 0;\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.Rc = this.fa = this.W = this.N = this.O = 0;\n      this.ma = \"void\";\n      this.put = \"VP8IoPutHook\";\n      this.ac = \"VP8IoSetupHook\";\n      this.bc = \"VP8IoTeardownHook\";\n      this.ha = this.Kb = 0;\n      this.data = [];\n      this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0;\n      this.F = [];\n      this.J = 0;\n    }\n    function Ce() {\n      var a = new Be();\n      null != a &&\n        ((a.a = 0), (a.sc = \"OK\"), (a.cb = 0), (a.Xb = 0), oa || (oa = De));\n      return a;\n    }\n    function T(a, b, c) {\n      0 == a.a && ((a.a = b), (a.sc = c), (a.cb = 0));\n      return 0;\n    }\n    function Jc(a, b, c) {\n      return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];\n    }\n    function Kc(a, b) {\n      if (null == a) return 0;\n      a.a = 0;\n      a.sc = \"OK\";\n      if (null == b) return T(a, 2, \"null VP8Io passed to VP8GetHeaders()\");\n      var c = b.data;\n      var d = b.w;\n      var e = b.ha;\n      if (4 > e) return T(a, 7, \"Truncated header.\");\n      var f = c[d + 0] | (c[d + 1] << 8) | (c[d + 2] << 16);\n      var g = a.Od;\n      g.Rb = !(f & 1);\n      g.td = (f >> 1) & 7;\n      g.yd = (f >> 4) & 1;\n      g.ub = f >> 5;\n      if (3 < g.td) return T(a, 3, \"Incorrect keyframe parameters.\");\n      if (!g.yd) return T(a, 4, \"Frame not displayable.\");\n      d += 3;\n      e -= 3;\n      var h = a.Kc;\n      if (g.Rb) {\n        if (7 > e) return T(a, 7, \"cannot parse picture header\");\n        if (!Jc(c, d, e)) return T(a, 3, \"Bad code word\");\n        h.c = ((c[d + 4] << 8) | c[d + 3]) & 16383;\n        h.Td = c[d + 4] >> 6;\n        h.i = ((c[d + 6] << 8) | c[d + 5]) & 16383;\n        h.Ud = c[d + 6] >> 6;\n        d += 7;\n        e -= 7;\n        a.za = (h.c + 15) >> 4;\n        a.Ub = (h.i + 15) >> 4;\n        b.width = h.c;\n        b.height = h.i;\n        b.Da = 0;\n        b.j = 0;\n        b.v = 0;\n        b.va = b.width;\n        b.o = b.height;\n        b.da = 0;\n        b.ib = b.width;\n        b.hb = b.height;\n        b.U = b.width;\n        b.T = b.height;\n        f = a.Pa;\n        M(f.jb, 0, 255, f.jb.length);\n        f = a.Qa;\n        x(null != f);\n        f.Cb = 0;\n        f.Bb = 0;\n        f.Fb = 1;\n        M(f.Zb, 0, 0, f.Zb.length);\n        M(f.Lb, 0, 0, f.Lb);\n      }\n      if (g.ub > e) return T(a, 7, \"bad partition length\");\n      f = a.m;\n      ma(f, c, d, g.ub);\n      d += g.ub;\n      e -= g.ub;\n      g.Rb && ((h.Ld = G(f)), (h.Kd = G(f)));\n      h = a.Qa;\n      var k = a.Pa,\n        l;\n      x(null != f);\n      x(null != h);\n      h.Cb = G(f);\n      if (h.Cb) {\n        h.Bb = G(f);\n        if (G(f)) {\n          h.Fb = G(f);\n          for (l = 0; 4 > l; ++l) h.Zb[l] = G(f) ? ca(f, 7) : 0;\n          for (l = 0; 4 > l; ++l) h.Lb[l] = G(f) ? ca(f, 6) : 0;\n        }\n        if (h.Bb) for (l = 0; 3 > l; ++l) k.jb[l] = G(f) ? na(f, 8) : 255;\n      } else h.Bb = 0;\n      if (f.Ka) return T(a, 3, \"cannot parse segment header\");\n      h = a.ed;\n      h.zd = G(f);\n      h.Tb = na(f, 6);\n      h.wb = na(f, 3);\n      h.Pc = G(f);\n      if (h.Pc && G(f)) {\n        for (k = 0; 4 > k; ++k) G(f) && (h.vd[k] = ca(f, 6));\n        for (k = 0; 4 > k; ++k) G(f) && (h.od[k] = ca(f, 6));\n      }\n      a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;\n      if (f.Ka) return T(a, 3, \"cannot parse filter header\");\n      l = d;\n      var m = e;\n      e = l;\n      d = l + m;\n      h = m;\n      a.Xb = (1 << na(a.m, 2)) - 1;\n      k = a.Xb;\n      if (m < 3 * k) c = 7;\n      else {\n        l += 3 * k;\n        h -= 3 * k;\n        for (m = 0; m < k; ++m) {\n          var n = c[e + 0] | (c[e + 1] << 8) | (c[e + 2] << 16);\n          n > h && (n = h);\n          ma(a.Jc[+m], c, l, n);\n          l += n;\n          h -= n;\n          e += 3;\n        }\n        ma(a.Jc[+k], c, l, h);\n        c = l < d ? 0 : 5;\n      }\n      if (0 != c) return T(a, c, \"cannot parse partitions\");\n      l = a.m;\n      c = na(l, 7);\n      e = G(l) ? ca(l, 4) : 0;\n      d = G(l) ? ca(l, 4) : 0;\n      h = G(l) ? ca(l, 4) : 0;\n      k = G(l) ? ca(l, 4) : 0;\n      l = G(l) ? ca(l, 4) : 0;\n      m = a.Qa;\n      for (n = 0; 4 > n; ++n) {\n        if (m.Cb) {\n          var r = m.Zb[n];\n          m.Fb || (r += c);\n        } else if (0 < n) {\n          a.pb[n] = a.pb[0];\n          continue;\n        } else r = c;\n        var q = a.pb[n];\n        q.Sc[0] = Lb[ga(r + e, 127)];\n        q.Sc[1] = Mb[ga(r + 0, 127)];\n        q.Eb[0] = 2 * Lb[ga(r + d, 127)];\n        q.Eb[1] = (101581 * Mb[ga(r + h, 127)]) >> 16;\n        8 > q.Eb[1] && (q.Eb[1] = 8);\n        q.Qc[0] = Lb[ga(r + k, 117)];\n        q.Qc[1] = Mb[ga(r + l, 127)];\n        q.lc = r + l;\n      }\n      if (!g.Rb) return T(a, 4, \"Not a key frame.\");\n      G(f);\n      g = a.Pa;\n      for (c = 0; 4 > c; ++c) {\n        for (e = 0; 8 > e; ++e)\n          for (d = 0; 3 > d; ++d)\n            for (h = 0; 11 > h; ++h)\n              (k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h]),\n                (g.Wc[c][e].Yb[d][h] = k);\n        for (e = 0; 17 > e; ++e) g.Xc[c][e] = g.Wc[c][Ge[e]];\n      }\n      a.kc = G(f);\n      a.kc && (a.Bd = na(f, 8));\n      return (a.cb = 1);\n    }\n    function De(a, b, c, d, e, f, g) {\n      var h = b[e].Yb[c];\n      for (c = 0; 16 > e; ++e) {\n        if (!K(a, h[c + 0])) return e;\n        for (; !K(a, h[c + 1]); )\n          if (((h = b[++e].Yb[0]), (c = 0), 16 == e)) return 16;\n        var k = b[e + 1].Yb;\n        if (K(a, h[c + 2])) {\n          var l = a,\n            m = h,\n            n = c;\n          var r = 0;\n          if (K(l, m[n + 3]))\n            if (K(l, m[n + 6])) {\n              h = 0;\n              r = K(l, m[n + 8]);\n              m = K(l, m[n + 9 + r]);\n              n = 2 * r + m;\n              r = 0;\n              for (m = He[n]; m[h]; ++h) r += r + K(l, m[h]);\n              r += 3 + (8 << n);\n            } else\n              K(l, m[n + 7])\n                ? ((r = 7 + 2 * K(l, 165)), (r += K(l, 145)))\n                : (r = 5 + K(l, 159));\n          else K(l, m[n + 4]) ? (r = 3 + K(l, m[n + 5])) : (r = 2);\n          h = k[2];\n        } else (r = 1), (h = k[1]);\n        k = g + Ie[e];\n        l = a;\n        0 > l.b && Qa(l);\n        var m = l.b,\n          n = l.Ca >> 1,\n          q = (n - (l.I >> m)) >> 31;\n        --l.b;\n        l.Ca += q;\n        l.Ca |= 1;\n        l.I -= ((n + 1) & q) << m;\n        f[k] = ((r ^ q) - q) * d[(0 < e) + 0];\n      }\n      return 16;\n    }\n    function Lc(a) {\n      var b = a.rb[a.sb - 1];\n      b.la = 0;\n      b.Na = 0;\n      M(a.zc, 0, 0, a.zc.length);\n      a.ja = 0;\n    }\n    function Je(a, b) {\n      for (a.M = 0; a.M < a.Va; ++a.M) {\n        var c = a.Jc[a.M & a.Xb],\n          d = a.m,\n          e = a,\n          f;\n        for (f = 0; f < e.za; ++f) {\n          var g = d;\n          var h = e;\n          var k = h.Ac,\n            l = h.Bc + 4 * f,\n            m = h.zc,\n            n = h.ya[h.aa + f];\n          h.Qa.Bb\n            ? (n.$b = K(g, h.Pa.jb[0])\n                ? 2 + K(g, h.Pa.jb[2])\n                : K(g, h.Pa.jb[1]))\n            : (n.$b = 0);\n          h.kc && (n.Ad = K(g, h.Bd));\n          n.Za = !K(g, 145) + 0;\n          if (n.Za) {\n            var r = n.Ob,\n              q = 0;\n            for (h = 0; 4 > h; ++h) {\n              var t = m[0 + h];\n              var v;\n              for (v = 0; 4 > v; ++v) {\n                t = Ke[k[l + v]][t];\n                for (var p = Mc[K(g, t[0])]; 0 < p; )\n                  p = Mc[2 * p + K(g, t[p])];\n                t = -p;\n                k[l + v] = t;\n              }\n              I(r, q, k, l, 4);\n              q += 4;\n              m[0 + h] = t;\n            }\n          } else\n            (t = K(g, 156) ? (K(g, 128) ? 1 : 3) : K(g, 163) ? 2 : 0),\n              (n.Ob[0] = t),\n              M(k, l, t, 4),\n              M(m, 0, t, 4);\n          n.Dd = K(g, 142) ? (K(g, 114) ? (K(g, 183) ? 1 : 3) : 2) : 0;\n        }\n        if (e.m.Ka) return T(a, 7, \"Premature end-of-partition0 encountered.\");\n        for (; a.ja < a.za; ++a.ja) {\n          d = a;\n          e = c;\n          g = d.rb[d.sb - 1];\n          k = d.rb[d.sb + d.ja];\n          f = d.ya[d.aa + d.ja];\n          if ((l = d.kc ? f.Ad : 0))\n            (g.la = k.la = 0),\n              f.Za || (g.Na = k.Na = 0),\n              (f.Hc = 0),\n              (f.Gc = 0),\n              (f.ia = 0);\n          else {\n            var u,\n              w,\n              g = k,\n              k = e,\n              l = d.Pa.Xc,\n              m = d.ya[d.aa + d.ja],\n              n = d.pb[m.$b];\n            h = m.ad;\n            r = 0;\n            q = d.rb[d.sb - 1];\n            t = v = 0;\n            M(h, r, 0, 384);\n            if (m.Za) {\n              var y = 0;\n              var A = l[3];\n            } else {\n              p = V(16);\n              var E = g.Na + q.Na;\n              E = oa(k, l[1], E, n.Eb, 0, p, 0);\n              g.Na = q.Na = (0 < E) + 0;\n              if (1 < E) Nc(p, 0, h, r);\n              else {\n                var B = (p[0] + 3) >> 3;\n                for (p = 0; 256 > p; p += 16) h[r + p] = B;\n              }\n              y = 1;\n              A = l[0];\n            }\n            var C = g.la & 15;\n            var N = q.la & 15;\n            for (p = 0; 4 > p; ++p) {\n              var z = N & 1;\n              for (B = w = 0; 4 > B; ++B)\n                (E = z + (C & 1)),\n                  (E = oa(k, A, E, n.Sc, y, h, r)),\n                  (z = E > y),\n                  (C = (C >> 1) | (z << 7)),\n                  (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                  (r += 16);\n              C >>= 4;\n              N = (N >> 1) | (z << 7);\n              v = ((v << 8) | w) >>> 0;\n            }\n            A = C;\n            y = N >> 4;\n            for (u = 0; 4 > u; u += 2) {\n              w = 0;\n              C = g.la >> (4 + u);\n              N = q.la >> (4 + u);\n              for (p = 0; 2 > p; ++p) {\n                z = N & 1;\n                for (B = 0; 2 > B; ++B)\n                  (E = z + (C & 1)),\n                    (E = oa(k, l[2], E, n.Qc, 0, h, r)),\n                    (z = 0 < E),\n                    (C = (C >> 1) | (z << 3)),\n                    (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                    (r += 16);\n                C >>= 2;\n                N = (N >> 1) | (z << 5);\n              }\n              t |= w << (4 * u);\n              A |= (C << 4) << u;\n              y |= (N & 240) << u;\n            }\n            g.la = A;\n            q.la = y;\n            m.Hc = v;\n            m.Gc = t;\n            m.ia = t & 43690 ? 0 : n.ia;\n            l = !(v | t);\n          }\n          0 < d.L &&\n            ((d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za]),\n            (d.wa[d.Y + d.ja].La |= !l));\n          if (e.Ka) return T(a, 7, \"Premature end-of-file encountered.\");\n        }\n        Lc(a);\n        c = a;\n        d = b;\n        e = 1;\n        f = c.D;\n        g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;\n        if (0 == c.Aa)\n          a: {\n            (f.M = c.M), (f.uc = g), Oc(c, f), (e = 1);\n            w = c.D;\n            f = w.Nb;\n            t = Ya[c.L];\n            g = t * c.R;\n            k = (t / 2) * c.B;\n            p = 16 * f * c.R;\n            B = 8 * f * c.B;\n            l = c.sa;\n            m = c.ta - g + p;\n            n = c.qa;\n            h = c.ra - k + B;\n            r = c.Ha;\n            q = c.Ia - k + B;\n            C = w.M;\n            N = 0 == C;\n            v = C >= c.Va - 1;\n            2 == c.Aa && Oc(c, w);\n            if (w.uc)\n              for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {\n                var Q = E;\n                y = w;\n                A = z;\n                var S = Q.D,\n                  D = S.Nb;\n                u = Q.R;\n                var S = S.wa[S.Y + y],\n                  F = Q.sa,\n                  H = Q.ta + 16 * D * u + 16 * y,\n                  J = S.dd,\n                  G = S.tc;\n                if (0 != G)\n                  if ((x(3 <= G), 1 == Q.L))\n                    0 < y && Pc(F, H, u, G + 4),\n                      S.La && Qc(F, H, u, G),\n                      0 < A && Rc(F, H, u, G + 4),\n                      S.La && Sc(F, H, u, G);\n                  else {\n                    var L = Q.B,\n                      O = Q.qa,\n                      P = Q.ra + 8 * D * L + 8 * y,\n                      R = Q.Ha,\n                      Q = Q.Ia + 8 * D * L + 8 * y,\n                      D = S.ld;\n                    0 < y &&\n                      (Tc(F, H, u, G + 4, J, D),\n                      Uc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));\n                    0 < A &&\n                      (Xc(F, H, u, G + 4, J, D),\n                      Yc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));\n                  }\n              }\n            c.ia && alert(\"todo:DitherRow\");\n            if (null != d.put) {\n              w = 16 * C;\n              C = 16 * (C + 1);\n              N\n                ? ((d.y = c.sa),\n                  (d.O = c.ta + p),\n                  (d.f = c.qa),\n                  (d.N = c.ra + B),\n                  (d.ea = c.Ha),\n                  (d.W = c.Ia + B))\n                : ((w -= t),\n                  (d.y = l),\n                  (d.O = m),\n                  (d.f = n),\n                  (d.N = h),\n                  (d.ea = r),\n                  (d.W = q));\n              v || (C -= t);\n              C > d.o && (C = d.o);\n              d.F = null;\n              d.J = null;\n              if (\n                null != c.Fa &&\n                0 < c.Fa.length &&\n                w < C &&\n                ((d.J = Le(c, d, w, C - w)),\n                (d.F = c.mb),\n                null == d.F && 0 == d.F.length)\n              ) {\n                e = T(c, 3, \"Could not decode alpha data.\");\n                break a;\n              }\n              w < d.j &&\n                ((t = d.j - w),\n                (w = d.j),\n                x(!(t & 1)),\n                (d.O += c.R * t),\n                (d.N += c.B * (t >> 1)),\n                (d.W += c.B * (t >> 1)),\n                null != d.F && (d.J += d.width * t));\n              w < C &&\n                ((d.O += d.v),\n                (d.N += d.v >> 1),\n                (d.W += d.v >> 1),\n                null != d.F && (d.J += d.v),\n                (d.ka = w - d.j),\n                (d.U = d.va - d.v),\n                (d.T = C - w),\n                (e = d.put(d)));\n            }\n            f + 1 != c.Ic ||\n              v ||\n              (I(c.sa, c.ta - g, l, m + 16 * c.R, g),\n              I(c.qa, c.ra - k, n, h + 8 * c.B, k),\n              I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));\n          }\n        if (!e) return T(a, 6, \"Output aborted.\");\n      }\n      return 1;\n    }\n    function Me(a, b) {\n      if (null == a) return 0;\n      if (null == b) return T(a, 2, \"NULL VP8Io parameter in VP8Decode().\");\n      if (!a.cb && !Kc(a, b)) return 0;\n      x(a.cb);\n      if (null == b.ac || b.ac(b)) {\n        b.ob && (a.L = 0);\n        var c = Ya[a.L];\n        2 == a.L\n          ? ((a.yb = 0), (a.zb = 0))\n          : ((a.yb = (b.v - c) >> 4),\n            (a.zb = (b.j - c) >> 4),\n            0 > a.yb && (a.yb = 0),\n            0 > a.zb && (a.zb = 0));\n        a.Va = (b.o + 15 + c) >> 4;\n        a.Hb = (b.va + 15 + c) >> 4;\n        a.Hb > a.za && (a.Hb = a.za);\n        a.Va > a.Ub && (a.Va = a.Ub);\n        if (0 < a.L) {\n          var d = a.ed;\n          for (c = 0; 4 > c; ++c) {\n            var e;\n            if (a.Qa.Cb) {\n              var f = a.Qa.Lb[c];\n              a.Qa.Fb || (f += d.Tb);\n            } else f = d.Tb;\n            for (e = 0; 1 >= e; ++e) {\n              var g = a.gd[c][e],\n                h = f;\n              d.Pc && ((h += d.vd[0]), e && (h += d.od[0]));\n              h = 0 > h ? 0 : 63 < h ? 63 : h;\n              if (0 < h) {\n                var k = h;\n                0 < d.wb &&\n                  ((k = 4 < d.wb ? k >> 2 : k >> 1),\n                  k > 9 - d.wb && (k = 9 - d.wb));\n                1 > k && (k = 1);\n                g.dd = k;\n                g.tc = 2 * h + k;\n                g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;\n              } else g.tc = 0;\n              g.La = e;\n            }\n          }\n        }\n        c = 0;\n      } else T(a, 6, \"Frame setup failed\"), (c = a.a);\n      if ((c = 0 == c)) {\n        if (c) {\n          a.$c = 0;\n          0 < a.Aa || (a.Ic = Ne);\n          b: {\n            c = a.Ic;\n            var k = a.za,\n              d = 4 * k,\n              l = 32 * k,\n              m = k + 1,\n              n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,\n              r = (2 == a.Aa ? 2 : 1) * k;\n            e = ((3 * (16 * c + Ya[a.L])) / 2) * l;\n            f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;\n            g = d + 832 + e + f;\n            if (g != g) c = 0;\n            else {\n              if (g > a.Vb) {\n                a.Vb = 0;\n                a.Ec = V(g);\n                a.Fc = 0;\n                if (null == a.Ec) {\n                  c = T(a, 1, \"no memory during frame initialization.\");\n                  break b;\n                }\n                a.Vb = g;\n              }\n              g = a.Ec;\n              h = a.Fc;\n              a.Ac = g;\n              a.Bc = h;\n              h += d;\n              a.Gd = wa(l, Ic);\n              a.Hd = 0;\n              a.rb = wa(m + 1, Hc);\n              a.sb = 1;\n              a.wa = n ? wa(n, Xa) : null;\n              a.Y = 0;\n              a.D.Nb = 0;\n              a.D.wa = a.wa;\n              a.D.Y = a.Y;\n              0 < a.Aa && (a.D.Y += k);\n              x(!0);\n              a.oc = g;\n              a.pc = h;\n              h += 832;\n              a.ya = wa(r, Kb);\n              a.aa = 0;\n              a.D.ya = a.ya;\n              a.D.aa = a.aa;\n              2 == a.Aa && (a.D.aa += k);\n              a.R = 16 * k;\n              a.B = 8 * k;\n              l = Ya[a.L];\n              k = l * a.R;\n              l = (l / 2) * a.B;\n              a.sa = g;\n              a.ta = h + k;\n              a.qa = a.sa;\n              a.ra = a.ta + 16 * c * a.R + l;\n              a.Ha = a.qa;\n              a.Ia = a.ra + 8 * c * a.B + l;\n              a.$c = 0;\n              h += e;\n              a.mb = f ? g : null;\n              a.nb = f ? h : null;\n              x(h + f <= a.Fc + a.Vb);\n              Lc(a);\n              M(a.Ac, a.Bc, 0, d);\n              c = 1;\n            }\n          }\n          if (c) {\n            b.ka = 0;\n            b.y = a.sa;\n            b.O = a.ta;\n            b.f = a.qa;\n            b.N = a.ra;\n            b.ea = a.Ha;\n            b.Vd = a.Ia;\n            b.fa = a.R;\n            b.Rc = a.B;\n            b.F = null;\n            b.J = 0;\n            if (!ad) {\n              for (c = -255; 255 >= c; ++c) bd[255 + c] = 0 > c ? -c : c;\n              for (c = -1020; 1020 >= c; ++c)\n                cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;\n              for (c = -112; 112 >= c; ++c)\n                dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;\n              for (c = -255; 510 >= c; ++c)\n                ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;\n              ad = 1;\n            }\n            Nc = Oe;\n            Za = Pe;\n            Nb = Qe;\n            pa = Re;\n            Ob = Se;\n            fd = Te;\n            Xc = Ue;\n            Tc = Ve;\n            Yc = We;\n            Uc = Xe;\n            Zc = Ye;\n            Vc = Ze;\n            $c = $e;\n            Wc = af;\n            Rc = gd;\n            Pc = hd;\n            Sc = bf;\n            Qc = cf;\n            W[0] = df;\n            W[1] = ef;\n            W[2] = ff;\n            W[3] = gf;\n            W[4] = hf;\n            W[5] = jf;\n            W[6] = kf;\n            W[7] = lf;\n            W[8] = mf;\n            W[9] = nf;\n            Y[0] = of;\n            Y[1] = pf;\n            Y[2] = qf;\n            Y[3] = rf;\n            Y[4] = sf;\n            Y[5] = tf;\n            Y[6] = uf;\n            ka[0] = vf;\n            ka[1] = wf;\n            ka[2] = xf;\n            ka[3] = yf;\n            ka[4] = zf;\n            ka[5] = Af;\n            ka[6] = Bf;\n            c = 1;\n          } else c = 0;\n        }\n        c && (c = Je(a, b));\n        null != b.bc && b.bc(b);\n        c &= 1;\n      }\n      if (!c) return 0;\n      a.cb = 0;\n      return c;\n    }\n    function qa(a, b, c, d, e) {\n      e = a[b + c + 32 * d] + (e >> 3);\n      a[b + c + 32 * d] = e & -256 ? (0 > e ? 0 : 255) : e;\n    }\n    function kb(a, b, c, d, e, f) {\n      qa(a, b, 0, c, d + e);\n      qa(a, b, 1, c, d + f);\n      qa(a, b, 2, c, d - f);\n      qa(a, b, 3, c, d - e);\n    }\n    function da(a) {\n      return ((20091 * a) >> 16) + a;\n    }\n    function id(a, b, c, d) {\n      var e = 0,\n        f;\n      var g = V(16);\n      for (f = 0; 4 > f; ++f) {\n        var h = a[b + 0] + a[b + 8];\n        var k = a[b + 0] - a[b + 8];\n        var l = ((35468 * a[b + 4]) >> 16) - da(a[b + 12]);\n        var m = da(a[b + 4]) + ((35468 * a[b + 12]) >> 16);\n        g[e + 0] = h + m;\n        g[e + 1] = k + l;\n        g[e + 2] = k - l;\n        g[e + 3] = h - m;\n        e += 4;\n        b++;\n      }\n      for (f = e = 0; 4 > f; ++f)\n        (a = g[e + 0] + 4),\n          (h = a + g[e + 8]),\n          (k = a - g[e + 8]),\n          (l = ((35468 * g[e + 4]) >> 16) - da(g[e + 12])),\n          (m = da(g[e + 4]) + ((35468 * g[e + 12]) >> 16)),\n          qa(c, d, 0, 0, h + m),\n          qa(c, d, 1, 0, k + l),\n          qa(c, d, 2, 0, k - l),\n          qa(c, d, 3, 0, h - m),\n          e++,\n          (d += 32);\n    }\n    function Te(a, b, c, d) {\n      var e = a[b + 0] + 4,\n        f = (35468 * a[b + 4]) >> 16,\n        g = da(a[b + 4]),\n        h = (35468 * a[b + 1]) >> 16;\n      a = da(a[b + 1]);\n      kb(c, d, 0, e + g, a, h);\n      kb(c, d, 1, e + f, a, h);\n      kb(c, d, 2, e - f, a, h);\n      kb(c, d, 3, e - g, a, h);\n    }\n    function Pe(a, b, c, d, e) {\n      id(a, b, c, d);\n      e && id(a, b + 16, c, d + 4);\n    }\n    function Qe(a, b, c, d) {\n      Za(a, b + 0, c, d, 1);\n      Za(a, b + 32, c, d + 128, 1);\n    }\n    function Re(a, b, c, d) {\n      a = a[b + 0] + 4;\n      var e;\n      for (e = 0; 4 > e; ++e) for (b = 0; 4 > b; ++b) qa(c, d, b, e, a);\n    }\n    function Se(a, b, c, d) {\n      a[b + 0] && pa(a, b + 0, c, d);\n      a[b + 16] && pa(a, b + 16, c, d + 4);\n      a[b + 32] && pa(a, b + 32, c, d + 128);\n      a[b + 48] && pa(a, b + 48, c, d + 128 + 4);\n    }\n    function Oe(a, b, c, d) {\n      var e = V(16),\n        f;\n      for (f = 0; 4 > f; ++f) {\n        var g = a[b + 0 + f] + a[b + 12 + f];\n        var h = a[b + 4 + f] + a[b + 8 + f];\n        var k = a[b + 4 + f] - a[b + 8 + f];\n        var l = a[b + 0 + f] - a[b + 12 + f];\n        e[0 + f] = g + h;\n        e[8 + f] = g - h;\n        e[4 + f] = l + k;\n        e[12 + f] = l - k;\n      }\n      for (f = 0; 4 > f; ++f)\n        (a = e[0 + 4 * f] + 3),\n          (g = a + e[3 + 4 * f]),\n          (h = e[1 + 4 * f] + e[2 + 4 * f]),\n          (k = e[1 + 4 * f] - e[2 + 4 * f]),\n          (l = a - e[3 + 4 * f]),\n          (c[d + 0] = (g + h) >> 3),\n          (c[d + 16] = (l + k) >> 3),\n          (c[d + 32] = (g - h) >> 3),\n          (c[d + 48] = (l - k) >> 3),\n          (d += 64);\n    }\n    function Pb(a, b, c) {\n      var d = b - 32,\n        e = R,\n        f = 255 - a[d - 1],\n        g;\n      for (g = 0; g < c; ++g) {\n        var h = e,\n          k = f + a[b - 1],\n          l;\n        for (l = 0; l < c; ++l) a[b + l] = h[k + a[d + l]];\n        b += 32;\n      }\n    }\n    function ef(a, b) {\n      Pb(a, b, 4);\n    }\n    function wf(a, b) {\n      Pb(a, b, 8);\n    }\n    function pf(a, b) {\n      Pb(a, b, 16);\n    }\n    function qf(a, b) {\n      var c;\n      for (c = 0; 16 > c; ++c) I(a, b + 32 * c, a, b - 32, 16);\n    }\n    function rf(a, b) {\n      var c;\n      for (c = 16; 0 < c; --c) M(a, b, a[b - 1], 16), (b += 32);\n    }\n    function $a(a, b, c) {\n      var d;\n      for (d = 0; 16 > d; ++d) M(b, c + 32 * d, a, 16);\n    }\n    function of(a, b) {\n      var c = 16,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d] + a[b + d - 32];\n      $a(c >> 5, a, b);\n    }\n    function sf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d];\n      $a(c >> 4, a, b);\n    }\n    function tf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b + d - 32];\n      $a(c >> 4, a, b);\n    }\n    function uf(a, b) {\n      $a(128, a, b);\n    }\n    function z(a, b, c) {\n      return (a + 2 * b + c + 2) >> 2;\n    }\n    function ff(a, b) {\n      var c = b - 32,\n        c = new Uint8Array([\n          z(a[c - 1], a[c + 0], a[c + 1]),\n          z(a[c + 0], a[c + 1], a[c + 2]),\n          z(a[c + 1], a[c + 2], a[c + 3]),\n          z(a[c + 2], a[c + 3], a[c + 4])\n        ]),\n        d;\n      for (d = 0; 4 > d; ++d) I(a, b + 32 * d, c, 0, c.length);\n    }\n    function gf(a, b) {\n      var c = a[b - 1],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));\n      ra(a, b + 32, 16843009 * z(c, d, e));\n      ra(a, b + 64, 16843009 * z(d, e, f));\n      ra(a, b + 96, 16843009 * z(e, f, f));\n    }\n    function df(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 4 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      c >>= 3;\n      for (d = 0; 4 > d; ++d) M(a, b + 32 * d, c, 4);\n    }\n    function hf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);\n      a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);\n      a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);\n      a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);\n      a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);\n      a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);\n      a[b + 3 + 0] = z(l, k, h);\n    }\n    function kf(a, b) {\n      var c = a[b + 1 - 32],\n        d = a[b + 2 - 32],\n        e = a[b + 3 - 32],\n        f = a[b + 4 - 32],\n        g = a[b + 5 - 32],\n        h = a[b + 6 - 32],\n        k = a[b + 7 - 32];\n      a[b + 0 + 0] = z(a[b + 0 - 32], c, d);\n      a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);\n      a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);\n      a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);\n      a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, k);\n    }\n    function jf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 0] = a[b + 1 + 64] = (f + g + 1) >> 1;\n      a[b + 1 + 0] = a[b + 2 + 64] = (g + h + 1) >> 1;\n      a[b + 2 + 0] = a[b + 3 + 64] = (h + k + 1) >> 1;\n      a[b + 3 + 0] = (k + l + 1) >> 1;\n      a[b + 0 + 96] = z(e, d, c);\n      a[b + 0 + 64] = z(d, c, f);\n      a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);\n      a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);\n      a[b + 3 + 32] = z(h, k, l);\n    }\n    function lf(a, b) {\n      var c = a[b + 0 - 32],\n        d = a[b + 1 - 32],\n        e = a[b + 2 - 32],\n        f = a[b + 3 - 32],\n        g = a[b + 4 - 32],\n        h = a[b + 5 - 32],\n        k = a[b + 6 - 32],\n        l = a[b + 7 - 32];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 1 + 0] = a[b + 0 + 64] = (d + e + 1) >> 1;\n      a[b + 2 + 0] = a[b + 1 + 64] = (e + f + 1) >> 1;\n      a[b + 3 + 0] = a[b + 2 + 64] = (f + g + 1) >> 1;\n      a[b + 0 + 32] = z(c, d, e);\n      a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);\n      a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 3 + 64] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, l);\n    }\n    function nf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 2 + 0] = a[b + 0 + 32] = (d + e + 1) >> 1;\n      a[b + 2 + 32] = a[b + 0 + 64] = (e + f + 1) >> 1;\n      a[b + 1 + 0] = z(c, d, e);\n      a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);\n      a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);\n      a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[\n        b + 2 + 96\n      ] = a[b + 3 + 96] = f;\n    }\n    function mf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96],\n        g = a[b - 1 - 32],\n        h = a[b + 0 - 32],\n        k = a[b + 1 - 32],\n        l = a[b + 2 - 32];\n      a[b + 0 + 0] = a[b + 2 + 32] = (c + g + 1) >> 1;\n      a[b + 0 + 32] = a[b + 2 + 64] = (d + c + 1) >> 1;\n      a[b + 0 + 64] = a[b + 2 + 96] = (e + d + 1) >> 1;\n      a[b + 0 + 96] = (f + e + 1) >> 1;\n      a[b + 3 + 0] = z(h, k, l);\n      a[b + 2 + 0] = z(g, h, k);\n      a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);\n      a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);\n      a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);\n      a[b + 1 + 96] = z(f, e, d);\n    }\n    function xf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) I(a, b + 32 * c, a, b - 32, 8);\n    }\n    function yf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) M(a, b, a[b - 1], 8), (b += 32);\n    }\n    function lb(a, b, c) {\n      var d;\n      for (d = 0; 8 > d; ++d) M(b, c + 32 * d, a, 8);\n    }\n    function vf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      lb(c >> 4, a, b);\n    }\n    function Af(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32];\n      lb(c >> 3, a, b);\n    }\n    function zf(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b - 1 + 32 * d];\n      lb(c >> 3, a, b);\n    }\n    function Bf(a, b) {\n      lb(128, a, b);\n    }\n    function ab(a, b, c) {\n      var d = a[b - c],\n        e = a[b + 0],\n        f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],\n        g = mb[112 + ((f + 4) >> 3)];\n      a[b - c] = R[255 + d + mb[112 + ((f + 3) >> 3)]];\n      a[b + 0] = R[255 + e - g];\n    }\n    function jd(a, b, c, d) {\n      var e = a[b + 0],\n        f = a[b + c];\n      return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;\n    }\n    function kd(a, b, c, d) {\n      return (\n        4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d\n      );\n    }\n    function ld(a, b, c, d, e) {\n      var f = a[b - 3 * c],\n        g = a[b - 2 * c],\n        h = a[b - c],\n        k = a[b + 0],\n        l = a[b + c],\n        m = a[b + 2 * c],\n        n = a[b + 3 * c];\n      return 4 * U[255 + h - k] + U[255 + g - l] > d\n        ? 0\n        : U[255 + a[b - 4 * c] - f] <= e &&\n            U[255 + f - g] <= e &&\n            U[255 + g - h] <= e &&\n            U[255 + n - m] <= e &&\n            U[255 + m - l] <= e &&\n            U[255 + l - k] <= e;\n    }\n    function gd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d, c, e) && ab(a, b + d, c);\n    }\n    function hd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);\n    }\n    function bf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4 * c), gd(a, b, c, d);\n    }\n    function cf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4), hd(a, b, c, d);\n    }\n    function ea(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - 2 * m],\n              r = k[l - m],\n              q = k[l + 0],\n              t = k[l + m],\n              v = k[l + 2 * m],\n              p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],\n              u = (27 * p + 63) >> 7,\n              w = (18 * p + 63) >> 7,\n              p = (9 * p + 63) >> 7;\n            k[l - 3 * m] = R[255 + k[l - 3 * m] + p];\n            k[l - 2 * m] = R[255 + n + w];\n            k[l - m] = R[255 + r + u];\n            k[l + 0] = R[255 + q - u];\n            k[l + m] = R[255 + t - w];\n            k[l + 2 * m] = R[255 + v - p];\n          }\n        b += d;\n      }\n    }\n    function Fa(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - m],\n              r = k[l + 0],\n              q = k[l + m],\n              t = 3 * (r - n),\n              v = mb[112 + ((t + 4) >> 3)],\n              t = mb[112 + ((t + 3) >> 3)],\n              p = (v + 1) >> 1;\n            k[l - 2 * m] = R[255 + k[l - 2 * m] + p];\n            k[l - m] = R[255 + n + t];\n            k[l + 0] = R[255 + r - v];\n            k[l + m] = R[255 + q - p];\n          }\n        b += d;\n      }\n    }\n    function Ue(a, b, c, d, e, f) {\n      ea(a, b, c, 1, 16, d, e, f);\n    }\n    function Ve(a, b, c, d, e, f) {\n      ea(a, b, 1, c, 16, d, e, f);\n    }\n    function Ye(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4 * c), Fa(a, b, c, 1, 16, d, e, f);\n    }\n    function Ze(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4), Fa(a, b, 1, c, 16, d, e, f);\n    }\n    function We(a, b, c, d, e, f, g, h) {\n      ea(a, b, e, 1, 8, f, g, h);\n      ea(c, d, e, 1, 8, f, g, h);\n    }\n    function Xe(a, b, c, d, e, f, g, h) {\n      ea(a, b, 1, e, 8, f, g, h);\n      ea(c, d, 1, e, 8, f, g, h);\n    }\n    function $e(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4 * e, e, 1, 8, f, g, h);\n      Fa(c, d + 4 * e, e, 1, 8, f, g, h);\n    }\n    function af(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4, 1, e, 8, f, g, h);\n      Fa(c, d + 4, 1, e, 8, f, g, h);\n    }\n    function Cf() {\n      this.ba = new Cb();\n      this.ec = [];\n      this.cc = [];\n      this.Mc = [];\n      this.Dc = this.Nc = this.dc = this.fc = 0;\n      this.Oa = new Ud();\n      this.memory = 0;\n      this.Ib = \"OutputFunc\";\n      this.Jb = \"OutputAlphaFunc\";\n      this.Nd = \"OutputRowFunc\";\n    }\n    function md() {\n      this.data = [];\n      this.offset = this.kd = this.ha = this.w = 0;\n      this.na = [];\n      this.xa = this.gb = this.Ja = this.Sa = this.P = 0;\n    }\n    function Df() {\n      this.nc = this.Ea = this.b = this.hc = 0;\n      this.K = [];\n      this.w = 0;\n    }\n    function Ef() {\n      this.ua = 0;\n      this.Wa = new ac();\n      this.vb = new ac();\n      this.md = this.xc = this.wc = 0;\n      this.vc = [];\n      this.Wb = 0;\n      this.Ya = new Ub();\n      this.yc = new O();\n    }\n    function je() {\n      this.xb = this.a = 0;\n      this.l = new Oa();\n      this.ca = new Cb();\n      this.V = [];\n      this.Ba = 0;\n      this.Ta = [];\n      this.Ua = 0;\n      this.m = new Ra();\n      this.Pb = 0;\n      this.wd = new Ra();\n      this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;\n      this.s = new Ef();\n      this.ab = 0;\n      this.gc = wa(4, Df);\n      this.Oc = 0;\n    }\n    function Ff() {\n      this.Lc = this.Z = this.$a = this.i = this.c = 0;\n      this.l = new Oa();\n      this.ic = 0;\n      this.ca = [];\n      this.tb = 0;\n      this.qd = null;\n      this.rd = 0;\n    }\n    function Rb(a, b, c, d, e, f, g) {\n      a = null == a ? 0 : a[b + 0];\n      for (b = 0; b < g; ++b) (e[f + b] = (a + c[d + b]) & 255), (a = e[f + b]);\n    }\n    function Gf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h;\n        for (h = 0; h < g; ++h) e[f + h] = (a[b + h] + c[d + h]) & 255;\n      }\n    }\n    function Hf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h = a[b + 0],\n          k = h,\n          l = h,\n          m;\n        for (m = 0; m < g; ++m)\n          (h = a[b + m]),\n            (k = l + h - k),\n            (l = (c[d + m] + (k & -256 ? (0 > k ? 0 : 255) : k)) & 255),\n            (k = h),\n            (e[f + m] = l);\n      }\n    }\n    function Le(a, b, c, d) {\n      var e = b.width,\n        f = b.o;\n      x(null != a && null != b);\n      if (0 > c || 0 >= d || c + d > f) return null;\n      if (!a.Cc) {\n        if (null == a.ga) {\n          a.ga = new Ff();\n          var g;\n          (g = null == a.ga) ||\n            ((g = b.width * b.o),\n            x(0 == a.Gb.length),\n            (a.Gb = V(g)),\n            (a.Uc = 0),\n            null == a.Gb\n              ? (g = 0)\n              : ((a.mb = a.Gb), (a.nb = a.Uc), (a.rc = null), (g = 1)),\n            (g = !g));\n          if (!g) {\n            g = a.ga;\n            var h = a.Fa,\n              k = a.P,\n              l = a.qc,\n              m = a.mb,\n              n = a.nb,\n              r = k + 1,\n              q = l - 1,\n              t = g.l;\n            x(null != h && null != m && null != b);\n            ia[0] = null;\n            ia[1] = Rb;\n            ia[2] = Gf;\n            ia[3] = Hf;\n            g.ca = m;\n            g.tb = n;\n            g.c = b.width;\n            g.i = b.height;\n            x(0 < g.c && 0 < g.i);\n            if (1 >= l) b = 0;\n            else if (\n              ((g.$a = (h[k + 0] >> 0) & 3),\n              (g.Z = (h[k + 0] >> 2) & 3),\n              (g.Lc = (h[k + 0] >> 4) & 3),\n              (k = (h[k + 0] >> 6) & 3),\n              0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k)\n            )\n              b = 0;\n            else if (\n              ((t.put = kc),\n              (t.ac = gc),\n              (t.bc = lc),\n              (t.ma = g),\n              (t.width = b.width),\n              (t.height = b.height),\n              (t.Da = b.Da),\n              (t.v = b.v),\n              (t.va = b.va),\n              (t.j = b.j),\n              (t.o = b.o),\n              g.$a)\n            )\n              b: {\n                x(1 == g.$a), (b = Bc());\n                c: for (;;) {\n                  if (null == b) {\n                    b = 0;\n                    break b;\n                  }\n                  x(null != g);\n                  g.mc = b;\n                  b.c = g.c;\n                  b.i = g.i;\n                  b.l = g.l;\n                  b.l.ma = g;\n                  b.l.width = g.c;\n                  b.l.height = g.i;\n                  b.a = 0;\n                  cb(b.m, h, r, q);\n                  if (!rb(g.c, g.i, 1, b, null)) break c;\n                  1 == b.ab && 3 == b.gc[0].hc && yc(b.s)\n                    ? ((g.ic = 1),\n                      (h = b.c * b.i),\n                      (b.Ta = null),\n                      (b.Ua = 0),\n                      (b.V = V(h)),\n                      (b.Ba = 0),\n                      null == b.V ? ((b.a = 1), (b = 0)) : (b = 1))\n                    : ((g.ic = 0), (b = Ec(b, g.c)));\n                  if (!b) break c;\n                  b = 1;\n                  break b;\n                }\n                g.mc = null;\n                b = 0;\n              }\n            else b = q >= g.c * g.i;\n            g = !b;\n          }\n          if (g) return null;\n          1 != a.ga.Lc ? (a.Ga = 0) : (d = f - c);\n        }\n        x(null != a.ga);\n        x(c + d <= f);\n        a: {\n          h = a.ga;\n          b = h.c;\n          f = h.l.o;\n          if (0 == h.$a) {\n            r = a.rc;\n            q = a.Vc;\n            t = a.Fa;\n            k = a.P + 1 + c * b;\n            l = a.mb;\n            m = a.nb + c * b;\n            x(k <= a.P + a.qc);\n            if (0 != h.Z)\n              for (x(null != ia[h.Z]), g = 0; g < d; ++g)\n                ia[h.Z](r, q, t, k, l, m, b),\n                  (r = l),\n                  (q = m),\n                  (m += b),\n                  (k += b);\n            else\n              for (g = 0; g < d; ++g)\n                I(l, m, t, k, b), (r = l), (q = m), (m += b), (k += b);\n            a.rc = r;\n            a.Vc = q;\n          } else {\n            x(null != h.mc);\n            b = c + d;\n            g = h.mc;\n            x(null != g);\n            x(b <= g.i);\n            if (g.C >= b) b = 1;\n            else if ((h.ic || Aa(), h.ic)) {\n              var h = g.V,\n                r = g.Ba,\n                q = g.c,\n                v = g.i,\n                t = 1,\n                k = g.$ / q,\n                l = g.$ % q,\n                m = g.m,\n                n = g.s,\n                p = g.$,\n                u = q * v,\n                w = q * b,\n                y = n.wc,\n                A = p < w ? ha(n, l, k) : null;\n              x(p <= u);\n              x(b <= v);\n              x(yc(n));\n              c: for (;;) {\n                for (; !m.h && p < w; ) {\n                  l & y || (A = ha(n, l, k));\n                  x(null != A);\n                  Sa(m);\n                  v = ua(A.G[0], A.H[0], m);\n                  if (256 > v)\n                    (h[r + p] = v),\n                      ++p,\n                      ++l,\n                      l >= q && ((l = 0), ++k, k <= b && !(k % 16) && Ib(g, k));\n                  else if (280 > v) {\n                    var v = ib(v - 256, m);\n                    var E = ua(A.G[4], A.H[4], m);\n                    Sa(m);\n                    E = ib(E, m);\n                    E = nc(q, E);\n                    if (p >= E && u - p >= v) {\n                      var B;\n                      for (B = 0; B < v; ++B) h[r + p + B] = h[r + p + B - E];\n                    } else {\n                      t = 0;\n                      break c;\n                    }\n                    p += v;\n                    for (l += v; l >= q; )\n                      (l -= q), ++k, k <= b && !(k % 16) && Ib(g, k);\n                    p < w && l & y && (A = ha(n, l, k));\n                  } else {\n                    t = 0;\n                    break c;\n                  }\n                  x(m.h == db(m));\n                }\n                Ib(g, k > b ? b : k);\n                break c;\n              }\n              !t || (m.h && p < u) ? ((t = 0), (g.a = m.h ? 5 : 3)) : (g.$ = p);\n              b = t;\n            } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);\n            if (!b) {\n              d = 0;\n              break a;\n            }\n          }\n          c + d >= f && (a.Cc = 1);\n          d = 1;\n        }\n        if (!d) return null;\n        if (\n          a.Cc &&\n          ((d = a.ga), null != d && (d.mc = null), (a.ga = null), 0 < a.Ga)\n        )\n          return alert(\"todo:WebPDequantizeLevels\"), null;\n      }\n      return a.nb + c * e;\n    }\n    function If(a, b, c, d, e, f) {\n      for (; 0 < e--; ) {\n        var g = a,\n          h = b + (c ? 1 : 0),\n          k = a,\n          l = b + (c ? 0 : 3),\n          m;\n        for (m = 0; m < d; ++m) {\n          var n = k[l + 4 * m];\n          255 != n &&\n            ((n *= 32897),\n            (g[h + 4 * m + 0] = (g[h + 4 * m + 0] * n) >> 23),\n            (g[h + 4 * m + 1] = (g[h + 4 * m + 1] * n) >> 23),\n            (g[h + 4 * m + 2] = (g[h + 4 * m + 2] * n) >> 23));\n        }\n        b += f;\n      }\n    }\n    function Jf(a, b, c, d, e) {\n      for (; 0 < d--; ) {\n        var f;\n        for (f = 0; f < c; ++f) {\n          var g = a[b + 2 * f + 0],\n            h = a[b + 2 * f + 1],\n            k = h & 15,\n            l = 4369 * k,\n            h = (((h & 240) | (h >> 4)) * l) >> 16;\n          a[b + 2 * f + 0] =\n            (((((g & 240) | (g >> 4)) * l) >> 16) & 240) |\n            ((((((g & 15) | (g << 4)) * l) >> 16) >> 4) & 15);\n          a[b + 2 * f + 1] = (h & 240) | k;\n        }\n        b += e;\n      }\n    }\n    function Kf(a, b, c, d, e, f, g, h) {\n      var k = 255,\n        l,\n        m;\n      for (m = 0; m < e; ++m) {\n        for (l = 0; l < d; ++l) {\n          var n = a[b + l];\n          f[g + 4 * l] = n;\n          k &= n;\n        }\n        b += c;\n        g += h;\n      }\n      return 255 != k;\n    }\n    function Lf(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < e; ++f) c[d + f] = a[b + f] >> 8;\n    }\n    function Aa() {\n      za = If;\n      vc = Jf;\n      fc = Kf;\n      Fc = Lf;\n    }\n    function va(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {\n        var d,\n          E = (y - 1) >> 1;\n        var B = h[k + 0] | (l[m + 0] << 16);\n        var C = n[r + 0] | (q[t + 0] << 16);\n        x(null != a);\n        var z = (3 * B + C + 131074) >> 2;\n        b(a[e + 0], z & 255, z >> 16, v, p);\n        null != f &&\n          ((z = (3 * C + B + 131074) >> 2),\n          b(f[g + 0], z & 255, z >> 16, u, w));\n        for (d = 1; d <= E; ++d) {\n          var D = h[k + d] | (l[m + d] << 16);\n          var G = n[r + d] | (q[t + d] << 16);\n          var F = B + D + C + G + 524296;\n          var H = (F + 2 * (D + C)) >> 3;\n          F = (F + 2 * (B + G)) >> 3;\n          z = (H + B) >> 1;\n          B = (F + D) >> 1;\n          b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);\n          b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);\n          null != f &&\n            ((z = (F + C) >> 1),\n            (B = (H + G) >> 1),\n            b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c),\n            b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));\n          B = D;\n          C = G;\n        }\n        y & 1 ||\n          ((z = (3 * B + C + 131074) >> 2),\n          b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c),\n          null != f &&\n            ((z = (3 * C + B + 131074) >> 2),\n            b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));\n      };\n    }\n    function ic() {\n      P[Ca] = Mf;\n      P[Ua] = nd;\n      P[tc] = Nf;\n      P[Va] = od;\n      P[ya] = pd;\n      P[Db] = qd;\n      P[wc] = Of;\n      P[zb] = nd;\n      P[Ab] = od;\n      P[Ja] = pd;\n      P[Bb] = qd;\n    }\n    function Sb(a) {\n      return a & ~Pf ? (0 > a ? 0 : 255) : a >> rd;\n    }\n    function bb(a, b) {\n      return Sb(((19077 * a) >> 8) + ((26149 * b) >> 8) - 14234);\n    }\n    function nb(a, b, c) {\n      return Sb(\n        ((19077 * a) >> 8) - ((6419 * b) >> 8) - ((13320 * c) >> 8) + 8708\n      );\n    }\n    function Pa(a, b) {\n      return Sb(((19077 * a) >> 8) + ((33050 * b) >> 8) - 17685);\n    }\n    function Ga(a, b, c, d, e) {\n      d[e + 0] = bb(a, c);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = Pa(a, b);\n    }\n    function Tb(a, b, c, d, e) {\n      d[e + 0] = Pa(a, b);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = bb(a, c);\n    }\n    function sd(a, b, c, d, e) {\n      var f = nb(a, b, c);\n      b = ((f << 3) & 224) | (Pa(a, b) >> 3);\n      d[e + 0] = (bb(a, c) & 248) | (f >> 5);\n      d[e + 1] = b;\n    }\n    function td(a, b, c, d, e) {\n      var f = (Pa(a, b) & 240) | 15;\n      d[e + 0] = (bb(a, c) & 240) | (nb(a, b, c) >> 4);\n      d[e + 1] = f;\n    }\n    function ud(a, b, c, d, e) {\n      d[e + 0] = 255;\n      Ga(a, b, c, d, e + 1);\n    }\n    function vd(a, b, c, d, e) {\n      Tb(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function wd(a, b, c, d, e) {\n      Ga(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function la(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n) {\n        for (var d = m + (n & -2) * c; m != d; )\n          b(a[e + 0], f[g + 0], h[k + 0], l, m),\n            b(a[e + 1], f[g + 0], h[k + 0], l, m + c),\n            (e += 2),\n            ++g,\n            ++k,\n            (m += 2 * c);\n        n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);\n      };\n    }\n    function xd(a, b, c) {\n      return 0 == c ? (0 == a ? (0 == b ? 6 : 5) : 0 == b ? 4 : 0) : c;\n    }\n    function yd(a, b, c, d, e) {\n      switch (a >>> 30) {\n        case 3:\n          Za(b, c, d, e, 0);\n          break;\n        case 2:\n          fd(b, c, d, e);\n          break;\n        case 1:\n          pa(b, c, d, e);\n      }\n    }\n    function Oc(a, b) {\n      var c,\n        d,\n        e = b.M,\n        f = b.Nb,\n        g = a.oc,\n        h = a.pc + 40,\n        k = a.oc,\n        l = a.pc + 584,\n        m = a.oc,\n        n = a.pc + 600;\n      for (c = 0; 16 > c; ++c) g[h + 32 * c - 1] = 129;\n      for (c = 0; 8 > c; ++c)\n        (k[l + 32 * c - 1] = 129), (m[n + 32 * c - 1] = 129);\n      0 < e\n        ? (g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129)\n        : (M(g, h - 32 - 1, 127, 21),\n          M(k, l - 32 - 1, 127, 9),\n          M(m, n - 32 - 1, 127, 9));\n      for (d = 0; d < a.za; ++d) {\n        var r = b.ya[b.aa + d];\n        if (0 < d) {\n          for (c = -1; 16 > c; ++c) I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);\n          for (c = -1; 8 > c; ++c)\n            I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4),\n              I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);\n        }\n        var q = a.Gd,\n          t = a.Hd + d,\n          v = r.ad,\n          p = r.Hc;\n        0 < e &&\n          (I(g, h - 32, q[t].y, 0, 16),\n          I(k, l - 32, q[t].f, 0, 8),\n          I(m, n - 32, q[t].ea, 0, 8));\n        if (r.Za) {\n          var u = g;\n          var w = h - 32 + 16;\n          0 < e &&\n            (d >= a.za - 1\n              ? M(u, w, q[t].y[15], 4)\n              : I(u, w, q[t + 1].y, 0, 4));\n          for (c = 0; 4 > c; c++)\n            u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];\n          for (c = 0; 16 > c; ++c, p <<= 2)\n            (u = g), (w = h + zd[c]), W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);\n        } else if (((u = xd(d, e, r.Ob[0])), Y[u](g, h), 0 != p))\n          for (c = 0; 16 > c; ++c, p <<= 2) yd(p, v, 16 * +c, g, h + zd[c]);\n        c = r.Gc;\n        u = xd(d, e, r.Dd);\n        ka[u](k, l);\n        ka[u](m, n);\n        r = c >> 0;\n        p = v;\n        u = k;\n        w = l;\n        r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));\n        c >>= 8;\n        r = m;\n        p = n;\n        c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));\n        e < a.Ub - 1 &&\n          (I(q[t].y, 0, g, h + 480, 16),\n          I(q[t].f, 0, k, l + 224, 8),\n          I(q[t].ea, 0, m, n + 224, 8));\n        c = 8 * f * a.B;\n        q = a.sa;\n        t = a.ta + 16 * d + 16 * f * a.R;\n        v = a.qa;\n        r = a.ra + 8 * d + c;\n        p = a.Ha;\n        u = a.Ia + 8 * d + c;\n        for (c = 0; 16 > c; ++c) I(q, t + c * a.R, g, h + 32 * c, 16);\n        for (c = 0; 8 > c; ++c)\n          I(v, r + c * a.B, k, l + 32 * c, 8),\n            I(p, u + c * a.B, m, n + 32 * c, 8);\n      }\n    }\n    function Ad(a, b, c, d, e, f, g, h, k) {\n      var l = [0],\n        m = [0],\n        n = 0,\n        r = null != k ? k.kd : 0,\n        q = null != k ? k : new md();\n      if (null == a || 12 > c) return 7;\n      q.data = a;\n      q.w = b;\n      q.ha = c;\n      b = [b];\n      c = [c];\n      q.gb = [q.gb];\n      a: {\n        var t = b;\n        var v = c;\n        var p = q.gb;\n        x(null != a);\n        x(null != v);\n        x(null != p);\n        p[0] = 0;\n        if (12 <= v[0] && !fa(a, t[0], \"RIFF\")) {\n          if (fa(a, t[0] + 8, \"WEBP\")) {\n            p = 3;\n            break a;\n          }\n          var u = Ha(a, t[0] + 4);\n          if (12 > u || 4294967286 < u) {\n            p = 3;\n            break a;\n          }\n          if (r && u > v[0] - 8) {\n            p = 7;\n            break a;\n          }\n          p[0] = u;\n          t[0] += 12;\n          v[0] -= 12;\n        }\n        p = 0;\n      }\n      if (0 != p) return p;\n      u = 0 < q.gb[0];\n      for (c = c[0]; ; ) {\n        t = [0];\n        n = [n];\n        a: {\n          var w = a;\n          v = b;\n          p = c;\n          var y = n,\n            A = l,\n            z = m,\n            B = t;\n          y[0] = 0;\n          if (8 > p[0]) p = 7;\n          else {\n            if (!fa(w, v[0], \"VP8X\")) {\n              if (10 != Ha(w, v[0] + 4)) {\n                p = 3;\n                break a;\n              }\n              if (18 > p[0]) {\n                p = 7;\n                break a;\n              }\n              var C = Ha(w, v[0] + 8);\n              var D = 1 + Yb(w, v[0] + 12);\n              w = 1 + Yb(w, v[0] + 15);\n              if (2147483648 <= D * w) {\n                p = 3;\n                break a;\n              }\n              null != B && (B[0] = C);\n              null != A && (A[0] = D);\n              null != z && (z[0] = w);\n              v[0] += 18;\n              p[0] -= 18;\n              y[0] = 1;\n            }\n            p = 0;\n          }\n        }\n        n = n[0];\n        t = t[0];\n        if (0 != p) return p;\n        v = !!(t & 2);\n        if (!u && n) return 3;\n        null != f && (f[0] = !!(t & 16));\n        null != g && (g[0] = v);\n        null != h && (h[0] = 0);\n        g = l[0];\n        t = m[0];\n        if (n && v && null == k) {\n          p = 0;\n          break;\n        }\n        if (4 > c) {\n          p = 7;\n          break;\n        }\n        if ((u && n) || (!u && !n && !fa(a, b[0], \"ALPH\"))) {\n          c = [c];\n          q.na = [q.na];\n          q.P = [q.P];\n          q.Sa = [q.Sa];\n          a: {\n            C = a;\n            p = b;\n            u = c;\n            var y = q.gb,\n              A = q.na,\n              z = q.P,\n              B = q.Sa;\n            D = 22;\n            x(null != C);\n            x(null != u);\n            w = p[0];\n            var F = u[0];\n            x(null != A);\n            x(null != B);\n            A[0] = null;\n            z[0] = null;\n            for (B[0] = 0; ; ) {\n              p[0] = w;\n              u[0] = F;\n              if (8 > F) {\n                p = 7;\n                break a;\n              }\n              var G = Ha(C, w + 4);\n              if (4294967286 < G) {\n                p = 3;\n                break a;\n              }\n              var H = (8 + G + 1) & -2;\n              D += H;\n              if (0 < y && D > y) {\n                p = 3;\n                break a;\n              }\n              if (!fa(C, w, \"VP8 \") || !fa(C, w, \"VP8L\")) {\n                p = 0;\n                break a;\n              }\n              if (F[0] < H) {\n                p = 7;\n                break a;\n              }\n              fa(C, w, \"ALPH\") || ((A[0] = C), (z[0] = w + 8), (B[0] = G));\n              w += H;\n              F -= H;\n            }\n          }\n          c = c[0];\n          q.na = q.na[0];\n          q.P = q.P[0];\n          q.Sa = q.Sa[0];\n          if (0 != p) break;\n        }\n        c = [c];\n        q.Ja = [q.Ja];\n        q.xa = [q.xa];\n        a: if (\n          ((y = a),\n          (p = b),\n          (u = c),\n          (A = q.gb[0]),\n          (z = q.Ja),\n          (B = q.xa),\n          (C = p[0]),\n          (w = !fa(y, C, \"VP8 \")),\n          (D = !fa(y, C, \"VP8L\")),\n          x(null != y),\n          x(null != u),\n          x(null != z),\n          x(null != B),\n          8 > u[0])\n        )\n          p = 7;\n        else {\n          if (w || D) {\n            y = Ha(y, C + 4);\n            if (12 <= A && y > A - 12) {\n              p = 3;\n              break a;\n            }\n            if (r && y > u[0] - 8) {\n              p = 7;\n              break a;\n            }\n            z[0] = y;\n            p[0] += 8;\n            u[0] -= 8;\n            B[0] = D;\n          } else\n            (B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5)),\n              (z[0] = u[0]);\n          p = 0;\n        }\n        c = c[0];\n        q.Ja = q.Ja[0];\n        q.xa = q.xa[0];\n        b = b[0];\n        if (0 != p) break;\n        if (4294967286 < q.Ja) return 3;\n        null == h || v || (h[0] = q.xa ? 2 : 1);\n        g = [g];\n        t = [t];\n        if (q.xa) {\n          if (5 > c) {\n            p = 7;\n            break;\n          }\n          h = g;\n          r = t;\n          v = f;\n          null == a || 5 > c\n            ? (a = 0)\n            : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5)\n            ? ((u = [0]),\n              (y = [0]),\n              (A = [0]),\n              (z = new Ra()),\n              cb(z, a, b, c),\n              mc(z, u, y, A)\n                ? (null != h && (h[0] = u[0]),\n                  null != r && (r[0] = y[0]),\n                  null != v && (v[0] = A[0]),\n                  (a = 1))\n                : (a = 0))\n            : (a = 0);\n        } else {\n          if (10 > c) {\n            p = 7;\n            break;\n          }\n          h = t;\n          null == a || 10 > c || !Jc(a, b + 3, c - 3)\n            ? (a = 0)\n            : ((r = a[b + 0] | (a[b + 1] << 8) | (a[b + 2] << 16)),\n              (v = ((a[b + 7] << 8) | a[b + 6]) & 16383),\n              (a = ((a[b + 9] << 8) | a[b + 8]) & 16383),\n              r & 1 ||\n              3 < ((r >> 1) & 7) ||\n              !((r >> 4) & 1) ||\n              r >> 5 >= q.Ja ||\n              !v ||\n              !a\n                ? (a = 0)\n                : (g && (g[0] = v), h && (h[0] = a), (a = 1)));\n        }\n        if (!a) return 3;\n        g = g[0];\n        t = t[0];\n        if (n && (l[0] != g || m[0] != t)) return 3;\n        null != k &&\n          ((k[0] = q),\n          (k.offset = b - k.w),\n          x(4294967286 > b - k.w),\n          x(k.offset == k.ha - c));\n        break;\n      }\n      return 0 == p || (7 == p && n && null == k)\n        ? (null != f && (f[0] |= null != q.na && 0 < q.na.length),\n          null != d && (d[0] = g),\n          null != e && (e[0] = t),\n          0)\n        : p;\n    }\n    function hc(a, b, c) {\n      var d = b.width,\n        e = b.height,\n        f = 0,\n        g = 0,\n        h = d,\n        k = e;\n      b.Da = null != a && 0 < a.Da;\n      if (\n        b.Da &&\n        ((h = a.cd),\n        (k = a.bd),\n        (f = a.v),\n        (g = a.j),\n        11 > c || ((f &= -2), (g &= -2)),\n        0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)\n      )\n        return 0;\n      b.v = f;\n      b.j = g;\n      b.va = f + h;\n      b.o = g + k;\n      b.U = h;\n      b.T = k;\n      b.da = null != a && 0 < a.da;\n      if (b.da) {\n        c = [a.ib];\n        f = [a.hb];\n        if (!bc(h, k, c, f)) return 0;\n        b.ib = c[0];\n        b.hb = f[0];\n      }\n      b.ob = null != a && a.ob;\n      b.Kb = null == a || !a.Sd;\n      b.da && ((b.ob = b.ib < (3 * d) / 4 && b.hb < (3 * e) / 4), (b.Kb = 0));\n      return 1;\n    }\n    function Bd(a) {\n      if (null == a) return 2;\n      if (11 > a.S) {\n        var b = a.f.RGBA;\n        b.fb += (a.height - 1) * b.A;\n        b.A = -b.A;\n      } else\n        (b = a.f.kb),\n          (a = a.height),\n          (b.O += (a - 1) * b.fa),\n          (b.fa = -b.fa),\n          (b.N += ((a - 1) >> 1) * b.Ab),\n          (b.Ab = -b.Ab),\n          (b.W += ((a - 1) >> 1) * b.Db),\n          (b.Db = -b.Db),\n          null != b.F && ((b.J += (a - 1) * b.lb), (b.lb = -b.lb));\n      return 0;\n    }\n    function Cd(a, b, c, d) {\n      if (null == d || 0 >= a || 0 >= b) return 2;\n      if (null != c) {\n        if (c.Da) {\n          var e = c.cd,\n            f = c.bd,\n            g = c.v & -2,\n            h = c.j & -2;\n          if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b)\n            return 2;\n          a = e;\n          b = f;\n        }\n        if (c.da) {\n          e = [c.ib];\n          f = [c.hb];\n          if (!bc(a, b, e, f)) return 2;\n          a = e[0];\n          b = f[0];\n        }\n      }\n      d.width = a;\n      d.height = b;\n      a: {\n        var k = d.width;\n        var l = d.height;\n        a = d.S;\n        if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;\n        else {\n          if (0 >= d.Rd && null == d.sd) {\n            var g = (f = e = b = 0),\n              h = k * Dd[a],\n              m = h * l;\n            11 > a ||\n              ((b = (k + 1) / 2),\n              (f = ((l + 1) / 2) * b),\n              12 == a && ((e = k), (g = e * l)));\n            l = V(m + 2 * f + g);\n            if (null == l) {\n              a = 1;\n              break a;\n            }\n            d.sd = l;\n            11 > a\n              ? ((k = d.f.RGBA),\n                (k.eb = l),\n                (k.fb = 0),\n                (k.A = h),\n                (k.size = m))\n              : ((k = d.f.kb),\n                (k.y = l),\n                (k.O = 0),\n                (k.fa = h),\n                (k.Fd = m),\n                (k.f = l),\n                (k.N = 0 + m),\n                (k.Ab = b),\n                (k.Cd = f),\n                (k.ea = l),\n                (k.W = 0 + m + f),\n                (k.Db = b),\n                (k.Ed = f),\n                12 == a && ((k.F = l), (k.J = 0 + m + 2 * f)),\n                (k.Tc = g),\n                (k.lb = e));\n          }\n          b = 1;\n          e = d.S;\n          f = d.width;\n          g = d.height;\n          if (e >= Ca && 13 > e)\n            if (11 > e)\n              (a = d.f.RGBA),\n                (h = Math.abs(a.A)),\n                (b &= h * (g - 1) + f <= a.size),\n                (b &= h >= f * Dd[e]),\n                (b &= null != a.eb);\n            else {\n              a = d.f.kb;\n              h = (f + 1) / 2;\n              m = (g + 1) / 2;\n              k = Math.abs(a.fa);\n              var l = Math.abs(a.Ab),\n                n = Math.abs(a.Db),\n                r = Math.abs(a.lb),\n                q = r * (g - 1) + f;\n              b &= k * (g - 1) + f <= a.Fd;\n              b &= l * (m - 1) + h <= a.Cd;\n              b &= n * (m - 1) + h <= a.Ed;\n              b = b & (k >= f) & (l >= h) & (n >= h);\n              b &= null != a.y;\n              b &= null != a.f;\n              b &= null != a.ea;\n              12 == e && ((b &= r >= f), (b &= q <= a.Tc), (b &= null != a.F));\n            }\n          else b = 0;\n          a = b ? 0 : 2;\n        }\n      }\n      if (0 != a) return a;\n      null != c && c.fd && (a = Bd(d));\n      return a;\n    }\n    var xb = 64,\n      Hd = [\n        0,\n        1,\n        3,\n        7,\n        15,\n        31,\n        63,\n        127,\n        255,\n        511,\n        1023,\n        2047,\n        4095,\n        8191,\n        16383,\n        32767,\n        65535,\n        131071,\n        262143,\n        524287,\n        1048575,\n        2097151,\n        4194303,\n        8388607,\n        16777215\n      ],\n      Gd = 24,\n      ob = 32,\n      Xb = 8,\n      Id = [\n        0,\n        0,\n        1,\n        1,\n        2,\n        2,\n        2,\n        2,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7\n      ];\n    X(\"Predictor0\", \"PredictorAdd0\");\n    self.Predictor0 = function() {\n      return 4278190080;\n    };\n    self.Predictor1 = function(a) {\n      return a;\n    };\n    self.Predictor2 = function(a, b, c) {\n      return b[c + 0];\n    };\n    self.Predictor3 = function(a, b, c) {\n      return b[c + 1];\n    };\n    self.Predictor4 = function(a, b, c) {\n      return b[c - 1];\n    };\n    self.Predictor5 = function(a, b, c) {\n      return aa(aa(a, b[c + 1]), b[c + 0]);\n    };\n    self.Predictor6 = function(a, b, c) {\n      return aa(a, b[c - 1]);\n    };\n    self.Predictor7 = function(a, b, c) {\n      return aa(a, b[c + 0]);\n    };\n    self.Predictor8 = function(a, b, c) {\n      return aa(b[c - 1], b[c + 0]);\n    };\n    self.Predictor9 = function(a, b, c) {\n      return aa(b[c + 0], b[c + 1]);\n    };\n    self.Predictor10 = function(a, b, c) {\n      return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));\n    };\n    self.Predictor11 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return 0 >=\n        Ia((d >> 24) & 255, (a >> 24) & 255, (b >> 24) & 255) +\n          Ia((d >> 16) & 255, (a >> 16) & 255, (b >> 16) & 255) +\n          Ia((d >> 8) & 255, (a >> 8) & 255, (b >> 8) & 255) +\n          Ia(d & 255, a & 255, b & 255)\n        ? d\n        : a;\n    };\n    self.Predictor12 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return (\n        ((sa(((a >> 24) & 255) + ((d >> 24) & 255) - ((b >> 24) & 255)) << 24) |\n          (sa(((a >> 16) & 255) + ((d >> 16) & 255) - ((b >> 16) & 255)) <<\n            16) |\n          (sa(((a >> 8) & 255) + ((d >> 8) & 255) - ((b >> 8) & 255)) << 8) |\n          sa((a & 255) + (d & 255) - (b & 255))) >>>\n        0\n      );\n    };\n    self.Predictor13 = function(a, b, c) {\n      var d = b[c - 1];\n      a = aa(a, b[c + 0]);\n      return (\n        ((eb((a >> 24) & 255, (d >> 24) & 255) << 24) |\n          (eb((a >> 16) & 255, (d >> 16) & 255) << 16) |\n          (eb((a >> 8) & 255, (d >> 8) & 255) << 8) |\n          eb((a >> 0) & 255, (d >> 0) & 255)) >>>\n        0\n      );\n    };\n    var ee = self.PredictorAdd0;\n    self.PredictorAdd1 = cc;\n    X(\"Predictor2\", \"PredictorAdd2\");\n    X(\"Predictor3\", \"PredictorAdd3\");\n    X(\"Predictor4\", \"PredictorAdd4\");\n    X(\"Predictor5\", \"PredictorAdd5\");\n    X(\"Predictor6\", \"PredictorAdd6\");\n    X(\"Predictor7\", \"PredictorAdd7\");\n    X(\"Predictor8\", \"PredictorAdd8\");\n    X(\"Predictor9\", \"PredictorAdd9\");\n    X(\"Predictor10\", \"PredictorAdd10\");\n    X(\"Predictor11\", \"PredictorAdd11\");\n    X(\"Predictor12\", \"PredictorAdd12\");\n    X(\"Predictor13\", \"PredictorAdd13\");\n    var fe = self.PredictorAdd2;\n    ec(\n      \"ColorIndexInverseTransform\",\n      \"MapARGB\",\n      \"32b\",\n      function(a) {\n        return (a >> 8) & 255;\n      },\n      function(a) {\n        return a;\n      }\n    );\n    ec(\n      \"VP8LColorIndexInverseTransformAlpha\",\n      \"MapAlpha\",\n      \"8b\",\n      function(a) {\n        return a;\n      },\n      function(a) {\n        return (a >> 8) & 255;\n      }\n    );\n    var rc = self.ColorIndexInverseTransform,\n      ke = self.MapARGB,\n      he = self.VP8LColorIndexInverseTransformAlpha,\n      le = self.MapAlpha,\n      pc,\n      qc = (self.VP8LPredictorsAdd = []);\n    qc.length = 16;\n    (self.VP8LPredictors = []).length = 16;\n    (self.VP8LPredictorsAdd_C = []).length = 16;\n    (self.VP8LPredictors_C = []).length = 16;\n    var Fb,\n      sc,\n      Gb,\n      Hb,\n      xc,\n      uc,\n      bd = V(511),\n      cd = V(2041),\n      dd = V(225),\n      ed = V(767),\n      ad = 0,\n      Qb = cd,\n      mb = dd,\n      R = ed,\n      U = bd,\n      Ca = 0,\n      Ua = 1,\n      tc = 2,\n      Va = 3,\n      ya = 4,\n      Db = 5,\n      wc = 6,\n      zb = 7,\n      Ab = 8,\n      Ja = 9,\n      Bb = 10,\n      pe = [2, 3, 7],\n      oe = [3, 3, 11],\n      Dc = [280, 256, 256, 256, 40],\n      qe = [0, 1, 1, 1, 0],\n      ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n      de = [\n        24,\n        7,\n        23,\n        25,\n        40,\n        6,\n        39,\n        41,\n        22,\n        26,\n        38,\n        42,\n        56,\n        5,\n        55,\n        57,\n        21,\n        27,\n        54,\n        58,\n        37,\n        43,\n        72,\n        4,\n        71,\n        73,\n        20,\n        28,\n        53,\n        59,\n        70,\n        74,\n        36,\n        44,\n        88,\n        69,\n        75,\n        52,\n        60,\n        3,\n        87,\n        89,\n        19,\n        29,\n        86,\n        90,\n        35,\n        45,\n        68,\n        76,\n        85,\n        91,\n        51,\n        61,\n        104,\n        2,\n        103,\n        105,\n        18,\n        30,\n        102,\n        106,\n        34,\n        46,\n        84,\n        92,\n        67,\n        77,\n        101,\n        107,\n        50,\n        62,\n        120,\n        1,\n        119,\n        121,\n        83,\n        93,\n        17,\n        31,\n        100,\n        108,\n        66,\n        78,\n        118,\n        122,\n        33,\n        47,\n        117,\n        123,\n        49,\n        63,\n        99,\n        109,\n        82,\n        94,\n        0,\n        116,\n        124,\n        65,\n        79,\n        16,\n        32,\n        98,\n        110,\n        48,\n        115,\n        125,\n        81,\n        95,\n        64,\n        114,\n        126,\n        97,\n        111,\n        80,\n        113,\n        127,\n        96,\n        112\n      ],\n      me = [\n        2954,\n        2956,\n        2958,\n        2962,\n        2970,\n        2986,\n        3018,\n        3082,\n        3212,\n        3468,\n        3980,\n        5004\n      ],\n      ie = 8,\n      Lb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        17,\n        18,\n        19,\n        20,\n        20,\n        21,\n        21,\n        22,\n        22,\n        23,\n        23,\n        24,\n        25,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        59,\n        60,\n        61,\n        62,\n        63,\n        64,\n        65,\n        66,\n        67,\n        68,\n        69,\n        70,\n        71,\n        72,\n        73,\n        74,\n        75,\n        76,\n        76,\n        77,\n        78,\n        79,\n        80,\n        81,\n        82,\n        83,\n        84,\n        85,\n        86,\n        87,\n        88,\n        89,\n        91,\n        93,\n        95,\n        96,\n        98,\n        100,\n        101,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        118,\n        122,\n        124,\n        126,\n        128,\n        130,\n        132,\n        134,\n        136,\n        138,\n        140,\n        143,\n        145,\n        148,\n        151,\n        154,\n        157\n      ],\n      Mb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        18,\n        19,\n        20,\n        21,\n        22,\n        23,\n        24,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        60,\n        62,\n        64,\n        66,\n        68,\n        70,\n        72,\n        74,\n        76,\n        78,\n        80,\n        82,\n        84,\n        86,\n        88,\n        90,\n        92,\n        94,\n        96,\n        98,\n        100,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        119,\n        122,\n        125,\n        128,\n        131,\n        134,\n        137,\n        140,\n        143,\n        146,\n        149,\n        152,\n        155,\n        158,\n        161,\n        164,\n        167,\n        170,\n        173,\n        177,\n        181,\n        185,\n        189,\n        193,\n        197,\n        201,\n        205,\n        209,\n        213,\n        217,\n        221,\n        225,\n        229,\n        234,\n        239,\n        245,\n        249,\n        254,\n        259,\n        264,\n        269,\n        274,\n        279,\n        284\n      ],\n      oa = null,\n      He = [\n        [173, 148, 140, 0],\n        [176, 155, 140, 135, 0],\n        [180, 157, 141, 134, 130, 0],\n        [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]\n      ],\n      Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],\n      Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],\n      Fe = [\n        [\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],\n            [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128],\n            [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],\n            [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],\n            [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]\n          ],\n          [\n            [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],\n            [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],\n            [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],\n            [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],\n            [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128],\n            [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],\n            [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],\n            [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],\n            [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],\n            [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],\n            [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]\n          ],\n          [\n            [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],\n            [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],\n            [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]\n          ],\n          [\n            [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],\n            [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],\n            [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]\n          ],\n          [\n            [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],\n            [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],\n            [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],\n            [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],\n            [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]\n          ],\n          [\n            [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],\n            [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],\n            [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],\n            [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],\n            [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]\n          ],\n          [\n            [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],\n            [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],\n            [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128],\n            [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]\n          ],\n          [\n            [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],\n            [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],\n            [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],\n            [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],\n            [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]\n          ],\n          [\n            [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],\n            [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],\n            [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],\n            [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],\n            [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],\n            [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],\n            [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],\n            [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]\n          ],\n          [\n            [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],\n            [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],\n            [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]\n          ],\n          [\n            [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],\n            [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],\n            [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]\n          ],\n          [\n            [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],\n            [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128],\n            [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]\n          ],\n          [\n            [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],\n            [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],\n            [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]\n          ],\n          [\n            [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],\n            [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],\n            [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],\n            [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],\n            [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ]\n      ],\n      Ke = [\n        [\n          [231, 120, 48, 89, 115, 113, 120, 152, 112],\n          [152, 179, 64, 126, 170, 118, 46, 70, 95],\n          [175, 69, 143, 80, 85, 82, 72, 155, 103],\n          [56, 58, 10, 171, 218, 189, 17, 13, 152],\n          [114, 26, 17, 163, 44, 195, 21, 10, 173],\n          [121, 24, 80, 195, 26, 62, 44, 64, 85],\n          [144, 71, 10, 38, 171, 213, 144, 34, 26],\n          [170, 46, 55, 19, 136, 160, 33, 206, 71],\n          [63, 20, 8, 114, 114, 208, 12, 9, 226],\n          [81, 40, 11, 96, 182, 84, 29, 16, 36]\n        ],\n        [\n          [134, 183, 89, 137, 98, 101, 106, 165, 148],\n          [72, 187, 100, 130, 157, 111, 32, 75, 80],\n          [66, 102, 167, 99, 74, 62, 40, 234, 128],\n          [41, 53, 9, 178, 241, 141, 26, 8, 107],\n          [74, 43, 26, 146, 73, 166, 49, 23, 157],\n          [65, 38, 105, 160, 51, 52, 31, 115, 128],\n          [104, 79, 12, 27, 217, 255, 87, 17, 7],\n          [87, 68, 71, 44, 114, 51, 15, 186, 23],\n          [47, 41, 14, 110, 182, 183, 21, 17, 194],\n          [66, 45, 25, 102, 197, 189, 23, 18, 22]\n        ],\n        [\n          [88, 88, 147, 150, 42, 46, 45, 196, 205],\n          [43, 97, 183, 117, 85, 38, 35, 179, 61],\n          [39, 53, 200, 87, 26, 21, 43, 232, 171],\n          [56, 34, 51, 104, 114, 102, 29, 93, 77],\n          [39, 28, 85, 171, 58, 165, 90, 98, 64],\n          [34, 22, 116, 206, 23, 34, 43, 166, 73],\n          [107, 54, 32, 26, 51, 1, 81, 43, 31],\n          [68, 25, 106, 22, 64, 171, 36, 225, 114],\n          [34, 19, 21, 102, 132, 188, 16, 76, 124],\n          [62, 18, 78, 95, 85, 57, 50, 48, 51]\n        ],\n        [\n          [193, 101, 35, 159, 215, 111, 89, 46, 111],\n          [60, 148, 31, 172, 219, 228, 21, 18, 111],\n          [112, 113, 77, 85, 179, 255, 38, 120, 114],\n          [40, 42, 1, 196, 245, 209, 10, 25, 109],\n          [88, 43, 29, 140, 166, 213, 37, 43, 154],\n          [61, 63, 30, 155, 67, 45, 68, 1, 209],\n          [100, 80, 8, 43, 154, 1, 51, 26, 71],\n          [142, 78, 78, 16, 255, 128, 34, 197, 171],\n          [41, 40, 5, 102, 211, 183, 4, 1, 221],\n          [51, 50, 17, 168, 209, 192, 23, 25, 82]\n        ],\n        [\n          [138, 31, 36, 171, 27, 166, 38, 44, 229],\n          [67, 87, 58, 169, 82, 115, 26, 59, 179],\n          [63, 59, 90, 180, 59, 166, 93, 73, 154],\n          [40, 40, 21, 116, 143, 209, 34, 39, 175],\n          [47, 15, 16, 183, 34, 223, 49, 45, 183],\n          [46, 17, 33, 183, 6, 98, 15, 32, 183],\n          [57, 46, 22, 24, 128, 1, 54, 17, 37],\n          [65, 32, 73, 115, 28, 128, 23, 128, 205],\n          [40, 3, 9, 115, 51, 192, 18, 6, 223],\n          [87, 37, 9, 115, 59, 77, 64, 21, 47]\n        ],\n        [\n          [104, 55, 44, 218, 9, 54, 53, 130, 226],\n          [64, 90, 70, 205, 40, 41, 23, 26, 57],\n          [54, 57, 112, 184, 5, 41, 38, 166, 213],\n          [30, 34, 26, 133, 152, 116, 10, 32, 134],\n          [39, 19, 53, 221, 26, 114, 32, 73, 255],\n          [31, 9, 65, 234, 2, 15, 1, 118, 73],\n          [75, 32, 12, 51, 192, 255, 160, 43, 51],\n          [88, 31, 35, 67, 102, 85, 55, 186, 85],\n          [56, 21, 23, 111, 59, 205, 45, 37, 192],\n          [55, 38, 70, 124, 73, 102, 1, 34, 98]\n        ],\n        [\n          [125, 98, 42, 88, 104, 85, 117, 175, 82],\n          [95, 84, 53, 89, 128, 100, 113, 101, 45],\n          [75, 79, 123, 47, 51, 128, 81, 171, 1],\n          [57, 17, 5, 71, 102, 57, 53, 41, 49],\n          [38, 33, 13, 121, 57, 73, 26, 1, 85],\n          [41, 10, 67, 138, 77, 110, 90, 47, 114],\n          [115, 21, 2, 10, 102, 255, 166, 23, 6],\n          [101, 29, 16, 10, 85, 128, 101, 196, 26],\n          [57, 18, 10, 102, 102, 213, 34, 20, 43],\n          [117, 20, 15, 36, 163, 128, 68, 1, 26]\n        ],\n        [\n          [102, 61, 71, 37, 34, 53, 31, 243, 192],\n          [69, 60, 71, 38, 73, 119, 28, 222, 37],\n          [68, 45, 128, 34, 1, 47, 11, 245, 171],\n          [62, 17, 19, 70, 146, 85, 55, 62, 70],\n          [37, 43, 37, 154, 100, 163, 85, 160, 1],\n          [63, 9, 92, 136, 28, 64, 32, 201, 85],\n          [75, 15, 9, 9, 64, 255, 184, 119, 16],\n          [86, 6, 28, 5, 64, 255, 25, 248, 1],\n          [56, 8, 17, 132, 137, 255, 55, 116, 128],\n          [58, 15, 20, 82, 135, 57, 26, 121, 40]\n        ],\n        [\n          [164, 50, 31, 137, 154, 133, 25, 35, 218],\n          [51, 103, 44, 131, 131, 123, 31, 6, 158],\n          [86, 40, 64, 135, 148, 224, 45, 183, 128],\n          [22, 26, 17, 131, 240, 154, 14, 1, 209],\n          [45, 16, 21, 91, 64, 222, 7, 1, 197],\n          [56, 21, 39, 155, 60, 138, 23, 102, 213],\n          [83, 12, 13, 54, 192, 255, 68, 47, 28],\n          [85, 26, 85, 85, 128, 128, 32, 146, 171],\n          [18, 11, 7, 63, 144, 171, 4, 4, 246],\n          [35, 27, 10, 146, 174, 171, 12, 26, 128]\n        ],\n        [\n          [190, 80, 35, 99, 180, 80, 126, 54, 45],\n          [85, 126, 47, 87, 176, 51, 41, 20, 32],\n          [101, 75, 128, 139, 118, 146, 116, 128, 85],\n          [56, 41, 15, 176, 236, 85, 37, 9, 62],\n          [71, 30, 17, 119, 118, 255, 17, 18, 138],\n          [101, 38, 60, 138, 55, 70, 43, 26, 142],\n          [146, 36, 19, 30, 171, 255, 97, 27, 20],\n          [138, 45, 61, 62, 219, 1, 81, 188, 64],\n          [32, 41, 20, 117, 151, 142, 20, 21, 163],\n          [112, 19, 12, 61, 195, 128, 48, 4, 24]\n        ]\n      ],\n      Ee = [\n        [\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],\n            [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255],\n            [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],\n            [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ]\n      ],\n      Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],\n      Nc,\n      Y = [],\n      W = [],\n      ka = [],\n      Za,\n      fd,\n      Nb,\n      pa,\n      Ob,\n      Xc,\n      Tc,\n      Yc,\n      Uc,\n      Zc,\n      Vc,\n      $c,\n      Wc,\n      Rc,\n      Pc,\n      Sc,\n      Qc,\n      re = 1,\n      Cc = 2,\n      ia = [],\n      za,\n      vc,\n      fc,\n      Fc,\n      P = [];\n    va(\"UpsampleRgbLinePair\", Ga, 3);\n    va(\"UpsampleBgrLinePair\", Tb, 3);\n    va(\"UpsampleRgbaLinePair\", wd, 4);\n    va(\"UpsampleBgraLinePair\", vd, 4);\n    va(\"UpsampleArgbLinePair\", ud, 4);\n    va(\"UpsampleRgba4444LinePair\", td, 2);\n    va(\"UpsampleRgb565LinePair\", sd, 2);\n    var Mf = self.UpsampleRgbLinePair,\n      Nf = self.UpsampleBgrLinePair,\n      nd = self.UpsampleRgbaLinePair,\n      od = self.UpsampleBgraLinePair,\n      pd = self.UpsampleArgbLinePair,\n      qd = self.UpsampleRgba4444LinePair,\n      Of = self.UpsampleRgb565LinePair,\n      Wa = 16,\n      Ba = 1 << (Wa - 1),\n      ta = -227,\n      Eb = 482,\n      rd = 6,\n      Pf = (256 << rd) - 1,\n      jc = 0,\n      Yd = V(256),\n      ae = V(256),\n      $d = V(256),\n      Zd = V(256),\n      be = V(Eb - ta),\n      ce = V(Eb - ta);\n    la(\"YuvToRgbRow\", Ga, 3);\n    la(\"YuvToBgrRow\", Tb, 3);\n    la(\"YuvToRgbaRow\", wd, 4);\n    la(\"YuvToBgraRow\", vd, 4);\n    la(\"YuvToArgbRow\", ud, 4);\n    la(\"YuvToRgba4444Row\", td, 2);\n    la(\"YuvToRgb565Row\", sd, 2);\n    var zd = [\n        0,\n        4,\n        8,\n        12,\n        128,\n        132,\n        136,\n        140,\n        256,\n        260,\n        264,\n        268,\n        384,\n        388,\n        392,\n        396\n      ],\n      Ya = [0, 2, 8],\n      Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],\n      Ne = 1;\n    this.WebPDecodeRGBA = function(a, b, c, d, e) {\n      var f = Ua;\n      var g = new Cf(),\n        h = new Cb();\n      g.ba = h;\n      h.S = f;\n      h.width = [h.width];\n      h.height = [h.height];\n      var k = h.width;\n      var l = h.height,\n        m = new Td();\n      if (null == m || null == a) var n = 2;\n      else\n        x(null != m),\n          (n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null));\n      0 != n\n        ? (k = 0)\n        : (null != k && (k[0] = m.width[0]),\n          null != l && (l[0] = m.height[0]),\n          (k = 1));\n      if (k) {\n        h.width = h.width[0];\n        h.height = h.height[0];\n        null != d && (d[0] = h.width);\n        null != e && (e[0] = h.height);\n        b: {\n          d = new Oa();\n          e = new md();\n          e.data = a;\n          e.w = b;\n          e.ha = c;\n          e.kd = 1;\n          b = [0];\n          x(null != e);\n          a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);\n          (0 == a || 7 == a) && b[0] && (a = 4);\n          b = a;\n          if (0 == b) {\n            x(null != g);\n            d.data = e.data;\n            d.w = e.w + e.offset;\n            d.ha = e.ha - e.offset;\n            d.put = kc;\n            d.ac = gc;\n            d.bc = lc;\n            d.ma = g;\n            if (e.xa) {\n              a = Bc();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              if (te(a, d)) {\n                b = Cd(d.width, d.height, g.Oa, g.ba);\n                if ((d = 0 == b)) {\n                  c: {\n                    d = a;\n                    d: for (;;) {\n                      if (null == d) {\n                        d = 0;\n                        break c;\n                      }\n                      x(null != d.s.yc);\n                      x(null != d.s.Ya);\n                      x(0 < d.s.Wb);\n                      c = d.l;\n                      x(null != c);\n                      e = c.ma;\n                      x(null != e);\n                      if (0 != d.xb) {\n                        d.ca = e.ba;\n                        d.tb = e.tb;\n                        x(null != d.ca);\n                        if (!hc(e.Oa, c, Va)) {\n                          d.a = 2;\n                          break d;\n                        }\n                        if (!Ec(d, c.width)) break d;\n                        if (c.da) break d;\n                        (c.da || hb(d.ca.S)) && Aa();\n                        11 > d.ca.S ||\n                          (alert(\"todo:WebPInitConvertARGBToYUV\"),\n                          null != d.ca.f.kb.F && Aa());\n                        if (\n                          d.Pb &&\n                          0 < d.s.ua &&\n                          null == d.s.vb.X &&\n                          !Zb(d.s.vb, d.s.Wa.Xa)\n                        ) {\n                          d.a = 1;\n                          break d;\n                        }\n                        d.xb = 0;\n                      }\n                      if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;\n                      e.Dc = d.Ma;\n                      d = 1;\n                      break c;\n                    }\n                    x(0 != d.a);\n                    d = 0;\n                  }\n                  d = !d;\n                }\n                d && (b = a.a);\n              } else b = a.a;\n            } else {\n              a = new Ce();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              a.Fa = e.na;\n              a.P = e.P;\n              a.qc = e.Sa;\n              if (Kc(a, d)) {\n                if (((b = Cd(d.width, d.height, g.Oa, g.ba)), 0 == b)) {\n                  a.Aa = 0;\n                  c = g.Oa;\n                  e = a;\n                  x(null != e);\n                  if (null != c) {\n                    k = c.Md;\n                    k = 0 > k ? 0 : 100 < k ? 255 : (255 * k) / 100;\n                    if (0 < k) {\n                      for (l = m = 0; 4 > l; ++l)\n                        (n = e.pb[l]),\n                          12 > n.lc &&\n                            (n.ia = (k * Qf[0 > n.lc ? 0 : n.lc]) >> 3),\n                          (m |= n.ia);\n                      m && (alert(\"todo:VP8InitRandom\"), (e.ia = 1));\n                    }\n                    e.Ga = c.Id;\n                    100 < e.Ga ? (e.Ga = 100) : 0 > e.Ga && (e.Ga = 0);\n                  }\n                  Me(a, d) || (b = a.a);\n                }\n              } else b = a.a;\n            }\n            0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));\n          }\n          g = b;\n        }\n        f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;\n      } else f = null;\n      return f;\n    };\n    var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];\n  };\n  new _WebPDecoder();\n\n  /** @license\n   * Copyright (c) 2017 Dominik Homberger\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nhttps://webpjs.appspot.com\nWebPRiffParser dominikhlbg@gmail.com\n*/\n\n  function memcmp(data, data_off, str, size) {\n    for (var i = 0; i < size; i++)\n      if (data[data_off + i] != str.charCodeAt(i)) return true;\n    return false;\n  }\n\n  function GetTag(data, data_off) {\n    var str = \"\";\n    for (var i = 0; i < 4; i++) str += String.fromCharCode(data[data_off++]);\n    return str;\n  }\n\n  function GetLE16(data, data_off) {\n    return (data[data_off + 0] << 0) | (data[data_off + 1] << 8);\n  }\n\n  function GetLE24(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16)) >>>\n      0\n    );\n  }\n\n  function GetLE32(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16) |\n        (data[data_off + 3] << 24)) >>>\n      0\n    );\n  }\n\n  function WebPRiffParser(src, src_off) {\n    var imagearray = {};\n    var i = 0;\n    var alpha_chunk = false;\n    var alpha_size = 0;\n    var alpha_offset = 0;\n    imagearray[\"frames\"] = [];\n    if (memcmp(src, src_off, \"RIFF\", 4)) return;\n    src_off += 4;\n    var riff_size = GetLE32(src, src_off) + 8;\n    src_off += 8;\n\n    while (src_off < src.length) {\n      var fourcc = GetTag(src, src_off);\n      src_off += 4;\n\n      var payload_size = GetLE32(src, src_off);\n      src_off += 4;\n      var payload_size_padded = payload_size + (payload_size & 1);\n\n      switch (fourcc) {\n        case \"VP8 \":\n        case \"VP8L\":\n          if (typeof imagearray[\"frames\"][i] === \"undefined\")\n            imagearray[\"frames\"][i] = {};\n          var obj = imagearray[\"frames\"][i];\n          var height = [0];\n          var width = [0];\n          obj[\"src_off\"] = alpha_chunk ? alpha_offset : src_off - 8;\n          obj[\"src_size\"] = alpha_size + payload_size + 8;\n          //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);\n          //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};\n          i++;\n          if (alpha_chunk) {\n            alpha_chunk = false;\n            alpha_size = 0;\n            alpha_offset = 0;\n          }\n          break;\n        case \"VP8X\":\n          var obj = (imagearray[\"header\"] = {});\n          var feature_flags = (obj[\"feature_flags\"] = src[src_off]);\n          var src_off_ = src_off + 4;\n          var canvas_width = (obj[\"canvas_width\"] = 1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          var canvas_height = (obj[\"canvas_height\"] =\n            1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          break;\n        case \"ALPH\":\n          alpha_chunk = true;\n          alpha_size = payload_size_padded + 8;\n          alpha_offset = src_off - 8;\n          break;\n\n        case \"ANIM\":\n          var obj = imagearray[\"header\"];\n          var bgcolor = (obj[\"bgcolor\"] = GetLE32(src, src_off));\n          src_off_ = src_off + 4;\n\n          var loop_count = (obj[\"loop_count\"] = GetLE16(src, src_off_));\n          src_off_ += 2;\n          break;\n        case \"ANMF\":\n          var offset_x = 0,\n            offset_y = 0,\n            width = 0,\n            height = 0,\n            duration = 0,\n            blend = 0,\n            dispose = 0,\n            temp = 0;\n          var obj = (imagearray[\"frames\"][i] = {});\n          obj[\"offset_x\"] = offset_x = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"offset_y\"] = offset_y = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"width\"] = width = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"height\"] = height = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"duration\"] = duration = GetLE24(src, src_off);\n          src_off += 3;\n          temp = src[src_off++];\n          obj[\"dispose\"] = dispose = temp & 1;\n          obj[\"blend\"] = blend = (temp >> 1) & 1;\n          break;\n        default:\n      }\n      if (fourcc != \"ANMF\") src_off += payload_size_padded;\n    }\n    return imagearray;\n  }\n\n  var height = [0];\n  var width = [0];\n  var pixels = [];\n  var webpdecoder = new _WebPDecoder();\n\n  var response = imageData;\n  var imagearray = WebPRiffParser(response, 0);\n  imagearray[\"response\"] = response;\n  imagearray[\"rgbaoutput\"] = true;\n  imagearray[\"dataurl\"] = false;\n\n  var header = imagearray[\"header\"] ? imagearray[\"header\"] : null;\n  var frames = imagearray[\"frames\"] ? imagearray[\"frames\"] : null;\n\n  if (header) {\n    header[\"loop_counter\"] = header[\"loop_count\"];\n    height = [header[\"canvas_height\"]];\n    width = [header[\"canvas_width\"]];\n\n    var blend = false;\n    for (var f = 0; f < frames.length; f++)\n      if (frames[f][\"blend\"] == 0) {\n        blend = true;\n        break;\n      }\n  }\n\n  var frame = frames[0];\n  var rgba = webpdecoder.WebPDecodeRGBA(\n    response,\n    frame[\"src_off\"],\n    frame[\"src_size\"],\n    width,\n    height\n  );\n  frame[\"rgba\"] = rgba;\n  frame[\"imgwidth\"] = width[0];\n  frame[\"imgheight\"] = height[0];\n\n  for (var i = 0; i < width[0] * height[0] * 4; i++) {\n    pixels[i] = rgba[i];\n  }\n\n  this.width = width;\n  this.height = height;\n  this.data = pixels;\n  return this;\n}\n\nWebPDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { WebPDecoder };\n","/**\n * @license\n * Copyright (c) 2019 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { WebPDecoder } from \"../libs/WebPDecoder.js\";\n\n/**\n * jsPDF webp Support PlugIn\n *\n * @name webp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processWEBP = function(imageData, index, alias, compression) {\n    var reader = new WebPDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","/**\n * @license\n *\n * Copyright (c) 2021 Antti Palola, https://github.com/Pantura\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF RGBA array PlugIn\n * @name rgba_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name processRGBA\n   * @function\n   *\n   * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].\n   * RGBA array data can be obtained from DOM canvas getImageData.\n   * @ignore\n   */\n  jsPDFAPI.processRGBA = function(imageData, index, alias) {\n    \"use strict\";\n\n    var imagePixels = imageData.data;\n    var length = imagePixels.length;\n    // jsPDF takes alpha data separately so extract that.\n    var rgbOut = new Uint8Array((length / 4) * 3);\n    var alphaOut = new Uint8Array(length / 4);\n    var outIndex = 0;\n    var alphaIndex = 0;\n\n    for (var i = 0; i < length; i += 4) {\n      var r = imagePixels[i];\n      var g = imagePixels[i + 1];\n      var b = imagePixels[i + 2];\n      var alpha = imagePixels[i + 3];\n      rgbOut[outIndex++] = r;\n      rgbOut[outIndex++] = g;\n      rgbOut[outIndex++] = b;\n      alphaOut[alphaIndex++] = alpha;\n    }\n\n    var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);\n    var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);\n\n    return {\n      alpha: alphaData,\n      data: rgbData,\n      index: index,\n      alias: alias,\n      colorSpace: \"DeviceRGB\",\n      bitsPerComponent: 8,\n      width: imageData.width,\n      height: imageData.height\n    };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF setLanguage Plugin\n *\n * @name setLanguage\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Add Language Tag to the generated PDF\n   *\n   * @name setLanguage\n   * @function\n   * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF()\n   * doc.text(10, 10, 'This is a test')\n   * doc.setLanguage(\"en-US\")\n   * doc.save('english.pdf')\n   */\n  jsPDFAPI.setLanguage = function(langCode) {\n    \"use strict\";\n\n    var langCodes = {\n      af: \"Afrikaans\",\n      sq: \"Albanian\",\n      ar: \"Arabic (Standard)\",\n      \"ar-DZ\": \"Arabic (Algeria)\",\n      \"ar-BH\": \"Arabic (Bahrain)\",\n      \"ar-EG\": \"Arabic (Egypt)\",\n      \"ar-IQ\": \"Arabic (Iraq)\",\n      \"ar-JO\": \"Arabic (Jordan)\",\n      \"ar-KW\": \"Arabic (Kuwait)\",\n      \"ar-LB\": \"Arabic (Lebanon)\",\n      \"ar-LY\": \"Arabic (Libya)\",\n      \"ar-MA\": \"Arabic (Morocco)\",\n      \"ar-OM\": \"Arabic (Oman)\",\n      \"ar-QA\": \"Arabic (Qatar)\",\n      \"ar-SA\": \"Arabic (Saudi Arabia)\",\n      \"ar-SY\": \"Arabic (Syria)\",\n      \"ar-TN\": \"Arabic (Tunisia)\",\n      \"ar-AE\": \"Arabic (U.A.E.)\",\n      \"ar-YE\": \"Arabic (Yemen)\",\n      an: \"Aragonese\",\n      hy: \"Armenian\",\n      as: \"Assamese\",\n      ast: \"Asturian\",\n      az: \"Azerbaijani\",\n      eu: \"Basque\",\n      be: \"Belarusian\",\n      bn: \"Bengali\",\n      bs: \"Bosnian\",\n      br: \"Breton\",\n      bg: \"Bulgarian\",\n      my: \"Burmese\",\n      ca: \"Catalan\",\n      ch: \"Chamorro\",\n      ce: \"Chechen\",\n      zh: \"Chinese\",\n      \"zh-HK\": \"Chinese (Hong Kong)\",\n      \"zh-CN\": \"Chinese (PRC)\",\n      \"zh-SG\": \"Chinese (Singapore)\",\n      \"zh-TW\": \"Chinese (Taiwan)\",\n      cv: \"Chuvash\",\n      co: \"Corsican\",\n      cr: \"Cree\",\n      hr: \"Croatian\",\n      cs: \"Czech\",\n      da: \"Danish\",\n      nl: \"Dutch (Standard)\",\n      \"nl-BE\": \"Dutch (Belgian)\",\n      en: \"English\",\n      \"en-AU\": \"English (Australia)\",\n      \"en-BZ\": \"English (Belize)\",\n      \"en-CA\": \"English (Canada)\",\n      \"en-IE\": \"English (Ireland)\",\n      \"en-JM\": \"English (Jamaica)\",\n      \"en-NZ\": \"English (New Zealand)\",\n      \"en-PH\": \"English (Philippines)\",\n      \"en-ZA\": \"English (South Africa)\",\n      \"en-TT\": \"English (Trinidad & Tobago)\",\n      \"en-GB\": \"English (United Kingdom)\",\n      \"en-US\": \"English (United States)\",\n      \"en-ZW\": \"English (Zimbabwe)\",\n      eo: \"Esperanto\",\n      et: \"Estonian\",\n      fo: \"Faeroese\",\n      fj: \"Fijian\",\n      fi: \"Finnish\",\n      fr: \"French (Standard)\",\n      \"fr-BE\": \"French (Belgium)\",\n      \"fr-CA\": \"French (Canada)\",\n      \"fr-FR\": \"French (France)\",\n      \"fr-LU\": \"French (Luxembourg)\",\n      \"fr-MC\": \"French (Monaco)\",\n      \"fr-CH\": \"French (Switzerland)\",\n      fy: \"Frisian\",\n      fur: \"Friulian\",\n      gd: \"Gaelic (Scots)\",\n      \"gd-IE\": \"Gaelic (Irish)\",\n      gl: \"Galacian\",\n      ka: \"Georgian\",\n      de: \"German (Standard)\",\n      \"de-AT\": \"German (Austria)\",\n      \"de-DE\": \"German (Germany)\",\n      \"de-LI\": \"German (Liechtenstein)\",\n      \"de-LU\": \"German (Luxembourg)\",\n      \"de-CH\": \"German (Switzerland)\",\n      el: \"Greek\",\n      gu: \"Gujurati\",\n      ht: \"Haitian\",\n      he: \"Hebrew\",\n      hi: \"Hindi\",\n      hu: \"Hungarian\",\n      is: \"Icelandic\",\n      id: \"Indonesian\",\n      iu: \"Inuktitut\",\n      ga: \"Irish\",\n      it: \"Italian (Standard)\",\n      \"it-CH\": \"Italian (Switzerland)\",\n      ja: \"Japanese\",\n      kn: \"Kannada\",\n      ks: \"Kashmiri\",\n      kk: \"Kazakh\",\n      km: \"Khmer\",\n      ky: \"Kirghiz\",\n      tlh: \"Klingon\",\n      ko: \"Korean\",\n      \"ko-KP\": \"Korean (North Korea)\",\n      \"ko-KR\": \"Korean (South Korea)\",\n      la: \"Latin\",\n      lv: \"Latvian\",\n      lt: \"Lithuanian\",\n      lb: \"Luxembourgish\",\n      mk: \"North Macedonia\",\n      ms: \"Malay\",\n      ml: \"Malayalam\",\n      mt: \"Maltese\",\n      mi: \"Maori\",\n      mr: \"Marathi\",\n      mo: \"Moldavian\",\n      nv: \"Navajo\",\n      ng: \"Ndonga\",\n      ne: \"Nepali\",\n      no: \"Norwegian\",\n      nb: \"Norwegian (Bokmal)\",\n      nn: \"Norwegian (Nynorsk)\",\n      oc: \"Occitan\",\n      or: \"Oriya\",\n      om: \"Oromo\",\n      fa: \"Persian\",\n      \"fa-IR\": \"Persian/Iran\",\n      pl: \"Polish\",\n      pt: \"Portuguese\",\n      \"pt-BR\": \"Portuguese (Brazil)\",\n      pa: \"Punjabi\",\n      \"pa-IN\": \"Punjabi (India)\",\n      \"pa-PK\": \"Punjabi (Pakistan)\",\n      qu: \"Quechua\",\n      rm: \"Rhaeto-Romanic\",\n      ro: \"Romanian\",\n      \"ro-MO\": \"Romanian (Moldavia)\",\n      ru: \"Russian\",\n      \"ru-MO\": \"Russian (Moldavia)\",\n      sz: \"Sami (Lappish)\",\n      sg: \"Sango\",\n      sa: \"Sanskrit\",\n      sc: \"Sardinian\",\n      sd: \"Sindhi\",\n      si: \"Singhalese\",\n      sr: \"Serbian\",\n      sk: \"Slovak\",\n      sl: \"Slovenian\",\n      so: \"Somani\",\n      sb: \"Sorbian\",\n      es: \"Spanish\",\n      \"es-AR\": \"Spanish (Argentina)\",\n      \"es-BO\": \"Spanish (Bolivia)\",\n      \"es-CL\": \"Spanish (Chile)\",\n      \"es-CO\": \"Spanish (Colombia)\",\n      \"es-CR\": \"Spanish (Costa Rica)\",\n      \"es-DO\": \"Spanish (Dominican Republic)\",\n      \"es-EC\": \"Spanish (Ecuador)\",\n      \"es-SV\": \"Spanish (El Salvador)\",\n      \"es-GT\": \"Spanish (Guatemala)\",\n      \"es-HN\": \"Spanish (Honduras)\",\n      \"es-MX\": \"Spanish (Mexico)\",\n      \"es-NI\": \"Spanish (Nicaragua)\",\n      \"es-PA\": \"Spanish (Panama)\",\n      \"es-PY\": \"Spanish (Paraguay)\",\n      \"es-PE\": \"Spanish (Peru)\",\n      \"es-PR\": \"Spanish (Puerto Rico)\",\n      \"es-ES\": \"Spanish (Spain)\",\n      \"es-UY\": \"Spanish (Uruguay)\",\n      \"es-VE\": \"Spanish (Venezuela)\",\n      sx: \"Sutu\",\n      sw: \"Swahili\",\n      sv: \"Swedish\",\n      \"sv-FI\": \"Swedish (Finland)\",\n      \"sv-SV\": \"Swedish (Sweden)\",\n      ta: \"Tamil\",\n      tt: \"Tatar\",\n      te: \"Teluga\",\n      th: \"Thai\",\n      tig: \"Tigre\",\n      ts: \"Tsonga\",\n      tn: \"Tswana\",\n      tr: \"Turkish\",\n      tk: \"Turkmen\",\n      uk: \"Ukrainian\",\n      hsb: \"Upper Sorbian\",\n      ur: \"Urdu\",\n      ve: \"Venda\",\n      vi: \"Vietnamese\",\n      vo: \"Volapuk\",\n      wa: \"Walloon\",\n      cy: \"Welsh\",\n      xh: \"Xhosa\",\n      ji: \"Yiddish\",\n      zu: \"Zulu\"\n    };\n\n    if (this.internal.languageSettings === undefined) {\n      this.internal.languageSettings = {};\n      this.internal.languageSettings.isSubscribed = false;\n    }\n\n    if (langCodes[langCode] !== undefined) {\n      this.internal.languageSettings.languageCode = langCode;\n      if (this.internal.languageSettings.isSubscribed === false) {\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.write(\n            \"/Lang (\" + this.internal.languageSettings.languageCode + \")\"\n          );\n        });\n        this.internal.languageSettings.isSubscribed = true;\n      }\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/** @license\n * MIT license.\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF split_text_to_size plugin\n *\n * @name split_text_to_size\n * @module\n */\n(function(API) {\n  \"use strict\";\n  /**\n   * Returns an array of length matching length of the 'word' string, with each\n   * cell occupied by the width of the char in that position.\n   *\n   * @name getCharWidthsArray\n   * @function\n   * @param {string} text\n   * @param {Object} options\n   * @returns {Array}\n   */\n  var getCharWidthsArray = (API.getCharWidthsArray = function(text, options) {\n    options = options || {};\n\n    var activeFont = options.font || this.internal.getFont();\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n\n    var widths = options.widths\n      ? options.widths\n      : activeFont.metadata.Unicode.widths;\n    var widthsFractionOf = widths.fof ? widths.fof : 1;\n    var kerning = options.kerning\n      ? options.kerning\n      : activeFont.metadata.Unicode.kerning;\n    var kerningFractionOf = kerning.fof ? kerning.fof : 1;\n    var doKerning = options.doKerning === false ? false : true;\n    var kerningValue = 0;\n\n    var i;\n    var length = text.length;\n    var char_code;\n    var prior_char_code = 0; //for kerning\n    var default_char_width = widths[0] || widthsFractionOf;\n    var output = [];\n\n    for (i = 0; i < length; i++) {\n      char_code = text.charCodeAt(i);\n\n      if (typeof activeFont.metadata.widthOfString === \"function\") {\n        output.push(\n          (activeFont.metadata.widthOfGlyph(\n            activeFont.metadata.characterToGlyph(char_code)\n          ) +\n            charSpace * (1000 / fontSize) || 0) / 1000\n        );\n      } else {\n        if (\n          doKerning &&\n          typeof kerning[char_code] === \"object\" &&\n          !isNaN(parseInt(kerning[char_code][prior_char_code], 10))\n        ) {\n          kerningValue =\n            kerning[char_code][prior_char_code] / kerningFractionOf;\n        } else {\n          kerningValue = 0;\n        }\n        output.push(\n          (widths[char_code] || default_char_width) / widthsFractionOf +\n            kerningValue\n        );\n      }\n      prior_char_code = char_code;\n    }\n\n    return output;\n  });\n\n  /**\n   * Returns a widths of string in a given font, if the font size is set as 1 point.\n   *\n   * In other words, this is \"proportional\" value. For 1 unit of font size, the length\n   * of the string will be that much.\n   *\n   * Multiply by font size to get actual width in *points*\n   * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.\n   *\n   * @name getStringUnitWidth\n   * @public\n   * @function\n   * @param {string} text\n   * @param {string} options\n   * @returns {number} result\n   */\n  var getStringUnitWidth = (API.getStringUnitWidth = function(text, options) {\n    options = options || {};\n\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var font = options.font || this.internal.getFont();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n    var result = 0;\n\n    if (API.processArabic) {\n      text = API.processArabic(text);\n    }\n\n    if (typeof font.metadata.widthOfString === \"function\") {\n      result =\n        font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;\n    } else {\n      result = getCharWidthsArray\n        .apply(this, arguments)\n        .reduce(function(pv, cv) {\n          return pv + cv;\n        }, 0);\n    }\n    return result;\n  });\n\n  /**\n  returns array of lines\n  */\n  var splitLongWord = function(word, widths_array, firstLineMaxLen, maxLen) {\n    var answer = [];\n\n    // 1st, chop off the piece that can fit on the hanging line.\n    var i = 0,\n      l = word.length,\n      workingLen = 0;\n    while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {\n      workingLen += widths_array[i];\n      i++;\n    }\n    // this is first line.\n    answer.push(word.slice(0, i));\n\n    // 2nd. Split the rest into maxLen pieces.\n    var startOfLine = i;\n    workingLen = 0;\n    while (i !== l) {\n      if (workingLen + widths_array[i] > maxLen) {\n        answer.push(word.slice(startOfLine, i));\n        workingLen = 0;\n        startOfLine = i;\n      }\n      workingLen += widths_array[i];\n      i++;\n    }\n    if (startOfLine !== i) {\n      answer.push(word.slice(startOfLine, i));\n    }\n\n    return answer;\n  };\n\n  // Note, all sizing inputs for this function must be in \"font measurement units\"\n  // By default, for PDF, it's \"point\".\n  var splitParagraphIntoLines = function(text, maxlen, options) {\n    // at this time works only on Western scripts, ones with space char\n    // separating the words. Feel free to expand.\n\n    if (!options) {\n      options = {};\n    }\n\n    var line = [],\n      lines = [line],\n      line_length = options.textIndent || 0,\n      separator_length = 0,\n      current_word_length = 0,\n      word,\n      widths_array,\n      words = text.split(\" \"),\n      spaceCharWidth = getCharWidthsArray.apply(this, [\" \", options])[0],\n      i,\n      l,\n      tmp,\n      lineIndent;\n\n    if (options.lineIndent === -1) {\n      lineIndent = words[0].length + 2;\n    } else {\n      lineIndent = options.lineIndent || 0;\n    }\n    if (lineIndent) {\n      var pad = Array(lineIndent).join(\" \"),\n        wrds = [];\n      words.map(function(wrd) {\n        wrd = wrd.split(/\\s*\\n/);\n        if (wrd.length > 1) {\n          wrds = wrds.concat(\n            wrd.map(function(wrd, idx) {\n              return (idx && wrd.length ? \"\\n\" : \"\") + wrd;\n            })\n          );\n        } else {\n          wrds.push(wrd[0]);\n        }\n      });\n      words = wrds;\n      lineIndent = getStringUnitWidth.apply(this, [pad, options]);\n    }\n\n    for (i = 0, l = words.length; i < l; i++) {\n      var force = 0;\n\n      word = words[i];\n      if (lineIndent && word[0] == \"\\n\") {\n        word = word.substr(1);\n        force = 1;\n      }\n      widths_array = getCharWidthsArray.apply(this, [word, options]);\n      current_word_length = widths_array.reduce(function(pv, cv) {\n        return pv + cv;\n      }, 0);\n\n      if (\n        line_length + separator_length + current_word_length > maxlen ||\n        force\n      ) {\n        if (current_word_length > maxlen) {\n          // this happens when you have space-less long URLs for example.\n          // we just chop these to size. We do NOT insert hiphens\n          tmp = splitLongWord.apply(this, [\n            word,\n            widths_array,\n            maxlen - (line_length + separator_length),\n            maxlen\n          ]);\n          // first line we add to existing line object\n          line.push(tmp.shift()); // it's ok to have extra space indicator there\n          // last line we make into new line object\n          line = [tmp.pop()];\n          // lines in the middle we apped to lines object as whole lines\n          while (tmp.length) {\n            lines.push([tmp.shift()]); // single fragment occupies whole line\n          }\n          current_word_length = widths_array\n            .slice(word.length - (line[0] ? line[0].length : 0))\n            .reduce(function(pv, cv) {\n              return pv + cv;\n            }, 0);\n        } else {\n          // just put it on a new line\n          line = [word];\n        }\n\n        // now we attach new line to lines\n        lines.push(line);\n        line_length = current_word_length + lineIndent;\n        separator_length = spaceCharWidth;\n      } else {\n        line.push(word);\n\n        line_length += separator_length + current_word_length;\n        separator_length = spaceCharWidth;\n      }\n    }\n\n    var postProcess;\n    if (lineIndent) {\n      postProcess = function(ln, idx) {\n        return (idx ? pad : \"\") + ln.join(\" \");\n      };\n    } else {\n      postProcess = function(ln) {\n        return ln.join(\" \");\n      };\n    }\n\n    return lines.map(postProcess);\n  };\n\n  /**\n   * Splits a given string into an array of strings. Uses 'size' value\n   * (in measurement units declared as default for the jsPDF instance)\n   * and the font's \"widths\" and \"Kerning\" tables, where available, to\n   * determine display length of a given string for a given font.\n   *\n   * We use character's 100% of unit size (height) as width when Width\n   * table or other default width is not available.\n   *\n   * @name splitTextToSize\n   * @public\n   * @function\n   * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.\n   * @param {number} size Nominal number, measured in units default to this instance of jsPDF.\n   * @param {Object} options Optional flags needed for chopper to do the right thing.\n   * @returns {Array} array Array with strings chopped to size.\n   */\n  API.splitTextToSize = function(text, maxlen, options) {\n    \"use strict\";\n\n    options = options || {};\n\n    var fsize = options.fontSize || this.internal.getFontSize(),\n      newOptions = function(options) {\n        var widths = {\n            0: 1\n          },\n          kerning = {};\n\n        if (!options.widths || !options.kerning) {\n          var f = this.internal.getFont(options.fontName, options.fontStyle),\n            encoding = \"Unicode\";\n          // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE\n          // Actual JavaScript-native String's 16bit char codes used.\n          // no multi-byte logic here\n\n          if (f.metadata[encoding]) {\n            return {\n              widths: f.metadata[encoding].widths || widths,\n              kerning: f.metadata[encoding].kerning || kerning\n            };\n          } else {\n            return {\n              font: f.metadata,\n              fontSize: this.internal.getFontSize(),\n              charSpace: this.internal.getCharSpace()\n            };\n          }\n        } else {\n          return {\n            widths: options.widths,\n            kerning: options.kerning\n          };\n        }\n      }.call(this, options);\n\n    // first we split on end-of-line chars\n    var paragraphs;\n    if (Array.isArray(text)) {\n      paragraphs = text;\n    } else {\n      paragraphs = String(text).split(/\\r?\\n/);\n    }\n\n    // now we convert size (max length of line) into \"font size units\"\n    // at present time, the \"font size unit\" is always 'point'\n    // 'proportional' means, \"in proportion to font size\"\n    var fontUnit_maxLen = (1.0 * this.internal.scaleFactor * maxlen) / fsize;\n    // at this time, fsize is always in \"points\" regardless of the default measurement unit of the doc.\n    // this may change in the future?\n    // until then, proportional_maxlen is likely to be in 'points'\n\n    // If first line is to be indented (shorter or longer) than maxLen\n    // we indicate that by using CSS-style \"text-indent\" option.\n    // here it's in font units too (which is likely 'points')\n    // it can be negative (which makes the first line longer than maxLen)\n    newOptions.textIndent = options.textIndent\n      ? (options.textIndent * 1.0 * this.internal.scaleFactor) / fsize\n      : 0;\n    newOptions.lineIndent = options.lineIndent;\n\n    var i,\n      l,\n      output = [];\n    for (i = 0, l = paragraphs.length; i < l; i++) {\n      output = output.concat(\n        splitParagraphIntoLines.apply(this, [\n          paragraphs[i],\n          fontUnit_maxLen,\n          newOptions\n        ])\n      );\n    }\n\n    return output;\n  };\n})(jsPDF.API);\n","/** @license\n jsPDF standard_fonts_metrics plugin\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n * MIT license.\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * This file adds the standard font metrics to jsPDF.\n *\n * Font metrics data is reprocessed derivative of contents of\n * \"Font Metrics for PDF Core 14 Fonts\" package, which exhibits the following copyright and license:\n *\n * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.\n *\n * This file and the 14 PostScript(R) AFM files it accompanies may be used,\n * copied, and distributed for any purpose and without charge, with or without\n * modification, provided that all copyright notices are retained; that the AFM\n * files are not distributed without this file; that all modifications to this\n * file or any of the AFM files are prominently noted in the modified file(s);\n * and that this paragraph is not modified. Adobe Systems has no responsibility\n * or obligation to support the use of the AFM files.\n *\n * @name standard_fonts_metrics\n * @module\n */\n\n(function(API) {\n  \"use strict\";\n  API.__fontmetrics__ = API.__fontmetrics__ || {};\n\n  var decoded = \"0123456789abcdef\",\n    encoded = \"klmnopqrstuvwxyz\",\n    mappingUncompress = {},\n    mappingCompress = {};\n\n  for (var i = 0; i < encoded.length; i++) {\n    mappingUncompress[encoded[i]] = decoded[i];\n    mappingCompress[decoded[i]] = encoded[i];\n  }\n\n  var hex = function(value) {\n    return \"0x\" + parseInt(value, 10).toString(16);\n  };\n\n  var compress = (API.__fontmetrics__.compress = function(data) {\n    var vals = [\"{\"];\n    var value, keystring, valuestring, numberprefix;\n\n    for (var key in data) {\n      value = data[key];\n\n      if (!isNaN(parseInt(key, 10))) {\n        key = parseInt(key, 10);\n        keystring = hex(key).slice(2);\n        keystring =\n          keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];\n      } else {\n        keystring = \"'\" + key + \"'\";\n      }\n\n      if (typeof value == \"number\") {\n        if (value < 0) {\n          valuestring = hex(value).slice(3);\n          numberprefix = \"-\";\n        } else {\n          valuestring = hex(value).slice(2);\n          numberprefix = \"\";\n        }\n        valuestring =\n          numberprefix +\n          valuestring.slice(0, -1) +\n          mappingCompress[valuestring.slice(-1)];\n      } else {\n        if (typeof value === \"object\") {\n          valuestring = compress(value);\n        } else {\n          throw new Error(\n            \"Don't know what to do with value type \" + typeof value + \".\"\n          );\n        }\n      }\n      vals.push(keystring + valuestring);\n    }\n    vals.push(\"}\");\n    return vals.join(\"\");\n  });\n\n  /**\n   * Uncompresses data compressed into custom, base16-like format.\n   *\n   * @public\n   * @function\n   * @param\n   * @returns {Type}\n   */\n  var uncompress = (API.__fontmetrics__.uncompress = function(data) {\n    if (typeof data !== \"string\") {\n      throw new Error(\"Invalid argument passed to uncompress.\");\n    }\n\n    var output = {},\n      sign = 1,\n      stringparts, // undef. will be [] in string mode\n      activeobject = output,\n      parentchain = [],\n      parent_key_pair,\n      keyparts = \"\",\n      valueparts = \"\",\n      key, // undef. will be Truthy when Key is resolved.\n      datalen = data.length - 1, // stripping ending }\n      ch;\n\n    for (var i = 1; i < datalen; i += 1) {\n      // - { } ' are special.\n\n      ch = data[i];\n\n      if (ch == \"'\") {\n        if (stringparts) {\n          // end of string mode\n          key = stringparts.join(\"\");\n          stringparts = undefined;\n        } else {\n          // start of string mode\n          stringparts = [];\n        }\n      } else if (stringparts) {\n        stringparts.push(ch);\n      } else if (ch == \"{\") {\n        // start of object\n        parentchain.push([activeobject, key]);\n        activeobject = {};\n        key = undefined;\n      } else if (ch == \"}\") {\n        // end of object\n        parent_key_pair = parentchain.pop();\n        parent_key_pair[0][parent_key_pair[1]] = activeobject;\n        key = undefined;\n        activeobject = parent_key_pair[0];\n      } else if (ch == \"-\") {\n        sign = -1;\n      } else {\n        // must be number\n        if (key === undefined) {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            keyparts += mappingUncompress[ch];\n            key = parseInt(keyparts, 16) * sign;\n            sign = +1;\n            keyparts = \"\";\n          } else {\n            keyparts += ch;\n          }\n        } else {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            valueparts += mappingUncompress[ch];\n            activeobject[key] = parseInt(valueparts, 16) * sign;\n            sign = +1;\n            key = undefined;\n            valueparts = \"\";\n          } else {\n            valueparts += ch;\n          }\n        }\n      }\n    }\n    return output;\n  });\n\n  // encoding = 'Unicode'\n  // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior\n  // Actual 16bit char codes used.\n  // no multi-byte logic here\n\n  // Unicode characters to WinAnsiEncoding:\n  // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}\n  // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.\n  // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly\n  // as well as give strings with some (supported by these fonts) Unicode characters and\n  // these will be mapped to win cp1252\n  // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting \"Euro\" glyph displayed in both cases.\n\n  var encodingBlock = {\n    codePages: [\"WinAnsiEncoding\"],\n    WinAnsiEncoding: uncompress(\n      \"{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}\"\n    )\n  };\n  var encodings = {\n    Unicode: {\n      Courier: encodingBlock,\n      \"Courier-Bold\": encodingBlock,\n      \"Courier-BoldOblique\": encodingBlock,\n      \"Courier-Oblique\": encodingBlock,\n      Helvetica: encodingBlock,\n      \"Helvetica-Bold\": encodingBlock,\n      \"Helvetica-BoldOblique\": encodingBlock,\n      \"Helvetica-Oblique\": encodingBlock,\n      \"Times-Roman\": encodingBlock,\n      \"Times-Bold\": encodingBlock,\n      \"Times-BoldItalic\": encodingBlock,\n      \"Times-Italic\": encodingBlock\n      //\t, 'Symbol'\n      //\t, 'ZapfDingbats'\n    }\n  };\n\n  var fontMetrics = {\n    Unicode: {\n      // all sizing numbers are n/fontMetricsFractionOf = one font size unit\n      // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's\n      // width is 476/1000 or 47.6% of its height (regardless of font size)\n      // At this time this value applies to \"widths\" and \"kerning\" numbers.\n\n      // char code 0 represents \"default\" (average) width - use it for chars missing in this table.\n      // key 'fof' represents the \"fontMetricsFractionOf\" value\n\n      \"Courier-Oblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-BoldItalic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Courier: uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-BoldOblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Symbol: uncompress(\n        \"{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}\"\n      ),\n      Helvetica: uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-BoldOblique\": uncompress(\n        \"{'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}}}\"\n      ),\n      ZapfDingbats: uncompress(\"{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-Bold\": uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Times-Italic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Times-Roman\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Oblique\": uncompress(\n        \"{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r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o{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}}}\"\n      )\n    }\n  };\n\n  /*\n\tThis event handler is fired when a new jsPDF object is initialized\n\tThis event handler appends metrics data to standard fonts within\n\tthat jsPDF instance. The metrics are mapped over Unicode character\n\tcodes, NOT CIDs or other codes matching the StandardEncoding table of the\n\tstandard PDF fonts.\n\tFuture:\n\tAlso included is the encoding maping table, converting Unicode (UCS-2, UTF-16)\n\tchar codes to StandardEncoding character codes. The encoding table is to be used\n\tsomewhere around \"pdfEscape\" call.\n\t*/\n  API.events.push([\n    \"addFont\",\n    function(data) {\n      var font = data.font;\n\n      var metrics = fontMetrics[\"Unicode\"][font.postScriptName];\n      if (metrics) {\n        font.metadata[\"Unicode\"] = {};\n        font.metadata[\"Unicode\"].widths = metrics.widths;\n        font.metadata[\"Unicode\"].kerning = metrics.kerning;\n      }\n\n      var encodingBlock = encodings[\"Unicode\"][font.postScriptName];\n      if (encodingBlock) {\n        font.metadata[\"Unicode\"].encoding = encodingBlock;\n        font.encoding = encodingBlock.codePages[0];\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob } from \"../libs/AtobBtoa.js\";\n\n/**\n * @name ttfsupport\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n\n  var binaryStringToUint8Array = function(binary_string) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  };\n\n  var addFont = function(font, file) {\n    // eslint-disable-next-line no-control-regex\n    if (/^\\x00\\x01\\x00\\x00/.test(file)) {\n      file = binaryStringToUint8Array(file);\n    } else {\n      file = binaryStringToUint8Array(atob(file));\n    }\n    font.metadata = jsPDF.API.TTFFont.open(file);\n    font.metadata.Unicode = font.metadata.Unicode || {\n      encoding: {},\n      kerning: {},\n      widths: []\n    };\n    font.metadata.glyIdsUsed = [0];\n  };\n\n  jsPDF.API.events.push([\n    \"addFont\",\n    function(data) {\n      var file = undefined;\n      var font = data.font;\n      var instance = data.instance;\n      if (font.isStandardFont) {\n        return;\n      }\n      if (typeof instance !== \"undefined\") {\n        if (instance.existsFileInVFS(font.postScriptName) === false) {\n          file = instance.loadFile(font.postScriptName);\n        } else {\n          file = instance.getFileFromVFS(font.postScriptName);\n        }\n        if (typeof file !== \"string\") {\n          throw new Error(\n            \"Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('\" +\n              font.postScriptName +\n              \"').\"\n          );\n        }\n        addFont(font, file);\n      } else {\n        throw new Error(\n          \"Font does not exist in vFS, import fonts or remove declaration doc.addFont('\" +\n            font.postScriptName +\n            \"').\"\n        );\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF);\n","/** @license\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { console } from \"../libs/console.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF SVG plugin\n *\n * @name svg\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadCanvg() {\n    return (function() {\n      if (globalObject[\"canvg\"]) {\n        return Promise.resolve(globalObject[\"canvg\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"canvg\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"canvg\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load canvg\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load canvg: \" + e));\n      })\n      .then(function(canvg) {\n        return canvg.default ? canvg.default : canvg;\n      });\n  }\n\n  /**\n   * Parses SVG XML and saves it as image into the PDF.\n   *\n   * Depends on canvas-element and canvg\n   *\n   * @name addSvgAsImage\n   * @public\n   * @function\n   * @param {string} SVG-Data as Text\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width of SVG-Image (in units declared at inception of PDF document)\n   * @param {number} height of SVG-Image (in units declared at inception of PDF document)\n   * @param {string} alias of SVG-Image (if used multiple times)\n   * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF jsPDF-instance\n   */\n  jsPDFAPI.addSvgAsImage = function(\n    svg,\n    x,\n    y,\n    w,\n    h,\n    alias,\n    compression,\n    rotation\n  ) {\n    if (isNaN(x) || isNaN(y)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid coordinates\", arguments);\n      throw new Error(\"Invalid coordinates passed to jsPDF.addSvgAsImage\");\n    }\n\n    if (isNaN(w) || isNaN(h)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid measurements\", arguments);\n      throw new Error(\n        \"Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage\"\n      );\n    }\n\n    var canvas = document.createElement(\"canvas\");\n    canvas.width = w;\n    canvas.height = h;\n    var ctx = canvas.getContext(\"2d\");\n    ctx.fillStyle = \"#fff\"; /// set white fill style\n    ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n    var options = {\n      ignoreMouse: true,\n      ignoreAnimation: true,\n      ignoreDimensions: true\n    };\n    var doc = this;\n    return loadCanvg()\n      .then(\n        function(canvg) {\n          return canvg.fromString(ctx, svg, options);\n        },\n        function() {\n          return Promise.reject(new Error(\"Could not load canvg.\"));\n        }\n      )\n      .then(function(instance) {\n        return instance.render(options);\n      })\n      .then(function() {\n        doc.addImage(\n          canvas.toDataURL(\"image/jpeg\", 1.0),\n          x,\n          y,\n          w,\n          h,\n          compression,\n          rotation\n        );\n      });\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF total_pages plugin\n * @name total_pages\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * @name putTotalPages\n   * @function\n   * @param {string} pageExpression Regular Expression\n   * @returns {jsPDF} jsPDF-instance\n   */\n\n  jsPDFAPI.putTotalPages = function(pageExpression) {\n    \"use strict\";\n\n    var replaceExpression;\n    var totalNumberOfPages = 0;\n    if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {\n      replaceExpression = new RegExp(pageExpression, \"g\");\n      totalNumberOfPages = this.internal.getNumberOfPages();\n    } else {\n      replaceExpression = new RegExp(\n        this.pdfEscape16(pageExpression, this.internal.getFont()),\n        \"g\"\n      );\n      totalNumberOfPages = this.pdfEscape16(\n        this.internal.getNumberOfPages() + \"\",\n        this.internal.getFont()\n      );\n    }\n\n    for (var n = 1; n <= this.internal.getNumberOfPages(); n++) {\n      for (var i = 0; i < this.internal.pages[n].length; i++) {\n        this.internal.pages[n][i] = this.internal.pages[n][i].replace(\n          replaceExpression,\n          totalNumberOfPages\n        );\n      }\n    }\n\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF viewerPreferences Plugin\n * @author Aras Abbasi (github.com/arasabbasi)\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Adds the ability to set ViewerPreferences and by thus\n * controlling the way the document is to be presented on the\n * screen or in print.\n * @name viewerpreferences\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * Set the ViewerPreferences of the generated PDF\n   *\n   * @name viewerPreferences\n   * @function\n   * @public\n   * @param {Object} options Array with the ViewerPreferences<br />\n   * Example: doc.viewerPreferences({\"FitWindow\":true});<br />\n   * <br />\n   * You can set following preferences:<br />\n   * <br/>\n   * <b>HideToolbar</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>HideMenubar</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>HideWindowUI</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>FitWindow</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>CenterWindow</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>DisplayDocTitle</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>NonFullScreenPageMode</b> <i>(string)</i><br />\n   * Possible values: UseNone, UseOutlines, UseThumbs, UseOC<br />\n   * Default value: UseNone<br/>\n   * <br />\n   * <b>Direction</b> <i>(string)</i><br />\n   * Possible values: L2R, R2L<br />\n   * Default value: L2R.<br />\n   * <br />\n   * <b>ViewArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>ViewClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>PrintScaling</b> <i>(string)</i><br />\n   * Possible values: AppDefault, None<br />\n   * Default value: AppDefault.<br />\n   * <br />\n   * <b>Duplex</b> <i>(string)</i><br />\n   * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge\n   * Default value: none<br />\n   * <br />\n   * <b>PickTrayByPDFSize</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>PrintPageRange</b> <i>(Array)</i><br />\n   * Example: [[1,5], [7,9]]<br />\n   * Default value: as defined by PDF viewer application<br />\n   * <br />\n   * <b>NumCopies</b> <i>(Number)</i><br />\n   * Possible values: 1, 2, 3, 4, 5<br />\n   * Default value: 1<br />\n   * <br />\n   * For more information see the PDF Reference, sixth edition on Page 577\n   * @param {boolean} doReset True to reset the settings\n   * @function\n   * @returns jsPDF jsPDF-instance\n   * @example\n   * var doc = new jsPDF()\n   * doc.text('This is a test', 10, 10)\n   * doc.viewerPreferences({'FitWindow': true}, true)\n   * doc.save(\"viewerPreferences.pdf\")\n   *\n   * // Example printing 10 copies, using cropbox, and hiding UI.\n   * doc.viewerPreferences({\n   *   'HideWindowUI': true,\n   *   'PrintArea': 'CropBox',\n   *   'NumCopies': 10\n   * })\n   */\n  jsPDFAPI.viewerPreferences = function(options, doReset) {\n    options = options || {};\n    doReset = doReset || false;\n\n    var configuration;\n    var configurationTemplate = {\n      HideToolbar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideMenubar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideWindowUI: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      FitWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      CenterWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      DisplayDocTitle: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.4\n      },\n      NonFullScreenPageMode: {\n        defaultValue: \"UseNone\",\n        value: \"UseNone\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"UseNone\", \"UseOutlines\", \"UseThumbs\", \"UseOC\"],\n        pdfVersion: 1.3\n      },\n      Direction: {\n        defaultValue: \"L2R\",\n        value: \"L2R\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"L2R\", \"R2L\"],\n        pdfVersion: 1.3\n      },\n      ViewArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      ViewClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintScaling: {\n        defaultValue: \"AppDefault\",\n        value: \"AppDefault\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"AppDefault\", \"None\"],\n        pdfVersion: 1.6\n      },\n      Duplex: {\n        defaultValue: \"\",\n        value: \"none\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\n          \"Simplex\",\n          \"DuplexFlipShortEdge\",\n          \"DuplexFlipLongEdge\",\n          \"none\"\n        ],\n        pdfVersion: 1.7\n      },\n      PickTrayByPDFSize: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.7\n      },\n      PrintPageRange: {\n        defaultValue: \"\",\n        value: \"\",\n        type: \"array\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      },\n      NumCopies: {\n        defaultValue: 1,\n        value: 1,\n        type: \"integer\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      }\n    };\n\n    var configurationKeys = Object.keys(configurationTemplate);\n\n    var rangeArray = [];\n    var i = 0;\n    var j = 0;\n    var k = 0;\n    var isValid;\n\n    var method;\n    var value;\n\n    function arrayContainsElement(array, element) {\n      var iterator;\n      var result = false;\n\n      for (iterator = 0; iterator < array.length; iterator += 1) {\n        if (array[iterator] === element) {\n          result = true;\n        }\n      }\n      return result;\n    }\n\n    if (this.internal.viewerpreferences === undefined) {\n      this.internal.viewerpreferences = {};\n      this.internal.viewerpreferences.configuration = JSON.parse(\n        JSON.stringify(configurationTemplate)\n      );\n      this.internal.viewerpreferences.isSubscribed = false;\n    }\n    configuration = this.internal.viewerpreferences.configuration;\n\n    if (options === \"reset\" || doReset === true) {\n      var len = configurationKeys.length;\n\n      for (k = 0; k < len; k += 1) {\n        configuration[configurationKeys[k]].value =\n          configuration[configurationKeys[k]].defaultValue;\n        configuration[configurationKeys[k]].explicitSet = false;\n      }\n    }\n\n    if (typeof options === \"object\") {\n      for (method in options) {\n        value = options[method];\n        if (\n          arrayContainsElement(configurationKeys, method) &&\n          value !== undefined\n        ) {\n          if (\n            configuration[method].type === \"boolean\" &&\n            typeof value === \"boolean\"\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"name\" &&\n            arrayContainsElement(configuration[method].valueSet, value)\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"integer\" &&\n            Number.isInteger(value)\n          ) {\n            configuration[method].value = value;\n          } else if (configuration[method].type === \"array\") {\n            for (i = 0; i < value.length; i += 1) {\n              isValid = true;\n              if (value[i].length === 1 && typeof value[i][0] === \"number\") {\n                rangeArray.push(String(value[i] - 1));\n              } else if (value[i].length > 1) {\n                for (j = 0; j < value[i].length; j += 1) {\n                  if (typeof value[i][j] !== \"number\") {\n                    isValid = false;\n                  }\n                }\n                if (isValid === true) {\n                  rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(\" \"));\n                }\n              }\n            }\n            configuration[method].value = \"[\" + rangeArray.join(\" \") + \"]\";\n          } else {\n            configuration[method].value = configuration[method].defaultValue;\n          }\n\n          configuration[method].explicitSet = true;\n        }\n      }\n    }\n\n    if (this.internal.viewerpreferences.isSubscribed === false) {\n      this.internal.events.subscribe(\"putCatalog\", function() {\n        var pdfDict = [];\n        var vPref;\n        for (vPref in configuration) {\n          if (configuration[vPref].explicitSet === true) {\n            if (configuration[vPref].type === \"name\") {\n              pdfDict.push(\"/\" + vPref + \" /\" + configuration[vPref].value);\n            } else {\n              pdfDict.push(\"/\" + vPref + \" \" + configuration[vPref].value);\n            }\n          }\n        }\n        if (pdfDict.length !== 0) {\n          this.internal.write(\n            \"/ViewerPreferences\\n<<\\n\" + pdfDict.join(\"\\n\") + \"\\n>>\"\n          );\n        }\n      });\n      this.internal.viewerpreferences.isSubscribed = true;\n    }\n\n    this.internal.viewerpreferences.configuration = configuration;\n    return this;\n  };\n})(jsPDF.API);\n","/** ====================================================================\n * @license\n * jsPDF XMP metadata plugin\n * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name xmp_metadata\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var postPutResources = function() {\n    var xmpmeta_beginning = '<x:xmpmeta xmlns:x=\"adobe:ns:meta/\">';\n    var rdf_beginning =\n      '<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\" xmlns:jspdf=\"' +\n      this.internal.__metadata__.namespaceuri +\n      '\"><jspdf:metadata>';\n    var rdf_ending = \"</jspdf:metadata></rdf:Description></rdf:RDF>\";\n    var xmpmeta_ending = \"</x:xmpmeta>\";\n    var utf8_xmpmeta_beginning = unescape(\n      encodeURIComponent(xmpmeta_beginning)\n    );\n    var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));\n    var utf8_metadata = unescape(\n      encodeURIComponent(this.internal.__metadata__.metadata)\n    );\n    var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));\n    var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));\n\n    var total_len =\n      utf8_rdf_beginning.length +\n      utf8_metadata.length +\n      utf8_rdf_ending.length +\n      utf8_xmpmeta_beginning.length +\n      utf8_xmpmeta_ending.length;\n\n    this.internal.__metadata__.metadata_object_number = this.internal.newObject();\n    this.internal.write(\n      \"<< /Type /Metadata /Subtype /XML /Length \" + total_len + \" >>\"\n    );\n    this.internal.write(\"stream\");\n    this.internal.write(\n      utf8_xmpmeta_beginning +\n        utf8_rdf_beginning +\n        utf8_metadata +\n        utf8_rdf_ending +\n        utf8_xmpmeta_ending\n    );\n    this.internal.write(\"endstream\");\n    this.internal.write(\"endobj\");\n  };\n\n  var putCatalog = function() {\n    if (this.internal.__metadata__.metadata_object_number) {\n      this.internal.write(\n        \"/Metadata \" +\n          this.internal.__metadata__.metadata_object_number +\n          \" 0 R\"\n      );\n    }\n  };\n\n  /**\n   * Adds XMP formatted metadata to PDF\n   *\n   * @name addMetadata\n   * @function\n   * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters \"<\", \">\" or \"&\", those characters should be written using XML entities.\n   * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.\n   * @returns {jsPDF} jsPDF-instance\n   */\n  jsPDFAPI.addMetadata = function(metadata, namespaceuri) {\n    if (typeof this.internal.__metadata__ === \"undefined\") {\n      this.internal.__metadata__ = {\n        metadata: metadata,\n        namespaceuri: namespaceuri || \"http://jspdf.default.namespaceuri/\"\n      };\n      this.internal.events.subscribe(\"putCatalog\", putCatalog);\n\n      this.internal.events.subscribe(\"postPutResources\", postPutResources);\n    }\n    return this;\n  };\n})(jsPDF.API);\n","import { jsPDF } from \"../jspdf.js\";\nimport { toPDFName } from \"../libs/pdfname.js\";\n\n/**\n * @name utf8\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n  var jsPDFAPI = jsPDF.API;\n\n  /***************************************************************************************************/\n  /* function : pdfEscape16                                                                          */\n  /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */\n  /*   the corresponding glyph id and width, and then adding padding to the string.                  */\n  /***************************************************************************************************/\n  var pdfEscape16 = (jsPDFAPI.pdfEscape16 = function(text, font) {\n    var widths = font.metadata.Unicode.widths;\n    var padz = [\"\", \"0\", \"00\", \"000\", \"0000\"];\n    var ar = [\"\"];\n    for (var i = 0, l = text.length, t; i < l; ++i) {\n      t = font.metadata.characterToGlyph(text.charCodeAt(i));\n      font.metadata.glyIdsUsed.push(t);\n      font.metadata.toUnicode[t] = text.charCodeAt(i);\n      if (widths.indexOf(t) == -1) {\n        widths.push(t);\n        widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);\n      }\n      if (t == \"0\") {\n        //Spaces are not allowed in cmap.\n        return ar.join(\"\");\n      } else {\n        t = t.toString(16);\n        ar.push(padz[4 - t.length], t);\n      }\n    }\n    return ar.join(\"\");\n  });\n\n  var toUnicodeCmap = function(map) {\n    var code, codes, range, unicode, unicodeMap, _i, _len;\n    unicodeMap =\n      \"/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    codes = Object.keys(map).sort(function(a, b) {\n      return a - b;\n    });\n\n    range = [];\n    for (_i = 0, _len = codes.length; _i < _len; _i++) {\n      code = codes[_i];\n      if (range.length >= 100) {\n        unicodeMap +=\n          \"\\n\" +\n          range.length +\n          \" beginbfchar\\n\" +\n          range.join(\"\\n\") +\n          \"\\nendbfchar\";\n        range = [];\n      }\n\n      if (\n        map[code] !== undefined &&\n        map[code] !== null &&\n        typeof map[code].toString === \"function\"\n      ) {\n        unicode = (\"0000\" + map[code].toString(16)).slice(-4);\n        code = (\"0000\" + (+code).toString(16)).slice(-4);\n        range.push(\"<\" + code + \"><\" + unicode + \">\");\n      }\n    }\n\n    if (range.length) {\n      unicodeMap +=\n        \"\\n\" +\n        range.length +\n        \" beginbfchar\\n\" +\n        range.join(\"\\n\") +\n        \"\\nendbfchar\\n\";\n    }\n    unicodeMap +=\n      \"endcmap\\nCMapName currentdict /CMap defineresource pop\\nend\\nend\";\n    return unicodeMap;\n  };\n\n  var identityHFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"Identity-H\"\n    ) {\n      //Tag with Identity-H\n      var widths = font.metadata.Unicode.widths;\n      var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/Flags \" + font.metadata.flags);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\">>\");\n      out(\"endobj\");\n\n      var DescendantFont = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/FontDescriptor \" + fontDescriptor + \" 0 R\");\n      out(\"/W \" + jsPDF.API.PDFObject.convert(widths));\n      out(\"/CIDToGIDMap /Identity\");\n      out(\"/DW 1000\");\n      out(\"/Subtype /CIDFontType2\");\n      out(\"/CIDSystemInfo\");\n      out(\"<<\");\n      out(\"/Supplement 0\");\n      out(\"/Registry (Adobe)\");\n      out(\"/Ordering (\" + font.encoding + \")\");\n      out(\">>\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.objectNumber = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/Subtype /Type0\");\n      out(\"/ToUnicode \" + cmap + \" 0 R\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/Encoding /\" + font.encoding);\n      out(\"/DescendantFonts [\" + DescendantFont + \" 0 R]\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      identityHFunction(args);\n    }\n  ]);\n\n  var winAnsiEncodingFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"WinAnsiEncoding\"\n    ) {\n      //Tag with WinAnsi encoding\n      var data = font.metadata.rawData;\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/Flags 96\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\">>\");\n      out(\"endobj\");\n      font.objectNumber = newObject();\n      for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {\n        font.metadata.hmtx.widths[j] = parseInt(\n          font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)\n        ); //Change the width of Em units to Point units.\n      }\n      out(\n        \"<</Subtype/TrueType/Type/Font/ToUnicode \" +\n          cmap +\n          \" 0 R/BaseFont/\" +\n          toPDFName(font.fontName) +\n          \"/FontDescriptor \" +\n          fontDescriptor +\n          \" 0 R\" +\n          \"/Encoding/\" +\n          font.encoding +\n          \" /FirstChar 29 /LastChar 255 /Widths \" +\n          jsPDF.API.PDFObject.convert(font.metadata.hmtx.widths) +\n          \">>\"\n      );\n      out(\"endobj\");\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      winAnsiEncodingFunction(args);\n    }\n  ]);\n\n  var utf8TextFunction = function(args) {\n    var text = args.text || \"\";\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n\n    var pdfEscape = mutex.pdfEscape;\n    var activeFontKey = mutex.activeFontKey;\n    var fonts = mutex.fonts;\n    var key = activeFontKey;\n\n    var str = \"\",\n      s = 0,\n      cmapConfirm;\n    var strText = \"\";\n    var encoding = fonts[key].encoding;\n\n    if (fonts[key].encoding !== \"Identity-H\") {\n      return {\n        text: text,\n        x: x,\n        y: y,\n        options: options,\n        mutex: mutex\n      };\n    }\n    strText = text;\n\n    key = activeFontKey;\n    if (Array.isArray(text)) {\n      strText = text[0];\n    }\n    for (s = 0; s < strText.length; s += 1) {\n      if (fonts[key].metadata.hasOwnProperty(\"cmap\")) {\n        cmapConfirm =\n          fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];\n        /*\n             if (Object.prototype.toString.call(text) === '[object Array]') {\n                var i = 0;\n               // for (i = 0; i < text.length; i += 1) {\n                    if (Object.prototype.toString.call(text[s]) === '[object Array]') {\n                        cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n                    } else {\n\n                    }\n                //}\n\n            } else {\n                cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n            }*/\n      }\n      if (!cmapConfirm) {\n        if (\n          strText[s].charCodeAt(0) < 256 &&\n          fonts[key].metadata.hasOwnProperty(\"Unicode\")\n        ) {\n          str += strText[s];\n        } else {\n          str += \"\";\n        }\n      } else {\n        str += strText[s];\n      }\n    }\n    var result = \"\";\n    if (parseInt(key.slice(1)) < 14 || encoding === \"WinAnsiEncoding\") {\n      //For the default 13 font\n      result = pdfEscape(str, key)\n        .split(\"\")\n        .map(function(cv) {\n          return cv.charCodeAt(0).toString(16);\n        })\n        .join(\"\");\n    } else if (encoding === \"Identity-H\") {\n      result = pdfEscape16(str, fonts[key]);\n    }\n    mutex.isHex = true;\n\n    return {\n      text: result,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n  };\n\n  var utf8EscapeFunction = function(parms) {\n    var text = parms.text || \"\",\n      x = parms.x,\n      y = parms.y,\n      options = parms.options,\n      mutex = parms.mutex;\n    var tmpText = [];\n    var args = {\n      text: text,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          if (text[i].length === 3) {\n            tmpText.push([\n              utf8TextFunction(Object.assign({}, args, { text: text[i][0] }))\n                .text,\n              text[i][1],\n              text[i][2]\n            ]);\n          } else {\n            tmpText.push(\n              utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n            );\n          }\n        } else {\n          tmpText.push(\n            utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n          );\n        }\n      }\n      parms.text = tmpText;\n    } else {\n      parms.text = utf8TextFunction(\n        Object.assign({}, args, { text: text })\n      ).text;\n    }\n  };\n\n  jsPDFAPI.events.push([\"postProcessText\", utf8EscapeFunction]);\n})(jsPDF);\n","/**\n * @license\n * jsPDF virtual FileSystem functionality\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Use the vFS to handle files\n *\n * @name vFS\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var _initializeVFS = function() {\n    if (typeof this.internal.vFS === \"undefined\") {\n      this.internal.vFS = {};\n    }\n    return true;\n  };\n\n  /**\n   * Check if the file exists in the vFS\n   *\n   * @name existsFileInVFS\n   * @function\n   * @param {string} Possible filename in the vFS.\n   * @returns {boolean}\n   * @example\n   * doc.existsFileInVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.existsFileInVFS = function(filename) {\n    _initializeVFS.call(this);\n    return typeof this.internal.vFS[filename] !== \"undefined\";\n  };\n\n  /**\n   * Add a file to the vFS\n   *\n   * @name addFileToVFS\n   * @function\n   * @param {string} filename The name of the file which should be added.\n   * @param {string} filecontent The content of the file.\n   * @returns {jsPDF}\n   * @example\n   * doc.addFileToVFS(\"someFile.txt\", \"BADFACE1\");\n   */\n  jsPDFAPI.addFileToVFS = function(filename, filecontent) {\n    _initializeVFS.call(this);\n    this.internal.vFS[filename] = filecontent;\n    return this;\n  };\n\n  /**\n   * Get the file from the vFS\n   *\n   * @name getFileFromVFS\n   * @function\n   * @param {string} The name of the file which gets requested.\n   * @returns {string}\n   * @example\n   * doc.getFileFromVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.getFileFromVFS = function(filename) {\n    _initializeVFS.call(this);\n\n    if (typeof this.internal.vFS[filename] !== \"undefined\") {\n      return this.internal.vFS[filename];\n    }\n    return null;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)\n * MIT License\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDF) {\n  \"use strict\";\n  /**\n   * Table of Unicode types.\n   *\n   * Generated by:\n   *\n   * var bidi = require(\"./bidi/index\");\n   * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).\n   * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).\n   * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));\n   *\n   * for( var i = 0; i < bidi_accumulate.length; i++) {\n   * \tif(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')\n   * \t\tbidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined\n   * }\n   * var bidiAccumulateStr = 'return [ \"' + bidi_accumulate.toString().replace(/,/g, '\", \"') + '\" ];';\n   * require(\"fs\").writeFile('unicode-types.js', bidiAccumulateStr);\n   *\n   * Based on:\n   * https://github.com/mathiasbynens/unicode-8.0.0\n   */\n  var bidiUnicodeTypes = [\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"S\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"B\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"CS\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"EN\",\n    \"EN\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"ET\",\n    \"ET\",\n    \"AL\",\n    \"CS\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"ET\",\n    \"AN\",\n    \"AN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\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    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"L\",\n    \"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\",\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\",\n    \"B\",\n    \"LRE\",\n    \"RLE\",\n    \"PDF\",\n    \"LRO\",\n    \"RLO\",\n    \"CS\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"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\",\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    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"N\",\n    \"LRI\",\n    \"RLI\",\n    \"FSI\",\n    \"PDI\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"ES\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\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\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\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\",\n    \"CS\",\n    \"N\",\n    \"CS\",\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    \"ET\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"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    \"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   * Unicode Bidi algorithm compliant Bidi engine.\n   * For reference see http://unicode.org/reports/tr9/\n   */\n\n  /**\n   * constructor ( options )\n   *\n   * Initializes Bidi engine\n   *\n   * @param {Object} See 'setOptions' below for detailed description.\n   * options are cashed between invocation of 'doBidiReorder' method\n   *\n   * sample usage pattern of BidiEngine:\n   * var opt = {\n   * \tisInputVisual: true,\n   * \tisInputRtl: false,\n   * \tisOutputVisual: false,\n   * \tisOutputRtl: false,\n   * \tisSymmetricSwapping: true\n   * }\n   * var sourceToTarget = [], levels = [];\n   * var bidiEng = Globalize.bidiEngine(opt);\n   * var src = \"text string to be reordered\";\n   * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);\n   */\n\n  jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function(options) {\n    var _UNICODE_TYPES = _bidiUnicodeTypes;\n\n    var _STATE_TABLE_LTR = [\n      [0, 3, 0, 1, 0, 0, 0],\n      [0, 3, 0, 1, 2, 2, 0],\n      [0, 3, 0, 0x11, 2, 0, 1],\n      [0, 3, 5, 5, 4, 1, 0],\n      [0, 3, 0x15, 0x15, 4, 0, 1],\n      [0, 3, 5, 5, 4, 2, 0]\n    ];\n\n    var _STATE_TABLE_RTL = [\n      [2, 0, 1, 1, 0, 1, 0],\n      [2, 0, 1, 1, 0, 2, 0],\n      [2, 0, 2, 1, 3, 2, 0],\n      [2, 0, 2, 0x21, 3, 1, 1]\n    ];\n\n    var _TYPE_NAMES_MAP = { L: 0, R: 1, EN: 2, AN: 3, N: 4, B: 5, S: 6 };\n\n    var _UNICODE_RANGES_MAP = {\n      0: 0,\n      5: 1,\n      6: 2,\n      7: 3,\n      0x20: 4,\n      0xfb: 5,\n      0xfe: 6,\n      0xff: 7\n    };\n\n    var _SWAP_TABLE = [\n      \"\\u0028\",\n      \"\\u0029\",\n      \"\\u0028\",\n      \"\\u003C\",\n      \"\\u003E\",\n      \"\\u003C\",\n      \"\\u005B\",\n      \"\\u005D\",\n      \"\\u005B\",\n      \"\\u007B\",\n      \"\\u007D\",\n      \"\\u007B\",\n      \"\\u00AB\",\n      \"\\u00BB\",\n      \"\\u00AB\",\n      \"\\u2039\",\n      \"\\u203A\",\n      \"\\u2039\",\n      \"\\u2045\",\n      \"\\u2046\",\n      \"\\u2045\",\n      \"\\u207D\",\n      \"\\u207E\",\n      \"\\u207D\",\n      \"\\u208D\",\n      \"\\u208E\",\n      \"\\u208D\",\n      \"\\u2264\",\n      \"\\u2265\",\n      \"\\u2264\",\n      \"\\u2329\",\n      \"\\u232A\",\n      \"\\u2329\",\n      \"\\uFE59\",\n      \"\\uFE5A\",\n      \"\\uFE59\",\n      \"\\uFE5B\",\n      \"\\uFE5C\",\n      \"\\uFE5B\",\n      \"\\uFE5D\",\n      \"\\uFE5E\",\n      \"\\uFE5D\",\n      \"\\uFE64\",\n      \"\\uFE65\",\n      \"\\uFE64\"\n    ];\n\n    var _LTR_RANGES_REG_EXPR = new RegExp(\n      /^([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)$/\n    );\n\n    var _lastArabic = false,\n      _hasUbatAl,\n      _hasUbatB,\n      _hasUbatS,\n      DIR_LTR = 0,\n      DIR_RTL = 1,\n      _isInVisual,\n      _isInRtl,\n      _isOutVisual,\n      _isOutRtl,\n      _isSymmetricSwapping,\n      _dir = DIR_LTR;\n\n    this.__bidiEngine__ = {};\n\n    var _init = function(text, sourceToTargetMap) {\n      if (sourceToTargetMap) {\n        for (var i = 0; i < text.length; i++) {\n          sourceToTargetMap[i] = i;\n        }\n      }\n      if (_isInRtl === undefined) {\n        _isInRtl = _isContextualDirRtl(text);\n      }\n      if (_isOutRtl === undefined) {\n        _isOutRtl = _isContextualDirRtl(text);\n      }\n    };\n\n    // for reference see 3.2 in http://unicode.org/reports/tr9/\n    //\n    var _getCharType = function(ch) {\n      var charCode = ch.charCodeAt(),\n        range = charCode >> 8,\n        rangeIdx = _UNICODE_RANGES_MAP[range];\n\n      if (rangeIdx !== undefined) {\n        return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];\n      } else if (range === 0xfc || range === 0xfd) {\n        return \"AL\";\n      } else if (_LTR_RANGES_REG_EXPR.test(range)) {\n        //unlikely case\n        return \"L\";\n      } else if (range === 8) {\n        // even less likely\n        return \"R\";\n      }\n      return \"N\"; //undefined type, mark as neutral\n    };\n\n    var _isContextualDirRtl = function(text) {\n      for (var i = 0, charType; i < text.length; i++) {\n        charType = _getCharType(text.charAt(i));\n        if (charType === \"L\") {\n          return false;\n        } else if (charType === \"R\") {\n          return true;\n        }\n      }\n      return false;\n    };\n\n    // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/\n    //\n    var _resolveCharType = function(chars, types, resolvedTypes, index) {\n      var cType = types[index],\n        wType,\n        nType,\n        i,\n        len;\n      switch (cType) {\n        case \"L\":\n        case \"R\":\n          _lastArabic = false;\n          break;\n        case \"N\":\n        case \"AN\":\n          break;\n\n        case \"EN\":\n          if (_lastArabic) {\n            cType = \"AN\";\n          }\n          break;\n\n        case \"AL\":\n          _lastArabic = true;\n          _hasUbatAl = true;\n          cType = \"R\";\n          break;\n\n        case \"WS\":\n          cType = \"N\";\n          break;\n\n        case \"CS\":\n          if (\n            index < 1 ||\n            index + 1 >= types.length ||\n            ((wType = resolvedTypes[index - 1]) !== \"EN\" && wType !== \"AN\") ||\n            ((nType = types[index + 1]) !== \"EN\" && nType !== \"AN\")\n          ) {\n            cType = \"N\";\n          } else if (_lastArabic) {\n            nType = \"AN\";\n          }\n          cType = nType === wType ? nType : \"N\";\n          break;\n\n        case \"ES\":\n          wType = index > 0 ? resolvedTypes[index - 1] : \"B\";\n          cType =\n            wType === \"EN\" &&\n            index + 1 < types.length &&\n            types[index + 1] === \"EN\"\n              ? \"EN\"\n              : \"N\";\n          break;\n\n        case \"ET\":\n          if (index > 0 && resolvedTypes[index - 1] === \"EN\") {\n            cType = \"EN\";\n            break;\n          } else if (_lastArabic) {\n            cType = \"N\";\n            break;\n          }\n          i = index + 1;\n          len = types.length;\n          while (i < len && types[i] === \"ET\") {\n            i++;\n          }\n          if (i < len && types[i] === \"EN\") {\n            cType = \"EN\";\n          } else {\n            cType = \"N\";\n          }\n          break;\n\n        case \"NSM\":\n          if (_isInVisual && !_isInRtl) {\n            //V->L\n            len = types.length;\n            i = index + 1;\n            while (i < len && types[i] === \"NSM\") {\n              i++;\n            }\n            if (i < len) {\n              var c = chars[index];\n              var rtlCandidate = (c >= 0x0591 && c <= 0x08ff) || c === 0xfb1e;\n              wType = types[i];\n              if (rtlCandidate && (wType === \"R\" || wType === \"AL\")) {\n                cType = \"R\";\n                break;\n              }\n            }\n          }\n          if (index < 1 || (wType = types[index - 1]) === \"B\") {\n            cType = \"N\";\n          } else {\n            cType = resolvedTypes[index - 1];\n          }\n          break;\n\n        case \"B\":\n          _lastArabic = false;\n          _hasUbatB = true;\n          cType = _dir;\n          break;\n\n        case \"S\":\n          _hasUbatS = true;\n          cType = \"N\";\n          break;\n\n        case \"LRE\":\n        case \"RLE\":\n        case \"LRO\":\n        case \"RLO\":\n        case \"PDF\":\n          _lastArabic = false;\n          break;\n        case \"BN\":\n          cType = \"N\";\n          break;\n      }\n      return cType;\n    };\n\n    var _handleUbatS = function(types, levels, length) {\n      for (var i = 0; i < length; i++) {\n        if (types[i] === \"S\") {\n          levels[i] = _dir;\n          for (var j = i - 1; j >= 0; j--) {\n            if (types[j] === \"WS\") {\n              levels[j] = _dir;\n            } else {\n              break;\n            }\n          }\n        }\n      }\n    };\n\n    var _invertString = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\");\n      if (levels) {\n        _computeLevels(charArray, levels, { hiLevel: _dir });\n      }\n      charArray.reverse();\n      sourceToTargetMap && sourceToTargetMap.reverse();\n      return charArray.join(\"\");\n    };\n\n    // For reference see 3.3 in http://unicode.org/reports/tr9/\n    //\n    var _computeLevels = function(chars, levels, params) {\n      var action,\n        condition,\n        i,\n        index,\n        newLevel,\n        prevState,\n        condPos = -1,\n        len = chars.length,\n        newState = 0,\n        resolvedTypes = [],\n        stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,\n        types = [];\n\n      _lastArabic = false;\n      _hasUbatAl = false;\n      _hasUbatB = false;\n      _hasUbatS = false;\n      for (i = 0; i < len; i++) {\n        types[i] = _getCharType(chars[i]);\n      }\n      for (index = 0; index < len; index++) {\n        prevState = newState;\n        resolvedTypes[index] = _resolveCharType(\n          chars,\n          types,\n          resolvedTypes,\n          index\n        );\n        newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];\n        action = newState & 0xf0;\n        newState &= 0x0f;\n        levels[index] = newLevel = stateTable[newState][5];\n        if (action > 0) {\n          if (action === 0x10) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = 1;\n            }\n            condPos = -1;\n          } else {\n            condPos = -1;\n          }\n        }\n        condition = stateTable[newState][6];\n        if (condition) {\n          if (condPos === -1) {\n            condPos = index;\n          }\n        } else {\n          if (condPos > -1) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = newLevel;\n            }\n            condPos = -1;\n          }\n        }\n        if (types[index] === \"B\") {\n          levels[index] = 0;\n        }\n        params.hiLevel |= newLevel;\n      }\n      if (_hasUbatS) {\n        _handleUbatS(types, levels, len);\n      }\n    };\n\n    // for reference see 3.4 in http://unicode.org/reports/tr9/\n    //\n    var _invertByLevel = function(\n      level,\n      charArray,\n      sourceToTargetMap,\n      levels,\n      params\n    ) {\n      if (params.hiLevel < level) {\n        return;\n      }\n      if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {\n        charArray.reverse();\n        sourceToTargetMap && sourceToTargetMap.reverse();\n        return;\n      }\n      var ch,\n        high,\n        end,\n        low,\n        len = charArray.length,\n        start = 0;\n\n      while (start < len) {\n        if (levels[start] >= level) {\n          end = start + 1;\n          while (end < len && levels[end] >= level) {\n            end++;\n          }\n          for (low = start, high = end - 1; low < high; low++, high--) {\n            ch = charArray[low];\n            charArray[low] = charArray[high];\n            charArray[high] = ch;\n            if (sourceToTargetMap) {\n              ch = sourceToTargetMap[low];\n              sourceToTargetMap[low] = sourceToTargetMap[high];\n              sourceToTargetMap[high] = ch;\n            }\n          }\n          start = end;\n        }\n        start++;\n      }\n    };\n\n    // for reference see 7 & BD16 in http://unicode.org/reports/tr9/\n    //\n    var _symmetricSwap = function(charArray, levels, params) {\n      if (params.hiLevel !== 0 && _isSymmetricSwapping) {\n        for (var i = 0, index; i < charArray.length; i++) {\n          if (levels[i] === 1) {\n            index = _SWAP_TABLE.indexOf(charArray[i]);\n            if (index >= 0) {\n              charArray[i] = _SWAP_TABLE[index + 1];\n            }\n          }\n        }\n      }\n    };\n\n    var _reorder = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\"),\n        params = { hiLevel: _dir };\n\n      if (!levels) {\n        levels = [];\n      }\n      _computeLevels(charArray, levels, params);\n      _symmetricSwap(charArray, levels, params);\n      _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);\n      _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);\n      return charArray.join(\"\");\n    };\n\n    // doBidiReorder( text, sourceToTargetMap, levels )\n    // Performs Bidi reordering by implementing Unicode Bidi algorithm.\n    // Returns reordered string\n    // @text [String]:\n    // - input string to be reordered, this is input parameter\n    // $sourceToTargetMap [Array] (optional)\n    // - resultant mapping between input and output strings, this is output parameter\n    // $levels [Array] (optional)\n    // - array of calculated Bidi levels, , this is output parameter\n    this.__bidiEngine__.doBidiReorder = function(\n      text,\n      sourceToTargetMap,\n      levels\n    ) {\n      _init(text, sourceToTargetMap);\n      if (!_isInVisual && _isOutVisual && !_isOutRtl) {\n        // LLTR->VLTR, LRTL->VLTR\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VRTL->VLTR, VLTR->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _invertString(text, sourceToTargetMap, levels);\n      } else if (!_isInVisual && _isOutVisual && _isOutRtl) {\n        // LLTR->VRTL, LRTL->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {\n        // VLTR->LLTR\n        _dir = DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VLTR->LRTL, VRTL->LLTR\n        text = _invertString(text, sourceToTargetMap);\n        if (_isInRtl) {\n          //LLTR -> VLTR\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n        } else {\n          //LRTL -> VRTL\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n        }\n      } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {\n        //  VRTL->LRTL\n        _dir = DIR_RTL;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // LRTL->LLTR, LLTR->LRTL\n        var isSymmetricSwappingOrig = _isSymmetricSwapping;\n        if (_isInRtl) {\n          //LRTL->LLTR\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _dir = DIR_LTR;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n        } else {\n          //LLTR->LRTL\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n          _dir = DIR_RTL;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n          text = _invertString(text, sourceToTargetMap);\n        }\n      }\n      return text;\n    };\n\n    /**\n     * @name setOptions( options )\n     * @function\n     * Sets options for Bidi conversion\n     * @param {Object}:\n     * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)\n     * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)\n     * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),\n     */\n    this.__bidiEngine__.setOptions = function(options) {\n      if (options) {\n        _isInVisual = options.isInputVisual;\n        _isOutVisual = options.isOutputVisual;\n        _isInRtl = options.isInputRtl;\n        _isOutRtl = options.isOutputRtl;\n        _isSymmetricSwapping = options.isSymmetricSwapping;\n      }\n    };\n\n    this.__bidiEngine__.setOptions(options);\n    return this.__bidiEngine__;\n  };\n\n  var _bidiUnicodeTypes = bidiUnicodeTypes;\n\n  var bidiEngine = new jsPDF.__bidiEngine__({ isInputVisual: true });\n\n  var bidiEngineFunction = function(args) {\n    var text = args.text;\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n    var lang = options.lang;\n    var tmpText = [];\n\n    options.isInputVisual =\n      typeof options.isInputVisual === \"boolean\" ? options.isInputVisual : true;\n    bidiEngine.setOptions(options);\n\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Object.prototype.toString.call(text[i]) === \"[object Array]\") {\n          tmpText.push([\n            bidiEngine.doBidiReorder(text[i][0]),\n            text[i][1],\n            text[i][2]\n          ]);\n        } else {\n          tmpText.push([bidiEngine.doBidiReorder(text[i])]);\n        }\n      }\n      args.text = tmpText;\n    } else {\n      args.text = bidiEngine.doBidiReorder(text);\n    }\n    bidiEngine.setOptions({ isInputVisual: true });\n  };\n\n  jsPDF.API.events.push([\"postProcessText\", bidiEngineFunction]);\n})(jsPDF);\n","/* eslint-disable no-control-regex */\n/************************************************\n * Title : custom font                          *\n * Start Data : 2017. 01. 22.                   *\n * Comment : TEXT API                           *\n ************************************************/\n\n/******************************\n * jsPDF extension API Design *\n * ****************************/\n\nimport { jsPDF } from \"../jspdf.js\";\n\njsPDF.API.TTFFont = (function() {\n  /************************************************************************/\n  /* function : open                                                       */\n  /* comment : Decode the encoded ttf content and create a TTFFont object. */\n  /************************************************************************/\n  TTFFont.open = function(file) {\n    return new TTFFont(file);\n  };\n  /***************************************************************/\n  /* function : TTFFont gernerator                               */\n  /* comment : Decode TTF contents are parsed, Data,             */\n  /* Subset object is created, and registerTTF function is called.*/\n  /***************************************************************/\n  function TTFFont(rawData) {\n    var data;\n    this.rawData = rawData;\n    data = this.contents = new Data(rawData);\n    this.contents.pos = 4;\n    if (data.readString(4) === \"ttcf\") {\n      throw new Error(\"TTCF not supported.\");\n    } else {\n      data.pos = 0;\n      this.parse();\n      this.subset = new Subset(this);\n      this.registerTTF();\n    }\n  }\n  /********************************************************/\n  /* function : parse                                     */\n  /* comment : TTF Parses the file contents by each table.*/\n  /********************************************************/\n  TTFFont.prototype.parse = function() {\n    this.directory = new Directory(this.contents);\n    this.head = new HeadTable(this);\n    this.name = new NameTable(this);\n    this.cmap = new CmapTable(this);\n    this.toUnicode = {};\n    this.hhea = new HheaTable(this);\n    this.maxp = new MaxpTable(this);\n    this.hmtx = new HmtxTable(this);\n    this.post = new PostTable(this);\n    this.os2 = new OS2Table(this);\n    this.loca = new LocaTable(this);\n    this.glyf = new GlyfTable(this);\n    this.ascender =\n      (this.os2.exists && this.os2.ascender) || this.hhea.ascender;\n    this.decender =\n      (this.os2.exists && this.os2.decender) || this.hhea.decender;\n    this.lineGap = (this.os2.exists && this.os2.lineGap) || this.hhea.lineGap;\n    return (this.bbox = [\n      this.head.xMin,\n      this.head.yMin,\n      this.head.xMax,\n      this.head.yMax\n    ]);\n  };\n  /***************************************************************/\n  /* function : registerTTF                                      */\n  /* comment : Get the value to assign pdf font descriptors.     */\n  /***************************************************************/\n  TTFFont.prototype.registerTTF = function() {\n    var e, hi, low, raw, _ref;\n    this.scaleFactor = 1000.0 / this.head.unitsPerEm;\n    this.bbox = function() {\n      var _i, _len, _ref, _results;\n      _ref = this.bbox;\n      _results = [];\n      for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n        e = _ref[_i];\n        _results.push(Math.round(e * this.scaleFactor));\n      }\n      return _results;\n    }.call(this);\n    this.stemV = 0;\n    if (this.post.exists) {\n      raw = this.post.italic_angle;\n      hi = raw >> 16;\n      low = raw & 0xff;\n      if ((hi & 0x8000) !== 0) {\n        hi = -((hi ^ 0xffff) + 1);\n      }\n      this.italicAngle = +(\"\" + hi + \".\" + low);\n    } else {\n      this.italicAngle = 0;\n    }\n    this.ascender = Math.round(this.ascender * this.scaleFactor);\n    this.decender = Math.round(this.decender * this.scaleFactor);\n    this.lineGap = Math.round(this.lineGap * this.scaleFactor);\n    this.capHeight = (this.os2.exists && this.os2.capHeight) || this.ascender;\n    this.xHeight = (this.os2.exists && this.os2.xHeight) || 0;\n    this.familyClass = ((this.os2.exists && this.os2.familyClass) || 0) >> 8;\n    this.isSerif =\n      (_ref = this.familyClass) === 1 ||\n      _ref === 2 ||\n      _ref === 3 ||\n      _ref === 4 ||\n      _ref === 5 ||\n      _ref === 7;\n    this.isScript = this.familyClass === 10;\n    this.flags = 0;\n    if (this.post.isFixedPitch) {\n      this.flags |= 1 << 0;\n    }\n    if (this.isSerif) {\n      this.flags |= 1 << 1;\n    }\n    if (this.isScript) {\n      this.flags |= 1 << 3;\n    }\n    if (this.italicAngle !== 0) {\n      this.flags |= 1 << 6;\n    }\n    this.flags |= 1 << 5;\n    if (!this.cmap.unicode) {\n      throw new Error(\"No unicode cmap for font\");\n    }\n  };\n  TTFFont.prototype.characterToGlyph = function(character) {\n    var _ref;\n    return (\n      ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) ||\n      0\n    );\n  };\n  TTFFont.prototype.widthOfGlyph = function(glyph) {\n    var scale;\n    scale = 1000.0 / this.head.unitsPerEm;\n    return this.hmtx.forGlyph(glyph).advance * scale;\n  };\n  TTFFont.prototype.widthOfString = function(string, size, charSpace) {\n    var charCode, i, scale, width, _ref;\n    string = \"\" + string;\n    width = 0;\n    for (\n      i = 0, _ref = string.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      charCode = string.charCodeAt(i);\n      width +=\n        this.widthOfGlyph(this.characterToGlyph(charCode)) +\n          charSpace * (1000 / size) || 0;\n    }\n    scale = size / 1000;\n    return width * scale;\n  };\n  TTFFont.prototype.lineHeight = function(size, includeGap) {\n    var gap;\n    if (includeGap == null) {\n      includeGap = false;\n    }\n    gap = includeGap ? this.lineGap : 0;\n    return ((this.ascender + gap - this.decender) / 1000) * size;\n  };\n  return TTFFont;\n})();\n\n/************************************************************************************************/\n/* function : Data                                                                              */\n/* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/\n/************************************************************************************************/\nvar Data = (function() {\n  function Data(data) {\n    this.data = data != null ? data : [];\n    this.pos = 0;\n    this.length = this.data.length;\n  }\n  Data.prototype.readByte = function() {\n    return this.data[this.pos++];\n  };\n  Data.prototype.writeByte = function(byte) {\n    return (this.data[this.pos++] = byte);\n  };\n  Data.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.readByte() * 0x1000000;\n    b2 = this.readByte() << 16;\n    b3 = this.readByte() << 8;\n    b4 = this.readByte();\n    return b1 + b2 + b3 + b4;\n  };\n  Data.prototype.writeUInt32 = function(val) {\n    this.writeByte((val >>> 24) & 0xff);\n    this.writeByte((val >> 16) & 0xff);\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt32 = function() {\n    var int;\n    int = this.readUInt32();\n    if (int >= 0x80000000) {\n      return int - 0x100000000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt32 = function(val) {\n    if (val < 0) {\n      val += 0x100000000;\n    }\n    return this.writeUInt32(val);\n  };\n  Data.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.readByte() << 8;\n    b2 = this.readByte();\n    return b1 | b2;\n  };\n  Data.prototype.writeUInt16 = function(val) {\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt16 = function() {\n    var int;\n    int = this.readUInt16();\n    if (int >= 0x8000) {\n      return int - 0x10000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt16 = function(val) {\n    if (val < 0) {\n      val += 0x10000;\n    }\n    return this.writeUInt16(val);\n  };\n  Data.prototype.readString = function(length) {\n    var i, ret;\n    ret = [];\n    for (\n      i = 0;\n      0 <= length ? i < length : i > length;\n      i = 0 <= length ? ++i : --i\n    ) {\n      ret[i] = String.fromCharCode(this.readByte());\n    }\n    return ret.join(\"\");\n  };\n  Data.prototype.writeString = function(val) {\n    var i, _ref, _results;\n    _results = [];\n    for (\n      i = 0, _ref = val.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      _results.push(this.writeByte(val.charCodeAt(i)));\n    }\n    return _results;\n  };\n  /*Data.prototype.stringAt = function (pos, length) {\n            this.pos = pos;\n            return this.readString(length);\n        };*/\n  Data.prototype.readShort = function() {\n    return this.readInt16();\n  };\n  Data.prototype.writeShort = function(val) {\n    return this.writeInt16(val);\n  };\n  Data.prototype.readLongLong = function() {\n    var b1, b2, b3, b4, b5, b6, b7, b8;\n    b1 = this.readByte();\n    b2 = this.readByte();\n    b3 = this.readByte();\n    b4 = this.readByte();\n    b5 = this.readByte();\n    b6 = this.readByte();\n    b7 = this.readByte();\n    b8 = this.readByte();\n    if (b1 & 0x80) {\n      return (\n        ((b1 ^ 0xff) * 0x100000000000000 +\n          (b2 ^ 0xff) * 0x1000000000000 +\n          (b3 ^ 0xff) * 0x10000000000 +\n          (b4 ^ 0xff) * 0x100000000 +\n          (b5 ^ 0xff) * 0x1000000 +\n          (b6 ^ 0xff) * 0x10000 +\n          (b7 ^ 0xff) * 0x100 +\n          (b8 ^ 0xff) +\n          1) *\n        -1\n      );\n    }\n    return (\n      b1 * 0x100000000000000 +\n      b2 * 0x1000000000000 +\n      b3 * 0x10000000000 +\n      b4 * 0x100000000 +\n      b5 * 0x1000000 +\n      b6 * 0x10000 +\n      b7 * 0x100 +\n      b8\n    );\n  };\n  Data.prototype.writeLongLong = function(val) {\n    var high, low;\n    high = Math.floor(val / 0x100000000);\n    low = val & 0xffffffff;\n    this.writeByte((high >> 24) & 0xff);\n    this.writeByte((high >> 16) & 0xff);\n    this.writeByte((high >> 8) & 0xff);\n    this.writeByte(high & 0xff);\n    this.writeByte((low >> 24) & 0xff);\n    this.writeByte((low >> 16) & 0xff);\n    this.writeByte((low >> 8) & 0xff);\n    return this.writeByte(low & 0xff);\n  };\n  Data.prototype.readInt = function() {\n    return this.readInt32();\n  };\n  Data.prototype.writeInt = function(val) {\n    return this.writeInt32(val);\n  };\n  /*Data.prototype.slice = function (start, end) {\n            return this.data.slice(start, end);\n        };*/\n  Data.prototype.read = function(bytes) {\n    var buf, i;\n    buf = [];\n    for (\n      i = 0;\n      0 <= bytes ? i < bytes : i > bytes;\n      i = 0 <= bytes ? ++i : --i\n    ) {\n      buf.push(this.readByte());\n    }\n    return buf;\n  };\n  Data.prototype.write = function(bytes) {\n    var byte, i, _len, _results;\n    _results = [];\n    for (i = 0, _len = bytes.length; i < _len; i++) {\n      byte = bytes[i];\n      _results.push(this.writeByte(byte));\n    }\n    return _results;\n  };\n  return Data;\n})();\n\nvar Directory = (function() {\n  var checksum;\n\n  /*****************************************************************************************************/\n  /* function : Directory generator                                                                    */\n  /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/\n  /*****************************************************************************************************/\n  function Directory(data) {\n    var entry, i, _ref;\n    this.scalarType = data.readInt();\n    this.tableCount = data.readShort();\n    this.searchRange = data.readShort();\n    this.entrySelector = data.readShort();\n    this.rangeShift = data.readShort();\n    this.tables = {};\n    for (\n      i = 0, _ref = this.tableCount;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      entry = {\n        tag: data.readString(4),\n        checksum: data.readInt(),\n        offset: data.readInt(),\n        length: data.readInt()\n      };\n      this.tables[entry.tag] = entry;\n    }\n  }\n  /********************************************************************************************************/\n  /* function : encode                                                                                    */\n  /* comment : It encodes and stores the font table object and information used for the directory object. */\n  /********************************************************************************************************/\n  Directory.prototype.encode = function(tables) {\n    var adjustment,\n      directory,\n      directoryLength,\n      entrySelector,\n      headOffset,\n      log2,\n      offset,\n      rangeShift,\n      searchRange,\n      sum,\n      table,\n      tableCount,\n      tableData,\n      tag;\n    tableCount = Object.keys(tables).length;\n    log2 = Math.log(2);\n    searchRange = Math.floor(Math.log(tableCount) / log2) * 16;\n    entrySelector = Math.floor(searchRange / log2);\n    rangeShift = tableCount * 16 - searchRange;\n    directory = new Data();\n    directory.writeInt(this.scalarType);\n    directory.writeShort(tableCount);\n    directory.writeShort(searchRange);\n    directory.writeShort(entrySelector);\n    directory.writeShort(rangeShift);\n    directoryLength = tableCount * 16;\n    offset = directory.pos + directoryLength;\n    headOffset = null;\n    tableData = [];\n    for (tag in tables) {\n      table = tables[tag];\n      directory.writeString(tag);\n      directory.writeInt(checksum(table));\n      directory.writeInt(offset);\n      directory.writeInt(table.length);\n      tableData = tableData.concat(table);\n      if (tag === \"head\") {\n        headOffset = offset;\n      }\n      offset += table.length;\n      while (offset % 4) {\n        tableData.push(0);\n        offset++;\n      }\n    }\n    directory.write(tableData);\n    sum = checksum(directory.data);\n    adjustment = 0xb1b0afba - sum;\n    directory.pos = headOffset + 8;\n    directory.writeUInt32(adjustment);\n    return directory.data;\n  };\n  /***************************************************************/\n  /* function : checksum                                         */\n  /* comment : Duplicate the table for the tag.                  */\n  /***************************************************************/\n  checksum = function(data) {\n    var i, sum, tmp, _ref;\n    data = __slice.call(data);\n    while (data.length % 4) {\n      data.push(0);\n    }\n    tmp = new Data(data);\n    sum = 0;\n    for (i = 0, _ref = data.length; i < _ref; i = i += 4) {\n      sum += tmp.readUInt32();\n    }\n    return sum & 0xffffffff;\n  };\n  return Directory;\n})();\n\nvar Table,\n  __hasProp = {}.hasOwnProperty,\n  __extends = function(child, parent) {\n    for (var key in parent) {\n      if (__hasProp.call(parent, key)) child[key] = parent[key];\n    }\n\n    function ctor() {\n      this.constructor = child;\n    }\n    ctor.prototype = parent.prototype;\n    child.prototype = new ctor();\n    child.__super__ = parent.prototype;\n    return child;\n  };\n\n/***************************************************************/\n/* function : Table                                            */\n/* comment : Save info for each table, and parse the table.    */\n/***************************************************************/\nTable = (function() {\n  function Table(file) {\n    var info;\n    this.file = file;\n    info = this.file.directory.tables[this.tag];\n    this.exists = !!info;\n    if (info) {\n      (this.offset = info.offset), (this.length = info.length);\n      this.parse(this.file.contents);\n    }\n  }\n  Table.prototype.parse = function() {};\n  Table.prototype.encode = function() {};\n  Table.prototype.raw = function() {\n    if (!this.exists) {\n      return null;\n    }\n    this.file.contents.pos = this.offset;\n    return this.file.contents.read(this.length);\n  };\n  return Table;\n})();\n\nvar HeadTable = (function(_super) {\n  __extends(HeadTable, _super);\n\n  function HeadTable() {\n    return HeadTable.__super__.constructor.apply(this, arguments);\n  }\n  HeadTable.prototype.tag = \"head\";\n  HeadTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.revision = data.readInt();\n    this.checkSumAdjustment = data.readInt();\n    this.magicNumber = data.readInt();\n    this.flags = data.readShort();\n    this.unitsPerEm = data.readShort();\n    this.created = data.readLongLong();\n    this.modified = data.readLongLong();\n    this.xMin = data.readShort();\n    this.yMin = data.readShort();\n    this.xMax = data.readShort();\n    this.yMax = data.readShort();\n    this.macStyle = data.readShort();\n    this.lowestRecPPEM = data.readShort();\n    this.fontDirectionHint = data.readShort();\n    this.indexToLocFormat = data.readShort();\n    return (this.glyphDataFormat = data.readShort());\n  };\n  HeadTable.prototype.encode = function(indexToLocFormat) {\n    var table;\n    table = new Data();\n    table.writeInt(this.version);\n    table.writeInt(this.revision);\n    table.writeInt(this.checkSumAdjustment);\n    table.writeInt(this.magicNumber);\n    table.writeShort(this.flags);\n    table.writeShort(this.unitsPerEm);\n    table.writeLongLong(this.created);\n    table.writeLongLong(this.modified);\n    table.writeShort(this.xMin);\n    table.writeShort(this.yMin);\n    table.writeShort(this.xMax);\n    table.writeShort(this.yMax);\n    table.writeShort(this.macStyle);\n    table.writeShort(this.lowestRecPPEM);\n    table.writeShort(this.fontDirectionHint);\n    table.writeShort(indexToLocFormat);\n    table.writeShort(this.glyphDataFormat);\n    return table.data;\n  };\n  return HeadTable;\n})(Table);\n\n/************************************************************************************/\n/* function : CmapEntry                                                             */\n/* comment : Cmap Initializes and encodes object information (required by pdf spec).*/\n/************************************************************************************/\nvar CmapEntry = (function() {\n  function CmapEntry(data, offset) {\n    var code,\n      count,\n      endCode,\n      glyphId,\n      glyphIds,\n      i,\n      idDelta,\n      idRangeOffset,\n      index,\n      saveOffset,\n      segCount,\n      segCountX2,\n      start,\n      startCode,\n      tail,\n      _j,\n      _k,\n      _len;\n    this.platformID = data.readUInt16();\n    this.encodingID = data.readShort();\n    this.offset = offset + data.readInt();\n    saveOffset = data.pos;\n    data.pos = this.offset;\n    this.format = data.readUInt16();\n    this.length = data.readUInt16();\n    this.language = data.readUInt16();\n    this.isUnicode =\n      (this.platformID === 3 && this.encodingID === 1 && this.format === 4) ||\n      (this.platformID === 0 && this.format === 4);\n    this.codeMap = {};\n    switch (this.format) {\n      case 0:\n        for (i = 0; i < 256; ++i) {\n          this.codeMap[i] = data.readByte();\n        }\n        break;\n      case 4:\n        segCountX2 = data.readUInt16();\n        segCount = segCountX2 / 2;\n        data.pos += 6;\n        endCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        data.pos += 2;\n        startCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idDelta = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idRangeOffset = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        count = (this.length - data.pos + this.offset) / 2;\n        glyphIds = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= count ? _j < count : _j > count;\n            i = 0 <= count ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {\n          tail = endCode[i];\n          start = startCode[i];\n          for (\n            code = _k = start;\n            start <= tail ? _k <= tail : _k >= tail;\n            code = start <= tail ? ++_k : --_k\n          ) {\n            if (idRangeOffset[i] === 0) {\n              glyphId = code + idDelta[i];\n            } else {\n              index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);\n              glyphId = glyphIds[index] || 0;\n              if (glyphId !== 0) {\n                glyphId += idDelta[i];\n              }\n            }\n            this.codeMap[code] = glyphId & 0xffff;\n          }\n        }\n    }\n    data.pos = saveOffset;\n  }\n  CmapEntry.encode = function(charmap, encoding) {\n    var charMap,\n      code,\n      codeMap,\n      codes,\n      delta,\n      deltas,\n      diff,\n      endCode,\n      endCodes,\n      entrySelector,\n      glyphIDs,\n      i,\n      id,\n      indexes,\n      last,\n      map,\n      nextID,\n      offset,\n      old,\n      rangeOffsets,\n      rangeShift,\n      searchRange,\n      segCount,\n      segCountX2,\n      startCode,\n      startCodes,\n      startGlyph,\n      subtable,\n      _i,\n      _j,\n      _k,\n      _l,\n      _len,\n      _len1,\n      _len2,\n      _len3,\n      _len4,\n      _len5,\n      _len6,\n      _len7,\n      _m,\n      _n,\n      _name,\n      _o,\n      _p,\n      _q;\n    subtable = new Data();\n    codes = Object.keys(charmap).sort(function(a, b) {\n      return a - b;\n    });\n    switch (encoding) {\n      case \"macroman\":\n        id = 0;\n        indexes = (function() {\n          var _results = [];\n          for (i = 0; i < 256; ++i) {\n            _results.push(0);\n          }\n          return _results;\n        })();\n        map = {\n          0: 0\n        };\n        codeMap = {};\n        for (_i = 0, _len = codes.length; _i < _len; _i++) {\n          code = codes[_i];\n          if (map[(_name = charmap[code])] == null) {\n            map[_name] = ++id;\n          }\n          codeMap[code] = {\n            old: charmap[code],\n            new: map[charmap[code]]\n          };\n          indexes[code] = map[charmap[code]];\n        }\n        subtable.writeUInt16(1);\n        subtable.writeUInt16(0);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(262);\n        subtable.writeUInt16(0);\n        subtable.write(indexes);\n        return {\n          charMap: codeMap,\n          subtable: subtable.data,\n          maxGlyphID: id + 1\n        };\n      case \"unicode\":\n        startCodes = [];\n        endCodes = [];\n        nextID = 0;\n        map = {};\n        charMap = {};\n        last = diff = null;\n        for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {\n          code = codes[_j];\n          old = charmap[code];\n          if (map[old] == null) {\n            map[old] = ++nextID;\n          }\n          charMap[code] = {\n            old: old,\n            new: map[old]\n          };\n          delta = map[old] - code;\n          if (last == null || delta !== diff) {\n            if (last) {\n              endCodes.push(last);\n            }\n            startCodes.push(code);\n            diff = delta;\n          }\n          last = code;\n        }\n        if (last) {\n          endCodes.push(last);\n        }\n        endCodes.push(0xffff);\n        startCodes.push(0xffff);\n        segCount = startCodes.length;\n        segCountX2 = segCount * 2;\n        searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);\n        entrySelector = Math.log(searchRange / 2) / Math.LN2;\n        rangeShift = 2 * segCount - searchRange;\n        deltas = [];\n        rangeOffsets = [];\n        glyphIDs = [];\n        for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {\n          startCode = startCodes[i];\n          endCode = endCodes[i];\n          if (startCode === 0xffff) {\n            deltas.push(0);\n            rangeOffsets.push(0);\n            break;\n          }\n          startGlyph = charMap[startCode][\"new\"];\n          if (startCode - startGlyph >= 0x8000) {\n            deltas.push(0);\n            rangeOffsets.push(2 * (glyphIDs.length + segCount - i));\n            for (\n              code = _l = startCode;\n              startCode <= endCode ? _l <= endCode : _l >= endCode;\n              code = startCode <= endCode ? ++_l : --_l\n            ) {\n              glyphIDs.push(charMap[code][\"new\"]);\n            }\n          } else {\n            deltas.push(startGlyph - startCode);\n            rangeOffsets.push(0);\n          }\n        }\n        subtable.writeUInt16(3);\n        subtable.writeUInt16(1);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(4);\n        subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(segCountX2);\n        subtable.writeUInt16(searchRange);\n        subtable.writeUInt16(entrySelector);\n        subtable.writeUInt16(rangeShift);\n        for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {\n          code = endCodes[_m];\n          subtable.writeUInt16(code);\n        }\n        subtable.writeUInt16(0);\n        for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {\n          code = startCodes[_n];\n          subtable.writeUInt16(code);\n        }\n        for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {\n          delta = deltas[_o];\n          subtable.writeUInt16(delta);\n        }\n        for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {\n          offset = rangeOffsets[_p];\n          subtable.writeUInt16(offset);\n        }\n        for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {\n          id = glyphIDs[_q];\n          subtable.writeUInt16(id);\n        }\n        return {\n          charMap: charMap,\n          subtable: subtable.data,\n          maxGlyphID: nextID + 1\n        };\n    }\n  };\n  return CmapEntry;\n})();\n\nvar CmapTable = (function(_super) {\n  __extends(CmapTable, _super);\n\n  function CmapTable() {\n    return CmapTable.__super__.constructor.apply(this, arguments);\n  }\n  CmapTable.prototype.tag = \"cmap\";\n  CmapTable.prototype.parse = function(data) {\n    var entry, i, tableCount;\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    tableCount = data.readUInt16();\n    this.tables = [];\n    this.unicode = null;\n    for (\n      i = 0;\n      0 <= tableCount ? i < tableCount : i > tableCount;\n      i = 0 <= tableCount ? ++i : --i\n    ) {\n      entry = new CmapEntry(data, this.offset);\n      this.tables.push(entry);\n      if (entry.isUnicode) {\n        if (this.unicode == null) {\n          this.unicode = entry;\n        }\n      }\n    }\n    return true;\n  };\n  /*************************************************************************/\n  /* function : encode                                                     */\n  /* comment : Encode the cmap table corresponding to the input character. */\n  /*************************************************************************/\n  CmapTable.encode = function(charmap, encoding) {\n    var result, table;\n    if (encoding == null) {\n      encoding = \"macroman\";\n    }\n    result = CmapEntry.encode(charmap, encoding);\n    table = new Data();\n    table.writeUInt16(0);\n    table.writeUInt16(1);\n    result.table = table.data.concat(result.subtable);\n    return result;\n  };\n  return CmapTable;\n})(Table);\n\nvar HheaTable = (function(_super) {\n  __extends(HheaTable, _super);\n\n  function HheaTable() {\n    return HheaTable.__super__.constructor.apply(this, arguments);\n  }\n  HheaTable.prototype.tag = \"hhea\";\n  HheaTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.ascender = data.readShort();\n    this.decender = data.readShort();\n    this.lineGap = data.readShort();\n    this.advanceWidthMax = data.readShort();\n    this.minLeftSideBearing = data.readShort();\n    this.minRightSideBearing = data.readShort();\n    this.xMaxExtent = data.readShort();\n    this.caretSlopeRise = data.readShort();\n    this.caretSlopeRun = data.readShort();\n    this.caretOffset = data.readShort();\n    data.pos += 4 * 2;\n    this.metricDataFormat = data.readShort();\n    return (this.numberOfMetrics = data.readUInt16());\n  };\n  /*HheaTable.prototype.encode = function (ids) {\n            var i, table, _i, _ref;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeShort(this.ascender);\n            table.writeShort(this.decender);\n            table.writeShort(this.lineGap);\n            table.writeShort(this.advanceWidthMax);\n            table.writeShort(this.minLeftSideBearing);\n            table.writeShort(this.minRightSideBearing);\n            table.writeShort(this.xMaxExtent);\n            table.writeShort(this.caretSlopeRise);\n            table.writeShort(this.caretSlopeRun);\n            table.writeShort(this.caretOffset);\n            for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                table.writeByte(0);\n            }\n            table.writeShort(this.metricDataFormat);\n            table.writeUInt16(ids.length);\n            return table.data;\n        };*/\n  return HheaTable;\n})(Table);\n\nvar OS2Table = (function(_super) {\n  __extends(OS2Table, _super);\n\n  function OS2Table() {\n    return OS2Table.__super__.constructor.apply(this, arguments);\n  }\n  OS2Table.prototype.tag = \"OS/2\";\n  OS2Table.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    this.averageCharWidth = data.readShort();\n    this.weightClass = data.readUInt16();\n    this.widthClass = data.readUInt16();\n    this.type = data.readShort();\n    this.ySubscriptXSize = data.readShort();\n    this.ySubscriptYSize = data.readShort();\n    this.ySubscriptXOffset = data.readShort();\n    this.ySubscriptYOffset = data.readShort();\n    this.ySuperscriptXSize = data.readShort();\n    this.ySuperscriptYSize = data.readShort();\n    this.ySuperscriptXOffset = data.readShort();\n    this.ySuperscriptYOffset = data.readShort();\n    this.yStrikeoutSize = data.readShort();\n    this.yStrikeoutPosition = data.readShort();\n    this.familyClass = data.readShort();\n    this.panose = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 10; ++i) {\n        _results.push(data.readByte());\n      }\n      return _results;\n    })();\n    this.charRange = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 4; ++i) {\n        _results.push(data.readInt());\n      }\n      return _results;\n    })();\n    this.vendorID = data.readString(4);\n    this.selection = data.readShort();\n    this.firstCharIndex = data.readShort();\n    this.lastCharIndex = data.readShort();\n    if (this.version > 0) {\n      this.ascent = data.readShort();\n      this.descent = data.readShort();\n      this.lineGap = data.readShort();\n      this.winAscent = data.readShort();\n      this.winDescent = data.readShort();\n      this.codePageRange = (function() {\n        var i, _results;\n        _results = [];\n        for (i = 0; i < 2; i = ++i) {\n          _results.push(data.readInt());\n        }\n        return _results;\n      })();\n      if (this.version > 1) {\n        this.xHeight = data.readShort();\n        this.capHeight = data.readShort();\n        this.defaultChar = data.readShort();\n        this.breakChar = data.readShort();\n        return (this.maxContext = data.readShort());\n      }\n    }\n  };\n  /*OS2Table.prototype.encode = function () {\n            return this.raw();\n        };*/\n  return OS2Table;\n})(Table);\n\nvar PostTable = (function(_super) {\n  var POSTSCRIPT_GLYPHS;\n  __extends(PostTable, _super);\n\n  function PostTable() {\n    return PostTable.__super__.constructor.apply(this, arguments);\n  }\n  PostTable.prototype.tag = \"post\";\n  PostTable.prototype.parse = function(data) {\n    var length, numberOfGlyphs, _results;\n    data.pos = this.offset;\n    this.format = data.readInt();\n    this.italicAngle = data.readInt();\n    this.underlinePosition = data.readShort();\n    this.underlineThickness = data.readShort();\n    this.isFixedPitch = data.readInt();\n    this.minMemType42 = data.readInt();\n    this.maxMemType42 = data.readInt();\n    this.minMemType1 = data.readInt();\n    this.maxMemType1 = data.readInt();\n    switch (this.format) {\n      case 0x00010000:\n        break;\n      case 0x00020000:\n        numberOfGlyphs = data.readUInt16();\n        this.glyphNameIndex = [];\n        var i;\n        for (\n          i = 0;\n          0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs;\n          i = 0 <= numberOfGlyphs ? ++i : --i\n        ) {\n          this.glyphNameIndex.push(data.readUInt16());\n        }\n        this.names = [];\n        _results = [];\n        while (data.pos < this.offset + this.length) {\n          length = data.readByte();\n          _results.push(this.names.push(data.readString(length)));\n        }\n        return _results;\n      case 0x00025000:\n        numberOfGlyphs = data.readUInt16();\n        return (this.offsets = data.read(numberOfGlyphs));\n      case 0x00030000:\n        break;\n      case 0x00040000:\n        return (this.map = function() {\n          var _j, _ref, _results1;\n          _results1 = [];\n          for (\n            i = _j = 0, _ref = this.file.maxp.numGlyphs;\n            0 <= _ref ? _j < _ref : _j > _ref;\n            i = 0 <= _ref ? ++_j : --_j\n          ) {\n            _results1.push(data.readUInt32());\n          }\n          return _results1;\n        }.call(this));\n    }\n  };\n  /*PostTable.prototype.glyphFor = function (code) {\n            var index;\n            switch (this.format) {\n            case 0x00010000:\n                return POSTSCRIPT_GLYPHS[code] || '.notdef';\n            case 0x00020000:\n                index = this.glyphNameIndex[code];\n                if (index <= 257) {\n                    return POSTSCRIPT_GLYPHS[index];\n                }\n                else {\n                    return this.names[index - 258] || '.notdef';\n                }\n                break;\n            case 0x00025000:\n                return POSTSCRIPT_GLYPHS[code + this.offsets[code]] || '.notdef';\n            case 0x00030000:\n                return '.notdef';\n            case 0x00040000:\n                return this.map[code] || 0xFFFF;\n            }\n        };*/\n  /*PostTable.prototype.encode = function (mapping) {\n            var id, index, indexes, position, post, raw, string, strings, table, _i, _j, _k, _len, _len1, _len2;\n            if (!this.exists) {\n                return null;\n            }\n            raw = this.raw();\n            if (this.format === 0x00030000) {\n                return raw;\n            }\n            table = new Data(raw.slice(0, 32));\n            table.writeUInt32(0x00020000);\n            table.pos = 32;\n            indexes = [];\n            strings = [];\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                post = this.glyphFor(id);\n                position = POSTSCRIPT_GLYPHS.indexOf(post);\n                if (position !== -1) {\n                    indexes.push(position);\n                }\n                else {\n                    indexes.push(257 + strings.length);\n                    strings.push(post);\n                }\n            }\n            table.writeUInt16(Object.keys(mapping).length);\n            for (_j = 0, _len1 = indexes.length; _j < _len1; _j++) {\n                index = indexes[_j];\n                table.writeUInt16(index);\n            }\n            for (_k = 0, _len2 = strings.length; _k < _len2; _k++) {\n                string = strings[_k];\n                table.writeByte(string.length);\n                table.writeString(string);\n            }\n            return table.data;\n        };*/\n  POSTSCRIPT_GLYPHS = \".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\\nzero one two three four five six seven eight nine colon semicolon less equal greater\\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\\nbracketleft backslash bracketright asciicircum underscore grave\\na b c d e f g h i j k l m n o p q r s t u v w x y z\\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\\nsterling section bullet paragraph germandbls registered copyright trademark acute\\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\\nCacute cacute Ccaron ccaron dcroat\".split(\n    /\\s+/g\n  );\n  return PostTable;\n})(Table);\n\n/*********************************************************************************************************/\n/* function : NameEntry                                                                                  */\n/* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/\n/*********************************************************************************************************/\nvar NameEntry = (function() {\n  function NameEntry(raw, entry) {\n    this.raw = raw;\n    this.length = raw.length;\n    this.platformID = entry.platformID;\n    this.encodingID = entry.encodingID;\n    this.languageID = entry.languageID;\n  }\n  return NameEntry;\n})();\n\nvar NameTable = (function(_super) {\n  var subsetTag;\n  __extends(NameTable, _super);\n\n  function NameTable() {\n    return NameTable.__super__.constructor.apply(this, arguments);\n  }\n  NameTable.prototype.tag = \"name\";\n  NameTable.prototype.parse = function(data) {\n    var count,\n      entries,\n      entry,\n      i,\n      name,\n      stringOffset,\n      strings,\n      text,\n      _j,\n      _len,\n      _name;\n    data.pos = this.offset;\n    data.readShort(); //format\n    count = data.readShort();\n    stringOffset = data.readShort();\n    entries = [];\n    for (\n      i = 0;\n      0 <= count ? i < count : i > count;\n      i = 0 <= count ? ++i : --i\n    ) {\n      entries.push({\n        platformID: data.readShort(),\n        encodingID: data.readShort(),\n        languageID: data.readShort(),\n        nameID: data.readShort(),\n        length: data.readShort(),\n        offset: this.offset + stringOffset + data.readShort()\n      });\n    }\n    strings = {};\n    for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {\n      entry = entries[i];\n      data.pos = entry.offset;\n      text = data.readString(entry.length);\n      name = new NameEntry(text, entry);\n      if (strings[(_name = entry.nameID)] == null) {\n        strings[_name] = [];\n      }\n      strings[entry.nameID].push(name);\n    }\n    this.strings = strings;\n    this.copyright = strings[0];\n    this.fontFamily = strings[1];\n    this.fontSubfamily = strings[2];\n    this.uniqueSubfamily = strings[3];\n    this.fontName = strings[4];\n    this.version = strings[5];\n    try {\n      this.postscriptName = strings[6][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    } catch (e) {\n      this.postscriptName = strings[4][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    }\n    this.trademark = strings[7];\n    this.manufacturer = strings[8];\n    this.designer = strings[9];\n    this.description = strings[10];\n    this.vendorUrl = strings[11];\n    this.designerUrl = strings[12];\n    this.license = strings[13];\n    this.licenseUrl = strings[14];\n    this.preferredFamily = strings[15];\n    this.preferredSubfamily = strings[17];\n    this.compatibleFull = strings[18];\n    return (this.sampleText = strings[19]);\n  };\n  subsetTag = \"AAAAAA\";\n  /*NameTable.prototype.encode = function () {\n            var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;\n            strings = {};\n            _ref = this.strings;\n            for (id in _ref) {\n                val = _ref[id];\n                strings[id] = val;\n            }\n            postscriptName = new NameEntry(\"\" + subsetTag + \"+\" + this.postscriptName, {\n                platformID: 1\n                , encodingID: 0\n                , languageID: 0\n            });\n            strings[6] = [postscriptName];\n            subsetTag = successorOf(subsetTag);\n            strCount = 0;\n            for (id in strings) {\n                list = strings[id];\n                if (list != null) {\n                    strCount += list.length;\n                }\n            }\n            table = new Data;\n            strTable = new Data;\n            table.writeShort(0);\n            table.writeShort(strCount);\n            table.writeShort(6 + 12 * strCount);\n            for (nameID in strings) {\n                list = strings[nameID];\n                if (list != null) {\n                    for (_i = 0, _len = list.length; _i < _len; _i++) {\n                        string = list[_i];\n                        table.writeShort(string.platformID);\n                        table.writeShort(string.encodingID);\n                        table.writeShort(string.languageID);\n                        table.writeShort(nameID);\n                        table.writeShort(string.length);\n                        table.writeShort(strTable.pos);\n                        strTable.writeString(string.raw);\n                    }\n                }\n            }\n            return nameTable = {\n                postscriptName: postscriptName.raw\n                , table: table.data.concat(strTable.data)\n            };\n        };*/\n  return NameTable;\n})(Table);\n\nvar MaxpTable = (function(_super) {\n  __extends(MaxpTable, _super);\n\n  function MaxpTable() {\n    return MaxpTable.__super__.constructor.apply(this, arguments);\n  }\n  MaxpTable.prototype.tag = \"maxp\";\n  MaxpTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.numGlyphs = data.readUInt16();\n    this.maxPoints = data.readUInt16();\n    this.maxContours = data.readUInt16();\n    this.maxCompositePoints = data.readUInt16();\n    this.maxComponentContours = data.readUInt16();\n    this.maxZones = data.readUInt16();\n    this.maxTwilightPoints = data.readUInt16();\n    this.maxStorage = data.readUInt16();\n    this.maxFunctionDefs = data.readUInt16();\n    this.maxInstructionDefs = data.readUInt16();\n    this.maxStackElements = data.readUInt16();\n    this.maxSizeOfInstructions = data.readUInt16();\n    this.maxComponentElements = data.readUInt16();\n    return (this.maxComponentDepth = data.readUInt16());\n  };\n  /*MaxpTable.prototype.encode = function (ids) {\n            var table;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeUInt16(ids.length);\n            table.writeUInt16(this.maxPoints);\n            table.writeUInt16(this.maxContours);\n            table.writeUInt16(this.maxCompositePoints);\n            table.writeUInt16(this.maxComponentContours);\n            table.writeUInt16(this.maxZones);\n            table.writeUInt16(this.maxTwilightPoints);\n            table.writeUInt16(this.maxStorage);\n            table.writeUInt16(this.maxFunctionDefs);\n            table.writeUInt16(this.maxInstructionDefs);\n            table.writeUInt16(this.maxStackElements);\n            table.writeUInt16(this.maxSizeOfInstructions);\n            table.writeUInt16(this.maxComponentElements);\n            table.writeUInt16(this.maxComponentDepth);\n            return table.data;\n        };*/\n  return MaxpTable;\n})(Table);\n\nvar HmtxTable = (function(_super) {\n  __extends(HmtxTable, _super);\n\n  function HmtxTable() {\n    return HmtxTable.__super__.constructor.apply(this, arguments);\n  }\n  HmtxTable.prototype.tag = \"hmtx\";\n  HmtxTable.prototype.parse = function(data) {\n    var i, last, lsbCount, m, _j, _ref, _results;\n    data.pos = this.offset;\n    this.metrics = [];\n    for (\n      i = 0, _ref = this.file.hhea.numberOfMetrics;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      this.metrics.push({\n        advance: data.readUInt16(),\n        lsb: data.readInt16()\n      });\n    }\n    lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;\n    this.leftSideBearings = (function() {\n      var _j, _results;\n      _results = [];\n      for (\n        i = _j = 0;\n        0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n        i = 0 <= lsbCount ? ++_j : --_j\n      ) {\n        _results.push(data.readInt16());\n      }\n      return _results;\n    })();\n    this.widths = function() {\n      var _j, _len, _ref1, _results;\n      _ref1 = this.metrics;\n      _results = [];\n      for (_j = 0, _len = _ref1.length; _j < _len; _j++) {\n        m = _ref1[_j];\n        _results.push(m.advance);\n      }\n      return _results;\n    }.call(this);\n    last = this.widths[this.widths.length - 1];\n    _results = [];\n    for (\n      i = _j = 0;\n      0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n      i = 0 <= lsbCount ? ++_j : --_j\n    ) {\n      _results.push(this.widths.push(last));\n    }\n    return _results;\n  };\n  /***************************************************************/\n  /* function : forGlyph                                         */\n  /* comment : Returns the advance width and lsb for this glyph. */\n  /***************************************************************/\n  HmtxTable.prototype.forGlyph = function(id) {\n    if (id in this.metrics) {\n      return this.metrics[id];\n    }\n    return {\n      advance: this.metrics[this.metrics.length - 1].advance,\n      lsb: this.leftSideBearings[id - this.metrics.length]\n    };\n  };\n  /*HmtxTable.prototype.encode = function (mapping) {\n            var id, metric, table, _i, _len;\n            table = new Data;\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                metric = this.forGlyph(id);\n                table.writeUInt16(metric.advance);\n                table.writeUInt16(metric.lsb);\n            }\n            return table.data;\n        };*/\n  return HmtxTable;\n})(Table);\n\nvar __slice = [].slice;\n\nvar GlyfTable = (function(_super) {\n  __extends(GlyfTable, _super);\n\n  function GlyfTable() {\n    return GlyfTable.__super__.constructor.apply(this, arguments);\n  }\n  GlyfTable.prototype.tag = \"glyf\";\n  GlyfTable.prototype.parse = function() {\n    return (this.cache = {});\n  };\n  GlyfTable.prototype.glyphFor = function(id) {\n    var data,\n      index,\n      length,\n      loca,\n      numberOfContours,\n      raw,\n      xMax,\n      xMin,\n      yMax,\n      yMin;\n    if (id in this.cache) {\n      return this.cache[id];\n    }\n    loca = this.file.loca;\n    data = this.file.contents;\n    index = loca.indexOf(id);\n    length = loca.lengthOf(id);\n    if (length === 0) {\n      return (this.cache[id] = null);\n    }\n    data.pos = this.offset + index;\n    raw = new Data(data.read(length));\n    numberOfContours = raw.readShort();\n    xMin = raw.readShort();\n    yMin = raw.readShort();\n    xMax = raw.readShort();\n    yMax = raw.readShort();\n    if (numberOfContours === -1) {\n      this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);\n    } else {\n      this.cache[id] = new SimpleGlyph(\n        raw,\n        numberOfContours,\n        xMin,\n        yMin,\n        xMax,\n        yMax\n      );\n    }\n    return this.cache[id];\n  };\n  GlyfTable.prototype.encode = function(glyphs, mapping, old2new) {\n    var glyph, id, offsets, table, _i, _len;\n    table = [];\n    offsets = [];\n    for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n      id = mapping[_i];\n      glyph = glyphs[id];\n      offsets.push(table.length);\n      if (glyph) {\n        table = table.concat(glyph.encode(old2new));\n      }\n    }\n    offsets.push(table.length);\n    return {\n      table: table,\n      offsets: offsets\n    };\n  };\n  return GlyfTable;\n})(Table);\n\nvar SimpleGlyph = (function() {\n  /**************************************************************************/\n  /* function : SimpleGlyph                                                 */\n  /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/\n  /**************************************************************************/\n  function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {\n    this.raw = raw;\n    this.numberOfContours = numberOfContours;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = false;\n  }\n  SimpleGlyph.prototype.encode = function() {\n    return this.raw.data;\n  };\n  return SimpleGlyph;\n})();\n\nvar CompoundGlyph = (function() {\n  var ARG_1_AND_2_ARE_WORDS,\n    MORE_COMPONENTS,\n    WE_HAVE_AN_X_AND_Y_SCALE,\n    WE_HAVE_A_SCALE,\n    WE_HAVE_A_TWO_BY_TWO,\n    WE_HAVE_INSTRUCTIONS;\n  ARG_1_AND_2_ARE_WORDS = 0x0001;\n  WE_HAVE_A_SCALE = 0x0008;\n  MORE_COMPONENTS = 0x0020;\n  WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;\n  WE_HAVE_A_TWO_BY_TWO = 0x0080;\n  WE_HAVE_INSTRUCTIONS = 0x0100;\n\n  /********************************************************************************************************************/\n  /* function : CompoundGlypg generator                                                                               */\n  /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/\n  /********************************************************************************************************************/\n  function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {\n    var data, flags;\n    this.raw = raw;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = true;\n    this.glyphIDs = [];\n    this.glyphOffsets = [];\n    data = this.raw;\n    while (true) {\n      flags = data.readShort();\n      this.glyphOffsets.push(data.pos);\n      this.glyphIDs.push(data.readUInt16());\n      if (!(flags & MORE_COMPONENTS)) {\n        break;\n      }\n      if (flags & ARG_1_AND_2_ARE_WORDS) {\n        data.pos += 4;\n      } else {\n        data.pos += 2;\n      }\n      if (flags & WE_HAVE_A_TWO_BY_TWO) {\n        data.pos += 8;\n      } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n        data.pos += 4;\n      } else if (flags & WE_HAVE_A_SCALE) {\n        data.pos += 2;\n      }\n    }\n  }\n  /****************************************************************************************************************/\n  /* function : CompoundGlypg encode                                                                              */\n  /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/\n  /****************************************************************************************************************/\n  CompoundGlyph.prototype.encode = function() {\n    var i, result, _len, _ref;\n    result = new Data(__slice.call(this.raw.data));\n    _ref = this.glyphIDs;\n    for (i = 0, _len = _ref.length; i < _len; ++i) {\n      result.pos = this.glyphOffsets[i];\n    }\n    return result.data;\n  };\n  return CompoundGlyph;\n})();\n\nvar LocaTable = (function(_super) {\n  __extends(LocaTable, _super);\n\n  function LocaTable() {\n    return LocaTable.__super__.constructor.apply(this, arguments);\n  }\n  LocaTable.prototype.tag = \"loca\";\n  LocaTable.prototype.parse = function(data) {\n    var format, i;\n    data.pos = this.offset;\n    format = this.file.head.indexToLocFormat;\n    if (format === 0) {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 2) {\n          _results.push(data.readUInt16() * 2);\n        }\n        return _results;\n      }.call(this));\n    } else {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 4) {\n          _results.push(data.readUInt32());\n        }\n        return _results;\n      }.call(this));\n    }\n  };\n  LocaTable.prototype.indexOf = function(id) {\n    return this.offsets[id];\n  };\n  LocaTable.prototype.lengthOf = function(id) {\n    return this.offsets[id + 1] - this.offsets[id];\n  };\n  LocaTable.prototype.encode = function(offsets, activeGlyphs) {\n    var LocaTable = new Uint32Array(this.offsets.length);\n    var glyfPtr = 0;\n    var listGlyf = 0;\n    for (var k = 0; k < LocaTable.length; ++k) {\n      LocaTable[k] = glyfPtr;\n      if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {\n        ++listGlyf;\n        LocaTable[k] = glyfPtr;\n        var start = this.offsets[k];\n        var len = this.offsets[k + 1] - start;\n        if (len > 0) {\n          glyfPtr += len;\n        }\n      }\n    }\n    var newLocaTable = new Array(LocaTable.length * 4);\n    for (var j = 0; j < LocaTable.length; ++j) {\n      newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;\n      newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;\n      newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;\n      newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;\n    }\n    return newLocaTable;\n  };\n  return LocaTable;\n})(Table);\n\n/************************************************************************************/\n/* function : invert                                                                */\n/* comment : Change the object's (key: value) to create an object with (value: key).*/\n/************************************************************************************/\nvar invert = function(object) {\n  var key, ret, val;\n  ret = {};\n  for (key in object) {\n    val = object[key];\n    ret[val] = key;\n  }\n  return ret;\n};\n\n/*var successorOf = function (input) {\n        var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;\n        alphabet = 'abcdefghijklmnopqrstuvwxyz';\n        length = alphabet.length;\n        result = input;\n        i = input.length;\n        while (i >= 0) {\n            last = input.charAt(--i);\n            if (isNaN(last)) {\n                index = alphabet.indexOf(last.toLowerCase());\n                if (index === -1) {\n                    next = last;\n                    carry = true;\n                }\n                else {\n                    next = alphabet.charAt((index + 1) % length);\n                    isUpperCase = last === last.toUpperCase();\n                    if (isUpperCase) {\n                        next = next.toUpperCase();\n                    }\n                    carry = index + 1 >= length;\n                    if (carry && i === 0) {\n                        added = isUpperCase ? 'A' : 'a';\n                        result = added + next + result.slice(1);\n                        break;\n                    }\n                }\n            }\n            else {\n                next = +last + 1;\n                carry = next > 9;\n                if (carry) {\n                    next = 0;\n                }\n                if (carry && i === 0) {\n                    result = '1' + next + result.slice(1);\n                    break;\n                }\n            }\n            result = result.slice(0, i) + next + result.slice(i + 1);\n            if (!carry) {\n                break;\n            }\n        }\n        return result;\n    };*/\n\nvar Subset = (function() {\n  function Subset(font) {\n    this.font = font;\n    this.subset = {};\n    this.unicodes = {};\n    this.next = 33;\n  }\n  /*Subset.prototype.use = function (character) {\n            var i, _i, _ref;\n            if (typeof character === 'string') {\n                for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                    this.use(character.charCodeAt(i));\n                }\n                return;\n            }\n            if (!this.unicodes[character]) {\n                this.subset[this.next] = character;\n                return this.unicodes[character] = this.next++;\n            }\n        };*/\n  /*Subset.prototype.encodeText = function (text) {\n            var char, i, string, _i, _ref;\n            string = '';\n            for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                char = this.unicodes[text.charCodeAt(i)];\n                string += String.fromCharCode(char);\n            }\n            return string;\n        };*/\n  /***************************************************************/\n  /* function : generateCmap                                     */\n  /* comment : Returns the unicode cmap for this font.         */\n  /***************************************************************/\n  Subset.prototype.generateCmap = function() {\n    var mapping, roman, unicode, unicodeCmap, _ref;\n    unicodeCmap = this.font.cmap.tables[0].codeMap;\n    mapping = {};\n    _ref = this.subset;\n    for (roman in _ref) {\n      unicode = _ref[roman];\n      mapping[roman] = unicodeCmap[unicode];\n    }\n    return mapping;\n  };\n  /*Subset.prototype.glyphIDs = function () {\n            var ret, roman, unicode, unicodeCmap, val, _ref;\n            unicodeCmap = this.font.cmap.tables[0].codeMap;\n            ret = [0];\n            _ref = this.subset;\n            for (roman in _ref) {\n                unicode = _ref[roman];\n                val = unicodeCmap[unicode];\n                if ((val != null) && __indexOf.call(ret, val) < 0) {\n                    ret.push(val);\n                }\n            }\n            return ret.sort();\n        };*/\n  /******************************************************************/\n  /* function : glyphsFor                                           */\n  /* comment : Returns simple glyph objects for the input character.*/\n  /******************************************************************/\n  Subset.prototype.glyphsFor = function(glyphIDs) {\n    var additionalIDs, glyph, glyphs, id, _i, _len, _ref;\n    glyphs = {};\n    for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {\n      id = glyphIDs[_i];\n      glyphs[id] = this.font.glyf.glyphFor(id);\n    }\n    additionalIDs = [];\n    for (id in glyphs) {\n      glyph = glyphs[id];\n      if (glyph != null ? glyph.compound : void 0) {\n        additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);\n      }\n    }\n    if (additionalIDs.length > 0) {\n      _ref = this.glyphsFor(additionalIDs);\n      for (id in _ref) {\n        glyph = _ref[id];\n        glyphs[id] = glyph;\n      }\n    }\n    return glyphs;\n  };\n  /***************************************************************/\n  /* function : encode                                           */\n  /* comment : Encode various tables for the characters you use. */\n  /***************************************************************/\n  Subset.prototype.encode = function(glyID, indexToLocFormat) {\n    var cmap,\n      code,\n      glyf,\n      glyphs,\n      id,\n      ids,\n      loca,\n      new2old,\n      newIDs,\n      nextGlyphID,\n      old2new,\n      oldID,\n      oldIDs,\n      tables,\n      _ref;\n    cmap = CmapTable.encode(this.generateCmap(), \"unicode\");\n    glyphs = this.glyphsFor(glyID);\n    old2new = {\n      0: 0\n    };\n    _ref = cmap.charMap;\n    for (code in _ref) {\n      ids = _ref[code];\n      old2new[ids.old] = ids[\"new\"];\n    }\n    nextGlyphID = cmap.maxGlyphID;\n    for (oldID in glyphs) {\n      if (!(oldID in old2new)) {\n        old2new[oldID] = nextGlyphID++;\n      }\n    }\n    new2old = invert(old2new);\n    newIDs = Object.keys(new2old).sort(function(a, b) {\n      return a - b;\n    });\n    oldIDs = (function() {\n      var _i, _len, _results;\n      _results = [];\n      for (_i = 0, _len = newIDs.length; _i < _len; _i++) {\n        id = newIDs[_i];\n        _results.push(new2old[id]);\n      }\n      return _results;\n    })();\n    glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);\n    loca = this.font.loca.encode(glyf.offsets, oldIDs);\n    tables = {\n      cmap: this.font.cmap.raw(),\n      glyf: glyf.table,\n      loca: loca,\n      hmtx: this.font.hmtx.raw(),\n      hhea: this.font.hhea.raw(),\n      maxp: this.font.maxp.raw(),\n      post: this.font.post.raw(),\n      name: this.font.name.raw(),\n      head: this.font.head.encode(indexToLocFormat)\n    };\n    if (this.font.os2.exists) {\n      tables[\"OS/2\"] = this.font.os2.raw();\n    }\n    return this.font.directory.encode(tables);\n  };\n  return Subset;\n})();\n\njsPDF.API.PDFObject = (function() {\n  var pad;\n\n  function PDFObject() {}\n  pad = function(str, length) {\n    return (Array(length + 1).join(\"0\") + str).slice(-length);\n  };\n  /*****************************************************************************/\n  /* function : convert                                                        */\n  /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */\n  /*****************************************************************************/\n  PDFObject.convert = function(object) {\n    var e, items, key, out, val;\n    if (Array.isArray(object)) {\n      items = (function() {\n        var _i, _len, _results;\n        _results = [];\n        for (_i = 0, _len = object.length; _i < _len; _i++) {\n          e = object[_i];\n          _results.push(PDFObject.convert(e));\n        }\n        return _results;\n      })().join(\" \");\n      return \"[\" + items + \"]\";\n    } else if (typeof object === \"string\") {\n      return \"/\" + object;\n    } else if (object != null ? object.isString : void 0) {\n      return \"(\" + object + \")\";\n    } else if (object instanceof Date) {\n      return (\n        \"(D:\" +\n        pad(object.getUTCFullYear(), 4) +\n        pad(object.getUTCMonth(), 2) +\n        pad(object.getUTCDate(), 2) +\n        pad(object.getUTCHours(), 2) +\n        pad(object.getUTCMinutes(), 2) +\n        pad(object.getUTCSeconds(), 2) +\n        \"Z)\"\n      );\n    } else if ({}.toString.call(object) === \"[object Object]\") {\n      out = [\"<<\"];\n      for (key in object) {\n        val = object[key];\n        out.push(\"/\" + key + \" \" + PDFObject.convert(val));\n      }\n      out.push(\">>\");\n      return out.join(\"\\n\");\n    } else {\n      return \"\" + object;\n    }\n  };\n  return PDFObject;\n})();\n"],"names":["globalObject","window","global","self","consoleLog","console","log","apply","arguments","consoleWarn","str","warn","call","consoleError","error","bom","blob","opts","autoBom","test","type","Blob","String","fromCharCode","download","url","name","xhr","XMLHttpRequest","open","responseType","onload","saveAs","response","onerror","send","corsEnabled","e","status","click","node","dispatchEvent","MouseEvent","evt","document","createEvent","initMouseEvent","_global","HTMLAnchorElement","prototype","URL","webkitURL","a","createElement","rel","href","origin","location","target","createObjectURL","setTimeout","revokeObjectURL","navigator","msSaveOrOpenBlob","popup","title","body","innerText","force","isSafari","HTMLElement","safari","isChromeIOS","userAgent","FileReader","reader","onloadend","result","replace","readAsDataURL","RGBColor","color_string","ok","charAt","substr","toLowerCase","channels","simple_colors","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","feldspar","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslateblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","violetred","wheat","white","whitesmoke","yellow","yellowgreen","color_defs","re","example","process","bits","parseInt","i","length","processor","exec","r","g","b","isNaN","toRGB","toHex","toString","atob","btoa","bind","md5cycle","x","k","c","d","ff","gg","hh","ii","add32","cmn","q","s","t","md51","n","state","md5blk","substring","tail","charCodeAt","md5blks","hex_chr","split","rhex","j","hex","join","singleToByteString","toByteString","map","md5Bin","md5","md5Check","lsw","msw","repeat","num","Array","rc4","key","data","lastKey","lastState","out","permissionOptions","print","modify","copy","PDFSecurity","permissions","userPassword","ownerPassword","fileId","v","protection","forEach","perm","Error","padding","paddedUserPassword","paddedOwnerPassword","O","processOwnerPassword","P","encryptionKey","lsbFirstWord","hexToBytes","U","toHexString","byteString","byte","slice","bytes","push","encryptor","objectId","generation","toPDFName","strLength","charCode","hexStr","paddingHexStr","PubSub","context","topics","subscribe","topic","callback","once","hasOwnProperty","token","Math","random","unsubscribe","Object","keys","publish","args","tokens","sub","ex","message","getTopics","GState","parameters","supported","p","indexOf","id","objectNumber","equals","other","ignore","count","Pattern","gState","matrix","ShadingPattern","coords","colors","TilingPattern","boundingBox","xStep","yStep","stream","cloneIndex","jsPDF","options","orientation","unit","format","compressPdf","filters","userUnit","precision","floatPrecision","defaultPathOperation","encryptionOptions","compress","encryption","userPermissions","abs","putOnlyUsedFonts","usedFonts","API","internal","__private__","pdfVersion","getPdfVersion","setPdfVersion","value","pageFormats","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","b10","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","dl","letter","legal","ledger","tabloid","getPageFormats","getPageFormat","ApiMode","COMPAT","ADVANCED","apiMode","advancedAPI","saveGraphicsState","Matrix","scaleFactor","getPageHeight","setFontSize","getFontSize","compatAPI","restoreGraphicsState","combineFontStyleAndFontWeight","fontStyle","fontWeight","doSwitch","isAdvancedAPI","advancedApiModeTrap","methodName","roundToPrecision","number","parmPrecision","tmpPrecision","toFixed","hpf","f2","f3","scale","transformY","y","transformScaleY","setPrecision","getFileId","setFileId","toUpperCase","floor","creationDate","convertDateToPDFDate","parmDate","tzoffset","getTimezoneOffset","tzsign","tzhour","tzmin","timeZoneString","padd2","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","convertPDFDateToDate","parmPDFDate","year","month","date","hour","minutes","seconds","resultingDate","Date","setCreationDate","tmpCreationDateString","regexPDFCreationDate","getCreationDate","padd2Hex","hexString","offsets","content","contentLength","additionalObjects","pages","currentPage","hasCustomDestination","outputDestination","resetDocument","rootDictionaryObjId","newObjectDeferred","resourceDictionaryObjId","setCustomOutputDestination","destination","setOutputDestination","resetCustomOutputDestination","string","write","getArrayBuffer","len","ab","ArrayBuffer","u8","Uint8Array","standardFonts","getStandardFonts","activeFontSize","fontSize","size","R2L","setR2L","getR2L","zoomMode","setZoomMode","zoom","validZoomModes","undefined","getZoomMode","pageMode","setPageMode","pmode","validPageModes","getPageMode","layoutMode","setLayoutMode","layout","validLayoutModes","getLayoutMode","setDisplayMode","documentProperties","subject","author","keywords","creator","getDocumentProperty","getDocumentProperties","setDocumentProperties","setProperties","properties","property","setDocumentProperty","fonts","fontmap","activeFontKey","fontStateStack","patterns","patternMap","gStates","gStatesMap","activeGState","page","pagesContext","events","hotfixes","renderTargets","renderTargetMap","renderTargetStack","pageX","pageY","pageMatrix","sx","shy","shx","sy","tx","ty","_matrix","defineProperty","get","set","atan2","decompose","separator","multiply","f","scaleX","sqrt","shear","scaleY","translate","rotate","skew","inversed","quot","aInv","bInv","cInv","dInv","eInv","fInv","applyToPoint","pt","Point","applyToRectangle","rect","pt1","pt2","w","h","Rectangle","clone","matrixMult","m1","m2","identityMatrix","unitMatrix","addPattern","pattern","prefix","patternKey","addShadingPattern","beginTilingPattern","beginNewRenderTarget","endTilingPattern","pop","restore","newObject","oid","newObjectDeferredBegin","doOutput","newAdditionalObject","objId","obj","decodeColorString","color","colorEncoded","floatVal","parseFloat","colorAsRGB","encodeColorString","ch1","ch2","ch3","ch4","letterArray","pdfColorType","rgbColor","getFilters","putStream","alreadyAppliedFilters","addLength1","valueOfLength1","processedData","keyValues","additionalKeyValues","processDataByFilters","reverseChain","filterAsString","isArray","decodeParmsArray","putPage","pageNumber","pageObjectNumber","pageContentsObjId","contentsObjId","mediaBox","bottomLeftX","bottomLeftY","topRightX","topRightY","cropBox","bleedBox","trimBox","artBox","pageContext","pageContent","putPages","pageObjectNumbers","kids","putFont","font","isAlreadyPutted","postScriptName","encoding","putFonts","fontKey","putXObject","xObject","width","height","putXObjects","xObjectKey","interpolateAndEncodeRGBStream","numberSamples","tValues","dT","offset","unshift","index","aColor","bColor","round","trim","putShadingPattern","funcObjectNumber","putTilingPattern","deferredResourceDictionaryIds","resourcesObjectId","patternObjectId","resourcesOid","objectOid","putPatterns","putGState","putGStates","gStateKey","putXobjectDict","putEncryptionDict","putFontDict","putShadingPatternDict","putTilingPatternDict","putGStatesDict","putResourceDictionary","objectIds","putResources","Number","MAX_SAFE_INTEGER","putAdditionalObjects","addFontToFontDictionary","fontName","addFont","isStandardFont","metadata","instance","addFonts","arrayOfFonts","l","parts","dictionary","SAFE","__safeCall","fn","foo","__safeCallWrapper","stack","m","alert","bar","to8bitStream","text","flags","sourceEncoding","encodingBlock","outputEncoding","newtext","isUnicode","ch","bch","autoencode","codePages","noBOM","pdfEscape","beginPage","_setPage","_addPage","parmFormat","parmOrientation","dimensions","min","setLineWidth","lineWidth","strokeColor","lineCapID","lineJoinID","_deletePage","splice","setPage","getNumberOfPages","getFont","fontNameLowerCase","disableWarning","noFallback","putInfo","version","putCatalog","tmpRootDictionaryObjId","pcn","putTrailer","putHeader","putXRef","buildDocument","offsetOfXRef","getBlob","output","filename","save","dataURI","pdfDocument","unescape","encodeURIComponent","pdfObjectUrl","integrity","htmlForNewWindow","JSON","stringify","nW","pdfJsUrl","htmlForPDFjsNewWindow","PDFjsNewWindow","scope","documentElement","querySelector","contentWindow","PDFViewerApplication","htmlForDataURLNewWindow","dataURLNewWindow","hasHotfix","hotfixName","getEncryptor","getPageInfo","pageNumberOneBased","getPageInfoByObjId","getCurrentPageInfo","addPage","insertPage","beforePage","movePage","targetPage","tmpPages","tmpPagesContext","deletePage","transform","payload","da","angle","align","charSpace","maxWidth","horizontalScale","tmp","transformationMatrix","xtra","isHex","lineHeight","lineHeightFactor","ESC","TabLen","transformTextToSpecialArray","sa","concat","curDa","shift","processTextByFunction","processingFunction","tmpResult","textIsOfTypeString","tmpTextIsOfTypeString","match","descent","baseline","splitTextToSize","reduce","acc","textLine","mutex","PI","rotationDirection","cos","sin","activeCharSpace","setCharSpace","getCharSpace","lang","renderingMode","parmRenderingMode","stroke","usedRenderingMode","leading","pageWidth","pageSize","getWidth","activeFont","lineWidths","assign","wordSpacingPerLine","findWidth","getStringUnitWidth","doKerning","newY","prevWidth","newX","getHorizontalCoordinate","getVerticalCoordinate","backToStartX","spacing","words","shiftAmount","doReversing","posX","posY","reverse","activeFontEncoding","STRING","ARRAY","variant","wordSpacing","generatePosition","parmPosX","parmPosY","parmTransformationMatrix","position","lineIndex","textColor","clip","rule","clipEvenOdd","discardPath","isValidStyle","style","validStyleVariants","setDefaultPathOperation","operator","getStyle","op","close","fill","fillWithOptionalPattern","fillEvenOdd","fillStroke","fillStrokeEvenOdd","fillWithPattern","putStyle","cloneTilingPattern","patternData","patternId","clipRuleFromStyle","setGState","moveTo","lineTo","curveTo","x1","y1","x2","y2","x3","y3","line","lines","closed","scalex","scaley","leg","x4","y4","path","triangle","roundedRect","rx","ry","MyArc","SQRT2","ellipse","lx","ly","circle","setFont","getFontEntry","getFontList","list","encodingOptions","getLineWidth","setLineDash","setLineDashPattern","dashArray","dashPhase","getLineHeight","setLineHeightFactor","getLineHeightFactor","pageHeight","getHorizontalCoordinateString","getVerticalCoordinateString","getStrokeColor","getDrawColor","setStrokeColor","setDrawColor","fillColor","getFillColor","setFillColor","getTextColor","setTextColor","CapJoinStyles","butt","but","miter","rounded","projecting","project","square","bevel","setLineCap","setLineJoin","setLineMiterLimit","setMiterLimit","addGState","duplicate","fontState","setCurrentTransformationMatrix","comment","_x","enumerable","_y","_type","_w","_h","RenderTarget","getPageWidth","setPageWidth","setPageHeight","endFormObject","newXObject","xObjectId","beginFormObject","doFormObject","getFormObject","returnPromise","unload","Promise","resolve","reject","plugin","newEvents","eventname","handler_and_args","getCoordinateString","collections","setWidth","getHeight","setHeight","getPDFVersion","configurable","jsPDFAPI","pdfUnescape","f5","__acroform__","inherit","child","parent","create","constructor","createFormXObject","formObject","xobj","AcroFormXObject","AcroFormAppearance","BBox","setBit","bitPosition","bitMask","clearBit","getBit","getBitForPdf","setBitForPdf","clearBitForPdf","calculateCoordinates","coordinates","lowerLeft_X","lowerLeft_Y","upperRight_X","upperRight_Y","calculateAppearanceStream","appearanceStreamContent","V","DV","_V","calcRes","calculateX","maxFontSize","returnValue","textSplit","multiline","word","lineSpacing","borderPadding","isSmallerThanWidth","lastLine","TextWidth","calculateFontSpace","FieldWidth","FontSize","textHeight","startY","startX","lastY","firstWordInLine","lastWordInLine","lastLength","currWord","lineCount","Line","isWithNewLine","nextLineIsSmaller","isLastWord","currLine","textAlign","acroformPluginTemplate","fields","xForms","acroFormDictionaryRoot","printedOut","isInitialized","annotReferenceCallback","acroformPlugin","Fields","hasAnnotation","createAnnotationReference","putForm","object","findEntry","entry","annotations","find","putCatalogCallback","AcroFormDictionaryCallback","_eventID","createFieldCallback","fieldArray","standardFields","Kids","fieldObject","keyValueList","oldRect","Rect","DA","createDefaultAppearanceStream","getKeyValueListForStream","hasAppearanceStream","appearance","appearanceStreamString","createXFormObjectCallback","initializeAcroForm","AcroFormField","FieldNum","parse","AcroFormDictionary","arrayToPdfArray","array","getMatches","regex","matches","pdfArrayToStringArray","toPdfString","AcroFormPDFObject","_objId","_scope","writable","getOwnPropertyNames","filter","getOwnPropertyDescriptor","_BBox","_stream","_Kids","_DA","_F","Boolean","F","_Ff","_Rect","_FT","_T","AcroFormChildClass","_fontName","_fontStyle","_fontSize","_maxFontSize","_color","AcroFormTextField","_DV","AcroFormButton","_hasAppearanceStream","_page","Ff","_Q","AcroFormChoiceField","FT","_TI","_Opt","getOptions","setOptions","sort","addOption","removeOption","allEntries","combo","AcroFormListBox","AcroFormComboBox","AcroFormEditBox","edit","_MK","CA","_AS","AcroFormPushButton","pushButton","AcroFormRadioButton","radio","_parent","_optionName","caption","appearanceState","_AppearanceType","RadioButton","Circle","createAppearanceStream","optionName","setAppearance","getCA","createOption","Parent","addField","AcroFormCheckBox","CheckBox","_MaxLen","isInteger","AcroFormPasswordField","password","N","On","YesNormal","D","YesPushDown","Off","OffPushDown","encodedColor","DotRadius","Bezier_C","DotRadiusBezier","kc","dc","Cross","cross","calculateCross","AcroForm","ChoiceField","ListBox","ComboBox","EditBox","Button","PushButton","TextField","PasswordField","Appearance","namespace","__addimage__","UNKNOWN","ARRAY_APPLY_BATCH","imageFileTypeHeaders","PNG","TIFF","JPEG","JPEG2000","GIF87a","GIF89a","WEBP","BMP","getImageFileTypeByImageData","imageData","fallbackFormat","headerSchemata","compareResult","fileType","Uint8ClampedArray","isArrayBufferView","putImage","image","colorSpace","color_spaces","INDEXED","palette","sMask","DEVICE_CMYK","bitsPerComponent","decodeParameters","transparency","predictor","arrayBufferToBinaryString","putResourcesCallback","images","putXObjectsDictCallback","checkCompressValue","image_compression","NONE","initialize","getImages","getImageIndex","notDefined","generateAliasFromImageData","sHashCode","isImageTypeSupported","isDOMElement","nodeType","getImageDataFromElement","element","nodeName","hasAttribute","src","getAttribute","tmpImageData","loadFile","mimeType","toDataURL","checkImagesForAlias","alias","determineWidthAndHeight","writeImageToPDF","rotation","dims","coord","vcoord","f4","rotationTransformationMatrix","DEVICE_RGB","DEVICE_GRAY","CAL_GREY","CAL_RGB","LAB","ICC_BASED","PATTERN","SEPARATION","DEVICE_N","decode","DCT_DECODE","FLATE_DECODE","LZW_DECODE","JPX_DECODE","JBIG2_DECODE","ASCII85_DECODE","ASCII_HEX_DECODE","RUN_LENGTH_DECODE","CCITT_FAX_DECODE","FAST","MEDIUM","SLOW","hash","byteLength","validateStringAsBase64","possibleBase64String","extractImageFromDataUrl","dataUrl","dataUrlParts","extractedInfo","charset","supportsArrayBuffer","isArrayBuffer","Uint32Array","Int8Array","Int16Array","Uint16Array","Int32Array","Float32Array","Float64Array","binaryStringToUint8Array","binary_string","buffer","buf","subarray","addImage","compression","processImageData","dataAsBinaryString","convertBase64ToBinaryString","stringData","throwError","base64Info","rawData","getImageProperties","notEmpty","addPageData","pageInfo","putPageData","pageAnnos","anno","found","escape","objText","objPopup","encryptorText","bounds","contents","popoff","loc","_nameMap","top","finalBounds","info","magFactor","left","createAnnotation","link","textWithLink","totalLineWidth","getTextWidth","linkHeight","linkWidth","numOfLines","ceil","txtWidth","arabicSubstitionA","ligatures","arabic_diacritics","alfletter","noChangeInForm","isolatedForm","finalForm","initialForm","medialForm","__arabicParser__","isInArabicSubstitutionA","isArabicLetter","isArabicEndLetter","isArabicAlfLetter","arabicLetterHasIsolatedForm","arabicLetterHasFinalForm","arabicLetterHasInitialForm","arabicLetterHasMedialForm","resolveLigatures","letters","tmpLigatures","effectedLetters","isArabicDiacritic","getCorrectForm","currentChar","beforeChar","nextChar","parseArabic","currentLetter","prevLetter","nextLetter","newWords","processArabic","tmpText","autoPrint","refAutoPrintTag","addJS","Canvas","jsPdfInstance","_width","getContext","pageWrapXEnabled","pageWrapX","_height","pageWrapYEnabled","pageWrapY","_childNodes","_style","contextType","contextAttributes","pdf","context2d","_canvas","canvas","NO_MARGINS","bottom","right","px2pt","printingHeaderRow","_initialize","__cell__","headerFunction","margins","_reset","lastCell","Cell","_text","_lineNumber","_align","lineNumber","toArray","setHeaderFunction","func","getTextDimensions","amountOfLines","tempWidth","max","cellAddPage","cell","currentCell","tableHeaderRow","printHeaders","printHeaderRow","table","headers","config","headerNames","headerLabels","headerAligns","columnMatrix","columnWidths","column","columnMinWidths","tableHeaderConfigs","autoSize","css","headerBackgroundColor","headerTextColor","table_font_size","header","prompt","headerName","rec","row","rowHeight","calculateLineHeight","setTableHeaderRow","pv","cv","rowStart","Function","cellData","cellStart","col","table_x","table_y","model","new_page","tableHeaderCell","tempHeaderConf","currentTextColor","toLookup","arr","lookup","fontStyleOrder","italic","oblique","normal","fontStretchOrder","fontStretchLookup","fontWeights","fontWeightsLookup","normalizeFontStretch","stretch","normalizeFontStyle","normalizeFontWeight","weight","normalizeFontFace","fontFace","family","ref","buildFontFaceMap","fontFaces","normalized","searchFromPivot","matchingSet","order","pivot","dir","resolveFontStretch","resolveFontStyle","ordering","resolveFontWeight","defaultGenericFontFamilies","fixed","monospace","terminal","cursive","fantasy","serif","systemFonts","icon","menu","ruleToString","resolveFontFace","fontFaceMap","rules","defaultFontFamily","genericFontFamilies","eatWhiteSpace","input","trimLeft","parseQuotedFontFamily","quote","current","parseNonQuotedFontFamily","defaultFont","parseFontFamily","parsed","remaining","ContextLayer","ctx","isStrokeTransparent","strokeOpacity","strokeStyle","fillStyle","isFillTransparent","fillOpacity","textBaseline","lineJoin","lineCap","globalCompositeOperation","globalAlpha","clip_path","currentPoint","miterLimit","lastPoint","lineDashOffset","lineDash","margin","prevPageLastElemOffset","ignoreClearRect","_ctx","Context2D","parentNode","_pdf","_pageWrapXEnabled","_pageWrapYEnabled","_posX","_posY","_autoPaging","lastBreak","pageBreaks","_ctxStack","rgba","getRGBA","_fontFaceMap","getFontFaceMap","fontMap","convertedFontFaces","convertToFontFaces","styles","_fontFaces","fontVariant","fontFamily","rxFontSize","fontSizeUnit","jsPdfFontName","fallbackFonts","arial","Arial","verdana","Verdana","helvetica","Helvetica","getLineDash","pathPreProcess","beginPath","closePath","pathBegin","quadraticCurveTo","cpx","cpy","pt0","bezierCurveTo","cp1x","cp1y","cp2x","cp2y","arc","radius","startAngle","endAngle","counterclockwise","isIdentity","xpt","x_radPt","x_radPt0","pow","arcTo","fillRect","strokeRect","clearRect","doStackPush","tmpPageNumber","ctxStack","doStackPop","rxRgb","rxRgba","rxTransparent","isCanvasGradient","getColor","fillText","degs","rad2deg","putText","strokeText","measureText","TextMetrics","scalewidth","scaleheight","setTransform","hasMargins","drawImage","img","swidth","sheight","imageProperties","factorX","factorY","clipFactorX","clipFactorY","decomposedTransformationMatrix","xRect","pageArray","getPagesByPath","sortPages","clipPath","autoPaging","pageWidthMinusMargins","topMargin","firstPageHeight","pageHeightMinusMargins","previousPageHeightSum","tmpPaths","pathPositionRedo","drawPaths","tmpRect","needsClipping","yOffset","rectOfQuadraticCurve","getQuadraticCurveBoundary","rectOfBezierCurve","getBezierCurveBoundary","paths","isClip","oldLineWidth","origPath","xPath","tmpPath","moves","delta","begin","start","deltas","iii","began","arcs","drawArc","drawLine","drawLines","doClip","getBaseline","getTextBottom","yBaseLine","createLinearGradient","canvasGradient","colorStops","addColorStop","createPattern","createRadialGradient","includeMove","curves","createArc","curve","doMove","drawCurve","textDimensions","yBottom","yTop","baselineRect","textBounds","oldSize","pageHeightMinusBottomMargin","pageWidthMinusRightMargin","textBoundsOnPage","doSlice","croppedText","baseLineRectOnPage","prevX","prevY","anticlockwise","EPSILON","twoPi","halfPi","totalAngle","sgn","remain","createSmallArc","q1","q2","k2","ar","cos_ar","sin_ar","ey","midX1","midY1","midX2","midY2","resultX1","resultX2","resultY1","resultY2","ax","ay","bx","by","cx","cy","dx","dy","tobx","toby","tocx","tocy","todx","tody","px","py","qx","qy","minx","miny","maxx","maxy","toqx","toqy","torx","tory","totx","toty","getPrevLineDashValue","prevLineDash","nextLineDash","u16","i32","fleb","fdeb","clim","freb","eb","_a","fl","revfl","_b","fd","revfd","rev","hMap","cd","mb","le","co","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","o","bits16","shft","slc","ec","err","ind","msg","nt","code","captureStackTrace","inflt","dat","st","dict","sl","noBuf","resize","noSt","cbuf","bl","nbuf","final","pos","bt","lm","dm","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","dt","lms","dms","lpos","sym","add","dsym","end","dend","wbits","wbits16","hTree","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","lft","cst","i2_1","i2_2","i2_3","lc","cl","cli","cln","cls","clen","cf","wfblk","wblk","syms","lf","df","li","bs","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","flen","ftlen","dtlen","ll","llm","lcts","it","clct","dst","deo","dflt","lvl","plvl","pre","post","z","lst","opt","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","maxd","ml","nl","mmd","md","ti","pti","lin","din","adler","dopt","newDat","level","mem","wbytes","zlh","lv","zls","zlibSync","unzlibSync","td","TextDecoder","tds","ASCII85Encode","ASCII85Decode","ASCIIHexEncode","ASCIIHexDecode","regexCheckIfHex","RegExp","FlateEncode","origData","filterChain","sync","browserRequest","loadImageFile","request","sanitizeUnicode","dataLength","charArray","StringFromCharCode","overrideMimeType","responseText","loadHtml2Canvas","exports","module","require","define","amd","catch","then","html2canvas","default","loadDomPurify","dompurify","objType","tagName","el","className","innerHTML","sanitize","cloneNode","javascriptEnabled","createTextNode","nodeValue","firstChild","nextSibling","appendChild","addEventListener","scrollTop","scrollLeft","Worker","root","convert","template","setProgress","promise","__proto__","prop","container","overlay","progress","val","enableLinks","backgroundColor","from","getType","from_main","to","toContainer","toCanvas","toImg","toPdf","prereqs","checkSrc","checkPageSize","setPageSize","thenList","toContainer_main","overlayCSS","overflow","zIndex","containerCSS","display","windowWidth","clientWidth","scrollWidth","offsetWidth","source","scrollHeight","offsetHeight","clientHeight","clear","border","float","checkContainer","contains","toCanvas_main","onrendered","toCanvas_post","onRendered","removeChild","toContext2d","toContext2d_main","async","allowTaint","scrollX","scrollY","imageTimeout","logging","proxy","removeContainer","foreignObjectRendering","useCORS","windowHeight","toContext2d_post","checkCanvas","toImg_main","imgData","quality","checkContext2d","toPdf_main","outputImg","outputPdf","checkPdf","outputPdf_main","checkImg","outputImg_main","save_main","doCallback","doCallback_main","fns","set_prop","setMargin","set_jsPDF","set_opt","set_main","cbk","get_main","setMargin_main","toPx","setPageSize_main","getPageSize","inner","ratio","updateProgress","onFulfilled","onRejected","thenCore","then_main","then_pre","then_post","thenBase","isNative","selfPromise","returnVal","thenExternal","thenList_forEach","catchExternal","error_main","using","export","run","format_as_string","html","worker","jsNamesObj","jsJsObj","javascript","namesOid","outline","children","render","createNamedDestinations","totalPages","dests","names2Oid","makeRef","item","genIds_r","renderRoot","renderItems","objStart","count_r","objEnd","makeString","markers","getJpegInfo","numcomponents","blockLength","processJPEG","bpc","APNG_BLEND_OP_SOURCE","APNG_DISPOSE_OP_BACKGROUND","APNG_DISPOSE_OP_PREVIOUS","makeImage","scratchCanvas","scratchCtx","chunkSize","palLen","delayDen","delayNum","frame","section","palShort","_i","_j","_ref","animation","readUInt32","_results","colorType","compressionMethod","filterMethod","interlaceMethod","numFrames","numPlays","Infinity","frames","read","xOffset","readUInt16","delay","disposeOp","blendOp","indexed","grayscale","rgb","hasAlphaChannel","pixelBitlength","decodePixels","pixelBytes","fullPixels","_this","pass","x0","y0","abyte","pa","paeth","pb","pc","pixels","scanlineLength","upper","upperLeft","_k","_l","_m","isFull","fullPos","partPos","decodePalette","ret","_ref1","copyToImageData","alpha","_decodedPalette","hasBrowserCanvas","putImageData","Image","decodeFrames","_len","createImageData","renderFrame","animate","doFrame","frameNumber","_timeout","stopAnimation","clearTimeout","_png","canCompress","hasCompressionJS","compressBytes","lineLength","colorsPerPixel","filter_method","filterUp","filterSub","filterAverage","filterPaeth","applyPngFilterMethod","filter_methods","getFilterMethods","prevLine","results","getIndexOfSmallestSum","filterNone","up","upLeft","paethPredictor","pLeft","pUp","pUpLeft","arrays","sum","getPredictorFromCompression","processPNG","trns","pal","smask","alphaData","hasColors","pixel","pDiff","pbl","trans","total","GifReader","pf0","global_palette_flag","num_global_colors_pow2","num_global_colors","background","global_palette_offset","global_palette_size","no_eof","transparent_index","disposal","loop_count","block_size","pf1","pf2","local_palette_flag","interlace_flag","num_local_colors_pow2","num_local_colors","palette_offset","palette_size","has_local_palette","data_offset","data_length","interlaced","loopCount","frameInfo","frame_num","decodeAndBlitFrameBGRA","num_pixels","index_stream","GifReaderLZWOutputIndexStream","framewidth","framestride","xleft","opbeg","opend","scanstride","interlaceskip","il","decodeAndBlitFrameRGBA","code_stream","output_length","min_code_size","clear_code","eoi_code","next_code","cur_code_size","code_mask","cur_shift","cur","subblock_size","code_table","prev_code","chase_code","chase_length","chase","op_end","JPEGEncoder","ffloor","YTable","UVTable","fdtbl_Y","fdtbl_UV","YDC_HT","UVDC_HT","YAC_HT","UVAC_HT","bitcode","category","outputfDCTQuant","DU","byteout","bytenew","bytepos","YDU","UDU","VDU","RGB_YUV_TABLE","currentQuality","ZigZag","std_dc_luminance_nrcodes","std_dc_luminance_values","std_ac_luminance_nrcodes","std_ac_luminance_values","std_dc_chrominance_nrcodes","std_dc_chrominance_values","std_ac_chrominance_nrcodes","std_ac_chrominance_values","initQuantTables","sf","YQT","UVQT","u","aasf","computeHuffmanTbl","nrcodes","std_table","codevalue","pos_in_table","HT","initHuffmanTbl","initCategoryNumber","nrlower","nrupper","cat","nr","nrneg","initRGBYUVTable","writeBits","posval","writeByte","writeWord","fDCTQuant","fdtbl","d0","d1","d2","d3","d4","d5","d6","d7","dataOff","I8","I64","tmp0","tmp7","tmp1","tmp6","tmp2","tmp5","tmp3","tmp4","tmp10","tmp13","tmp11","tmp12","z1","z5","z2","z4","z3","z11","z13","tmp0p2","tmp7p2","tmp1p2","tmp6p2","tmp2p2","tmp5p2","tmp3p2","tmp4p2","tmp10p2","tmp13p2","tmp11p2","tmp12p2","z1p2","z5p2","z2p2","z4p2","z3p2","z11p2","z13p2","writeAPP0","writeSOF0","writeDQT","writeDHT","writeSOS","processDU","CDU","DC","HTDC","HTAC","EOB","M16zeroes","I16","I63","DU_DCT","Diff","end0pos","lng","startpos","nrzeroes","nrmarker","initCharLookupTable","sfcc","encode","setQuality","DCY","DCU","DCV","displayName","quadWidth","fillbits","init","processGIF89A","qu","rawImageData","encoder","processGIF87A","BmpDecoder","is_with_alpha","datav","DataView","bottom_up","flag","parseHeader","parseBGR","fileSize","getUint32","reserved","headerSize","getInt32","planes","getUint16","bitPP","rawSize","hr","vr","importantColors","getUint8","quad","bitn","bit1","xlen","mode","bit4","before","after","bit8","bit15","dif_w","_11111","_1_5","B","bit16","_111111","_1_6","bit24","bit32","getData","processBMP","WebPDecoder","fa","L","J","H","I","Z","M","wa","wb","Ed","ma","_WebPDecoder","Fd","Ub","G","jc","Qb","qb","nd","pd","xb","Ca","Ka","oa","Jd","Yc","Zc","Qa","na","K","ca","cb","Sb","Ra","bb","Vb","ob","db","Gd","Hd","Wb","Sa","Xb","Id","ra","Ta","Yb","Ha","Zb","X","Mb","Xa","$b","ac","bc","xa","yb","ud","hd","jd","aa","Ia","cc","Kd","Ld","Ea","Md","Nd","Od","Pd","Qd","fb","gb","hb","zb","Ab","Ja","Bb","Rd","A","Sd","ea","Tc","Cd","lb","Db","W","Cb","S","RGBA","kb","sd","Td","Ud","ib","bd","Da","Vd","T","Wd","ba","ka","Mc","Nc","fc","Rc","Xd","ya","Kb","za","gc","Ua","Va","memory","Ib","Jb","hc","Oa","ic","Aa","Yd","Ba","Wa","Zd","$d","ae","ta","Eb","be","ga","ce","Dc","mc","nc","de","ua","ub","ha","xc","vc","Ya","oc","C","ee","E","Q","fe","qc","Fb","rc","ge","va","Ma","sc","Gb","tc","uc","Hb","wc","yc","zc","qd","rd","ia","tb","he","$","Pb","wd","xd","vb","ie","Ac","Bc","je","Cc","VP8LMapColor32b","ke","VP8LMapColor8b","rb","Oc","R","me","qa","Y","la","ja","Fa","ne","sb","La","Za","$a","jb","oe","pe","nb","qe","Pa","Ga","Na","Ec","se","Fc","te","ue","yd","Rb","ve","we","Lb","Gc","xe","Wc","Xc","ye","Pc","Tb","zd","vd","od","ld","dd","Hc","ze","Sc","Qc","ad","Ob","Ad","Dd","Ae","Nb","Ic","Be","Kc","ed","$c","Jc","Bd","gd","Uc","Vc","put","Ce","De","Ee","Fe","Ge","He","Ie","Lc","Je","Ke","Le","Me","Ne","Oe","Pe","Qe","Re","Se","Te","Ue","Ve","We","Xe","Ye","Ze","$e","af","bf","ef","gf","hf","jf","kf","mf","nf","of","pf","qf","rf","tf","uf","vf","wf","xf","yf","zf","Af","Bf","kd","Cf","Df","Ef","Gf","Hf","If","Jf","Kf","Lf","Mf","Nf","Of","Pf","Predictor0","Predictor1","Predictor2","Predictor3","Predictor4","Predictor5","Predictor6","Predictor7","Predictor8","Predictor9","Predictor10","Predictor11","Predictor12","Predictor13","PredictorAdd0","PredictorAdd1","PredictorAdd2","ColorIndexInverseTransform","MapARGB","VP8LColorIndexInverseTransformAlpha","MapAlpha","VP8LPredictorsAdd","VP8LPredictors","VP8LPredictorsAdd_C","VP8LPredictors_C","UpsampleRgbLinePair","UpsampleBgrLinePair","UpsampleRgbaLinePair","UpsampleBgraLinePair","UpsampleArgbLinePair","UpsampleRgba4444LinePair","UpsampleRgb565LinePair","Qf","WebPDecodeRGBA","memcmp","data_off","GetTag","GetLE16","GetLE24","GetLE32","WebPRiffParser","src_off","imagearray","alpha_chunk","alpha_size","alpha_offset","riff_size","fourcc","payload_size","payload_size_padded","feature_flags","src_off_","canvas_width","canvas_height","bgcolor","offset_x","offset_y","duration","blend","dispose","temp","webpdecoder","processWEBP","processRGBA","imagePixels","rgbOut","alphaOut","outIndex","alphaIndex","rgbData","setLanguage","langCode","langCodes","sq","an","hy","as","ast","az","eu","bn","br","bg","my","zh","cr","cs","en","eo","fo","fj","fi","fr","fy","fur","gl","gu","ht","hi","hu","is","iu","kn","ks","kk","km","ky","tlh","ko","mk","ms","mt","mi","mr","mo","nv","ng","no","nn","or","om","pl","rm","ro","ru","sz","sg","si","sr","sk","so","es","sw","tt","th","tig","ts","tn","tk","uk","hsb","ur","vi","vo","xh","ji","zu","languageSettings","isSubscribed","languageCode","getCharWidthsArray","widths","Unicode","widthsFractionOf","fof","kerning","kerningFractionOf","kerningValue","char_code","prior_char_code","default_char_width","widthOfString","widthOfGlyph","characterToGlyph","splitLongWord","widths_array","firstLineMaxLen","maxLen","answer","workingLen","startOfLine","splitParagraphIntoLines","maxlen","line_length","textIndent","separator_length","current_word_length","spaceCharWidth","lineIndent","pad","wrds","wrd","idx","postProcess","fsize","newOptions","paragraphs","fontUnit_maxLen","__fontmetrics__","decoded","encoded","mappingUncompress","mappingCompress","vals","keystring","valuestring","numberprefix","uncompress","sign","stringparts","activeobject","parentchain","parent_key_pair","keyparts","valueparts","datalen","WinAnsiEncoding","encodings","Courier","fontMetrics","Symbol","ZapfDingbats","metrics","file","TTFFont","glyIdsUsed","existsFileInVFS","getFileFromVFS","loadCanvg","canvg","addSvgAsImage","svg","ignoreMouse","ignoreAnimation","ignoreDimensions","doc","fromString","putTotalPages","pageExpression","replaceExpression","totalNumberOfPages","pdfEscape16","viewerPreferences","doReset","configuration","configurationTemplate","HideToolbar","defaultValue","explicitSet","valueSet","HideMenubar","HideWindowUI","FitWindow","CenterWindow","DisplayDocTitle","NonFullScreenPageMode","Direction","ViewArea","ViewClip","PrintArea","PrintClip","PrintScaling","Duplex","PickTrayByPDFSize","PrintPageRange","NumCopies","configurationKeys","rangeArray","isValid","method","arrayContainsElement","iterator","viewerpreferences","pdfDict","vPref","postPutResources","xmpmeta_beginning","rdf_beginning","__metadata__","namespaceuri","rdf_ending","xmpmeta_ending","utf8_xmpmeta_beginning","utf8_rdf_beginning","utf8_metadata","utf8_rdf_ending","utf8_xmpmeta_ending","total_len","metadata_object_number","addMetadata","padz","toUnicode","toUnicodeCmap","codes","range","unicode","unicodeMap","identityHFunction","subset","pdfOutput","pdfOutput2","fontTable","cmap","cmapData","fontDescriptor","PDFObject","bbox","stemV","italicAngle","ascender","decender","capHeight","DescendantFont","winAnsiEncodingFunction","hmtx","unitsPerEm","utf8TextFunction","cmapConfirm","strText","codeMap","utf8EscapeFunction","parms","_initializeVFS","vFS","addFileToVFS","filecontent","bidiUnicodeTypes","__bidiEngine__","_UNICODE_TYPES","_bidiUnicodeTypes","_STATE_TABLE_LTR","_STATE_TABLE_RTL","_TYPE_NAMES_MAP","EN","AN","_UNICODE_RANGES_MAP","_SWAP_TABLE","_LTR_RANGES_REG_EXPR","_lastArabic","_hasUbatB","_hasUbatS","DIR_LTR","DIR_RTL","_isInVisual","_isInRtl","_isOutVisual","_isOutRtl","_isSymmetricSwapping","_dir","_init","sourceToTargetMap","_isContextualDirRtl","_getCharType","rangeIdx","charType","_resolveCharType","chars","types","resolvedTypes","cType","wType","nType","rtlCandidate","_handleUbatS","levels","_invertString","_computeLevels","hiLevel","params","action","condition","newLevel","prevState","condPos","newState","stateTable","_invertByLevel","high","low","_symmetricSwap","_reorder","doBidiReorder","isSymmetricSwappingOrig","isInputVisual","isOutputVisual","isInputRtl","isOutputRtl","isSymmetricSwapping","bidiEngine","bidiEngineFunction","Data","readString","Subset","registerTTF","directory","Directory","HeadTable","NameTable","CmapTable","hhea","HheaTable","maxp","MaxpTable","HmtxTable","PostTable","os2","OS2Table","loca","LocaTable","glyf","GlyfTable","exists","lineGap","xMin","yMin","xMax","yMax","raw","italic_angle","xHeight","familyClass","isSerif","isScript","isFixedPitch","character","glyph","forGlyph","advance","includeGap","gap","readByte","writeUInt32","readInt32","int","writeInt32","writeUInt16","readInt16","writeInt16","writeString","readShort","writeShort","readLongLong","writeLongLong","readInt","writeInt","checksum","scalarType","tableCount","searchRange","entrySelector","rangeShift","tables","tag","adjustment","directoryLength","headOffset","log2","tableData","__slice","Table","__hasProp","__extends","ctor","__super__","_super","revision","checkSumAdjustment","magicNumber","created","modified","macStyle","lowestRecPPEM","fontDirectionHint","indexToLocFormat","glyphDataFormat","CmapEntry","endCode","glyphId","glyphIds","idDelta","idRangeOffset","saveOffset","segCount","segCountX2","startCode","platformID","encodingID","language","charmap","charMap","diff","endCodes","glyphIDs","indexes","last","nextID","old","rangeOffsets","startCodes","startGlyph","subtable","_len1","_len2","_len3","_len4","_len5","_len6","_len7","_n","_name","_o","_p","_q","new","maxGlyphID","LN2","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","metricDataFormat","numberOfMetrics","averageCharWidth","weightClass","widthClass","ySubscriptXSize","ySubscriptYSize","ySubscriptXOffset","ySubscriptYOffset","ySuperscriptXSize","ySuperscriptYSize","ySuperscriptXOffset","ySuperscriptYOffset","yStrikeoutSize","yStrikeoutPosition","panose","charRange","vendorID","selection","firstCharIndex","lastCharIndex","ascent","winAscent","winDescent","codePageRange","defaultChar","breakChar","maxContext","numberOfGlyphs","underlinePosition","underlineThickness","minMemType42","maxMemType42","minMemType1","maxMemType1","glyphNameIndex","names","_results1","numGlyphs","NameEntry","languageID","entries","stringOffset","strings","nameID","copyright","fontSubfamily","uniqueSubfamily","postscriptName","trademark","manufacturer","designer","description","vendorUrl","designerUrl","license","licenseUrl","preferredFamily","preferredSubfamily","compatibleFull","sampleText","maxPoints","maxContours","maxCompositePoints","maxComponentContours","maxZones","maxTwilightPoints","maxStorage","maxFunctionDefs","maxInstructionDefs","maxStackElements","maxSizeOfInstructions","maxComponentElements","maxComponentDepth","lsbCount","lsb","leftSideBearings","cache","glyphFor","numberOfContours","lengthOf","CompoundGlyph","SimpleGlyph","glyphs","mapping","old2new","compound","ARG_1_AND_2_ARE_WORDS","MORE_COMPONENTS","WE_HAVE_AN_X_AND_Y_SCALE","WE_HAVE_A_SCALE","WE_HAVE_A_TWO_BY_TWO","glyphOffsets","activeGlyphs","glyfPtr","listGlyf","newLocaTable","invert","unicodes","next","generateCmap","roman","unicodeCmap","glyphsFor","additionalIDs","glyID","ids","new2old","newIDs","nextGlyphID","oldID","oldIDs","items","isString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAO,IAAIA,YAAY,GAAI,YAAW;EACpC,SAAO,gBAAgB,OAAOC,MAAvB,GACHA,MADG,GAEH,gBAAgB,OAAOC,MAAvB,GACAA,MADA,GAEA,gBAAgB,OAAOC,IAAvB,GACAA,IADA,GAEA,IANJ;EAOD,CARyB,EAAnB;;ECEP,SAASC,UAAT,GA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AAkBS,GAAlB,CAA3B;EACD;;EACDvvD,MAAAA,GAAG,CAAC8B,IAAJ,CAAS,IAAT;EACA,aAAO9B,GAAG,CAACjB,IAAJ,CAAS,IAAT,CAAP;EACD,KARM,MAQA;EACL,aAAO,KAAK41B,MAAZ;EACD;EACF,GAvCD;;EAwCA,SAAOg/D,SAAP;EACD,CApDqB,EAAtB;;;;;;;;;;;;;;;;;;;;;;"}
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.umd.min.js
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.umd.min.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.umd.min.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,398 @@
+/** @license
+ *
+ * jsPDF - PDF Document creation from JavaScript
+ * Version 2.5.2 Built on 2024-09-17T13:29:57.856Z
+ *                      CommitID 00000000
+ *
+ * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
+ *               2015-2021 yWorks GmbH, http://www.yworks.com
+ *               2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
+ *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
+ *               2010 Aaron Spike, https://github.com/acspike
+ *               2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2012 Pablo Hess, https://github.com/pablohess
+ *               2012 Florian Jenett, https://github.com/fjenett
+ *               2013 Warren Weckesser, https://github.com/warrenweckesser
+ *               2013 Youssef Beddad, https://github.com/lifof
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2013 Stefan Slonevskiy, https://github.com/stefslon
+ *               2013 Jeremy Morel, https://github.com/jmorel
+ *               2013 Christoph Hartmann, https://github.com/chris-rock
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Makes, https://github.com/dollaruw
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 Steven Spungin, https://github.com/Flamenco
+ *               2014 Kenneth Glassey, https://github.com/Gavvers
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Contributor(s):
+ *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
+ *    kim3er, mfo, alnorth, Flamenco
+ */
+
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).jspdf={})}(this,(function(t){"use strict";function e(t){return(e="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})(t)}var r=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}();function n(){r.console&&"function"==typeof r.console.log&&r.console.log.apply(r.console,arguments)}var i={log:n,warn:function(t){r.console&&("function"==typeof r.console.warn?r.console.warn.apply(r.console,arguments):n.call(null,arguments))},error:function(t){r.console&&("function"==typeof r.console.error?r.console.error.apply(r.console,arguments):n(t))}};function a(t,e,r){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){l(n.response,e,r)},n.onerror=function(){i.error("could not download file")},n.send()}function o(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function s(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 c,u,l=r.saveAs||("object"!==("undefined"==typeof window?"undefined":e(window))||window!==r?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,n){var i=r.URL||r.webkitURL,c=document.createElement("a");e=e||t.name||"download",c.download=e,c.rel="noopener","string"==typeof t?(c.href=t,c.origin!==location.origin?o(c.href)?a(t,e,n):s(c,c.target="_blank"):s(c)):(c.href=i.createObjectURL(t),setTimeout((function(){i.revokeObjectURL(c.href)}),4e4),setTimeout((function(){s(c)}),0))}:"msSaveOrOpenBlob"in navigator?function(t,r,n){if(r=r||t.name||"download","string"==typeof t)if(o(t))a(t,r,n);else{var c=document.createElement("a");c.href=t,c.target="_blank",setTimeout((function(){s(c)}))}else navigator.msSaveOrOpenBlob(function(t,r){return void 0===r?r={autoBom:!1}:"object"!==e(r)&&(i.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(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,n),r)}:function(t,n,i,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof t)return a(t,n,i);var s="application/octet-stream"===t.type,c=/constructor/i.test(r.HTMLElement)||r.safari,u=/CriOS\/[\d]+/.test(navigator.userAgent);if((u||s&&c)&&"object"===("undefined"==typeof FileReader?"undefined":e(FileReader))){var l=new FileReader;l.onloadend=function(){var t=l.result;t=u?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=t:location=t,o=null},l.readAsDataURL(t)}else{var h=r.URL||r.webkitURL,f=h.createObjectURL(t);o?o.location=f:location.href=f,o=null,setTimeout((function(){h.revokeObjectURL(f)}),4e4)}});
+/**
+   * A class to parse color values
+   * @author Stoyan Stefanov <sstoo@gmail.com>
+   * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
+   * @license Use it if you like it
+   */function h(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}}
+/**
+   * @license
+   * Joseph Myers does not specify a particular license for his work.
+   *
+   * Author: Joseph Myers
+   * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
+   *
+   * Modified by: Owen Leong
+   */
+function f(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];r=p(r,n,i,a,e[0],7,-680876936),a=p(a,r,n,i,e[1],12,-389564586),i=p(i,a,r,n,e[2],17,606105819),n=p(n,i,a,r,e[3],22,-1044525330),r=p(r,n,i,a,e[4],7,-176418897),a=p(a,r,n,i,e[5],12,1200080426),i=p(i,a,r,n,e[6],17,-1473231341),n=p(n,i,a,r,e[7],22,-45705983),r=p(r,n,i,a,e[8],7,1770035416),a=p(a,r,n,i,e[9],12,-1958414417),i=p(i,a,r,n,e[10],17,-42063),n=p(n,i,a,r,e[11],22,-1990404162),r=p(r,n,i,a,e[12],7,1804603682),a=p(a,r,n,i,e[13],12,-40341101),i=p(i,a,r,n,e[14],17,-1502002290),r=g(r,n=p(n,i,a,r,e[15],22,1236535329),i,a,e[1],5,-165796510),a=g(a,r,n,i,e[6],9,-1069501632),i=g(i,a,r,n,e[11],14,643717713),n=g(n,i,a,r,e[0],20,-373897302),r=g(r,n,i,a,e[5],5,-701558691),a=g(a,r,n,i,e[10],9,38016083),i=g(i,a,r,n,e[15],14,-660478335),n=g(n,i,a,r,e[4],20,-405537848),r=g(r,n,i,a,e[9],5,568446438),a=g(a,r,n,i,e[14],9,-1019803690),i=g(i,a,r,n,e[3],14,-187363961),n=g(n,i,a,r,e[8],20,1163531501),r=g(r,n,i,a,e[13],5,-1444681467),a=g(a,r,n,i,e[2],9,-51403784),i=g(i,a,r,n,e[7],14,1735328473),r=m(r,n=g(n,i,a,r,e[12],20,-1926607734),i,a,e[5],4,-378558),a=m(a,r,n,i,e[8],11,-2022574463),i=m(i,a,r,n,e[11],16,1839030562),n=m(n,i,a,r,e[14],23,-35309556),r=m(r,n,i,a,e[1],4,-1530992060),a=m(a,r,n,i,e[4],11,1272893353),i=m(i,a,r,n,e[7],16,-155497632),n=m(n,i,a,r,e[10],23,-1094730640),r=m(r,n,i,a,e[13],4,681279174),a=m(a,r,n,i,e[0],11,-358537222),i=m(i,a,r,n,e[3],16,-722521979),n=m(n,i,a,r,e[6],23,76029189),r=m(r,n,i,a,e[9],4,-640364487),a=m(a,r,n,i,e[12],11,-421815835),i=m(i,a,r,n,e[15],16,530742520),r=v(r,n=m(n,i,a,r,e[2],23,-995338651),i,a,e[0],6,-198630844),a=v(a,r,n,i,e[7],10,1126891415),i=v(i,a,r,n,e[14],15,-1416354905),n=v(n,i,a,r,e[5],21,-57434055),r=v(r,n,i,a,e[12],6,1700485571),a=v(a,r,n,i,e[3],10,-1894986606),i=v(i,a,r,n,e[10],15,-1051523),n=v(n,i,a,r,e[1],21,-2054922799),r=v(r,n,i,a,e[8],6,1873313359),a=v(a,r,n,i,e[15],10,-30611744),i=v(i,a,r,n,e[6],15,-1560198380),n=v(n,i,a,r,e[13],21,1309151649),r=v(r,n,i,a,e[4],6,-145523070),a=v(a,r,n,i,e[11],10,-1120210379),i=v(i,a,r,n,e[2],15,718787259),n=v(n,i,a,r,e[9],21,-343485551),t[0]=S(r,t[0]),t[1]=S(n,t[1]),t[2]=S(i,t[2]),t[3]=S(a,t[3])}function d(t,e,r,n,i,a){return e=S(S(e,t),S(n,a)),S(e<<i|e>>>32-i,r)}function p(t,e,r,n,i,a,o){return d(e&r|~e&n,t,e,i,a,o)}function g(t,e,r,n,i,a,o){return d(e&n|r&~n,t,e,i,a,o)}function m(t,e,r,n,i,a,o){return d(e^r^n,t,e,i,a,o)}function v(t,e,r,n,i,a,o){return d(r^(e|~n),t,e,i,a,o)}function b(t){var e,r=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)f(n,y(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(f(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*r,f(n,i),n}function y(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}c=r.atob.bind(r),u=r.btoa.bind(r);var w="0123456789abcdef".split("");function N(t){for(var e="",r=0;r<4;r++)e+=w[t>>8*r+4&15]+w[t>>8*r&15];return e}function L(t){return String.fromCharCode((255&t)>>0,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function A(t){return function(t){return t.map(L).join("")}(b(t))}var x="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e<t.length;e++)t[e]=N(t[e]);return t.join("")}(b("hello"));function S(t,e){if(x){var r=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(r>>16)<<16|65535&r}return t+e&4294967295}
+/**
+   * @license
+   * FPDF is released under a permissive license: there is no usage restriction.
+   * You may embed it freely in your application (commercial or not), with or
+   * without modifications.
+   *
+   * Reference: http://www.fpdf.org/en/script/script37.php
+   */function _(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=[],c=0;c<256;c++)s[c]=c;var u=0;for(c=0;c<256;c++){var l=s[c];u=(u+l+o.charCodeAt(c))%256,s[c]=s[u],s[u]=l}r=t,n=s}else s=n;var h=e.length,f=0,d=0,p="";for(c=0;c<h;c++)d=(d+(l=s[f=(f+1)%256]))%256,s[f]=s[d],s[d]=l,o=s[(s[f]+s[d])%256],p+=String.fromCharCode(e.charCodeAt(c)^o);return p}
+/**
+   * @license
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   * Author: Owen Leong (@owenl131)
+   * Date: 15 Oct 2020
+   * References:
+   * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
+   * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
+   * http://www.fpdf.org/en/script/script37.php
+   */var P={print:4,modify:8,copy:16,"annot-forms":32};function k(t,e,r,n){this.v=1,this.r=2;var i=192;t.forEach((function(t){if(void 0!==P.perm)throw new Error("Invalid permission: "+t);i+=P[t]})),this.padding="(¿N^NuAd\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=A(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=_(this.encryptionKey,this.padding)}function F(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);if(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)e+="#"+("0"+i.toString(16)).slice(-2);else e+=t[n]}return e}function I(t){if("object"!==e(t))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var n={};this.subscribe=function(t,e,r){if(r=r||!1,"string"!=typeof t||"function"!=typeof e||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");n.hasOwnProperty(t)||(n[t]={});var i=Math.random().toString(35);return n[t][i]=[e,!!r],i},this.unsubscribe=function(t){for(var e in n)if(n[e][t])return delete n[e][t],0===Object.keys(n[e]).length&&delete n[e],!0;return!1},this.publish=function(e){if(n.hasOwnProperty(e)){var a=Array.prototype.slice.call(arguments,1),o=[];for(var s in n[e]){var c=n[e][s];try{c[0].apply(t,a)}catch(t){r.console&&i.error("jsPDF PubSub Error",t.message,t)}c[1]&&o.push(s)}o.length&&o.forEach(this.unsubscribe)}},this.getTopics=function(){return n}}function C(t){if(!(this instanceof C))return new C(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 j(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function O(t,e,r,n,i){if(!(this instanceof O))return new O(t,e,r,n,i);this.type="axial"===t?2:3,this.coords=e,this.colors=r,j.call(this,n,i)}function B(t,e,r,n,i){if(!(this instanceof B))return new B(t,e,r,n,i);this.boundingBox=t,this.xStep=e,this.yStep=r,this.stream="",this.cloneIndex=0,j.call(this,n,i)}function M(t){var n,a="string"==typeof arguments[0]?arguments[0]:"p",o=arguments[1],s=arguments[2],c=arguments[3],f=[],d=1,p=16,g="S",m=null;"object"===e(t=t||{})&&(a=t.orientation,o=t.unit||o,s=t.format||s,c=t.compress||t.compressPdf||c,null!==(m=t.encryption||null)&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),d="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(n=t.precision),void 0!==t.floatPrecision&&(p=t.floatPrecision),g=t.defaultPathOperation||"S"),f=t.filters||(!0===c?["FlateEncode"]:f),o=o||"mm",a=(""+(a||"P")).toLowerCase();var v=t.putOnlyUsedFonts||!1,b={},y={internal:{},__private__:{}};y.__private__.PubSub=I;var w="1.3",N=y.__private__.getPdfVersion=function(){return w};y.__private__.setPdfVersion=function(t){w=t};var L={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]};y.__private__.getPageFormats=function(){return L};var A=y.__private__.getPageFormat=function(t){return L[t]};s=s||"a4";var x={COMPAT:"compat",ADVANCED:"advanced"},S=x.COMPAT;function _(){this.saveGraphicsState(),ht(new Vt(_t,0,0,-_t,0,Rr()*_t).toString()+" cm"),this.setFontSize(this.getFontSize()/_t),g="n",S=x.ADVANCED}function P(){this.restoreGraphicsState(),g="S",S=x.COMPAT}var j=y.__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};y.advancedAPI=function(t){var e=S===x.COMPAT;return e&&_.call(this),"function"!=typeof t||(t(this),e&&P.call(this)),this},y.compatAPI=function(t){var e=S===x.ADVANCED;return e&&P.call(this),"function"!=typeof t||(t(this),e&&_.call(this)),this},y.isAdvancedAPI=function(){return S===x.ADVANCED};var E,q=function(t){if(S!==x.ADVANCED)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},D=y.roundToPrecision=y.__private__.roundToPrecision=function(t,e){var r=n||e;if(isNaN(t)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(r).replace(/0+$/,"")};E=y.hpf=y.__private__.hpf="number"==typeof p?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return D(t,p)}:"smart"===p?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return D(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return D(t,16)};var R=y.f2=y.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return D(t,2)},T=y.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return D(t,3)},U=y.scale=y.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return S===x.COMPAT?t*_t:S===x.ADVANCED?t:void 0},z=function(t){return S===x.COMPAT?Rr()-t:S===x.ADVANCED?t:void 0},H=function(t){return U(z(t))};y.__private__.setPrecision=y.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(n=parseInt(t,10))};var W,V="00000000000000000000000000000000",G=y.__private__.getFileId=function(){return V},Y=y.__private__.setFileId=function(t){return V=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():V.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==m&&(Ye=new k(m.userPermissions,m.userPassword,m.ownerPassword,V)),V};y.setFileId=function(t){return Y(t),this},y.getFileId=function(){return G()};var J=y.__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,Q(n),"'",Q(i),"'"].join("");return["D:",t.getFullYear(),Q(t.getMonth()+1),Q(t.getDate()),Q(t.getHours()),Q(t.getMinutes()),Q(t.getSeconds()),a].join("")},X=y.__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)},K=y.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=J(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 W=e},Z=y.__private__.getCreationDate=function(t){var e=W;return"jsDate"===t&&(e=X(W)),e};y.setCreationDate=function(t){return K(t),this},y.getCreationDate=function(t){return Z(t)};var $,Q=y.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},tt=y.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},et=0,rt=[],nt=[],it=0,at=[],ot=[],st=!1,ct=nt,ut=function(){et=0,it=0,nt=[],rt=[],at=[],Qt=Kt(),te=Kt()};y.__private__.setCustomOutputDestination=function(t){st=!0,ct=t};var lt=function(t){st||(ct=t)};y.__private__.resetCustomOutputDestination=function(){st=!1,ct=nt};var ht=y.__private__.out=function(t){return t=t.toString(),it+=t.length+1,ct.push(t),ct},ft=y.__private__.write=function(t){return ht(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},dt=y.__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},pt=[["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]];y.__private__.getStandardFonts=function(){return pt};var gt=t.fontSize||16;y.__private__.setFontSize=y.setFontSize=function(t){return gt=S===x.ADVANCED?t/_t:t,this};var mt,vt=y.__private__.getFontSize=y.getFontSize=function(){return S===x.COMPAT?gt:gt*_t},bt=t.R2L||!1;y.__private__.setR2L=y.setR2L=function(t){return bt=t,this},y.__private__.getR2L=y.getR2L=function(){return bt};var yt,wt=y.__private__.setZoomMode=function(t){var e=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))mt=t;else if(isNaN(t)){if(-1===e.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.');mt=t}else mt=parseInt(t,10)};y.__private__.getZoomMode=function(){return mt};var Nt,Lt=y.__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.');yt=t};y.__private__.getPageMode=function(){return yt};var At=y.__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.');Nt=t};y.__private__.getLayoutMode=function(){return Nt},y.__private__.setDisplayMode=y.setDisplayMode=function(t,e,r){return wt(t),At(e),Lt(r),this};var xt={title:"",subject:"",author:"",keywords:"",creator:""};y.__private__.getDocumentProperty=function(t){if(-1===Object.keys(xt).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return xt[t]},y.__private__.getDocumentProperties=function(){return xt},y.__private__.setDocumentProperties=y.setProperties=y.setDocumentProperties=function(t){for(var e in xt)xt.hasOwnProperty(e)&&t[e]&&(xt[e]=t[e]);return this},y.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(xt).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return xt[t]=e};var St,_t,Pt,kt,Ft,It={},Ct={},jt=[],Ot={},Bt={},Mt={},Et={},qt=null,Dt=0,Rt=[],Tt=new I(y),Ut=t.hotfixes||[],zt={},Ht={},Wt=[],Vt=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(Vt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Vt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Vt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Vt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Vt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Vt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Vt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Vt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Vt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Vt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Vt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Vt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Vt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Vt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Vt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Vt.prototype,"isIdentity",{get:function(){return 1===this.sx&&(0===this.shy&&(0===this.shx&&(1===this.sy&&(0===this.tx&&0===this.ty))))}}),Vt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(E).join(t)},Vt.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 Vt(e,r,n,i,a,o)},Vt.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 c=Math.sqrt(r*r+n*n);return s/=c,t*(n/=c)<e*(r/=c)&&(t=-t,e=-e,s=-s,o=-o),{scale:new Vt(o,0,0,c,0,0),translate:new Vt(1,0,0,1,i,a),rotate:new Vt(t,e,-e,t,0,0),skew:new Vt(1,0,s,1,0,0)}},Vt.prototype.toString=function(t){return this.join(" ")},Vt.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,c=-e*o,u=-r*o,l=t*o;return new Vt(s,c,u,l,-s*i-u*a,-c*i-l*a)},Vt.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 Cr(e,r)},Vt.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),r=this.applyToPoint(new Cr(t.x+t.w,t.y+t.h));return new jr(e.x,e.y,r.x-e.x,r.y-e.y)},Vt.prototype.clone=function(){var t=this.sx,e=this.shy,r=this.shx,n=this.sy,i=this.tx,a=this.ty;return new Vt(t,e,r,n,i,a)},y.Matrix=Vt;var Gt=y.matrixMult=function(t,e){return e.multiply(t)},Yt=new Vt(1,0,0,1,0,0);y.unitMatrix=y.identityMatrix=Yt;var Jt=function(t,e){if(!Bt[t]){var r=(e instanceof O?"Sh":"P")+(Object.keys(Ot).length+1).toString(10);e.id=r,Bt[t]=r,Ot[r]=e,Tt.publish("addPattern",e)}};y.ShadingPattern=O,y.TilingPattern=B,y.addShadingPattern=function(t,e){return q("addShadingPattern()"),Jt(t,e),this},y.beginTilingPattern=function(t){q("beginTilingPattern()"),Br(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},y.endTilingPattern=function(t,e){q("endTilingPattern()"),e.stream=ot[$].join("\n"),Jt(t,e),Tt.publish("endTilingPattern",e),Wt.pop().restore()};var Xt=y.__private__.newObject=function(){var t=Kt();return Zt(t,!0),t},Kt=y.__private__.newObjectDeferred=function(){return et++,rt[et]=function(){return it},et},Zt=function(t,e){return e="boolean"==typeof e&&e,rt[t]=it,e&&ht(t+" 0 obj"),t},$t=y.__private__.newAdditionalObject=function(){var t={objId:Kt(),content:""};return at.push(t),t},Qt=Kt(),te=Kt(),ee=y.__private__.decodeColorString=function(t){var e=t.split(" ");if(2!==e.length||"g"!==e[1]&&"G"!==e[1]){if(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=y.__private__.encodeColorString=function(t){var r;"string"==typeof t&&(t={ch1:t});var n=t.ch1,i=t.ch2,a=t.ch3,o=t.ch4,s="draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof n&&"#"!==n.charAt(0)){var c=new h(n);if(c.ok)n=c.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 u=parseInt(n.substr(1),16);n=u>>16&255,i=u>>8&255,a=255&u}if(void 0===i||void 0===o&&n===i&&i===a)if("string"==typeof n)r=n+" "+s[0];else switch(t.precision){case 2:r=R(n/255)+" "+s[0];break;case 3:default:r=T(n/255)+" "+s[0]}else if(void 0===o||"object"===e(o)){if(o&&!isNaN(o.a)&&0===o.a)return r=["1.","1.","1.",s[1]].join(" ");if("string"==typeof n)r=[n,i,a,s[1]].join(" ");else switch(t.precision){case 2:r=[R(n/255),R(i/255),R(a/255),s[1]].join(" ");break;default:case 3:r=[T(n/255),T(i/255),T(a/255),s[1]].join(" ")}}else if("string"==typeof n)r=[n,i,a,o,s[2]].join(" ");else switch(t.precision){case 2:r=[R(n),R(i),R(a),R(o),s[2]].join(" ");break;case 3:default:r=[T(n),T(i),T(a),T(o),s[2]].join(" ")}return r},ne=y.__private__.getFilters=function(){return f},ie=y.__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!==m&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==m&&(s=Ye.encryptor(o,0));var c={};!0===r&&(r=["FlateEncode"]);var u=t.additionalKeyValues||[],l=(c=void 0!==M.API.processDataByFilters?M.API.processDataByFilters(e,r):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==c.data.length&&(u.push({key:"Length",value:c.data.length}),!0===i&&u.push({key:"Length1",value:a})),0!=l.length)if(l.split("/").length-1==1)u.push({key:"Filter",value:l});else{u.push({key:"Filter",value:"["+l+"]"});for(var h=0;h<u.length;h+=1)if("DecodeParms"===u[h].key){for(var f=[],d=0;d<c.reverseChain.split("/").length-1;d+=1)f.push("null");f.push(u[h].value),u[h].value="["+f.join(" ")+"]"}}ht("<<");for(var p=0;p<u.length;p++)ht("/"+u[p].key+" "+u[p].value);ht(">>"),0!==c.data.length&&(ht("stream"),ht(s(c.data)),ht("endstream"))},ae=y.__private__.putPage=function(t){var e=t.number,r=t.data,n=t.objId,i=t.contentsObjId;Zt(n,!0),ht("<</Type /Page"),ht("/Parent "+t.rootDictionaryObjId+" 0 R"),ht("/Resources "+t.resourceDictionaryObjId+" 0 R"),ht("/MediaBox ["+parseFloat(E(t.mediaBox.bottomLeftX))+" "+parseFloat(E(t.mediaBox.bottomLeftY))+" "+E(t.mediaBox.topRightX)+" "+E(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&ht("/CropBox ["+E(t.cropBox.bottomLeftX)+" "+E(t.cropBox.bottomLeftY)+" "+E(t.cropBox.topRightX)+" "+E(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&ht("/BleedBox ["+E(t.bleedBox.bottomLeftX)+" "+E(t.bleedBox.bottomLeftY)+" "+E(t.bleedBox.topRightX)+" "+E(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&ht("/TrimBox ["+E(t.trimBox.bottomLeftX)+" "+E(t.trimBox.bottomLeftY)+" "+E(t.trimBox.topRightX)+" "+E(t.trimBox.topRightY)+"]"),null!==t.artBox&&ht("/ArtBox ["+E(t.artBox.bottomLeftX)+" "+E(t.artBox.bottomLeftY)+" "+E(t.artBox.topRightX)+" "+E(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&ht("/UserUnit "+t.userUnit),Tt.publish("putPage",{objId:n,pageContext:Rt[e],pageNumber:e,page:r}),ht("/Contents "+i+" 0 R"),ht(">>"),ht("endobj");var a=r.join("\n");return S===x.ADVANCED&&(a+="\nQ"),Zt(i,!0),ie({data:a,filters:ne(),objectId:i}),ht("endobj"),n},oe=y.__private__.putPages=function(){var t,e,r=[];for(t=1;t<=Dt;t++)Rt[t].objId=Kt(),Rt[t].contentsObjId=Kt();for(t=1;t<=Dt;t++)r.push(ae({number:t,data:ot[t],objId:Rt[t].objId,contentsObjId:Rt[t].contentsObjId,mediaBox:Rt[t].mediaBox,cropBox:Rt[t].cropBox,bleedBox:Rt[t].bleedBox,trimBox:Rt[t].trimBox,artBox:Rt[t].artBox,userUnit:Rt[t].userUnit,rootDictionaryObjId:Qt,resourceDictionaryObjId:te}));Zt(Qt,!0),ht("<</Type /Pages");var n="/Kids [";for(e=0;e<Dt;e++)n+=r[e]+" 0 R ";ht(n+"]"),ht("/Count "+Dt),ht(">>"),ht("endobj"),Tt.publish("postPutPages")},se=function(t){Tt.publish("putFont",{font:t,out:ht,newObject:Xt,putStream:ie}),!0!==t.isAlreadyPutted&&(t.objectNumber=Xt(),ht("<<"),ht("/Type /Font"),ht("/BaseFont /"+F(t.postScriptName)),ht("/Subtype /Type1"),"string"==typeof t.encoding&&ht("/Encoding /"+t.encoding),ht("/FirstChar 32"),ht("/LastChar 255"),ht(">>"),ht("endobj"))},ce=function(){for(var t in It)It.hasOwnProperty(t)&&(!1===v||!0===v&&b.hasOwnProperty(t))&&se(It[t])},ue=function(t){t.objectNumber=Xt();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[E(t.x),E(t.y),E(t.x+t.width),E(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}),ht("endobj")},le=function(){for(var t in zt)zt.hasOwnProperty(t)&&ue(zt[t])},he=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="",c=0,u=0;u<n.length;u++){for(r=n[u];r>t[c+1].offset;)c++;var l=t[c].offset,h=(r-l)/(t[c+1].offset-l),f=t[c].color,d=t[c+1].color;s+=tt(Math.round((1-h)*f[0]+h*d[0]).toString(16))+tt(Math.round((1-h)*f[1]+h*d[1]).toString(16))+tt(Math.round((1-h)*f[2]+h*d[2]).toString(16))}return s.trim()},fe=function(t,e){e||(e=21);var r=Xt(),n=he(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}),ht("endobj"),t.objectNumber=Xt(),ht("<< /ShadingType "+t.type),ht("/ColorSpace /DeviceRGB");var a="/Coords ["+E(parseFloat(t.coords[0]))+" "+E(parseFloat(t.coords[1]))+" ";2===t.type?a+=E(parseFloat(t.coords[2]))+" "+E(parseFloat(t.coords[3])):a+=E(parseFloat(t.coords[2]))+" "+E(parseFloat(t.coords[3]))+" "+E(parseFloat(t.coords[4]))+" "+E(parseFloat(t.coords[5])),ht(a+="]"),t.matrix&&ht("/Matrix ["+t.matrix.toString()+"]"),ht("/Function "+r+" 0 R"),ht("/Extend [true true]"),ht(">>"),ht("endobj")},de=function(t,e){var r=Kt(),n=Xt();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(E).join(" ")+"]"}),i.push({key:"XStep",value:E(t.xStep)}),i.push({key:"YStep",value:E(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}),ht("endobj")},pe=function(t){var e;for(e in Ot)Ot.hasOwnProperty(e)&&(Ot[e]instanceof O?fe(Ot[e]):Ot[e]instanceof B&&de(Ot[e],t))},ge=function(t){for(var e in t.objectNumber=Xt(),ht("<<"),t)switch(e){case"opacity":ht("/ca "+R(t[e]));break;case"stroke-opacity":ht("/CA "+R(t[e]))}ht(">>"),ht("endobj")},me=function(){var t;for(t in Mt)Mt.hasOwnProperty(t)&&ge(Mt[t])},ve=function(){for(var t in ht("/XObject <<"),zt)zt.hasOwnProperty(t)&&zt[t].objectNumber>=0&&ht("/"+t+" "+zt[t].objectNumber+" 0 R");Tt.publish("putXobjectDict"),ht(">>")},be=function(){Ye.oid=Xt(),ht("<<"),ht("/Filter /Standard"),ht("/V "+Ye.v),ht("/R "+Ye.r),ht("/U <"+Ye.toHexString(Ye.U)+">"),ht("/O <"+Ye.toHexString(Ye.O)+">"),ht("/P "+Ye.P),ht(">>"),ht("endobj")},ye=function(){for(var t in ht("/Font <<"),It)It.hasOwnProperty(t)&&(!1===v||!0===v&&b.hasOwnProperty(t))&&ht("/"+t+" "+It[t].objectNumber+" 0 R");ht(">>")},we=function(){if(Object.keys(Ot).length>0){for(var t in ht("/Shading <<"),Ot)Ot.hasOwnProperty(t)&&Ot[t]instanceof O&&Ot[t].objectNumber>=0&&ht("/"+t+" "+Ot[t].objectNumber+" 0 R");Tt.publish("putShadingPatternDict"),ht(">>")}},Ne=function(t){if(Object.keys(Ot).length>0){for(var e in ht("/Pattern <<"),Ot)Ot.hasOwnProperty(e)&&Ot[e]instanceof y.TilingPattern&&Ot[e].objectNumber>=0&&Ot[e].objectNumber<t&&ht("/"+e+" "+Ot[e].objectNumber+" 0 R");Tt.publish("putTilingPatternDict"),ht(">>")}},Le=function(){if(Object.keys(Mt).length>0){var t;for(t in ht("/ExtGState <<"),Mt)Mt.hasOwnProperty(t)&&Mt[t].objectNumber>=0&&ht("/"+t+" "+Mt[t].objectNumber+" 0 R");Tt.publish("putGStateDict"),ht(">>")}},Ae=function(t){Zt(t.resourcesOid,!0),ht("<<"),ht("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),ye(),we(),Ne(t.objectOid),Le(),ve(),ht(">>"),ht("endobj")},xe=function(){var t=[];ce(),me(),le(),pe(t),Tt.publish("putResources"),t.forEach(Ae),Ae({resourcesOid:te,objectOid:Number.MAX_SAFE_INTEGER}),Tt.publish("postPutResources")},Se=function(){Tt.publish("putAdditionalObjects");for(var t=0;t<at.length;t++){var e=at[t];Zt(e.objId,!0),ht(e.content),ht("endobj")}Tt.publish("postPutAdditionalObjects")},_e=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(It).length+1).toString(10),postScriptName:t,fontName:e,fontStyle:r,encoding:n,isStandardFont:i||!1,metadata:{}};return Tt.publish("addFont",{font:a,instance:this}),It[a.id]=a,_e(a),a.id},ke=function(t){for(var e=0,r=pt.length;e<r;e++){var n=Pe.call(this,t[e][0],t[e][1],t[e][2],pt[e][3],!0);!1===v&&(b[n]=!0);var i=t[e][0].split("-");_e({id:n,fontName:i[0],fontStyle:i[1]||""})}Tt.publish("addFonts",{fonts:It,dictionary:Ct})},Fe=function(t){return t.foo=function(){try{return t.apply(this,arguments)}catch(t){var e=t.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var n="Error in function "+e.split("\n")[0].split("<")[0]+": "+t.message;if(!r.console)throw new Error(n);r.console.error(n,t),r.alert&&alert(n)}},t.foo.bar=t,t.foo},Ie=function(t,e){var r,n,i,a,o,s,c,u,l;if(i=(e=e||{}).sourceEncoding||"Unicode",o=e.outputEncoding,(e.autoencode||o)&&It[St].metadata&&It[St].metadata[i]&&It[St].metadata[i].encoding&&(a=It[St].metadata[i].encoding,!o&&It[St].encoding&&(o=It[St].encoding),!o&&a.codePages&&(o=a.codePages[0]),"string"==typeof o&&(o=a[o]),o)){for(c=!1,s=[],r=0,n=t.length;r<n;r++)(u=o[t.charCodeAt(r)])?s.push(String.fromCharCode(u)):s.push(t[r]),s[r].charCodeAt(0)>>8&&(c=!0);t=s.join("")}for(r=t.length;void 0===c&&0!==r;)t.charCodeAt(r-1)>>8&&(c=!0),r--;if(!c)return t;for(s=e.noBOM?[]:[254,255],r=0,n=t.length;r<n;r++){if((l=(u=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(l),s.push(u-(l<<8))}return String.fromCharCode.apply(void 0,s)},Ce=y.__private__.pdfEscape=y.pdfEscape=function(t,e){return Ie(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},je=y.__private__.beginPage=function(t){ot[++Dt]=[],Rt[Dt]={objId:0,contentsObjId:0,userUnit:Number(d),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},Me(Dt),lt(ot[$])},Oe=function(t,e){var r,n,o;switch(a=e||a,"string"==typeof t&&(r=A(t.toLowerCase()),Array.isArray(r)&&(n=r[0],o=r[1])),Array.isArray(t)&&(n=t[0]*_t,o=t[1]*_t),isNaN(n)&&(n=s[0],o=s[1]),(n>14400||o>14400)&&(i.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),n=Math.min(14400,n),o=Math.min(14400,o)),s=[n,o],a.substr(0,1)){case"l":o>n&&(s=[o,n]);break;case"p":n>o&&(s=[o,n])}je(s),pr(fr),ht(Lr),0!==kr&&ht(kr+" J"),0!==Fr&&ht(Fr+" j"),Tt.publish("addPage",{pageNumber:Dt})},Be=function(t){t>0&&t<=Dt&&(ot.splice(t,1),Rt.splice(t,1),Dt--,$>Dt&&($=Dt),this.setPage($))},Me=function(t){t>0&&t<=Dt&&($=t)},Ee=y.__private__.getNumberOfPages=y.getNumberOfPages=function(){return ot.length-1},qe=function(t,e,r){var n,a=void 0;return r=r||{},t=void 0!==t?t:It[St].fontName,e=void 0!==e?e:It[St].fontStyle,n=t.toLowerCase(),void 0!==Ct[n]&&void 0!==Ct[n][e]?a=Ct[n][e]:void 0!==Ct[t]&&void 0!==Ct[t][e]?a=Ct[t][e]:!1===r.disableWarning&&i.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),a||r.noFallback||null==(a=Ct.times[e])&&(a=Ct.times.normal),a},De=y.__private__.putInfo=function(){var t=Xt(),e=function(t){return t};for(var r in null!==m&&(e=Ye.encryptor(t,0)),ht("<<"),ht("/Producer ("+Ce(e("jsPDF "+M.version))+")"),xt)xt.hasOwnProperty(r)&&xt[r]&&ht("/"+r.substr(0,1).toUpperCase()+r.substr(1)+" ("+Ce(e(xt[r]))+")");ht("/CreationDate ("+Ce(e(W))+")"),ht(">>"),ht("endobj")},Re=y.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||Qt;switch(Xt(),ht("<<"),ht("/Type /Catalog"),ht("/Pages "+e+" 0 R"),mt||(mt="fullwidth"),mt){case"fullwidth":ht("/OpenAction [3 0 R /FitH null]");break;case"fullheight":ht("/OpenAction [3 0 R /FitV null]");break;case"fullpage":ht("/OpenAction [3 0 R /Fit]");break;case"original":ht("/OpenAction [3 0 R /XYZ null null 1]");break;default:var r=""+mt;"%"===r.substr(r.length-1)&&(mt=parseInt(mt)/100),"number"==typeof mt&&ht("/OpenAction [3 0 R /XYZ null null "+R(mt)+"]")}switch(Nt||(Nt="continuous"),Nt){case"continuous":ht("/PageLayout /OneColumn");break;case"single":ht("/PageLayout /SinglePage");break;case"two":case"twoleft":ht("/PageLayout /TwoColumnLeft");break;case"tworight":ht("/PageLayout /TwoColumnRight")}yt&&ht("/PageMode /"+yt),Tt.publish("putCatalog"),ht(">>"),ht("endobj")},Te=y.__private__.putTrailer=function(){ht("trailer"),ht("<<"),ht("/Size "+(et+1)),ht("/Root "+et+" 0 R"),ht("/Info "+(et-1)+" 0 R"),null!==m&&ht("/Encrypt "+Ye.oid+" 0 R"),ht("/ID [ <"+V+"> <"+V+"> ]"),ht(">>")},Ue=y.__private__.putHeader=function(){ht("%PDF-"+w),ht("%ºß¬à")},ze=y.__private__.putXRef=function(){var t="0000000000";ht("xref"),ht("0 "+(et+1)),ht("0000000000 65535 f ");for(var e=1;e<=et;e++){"function"==typeof rt[e]?ht((t+rt[e]()).slice(-10)+" 00000 n "):void 0!==rt[e]?ht((t+rt[e]).slice(-10)+" 00000 n "):ht("0000000000 00000 n ")}},He=y.__private__.buildDocument=function(){ut(),lt(nt),Tt.publish("buildDocument"),Ue(),oe(),Se(),xe(),null!==m&&be(),De(),Re();var t=it;return ze(),Te(),ht("startxref"),ht(""+t),ht("%%EOF"),lt(ot[$]),nt.join("\n")},We=y.__private__.getBlob=function(t){return new Blob([dt(t)],{type:"application/pdf"})},Ve=y.output=y.__private__.output=Fe((function(t,e){switch("string"==typeof(e=e||{})?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return He();case"save":y.save(e.filename);break;case"arraybuffer":return dt(He());case"blob":return We(He());case"bloburi":case"bloburl":if(void 0!==r.URL&&"function"==typeof r.URL.createObjectURL)return r.URL&&r.URL.createObjectURL(We(He()))||void 0;i.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var n="",a=He();try{n=u(a)}catch(t){n=u(unescape(encodeURIComponent(a)))}return"data:application/pdf;filename="+e.filename+";base64,"+n;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(r)){var o="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",s=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';e.pdfObjectUrl&&(o=e.pdfObjectUrl,s="");var c='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+o+'"'+s+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(e)+");<\/script></body></html>",l=r.open();return null!==l&&l.document.write(c),l}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(r)){var h='<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>',f=r.open();if(null!==f){f.document.write(h);var d=this;f.document.documentElement.querySelector("#pdfViewer").onload=function(){f.document.title=e.filename,f.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(d.output("bloburl"))}}return f}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(r))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var p='<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>',g=r.open();if(null!==g&&(g.document.write(p),g.document.title=e.filename),g||"undefined"==typeof safari)return g;break;case"datauri":case"dataurl":return r.document.location.href=this.output("datauristring",e);default:return null}})),Ge=function(t){return!0===Array.isArray(Ut)&&Ut.indexOf(t)>-1};switch(o){case"pt":_t=1;break;case"mm":_t=72/25.4;break;case"cm":_t=72/2.54;break;case"in":_t=72;break;case"px":_t=1==Ge("px_scaling")?.75:96/72;break;case"pc":case"em":_t=12;break;case"ex":_t=6;break;default:if("number"!=typeof o)throw new Error("Invalid unit: "+o);_t=o}var Ye=null;K(),Y();var Je=function(t){return null!==m?Ye.encryptor(t,0):function(t){return t}},Xe=y.__private__.getPageInfo=y.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Rt[t].objId,pageNumber:t,pageContext:Rt[t]}},Ke=y.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var e in Rt)if(Rt[e].objId===t)break;return Xe(e)},Ze=y.__private__.getCurrentPageInfo=y.getCurrentPageInfo=function(){return{objId:Rt[$].objId,pageNumber:$,pageContext:Rt[$]}};y.addPage=function(){return Oe.apply(this,arguments),this},y.setPage=function(){return Me.apply(this,arguments),lt.call(this,ot[$]),this},y.insertPage=function(t){return this.addPage(),this.movePage($,t),this},y.movePage=function(t,e){var r,n;if(t>e){r=ot[t],n=Rt[t];for(var i=t;i>e;i--)ot[i]=ot[i-1],Rt[i]=Rt[i-1];ot[e]=r,Rt[e]=n,this.setPage(e)}else if(t<e){r=ot[t],n=Rt[t];for(var a=t;a<e;a++)ot[a]=ot[a+1],Rt[a]=Rt[a+1];ot[e]=r,Rt[e]=n,this.setPage(e)}return this},y.deletePage=function(){return Be.apply(this,arguments),this},y.__private__.text=y.text=function(t,r,n,i,a){var o,s,c,u,l,h,f,d,p,g=(i=i||{}).scope||this;if("number"==typeof t&&"number"==typeof r&&("string"==typeof n||Array.isArray(n))){var m=n;n=r,r=t,t=m}if(arguments[3]instanceof Vt==!1?(c=arguments[4],u=arguments[5],"object"===e(f=arguments[3])&&null!==f||("string"==typeof c&&(u=c,c=null),"string"==typeof f&&(u=f,f=null),"number"==typeof f&&(c=f,f=null),i={flags:f,angle:c,align:u})):(q("The transform parameter of text() with a Matrix value"),p=a),isNaN(r)||isNaN(n)||null==t)throw new Error("Invalid arguments passed to jsPDF.text");if(0===t.length)return g;var v="",y=!1,w="number"==typeof i.lineHeightFactor?i.lineHeightFactor:hr,N=g.internal.scaleFactor;function L(t){return t=t.split("\t").join(Array(i.TabLen||9).join(" ")),Ce(t,f)}function A(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 _(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 P=!1,k=!0;if("string"==typeof t)P=!0;else if(Array.isArray(t)){var F=t.concat();s=[];for(var I,C=F.length;C--;)("string"!=typeof(I=F.shift())||Array.isArray(I)&&"string"!=typeof I[0])&&(k=!1);P=k}if(!1===P)throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');"string"==typeof t&&(t=t.match(/[\r?\n]/)?t.split(/\r\n|\r|\n/g):[t]);var j=gt/g.internal.scaleFactor,O=j*(w-1);switch(i.baseline){case"bottom":n-=O;break;case"top":n+=j-O;break;case"hanging":n+=j-2*O;break;case"middle":n+=j/2-O}if((h=i.maxWidth||0)>0&&("string"==typeof t?t=g.splitTextToSize(t,h):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,e){return t.concat(g.splitTextToSize(e,h))}),[]))),o={text:t,x:r,y:n,options:i,mutex:{pdfEscape:Ce,activeFontKey:St,fonts:It,activeFontSize:gt}},Tt.publish("preProcessText",o),t=o.text,c=(i=o.options).angle,p instanceof Vt==!1&&c&&"number"==typeof c){c*=Math.PI/180,0===i.rotationDirection&&(c=-c),S===x.ADVANCED&&(c=-c);var B=Math.cos(c),M=Math.sin(c);p=new Vt(B,M,-M,B,0,0)}else c&&c instanceof Vt&&(p=c);S!==x.ADVANCED||p||(p=Yt),void 0!==(l=i.charSpace||_r)&&(v+=E(U(l))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(d=i.horizontalScale)&&(v+=E(100*d)+" Tz\n");i.lang;var D=-1,R=void 0!==i.renderingMode?i.renderingMode:i.stroke,T=g.internal.getCurrentPageInfo().pageContext;switch(R){case 0:case!1:case"fill":D=0;break;case 1:case!0:case"stroke":D=1;break;case 2:case"fillThenStroke":D=2;break;case 3:case"invisible":D=3;break;case 4:case"fillAndAddForClipping":D=4;break;case 5:case"strokeAndAddPathForClipping":D=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":D=6;break;case 7:case"addToPathForClipping":D=7}var z=void 0!==T.usedRenderingMode?T.usedRenderingMode:-1;-1!==D?v+=D+" Tr\n":-1!==z&&(v+="0 Tr\n"),-1!==D&&(T.usedRenderingMode=D),u=i.align||"left";var H,W=gt*w,V=g.internal.pageSize.getWidth(),G=It[St];l=i.charSpace||_r,h=i.maxWidth||0,f=Object.assign({autoencode:!0,noBOM:!0},i.flags);var Y=[],J=function(t){return g.getStringUnitWidth(t,{font:G,charSpace:l,fontSize:gt,doKerning:!1})*gt/N};if("[object Array]"===Object.prototype.toString.call(t)){var X;s=A(t),"left"!==u&&(H=s.map(J));var K,Z=0;if("right"===u){r-=H[0],t=[],C=s.length;for(var $=0;$<C;$++)0===$?(K=br(r),X=yr(n)):(K=U(Z-H[$]),X=-W),t.push([s[$],K,X]),Z=H[$]}else if("center"===u){r-=H[0]/2,t=[],C=s.length;for(var Q=0;Q<C;Q++)0===Q?(K=br(r),X=yr(n)):(K=U((Z-H[Q])/2),X=-W),t.push([s[Q],K,X]),Z=H[Q]}else if("left"===u){t=[],C=s.length;for(var tt=0;tt<C;tt++)t.push(s[tt])}else if("justify"===u&&"Identity-H"===G.encoding){t=[],C=s.length,h=0!==h?h:V;for(var et=0,rt=0;rt<C;rt++)if(X=0===rt?yr(n):-W,K=0===rt?br(r):et,rt<C-1){var nt=U((h-H[rt])/(s[rt].split(" ").length-1)),it=s[rt].split(" ");t.push([it[0]+" ",K,X]),et=0;for(var at=1;at<it.length;at++){var ot=(J(it[at-1]+" "+it[at])-J(it[at]))*N+nt;at==it.length-1?t.push([it[at],ot,0]):t.push([it[at]+" ",ot,0]),et-=ot}}else t.push([s[rt],K,X]);t.push(["",et,0])}else{if("justify"!==u)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');t=[],C=s.length,h=0!==h?h:V;for(rt=0;rt<C;rt++)X=0===rt?yr(n):-W,K=0===rt?br(r):0,rt<C-1?Y.push(E(U((h-H[rt])/(s[rt].split(" ").length-1)))):Y.push(0),t.push([s[rt],K,X])}}var st="boolean"==typeof i.R2L?i.R2L:bt;!0===st&&(t=_(t,(function(t,e,r){return[t.split("").reverse().join(""),e,r]}))),o={text:t,x:r,y:n,options:i,mutex:{pdfEscape:Ce,activeFontKey:St,fonts:It,activeFontSize:gt}},Tt.publish("postProcessText",o),t=o.text,y=o.mutex.isHex||!1;var ct=It[St].encoding;"WinAnsiEncoding"!==ct&&"StandardEncoding"!==ct||(t=_(t,(function(t,e,r){return[L(t),e,r]}))),s=A(t),t=[];for(var ut,lt,ft,dt=0,pt=1,mt=Array.isArray(s[0])?pt:dt,vt="",yt=function(t,e,r){var n="";return r instanceof Vt?(r="number"==typeof i.angle?Gt(r,new Vt(1,0,0,1,t,e)):Gt(new Vt(1,0,0,1,t,e),r),S===x.ADVANCED&&(r=Gt(new Vt(1,0,0,-1,0,0),r)),n=r.join(" ")+" Tm\n"):n=E(t)+" "+E(e)+" Td\n",n},wt=0;wt<s.length;wt++){switch(vt="",mt){case pt:ft=(y?"<":"(")+s[wt][0]+(y?">":")"),ut=parseFloat(s[wt][1]),lt=parseFloat(s[wt][2]);break;case dt:ft=(y?"<":"(")+s[wt]+(y?">":")"),ut=br(r),lt=yr(n)}void 0!==Y&&void 0!==Y[wt]&&(vt=Y[wt]+" Tw\n"),0===wt?t.push(vt+yt(ut,lt,p)+ft):mt===dt?t.push(vt+ft):mt===pt&&t.push(vt+yt(ut,lt,p)+ft)}t=mt===dt?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";var Nt="BT\n/";return Nt+=St+" "+gt+" Tf\n",Nt+=E(gt*w)+" TL\n",Nt+=xr+"\n",Nt+=v,Nt+=t,ht(Nt+="ET"),b[St]=!0,g};var $e=y.__private__.clip=y.clip=function(t){return ht("evenodd"===t?"W*":"W"),this};y.clipEvenOdd=function(){return $e("evenodd")},y.__private__.discardPath=y.discardPath=function(){return ht("n"),this};var Qe=y.__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};y.__private__.setDefaultPathOperation=y.setDefaultPathOperation=function(t){return Qe(t)&&(g=t),this};var tr=y.__private__.getStyle=y.getStyle=function(t){var e=g;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},er=y.close=function(){return ht("h"),this};y.stroke=function(){return ht("S"),this},y.fill=function(t){return rr("f",t),this},y.fillEvenOdd=function(t){return rr("f*",t),this},y.fillStroke=function(t){return rr("B",t),this},y.fillStrokeEvenOdd=function(t){return rr("B*",t),this};var rr=function(t,r){"object"===e(r)?ar(r,t):ht(t)},nr=function(t){null===t||S===x.ADVANCED&&void 0===t||(t=tr(t),ht(t))};function ir(t,e,r,n,i){var a=new B(e||this.boundingBox,r||this.xStep,n||this.yStep,this.gState,i||this.matrix);a.stream=this.stream;var o=t+"$$"+this.cloneIndex+++"$$";return Jt(o,a),a}var ar=function(t,e){var r=Bt[t.key],n=Ot[r];if(n instanceof O)ht("q"),ht(or(e)),n.gState&&y.setGState(n.gState),ht(t.matrix.toString()+" cm"),ht("/"+r+" sh"),ht("Q");else if(n instanceof B){var i=new Vt(1,0,0,-1,0,Rr());t.matrix&&(i=i.multiply(t.matrix||Yt),r=ir.call(n,t.key,t.boundingBox,t.xStep,t.yStep,i).id),ht("q"),ht("/Pattern cs"),ht("/"+r+" scn"),n.gState&&y.setGState(n.gState),ht(e),ht("Q")}},or=function(t){switch(t){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},sr=y.moveTo=function(t,e){return ht(E(U(t))+" "+E(H(e))+" m"),this},cr=y.lineTo=function(t,e){return ht(E(U(t))+" "+E(H(e))+" l"),this},ur=y.curveTo=function(t,e,r,n,i,a){return ht([E(U(t)),E(H(e)),E(U(r)),E(H(n)),E(U(i)),E(H(a)),"c"].join(" ")),this};y.__private__.line=y.line=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Qe(i))throw new Error("Invalid arguments passed to jsPDF.line");return S===x.COMPAT?this.lines([[r-t,n-e]],t,e,[1,1],i||"S"):this.lines([[r-t,n-e]],t,e,[1,1]).stroke()},y.__private__.lines=y.lines=function(t,e,r,n,i,a){var o,s,c,u,l,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)||!Qe(i)||"boolean"!=typeof a)throw new Error("Invalid arguments passed to jsPDF.lines");for(sr(e,r),o=n[0],s=n[1],u=t.length,g=e,m=r,c=0;c<u;c++)2===(l=t[c]).length?(g=l[0]*o+g,m=l[1]*s+m,cr(g,m)):(h=l[0]*o+g,f=l[1]*s+m,d=l[2]*o+g,p=l[3]*s+m,g=l[4]*o+g,m=l[5]*s+m,ur(h,f,d,p,g,m));return a&&er(),nr(i),this},y.path=function(t){for(var e=0;e<t.length;e++){var r=t[e],n=r.c;switch(r.op){case"m":sr(n[0],n[1]);break;case"l":cr(n[0],n[1]);break;case"c":ur.apply(this,n);break;case"h":er()}}return this},y.__private__.rect=y.rect=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Qe(i))throw new Error("Invalid arguments passed to jsPDF.rect");return S===x.COMPAT&&(n=-n),ht([E(U(t)),E(H(e)),E(U(r)),E(U(n)),"re"].join(" ")),nr(i),this},y.__private__.triangle=y.triangle=function(t,e,r,n,i,a,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(a)||!Qe(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},y.__private__.roundedRect=y.roundedRect=function(t,e,r,n,i,a,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(i)||isNaN(a)||!Qe(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},y.__private__.ellipse=y.ellipse=function(t,e,r,n,i){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||!Qe(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 sr(t+r,e),ur(t+r,e-o,t+a,e-n,t,e-n),ur(t-a,e-n,t-r,e-o,t-r,e),ur(t-r,e+o,t-a,e+n,t,e+n),ur(t+a,e+n,t+r,e+o,t+r,e),nr(i),this},y.__private__.circle=y.circle=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||!Qe(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,e,r,r,n)},y.setFont=function(t,e,r){return r&&(e=j(e,r)),St=qe(t,e,{disableWarning:!1}),this};var lr=y.__private__.getFont=y.getFont=function(){return It[qe.apply(y,arguments)]};y.__private__.getFontList=y.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},y.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=j(r,n)),i=i||"Identity-H",Pe.call(this,t,e,r,i)};var hr,fr=t.lineWidth||.200025,dr=y.__private__.getLineWidth=y.getLineWidth=function(){return fr},pr=y.__private__.setLineWidth=y.setLineWidth=function(t){return fr=t,ht(E(U(t))+" w"),this};y.__private__.setLineDash=M.API.setLineDash=M.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 E(U(t))})).join(" "),e=E(U(e)),ht("["+t+"] "+e+" d"),this};var gr=y.__private__.getLineHeight=y.getLineHeight=function(){return gt*hr};y.__private__.getLineHeight=y.getLineHeight=function(){return gt*hr};var mr=y.__private__.setLineHeightFactor=y.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(hr=t),this},vr=y.__private__.getLineHeightFactor=y.getLineHeightFactor=function(){return hr};mr(t.lineHeight);var br=y.__private__.getHorizontalCoordinate=function(t){return U(t)},yr=y.__private__.getVerticalCoordinate=function(t){return S===x.ADVANCED?t:Rt[$].mediaBox.topRightY-Rt[$].mediaBox.bottomLeftY-U(t)},wr=y.__private__.getHorizontalCoordinateString=y.getHorizontalCoordinateString=function(t){return E(br(t))},Nr=y.__private__.getVerticalCoordinateString=y.getVerticalCoordinateString=function(t){return E(yr(t))},Lr=t.strokeColor||"0 G";y.__private__.getStrokeColor=y.getDrawColor=function(){return ee(Lr)},y.__private__.setStrokeColor=y.setDrawColor=function(t,e,r,n){return Lr=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"draw",precision:2}),ht(Lr),this};var Ar=t.fillColor||"0 g";y.__private__.getFillColor=y.getFillColor=function(){return ee(Ar)},y.__private__.setFillColor=y.setFillColor=function(t,e,r,n){return Ar=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"fill",precision:2}),ht(Ar),this};var xr=t.textColor||"0 g",Sr=y.__private__.getTextColor=y.getTextColor=function(){return ee(xr)};y.__private__.setTextColor=y.setTextColor=function(t,e,r,n){return xr=re({ch1:t,ch2:e,ch3:r,ch4:n,pdfColorType:"text",precision:3}),this};var _r=t.charSpace,Pr=y.__private__.getCharSpace=y.getCharSpace=function(){return parseFloat(_r||0)};y.__private__.setCharSpace=y.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return _r=t,this};var kr=0;y.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},y.__private__.setLineCap=y.setLineCap=function(t){var e=y.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 kr=e,ht(e+" J"),this};var Fr=0;y.__private__.setLineJoin=y.setLineJoin=function(t){var e=y.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,ht(e+" j"),this},y.__private__.setLineMiterLimit=y.__private__.setMiterLimit=y.setLineMiterLimit=y.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return ht(E(U(t))+" M"),this},y.GState=C,y.setGState=function(t){(t="string"==typeof t?Mt[Et[t]]:Ir(null,t)).equals(qt)||(ht("/"+t.id+" gs"),qt=t)};var Ir=function(t,e){if(!t||!Et[t]){var r=!1;for(var n in Mt)if(Mt.hasOwnProperty(n)&&Mt[n].equals(e)){r=!0;break}if(r)e=Mt[n];else{var i="GS"+(Object.keys(Mt).length+1).toString(10);Mt[i]=e,e.id=i}return t&&(Et[t]=e.id),Tt.publish("addGState",e),e}};y.addGState=function(t,e){return Ir(t,e),this},y.saveGraphicsState=function(){return ht("q"),jt.push({key:St,size:gt,color:xr}),this},y.restoreGraphicsState=function(){ht("Q");var t=jt.pop();return St=t.key,gt=t.size,xr=t.color,qt=null,this},y.setCurrentTransformationMatrix=function(t){return ht(t.toString()+" cm"),this},y.comment=function(t){return ht("#"+t),this};var Cr=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},jr=function(t,e,r,n){Cr.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},Or=function(){this.page=Dt,this.currentPage=$,this.pages=ot.slice(0),this.pagesContext=Rt.slice(0),this.x=Pt,this.y=kt,this.matrix=Ft,this.width=qr($),this.height=Rr($),this.outputDestination=ct,this.id="",this.objectNumber=-1};Or.prototype.restore=function(){Dt=this.page,$=this.currentPage,Rt=this.pagesContext,ot=this.pages,Pt=this.x,kt=this.y,Ft=this.matrix,Dr($,this.width),Tr($,this.height),ct=this.outputDestination};var Br=function(t,e,r,n,i){Wt.push(new Or),Dt=$=0,ot=[],Pt=t,kt=e,Ft=i,je([r,n])},Mr=function(t){if(Ht[t])Wt.pop().restore();else{var e=new Or,r="Xo"+(Object.keys(zt).length+1).toString(10);e.id=r,Ht[t]=r,zt[r]=e,Tt.publish("addFormObject",e),Wt.pop().restore()}};for(var Er in y.beginFormObject=function(t,e,r,n,i){return Br(t,e,r,n,i),this},y.endFormObject=function(t){return Mr(t),this},y.doFormObject=function(t,e){var r=zt[Ht[t]];return ht("q"),ht(e.toString()+" cm"),ht("/"+r.id+" Do"),ht("Q"),this},y.getFormObject=function(t){var e=zt[Ht[t]];return{x:e.x,y:e.y,width:e.width,height:e.height,matrix:e.matrix}},y.save=function(t,e){return t=t||"generated.pdf",(e=e||{}).returnPromise=e.returnPromise||!1,!1===e.returnPromise?(l(We(He()),t),"function"==typeof l.unload&&r.setTimeout&&setTimeout(l.unload,911),this):new Promise((function(e,n){try{var i=l(We(He()),t);"function"==typeof l.unload&&r.setTimeout&&setTimeout(l.unload,911),e(i)}catch(t){n(t.message)}}))},M.API)M.API.hasOwnProperty(Er)&&("events"===Er&&M.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))}(Tt,M.API.events):y[Er]=M.API[Er]);var qr=y.getPageWidth=function(t){return(Rt[t=t||$].mediaBox.topRightX-Rt[t].mediaBox.bottomLeftX)/_t},Dr=y.setPageWidth=function(t,e){Rt[t].mediaBox.topRightX=e*_t+Rt[t].mediaBox.bottomLeftX},Rr=y.getPageHeight=function(t){return(Rt[t=t||$].mediaBox.topRightY-Rt[t].mediaBox.bottomLeftY)/_t},Tr=y.setPageHeight=function(t,e){Rt[t].mediaBox.topRightY=e*_t+Rt[t].mediaBox.bottomLeftY};return y.internal={pdfEscape:Ce,getStyle:tr,getFont:lr,getFontSize:vt,getCharSpace:Pr,getTextColor:Sr,getLineHeight:gr,getLineHeightFactor:vr,getLineWidth:dr,write:ft,getHorizontalCoordinate:br,getVerticalCoordinate:yr,getCoordinateString:wr,getVerticalCoordinateString:Nr,collections:{},newObject:Xt,newAdditionalObject:$t,newObjectDeferred:Kt,newObjectDeferredBegin:Zt,getFilters:ne,putStream:ie,events:Tt,scaleFactor:_t,pageSize:{getWidth:function(){return qr($)},setWidth:function(t){Dr($,t)},getHeight:function(){return Rr($)},setHeight:function(t){Tr($,t)}},encryptionOptions:m,encryption:Ye,getEncryptor:Je,output:Ve,getNumberOfPages:Ee,pages:ot,out:ht,f2:R,f3:T,getPageInfo:Xe,getPageInfoByObjId:Ke,getCurrentPageInfo:Ze,getPDFVersion:N,Point:Cr,Rectangle:jr,Matrix:Vt,hasHotfix:Ge},Object.defineProperty(y.internal.pageSize,"width",{get:function(){return qr($)},set:function(t){Dr($,t)},enumerable:!0,configurable:!0}),Object.defineProperty(y.internal.pageSize,"height",{get:function(){return Rr($)},set:function(t){Tr($,t)},enumerable:!0,configurable:!0}),ke.call(y,pt),St="F1",Oe(s,a),Tt.publish("initialized"),y}k.prototype.lsbFirstWord=function(t){return String.fromCharCode(t>>0&255,t>>8&255,t>>16&255,t>>24&255)},k.prototype.toHexString=function(t){return t.split("").map((function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)})).join("")},k.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("")},k.prototype.processOwnerPassword=function(t,e){return _(A(e).substr(0,5),t)},k.prototype.encryptor=function(t,e){var r=A(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(t){return _(r,t)}},C.prototype.equals=function(t){var r,n="id,objectNumber,equals";if(!t||e(t)!==e(this))return!1;var i=0;for(r in this)if(!(n.indexOf(r)>=0)){if(this.hasOwnProperty(r)&&!t.hasOwnProperty(r))return!1;if(this[r]!==t[r])return!1;i++}for(r in t)t.hasOwnProperty(r)&&n.indexOf(r)<0&&i--;return 0===i},M.API={events:[]},M.version="2.5.2";var E=M.API,q=1,D=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},R=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},T=function(t){return t.toFixed(2)},U=function(t){return t.toFixed(5)};E.__acroform__={};var z=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},H=function(t){return t*q},W=function(t){var e=new ct,r=Lt.internal.getHeight(t)||0,n=Lt.internal.getWidth(t)||0;return e.BBox=[0,0,Number(T(n)),Number(T(r))],e},V=E.__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},G=E.__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)},Y=E.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(t&1<<e)?0:1},J=E.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Y(t,e-1)},X=E.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return V(t,e-1)},K=E.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return G(t,e-1)},Z=E.__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],c={};return c.lowerLeft_X=r(i)||0,c.lowerLeft_Y=n(a+s)||0,c.upperRight_X=r(i+o)||0,c.upperRight_Y=n(a)||0,[Number(T(c.lowerLeft_X)),Number(T(c.lowerLeft_Y)),Number(T(c.upperRight_X)),Number(T(c.upperRight_Y))]},$=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],r=t._V||t.DV,n=Q(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+" "+T(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=W(t);return a.scope=t.scope,a.stream=e.join("\n"),a}},Q=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=Lt.internal.getHeight(t)||0;o=o<0?-o:o;var s=Lt.internal.getWidth(t)||0;s=s<0?-s:s;var c=function(e,r,n){if(e+1<i.length){var a=r+" "+i[e+1][0];return tt(a,t,n).width<=s-4}return!1};a++;t:for(;a>0;){e="",a--;var u,l,h=tt("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: "+tt(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 N=parseInt(y),L=c(N,v,a),A=y>=i.length-1;if(L&&!A){v+=" ",m=0;continue}if(L||A){if(A)g=N;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=N}}for(var x="",S=p;S<=g;S++){var _=i[S];if(t.multiline){if(S===g){x+=_[m]+" ",m=(m+1)%_.length;continue}if(S===p){x+=_[_.length-1]+" ";continue}}x+=_[0]+" "}switch(x=" "==x.substr(x.length-1)?x.substr(0,x.length-1):x,l=tt(x,t,a).width,t.textAlign){case"right":u=s-l-2;break;case"center":u=(s-l)/2;break;case"left":default:u=2}e+=T(u)+" "+T(d)+" Td\n",e+="("+D(x)+") Tj\n",e+=-T(u)+" 0 Td\n",d=-(a+2),l=0,p=w?g:g+1,b++,v=""}else;break}return n.text=e,n.fontSize=a,n},tt=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}},et={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},rt=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)},nt=function(t,r){for(var n in t)if(t.hasOwnProperty(n)){var i=n,a=t[n];r.internal.newObjectDeferredBegin(a.objId,!0),"object"===e(a)&&"function"==typeof a.putStream&&a.putStream(),delete t[i]}},it=function(t,r){if(r.scope=t,void 0!==t.internal&&(void 0===t.internal.acroformPlugin||!1===t.internal.acroformPlugin.isInitialized)){if(lt.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(et)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");q=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new ut,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",(function(){!function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0}(t)})),t.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&&rt(n,t)}}(t)})),t.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")}(t)})),t.internal.events.subscribe("postPutPages",(function(r){!function(t,r){var n=!t;for(var i in t||(r.internal.newObjectDeferredBegin(r.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),r.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||r.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(i)){var a=t[i],o=[],s=a.Rect;if(a.Rect&&(a.Rect=Z(a.Rect,r)),r.internal.newObjectDeferredBegin(a.objId,!0),a.DA=Lt.createDefaultAppearanceStream(a),"object"===e(a)&&"function"==typeof a.getKeyValueListForStream&&(o=a.getKeyValueListForStream()),a.Rect=s,a.hasAppearanceStream&&!a.appearanceStreamContent){var c=$(a);o.push({key:"AP",value:"<</N "+c+">>"}),r.internal.acroformPlugin.xForms.push(c)}if(a.appearanceStreamContent){var u="";for(var l in a.appearanceStreamContent)if(a.appearanceStreamContent.hasOwnProperty(l)){var h=a.appearanceStreamContent[l];if(u+="/"+l+" ",u+="<<",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)),u+="/"+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)),u+="/"+i+" "+f,r.internal.acroformPlugin.xForms.indexOf(f)>=0||r.internal.acroformPlugin.xForms.push(f);u+=">>"}o.push({key:"AP",value:"<<\n"+u+">>"})}r.internal.putStream({additionalKeyValues:o,objectId:a.objId}),r.internal.out("endobj")}n&&nt(r.internal.acroformPlugin.xForms,r)}(r,t)})),t.internal.acroformPlugin.isInitialized=!0}},at=E.__acroform__.arrayToPdfArray=function(t,r,n){var i=function(t){return t};if(Array.isArray(t)){for(var a="[",o=0;o<t.length;o++)switch(0!==o&&(a+=" "),e(t[o])){case"boolean":case"number":case"object":a+=t[o].toString();break;case"string":"/"!==t[o].substr(0,1)?(void 0!==r&&n&&(i=n.internal.getEncryptor(r)),a+="("+D(i(t[o].toString()))+")"):a+=t[o].toString()}return a+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")};var ot=function(t,e,r){var n=function(t){return t};return void 0!==e&&r&&(n=r.internal.getEncryptor(e)),(t=t||"").toString(),t="("+D(n(t))+")"},st=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})};st.prototype.toString=function(){return this.objId+" 0 R"},st.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},st.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:at(i,this.objId,this.scope)}):i instanceof st?(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 ct=function(){st.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}})};z(ct,st);var ut=function(){st.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)),"("+D(e(t))+")"}},set:function(e){t=e}})};z(ut,st);var lt=function t(){st.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(J(e,3))},set:function(t){!0===Boolean(t)?this.F=X(e,3):this.F=K(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 bt)return;a="FieldObject"+t.FieldNum++}var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+D(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 c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(t){c=t}});var u=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===u?50/q:u},set:function(t){u=t}});var l="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return l},set:function(t){l=t}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!h||this instanceof bt||this instanceof wt))return ot(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 gt==!1?ot(f,this.objId,this.scope):f},set:function(t){t=t.toString(),f=this instanceof gt==!1?"("===t.substr(0,1)?R(t.substr(1,t.length-2)):R(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof gt==!0?R(f.substr(1,f.length-1)):f},set:function(t){t=t.toString(),f=this instanceof gt==!0?"/"+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 gt==!1?ot(d,this.objId,this.scope):d},set:function(t){t=t.toString(),d=this instanceof gt==!1?"("===t.substr(0,1)?R(t.substr(1,t.length-2)):R(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof gt==!0?R(d.substr(1,d.length-1)):d},set:function(t){t=t.toString(),d=this instanceof gt==!0?"/"+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(J(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,1):this.Ff=K(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,2):this.Ff=K(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,3):this.Ff=K(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;case"left":case 0:default:m=0}}})};z(lt,st);var ht=function(){lt.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 at(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(J(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,18):this.Ff=K(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=X(this.Ff,19):this.Ff=K(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=X(this.Ff,20),e.sort()):this.Ff=K(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,22):this.Ff=K(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,23):this.Ff=K(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,27):this.Ff=K(this.Ff,27)}}),this.hasAppearanceStream=!1};z(ht,lt);var ft=function(){ht.call(this),this.fontName="helvetica",this.combo=!1};z(ft,ht);var dt=function(){ft.call(this),this.combo=!0};z(dt,ft);var pt=function(){dt.call(this),this.edit=!0};z(pt,dt);var gt=function(){lt.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,15):this.Ff=K(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,16):this.Ff=K(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,17):this.Ff=K(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,26):this.Ff=K(this.Ff,26)}});var t,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+" ("+D(t(r[e]))+")");return n.push(">>"),n.join("\n")}},set:function(t){"object"===e(t)&&(r=t)}}),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 t},set:function(e){t=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(e){t="/"+e}})};z(gt,lt);var mt=function(){gt.call(this),this.pushButton=!0};z(mt,gt);var vt=function(){gt.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:[]}})};z(vt,gt);var bt=function(){var t,r;lt.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),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+" ("+D(t(i[e]))+")");return r.push(">>"),r.join("\n")},set:function(t){"object"===e(t)&&(i=t)}}),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=Lt.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};z(bt,lt),vt.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()}},vt.prototype.createOption=function(t){var e=new bt;return e.Parent=this,e.optionName=t,this.Kids.push(e),At.call(this.scope,e),e};var yt=function(){gt.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Lt.CheckBox.createAppearanceStream()};z(yt,gt);var wt=function(){lt.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,13):this.Ff=K(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,21):this.Ff=K(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,23):this.Ff=K(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,24):this.Ff=K(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,25):this.Ff=K(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,26):this.Ff=K(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}})};z(wt,lt);var Nt=function(){wt.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(J(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=X(this.Ff,14):this.Ff=K(this.Ff,14)}}),this.password=!0};z(Nt,wt);var Lt={CheckBox:{createAppearanceStream:function(){return{N:{On:Lt.CheckBox.YesNormal},D:{On:Lt.CheckBox.YesPushDown,Off:Lt.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=W(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=Q(t,t.caption);return r.push("0.749023 g"),r.push("0 0 "+T(Lt.internal.getWidth(t))+" "+T(Lt.internal.getHeight(t))+" re"),r.push("f"),r.push("BMC"),r.push("q"),r.push("0 0 1 rg"),r.push("/"+n+" "+T(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=W(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=Lt.internal.getHeight(t),o=Lt.internal.getWidth(t),s=Q(t,t.caption);return i.push("1 g"),i.push("0 0 "+T(o)+" "+T(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+T(o-1)+" "+T(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+r+" "+T(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=W(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+T(Lt.internal.getWidth(t))+" "+T(Lt.internal.getHeight(t))+" re"),r.push("f"),e.stream=r.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:Lt.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=Lt.RadioButton.Circle.YesNormal,e.D[t]=Lt.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=W(t);e.scope=t.scope;var r=[],n=Lt.internal.getWidth(t)<=Lt.internal.getHeight(t)?Lt.internal.getWidth(t)/4:Lt.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Lt.internal.Bezier_C,a=Number((n*i).toFixed(5));return r.push("q"),r.push("1 0 0 1 "+U(Lt.internal.getWidth(t)/2)+" "+U(Lt.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=W(t);e.scope=t.scope;var r=[],n=Lt.internal.getWidth(t)<=Lt.internal.getHeight(t)?Lt.internal.getWidth(t)/4:Lt.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*Lt.internal.Bezier_C).toFixed(5)),o=Number((n*Lt.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+U(Lt.internal.getWidth(t)/2)+" "+U(Lt.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 "+U(Lt.internal.getWidth(t)/2)+" "+U(Lt.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=W(t);e.scope=t.scope;var r=[],n=Lt.internal.getWidth(t)<=Lt.internal.getHeight(t)?Lt.internal.getWidth(t)/4:Lt.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*Lt.internal.Bezier_C).toFixed(5));return r.push("0.749023 g"),r.push("q"),r.push("1 0 0 1 "+U(Lt.internal.getWidth(t)/2)+" "+U(Lt.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:Lt.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=Lt.RadioButton.Cross.YesNormal,e.D[t]=Lt.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=W(t);e.scope=t.scope;var r=[],n=Lt.internal.calculateCross(t);return r.push("q"),r.push("1 1 "+T(Lt.internal.getWidth(t)-2)+" "+T(Lt.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(T(n.x1.x)+" "+T(n.x1.y)+" m"),r.push(T(n.x2.x)+" "+T(n.x2.y)+" l"),r.push(T(n.x4.x)+" "+T(n.x4.y)+" m"),r.push(T(n.x3.x)+" "+T(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join("\n"),e},YesPushDown:function(t){var e=W(t);e.scope=t.scope;var r=Lt.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+T(Lt.internal.getWidth(t))+" "+T(Lt.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+T(Lt.internal.getWidth(t)-2)+" "+T(Lt.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(T(r.x1.x)+" "+T(r.x1.y)+" m"),n.push(T(r.x2.x)+" "+T(r.x2.y)+" l"),n.push(T(r.x4.x)+" "+T(r.x4.y)+" m"),n.push(T(r.x3.x)+" "+T(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=W(t);e.scope=t.scope;var r=[];return r.push("0.749023 g"),r.push("0 0 "+T(Lt.internal.getWidth(t))+" "+T(Lt.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}};Lt.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=Lt.internal.getWidth(t),r=Lt.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}}}},Lt.internal.getWidth=function(t){var r=0;return"object"===e(t)&&(r=H(t.Rect[2])),r},Lt.internal.getHeight=function(t){var r=0;return"object"===e(t)&&(r=H(t.Rect[3])),r};var At=E.addField=function(t){if(it(this,t),!(t instanceof lt))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};E.AcroFormChoiceField=ht,E.AcroFormListBox=ft,E.AcroFormComboBox=dt,E.AcroFormEditBox=pt,E.AcroFormButton=gt,E.AcroFormPushButton=mt,E.AcroFormRadioButton=vt,E.AcroFormCheckBox=yt,E.AcroFormTextField=wt,E.AcroFormPasswordField=Nt,E.AcroFormAppearance=Lt,E.AcroForm={ChoiceField:ht,ListBox:ft,ComboBox:dt,EditBox:pt,Button:gt,PushButton:mt,RadioButton:vt,CheckBox:yt,TextField:wt,PasswordField:Nt,Appearance:Lt},M.AcroForm={ChoiceField:ht,ListBox:ft,ComboBox:dt,EditBox:pt,Button:gt,PushButton:mt,RadioButton:vt,CheckBox:yt,TextField:wt,PasswordField:Nt,Appearance:Lt};var xt=M.AcroForm;function St(t){return t.reduce((function(t,e,r){return t[e]=r,t}),{})}!function(t){t.__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=t.__addimage__.getImageFileTypeByImageData=function(t,e){var i,a,o,s,c,u=r;if("RGBA"===(e=e||r)||void 0!==t.data&&t.data instanceof Uint8ClampedArray&&"height"in t&&"width"in t)return"RGBA";if(x(t))for(c in n)for(o=n[c],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){u=c;break}}else for(c in n)for(o=n[c],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){u=c;break}}return u===r&&e!==r&&(u=e),u},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===b.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===b.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,c=e.transparency.length;s<c;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 u=void 0!==e.filter?["/"+e.filter]:void 0;if(n({data:e.data,additionalKeyValues:a,alreadyAppliedFilters:u,objectId:e.objectId}),r("endobj"),"sMask"in e&&void 0!==e.sMask){var l="/Predictor "+e.predictor+" /Colors 1 /BitsPerComponent "+e.bitsPerComponent+" /Columns "+e.width,h={width:e.width,height:e.height,colorSpace:"DeviceGray",bitsPerComponent:e.bitsPerComponent,decodeParameters:l,data:e.sMask};"filter"in e&&(h.filter=e.filter),t.call(this,h)}if(e.colorSpace===b.INDEXED){var f=this.internal.newObject();n({data:_(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},h=function(){return Object.keys(this.internal.collections.addImage_images).length},f=function(e){return"function"==typeof t["process"+e.toUpperCase()]},d=function(t){return"object"===e(t)&&1===t.nodeType},p=function(e,r){if("IMG"===e.nodeName&&e.hasAttribute("src")){var n=""+e.getAttribute("src");if(0===n.indexOf("data:image/"))return c(unescape(n).split("base64,").pop());var i=t.loadFile(n,!0);if(void 0!==i)return i}if("CANVAS"===e.nodeName){if(0===e.width||0===e.height)throw new Error("Given canvas must have data. Canvas width: "+e.width+", height: "+e.height);var a;switch(r){case"PNG":a="image/png";break;case"WEBP":a="image/webp";break;case"JPEG":case"JPG":default:a="image/jpeg"}return c(e.toDataURL(a,1).split("base64,").pop())}},g=function(t){var e=this.internal.collections.addImage_images;if(e)for(var r in e)if(t===e[r].alias)return e[r]},m=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]},v=function(t,e,r,n,i,a){var o=m.call(this,r,n,i),s=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString,u=l.call(this);if(r=o[0],n=o[1],u[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),c(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),c(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")},b=t.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"};t.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 y=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},w=t.__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(x(t))for(r=t.byteLength/2,e=0;e<r;e++)n=(n<<5)-n+t[e],n|=0;return n},N=t.__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},L=t.__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},A=t.__addimage__.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array};t.__addimage__.isArrayBuffer=function(t){return A()&&t instanceof ArrayBuffer};var x=t.__addimage__.isArrayBufferView=function(t){return A()&&"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)},S=t.__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},_=t.__addimage__.arrayBufferToBinaryString=function(t){for(var e="",r=x(t)?t:new Uint8Array(t),n=0;n<r.length;n+=8192)e+=String.fromCharCode.apply(null,r.subarray(n,n+8192));return e};t.addImage=function(){var t,n,i,a,o,s,c,l,h;if("number"==typeof arguments[1]?(n=r,i=arguments[1],a=arguments[2],o=arguments[3],s=arguments[4],c=arguments[5],l=arguments[6],h=arguments[7]):(n=arguments[1],i=arguments[2],a=arguments[3],o=arguments[4],s=arguments[5],c=arguments[6],l=arguments[7],h=arguments[8]),"object"===e(t=arguments[0])&&!d(t)&&"imageData"in t){var f=t;t=f.imageData,n=f.format||n||r,i=f.x||i||0,a=f.y||a||0,o=f.w||f.width||o,s=f.h||f.height||s,c=f.alias||c,l=f.compression||l,h=f.rotation||f.angle||h}var p=this.internal.getFilters();if(void 0===l&&-1!==p.indexOf("FlateEncode")&&(l="SLOW"),isNaN(i)||isNaN(a))throw new Error("Invalid coordinates passed to jsPDF.addImage");u.call(this);var g=P.call(this,t,n,c,l);return v.call(this,i,a,o,s,g,h),this};var P=function(e,n,a,o){var s,c,u;if("string"==typeof e&&i(e)===r){e=unescape(e);var l=k(e,!1);(""!==l||void 0!==(l=t.loadFile(e,!0)))&&(e=l)}if(d(e)&&(e=p(e,n)),n=i(e,n),!f(n))throw new Error("addImage does not support files of type '"+n+"', please ensure that a plugin for '"+n+"' support is added.");if((null==(u=a)||0===u.length)&&(a=function(t){return"string"==typeof t||x(t)?w(t):x(t.data)?w(t.data):null}(e)),(s=g.call(this,a))||(A()&&(e instanceof Uint8Array||"RGBA"===n||(c=e,e=S(e))),s=this["process"+n.toUpperCase()](e,h.call(this),a,function(e){return e&&"string"==typeof e&&(e=e.toUpperCase()),e in t.image_compression?e:y.NONE}(o),c)),!s)throw new Error("An unknown error occurred whilst processing the image.");return s},k=t.__addimage__.convertBase64ToBinaryString=function(t,e){var r;e="boolean"!=typeof e||e;var n,i="";if("string"==typeof t){n=null!==(r=L(t))?r.data:t;try{i=c(n)}catch(t){if(e)throw N(n)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return i};t.getImageProperties=function(e){var n,a,o="";if(d(e)&&(e=p(e)),"string"==typeof e&&i(e)===r&&(""===(o=k(e,!1))&&(o=t.loadFile(e)||""),e=o),a=i(e),!f(a))throw new Error("addImage does not support files of type '"+a+"', please ensure that a plugin for '"+a+"' support is added.");if(!A()||e instanceof Uint8Array||(e=S(e)),!(n=this["process"+a.toUpperCase()](e)))throw new Error("An unknown error occurred whilst processing the image");return n.fileType=a,n}}(M.API),
+/**
+   * @license
+   * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+function(t){var e=function(t){if(void 0!==t&&""!=t)return!0};M.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(t){for(var r,n,i,a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,s=this.internal.getPageInfoByObjId(t.objId),c=t.pageContext.annotations,u=!1,l=0;l<c.length&&!u;l++)switch((r=c[l]).type){case"link":(e(r.options.url)||e(r.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(0!=u){this.internal.write("/Annots [");for(var h=0;h<c.length;h++){r=c[h];var f=this.internal.pdfEscape,d=this.internal.getEncryptor(t.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var p=this.internal.newAdditionalObject(),g=this.internal.newAdditionalObject(),m=this.internal.getEncryptor(p.objId),v=r.title||"Note";i="<</Type /Annot /Subtype /Text "+(n="/Rect ["+a(r.bounds.x)+" "+o(r.bounds.y+r.bounds.h)+" "+a(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y)+"] ")+"/Contents ("+f(m(r.contents))+")",i+=" /Popup "+g.objId+" 0 R",i+=" /P "+s.objId+" 0 R",i+=" /T ("+f(m(v))+") >>",p.content=i;var b=p.objId+" 0 R";i="<</Type /Annot /Subtype /Popup "+(n="/Rect ["+a(r.bounds.x+30)+" "+o(r.bounds.y+r.bounds.h)+" "+a(r.bounds.x+r.bounds.w+30)+" "+o(r.bounds.y)+"] ")+" /Parent "+b,r.open&&(i+=" /Open true"),i+=" >>",g.content=i,this.internal.write(p.objId,"0 R",g.objId,"0 R");break;case"freetext":n="/Rect ["+a(r.bounds.x)+" "+o(r.bounds.y)+" "+a(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y+r.bounds.h)+"] ";var y=r.color||"#000000";i="<</Type /Annot /Subtype /FreeText "+n+"/Contents ("+f(d(r.contents))+")",i+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+y+")",i+=" /Border [0 0 0]",i+=" >>",this.internal.write(i);break;case"link":if(r.options.name){var w=this.annotations._nameMap[r.options.name];r.options.pageNumber=w.page,r.options.top=w.y}else r.options.top||(r.options.top=0);if(n="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",i="",r.options.url)i="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /A <</S /URI /URI ("+f(d(r.options.url))+") >>";else if(r.options.pageNumber){switch(i="<</Type /Annot /Subtype /Link "+n+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":i+=" /Fit]";break;case"FitH":i+=" /FitH "+r.options.top+"]";break;case"FitV":r.options.left=r.options.left||0,i+=" /FitV "+r.options.left+"]";break;case"XYZ":default:var N=o(r.options.top);r.options.left=r.options.left||0,void 0===r.options.zoom&&(r.options.zoom=0),i+=" /XYZ "+r.options.left+" "+N+" "+r.options.zoom+"]"}}""!=i&&(i+=" >>",this.internal.write(i))}}this.internal.write("]")}}]),t.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)}},t.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"})},t.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 c=this.splitTextToSize(t,a).length;i=Math.ceil(s*c)}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},t.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor}}(M.API),
+/**
+   * @license
+   * Copyright (c) 2017 Aras Abbasi
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+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},c=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 u=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 l=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:!u(t)||!o(e)&&!o(r)||!o(r)&&s(e)||s(t)&&!o(e)||s(t)&&c(e)||s(t)&&s(e)?0:l(t)&&o(e)&&!s(e)&&o(r)&&u(r)?3:s(t)||!o(r)?1:2:-1},d=function(t){var r=0,n=0,i=0,a="",s="",c="",u=(t=t||"").split("\\s+"),l=[];for(r=0;r<u.length;r+=1){for(l.push(""),n=0;n<u[r].length;n+=1)a=u[r][n],s=u[r][n-1],c=u[r][n+1],o(a)?(i=f(a,s,c),l[r]+=-1!==i?String.fromCharCode(e[a.charCodeAt(0)][i]):a):l[r]+=a;l[r]=h(l[r])}return l.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])}(M.API),
+/** @license
+   * jsPDF Autoprint Plugin
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+function(t){t.autoPrint=function(t){var e;switch((t=t||{}).variant=t.variant||"non-conform",t.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default: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")}))}return this}}(M.API),
+/**
+   * @license
+   * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+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}])}(M.API),function(t){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]},t.setHeaderFunction=function(t){return i.call(this),this.internal.__cell__.headerFunction="function"==typeof t?t:void 0,this},t.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,c=0,u=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 l=e.maxWidth;l>0?"string"==typeof t?t=this.splitTextToSize(t,l):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce((function(t,e){return t.concat(u.splitTextToSize(e,l))}),[])):t=Array.isArray(t)?t:[t];for(var h=0;h<t.length;h++)o<(c=this.getStringUnitWidth(t[h],{font:n})*r)&&(o=c);return 0!==o&&(s=t.length),{w:o/=a,h:Math.max((s*r*this.getLineHeightFactor()-r*(this.getLineHeightFactor()-1))/a,0)}},t.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=t.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,c=this.internal.__cell__.tableHeaderRow,u=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,u&&c&&(this.printHeaderRow(t.lineNumber,!0),t.y+=c[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};t.table=function(t,n,u,l,h){if(i.call(this),!u)throw new Error("No data for PDF table.");var f,d,p,g,m=[],v=[],b=[],y={},w={},N=[],L=[],A=(h=h||{}).autoSize||!1,x=!1!==h.printHeaders,S=h.css&&void 0!==h.css["font-size"]?16*h.css["font-size"]:h.fontSize||12,_=h.margins||Object.assign({width:this.getPageWidth()},r),P="number"==typeof h.padding?h.padding:3,k=h.headerBackgroundColor||"#c8c8c8",F=h.headerTextColor||"#000";if(a.call(this),this.internal.__cell__.printHeaders=x,this.internal.__cell__.margins=_,this.internal.__cell__.table_font_size=S,this.internal.__cell__.padding=P,this.internal.__cell__.headerBackgroundColor=k,this.internal.__cell__.headerTextColor=F,this.setFontSize(S),null==l)v=m=Object.keys(u[0]),b=m.map((function(){return"left"}));else if(Array.isArray(l)&&"object"===e(l[0]))for(m=l.map((function(t){return t.name})),v=l.map((function(t){return t.prompt||t.name||""})),b=l.map((function(t){return t.align||"left"})),f=0;f<l.length;f+=1)w[l[f].name]=l[f].width*(19.049976/25.4);else Array.isArray(l)&&"string"==typeof l[0]&&(v=m=l,b=m.map((function(){return"left"})));if(A||Array.isArray(l)&&"string"==typeof l[0])for(f=0;f<m.length;f+=1){for(y[g=m[f]]=u.map((function(t){return t[g]})),this.setFont(void 0,"bold"),N.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)N.push(this.getTextDimensions(d[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);w[g]=Math.max.apply(null,N)+P+P,N=[]}if(x){var I={};for(f=0;f<m.length;f+=1)I[m[f]]={},I[m[f]].text=v[f],I[m[f]].align=b[f];var C=c.call(this,I,w);L=m.map((function(e){return new o(t,n,w[e],C,I[e].text,void 0,I[e].align)})),this.setTableHeaderRow(L),this.printHeaderRow(1,!1)}var j=l.reduce((function(t,e){return t[e.name]=e.align,t}),{});for(f=0;f<u.length;f+=1){"rowStart"in h&&h.rowStart instanceof Function&&h.rowStart({row:f,data:u[f]},this);var O=c.call(this,u[f],w);for(p=0;p<m.length;p+=1){var B=u[f][m[p]];"cellStart"in h&&h.cellStart instanceof Function&&h.cellStart({row:f,col:p,data:B},this),s.call(this,new o(t,n,w[m[p]],O,B,f+2,j[m[p]]))}}return this.internal.__cell__.table_x=t,this.internal.__cell__.table_y=n,this};var c=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)};t.setTableHeaderRow=function(t){i.call(this),this.internal.__cell__.tableHeaderRow=t},t.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 c=[],u=0;u<this.internal.__cell__.tableHeaderRow.length;u+=1){r=this.internal.__cell__.tableHeaderRow[u].clone(),e&&(r.y=this.internal.__cell__.margins.top||0,c.push(r)),r.lineNumber=t;var l=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),s.call(this,r),this.setTextColor(l)}c.length>0&&this.setTableHeaderRow(c),this.setFont(void 0,"normal"),n=!1}}(M.API);var _t={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Pt=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],kt=St(Pt),Ft=[100,200,300,400,500,600,700,800,900],It=St(Ft);function Ct(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),r=function(t){return _t[t=t||"normal"]?t:"normal"}(t.style),n=function(t){if(!t)return 400;if("number"==typeof t)return t>=100&&t<=900&&t%100==0?t:400;if(/^\d00$/.test(t))return parseInt(t);switch(t){case"bold":return 700;case"normal":default:return 400}}(t.weight),i=function(t){return"number"==typeof kt[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 jt(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 Ot={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Bt={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Mt(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function Et(t,e,r){for(var n=(r=r||{}).defaultFontFamily||"times",i=Object.assign({},Ot,r.genericFontFamilies||{}),a=null,o=null,s=0;s<e.length;++s)if(i[(a=Ct(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 '"+Mt(a)+"' and default family '"+n+"'.");if(o=function(t,e){if(e[t])return e[t];var r=kt[t],n=r<=kt.normal?-1:1,i=jt(e,Pt,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=_t[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=It[t],n=jt(e,Ft,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 '"+Mt(a)+"'.");return o}function qt(t){return t.trimLeft()}function Dt(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 Rt(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 Tt=["times"];!function(t){var r,n,a,o,s,c,u,l,f,d=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 c,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new c,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};t.events.push(["initialized",function(){this.context2d=new p(this),r=this.internal.f2,n=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString,o=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,c=this.internal.Point,u=this.internal.Rectangle,l=this.internal.Matrix,f=new d}]);var p=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 f.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]),f.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 c=[];Object.defineProperty(this,"pageBreaks",{get:function(){return c},set:function(t){c=t}}),Object.defineProperty(this,"ctx",{get:function(){return f},set:function(t){t instanceof d&&(f=t)}}),Object.defineProperty(this,"path",{get:function(){return f.path},set:function(t){f.path=t}});var u=[];Object.defineProperty(this,"ctxStack",{get:function(){return u},set:function(t){u=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){var e;e=g(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=g(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 l=null;function h(t,e){if(null===l){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());l=function(t){for(var e={},r=0;r<t.length;++r){var n=Ct(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 l}var p=null;Object.defineProperty(this,"fontFaces",{get:function(){return p},set:function(t){l=null,p=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 Tt;if(i in Bt)return[Bt[i]];for(;""!==i;){switch(r=null,e=(i=qt(i)).charAt(0)){case'"':case"'":r=Dt(i.substring(1),e);break;default:r=Rt(i)}if(null===r)return Tt;if(n.push(r[0]),""!==(i=qt(r[1]))&&","!==i.charAt(0))return Tt;i=i.replace(/^,/,"")}return n}(a);if(this.fontFaces){var c=Et(h(this.pdf,this.fontFaces),s.map((function(t){return{family:t,stretch:"normal",weight:n,style:r}})));this.pdf.setFont(c.ref.name,c.ref.style)}else{var u="";("bold"===n||parseInt(n,10)>=700||"bold"===r)&&(u="bold"),"italic"===r&&(u+="italic"),0===u.length&&(u="normal");for(var l="",f={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"},d=0;d<s.length;d++){if(void 0!==this.pdf.internal.getFont(s[d],u,{noFallback:!0,disableWarning:!0})){l=s[d];break}if("bolditalic"===u&&void 0!==this.pdf.internal.getFont(s[d],"bold",{noFallback:!0,disableWarning:!0}))l=s[d],u="bold";else if(void 0!==this.pdf.internal.getFont(s[d],"normal",{noFallback:!0,disableWarning:!0})){l=s[d],u="normal";break}}if(""===l)for(var p=0;p<s.length;p++)if(f[s[p]]){l=f[s[p]];break}l=""===l?"Times":l,this.pdf.setFont(l,u)}}}}),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,T.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(t){this.ctx.lineDash=t,T.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=Boolean(t)}})};p.prototype.setLineDash=function(t){this.lineDash=t},p.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},p.prototype.fill=function(){A.call(this,"fill",!1)},p.prototype.stroke=function(){A.call(this,"stroke",!1)},p.prototype.beginPath=function(){this.path=[{type:"begin"}]},p.prototype.moveTo=function(t,e){if(isNaN(t)||isNaN(e))throw i.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var r=this.ctx.transform.applyToPoint(new c(t,e));this.path.push({type:"mt",x:r.x,y:r.y}),this.ctx.lastPoint=new c(t,e)},p.prototype.closePath=function(){var t=new c(0,0),r=0;for(r=this.path.length-1;-1!==r;r--)if("begin"===this.path[r].type&&"object"===e(this.path[r+1])&&"number"==typeof this.path[r+1].x){t=new c(this.path[r+1].x,this.path[r+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new c(t.x,t.y)},p.prototype.lineTo=function(t,e){if(isNaN(t)||isNaN(e))throw i.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var r=this.ctx.transform.applyToPoint(new c(t,e));this.path.push({type:"lt",x:r.x,y:r.y}),this.ctx.lastPoint=new c(r.x,r.y)},p.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),A.call(this,null,!0)},p.prototype.quadraticCurveTo=function(t,e,r,n){if(isNaN(r)||isNaN(n)||isNaN(t)||isNaN(e))throw i.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var a=this.ctx.transform.applyToPoint(new c(r,n)),o=this.ctx.transform.applyToPoint(new c(t,e));this.path.push({type:"qct",x1:o.x,y1:o.y,x:a.x,y:a.y}),this.ctx.lastPoint=new c(a.x,a.y)},p.prototype.bezierCurveTo=function(t,e,r,n,a,o){if(isNaN(a)||isNaN(o)||isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw i.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var s=this.ctx.transform.applyToPoint(new c(a,o)),u=this.ctx.transform.applyToPoint(new c(t,e)),l=this.ctx.transform.applyToPoint(new c(r,n));this.path.push({type:"bct",x1:u.x,y1:u.y,x2:l.x,y2:l.y,x:s.x,y:s.y}),this.ctx.lastPoint=new c(s.x,s.y)},p.prototype.arc=function(t,e,r,n,a,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(a))throw i.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(o=Boolean(o),!this.ctx.transform.isIdentity){var s=this.ctx.transform.applyToPoint(new c(t,e));t=s.x,e=s.y;var u=this.ctx.transform.applyToPoint(new c(0,r)),l=this.ctx.transform.applyToPoint(new c(0,0));r=Math.sqrt(Math.pow(u.x-l.x,2)+Math.pow(u.y-l.y,2))}Math.abs(a-n)>=2*Math.PI&&(n=0,a=2*Math.PI),this.path.push({type:"arc",x:t,y:e,radius:r,startAngle:n,endAngle:a,counterclockwise:o})},p.prototype.arcTo=function(t,e,r,n,i){throw new Error("arcTo not implemented.")},p.prototype.rect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw i.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)},p.prototype.fillRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw i.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!m.call(this)){var a={};"butt"!==this.lineCap&&(a.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(a.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,e,r,n),this.fill(),a.hasOwnProperty("lineCap")&&(this.lineCap=a.lineCap),a.hasOwnProperty("lineJoin")&&(this.lineJoin=a.lineJoin)}},p.prototype.strokeRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw i.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");v.call(this)||(this.beginPath(),this.rect(t,e,r,n),this.stroke())},p.prototype.clearRect=function(t,e,r,n){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n))throw i.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))},p.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 d(this.ctx);this.ctxStack.push(this.ctx),this.ctx=n}},p.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)},p.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var g=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 h(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}},m=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},v=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};p.prototype.fillText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw i.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(n=isNaN(n)?void 0:n,!m.call(this)){var a=q(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;C.call(this,{text:t,x:e,y:r,scale:o,angle:a,align:this.textAlign,maxWidth:n})}},p.prototype.strokeText=function(t,e,r,n){if(isNaN(e)||isNaN(r)||"string"!=typeof t)throw i.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!v.call(this)){n=isNaN(n)?void 0:n;var a=q(this.ctx.transform.rotation),o=this.ctx.transform.scaleX;C.call(this,{text:t,x:e,y:r,scale:o,renderingMode:"stroke",angle:a,align:this.textAlign,maxWidth:n})}},p.prototype.measureText=function(t){if("string"!=typeof t)throw i.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(),a=e.getStringUnitWidth(t)*n/e.internal.scaleFactor,o=function(t){var e=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return e}}),this};return new o({width:a*=Math.round(96*r/72*1e4)/1e4})},p.prototype.scale=function(t,e){if(isNaN(t)||isNaN(e))throw i.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)},p.prototype.rotate=function(t){if(isNaN(t))throw i.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)},p.prototype.translate=function(t,e){if(isNaN(t)||isNaN(e))throw i.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)},p.prototype.transform=function(t,e,r,n,a,o){if(isNaN(t)||isNaN(e)||isNaN(r)||isNaN(n)||isNaN(a)||isNaN(o))throw i.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var s=new l(t,e,r,n,a,o);this.ctx.transform=this.ctx.transform.multiply(s)},p.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 b=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};p.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 m,v=this.ctx.transform.decompose(),w=q(v.rotate.shx),A=new l,S=(A=(A=(A=A.multiply(v.translate)).multiply(v.skew)).multiply(v.scale)).applyToRectangle(new u(a-e*p,o-r*g,n*f,i*d)),_=y.call(this,S),P=[],k=0;k<_.length;k+=1)-1===P.indexOf(_[k])&&P.push(_[k]);if(L(P),this.autoPaging)for(var F=P[0],I=P[P.length-1],C=F;C<I+1;C++){this.pdf.setPage(C);var j=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],O=1===C?this.posY+this.margin[0]:this.margin[0],B=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],M=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],E=1===C?0:B+(C-2)*M;if(0!==this.ctx.clip_path.length){var D=this.path;m=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=N(m,this.posX+this.margin[3],-E+O+this.ctx.prevPageLastElemOffset),x.call(this,"fill",!0),this.path=D}var R=JSON.parse(JSON.stringify(S));R=N([R],this.posX+this.margin[3],-E+O+this.ctx.prevPageLastElemOffset)[0];var T=(C>F||C<I)&&b.call(this);T&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],j,M,null).clip().discardPath()),this.pdf.addImage(t,"JPEG",R.x,R.y,R.w,R.h,null,null,w),T&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(t,"JPEG",S.x,S.y,S.w,S.h,null,null,w)};var y=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=D(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=R(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];)w.call(this);return n},w=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},N=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;case"mt":case"lt":case"arc":default:t[n].x+=e,t[n].y+=r}return t},L=function(t){return t.sort((function(t,e){return t-e}))},A=function(t,e){for(var r,n,i=this.fillStyle,a=this.strokeStyle,o=this.lineCap,s=this.lineWidth,c=Math.abs(s*this.ctx.transform.scaleX),u=this.lineJoin,l=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=y.call(this,h[d]),g=0;g<p.length;g+=1)-1===f.indexOf(p[g])&&f.push(p[g]);for(var m=0;m<f.length;m++)for(;this.pdf.internal.getNumberOfPages()<f[m];)w.call(this);if(L(f),this.autoPaging)for(var v=f[0],A=f[f.length-1],S=v;S<A+1;S++){this.pdf.setPage(S),this.fillStyle=i,this.strokeStyle=a,this.lineCap=o,this.lineWidth=c,this.lineJoin=u;var _=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],P=1===S?this.posY+this.margin[0]:this.margin[0],k=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],I=1===S?0:k+(S-2)*F;if(0!==this.ctx.clip_path.length){var C=this.path;r=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=N(r,this.posX+this.margin[3],-I+P+this.ctx.prevPageLastElemOffset),x.call(this,t,!0),this.path=C}if(n=JSON.parse(JSON.stringify(l)),this.path=N(n,this.posX+this.margin[3],-I+P+this.ctx.prevPageLastElemOffset),!1===e||0===S){var j=(S>v||S<A)&&b.call(this);j&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],_,F,null).clip().discardPath()),x.call(this,t,e),j&&this.pdf.restoreGraphicsState()}this.lineWidth=s}else this.lineWidth=c,x.call(this,t,e),this.lineWidth=s;this.path=l},x=function(t,e){if(("stroke"!==t||e||!v.call(this))&&("stroke"===t||e||!m.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 c=i.length;if(a[o-1]&&!isNaN(a[o-1].x)&&(r=[s.x-a[o-1].x,s.y-a[o-1].y],c>0))for(;c>=0;c--)if(!0!==i[c-1].close&&!0!==i[c-1].begin){i[c-1].deltas.push(r),i[c-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 u=a[o-1].x+2/3*(s.x1-a[o-1].x),l=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,p=s.y;r=[u-a[o-1].x,l-a[o-1].y,h-a[o-1].x,f-a[o-1].y,d-a[o-1].x,p-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 g=!1,b=0;b<i.length;b++)if(i[b].arc)for(var y=i[b].abs,w=0;w<y.length;w++){var N=y[w];"arc"===N.type?P.call(this,N.x,N.y,N.radius,N.startAngle,N.endAngle,N.counterclockwise,void 0,e,!g):j.call(this,N.x,N.y),g=!0}else if(!0===i[b].close)this.pdf.internal.out("h"),g=!1;else if(!0!==i[b].begin){var L=i[b].start.x,A=i[b].start.y;O.call(this,i[b].deltas,L,A),g=!0}n&&k.call(this,n),e&&F.call(this)}},S=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;case"ideographic":return t;case"alphabetic":default:return t}},_=function(t){return t+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};p.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},p.prototype.createPattern=function(){return this.createLinearGradient()},p.prototype.createRadialGradient=function(){return this.createLinearGradient()};var P=function(t,e,r,n,i,a,o,s,c){for(var u=M.call(this,r,n,i,a),l=0;l<u.length;l++){var h=u[l];0===l&&(c?I.call(this,h.x1+t,h.y1+e):j.call(this,h.x1+t,h.y1+e)),B.call(this,t,e,h.x2,h.y2,h.x3,h.y3,h.x4,h.y4)}s?F.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")}},F=function(){this.pdf.clip(),this.pdf.discardPath()},I=function(t,e){this.pdf.internal.out(n(t)+" "+a(e)+" m")},C=function(t){var e;switch(t.align){case"right":case"end":e="right";break;case"center":e="center";break;case"left":case"start":default:e="left"}var r=this.pdf.getTextDimensions(t.text),n=S.call(this,t.y),i=_.call(this,n)-r.h,a=this.ctx.transform.applyToPoint(new c(t.x,n)),o=this.ctx.transform.decompose(),s=new l;s=(s=(s=s.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=s.applyToRectangle(new u(t.x,i,r.w,r.h)),m=y.call(this,g),v=[],w=0;w<m.length;w+=1)-1===v.indexOf(m[w])&&v.push(m[w]);if(L(v),this.autoPaging)for(var A=v[0],P=v[v.length-1],k=A;k<P+1;k++){this.pdf.setPage(k);var F=1===k?this.posY+this.margin[0]:this.margin[0],I=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],C=this.pdf.internal.pageSize.height-this.margin[2],j=C-this.margin[0],O=this.pdf.internal.pageSize.width-this.margin[1],B=O-this.margin[3],M=1===k?0:I+(k-2)*j;if(0!==this.ctx.clip_path.length){var E=this.path;h=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=N(h,this.posX+this.margin[3],-1*M+F),x.call(this,"fill",!0),this.path=E}var q=N([JSON.parse(JSON.stringify(g))],this.posX+this.margin[3],-M+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 D="text"!==this.autoPaging;if(D||q.y+q.h<=C){if(D||q.y>=F&&q.x<=O){var R=D?t.text:this.pdf.splitTextToSize(t.text,t.maxWidth||O-q.x)[0],T=N([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-M+F+this.ctx.prevPageLastElemOffset)[0],U=D&&(k>A||k<P)&&b.call(this);U&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],B,j,null).clip().discardPath()),this.pdf.text(R,T.x,T.y,{angle:t.angle,align:e,renderingMode:t.renderingMode}),U&&this.pdf.restoreGraphicsState()}}else q.y<C&&(this.ctx.prevPageLastElemOffset+=C-q.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)},j=function(t,e,r,i){r=r||0,i=i||0,this.pdf.internal.out(n(t+r)+" "+a(e+i)+" l")},O=function(t,e,r){return this.pdf.lines(t,e,r,null,null)},B=function(t,e,n,i,a,c,u,l){this.pdf.internal.out([r(o(n+t)),r(s(i+e)),r(o(a+t)),r(s(c+e)),r(o(u+t)),r(s(l+e)),"c"].join(" "))},M=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=[],c=n?-1:1,u=e;o>1e-5;){var l=u+c*Math.min(o,a);s.push(E.call(this,t,u,l)),o-=Math.abs(l-u),u=l}return s},E=function(t,e,r){var n=(r-e)/2,i=t*Math.cos(n),a=t*Math.sin(n),o=i,s=-a,c=o*o+s*s,u=c+o*i+s*a,l=4/3*(Math.sqrt(2*c*u)-u)/(o*a-s*i),h=o-l*s,f=s+l*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)}},q=function(t){return 180*t/Math.PI},D=function(t,e,r,n,i,a){var o=t+.5*(r-t),s=e+.5*(n-e),c=i+.5*(r-i),l=a+.5*(n-a),h=Math.min(t,i,o,c),f=Math.max(t,i,o,c),d=Math.min(e,a,s,l),p=Math.max(e,a,s,l);return new u(h,d,f-h,p-d)},R=function(t,e,r,n,i,a,o,s){var c,l,h,f,d,p,g,m,v,b,y,w,N,L,A=r-t,x=n-e,S=i-r,_=a-n,P=o-i,k=s-a;for(l=0;l<41;l++)v=(g=(h=t+(c=l/40)*A)+c*((d=r+c*S)-h))+c*(d+c*(i+c*P-d)-g),b=(m=(f=e+c*x)+c*((p=n+c*_)-f))+c*(p+c*(a+c*k-p)-m),0==l?(y=v,w=b,N=v,L=b):(y=Math.min(y,v),w=Math.min(w,b),N=Math.max(N,v),L=Math.max(L,b));return new u(Math.round(y),Math.round(w),Math.round(N-y),Math.round(L-w))},T=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)}}}(M.API);var Ut=Uint8Array,zt=Uint16Array,Ht=Int32Array,Wt=new Ut([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]),Vt=new Ut([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]),Gt=new Ut([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Yt=function(t,e){for(var r=new zt(31),n=0;n<31;++n)r[n]=e+=1<<t[n-1];var i=new Ht(r[30]);for(n=1;n<30;++n)for(var a=r[n];a<r[n+1];++a)i[a]=a-r[n]<<5|n;return{b:r,r:i}},Jt=Yt(Wt,2),Xt=Jt.b,Kt=Jt.r;Xt[28]=258,Kt[258]=28;for(var Zt=Yt(Vt,0),$t=Zt.b,Qt=Zt.r,te=new zt(32768),ee=0;ee<32768;++ee){var re=(43690&ee)>>1|(21845&ee)<<1;re=(61680&(re=(52428&re)>>2|(13107&re)<<2))>>4|(3855&re)<<4,te[ee]=((65280&re)>>8|(255&re)<<8)>>1}var ne=function(t,e,r){for(var n=t.length,i=0,a=new zt(e);i<n;++i)t[i]&&++a[t[i]-1];var o,s=new zt(e);for(i=1;i<e;++i)s[i]=s[i-1]+a[i-1]<<1;if(r){o=new zt(1<<e);var c=15-e;for(i=0;i<n;++i)if(t[i])for(var u=i<<4|t[i],l=e-t[i],h=s[t[i]-1]++<<l,f=h|(1<<l)-1;h<=f;++h)o[te[h]>>c]=u}else for(o=new zt(n),i=0;i<n;++i)t[i]&&(o[i]=te[s[t[i]-1]++]>>15-t[i]);return o},ie=new Ut(288);for(ee=0;ee<144;++ee)ie[ee]=8;for(ee=144;ee<256;++ee)ie[ee]=9;for(ee=256;ee<280;++ee)ie[ee]=7;for(ee=280;ee<288;++ee)ie[ee]=8;var ae=new Ut(32);for(ee=0;ee<32;++ee)ae[ee]=5;var oe=ne(ie,9,0),se=ne(ie,9,1),ce=ne(ae,5,0),ue=ne(ae,5,1),le=function(t){for(var e=t[0],r=1;r<t.length;++r)t[r]>e&&(e=t[r]);return e},he=function(t,e,r){var n=e/8|0;return(t[n]|t[n+1]<<8)>>(7&e)&r},fe=function(t,e){var r=e/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&e)},de=function(t){return(t+7)/8|0},pe=function(t,e,r){return(null==e||e<0)&&(e=0),(null==r||r>t.length)&&(r=t.length),new Ut(t.subarray(e,r))},ge=["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"],me=function(t,e,r){var n=new Error(e||ge[t]);if(n.code=t,Error.captureStackTrace&&Error.captureStackTrace(n,me),!r)throw n;return n},ve=function(t,e,r){r<<=7&e;var n=e/8|0;t[n]|=r,t[n+1]|=r>>8},be=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},ye=function(t,e){for(var r=[],n=0;n<t.length;++n)t[n]&&r.push({s:n,f:t[n]});var i=r.length,a=r.slice();if(!i)return{t:_e,l:0};if(1==i){var o=new Ut(r[0].s+1);return o[r[0].s]=1,{t:o,l:1}}r.sort((function(t,e){return t.f-e.f})),r.push({s:-1,f:25001});var s=r[0],c=r[1],u=0,l=1,h=2;for(r[0]={s:-1,f:s.f+c.f,l:s,r:c};l!=i-1;)s=r[r[u].f<r[h].f?u++:h++],c=r[u!=l&&r[u].f<r[h].f?u++:h++],r[l++]={s:-1,f:s.f+c.f,l:s,r:c};var f=a[0].s;for(n=1;n<i;++n)a[n].s>f&&(f=a[n].s);var d=new zt(f+1),p=we(r[l-1],d,0);if(p>e){n=0;var g=0,m=p-e,v=1<<m;for(a.sort((function(t,e){return d[e.s]-d[t.s]||t.f-e.f}));n<i;++n){var b=a[n].s;if(!(d[b]>e))break;g+=v-(1<<p-d[b]),d[b]=e}for(g>>=m;g>0;){var y=a[n].s;d[y]<e?g-=1<<e-d[y]++-1:++n}for(;n>=0&&g;--n){var w=a[n].s;d[w]==e&&(--d[w],++g)}p=e}return{t:new Ut(d),l:p}},we=function(t,e,r){return-1==t.s?Math.max(we(t.l,e,r+1),we(t.r,e,r+1)):e[t.s]=r},Ne=function(t){for(var e=t.length;e&&!t[--e];);for(var r=new zt(++e),n=0,i=t[0],a=1,o=function(t){r[n++]=t},s=1;s<=e;++s)if(t[s]==i&&s!=e)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=t[s]}return{c:r.subarray(0,n),n:e}},Le=function(t,e){for(var r=0,n=0;n<e.length;++n)r+=t[n]*e[n];return r},Ae=function(t,e,r){var n=r.length,i=de(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)},xe=function(t,e,r,n,i,a,o,s,c,u,l){ve(e,l++,r),++i[256];for(var h=ye(i,15),f=h.t,d=h.l,p=ye(a,15),g=p.t,m=p.l,v=Ne(f),b=v.c,y=v.n,w=Ne(g),N=w.c,L=w.n,A=new zt(19),x=0;x<b.length;++x)++A[31&b[x]];for(x=0;x<N.length;++x)++A[31&N[x]];for(var S=ye(A,7),_=S.t,P=S.l,k=19;k>4&&!_[Gt[k-1]];--k);var F,I,C,j,O=u+5<<3,B=Le(i,ie)+Le(a,ae)+o,M=Le(i,f)+Le(a,g)+o+14+3*k+Le(A,_)+2*A[16]+3*A[17]+7*A[18];if(c>=0&&O<=B&&O<=M)return Ae(e,l,t.subarray(c,c+u));if(ve(e,l,1+(M<B)),l+=2,M<B){F=ne(f,d,0),I=f,C=ne(g,m,0),j=g;var E=ne(_,P,0);ve(e,l,y-257),ve(e,l+5,L-1),ve(e,l+10,k-4),l+=14;for(x=0;x<k;++x)ve(e,l+3*x,_[Gt[x]]);l+=3*k;for(var q=[b,N],D=0;D<2;++D){var R=q[D];for(x=0;x<R.length;++x){var T=31&R[x];ve(e,l,E[T]),l+=_[T],T>15&&(ve(e,l,R[x]>>5&127),l+=R[x]>>12)}}}else F=oe,I=ie,C=ce,j=ae;for(x=0;x<s;++x){var U=n[x];if(U>255){be(e,l,F[(T=U>>18&31)+257]),l+=I[T+257],T>7&&(ve(e,l,U>>23&31),l+=Wt[T]);var z=31&U;be(e,l,C[z]),l+=j[z],z>3&&(be(e,l,U>>5&8191),l+=Vt[z])}else be(e,l,F[U]),l+=I[U]}return be(e,l,F[256]),l+I[256]},Se=new Ht([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_e=new Ut(0),Pe=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}}},ke=function(t,e,r,n,i){if(!i&&(i={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),o=new Ut(a.length+t.length);o.set(a),o.set(t,a.length),t=o,i.w=a.length}return function(t,e,r,n,i,a){var o=a.z||t.length,s=new Ut(n+o+5*(1+Math.ceil(o/7e3))+i),c=s.subarray(n,s.length-i),u=a.l,l=7&(a.r||0);if(e){l&&(c[0]=a.r>>3);for(var h=Se[e-1],f=h>>13,d=8191&h,p=(1<<r)-1,g=a.p||new zt(32768),m=a.h||new zt(p+1),v=Math.ceil(r/3),b=2*v,y=function(e){return(t[e]^t[e+1]<<v^t[e+2]<<b)&p},w=new Ht(25e3),N=new zt(288),L=new zt(32),A=0,x=0,S=a.i||0,_=0,P=a.w||0,k=0;S+2<o;++S){var F=y(S),I=32767&S,C=m[F];if(g[I]=C,m[F]=I,P<=S){var j=o-S;if((A>7e3||_>24576)&&(j>423||!u)){l=xe(t,c,0,w,N,L,x,_,k,S-k,l),_=A=x=0,k=S;for(var O=0;O<286;++O)N[O]=0;for(O=0;O<30;++O)L[O]=0}var B=2,M=0,E=d,q=I-C&32767;if(j>2&&F==y(S-q))for(var D=Math.min(f,j)-1,R=Math.min(32767,S),T=Math.min(258,j);q<=R&&--E&&I!=C;){if(t[S+B]==t[S+B-q]){for(var U=0;U<T&&t[S+U]==t[S+U-q];++U);if(U>B){if(B=U,M=q,U>D)break;var z=Math.min(q,U-2),H=0;for(O=0;O<z;++O){var W=S-q+O&32767,V=W-g[W]&32767;V>H&&(H=V,C=W)}}}q+=(I=C)-(C=g[I])&32767}if(M){w[_++]=268435456|Kt[B]<<18|Qt[M];var G=31&Kt[B],Y=31&Qt[M];x+=Wt[G]+Vt[Y],++N[257+G],++L[Y],P=S+B,++A}else w[_++]=t[S],++N[t[S]]}}for(S=Math.max(S,P);S<o;++S)w[_++]=t[S],++N[t[S]];l=xe(t,c,u,w,N,L,x,_,k,S-k,l),u||(a.r=7&l|c[l/8|0]<<3,l-=7,a.h=m,a.p=g,a.i=S,a.w=P)}else{for(S=a.w||0;S<o+u;S+=65535){var J=S+65535;J>=o&&(c[l/8|0]=u,J=o),l=Ae(c,l+1,t.subarray(S,J))}a.i=o}return pe(s,0,n+de(l)+i)}(t,null==e.level?6:e.level,null==e.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+e.mem,r,n,i)},Fe=function(t,e,r){for(;r;++e)t[e]=r,r>>>=8};function Ie(t,e){e||(e={});var r=Pe();r.p(t);var n=ke(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=Pe();i.p(e.dictionary),Fe(t,2,i.d())}}(n,e),Fe(n,n.length-4,r.d()),n}function Ce(t,e){return function(t,e,r,n){var i=t.length,a=n?n.length:0;if(!i||e.f&&!e.l)return r||new Ut(0);var o=!r,s=o||2!=e.i,c=e.i;o&&(r=new Ut(3*i));var u=function(t){var e=r.length;if(t>e){var n=new Ut(Math.max(2*e,t));n.set(r),r=n}},l=e.f||0,h=e.p||0,f=e.b||0,d=e.l,p=e.d,g=e.m,m=e.n,v=8*i;do{if(!d){l=he(t,h,1);var b=he(t,h+1,3);if(h+=3,!b){var y=t[(I=de(h)+4)-4]|t[I-3]<<8,w=I+y;if(w>i){c&&me(0);break}s&&u(f+y),r.set(t.subarray(I,w),f),e.b=f+=y,e.p=h=8*w,e.f=l;continue}if(1==b)d=se,p=ue,g=9,m=5;else if(2==b){var N=he(t,h,31)+257,L=he(t,h+10,15)+4,A=N+he(t,h+5,31)+1;h+=14;for(var x=new Ut(A),S=new Ut(19),_=0;_<L;++_)S[Gt[_]]=he(t,h+3*_,7);h+=3*L;var P=le(S),k=(1<<P)-1,F=ne(S,P,1);for(_=0;_<A;){var I,C=F[he(t,h,k)];if(h+=15&C,(I=C>>4)<16)x[_++]=I;else{var j=0,O=0;for(16==I?(O=3+he(t,h,3),h+=2,j=x[_-1]):17==I?(O=3+he(t,h,7),h+=3):18==I&&(O=11+he(t,h,127),h+=7);O--;)x[_++]=j}}var B=x.subarray(0,N),M=x.subarray(N);g=le(B),m=le(M),d=ne(B,g,1),p=ne(M,m,1)}else me(1);if(h>v){c&&me(0);break}}s&&u(f+131072);for(var E=(1<<g)-1,q=(1<<m)-1,D=h;;D=h){var R=(j=d[fe(t,h)&E])>>4;if((h+=15&j)>v){c&&me(0);break}if(j||me(2),R<256)r[f++]=R;else{if(256==R){D=h,d=null;break}var T=R-254;if(R>264){var U=Wt[_=R-257];T=he(t,h,(1<<U)-1)+Xt[_],h+=U}var z=p[fe(t,h)&q],H=z>>4;z||me(3),h+=15&z;M=$t[H];if(H>3){U=Vt[H];M+=fe(t,h)&(1<<U)-1,h+=U}if(h>v){c&&me(0);break}s&&u(f+131072);var W=f+T;if(f<M){var V=a-M,G=Math.min(M,W);for(V+f<0&&me(3);f<G;++f)r[f]=n[V+f]}for(;f<W;++f)r[f]=r[f-M]}}e.l=d,e.p=D,e.b=f,e.f=l,d&&(l=1,e.m=g,e.d=p,e.n=m)}while(!l);return f!=r.length&&o?pe(r,0,f):r.subarray(0,f)}(t.subarray((r=t,n=e&&e.dictionary,(8!=(15&r[0])||r[0]>>4>7||(r[0]<<8|r[1])%31)&&me(6,"invalid zlib data"),(r[1]>>5&1)==+!n&&me(6,"invalid zlib data: "+(32&r[1]?"need":"unexpected")+" dictionary"),2+(r[1]>>3&4)),-4),{i:2},e&&e.out,e&&e.dictionary);var r,n}var je="undefined"!=typeof TextDecoder&&new TextDecoder;try{je.decode(_e,{stream:!0}),1}catch(t){}
+/**
+   * @license
+   * jsPDF filters PlugIn
+   * Copyright (c) 2014 Aras Abbasi
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */!function(t){var e=function(t){var e,r,n,i,a,o,s,c,u,l;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-(l=a%85))/85)-(u=a%85))/85)-(c=a%85))/85)-(s=a%85))/85)%85,r.push(o+33,s+33,c+33,u+33,l+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",c=255,u="charCodeAt",l="slice",h="replace";for(t[l](-2),t=t[l](0,-2)[h](/\s/g,"")[h]("z","!!!!!"),n=[],i=0,a=(t+=e="uuuuu"[l](t[s]%5||5))[s];a>i;i+=5)r=52200625*(t[u](i)-33)+614125*(t[u](i+1)-33)+7225*(t[u](i+2)-33)+85*(t[u](i+3)-33)+(t[u](i+4)-33),n.push(c&r>>24,c&r>>16,c&r>>8,c&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 t=(e=Ie(e)).reduce((function(t,e){return t+String.fromCharCode(e)}),"")};t.processDataByFilters=function(t,a){var o=0,s=t||"",c=[];for("string"==typeof(a=a||[])&&(a=[a]),o=0;o<a.length;o+=1)switch(a[o]){case"ASCII85Decode":case"/ASCII85Decode":s=r(s),c.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":s=e(s),c.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":s=n(s),c.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":s=s.split("").map((function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)})).join("")+">",c.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":s=i(s),c.push("/FlateDecode");break;default:throw new Error('The filter: "'+a[o]+'" is not implemented')}return{data:s,reverseChain:c.reverse().join(" ")}}}(M.API),
+/**
+   * @license
+   * jsPDF fileloading PlugIn
+   * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+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}(M.API),function(n){function i(){return(r.html2canvas?Promise.resolve(r.html2canvas):"object"===(void 0===t?"undefined":e(t))&&"undefined"!=typeof module?new Promise((function(t,e){try{t(require("html2canvas"))}catch(t){e(t)}})):"function"==typeof define&&define.amd?new Promise((function(t,e){try{require(["html2canvas"],t)}catch(t){e(t)}})):Promise.reject(new Error("Could not load html2canvas"))).catch((function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))})).then((function(t){return t.default?t.default:t}))}function a(){return(r.DOMPurify?Promise.resolve(r.DOMPurify):"object"===(void 0===t?"undefined":e(t))&&"undefined"!=typeof module?new Promise((function(t,e){try{t(require("dompurify"))}catch(t){e(t)}})):"function"==typeof define&&define.amd?new Promise((function(t,e){try{require(["dompurify"],t)}catch(t){e(t)}})):Promise.reject(new Error("Could not load dompurify"))).catch((function(t){return Promise.reject(new Error("Could not load dompurify: "+t))})).then((function(t){return t.default?t.default:t}))}var o=function(t){var r=e(t);return"undefined"===r?"undefined":"string"===r||t instanceof String?"string":"number"===r||t instanceof Number?"number":"function"===r||t instanceof Function?"function":t&&t.constructor===Array?"array":t&&1===t.nodeType?"element":"object"===r?"object":"unknown"},s=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},c=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=n.setProgress(1,t,1,[t])).set(e)};(c.prototype=Object.create(Promise.prototype)).constructor=c,c.convert=function(t,e){return t.__proto__=e||c.prototype,t},c.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"}},c.prototype.from=function(t,e){return this.then((function(){switch(e=e||function(t){switch(o(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(t)){case"string":return this.then(a).then((function(e){return this.set({src:s("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.")}}))},c.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.")}},c.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=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(e),this.prop.container.firstChild.appendChild(s("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"}))},c.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(i).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)}))},c.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(i).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)}))},c.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}))},c.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then((function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF}))},c.prototype.output=function(t,e,r){return"img"===(r=r||"pdf").toLowerCase()||"image"===r.toLowerCase()?this.outputImg(t,e):this.outputPdf(t,e)},c.prototype.outputPdf=function(t,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(t,e)}))},c.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.'}}))},c.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)}))},c.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){this.prop.callback(this.prop.pdf)}))},c.prototype.set=function(t){if("object"!==o(t))return this;var e=Object.keys(t||{}).map((function(e){if(e in c.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)}))},c.prototype.get=function(t,e){return this.then((function(){var r=t in c.template.prop?this.prop[t]:this.opt[t];return e?e(r):r}))},c.prototype.setMargin=function(t){return this.then((function(){switch(o(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)},c.prototype.setPageSize=function(t){function e(t,e){return Math.floor(t*e/72*96)}return this.then((function(){(t=t||M.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}))},c.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},c.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)},c.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}))}))},c.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:c.convert(Object.assign({},this),Promise.prototype),i=r.call(n,t,e);return c.convert(i,this.__proto__)},c.prototype.thenExternal=function(t,e){return Promise.prototype.then.call(this,t,e)},c.prototype.thenList=function(t){var e=this;return t.forEach((function(t){e=e.thenCore(t)})),e},c.prototype.catch=function(t){t&&(t=t.bind(this));var e=Promise.prototype.catch.call(this,t);return c.convert(e,this)},c.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},c.prototype.error=function(t){return this.then((function(){throw new Error(t)}))},c.prototype.using=c.prototype.set,c.prototype.saveAs=c.prototype.save,c.prototype.export=c.prototype.output,c.prototype.run=c.prototype.then,M.getPageSize=function(t,r,n){if("object"===e(t)){var i=t;t=i.orientation,r=i.unit||r,n=i.format||n}r=r||"mm",n=n||"a4",t=(""+(t||"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 c,u=0,l=0;if(s.hasOwnProperty(o))u=s[o][1]/a,l=s[o][0]/a;else try{u=n[1],l=n[0]}catch(t){throw new Error("Invalid format: "+n)}if("p"===t||"portrait"===t)t="p",l>u&&(c=l,l=u,u=c);else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;t="l",u>l&&(c=l,l=u,u=c)}return{width:l,height:u,unit:r,k:a,orientation:t}},n.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(Ct):null;var r=new c(e);return e.worker?r:r.from(t).doCallback()}}(M.API),
+/**
+   * @license
+   * ====================================================================
+   * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining
+   * a copy of this software and associated documentation files (the
+   * "Software"), to deal in the Software without restriction, including
+   * without limitation the rights to use, copy, modify, merge, publish,
+   * distribute, sublicense, and/or sell copies of the Software, and to
+   * permit persons to whom the Software is furnished to do so, subject to
+   * the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be
+   * included in all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   * ====================================================================
+   */
+function(t){var e,r,n;t.addJS=function(t){return n=t,this.internal.events.subscribe("postPutResources",(function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),r=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+n+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==e&&void 0!==r&&this.internal.out("/Names <</JavaScript "+e+" 0 R>>")})),this}}(M.API),
+/**
+   * @license
+   * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+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 c=this.internal.pages.length,u=[];for(i=0;i<c;i++){var l=t.internal.newObject();u.push(l);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();t.internal.write("<< /Names [ ");for(i=0;i<u.length;i++)t.internal.write("(page_"+(i+1)+")"+u[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}}])}(M.API),
+/**
+   * @license
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(t,r,n,i,a,o){var s,c=this.decode.DCT_DECODE,u=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}u={data:t,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:c,index:r,alias:n}}return u}}(M.API);var Oe,Be,Me,Ee,qe,De=function(){var t,e,n;function i(t){var e,r,n,i,a,o,s,c,u,l,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(),u=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"===u&&(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((l=n-this.transparency.indexed.length)>0)for(d=0;0<=l?d<l:d>l;0<=l?++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),c=String.fromCharCode.apply(String,h.slice(0,s)),this.text[c]=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")}}i.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},i.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},i.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},i.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,c){var u,l,h,f,d,p,g,m,v,b,y,w,N,L,A,x,S,_,P,k,F,I=Math.ceil((i.width-a)/s),C=Math.ceil((i.height-o)/c),j=i.width==I&&i.height==C;for(L=e*I,w=j?r:new Uint8Array(L*C),p=t.length,N=0,l=0;N<C&&n<p;){switch(t[n++]){case 0:for(f=S=0;S<L;f=S+=1)w[l++]=t[n++];break;case 1:for(f=_=0;_<L;f=_+=1)u=t[n++],d=f<e?0:w[l-e],w[l++]=(u+d)%256;break;case 2:for(f=P=0;P<L;f=P+=1)u=t[n++],h=(f-f%e)/e,A=N&&w[(N-1)*L+h*e+f%e],w[l++]=(A+u)%256;break;case 3:for(f=k=0;k<L;f=k+=1)u=t[n++],h=(f-f%e)/e,d=f<e?0:w[l-e],A=N&&w[(N-1)*L+h*e+f%e],w[l++]=(u+Math.floor((d+A)/2))%256;break;case 4:for(f=F=0;F<L;f=F+=1)u=t[n++],h=(f-f%e)/e,d=f<e?0:w[l-e],0===N?A=x=0:(A=w[(N-1)*L+h*e+f%e],x=h&&w[(N-1)*L+(h-1)*e+f%e]),g=d+A-x,m=Math.abs(g-d),b=Math.abs(g-A),y=Math.abs(g-x),v=m<=b&&m<=y?d:b<=y?A:x,w[l++]=(u+v)%256;break;default:throw new Error("Invalid filter algorithm: "+t[n-1])}if(!j){var O=((o+N*c)*i.width+a)*e,B=N*L;for(f=0;f<I;f+=1){for(var M=0;M<e;M+=1)r[O++]=w[B++];O+=(s-1)*e}}N++}}return t=Ce(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},i.prototype.decodePalette=function(){var t,e,r,n,i,a,o,s,c;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!=(c=a[t++])?c:255;return i},i.prototype.copyToImageData=function(t,e){var r,n,i,a,o,s,c,u,l,h,f;if(n=this.colors,l=null,r=this.hasAlphaChannel,this.palette.length&&(l=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),u=(i=t.data||t).length,o=l||e,a=s=0,1===n)for(;a<u;)c=l?4*e[a/4]:s,h=o[c++],i[a++]=h,i[a++]=h,i[a++]=h,i[a++]=r?o[c++]:255,s=c;else for(;a<u;)c=l?4*e[a/4]:s,i[a++]=o[c++],i[a++]=o[c++],i[a++]=o[c++],i[a++]=r?o[c++]:255,s=c},i.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t};var a=function(){if("[object Window]"===Object.prototype.toString.call(r)){try{e=r.document.createElement("canvas"),n=e.getContext("2d")}catch(t){return!1}return!0}return!1};return a(),t=function(t){var r;if(!0===a())return n.width=t.width,n.height=t.height,n.clearRect(0,0,t.width,t.height),n.putImageData(t,0,0),(r=new Image).src=e.toDataURL(),r;throw new Error("This method requires a Browser with Canvas-capability.")},i.prototype.decodeFrames=function(e){var r,n,i,a,o,s,c,u;if(this.animation){for(u=[],n=o=0,s=(c=this.animation.frames).length;o<s;n=++o)r=c[n],i=e.createImageData(r.width,r.height),a=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(i,a),r.imageData=i,u.push(r.image=t(i));return u}},i.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)},i.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,c;if(o=r++%i,c=n[o],s.renderFrame(t,o),i>1&&r/i<a)return s.animation._timeout=setTimeout(e,c.delay)})()},i.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},i.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))},i}();
+/**
+   * @license
+   *
+   * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining
+   * a copy of this software and associated documentation files (the
+   * "Software"), to deal in the Software without restriction, including
+   * without limitation the rights to use, copy, modify, merge, publish,
+   * distribute, sublicense, and/or sell copies of the Software, and to
+   * permit persons to whom the Software is furnished to do so, subject to
+   * the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be
+   * included in all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   * ====================================================================
+   */
+/**
+   * @license
+   * (c) Dean McNamee <dean@gmail.com>, 2013.
+   *
+   * https://github.com/deanm/omggif
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining a copy
+   * of this software and associated documentation files (the "Software"), to
+   * deal in the Software without restriction, including without limitation the
+   * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+   * sell copies of the Software, and to permit persons to whom the Software is
+   * furnished to do so, subject to the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be included in
+   * all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+   * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+   * IN THE SOFTWARE.
+   *
+   * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
+   * including animation and compression.  It does not rely on any specific
+   * underlying system, so should run in the browser, Node, or Plask.
+   */
+function Re(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<<(7&i)+1;t[e++];t[e++];var s=null,c=null;a&&(s=e,c=o,e+=3*o);var u=!0,l=[],h=0,f=null,d=0,p=null;for(this.width=r,this.height=n;u&&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(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}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++],0==(1&g)&&(f=null),d=g>>2&7,e++;break;case 254:for(;;){if(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}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++],N=w>>6&1,L=1<<(7&w)+1,A=s,x=c,S=!1;if(w>>7){S=!0;A=e,x=L,e+=3*L}var _=e;for(e++;;){var P;if(!((P=t[e++])>=0))throw Error("Invalid block size");if(0===P)break;e+=P}l.push({x:m,y:v,width:b,height:y,has_local_palette:S,palette_offset:A,palette_size:x,data_offset:_,data_length:e-_,transparent_index:f,interlaced:!!N,delay:h,disposal:d});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return l.length},this.loopCount=function(){return p},this.frameInfo=function(t){if(t<0||t>=l.length)throw new Error("Frame index out of range.");return l[t]},this.decodeAndBlitFrameBGRA=function(e,n){var i=this.frameInfo(e),a=i.width*i.height,o=new Uint8Array(a);Te(t,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;null===c&&(c=256);var u=i.width,l=r-u,h=u,f=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=f,g=4*l;!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=u,(p+=g)>=d&&(g=4*l+4*r*(m-1),p=f+(u+l)*(m<<1),m>>=1)),y===c)p+=4;else{var w=t[s+3*y],N=t[s+3*y+1],L=t[s+3*y+2];n[p++]=L,n[p++]=N,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);Te(t,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;null===c&&(c=256);var u=i.width,l=r-u,h=u,f=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=f,g=4*l;!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=u,(p+=g)>=d&&(g=4*l+4*r*(m-1),p=f+(u+l)*(m<<1),m>>=1)),y===c)p+=4;else{var w=t[s+3*y],N=t[s+3*y+1],L=t[s+3*y+2];n[p++]=w,n[p++]=N,n[p++]=L,n[p++]=255}--h}}}function Te(t,e,r,n){for(var a=t[e++],o=1<<a,s=o+1,c=s+1,u=a+1,l=(1<<u)-1,h=0,f=0,d=0,p=t[e++],g=new Int32Array(4096),m=null;;){for(;h<16&&0!==p;)f|=t[e++]<<h,h+=8,1===p?p=t[e++]:--p;if(h<u)break;var v=f&l;if(f>>=u,h-=u,v!==o){if(v===s)break;for(var b=v<c?v:m,y=0,w=b;w>o;)w=g[w]>>8,++y;var N=w;if(d+y+(b!==v?1:0)>n)return void i.log("Warning, gif stream longer than expected.");r[d++]=N;var L=d+=y;for(b!==v&&(r[d++]=N),w=b;y--;)w=g[w],r[--L]=255&w,w>>=8;null!==m&&c<4096&&(g[c++]=m<<8|N,c>=l+1&&u<12&&(++u,l=l<<1|1)),m=v}else c=s+1,l=(1<<(u=a+1))-1,m=null}return d!==n&&i.log("Warning, gif stream shorter than expected."),r}
+/**
+   * @license
+    Copyright (c) 2008, Adobe Systems Incorporated
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without 
+    modification, are permitted provided that the following conditions are
+    met:
+
+    * Redistributions of source code must retain the above copyright notice, 
+      this list of conditions and the following disclaimer.
+    
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the 
+      documentation and/or other materials provided with the distribution.
+    
+    * Neither the name of Adobe Systems Incorporated nor the names of its 
+      contributors may be used to endorse or promote products derived from 
+      this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+    IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+    PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */function Ue(t){var e,r,n,i,a,o=Math.floor,s=new Array(64),c=new Array(64),u=new Array(64),l=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),N=new Array(256),L=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],x=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],S=[0,1,2,3,4,5,6,7,8,9,10,11],_=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],P=[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],k=[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],I=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],C=[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 j(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 O(t){for(var e=t[0],r=t[1]-1;r>=0;)e&1<<r&&(m|=1<<v),r--,--v<0&&(255==m?(B(255),B(0)):B(m),v=7,m=0)}function B(t){g.push(t)}function M(t){B(t>>8&255),B(255&t)}function E(t,e,r,n,i){for(var a,o=i[0],s=i[240],c=function(t,e){var r,n,i,a,o,s,c,u,l,h,f=0;for(l=0;l<8;++l){r=t[f],n=t[f+1],i=t[f+2],a=t[f+3],o=t[f+4],s=t[f+5],c=t[f+6];var p=r+(u=t[f+7]),g=r-u,m=n+c,v=n-c,b=i+s,y=i-s,w=a+o,N=a-o,L=p+w,A=p-w,x=m+b,S=m-b;t[f]=L+x,t[f+4]=L-x;var _=.707106781*(S+A);t[f+2]=A+_,t[f+6]=A-_;var P=.382683433*((L=N+y)-(S=v+g)),k=.5411961*L+P,F=1.306562965*S+P,I=.707106781*(x=y+v),C=g+I,j=g-I;t[f+5]=j+k,t[f+3]=j-k,t[f+1]=C+F,t[f+7]=C-F,f+=8}for(f=0,l=0;l<8;++l){r=t[f],n=t[f+8],i=t[f+16],a=t[f+24],o=t[f+32],s=t[f+40],c=t[f+48];var O=r+(u=t[f+56]),B=r-u,M=n+c,E=n-c,q=i+s,D=i-s,R=a+o,T=a-o,U=O+R,z=O-R,H=M+q,W=M-q;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=T+D)-(W=E+B)),Y=.5411961*U+G,J=1.306562965*W+G,X=.707106781*(H=D+E),K=B+X,Z=B-X;t[f+40]=Z+Y,t[f+24]=Z-Y,t[f+8]=K+J,t[f+56]=K-J,f++}for(l=0;l<64;++l)h=t[l]*e[l],d[l]=h>0?h+.5|0:h-.5|0;return d}(t,e),u=0;u<64;++u)p[A[u]]=c[u];var l=p[0]-r;r=p[0],0==l?O(n[0]):(O(n[f[a=32767+l]]),O(h[a]));for(var g=63;g>0&&0==p[g];)g--;if(0==g)return O(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)O(s);y&=15}a=32767+p[v],O(i[(y<<4)+f[a]]),O(h[a]),v++}return 63!=g&&O(o),r}function q(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),c[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++)u[d]=1/(s[A[d]]*f[p]*f[g]*8),l[d]=1/(c[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&&q(a),g=new Array,m=0,v=7,M(65496),M(65504),M(16),B(74),B(70),B(73),B(70),B(0),B(1),B(1),B(0),M(1),M(1),B(0),B(0),function(){M(65499),M(132),B(0);for(var t=0;t<64;t++)B(s[t]);B(1);for(var e=0;e<64;e++)B(c[e])}(),function(t,e){M(65472),M(17),B(8),M(e),M(t),B(3),B(1),B(17),B(0),B(2),B(17),B(1),B(3),B(17),B(1)}(t.width,t.height),function(){M(65476),M(418),B(0);for(var t=0;t<16;t++)B(x[t+1]);for(var e=0;e<=11;e++)B(S[e]);B(16);for(var r=0;r<16;r++)B(_[r+1]);for(var n=0;n<=161;n++)B(P[n]);B(1);for(var i=0;i<16;i++)B(k[i+1]);for(var a=0;a<=11;a++)B(F[a]);B(17);for(var o=0;o<16;o++)B(I[o+1]);for(var s=0;s<=161;s++)B(C[s])}(),M(65498),M(12),B(3),B(1),B(0),B(2),B(17),B(3),B(17),B(0),B(63),B(0);var o=0,h=0,f=0;m=0,v=7,this.encode.displayName="_encode_";for(var d,p,N,A,j,D,R,T,U,z=t.data,H=t.width,W=t.height,V=4*H,G=0;G<W;){for(d=0;d<V;){for(j=V*G+d,R=-1,T=0,U=0;U<64;U++)D=j+(T=U>>3)*V+(R=4*(7&U)),G+T>=W&&(D-=V*(G+1+T-W)),d+R>=V&&(D-=d+R-V+4),p=z[D++],N=z[D++],A=z[D++],b[U]=(L[p]+L[N+256>>0]+L[A+512>>0]>>16)-128,y[U]=(L[p+768>>0]+L[N+1024>>0]+L[A+1280>>0]>>16)-128,w[U]=(L[p+1280>>0]+L[N+1536>>0]+L[A+1792>>0]>>16)-128;o=E(b,u,o,e,n),h=E(y,l,h,r,i),f=E(w,l,f,r,i),d+=32}G+=8}if(v>=0){var Y=[];Y[1]=v+1,Y[0]=(1<<v+1)-1,O(Y)}return M(65497),new Uint8Array(g)},t=t||50,function(){for(var t=String.fromCharCode,e=0;e<256;e++)N[e]=t(e)}(),e=j(x,S),r=j(k,F),n=j(_,P),i=j(I,C),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++)L[t]=19595*t,L[t+256>>0]=38470*t,L[t+512>>0]=7471*t+32768,L[t+768>>0]=-11059*t,L[t+1024>>0]=-21709*t,L[t+1280>>0]=32768*t+8421375,L[t+1536>>0]=-27439*t,L[t+1792>>0]=-5329*t}(),q(t)}
+/**
+   * @license
+   * Copyright (c) 2017 Aras Abbasi
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */function ze(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 He(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 c=function(){var t=this;function c(t,e){for(var r=1<<e-1>>>0;t&r;)r>>>=1;return r?(t&r-1)+r:t}function u(t,r,n,i,a){e(!(i%n));do{t[r+(i-=n)]=a}while(0<i)}function l(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 l,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,l=1;15>l;++l){if(g[l]>1<<l)return 0;m[l+1]=m[l]+g[l]}for(f=0;f<o;++f)l=i[f],0<i[f]&&(s[m[l]++]=f);if(1==m[15])return(i=new h).g=0,i.value=s[0],u(t,d,1,p,i),p;var v,b=-1,y=p-1,w=0,N=1,L=1,A=1<<n;for(f=0,l=1,o=2;l<=n;++l,o<<=1){if(N+=L<<=1,0>(L-=g[l]))return 0;for(;0<g[l];--g[l])(i=new h).g=l,i.value=s[f++],u(t,d+w,o,A,i),w=c(w,l)}for(l=n+1,o=2;15>=l;++l,o<<=1){if(N+=L<<=1,0>(L-=g[l]))return 0;for(;0<g[l];--g[l]){if(i=new h,(w&y)!=b){for(d+=A,v=1<<(b=l)-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=l-n,i.value=s[f++],u(t,d+(w>>n),o,A,i),w=c(w,l)}}return N!=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(Dr,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,_(t)}function g(t,e){for(var r=0;0<e--;)r|=k(t,128)<<e;return r}function m(t,e){var r=g(t,e);return P(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<=Tr){var n=L(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 N(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function L(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 x(t,e){t.u=e,t.h=A(t)}function S(t){t.u>=zr&&(e(t.u>=zr),b(t))}function _(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 P(t){return g(t,1)}function k(t,e){var r=t.Ca;0>t.b&&_(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]=r>>0&255}function I(t,e){return t[e+0]<<0|t[e+1]<<8}function C(t,e){return I(t,e)|t[e+2]<<16}function j(t,e){return I(t,e)|I(t,e+2)<<16}function O(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 B(t,r){e(null!=t),e(null!=r),e(t.Xa==r.Xa),n(r.X,0,t.X,0,1<<r.Xa)}function M(){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 q(t,e){return t+(1<<e)-1>>>e}function D(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,c){var u;for(u=0;u<o;++u){var l=t[e](s[c+u-1],i,a+u);s[c+u]=D(r[n+u],l)}}}function T(){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=D(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,c=16711935&(c=(c=16711935&o)+((s<<16)+s));n[i+a]=(4278255360&o)+c>>>0}}function Y(t,e){e.jd=t>>0&255,e.hd=t>>8&255,e.ud=t>>16&255}function J(t,e,r,n,i,a){var o;for(o=0;o<n;++o){var s=e[r+o],c=s>>>8,u=s,l=255&(l=(l=s>>>16)+((t.jd<<24>>24)*(c<<24>>24)>>>5));u=255&(u=(u=u+((t.hd<<24>>24)*(c<<24>>24)>>>5))+((t.ud<<24>>24)*(l<<24>>24)>>>5));i[a+o]=(4278255360&s)+(l<<16)+u}}function X(e,r,n,i,a){t[r]=function(t,e,r,n,o,s,c,u,l){for(n=c;n<u;++n)for(c=0;c<l;++c)o[s++]=a(r[i(t[e++])])},t[e]=function(e,r,o,s,c,u,l){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[c++])),u[l++]=a(d[m&p]),m>>=h}else t["VP8LMapColor"+n](s,c,d,p,u,l,r,o,f)}}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++]=a>>0&255}}function Z(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++]=a>>0&255,n[i++]=a>>24&255}}function $(t,e,r,n,i){for(r=e+r;e<r;){var a=(o=t[e++])>>16&240|o>>12&15,o=o>>0&240|o>>28&15;n[i++]=a,n[i++]=o}}function Q(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++]=a>>0&255,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 ct(){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 ut(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function lt(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],c=t.y,u=t.O,l=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,N=w+1>>1;for(0==b?s(c,u,null,null,l,h,f,d,l,h,f,d,a,o,null,null,w):(s(e.ec,e.fc,c,u,p,g,m,v,l,h,f,d,a,o-i.A,a,o,w),++r);b+2<y;b+=2)p=l,g=h,m=f,v=d,h+=t.Rc,d+=t.Rc,o+=2*i.A,s(c,(u+=2*t.fa)-t.fa,c,u,p,g,m,v,l,h,f,d,a,o-i.A,a,o,w);return u+=t.fa,t.j+y<t.o?(n(e.ec,e.fc,c,u,w),n(e.cc,e.dc,l,h,N),n(e.Mc,e.Nc,f,d,N),r--):1&y||s(c,u,null,null,l,h,f,d,l,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,c=s==Tn||s==Vn;r=r.ba.f.RGBA;var u=[0],l=t.ka;u[0]=t.T,t.Kb&&(0==l?--u[0]:(--l,a[0]-=t.width),t.j+t.ka+t.T==t.o&&(u[0]=t.o-t.j-l));var h=r.eb;l=r.fb+l*r.A;t=Sn(i,a[0],t.width,o,u,h,l+(c?0:3),r.A),e(n==u),t&&nt(s)&&An(h,l,c,o,u,r.A)}return 0}function ft(t){var e=t.ma,r=e.ba.S,n=11>r,i=r==qn||r==Rn||r==Tn||r==Un||12==r||nt(r);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!Mr(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=ut,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=lt,br()}}else alert("todo:EmitYUV");i&&(e.Jb=ht,n&&mr())}if(n&&!Ci){for(t=0;256>t;++t)ji[t]=89858*(t-128)+_i>>Si,Mi[t]=-22014*(t-128)+_i,Bi[t]=-45773*(t-128),Oi[t]=113618*(t-128)+_i>>Si;for(t=Pi;t<ki;++t)e=76283*(t-16)+_i>>Si,Ei[t-Pi]=Vt(e,255),qi[t-Pi]=Vt(e+8>>4,15);Ci=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=$n[e-1])>>4)*t+(8-(15&r)))?r:1;var r}function bt(t,e,r){var n=L(r),i=t[e+=255&n].g-8;return 0<i&&(x(r,r.u+8),n=L(r),e+=t[e].value,e+=n&(1<<i)-1),x(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 Nt(t,r,i,a){var o=t.ab,s=t.c*r,c=t.C;r=c+r;var u=i,l=a;for(a=t.Ta,i=t.Ua;0<o--;){var h=t.gc[o],f=c,d=r,p=u,g=l,m=(l=a,u=i,h.Ea);switch(e(f<d),e(d<=h.nc),h.hc){case 2:Gr(p,g,(d-f)*m,l,u);break;case 0:var v=f,b=d,y=l,w=u,N=(_=h).Ea;0==v&&(Wr(p,g,null,null,1,y,w),V(p,g+1,0,0,N-1,y,w+1),g+=N,w+=N,++v);for(var L=1<<_.b,A=L-1,x=q(N,_.b),S=_.K,_=_.w+(v>>_.b)*x;v<b;){var P=S,k=_,F=1;for(Vr(p,g,y,w-N,1,y,w);F<N;){var I=(F&~A)+L;I>N&&(I=N),(0,Zr[P[k++]>>8&15])(p,g+ +F,y,w+F-N,I-F,y,w+F),F=I}g+=N,w+=N,++v&A||(_+=x)}d!=h.nc&&n(l,u-m,l,u+(d-f-1)*m,m);break;case 1:for(m=p,b=g,N=(p=h.Ea)-(w=p&~(y=(g=1<<h.b)-1)),v=q(p,h.b),L=h.K,h=h.w+(f>>h.b)*v;f<d;){for(A=L,x=h,S=new T,_=b+w,P=b+p;b<_;)Y(A[x++],S),$r(S,m,b,g,l,u),b+=g,u+=g;b<P&&(Y(A[x++],S),$r(S,m,b,N,l,u),b+=N,u+=N),++f&y||(h+=v)}break;case 3:if(p==l&&g==u&&0<h.b){for(b=l,p=m=u+(d-f)*m-(w=(d-f)*q(h.Ea,h.b)),g=l,y=u,v=[],w=(N=w)-1;0<=w;--w)v[w]=g[y+w];for(w=N-1;0<=w;--w)b[p+w]=v[w];Yr(h,f,d,l,m,l,u)}else Yr(h,f,d,p,g,l,u)}u=a,l=i}l!=i&&n(a,i,u,l,s)}function Lt(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,c=t.Ua,u=o.width;if(Nt(t,a,n,i),a=c=[c],e((n=t.C)<(i=r)),e(o.v<o.va),i>o.o&&(i=o.o),n<o.j){var l=o.j-n;n=o.j;a[0]+=l*u}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(c=c[0],11>(n=t.ca).S){var h=n.f.RGBA,f=(i=n.S,a=o.U,o=o.T,l=h.eb,h.A),d=o;for(h=h.fb+t.Ma*h.A;0<d--;){var p=s,g=c,m=a,v=l,b=h;switch(i){case En:Qr(p,g,m,v,b);break;case qn:tn(p,g,m,v,b);break;case Hn:tn(p,g,m,v,b),An(v,b,0,m,1,0);break;case Dn: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 Tn: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),xn(v,b,m,1,0);break;case zn:rn(p,g,m,v,b);break;default:e(0)}c+=u,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 xt(t,r,n,i,a,o){if(0!=t.Z){var s=t.qd,c=t.rd;for(e(null!=mi[t.Z]);r<n;++r)mi[t.Z](s,c,i,a,i,a,o),s=i,c=a,a+=o;t.qd=s,t.rd=c}}function St(t,r){var n=t.l.ma,i=0==n.Z||1==n.Z?t.l.j:t.C;i=t.C<i?i:t.C;if(e(r<=t.l.o),r>i){var a=t.l.width,o=n.ca,s=n.tb+a*i,c=t.V,u=t.Ba+t.c*i,l=t.gc;e(1==t.ab),e(3==l[0].hc),Xr(l[0],i,r,c,u,o,s),xt(n,i,r,o,s,a)}t.C=t.Ma=r}function _t(t,r,n,i,a,o,s){var c=t.$/i,u=t.$%i,l=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?c:16777216,v=0<h.ua?h.Wa:null,b=h.wc,y=f<p?wt(h,u,c):null;e(t.C<o),e(p<=a);var w=!1;t:for(;;){for(;w||f<p;){var N=0;if(c>=m){var _=f-n;e((m=t).Pb),m.wd=m.m,m.xd=_,0<m.s.ua&&B(m.s.Wa,m.s.vb),m=c+ti}if(u&b||(y=wt(h,u,c)),e(null!=y),y.Qb&&(r[f]=y.qb,w=!0),!w)if(S(l),y.jc){N=l,_=r;var P=f,k=y.pd[L(N)&Dr-1];e(y.jc),256>k.g?(x(N,N.u+k.g),_[P]=k.value,N=0):(x(N,N.u+k.g-256),e(256<=k.value),N=k.value),0==N&&(w=!0)}else N=bt(y.G[0],y.H[0],l);if(l.h)break;if(w||256>N){if(!w)if(y.nd)r[f]=(y.qb|N<<8)>>>0;else{if(S(l),w=bt(y.G[1],y.H[1],l),S(l),_=bt(y.G[2],y.H[2],l),P=bt(y.G[3],y.H[3],l),l.h)break;r[f]=(P<<24|w<<16|N<<8|_)>>>0}if(w=!1,++f,++u>=i&&(u=0,++c,null!=s&&c<=o&&!(c%16)&&s(t,c),null!=v))for(;d<f;)N=r[d++],v.X[(506832829*N&4294967295)>>>v.Mb]=N}else if(280>N){if(N=mt(N-256,l),_=bt(y.G[4],y.H[4],l),S(l),_=vt(i,_=mt(_,l)),l.h)break;if(f-n<_||a-f<N)break t;for(P=0;P<N;++P)r[f+P]=r[f+P-_];for(f+=N,u+=N;u>=i;)u-=i,++c,null!=s&&c<=o&&!(c%16)&&s(t,c);if(e(f<=a),u&b&&(y=wt(h,u,c)),null!=v)for(;d<f;)N=r[d++],v.X[(506832829*N&4294967295)>>>v.Mb]=N}else{if(!(N<g))break t;for(w=N-280,e(null!=v);d<f;)N=r[d++],v.X[(506832829*N&4294967295)>>>v.Mb]=N;N=f,e(!(w>>>(_=v).Xa)),r[N]=_.X[w],w=!0}w||e(l.h==A(l))}if(t.Pb&&l.h&&f<a)e(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&B(t.s.vb,t.s.Wa);else{if(l.h)break t;null!=s&&s(t,c>o?o:c),t.a=0,t.$=f-n}return 1}return t.a=3,0}function Pt(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 kt(){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,$r=J,Qr=K,tn=Z,en=$,rn=Q,nn=tt,t.VP8LMapColor32b=Jr,t.VP8LMapColor8b=Kr,e)}function Ft(t,r,n,s,c){var u=1,f=[t],p=[r],g=s.m,m=s.s,v=null,b=0;t:for(;;){if(n)for(;u&&y(g,1);){var w=f,N=p,A=s,_=1,P=A.m,k=A.gc[A.ab],F=y(P,2);if(A.Oc&1<<F)u=0;else{switch(A.Oc|=1<<F,k.hc=F,k.Ea=w[0],k.nc=N[0],k.K=[null],++A.ab,e(4>=A.ab),F){case 0:case 1:k.b=y(P,3)+2,_=Ft(q(k.Ea,k.b),q(k.nc,k.b),0,A,k.K),k.K=k.K[0];break;case 3:var I,C=y(P,8)+1,j=16<C?0:4<C?1:2<C?2:3;if(w[0]=q(k.Ea,j),k.b=j,I=_=Ft(C,1,0,A,k.K)){var B,M=C,E=k,R=1<<(8>>E.b),T=a(R);if(null==T)I=0;else{var U=E.K[0],z=E.w;for(T[0]=E.K[0][0],B=1;B<1*M;++B)T[B]=D(U[z+B],T[B-1]);for(;B<4*R;++B)T[B]=0;E.K[0]=null,E.K[0]=T,I=1}}_=I;break;case 2:break;default:e(0)}u=_}}if(f=f[0],p=p[0],u&&y(g,1)&&!(u=1<=(b=y(g,4))&&11>=b)){s.a=3;break t}var H;if(H=u)e:{var W,V,G,Y=s,J=f,X=p,K=b,Z=n,$=Y.m,Q=Y.s,tt=[null],et=1,rt=0,nt=Qn[K];r:for(;;){if(Z&&y($,1)){var it=y($,3)+2,at=q(J,it),ot=q(X,it),st=at*ot;if(!Ft(at,ot,0,Y,tt))break r;for(tt=tt[0],Q.xc=it,W=0;W<st;++W){var ct=tt[W]>>8&65535;tt[W]=ct,ct>=et&&(et=ct+1)}}if($.h)break r;for(V=0;5>V;++V){var ut=Xn[V];!V&&0<K&&(ut+=1<<K),rt<ut&&(rt=ut)}var lt=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==lt){Y.a=1;break r}var gt=lt;for(W=G=0;W<et;++W){var mt=dt[W],vt=mt.G,bt=mt.H,wt=0,Nt=1,Lt=0;for(V=0;5>V;++V){ut=Xn[V],vt[V]=gt,bt[V]=G,!V&&0<K&&(ut+=1<<K);n:{var At,xt=ut,St=Y,kt=pt,It=gt,Ct=G,jt=0,Ot=St.m,Bt=y(Ot,1);if(i(kt,0,0,xt),Bt){var Mt=y(Ot,1)+1,Et=y(Ot,1),qt=y(Ot,0==Et?1:8);kt[qt]=1,2==Mt&&(kt[qt=y(Ot,8)]=1);var Dt=1}else{var Rt=a(19),Tt=y(Ot,4)+4;if(19<Tt){St.a=3;var Ut=0;break n}for(At=0;At<Tt;++At)Rt[Zn[At]]=y(Ot,3);var zt=void 0,Ht=void 0,Wt=St,Vt=Rt,Gt=xt,Yt=kt,Jt=0,Xt=Wt.m,Kt=8,Zt=o(128,h);i:for(;l(Zt,0,7,Vt,19);){if(y(Xt,1)){var $t=2+2*y(Xt,3);if((zt=2+y(Xt,$t))>Gt)break i}else zt=Gt;for(Ht=0;Ht<Gt&&zt--;){S(Xt);var Qt=Zt[0+(127&L(Xt))];x(Xt,Xt.u+Qt.g);var te=Qt.value;if(16>te)Yt[Ht++]=te,0!=te&&(Kt=te);else{var ee=16==te,re=te-16,ne=Jn[re],ie=y(Xt,Yn[re])+ne;if(Ht+ie>Gt)break i;for(var ae=ee?Kt:0;0<ie--;)Yt[Ht++]=ae}}Jt=1;break i}Jt||(Wt.a=3),Dt=Jt}(Dt=Dt&&!Ot.h)&&(jt=l(It,Ct,8,kt,xt)),Dt&&0!=jt?Ut=jt:(St.a=3,Ut=0)}if(0==Ut)break r;if(Nt&&1==Kn[V]&&(Nt=0==gt[G].g),wt+=gt[G].g,G+=Ut,3>=V){var oe,se=pt[0];for(oe=1;oe<ut;++oe)pt[oe]>se&&(se=pt[oe]);Lt+=se}}if(mt.nd=Nt,mt.Qb=0,Nt&&(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>Lt,mt.jc){var ce,ue=mt;for(ce=0;ce<Dr;++ce){var le=ce,he=ue.pd[le],fe=ue.G[0][ue.H[0]+le];256<=fe.value?(he.g=fe.g+256,he.value=fe.value):(he.g=0,he.value=0,le>>=yt(fe,8,he),le>>=yt(ue.G[1][ue.H[1]+le],16,he),le>>=yt(ue.G[2][ue.H[2]+le],0,he),yt(ue.G[3][ue.H[3]+le],24,he))}}}Q.vc=tt,Q.Wb=et,Q.Ya=dt,Q.yc=lt,H=1;break e}H=0}if(!(u=H)){s.a=3;break t}if(0<b){if(m.ua=1<<b,!O(m.Wa,b)){s.a=1,u=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=q(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,u=0;break t}u=(u=_t(s,v,0,f,p,p,null))&&!g.h;break t}return u?(null!=c?c[0]=v:(e(null==v),e(n)),s.$=0,n||Pt(m)):Pt(m),u}function It(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 Ct(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,c=t.l.ma,u=t.l.width,l=u*s,h=c.ca,f=c.tb+u*n,d=t.Ta,p=t.Ua;Nt(t,s,a,o),_n(d,p,h,f,l),xt(c,n,n+s,h,f,u),i-=s,a+=s*t.c,n+=s}e(n==r),t.C=t.Ma=r}function jt(){this.ub=this.yd=this.td=this.Rb=0}function Ot(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Bt(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Mt(){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],Mt),this.Xc=s([4,17],Mt)}function qt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Dt(){this.ld=this.La=this.dd=this.tc=0}function Rt(){this.Na=this.la=0}function Tt(){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 Dt),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 jt,this.Kc=new Ot,this.ed=new qt,this.Qa=new Bt,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,Tt),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 Dt),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],Dt),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=Zt)),t}function Jt(t,e,r){return 0==t.a&&(t.a=e,t.sc=r,t.cb=0),0}function Xt(t,e,r){return 3<=r&&157==t[e+0]&&1==t[e+1]&&42==t[e+2]}function Kt(t,r){if(null==t)return 0;if(t.a=0,t.sc="OK",null==r)return Jt(t,2,"null VP8Io passed to VP8GetHeaders()");var n=r.data,a=r.w,o=r.ha;if(4>o)return Jt(t,7,"Truncated header.");var s=n[a+0]|n[a+1]<<8|n[a+2]<<16,c=t.Od;if(c.Rb=!(1&s),c.td=s>>1&7,c.yd=s>>4&1,c.ub=s>>5,3<c.td)return Jt(t,3,"Incorrect keyframe parameters.");if(!c.yd)return Jt(t,4,"Frame not displayable.");a+=3,o-=3;var u=t.Kc;if(c.Rb){if(7>o)return Jt(t,7,"cannot parse picture header");if(!Xt(n,a,o))return Jt(t,3,"Bad code word");u.c=16383&(n[a+4]<<8|n[a+3]),u.Td=n[a+4]>>6,u.i=16383&(n[a+6]<<8|n[a+5]),u.Ud=n[a+6]>>6,a+=7,o-=7,t.za=u.c+15>>4,t.Ub=u.i+15>>4,r.width=u.c,r.height=u.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(c.ub>o)return Jt(t,7,"bad partition length");p(s=t.m,n,a,c.ub),a+=c.ub,o-=c.ub,c.Rb&&(u.Ld=P(s),u.Kd=P(s)),u=t.Qa;var l,h=t.Pa;if(e(null!=s),e(null!=u),u.Cb=P(s),u.Cb){if(u.Bb=P(s),P(s)){for(u.Fb=P(s),l=0;4>l;++l)u.Zb[l]=P(s)?m(s,7):0;for(l=0;4>l;++l)u.Lb[l]=P(s)?m(s,6):0}if(u.Bb)for(l=0;3>l;++l)h.jb[l]=P(s)?g(s,8):255}else u.Bb=0;if(s.Ka)return Jt(t,3,"cannot parse segment header");if((u=t.ed).zd=P(s),u.Tb=g(s,6),u.wb=g(s,3),u.Pc=P(s),u.Pc&&P(s)){for(h=0;4>h;++h)P(s)&&(u.vd[h]=m(s,6));for(h=0;4>h;++h)P(s)&&(u.od[h]=m(s,6))}if(t.L=0==u.Tb?0:u.zd?1:2,s.Ka)return Jt(t,3,"cannot parse filter header");var f=o;if(o=l=a,a=l+f,u=f,t.Xb=(1<<g(t.m,2))-1,f<3*(h=t.Xb))n=7;else{for(l+=3*h,u-=3*h,f=0;f<h;++f){var d=n[o+0]|n[o+1]<<8|n[o+2]<<16;d>u&&(d=u),p(t.Jc[+f],n,l,d),l+=d,u-=d,o+=3}p(t.Jc[+h],n,l,u),n=l<a?0:5}if(0!=n)return Jt(t,n,"cannot parse partitions");for(n=g(l=t.m,7),o=P(l)?m(l,4):0,a=P(l)?m(l,4):0,u=P(l)?m(l,4):0,h=P(l)?m(l,4):0,l=P(l)?m(l,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+u,127)]>>16,8>b.Eb[1]&&(b.Eb[1]=8),b.Qc[0]=ei[Vt(v+h,117)],b.Qc[1]=ri[Vt(v+l,127)],b.lc=v+l}if(!c.Rb)return Jt(t,4,"Not a key frame.");for(P(s),c=t.Pa,n=0;4>n;++n){for(o=0;8>o;++o)for(a=0;3>a;++a)for(u=0;11>u;++u)h=k(s,ui[n][o][a][u])?g(s,8):si[n][o][a][u],c.Wc[n][o].Yb[a][u]=h;for(o=0;17>o;++o)c.Xc[n][o]=c.Wc[n][li[o]]}return t.kc=P(s),t.kc&&(t.Bd=g(s,8)),t.cb=1}function Zt(t,e,r,n,i,a,o){var s=e[i].Yb[r];for(r=0;16>i;++i){if(!k(t,s[r+0]))return i;for(;!k(t,s[r+1]);)if(s=e[++i].Yb[0],r=0,16==i)return 16;var c=e[i+1].Yb;if(k(t,s[r+2])){var u=t,l=0;if(k(u,(f=s)[(h=r)+3]))if(k(u,f[h+6])){for(s=0,h=2*(l=k(u,f[h+8]))+(f=k(u,f[h+9+l])),l=0,f=ii[h];f[s];++s)l+=l+k(u,f[s]);l+=3+(8<<h)}else k(u,f[h+7])?(l=7+2*k(u,165),l+=k(u,145)):l=5+k(u,159);else l=k(u,f[h+4])?3+k(u,f[h+5]):2;s=c[2]}else l=1,s=c[1];c=o+ai[i],0>(u=t).b&&_(u);var h,f=u.b,d=(h=u.Ca>>1)-(u.I>>f)>>31;--u.b,u.Ca+=d,u.Ca|=1,u.I-=(h+1&d)<<f,a[c]=((l^d)-d)*n[(0<i)+0]}return 16}function $t(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 Qt(t,r){if(null==t)return 0;if(null==r)return Jt(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!Kt(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 c=t.ed;for(s=0;4>s;++s){var u;if(t.Qa.Cb){var l=t.Qa.Lb[s];t.Qa.Fb||(l+=c.Tb)}else l=c.Tb;for(u=0;1>=u;++u){var h=t.gd[s][u],f=l;if(c.Pc&&(f+=c.vd[0],u&&(f+=c.od[0])),0<(f=0>f?0:63<f?63:f)){var d=f;0<c.wb&&((d=4<c.wb?d>>2:d>>1)>9-c.wb&&(d=9-c.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=u}}}s=0}else Jt(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;c=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=c+832+(u=3*(16*s+Ri[t.L])/2*p)+(l=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=Jt(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+=c,t.Gd=o(p,Ht),t.Hd=0,t.rb=o(g+1,Rt),t.sb=1,t.wa=m?o(m,Dt):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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b=0,h.kc&&(g.Ad=k(l,h.Bd)),g.Za=!k(l,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=ci[f[d+b]][y];for(var w=oi[k(l,y[0])];0<w;)w=oi[2*w+k(l,y[w])];y=-w,f[d+b]=y}n(m,v,f,d,4),v+=4,p[0+h]=y}}else y=k(l,156)?k(l,128)?1:3:k(l,163)?2:0,g.Ob[0]=y,i(f,d,y,4),i(p,0,y,4);g.Dd=k(l,142)?k(l,114)?k(l,183)?1:3:2:0}if(u.m.Ka)return Jt(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(u=s,l=(c=t).rb[c.sb-1],f=c.rb[c.sb+c.ja],o=c.ya[c.aa+c.ja],d=c.kc?o.Ad:0)l.la=f.la=0,o.Za||(l.Na=f.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var N,L;l=f,f=u,d=c.Pa.Xc,p=c.ya[c.aa+c.ja],g=c.pb[p.$b];if(h=p.ad,m=0,v=c.rb[c.sb-1],y=b=0,i(h,m,0,384),p.Za)var A=0,x=d[3];else{w=a(16);var S=l.Na+v.Na;if(S=ni(f,d[1],S,g.Eb,0,w,0),l.Na=v.Na=(0<S)+0,1<S)an(w,0,h,m);else{var _=w[0]+3>>3;for(w=0;256>w;w+=16)h[m+w]=_}A=1,x=d[0]}var P=15&l.la,F=15&v.la;for(w=0;4>w;++w){var I=1&F;for(_=L=0;4>_;++_)P=P>>1|(I=(S=ni(f,x,S=I+(1&P),g.Sc,A,h,m))>A)<<7,L=L<<2|(3<S?3:1<S?2:0!=h[m+0]),m+=16;P>>=4,F=F>>1|I<<7,b=(b<<8|L)>>>0}for(x=P,A=F>>4,N=0;4>N;N+=2){for(L=0,P=l.la>>4+N,F=v.la>>4+N,w=0;2>w;++w){for(I=1&F,_=0;2>_;++_)S=I+(1&P),P=P>>1|(I=0<(S=ni(f,d[2],S,g.Qc,0,h,m)))<<3,L=L<<2|(3<S?3:1<S?2:0!=h[m+0]),m+=16;P>>=2,F=F>>1|I<<5}y|=L<<4*N,x|=P<<4<<N,A|=(240&F)<<N}l.la=x,v.la=A,p.Hc=b,p.Gc=y,p.ia=43690&y?0:g.ia,d=!(b|y)}if(0<c.L&&(c.wa[c.Y+c.ja]=c.gd[o.$b][o.Za],c.wa[c.Y+c.ja].La|=!d),u.Ka)return Jt(t,7,"Premature end-of-file encountered.")}if($t(t),c=r,u=1,o=(s=t).D,l=0<s.L&&s.M>=s.zb&&s.M<=s.Va,0==s.Aa)t:{if(o.M=s.M,o.uc=l,Or(s,o),u=1,o=(L=s.D).Nb,l=(y=Ri[s.L])*s.R,f=y/2*s.B,w=16*o*s.R,_=8*o*s.B,d=s.sa,p=s.ta-l+w,g=s.qa,h=s.ra-f+_,m=s.Ha,v=s.Ia-f+_,F=0==(P=L.M),b=P>=s.Va-1,2==s.Aa&&Or(s,L),L.uc)for(I=(S=s).D.M,e(S.D.uc),L=S.yb;L<S.Hb;++L){A=L,x=I;var C=(j=(U=S).D).Nb;N=U.R;var j=j.wa[j.Y+A],O=U.sa,B=U.ta+16*C*N+16*A,M=j.dd,E=j.tc;if(0!=E)if(e(3<=E),1==U.L)0<A&&wn(O,B,N,E+4),j.La&&Ln(O,B,N,E),0<x&&yn(O,B,N,E+4),j.La&&Nn(O,B,N,E);else{var q=U.B,D=U.qa,R=U.ra+8*C*q+8*A,T=U.Ha,U=U.Ia+8*C*q+8*A;C=j.ld;0<A&&(fn(O,B,N,E+4,M,C),pn(D,R,T,U,q,E+4,M,C)),j.La&&(mn(O,B,N,E,M,C),bn(D,R,T,U,q,E,M,C)),0<x&&(hn(O,B,N,E+4,M,C),dn(D,R,T,U,q,E+4,M,C)),j.La&&(gn(O,B,N,E,M,C),vn(D,R,T,U,q,E,M,C))}}if(s.ia&&alert("todo:DitherRow"),null!=c.put){if(L=16*P,P=16*(P+1),F?(c.y=s.sa,c.O=s.ta+w,c.f=s.qa,c.N=s.ra+_,c.ea=s.Ha,c.W=s.Ia+_):(L-=y,c.y=d,c.O=p,c.f=g,c.N=h,c.ea=m,c.W=v),b||(P-=y),P>c.o&&(P=c.o),c.F=null,c.J=null,null!=s.Fa&&0<s.Fa.length&&L<P&&(c.J=hr(s,c,L,P-L),c.F=s.mb,null==c.F&&0==c.F.length)){u=Jt(s,3,"Could not decode alpha data.");break t}L<c.j&&(y=c.j-L,L=c.j,e(!(1&y)),c.O+=s.R*y,c.N+=s.B*(y>>1),c.W+=s.B*(y>>1),null!=c.F&&(c.J+=c.width*y)),L<P&&(c.O+=c.v,c.N+=c.v>>1,c.W+=c.v>>1,null!=c.F&&(c.J+=c.v),c.ka=L-c.j,c.U=c.va-c.v,c.T=P-L,u=c.put(c))}o+1!=s.Ic||b||(n(s.sa,s.ta-l,d,p+16*s.R,l),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(!u)return Jt(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 c=t[e+0]+t[e+8],u=t[e+0]-t[e+8],l=(35468*t[e+4]>>16)-re(t[e+12]),h=re(t[e+4])+(35468*t[e+12]>>16);s[o+0]=c+h,s[o+1]=u+l,s[o+2]=u-l,s[o+3]=c-h,o+=4,e++}for(i=o=0;4>i;++i)c=(t=s[o+0]+4)+s[o+8],u=t-s[o+8],l=(35468*s[o+4]>>16)-re(s[o+12]),te(r,n,0,0,c+(h=re(s[o+4])+(35468*s[o+12]>>16))),te(r,n,1,0,u+l),te(r,n,2,0,u-l),te(r,n,3,0,c-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 ce(t,e,r,n){t[e+0]&&un(t,e+0,r,n),t[e+16]&&un(t,e+16,r,n+4),t[e+32]&&un(t,e+32,r,n+128),t[e+48]&&un(t,e+48,r,n+128+4)}function ue(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],c=t[e+4+i]+t[e+8+i],u=t[e+4+i]-t[e+8+i],l=t[e+0+i]-t[e+12+i];o[0+i]=s+c,o[8+i]=s-c,o[4+i]=l+u,o[12+i]=l-u}for(i=0;4>i;++i)s=(t=o[0+4*i]+3)+o[3+4*i],c=o[1+4*i]+o[2+4*i],u=o[1+4*i]-o[2+4*i],l=t-o[3+4*i],r[n+0]=s+c>>3,r[n+16]=l+u>>3,r[n+32]=s-c>>3,r[n+48]=l-u>>3,n+=64}function le(t,e,r){var n,i=e-32,a=Bn,o=255-t[i-1];for(n=0;n<r;++n){var s,c=a,u=o+t[e-1];for(s=0;s<r;++s)t[e+s]=c[u+t[i+s]];e+=32}}function he(t,e){le(t,e,4)}function fe(t,e){le(t,e,8)}function de(t,e){le(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 Ne(t,e,r){return t+2*e+r+2>>2}function Le(t,e){var r,i=e-32;i=new Uint8Array([Ne(t[i-1],t[i+0],t[i+1]),Ne(t[i+0],t[i+1],t[i+2]),Ne(t[i+1],t[i+2],t[i+3]),Ne(t[i+2],t[i+3],t[i+4])]);for(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*Ne(t[e-1-32],r,n)),F(t,e+32,16843009*Ne(r,n,i)),F(t,e+64,16843009*Ne(n,i,a)),F(t,e+96,16843009*Ne(i,a,a))}function xe(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 Se(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],c=t[e+2-32],u=t[e+3-32];t[e+0+96]=Ne(n,i,t[e-1+96]),t[e+1+96]=t[e+0+64]=Ne(r,n,i),t[e+2+96]=t[e+1+64]=t[e+0+32]=Ne(a,r,n),t[e+3+96]=t[e+2+64]=t[e+1+32]=t[e+0+0]=Ne(o,a,r),t[e+3+64]=t[e+2+32]=t[e+1+0]=Ne(s,o,a),t[e+3+32]=t[e+2+0]=Ne(c,s,o),t[e+3+0]=Ne(u,c,s)}function _e(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],c=t[e+7-32];t[e+0+0]=Ne(t[e+0-32],r,n),t[e+1+0]=t[e+0+32]=Ne(r,n,i),t[e+2+0]=t[e+1+32]=t[e+0+64]=Ne(n,i,a),t[e+3+0]=t[e+2+32]=t[e+1+64]=t[e+0+96]=Ne(i,a,o),t[e+3+32]=t[e+2+64]=t[e+1+96]=Ne(a,o,s),t[e+3+64]=t[e+2+96]=Ne(o,s,c),t[e+3+96]=Ne(s,c,c)}function Pe(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],c=t[e+2-32],u=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+c+1>>1,t[e+3+0]=c+u+1>>1,t[e+0+96]=Ne(i,n,r),t[e+0+64]=Ne(n,r,a),t[e+0+32]=t[e+1+96]=Ne(r,a,o),t[e+1+32]=t[e+2+96]=Ne(a,o,s),t[e+2+32]=t[e+3+96]=Ne(o,s,c),t[e+3+32]=Ne(s,c,u)}function ke(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],c=t[e+6-32],u=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]=Ne(r,n,i),t[e+1+32]=t[e+0+96]=Ne(n,i,a),t[e+2+32]=t[e+1+96]=Ne(i,a,o),t[e+3+32]=t[e+2+96]=Ne(a,o,s),t[e+3+64]=Ne(o,s,c),t[e+3+96]=Ne(s,c,u)}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]=Ne(r,n,i),t[e+3+0]=t[e+1+32]=Ne(n,i,a),t[e+3+32]=t[e+1+64]=Ne(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 Ie(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],c=t[e+1-32],u=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]=Ne(s,c,u),t[e+2+0]=Ne(o,s,c),t[e+1+0]=t[e+3+32]=Ne(r,o,s),t[e+1+32]=t[e+3+64]=Ne(n,r,o),t[e+1+64]=t[e+3+96]=Ne(i,n,r),t[e+1+96]=Ne(a,i,n)}function Ce(t,e){var r;for(r=0;8>r;++r)n(t,e+32*r,t,e-32,8)}function je(t,e){var r;for(r=0;8>r;++r)i(t,e,t[e-1],8),e+=32}function Oe(t,e,r){var n;for(n=0;8>n;++n)i(e,r+32*n,t,8)}function Be(t,e){var r,n=8;for(r=0;8>r;++r)n+=t[e+r-32]+t[e-1+32*r];Oe(n>>4,t,e)}function Me(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e+r-32];Oe(n>>3,t,e)}function Ee(t,e){var r,n=4;for(r=0;8>r;++r)n+=t[e-1+32*r];Oe(n>>3,t,e)}function qe(t,e){Oe(128,t,e)}function De(t,e,r){var n=t[e-r],i=t[e+0],a=3*(i-n)+jn[1020+t[e-2*r]-t[e+r]],o=On[112+(a+4>>3)];t[e-r]=Bn[255+n+On[112+(a+3>>3)]],t[e+0]=Bn[255+i-o]}function Re(t,e,r,n){var i=t[e+0],a=t[e+r];return Mn[255+t[e-2*r]-t[e-r]]>n||Mn[255+a-i]>n}function Te(t,e,r,n){return 4*Mn[255+t[e-r]-t[e+0]]+Mn[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],c=t[e+0],u=t[e+r],l=t[e+2*r],h=t[e+3*r];return 4*Mn[255+s-c]+Mn[255+o-u]>n?0:Mn[255+t[e-4*r]-a]<=i&&Mn[255+a-o]<=i&&Mn[255+o-s]<=i&&Mn[255+h-l]<=i&&Mn[255+l-u]<=i&&Mn[255+u-c]<=i}function ze(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)Te(t,e+n,r,i)&&De(t,e+n,r)}function He(t,e,r,n){var i=2*n+1;for(n=0;16>n;++n)Te(t,e+n*r,1,i)&&De(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))De(t,e,r);else{var c=t,u=e,l=r,h=c[u-2*l],f=c[u-l],d=c[u+0],p=c[u+l],g=c[u+2*l],m=27*(b=jn[1020+3*(d-f)+jn[1020+h-p]])+63>>7,v=18*b+63>>7,b=9*b+63>>7;c[u-3*l]=Bn[255+c[u-3*l]+b],c[u-2*l]=Bn[255+h+v],c[u-l]=Bn[255+f+m],c[u+0]=Bn[255+d-m],c[u+l]=Bn[255+p-v],c[u+2*l]=Bn[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))De(t,e,r);else{var c=t,u=e,l=r,h=c[u-l],f=c[u+0],d=c[u+l],p=On[112+((g=3*(f-h))+4>>3)],g=On[112+(g+3>>3)],m=p+1>>1;c[u-2*l]=Bn[255+c[u-2*l]+m],c[u-l]=Bn[255+h+g],c[u+0]=Bn[255+f-p],c[u+l]=Bn[255+d-m]}e+=n}}function Je(t,e,r,n,i,a){Ge(t,e,r,1,16,n,i,a)}function Xe(t,e,r,n,i,a){Ge(t,e,1,r,16,n,i,a)}function Ke(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 Ze(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 $e(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 Qe(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 ct,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 M,this.vb=new M,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 N,this.Pb=0,this.wd=new N,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 cr(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 ur(t,e,r,n,i,a,o){var s;if(null==t)cr(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 lr(t,e,r,n,i,a,o){if(null==t)cr(null,null,r,n,i,a,o);else{var s,c=t[e+0],u=c,l=c;for(s=0;s<o;++s)u=l+(c=t[e+s])-u,l=r[n+s]+(-256&u?0>u?0:255:u)&255,u=c,i[a+s]=l}}function hr(t,r,i,o){var s=r.width,c=r.o;if(e(null!=t&&null!=r),0>i||0>=o||i+o>c)return null;if(!t.Cc){if(null==t.ga){var u;if(t.ga=new sr,(u=null==t.ga)||(u=r.width*r.o,e(0==t.Gb.length),t.Gb=a(u),t.Uc=0,null==t.Gb?u=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,u=1),u=!u),!u){u=t.ga;var l=t.Fa,h=t.P,f=t.qc,d=t.mb,p=t.nb,g=h+1,m=f-1,b=u.l;if(e(null!=l&&null!=d&&null!=r),mi[0]=null,mi[1]=cr,mi[2]=ur,mi[3]=lr,u.ca=d,u.tb=p,u.c=r.width,u.i=r.height,e(0<u.c&&0<u.i),1>=f)r=0;else if(u.$a=l[h+0]>>0&3,u.Z=l[h+0]>>2&3,u.Lc=l[h+0]>>4&3,h=l[h+0]>>6&3,0>u.$a||1<u.$a||4<=u.Z||1<u.Lc||h)r=0;else if(b.put=dt,b.ac=ft,b.bc=pt,b.ma=u,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,u.$a)t:{e(1==u.$a),r=kt();e:for(;;){if(null==r){r=0;break t}if(e(null!=u),u.mc=r,r.c=u.c,r.i=u.i,r.l=u.l,r.l.ma=u,r.l.width=u.c,r.l.height=u.i,r.a=0,v(r.m,l,g,m),!Ft(u.c,u.i,1,r,null))break e;if(1==r.ab&&3==r.gc[0].hc&&At(r.s)?(u.ic=1,l=r.c*r.i,r.Ta=null,r.Ua=0,r.V=a(l),r.Ba=0,null==r.V?(r.a=1,r=0):r=1):(u.ic=0,r=It(r,u.c)),!r)break e;r=1;break t}u.mc=null,r=0}else r=m>=u.c*u.i;u=!r}if(u)return null;1!=t.ga.Lc?t.Ga=0:o=c-i}e(null!=t.ga),e(i+o<=c);t:{if(r=(l=t.ga).c,c=l.l.o,0==l.$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!=l.Z)for(e(null!=mi[l.Z]),u=0;u<o;++u)mi[l.Z](g,m,b,h,f,d,r),g=f,m=d,d+=r,h+=r;else for(u=0;u<o;++u)n(f,d,b,h,r),g=f,m=d,d+=r,h+=r;t.rc=g,t.Vc=m}else{if(e(null!=l.mc),r=i+o,e(null!=(u=l.mc)),e(r<=u.i),u.C>=r)r=1;else if(l.ic||mr(),l.ic){l=u.V,g=u.Ba,m=u.c;var y=u.i,w=(b=1,h=u.$/m,f=u.$%m,d=u.m,p=u.s,u.$),N=m*y,L=m*r,x=p.wc,_=w<L?wt(p,f,h):null;e(w<=N),e(r<=y),e(At(p));e:for(;;){for(;!d.h&&w<L;){if(f&x||(_=wt(p,f,h)),e(null!=_),S(d),256>(y=bt(_.G[0],_.H[0],d)))l[g+w]=y,++w,++f>=m&&(f=0,++h<=r&&!(h%16)&&St(u,h));else{if(!(280>y)){b=0;break e}y=mt(y-256,d);var P,k=bt(_.G[4],_.H[4],d);if(S(d),!(w>=(k=vt(m,k=mt(k,d)))&&N-w>=y)){b=0;break e}for(P=0;P<y;++P)l[g+w+P]=l[g+w+P-k];for(w+=y,f+=y;f>=m;)f-=m,++h<=r&&!(h%16)&&St(u,h);w<L&&f&x&&(_=wt(p,f,h))}e(d.h==A(d))}St(u,h>r?r:h);break e}!b||d.h&&w<N?(b=0,u.a=d.h?5:3):u.$=w,r=b}else r=_t(u,u.V,u.Ba,u.c,u.i,r,Ct);if(!r){o=0;break t}}i+o>=c&&(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,c=e+(r?1:0),u=t,l=e+(r?0:3);for(o=0;o<n;++o){var h=u[l+4*o];255!=h&&(h*=32897,s[c+4*o+0]=s[c+4*o+0]*h>>23,s[c+4*o+1]=s[c+4*o+1]*h>>23,s[c+4*o+2]=s[c+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&(u=t[e+2*a+1]),c=4369*s,u=(240&u|u>>4)*c>>16;t[e+2*a+0]=(240&o|o>>4)*c>>16&240|(15&o|o<<4)*c>>16>>4&15,t[e+2*a+1]=240&u|s}e+=i}}function pr(t,e,r,n,i,a,o,s){var c,u,l=255;for(u=0;u<i;++u){for(c=0;c<n;++c){var h=t[e+c];a[o+4*c]=h,l&=h}e+=r,o+=s}return 255!=l}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,xn=dr,Sn=pr,_n=gr}function vr(r,n,i){t[r]=function(t,r,a,o,s,c,u,l,h,f,d,p,g,m,v,b,y){var w,N=y-1>>1,L=s[c+0]|u[l+0]<<16,A=h[f+0]|d[p+0]<<16;e(null!=t);var x=3*L+A+131074>>2;for(n(t[r+0],255&x,x>>16,g,m),null!=a&&(x=3*A+L+131074>>2,n(a[o+0],255&x,x>>16,v,b)),w=1;w<=N;++w){var S=s[c+w]|u[l+w]<<16,_=h[f+w]|d[p+w]<<16,P=L+S+A+_+524296,k=P+2*(S+A)>>3;x=k+L>>1,L=(P=P+2*(L+_)>>3)+S>>1,n(t[r+2*w-1],255&x,x>>16,g,m+(2*w-1)*i),n(t[r+2*w-0],255&L,L>>16,g,m+(2*w-0)*i),null!=a&&(x=P+A>>1,L=k+_>>1,n(a[o+2*w-1],255&x,x>>16,v,b+(2*w-1)*i),n(a[o+2*w+0],255&L,L>>16,v,b+(2*w+0)*i)),L=S,A=_}1&y||(x=3*L+A+131074>>2,n(t[r+y-1],255&x,x>>16,g,m+(y-1)*i),null!=a&&(x=3*A+L+131074>>2,n(a[o+y-1],255&x,x>>16,v,b+(y-1)*i)))}}function br(){vi[En]=bi,vi[qn]=wi,vi[Dn]=yi,vi[Rn]=Ni,vi[Tn]=Li,vi[Un]=Ai,vi[zn]=xi,vi[Hn]=wi,vi[Wn]=Ni,vi[Vn]=Li,vi[Gn]=Ai}function yr(t){return t&~Ii?0>t?0:255:t>>Fi}function wr(t,e){return yr((19077*t>>8)+(26149*e>>8)-14234)}function Nr(t,e,r){return yr((19077*t>>8)-(6419*e>>8)-(13320*r>>8)+8708)}function Lr(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]=Nr(t,e,r),n[i+2]=Lr(t,e)}function xr(t,e,r,n,i){n[i+0]=Lr(t,e),n[i+1]=Nr(t,e,r),n[i+2]=wr(t,r)}function Sr(t,e,r,n,i){var a=Nr(t,e,r);e=a<<3&224|Lr(t,e)>>3,n[i+0]=248&wr(t,r)|a>>5,n[i+1]=e}function _r(t,e,r,n,i){var a=240&Lr(t,e)|15;n[i+0]=240&wr(t,r)|Nr(t,e,r)>>4,n[i+1]=a}function Pr(t,e,r,n,i){n[i+0]=255,Ar(t,e,r,n,i+1)}function kr(t,e,r,n,i){xr(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 Ir(e,r,n){t[e]=function(t,e,i,a,o,s,c,u,l){for(var h=u+(-2&l)*n;u!=h;)r(t[e+0],i[a+0],o[s+0],c,u),r(t[e+1],i[a+0],o[s+0],c,u+n),e+=2,++a,++s,u+=2*n;1&l&&r(t[e+0],i[a+0],o[s+0],c,u)}}function Cr(t,e,r){return 0==r?0==t?0==e?6:5:0==e?4:0:r}function jr(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:un(e,r,n,i)}}function Or(t,e){var r,a,o=e.M,s=e.Nb,c=t.oc,u=t.pc+40,l=t.oc,h=t.pc+584,f=t.oc,d=t.pc+600;for(r=0;16>r;++r)c[u+32*r-1]=129;for(r=0;8>r;++r)l[h+32*r-1]=129,f[d+32*r-1]=129;for(0<o?c[u-1-32]=l[h-1-32]=f[d-1-32]=129:(i(c,u-32-1,127,21),i(l,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(c,u+32*r-4,c,u+32*r+12,4);for(r=-1;8>r;++r)n(l,h+32*r-4,l,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(c,u-32,g[m].y,0,16),n(l,h-32,g[m].f,0,8),n(f,d-32,g[m].ea,0,8)),p.Za){var y=c,w=u-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=c,w=u+Di[r],fi[p.Ob[r]](y,w),jr(b,v,16*+r,y,w)}else if(y=Cr(a,o,p.Ob[0]),hi[y](c,u),0!=b)for(r=0;16>r;++r,b<<=2)jr(b,v,16*+r,c,u+Di[r]);for(r=p.Gc,y=Cr(a,o,p.Dd),di[y](l,h),di[y](f,d),b=v,y=l,w=h,255&(p=r>>0)&&(170&p?cn(b,256,y,w):ln(b,256,y,w)),p=f,b=d,255&(r>>=8)&&(170&r?cn(v,320,p,b):ln(v,320,p,b)),o<t.Ub-1&&(n(g[m].y,0,c,u+480,16),n(g[m].f,0,l,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,c,u+32*r,16);for(r=0;8>r;++r)n(v,p+r*t.B,l,h+32*r,8),n(b,y+r*t.B,f,d+32*r,8)}}function Br(t,n,i,a,o,s,c,u,l){var h=[0],f=[0],d=0,p=null!=l?l.kd:0,g=null!=l?l: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=j(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 L=t;b=n,y=i;var A=h,x=f,S=m=[0];if((k=d=[d])[0]=0,8>y[0])y=7;else{if(!r(L,b[0],"VP8X")){if(10!=j(L,b[0]+4)){y=3;break t}if(18>y[0]){y=7;break t}var _=j(L,b[0]+8),P=1+C(L,b[0]+12);if(2147483648<=P*(L=1+C(L,b[0]+15))){y=3;break t}null!=S&&(S[0]=_),null!=A&&(A[0]=P),null!=x&&(x[0]=L),b[0]+=18,y[0]-=18,k[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!=c&&(c[0]=b),null!=u&&(u[0]=0),c=h[0],m=f[0],d&&b&&null==l){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:{_=t,y=n,w=i;var k=g.gb;A=g.na,x=g.P,S=g.Sa;P=22,e(null!=_),e(null!=w),L=y[0];var F=w[0];for(e(null!=A),e(null!=S),A[0]=null,x[0]=null,S[0]=0;;){if(y[0]=L,w[0]=F,8>F){y=7;break t}var I=j(_,L+4);if(4294967286<I){y=3;break t}var O=8+I+1&-2;if(P+=O,0<k&&P>k){y=3;break t}if(!r(_,L,"VP8 ")||!r(_,L,"VP8L")){y=0;break t}if(F[0]<O){y=7;break t}r(_,L,"ALPH")||(A[0]=_,x[0]=L+8,S[0]=I),L+=O,F-=O}}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(k=t,y=n,w=i,A=g.gb[0],x=g.Ja,S=g.xa,_=y[0],L=!r(k,_,"VP8 "),P=!r(k,_,"VP8L"),e(null!=k),e(null!=w),e(null!=x),e(null!=S),8>w[0])y=7;else{if(L||P){if(k=j(k,_+4),12<=A&&k>A-12){y=3;break t}if(p&&k>w[0]-8){y=7;break t}x[0]=k,y[0]+=8,w[0]-=8,S[0]=P}else S[0]=5<=w[0]&&47==k[_+0]&&!(k[_+4]>>5),x[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==u||b||(u[0]=g.xa?2:1),c=[c],m=[m],g.xa){if(5>i){y=7;break}u=c,p=m,b=s,null==t||5>i?t=0:5<=i&&47==t[n+0]&&!(t[n+4]>>5)?(w=[0],k=[0],A=[0],v(x=new N,t,n,i),gt(x,w,k,A)?(null!=u&&(u[0]=w[0]),null!=p&&(p[0]=k[0]),null!=b&&(b[0]=A[0]),t=1):t=0):t=0}else{if(10>i){y=7;break}u=m,null==t||10>i||!Xt(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:(c&&(c[0]=b),u&&(u[0]=t),t=1))}if(!t)return 3;if(c=c[0],m=m[0],d&&(h[0]!=c||f[0]!=m))return 3;null!=l&&(l[0]=g,l.offset=n-l.w,e(4294967286>n-l.w),e(l.offset==l.ha-i));break}return 0==y||7==y&&d&&null==l?(null!=s&&(s[0]|=null!=g.na&&0<g.na.length),null!=a&&(a[0]=c),null!=o&&(o[0]=m),0):y}function Mr(t,e,r){var n=e.width,i=e.height,a=0,o=0,s=n,c=i;if(e.Da=null!=t&&0<t.Da,e.Da&&(s=t.cd,c=t.bd,a=t.v,o=t.j,11>r||(a&=-2,o&=-2),0>a||0>o||0>=s||0>=c||a+s>n||o+c>i))return 0;if(e.v=a,e.j=o,e.va=a+s,e.o=o+c,e.U=s,e.T=c,e.da=null!=t&&0<t.da,e.da){if(!E(s,c,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 qr(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,c=-2&r.j;if(0>s||0>c||0>=i||0>=o||s+i>t||c+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 u=n.width,l=n.height;if(t=n.S,0>=u||0>=l||!(t>=En&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){s=o=i=e=0;var h=(c=u*zi[t])*l;if(11>t||(o=(l+1)/2*(e=(u+1)/2),12==t&&(s=(i=u)*l)),null==(l=a(h+2*o+s))){t=1;break t}n.sd=l,11>t?((u=n.f.RGBA).eb=l,u.fb=0,u.A=c,u.size=h):((u=n.f.kb).y=l,u.O=0,u.fa=c,u.Fd=h,u.f=l,u.N=0+h,u.Ab=e,u.Cd=o,u.ea=l,u.W=0+h+o,u.Db=e,u.Ed=o,12==t&&(u.F=l,u.J=0+h+2*o),u.Tc=s,u.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&=(c=Math.abs(t.A))*(s-1)+o<=t.size,e&=c>=o*zi[i],e&=null!=t.eb;else{t=n.f.kb,c=(o+1)/2,h=(s+1)/2,u=Math.abs(t.fa);l=Math.abs(t.Ab);var f=Math.abs(t.Db),d=Math.abs(t.lb),p=d*(s-1)+o;e&=u*(s-1)+o<=t.Fd,e&=l*(h-1)+c<=t.Cd,e=(e&=f*(h-1)+c<=t.Ed)&u>=o&l>=c&f>=c,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 Dr=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],Tr=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(t>>0&255,n>>0&255))>>>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;X("ColorIndexInverseTransform","MapARGB","32b",(function(t){return t>>8&255}),(function(t){return t})),X("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(t){return t}),(function(t){return t>>8&255}));var Gr,Yr=t.ColorIndexInverseTransform,Jr=t.MapARGB,Xr=t.VP8LColorIndexInverseTransformAlpha,Kr=t.MapAlpha,Zr=t.VP8LPredictorsAdd=[];Zr.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var $r,Qr,tn,en,rn,nn,an,on,sn,cn,un,ln,hn,fn,dn,pn,gn,mn,vn,bn,yn,wn,Nn,Ln,An,xn,Sn,_n,Pn=a(511),kn=a(2041),Fn=a(225),In=a(767),Cn=0,jn=kn,On=Fn,Bn=In,Mn=Pn,En=0,qn=1,Dn=2,Rn=3,Tn=4,Un=5,zn=6,Hn=7,Wn=8,Vn=9,Gn=10,Yn=[2,3,7],Jn=[3,3,11],Xn=[280,256,256,256,40],Kn=[0,1,1,1,0],Zn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],$n=[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],Qn=[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]]]],ci=[[[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]]],ui=[[[[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]]]],li=[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",xr,3),vr("UpsampleRgbaLinePair",Fr,4),vr("UpsampleBgraLinePair",kr,4),vr("UpsampleArgbLinePair",Pr,4),vr("UpsampleRgba4444LinePair",_r,2),vr("UpsampleRgb565LinePair",Sr,2);var bi=t.UpsampleRgbLinePair,yi=t.UpsampleBgrLinePair,wi=t.UpsampleRgbaLinePair,Ni=t.UpsampleBgraLinePair,Li=t.UpsampleArgbLinePair,Ai=t.UpsampleRgba4444LinePair,xi=t.UpsampleRgb565LinePair,Si=16,_i=1<<Si-1,Pi=-227,ki=482,Fi=6,Ii=(256<<Fi)-1,Ci=0,ji=a(256),Oi=a(256),Bi=a(256),Mi=a(256),Ei=a(ki-Pi),qi=a(ki-Pi);Ir("YuvToRgbRow",Ar,3),Ir("YuvToBgrRow",xr,3),Ir("YuvToRgbaRow",Fr,4),Ir("YuvToBgraRow",kr,4),Ir("YuvToArgbRow",Pr,4),Ir("YuvToRgba4444Row",_r,2),Ir("YuvToRgb565Row",Sr,2);var Di=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ri=[0,2,8],Ti=[8,7,6,4,4,2,2,2,1,1,1,1],Ui=1;this.WebPDecodeRGBA=function(t,r,n,i,a){var o=qn,s=new rr,c=new ot;s.ba=c,c.S=o,c.width=[c.width],c.height=[c.height];var u=c.width,l=c.height,h=new st;if(null==h||null==t)var f=2;else e(null!=h),f=Br(t,r,n,h.width,h.height,h.Pd,h.Qd,h.format,null);if(0!=f?u=0:(null!=u&&(u[0]=h.width[0]),null!=l&&(l[0]=h.height[0]),u=1),u){c.width=c.width[0],c.height=c.height[0],null!=i&&(i[0]=c.width),null!=a&&(a[0]=c.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=Br(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=kt())){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=qr(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),!Mr(a.Oa,n,Rn)){i.a=2;break r}if(!It(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&&!O(i.s.vb,i.s.Wa.Xa)){i.a=1;break r}i.xb=0}if(!_t(i,i.V,i.Ba,i.c,i.i,n.o,Lt))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,Kt(t,i)){if(0==(r=qr(i.width,i.height,s.Oa,s.ba))){if(t.Aa=0,n=s.Oa,e(null!=(a=t)),null!=n){if(0<(u=0>(u=n.Md)?0:100<u?255:255*u/100)){for(l=h=0;4>l;++l)12>(f=a.pb[l]).lc&&(f.ia=u*Ti[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)}Qt(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?c.f.RGBA.eb:c.f.kb.y}else o=null;return o};var zi=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function u(t,e){for(var r="",n=0;n<4;n++)r+=String.fromCharCode(t[e++]);return r}function l(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16)>>>0}function h(t,e){return(t[e+0]<<0|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}new c;var f=[0],d=[0],p=[],g=new c,m=t,v=function(t,e){var r={},n=0,i=!1,a=0,o=0;if(r.frames=[],!
+/** @license
+     * Copyright (c) 2017 Dominik Homberger
+    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+    https://webpjs.appspot.com
+    WebPRiffParser dominikhlbg@gmail.com
+    */
+function(t,e,r,n){for(var i=0;i<n;i++)if(t[e+i]!=r.charCodeAt(i))return!0;return!1}(t,e,"RIFF",4)){var s,c;h(t,e+=4);for(e+=8;e<t.length;){var f=u(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+l(t,g);g+=3;v.canvas_height=1+l(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)[(c=g)+0]<<0|s[c+1]<<8;g+=2;break;case"ANMF":var m,v;(v=r.frames[n]={}).offset_x=2*l(t,e),e+=3,v.offset_y=2*l(t,e),e+=3,v.width=1+l(t,e),e+=3,v.height=1+l(t,e),e+=3,v.duration=l(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 N=y[0],L=g.WebPDecodeRGBA(m,N.src_off,N.src_size,d,f);N.rgba=L,N.imgwidth=d[0],N.imgheight=f[0];for(var A=0;A<d[0]*f[0]*4;A++)p[A]=L[A];return this.width=d,this.height=f,this.data=p,this}!function(t){var e=function(){return!0},r=function(e,r,i,u){var l=4,h=o;switch(u){case t.image_compression.FAST:l=1,h=a;break;case t.image_compression.MEDIUM:l=6,h=s;break;case t.image_compression.SLOW:l=9,h=c}var f=Ie(e=n(e,r,i,h),{level:l});return t.__addimage__.arrayBufferToBinaryString(f)},n=function(t,e,r,n){for(var i,a,o,s=t.length/e,c=new Uint8Array(t.length+s),u=l(),f=0;f<s;f+=1){if(o=f*e,i=t.subarray(o,o+e),n)c.set(n(i,r,a),o+f);else{for(var d,p=u.length,g=[];d<p;d+=1)g[d]=u[d](i,r,a);var m=h(g.concat());c.set(g[m],o+f)}a=i}return c},i=function(t){var e=Array.apply([],t);return e.unshift(0),e},a=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},o=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},s=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},c=function(t,e,r){var n,i,a,o,s=[],c=t.length;s[0]=4;for(var l=0;l<c;l+=1)n=t[l-e]||0,i=r&&r[l]||0,a=r&&r[l-e]||0,o=u(n,i,a),s[l+1]=t[l]-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[i,a,o,s,c]},h=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(n,i,a,o){var s,c,u,l,h,f,d,p,g,m,v,b,y,w,N,L=this.decode.FLATE_DECODE,A="";if(this.__addimage__.isArrayBuffer(n)&&(n=new Uint8Array(n)),this.__addimage__.isArrayBufferView(n)){if(n=(u=new De(n)).imgData,c=u.bits,s=u.colorSpace,h=u.colors,-1!==[4,6].indexOf(u.colorType)){if(8===u.bits){g=(p=32==u.pixelBitlength?new Uint32Array(u.decodePixels().buffer):16==u.pixelBitlength?new Uint16Array(u.decodePixels().buffer):new Uint8Array(u.decodePixels().buffer)).length,v=new Uint8Array(g*u.colors),m=new Uint8Array(g);var x,S=u.pixelBitlength-u.bits;for(w=0,N=0;w<g;w++){for(y=p[w],x=0;x<S;)v[N++]=y>>>x&255,x+=u.bits;m[w]=y>>>x&255}}if(16===u.bits){g=(p=new Uint32Array(u.decodePixels().buffer)).length,v=new Uint8Array(g*(32/u.pixelBitlength)*u.colors),m=new Uint8Array(g*(32/u.pixelBitlength)),b=u.colors>1,w=0,N=0;for(var _=0;w<g;)y=p[w++],v[N++]=y>>>0&255,b&&(v[N++]=y>>>16&255,y=p[w++],v[N++]=y>>>0&255),m[_++]=y>>>16&255;c=8}o!==t.image_compression.NONE&&e()?(n=r(v,u.width*u.colors,u.colors,o),d=r(m,u.width,1,o)):(n=v,d=m,L=void 0)}if(3===u.colorType&&(s=this.color_spaces.INDEXED,f=u.palette,u.transparency.indexed)){var P=u.transparency.indexed,k=0;for(w=0,g=P.length;w<g;++w)k+=P[w];if((k/=255)===g-1&&-1!==P.indexOf(0))l=[P.indexOf(0)];else if(k!==g){for(p=u.decodePixels(),m=new Uint8Array(p.length),w=0,g=p.length;w<g;w++)m[w]=P[p[w]];d=r(m,u.width,1)}}var F=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}(o);return L===this.decode.FLATE_DECODE&&(A="/Predictor "+F+" "),A+="/Colors "+h+" /BitsPerComponent "+c+" /Columns "+u.width,(this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n))&&(n=this.__addimage__.arrayBufferToBinaryString(n)),(d&&this.__addimage__.isArrayBuffer(d)||this.__addimage__.isArrayBufferView(d))&&(d=this.__addimage__.arrayBufferToBinaryString(d)),{alias:a,data:n,index:i,filter:L,decodeParameters:A,transparency:l,palette:f,sMask:d,predictor:F,width:u.width,height:u.height,bitsPerComponent:c,colorSpace:s}}}}(M.API),function(t){t.processGIF89A=function(e,r,n,i){var a=new Re(e),o=a.width,s=a.height,c=[];a.decodeAndBlitFrameRGBA(0,c);var u={data:c,width:o,height:s},l=new Ue(100).encode(u,100);return t.processJPEG.call(this,l,r,n,i)},t.processGIF87A=t.processGIF89A}(M.API),ze.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)},ze.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){i.log("bit decode error:"+t)}},ze.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 c=this.palette[a>>7-s&1];this.data[o+4*s]=c.blue,this.data[o+4*s+1]=c.green,this.data[o+4*s+2]=c.red,this.data[o+4*s+3]=255}0!==r&&(this.pos+=4-r)}},ze.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,c=15&a,u=this.palette[s];if(this.data[o]=u.blue,this.data[o+1]=u.green,this.data[o+2]=u.red,this.data[o+3]=255,2*i+1>=this.width)break;u=this.palette[c],this.data[o+4]=u.blue,this.data[o+4+1]=u.green,this.data[o+4+2]=u.red,this.data[o+4+3]=255}0!==e&&(this.pos+=4-e)}},ze.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)}},ze.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,c=(a>>10&e)/e*255|0,u=a>>15?255:0,l=n*this.width*4+4*i;this.data[l]=c,this.data[l+1]=s,this.data[l+2]=o,this.data[l+3]=u}this.pos+=t}},ze.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,c=(o>>5&r)/r*255|0,u=(o>>11)/e*255|0,l=i*this.width*4+4*a;this.data[l]=u,this.data[l+1]=c,this.data[l+2]=s,this.data[l+3]=255}this.pos+=t}},ze.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}},ze.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}},ze.prototype.getData=function(){return this.data},
+/**
+   * @license
+   * Copyright (c) 2018 Aras Abbasi
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+function(t){t.processBMP=function(e,r,n,i){var a=new ze(e,!1),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},u=new Ue(100).encode(c,100);return t.processJPEG.call(this,u,r,n,i)}}(M.API),He.prototype.getData=function(){return this.data},
+/**
+   * @license
+   * Copyright (c) 2019 Aras Abbasi
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+function(t){t.processWEBP=function(e,r,n,i){var a=new He(e,!1),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},u=new Ue(100).encode(c,100);return t.processJPEG.call(this,u,r,n,i)}}(M.API),
+/**
+   * @license
+   *
+   * Copyright (c) 2021 Antti Palola, https://github.com/Pantura
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining
+   * a copy of this software and associated documentation files (the
+   * "Software"), to deal in the Software without restriction, including
+   * without limitation the rights to use, copy, modify, merge, publish,
+   * distribute, sublicense, and/or sell copies of the Software, and to
+   * permit persons to whom the Software is furnished to do so, subject to
+   * the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be
+   * included in all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   * ====================================================================
+   */
+function(t){t.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,c=0,u=0;u<i;u+=4){var l=n[u],h=n[u+1],f=n[u+2],d=n[u+3];a[s++]=l,a[s++]=h,a[s++]=f,o[c++]=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}}}(M.API),
+/**
+   * @license
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+function(t){t.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}}(M.API),Oe=M.API,Be=Oe.getCharWidthsArray=function(t,r){var n,i,a=(r=r||{}).font||this.internal.getFont(),o=r.fontSize||this.internal.getFontSize(),s=r.charSpace||this.internal.getCharSpace(),c=r.widths?r.widths:a.metadata.Unicode.widths,u=c.fof?c.fof:1,l=r.kerning?r.kerning:a.metadata.Unicode.kerning,h=l.fof?l.fof:1,f=!1!==r.doKerning,d=0,p=t.length,g=0,m=c[0]||u,v=[];for(n=0;n<p;n++)i=t.charCodeAt(n),"function"==typeof a.metadata.widthOfString?v.push((a.metadata.widthOfGlyph(a.metadata.characterToGlyph(i))+s*(1e3/o)||0)/1e3):(d=f&&"object"===e(l[i])&&!isNaN(parseInt(l[i][g],10))?l[i][g]/h:0,v.push((c[i]||m)/u+d)),g=i;return v},Me=Oe.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 Oe.processArabic&&(t=Oe.processArabic(t)),"function"==typeof n.metadata.widthOfString?n.metadata.widthOfString(t,r,i)/r:Be.apply(this,arguments).reduce((function(t,e){return t+e}),0)},Ee=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 c=a;for(s=0;a!==o;)s+e[a]>n&&(i.push(t.slice(c,a)),s=0,c=a),s+=e[a],a++;return c!==a&&i.push(t.slice(c,a)),i},qe=function(t,e,r){r||(r={});var n,i,a,o,s,c,u,l=[],h=[l],f=r.textIndent||0,d=0,p=0,g=t.split(" "),m=Be.apply(this,[" ",r])[0];if(c=-1===r.lineIndent?g[0].length+2:r.lineIndent||0){var v=Array(c).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,c=Me.apply(this,[v,r])}for(a=0,o=g.length;a<o;a++){var y=0;if(n=g[a],c&&"\n"==n[0]&&(n=n.substr(1),y=1),f+d+(p=(i=Be.apply(this,[n,r])).reduce((function(t,e){return t+e}),0))>e||y){if(p>e){for(s=Ee.apply(this,[n,i,e-(f+d),e]),l.push(s.shift()),l=[s.pop()];s.length;)h.push([s.shift()]);p=i.slice(n.length-(l[0]?l[0].length:0)).reduce((function(t,e){return t+e}),0)}else l=[n];h.push(l),f=p+c,d=m}else l.push(n),f+=d+p,d=m}return u=c?function(t,e){return(e?v:"")+t.join(" ")}:function(t){return t.join(" ")},h.map(u)},Oe.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,c,u=[];for(s=0,c=n.length;s<c;s++)u=u.concat(qe.apply(this,[n[s],o,a]));return u},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var r="klmnopqrstuvwxyz",n={},i={},a=0;a<r.length;a++)n[r[a]]="0123456789abcdef"[a],i["0123456789abcdef"[a]]=r[a];var o=function(t){return"0x"+parseInt(t,10).toString(16)},s=t.__fontmetrics__.compress=function(t){var r,n,a,c,u=["{"];for(var l in t){if(r=t[l],isNaN(parseInt(l,10))?n="'"+l+"'":(l=parseInt(l,10),n=(n=o(l).slice(2)).slice(0,-1)+i[n.slice(-1)]),"number"==typeof r)r<0?(a=o(r).slice(3),c="-"):(a=o(r).slice(2),c=""),a=c+a.slice(0,-1)+i[a.slice(-1)];else{if("object"!==e(r))throw new Error("Don't know what to do with value type "+e(r)+".");a=s(r)}u.push(n+a)}return u.push("}"),u.join("")},c=t.__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,c=o,u=[],l="",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?(u.push([c,i]),c={},i=void 0):"}"==a?((r=u.pop())[0][r[1]]=c,i=void 0,c=r[0]):"-"==a?s=-1:void 0===i?n.hasOwnProperty(a)?(l+=n[a],i=parseInt(l,16)*s,s=1,l=""):l+=a:n.hasOwnProperty(a)?(h+=n[a],c[i]=parseInt(h,16)*s,s=1,i=void 0,h=""):h+=a;return o},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:c("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},l={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},h={Unicode:{"Courier-Oblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":c("{'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":c("{'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:c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":c("{'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:c("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:c("{'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":c("{'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:c("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":c("{'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":c("{'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":c("{'widths'{k3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ow5qs17sv5tv}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}}}")}};t.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=l.Unicode[e.postScriptName];n&&(e.metadata.Unicode.encoding=n,e.encoding=n.codePages[0])}])}(M.API),
+/**
+   * @license
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+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(c(n)),r.metadata=t.API.TTFFont.open(n),r.metadata.Unicode=r.metadata.Unicode||{encoding:{},kerning:{},widths:[]},r.metadata.glyIdsUsed=[0]}(i,n)}}])}(M),function(n){function a(){return(r.canvg?Promise.resolve(r.canvg):"object"===(void 0===t?"undefined":e(t))&&"undefined"!=typeof module?new Promise((function(t,e){try{t(require("canvg"))}catch(t){e(t)}})):"function"==typeof define&&define.amd?new Promise((function(t,e){try{require(["canvg"],t)}catch(t){e(t)}})):Promise.reject(new Error("Could not load canvg"))).catch((function(t){return Promise.reject(new Error("Could not load canvg: "+t))})).then((function(t){return t.default?t.default:t}))}n.addSvgAsImage=function(t,e,r,n,o,s,c,u){if(isNaN(e)||isNaN(r))throw i.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(n)||isNaN(o))throw i.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=n,l.height=o;var h=l.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,l.width,l.height);var f={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return a().then((function(e){return e.fromString(h,t,f)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(t){return t.render(f)})).then((function(){d.addImage(l.toDataURL("image/jpeg",1),e,r,n,o,c,u)}))}}(M.API),
+/**
+   * @license
+   * ====================================================================
+   * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining
+   * a copy of this software and associated documentation files (the
+   * "Software"), to deal in the Software without restriction, including
+   * without limitation the rights to use, copy, modify, merge, publish,
+   * distribute, sublicense, and/or sell copies of the Software, and to
+   * permit persons to whom the Software is furnished to do so, subject to
+   * the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be
+   * included in all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   * ====================================================================
+   */
+function(t){t.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}}(M.API),function(t){t.viewerPreferences=function(t,r){var n;t=t||{},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}},c=Object.keys(s),u=[],l=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"===t||!0===r){var p=c.length;for(f=0;f<p;f+=1)n[c[f]].value=n[c[f]].defaultValue,n[c[f]].explicitSet=!1}if("object"===e(t))for(a in t)if(o=t[a],d(c,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(l=0;l<o.length;l+=1)if(i=!0,1===o[l].length&&"number"==typeof o[l][0])u.push(String(o[l]-1));else if(o[l].length>1){for(h=0;h<o[l].length;h+=1)"number"!=typeof o[l][h]&&(i=!1);!0===i&&u.push([o[l][0]-1,o[l][1]-1].join(" "))}n[a].value="["+u.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}}(M.API),
+/** ====================================================================
+   * @license
+   * jsPDF XMP metadata plugin
+   * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi
+   *
+   * Permission is hereby granted, free of charge, to any person obtaining
+   * a copy of this software and associated documentation files (the
+   * "Software"), to deal in the Software without restriction, including
+   * without limitation the rights to use, copy, modify, merge, publish,
+   * distribute, sublicense, and/or sell copies of the Software, and to
+   * permit persons to whom the Software is furnished to do so, subject to
+   * the following conditions:
+   *
+   * The above copyright notice and this permission notice shall be
+   * included in all copies or substantial portions of the Software.
+   *
+   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+   * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+   * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+   * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+   * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+   * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+   * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+   * ====================================================================
+   */
+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}}(M.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,c=r.metadata.subset.encode(r.metadata.glyIdsUsed,1),u="",l=0;l<c.length;l++)u+=String.fromCharCode(c[l]);var h=a();o({data:u,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 /"+F(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 /"+F(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 /"+F(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,c="",u=0;u<s.length;u++)c+=String.fromCharCode(s[u]);var l=a();o({data:c,addLength1:!0,objectId:l}),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 "+l+" 0 R"),i("/Flags 96"),i("/FontBBox "+t.API.PDFObject.convert(r.metadata.bbox)),i("/FontName /"+F(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/"+F(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||{},c=s.pdfEscape,u=s.activeFontKey,l=s.fonts,h=u,f="",d=0,p="",g=l[h].encoding;if("Identity-H"!==l[h].encoding)return{text:n,x:i,y:a,options:o,mutex:s};for(p=n,h=u,Array.isArray(n)&&(p=n[0]),d=0;d<p.length;d+=1)l[h].metadata.hasOwnProperty("cmap")&&(e=l[h].metadata.cmap.unicode.codeMap[p[d].charCodeAt(0)]),e||p[d].charCodeAt(0)<256&&l[h].metadata.hasOwnProperty("Unicode")?f+=p[d]:f+="";var m="";return parseInt(h.slice(1))<14||"WinAnsiEncoding"===g?m=c(f,h).split("").map((function(t){return t.charCodeAt(0).toString(16)})).join(""):"Identity-H"===g&&(m=r(f,l[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}])}(M),
+/**
+   * @license
+   * jsPDF virtual FileSystem functionality
+   *
+   * Licensed under the MIT License.
+   * http://opensource.org/licenses/mit-license
+   */
+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}}(M.API),
+/**
+   * @license
+   * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
+   * MIT License
+   */
+function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var r,n,i,a,o,s,c,u=e,l=[[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?u[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 c,u,l,h,f=e[s];switch(f){case"L":case"R":m=!1;break;case"N":case"AN":break;case"EN":m&&(f="AN");break;case"AL":m=!0,f="R";break;case"WS":f="N";break;case"CS":s<1||s+1>=e.length||"EN"!==(c=o[s-1])&&"AN"!==c||"EN"!==(u=e[s+1])&&"AN"!==u?f="N":m&&(u="AN"),f=u===c?u:"N";break;case"ES":f="EN"===(c=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(l=s+1,h=e.length;l<h&&"ET"===e[l];)l++;f=l<h&&"EN"===e[l]?"EN":"N";break;case"NSM":if(i&&!a){for(h=e.length,l=s+1;l<h&&"NSM"===e[l];)l++;if(l<h){var d=t[s],p=d>=1425&&d<=2303||64286===d;if(c=e[l],p&&("R"===c||"AL"===c)){f="R";break}}}f=s<1||"B"===(c=e[s-1])?"N":o[s-1];break;case"B":m=!1,r=!0,f=v;break;case"S":n=!0,f="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=!1;break;case"BN":f="N"}return f},N=function(t,e,r){var n=t.split("");return r&&L(n,r,{hiLevel:v}),n.reverse(),e&&e.reverse(),n.join("")},L=function(t,e,i){var a,o,s,c,u,d=-1,p=t.length,g=0,y=[],N=v?h:l,L=[];for(m=!1,r=!1,n=!1,o=0;o<p;o++)L[o]=b(t[o]);for(s=0;s<p;s++){if(u=g,y[s]=w(t,L,y,s),a=240&(g=N[u][f[y[s]]]),g&=15,e[s]=c=N[g][5],a>0)if(16===a){for(o=d;o<s;o++)e[o]=1;d=-1}else d=-1;if(N[g][6])-1===d&&(d=s);else if(d>-1){for(o=d;o<s;o++)e[o]=c;d=-1}"B"===L[s]&&(e[s]=0),i.hiLevel|=c}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}}(L,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,c,u,l=e.length,h=0;h<l;){if(i[h]>=t){for(c=h+1;c<l&&i[c]>=t;)c++;for(u=h,s=c-1;u<s;u++,s--)o=e[u],e[u]=e[s],e[s]=o,n&&(o=n[u],n[u]=n[s],n[s]=o);h=c}h++}}},x=function(t,e,r){var n=t.split(""),i={hiLevel:v};return r||(r=[]),L(n,r,i),function(t,e,r){if(0!==r.hiLevel&&c)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=N(t,e,r);else if(!i&&o&&s)v=a?1:0,t=x(t,e,r),t=N(t,e);else if(!i||a||o||s){if(i&&!o&&a^s)t=N(t,e),a?(v=0,t=x(t,e,r)):(v=1,t=x(t,e,r),t=N(t,e));else if(i&&a&&!o&&s)v=1,t=x(t,e,r),t=N(t,e);else if(!i&&!o&&a^s){var n=c;a?(v=1,t=x(t,e,r),v=0,c=!1,t=x(t,e,r),c=n):(v=0,t=x(t,e,r),t=N(t,e),v=1,c=!1,t=x(t,e,r),c=n,t=N(t,e))}}else v=0,t=x(t,e,r);else v=a?1:0,t=x(t,e,r);return t},this.__bidiEngine__.setOptions=function(t){t&&(i=t.isInputVisual,o=t.isOutputVisual,a=t.isInputRtl,s=t.isOutputRtl,c=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})}])}(M),M.API.TTFFont=function(){function t(t){var e;if(this.rawData=t,e=this.contents=new Ve(t),this.contents.pos=4,"ttcf"===e.readString(4))throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new lr(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new Ge(this.contents),this.head=new Xe(this),this.name=new rr(this),this.cmap=new Ze(this),this.toUnicode={},this.hhea=new $e(this),this.maxp=new nr(this),this.hmtx=new ir(this),this.post=new tr(this),this.os2=new Qe(this),this.loca=new ur(this),this.glyf=new or(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),0!=(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 We,Ve=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}(),Ge=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,c,u,l,h,f,d,p;for(p in f=Object.keys(e).length,s=Math.log(2),l=16*Math.floor(Math.log(f)/s),a=Math.floor(l/s),u=16*f-l,(n=new Ve).writeInt(this.scalarType),n.writeShort(f),n.writeShort(l),n.writeShort(a),n.writeShort(u),i=16*f,c=n.pos+i,o=null,d=[],e)for(h=e[p],n.writeString(p),n.writeInt(t(h)),n.writeInt(c),n.writeInt(h.length),d=d.concat(h),"head"===p&&(o=c),c+=h.length;c%4;)d.push(0),c++;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=ar.call(t);t.length%4;)t.push(0);for(n=new Ve(t),r=0,e=0,i=t.length;e<i;e=e+=4)r+=n.readUInt32();return 4294967295&r},e}(),Ye={}.hasOwnProperty,Je=function(t,e){for(var r in e)Ye.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},Xe=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Je(e,t),e.prototype.tag="head",e.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()},e.prototype.encode=function(t){var e;return(e=new Ve).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},e}(We=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}()),Ke=function(){function t(t,e){var r,n,i,a,o,s,c,u,l,h,f,d,p,g,m,v,b;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),l=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}(),c=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}(),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===u[s]?a=r+c[s]:0!==(a=o[u[s]/2+(r-d)-(h-s)]||0)&&(a+=c[s]),this.codeMap[r]=65535&a}t.pos=l}return t.encode=function(t,e){var r,n,i,a,o,s,c,u,l,h,f,d,p,g,m,v,b,y,w,N,L,A,x,S,_,P,k,F,I,C,j,O,B,M,E,q,D,R,T,U,z,H,W,V,G,Y;switch(F=new Ve,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={},I=0,B=a.length;I<B;I++)null==v[W=t[n=a[I]]]&&(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(P=[],l=[],b=0,v={},r={},m=c=null,C=0,M=a.length;C<M;C++)null==v[w=t[n=a[C]]]&&(v[w]=++b),r[n]={old:w,new:v[w]},o=v[w]-n,null!=m&&o===c||(m&&l.push(m),P.push(n),c=o),m=n;for(m&&l.push(m),l.push(65535),P.push(65535),S=2*(x=P.length),A=2*Math.pow(Math.log(x)/Math.LN2,2),h=Math.log(A/2)/Math.LN2,L=2*x-A,s=[],N=[],f=[],d=j=0,E=P.length;j<E;d=++j){if(_=P[d],u=l[d],65535===_){s.push(0),N.push(0);break}if(_-(k=r[_].new)>=32768)for(s.push(0),N.push(2*(f.length+x-d)),n=O=_;_<=u?O<=u:O>=u;n=_<=u?++O:--O)f.push(r[n].new);else s.push(k-_),N.push(0)}for(F.writeUInt16(3),F.writeUInt16(1),F.writeUInt32(12),F.writeUInt16(4),F.writeUInt16(16+8*x+2*f.length),F.writeUInt16(0),F.writeUInt16(S),F.writeUInt16(A),F.writeUInt16(h),F.writeUInt16(L),z=0,q=l.length;z<q;z++)n=l[z],F.writeUInt16(n);for(F.writeUInt16(0),H=0,D=P.length;H<D;H++)n=P[H],F.writeUInt16(n);for(V=0,R=s.length;V<R;V++)o=s[V],F.writeUInt16(o);for(G=0,T=N.length;G<T;G++)y=N[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(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Je(e,t),e.prototype.tag="cmap",e.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 Ke(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},e.encode=function(t,e){var r,n;return null==e&&(e="macroman"),r=Ke.encode(t,e),(n=new Ve).writeUInt16(0),n.writeUInt16(1),r.table=n.data.concat(r.subtable),r},e}(We),$e=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Je(e,t),e.prototype.tag="hhea",e.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()},e}(We),Qe=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Je(e,t),e.prototype.tag="OS/2",e.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()},e}(We),tr=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Je(e,t),e.prototype.tag="post",e.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: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 196608:break;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)}},e}(We),er=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},rr=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Je(e,t),e.prototype.tag="name",e.prototype.parse=function(t){var e,r,n,i,a,o,s,c,u,l,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=u=0,l=r.length;u<l;i=++u)n=r[i],t.pos=n.offset,c=t.readString(n.length),a=new er(c,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]},e}(We),nr=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Je(e,t),e.prototype.tag="maxp",e.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()},e}(We),ir=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Je(e,t),e.prototype.tag="hmtx",e.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},e.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]}},e}(We),ar=[].slice,or=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Je(e,t),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var e,r,n,i,a,o,s,c,u,l;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 Ve(e.read(n))).readShort(),c=o.readShort(),l=o.readShort(),s=o.readShort(),u=o.readShort(),this.cache[t]=-1===a?new cr(o,c,l,s,u):new sr(o,a,c,l,s,u),this.cache[t]))},e.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}},e}(We),sr=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 1,8,32,64,128,t.prototype.encode=function(){var t,e,r;for(e=new Ve(ar.call(this.raw.data)),t=0,r=this.glyphIDs.length;t<r;++t)e.pos=this.glyphOffsets[t];return e.data},t}(),ur=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return Je(e,t),e.prototype.tag="loca",e.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)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.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 c=new Array(4*r.length),u=0;u<r.length;++u)c[4*u+3]=255&r[u],c[4*u+2]=(65280&r[u])>>8,c[4*u+1]=(16711680&r[u])>>16,c[4*u]=(4278190080&r[u])>>24;return c},e}(We),lr=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,c,u,l,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 u=function(t){var e,r;for(e in r={},t)r[t[e]]=e;return r}(f),l=Object.keys(u).sort((function(t,e){return t-e})),p=function(){var t,e,r;for(r=[],t=0,e=l.length;t<e;t++)o=l[t],r.push(u[o]);return r}(),i=this.font.glyf.encode(a,p,f),c=this.font.loca.encode(i.offsets,p),g={cmap:this.font.cmap.raw(),glyf:i.table,loca:c,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}();M.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}(),t.AcroForm=xt,t.AcroFormAppearance=Lt,t.AcroFormButton=gt,t.AcroFormCheckBox=yt,t.AcroFormChoiceField=ht,t.AcroFormComboBox=dt,t.AcroFormEditBox=pt,t.AcroFormListBox=ft,t.AcroFormPasswordField=Nt,t.AcroFormPushButton=mt,t.AcroFormRadioButton=vt,t.AcroFormTextField=wt,t.GState=C,t.ShadingPattern=O,t.TilingPattern=B,t.default=M,t.jsPDF=M,Object.defineProperty(t,"__esModule",{value:!0})}));
+//# sourceMappingURL=jspdf.umd.min.js.map
Index: imaps-frontend/node_modules/jspdf/dist/jspdf.umd.min.js.map
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/jspdf.umd.min.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/jspdf.umd.min.js.map	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1 @@
+{"version":3,"file":"jspdf.umd.min.js","sources":["../src/libs/globalObject.js","../src/libs/console.js","../src/libs/FileSaver.js","../src/libs/AtobBtoa.js","../src/libs/rgbcolor.js","../src/libs/md5.js","../src/libs/rc4.js","../src/libs/pdfsecurity.js","../src/libs/pdfname.js","../src/jspdf.js","../src/modules/acroform.js","../src/libs/fontFace.js","../src/modules/addimage.js","../src/modules/annotations.js","../src/modules/arabic.js","../src/modules/autoprint.js","../src/modules/canvas.js","../src/modules/cell.js","../src/modules/context2d.js","../node_modules/fflate/esm/browser.js","../src/modules/filters.js","../src/modules/fileloading.js","../src/modules/html.js","../src/modules/javascript.js","../src/modules/outline.js","../src/modules/jpeg_support.js","../src/libs/png.js","../src/modules/split_text_to_size.js","../src/libs/omggif.js","../src/libs/JPEGEncoder.js","../src/libs/BMPDecoder.js","../src/libs/WebPDecoder.js","../src/modules/png_support.js","../src/modules/gif_support.js","../src/modules/bmp_support.js","../src/modules/webp_support.js","../src/modules/rgba_support.js","../src/modules/setlanguage.js","../src/modules/standard_fonts_metrics.js","../src/modules/ttfsupport.js","../src/modules/svg.js","../src/modules/total_pages.js","../src/modules/viewerpreferences.js","../src/modules/xmp_metadata.js","../src/modules/utf8.js","../src/modules/vfs.js","../src/libs/bidiEngine.js","../src/libs/ttffont.js"],"sourcesContent":["export var globalObject = (function() {\n  return \"undefined\" !== typeof window\n    ? window\n    : \"undefined\" !== typeof global\n    ? global\n    : \"undefined\" !== typeof self\n    ? self\n    : this;\n})();\n","import { globalObject } from \"./globalObject.js\";\n\nfunction consoleLog() {\n  if (globalObject.console && typeof globalObject.console.log === \"function\") {\n    globalObject.console.log.apply(globalObject.console, arguments);\n  }\n}\n\nfunction consoleWarn(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.warn === \"function\") {\n      globalObject.console.warn.apply(globalObject.console, arguments);\n    } else {\n      consoleLog.call(null, arguments);\n    }\n  }\n}\n\nfunction consoleError(str) {\n  if (globalObject.console) {\n    if (typeof globalObject.console.error === \"function\") {\n      globalObject.console.error.apply(globalObject.console, arguments);\n    } else {\n      consoleLog(str);\n    }\n  }\n}\nexport var console = {\n  log: consoleLog,\n  warn: consoleWarn,\n  error: consoleError\n};\n","/**\n * @license\n * FileSaver.js\n * A saveAs() FileSaver implementation.\n *\n * By Eli Grey, http://eligrey.com\n *\n * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)\n * source  : http://purl.eligrey.com/github/FileSaver.js\n */\n\nimport { globalObject as _global } from \"./globalObject.js\";\nimport { console } from \"./console.js\";\n\nfunction bom(blob, opts) {\n  if (typeof opts === \"undefined\") opts = { autoBom: false };\n  else if (typeof opts !== \"object\") {\n    console.warn(\"Deprecated: Expected third argument to be a object\");\n    opts = { autoBom: !opts };\n  }\n\n  // prepend BOM for UTF-8 XML and text/* types (including HTML)\n  // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n  if (\n    opts.autoBom &&\n    /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(\n      blob.type\n    )\n  ) {\n    return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n  }\n  return blob;\n}\n\nfunction download(url, name, opts) {\n  var xhr = new XMLHttpRequest();\n  xhr.open(\"GET\", url);\n  xhr.responseType = \"blob\";\n  xhr.onload = function() {\n    saveAs(xhr.response, name, opts);\n  };\n  xhr.onerror = function() {\n    console.error(\"could not download file\");\n  };\n  xhr.send();\n}\n\nfunction corsEnabled(url) {\n  var xhr = new XMLHttpRequest();\n  // use sync to avoid popup blocker\n  xhr.open(\"HEAD\", url, false);\n  try {\n    xhr.send();\n  } catch (e) {}\n  return xhr.status >= 200 && xhr.status <= 299;\n}\n\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n  try {\n    node.dispatchEvent(new MouseEvent(\"click\"));\n  } catch (e) {\n    var evt = document.createEvent(\"MouseEvents\");\n    evt.initMouseEvent(\n      \"click\",\n      true,\n      true,\n      window,\n      0,\n      0,\n      0,\n      80,\n      20,\n      false,\n      false,\n      false,\n      false,\n      0,\n      null\n    );\n    node.dispatchEvent(evt);\n  }\n}\n\nvar saveAs =\n  _global.saveAs ||\n  // probably in some web worker\n  (typeof window !== \"object\" || window !== _global\n    ? function saveAs() {\n        /* noop */\n      }\n    : // Use download attribute first if possible (#193 Lumia mobile) unless this is a native app\n    typeof HTMLAnchorElement !== \"undefined\" &&\n      \"download\" in HTMLAnchorElement.prototype\n    ? function saveAs(blob, name, opts) {\n        var URL = _global.URL || _global.webkitURL;\n        var a = document.createElement(\"a\");\n        name = name || blob.name || \"download\";\n\n        a.download = name;\n        a.rel = \"noopener\"; // tabnabbing\n\n        // TODO: detect chrome extensions & packaged apps\n        // a.target = '_blank'\n\n        if (typeof blob === \"string\") {\n          // Support regular links\n          a.href = blob;\n          if (a.origin !== location.origin) {\n            corsEnabled(a.href)\n              ? download(blob, name, opts)\n              : click(a, (a.target = \"_blank\"));\n          } else {\n            click(a);\n          }\n        } else {\n          // Support blobs\n          a.href = URL.createObjectURL(blob);\n          setTimeout(function() {\n            URL.revokeObjectURL(a.href);\n          }, 4e4); // 40s\n          setTimeout(function() {\n            click(a);\n          }, 0);\n        }\n      }\n    : // Use msSaveOrOpenBlob as a second approach\n    \"msSaveOrOpenBlob\" in navigator\n    ? function saveAs(blob, name, opts) {\n        name = name || blob.name || \"download\";\n\n        if (typeof blob === \"string\") {\n          if (corsEnabled(blob)) {\n            download(blob, name, opts);\n          } else {\n            var a = document.createElement(\"a\");\n            a.href = blob;\n            a.target = \"_blank\";\n            setTimeout(function() {\n              click(a);\n            });\n          }\n        } else {\n          navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n        }\n      }\n    : // Fallback to using FileReader and a popup\n      function saveAs(blob, name, opts, popup) {\n        // Open a popup immediately do go around popup blocker\n        // Mostly only available on user interaction and the fileReader is async so...\n        popup = popup || open(\"\", \"_blank\");\n        if (popup) {\n          popup.document.title = popup.document.body.innerText =\n            \"downloading...\";\n        }\n\n        if (typeof blob === \"string\") return download(blob, name, opts);\n\n        var force = blob.type === \"application/octet-stream\";\n        var isSafari =\n          /constructor/i.test(_global.HTMLElement) || _global.safari;\n        var isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n\n        if (\n          (isChromeIOS || (force && isSafari)) &&\n          typeof FileReader === \"object\"\n        ) {\n          // Safari doesn't allow downloading of blob URLs\n          var reader = new FileReader();\n          reader.onloadend = function() {\n            var url = reader.result;\n            url = isChromeIOS\n              ? url\n              : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n            if (popup) popup.location.href = url;\n            else location = url;\n            popup = null; // reverse-tabnabbing #460\n          };\n          reader.readAsDataURL(blob);\n        } else {\n          var URL = _global.URL || _global.webkitURL;\n          var url = URL.createObjectURL(blob);\n          if (popup) popup.location = url;\n          else location.href = url;\n          popup = null; // reverse-tabnabbing #460\n          setTimeout(function() {\n            URL.revokeObjectURL(url);\n          }, 4e4); // 40s\n        }\n      });\n\nexport { saveAs };\n","import { globalObject } from \"./globalObject.js\";\n\nvar atob, btoa;\n\n(function() {\n  atob = globalObject.atob.bind(globalObject);\n  btoa = globalObject.btoa.bind(globalObject);\n  return;\n\n})();\n\nexport { atob, btoa };\n","/**\n * A class to parse color values\n * @author Stoyan Stefanov <sstoo@gmail.com>\n * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}\n * @license Use it if you like it\n */\n\nfunction RGBColor(color_string) {\n  color_string = color_string || \"\";\n  this.ok = false;\n\n  // strip any leading #\n  if (color_string.charAt(0) == \"#\") {\n    // remove # if any\n    color_string = color_string.substr(1, 6);\n  }\n\n  color_string = color_string.replace(/ /g, \"\");\n  color_string = color_string.toLowerCase();\n\n  var channels;\n\n  // before getting into regexps, try simple matches\n  // and overwrite the input\n  var simple_colors = {\n    aliceblue: \"f0f8ff\",\n    antiquewhite: \"faebd7\",\n    aqua: \"00ffff\",\n    aquamarine: \"7fffd4\",\n    azure: \"f0ffff\",\n    beige: \"f5f5dc\",\n    bisque: \"ffe4c4\",\n    black: \"000000\",\n    blanchedalmond: \"ffebcd\",\n    blue: \"0000ff\",\n    blueviolet: \"8a2be2\",\n    brown: \"a52a2a\",\n    burlywood: \"deb887\",\n    cadetblue: \"5f9ea0\",\n    chartreuse: \"7fff00\",\n    chocolate: \"d2691e\",\n    coral: \"ff7f50\",\n    cornflowerblue: \"6495ed\",\n    cornsilk: \"fff8dc\",\n    crimson: \"dc143c\",\n    cyan: \"00ffff\",\n    darkblue: \"00008b\",\n    darkcyan: \"008b8b\",\n    darkgoldenrod: \"b8860b\",\n    darkgray: \"a9a9a9\",\n    darkgreen: \"006400\",\n    darkkhaki: \"bdb76b\",\n    darkmagenta: \"8b008b\",\n    darkolivegreen: \"556b2f\",\n    darkorange: \"ff8c00\",\n    darkorchid: \"9932cc\",\n    darkred: \"8b0000\",\n    darksalmon: \"e9967a\",\n    darkseagreen: \"8fbc8f\",\n    darkslateblue: \"483d8b\",\n    darkslategray: \"2f4f4f\",\n    darkturquoise: \"00ced1\",\n    darkviolet: \"9400d3\",\n    deeppink: \"ff1493\",\n    deepskyblue: \"00bfff\",\n    dimgray: \"696969\",\n    dodgerblue: \"1e90ff\",\n    feldspar: \"d19275\",\n    firebrick: \"b22222\",\n    floralwhite: \"fffaf0\",\n    forestgreen: \"228b22\",\n    fuchsia: \"ff00ff\",\n    gainsboro: \"dcdcdc\",\n    ghostwhite: \"f8f8ff\",\n    gold: \"ffd700\",\n    goldenrod: \"daa520\",\n    gray: \"808080\",\n    green: \"008000\",\n    greenyellow: \"adff2f\",\n    honeydew: \"f0fff0\",\n    hotpink: \"ff69b4\",\n    indianred: \"cd5c5c\",\n    indigo: \"4b0082\",\n    ivory: \"fffff0\",\n    khaki: \"f0e68c\",\n    lavender: \"e6e6fa\",\n    lavenderblush: \"fff0f5\",\n    lawngreen: \"7cfc00\",\n    lemonchiffon: \"fffacd\",\n    lightblue: \"add8e6\",\n    lightcoral: \"f08080\",\n    lightcyan: \"e0ffff\",\n    lightgoldenrodyellow: \"fafad2\",\n    lightgrey: \"d3d3d3\",\n    lightgreen: \"90ee90\",\n    lightpink: \"ffb6c1\",\n    lightsalmon: \"ffa07a\",\n    lightseagreen: \"20b2aa\",\n    lightskyblue: \"87cefa\",\n    lightslateblue: \"8470ff\",\n    lightslategray: \"778899\",\n    lightsteelblue: \"b0c4de\",\n    lightyellow: \"ffffe0\",\n    lime: \"00ff00\",\n    limegreen: \"32cd32\",\n    linen: \"faf0e6\",\n    magenta: \"ff00ff\",\n    maroon: \"800000\",\n    mediumaquamarine: \"66cdaa\",\n    mediumblue: \"0000cd\",\n    mediumorchid: \"ba55d3\",\n    mediumpurple: \"9370d8\",\n    mediumseagreen: \"3cb371\",\n    mediumslateblue: \"7b68ee\",\n    mediumspringgreen: \"00fa9a\",\n    mediumturquoise: \"48d1cc\",\n    mediumvioletred: \"c71585\",\n    midnightblue: \"191970\",\n    mintcream: \"f5fffa\",\n    mistyrose: \"ffe4e1\",\n    moccasin: \"ffe4b5\",\n    navajowhite: \"ffdead\",\n    navy: \"000080\",\n    oldlace: \"fdf5e6\",\n    olive: \"808000\",\n    olivedrab: \"6b8e23\",\n    orange: \"ffa500\",\n    orangered: \"ff4500\",\n    orchid: \"da70d6\",\n    palegoldenrod: \"eee8aa\",\n    palegreen: \"98fb98\",\n    paleturquoise: \"afeeee\",\n    palevioletred: \"d87093\",\n    papayawhip: \"ffefd5\",\n    peachpuff: \"ffdab9\",\n    peru: \"cd853f\",\n    pink: \"ffc0cb\",\n    plum: \"dda0dd\",\n    powderblue: \"b0e0e6\",\n    purple: \"800080\",\n    red: \"ff0000\",\n    rosybrown: \"bc8f8f\",\n    royalblue: \"4169e1\",\n    saddlebrown: \"8b4513\",\n    salmon: \"fa8072\",\n    sandybrown: \"f4a460\",\n    seagreen: \"2e8b57\",\n    seashell: \"fff5ee\",\n    sienna: \"a0522d\",\n    silver: \"c0c0c0\",\n    skyblue: \"87ceeb\",\n    slateblue: \"6a5acd\",\n    slategray: \"708090\",\n    snow: \"fffafa\",\n    springgreen: \"00ff7f\",\n    steelblue: \"4682b4\",\n    tan: \"d2b48c\",\n    teal: \"008080\",\n    thistle: \"d8bfd8\",\n    tomato: \"ff6347\",\n    turquoise: \"40e0d0\",\n    violet: \"ee82ee\",\n    violetred: \"d02090\",\n    wheat: \"f5deb3\",\n    white: \"ffffff\",\n    whitesmoke: \"f5f5f5\",\n    yellow: \"ffff00\",\n    yellowgreen: \"9acd32\"\n  };\n  color_string = simple_colors[color_string] || color_string;\n\n  // array of color definition objects\n  var color_defs = [\n    {\n      re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n      example: [\"rgb(123, 234, 45)\", \"rgb(255,234,245)\"],\n      process: function(bits) {\n        return [parseInt(bits[1]), parseInt(bits[2]), parseInt(bits[3])];\n      }\n    },\n    {\n      re: /^(\\w{2})(\\w{2})(\\w{2})$/,\n      example: [\"#00ff00\", \"336699\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1], 16),\n          parseInt(bits[2], 16),\n          parseInt(bits[3], 16)\n        ];\n      }\n    },\n    {\n      re: /^(\\w{1})(\\w{1})(\\w{1})$/,\n      example: [\"#fb0\", \"f0f\"],\n      process: function(bits) {\n        return [\n          parseInt(bits[1] + bits[1], 16),\n          parseInt(bits[2] + bits[2], 16),\n          parseInt(bits[3] + bits[3], 16)\n        ];\n      }\n    }\n  ];\n\n  // search through the definitions to find a match\n  for (var i = 0; i < color_defs.length; i++) {\n    var re = color_defs[i].re;\n    var processor = color_defs[i].process;\n    var bits = re.exec(color_string);\n    if (bits) {\n      channels = processor(bits);\n      this.r = channels[0];\n      this.g = channels[1];\n      this.b = channels[2];\n      this.ok = true;\n    }\n  }\n\n  // validate/cleanup values\n  this.r = this.r < 0 || isNaN(this.r) ? 0 : this.r > 255 ? 255 : this.r;\n  this.g = this.g < 0 || isNaN(this.g) ? 0 : this.g > 255 ? 255 : this.g;\n  this.b = this.b < 0 || isNaN(this.b) ? 0 : this.b > 255 ? 255 : this.b;\n\n  // some getters\n  this.toRGB = function() {\n    return \"rgb(\" + this.r + \", \" + this.g + \", \" + this.b + \")\";\n  };\n  this.toHex = function() {\n    var r = this.r.toString(16);\n    var g = this.g.toString(16);\n    var b = this.b.toString(16);\n    if (r.length == 1) r = \"0\" + r;\n    if (g.length == 1) g = \"0\" + g;\n    if (b.length == 1) b = \"0\" + b;\n    return \"#\" + r + g + b;\n  };\n}\n\nexport { RGBColor };\n","/**\n * @license\n * Joseph Myers does not specify a particular license for his work.\n *\n * Author: Joseph Myers\n * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js\n *\n * Modified by: Owen Leong\n */\n\nfunction md5cycle(x, k) {\n  var a = x[0],\n    b = x[1],\n    c = x[2],\n    d = x[3];\n\n  a = ff(a, b, c, d, k[0], 7, -680876936);\n  d = ff(d, a, b, c, k[1], 12, -389564586);\n  c = ff(c, d, a, b, k[2], 17, 606105819);\n  b = ff(b, c, d, a, k[3], 22, -1044525330);\n  a = ff(a, b, c, d, k[4], 7, -176418897);\n  d = ff(d, a, b, c, k[5], 12, 1200080426);\n  c = ff(c, d, a, b, k[6], 17, -1473231341);\n  b = ff(b, c, d, a, k[7], 22, -45705983);\n  a = ff(a, b, c, d, k[8], 7, 1770035416);\n  d = ff(d, a, b, c, k[9], 12, -1958414417);\n  c = ff(c, d, a, b, k[10], 17, -42063);\n  b = ff(b, c, d, a, k[11], 22, -1990404162);\n  a = ff(a, b, c, d, k[12], 7, 1804603682);\n  d = ff(d, a, b, c, k[13], 12, -40341101);\n  c = ff(c, d, a, b, k[14], 17, -1502002290);\n  b = ff(b, c, d, a, k[15], 22, 1236535329);\n\n  a = gg(a, b, c, d, k[1], 5, -165796510);\n  d = gg(d, a, b, c, k[6], 9, -1069501632);\n  c = gg(c, d, a, b, k[11], 14, 643717713);\n  b = gg(b, c, d, a, k[0], 20, -373897302);\n  a = gg(a, b, c, d, k[5], 5, -701558691);\n  d = gg(d, a, b, c, k[10], 9, 38016083);\n  c = gg(c, d, a, b, k[15], 14, -660478335);\n  b = gg(b, c, d, a, k[4], 20, -405537848);\n  a = gg(a, b, c, d, k[9], 5, 568446438);\n  d = gg(d, a, b, c, k[14], 9, -1019803690);\n  c = gg(c, d, a, b, k[3], 14, -187363961);\n  b = gg(b, c, d, a, k[8], 20, 1163531501);\n  a = gg(a, b, c, d, k[13], 5, -1444681467);\n  d = gg(d, a, b, c, k[2], 9, -51403784);\n  c = gg(c, d, a, b, k[7], 14, 1735328473);\n  b = gg(b, c, d, a, k[12], 20, -1926607734);\n\n  a = hh(a, b, c, d, k[5], 4, -378558);\n  d = hh(d, a, b, c, k[8], 11, -2022574463);\n  c = hh(c, d, a, b, k[11], 16, 1839030562);\n  b = hh(b, c, d, a, k[14], 23, -35309556);\n  a = hh(a, b, c, d, k[1], 4, -1530992060);\n  d = hh(d, a, b, c, k[4], 11, 1272893353);\n  c = hh(c, d, a, b, k[7], 16, -155497632);\n  b = hh(b, c, d, a, k[10], 23, -1094730640);\n  a = hh(a, b, c, d, k[13], 4, 681279174);\n  d = hh(d, a, b, c, k[0], 11, -358537222);\n  c = hh(c, d, a, b, k[3], 16, -722521979);\n  b = hh(b, c, d, a, k[6], 23, 76029189);\n  a = hh(a, b, c, d, k[9], 4, -640364487);\n  d = hh(d, a, b, c, k[12], 11, -421815835);\n  c = hh(c, d, a, b, k[15], 16, 530742520);\n  b = hh(b, c, d, a, k[2], 23, -995338651);\n\n  a = ii(a, b, c, d, k[0], 6, -198630844);\n  d = ii(d, a, b, c, k[7], 10, 1126891415);\n  c = ii(c, d, a, b, k[14], 15, -1416354905);\n  b = ii(b, c, d, a, k[5], 21, -57434055);\n  a = ii(a, b, c, d, k[12], 6, 1700485571);\n  d = ii(d, a, b, c, k[3], 10, -1894986606);\n  c = ii(c, d, a, b, k[10], 15, -1051523);\n  b = ii(b, c, d, a, k[1], 21, -2054922799);\n  a = ii(a, b, c, d, k[8], 6, 1873313359);\n  d = ii(d, a, b, c, k[15], 10, -30611744);\n  c = ii(c, d, a, b, k[6], 15, -1560198380);\n  b = ii(b, c, d, a, k[13], 21, 1309151649);\n  a = ii(a, b, c, d, k[4], 6, -145523070);\n  d = ii(d, a, b, c, k[11], 10, -1120210379);\n  c = ii(c, d, a, b, k[2], 15, 718787259);\n  b = ii(b, c, d, a, k[9], 21, -343485551);\n\n  x[0] = add32(a, x[0]);\n  x[1] = add32(b, x[1]);\n  x[2] = add32(c, x[2]);\n  x[3] = add32(d, x[3]);\n}\n\nfunction cmn(q, a, b, x, s, t) {\n  a = add32(add32(a, q), add32(x, t));\n  return add32((a << s) | (a >>> (32 - s)), b);\n}\n\nfunction ff(a, b, c, d, x, s, t) {\n  return cmn((b & c) | (~b & d), a, b, x, s, t);\n}\n\nfunction gg(a, b, c, d, x, s, t) {\n  return cmn((b & d) | (c & ~d), a, b, x, s, t);\n}\n\nfunction hh(a, b, c, d, x, s, t) {\n  return cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction ii(a, b, c, d, x, s, t) {\n  return cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nfunction md51(s) {\n  // txt = '';\n  var n = s.length,\n    state = [1732584193, -271733879, -1732584194, 271733878],\n    i;\n  for (i = 64; i <= s.length; i += 64) {\n    md5cycle(state, md5blk(s.substring(i - 64, i)));\n  }\n  s = s.substring(i - 64);\n  var tail = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];\n  for (i = 0; i < s.length; i++)\n    tail[i >> 2] |= s.charCodeAt(i) << (i % 4 << 3);\n  tail[i >> 2] |= 0x80 << (i % 4 << 3);\n  if (i > 55) {\n    md5cycle(state, tail);\n    for (i = 0; i < 16; i++) tail[i] = 0;\n  }\n  tail[14] = n * 8;\n  md5cycle(state, tail);\n  return state;\n}\n\n/* there needs to be support for Unicode here,\n * unless we pretend that we can redefine the MD-5\n * algorithm for multi-byte characters (perhaps\n * by adding every four 16-bit characters and\n * shortening the sum to 32 bits). Otherwise\n * I suggest performing MD-5 as if every character\n * was two bytes--e.g., 0040 0025 = @%--but then\n * how will an ordinary MD-5 sum be matched?\n * There is no way to standardize text to something\n * like UTF-8 before transformation; speed cost is\n * utterly prohibitive. The JavaScript standard\n * itself needs to look at this: it should start\n * providing access to strings as preformed UTF-8\n * 8-bit unsigned value arrays.\n */\nfunction md5blk(s) {\n  /* I figured global was faster.   */\n  var md5blks = [],\n    i; /* Andy King said do it this way. */\n  for (i = 0; i < 64; i += 4) {\n    md5blks[i >> 2] =\n      s.charCodeAt(i) +\n      (s.charCodeAt(i + 1) << 8) +\n      (s.charCodeAt(i + 2) << 16) +\n      (s.charCodeAt(i + 3) << 24);\n  }\n  return md5blks;\n}\n\nvar hex_chr = \"0123456789abcdef\".split(\"\");\n\nfunction rhex(n) {\n  var s = \"\",\n    j = 0;\n  for (; j < 4; j++)\n    s += hex_chr[(n >> (j * 8 + 4)) & 0x0f] + hex_chr[(n >> (j * 8)) & 0x0f];\n  return s;\n}\n\nfunction hex(x) {\n  for (var i = 0; i < x.length; i++) x[i] = rhex(x[i]);\n  return x.join(\"\");\n}\n\n// Converts a 4-byte number to byte string\nfunction singleToByteString(n) {\n  return String.fromCharCode(\n    (n & 0xff) >> 0,\n    (n & 0xff00) >> 8,\n    (n & 0xff0000) >> 16,\n    (n & 0xff000000) >> 24\n  );\n}\n\n// Converts an array of numbers to a byte string\nfunction toByteString(x) {\n  return x.map(singleToByteString).join(\"\");\n}\n\n// Returns the MD5 hash as a byte string\nfunction md5Bin(s) {\n  return toByteString(md51(s));\n}\n\n// Returns MD5 hash as a hex string\nfunction md5(s) {\n  return hex(md51(s));\n}\n\nvar md5Check = md5(\"hello\") != \"5d41402abc4b2a76b9719d911017c592\";\n\nfunction add32(a, b) {\n  if (md5Check) {\n    /* if the md5Check does not match\n     the expected value, we're dealing\n     with an old browser and need\n     this function. */\n    var lsw = (a & 0xffff) + (b & 0xffff),\n      msw = (a >> 16) + (b >> 16) + (lsw >> 16);\n    return (msw << 16) | (lsw & 0xffff);\n  } else {\n    /* this function is much faster,\n    so if possible we use it. Some IEs\n    are the only ones I know of that\n    need the idiotic second function,\n    generated by an if clause.  */\n    return (a + b) & 0xffffffff;\n  }\n}\n\nexport { md5, md5Bin };\n","/**\r\n * @license\r\n * FPDF is released under a permissive license: there is no usage restriction.\r\n * You may embed it freely in your application (commercial or not), with or\r\n * without modifications.\r\n *\r\n * Reference: http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nfunction repeat(str, num) {\r\n  return new Array(num + 1).join(str);\r\n}\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name rc4\r\n * @function\r\n * @param {string} key Byte string of encryption key\r\n * @param {string} data Byte string of data to be encrypted\r\n * @returns {string} Encrypted string\r\n */\r\nfunction rc4(key, data) {\r\n  var lastKey, lastState;\r\n  if (key !== lastKey) {\r\n    var k = repeat(key, ((256 / key.length) >> 0) + 1);\r\n    var state = [];\r\n    for (var i = 0; i < 256; i++) {\r\n      state[i] = i;\r\n    }\r\n    var j = 0;\r\n    for (var i = 0; i < 256; i++) {\r\n      var t = state[i];\r\n      j = (j + t + k.charCodeAt(i)) % 256;\r\n      state[i] = state[j];\r\n      state[j] = t;\r\n    }\r\n    lastKey = key;\r\n    lastState = state;\r\n  } else {\r\n    state = lastState;\r\n  }\r\n  var length = data.length;\r\n  var a = 0;\r\n  var b = 0;\r\n  var out = \"\";\r\n  for (var i = 0; i < length; i++) {\r\n    a = (a + 1) % 256;\r\n    t = state[a];\r\n    b = (b + t) % 256;\r\n    state[a] = state[b];\r\n    state[b] = t;\r\n    k = state[(state[a] + state[b]) % 256];\r\n    out += String.fromCharCode(data.charCodeAt(i) ^ k);\r\n  }\r\n  return out;\r\n}\r\n\r\nexport { rc4 };\r\n","/**\r\n * @license\r\n * Licensed under the MIT License.\r\n * http://opensource.org/licenses/mit-license\r\n * Author: Owen Leong (@owenl131)\r\n * Date: 15 Oct 2020\r\n * References:\r\n * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt\r\n * https://github.com/foliojs/pdfkit/blob/master/lib/security.js\r\n * http://www.fpdf.org/en/script/script37.php\r\n */\r\n\r\nimport { md5Bin } from \"./md5.js\";\r\nimport { rc4 } from \"./rc4.js\";\r\n\r\nvar permissionOptions = {\r\n  print: 4,\r\n  modify: 8,\r\n  copy: 16,\r\n  \"annot-forms\": 32\r\n};\r\n\r\n/**\r\n * Initializes encryption settings\r\n *\r\n * @name constructor\r\n * @function\r\n * @param {Array} permissions Permissions allowed for user, \"print\", \"modify\", \"copy\" and \"annot-forms\".\r\n * @param {String} userPassword Permissions apply to this user. Leaving this empty means the document\r\n *                              is not password protected but viewer has the above permissions.\r\n * @param {String} ownerPassword Owner has full functionalities to the file.\r\n * @param {String} fileId As hex string, should be same as the file ID in the trailer.\r\n * @example\r\n * var security = new PDFSecurity([\"print\"])\r\n */\r\nfunction PDFSecurity(permissions, userPassword, ownerPassword, fileId) {\r\n  this.v = 1; // algorithm 1, future work can add in more recent encryption schemes\r\n  this.r = 2; // revision 2\r\n\r\n  // set flags for what functionalities the user can access\r\n  let protection = 192;\r\n  permissions.forEach(function(perm) {\r\n    if (typeof permissionOptions.perm !== \"undefined\") {\r\n      throw new Error(\"Invalid permission: \" + perm);\r\n    }\r\n    protection += permissionOptions[perm];\r\n  });\r\n\r\n  // padding is used to pad the passwords to 32 bytes, also is hashed and stored in the final PDF\r\n  this.padding =\r\n    \"\\x28\\xBF\\x4E\\x5E\\x4E\\x75\\x8A\\x41\\x64\\x00\\x4E\\x56\\xFF\\xFA\\x01\\x08\" +\r\n    \"\\x2E\\x2E\\x00\\xB6\\xD0\\x68\\x3E\\x80\\x2F\\x0C\\xA9\\xFE\\x64\\x53\\x69\\x7A\";\r\n  let paddedUserPassword = (userPassword + this.padding).substr(0, 32);\r\n  let paddedOwnerPassword = (ownerPassword + this.padding).substr(0, 32);\r\n\r\n  this.O = this.processOwnerPassword(paddedUserPassword, paddedOwnerPassword);\r\n  this.P = -((protection ^ 255) + 1);\r\n  this.encryptionKey = md5Bin(\r\n    paddedUserPassword +\r\n      this.O +\r\n      this.lsbFirstWord(this.P) +\r\n      this.hexToBytes(fileId)\r\n  ).substr(0, 5);\r\n  this.U = rc4(this.encryptionKey, this.padding);\r\n}\r\n\r\n/**\r\n * Breaks down a 4-byte number into its individual bytes, with the least significant bit first\r\n *\r\n * @name lsbFirstWord\r\n * @function\r\n * @param {number} data 32-bit number\r\n * @returns {Array}\r\n */\r\nPDFSecurity.prototype.lsbFirstWord = function(data) {\r\n  return String.fromCharCode(\r\n    (data >> 0) & 0xff,\r\n    (data >> 8) & 0xff,\r\n    (data >> 16) & 0xff,\r\n    (data >> 24) & 0xff\r\n  );\r\n};\r\n\r\n/**\r\n * Converts a byte string to a hex string\r\n *\r\n * @name toHexString\r\n * @function\r\n * @param {String} byteString Byte string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.toHexString = function(byteString) {\r\n  return byteString\r\n    .split(\"\")\r\n    .map(function(byte) {\r\n      return (\"0\" + (byte.charCodeAt(0) & 0xff).toString(16)).slice(-2);\r\n    })\r\n    .join(\"\");\r\n};\r\n\r\n/**\r\n * Converts a hex string to a byte string\r\n *\r\n * @name hexToBytes\r\n * @function\r\n * @param {String} hex Hex string\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.hexToBytes = function(hex) {\r\n  for (var bytes = [], c = 0; c < hex.length; c += 2)\r\n    bytes.push(String.fromCharCode(parseInt(hex.substr(c, 2), 16)));\r\n  return bytes.join(\"\");\r\n};\r\n\r\n/**\r\n * Computes the 'O' field in the encryption dictionary\r\n *\r\n * @name processOwnerPassword\r\n * @function\r\n * @param {String} paddedUserPassword Byte string of padded user password\r\n * @param {String} paddedOwnerPassword Byte string of padded owner password\r\n * @returns {String}\r\n */\r\nPDFSecurity.prototype.processOwnerPassword = function(\r\n  paddedUserPassword,\r\n  paddedOwnerPassword\r\n) {\r\n  let key = md5Bin(paddedOwnerPassword).substr(0, 5);\r\n  return rc4(key, paddedUserPassword);\r\n};\r\n\r\n/**\r\n * Returns an encryptor function which can take in a byte string and returns the encrypted version\r\n *\r\n * @name encryptor\r\n * @function\r\n * @param {number} objectId\r\n * @param {number} generation Not sure what this is for, you can set it to 0\r\n * @returns {Function}\r\n * @example\r\n * out(\"stream\");\r\n * encryptor = security.encryptor(object.id, 0);\r\n * out(encryptor(data));\r\n * out(\"endstream\");\r\n */\r\nPDFSecurity.prototype.encryptor = function(objectId, generation) {\r\n  let key = md5Bin(\r\n    this.encryptionKey +\r\n      String.fromCharCode(\r\n        objectId & 0xff,\r\n        (objectId >> 8) & 0xff,\r\n        (objectId >> 16) & 0xff,\r\n        generation & 0xff,\r\n        (generation >> 8) & 0xff\r\n      )\r\n  ).substr(0, 10);\r\n  return function(data) {\r\n    return rc4(key, data);\r\n  };\r\n};\r\n\r\nexport { PDFSecurity };\r\n","/**\n * Convert string to `PDF Name Object`.\n * Detail: PDF Reference 1.3 - Chapter 3.2.4 Name Object\n * @param str\n */\nfunction toPDFName(str) {\n  // eslint-disable-next-line no-control-regex\n  if (/[^\\u0000-\\u00ff]/.test(str)) {\n    // non ascii string\n    throw new Error(\n      \"Invalid PDF Name Object: \" + str + \", Only accept ASCII characters.\"\n    );\n  }\n  var result = \"\",\n    strLength = str.length;\n  for (var i = 0; i < strLength; i++) {\n    var charCode = str.charCodeAt(i);\n    if (\n      charCode < 0x21 ||\n      charCode === 0x23 /* # */ ||\n      charCode === 0x25 /* % */ ||\n      charCode === 0x28 /* ( */ ||\n      charCode === 0x29 /* ) */ ||\n      charCode === 0x2f /* / */ ||\n      charCode === 0x3c /* < */ ||\n      charCode === 0x3e /* > */ ||\n      charCode === 0x5b /* [ */ ||\n      charCode === 0x5d /* ] */ ||\n      charCode === 0x7b /* { */ ||\n      charCode === 0x7d /* } */ ||\n      charCode > 0x7e\n    ) {\n      // Char    CharCode    hexStr   paddingHexStr    Result\n      // \"\\t\"    9           9        09               #09\n      // \" \"     32          20       20               #20\n      // \"©\"     169         a9       a9               #a9\n      var hexStr = charCode.toString(16),\n        paddingHexStr = (\"0\" + hexStr).slice(-2);\n\n      result += \"#\" + paddingHexStr;\n    } else {\n      // Other ASCII printable characters between 0x21 <= X <= 0x7e\n      result += str[i];\n    }\n  }\n  return result;\n}\n\nexport { toPDFName };\n","/* eslint-disable no-console */\r\n\r\nimport { saveAs } from \"./libs/FileSaver.js\";\r\nimport { globalObject } from \"./libs/globalObject.js\";\r\nimport { RGBColor } from \"./libs/rgbcolor.js\";\r\nimport { btoa } from \"./libs/AtobBtoa.js\";\r\nimport { console } from \"./libs/console.js\";\r\nimport { PDFSecurity } from \"./libs/pdfsecurity.js\";\r\nimport { toPDFName } from \"./libs/pdfname.js\";\r\n/**\r\n * jsPDF's Internal PubSub Implementation.\r\n * Backward compatible rewritten on 2014 by\r\n * Diego Casorran, https://github.com/diegocr\r\n *\r\n * @class\r\n * @name PubSub\r\n * @ignore\r\n */\r\nfunction PubSub(context) {\r\n  if (typeof context !== \"object\") {\r\n    throw new Error(\r\n      \"Invalid Context passed to initialize PubSub (jsPDF-module)\"\r\n    );\r\n  }\r\n  var topics = {};\r\n\r\n  this.subscribe = function(topic, callback, once) {\r\n    once = once || false;\r\n    if (\r\n      typeof topic !== \"string\" ||\r\n      typeof callback !== \"function\" ||\r\n      typeof once !== \"boolean\"\r\n    ) {\r\n      throw new Error(\r\n        \"Invalid arguments passed to PubSub.subscribe (jsPDF-module)\"\r\n      );\r\n    }\r\n\r\n    if (!topics.hasOwnProperty(topic)) {\r\n      topics[topic] = {};\r\n    }\r\n\r\n    var token = Math.random().toString(35);\r\n    topics[topic][token] = [callback, !!once];\r\n\r\n    return token;\r\n  };\r\n\r\n  this.unsubscribe = function(token) {\r\n    for (var topic in topics) {\r\n      if (topics[topic][token]) {\r\n        delete topics[topic][token];\r\n        if (Object.keys(topics[topic]).length === 0) {\r\n          delete topics[topic];\r\n        }\r\n        return true;\r\n      }\r\n    }\r\n    return false;\r\n  };\r\n\r\n  this.publish = function(topic) {\r\n    if (topics.hasOwnProperty(topic)) {\r\n      var args = Array.prototype.slice.call(arguments, 1),\r\n        tokens = [];\r\n\r\n      for (var token in topics[topic]) {\r\n        var sub = topics[topic][token];\r\n        try {\r\n          sub[0].apply(context, args);\r\n        } catch (ex) {\r\n          if (globalObject.console) {\r\n            console.error(\"jsPDF PubSub Error\", ex.message, ex);\r\n          }\r\n        }\r\n        if (sub[1]) tokens.push(token);\r\n      }\r\n      if (tokens.length) tokens.forEach(this.unsubscribe);\r\n    }\r\n  };\r\n\r\n  this.getTopics = function() {\r\n    return topics;\r\n  };\r\n}\r\n\r\nfunction GState(parameters) {\r\n  if (!(this instanceof GState)) {\r\n    return new GState(parameters);\r\n  }\r\n\r\n  /**\r\n   * @name GState#opacity\r\n   * @type {any}\r\n   */\r\n  /**\r\n   * @name GState#stroke-opacity\r\n   * @type {any}\r\n   */\r\n  var supported = \"opacity,stroke-opacity\".split(\",\");\r\n  for (var p in parameters) {\r\n    if (parameters.hasOwnProperty(p) && supported.indexOf(p) >= 0) {\r\n      this[p] = parameters[p];\r\n    }\r\n  }\r\n  /**\r\n   * @name GState#id\r\n   * @type {string}\r\n   */\r\n  this.id = \"\"; // set by addGState()\r\n  /**\r\n   * @name GState#objectNumber\r\n   * @type {number}\r\n   */\r\n  this.objectNumber = -1; // will be set by putGState()\r\n}\r\n\r\nGState.prototype.equals = function equals(other) {\r\n  var ignore = \"id,objectNumber,equals\";\r\n  var p;\r\n  if (!other || typeof other !== typeof this) return false;\r\n  var count = 0;\r\n  for (p in this) {\r\n    if (ignore.indexOf(p) >= 0) continue;\r\n    if (this.hasOwnProperty(p) && !other.hasOwnProperty(p)) return false;\r\n    if (this[p] !== other[p]) return false;\r\n    count++;\r\n  }\r\n  for (p in other) {\r\n    if (other.hasOwnProperty(p) && ignore.indexOf(p) < 0) count--;\r\n  }\r\n  return count === 0;\r\n};\r\n\r\nfunction Pattern(gState, matrix) {\r\n  this.gState = gState;\r\n  this.matrix = matrix;\r\n\r\n  this.id = \"\"; // set by addPattern()\r\n  this.objectNumber = -1; // will be set by putPattern()\r\n}\r\n\r\nfunction ShadingPattern(type, coords, colors, gState, matrix) {\r\n  if (!(this instanceof ShadingPattern)) {\r\n    return new ShadingPattern(type, coords, colors, gState, matrix);\r\n  }\r\n\r\n  // see putPattern() for information how they are realized\r\n  this.type = type === \"axial\" ? 2 : 3;\r\n  this.coords = coords;\r\n  this.colors = colors;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\nfunction TilingPattern(boundingBox, xStep, yStep, gState, matrix) {\r\n  if (!(this instanceof TilingPattern)) {\r\n    return new TilingPattern(boundingBox, xStep, yStep, gState, matrix);\r\n  }\r\n\r\n  this.boundingBox = boundingBox;\r\n  this.xStep = xStep;\r\n  this.yStep = yStep;\r\n\r\n  this.stream = \"\"; // set by endTilingPattern();\r\n\r\n  this.cloneIndex = 0;\r\n\r\n  Pattern.call(this, gState, matrix);\r\n}\r\n\r\n/**\r\n * Creates new jsPDF document object instance.\r\n * @name jsPDF\r\n * @class\r\n * @param {Object} [options] - Collection of settings initializing the jsPDF-instance\r\n * @param {string} [options.orientation=portrait] - Orientation of the first page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" or \"l\").<br />\r\n * @param {string} [options.unit=mm] Measurement unit (base unit) to be used when coordinates are specified.<br />\r\n * Possible values are \"pt\" (points), \"mm\", \"cm\", \"in\", \"px\", \"pc\", \"em\" or \"ex\". Note that in order to get the correct scaling for \"px\"\r\n * units, you need to enable the hotfix \"px_scaling\" by setting options.hotfixes = [\"px_scaling\"].\r\n * @param {string/Array} [options.format=a4] The format of the first page. Can be:<ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n * @param {boolean} [options.putOnlyUsedFonts=false] Only put fonts into the PDF, which were used.\r\n * @param {boolean} [options.compress=false] Compress the generated PDF.\r\n * @param {number} [options.precision=16] Precision of the element-positions.\r\n * @param {number} [options.userUnit=1.0] Not to be confused with the base unit. Please inform yourself before you use it.\r\n * @param {string[]} [options.hotfixes] An array of strings to enable hotfixes such as correct pixel scaling.\r\n * @param {Object} [options.encryption]\r\n * @param {string} [options.encryption.userPassword] Password for the user bound by the given permissions list.\r\n * @param {string} [options.encryption.ownerPassword] Both userPassword and ownerPassword should be set for proper authentication.\r\n * @param {string[]} [options.encryption.userPermissions] Array of permissions \"print\", \"modify\", \"copy\", \"annot-forms\", accessible by the user.\r\n * @param {number|\"smart\"} [options.floatPrecision=16]\r\n * @returns {jsPDF} jsPDF-instance\r\n * @description\r\n * ```\r\n * {\r\n *  orientation: 'p',\r\n *  unit: 'mm',\r\n *  format: 'a4',\r\n *  putOnlyUsedFonts:true,\r\n *  floatPrecision: 16 // or \"smart\", default is 16\r\n * }\r\n * ```\r\n *\r\n * @constructor\r\n */\r\nfunction jsPDF(options) {\r\n  var orientation = typeof arguments[0] === \"string\" ? arguments[0] : \"p\";\r\n  var unit = arguments[1];\r\n  var format = arguments[2];\r\n  var compressPdf = arguments[3];\r\n  var filters = [];\r\n  var userUnit = 1.0;\r\n  var precision;\r\n  var floatPrecision = 16;\r\n  var defaultPathOperation = \"S\";\r\n  var encryptionOptions = null;\r\n\r\n  options = options || {};\r\n\r\n  if (typeof options === \"object\") {\r\n    orientation = options.orientation;\r\n    unit = options.unit || unit;\r\n    format = options.format || format;\r\n    compressPdf = options.compress || options.compressPdf || compressPdf;\r\n    encryptionOptions = options.encryption || null;\r\n    if (encryptionOptions !== null) {\r\n      encryptionOptions.userPassword = encryptionOptions.userPassword || \"\";\r\n      encryptionOptions.ownerPassword = encryptionOptions.ownerPassword || \"\";\r\n      encryptionOptions.userPermissions =\r\n        encryptionOptions.userPermissions || [];\r\n    }\r\n    userUnit =\r\n      typeof options.userUnit === \"number\" ? Math.abs(options.userUnit) : 1.0;\r\n    if (typeof options.precision !== \"undefined\") {\r\n      precision = options.precision;\r\n    }\r\n    if (typeof options.floatPrecision !== \"undefined\") {\r\n      floatPrecision = options.floatPrecision;\r\n    }\r\n    defaultPathOperation = options.defaultPathOperation || \"S\";\r\n  }\r\n\r\n  filters =\r\n    options.filters || (compressPdf === true ? [\"FlateEncode\"] : filters);\r\n\r\n  unit = unit || \"mm\";\r\n  orientation = (\"\" + (orientation || \"P\")).toLowerCase();\r\n  var putOnlyUsedFonts = options.putOnlyUsedFonts || false;\r\n  var usedFonts = {};\r\n\r\n  var API = {\r\n    internal: {},\r\n    __private__: {}\r\n  };\r\n\r\n  API.__private__.PubSub = PubSub;\r\n\r\n  var pdfVersion = \"1.3\";\r\n  var getPdfVersion = (API.__private__.getPdfVersion = function() {\r\n    return pdfVersion;\r\n  });\r\n\r\n  API.__private__.setPdfVersion = function(value) {\r\n    pdfVersion = value;\r\n  };\r\n\r\n  // Size in pt of various paper formats\r\n  var pageFormats = {\r\n    a0: [2383.94, 3370.39],\r\n    a1: [1683.78, 2383.94],\r\n    a2: [1190.55, 1683.78],\r\n    a3: [841.89, 1190.55],\r\n    a4: [595.28, 841.89],\r\n    a5: [419.53, 595.28],\r\n    a6: [297.64, 419.53],\r\n    a7: [209.76, 297.64],\r\n    a8: [147.4, 209.76],\r\n    a9: [104.88, 147.4],\r\n    a10: [73.7, 104.88],\r\n    b0: [2834.65, 4008.19],\r\n    b1: [2004.09, 2834.65],\r\n    b2: [1417.32, 2004.09],\r\n    b3: [1000.63, 1417.32],\r\n    b4: [708.66, 1000.63],\r\n    b5: [498.9, 708.66],\r\n    b6: [354.33, 498.9],\r\n    b7: [249.45, 354.33],\r\n    b8: [175.75, 249.45],\r\n    b9: [124.72, 175.75],\r\n    b10: [87.87, 124.72],\r\n    c0: [2599.37, 3676.54],\r\n    c1: [1836.85, 2599.37],\r\n    c2: [1298.27, 1836.85],\r\n    c3: [918.43, 1298.27],\r\n    c4: [649.13, 918.43],\r\n    c5: [459.21, 649.13],\r\n    c6: [323.15, 459.21],\r\n    c7: [229.61, 323.15],\r\n    c8: [161.57, 229.61],\r\n    c9: [113.39, 161.57],\r\n    c10: [79.37, 113.39],\r\n    dl: [311.81, 623.62],\r\n    letter: [612, 792],\r\n    \"government-letter\": [576, 756],\r\n    legal: [612, 1008],\r\n    \"junior-legal\": [576, 360],\r\n    ledger: [1224, 792],\r\n    tabloid: [792, 1224],\r\n    \"credit-card\": [153, 243]\r\n  };\r\n\r\n  API.__private__.getPageFormats = function() {\r\n    return pageFormats;\r\n  };\r\n\r\n  var getPageFormat = (API.__private__.getPageFormat = function(value) {\r\n    return pageFormats[value];\r\n  });\r\n\r\n  format = format || \"a4\";\r\n\r\n  var ApiMode = {\r\n    COMPAT: \"compat\",\r\n    ADVANCED: \"advanced\"\r\n  };\r\n  var apiMode = ApiMode.COMPAT;\r\n\r\n  function advancedAPI() {\r\n    // prepend global change of basis matrix\r\n    // (Now, instead of converting every coordinate to the pdf coordinate system, we apply a matrix\r\n    // that does this job for us (however, texts, images and similar objects must be drawn bottom up))\r\n    this.saveGraphicsState();\r\n    out(\r\n      new Matrix(\r\n        scaleFactor,\r\n        0,\r\n        0,\r\n        -scaleFactor,\r\n        0,\r\n        getPageHeight() * scaleFactor\r\n      ).toString() + \" cm\"\r\n    );\r\n    this.setFontSize(this.getFontSize() / scaleFactor);\r\n\r\n    // The default in MrRio's implementation is \"S\" (stroke), whereas the default in the yWorks implementation\r\n    // was \"n\" (none). Although this has nothing to do with transforms, we should use the API switch here.\r\n    defaultPathOperation = \"n\";\r\n\r\n    apiMode = ApiMode.ADVANCED;\r\n  }\r\n\r\n  function compatAPI() {\r\n    this.restoreGraphicsState();\r\n    defaultPathOperation = \"S\";\r\n    apiMode = ApiMode.COMPAT;\r\n  }\r\n\r\n  /**\r\n   * @function combineFontStyleAndFontWeight\r\n   * @param {string} fontStyle Fontstyle or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @returns {string}\r\n   * @private\r\n   */\r\n  var combineFontStyleAndFontWeight = (API.__private__.combineFontStyleAndFontWeight = function(\r\n    fontStyle,\r\n    fontWeight\r\n  ) {\r\n    if (\r\n      (fontStyle == \"bold\" && fontWeight == \"normal\") ||\r\n      (fontStyle == \"bold\" && fontWeight == 400) ||\r\n      (fontStyle == \"normal\" && fontWeight == \"italic\") ||\r\n      (fontStyle == \"bold\" && fontWeight == \"italic\")\r\n    ) {\r\n      throw new Error(\"Invalid Combination of fontweight and fontstyle\");\r\n    }\r\n    if (fontWeight) {\r\n      fontStyle =\r\n        fontWeight == 400 || fontWeight === \"normal\"\r\n          ? fontStyle === \"italic\"\r\n            ? \"italic\"\r\n            : \"normal\"\r\n          : (fontWeight == 700 || fontWeight === \"bold\") &&\r\n            fontStyle === \"normal\"\r\n          ? \"bold\"\r\n          : (fontWeight == 700 ? \"bold\" : fontWeight) + \"\" + fontStyle;\r\n    }\r\n    return fontStyle;\r\n  });\r\n\r\n  /**\r\n   * @callback ApiSwitchBody\r\n   * @param {jsPDF} pdf\r\n   */\r\n\r\n  /**\r\n   * For compatibility reasons jsPDF offers two API modes which differ in the way they convert between the the usual\r\n   * screen coordinates and the PDF coordinate system.\r\n   *   - \"compat\": Offers full compatibility across all plugins but does not allow arbitrary transforms\r\n   *   - \"advanced\": Allows arbitrary transforms and more advanced features like pattern fills. Some plugins might\r\n   *     not support this mode, though.\r\n   * Initial mode is \"compat\".\r\n   *\r\n   * You can either provide a callback to the body argument, which means that jsPDF will automatically switch back to\r\n   * the original API mode afterwards; or you can omit the callback and switch back manually using {@link compatAPI}.\r\n   *\r\n   * Note, that the calls to {@link saveGraphicsState} and {@link restoreGraphicsState} need to be balanced within the\r\n   * callback or between calls of this method and its counterpart {@link compatAPI}. Calls to {@link beginFormObject}\r\n   * or {@link beginTilingPattern} need to be closed by their counterparts before switching back to \"compat\" API mode.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name advancedAPI\r\n   */\r\n  API.advancedAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.COMPAT;\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Switches to \"compat\" API mode. See {@link advancedAPI} for more details.\r\n   *\r\n   * @param {ApiSwitchBody=} body When provided, this callback will be called after the API mode has been switched.\r\n   * The API mode will be switched back automatically afterwards.\r\n   * @return {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name compatApi\r\n   */\r\n  API.compatAPI = function(body) {\r\n    var doSwitch = apiMode === ApiMode.ADVANCED;\r\n\r\n    if (doSwitch) {\r\n      compatAPI.call(this);\r\n    }\r\n\r\n    if (typeof body !== \"function\") {\r\n      return this;\r\n    }\r\n\r\n    body(this);\r\n\r\n    if (doSwitch) {\r\n      advancedAPI.call(this);\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @return {boolean} True iff the current API mode is \"advanced\". See {@link advancedAPI}.\r\n   * @memberof jsPDF#\r\n   * @name isAdvancedAPI\r\n   */\r\n  API.isAdvancedAPI = function() {\r\n    return apiMode === ApiMode.ADVANCED;\r\n  };\r\n\r\n  var advancedApiModeTrap = function(methodName) {\r\n    if (apiMode !== ApiMode.ADVANCED) {\r\n      throw new Error(\r\n        methodName +\r\n          \" is only available in 'advanced' API mode. \" +\r\n          \"You need to call advancedAPI() first.\"\r\n      );\r\n    }\r\n  };\r\n\r\n  var roundToPrecision = (API.roundToPrecision = API.__private__.roundToPrecision = function(\r\n    number,\r\n    parmPrecision\r\n  ) {\r\n    var tmpPrecision = precision || parmPrecision;\r\n    if (isNaN(number) || isNaN(tmpPrecision)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.roundToPrecision\");\r\n    }\r\n    return number.toFixed(tmpPrecision).replace(/0+$/, \"\");\r\n  });\r\n\r\n  // high precision float\r\n  var hpf;\r\n  if (typeof floatPrecision === \"number\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, floatPrecision);\r\n    };\r\n  } else if (floatPrecision === \"smart\") {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      if (number > -1 && number < 1) {\r\n        return roundToPrecision(number, 16);\r\n      } else {\r\n        return roundToPrecision(number, 5);\r\n      }\r\n    };\r\n  } else {\r\n    hpf = API.hpf = API.__private__.hpf = function(number) {\r\n      if (isNaN(number)) {\r\n        throw new Error(\"Invalid argument passed to jsPDF.hpf\");\r\n      }\r\n      return roundToPrecision(number, 16);\r\n    };\r\n  }\r\n  var f2 = (API.f2 = API.__private__.f2 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f2\");\r\n    }\r\n    return roundToPrecision(number, 2);\r\n  });\r\n\r\n  var f3 = (API.__private__.f3 = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.f3\");\r\n    }\r\n    return roundToPrecision(number, 3);\r\n  });\r\n\r\n  var scale = (API.scale = API.__private__.scale = function(number) {\r\n    if (isNaN(number)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.scale\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return number * scaleFactor;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return number;\r\n    }\r\n  });\r\n\r\n  var transformY = function(y) {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return getPageHeight() - y;\r\n    } else if (apiMode === ApiMode.ADVANCED) {\r\n      return y;\r\n    }\r\n  };\r\n\r\n  var transformScaleY = function(y) {\r\n    return scale(transformY(y));\r\n  };\r\n\r\n  /**\r\n   * @name setPrecision\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} precision\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setPrecision = API.setPrecision = function(value) {\r\n    if (typeof parseInt(value, 10) === \"number\") {\r\n      precision = parseInt(value, 10);\r\n    }\r\n  };\r\n\r\n  var fileId = \"00000000000000000000000000000000\";\r\n\r\n  var getFileId = (API.__private__.getFileId = function() {\r\n    return fileId;\r\n  });\r\n\r\n  var setFileId = (API.__private__.setFileId = function(value) {\r\n    if (typeof value !== \"undefined\" && /^[a-fA-F0-9]{32}$/.test(value)) {\r\n      fileId = value.toUpperCase();\r\n    } else {\r\n      fileId = fileId\r\n        .split(\"\")\r\n        .map(function() {\r\n          return \"ABCDEF0123456789\".charAt(Math.floor(Math.random() * 16));\r\n        })\r\n        .join(\"\");\r\n    }\r\n\r\n    if (encryptionOptions !== null) {\r\n      encryption = new PDFSecurity(\r\n        encryptionOptions.userPermissions,\r\n        encryptionOptions.userPassword,\r\n        encryptionOptions.ownerPassword,\r\n        fileId\r\n      );\r\n    }\r\n    return fileId;\r\n  });\r\n\r\n  /**\r\n   * @name setFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {string} value GUID.\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setFileId = function(value) {\r\n    setFileId(value);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getFileId\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   *\r\n   * @returns {string} GUID.\r\n   */\r\n  API.getFileId = function() {\r\n    return getFileId();\r\n  };\r\n\r\n  var creationDate;\r\n\r\n  var convertDateToPDFDate = (API.__private__.convertDateToPDFDate = function(\r\n    parmDate\r\n  ) {\r\n    var result = \"\";\r\n    var tzoffset = parmDate.getTimezoneOffset(),\r\n      tzsign = tzoffset < 0 ? \"+\" : \"-\",\r\n      tzhour = Math.floor(Math.abs(tzoffset / 60)),\r\n      tzmin = Math.abs(tzoffset % 60),\r\n      timeZoneString = [tzsign, padd2(tzhour), \"'\", padd2(tzmin), \"'\"].join(\"\");\r\n\r\n    result = [\r\n      \"D:\",\r\n      parmDate.getFullYear(),\r\n      padd2(parmDate.getMonth() + 1),\r\n      padd2(parmDate.getDate()),\r\n      padd2(parmDate.getHours()),\r\n      padd2(parmDate.getMinutes()),\r\n      padd2(parmDate.getSeconds()),\r\n      timeZoneString\r\n    ].join(\"\");\r\n    return result;\r\n  });\r\n\r\n  var convertPDFDateToDate = (API.__private__.convertPDFDateToDate = function(\r\n    parmPDFDate\r\n  ) {\r\n    var year = parseInt(parmPDFDate.substr(2, 4), 10);\r\n    var month = parseInt(parmPDFDate.substr(6, 2), 10) - 1;\r\n    var date = parseInt(parmPDFDate.substr(8, 2), 10);\r\n    var hour = parseInt(parmPDFDate.substr(10, 2), 10);\r\n    var minutes = parseInt(parmPDFDate.substr(12, 2), 10);\r\n    var seconds = parseInt(parmPDFDate.substr(14, 2), 10);\r\n    // var timeZoneHour = parseInt(parmPDFDate.substr(16, 2), 10);\r\n    // var timeZoneMinutes = parseInt(parmPDFDate.substr(20, 2), 10);\r\n\r\n    var resultingDate = new Date(year, month, date, hour, minutes, seconds, 0);\r\n    return resultingDate;\r\n  });\r\n\r\n  var setCreationDate = (API.__private__.setCreationDate = function(date) {\r\n    var tmpCreationDateString;\r\n    var regexPDFCreationDate = /^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])'?$/;\r\n    if (typeof date === \"undefined\") {\r\n      date = new Date();\r\n    }\r\n\r\n    if (date instanceof Date) {\r\n      tmpCreationDateString = convertDateToPDFDate(date);\r\n    } else if (regexPDFCreationDate.test(date)) {\r\n      tmpCreationDateString = date;\r\n    } else {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCreationDate\");\r\n    }\r\n    creationDate = tmpCreationDateString;\r\n    return creationDate;\r\n  });\r\n\r\n  var getCreationDate = (API.__private__.getCreationDate = function(type) {\r\n    var result = creationDate;\r\n    if (type === \"jsDate\") {\r\n      result = convertPDFDateToDate(creationDate);\r\n    }\r\n    return result;\r\n  });\r\n\r\n  /**\r\n   * @name setCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} date\r\n   * @returns {jsPDF}\r\n   */\r\n  API.setCreationDate = function(date) {\r\n    setCreationDate(date);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name getCreationDate\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {Object} type\r\n   * @returns {Object}\r\n   */\r\n  API.getCreationDate = function(type) {\r\n    return getCreationDate(type);\r\n  };\r\n\r\n  var padd2 = (API.__private__.padd2 = function(number) {\r\n    return (\"0\" + parseInt(number)).slice(-2);\r\n  });\r\n\r\n  var padd2Hex = (API.__private__.padd2Hex = function(hexString) {\r\n    hexString = hexString.toString();\r\n    return (\"00\" + hexString).substr(hexString.length);\r\n  });\r\n\r\n  var objectNumber = 0; // 'n' Current object number\r\n  var offsets = []; // List of offsets. Activated and reset by buildDocument(). Pupulated by various calls buildDocument makes.\r\n  var content = [];\r\n  var contentLength = 0;\r\n  var additionalObjects = [];\r\n\r\n  var pages = [];\r\n  var currentPage;\r\n  var hasCustomDestination = false;\r\n  var outputDestination = content;\r\n\r\n  var resetDocument = function() {\r\n    //reset fields relevant for objectNumber generation and xref.\r\n    objectNumber = 0;\r\n    contentLength = 0;\r\n    content = [];\r\n    offsets = [];\r\n    additionalObjects = [];\r\n\r\n    rootDictionaryObjId = newObjectDeferred();\r\n    resourceDictionaryObjId = newObjectDeferred();\r\n  };\r\n\r\n  API.__private__.setCustomOutputDestination = function(destination) {\r\n    hasCustomDestination = true;\r\n    outputDestination = destination;\r\n  };\r\n  var setOutputDestination = function(destination) {\r\n    if (!hasCustomDestination) {\r\n      outputDestination = destination;\r\n    }\r\n  };\r\n\r\n  API.__private__.resetCustomOutputDestination = function() {\r\n    hasCustomDestination = false;\r\n    outputDestination = content;\r\n  };\r\n\r\n  var out = (API.__private__.out = function(string) {\r\n    string = string.toString();\r\n    contentLength += string.length + 1;\r\n    outputDestination.push(string);\r\n\r\n    return outputDestination;\r\n  });\r\n\r\n  var write = (API.__private__.write = function(value) {\r\n    return out(\r\n      arguments.length === 1\r\n        ? value.toString()\r\n        : Array.prototype.join.call(arguments, \" \")\r\n    );\r\n  });\r\n\r\n  var getArrayBuffer = (API.__private__.getArrayBuffer = function(data) {\r\n    var len = data.length,\r\n      ab = new ArrayBuffer(len),\r\n      u8 = new Uint8Array(ab);\r\n\r\n    while (len--) u8[len] = data.charCodeAt(len);\r\n    return ab;\r\n  });\r\n\r\n  var standardFonts = [\r\n    [\"Helvetica\", \"helvetica\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Bold\", \"helvetica\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-Oblique\", \"helvetica\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Helvetica-BoldOblique\", \"helvetica\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Courier\", \"courier\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Bold\", \"courier\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Courier-Oblique\", \"courier\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Courier-BoldOblique\", \"courier\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"Times-Roman\", \"times\", \"normal\", \"WinAnsiEncoding\"],\r\n    [\"Times-Bold\", \"times\", \"bold\", \"WinAnsiEncoding\"],\r\n    [\"Times-Italic\", \"times\", \"italic\", \"WinAnsiEncoding\"],\r\n    [\"Times-BoldItalic\", \"times\", \"bolditalic\", \"WinAnsiEncoding\"],\r\n    [\"ZapfDingbats\", \"zapfdingbats\", \"normal\", null],\r\n    [\"Symbol\", \"symbol\", \"normal\", null]\r\n  ];\r\n\r\n  API.__private__.getStandardFonts = function() {\r\n    return standardFonts;\r\n  };\r\n\r\n  var activeFontSize = options.fontSize || 16;\r\n\r\n  /**\r\n   * Sets font size for upcoming text elements.\r\n   *\r\n   * @param {number} size Font size in points.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFontSize\r\n   */\r\n  API.__private__.setFontSize = API.setFontSize = function(size) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      activeFontSize = size / scaleFactor;\r\n    } else {\r\n      activeFontSize = size;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets the fontsize for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number}\r\n   * @memberof jsPDF#\r\n   * @name getFontSize\r\n   */\r\n  var getFontSize = (API.__private__.getFontSize = API.getFontSize = function() {\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return activeFontSize;\r\n    } else {\r\n      return activeFontSize * scaleFactor;\r\n    }\r\n  });\r\n\r\n  var R2L = options.R2L || false;\r\n\r\n  /**\r\n   * Set value of R2L functionality.\r\n   *\r\n   * @param {boolean} value\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setR2L\r\n   */\r\n  API.__private__.setR2L = API.setR2L = function(value) {\r\n    R2L = value;\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Get value of R2L functionality.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {boolean} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name getR2L\r\n   */\r\n  API.__private__.getR2L = API.getR2L = function() {\r\n    return R2L;\r\n  };\r\n\r\n  var zoomMode; // default: 1;\r\n\r\n  var setZoomMode = (API.__private__.setZoomMode = function(zoom) {\r\n    var validZoomModes = [\r\n      undefined,\r\n      null,\r\n      \"fullwidth\",\r\n      \"fullheight\",\r\n      \"fullpage\",\r\n      \"original\"\r\n    ];\r\n\r\n    if (/^(?:\\d+\\.\\d*|\\d*\\.\\d+|\\d+)%$/.test(zoom)) {\r\n      zoomMode = zoom;\r\n    } else if (!isNaN(zoom)) {\r\n      zoomMode = parseInt(zoom, 10);\r\n    } else if (validZoomModes.indexOf(zoom) !== -1) {\r\n      zoomMode = zoom;\r\n    } else {\r\n      throw new Error(\r\n        'zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. \"' +\r\n          zoom +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n  });\r\n\r\n  API.__private__.getZoomMode = function() {\r\n    return zoomMode;\r\n  };\r\n\r\n  var pageMode; // default: 'UseOutlines';\r\n  var setPageMode = (API.__private__.setPageMode = function(pmode) {\r\n    var validPageModes = [\r\n      undefined,\r\n      null,\r\n      \"UseNone\",\r\n      \"UseOutlines\",\r\n      \"UseThumbs\",\r\n      \"FullScreen\"\r\n    ];\r\n\r\n    if (validPageModes.indexOf(pmode) == -1) {\r\n      throw new Error(\r\n        'Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. \"' +\r\n          pmode +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    pageMode = pmode;\r\n  });\r\n\r\n  API.__private__.getPageMode = function() {\r\n    return pageMode;\r\n  };\r\n\r\n  var layoutMode; // default: 'continuous';\r\n  var setLayoutMode = (API.__private__.setLayoutMode = function(layout) {\r\n    var validLayoutModes = [\r\n      undefined,\r\n      null,\r\n      \"continuous\",\r\n      \"single\",\r\n      \"twoleft\",\r\n      \"tworight\",\r\n      \"two\"\r\n    ];\r\n\r\n    if (validLayoutModes.indexOf(layout) == -1) {\r\n      throw new Error(\r\n        'Layout mode must be one of continuous, single, twoleft, tworight. \"' +\r\n          layout +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n    layoutMode = layout;\r\n  });\r\n\r\n  API.__private__.getLayoutMode = function() {\r\n    return layoutMode;\r\n  };\r\n\r\n  /**\r\n   * Set the display mode options of the page like zoom and layout.\r\n   *\r\n   * @name setDisplayMode\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {integer|String} zoom   You can pass an integer or percentage as\r\n   * a string. 2 will scale the document up 2x, '200%' will scale up by the\r\n   * same amount. You can also set it to 'fullwidth', 'fullheight',\r\n   * 'fullpage', or 'original'.\r\n   *\r\n   * Only certain PDF readers support this, such as Adobe Acrobat.\r\n   *\r\n   * @param {string} layout Layout mode can be: 'continuous' - this is the\r\n   * default continuous scroll. 'single' - the single page mode only shows one\r\n   * page at a time. 'twoleft' - two column left mode, first page starts on\r\n   * the left, and 'tworight' - pages are laid out in two columns, with the\r\n   * first page on the right. This would be used for books.\r\n   * @param {string} pmode 'UseOutlines' - it shows the\r\n   * outline of the document on the left. 'UseThumbs' - shows thumbnails along\r\n   * the left. 'FullScreen' - prompts the user to enter fullscreen mode.\r\n   *\r\n   * @returns {jsPDF}\r\n   */\r\n  API.__private__.setDisplayMode = API.setDisplayMode = function(\r\n    zoom,\r\n    layout,\r\n    pmode\r\n  ) {\r\n    setZoomMode(zoom);\r\n    setLayoutMode(layout);\r\n    setPageMode(pmode);\r\n    return this;\r\n  };\r\n\r\n  var documentProperties = {\r\n    title: \"\",\r\n    subject: \"\",\r\n    author: \"\",\r\n    keywords: \"\",\r\n    creator: \"\"\r\n  };\r\n\r\n  API.__private__.getDocumentProperty = function(key) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getDocumentProperty\");\r\n    }\r\n    return documentProperties[key];\r\n  };\r\n\r\n  API.__private__.getDocumentProperties = function() {\r\n    return documentProperties;\r\n  };\r\n\r\n  /**\r\n   * Adds a properties to the PDF document.\r\n   *\r\n   * @param {Object} A property_name-to-property_value object structure.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDocumentProperties\r\n   */\r\n  API.__private__.setDocumentProperties = API.setProperties = API.setDocumentProperties = function(\r\n    properties\r\n  ) {\r\n    // copying only those properties we can render.\r\n    for (var property in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(property) && properties[property]) {\r\n        documentProperties[property] = properties[property];\r\n      }\r\n    }\r\n    return this;\r\n  };\r\n\r\n  API.__private__.setDocumentProperty = function(key, value) {\r\n    if (Object.keys(documentProperties).indexOf(key) === -1) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setDocumentProperty\");\r\n    }\r\n    return (documentProperties[key] = value);\r\n  };\r\n\r\n  var fonts = {}; // collection of font objects, where key is fontKey - a dynamically created label for a given font.\r\n  var fontmap = {}; // mapping structure fontName > fontStyle > font key - performance layer. See addFont()\r\n  var activeFontKey; // will be string representing the KEY of the font as combination of fontName + fontStyle\r\n  var fontStateStack = []; //\r\n  var patterns = {}; // collection of pattern objects\r\n  var patternMap = {}; // see fonts\r\n  var gStates = {}; // collection of graphic state objects\r\n  var gStatesMap = {}; // see fonts\r\n  var activeGState = null;\r\n  var scaleFactor; // Scale factor\r\n  var page = 0;\r\n  var pagesContext = [];\r\n  var events = new PubSub(API);\r\n  var hotfixes = options.hotfixes || [];\r\n\r\n  var renderTargets = {};\r\n  var renderTargetMap = {};\r\n  var renderTargetStack = [];\r\n  var pageX;\r\n  var pageY;\r\n  var pageMatrix; // only used for FormObjects\r\n\r\n  /**\r\n   * A matrix object for 2D homogenous transformations: <br>\r\n   * | a b 0 | <br>\r\n   * | c d 0 | <br>\r\n   * | e f 1 | <br>\r\n   * pdf multiplies matrices righthand: v' = v x m1 x m2 x ...\r\n   *\r\n   * @class\r\n   * @name Matrix\r\n   * @param {number} sx\r\n   * @param {number} shy\r\n   * @param {number} shx\r\n   * @param {number} sy\r\n   * @param {number} tx\r\n   * @param {number} ty\r\n   * @constructor\r\n   */\r\n  var Matrix = function(sx, shy, shx, sy, tx, ty) {\r\n    if (!(this instanceof Matrix)) {\r\n      return new Matrix(sx, shy, shx, sy, tx, ty);\r\n    }\r\n\r\n    if (isNaN(sx)) sx = 1;\r\n    if (isNaN(shy)) shy = 0;\r\n    if (isNaN(shx)) shx = 0;\r\n    if (isNaN(sy)) sy = 1;\r\n    if (isNaN(tx)) tx = 0;\r\n    if (isNaN(ty)) ty = 0;\r\n\r\n    this._matrix = [sx, shy, shx, sy, tx, ty];\r\n  };\r\n\r\n  /**\r\n   * @name sx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sx\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shy\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name shx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"shx\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name sy\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"sy\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name tx\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"tx\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name ty\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"ty\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"a\", {\r\n    get: function() {\r\n      return this._matrix[0];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[0] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"b\", {\r\n    get: function() {\r\n      return this._matrix[1];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[1] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"c\", {\r\n    get: function() {\r\n      return this._matrix[2];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[2] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"d\", {\r\n    get: function() {\r\n      return this._matrix[3];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[3] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"e\", {\r\n    get: function() {\r\n      return this._matrix[4];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[4] = value;\r\n    }\r\n  });\r\n\r\n  Object.defineProperty(Matrix.prototype, \"f\", {\r\n    get: function() {\r\n      return this._matrix[5];\r\n    },\r\n    set: function(value) {\r\n      this._matrix[5] = value;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name rotation\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"rotation\", {\r\n    get: function() {\r\n      return Math.atan2(this.shx, this.sx);\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleX\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleX\", {\r\n    get: function() {\r\n      return this.decompose().scale.sx;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name scaleY\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"scaleY\", {\r\n    get: function() {\r\n      return this.decompose().scale.sy;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * @name isIdentity\r\n   * @memberof Matrix#\r\n   */\r\n  Object.defineProperty(Matrix.prototype, \"isIdentity\", {\r\n    get: function() {\r\n      if (this.sx !== 1) {\r\n        return false;\r\n      }\r\n      if (this.shy !== 0) {\r\n        return false;\r\n      }\r\n      if (this.shx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.sy !== 1) {\r\n        return false;\r\n      }\r\n      if (this.tx !== 0) {\r\n        return false;\r\n      }\r\n      if (this.ty !== 0) {\r\n        return false;\r\n      }\r\n      return true;\r\n    }\r\n  });\r\n\r\n  /**\r\n   * Join the Matrix Values to a String\r\n   *\r\n   * @function join\r\n   * @param {string} separator Specifies a string to separate each pair of adjacent elements of the array. The separator is converted to a string if necessary. If omitted, the array elements are separated with a comma (\",\"). If separator is an empty string, all elements are joined without any characters in between them.\r\n   * @returns {string} A string with all array elements joined.\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.join = function(separator) {\r\n    return [this.sx, this.shy, this.shx, this.sy, this.tx, this.ty]\r\n      .map(hpf)\r\n      .join(separator);\r\n  };\r\n\r\n  /**\r\n   * Multiply the matrix with given Matrix\r\n   *\r\n   * @function multiply\r\n   * @param matrix\r\n   * @returns {Matrix}\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.multiply = function(matrix) {\r\n    var sx = matrix.sx * this.sx + matrix.shy * this.shx;\r\n    var shy = matrix.sx * this.shy + matrix.shy * this.sy;\r\n    var shx = matrix.shx * this.sx + matrix.sy * this.shx;\r\n    var sy = matrix.shx * this.shy + matrix.sy * this.sy;\r\n    var tx = matrix.tx * this.sx + matrix.ty * this.shx + this.tx;\r\n    var ty = matrix.tx * this.shy + matrix.ty * this.sy + this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  /**\r\n   * @function decompose\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.decompose = function() {\r\n    var a = this.sx;\r\n    var b = this.shy;\r\n    var c = this.shx;\r\n    var d = this.sy;\r\n    var e = this.tx;\r\n    var f = this.ty;\r\n\r\n    var scaleX = Math.sqrt(a * a + b * b);\r\n    a /= scaleX;\r\n    b /= scaleX;\r\n\r\n    var shear = a * c + b * d;\r\n    c -= a * shear;\r\n    d -= b * shear;\r\n\r\n    var scaleY = Math.sqrt(c * c + d * d);\r\n    c /= scaleY;\r\n    d /= scaleY;\r\n    shear /= scaleY;\r\n\r\n    if (a * d < b * c) {\r\n      a = -a;\r\n      b = -b;\r\n      shear = -shear;\r\n      scaleX = -scaleX;\r\n    }\r\n\r\n    return {\r\n      scale: new Matrix(scaleX, 0, 0, scaleY, 0, 0),\r\n      translate: new Matrix(1, 0, 0, 1, e, f),\r\n      rotate: new Matrix(a, b, -b, a, 0, 0),\r\n      skew: new Matrix(1, 0, shear, 1, 0, 0)\r\n    };\r\n  };\r\n\r\n  /**\r\n   * @function toString\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.toString = function(parmPrecision) {\r\n    return this.join(\" \");\r\n  };\r\n\r\n  /**\r\n   * @function inversed\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.inversed = function() {\r\n    var a = this.sx,\r\n      b = this.shy,\r\n      c = this.shx,\r\n      d = this.sy,\r\n      e = this.tx,\r\n      f = this.ty;\r\n\r\n    var quot = 1 / (a * d - b * c);\r\n\r\n    var aInv = d * quot;\r\n    var bInv = -b * quot;\r\n    var cInv = -c * quot;\r\n    var dInv = a * quot;\r\n    var eInv = -aInv * e - cInv * f;\r\n    var fInv = -bInv * e - dInv * f;\r\n\r\n    return new Matrix(aInv, bInv, cInv, dInv, eInv, fInv);\r\n  };\r\n\r\n  /**\r\n   * @function applyToPoint\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToPoint = function(pt) {\r\n    var x = pt.x * this.sx + pt.y * this.shx + this.tx;\r\n    var y = pt.x * this.shy + pt.y * this.sy + this.ty;\r\n    return new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * @function applyToRectangle\r\n   * @memberof Matrix#\r\n   */\r\n  Matrix.prototype.applyToRectangle = function(rect) {\r\n    var pt1 = this.applyToPoint(rect);\r\n    var pt2 = this.applyToPoint(new Point(rect.x + rect.w, rect.y + rect.h));\r\n    return new Rectangle(pt1.x, pt1.y, pt2.x - pt1.x, pt2.y - pt1.y);\r\n  };\r\n\r\n  /**\r\n   * Clone the Matrix\r\n   *\r\n   * @function clone\r\n   * @memberof Matrix#\r\n   * @name clone\r\n   * @instance\r\n   */\r\n  Matrix.prototype.clone = function() {\r\n    var sx = this.sx;\r\n    var shy = this.shy;\r\n    var shx = this.shx;\r\n    var sy = this.sy;\r\n    var tx = this.tx;\r\n    var ty = this.ty;\r\n\r\n    return new Matrix(sx, shy, shx, sy, tx, ty);\r\n  };\r\n\r\n  API.Matrix = Matrix;\r\n\r\n  /**\r\n   * Multiplies two matrices. (see {@link Matrix})\r\n   * @param {Matrix} m1\r\n   * @param {Matrix} m2\r\n   * @memberof jsPDF#\r\n   * @name matrixMult\r\n   */\r\n  var matrixMult = (API.matrixMult = function(m1, m2) {\r\n    return m2.multiply(m1);\r\n  });\r\n\r\n  /**\r\n   * The identity matrix (equivalent to new Matrix(1, 0, 0, 1, 0, 0)).\r\n   * @type {Matrix}\r\n   * @memberof! jsPDF#\r\n   * @name identityMatrix\r\n   */\r\n  var identityMatrix = new Matrix(1, 0, 0, 1, 0, 0);\r\n  API.unitMatrix = API.identityMatrix = identityMatrix;\r\n\r\n  /**\r\n   * Adds a new pattern for later use.\r\n   * @param {String} key The key by it can be referenced later. The keys must be unique!\r\n   * @param {API.Pattern} pattern The pattern\r\n   */\r\n  var addPattern = function(key, pattern) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (patternMap[key]) return;\r\n\r\n    var prefix = pattern instanceof ShadingPattern ? \"Sh\" : \"P\";\r\n    var patternKey = prefix + (Object.keys(patterns).length + 1).toString(10);\r\n    pattern.id = patternKey;\r\n\r\n    patternMap[key] = patternKey;\r\n    patterns[patternKey] = pattern;\r\n\r\n    events.publish(\"addPattern\", pattern);\r\n  };\r\n\r\n  /**\r\n   * A pattern describing a shading pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {String} type One of \"axial\" or \"radial\"\r\n   * @param {Array<Number>} coords Either [x1, y1, x2, y2] for \"axial\" type describing the two interpolation points\r\n   * or [x1, y1, r, x2, y2, r2] for \"radial\" describing inner and the outer circle.\r\n   * @param {Array<Object>} colors An array of objects with the fields \"offset\" and \"color\". \"offset\" describes\r\n   * the offset in parameter space [0, 1]. \"color\" is an array of length 3 describing RGB values in [0, 255].\r\n   * @param {GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.ShadingPattern = ShadingPattern;\r\n\r\n  /**\r\n   * A PDF Tiling pattern.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {Array.<Number>} boundingBox The bounding box at which one pattern cell gets clipped.\r\n   * @param {Number} xStep Horizontal spacing between pattern cells.\r\n   * @param {Number} yStep Vertical spacing between pattern cells.\r\n   * @param {API.GState=} gState An additional graphics state that gets applied to the pattern (optional).\r\n   * @param {Matrix=} matrix A matrix that describes the transformation between the pattern coordinate system\r\n   * and the use coordinate system (optional).\r\n   * @constructor\r\n   * @extends API.Pattern\r\n   */\r\n  API.TilingPattern = TilingPattern;\r\n\r\n  /**\r\n   * Adds a new {@link API.ShadingPattern} for later use. Only available in \"advanced\" API mode.\r\n   * @param {String} key\r\n   * @param {Pattern} pattern\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name addPattern\r\n   */\r\n  API.addShadingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"addShadingPattern()\");\r\n\r\n    addPattern(key, pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Begins a new tiling pattern. All subsequent render calls are drawn to this pattern until {@link API.endTilingPattern}\r\n   * gets called. Only available in \"advanced\" API mode.\r\n   * @param {API.Pattern} pattern\r\n   * @memberof jsPDF#\r\n   * @name beginTilingPattern\r\n   */\r\n  API.beginTilingPattern = function(pattern) {\r\n    advancedApiModeTrap(\"beginTilingPattern()\");\r\n\r\n    beginNewRenderTarget(\r\n      pattern.boundingBox[0],\r\n      pattern.boundingBox[1],\r\n      pattern.boundingBox[2] - pattern.boundingBox[0],\r\n      pattern.boundingBox[3] - pattern.boundingBox[1],\r\n      pattern.matrix\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Ends a tiling pattern and sets the render target to the one active before {@link API.beginTilingPattern} has been called.\r\n   *\r\n   * Only available in \"advanced\" API mode.\r\n   *\r\n   * @param {string} key A unique key that is used to reference this pattern at later use.\r\n   * @param {API.Pattern} pattern The pattern to end.\r\n   * @memberof jsPDF#\r\n   * @name endTilingPattern\r\n   */\r\n  API.endTilingPattern = function(key, pattern) {\r\n    advancedApiModeTrap(\"endTilingPattern()\");\r\n\r\n    // retrieve the stream\r\n    pattern.stream = pages[currentPage].join(\"\\n\");\r\n\r\n    addPattern(key, pattern);\r\n\r\n    events.publish(\"endTilingPattern\", pattern);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  var newObject = (API.__private__.newObject = function() {\r\n    var oid = newObjectDeferred();\r\n    newObjectDeferredBegin(oid, true);\r\n    return oid;\r\n  });\r\n\r\n  // Does not output the object.  The caller must call newObjectDeferredBegin(oid) before outputing any data\r\n  var newObjectDeferred = (API.__private__.newObjectDeferred = function() {\r\n    objectNumber++;\r\n    offsets[objectNumber] = function() {\r\n      return contentLength;\r\n    };\r\n    return objectNumber;\r\n  });\r\n\r\n  var newObjectDeferredBegin = function(oid, doOutput) {\r\n    doOutput = typeof doOutput === \"boolean\" ? doOutput : false;\r\n    offsets[oid] = contentLength;\r\n    if (doOutput) {\r\n      out(oid + \" 0 obj\");\r\n    }\r\n    return oid;\r\n  };\r\n  // Does not output the object until after the pages have been output.\r\n  // Returns an object containing the objectId and content.\r\n  // All pages have been added so the object ID can be estimated to start right after.\r\n  // This does not modify the current objectNumber;  It must be updated after the newObjects are output.\r\n  var newAdditionalObject = (API.__private__.newAdditionalObject = function() {\r\n    var objId = newObjectDeferred();\r\n    var obj = {\r\n      objId: objId,\r\n      content: \"\"\r\n    };\r\n    additionalObjects.push(obj);\r\n    return obj;\r\n  });\r\n\r\n  var rootDictionaryObjId = newObjectDeferred();\r\n  var resourceDictionaryObjId = newObjectDeferred();\r\n\r\n  /////////////////////\r\n  // Private functions\r\n  /////////////////////\r\n\r\n  var decodeColorString = (API.__private__.decodeColorString = function(color) {\r\n    var colorEncoded = color.split(\" \");\r\n    if (\r\n      colorEncoded.length === 2 &&\r\n      (colorEncoded[1] === \"g\" || colorEncoded[1] === \"G\")\r\n    ) {\r\n      // convert grayscale value to rgb so that it can be converted to hex for consistency\r\n      var floatVal = parseFloat(colorEncoded[0]);\r\n      colorEncoded = [floatVal, floatVal, floatVal, \"r\"];\r\n    } else if (\r\n      colorEncoded.length === 5 &&\r\n      (colorEncoded[4] === \"k\" || colorEncoded[4] === \"K\")\r\n    ) {\r\n      // convert CMYK values to rbg so that it can be converted to hex for consistency\r\n      var red = (1.0 - colorEncoded[0]) * (1.0 - colorEncoded[3]);\r\n      var green = (1.0 - colorEncoded[1]) * (1.0 - colorEncoded[3]);\r\n      var blue = (1.0 - colorEncoded[2]) * (1.0 - colorEncoded[3]);\r\n\r\n      colorEncoded = [red, green, blue, \"r\"];\r\n    }\r\n    var colorAsRGB = \"#\";\r\n    for (var i = 0; i < 3; i++) {\r\n      colorAsRGB += (\r\n        \"0\" + Math.floor(parseFloat(colorEncoded[i]) * 255).toString(16)\r\n      ).slice(-2);\r\n    }\r\n    return colorAsRGB;\r\n  });\r\n\r\n  var encodeColorString = (API.__private__.encodeColorString = function(\r\n    options\r\n  ) {\r\n    var color;\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        ch1: options\r\n      };\r\n    }\r\n    var ch1 = options.ch1;\r\n    var ch2 = options.ch2;\r\n    var ch3 = options.ch3;\r\n    var ch4 = options.ch4;\r\n    var letterArray =\r\n      options.pdfColorType === \"draw\" ? [\"G\", \"RG\", \"K\"] : [\"g\", \"rg\", \"k\"];\r\n\r\n    if (typeof ch1 === \"string\" && ch1.charAt(0) !== \"#\") {\r\n      var rgbColor = new RGBColor(ch1);\r\n      if (rgbColor.ok) {\r\n        ch1 = rgbColor.toHex();\r\n      } else if (!/^\\d*\\.?\\d*$/.test(ch1)) {\r\n        throw new Error(\r\n          'Invalid color \"' + ch1 + '\" passed to jsPDF.encodeColorString.'\r\n        );\r\n      }\r\n    }\r\n    //convert short rgb to long form\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{3}$/.test(ch1)) {\r\n      ch1 = \"#\" + ch1[1] + ch1[1] + ch1[2] + ch1[2] + ch1[3] + ch1[3];\r\n    }\r\n\r\n    if (typeof ch1 === \"string\" && /^#[0-9A-Fa-f]{6}$/.test(ch1)) {\r\n      var hex = parseInt(ch1.substr(1), 16);\r\n      ch1 = (hex >> 16) & 255;\r\n      ch2 = (hex >> 8) & 255;\r\n      ch3 = hex & 255;\r\n    }\r\n\r\n    if (\r\n      typeof ch2 === \"undefined\" ||\r\n      (typeof ch4 === \"undefined\" && ch1 === ch2 && ch2 === ch3)\r\n    ) {\r\n      // Gray color space.\r\n      if (typeof ch1 === \"string\") {\r\n        color = ch1 + \" \" + letterArray[0];\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = f2(ch1 / 255) + \" \" + letterArray[0];\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = f3(ch1 / 255) + \" \" + letterArray[0];\r\n        }\r\n      }\r\n    } else if (typeof ch4 === \"undefined\" || typeof ch4 === \"object\") {\r\n      // assume RGBA\r\n      if (ch4 && !isNaN(ch4.a)) {\r\n        //TODO Implement transparency.\r\n        //WORKAROUND use white for now, if transparent, otherwise handle as rgb\r\n        if (ch4.a === 0) {\r\n          color = [\"1.\", \"1.\", \"1.\", letterArray[1]].join(\" \");\r\n          return color;\r\n        }\r\n      }\r\n      // assume RGB\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, letterArray[1]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [\r\n              f2(ch1 / 255),\r\n              f2(ch2 / 255),\r\n              f2(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n            break;\r\n          default:\r\n          case 3:\r\n            color = [\r\n              f3(ch1 / 255),\r\n              f3(ch2 / 255),\r\n              f3(ch3 / 255),\r\n              letterArray[1]\r\n            ].join(\" \");\r\n        }\r\n      }\r\n    } else {\r\n      // assume CMYK\r\n      if (typeof ch1 === \"string\") {\r\n        color = [ch1, ch2, ch3, ch4, letterArray[2]].join(\" \");\r\n      } else {\r\n        switch (options.precision) {\r\n          case 2:\r\n            color = [f2(ch1), f2(ch2), f2(ch3), f2(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n            break;\r\n          case 3:\r\n          default:\r\n            color = [f3(ch1), f3(ch2), f3(ch3), f3(ch4), letterArray[2]].join(\r\n              \" \"\r\n            );\r\n        }\r\n      }\r\n    }\r\n    return color;\r\n  });\r\n\r\n  var getFilters = (API.__private__.getFilters = function() {\r\n    return filters;\r\n  });\r\n\r\n  var putStream = (API.__private__.putStream = function(options) {\r\n    options = options || {};\r\n    var data = options.data || \"\";\r\n    var filters = options.filters || getFilters();\r\n    var alreadyAppliedFilters = options.alreadyAppliedFilters || [];\r\n    var addLength1 = options.addLength1 || false;\r\n    var valueOfLength1 = data.length;\r\n    var objectId = options.objectId;\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null && typeof objectId == \"undefined\") {\r\n      throw new Error(\r\n        \"ObjectId must be passed to putStream for file encryption\"\r\n      );\r\n    }\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n\r\n    var processedData = {};\r\n    if (filters === true) {\r\n      filters = [\"FlateEncode\"];\r\n    }\r\n    var keyValues = options.additionalKeyValues || [];\r\n    if (typeof jsPDF.API.processDataByFilters !== \"undefined\") {\r\n      processedData = jsPDF.API.processDataByFilters(data, filters);\r\n    } else {\r\n      processedData = { data: data, reverseChain: [] };\r\n    }\r\n    var filterAsString =\r\n      processedData.reverseChain +\r\n      (Array.isArray(alreadyAppliedFilters)\r\n        ? alreadyAppliedFilters.join(\" \")\r\n        : alreadyAppliedFilters.toString());\r\n\r\n    if (processedData.data.length !== 0) {\r\n      keyValues.push({\r\n        key: \"Length\",\r\n        value: processedData.data.length\r\n      });\r\n      if (addLength1 === true) {\r\n        keyValues.push({\r\n          key: \"Length1\",\r\n          value: valueOfLength1\r\n        });\r\n      }\r\n    }\r\n\r\n    if (filterAsString.length != 0) {\r\n      if (filterAsString.split(\"/\").length - 1 === 1) {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: filterAsString\r\n        });\r\n      } else {\r\n        keyValues.push({\r\n          key: \"Filter\",\r\n          value: \"[\" + filterAsString + \"]\"\r\n        });\r\n\r\n        for (var j = 0; j < keyValues.length; j += 1) {\r\n          if (keyValues[j].key === \"DecodeParms\") {\r\n            var decodeParmsArray = [];\r\n\r\n            for (\r\n              var i = 0;\r\n              i < processedData.reverseChain.split(\"/\").length - 1;\r\n              i += 1\r\n            ) {\r\n              decodeParmsArray.push(\"null\");\r\n            }\r\n\r\n            decodeParmsArray.push(keyValues[j].value);\r\n            keyValues[j].value = \"[\" + decodeParmsArray.join(\" \") + \"]\";\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    out(\"<<\");\r\n    for (var k = 0; k < keyValues.length; k++) {\r\n      out(\"/\" + keyValues[k].key + \" \" + keyValues[k].value);\r\n    }\r\n    out(\">>\");\r\n    if (processedData.data.length !== 0) {\r\n      out(\"stream\");\r\n      out(encryptor(processedData.data));\r\n      out(\"endstream\");\r\n    }\r\n  });\r\n\r\n  var putPage = (API.__private__.putPage = function(page) {\r\n    var pageNumber = page.number;\r\n    var data = page.data;\r\n    var pageObjectNumber = page.objId;\r\n    var pageContentsObjId = page.contentsObjId;\r\n\r\n    newObjectDeferredBegin(pageObjectNumber, true);\r\n    out(\"<</Type /Page\");\r\n    out(\"/Parent \" + page.rootDictionaryObjId + \" 0 R\");\r\n    out(\"/Resources \" + page.resourceDictionaryObjId + \" 0 R\");\r\n    out(\r\n      \"/MediaBox [\" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftX)) +\r\n        \" \" +\r\n        parseFloat(hpf(page.mediaBox.bottomLeftY)) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightX) +\r\n        \" \" +\r\n        hpf(page.mediaBox.topRightY) +\r\n        \"]\"\r\n    );\r\n    if (page.cropBox !== null) {\r\n      out(\r\n        \"/CropBox [\" +\r\n          hpf(page.cropBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.cropBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.cropBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.bleedBox !== null) {\r\n      out(\r\n        \"/BleedBox [\" +\r\n          hpf(page.bleedBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.bleedBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.trimBox !== null) {\r\n      out(\r\n        \"/TrimBox [\" +\r\n          hpf(page.trimBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.trimBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.trimBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (page.artBox !== null) {\r\n      out(\r\n        \"/ArtBox [\" +\r\n          hpf(page.artBox.bottomLeftX) +\r\n          \" \" +\r\n          hpf(page.artBox.bottomLeftY) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightX) +\r\n          \" \" +\r\n          hpf(page.artBox.topRightY) +\r\n          \"]\"\r\n      );\r\n    }\r\n\r\n    if (typeof page.userUnit === \"number\" && page.userUnit !== 1.0) {\r\n      out(\"/UserUnit \" + page.userUnit);\r\n    }\r\n\r\n    events.publish(\"putPage\", {\r\n      objId: pageObjectNumber,\r\n      pageContext: pagesContext[pageNumber],\r\n      pageNumber: pageNumber,\r\n      page: data\r\n    });\r\n    out(\"/Contents \" + pageContentsObjId + \" 0 R\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    // Page content\r\n    var pageContent = data.join(\"\\n\");\r\n\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      // if the user forgot to switch back to COMPAT mode, we must balance the graphics stack again\r\n      pageContent += \"\\nQ\";\r\n    }\r\n\r\n    newObjectDeferredBegin(pageContentsObjId, true);\r\n    putStream({\r\n      data: pageContent,\r\n      filters: getFilters(),\r\n      objectId: pageContentsObjId\r\n    });\r\n    out(\"endobj\");\r\n    return pageObjectNumber;\r\n  });\r\n\r\n  var putPages = (API.__private__.putPages = function() {\r\n    var n,\r\n      i,\r\n      pageObjectNumbers = [];\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pagesContext[n].objId = newObjectDeferred();\r\n      pagesContext[n].contentsObjId = newObjectDeferred();\r\n    }\r\n\r\n    for (n = 1; n <= page; n++) {\r\n      pageObjectNumbers.push(\r\n        putPage({\r\n          number: n,\r\n          data: pages[n],\r\n          objId: pagesContext[n].objId,\r\n          contentsObjId: pagesContext[n].contentsObjId,\r\n          mediaBox: pagesContext[n].mediaBox,\r\n          cropBox: pagesContext[n].cropBox,\r\n          bleedBox: pagesContext[n].bleedBox,\r\n          trimBox: pagesContext[n].trimBox,\r\n          artBox: pagesContext[n].artBox,\r\n          userUnit: pagesContext[n].userUnit,\r\n          rootDictionaryObjId: rootDictionaryObjId,\r\n          resourceDictionaryObjId: resourceDictionaryObjId\r\n        })\r\n      );\r\n    }\r\n    newObjectDeferredBegin(rootDictionaryObjId, true);\r\n    out(\"<</Type /Pages\");\r\n    var kids = \"/Kids [\";\r\n    for (i = 0; i < page; i++) {\r\n      kids += pageObjectNumbers[i] + \" 0 R \";\r\n    }\r\n    out(kids + \"]\");\r\n    out(\"/Count \" + page);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n    events.publish(\"postPutPages\");\r\n  });\r\n\r\n  var putFont = function(font) {\r\n    events.publish(\"putFont\", {\r\n      font: font,\r\n      out: out,\r\n      newObject: newObject,\r\n      putStream: putStream\r\n    });\r\n\r\n    if (font.isAlreadyPutted !== true) {\r\n      font.objectNumber = newObject();\r\n      out(\"<<\");\r\n      out(\"/Type /Font\");\r\n      out(\"/BaseFont /\" + toPDFName(font.postScriptName));\r\n      out(\"/Subtype /Type1\");\r\n      if (typeof font.encoding === \"string\") {\r\n        out(\"/Encoding /\" + font.encoding);\r\n      }\r\n      out(\"/FirstChar 32\");\r\n      out(\"/LastChar 255\");\r\n      out(\">>\");\r\n      out(\"endobj\");\r\n    }\r\n  };\r\n\r\n  var putFonts = function() {\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          putFont(fonts[fontKey]);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXObject = function(xObject) {\r\n    xObject.objectNumber = newObject();\r\n\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/XObject\" });\r\n    options.push({ key: \"Subtype\", value: \"/Form\" });\r\n    options.push({\r\n      key: \"BBox\",\r\n      value:\r\n        \"[\" +\r\n        [\r\n          hpf(xObject.x),\r\n          hpf(xObject.y),\r\n          hpf(xObject.x + xObject.width),\r\n          hpf(xObject.y + xObject.height)\r\n        ].join(\" \") +\r\n        \"]\"\r\n    });\r\n    options.push({\r\n      key: \"Matrix\",\r\n      value: \"[\" + xObject.matrix.toString() + \"]\"\r\n    });\r\n    // TODO: /Resources\r\n\r\n    var stream = xObject.pages[1].join(\"\\n\");\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      objectId: xObject.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putXObjects = function() {\r\n    for (var xObjectKey in renderTargets) {\r\n      if (renderTargets.hasOwnProperty(xObjectKey)) {\r\n        putXObject(renderTargets[xObjectKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var interpolateAndEncodeRGBStream = function(colors, numberSamples) {\r\n    var tValues = [];\r\n    var t;\r\n    var dT = 1.0 / (numberSamples - 1);\r\n    for (t = 0.0; t < 1.0; t += dT) {\r\n      tValues.push(t);\r\n    }\r\n    tValues.push(1.0);\r\n    // add first and last control point if not present\r\n    if (colors[0].offset != 0.0) {\r\n      var c0 = {\r\n        offset: 0.0,\r\n        color: colors[0].color\r\n      };\r\n      colors.unshift(c0);\r\n    }\r\n    if (colors[colors.length - 1].offset != 1.0) {\r\n      var c1 = {\r\n        offset: 1.0,\r\n        color: colors[colors.length - 1].color\r\n      };\r\n      colors.push(c1);\r\n    }\r\n    var out = \"\";\r\n    var index = 0;\r\n\r\n    for (var i = 0; i < tValues.length; i++) {\r\n      t = tValues[i];\r\n      while (t > colors[index + 1].offset) index++;\r\n      var a = colors[index].offset;\r\n      var b = colors[index + 1].offset;\r\n      var d = (t - a) / (b - a);\r\n\r\n      var aColor = colors[index].color;\r\n      var bColor = colors[index + 1].color;\r\n\r\n      out +=\r\n        padd2Hex(Math.round((1 - d) * aColor[0] + d * bColor[0]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[1] + d * bColor[1]).toString(16)) +\r\n        padd2Hex(Math.round((1 - d) * aColor[2] + d * bColor[2]).toString(16));\r\n    }\r\n    return out.trim();\r\n  };\r\n\r\n  var putShadingPattern = function(pattern, numberSamples) {\r\n    /*\r\n       Axial patterns shade between the two points specified in coords, radial patterns between the inner\r\n       and outer circle.\r\n       The user can specify an array (colors) that maps t-Values in [0, 1] to RGB colors. These are now\r\n       interpolated to equidistant samples and written to pdf as a sample (type 0) function.\r\n       */\r\n    // The number of color samples that should be used to describe the shading.\r\n    // The higher, the more accurate the gradient will be.\r\n    numberSamples || (numberSamples = 21);\r\n    var funcObjectNumber = newObject();\r\n    var stream = interpolateAndEncodeRGBStream(pattern.colors, numberSamples);\r\n\r\n    var options = [];\r\n    options.push({ key: \"FunctionType\", value: \"0\" });\r\n    options.push({ key: \"Domain\", value: \"[0.0 1.0]\" });\r\n    options.push({ key: \"Size\", value: \"[\" + numberSamples + \"]\" });\r\n    options.push({ key: \"BitsPerSample\", value: \"8\" });\r\n    options.push({ key: \"Range\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n    options.push({ key: \"Decode\", value: \"[0.0 1.0 0.0 1.0 0.0 1.0]\" });\r\n\r\n    putStream({\r\n      data: stream,\r\n      additionalKeyValues: options,\r\n      alreadyAppliedFilters: [\"/ASCIIHexDecode\"],\r\n      objectId: funcObjectNumber\r\n    });\r\n    out(\"endobj\");\r\n\r\n    pattern.objectNumber = newObject();\r\n    out(\"<< /ShadingType \" + pattern.type);\r\n    out(\"/ColorSpace /DeviceRGB\");\r\n    var coords =\r\n      \"/Coords [\" +\r\n      hpf(parseFloat(pattern.coords[0])) +\r\n      \" \" + // x1\r\n      hpf(parseFloat(pattern.coords[1])) +\r\n      \" \"; // y1\r\n    if (pattern.type === 2) {\r\n      // axial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[3])); // y2\r\n    } else {\r\n      // radial\r\n      coords +=\r\n        hpf(parseFloat(pattern.coords[2])) +\r\n        \" \" + // r1\r\n        hpf(parseFloat(pattern.coords[3])) +\r\n        \" \" + // x2\r\n        hpf(parseFloat(pattern.coords[4])) +\r\n        \" \" + // y2\r\n        hpf(parseFloat(pattern.coords[5])); // r2\r\n    }\r\n    coords += \"]\";\r\n    out(coords);\r\n\r\n    if (pattern.matrix) {\r\n      out(\"/Matrix [\" + pattern.matrix.toString() + \"]\");\r\n    }\r\n    out(\"/Function \" + funcObjectNumber + \" 0 R\");\r\n    out(\"/Extend [true true]\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putTilingPattern = function(pattern, deferredResourceDictionaryIds) {\r\n    var resourcesObjectId = newObjectDeferred();\r\n    var patternObjectId = newObject();\r\n\r\n    deferredResourceDictionaryIds.push({\r\n      resourcesOid: resourcesObjectId,\r\n      objectOid: patternObjectId\r\n    });\r\n\r\n    pattern.objectNumber = patternObjectId;\r\n    var options = [];\r\n    options.push({ key: \"Type\", value: \"/Pattern\" });\r\n    options.push({ key: \"PatternType\", value: \"1\" }); // tiling pattern\r\n    options.push({ key: \"PaintType\", value: \"1\" }); // colored tiling pattern\r\n    options.push({ key: \"TilingType\", value: \"1\" }); // constant spacing\r\n    options.push({\r\n      key: \"BBox\",\r\n      value: \"[\" + pattern.boundingBox.map(hpf).join(\" \") + \"]\"\r\n    });\r\n    options.push({ key: \"XStep\", value: hpf(pattern.xStep) });\r\n    options.push({ key: \"YStep\", value: hpf(pattern.yStep) });\r\n    options.push({ key: \"Resources\", value: resourcesObjectId + \" 0 R\" });\r\n    if (pattern.matrix) {\r\n      options.push({\r\n        key: \"Matrix\",\r\n        value: \"[\" + pattern.matrix.toString() + \"]\"\r\n      });\r\n    }\r\n\r\n    putStream({\r\n      data: pattern.stream,\r\n      additionalKeyValues: options,\r\n      objectId: pattern.objectNumber\r\n    });\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putPatterns = function(deferredResourceDictionaryIds) {\r\n    var patternKey;\r\n    for (patternKey in patterns) {\r\n      if (patterns.hasOwnProperty(patternKey)) {\r\n        if (patterns[patternKey] instanceof ShadingPattern) {\r\n          putShadingPattern(patterns[patternKey]);\r\n        } else if (patterns[patternKey] instanceof TilingPattern) {\r\n          putTilingPattern(patterns[patternKey], deferredResourceDictionaryIds);\r\n        }\r\n      }\r\n    }\r\n  };\r\n\r\n  var putGState = function(gState) {\r\n    gState.objectNumber = newObject();\r\n    out(\"<<\");\r\n    for (var p in gState) {\r\n      switch (p) {\r\n        case \"opacity\":\r\n          out(\"/ca \" + f2(gState[p]));\r\n          break;\r\n        case \"stroke-opacity\":\r\n          out(\"/CA \" + f2(gState[p]));\r\n          break;\r\n      }\r\n    }\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putGStates = function() {\r\n    var gStateKey;\r\n    for (gStateKey in gStates) {\r\n      if (gStates.hasOwnProperty(gStateKey)) {\r\n        putGState(gStates[gStateKey]);\r\n      }\r\n    }\r\n  };\r\n\r\n  var putXobjectDict = function() {\r\n    out(\"/XObject <<\");\r\n    for (var xObjectKey in renderTargets) {\r\n      if (\r\n        renderTargets.hasOwnProperty(xObjectKey) &&\r\n        renderTargets[xObjectKey].objectNumber >= 0\r\n      ) {\r\n        out(\r\n          \"/\" +\r\n            xObjectKey +\r\n            \" \" +\r\n            renderTargets[xObjectKey].objectNumber +\r\n            \" 0 R\"\r\n        );\r\n      }\r\n    }\r\n\r\n    // Loop through images, or other data objects\r\n    events.publish(\"putXobjectDict\");\r\n    out(\">>\");\r\n  };\r\n\r\n  var putEncryptionDict = function() {\r\n    encryption.oid = newObject();\r\n    out(\"<<\");\r\n    out(\"/Filter /Standard\");\r\n    out(\"/V \" + encryption.v);\r\n    out(\"/R \" + encryption.r);\r\n    out(\"/U <\" + encryption.toHexString(encryption.U) + \">\");\r\n    out(\"/O <\" + encryption.toHexString(encryption.O) + \">\");\r\n    out(\"/P \" + encryption.P);\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putFontDict = function() {\r\n    out(\"/Font <<\");\r\n\r\n    for (var fontKey in fonts) {\r\n      if (fonts.hasOwnProperty(fontKey)) {\r\n        if (\r\n          putOnlyUsedFonts === false ||\r\n          (putOnlyUsedFonts === true && usedFonts.hasOwnProperty(fontKey))\r\n        ) {\r\n          out(\"/\" + fontKey + \" \" + fonts[fontKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n    }\r\n    out(\">>\");\r\n  };\r\n\r\n  var putShadingPatternDict = function() {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Shading <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof ShadingPattern &&\r\n          patterns[patternKey].objectNumber >= 0\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n\r\n      events.publish(\"putShadingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putTilingPatternDict = function(objectOid) {\r\n    if (Object.keys(patterns).length > 0) {\r\n      out(\"/Pattern <<\");\r\n      for (var patternKey in patterns) {\r\n        if (\r\n          patterns.hasOwnProperty(patternKey) &&\r\n          patterns[patternKey] instanceof API.TilingPattern &&\r\n          patterns[patternKey].objectNumber >= 0 &&\r\n          patterns[patternKey].objectNumber < objectOid // prevent cyclic dependencies\r\n        ) {\r\n          out(\r\n            \"/\" + patternKey + \" \" + patterns[patternKey].objectNumber + \" 0 R\"\r\n          );\r\n        }\r\n      }\r\n      events.publish(\"putTilingPatternDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putGStatesDict = function() {\r\n    if (Object.keys(gStates).length > 0) {\r\n      var gStateKey;\r\n      out(\"/ExtGState <<\");\r\n      for (gStateKey in gStates) {\r\n        if (\r\n          gStates.hasOwnProperty(gStateKey) &&\r\n          gStates[gStateKey].objectNumber >= 0\r\n        ) {\r\n          out(\"/\" + gStateKey + \" \" + gStates[gStateKey].objectNumber + \" 0 R\");\r\n        }\r\n      }\r\n\r\n      events.publish(\"putGStateDict\");\r\n      out(\">>\");\r\n    }\r\n  };\r\n\r\n  var putResourceDictionary = function(objectIds) {\r\n    newObjectDeferredBegin(objectIds.resourcesOid, true);\r\n    out(\"<<\");\r\n    out(\"/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]\");\r\n    putFontDict();\r\n    putShadingPatternDict();\r\n    putTilingPatternDict(objectIds.objectOid);\r\n    putGStatesDict();\r\n    putXobjectDict();\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  };\r\n\r\n  var putResources = function() {\r\n    // FormObjects, Patterns etc. might use other FormObjects/Patterns/Images\r\n    // which means their resource dictionaries must contain the already resolved\r\n    // object ids. For this reason we defer the serialization of the resource\r\n    // dicts until all objects have been serialized and have object ids.\r\n    //\r\n    // In order to prevent cyclic dependencies (which Adobe Reader doesn't like),\r\n    // we only put all oids that are smaller than the oid of the object the\r\n    // resource dict belongs to. This is correct behavior, since the streams\r\n    // may only use other objects that have already been defined and thus appear\r\n    // earlier in their respective collection.\r\n    // Currently, this only affects tiling patterns, but a (more) correct\r\n    // implementation of FormObjects would also define their own resource dicts.\r\n    var deferredResourceDictionaryIds = [];\r\n\r\n    putFonts();\r\n    putGStates();\r\n    putXObjects();\r\n    putPatterns(deferredResourceDictionaryIds);\r\n\r\n    events.publish(\"putResources\");\r\n    deferredResourceDictionaryIds.forEach(putResourceDictionary);\r\n    putResourceDictionary({\r\n      resourcesOid: resourceDictionaryObjId,\r\n      objectOid: Number.MAX_SAFE_INTEGER // output all objects\r\n    });\r\n    events.publish(\"postPutResources\");\r\n  };\r\n\r\n  var putAdditionalObjects = function() {\r\n    events.publish(\"putAdditionalObjects\");\r\n    for (var i = 0; i < additionalObjects.length; i++) {\r\n      var obj = additionalObjects[i];\r\n      newObjectDeferredBegin(obj.objId, true);\r\n      out(obj.content);\r\n      out(\"endobj\");\r\n    }\r\n    events.publish(\"postPutAdditionalObjects\");\r\n  };\r\n\r\n  var addFontToFontDictionary = function(font) {\r\n    fontmap[font.fontName] = fontmap[font.fontName] || {};\r\n    fontmap[font.fontName][font.fontStyle] = font.id;\r\n  };\r\n\r\n  var addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    encoding,\r\n    isStandardFont\r\n  ) {\r\n    var font = {\r\n      id: \"F\" + (Object.keys(fonts).length + 1).toString(10),\r\n      postScriptName: postScriptName,\r\n      fontName: fontName,\r\n      fontStyle: fontStyle,\r\n      encoding: encoding,\r\n      isStandardFont: isStandardFont || false,\r\n      metadata: {}\r\n    };\r\n\r\n    events.publish(\"addFont\", {\r\n      font: font,\r\n      instance: this\r\n    });\r\n\r\n    fonts[font.id] = font;\r\n    addFontToFontDictionary(font);\r\n    return font.id;\r\n  };\r\n\r\n  var addFonts = function(arrayOfFonts) {\r\n    for (var i = 0, l = standardFonts.length; i < l; i++) {\r\n      var fontKey = addFont.call(\r\n        this,\r\n        arrayOfFonts[i][0],\r\n        arrayOfFonts[i][1],\r\n        arrayOfFonts[i][2],\r\n        standardFonts[i][3],\r\n        true\r\n      );\r\n\r\n      if (putOnlyUsedFonts === false) {\r\n        usedFonts[fontKey] = true;\r\n      }\r\n      // adding aliases for standard fonts, this time matching the capitalization\r\n      var parts = arrayOfFonts[i][0].split(\"-\");\r\n      addFontToFontDictionary({\r\n        id: fontKey,\r\n        fontName: parts[0],\r\n        fontStyle: parts[1] || \"\"\r\n      });\r\n    }\r\n    events.publish(\"addFonts\", {\r\n      fonts: fonts,\r\n      dictionary: fontmap\r\n    });\r\n  };\r\n\r\n  var SAFE = function __safeCall(fn) {\r\n    fn.foo = function __safeCallWrapper() {\r\n      try {\r\n        return fn.apply(this, arguments);\r\n      } catch (e) {\r\n        var stack = e.stack || \"\";\r\n        if (~stack.indexOf(\" at \")) stack = stack.split(\" at \")[1];\r\n        var m =\r\n          \"Error in function \" +\r\n          stack.split(\"\\n\")[0].split(\"<\")[0] +\r\n          \": \" +\r\n          e.message;\r\n        if (globalObject.console) {\r\n          globalObject.console.error(m, e);\r\n          if (globalObject.alert) alert(m);\r\n        } else {\r\n          throw new Error(m);\r\n        }\r\n      }\r\n    };\r\n    fn.foo.bar = fn;\r\n    return fn.foo;\r\n  };\r\n\r\n  var to8bitStream = function(text, flags) {\r\n    /**\r\n     * PDF 1.3 spec:\r\n     * \"For text strings encoded in Unicode, the first two bytes must be 254 followed by\r\n     * 255, representing the Unicode byte order marker, U+FEFF. (This sequence conflicts\r\n     * with the PDFDocEncoding character sequence thorn ydieresis, which is unlikely\r\n     * to be a meaningful beginning of a word or phrase.) The remainder of the\r\n     * string consists of Unicode character codes, according to the UTF-16 encoding\r\n     * specified in the Unicode standard, version 2.0. Commonly used Unicode values\r\n     * are represented as 2 bytes per character, with the high-order byte appearing first\r\n     * in the string.\"\r\n     *\r\n     * In other words, if there are chars in a string with char code above 255, we\r\n     * recode the string to UCS2 BE - string doubles in length and BOM is prepended.\r\n     *\r\n     * HOWEVER!\r\n     * Actual *content* (body) text (as opposed to strings used in document properties etc)\r\n     * does NOT expect BOM. There, it is treated as a literal GID (Glyph ID)\r\n     *\r\n     * Because of Adobe's focus on \"you subset your fonts!\" you are not supposed to have\r\n     * a font that maps directly Unicode (UCS2 / UTF16BE) code to font GID, but you could\r\n     * fudge it with \"Identity-H\" encoding and custom CIDtoGID map that mimics Unicode\r\n     * code page. There, however, all characters in the stream are treated as GIDs,\r\n     * including BOM, which is the reason we need to skip BOM in content text (i.e. that\r\n     * that is tied to a font).\r\n     *\r\n     * To signal this \"special\" PDFEscape / to8bitStream handling mode,\r\n     * API.text() function sets (unless you overwrite it with manual values\r\n     * given to API.text(.., flags) )\r\n     * flags.autoencode = true\r\n     * flags.noBOM = true\r\n     *\r\n     * ===================================================================================\r\n     * `flags` properties relied upon:\r\n     *   .sourceEncoding = string with encoding label.\r\n     *                     \"Unicode\" by default. = encoding of the incoming text.\r\n     *                     pass some non-existing encoding name\r\n     *                     (ex: 'Do not touch my strings! I know what I am doing.')\r\n     *                     to make encoding code skip the encoding step.\r\n     *   .outputEncoding = Either valid PDF encoding name\r\n     *                     (must be supported by jsPDF font metrics, otherwise no encoding)\r\n     *                     or a JS object, where key = sourceCharCode, value = outputCharCode\r\n     *                     missing keys will be treated as: sourceCharCode === outputCharCode\r\n     *   .noBOM\r\n     *       See comment higher above for explanation for why this is important\r\n     *   .autoencode\r\n     *       See comment higher above for explanation for why this is important\r\n     */\r\n\r\n    var i,\r\n      l,\r\n      sourceEncoding,\r\n      encodingBlock,\r\n      outputEncoding,\r\n      newtext,\r\n      isUnicode,\r\n      ch,\r\n      bch;\r\n\r\n    flags = flags || {};\r\n    sourceEncoding = flags.sourceEncoding || \"Unicode\";\r\n    outputEncoding = flags.outputEncoding;\r\n\r\n    // This 'encoding' section relies on font metrics format\r\n    // attached to font objects by, among others,\r\n    // \"Willow Systems' standard_font_metrics plugin\"\r\n    // see jspdf.plugin.standard_font_metrics.js for format\r\n    // of the font.metadata.encoding Object.\r\n    // It should be something like\r\n    //   .encoding = {'codePages':['WinANSI....'], 'WinANSI...':{code:code, ...}}\r\n    //   .widths = {0:width, code:width, ..., 'fof':divisor}\r\n    //   .kerning = {code:{previous_char_code:shift, ..., 'fof':-divisor},...}\r\n    if (\r\n      (flags.autoencode || outputEncoding) &&\r\n      fonts[activeFontKey].metadata &&\r\n      fonts[activeFontKey].metadata[sourceEncoding] &&\r\n      fonts[activeFontKey].metadata[sourceEncoding].encoding\r\n    ) {\r\n      encodingBlock = fonts[activeFontKey].metadata[sourceEncoding].encoding;\r\n\r\n      // each font has default encoding. Some have it clearly defined.\r\n      if (!outputEncoding && fonts[activeFontKey].encoding) {\r\n        outputEncoding = fonts[activeFontKey].encoding;\r\n      }\r\n\r\n      // Hmmm, the above did not work? Let's try again, in different place.\r\n      if (!outputEncoding && encodingBlock.codePages) {\r\n        outputEncoding = encodingBlock.codePages[0]; // let's say, first one is the default\r\n      }\r\n\r\n      if (typeof outputEncoding === \"string\") {\r\n        outputEncoding = encodingBlock[outputEncoding];\r\n      }\r\n      // we want output encoding to be a JS Object, where\r\n      // key = sourceEncoding's character code and\r\n      // value = outputEncoding's character code.\r\n      if (outputEncoding) {\r\n        isUnicode = false;\r\n        newtext = [];\r\n        for (i = 0, l = text.length; i < l; i++) {\r\n          ch = outputEncoding[text.charCodeAt(i)];\r\n          if (ch) {\r\n            newtext.push(String.fromCharCode(ch));\r\n          } else {\r\n            newtext.push(text[i]);\r\n          }\r\n\r\n          // since we are looping over chars anyway, might as well\r\n          // check for residual unicodeness\r\n          if (newtext[i].charCodeAt(0) >> 8) {\r\n            /* more than 255 */\r\n            isUnicode = true;\r\n          }\r\n        }\r\n        text = newtext.join(\"\");\r\n      }\r\n    }\r\n\r\n    i = text.length;\r\n    // isUnicode may be set to false above. Hence the triple-equal to undefined\r\n    while (isUnicode === undefined && i !== 0) {\r\n      if (text.charCodeAt(i - 1) >> 8) {\r\n        /* more than 255 */\r\n        isUnicode = true;\r\n      }\r\n      i--;\r\n    }\r\n    if (!isUnicode) {\r\n      return text;\r\n    }\r\n\r\n    newtext = flags.noBOM ? [] : [254, 255];\r\n    for (i = 0, l = text.length; i < l; i++) {\r\n      ch = text.charCodeAt(i);\r\n      bch = ch >> 8; // divide by 256\r\n      if (bch >> 8) {\r\n        /* something left after dividing by 256 second time */\r\n        throw new Error(\r\n          \"Character at position \" +\r\n            i +\r\n            \" of string '\" +\r\n            text +\r\n            \"' exceeds 16bits. Cannot be encoded into UCS-2 BE\"\r\n        );\r\n      }\r\n      newtext.push(bch);\r\n      newtext.push(ch - (bch << 8));\r\n    }\r\n    return String.fromCharCode.apply(undefined, newtext);\r\n  };\r\n\r\n  var pdfEscape = (API.__private__.pdfEscape = API.pdfEscape = function(\r\n    text,\r\n    flags\r\n  ) {\r\n    /**\r\n     * Replace '/', '(', and ')' with pdf-safe versions\r\n     *\r\n     * Doing to8bitStream does NOT make this PDF display unicode text. For that\r\n     * we also need to reference a unicode font and embed it - royal pain in the rear.\r\n     *\r\n     * There is still a benefit to to8bitStream - PDF simply cannot handle 16bit chars,\r\n     * which JavaScript Strings are happy to provide. So, while we still cannot display\r\n     * 2-byte characters property, at least CONDITIONALLY converting (entire string containing)\r\n     * 16bit chars to (USC-2-BE) 2-bytes per char + BOM streams we ensure that entire PDF\r\n     * is still parseable.\r\n     * This will allow immediate support for unicode in document properties strings.\r\n     */\r\n    return to8bitStream(text, flags)\r\n      .replace(/\\\\/g, \"\\\\\\\\\")\r\n      .replace(/\\(/g, \"\\\\(\")\r\n      .replace(/\\)/g, \"\\\\)\");\r\n  });\r\n\r\n  var beginPage = (API.__private__.beginPage = function(format) {\r\n    pages[++page] = [];\r\n    pagesContext[page] = {\r\n      objId: 0,\r\n      contentsObjId: 0,\r\n      userUnit: Number(userUnit),\r\n      artBox: null,\r\n      bleedBox: null,\r\n      cropBox: null,\r\n      trimBox: null,\r\n      mediaBox: {\r\n        bottomLeftX: 0,\r\n        bottomLeftY: 0,\r\n        topRightX: Number(format[0]),\r\n        topRightY: Number(format[1])\r\n      }\r\n    };\r\n    _setPage(page);\r\n    setOutputDestination(pages[currentPage]);\r\n  });\r\n\r\n  var _addPage = function(parmFormat, parmOrientation) {\r\n    var dimensions, width, height;\r\n\r\n    orientation = parmOrientation || orientation;\r\n\r\n    if (typeof parmFormat === \"string\") {\r\n      dimensions = getPageFormat(parmFormat.toLowerCase());\r\n      if (Array.isArray(dimensions)) {\r\n        width = dimensions[0];\r\n        height = dimensions[1];\r\n      }\r\n    }\r\n\r\n    if (Array.isArray(parmFormat)) {\r\n      width = parmFormat[0] * scaleFactor;\r\n      height = parmFormat[1] * scaleFactor;\r\n    }\r\n\r\n    if (isNaN(width)) {\r\n      width = format[0];\r\n      height = format[1];\r\n    }\r\n\r\n    if (width > 14400 || height > 14400) {\r\n      console.warn(\r\n        \"A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400\"\r\n      );\r\n      width = Math.min(14400, width);\r\n      height = Math.min(14400, height);\r\n    }\r\n\r\n    format = [width, height];\r\n\r\n    switch (orientation.substr(0, 1)) {\r\n      case \"l\":\r\n        if (height > width) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n      case \"p\":\r\n        if (width > height) {\r\n          format = [height, width];\r\n        }\r\n        break;\r\n    }\r\n\r\n    beginPage(format);\r\n\r\n    // Set line width\r\n    setLineWidth(lineWidth);\r\n    // Set draw color\r\n    out(strokeColor);\r\n    // resurrecting non-default line caps, joins\r\n    if (lineCapID !== 0) {\r\n      out(lineCapID + \" J\");\r\n    }\r\n    if (lineJoinID !== 0) {\r\n      out(lineJoinID + \" j\");\r\n    }\r\n    events.publish(\"addPage\", {\r\n      pageNumber: page\r\n    });\r\n  };\r\n\r\n  var _deletePage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      pages.splice(n, 1);\r\n      pagesContext.splice(n, 1);\r\n      page--;\r\n      if (currentPage > page) {\r\n        currentPage = page;\r\n      }\r\n      this.setPage(currentPage);\r\n    }\r\n  };\r\n\r\n  var _setPage = function(n) {\r\n    if (n > 0 && n <= page) {\r\n      currentPage = n;\r\n    }\r\n  };\r\n\r\n  var getNumberOfPages = (API.__private__.getNumberOfPages = API.getNumberOfPages = function() {\r\n    return pages.length - 1;\r\n  });\r\n\r\n  /**\r\n   * Returns a document-specific font key - a label assigned to a\r\n   * font name + font type combination at the time the font was added\r\n   * to the font inventory.\r\n   *\r\n   * Font key is used as label for the desired font for a block of text\r\n   * to be added to the PDF document stream.\r\n   * @private\r\n   * @function\r\n   * @param fontName {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @param fontStyle {string} can be undefined on \"falthy\" to indicate \"use current\"\r\n   * @returns {string} Font key.\r\n   * @ignore\r\n   */\r\n  var getFont = function(fontName, fontStyle, options) {\r\n    var key = undefined,\r\n      fontNameLowerCase;\r\n    options = options || {};\r\n\r\n    fontName =\r\n      fontName !== undefined ? fontName : fonts[activeFontKey].fontName;\r\n    fontStyle =\r\n      fontStyle !== undefined ? fontStyle : fonts[activeFontKey].fontStyle;\r\n    fontNameLowerCase = fontName.toLowerCase();\r\n\r\n    if (\r\n      fontmap[fontNameLowerCase] !== undefined &&\r\n      fontmap[fontNameLowerCase][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontNameLowerCase][fontStyle];\r\n    } else if (\r\n      fontmap[fontName] !== undefined &&\r\n      fontmap[fontName][fontStyle] !== undefined\r\n    ) {\r\n      key = fontmap[fontName][fontStyle];\r\n    } else {\r\n      if (options.disableWarning === false) {\r\n        console.warn(\r\n          \"Unable to look up font label for font '\" +\r\n            fontName +\r\n            \"', '\" +\r\n            fontStyle +\r\n            \"'. Refer to getFontList() for available fonts.\"\r\n        );\r\n      }\r\n    }\r\n\r\n    if (!key && !options.noFallback) {\r\n      key = fontmap[\"times\"][fontStyle];\r\n      if (key == null) {\r\n        key = fontmap[\"times\"][\"normal\"];\r\n      }\r\n    }\r\n    return key;\r\n  };\r\n\r\n  var putInfo = (API.__private__.putInfo = function() {\r\n    var objectId = newObject();\r\n    var encryptor = function(data) {\r\n      return data;\r\n    };\r\n    if (encryptionOptions !== null) {\r\n      encryptor = encryption.encryptor(objectId, 0);\r\n    }\r\n    out(\"<<\");\r\n    out(\"/Producer (\" + pdfEscape(encryptor(\"jsPDF \" + jsPDF.version)) + \")\");\r\n    for (var key in documentProperties) {\r\n      if (documentProperties.hasOwnProperty(key) && documentProperties[key]) {\r\n        out(\r\n          \"/\" +\r\n            key.substr(0, 1).toUpperCase() +\r\n            key.substr(1) +\r\n            \" (\" +\r\n            pdfEscape(encryptor(documentProperties[key])) +\r\n            \")\"\r\n        );\r\n      }\r\n    }\r\n    out(\"/CreationDate (\" + pdfEscape(encryptor(creationDate)) + \")\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putCatalog = (API.__private__.putCatalog = function(options) {\r\n    options = options || {};\r\n    var tmpRootDictionaryObjId =\r\n      options.rootDictionaryObjId || rootDictionaryObjId;\r\n    newObject();\r\n    out(\"<<\");\r\n    out(\"/Type /Catalog\");\r\n    out(\"/Pages \" + tmpRootDictionaryObjId + \" 0 R\");\r\n    // PDF13ref Section 7.2.1\r\n    if (!zoomMode) zoomMode = \"fullwidth\";\r\n    switch (zoomMode) {\r\n      case \"fullwidth\":\r\n        out(\"/OpenAction [3 0 R /FitH null]\");\r\n        break;\r\n      case \"fullheight\":\r\n        out(\"/OpenAction [3 0 R /FitV null]\");\r\n        break;\r\n      case \"fullpage\":\r\n        out(\"/OpenAction [3 0 R /Fit]\");\r\n        break;\r\n      case \"original\":\r\n        out(\"/OpenAction [3 0 R /XYZ null null 1]\");\r\n        break;\r\n      default:\r\n        var pcn = \"\" + zoomMode;\r\n        if (pcn.substr(pcn.length - 1) === \"%\")\r\n          zoomMode = parseInt(zoomMode) / 100;\r\n        if (typeof zoomMode === \"number\") {\r\n          out(\"/OpenAction [3 0 R /XYZ null null \" + f2(zoomMode) + \"]\");\r\n        }\r\n    }\r\n    if (!layoutMode) layoutMode = \"continuous\";\r\n    switch (layoutMode) {\r\n      case \"continuous\":\r\n        out(\"/PageLayout /OneColumn\");\r\n        break;\r\n      case \"single\":\r\n        out(\"/PageLayout /SinglePage\");\r\n        break;\r\n      case \"two\":\r\n      case \"twoleft\":\r\n        out(\"/PageLayout /TwoColumnLeft\");\r\n        break;\r\n      case \"tworight\":\r\n        out(\"/PageLayout /TwoColumnRight\");\r\n        break;\r\n    }\r\n    if (pageMode) {\r\n      /**\r\n       * A name object specifying how the document should be displayed when opened:\r\n       * UseNone      : Neither document outline nor thumbnail images visible -- DEFAULT\r\n       * UseOutlines  : Document outline visible\r\n       * UseThumbs    : Thumbnail images visible\r\n       * FullScreen   : Full-screen mode, with no menu bar, window controls, or any other window visible\r\n       */\r\n      out(\"/PageMode /\" + pageMode);\r\n    }\r\n    events.publish(\"putCatalog\");\r\n    out(\">>\");\r\n    out(\"endobj\");\r\n  });\r\n\r\n  var putTrailer = (API.__private__.putTrailer = function() {\r\n    out(\"trailer\");\r\n    out(\"<<\");\r\n    out(\"/Size \" + (objectNumber + 1));\r\n    // Root and Info must be the last and second last objects written respectively\r\n    out(\"/Root \" + objectNumber + \" 0 R\");\r\n    out(\"/Info \" + (objectNumber - 1) + \" 0 R\");\r\n    if (encryptionOptions !== null) {\r\n      out(\"/Encrypt \" + encryption.oid + \" 0 R\");\r\n    }\r\n    out(\"/ID [ <\" + fileId + \"> <\" + fileId + \"> ]\");\r\n    out(\">>\");\r\n  });\r\n\r\n  var putHeader = (API.__private__.putHeader = function() {\r\n    out(\"%PDF-\" + pdfVersion);\r\n    out(\"%\\xBA\\xDF\\xAC\\xE0\");\r\n  });\r\n\r\n  var putXRef = (API.__private__.putXRef = function() {\r\n    var p = \"0000000000\";\r\n\r\n    out(\"xref\");\r\n    out(\"0 \" + (objectNumber + 1));\r\n    out(\"0000000000 65535 f \");\r\n    for (var i = 1; i <= objectNumber; i++) {\r\n      var offset = offsets[i];\r\n      if (typeof offset === \"function\") {\r\n        out((p + offsets[i]()).slice(-10) + \" 00000 n \");\r\n      } else {\r\n        if (typeof offsets[i] !== \"undefined\") {\r\n          out((p + offsets[i]).slice(-10) + \" 00000 n \");\r\n        } else {\r\n          out(\"0000000000 00000 n \");\r\n        }\r\n      }\r\n    }\r\n  });\r\n\r\n  var buildDocument = (API.__private__.buildDocument = function() {\r\n    resetDocument();\r\n    setOutputDestination(content);\r\n\r\n    events.publish(\"buildDocument\");\r\n\r\n    putHeader();\r\n    putPages();\r\n    putAdditionalObjects();\r\n    putResources();\r\n    if (encryptionOptions !== null) putEncryptionDict();\r\n    putInfo();\r\n    putCatalog();\r\n\r\n    var offsetOfXRef = contentLength;\r\n    putXRef();\r\n    putTrailer();\r\n    out(\"startxref\");\r\n    out(\"\" + offsetOfXRef);\r\n    out(\"%%EOF\");\r\n\r\n    setOutputDestination(pages[currentPage]);\r\n\r\n    return content.join(\"\\n\");\r\n  });\r\n\r\n  var getBlob = (API.__private__.getBlob = function(data) {\r\n    return new Blob([getArrayBuffer(data)], {\r\n      type: \"application/pdf\"\r\n    });\r\n  });\r\n\r\n  /**\r\n   * Generates the PDF document.\r\n   *\r\n   * If `type` argument is undefined, output is raw body of resulting PDF returned as a string.\r\n   *\r\n   * @param {string} type A string identifying one of the possible output types.<br/>\r\n   *                      Possible values are: <br/>\r\n   *                          'arraybuffer' -> (ArrayBuffer)<br/>\r\n   *                          'blob' -> (Blob)<br/>\r\n   *                          'bloburi'/'bloburl' -> (string)<br/>\r\n   *                          'datauristring'/'dataurlstring' -> (string)<br/>\r\n   *                          'datauri'/'dataurl' -> (undefined) -> change location to generated datauristring/dataurlstring<br/>\r\n   *                          'dataurlnewwindow' -> (window | null | undefined) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfobjectnewwindow' -> (window | null) throws error if global isn't a window object(node)<br/>\r\n   *                          'pdfjsnewwindow' -> (wind | null)\r\n   * @param {Object|string} options An object providing some additional signalling to PDF generator.<br/>\r\n   *                                Possible options are 'filename'.<br/>\r\n   *                                A string can be passed instead of {filename:string} and defaults to 'generated.pdf'\r\n   * @function\r\n   * @instance\r\n   * @returns {string|window|ArrayBuffer|Blob|jsPDF|null|undefined}\r\n   * @memberof jsPDF#\r\n   * @name output\r\n   */\r\n  var output = (API.output = API.__private__.output = SAFE(function output(\r\n    type,\r\n    options\r\n  ) {\r\n    options = options || {};\r\n\r\n    if (typeof options === \"string\") {\r\n      options = {\r\n        filename: options\r\n      };\r\n    } else {\r\n      options.filename = options.filename || \"generated.pdf\";\r\n    }\r\n\r\n    switch (type) {\r\n      case undefined:\r\n        return buildDocument();\r\n      case \"save\":\r\n        API.save(options.filename);\r\n        break;\r\n      case \"arraybuffer\":\r\n        return getArrayBuffer(buildDocument());\r\n      case \"blob\":\r\n        return getBlob(buildDocument());\r\n      case \"bloburi\":\r\n      case \"bloburl\":\r\n        // Developer is responsible of calling revokeObjectURL\r\n        if (\r\n          typeof globalObject.URL !== \"undefined\" &&\r\n          typeof globalObject.URL.createObjectURL === \"function\"\r\n        ) {\r\n          return (\r\n            (globalObject.URL &&\r\n              globalObject.URL.createObjectURL(getBlob(buildDocument()))) ||\r\n            void 0\r\n          );\r\n        } else {\r\n          console.warn(\r\n            \"bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauristring\":\r\n      case \"dataurlstring\":\r\n        var dataURI = \"\";\r\n        var pdfDocument = buildDocument();\r\n        try {\r\n          dataURI = btoa(pdfDocument);\r\n        } catch (e) {\r\n          dataURI = btoa(unescape(encodeURIComponent(pdfDocument)));\r\n        }\r\n        return (\r\n          \"data:application/pdf;filename=\" +\r\n          options.filename +\r\n          \";base64,\" +\r\n          dataURI\r\n        );\r\n      case \"pdfobjectnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfObjectUrl =\r\n            \"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js\";\r\n          var integrity =\r\n            ' integrity=\"sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==\" crossorigin=\"anonymous\"';\r\n\r\n          if (options.pdfObjectUrl) {\r\n            pdfObjectUrl = options.pdfObjectUrl;\r\n            integrity = \"\";\r\n          }\r\n\r\n          var htmlForNewWindow =\r\n            \"<html>\" +\r\n            '<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src=\"' +\r\n            pdfObjectUrl +\r\n            '\"' +\r\n            integrity +\r\n            '></script><script >PDFObject.embed(\"' +\r\n            this.output(\"dataurlstring\") +\r\n            '\", ' +\r\n            JSON.stringify(options) +\r\n            \");</script></body></html>\";\r\n          var nW = globalObject.open();\r\n\r\n          if (nW !== null) {\r\n            nW.document.write(htmlForNewWindow);\r\n          }\r\n          return nW;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfobjectnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"pdfjsnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var pdfJsUrl = options.pdfJsUrl || \"examples/PDF.js/web/viewer.html\";\r\n          var htmlForPDFjsNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            '<body><iframe id=\"pdfViewer\" src=\"' +\r\n            pdfJsUrl +\r\n            \"?file=&downloadName=\" +\r\n            options.filename +\r\n            '\" width=\"500px\" height=\"400px\" />' +\r\n            \"</body></html>\";\r\n          var PDFjsNewWindow = globalObject.open();\r\n\r\n          if (PDFjsNewWindow !== null) {\r\n            PDFjsNewWindow.document.write(htmlForPDFjsNewWindow);\r\n            var scope = this;\r\n            PDFjsNewWindow.document.documentElement.querySelector(\r\n              \"#pdfViewer\"\r\n            ).onload = function() {\r\n              PDFjsNewWindow.document.title = options.filename;\r\n              PDFjsNewWindow.document.documentElement\r\n                .querySelector(\"#pdfViewer\")\r\n                .contentWindow.PDFViewerApplication.open(\r\n                  scope.output(\"bloburl\")\r\n                );\r\n            };\r\n          }\r\n          return PDFjsNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option pdfjsnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n      case \"dataurlnewwindow\":\r\n        if (\r\n          Object.prototype.toString.call(globalObject) === \"[object Window]\"\r\n        ) {\r\n          var htmlForDataURLNewWindow =\r\n            \"<html>\" +\r\n            \"<style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style>\" +\r\n            \"<body>\" +\r\n            '<iframe src=\"' +\r\n            this.output(\"datauristring\", options) +\r\n            '\"></iframe>' +\r\n            \"</body></html>\";\r\n          var dataURLNewWindow = globalObject.open();\r\n          if (dataURLNewWindow !== null) {\r\n            dataURLNewWindow.document.write(htmlForDataURLNewWindow);\r\n            dataURLNewWindow.document.title = options.filename;\r\n          }\r\n          if (dataURLNewWindow || typeof safari === \"undefined\")\r\n            return dataURLNewWindow;\r\n        } else {\r\n          throw new Error(\r\n            \"The option dataurlnewwindow just works in a browser-environment.\"\r\n          );\r\n        }\r\n        break;\r\n      case \"datauri\":\r\n      case \"dataurl\":\r\n        return (globalObject.document.location.href = this.output(\r\n          \"datauristring\",\r\n          options\r\n        ));\r\n      default:\r\n        return null;\r\n    }\r\n  }));\r\n\r\n  /**\r\n   * Used to see if a supplied hotfix was requested when the pdf instance was created.\r\n   * @param {string} hotfixName - The name of the hotfix to check.\r\n   * @returns {boolean}\r\n   */\r\n  var hasHotfix = function(hotfixName) {\r\n    return (\r\n      Array.isArray(hotfixes) === true && hotfixes.indexOf(hotfixName) > -1\r\n    );\r\n  };\r\n\r\n  switch (unit) {\r\n    case \"pt\":\r\n      scaleFactor = 1;\r\n      break;\r\n    case \"mm\":\r\n      scaleFactor = 72 / 25.4;\r\n      break;\r\n    case \"cm\":\r\n      scaleFactor = 72 / 2.54;\r\n      break;\r\n    case \"in\":\r\n      scaleFactor = 72;\r\n      break;\r\n    case \"px\":\r\n      if (hasHotfix(\"px_scaling\") == true) {\r\n        scaleFactor = 72 / 96;\r\n      } else {\r\n        scaleFactor = 96 / 72;\r\n      }\r\n      break;\r\n    case \"pc\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"em\":\r\n      scaleFactor = 12;\r\n      break;\r\n    case \"ex\":\r\n      scaleFactor = 6;\r\n      break;\r\n    default:\r\n      if (typeof unit === \"number\") {\r\n        scaleFactor = unit;\r\n      } else {\r\n        throw new Error(\"Invalid unit: \" + unit);\r\n      }\r\n  }\r\n\r\n  var encryption = null;\r\n  setCreationDate();\r\n  setFileId();\r\n\r\n  var getEncryptor = function(objectId) {\r\n    if (encryptionOptions !== null) {\r\n      return encryption.encryptor(objectId, 0);\r\n    }\r\n    return function(data) {\r\n      return data;\r\n    };\r\n  };\r\n\r\n  //---------------------------------------\r\n  // Public API\r\n\r\n  var getPageInfo = (API.__private__.getPageInfo = API.getPageInfo = function(\r\n    pageNumberOneBased\r\n  ) {\r\n    if (isNaN(pageNumberOneBased) || pageNumberOneBased % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfo\");\r\n    }\r\n    var objId = pagesContext[pageNumberOneBased].objId;\r\n    return {\r\n      objId: objId,\r\n      pageNumber: pageNumberOneBased,\r\n      pageContext: pagesContext[pageNumberOneBased]\r\n    };\r\n  });\r\n\r\n  var getPageInfoByObjId = (API.__private__.getPageInfoByObjId = function(\r\n    objId\r\n  ) {\r\n    if (isNaN(objId) || objId % 1 !== 0) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.getPageInfoByObjId\");\r\n    }\r\n    for (var pageNumber in pagesContext) {\r\n      if (pagesContext[pageNumber].objId === objId) {\r\n        break;\r\n      }\r\n    }\r\n    return getPageInfo(pageNumber);\r\n  });\r\n\r\n  var getCurrentPageInfo = (API.__private__.getCurrentPageInfo = API.getCurrentPageInfo = function() {\r\n    return {\r\n      objId: pagesContext[currentPage].objId,\r\n      pageNumber: currentPage,\r\n      pageContext: pagesContext[currentPage]\r\n    };\r\n  });\r\n\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @param format {String/Array} The format of the new page. Can be: <ul><li>a0 - a10</li><li>b0 - b10</li><li>c0 - c10</li><li>dl</li><li>letter</li><li>government-letter</li><li>legal</li><li>junior-legal</li><li>ledger</li><li>tabloid</li><li>credit-card</li></ul><br />\r\n   * Default is \"a4\". If you want to use your own format just pass instead of one of the above predefined formats the size as an number-array, e.g. [595.28, 841.89]\r\n   * @param orientation {string} Orientation of the new page. Possible values are \"portrait\" or \"landscape\" (or shortcuts \"p\" (Default), \"l\").\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addPage\r\n   */\r\n  API.addPage = function() {\r\n    _addPage.apply(this, arguments);\r\n    return this;\r\n  };\r\n  /**\r\n   * Adds (and transfers the focus to) new page to the PDF document.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name setPage\r\n   * @param {number} page Switch the active page to the page number specified (indexed starting at 1).\r\n   * @example\r\n   * doc = jsPDF()\r\n   * doc.addPage()\r\n   * doc.addPage()\r\n   * doc.text('I am on page 3', 10, 10)\r\n   * doc.setPage(1)\r\n   * doc.text('I am on page 1', 10, 10)\r\n   */\r\n  API.setPage = function() {\r\n    _setPage.apply(this, arguments);\r\n    setOutputDestination.call(this, pages[currentPage]);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name insertPage\r\n   * @memberof jsPDF#\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {Object} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.insertPage = function(beforePage) {\r\n    this.addPage();\r\n    this.movePage(currentPage, beforePage);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * @name movePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @instance\r\n   * @param {number} targetPage\r\n   * @param {number} beforePage\r\n   * @returns {jsPDF}\r\n   */\r\n  API.movePage = function(targetPage, beforePage) {\r\n    var tmpPages, tmpPagesContext;\r\n    if (targetPage > beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var i = targetPage; i > beforePage; i--) {\r\n        pages[i] = pages[i - 1];\r\n        pagesContext[i] = pagesContext[i - 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    } else if (targetPage < beforePage) {\r\n      tmpPages = pages[targetPage];\r\n      tmpPagesContext = pagesContext[targetPage];\r\n      for (var j = targetPage; j < beforePage; j++) {\r\n        pages[j] = pages[j + 1];\r\n        pagesContext[j] = pagesContext[j + 1];\r\n      }\r\n      pages[beforePage] = tmpPages;\r\n      pagesContext[beforePage] = tmpPagesContext;\r\n      this.setPage(beforePage);\r\n    }\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Deletes a page from the PDF.\r\n   * @name deletePage\r\n   * @memberof jsPDF#\r\n   * @function\r\n   * @param {number} targetPage\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   */\r\n  API.deletePage = function() {\r\n    _deletePage.apply(this, arguments);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds text to page. Supports adding multiline text when 'text' argument is an Array of Strings.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @param {String|Array} text String or array of strings to be added to the page. Each line is shifted one line down per font, spacing settings declared before this call.\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page.\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page.\r\n   * @param {Object} [options] - Collection of settings signaling how the text must be encoded.\r\n   * @param {string} [options.align=left] - The alignment of the text, possible values: left, center, right, justify.\r\n   * @param {string} [options.baseline=alphabetic] - Sets text baseline used when drawing the text, possible values: alphabetic, ideographic, bottom, top, middle, hanging\r\n   * @param {number|Matrix} [options.angle=0] - Rotate the text clockwise or counterclockwise. Expects the angle in degree.\r\n   * @param {number} [options.rotationDirection=1] - Direction of the rotation. 0 = clockwise, 1 = counterclockwise.\r\n   * @param {number} [options.charSpace=0] - The space between each letter.\r\n   * @param {number} [options.horizontalScale=1] - Horizontal scale of the text as a factor of the regular size.\r\n   * @param {number} [options.lineHeightFactor=1.15] - The lineheight of each line.\r\n   * @param {Object} [options.flags] - Flags for to8bitStream.\r\n   * @param {boolean} [options.flags.noBOM=true] - Don't add BOM to Unicode-text.\r\n   * @param {boolean} [options.flags.autoencode=true] - Autoencode the Text.\r\n   * @param {number} [options.maxWidth=0] - Split the text by given width, 0 = no split.\r\n   * @param {string} [options.renderingMode=fill] - Set how the text should be rendered, possible values: fill, stroke, fillThenStroke, invisible, fillAndAddForClipping, strokeAndAddPathForClipping, fillThenStrokeAndAddToPathForClipping, addToPathForClipping.\r\n   * @param {boolean} [options.isInputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputVisual] - Option for the BidiEngine\r\n   * @param {boolean} [options.isInputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isOutputRtl] - Option for the BidiEngine\r\n   * @param {boolean} [options.isSymmetricSwapping] - Option for the BidiEngine\r\n   * @param {number|Matrix} transform If transform is a number the text will be rotated by this value around the anchor set by x and y.\r\n   *\r\n   * If it is a Matrix, this matrix gets directly applied to the text, which allows shearing\r\n   * effects etc.; the x and y offsets are then applied AFTER the coordinate system has been established by this\r\n   * matrix. This means passing a rotation matrix that is equivalent to some rotation angle will in general yield a\r\n   * DIFFERENT result. A matrix is only allowed in \"advanced\" API mode.\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name text\r\n   */\r\n  API.__private__.text = API.text = function(text, x, y, options, transform) {\r\n    /*\r\n     * Inserts something like this into PDF\r\n     *   BT\r\n     *    /F1 16 Tf  % Font name + size\r\n     *    16 TL % How many units down for next line in multiline text\r\n     *    0 g % color\r\n     *    28.35 813.54 Td % position\r\n     *    (line one) Tj\r\n     *    T* (line two) Tj\r\n     *    T* (line three) Tj\r\n     *   ET\r\n     */\r\n    options = options || {};\r\n    var scope = options.scope || this;\r\n    var payload, da, angle, align, charSpace, maxWidth, flags, horizontalScale;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, text, flags)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(data, coordinates... , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (\r\n      typeof text === \"number\" &&\r\n      typeof x === \"number\" &&\r\n      (typeof y === \"string\" || Array.isArray(y))\r\n    ) {\r\n      var tmp = y;\r\n      y = x;\r\n      x = text;\r\n      text = tmp;\r\n    }\r\n\r\n    var transformationMatrix;\r\n\r\n    if (arguments[3] instanceof Matrix === false) {\r\n      flags = arguments[3];\r\n      angle = arguments[4];\r\n      align = arguments[5];\r\n\r\n      if (typeof flags !== \"object\" || flags === null) {\r\n        if (typeof angle === \"string\") {\r\n          align = angle;\r\n          angle = null;\r\n        }\r\n        if (typeof flags === \"string\") {\r\n          align = flags;\r\n          flags = null;\r\n        }\r\n        if (typeof flags === \"number\") {\r\n          angle = flags;\r\n          flags = null;\r\n        }\r\n        options = {\r\n          flags: flags,\r\n          angle: angle,\r\n          align: align\r\n        };\r\n      }\r\n    } else {\r\n      advancedApiModeTrap(\r\n        \"The transform parameter of text() with a Matrix value\"\r\n      );\r\n      transformationMatrix = transform;\r\n    }\r\n\r\n    if (isNaN(x) || isNaN(y) || typeof text === \"undefined\" || text === null) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.text\");\r\n    }\r\n\r\n    if (text.length === 0) {\r\n      return scope;\r\n    }\r\n\r\n    var xtra = \"\";\r\n    var isHex = false;\r\n    var lineHeight =\r\n      typeof options.lineHeightFactor === \"number\"\r\n        ? options.lineHeightFactor\r\n        : lineHeightFactor;\r\n    var scaleFactor = scope.internal.scaleFactor;\r\n\r\n    function ESC(s) {\r\n      s = s.split(\"\\t\").join(Array(options.TabLen || 9).join(\" \"));\r\n      return pdfEscape(s, flags);\r\n    }\r\n\r\n    function transformTextToSpecialArray(text) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      var da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (typeof curDa === \"string\") {\r\n          da.push(curDa);\r\n        } else {\r\n          if (\r\n            Array.isArray(text) &&\r\n            (curDa.length === 1 ||\r\n              (curDa[1] === undefined && curDa[2] === undefined))\r\n          ) {\r\n            da.push(curDa[0]);\r\n          } else {\r\n            da.push([curDa[0], curDa[1], curDa[2]]);\r\n          }\r\n        }\r\n      }\r\n      return da;\r\n    }\r\n\r\n    function processTextByFunction(text, processingFunction) {\r\n      var result;\r\n      if (typeof text === \"string\") {\r\n        result = processingFunction(text)[0];\r\n      } else if (Array.isArray(text)) {\r\n        //we don't want to destroy original text array, so cloning it\r\n        var sa = text.concat();\r\n        var da = [];\r\n        var len = sa.length;\r\n        var curDa;\r\n        var tmpResult;\r\n        //we do array.join('text that must not be PDFescaped\")\r\n        //thus, pdfEscape each component separately\r\n        while (len--) {\r\n          curDa = sa.shift();\r\n          if (typeof curDa === \"string\") {\r\n            da.push(processingFunction(curDa)[0]);\r\n          } else if (Array.isArray(curDa) && typeof curDa[0] === \"string\") {\r\n            tmpResult = processingFunction(curDa[0], curDa[1], curDa[2]);\r\n            da.push([tmpResult[0], tmpResult[1], tmpResult[2]]);\r\n          }\r\n        }\r\n        result = da;\r\n      }\r\n      return result;\r\n    }\r\n\r\n    //Check if text is of type String\r\n    var textIsOfTypeString = false;\r\n    var tmpTextIsOfTypeString = true;\r\n\r\n    if (typeof text === \"string\") {\r\n      textIsOfTypeString = true;\r\n    } else if (Array.isArray(text)) {\r\n      //we don't want to destroy original text array, so cloning it\r\n      var sa = text.concat();\r\n      da = [];\r\n      var len = sa.length;\r\n      var curDa;\r\n      //we do array.join('text that must not be PDFescaped\")\r\n      //thus, pdfEscape each component separately\r\n      while (len--) {\r\n        curDa = sa.shift();\r\n        if (\r\n          typeof curDa !== \"string\" ||\r\n          (Array.isArray(curDa) && typeof curDa[0] !== \"string\")\r\n        ) {\r\n          tmpTextIsOfTypeString = false;\r\n        }\r\n      }\r\n      textIsOfTypeString = tmpTextIsOfTypeString;\r\n    }\r\n    if (textIsOfTypeString === false) {\r\n      throw new Error(\r\n        'Type of text must be string or Array. \"' +\r\n          text +\r\n          '\" is not recognized.'\r\n      );\r\n    }\r\n\r\n    //If there are any newlines in text, we assume\r\n    //the user wanted to print multiple lines, so break the\r\n    //text up into an array. If the text is already an array,\r\n    //we assume the user knows what they are doing.\r\n    //Convert text into an array anyway to simplify\r\n    //later code.\r\n\r\n    if (typeof text === \"string\") {\r\n      if (text.match(/[\\r?\\n]/)) {\r\n        text = text.split(/\\r\\n|\\r|\\n/g);\r\n      } else {\r\n        text = [text];\r\n      }\r\n    }\r\n\r\n    //baseline\r\n    var height = activeFontSize / scope.internal.scaleFactor;\r\n    var descent = height * (lineHeight - 1);\r\n\r\n    switch (options.baseline) {\r\n      case \"bottom\":\r\n        y -= descent;\r\n        break;\r\n      case \"top\":\r\n        y += height - descent;\r\n        break;\r\n      case \"hanging\":\r\n        y += height - 2 * descent;\r\n        break;\r\n      case \"middle\":\r\n        y += height / 2 - descent;\r\n        break;\r\n      case \"ideographic\":\r\n      case \"alphabetic\":\r\n      default:\r\n        // do nothing, everything is fine\r\n        break;\r\n    }\r\n\r\n    //multiline\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    if (maxWidth > 0) {\r\n      if (typeof text === \"string\") {\r\n        text = scope.splitTextToSize(text, maxWidth);\r\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n        text = text.reduce(function(acc, textLine) {\r\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\r\n        }, []);\r\n      }\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"preProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    options = payload.options;\r\n\r\n    //angle\r\n    angle = options.angle;\r\n\r\n    if (\r\n      transformationMatrix instanceof Matrix === false &&\r\n      angle &&\r\n      typeof angle === \"number\"\r\n    ) {\r\n      angle *= Math.PI / 180;\r\n\r\n      if (options.rotationDirection === 0) {\r\n        angle = -angle;\r\n      }\r\n\r\n      if (apiMode === ApiMode.ADVANCED) {\r\n        angle = -angle;\r\n      }\r\n\r\n      var c = Math.cos(angle);\r\n      var s = Math.sin(angle);\r\n      transformationMatrix = new Matrix(c, s, -s, c, 0, 0);\r\n    } else if (angle && angle instanceof Matrix) {\r\n      transformationMatrix = angle;\r\n    }\r\n\r\n    if (apiMode === ApiMode.ADVANCED && !transformationMatrix) {\r\n      transformationMatrix = identityMatrix;\r\n    }\r\n\r\n    //charSpace\r\n\r\n    charSpace = options.charSpace || activeCharSpace;\r\n\r\n    if (typeof charSpace !== \"undefined\") {\r\n      xtra += hpf(scale(charSpace)) + \" Tc\\n\";\r\n      this.setCharSpace(this.getCharSpace() || 0);\r\n    }\r\n\r\n    horizontalScale = options.horizontalScale;\r\n    if (typeof horizontalScale !== \"undefined\") {\r\n      xtra += hpf(horizontalScale * 100) + \" Tz\\n\";\r\n    }\r\n\r\n    //lang\r\n\r\n    var lang = options.lang;\r\n\r\n    if (lang) {\r\n      //    xtra += \"/Lang (\" + lang +\")\\n\";\r\n    }\r\n\r\n    //renderingMode\r\n    var renderingMode = -1;\r\n    var parmRenderingMode =\r\n      typeof options.renderingMode !== \"undefined\"\r\n        ? options.renderingMode\r\n        : options.stroke;\r\n    var pageContext = scope.internal.getCurrentPageInfo().pageContext;\r\n\r\n    switch (parmRenderingMode) {\r\n      case 0:\r\n      case false:\r\n      case \"fill\":\r\n        renderingMode = 0;\r\n        break;\r\n      case 1:\r\n      case true:\r\n      case \"stroke\":\r\n        renderingMode = 1;\r\n        break;\r\n      case 2:\r\n      case \"fillThenStroke\":\r\n        renderingMode = 2;\r\n        break;\r\n      case 3:\r\n      case \"invisible\":\r\n        renderingMode = 3;\r\n        break;\r\n      case 4:\r\n      case \"fillAndAddForClipping\":\r\n        renderingMode = 4;\r\n        break;\r\n      case 5:\r\n      case \"strokeAndAddPathForClipping\":\r\n        renderingMode = 5;\r\n        break;\r\n      case 6:\r\n      case \"fillThenStrokeAndAddToPathForClipping\":\r\n        renderingMode = 6;\r\n        break;\r\n      case 7:\r\n      case \"addToPathForClipping\":\r\n        renderingMode = 7;\r\n        break;\r\n    }\r\n\r\n    var usedRenderingMode =\r\n      typeof pageContext.usedRenderingMode !== \"undefined\"\r\n        ? pageContext.usedRenderingMode\r\n        : -1;\r\n\r\n    //if the coder wrote it explicitly to use a specific\r\n    //renderingMode, then use it\r\n    if (renderingMode !== -1) {\r\n      xtra += renderingMode + \" Tr\\n\";\r\n      //otherwise check if we used the rendering Mode already\r\n      //if so then set the rendering Mode...\r\n    } else if (usedRenderingMode !== -1) {\r\n      xtra += \"0 Tr\\n\";\r\n    }\r\n\r\n    if (renderingMode !== -1) {\r\n      pageContext.usedRenderingMode = renderingMode;\r\n    }\r\n\r\n    //align\r\n    align = options.align || \"left\";\r\n    var leading = activeFontSize * lineHeight;\r\n    var pageWidth = scope.internal.pageSize.getWidth();\r\n    var activeFont = fonts[activeFontKey];\r\n    charSpace = options.charSpace || activeCharSpace;\r\n    maxWidth = options.maxWidth || 0;\r\n\r\n    var lineWidths;\r\n    flags = Object.assign({ autoencode: true, noBOM: true }, options.flags);\r\n\r\n    var wordSpacingPerLine = [];\r\n    var findWidth = function(v) {\r\n      return (\r\n        (scope.getStringUnitWidth(v, {\r\n          font: activeFont,\r\n          charSpace: charSpace,\r\n          fontSize: activeFontSize,\r\n          doKerning: false\r\n        }) *\r\n          activeFontSize) /\r\n        scaleFactor\r\n      );\r\n    };\r\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\r\n      da = transformTextToSpecialArray(text);\r\n      var newY;\r\n      if (align !== \"left\") {\r\n        lineWidths = da.map(findWidth);\r\n      }\r\n      //The first line uses the \"main\" Td setting,\r\n      //and the subsequent lines are offset by the\r\n      //previous line's x coordinate.\r\n      var prevWidth = 0;\r\n      var newX;\r\n      if (align === \"right\") {\r\n        //The passed in x coordinate defines the\r\n        //rightmost point of the text.\r\n        x -= lineWidths[0];\r\n        text = [];\r\n        len = da.length;\r\n        for (var i = 0; i < len; i++) {\r\n          if (i === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale(prevWidth - lineWidths[i]);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[i], newX, newY]);\r\n          prevWidth = lineWidths[i];\r\n        }\r\n      } else if (align === \"center\") {\r\n        //The passed in x coordinate defines\r\n        //the center point.\r\n        x -= lineWidths[0] / 2;\r\n        text = [];\r\n        len = da.length;\r\n        for (var j = 0; j < len; j++) {\r\n          if (j === 0) {\r\n            newX = getHorizontalCoordinate(x);\r\n            newY = getVerticalCoordinate(y);\r\n          } else {\r\n            newX = scale((prevWidth - lineWidths[j]) / 2);\r\n            newY = -leading;\r\n          }\r\n          text.push([da[j], newX, newY]);\r\n          prevWidth = lineWidths[j];\r\n        }\r\n      } else if (align === \"left\") {\r\n        text = [];\r\n        len = da.length;\r\n        for (var h = 0; h < len; h++) {\r\n          text.push(da[h]);\r\n        }\r\n      } else if (align === \"justify\" && activeFont.encoding === \"Identity-H\") {\r\n        // when using unicode fonts, wordSpacePerLine does not apply\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        let backToStartX = 0;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : backToStartX;\r\n          if (l < len - 1) {\r\n            let spacing = scale(\r\n              (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n            );\r\n            let words = da[l].split(\" \");\r\n            text.push([words[0] + \" \", newX, newY]);\r\n            backToStartX = 0; // distance to reset back to the left\r\n            for (let i = 1; i < words.length; i++) {\r\n              let shiftAmount =\r\n                (findWidth(words[i - 1] + \" \" + words[i]) -\r\n                  findWidth(words[i])) *\r\n                  scaleFactor +\r\n                spacing;\r\n              if (i == words.length - 1) text.push([words[i], shiftAmount, 0]);\r\n              else text.push([words[i] + \" \", shiftAmount, 0]);\r\n              backToStartX -= shiftAmount;\r\n            }\r\n          } else {\r\n            text.push([da[l], newX, newY]);\r\n          }\r\n        }\r\n        text.push([\"\", backToStartX, 0]);\r\n      } else if (align === \"justify\") {\r\n        text = [];\r\n        len = da.length;\r\n        maxWidth = maxWidth !== 0 ? maxWidth : pageWidth;\r\n        for (var l = 0; l < len; l++) {\r\n          newY = l === 0 ? getVerticalCoordinate(y) : -leading;\r\n          newX = l === 0 ? getHorizontalCoordinate(x) : 0;\r\n          if (l < len - 1) {\r\n            wordSpacingPerLine.push(\r\n              hpf(\r\n                scale(\r\n                  (maxWidth - lineWidths[l]) / (da[l].split(\" \").length - 1)\r\n                )\r\n              )\r\n            );\r\n          } else {\r\n            wordSpacingPerLine.push(0);\r\n          }\r\n          text.push([da[l], newX, newY]);\r\n        }\r\n      } else {\r\n        throw new Error(\r\n          'Unrecognized alignment option, use \"left\", \"center\", \"right\" or \"justify\".'\r\n        );\r\n      }\r\n    }\r\n\r\n    //R2L\r\n    var doReversing = typeof options.R2L === \"boolean\" ? options.R2L : R2L;\r\n    if (doReversing === true) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [\r\n          text\r\n            .split(\"\")\r\n            .reverse()\r\n            .join(\"\"),\r\n          posX,\r\n          posY\r\n        ];\r\n      });\r\n    }\r\n\r\n    //creating Payload-Object to make text byRef\r\n    payload = {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      options: options,\r\n      mutex: {\r\n        pdfEscape: pdfEscape,\r\n        activeFontKey: activeFontKey,\r\n        fonts: fonts,\r\n        activeFontSize: activeFontSize\r\n      }\r\n    };\r\n    events.publish(\"postProcessText\", payload);\r\n\r\n    text = payload.text;\r\n    isHex = payload.mutex.isHex || false;\r\n\r\n    //Escaping\r\n    var activeFontEncoding = fonts[activeFontKey].encoding;\r\n\r\n    if (\r\n      activeFontEncoding === \"WinAnsiEncoding\" ||\r\n      activeFontEncoding === \"StandardEncoding\"\r\n    ) {\r\n      text = processTextByFunction(text, function(text, posX, posY) {\r\n        return [ESC(text), posX, posY];\r\n      });\r\n    }\r\n\r\n    da = transformTextToSpecialArray(text);\r\n\r\n    text = [];\r\n    var STRING = 0;\r\n    var ARRAY = 1;\r\n    var variant = Array.isArray(da[0]) ? ARRAY : STRING;\r\n    var posX;\r\n    var posY;\r\n    var content;\r\n    var wordSpacing = \"\";\r\n\r\n    var generatePosition = function(\r\n      parmPosX,\r\n      parmPosY,\r\n      parmTransformationMatrix\r\n    ) {\r\n      var position = \"\";\r\n      if (parmTransformationMatrix instanceof Matrix) {\r\n        // It is kind of more intuitive to apply a plain rotation around the text anchor set by x and y\r\n        // but when the user supplies an arbitrary transformation matrix, the x and y offsets should be applied\r\n        // in the coordinate system established by this matrix\r\n        if (typeof options.angle === \"number\") {\r\n          parmTransformationMatrix = matrixMult(\r\n            parmTransformationMatrix,\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY)\r\n          );\r\n        } else {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, 1, parmPosX, parmPosY),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        if (apiMode === ApiMode.ADVANCED) {\r\n          parmTransformationMatrix = matrixMult(\r\n            new Matrix(1, 0, 0, -1, 0, 0),\r\n            parmTransformationMatrix\r\n          );\r\n        }\r\n\r\n        position = parmTransformationMatrix.join(\" \") + \" Tm\\n\";\r\n      } else {\r\n        position = hpf(parmPosX) + \" \" + hpf(parmPosY) + \" Td\\n\";\r\n      }\r\n      return position;\r\n    };\r\n\r\n    for (var lineIndex = 0; lineIndex < da.length; lineIndex++) {\r\n      wordSpacing = \"\";\r\n\r\n      switch (variant) {\r\n        case ARRAY:\r\n          content =\r\n            (isHex ? \"<\" : \"(\") + da[lineIndex][0] + (isHex ? \">\" : \")\");\r\n          posX = parseFloat(da[lineIndex][1]);\r\n          posY = parseFloat(da[lineIndex][2]);\r\n          break;\r\n        case STRING:\r\n          content = (isHex ? \"<\" : \"(\") + da[lineIndex] + (isHex ? \">\" : \")\");\r\n          posX = getHorizontalCoordinate(x);\r\n          posY = getVerticalCoordinate(y);\r\n          break;\r\n      }\r\n\r\n      if (\r\n        typeof wordSpacingPerLine !== \"undefined\" &&\r\n        typeof wordSpacingPerLine[lineIndex] !== \"undefined\"\r\n      ) {\r\n        wordSpacing = wordSpacingPerLine[lineIndex] + \" Tw\\n\";\r\n      }\r\n\r\n      if (lineIndex === 0) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      } else if (variant === STRING) {\r\n        text.push(wordSpacing + content);\r\n      } else if (variant === ARRAY) {\r\n        text.push(\r\n          wordSpacing +\r\n            generatePosition(posX, posY, transformationMatrix) +\r\n            content\r\n        );\r\n      }\r\n    }\r\n\r\n    text = variant === STRING ? text.join(\" Tj\\nT* \") : text.join(\" Tj\\n\");\r\n    text += \" Tj\\n\";\r\n\r\n    var result = \"BT\\n/\";\r\n    result += activeFontKey + \" \" + activeFontSize + \" Tf\\n\"; // font face, style, size\r\n    result += hpf(activeFontSize * lineHeight) + \" TL\\n\"; // line spacing\r\n    result += textColor + \"\\n\";\r\n    result += xtra;\r\n    result += text;\r\n    result += \"ET\";\r\n\r\n    out(result);\r\n    usedFonts[activeFontKey] = true;\r\n    return scope;\r\n  };\r\n\r\n  // PDF supports these path painting and clip path operators:\r\n  //\r\n  // S - stroke\r\n  // s - close/stroke\r\n  // f (F) - fill non-zero\r\n  // f* - fill evenodd\r\n  // B - fill stroke nonzero\r\n  // B* - fill stroke evenodd\r\n  // b - close fill stroke nonzero\r\n  // b* - close fill stroke evenodd\r\n  // n - nothing (consume path)\r\n  // W - clip nonzero\r\n  // W* - clip evenodd\r\n  //\r\n  // In order to keep the API small, we omit the close-and-fill/stroke operators and provide a separate close()\r\n  // method.\r\n  /**\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @instance\r\n   * @param {string} rule Only possible value is 'evenodd'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description All .clip() after calling drawing ops with a style argument of null.\r\n   */\r\n  var clip = (API.__private__.clip = API.clip = function(rule) {\r\n    // Call .clip() after calling drawing ops with a style argument of null\r\n    // W is the PDF clipping op\r\n    if (\"evenodd\" === rule) {\r\n      out(\"W*\");\r\n    } else {\r\n      out(\"W\");\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * @name clipEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @description Modify the current clip path by intersecting it with the current path using the even-odd rule. Note\r\n   * that this will NOT consume the current path. In order to only use this path for clipping call\r\n   * {@link API.discardPath} afterwards.\r\n   */\r\n  API.clipEvenOdd = function() {\r\n    return clip(\"evenodd\");\r\n  };\r\n\r\n  /**\r\n   * Consumes the current path without any effect. Mainly used in combination with {@link clip} or\r\n   * {@link clipEvenOdd}. The PDF \"n\" operator.\r\n   * @name discardPath\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.discardPath = API.discardPath = function() {\r\n    out(\"n\");\r\n    return this;\r\n  };\r\n\r\n  var isValidStyle = (API.__private__.isValidStyle = function(style) {\r\n    var validStyleVariants = [\r\n      undefined,\r\n      null,\r\n      \"S\",\r\n      \"D\",\r\n      \"F\",\r\n      \"DF\",\r\n      \"FD\",\r\n      \"f\",\r\n      \"f*\",\r\n      \"B\",\r\n      \"B*\",\r\n      \"n\"\r\n    ];\r\n    var result = false;\r\n    if (validStyleVariants.indexOf(style) !== -1) {\r\n      result = true;\r\n    }\r\n    return result;\r\n  });\r\n\r\n  API.__private__.setDefaultPathOperation = API.setDefaultPathOperation = function(\r\n    operator\r\n  ) {\r\n    if (isValidStyle(operator)) {\r\n      defaultPathOperation = operator;\r\n    }\r\n    return this;\r\n  };\r\n\r\n  var getStyle = (API.__private__.getStyle = API.getStyle = function(style) {\r\n    // see path-painting operators in PDF spec\r\n    var op = defaultPathOperation; // stroke\r\n\r\n    switch (style) {\r\n      case \"D\":\r\n      case \"S\":\r\n        op = \"S\"; // stroke\r\n        break;\r\n      case \"F\":\r\n        op = \"f\"; // fill\r\n        break;\r\n      case \"FD\":\r\n      case \"DF\":\r\n        op = \"B\";\r\n        break;\r\n      case \"f\":\r\n      case \"f*\":\r\n      case \"B\":\r\n      case \"B*\":\r\n        /*\r\n               Allow direct use of these PDF path-painting operators:\r\n               - f    fill using nonzero winding number rule\r\n               - f*    fill using even-odd rule\r\n               - B    fill then stroke with fill using non-zero winding number rule\r\n               - B*    fill then stroke with fill using even-odd rule\r\n               */\r\n        op = style;\r\n        break;\r\n    }\r\n    return op;\r\n  });\r\n\r\n  /**\r\n   * Close the current path. The PDF \"h\" operator.\r\n   * @name close\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  var close = (API.close = function() {\r\n    out(\"h\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Stroke the path. The PDF \"S\" operator.\r\n   * @name stroke\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.stroke = function() {\r\n    out(\"S\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the nonzero winding number rule. If a pattern is provided, the path will be filled\r\n   * with this pattern, otherwise with the current fill color. Equivalent to the PDF \"f\" operator.\r\n   * @name fill\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fill = function(pattern) {\r\n    fillWithOptionalPattern(\"f\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill the current path using the even-odd rule. The PDF f* operator.\r\n   * @see API.fill\r\n   * @name fillEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be filled with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"f*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the nonzero winding number rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStroke\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStroke = function(pattern) {\r\n    fillWithOptionalPattern(\"B\", pattern);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Fill using the even-odd rule and then stroke the current Path. The PDF \"B\" operator.\r\n   * @see API.fill\r\n   * @name fillStrokeEvenOdd\r\n   * @function\r\n   * @instance\r\n   * @param {PatternData=} pattern If provided the path will be fill-stroked with this pattern\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.fillStrokeEvenOdd = function(pattern) {\r\n    fillWithOptionalPattern(\"B*\", pattern);\r\n    return this;\r\n  };\r\n\r\n  var fillWithOptionalPattern = function(style, pattern) {\r\n    if (typeof pattern === \"object\") {\r\n      fillWithPattern(pattern, style);\r\n    } else {\r\n      out(style);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    if (\r\n      style === null ||\r\n      (apiMode === ApiMode.ADVANCED && style === undefined)\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    style = getStyle(style);\r\n\r\n    // stroking / filling / both the path\r\n    out(style);\r\n  };\r\n\r\n  function cloneTilingPattern(patternKey, boundingBox, xStep, yStep, matrix) {\r\n    var clone = new TilingPattern(\r\n      boundingBox || this.boundingBox,\r\n      xStep || this.xStep,\r\n      yStep || this.yStep,\r\n      this.gState,\r\n      matrix || this.matrix\r\n    );\r\n    clone.stream = this.stream;\r\n    var key = patternKey + \"$$\" + this.cloneIndex++ + \"$$\";\r\n    addPattern(key, clone);\r\n    return clone;\r\n  }\r\n\r\n  var fillWithPattern = function(patternData, style) {\r\n    var patternId = patternMap[patternData.key];\r\n    var pattern = patterns[patternId];\r\n\r\n    if (pattern instanceof ShadingPattern) {\r\n      out(\"q\");\r\n\r\n      out(clipRuleFromStyle(style));\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n      out(patternData.matrix.toString() + \" cm\");\r\n      out(\"/\" + patternId + \" sh\");\r\n      out(\"Q\");\r\n    } else if (pattern instanceof TilingPattern) {\r\n      // pdf draws patterns starting at the bottom left corner and they are not affected by the global transformation,\r\n      // so we must flip them\r\n      var matrix = new Matrix(1, 0, 0, -1, 0, getPageHeight());\r\n\r\n      if (patternData.matrix) {\r\n        matrix = matrix.multiply(patternData.matrix || identityMatrix);\r\n        // we cannot apply a matrix to the pattern on use so we must abuse the pattern matrix and create new instances\r\n        // for each use\r\n        patternId = cloneTilingPattern.call(\r\n          pattern,\r\n          patternData.key,\r\n          patternData.boundingBox,\r\n          patternData.xStep,\r\n          patternData.yStep,\r\n          matrix\r\n        ).id;\r\n      }\r\n\r\n      out(\"q\");\r\n      out(\"/Pattern cs\");\r\n      out(\"/\" + patternId + \" scn\");\r\n\r\n      if (pattern.gState) {\r\n        API.setGState(pattern.gState);\r\n      }\r\n\r\n      out(style);\r\n      out(\"Q\");\r\n    }\r\n  };\r\n\r\n  var clipRuleFromStyle = function(style) {\r\n    switch (style) {\r\n      case \"f\":\r\n      case \"F\":\r\n        return \"W n\";\r\n      case \"f*\":\r\n        return \"W* n\";\r\n      case \"B\":\r\n        return \"W S\";\r\n      case \"B*\":\r\n        return \"W* S\";\r\n\r\n      // these two are for compatibility reasons (in the past, calling any primitive method with a shading pattern\r\n      // and \"n\"/\"S\" as style would still fill/fill and stroke the path)\r\n      case \"S\":\r\n        return \"W S\";\r\n      case \"n\":\r\n        return \"W n\";\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Begin a new subpath by moving the current point to coordinates (x, y). The PDF \"m\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @name moveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var moveTo = (API.moveTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" m\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a straight line segment from the current point to the point (x, y). The PDF \"l\" operator.\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @memberof jsPDF#\r\n   * @name lineTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var lineTo = (API.lineTo = function(x, y) {\r\n    out(hpf(scale(x)) + \" \" + hpf(transformScaleY(y)) + \" l\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Append a cubic Bézier curve to the current path. The curve shall extend from the current point to the point\r\n   * (x3, y3), using (x1, y1) and (x2, y2) as Bézier control points. The new current point shall be (x3, x3).\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {number} x3\r\n   * @param {number} y3\r\n   * @memberof jsPDF#\r\n   * @name curveTo\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @returns {jsPDF}\r\n   */\r\n  var curveTo = (API.curveTo = function(x1, y1, x2, y2, x3, y3) {\r\n    out(\r\n      [\r\n        hpf(scale(x1)),\r\n        hpf(transformScaleY(y1)),\r\n        hpf(scale(x2)),\r\n        hpf(transformScaleY(y2)),\r\n        hpf(scale(x3)),\r\n        hpf(transformScaleY(y3)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Draw a line on the current page.\r\n   *\r\n   * @name line\r\n   * @function\r\n   * @instance\r\n   * @param {number} x1\r\n   * @param {number} y1\r\n   * @param {number} x2\r\n   * @param {number} y2\r\n   * @param {string} style A string specifying the painting style or null.  Valid styles include: 'S' [default] - stroke, 'F' - fill,  and 'DF' (or 'FD') -  fill then stroke. A null value postpones setting the style so that a shape may be composed using multiple method calls. The last drawing method call used to define the shape should not have a null style argument. default: 'S'\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   */\r\n  API.__private__.line = API.line = function(x1, y1, x2, y2, style) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.line\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1], style || \"S\");\r\n    } else {\r\n      return this.lines([[x2 - x1, y2 - y1]], x1, y1, [1, 1]).stroke();\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @typedef {Object} PatternData\r\n   * {Matrix|undefined} matrix\r\n   * {Number|undefined} xStep\r\n   * {Number|undefined} yStep\r\n   * {Array.<Number>|undefined} boundingBox\r\n   */\r\n\r\n  /**\r\n   * Adds series of curves (straight lines or cubic bezier curves) to canvas, starting at `x`, `y` coordinates.\r\n   * All data points in `lines` are relative to last line origin.\r\n   * `x`, `y` become x1,y1 for first line / curve in the set.\r\n   * For lines you only need to specify [x2, y2] - (ending point) vector against x1, y1 starting point.\r\n   * For bezier curves you need to specify [x2,y2,x3,y3,x4,y4] - vectors to control points 1, 2, ending point. All vectors are against the start of the curve - x1,y1.\r\n   *\r\n   * @example .lines([[2,2],[-2,2],[1,1,2,2,3,3],[2,1]], 212,110, [1,1], 'F', false) // line, line, bezier curve, line\r\n   * @param {Array} lines Array of *vector* shifts as pairs (lines) or sextets (cubic bezier curves).\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} scale (Defaults to [1.0,1.0]) x,y Scaling factor for all vectors. Elements can be any floating number Sub-one makes drawing smaller. Over-one grows the drawing. Negative flips the direction.\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @param {Boolean=} closed If true, the path is closed with a straight line from the end of the last curve to the starting point.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name lines\r\n   */\r\n  API.__private__.lines = API.lines = function(\r\n    lines,\r\n    x,\r\n    y,\r\n    scale,\r\n    style,\r\n    closed\r\n  ) {\r\n    var scalex, scaley, i, l, leg, x2, y2, x3, y3, x4, y4, tmp;\r\n\r\n    // Pre-August-2012 the order of arguments was function(x, y, lines, scale, style)\r\n    // in effort to make all calls have similar signature like\r\n    //   function(content, coordinateX, coordinateY , miscellaneous)\r\n    // this method had its args flipped.\r\n    // code below allows backward compatibility with old arg order.\r\n    if (typeof lines === \"number\") {\r\n      tmp = y;\r\n      y = x;\r\n      x = lines;\r\n      lines = tmp;\r\n    }\r\n\r\n    scale = scale || [1, 1];\r\n    closed = closed || false;\r\n\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      !Array.isArray(lines) ||\r\n      !Array.isArray(scale) ||\r\n      !isValidStyle(style) ||\r\n      typeof closed !== \"boolean\"\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.lines\");\r\n    }\r\n\r\n    // starting point\r\n    moveTo(x, y);\r\n\r\n    scalex = scale[0];\r\n    scaley = scale[1];\r\n    l = lines.length;\r\n    //, x2, y2 // bezier only. In page default measurement \"units\", *after* scaling\r\n    //, x3, y3 // bezier only. In page default measurement \"units\", *after* scaling\r\n    // ending point for all, lines and bezier. . In page default measurement \"units\", *after* scaling\r\n    x4 = x; // last / ending point = starting point for first item.\r\n    y4 = y; // last / ending point = starting point for first item.\r\n\r\n    for (i = 0; i < l; i++) {\r\n      leg = lines[i];\r\n      if (leg.length === 2) {\r\n        // simple line\r\n        x4 = leg[0] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[1] * scaley + y4; // here last y4 was prior ending point\r\n        lineTo(x4, y4);\r\n      } else {\r\n        // bezier curve\r\n        x2 = leg[0] * scalex + x4; // here last x4 is prior ending point\r\n        y2 = leg[1] * scaley + y4; // here last y4 is prior ending point\r\n        x3 = leg[2] * scalex + x4; // here last x4 is prior ending point\r\n        y3 = leg[3] * scaley + y4; // here last y4 is prior ending point\r\n        x4 = leg[4] * scalex + x4; // here last x4 was prior ending point\r\n        y4 = leg[5] * scaley + y4; // here last y4 was prior ending point\r\n        curveTo(x2, y2, x3, y3, x4, y4);\r\n      }\r\n    }\r\n\r\n    if (closed) {\r\n      close();\r\n    }\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Similar to {@link API.lines} but all coordinates are interpreted as absolute coordinates instead of relative.\r\n   * @param {Array<Object>} lines An array of {op: operator, c: coordinates} object, where op is one of \"m\" (move to), \"l\" (line to)\r\n   * \"c\" (cubic bezier curve) and \"h\" (close (sub)path)). c is an array of coordinates. \"m\" and \"l\" expect two, \"c\"\r\n   * six and \"h\" an empty array (or undefined).\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name path\r\n   */\r\n  API.path = function(lines) {\r\n    for (var i = 0; i < lines.length; i++) {\r\n      var leg = lines[i];\r\n      var coords = leg.c;\r\n      switch (leg.op) {\r\n        case \"m\":\r\n          moveTo(coords[0], coords[1]);\r\n          break;\r\n        case \"l\":\r\n          lineTo(coords[0], coords[1]);\r\n          break;\r\n        case \"c\":\r\n          curveTo.apply(this, coords);\r\n          break;\r\n        case \"h\":\r\n          close();\r\n          break;\r\n      }\r\n    }\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name rect\r\n   */\r\n  API.__private__.rect = API.rect = function(x, y, w, h, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.rect\");\r\n    }\r\n    if (apiMode === ApiMode.COMPAT) {\r\n      h = -h;\r\n    }\r\n\r\n    out(\r\n      [\r\n        hpf(scale(x)),\r\n        hpf(transformScaleY(y)),\r\n        hpf(scale(w)),\r\n        hpf(scale(h)),\r\n        \"re\"\r\n      ].join(\" \")\r\n    );\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a triangle to PDF.\r\n   *\r\n   * @param {number} x1 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y1 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x2 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y2 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} x3 Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y3 Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name triangle\r\n   */\r\n  API.__private__.triangle = API.triangle = function(\r\n    x1,\r\n    y1,\r\n    x2,\r\n    y2,\r\n    x3,\r\n    y3,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x1) ||\r\n      isNaN(y1) ||\r\n      isNaN(x2) ||\r\n      isNaN(y2) ||\r\n      isNaN(x3) ||\r\n      isNaN(y3) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.triangle\");\r\n    }\r\n    this.lines(\r\n      [\r\n        [x2 - x1, y2 - y1], // vector to point 2\r\n        [x3 - x2, y3 - y2], // vector to point 3\r\n        [x1 - x3, y1 - y3] // closing vector back to point 1\r\n      ],\r\n      x1,\r\n      y1, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds a rectangle with rounded corners to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} w Width (in units declared at inception of PDF document)\r\n   * @param {number} h Height (in units declared at inception of PDF document)\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name roundedRect\r\n   */\r\n  API.__private__.roundedRect = API.roundedRect = function(\r\n    x,\r\n    y,\r\n    w,\r\n    h,\r\n    rx,\r\n    ry,\r\n    style\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(w) ||\r\n      isNaN(h) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.roundedRect\");\r\n    }\r\n    var MyArc = (4 / 3) * (Math.SQRT2 - 1);\r\n\r\n    rx = Math.min(rx, w * 0.5);\r\n    ry = Math.min(ry, h * 0.5);\r\n\r\n    this.lines(\r\n      [\r\n        [w - 2 * rx, 0],\r\n        [rx * MyArc, 0, rx, ry - ry * MyArc, rx, ry],\r\n        [0, h - 2 * ry],\r\n        [0, ry * MyArc, -(rx * MyArc), ry, -rx, ry],\r\n        [-w + 2 * rx, 0],\r\n        [-(rx * MyArc), 0, -rx, -(ry * MyArc), -rx, -ry],\r\n        [0, -h + 2 * ry],\r\n        [0, -(ry * MyArc), rx * MyArc, -ry, rx, -ry]\r\n      ],\r\n      x + rx,\r\n      y, // start of path\r\n      [1, 1],\r\n      style,\r\n      true\r\n    );\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an ellipse to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} rx Radius along x axis (in units declared at inception of PDF document)\r\n   * @param {number} ry Radius along y axis (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name ellipse\r\n   */\r\n  API.__private__.ellipse = API.ellipse = function(x, y, rx, ry, style) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(rx) ||\r\n      isNaN(ry) ||\r\n      !isValidStyle(style)\r\n    ) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.ellipse\");\r\n    }\r\n    var lx = (4 / 3) * (Math.SQRT2 - 1) * rx,\r\n      ly = (4 / 3) * (Math.SQRT2 - 1) * ry;\r\n\r\n    moveTo(x + rx, y);\r\n    curveTo(x + rx, y - ly, x + lx, y - ry, x, y - ry);\r\n    curveTo(x - lx, y - ry, x - rx, y - ly, x - rx, y);\r\n    curveTo(x - rx, y + ly, x - lx, y + ry, x, y + ry);\r\n    curveTo(x + lx, y + ry, x + rx, y + ly, x + rx, y);\r\n\r\n    putStyle(style);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Adds an circle to PDF.\r\n   *\r\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\r\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\r\n   * @param {number} r Radius (in units declared at inception of PDF document)\r\n   * @param {string=} style A string specifying the painting style or null. Valid styles include:\r\n   * 'S' [default] - stroke,\r\n   * 'F' - fill,\r\n   * and 'DF' (or 'FD') -  fill then stroke.\r\n   * In \"compat\" API mode, a null value postpones setting the style so that a shape may be composed using multiple\r\n   * method calls. The last drawing method call used to define the shape should not have a null style argument.\r\n   *\r\n   * In \"advanced\" API mode this parameter is deprecated.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name circle\r\n   */\r\n  API.__private__.circle = API.circle = function(x, y, r, style) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(r) || !isValidStyle(style)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.circle\");\r\n    }\r\n    return this.ellipse(x, y, r, r, style);\r\n  };\r\n\r\n  /**\r\n   * Sets text font face, variant for upcoming text elements.\r\n   * See output of jsPDF.getFontList() for possible font names, styles.\r\n   *\r\n   * @param {string} fontName Font name or family. Example: \"times\".\r\n   * @param {string} fontStyle Font style or variant. Example: \"italic\".\r\n   * @param {number | string} fontWeight Weight of the Font. Example: \"normal\" | 400\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFont\r\n   */\r\n  API.setFont = function(fontName, fontStyle, fontWeight) {\r\n    if (fontWeight) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    activeFontKey = getFont(fontName, fontStyle, {\r\n      disableWarning: false\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Gets text font face, variant for upcoming text elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {Object}\r\n   * @memberof jsPDF#\r\n   * @name getFont\r\n   */\r\n  var getFontEntry = (API.__private__.getFont = API.getFont = function() {\r\n    return fonts[getFont.apply(API, arguments)];\r\n  });\r\n\r\n  /**\r\n   * Returns an object - a tree of fontName to fontStyle relationships available to\r\n   * active PDF document.\r\n   *\r\n   * @public\r\n   * @function\r\n   * @instance\r\n   * @returns {Object} Like {'times':['normal', 'italic', ... ], 'arial':['normal', 'bold', ... ], ... }\r\n   * @memberof jsPDF#\r\n   * @name getFontList\r\n   */\r\n  API.__private__.getFontList = API.getFontList = function() {\r\n    var list = {},\r\n      fontName,\r\n      fontStyle;\r\n\r\n    for (fontName in fontmap) {\r\n      if (fontmap.hasOwnProperty(fontName)) {\r\n        list[fontName] = [];\r\n        for (fontStyle in fontmap[fontName]) {\r\n          if (fontmap[fontName].hasOwnProperty(fontStyle)) {\r\n            list[fontName].push(fontStyle);\r\n          }\r\n        }\r\n      }\r\n    }\r\n    return list;\r\n  };\r\n\r\n  /**\r\n   * Add a custom font to the current instance.\r\n   *\r\n   * @param {string} postScriptName PDF specification full name for the font.\r\n   * @param {string} id PDF-document-instance-specific label assinged to the font.\r\n   * @param {string} fontStyle Style of the Font.\r\n   * @param {number | string} fontWeight Weight of the Font.\r\n   * @param {Object} encoding Encoding_name-to-Font_metrics_object mapping.\r\n   * @function\r\n   * @instance\r\n   * @memberof jsPDF#\r\n   * @name addFont\r\n   * @returns {string} fontId\r\n   */\r\n  API.addFont = function(\r\n    postScriptName,\r\n    fontName,\r\n    fontStyle,\r\n    fontWeight,\r\n    encoding\r\n  ) {\r\n    var encodingOptions = [\r\n      \"StandardEncoding\",\r\n      \"MacRomanEncoding\",\r\n      \"Identity-H\",\r\n      \"WinAnsiEncoding\"\r\n    ];\r\n    if (arguments[3] && encodingOptions.indexOf(arguments[3]) !== -1) {\r\n      //IE 11 fix\r\n      encoding = arguments[3];\r\n    } else if (arguments[3] && encodingOptions.indexOf(arguments[3]) == -1) {\r\n      fontStyle = combineFontStyleAndFontWeight(fontStyle, fontWeight);\r\n    }\r\n    encoding = encoding || \"Identity-H\";\r\n    return addFont.call(this, postScriptName, fontName, fontStyle, encoding);\r\n  };\r\n\r\n  var lineWidth = options.lineWidth || 0.200025; // 2mm\r\n  /**\r\n   * Gets the line width, default: 0.200025.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineWidth\r\n   * @memberof jsPDF#\r\n   * @name getLineWidth\r\n   */\r\n  var getLineWidth = (API.__private__.getLineWidth = API.getLineWidth = function() {\r\n    return lineWidth;\r\n  });\r\n\r\n  /**\r\n   * Sets line width for upcoming lines.\r\n   *\r\n   * @param {number} width Line width (in units declared at inception of PDF document).\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineWidth\r\n   */\r\n  var setLineWidth = (API.__private__.setLineWidth = API.setLineWidth = function(\r\n    width\r\n  ) {\r\n    lineWidth = width;\r\n    out(hpf(scale(width)) + \" w\");\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Sets the dash pattern for upcoming lines.\r\n   *\r\n   * To reset the settings simply call the method without any parameters.\r\n   * @param {Array<number>} dashArray An array containing 0-2 numbers. The first number sets the length of the\r\n   * dashes, the second number the length of the gaps. If the second number is missing, the gaps are considered\r\n   * to be as long as the dashes. An empty array means solid, unbroken lines.\r\n   * @param {number} dashPhase The phase lines start with.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineDashPattern\r\n   */\r\n  API.__private__.setLineDash = jsPDF.API.setLineDash = jsPDF.API.setLineDashPattern = function(\r\n    dashArray,\r\n    dashPhase\r\n  ) {\r\n    dashArray = dashArray || [];\r\n    dashPhase = dashPhase || 0;\r\n\r\n    if (isNaN(dashPhase) || !Array.isArray(dashArray)) {\r\n      throw new Error(\"Invalid arguments passed to jsPDF.setLineDash\");\r\n    }\r\n\r\n    dashArray = dashArray\r\n      .map(function(x) {\r\n        return hpf(scale(x));\r\n      })\r\n      .join(\" \");\r\n    dashPhase = hpf(scale(dashPhase));\r\n\r\n    out(\"[\" + dashArray + \"] \" + dashPhase + \" d\");\r\n    return this;\r\n  };\r\n\r\n  var lineHeightFactor;\r\n\r\n  var getLineHeight = (API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  });\r\n\r\n  API.__private__.getLineHeight = API.getLineHeight = function() {\r\n    return activeFontSize * lineHeightFactor;\r\n  };\r\n\r\n  /**\r\n   * Sets the LineHeightFactor of proportion.\r\n   *\r\n   * @param {number} value LineHeightFactor value. Default: 1.15.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineHeightFactor\r\n   */\r\n  var setLineHeightFactor = (API.__private__.setLineHeightFactor = API.setLineHeightFactor = function(\r\n    value\r\n  ) {\r\n    value = value || 1.15;\r\n    if (typeof value === \"number\") {\r\n      lineHeightFactor = value;\r\n    }\r\n    return this;\r\n  });\r\n\r\n  /**\r\n   * Gets the LineHeightFactor, default: 1.15.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} lineHeightFactor\r\n   * @memberof jsPDF#\r\n   * @name getLineHeightFactor\r\n   */\r\n  var getLineHeightFactor = (API.__private__.getLineHeightFactor = API.getLineHeightFactor = function() {\r\n    return lineHeightFactor;\r\n  });\r\n\r\n  setLineHeightFactor(options.lineHeight);\r\n\r\n  var getHorizontalCoordinate = (API.__private__.getHorizontalCoordinate = function(\r\n    value\r\n  ) {\r\n    return scale(value);\r\n  });\r\n\r\n  var getVerticalCoordinate = (API.__private__.getVerticalCoordinate = function(\r\n    value\r\n  ) {\r\n    if (apiMode === ApiMode.ADVANCED) {\r\n      return value;\r\n    } else {\r\n      var pageHeight =\r\n        pagesContext[currentPage].mediaBox.topRightY -\r\n        pagesContext[currentPage].mediaBox.bottomLeftY;\r\n      return pageHeight - scale(value);\r\n    }\r\n  });\r\n\r\n  var getHorizontalCoordinateString = (API.__private__.getHorizontalCoordinateString = API.getHorizontalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getHorizontalCoordinate(value));\r\n  });\r\n\r\n  var getVerticalCoordinateString = (API.__private__.getVerticalCoordinateString = API.getVerticalCoordinateString = function(\r\n    value\r\n  ) {\r\n    return hpf(getVerticalCoordinate(value));\r\n  });\r\n\r\n  var strokeColor = options.strokeColor || \"0 G\";\r\n\r\n  /**\r\n   *  Gets the stroke color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getDrawColor\r\n   */\r\n  API.__private__.getStrokeColor = API.getDrawColor = function() {\r\n    return decodeColorString(strokeColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the stroke color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setDrawColor\r\n   */\r\n  API.__private__.setStrokeColor = API.setDrawColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"draw\",\r\n      precision: 2\r\n    };\r\n\r\n    strokeColor = encodeColorString(options);\r\n    out(strokeColor);\r\n    return this;\r\n  };\r\n\r\n  var fillColor = options.fillColor || \"0 g\";\r\n\r\n  /**\r\n   * Gets the fill color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getFillColor\r\n   */\r\n  API.__private__.getFillColor = API.getFillColor = function() {\r\n    return decodeColorString(fillColor);\r\n  };\r\n\r\n  /**\r\n   * Sets the fill color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setFillColor\r\n   */\r\n  API.__private__.setFillColor = API.setFillColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"fill\",\r\n      precision: 2\r\n    };\r\n\r\n    fillColor = encodeColorString(options);\r\n    out(fillColor);\r\n    return this;\r\n  };\r\n\r\n  var textColor = options.textColor || \"0 g\";\r\n  /**\r\n   * Gets the text color for upcoming elements.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {string} colorAsHex\r\n   * @memberof jsPDF#\r\n   * @name getTextColor\r\n   */\r\n  var getTextColor = (API.__private__.getTextColor = API.getTextColor = function() {\r\n    return decodeColorString(textColor);\r\n  });\r\n  /**\r\n   * Sets the text color for upcoming elements.\r\n   *\r\n   * Depending on the number of arguments given, Gray, RGB, or CMYK\r\n   * color space is implied.\r\n   *\r\n   * When only ch1 is given, \"Gray\" color space is implied and it\r\n   * must be a value in the range from 0.00 (solid black) to to 1.00 (white)\r\n   * if values are communicated as String types, or in range from 0 (black)\r\n   * to 255 (white) if communicated as Number type.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When only ch1,ch2,ch3 are given, \"RGB\" color space is implied and each\r\n   * value must be in the range from 0.00 (minimum intensity) to to 1.00\r\n   * (max intensity) if values are communicated as String types, or\r\n   * from 0 (min intensity) to to 255 (max intensity) if values are communicated\r\n   * as Number types.\r\n   * The RGB-like 0-255 range is provided for backward compatibility.\r\n   *\r\n   * When ch1,ch2,ch3,ch4 are given, \"CMYK\" color space is implied and each\r\n   * value must be a in the range from 0.00 (0% concentration) to to\r\n   * 1.00 (100% concentration)\r\n   *\r\n   * Because JavaScript treats fixed point numbers badly (rounds to\r\n   * floating point nearest to binary representation) it is highly advised to\r\n   * communicate the fractional numbers as String types, not JavaScript Number type.\r\n   *\r\n   * @param {Number|String} ch1 Color channel value or {string} ch1 color value in hexadecimal, example: '#FFFFFF'.\r\n   * @param {Number} ch2 Color channel value.\r\n   * @param {Number} ch3 Color channel value.\r\n   * @param {Number} ch4 Color channel value.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setTextColor\r\n   */\r\n  API.__private__.setTextColor = API.setTextColor = function(\r\n    ch1,\r\n    ch2,\r\n    ch3,\r\n    ch4\r\n  ) {\r\n    var options = {\r\n      ch1: ch1,\r\n      ch2: ch2,\r\n      ch3: ch3,\r\n      ch4: ch4,\r\n      pdfColorType: \"text\",\r\n      precision: 3\r\n    };\r\n    textColor = encodeColorString(options);\r\n\r\n    return this;\r\n  };\r\n\r\n  var activeCharSpace = options.charSpace;\r\n\r\n  /**\r\n   * Get global value of CharSpace.\r\n   *\r\n   * @function\r\n   * @instance\r\n   * @returns {number} charSpace\r\n   * @memberof jsPDF#\r\n   * @name getCharSpace\r\n   */\r\n  var getCharSpace = (API.__private__.getCharSpace = API.getCharSpace = function() {\r\n    return parseFloat(activeCharSpace || 0);\r\n  });\r\n\r\n  /**\r\n   * Set global value of CharSpace.\r\n   *\r\n   * @param {number} charSpace\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF} jsPDF-instance\r\n   * @memberof jsPDF#\r\n   * @name setCharSpace\r\n   */\r\n  API.__private__.setCharSpace = API.setCharSpace = function(charSpace) {\r\n    if (isNaN(charSpace)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setCharSpace\");\r\n    }\r\n    activeCharSpace = charSpace;\r\n    return this;\r\n  };\r\n\r\n  var lineCapID = 0;\r\n  /**\r\n   * Is an Object providing a mapping from human-readable to\r\n   * integer flag values designating the varieties of line cap\r\n   * and join styles.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name CapJoinStyles\r\n   */\r\n  API.CapJoinStyles = {\r\n    0: 0,\r\n    butt: 0,\r\n    but: 0,\r\n    miter: 0,\r\n    1: 1,\r\n    round: 1,\r\n    rounded: 1,\r\n    circle: 1,\r\n    2: 2,\r\n    projecting: 2,\r\n    project: 2,\r\n    square: 2,\r\n    bevel: 2\r\n  };\r\n\r\n  /**\r\n   * Sets the line cap styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line cap.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineCap\r\n   */\r\n  API.__private__.setLineCap = API.setLineCap = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line cap style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineCapID = id;\r\n    out(id + \" J\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var lineJoinID = 0;\r\n  /**\r\n   * Sets the line join styles.\r\n   * See {jsPDF.CapJoinStyles} for variants.\r\n   *\r\n   * @param {String|Number} style A string or number identifying the type of line join.\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineJoin\r\n   */\r\n  API.__private__.setLineJoin = API.setLineJoin = function(style) {\r\n    var id = API.CapJoinStyles[style];\r\n    if (id === undefined) {\r\n      throw new Error(\r\n        \"Line join style of '\" +\r\n          style +\r\n          \"' is not recognized. See or extend .CapJoinStyles property for valid styles\"\r\n      );\r\n    }\r\n    lineJoinID = id;\r\n    out(id + \" j\");\r\n\r\n    return this;\r\n  };\r\n\r\n  var miterLimit;\r\n  /**\r\n   * Sets the miterLimit property, which effects the maximum miter length.\r\n   *\r\n   * @param {number} length The length of the miter\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setLineMiterLimit\r\n   */\r\n  API.__private__.setLineMiterLimit = API.__private__.setMiterLimit = API.setLineMiterLimit = API.setMiterLimit = function(\r\n    length\r\n  ) {\r\n    length = length || 0;\r\n    if (isNaN(length)) {\r\n      throw new Error(\"Invalid argument passed to jsPDF.setLineMiterLimit\");\r\n    }\r\n    out(hpf(scale(length)) + \" M\");\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * An object representing a pdf graphics state.\r\n   * @class GState\r\n   */\r\n\r\n  /**\r\n   *\r\n   * @param parameters A parameter object that contains all properties this graphics state wants to set.\r\n   * Supported are: opacity, stroke-opacity\r\n   * @constructor\r\n   */\r\n  API.GState = GState;\r\n\r\n  /**\r\n   * Sets a either previously added {@link GState} (via {@link addGState}) or a new {@link GState}.\r\n   * @param {String|GState} gState If type is string, a previously added GState is used, if type is GState\r\n   * it will be added before use.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setGState\r\n   */\r\n  API.setGState = function(gState) {\r\n    if (typeof gState === \"string\") {\r\n      gState = gStates[gStatesMap[gState]];\r\n    } else {\r\n      gState = addGState(null, gState);\r\n    }\r\n\r\n    if (!gState.equals(activeGState)) {\r\n      out(\"/\" + gState.id + \" gs\");\r\n      activeGState = gState;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Adds a new Graphics State. Duplicates are automatically eliminated.\r\n   * @param {String} key Might also be null, if no later reference to this gState is needed\r\n   * @param {Object} gState The gState object\r\n   */\r\n  var addGState = function(key, gState) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (key && gStatesMap[key]) return;\r\n    var duplicate = false;\r\n    for (var s in gStates) {\r\n      if (gStates.hasOwnProperty(s)) {\r\n        if (gStates[s].equals(gState)) {\r\n          duplicate = true;\r\n          break;\r\n        }\r\n      }\r\n    }\r\n\r\n    if (duplicate) {\r\n      gState = gStates[s];\r\n    } else {\r\n      var gStateKey = \"GS\" + (Object.keys(gStates).length + 1).toString(10);\r\n      gStates[gStateKey] = gState;\r\n      gState.id = gStateKey;\r\n    }\r\n\r\n    // several user keys may point to the same GState object\r\n    key && (gStatesMap[key] = gState.id);\r\n\r\n    events.publish(\"addGState\", gState);\r\n\r\n    return gState;\r\n  };\r\n\r\n  /**\r\n   * Adds a new {@link GState} for later use. See {@link setGState}.\r\n   * @param {String} key\r\n   * @param {GState} gState\r\n   * @function\r\n   * @instance\r\n   * @returns {jsPDF}\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name addGState\r\n   */\r\n  API.addGState = function(key, gState) {\r\n    addGState(key, gState);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Saves the current graphics state (\"pushes it on the stack\"). It can be restored by {@link restoreGraphicsState}\r\n   * later. Here, the general pdf graphics state is meant, also including the current transformation matrix,\r\n   * fill and stroke colors etc.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name saveGraphicsState\r\n   */\r\n  API.saveGraphicsState = function() {\r\n    out(\"q\");\r\n    // as we cannot set font key and size independently we must keep track of both\r\n    fontStateStack.push({\r\n      key: activeFontKey,\r\n      size: activeFontSize,\r\n      color: textColor\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Restores a previously saved graphics state saved by {@link saveGraphicsState} (\"pops the stack\").\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name restoreGraphicsState\r\n   */\r\n  API.restoreGraphicsState = function() {\r\n    out(\"Q\");\r\n\r\n    // restore previous font state\r\n    var fontState = fontStateStack.pop();\r\n    activeFontKey = fontState.key;\r\n    activeFontSize = fontState.size;\r\n    textColor = fontState.color;\r\n\r\n    activeGState = null;\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Appends this matrix to the left of all previously applied matrices.\r\n   *\r\n   * @param {Matrix} matrix\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name setCurrentTransformationMatrix\r\n   */\r\n  API.setCurrentTransformationMatrix = function(matrix) {\r\n    out(matrix.toString() + \" cm\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Inserts a debug comment into the generated pdf.\r\n   * @function\r\n   * @instance\r\n   * @param {String} text\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name comment\r\n   */\r\n  API.comment = function(text) {\r\n    out(\"#\" + text);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Point\r\n   */\r\n  var Point = function(x, y) {\r\n    var _x = x || 0;\r\n    Object.defineProperty(this, \"x\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _x;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _x = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _y = y || 0;\r\n    Object.defineProperty(this, \"y\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _y;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _y = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _type = \"pt\";\r\n    Object.defineProperty(this, \"type\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _type;\r\n      },\r\n      set: function(value) {\r\n        _type = value.toString();\r\n      }\r\n    });\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Rectangle\r\n   */\r\n  var Rectangle = function(x, y, w, h) {\r\n    Point.call(this, x, y);\r\n    this.type = \"rect\";\r\n\r\n    var _w = w || 0;\r\n    Object.defineProperty(this, \"w\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _w;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _w = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    var _h = h || 0;\r\n    Object.defineProperty(this, \"h\", {\r\n      enumerable: true,\r\n      get: function() {\r\n        return _h;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _h = parseFloat(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * FormObject/RenderTarget\r\n   */\r\n\r\n  var RenderTarget = function() {\r\n    this.page = page;\r\n    this.currentPage = currentPage;\r\n    this.pages = pages.slice(0);\r\n    this.pagesContext = pagesContext.slice(0);\r\n    this.x = pageX;\r\n    this.y = pageY;\r\n    this.matrix = pageMatrix;\r\n    this.width = getPageWidth(currentPage);\r\n    this.height = getPageHeight(currentPage);\r\n    this.outputDestination = outputDestination;\r\n\r\n    this.id = \"\"; // set by endFormObject()\r\n    this.objectNumber = -1; // will be set by putXObject()\r\n  };\r\n\r\n  RenderTarget.prototype.restore = function() {\r\n    page = this.page;\r\n    currentPage = this.currentPage;\r\n    pagesContext = this.pagesContext;\r\n    pages = this.pages;\r\n    pageX = this.x;\r\n    pageY = this.y;\r\n    pageMatrix = this.matrix;\r\n    setPageWidth(currentPage, this.width);\r\n    setPageHeight(currentPage, this.height);\r\n    outputDestination = this.outputDestination;\r\n  };\r\n\r\n  var beginNewRenderTarget = function(x, y, width, height, matrix) {\r\n    // save current state\r\n    renderTargetStack.push(new RenderTarget());\r\n\r\n    // clear pages\r\n    page = currentPage = 0;\r\n    pages = [];\r\n    pageX = x;\r\n    pageY = y;\r\n\r\n    pageMatrix = matrix;\r\n\r\n    beginPage([width, height]);\r\n  };\r\n\r\n  var endFormObject = function(key) {\r\n    // only add it if it is not already present (the keys provided by the user must be unique!)\r\n    if (renderTargetMap[key]) {\r\n      renderTargetStack.pop().restore();\r\n      return;\r\n    }\r\n\r\n    // save the created xObject\r\n    var newXObject = new RenderTarget();\r\n\r\n    var xObjectId = \"Xo\" + (Object.keys(renderTargets).length + 1).toString(10);\r\n    newXObject.id = xObjectId;\r\n\r\n    renderTargetMap[key] = xObjectId;\r\n    renderTargets[xObjectId] = newXObject;\r\n\r\n    events.publish(\"addFormObject\", newXObject);\r\n\r\n    // restore state from stack\r\n    renderTargetStack.pop().restore();\r\n  };\r\n\r\n  /**\r\n   * Starts a new pdf form object, which means that all consequent draw calls target a new independent object\r\n   * until {@link endFormObject} is called. The created object can be referenced and drawn later using\r\n   * {@link doFormObject}. Nested form objects are possible.\r\n   * x, y, width, height set the bounding box that is used to clip the content.\r\n   *\r\n   * @param {number} x\r\n   * @param {number} y\r\n   * @param {number} width\r\n   * @param {number} height\r\n   * @param {Matrix} matrix The matrix that will be applied to convert the form objects coordinate system to\r\n   * the parent's.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name beginFormObject\r\n   */\r\n  API.beginFormObject = function(x, y, width, height, matrix) {\r\n    // The user can set the output target to a new form object. Nested form objects are possible.\r\n    // Currently, they use the resource dictionary of the surrounding stream. This should be changed, as\r\n    // the PDF-Spec states:\r\n    // \"In PDF 1.2 and later versions, form XObjects may be independent of the content streams in which\r\n    // they appear, and this is strongly recommended although not requiredIn PDF 1.2 and later versions,\r\n    // form XObjects may be independent of the content streams in which they appear, and this is strongly\r\n    // recommended although not required\"\r\n    beginNewRenderTarget(x, y, width, height, matrix);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Completes and saves the form object.\r\n   * @param {String} key The key by which this form object can be referenced.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name endFormObject\r\n   */\r\n  API.endFormObject = function(key) {\r\n    endFormObject(key);\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Draws the specified form object by referencing to the respective pdf XObject created with\r\n   * {@link API.beginFormObject} and {@link endFormObject}.\r\n   * The location is determined by matrix.\r\n   *\r\n   * @param {String} key The key to the form object.\r\n   * @param {Matrix} matrix The matrix applied before drawing the form object.\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name doFormObject\r\n   */\r\n  API.doFormObject = function(key, matrix) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    out(\"q\");\r\n    out(matrix.toString() + \" cm\");\r\n    out(\"/\" + xObject.id + \" Do\");\r\n    out(\"Q\");\r\n    return this;\r\n  };\r\n\r\n  /**\r\n   * Returns the form object specified by key.\r\n   * @param key {String}\r\n   * @returns {{x: number, y: number, width: number, height: number, matrix: Matrix}}\r\n   * @function\r\n   * @returns {jsPDF}\r\n   * @memberof jsPDF#\r\n   * @name getFormObject\r\n   */\r\n  API.getFormObject = function(key) {\r\n    var xObject = renderTargets[renderTargetMap[key]];\r\n    return {\r\n      x: xObject.x,\r\n      y: xObject.y,\r\n      width: xObject.width,\r\n      height: xObject.height,\r\n      matrix: xObject.matrix\r\n    };\r\n  };\r\n\r\n  /**\r\n   * Saves as PDF document. An alias of jsPDF.output('save', 'filename.pdf').\r\n   * Uses FileSaver.js-method saveAs.\r\n   *\r\n   * @memberof jsPDF#\r\n   * @name save\r\n   * @function\r\n   * @instance\r\n   * @param  {string} filename The filename including extension.\r\n   * @param  {Object} options An Object with additional options, possible options: 'returnPromise'.\r\n   * @returns {jsPDF|Promise} jsPDF-instance     */\r\n  API.save = function(filename, options) {\r\n    filename = filename || \"generated.pdf\";\r\n\r\n    options = options || {};\r\n    options.returnPromise = options.returnPromise || false;\r\n\r\n    if (options.returnPromise === false) {\r\n      saveAs(getBlob(buildDocument()), filename);\r\n      if (typeof saveAs.unload === \"function\") {\r\n        if (globalObject.setTimeout) {\r\n          setTimeout(saveAs.unload, 911);\r\n        }\r\n      }\r\n      return this;\r\n    } else {\r\n      return new Promise(function(resolve, reject) {\r\n        try {\r\n          var result = saveAs(getBlob(buildDocument()), filename);\r\n          if (typeof saveAs.unload === \"function\") {\r\n            if (globalObject.setTimeout) {\r\n              setTimeout(saveAs.unload, 911);\r\n            }\r\n          }\r\n          resolve(result);\r\n        } catch (e) {\r\n          reject(e.message);\r\n        }\r\n      });\r\n    }\r\n\r\n  };\r\n\r\n  // applying plugins (more methods) ON TOP of built-in API.\r\n  // this is intentional as we allow plugins to override\r\n  // built-ins\r\n  for (var plugin in jsPDF.API) {\r\n    if (jsPDF.API.hasOwnProperty(plugin)) {\r\n      if (plugin === \"events\" && jsPDF.API.events.length) {\r\n        (function(events, newEvents) {\r\n          // jsPDF.API.events is a JS Array of Arrays\r\n          // where each Array is a pair of event name, handler\r\n          // Events were added by plugins to the jsPDF instantiator.\r\n          // These are always added to the new instance and some ran\r\n          // during instantiation.\r\n          var eventname, handler_and_args, i;\r\n\r\n          for (i = newEvents.length - 1; i !== -1; i--) {\r\n            // subscribe takes 3 args: 'topic', function, runonce_flag\r\n            // if undefined, runonce is false.\r\n            // users can attach callback directly,\r\n            // or they can attach an array with [callback, runonce_flag]\r\n            // that's what the \"apply\" magic is for below.\r\n            eventname = newEvents[i][0];\r\n            handler_and_args = newEvents[i][1];\r\n            events.subscribe.apply(\r\n              events,\r\n              [eventname].concat(\r\n                typeof handler_and_args === \"function\"\r\n                  ? [handler_and_args]\r\n                  : handler_and_args\r\n              )\r\n            );\r\n          }\r\n        })(events, jsPDF.API.events);\r\n      } else {\r\n        API[plugin] = jsPDF.API[plugin];\r\n      }\r\n    }\r\n  }\r\n\r\n  var getPageWidth = (API.getPageWidth = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightX -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftX) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageWidth = (API.setPageWidth = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightX =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftX;\r\n  });\r\n\r\n  var getPageHeight = (API.getPageHeight = function(pageNumber) {\r\n    pageNumber = pageNumber || currentPage;\r\n    return (\r\n      (pagesContext[pageNumber].mediaBox.topRightY -\r\n        pagesContext[pageNumber].mediaBox.bottomLeftY) /\r\n      scaleFactor\r\n    );\r\n  });\r\n\r\n  var setPageHeight = (API.setPageHeight = function(pageNumber, value) {\r\n    pagesContext[pageNumber].mediaBox.topRightY =\r\n      value * scaleFactor + pagesContext[pageNumber].mediaBox.bottomLeftY;\r\n  });\r\n\r\n  /**\r\n   * Object exposing internal API to plugins\r\n   * @public\r\n   * @ignore\r\n   */\r\n  API.internal = {\r\n    pdfEscape: pdfEscape,\r\n    getStyle: getStyle,\r\n    getFont: getFontEntry,\r\n    getFontSize: getFontSize,\r\n    getCharSpace: getCharSpace,\r\n    getTextColor: getTextColor,\r\n    getLineHeight: getLineHeight,\r\n    getLineHeightFactor: getLineHeightFactor,\r\n    getLineWidth: getLineWidth,\r\n    write: write,\r\n    getHorizontalCoordinate: getHorizontalCoordinate,\r\n    getVerticalCoordinate: getVerticalCoordinate,\r\n    getCoordinateString: getHorizontalCoordinateString,\r\n    getVerticalCoordinateString: getVerticalCoordinateString,\r\n    collections: {},\r\n    newObject: newObject,\r\n    newAdditionalObject: newAdditionalObject,\r\n    newObjectDeferred: newObjectDeferred,\r\n    newObjectDeferredBegin: newObjectDeferredBegin,\r\n    getFilters: getFilters,\r\n    putStream: putStream,\r\n    events: events,\r\n    scaleFactor: scaleFactor,\r\n    pageSize: {\r\n      getWidth: function() {\r\n        return getPageWidth(currentPage);\r\n      },\r\n      setWidth: function(value) {\r\n        setPageWidth(currentPage, value);\r\n      },\r\n      getHeight: function() {\r\n        return getPageHeight(currentPage);\r\n      },\r\n      setHeight: function(value) {\r\n        setPageHeight(currentPage, value);\r\n      }\r\n    },\r\n    encryptionOptions: encryptionOptions,\r\n    encryption: encryption,\r\n    getEncryptor: getEncryptor,\r\n    output: output,\r\n    getNumberOfPages: getNumberOfPages,\r\n    pages: pages,\r\n    out: out,\r\n    f2: f2,\r\n    f3: f3,\r\n    getPageInfo: getPageInfo,\r\n    getPageInfoByObjId: getPageInfoByObjId,\r\n    getCurrentPageInfo: getCurrentPageInfo,\r\n    getPDFVersion: getPdfVersion,\r\n    Point: Point,\r\n    Rectangle: Rectangle,\r\n    Matrix: Matrix,\r\n    hasHotfix: hasHotfix //Expose the hasHotfix check so plugins can also check them.\r\n  };\r\n\r\n  Object.defineProperty(API.internal.pageSize, \"width\", {\r\n    get: function() {\r\n      return getPageWidth(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageWidth(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n  Object.defineProperty(API.internal.pageSize, \"height\", {\r\n    get: function() {\r\n      return getPageHeight(currentPage);\r\n    },\r\n    set: function(value) {\r\n      setPageHeight(currentPage, value);\r\n    },\r\n    enumerable: true,\r\n    configurable: true\r\n  });\r\n\r\n  //////////////////////////////////////////////////////\r\n  // continuing initialization of jsPDF Document object\r\n  //////////////////////////////////////////////////////\r\n  // Add the first page automatically\r\n  addFonts.call(API, standardFonts);\r\n  activeFontKey = \"F1\";\r\n  _addPage(format, orientation);\r\n\r\n  events.publish(\"initialized\");\r\n  return API;\r\n}\r\n\r\n/**\r\n * jsPDF.API is a STATIC property of jsPDF class.\r\n * jsPDF.API is an object you can add methods and properties to.\r\n * The methods / properties you add will show up in new jsPDF objects.\r\n *\r\n * One property is prepopulated. It is the 'events' Object. Plugin authors can add topics,\r\n * callbacks to this object. These will be reassigned to all new instances of jsPDF.\r\n *\r\n * @static\r\n * @public\r\n * @memberof jsPDF#\r\n * @name API\r\n *\r\n * @example\r\n * jsPDF.API.mymethod = function(){\r\n *   // 'this' will be ref to internal API object. see jsPDF source\r\n *   // , so you can refer to built-in methods like so:\r\n *   //     this.line(....)\r\n *   //     this.text(....)\r\n * }\r\n * var pdfdoc = new jsPDF()\r\n * pdfdoc.mymethod() // <- !!!!!!\r\n */\r\njsPDF.API = {\r\n  events: []\r\n};\r\n/**\r\n * The version of jsPDF.\r\n * @name version\r\n * @type {string}\r\n * @memberof jsPDF#\r\n */\r\njsPDF.version = \"0.0.0\";\r\n\r\nexport { jsPDF, ShadingPattern, TilingPattern, GState };\r\nexport default jsPDF;\r\n","/* global jsPDF */\n/**\n * @license\n * Copyright (c) 2016 Alexander Weidt,\n * https://github.com/BiggA94\n *\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF AcroForm Plugin\n * @module AcroForm\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\nvar jsPDFAPI = jsPDF.API;\nvar scaleFactor = 1;\n\nvar pdfEscape = function(value) {\n  return value\n    .replace(/\\\\/g, \"\\\\\\\\\")\n    .replace(/\\(/g, \"\\\\(\")\n    .replace(/\\)/g, \"\\\\)\");\n};\nvar pdfUnescape = function(value) {\n  return value\n    .replace(/\\\\\\\\/g, \"\\\\\")\n    .replace(/\\\\\\(/g, \"(\")\n    .replace(/\\\\\\)/g, \")\");\n};\n\nvar f2 = function(number) {\n  return number.toFixed(2); // Ie, %.2f\n};\n\nvar f5 = function(number) {\n  return number.toFixed(5); // Ie, %.2f\n};\n\njsPDFAPI.__acroform__ = {};\nvar inherit = function(child, parent) {\n  child.prototype = Object.create(parent.prototype);\n  child.prototype.constructor = child;\n};\n\nvar scale = function(x) {\n  return x * scaleFactor;\n};\n\nvar createFormXObject = function(formObject) {\n  var xobj = new AcroFormXObject();\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  xobj.BBox = [0, 0, Number(f2(width)), Number(f2(height))];\n  return xobj;\n};\n\n/**\n * Bit-Operations\n */\nvar setBit = (jsPDFAPI.__acroform__.setBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number |= bitMask;\n\n  return number;\n});\n\nvar clearBit = (jsPDFAPI.__acroform__.clearBit = function(number, bitPosition) {\n  number = number || 0;\n  bitPosition = bitPosition || 0;\n\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBit\"\n    );\n  }\n  var bitMask = 1 << bitPosition;\n\n  number &= ~bitMask;\n\n  return number;\n});\n\nvar getBit = (jsPDFAPI.__acroform__.getBit = function(number, bitPosition) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBit\"\n    );\n  }\n  return (number & (1 << bitPosition)) === 0 ? 0 : 1;\n});\n\n/*\n * Ff starts counting the bit position at 1 and not like javascript at 0\n */\nvar getBitForPdf = (jsPDFAPI.__acroform__.getBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf\"\n    );\n  }\n  return getBit(number, bitPosition - 1);\n});\n\nvar setBitForPdf = (jsPDFAPI.__acroform__.setBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf\"\n    );\n  }\n  return setBit(number, bitPosition - 1);\n});\n\nvar clearBitForPdf = (jsPDFAPI.__acroform__.clearBitForPdf = function(\n  number,\n  bitPosition\n) {\n  if (isNaN(number) || isNaN(bitPosition)) {\n    throw new Error(\n      \"Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf\"\n    );\n  }\n  return clearBit(number, bitPosition - 1);\n});\n\nvar calculateCoordinates = (jsPDFAPI.__acroform__.calculateCoordinates = function(\n  args,\n  scope\n) {\n  var getHorizontalCoordinate = scope.internal.getHorizontalCoordinate;\n  var getVerticalCoordinate = scope.internal.getVerticalCoordinate;\n  var x = args[0];\n  var y = args[1];\n  var w = args[2];\n  var h = args[3];\n\n  var coordinates = {};\n\n  coordinates.lowerLeft_X = getHorizontalCoordinate(x) || 0;\n  coordinates.lowerLeft_Y = getVerticalCoordinate(y + h) || 0;\n  coordinates.upperRight_X = getHorizontalCoordinate(x + w) || 0;\n  coordinates.upperRight_Y = getVerticalCoordinate(y) || 0;\n\n  return [\n    Number(f2(coordinates.lowerLeft_X)),\n    Number(f2(coordinates.lowerLeft_Y)),\n    Number(f2(coordinates.upperRight_X)),\n    Number(f2(coordinates.upperRight_Y))\n  ];\n});\n\nvar calculateAppearanceStream = function(formObject) {\n  if (formObject.appearanceStreamContent) {\n    return formObject.appearanceStreamContent;\n  }\n\n  if (!formObject.V && !formObject.DV) {\n    return;\n  }\n\n  // else calculate it\n\n  var stream = [];\n  var text = formObject._V || formObject.DV;\n  var calcRes = calculateX(formObject, text);\n  var fontKey = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  ).id;\n\n  //PDF 32000-1:2008, page 444\n  stream.push(\"/Tx BMC\");\n  stream.push(\"q\");\n  stream.push(\"BT\"); // Begin Text\n  stream.push(formObject.scope.__private__.encodeColorString(formObject.color));\n  stream.push(\"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf\");\n  stream.push(\"1 0 0 1 0 0 Tm\"); // Transformation Matrix\n  stream.push(calcRes.text);\n  stream.push(\"ET\"); // End Text\n  stream.push(\"Q\");\n  stream.push(\"EMC\");\n\n  var appearanceStreamContent = createFormXObject(formObject);\n  appearanceStreamContent.scope = formObject.scope;\n  appearanceStreamContent.stream = stream.join(\"\\n\");\n  return appearanceStreamContent;\n};\n\nvar calculateX = function(formObject, text) {\n  var maxFontSize =\n    formObject.fontSize === 0 ? formObject.maxFontSize : formObject.fontSize;\n  var returnValue = {\n    text: \"\",\n    fontSize: \"\"\n  };\n  // Remove Brackets\n  text = text.substr(0, 1) == \"(\" ? text.substr(1) : text;\n  text =\n    text.substr(text.length - 1) == \")\"\n      ? text.substr(0, text.length - 1)\n      : text;\n  // split into array of words\n  var textSplit = text.split(\" \");\n  if (formObject.multiline) {\n    textSplit = textSplit.map(word => word.split(\"\\n\"));\n  } else {\n    textSplit = textSplit.map(word => [word]);\n  }\n\n  var fontSize = maxFontSize; // The Starting fontSize (The Maximum)\n  var lineSpacing = 2;\n  var borderPadding = 2;\n\n  var height = AcroFormAppearance.internal.getHeight(formObject) || 0;\n  height = height < 0 ? -height : height;\n  var width = AcroFormAppearance.internal.getWidth(formObject) || 0;\n  width = width < 0 ? -width : width;\n\n  var isSmallerThanWidth = function(i, lastLine, fontSize) {\n    if (i + 1 < textSplit.length) {\n      var tmp = lastLine + \" \" + textSplit[i + 1][0];\n      var TextWidth = calculateFontSpace(tmp, formObject, fontSize).width;\n      var FieldWidth = width - 2 * borderPadding;\n      return TextWidth <= FieldWidth;\n    } else {\n      return false;\n    }\n  };\n\n  fontSize++;\n  FontSize: while (fontSize > 0) {\n    text = \"\";\n    fontSize--;\n    var textHeight = calculateFontSpace(\"3\", formObject, fontSize).height;\n    var startY = formObject.multiline\n      ? height - fontSize\n      : (height - textHeight) / 2;\n    startY += lineSpacing;\n    var startX;\n\n    var lastY = startY;\n    var firstWordInLine = 0,\n      lastWordInLine = 0;\n    var lastLength;\n    var currWord = 0;\n\n    if (fontSize <= 0) {\n      // In case, the Text doesn't fit at all\n      fontSize = 12;\n      text = \"(...) Tj\\n\";\n      text +=\n        \"% Width of Text: \" +\n        calculateFontSpace(text, formObject, fontSize).width +\n        \", FieldWidth:\" +\n        width +\n        \"\\n\";\n      break;\n    }\n\n    var lastLine = \"\";\n    var lineCount = 0;\n    Line: for (var i = 0; i < textSplit.length; i++) {\n      if (textSplit.hasOwnProperty(i)) {\n        let isWithNewLine = false;\n        if (textSplit[i].length !== 1 && currWord !== textSplit[i].length - 1) {\n          if (\n            (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n            height\n          ) {\n            continue FontSize;\n          }\n\n          lastLine += textSplit[i][currWord];\n          isWithNewLine = true;\n          lastWordInLine = i;\n          i--;\n        } else {\n          lastLine += textSplit[i][currWord] + \" \";\n          lastLine =\n            lastLine.substr(lastLine.length - 1) == \" \"\n              ? lastLine.substr(0, lastLine.length - 1)\n              : lastLine;\n          var key = parseInt(i);\n          var nextLineIsSmaller = isSmallerThanWidth(key, lastLine, fontSize);\n          var isLastWord = i >= textSplit.length - 1;\n\n          if (nextLineIsSmaller && !isLastWord) {\n            lastLine += \" \";\n            currWord = 0;\n            continue; // Line\n          } else if (!nextLineIsSmaller && !isLastWord) {\n            if (!formObject.multiline) {\n              continue FontSize;\n            } else {\n              if (\n                (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n              ) {\n                // If the Text is higher than the\n                // FieldObject\n                continue FontSize;\n              }\n              lastWordInLine = key;\n              // go on\n            }\n          } else if (isLastWord) {\n            lastWordInLine = key;\n          } else {\n            if (\n              formObject.multiline &&\n              (textHeight + lineSpacing) * (lineCount + 2) + lineSpacing >\n                height\n            ) {\n              // If the Text is higher than the FieldObject\n              continue FontSize;\n            }\n          }\n        }\n        // Remove last blank\n\n        var line = \"\";\n\n        for (var x = firstWordInLine; x <= lastWordInLine; x++) {\n          var currLine = textSplit[x];\n          if (formObject.multiline) {\n            if (x === lastWordInLine) {\n              line += currLine[currWord] + \" \";\n              currWord = (currWord + 1) % currLine.length;\n              continue;\n            }\n            if (x === firstWordInLine) {\n              line += currLine[currLine.length - 1] + \" \";\n              continue;\n            }\n          }\n          line += currLine[0] + \" \";\n        }\n\n        // Remove last blank\n        line =\n          line.substr(line.length - 1) == \" \"\n            ? line.substr(0, line.length - 1)\n            : line;\n        // lastLength -= blankSpace.width;\n        lastLength = calculateFontSpace(line, formObject, fontSize).width;\n\n        // Calculate startX\n        switch (formObject.textAlign) {\n          case \"right\":\n            startX = width - lastLength - borderPadding;\n            break;\n          case \"center\":\n            startX = (width - lastLength) / 2;\n            break;\n          case \"left\":\n          default:\n            startX = borderPadding;\n            break;\n        }\n        text += f2(startX) + \" \" + f2(lastY) + \" Td\\n\";\n        text += \"(\" + pdfEscape(line) + \") Tj\\n\";\n        // reset X in PDF\n        text += -f2(startX) + \" 0 Td\\n\";\n\n        // After a Line, adjust y position\n        lastY = -(fontSize + lineSpacing);\n\n        // Reset for next iteration step\n        lastLength = 0;\n        firstWordInLine = isWithNewLine ? lastWordInLine : lastWordInLine + 1;\n        lineCount++;\n\n        lastLine = \"\";\n        continue Line;\n      }\n    }\n    break;\n  }\n\n  returnValue.text = text;\n  returnValue.fontSize = fontSize;\n\n  return returnValue;\n};\n\n/**\n * Small workaround for calculating the TextMetric approximately.\n *\n * @param text\n * @param fontsize\n * @returns {TextMetrics} (Has Height and Width)\n */\nvar calculateFontSpace = function(text, formObject, fontSize) {\n  var font = formObject.scope.internal.getFont(\n    formObject.fontName,\n    formObject.fontStyle\n  );\n  var width =\n    formObject.scope.getStringUnitWidth(text, {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) * parseFloat(fontSize);\n  var height =\n    formObject.scope.getStringUnitWidth(\"3\", {\n      font: font,\n      fontSize: parseFloat(fontSize),\n      charSpace: 0\n    }) *\n    parseFloat(fontSize) *\n    1.5;\n  return { height: height, width: width };\n};\n\nvar acroformPluginTemplate = {\n  fields: [],\n  xForms: [],\n  /**\n   * acroFormDictionaryRoot contains information about the AcroForm\n   * Dictionary 0: The Event-Token, the AcroFormDictionaryCallback has\n   * 1: The Object ID of the Root\n   */\n  acroFormDictionaryRoot: null,\n  /**\n   * After the PDF gets evaluated, the reference to the root has to be\n   * reset, this indicates, whether the root has already been printed\n   * out\n   */\n  printedOut: false,\n  internal: null,\n  isInitialized: false\n};\n\nvar annotReferenceCallback = function(scope) {\n  //set objId to undefined and force it to get a new objId on buildDocument\n  scope.internal.acroformPlugin.acroFormDictionaryRoot.objId = undefined;\n  var fields = scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields;\n  for (var i in fields) {\n    if (fields.hasOwnProperty(i)) {\n      var formObject = fields[i];\n      //set objId to undefined and force it to get a new objId on buildDocument\n      formObject.objId = undefined;\n      // add Annot Reference!\n      if (formObject.hasAnnotation) {\n        // If theres an Annotation Widget in the Form Object, put the\n        // Reference in the /Annot array\n        createAnnotationReference(formObject, scope);\n      }\n    }\n  }\n};\n\nvar putForm = function(formObject) {\n  if (formObject.scope.internal.acroformPlugin.printedOut) {\n    formObject.scope.internal.acroformPlugin.printedOut = false;\n    formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot = null;\n  }\n  formObject.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(\n    formObject\n  );\n};\n/**\n * Create the Reference to the widgetAnnotation, so that it gets referenced\n * in the Annot[] int the+ (Requires the Annotation Plugin)\n */\nvar createAnnotationReference = function(object, scope) {\n  var options = {\n    type: \"reference\",\n    object: object\n  };\n  var findEntry = function(entry) {\n    return entry.type === options.type && entry.object === options.object;\n  };\n  if (\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.find(findEntry) === undefined\n  ) {\n    scope.internal\n      .getPageInfo(object.page)\n      .pageContext.annotations.push(options);\n  }\n};\n\n// Callbacks\n\nvar putCatalogCallback = function(scope) {\n  // Put reference to AcroForm to DocumentCatalog\n  if (\n    typeof scope.internal.acroformPlugin.acroFormDictionaryRoot !== \"undefined\"\n  ) {\n    // for safety, shouldn't normally be the case\n    scope.internal.write(\n      \"/AcroForm \" +\n        scope.internal.acroformPlugin.acroFormDictionaryRoot.objId +\n        \" \" +\n        0 +\n        \" R\"\n    );\n  } else {\n    throw new Error(\"putCatalogCallback: Root missing.\");\n  }\n};\n\n/**\n * Adds /Acroform X 0 R to Document Catalog, and creates the AcroForm\n * Dictionary\n */\nvar AcroFormDictionaryCallback = function(scope) {\n  // Remove event\n  scope.internal.events.unsubscribe(\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID\n  );\n  delete scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID;\n  scope.internal.acroformPlugin.printedOut = true;\n};\n\n/**\n * Creates the single Fields and writes them into the Document\n *\n * If fieldArray is set, use the fields that are inside it instead of the\n * fields from the AcroRoot (for the FormXObjects...)\n */\nvar createFieldCallback = function(fieldArray, scope) {\n  var standardFields = !fieldArray;\n\n  if (!fieldArray) {\n    // in case there is no fieldArray specified, we want to print out\n    // the Fields of the AcroForm\n    // Print out Root\n    scope.internal.newObjectDeferredBegin(\n      scope.internal.acroformPlugin.acroFormDictionaryRoot.objId,\n      true\n    );\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.putStream();\n  }\n\n  fieldArray =\n    fieldArray || scope.internal.acroformPlugin.acroFormDictionaryRoot.Kids;\n\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var fieldObject = fieldArray[i];\n      var keyValueList = [];\n      var oldRect = fieldObject.Rect;\n\n      if (fieldObject.Rect) {\n        fieldObject.Rect = calculateCoordinates(fieldObject.Rect, scope);\n      }\n\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      fieldObject.DA = AcroFormAppearance.createDefaultAppearanceStream(\n        fieldObject\n      );\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.getKeyValueListForStream === \"function\"\n      ) {\n        keyValueList = fieldObject.getKeyValueListForStream();\n      }\n\n      fieldObject.Rect = oldRect;\n\n      if (\n        fieldObject.hasAppearanceStream &&\n        !fieldObject.appearanceStreamContent\n      ) {\n        // Calculate Appearance\n        var appearance = calculateAppearanceStream(fieldObject);\n        keyValueList.push({ key: \"AP\", value: \"<</N \" + appearance + \">>\" });\n\n        scope.internal.acroformPlugin.xForms.push(appearance);\n      }\n\n      // Assume AppearanceStreamContent is a Array with N,R,D (at least\n      // one of them!)\n      if (fieldObject.appearanceStreamContent) {\n        var appearanceStreamString = \"\";\n        // Iterate over N,R and D\n        for (var k in fieldObject.appearanceStreamContent) {\n          if (fieldObject.appearanceStreamContent.hasOwnProperty(k)) {\n            var value = fieldObject.appearanceStreamContent[k];\n            appearanceStreamString += \"/\" + k + \" \";\n            appearanceStreamString += \"<<\";\n            if (Object.keys(value).length >= 1 || Array.isArray(value)) {\n              // appearanceStream is an Array or Object!\n              for (var i in value) {\n                if (value.hasOwnProperty(i)) {\n                  var obj = value[i];\n                  if (typeof obj === \"function\") {\n                    // if Function is referenced, call it in order\n                    // to get the FormXObject\n                    obj = obj.call(scope, fieldObject);\n                  }\n                  appearanceStreamString += \"/\" + i + \" \" + obj + \" \";\n\n                  // In case the XForm is already used, e.g. OffState\n                  // of CheckBoxes, don't add it\n                  if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                    scope.internal.acroformPlugin.xForms.push(obj);\n                }\n              }\n            } else {\n              obj = value;\n              if (typeof obj === \"function\") {\n                // if Function is referenced, call it in order to\n                // get the FormXObject\n                obj = obj.call(scope, fieldObject);\n              }\n              appearanceStreamString += \"/\" + i + \" \" + obj;\n              if (!(scope.internal.acroformPlugin.xForms.indexOf(obj) >= 0))\n                scope.internal.acroformPlugin.xForms.push(obj);\n            }\n            appearanceStreamString += \">>\";\n          }\n        }\n\n        // appearance stream is a normal Object..\n        keyValueList.push({\n          key: \"AP\",\n          value: \"<<\\n\" + appearanceStreamString + \">>\"\n        });\n      }\n\n      scope.internal.putStream({\n        additionalKeyValues: keyValueList,\n        objectId: fieldObject.objId\n      });\n\n      scope.internal.out(\"endobj\");\n    }\n  }\n  if (standardFields) {\n    createXFormObjectCallback(scope.internal.acroformPlugin.xForms, scope);\n  }\n};\n\nvar createXFormObjectCallback = function(fieldArray, scope) {\n  for (var i in fieldArray) {\n    if (fieldArray.hasOwnProperty(i)) {\n      var key = i;\n      var fieldObject = fieldArray[i];\n      // Start Writing the Object\n      scope.internal.newObjectDeferredBegin(fieldObject.objId, true);\n\n      if (\n        typeof fieldObject === \"object\" &&\n        typeof fieldObject.putStream === \"function\"\n      ) {\n        fieldObject.putStream();\n      }\n      delete fieldArray[key];\n    }\n  }\n};\n\nvar initializeAcroForm = function(scope, formObject) {\n  formObject.scope = scope;\n  if (\n    scope.internal !== undefined &&\n    (scope.internal.acroformPlugin === undefined ||\n      scope.internal.acroformPlugin.isInitialized === false)\n  ) {\n    AcroFormField.FieldNum = 0;\n    scope.internal.acroformPlugin = JSON.parse(\n      JSON.stringify(acroformPluginTemplate)\n    );\n    if (scope.internal.acroformPlugin.acroFormDictionaryRoot) {\n      throw new Error(\"Exception while creating AcroformDictionary\");\n    }\n    scaleFactor = scope.internal.scaleFactor;\n    // The Object Number of the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot = new AcroFormDictionary();\n    scope.internal.acroformPlugin.acroFormDictionaryRoot.scope = scope;\n\n    // add Callback for creating the AcroForm Dictionary\n    scope.internal.acroformPlugin.acroFormDictionaryRoot._eventID = scope.internal.events.subscribe(\n      \"postPutResources\",\n      function() {\n        AcroFormDictionaryCallback(scope);\n      }\n    );\n\n    scope.internal.events.subscribe(\"buildDocument\", function() {\n      annotReferenceCallback(scope);\n    }); // buildDocument\n\n    // Register event, that is triggered when the DocumentCatalog is\n    // written, in order to add /AcroForm\n\n    scope.internal.events.subscribe(\"putCatalog\", function() {\n      putCatalogCallback(scope);\n    });\n\n    // Register event, that creates all Fields\n    scope.internal.events.subscribe(\"postPutPages\", function(fieldArray) {\n      createFieldCallback(fieldArray, scope);\n    });\n\n    scope.internal.acroformPlugin.isInitialized = true;\n  }\n};\n\n//PDF 32000-1:2008, page 26, 7.3.6\nvar arrayToPdfArray = (jsPDFAPI.__acroform__.arrayToPdfArray = function(\n  array,\n  objId,\n  scope\n) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (Array.isArray(array)) {\n    var content = \"[\";\n    for (var i = 0; i < array.length; i++) {\n      if (i !== 0) {\n        content += \" \";\n      }\n      switch (typeof array[i]) {\n        case \"boolean\":\n        case \"number\":\n        case \"object\":\n          content += array[i].toString();\n          break;\n        case \"string\":\n          if (array[i].substr(0, 1) !== \"/\") {\n            if (typeof objId !== \"undefined\" && scope)\n              encryptor = scope.internal.getEncryptor(objId);\n            content += \"(\" + pdfEscape(encryptor(array[i].toString())) + \")\";\n          } else {\n            content += array[i].toString();\n          }\n          break;\n      }\n    }\n    content += \"]\";\n    return content;\n  }\n  throw new Error(\n    \"Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray\"\n  );\n});\nfunction getMatches(string, regex, index) {\n  index || (index = 1); // default to the first capturing group\n  var matches = [];\n  var match;\n  while ((match = regex.exec(string))) {\n    matches.push(match[index]);\n  }\n  return matches;\n}\nvar pdfArrayToStringArray = function(array) {\n  var result = [];\n  if (typeof array === \"string\") {\n    result = getMatches(array, /\\((.*?)\\)/g);\n  }\n  return result;\n};\n\nvar toPdfString = function(string, objId, scope) {\n  var encryptor = function(data) {\n    return data;\n  };\n  if (typeof objId !== \"undefined\" && scope)\n    encryptor = scope.internal.getEncryptor(objId);\n  string = string || \"\";\n  string.toString();\n  string = \"(\" + pdfEscape(encryptor(string)) + \")\";\n  return string;\n};\n\n// ##########################\n// Classes\n// ##########################\n\n/**\n * @class AcroFormPDFObject\n * @classdesc A AcroFormPDFObject\n */\nvar AcroFormPDFObject = function() {\n  this._objId = undefined;\n  this._scope = undefined;\n\n  /**\n   * @name AcroFormPDFObject#objId\n   * @type {any}\n   */\n  Object.defineProperty(this, \"objId\", {\n    get: function() {\n      if (typeof this._objId === \"undefined\") {\n        if (typeof this.scope === \"undefined\") {\n          return undefined;\n        }\n        this._objId = this.scope.internal.newObjectDeferred();\n      }\n      return this._objId;\n    },\n    set: function(value) {\n      this._objId = value;\n    }\n  });\n  Object.defineProperty(this, \"scope\", {\n    value: this._scope,\n    writable: true\n  });\n};\n\n/**\n * @function AcroFormPDFObject.toString\n */\nAcroFormPDFObject.prototype.toString = function() {\n  return this.objId + \" 0 R\";\n};\n\nAcroFormPDFObject.prototype.putStream = function() {\n  var keyValueList = this.getKeyValueListForStream();\n  this.scope.internal.putStream({\n    data: this.stream,\n    additionalKeyValues: keyValueList,\n    objectId: this.objId\n  });\n  this.scope.internal.out(\"endobj\");\n};\n\n/**\n * Returns an key-value-List of all non-configurable Variables from the Object\n *\n * @name getKeyValueListForStream\n * @returns {string}\n */\nAcroFormPDFObject.prototype.getKeyValueListForStream = function() {\n  var keyValueList = [];\n  var keys = Object.getOwnPropertyNames(this).filter(function(key) {\n    return (\n      key != \"content\" &&\n      key != \"appearanceStreamContent\" &&\n      key != \"scope\" &&\n      key != \"objId\" &&\n      key.substring(0, 1) != \"_\"\n    );\n  });\n\n  for (var i in keys) {\n    if (Object.getOwnPropertyDescriptor(this, keys[i]).configurable === false) {\n      var key = keys[i];\n      var value = this[key];\n\n      if (value) {\n        if (Array.isArray(value)) {\n          keyValueList.push({\n            key: key,\n            value: arrayToPdfArray(value, this.objId, this.scope)\n          });\n        } else if (value instanceof AcroFormPDFObject) {\n          // In case it is a reference to another PDFObject,\n          // take the reference number\n          value.scope = this.scope;\n          keyValueList.push({ key: key, value: value.objId + \" 0 R\" });\n        } else if (typeof value !== \"function\") {\n          keyValueList.push({ key: key, value: value });\n        }\n      }\n    }\n  }\n  return keyValueList;\n};\n\nvar AcroFormXObject = function() {\n  AcroFormPDFObject.call(this);\n\n  Object.defineProperty(this, \"Type\", {\n    value: \"/XObject\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    value: \"/Form\",\n    configurable: false,\n    writable: true\n  });\n\n  Object.defineProperty(this, \"FormType\", {\n    value: 1,\n    configurable: false,\n    writable: true\n  });\n\n  var _BBox = [];\n  Object.defineProperty(this, \"BBox\", {\n    configurable: false,\n    get: function() {\n      return _BBox;\n    },\n    set: function(value) {\n      _BBox = value;\n    }\n  });\n\n  Object.defineProperty(this, \"Resources\", {\n    value: \"2 0 R\",\n    configurable: false,\n    writable: true\n  });\n\n  var _stream;\n  Object.defineProperty(this, \"stream\", {\n    enumerable: false,\n    configurable: true,\n    set: function(value) {\n      _stream = value.trim();\n    },\n    get: function() {\n      if (_stream) {\n        return _stream;\n      } else {\n        return null;\n      }\n    }\n  });\n};\n\ninherit(AcroFormXObject, AcroFormPDFObject);\n\nvar AcroFormDictionary = function() {\n  AcroFormPDFObject.call(this);\n\n  var _Kids = [];\n\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      if (_Kids.length > 0) {\n        return _Kids;\n      } else {\n        return undefined;\n      }\n    }\n  });\n  Object.defineProperty(this, \"Fields\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    }\n  });\n\n  // Default Appearance\n  var _DA;\n  Object.defineProperty(this, \"DA\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DA) {\n        return undefined;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_DA)) + \")\";\n    },\n    set: function(value) {\n      _DA = value;\n    }\n  });\n};\n\ninherit(AcroFormDictionary, AcroFormPDFObject);\n\n/**\n * The Field Object contains the Variables, that every Field needs\n *\n * @class AcroFormField\n * @classdesc An AcroForm FieldObject\n */\nvar AcroFormField = function() {\n  AcroFormPDFObject.call(this);\n\n  //Annotation-Flag See Table 165\n  var _F = 4;\n  Object.defineProperty(this, \"F\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _F;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _F = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute F supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.2) If set, print the annotation when the page is printed. If clear, never print the annotation, regardless of wether is is displayed on the screen.\n   * NOTE 2 This can be useful for annotations representing interactive pushbuttons, which would serve no meaningful purpose on the printed page.\n   *\n   * @name AcroFormField#showWhenPrinted\n   * @default true\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"showWhenPrinted\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(_F, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.F = setBitForPdf(_F, 3);\n      } else {\n        this.F = clearBitForPdf(_F, 3);\n      }\n    }\n  });\n\n  var _Ff = 0;\n  Object.defineProperty(this, \"Ff\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _Ff;\n    },\n    set: function(value) {\n      if (!isNaN(value)) {\n        _Ff = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Ff supplied.'\n        );\n      }\n    }\n  });\n\n  var _Rect = [];\n  Object.defineProperty(this, \"Rect\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (_Rect.length === 0) {\n        return undefined;\n      }\n      return _Rect;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Rect = value;\n      } else {\n        _Rect = [];\n      }\n    }\n  });\n\n  /**\n   * The x-position of the field.\n   *\n   * @name AcroFormField#x\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"x\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[0])) {\n        return 0;\n      }\n      return _Rect[0];\n    },\n    set: function(value) {\n      _Rect[0] = value;\n    }\n  });\n\n  /**\n   * The y-position of the field.\n   *\n   * @name AcroFormField#y\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"y\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[1])) {\n        return 0;\n      }\n      return _Rect[1];\n    },\n    set: function(value) {\n      _Rect[1] = value;\n    }\n  });\n\n  /**\n   * The width of the field.\n   *\n   * @name AcroFormField#width\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"width\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[2])) {\n        return 0;\n      }\n      return _Rect[2];\n    },\n    set: function(value) {\n      _Rect[2] = value;\n    }\n  });\n\n  /**\n   * The height of the field.\n   *\n   * @name AcroFormField#height\n   * @default null\n   * @type {number}\n   */\n  Object.defineProperty(this, \"height\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_Rect || isNaN(_Rect[3])) {\n        return 0;\n      }\n      return _Rect[3];\n    },\n    set: function(value) {\n      _Rect[3] = value;\n    }\n  });\n\n  var _FT = \"\";\n  Object.defineProperty(this, \"FT\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _FT;\n    },\n    set: function(value) {\n      switch (value) {\n        case \"/Btn\":\n        case \"/Tx\":\n        case \"/Ch\":\n        case \"/Sig\":\n          _FT = value;\n          break;\n        default:\n          throw new Error(\n            'Invalid value \"' + value + '\" for attribute FT supplied.'\n          );\n      }\n    }\n  });\n\n  var _T = null;\n\n  Object.defineProperty(this, \"T\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (!_T || _T.length < 1) {\n        // In case of a Child from a Radio´Group, you don't need a FieldName\n        if (this instanceof AcroFormChildClass) {\n          return undefined;\n        }\n        _T = \"FieldObject\" + AcroFormField.FieldNum++;\n      }\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      return \"(\" + pdfEscape(encryptor(_T)) + \")\";\n    },\n    set: function(value) {\n      _T = value.toString();\n    }\n  });\n\n  /**\n   * (Optional) The partial field name (see 12.7.3.2, “Field Names”).\n   *\n   * @name AcroFormField#fieldName\n   * @default null\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fieldName\", {\n    configurable: true,\n    enumerable: true,\n    get: function() {\n      return _T;\n    },\n    set: function(value) {\n      _T = value;\n    }\n  });\n\n  var _fontName = \"helvetica\";\n  /**\n   * The fontName of the font to be used.\n   *\n   * @name AcroFormField#fontName\n   * @default 'helvetica'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontName\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontName;\n    },\n    set: function(value) {\n      _fontName = value;\n    }\n  });\n\n  var _fontStyle = \"normal\";\n  /**\n   * The fontStyle of the font to be used.\n   *\n   * @name AcroFormField#fontStyle\n   * @default 'normal'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"fontStyle\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontStyle;\n    },\n    set: function(value) {\n      _fontStyle = value;\n    }\n  });\n\n  var _fontSize = 0;\n  /**\n   * The fontSize of the font to be used.\n   *\n   * @name AcroFormField#fontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"fontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _fontSize;\n    },\n    set: function(value) {\n      _fontSize = value;\n    }\n  });\n\n  var _maxFontSize = undefined;\n  /**\n   * The maximum fontSize of the font to be used.\n   *\n   * @name AcroFormField#maxFontSize\n   * @default 0 (for auto)\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxFontSize\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (_maxFontSize === undefined) {\n        // use the old default value here - the value is some kind of random as it depends on the scaleFactor (user unit)\n        // (\"50\" is transformed to the \"user space\" but then used in \"pdf space\")\n        return 50 / scaleFactor;\n      } else {\n        return _maxFontSize;\n      }\n    },\n    set: function(value) {\n      _maxFontSize = value;\n    }\n  });\n\n  var _color = \"black\";\n  /**\n   * The color of the text\n   *\n   * @name AcroFormField#color\n   * @default 'black'\n   * @type {string|rgba}\n   */\n  Object.defineProperty(this, \"color\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _color;\n    },\n    set: function(value) {\n      _color = value;\n    }\n  });\n\n  var _DA = \"/F1 0 Tf 0 g\";\n  // Defines the default appearance (Needed for variable Text)\n  Object.defineProperty(this, \"DA\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (\n        !_DA ||\n        this instanceof AcroFormChildClass ||\n        this instanceof AcroFormTextField\n      ) {\n        return undefined;\n      }\n      return toPdfString(_DA, this.objId, this.scope);\n    },\n    set: function(value) {\n      value = value.toString();\n      _DA = value;\n    }\n  });\n\n  var _DV = null;\n  Object.defineProperty(this, \"DV\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_DV) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_DV, this.objId, this.scope);\n      }\n      return _DV;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _DV = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _DV = pdfUnescape(value);\n        }\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The default value to which the field reverts when a reset-form action is executed (see 12.7.5.3, “Reset-Form Action”). The format of this value is the same as that of value.\n   *\n   * @name AcroFormField#defaultValue\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"defaultValue\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_DV.substr(1, _DV.length - 1));\n      } else {\n        return _DV;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _DV = \"/\" + value;\n      } else {\n        _DV = value;\n      }\n    }\n  });\n\n  var _V = null;\n  Object.defineProperty(this, \"_V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      return _V;\n    },\n    set: function(value) {\n      this.V = value;\n    }\n  });\n  Object.defineProperty(this, \"V\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      if (!_V) {\n        return undefined;\n      }\n      if (this instanceof AcroFormButton === false) {\n        return toPdfString(_V, this.objId, this.scope);\n      }\n      return _V;\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === false) {\n        if (value.substr(0, 1) === \"(\") {\n          _V = pdfUnescape(value.substr(1, value.length - 2));\n        } else {\n          _V = pdfUnescape(value);\n        }\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The field’s value, whose format varies depending on the field type. See the descriptions of individual field types for further information.\n   *\n   * @name AcroFormField#value\n   * @default null\n   * @type {any}\n   */\n  Object.defineProperty(this, \"value\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (this instanceof AcroFormButton === true) {\n        return pdfUnescape(_V.substr(1, _V.length - 1));\n      } else {\n        return _V;\n      }\n    },\n    set: function(value) {\n      value = value.toString();\n      if (this instanceof AcroFormButton === true) {\n        _V = \"/\" + value;\n      } else {\n        _V = value;\n      }\n    }\n  });\n\n  /**\n   * Check if field has annotations\n   *\n   * @name AcroFormField#hasAnnotation\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAnnotation\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.Rect;\n    }\n  });\n\n  Object.defineProperty(this, \"Type\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Annot\" : null;\n    }\n  });\n\n  Object.defineProperty(this, \"Subtype\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return this.hasAnnotation ? \"/Widget\" : null;\n    }\n  });\n\n  var _hasAppearanceStream = false;\n  /**\n   * true if field has an appearanceStream\n   *\n   * @name AcroFormField#hasAppearanceStream\n   * @readonly\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _hasAppearanceStream;\n    },\n    set: function(value) {\n      value = Boolean(value);\n      _hasAppearanceStream = value;\n    }\n  });\n\n  /**\n   * The page on which the AcroFormField is placed\n   *\n   * @name AcroFormField#page\n   * @type {number}\n   */\n  var _page;\n  Object.defineProperty(this, \"page\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      if (!_page) {\n        return undefined;\n      }\n      return _page;\n    },\n    set: function(value) {\n      _page = value;\n    }\n  });\n\n  /**\n   * If set, the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.\n   *\n   * @name AcroFormField#readOnly\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"readOnly\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 1));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 1);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 1);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall have a value at the time it is exported by a submitform action (see 12.7.5.2, “Submit-Form Action”).\n   *\n   * @name AcroFormField#required\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"required\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 2));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 2);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 2);\n      }\n    }\n  });\n\n  /**\n   * If set, the field shall not be exported by a submit-form action (see 12.7.5.2, “Submit-Form Action”)\n   *\n   * @name AcroFormField#noExport\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noExport\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 3));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 3);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 3);\n      }\n    }\n  });\n\n  var _Q = null;\n  Object.defineProperty(this, \"Q\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      if (_Q === null) {\n        return undefined;\n      }\n      return _Q;\n    },\n    set: function(value) {\n      if ([0, 1, 2].indexOf(value) !== -1) {\n        _Q = value;\n      } else {\n        throw new Error(\n          'Invalid value \"' + value + '\" for attribute Q supplied.'\n        );\n      }\n    }\n  });\n\n  /**\n   * (Optional; inheritable) A code specifying the form of quadding (justification) that shall be used in displaying the text:\n   * 'left', 'center', 'right'\n   *\n   * @name AcroFormField#textAlign\n   * @default 'left'\n   * @type {string}\n   */\n  Object.defineProperty(this, \"textAlign\", {\n    get: function() {\n      var result;\n      switch (_Q) {\n        case 0:\n        default:\n          result = \"left\";\n          break;\n        case 1:\n          result = \"center\";\n          break;\n        case 2:\n          result = \"right\";\n          break;\n      }\n      return result;\n    },\n    configurable: true,\n    enumerable: true,\n    set: function(value) {\n      switch (value) {\n        case \"right\":\n        case 2:\n          _Q = 2;\n          break;\n        case \"center\":\n        case 1:\n          _Q = 1;\n          break;\n        case \"left\":\n        case 0:\n        default:\n          _Q = 0;\n      }\n    }\n  });\n};\n\ninherit(AcroFormField, AcroFormPDFObject);\n\n/**\n * @class AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormChoiceField = function() {\n  AcroFormField.call(this);\n  // Field Type = Choice Field\n  this.FT = \"/Ch\";\n  // options\n  this.V = \"()\";\n\n  this.fontName = \"zapfdingbats\";\n  // Top Index\n  var _TI = 0;\n\n  Object.defineProperty(this, \"TI\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  /**\n   * (Optional) For scrollable list boxes, the top index (the index in the Opt array of the first option visible in the list). Default value: 0.\n   *\n   * @name AcroFormChoiceField#topIndex\n   * @default 0\n   * @type {number}\n   */\n  Object.defineProperty(this, \"topIndex\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _TI;\n    },\n    set: function(value) {\n      _TI = value;\n    }\n  });\n\n  var _Opt = [];\n  Object.defineProperty(this, \"Opt\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return arrayToPdfArray(_Opt, this.objId, this.scope);\n    },\n    set: function(value) {\n      _Opt = pdfArrayToStringArray(value);\n    }\n  });\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name getOptions\n   * @function\n   * @instance\n   * @returns {array} array of Options\n   */\n  this.getOptions = function() {\n    return _Opt;\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name setOptions\n   * @function\n   * @instance\n   * @param {array} value\n   */\n  this.setOptions = function(value) {\n    _Opt = value;\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name addOption\n   * @function\n   * @instance\n   * @param {string} value\n   */\n  this.addOption = function(value) {\n    value = value || \"\";\n    value = value.toString();\n    _Opt.push(value);\n    if (this.sort) {\n      _Opt.sort();\n    }\n  };\n\n  /**\n   * @memberof AcroFormChoiceField\n   * @name removeOption\n   * @function\n   * @instance\n   * @param {string} value\n   * @param {boolean} allEntries (default: false)\n   */\n  this.removeOption = function(value, allEntries) {\n    allEntries = allEntries || false;\n    value = value || \"\";\n    value = value.toString();\n\n    while (_Opt.indexOf(value) !== -1) {\n      _Opt.splice(_Opt.indexOf(value), 1);\n      if (allEntries === false) {\n        break;\n      }\n    }\n  };\n\n  /**\n   * If set, the field is a combo box; if clear, the field is a list box.\n   *\n   * @name AcroFormChoiceField#combo\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"combo\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 18));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 18);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 18);\n      }\n    }\n  });\n\n  /**\n   * If set, the combo box shall include an editable text box as well as a drop-down list; if clear, it shall include only a drop-down list. This flag shall be used only if the Combo flag is set.\n   *\n   * @name AcroFormChoiceField#edit\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"edit\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 19));\n    },\n    set: function(value) {\n      //PDF 32000-1:2008, page 444\n      if (this.combo === true) {\n        if (Boolean(value) === true) {\n          this.Ff = setBitForPdf(this.Ff, 19);\n        } else {\n          this.Ff = clearBitForPdf(this.Ff, 19);\n        }\n      }\n    }\n  });\n\n  /**\n   * If set, the field’s option items shall be sorted alphabetically. This flag is intended for use by writers, not by readers. Conforming readers shall display the options in the order in which they occur in the Opt array (see Table 231).\n   *\n   * @name AcroFormChoiceField#sort\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"sort\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 20));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 20);\n        _Opt.sort();\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 20);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, more than one of the field’s option items may be selected simultaneously; if clear, at most one item shall be selected\n   *\n   * @name AcroFormChoiceField#multiSelect\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 22));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 22);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 22);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spellchecked. This flag shall not be used unless the Combo and Edit flags are both set.\n   *\n   * @name AcroFormChoiceField#doNotSpellCheck\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the new value shall be committed as soon as a selection is made (commonly with the pointing device). In this case, supplying a value for a field involves three actions: selecting the field for fill-in, selecting a choice for the fill-in value, and leaving that field, which finalizes or “commits” the data choice and triggers any actions associated with the entry or changing of this data. If this flag is on, then processing does not wait for leaving the field action to occur, but immediately proceeds to the third step.\n   * This option enables applications to perform an action once a selection is made, without requiring the user to exit the field. If clear, the new value is not committed until the user exits the field.\n   *\n   * @name AcroFormChoiceField#commitOnSelChange\n   * @default false\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"commitOnSelChange\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 27));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 27);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 27);\n      }\n    }\n  });\n\n  this.hasAppearanceStream = false;\n};\ninherit(AcroFormChoiceField, AcroFormField);\n\n/**\n * @class AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormListBox = function() {\n  AcroFormChoiceField.call(this);\n  this.fontName = \"helvetica\";\n\n  //PDF 32000-1:2008, page 444\n  this.combo = false;\n};\ninherit(AcroFormListBox, AcroFormChoiceField);\n\n/**\n * @class AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormComboBox = function() {\n  AcroFormListBox.call(this);\n  this.combo = true;\n};\ninherit(AcroFormComboBox, AcroFormListBox);\n\n/**\n * @class AcroFormEditBox\n * @extends AcroFormComboBox\n * @extends AcroFormListBox\n * @extends AcroFormChoiceField\n * @extends AcroFormField\n */\nvar AcroFormEditBox = function() {\n  AcroFormComboBox.call(this);\n  this.edit = true;\n};\ninherit(AcroFormEditBox, AcroFormComboBox);\n\n/**\n * @class AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormButton = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Btn\";\n\n  /**\n   * (Radio buttons only) If set, exactly one radio button shall be selected at all times; selecting the currently selected button has no effect. If clear, clicking the selected button deselects it, leaving no button selected.\n   *\n   * @name AcroFormButton#noToggleToOff\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"noToggleToOff\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 15));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 15);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 15);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a set of radio buttons; if clear, the field is a checkbox. This flag may be set only if the Pushbutton flag is clear.\n   *\n   * @name AcroFormButton#radio\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radio\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 16));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 16);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 16);\n      }\n    }\n  });\n\n  /**\n   * If set, the field is a pushbutton that does not retain a permanent value.\n   *\n   * @name AcroFormButton#pushButton\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"pushButton\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 17));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 17);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 17);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, a group of radio buttons within a radio button field that use the same value for the on state will turn on and off in unison; that is if one is checked, they are all checked. If clear, the buttons are mutually exclusive (the same behavior as HTML radio buttons).\n   *\n   * @name AcroFormButton#radioIsUnison\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"radioIsUnison\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      if (Object.keys(_MK).length !== 0) {\n        var result = [];\n        result.push(\"<<\");\n        var key;\n        for (key in _MK) {\n          result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n        }\n        result.push(\">>\");\n        return result.join(\"\\n\");\n      }\n      return undefined;\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n};\ninherit(AcroFormButton, AcroFormField);\n\n/**\n * @class AcroFormPushButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormPushButton = function() {\n  AcroFormButton.call(this);\n  this.pushButton = true;\n};\ninherit(AcroFormPushButton, AcroFormButton);\n\n/**\n * @class AcroFormRadioButton\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormRadioButton = function() {\n  AcroFormButton.call(this);\n  this.radio = true;\n  this.pushButton = false;\n\n  var _Kids = [];\n  Object.defineProperty(this, \"Kids\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _Kids;\n    },\n    set: function(value) {\n      if (typeof value !== \"undefined\") {\n        _Kids = value;\n      } else {\n        _Kids = [];\n      }\n    }\n  });\n};\ninherit(AcroFormRadioButton, AcroFormButton);\n\n/**\n * The Child class of a RadioButton (the radioGroup) -> The single Buttons\n *\n * @class AcroFormChildClass\n * @extends AcroFormField\n * @ignore\n */\nvar AcroFormChildClass = function() {\n  AcroFormField.call(this);\n\n  var _parent;\n  Object.defineProperty(this, \"Parent\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _parent;\n    },\n    set: function(value) {\n      _parent = value;\n    }\n  });\n\n  var _optionName;\n  Object.defineProperty(this, \"optionName\", {\n    enumerable: false,\n    configurable: true,\n    get: function() {\n      return _optionName;\n    },\n    set: function(value) {\n      _optionName = value;\n    }\n  });\n\n  var _MK = {};\n  Object.defineProperty(this, \"MK\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      var encryptor = function(data) {\n        return data;\n      };\n      if (this.scope) encryptor = this.scope.internal.getEncryptor(this.objId);\n      var result = [];\n      result.push(\"<<\");\n      var key;\n      for (key in _MK) {\n        result.push(\"/\" + key + \" (\" + pdfEscape(encryptor(_MK[key])) + \")\");\n      }\n      result.push(\">>\");\n      return result.join(\"\\n\");\n    },\n    set: function(value) {\n      if (typeof value === \"object\") {\n        _MK = value;\n      }\n    }\n  });\n\n  /**\n   * From the PDF reference:\n   * (Optional, button fields only) The widget annotation's normal caption which shall be displayed when it is not interacting with the user.\n   * Unlike the remaining entries listed in this Table which apply only to widget annotations associated with pushbutton fields (see Pushbuttons in 12.7.4.2, \"Button Fields\"), the CA entry may be used with any type of button field, including check boxes (see Check Boxes in 12.7.4.2, \"Button Fields\") and radio buttons (Radio Buttons in 12.7.4.2, \"Button Fields\").\n   *\n   * - '8' = Cross,\n   * - 'l' =  Circle,\n   * - '' = nothing\n   * @name AcroFormButton#caption\n   * @type {string}\n   */\n  Object.defineProperty(this, \"caption\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MK.CA || \"\";\n    },\n    set: function(value) {\n      if (typeof value === \"string\") {\n        _MK.CA = value;\n      }\n    }\n  });\n\n  var _AS;\n  Object.defineProperty(this, \"AS\", {\n    enumerable: false,\n    configurable: false,\n    get: function() {\n      return _AS;\n    },\n    set: function(value) {\n      _AS = value;\n    }\n  });\n\n  /**\n   * (Required if the appearance dictionary AP contains one or more subdictionaries; PDF 1.2) The annotation's appearance state, which selects the applicable appearance stream from an appearance subdictionary (see Section 12.5.5, \"Appearance Streams\")\n   *\n   * @name AcroFormButton#appearanceState\n   * @type {any}\n   */\n  Object.defineProperty(this, \"appearanceState\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _AS.substr(1, _AS.length - 1);\n    },\n    set: function(value) {\n      _AS = \"/\" + value;\n    }\n  });\n  this.caption = \"l\";\n  this.appearanceState = \"Off\";\n  // todo: set AppearanceType as variable that can be set from the\n  // outside...\n  this._AppearanceType = AcroFormAppearance.RadioButton.Circle;\n  // The Default appearanceType is the Circle\n  this.appearanceStreamContent = this._AppearanceType.createAppearanceStream(\n    this.optionName\n  );\n};\ninherit(AcroFormChildClass, AcroFormField);\n\nAcroFormRadioButton.prototype.setAppearance = function(appearance) {\n  if (!(\"createAppearanceStream\" in appearance && \"getCA\" in appearance)) {\n    throw new Error(\n      \"Couldn't assign Appearance to RadioButton. Appearance was Invalid!\"\n    );\n  }\n  for (var objId in this.Kids) {\n    if (this.Kids.hasOwnProperty(objId)) {\n      var child = this.Kids[objId];\n      child.appearanceStreamContent = appearance.createAppearanceStream(\n        child.optionName\n      );\n      child.caption = appearance.getCA();\n    }\n  }\n};\n\nAcroFormRadioButton.prototype.createOption = function(name) {\n  // Create new Child for RadioGroup\n  var child = new AcroFormChildClass();\n  child.Parent = this;\n  child.optionName = name;\n  // Add to Parent\n  this.Kids.push(child);\n\n  addField.call(this.scope, child);\n\n  return child;\n};\n\n/**\n * @class AcroFormCheckBox\n * @extends AcroFormButton\n * @extends AcroFormField\n */\nvar AcroFormCheckBox = function() {\n  AcroFormButton.call(this);\n\n  this.fontName = \"zapfdingbats\";\n  this.caption = \"3\";\n  this.appearanceState = \"On\";\n  this.value = \"On\";\n  this.textAlign = \"center\";\n  this.appearanceStreamContent = AcroFormAppearance.CheckBox.createAppearanceStream();\n};\ninherit(AcroFormCheckBox, AcroFormButton);\n\n/**\n * @class AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormTextField = function() {\n  AcroFormField.call(this);\n  this.FT = \"/Tx\";\n\n  /**\n   * If set, the field may contain multiple lines of text; if clear, the field’s text shall be restricted to a single line.\n   *\n   * @name AcroFormTextField#multiline\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"multiline\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 13));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 13);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 13);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.\n   *\n   * @name AcroFormTextField#fileSelect\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"fileSelect\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 21));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 21);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 21);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, text entered in the field shall not be spell-checked.\n   *\n   * @name AcroFormTextField#doNotSpellCheck\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotSpellCheck\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 23));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 23);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 23);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.4) If set, the field shall not scroll (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle. Once the field is full, no further text shall be accepted for interactive form filling; for noninteractive form filling, the filler should take care not to add more character than will visibly fit in the defined area.\n   *\n   * @name AcroFormTextField#doNotScroll\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"doNotScroll\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 24));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 24);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 24);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) May be set only if the MaxLen entry is present in the text field dictionary (see Table 229) and if the Multiline, Password, and FileSelect flags are clear. If set, the field shall be automatically divided into as many equally spaced positions, or combs, as the value of MaxLen, and the text is laid out into those combs.\n   *\n   * @name AcroFormTextField#comb\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"comb\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 25));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 25);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 25);\n      }\n    }\n  });\n\n  /**\n   * (PDF 1.5) If set, the value of this field shall be a rich text string (see 12.7.3.4, “Rich Text Strings”). If the field has a value, the RV entry of the field dictionary (Table 222) shall specify the rich text string.\n   *\n   * @name AcroFormTextField#richText\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"richText\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 26));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 26);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 26);\n      }\n    }\n  });\n\n  var _MaxLen = null;\n  Object.defineProperty(this, \"MaxLen\", {\n    enumerable: true,\n    configurable: false,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      _MaxLen = value;\n    }\n  });\n\n  /**\n   * (Optional; inheritable) The maximum length of the field’s text, in characters.\n   *\n   * @name AcroFormTextField#maxLength\n   * @type {number}\n   */\n  Object.defineProperty(this, \"maxLength\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return _MaxLen;\n    },\n    set: function(value) {\n      if (Number.isInteger(value)) {\n        _MaxLen = value;\n      }\n    }\n  });\n\n  Object.defineProperty(this, \"hasAppearanceStream\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return this.V || this.DV;\n    }\n  });\n};\ninherit(AcroFormTextField, AcroFormField);\n\n/**\n * @class AcroFormPasswordField\n * @extends AcroFormTextField\n * @extends AcroFormField\n */\nvar AcroFormPasswordField = function() {\n  AcroFormTextField.call(this);\n\n  /**\n   * If set, the field is intended for entering a secure password that should not be echoed visibly to the screen. Characters typed from the keyboard shall instead be echoed in some unreadable form, such as asterisks or bullet characters.\n   * NOTE To protect password confidentiality, readers should never store the value of the text field in the PDF file if this flag is set.\n   *\n   * @name AcroFormTextField#password\n   * @type {boolean}\n   */\n  Object.defineProperty(this, \"password\", {\n    enumerable: true,\n    configurable: true,\n    get: function() {\n      return Boolean(getBitForPdf(this.Ff, 14));\n    },\n    set: function(value) {\n      if (Boolean(value) === true) {\n        this.Ff = setBitForPdf(this.Ff, 14);\n      } else {\n        this.Ff = clearBitForPdf(this.Ff, 14);\n      }\n    }\n  });\n  this.password = true;\n};\ninherit(AcroFormPasswordField, AcroFormTextField);\n\n// Contains Methods for creating standard appearances\nvar AcroFormAppearance = {\n  CheckBox: {\n    createAppearanceStream: function() {\n      var appearance = {\n        N: {\n          On: AcroFormAppearance.CheckBox.YesNormal\n        },\n        D: {\n          On: AcroFormAppearance.CheckBox.YesPushDown,\n          Off: AcroFormAppearance.CheckBox.OffPushDown\n        }\n      };\n\n      return appearance;\n    },\n    /**\n     * Returns the standard On Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    YesPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      stream.push(\"BMC\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(\"BT\");\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      stream.push(\"EMC\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    YesNormal: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var fontKey = formObject.scope.internal.getFont(\n        formObject.fontName,\n        formObject.fontStyle\n      ).id;\n      var encodedColor = formObject.scope.__private__.encodeColorString(\n        formObject.color\n      );\n      var stream = [];\n      var height = AcroFormAppearance.internal.getHeight(formObject);\n      var width = AcroFormAppearance.internal.getWidth(formObject);\n      var calcRes = calculateX(formObject, formObject.caption);\n      stream.push(\"1 g\");\n      stream.push(\"0 0 \" + f2(width) + \" \" + f2(height) + \" re\");\n      stream.push(\"f\");\n      stream.push(\"q\");\n      stream.push(\"0 0 1 rg\");\n      stream.push(\"0 0 \" + f2(width - 1) + \" \" + f2(height - 1) + \" re\");\n      stream.push(\"W\");\n      stream.push(\"n\");\n      stream.push(\"0 g\");\n      stream.push(\"BT\");\n      stream.push(\n        \"/\" + fontKey + \" \" + f2(calcRes.fontSize) + \" Tf \" + encodedColor\n      );\n      stream.push(calcRes.text);\n      stream.push(\"ET\");\n      stream.push(\"Q\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    },\n\n    /**\n     * Returns the standard Off Appearance for a CheckBox\n     *\n     * @returns {AcroFormXObject}\n     */\n    OffPushDown: function(formObject) {\n      var xobj = createFormXObject(formObject);\n      xobj.scope = formObject.scope;\n      var stream = [];\n      stream.push(\"0.749023 g\");\n      stream.push(\n        \"0 0 \" +\n          f2(AcroFormAppearance.internal.getWidth(formObject)) +\n          \" \" +\n          f2(AcroFormAppearance.internal.getHeight(formObject)) +\n          \" re\"\n      );\n      stream.push(\"f\");\n      xobj.stream = stream.join(\"\\n\");\n      return xobj;\n    }\n  },\n\n  RadioButton: {\n    Circle: {\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Circle.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Circle.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Circle.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"l\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        // Make the Radius of the Circle relative to min(height, width) of formObject\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        var c = AcroFormAppearance.internal.Bezier_C;\n        var DotRadiusBezier = Number((DotRadius * c).toFixed(5));\n        /*\n         * The Following is a Circle created with Bezier-Curves.\n         */\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          DotRadiusBezier +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadiusBezier +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n        var dc = Number(\n          (DotRadius * AcroFormAppearance.internal.Bezier_C).toFixed(5)\n        );\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        stream.push(\"0 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(DotRadius + \" 0 m\");\n        stream.push(\n          \"\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" \" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 \" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          \"-\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\n          \"-\" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" -\" +\n            dc +\n            \" -\" +\n            DotRadius +\n            \" 0 -\" +\n            DotRadius +\n            \" c\"\n        );\n        stream.push(\n          dc +\n            \" -\" +\n            DotRadius +\n            \" \" +\n            DotRadius +\n            \" -\" +\n            dc +\n            \" \" +\n            DotRadius +\n            \" 0 c\"\n        );\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var DotRadius =\n          AcroFormAppearance.internal.getWidth(formObject) <=\n          AcroFormAppearance.internal.getHeight(formObject)\n            ? AcroFormAppearance.internal.getWidth(formObject) / 4\n            : AcroFormAppearance.internal.getHeight(formObject) / 4;\n        // The Borderpadding...\n        DotRadius = Number((DotRadius * 0.9).toFixed(5));\n        // Save results for later use; no need to waste\n        // processor ticks on doing math\n        var k = Number((DotRadius * 2).toFixed(5));\n        var kc = Number((k * AcroFormAppearance.internal.Bezier_C).toFixed(5));\n\n        stream.push(\"0.749023 g\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 0 0 1 \" +\n            f5(AcroFormAppearance.internal.getWidth(formObject) / 2) +\n            \" \" +\n            f5(AcroFormAppearance.internal.getHeight(formObject) / 2) +\n            \" cm\"\n        );\n        stream.push(k + \" 0 m\");\n        stream.push(k + \" \" + kc + \" \" + kc + \" \" + k + \" 0 \" + k + \" c\");\n        stream.push(\n          \"-\" + kc + \" \" + k + \" -\" + k + \" \" + kc + \" -\" + k + \" 0 c\"\n        );\n        stream.push(\n          \"-\" + k + \" -\" + kc + \" -\" + kc + \" -\" + k + \" 0 -\" + k + \" c\"\n        );\n        stream.push(kc + \" -\" + k + \" \" + k + \" -\" + kc + \" \" + k + \" 0 c\");\n        stream.push(\"f\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    },\n\n    Cross: {\n      /**\n       * Creates the Actual AppearanceDictionary-References\n       *\n       * @param {string} name\n       * @returns {Object}\n       * @ignore\n       */\n      createAppearanceStream: function(name) {\n        var appearanceStreamContent = {\n          D: {\n            Off: AcroFormAppearance.RadioButton.Cross.OffPushDown\n          },\n          N: {}\n        };\n        appearanceStreamContent.N[name] =\n          AcroFormAppearance.RadioButton.Cross.YesNormal;\n        appearanceStreamContent.D[name] =\n          AcroFormAppearance.RadioButton.Cross.YesPushDown;\n        return appearanceStreamContent;\n      },\n      getCA: function() {\n        return \"8\";\n      },\n\n      YesNormal: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      YesPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var cross = AcroFormAppearance.internal.calculateCross(formObject);\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        stream.push(\"q\");\n        stream.push(\n          \"1 1 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject) - 2) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject) - 2) +\n            \" re\"\n        );\n        stream.push(\"W\");\n        stream.push(\"n\");\n        stream.push(f2(cross.x1.x) + \" \" + f2(cross.x1.y) + \" m\");\n        stream.push(f2(cross.x2.x) + \" \" + f2(cross.x2.y) + \" l\");\n        stream.push(f2(cross.x4.x) + \" \" + f2(cross.x4.y) + \" m\");\n        stream.push(f2(cross.x3.x) + \" \" + f2(cross.x3.y) + \" l\");\n        stream.push(\"s\");\n        stream.push(\"Q\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      },\n      OffPushDown: function(formObject) {\n        var xobj = createFormXObject(formObject);\n        xobj.scope = formObject.scope;\n        var stream = [];\n        stream.push(\"0.749023 g\");\n        stream.push(\n          \"0 0 \" +\n            f2(AcroFormAppearance.internal.getWidth(formObject)) +\n            \" \" +\n            f2(AcroFormAppearance.internal.getHeight(formObject)) +\n            \" re\"\n        );\n        stream.push(\"f\");\n        xobj.stream = stream.join(\"\\n\");\n        return xobj;\n      }\n    }\n  },\n\n  /**\n   * Returns the standard Appearance\n   *\n   * @returns {AcroFormXObject}\n   */\n  createDefaultAppearanceStream: function(formObject) {\n    // Set Helvetica to Standard Font (size: auto)\n    // Color: Black\n    var fontKey = formObject.scope.internal.getFont(\n      formObject.fontName,\n      formObject.fontStyle\n    ).id;\n    var encodedColor = formObject.scope.__private__.encodeColorString(\n      formObject.color\n    );\n    var fontSize = formObject.fontSize;\n    var result = \"/\" + fontKey + \" \" + fontSize + \" Tf \" + encodedColor;\n    return result;\n  }\n};\n\nAcroFormAppearance.internal = {\n  Bezier_C: 0.551915024494,\n\n  calculateCross: function(formObject) {\n    var width = AcroFormAppearance.internal.getWidth(formObject);\n    var height = AcroFormAppearance.internal.getHeight(formObject);\n    var a = Math.min(width, height);\n\n    var cross = {\n      x1: {\n        // upperLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 + a // height - borderPadding\n      },\n      x2: {\n        // lowerRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 // borderPadding\n      },\n      x3: {\n        // lowerLeft\n        x: (width - a) / 2,\n        y: (height - a) / 2 // borderPadding\n      },\n      x4: {\n        // upperRight\n        x: (width - a) / 2 + a,\n        y: (height - a) / 2 + a // height - borderPadding\n      }\n    };\n\n    return cross;\n  }\n};\nAcroFormAppearance.internal.getWidth = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[2]);\n  }\n  return result;\n};\nAcroFormAppearance.internal.getHeight = function(formObject) {\n  var result = 0;\n  if (typeof formObject === \"object\") {\n    result = scale(formObject.Rect[3]);\n  }\n  return result;\n};\n\n// Public:\n\n/**\n * Add an AcroForm-Field to the jsPDF-instance\n *\n * @name addField\n * @function\n * @instance\n * @param {Object} fieldObject\n * @returns {jsPDF}\n */\nvar addField = (jsPDFAPI.addField = function(fieldObject) {\n  initializeAcroForm(this, fieldObject);\n\n  if (fieldObject instanceof AcroFormField) {\n    putForm(fieldObject);\n  } else {\n    throw new Error(\"Invalid argument passed to jsPDF.addField.\");\n  }\n  fieldObject.page = fieldObject.scope.internal.getCurrentPageInfo().pageNumber;\n  return this;\n});\n\njsPDFAPI.AcroFormChoiceField = AcroFormChoiceField;\njsPDFAPI.AcroFormListBox = AcroFormListBox;\njsPDFAPI.AcroFormComboBox = AcroFormComboBox;\njsPDFAPI.AcroFormEditBox = AcroFormEditBox;\njsPDFAPI.AcroFormButton = AcroFormButton;\njsPDFAPI.AcroFormPushButton = AcroFormPushButton;\njsPDFAPI.AcroFormRadioButton = AcroFormRadioButton;\njsPDFAPI.AcroFormCheckBox = AcroFormCheckBox;\njsPDFAPI.AcroFormTextField = AcroFormTextField;\njsPDFAPI.AcroFormPasswordField = AcroFormPasswordField;\njsPDFAPI.AcroFormAppearance = AcroFormAppearance;\n\njsPDFAPI.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\njsPDF.AcroForm = {\n  ChoiceField: AcroFormChoiceField,\n  ListBox: AcroFormListBox,\n  ComboBox: AcroFormComboBox,\n  EditBox: AcroFormEditBox,\n  Button: AcroFormButton,\n  PushButton: AcroFormPushButton,\n  RadioButton: AcroFormRadioButton,\n  CheckBox: AcroFormCheckBox,\n  TextField: AcroFormTextField,\n  PasswordField: AcroFormPasswordField,\n  Appearance: AcroFormAppearance\n};\n\nvar AcroForm = jsPDF.AcroForm;\n\nexport {\n  AcroForm,\n  AcroFormChoiceField,\n  AcroFormListBox,\n  AcroFormComboBox,\n  AcroFormEditBox,\n  AcroFormButton,\n  AcroFormPushButton,\n  AcroFormRadioButton,\n  AcroFormCheckBox,\n  AcroFormTextField,\n  AcroFormPasswordField,\n  AcroFormAppearance\n};\n","function toLookup(arr) {\n  return arr.reduce(function(lookup, name, index) {\n    lookup[name] = index;\n\n    return lookup;\n  }, {});\n}\n\nvar fontStyleOrder = {\n  italic: [\"italic\", \"oblique\", \"normal\"],\n  oblique: [\"oblique\", \"italic\", \"normal\"],\n  normal: [\"normal\", \"oblique\", \"italic\"]\n};\n\nvar fontStretchOrder = [\n  \"ultra-condensed\",\n  \"extra-condensed\",\n  \"condensed\",\n  \"semi-condensed\",\n  \"normal\",\n  \"semi-expanded\",\n  \"expanded\",\n  \"extra-expanded\",\n  \"ultra-expanded\"\n];\n\n// For a given font-stretch value, we need to know where to start our search\n// from in the fontStretchOrder list.\nvar fontStretchLookup = toLookup(fontStretchOrder);\n\nvar fontWeights = [100, 200, 300, 400, 500, 600, 700, 800, 900];\nvar fontWeightsLookup = toLookup(fontWeights);\n\nfunction normalizeFontStretch(stretch) {\n  stretch = stretch || \"normal\";\n\n  return typeof fontStretchLookup[stretch] === \"number\" ? stretch : \"normal\";\n}\n\nfunction normalizeFontStyle(style) {\n  style = style || \"normal\";\n\n  return fontStyleOrder[style] ? style : \"normal\";\n}\n\nfunction normalizeFontWeight(weight) {\n  if (!weight) {\n    return 400;\n  }\n\n  if (typeof weight === \"number\") {\n    // Ignore values which aren't valid font-weights.\n    return weight >= 100 && weight <= 900 && weight % 100 === 0 ? weight : 400;\n  }\n\n  if (/^\\d00$/.test(weight)) {\n    return parseInt(weight);\n  }\n\n  switch (weight) {\n    case \"bold\":\n      return 700;\n\n    case \"normal\":\n    default:\n      return 400;\n  }\n}\n\nexport function normalizeFontFace(fontFace) {\n  var family = fontFace.family.replace(/\"|'/g, \"\").toLowerCase();\n\n  var style = normalizeFontStyle(fontFace.style);\n  var weight = normalizeFontWeight(fontFace.weight);\n  var stretch = normalizeFontStretch(fontFace.stretch);\n\n  return {\n    family: family,\n    style: style,\n    weight: weight,\n    stretch: stretch,\n    src: fontFace.src || [],\n\n    // The ref property maps this font-face to the font\n    // added by the .addFont() method.\n    ref: fontFace.ref || {\n      name: family,\n      style: [stretch, style, weight].join(\" \")\n    }\n  };\n}\n\n/**\n * Turns a list of font-faces into a map, for easier lookup when resolving\n * fonts.\n * @private\n */\nexport function buildFontFaceMap(fontFaces) {\n  var map = {};\n\n  for (var i = 0; i < fontFaces.length; ++i) {\n    var normalized = normalizeFontFace(fontFaces[i]);\n\n    var name = normalized.family;\n    var stretch = normalized.stretch;\n    var style = normalized.style;\n    var weight = normalized.weight;\n\n    map[name] = map[name] || {};\n\n    map[name][stretch] = map[name][stretch] || {};\n    map[name][stretch][style] = map[name][stretch][style] || {};\n    map[name][stretch][style][weight] = normalized;\n  }\n\n  return map;\n}\n\n/**\n * Searches a map of stretches, weights, etc. in the given direction and\n * then, if no match has been found, in the opposite directions.\n *\n * @param {Object.<string, any>} matchingSet A map of the various font variations.\n * @param {any[]} order The order of the different variations\n * @param {number} pivot The starting point of the search in the order list.\n * @param {number} dir The initial direction of the search (desc = -1, asc = 1)\n * @private\n */\n\nfunction searchFromPivot(matchingSet, order, pivot, dir) {\n  var i;\n\n  for (i = pivot; i >= 0 && i < order.length; i += dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n\n  for (i = pivot; i >= 0 && i < order.length; i -= dir) {\n    if (matchingSet[order[i]]) {\n      return matchingSet[order[i]];\n    }\n  }\n}\n\nfunction resolveFontStretch(stretch, matchingSet) {\n  if (matchingSet[stretch]) {\n    return matchingSet[stretch];\n  }\n\n  var pivot = fontStretchLookup[stretch];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = pivot <= fontStretchLookup[\"normal\"] ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontStretchOrder, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-stretch value for \" + stretch\n    );\n  }\n\n  return match;\n}\n\nfunction resolveFontStyle(fontStyle, matchingSet) {\n  if (matchingSet[fontStyle]) {\n    return matchingSet[fontStyle];\n  }\n\n  var ordering = fontStyleOrder[fontStyle];\n\n  for (var i = 0; i < ordering.length; ++i) {\n    if (matchingSet[ordering[i]]) {\n      return matchingSet[ordering[i]];\n    }\n  }\n\n  // Since a font-family cannot exist without having at least one style value\n  // we should never reach this point.\n  throw new Error(\"Could not find a matching font-style for \" + fontStyle);\n}\n\nfunction resolveFontWeight(weight, matchingSet) {\n  if (matchingSet[weight]) {\n    return matchingSet[weight];\n  }\n\n  if (weight === 400 && matchingSet[500]) {\n    return matchingSet[500];\n  }\n\n  if (weight === 500 && matchingSet[400]) {\n    return matchingSet[400];\n  }\n\n  var pivot = fontWeightsLookup[weight];\n\n  // If the font-stretch value is normal or more condensed, we want to\n  // start with a descending search, otherwise we should do ascending.\n  var dir = weight < 400 ? -1 : 1;\n  var match = searchFromPivot(matchingSet, fontWeights, pivot, dir);\n\n  if (!match) {\n    // Since a font-family cannot exist without having at least one stretch value\n    // we should never reach this point.\n    throw new Error(\n      \"Could not find a matching font-weight for value \" + weight\n    );\n  }\n\n  return match;\n}\n\nvar defaultGenericFontFamilies = {\n  \"sans-serif\": \"helvetica\",\n  fixed: \"courier\",\n  monospace: \"courier\",\n  terminal: \"courier\",\n  cursive: \"times\",\n  fantasy: \"times\",\n  serif: \"times\"\n};\n\nvar systemFonts = {\n  caption: \"times\",\n  icon: \"times\",\n  menu: \"times\",\n  \"message-box\": \"times\",\n  \"small-caption\": \"times\",\n  \"status-bar\": \"times\"\n};\n\nfunction ruleToString(rule) {\n  return [rule.stretch, rule.style, rule.weight, rule.family].join(\" \");\n}\n\nexport function resolveFontFace(fontFaceMap, rules, opts) {\n  opts = opts || {};\n\n  var defaultFontFamily = opts.defaultFontFamily || \"times\";\n  var genericFontFamilies = Object.assign(\n    {},\n    defaultGenericFontFamilies,\n    opts.genericFontFamilies || {}\n  );\n\n  var rule = null;\n  var matches = null;\n\n  for (var i = 0; i < rules.length; ++i) {\n    rule = normalizeFontFace(rules[i]);\n\n    if (genericFontFamilies[rule.family]) {\n      rule.family = genericFontFamilies[rule.family];\n    }\n\n    if (fontFaceMap.hasOwnProperty(rule.family)) {\n      matches = fontFaceMap[rule.family];\n\n      break;\n    }\n  }\n\n  // Always fallback to a known font family.\n  matches = matches || fontFaceMap[defaultFontFamily];\n\n  if (!matches) {\n    // At this point we should definitiely have a font family, but if we\n    // don't there is something wrong with our configuration\n    throw new Error(\n      \"Could not find a font-family for the rule '\" +\n        ruleToString(rule) +\n        \"' and default family '\" +\n        defaultFontFamily +\n        \"'.\"\n    );\n  }\n\n  matches = resolveFontStretch(rule.stretch, matches);\n  matches = resolveFontStyle(rule.style, matches);\n  matches = resolveFontWeight(rule.weight, matches);\n\n  if (!matches) {\n    // We should've fount\n    throw new Error(\n      \"Failed to resolve a font for the rule '\" + ruleToString(rule) + \"'.\"\n    );\n  }\n\n  return matches;\n}\n\n/**\n * Builds a style id for use with the addFont() method.\n * @param {FontFace} font\n * @private\n */\nexport function toStyleName(font) {\n  return [font.weight, font.style, font.stretch].join(\" \");\n}\n\nfunction eatWhiteSpace(input) {\n  return input.trimLeft();\n}\n\nfunction parseQuotedFontFamily(input, quote) {\n  var index = 0;\n\n  while (index < input.length) {\n    var current = input.charAt(index);\n\n    if (current === quote) {\n      return [input.substring(0, index), input.substring(index + 1)];\n    }\n\n    index += 1;\n  }\n\n  // Unexpected end of input\n  return null;\n}\n\nfunction parseNonQuotedFontFamily(input) {\n  // It implements part of the identifier parser here: https://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n  //\n  // NOTE: This parser pretty much ignores escaped identifiers and that there is a thing called unicode.\n  //\n  // Breakdown of regexp:\n  // -[a-z_]     - when identifier starts with a hyphen, you're not allowed to have another hyphen or a digit\n  // [a-z_]      - allow a-z and underscore at beginning of input\n  // [a-z0-9_-]* - after that, anything goes\n  var match = input.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);\n\n  // non quoted value contains illegal characters\n  if (match === null) {\n    return null;\n  }\n\n  return [match[0], input.substring(match[0].length)];\n}\n\nvar defaultFont = [\"times\"];\n\nexport function parseFontFamily(input) {\n  var result = [];\n  var ch, parsed;\n  var remaining = input.trim();\n\n  if (remaining === \"\") {\n    return defaultFont;\n  }\n\n  if (remaining in systemFonts) {\n    return [systemFonts[remaining]];\n  }\n\n  while (remaining !== \"\") {\n    parsed = null;\n    remaining = eatWhiteSpace(remaining);\n    ch = remaining.charAt(0);\n\n    switch (ch) {\n      case '\"':\n      case \"'\":\n        parsed = parseQuotedFontFamily(remaining.substring(1), ch);\n        break;\n\n      default:\n        parsed = parseNonQuotedFontFamily(remaining);\n        break;\n    }\n\n    if (parsed === null) {\n      return defaultFont;\n    }\n\n    result.push(parsed[0]);\n\n    remaining = eatWhiteSpace(parsed[1]);\n\n    // We expect end of input or a comma separator here\n    if (remaining !== \"\" && remaining.charAt(0) !== \",\") {\n      return defaultFont;\n    }\n\n    remaining = remaining.replace(/^,/, \"\");\n  }\n\n  return result;\n}\n","/** @license\n * jsPDF addImage plugin\n * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/\n *               2013 Chris Dowling, https://github.com/gingerchris\n *               2013 Trinh Ho, https://github.com/ineedfat\n *               2013 Edwin Alejandro Perez, https://github.com/eaparango\n *               2013 Norah Smith, https://github.com/burnburnrocket\n *               2014 Diego Casorran, https://github.com/diegocr\n *               2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n/**\n * @name addImage\n * @module\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob, btoa } from \"../libs/AtobBtoa.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namespace = \"addImage_\";\n  jsPDFAPI.__addimage__ = {};\n\n  var UNKNOWN = \"UNKNOWN\";\n\n  // Heuristic selection of a good batch for large array .apply. Not limiting make the call overflow.\n  // With too small batch iteration will be slow as more calls are made,\n  // higher values cause larger and slower garbage collection.\n  var ARRAY_APPLY_BATCH = 8192;\n\n  var imageFileTypeHeaders = {\n    PNG: [[0x89, 0x50, 0x4e, 0x47]],\n    TIFF: [\n      [0x4d, 0x4d, 0x00, 0x2a], //Motorola\n      [0x49, 0x49, 0x2a, 0x00] //Intel\n    ],\n    JPEG: [\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe0,\n        undefined,\n        undefined,\n        0x4a,\n        0x46,\n        0x49,\n        0x46,\n        0x00\n      ], //JFIF\n      [\n        0xff,\n        0xd8,\n        0xff,\n        0xe1,\n        undefined,\n        undefined,\n        0x45,\n        0x78,\n        0x69,\n        0x66,\n        0x00,\n        0x00\n      ], //Exif\n      [0xff, 0xd8, 0xff, 0xdb], //JPEG RAW\n      [0xff, 0xd8, 0xff, 0xee] //EXIF RAW\n    ],\n    JPEG2000: [[0x00, 0x00, 0x00, 0x0c, 0x6a, 0x50, 0x20, 0x20]],\n    GIF87a: [[0x47, 0x49, 0x46, 0x38, 0x37, 0x61]],\n    GIF89a: [[0x47, 0x49, 0x46, 0x38, 0x39, 0x61]],\n    WEBP: [\n      [\n        0x52,\n        0x49,\n        0x46,\n        0x46,\n        undefined,\n        undefined,\n        undefined,\n        undefined,\n        0x57,\n        0x45,\n        0x42,\n        0x50\n      ]\n    ],\n    BMP: [\n      [0x42, 0x4d], //BM - Windows 3.1x, 95, NT, ... etc.\n      [0x42, 0x41], //BA - OS/2 struct bitmap array\n      [0x43, 0x49], //CI - OS/2 struct color icon\n      [0x43, 0x50], //CP - OS/2 const color pointer\n      [0x49, 0x43], //IC - OS/2 struct icon\n      [0x50, 0x54] //PT - OS/2 pointer\n    ]\n  };\n\n  /**\n   * Recognize filetype of Image by magic-bytes\n   *\n   * https://en.wikipedia.org/wiki/List_of_file_signatures\n   *\n   * @name getImageFileTypeByImageData\n   * @public\n   * @function\n   * @param {string|arraybuffer} imageData imageData as binary String or arraybuffer\n   * @param {string} format format of file if filetype-recognition fails, e.g. 'JPEG'\n   *\n   * @returns {string} filetype of Image\n   */\n  var getImageFileTypeByImageData = (jsPDFAPI.__addimage__.getImageFileTypeByImageData = function(\n    imageData,\n    fallbackFormat\n  ) {\n    fallbackFormat = fallbackFormat || UNKNOWN;\n    var i;\n    var j;\n    var result = UNKNOWN;\n    var headerSchemata;\n    var compareResult;\n    var fileType;\n\n    if (\n      fallbackFormat === \"RGBA\" ||\n      (imageData.data !== undefined &&\n        imageData.data instanceof Uint8ClampedArray &&\n        \"height\" in imageData &&\n        \"width\" in imageData)\n    ) {\n      return \"RGBA\";\n    }\n\n    if (isArrayBufferView(imageData)) {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData[j]) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    } else {\n      for (fileType in imageFileTypeHeaders) {\n        headerSchemata = imageFileTypeHeaders[fileType];\n        for (i = 0; i < headerSchemata.length; i += 1) {\n          compareResult = true;\n          for (j = 0; j < headerSchemata[i].length; j += 1) {\n            if (headerSchemata[i][j] === undefined) {\n              continue;\n            }\n            if (headerSchemata[i][j] !== imageData.charCodeAt(j)) {\n              compareResult = false;\n              break;\n            }\n          }\n          if (compareResult === true) {\n            result = fileType;\n            break;\n          }\n        }\n      }\n    }\n\n    if (result === UNKNOWN && fallbackFormat !== UNKNOWN) {\n      result = fallbackFormat;\n    }\n    return result;\n  });\n\n  // Image functionality ported from pdf.js\n  var putImage = function(image) {\n    var out = this.internal.write;\n    var putStream = this.internal.putStream;\n    var getFilters = this.internal.getFilters;\n\n    var filter = getFilters();\n    while (filter.indexOf(\"FlateEncode\") !== -1) {\n      filter.splice(filter.indexOf(\"FlateEncode\"), 1);\n    }\n\n    image.objectId = this.internal.newObject();\n\n    var additionalKeyValues = [];\n    additionalKeyValues.push({ key: \"Type\", value: \"/XObject\" });\n    additionalKeyValues.push({ key: \"Subtype\", value: \"/Image\" });\n    additionalKeyValues.push({ key: \"Width\", value: image.width });\n    additionalKeyValues.push({ key: \"Height\", value: image.height });\n\n    if (image.colorSpace === color_spaces.INDEXED) {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value:\n          \"[/Indexed /DeviceRGB \" +\n          // if an indexed png defines more than one colour with transparency, we've created a sMask\n          (image.palette.length / 3 - 1) +\n          \" \" +\n          (\"sMask\" in image && typeof image.sMask !== \"undefined\"\n            ? image.objectId + 2\n            : image.objectId + 1) +\n          \" 0 R]\"\n      });\n    } else {\n      additionalKeyValues.push({\n        key: \"ColorSpace\",\n        value: \"/\" + image.colorSpace\n      });\n      if (image.colorSpace === color_spaces.DEVICE_CMYK) {\n        additionalKeyValues.push({ key: \"Decode\", value: \"[1 0 1 0 1 0 1 0]\" });\n      }\n    }\n    additionalKeyValues.push({\n      key: \"BitsPerComponent\",\n      value: image.bitsPerComponent\n    });\n    if (\n      \"decodeParameters\" in image &&\n      typeof image.decodeParameters !== \"undefined\"\n    ) {\n      additionalKeyValues.push({\n        key: \"DecodeParms\",\n        value: \"<<\" + image.decodeParameters + \">>\"\n      });\n    }\n    if (\"transparency\" in image && Array.isArray(image.transparency)) {\n      var transparency = \"\",\n        i = 0,\n        len = image.transparency.length;\n      for (; i < len; i++)\n        transparency +=\n          image.transparency[i] + \" \" + image.transparency[i] + \" \";\n\n      additionalKeyValues.push({\n        key: \"Mask\",\n        value: \"[\" + transparency + \"]\"\n      });\n    }\n    if (typeof image.sMask !== \"undefined\") {\n      additionalKeyValues.push({\n        key: \"SMask\",\n        value: image.objectId + 1 + \" 0 R\"\n      });\n    }\n\n    var alreadyAppliedFilters =\n      typeof image.filter !== \"undefined\" ? [\"/\" + image.filter] : undefined;\n\n    putStream({\n      data: image.data,\n      additionalKeyValues: additionalKeyValues,\n      alreadyAppliedFilters: alreadyAppliedFilters,\n      objectId: image.objectId\n    });\n\n    out(\"endobj\");\n\n    // Soft mask\n    if (\"sMask\" in image && typeof image.sMask !== \"undefined\") {\n      var decodeParameters =\n        \"/Predictor \" +\n        image.predictor +\n        \" /Colors 1 /BitsPerComponent \" +\n        image.bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n      var sMask = {\n        width: image.width,\n        height: image.height,\n        colorSpace: \"DeviceGray\",\n        bitsPerComponent: image.bitsPerComponent,\n        decodeParameters: decodeParameters,\n        data: image.sMask\n      };\n      if (\"filter\" in image) {\n        sMask.filter = image.filter;\n      }\n      putImage.call(this, sMask);\n    }\n\n    //Palette\n    if (image.colorSpace === color_spaces.INDEXED) {\n      var objId = this.internal.newObject();\n      //out('<< /Filter / ' + img['f'] +' /Length ' + img['pal'].length + '>>');\n      //putStream(zlib.compress(img['pal']));\n      putStream({\n        data: arrayBufferToBinaryString(new Uint8Array(image.palette)),\n        objectId: objId\n      });\n      out(\"endobj\");\n    }\n  };\n  var putResourcesCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    for (var i in images) {\n      putImage.call(this, images[i]);\n    }\n  };\n  var putXObjectsDictCallback = function() {\n    var images = this.internal.collections[namespace + \"images\"],\n      out = this.internal.write,\n      image;\n    for (var i in images) {\n      image = images[i];\n      out(\"/I\" + image.index, image.objectId, \"0\", \"R\");\n    }\n  };\n\n  var checkCompressValue = function(value) {\n    if (value && typeof value === \"string\") value = value.toUpperCase();\n    return value in jsPDFAPI.image_compression ? value : image_compression.NONE;\n  };\n\n  var initialize = function() {\n    if (!this.internal.collections[namespace + \"images\"]) {\n      this.internal.collections[namespace + \"images\"] = {};\n      this.internal.events.subscribe(\"putResources\", putResourcesCallback);\n      this.internal.events.subscribe(\"putXobjectDict\", putXObjectsDictCallback);\n    }\n  };\n\n  var getImages = function() {\n    var images = this.internal.collections[namespace + \"images\"];\n    initialize.call(this);\n    return images;\n  };\n  var getImageIndex = function() {\n    return Object.keys(this.internal.collections[namespace + \"images\"]).length;\n  };\n  var notDefined = function(value) {\n    return typeof value === \"undefined\" || value === null || value.length === 0;\n  };\n  var generateAliasFromImageData = function(imageData) {\n    if (typeof imageData === \"string\" || isArrayBufferView(imageData)) {\n      return sHashCode(imageData);\n    } else if (isArrayBufferView(imageData.data)) {\n      return sHashCode(imageData.data);\n    }\n\n    return null;\n  };\n\n  var isImageTypeSupported = function(type) {\n    return typeof jsPDFAPI[\"process\" + type.toUpperCase()] === \"function\";\n  };\n\n  var isDOMElement = function(object) {\n    return typeof object === \"object\" && object.nodeType === 1;\n  };\n\n  var getImageDataFromElement = function(element, format) {\n    //if element is an image which uses data url definition, just return the dataurl\n    if (element.nodeName === \"IMG\" && element.hasAttribute(\"src\")) {\n      var src = \"\" + element.getAttribute(\"src\");\n\n      //is base64 encoded dataUrl, directly process it\n      if (src.indexOf(\"data:image/\") === 0) {\n        return atob(\n          unescape(src)\n            .split(\"base64,\")\n            .pop()\n        );\n      }\n\n      //it is probably an url, try to load it\n      var tmpImageData = jsPDFAPI.loadFile(src, true);\n      if (tmpImageData !== undefined) {\n        return tmpImageData;\n      }\n    }\n\n    if (element.nodeName === \"CANVAS\") {\n      if (element.width === 0 || element.height === 0) {\n        throw new Error(\n          \"Given canvas must have data. Canvas width: \" +\n            element.width +\n            \", height: \" +\n            element.height\n        );\n      }\n      var mimeType;\n      switch (format) {\n        case \"PNG\":\n          mimeType = \"image/png\";\n          break;\n        case \"WEBP\":\n          mimeType = \"image/webp\";\n          break;\n        case \"JPEG\":\n        case \"JPG\":\n        default:\n          mimeType = \"image/jpeg\";\n          break;\n      }\n      return atob(\n        element\n          .toDataURL(mimeType, 1.0)\n          .split(\"base64,\")\n          .pop()\n      );\n    }\n  };\n\n  var checkImagesForAlias = function(alias) {\n    var images = this.internal.collections[namespace + \"images\"];\n    if (images) {\n      for (var e in images) {\n        if (alias === images[e].alias) {\n          return images[e];\n        }\n      }\n    }\n  };\n\n  var determineWidthAndHeight = function(width, height, image) {\n    if (!width && !height) {\n      width = -96;\n      height = -96;\n    }\n    if (width < 0) {\n      width = (-1 * image.width * 72) / width / this.internal.scaleFactor;\n    }\n    if (height < 0) {\n      height = (-1 * image.height * 72) / height / this.internal.scaleFactor;\n    }\n    if (width === 0) {\n      width = (height * image.width) / image.height;\n    }\n    if (height === 0) {\n      height = (width * image.height) / image.width;\n    }\n\n    return [width, height];\n  };\n\n  var writeImageToPDF = function(x, y, width, height, image, rotation) {\n    var dims = determineWidthAndHeight.call(this, width, height, image),\n      coord = this.internal.getCoordinateString,\n      vcoord = this.internal.getVerticalCoordinateString;\n\n    var images = getImages.call(this);\n\n    width = dims[0];\n    height = dims[1];\n    images[image.index] = image;\n\n    if (rotation) {\n      rotation *= Math.PI / 180;\n      var c = Math.cos(rotation);\n      var s = Math.sin(rotation);\n      //like in pdf Reference do it 4 digits instead of 2\n      var f4 = function(number) {\n        return number.toFixed(4);\n      };\n      var rotationTransformationMatrix = [\n        f4(c),\n        f4(s),\n        f4(s * -1),\n        f4(c),\n        0,\n        0,\n        \"cm\"\n      ];\n    }\n    this.internal.write(\"q\"); //Save graphics state\n    if (rotation) {\n      this.internal.write(\n        [1, \"0\", \"0\", 1, coord(x), vcoord(y + height), \"cm\"].join(\" \")\n      ); //Translate\n      this.internal.write(rotationTransformationMatrix.join(\" \")); //Rotate\n      this.internal.write(\n        [coord(width), \"0\", \"0\", coord(height), \"0\", \"0\", \"cm\"].join(\" \")\n      ); //Scale\n    } else {\n      this.internal.write(\n        [\n          coord(width),\n          \"0\",\n          \"0\",\n          coord(height),\n          coord(x),\n          vcoord(y + height),\n          \"cm\"\n        ].join(\" \")\n      ); //Translate and Scale\n    }\n\n    if (this.isAdvancedAPI()) {\n      // draw image bottom up when in \"advanced\" API mode\n      this.internal.write([1, 0, 0, -1, 0, 0, \"cm\"].join(\" \"));\n    }\n\n    this.internal.write(\"/I\" + image.index + \" Do\"); //Paint Image\n    this.internal.write(\"Q\"); //Restore graphics state\n  };\n\n  /**\n   * COLOR SPACES\n   */\n  var color_spaces = (jsPDFAPI.color_spaces = {\n    DEVICE_RGB: \"DeviceRGB\",\n    DEVICE_GRAY: \"DeviceGray\",\n    DEVICE_CMYK: \"DeviceCMYK\",\n    CAL_GREY: \"CalGray\",\n    CAL_RGB: \"CalRGB\",\n    LAB: \"Lab\",\n    ICC_BASED: \"ICCBased\",\n    INDEXED: \"Indexed\",\n    PATTERN: \"Pattern\",\n    SEPARATION: \"Separation\",\n    DEVICE_N: \"DeviceN\"\n  });\n\n  /**\n   * DECODE METHODS\n   */\n  jsPDFAPI.decode = {\n    DCT_DECODE: \"DCTDecode\",\n    FLATE_DECODE: \"FlateDecode\",\n    LZW_DECODE: \"LZWDecode\",\n    JPX_DECODE: \"JPXDecode\",\n    JBIG2_DECODE: \"JBIG2Decode\",\n    ASCII85_DECODE: \"ASCII85Decode\",\n    ASCII_HEX_DECODE: \"ASCIIHexDecode\",\n    RUN_LENGTH_DECODE: \"RunLengthDecode\",\n    CCITT_FAX_DECODE: \"CCITTFaxDecode\"\n  };\n\n  /**\n   * IMAGE COMPRESSION TYPES\n   */\n  var image_compression = (jsPDFAPI.image_compression = {\n    NONE: \"NONE\",\n    FAST: \"FAST\",\n    MEDIUM: \"MEDIUM\",\n    SLOW: \"SLOW\"\n  });\n\n  /**\n   * @name sHashCode\n   * @function\n   * @param {string} data\n   * @returns {string}\n   */\n  var sHashCode = (jsPDFAPI.__addimage__.sHashCode = function(data) {\n    var hash = 0,\n      i,\n      len;\n\n    if (typeof data === \"string\") {\n      len = data.length;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data.charCodeAt(i);\n        hash |= 0; // Convert to 32bit integer\n      }\n    } else if (isArrayBufferView(data)) {\n      len = data.byteLength / 2;\n      for (i = 0; i < len; i++) {\n        hash = (hash << 5) - hash + data[i];\n        hash |= 0; // Convert to 32bit integer\n      }\n    }\n    return hash;\n  });\n\n  /**\n   * Validates if given String is a valid Base64-String\n   *\n   * @name validateStringAsBase64\n   * @public\n   * @function\n   * @param {String} possible Base64-String\n   *\n   * @returns {boolean}\n   */\n  var validateStringAsBase64 = (jsPDFAPI.__addimage__.validateStringAsBase64 = function(\n    possibleBase64String\n  ) {\n    possibleBase64String = possibleBase64String || \"\";\n    possibleBase64String.toString().trim();\n\n    var result = true;\n\n    if (possibleBase64String.length === 0) {\n      result = false;\n    }\n\n    if (possibleBase64String.length % 4 !== 0) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9+/]+$/.test(\n        possibleBase64String.substr(0, possibleBase64String.length - 2)\n      ) === false\n    ) {\n      result = false;\n    }\n\n    if (\n      /^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(\n        possibleBase64String.substr(-2)\n      ) === false\n    ) {\n      result = false;\n    }\n    return result;\n  });\n\n  /**\n   * Strips out and returns info from a valid base64 data URI\n   *\n   * @name extractImageFromDataUrl\n   * @function\n   * @param {string} dataUrl a valid data URI of format 'data:[<MIME-type>][;base64],<data>'\n   * @returns {Array}an Array containing the following\n   * [0] the complete data URI\n   * [1] <MIME-type>\n   * [2] format - the second part of the mime-type i.e 'png' in 'image/png'\n   * [4] <data>\n   */\n  var extractImageFromDataUrl = (jsPDFAPI.__addimage__.extractImageFromDataUrl = function(\n    dataUrl\n  ) {\n    dataUrl = dataUrl || \"\";\n    var dataUrlParts = dataUrl.split(\"base64,\");\n    var result = null;\n\n    if (dataUrlParts.length === 2) {\n      var extractedInfo = /^data:(\\w*\\/\\w*);*(charset=(?!charset=)[\\w=-]*)*;*$/.exec(\n        dataUrlParts[0]\n      );\n      if (Array.isArray(extractedInfo)) {\n        result = {\n          mimeType: extractedInfo[1],\n          charset: extractedInfo[2],\n          data: dataUrlParts[1]\n        };\n      }\n    }\n    return result;\n  });\n\n  /**\n   * Check to see if ArrayBuffer is supported\n   *\n   * @name supportsArrayBuffer\n   * @function\n   * @returns {boolean}\n   */\n  var supportsArrayBuffer = (jsPDFAPI.__addimage__.supportsArrayBuffer = function() {\n    return (\n      typeof ArrayBuffer !== \"undefined\" && typeof Uint8Array !== \"undefined\"\n    );\n  });\n\n  /**\n   * Tests supplied object to determine if ArrayBuffer\n   *\n   * @name isArrayBuffer\n   * @function\n   * @param {Object} object an Object\n   *\n   * @returns {boolean}\n   */\n  jsPDFAPI.__addimage__.isArrayBuffer = function(object) {\n    return supportsArrayBuffer() && object instanceof ArrayBuffer;\n  };\n\n  /**\n   * Tests supplied object to determine if it implements the ArrayBufferView (TypedArray) interface\n   *\n   * @name isArrayBufferView\n   * @function\n   * @param {Object} object an Object\n   * @returns {boolean}\n   */\n  var isArrayBufferView = (jsPDFAPI.__addimage__.isArrayBufferView = function(\n    object\n  ) {\n    return (\n      supportsArrayBuffer() &&\n      typeof Uint32Array !== \"undefined\" &&\n      (object instanceof Int8Array ||\n        object instanceof Uint8Array ||\n        (typeof Uint8ClampedArray !== \"undefined\" &&\n          object instanceof Uint8ClampedArray) ||\n        object instanceof Int16Array ||\n        object instanceof Uint16Array ||\n        object instanceof Int32Array ||\n        object instanceof Uint32Array ||\n        object instanceof Float32Array ||\n        object instanceof Float64Array)\n    );\n  });\n\n  /**\n   * Convert Binary String to ArrayBuffer\n   *\n   * @name binaryStringToUint8Array\n   * @public\n   * @function\n   * @param {string} BinaryString with ImageData\n   * @returns {Uint8Array}\n   */\n  var binaryStringToUint8Array = (jsPDFAPI.__addimage__.binaryStringToUint8Array = function(\n    binary_string\n  ) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  });\n\n  /**\n   * Convert the Buffer to a Binary String\n   *\n   * @name arrayBufferToBinaryString\n   * @public\n   * @function\n   * @param {ArrayBuffer|ArrayBufferView} ArrayBuffer buffer or bufferView with ImageData\n   *\n   * @returns {String}\n   */\n  var arrayBufferToBinaryString = (jsPDFAPI.__addimage__.arrayBufferToBinaryString = function(\n    buffer\n  ) {\n    var out = \"\";\n    // There are calls with both ArrayBuffer and already converted Uint8Array or other BufferView.\n    // Do not copy the array if input is already an array.\n    var buf = isArrayBufferView(buffer) ? buffer : new Uint8Array(buffer);\n    for (var i = 0; i < buf.length; i += ARRAY_APPLY_BATCH) {\n      // Limit the amount of characters being parsed to prevent overflow.\n      // Note that while TextDecoder would be faster, it does not have the same\n      // functionality as fromCharCode with any provided encodings as of 3/2021.\n      out += String.fromCharCode.apply(\n        null,\n        buf.subarray(i, i + ARRAY_APPLY_BATCH)\n      );\n    }\n    return out;\n  });\n\n  /**\n   * Possible parameter for addImage, an RGBA buffer with size.\n   *\n   * @typedef {Object} RGBAData\n   * @property {Uint8ClampedArray} data - Single dimensional array of RGBA values. For example from canvas getImageData.\n   * @property {number} width - Image width as the data does not carry this information in itself.\n   * @property {number} height - Image height as the data does not carry this information in itself.\n   */\n\n  /**\n   * Adds an Image to the PDF.\n   *\n   * @name addImage\n   * @public\n   * @function\n   * @param {string|HTMLImageElement|HTMLCanvasElement|Uint8Array|RGBAData} imageData imageData as base64 encoded DataUrl or Image-HTMLElement or Canvas-HTMLElement or object containing RGBA array (like output from canvas.getImageData).\n   * @param {string} format format of file if filetype-recognition fails or in case of a Canvas-Element needs to be specified (default for Canvas is JPEG), e.g. 'JPEG', 'PNG', 'WEBP'\n   * @param {number} x x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width width of the image (in units declared at inception of PDF document)\n   * @param {number} height height of the Image (in units declared at inception of PDF document)\n   * @param {string} alias alias of the image (if used multiple times)\n   * @param {string} compression compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF\n   */\n  jsPDFAPI.addImage = function() {\n    var imageData, format, x, y, w, h, alias, compression, rotation;\n\n    imageData = arguments[0];\n    if (typeof arguments[1] === \"number\") {\n      format = UNKNOWN;\n      x = arguments[1];\n      y = arguments[2];\n      w = arguments[3];\n      h = arguments[4];\n      alias = arguments[5];\n      compression = arguments[6];\n      rotation = arguments[7];\n    } else {\n      format = arguments[1];\n      x = arguments[2];\n      y = arguments[3];\n      w = arguments[4];\n      h = arguments[5];\n      alias = arguments[6];\n      compression = arguments[7];\n      rotation = arguments[8];\n    }\n\n    if (\n      typeof imageData === \"object\" &&\n      !isDOMElement(imageData) &&\n      \"imageData\" in imageData\n    ) {\n      var options = imageData;\n\n      imageData = options.imageData;\n      format = options.format || format || UNKNOWN;\n      x = options.x || x || 0;\n      y = options.y || y || 0;\n      w = options.w || options.width || w;\n      h = options.h || options.height || h;\n      alias = options.alias || alias;\n      compression = options.compression || compression;\n      rotation = options.rotation || options.angle || rotation;\n    }\n\n    //If compression is not explicitly set, determine if we should use compression\n    var filter = this.internal.getFilters();\n    if (compression === undefined && filter.indexOf(\"FlateEncode\") !== -1) {\n      compression = \"SLOW\";\n    }\n\n    if (isNaN(x) || isNaN(y)) {\n      throw new Error(\"Invalid coordinates passed to jsPDF.addImage\");\n    }\n\n    initialize.call(this);\n\n    var image = processImageData.call(\n      this,\n      imageData,\n      format,\n      alias,\n      compression\n    );\n\n    writeImageToPDF.call(this, x, y, w, h, image, rotation);\n\n    return this;\n  };\n\n  var processImageData = function(imageData, format, alias, compression) {\n    var result, dataAsBinaryString;\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      imageData = unescape(imageData);\n      var tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData !== \"\") {\n        imageData = tmpImageData;\n      } else {\n        tmpImageData = jsPDFAPI.loadFile(imageData, true);\n        if (tmpImageData !== undefined) {\n          imageData = tmpImageData;\n        }\n      }\n    }\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData, format);\n    }\n\n    format = getImageFileTypeByImageData(imageData, format);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    // now do the heavy lifting\n\n    if (notDefined(alias)) {\n      alias = generateAliasFromImageData(imageData);\n    }\n    result = checkImagesForAlias.call(this, alias);\n\n    if (!result) {\n      if (supportsArrayBuffer()) {\n        // no need to convert if imageData is already uint8array\n        if (!(imageData instanceof Uint8Array) && format !== \"RGBA\") {\n          dataAsBinaryString = imageData;\n          imageData = binaryStringToUint8Array(imageData);\n        }\n      }\n\n      result = this[\"process\" + format.toUpperCase()](\n        imageData,\n        getImageIndex.call(this),\n        alias,\n        checkCompressValue(compression),\n        dataAsBinaryString\n      );\n    }\n\n    if (!result) {\n      throw new Error(\"An unknown error occurred whilst processing the image.\");\n    }\n    return result;\n  };\n\n  /**\n   * @name convertBase64ToBinaryString\n   * @function\n   * @param {string} stringData\n   * @returns {string} binary string\n   */\n  var convertBase64ToBinaryString = (jsPDFAPI.__addimage__.convertBase64ToBinaryString = function(\n    stringData,\n    throwError\n  ) {\n    throwError = typeof throwError === \"boolean\" ? throwError : true;\n    var base64Info;\n    var imageData = \"\";\n    var rawData;\n\n    if (typeof stringData === \"string\") {\n      base64Info = extractImageFromDataUrl(stringData);\n      rawData = base64Info !== null ? base64Info.data : stringData;\n\n      try {\n        imageData = atob(rawData);\n      } catch (e) {\n        if (throwError) {\n          if (!validateStringAsBase64(rawData)) {\n            throw new Error(\n              \"Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString \"\n            );\n          } else {\n            throw new Error(\n              \"atob-Error in jsPDF.convertBase64ToBinaryString \" + e.message\n            );\n          }\n        }\n      }\n    }\n    return imageData;\n  });\n\n  /**\n   * @name getImageProperties\n   * @function\n   * @param {Object} imageData\n   * @returns {Object}\n   */\n  jsPDFAPI.getImageProperties = function(imageData) {\n    var image;\n    var tmpImageData = \"\";\n    var format;\n\n    if (isDOMElement(imageData)) {\n      imageData = getImageDataFromElement(imageData);\n    }\n\n    if (\n      typeof imageData === \"string\" &&\n      getImageFileTypeByImageData(imageData) === UNKNOWN\n    ) {\n      tmpImageData = convertBase64ToBinaryString(imageData, false);\n\n      if (tmpImageData === \"\") {\n        tmpImageData = jsPDFAPI.loadFile(imageData) || \"\";\n      }\n      imageData = tmpImageData;\n    }\n\n    format = getImageFileTypeByImageData(imageData);\n    if (!isImageTypeSupported(format)) {\n      throw new Error(\n        \"addImage does not support files of type '\" +\n          format +\n          \"', please ensure that a plugin for '\" +\n          format +\n          \"' support is added.\"\n      );\n    }\n\n    if (supportsArrayBuffer() && !(imageData instanceof Uint8Array)) {\n      imageData = binaryStringToUint8Array(imageData);\n    }\n\n    image = this[\"process\" + format.toUpperCase()](imageData);\n\n    if (!image) {\n      throw new Error(\"An unknown error occurred whilst processing the image\");\n    }\n\n    image.fileType = format;\n\n    return image;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF Annotations PlugIn\n *\n * There are many types of annotations in a PDF document. Annotations are placed\n * on a page at a particular location. They are not 'attached' to an object.\n * <br />\n * This plugin current supports <br />\n * <li> Goto Page (set pageNumber and top in options)\n * <li> Goto Name (set name and top in options)\n * <li> Goto URL (set url in options)\n * <p>\n * \tThe destination magnification factor can also be specified when goto is a page number or a named destination. (see documentation below)\n *  (set magFactor in options).  XYZ is the default.\n * </p>\n * <p>\n *  Links, Text, Popup, and FreeText are supported.\n * </p>\n * <p>\n * Options In PDF spec Not Implemented Yet\n * <li> link border\n * <li> named target\n * <li> page coordinates\n * <li> destination page scaling and layout\n * <li> actions other than URL and GotoPage\n * <li> background / hover actions\n * </p>\n * @name annotations\n * @module\n */\n\n/*\n    Destination Magnification Factors\n    See PDF 1.3 Page 386 for meanings and options\n\n    [supported]\n\tXYZ (options; left top zoom)\n\tFit (no options)\n\tFitH (options: top)\n\tFitV (options: left)\n\n\t[not supported]\n\tFitR\n\tFitB\n\tFitBH\n\tFitBV\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var notEmpty = function(obj) {\n    if (typeof obj != \"undefined\") {\n      if (obj != \"\") {\n        return true;\n      }\n    }\n  };\n\n  jsPDF.API.events.push([\n    \"addPage\",\n    function(addPageData) {\n      var pageInfo = this.internal.getPageInfo(addPageData.pageNumber);\n      pageInfo.pageContext.annotations = [];\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putPage\",\n    function(putPageData) {\n      var getHorizontalCoordinateString = this.internal.getCoordinateString;\n      var getVerticalCoordinateString = this.internal\n        .getVerticalCoordinateString;\n      var pageInfo = this.internal.getPageInfoByObjId(putPageData.objId);\n      var pageAnnos = putPageData.pageContext.annotations;\n\n      var anno, rect, line;\n      var found = false;\n      for (var a = 0; a < pageAnnos.length && !found; a++) {\n        anno = pageAnnos[a];\n        switch (anno.type) {\n          case \"link\":\n            if (\n              notEmpty(anno.options.url) ||\n              notEmpty(anno.options.pageNumber)\n            ) {\n              found = true;\n            }\n            break;\n          case \"reference\":\n          case \"text\":\n          case \"freetext\":\n            found = true;\n            break;\n        }\n      }\n      if (found == false) {\n        return;\n      }\n\n      this.internal.write(\"/Annots [\");\n      for (var i = 0; i < pageAnnos.length; i++) {\n        anno = pageAnnos[i];\n        var escape = this.internal.pdfEscape;\n        var encryptor = this.internal.getEncryptor(putPageData.objId);\n\n        switch (anno.type) {\n          case \"reference\":\n            // References to Widget Annotations (for AcroForm Fields)\n            this.internal.write(\" \" + anno.object.objId + \" 0 R \");\n            break;\n          case \"text\":\n            // Create a an object for both the text and the popup\n            var objText = this.internal.newAdditionalObject();\n            var objPopup = this.internal.newAdditionalObject();\n            var encryptorText = this.internal.getEncryptor(objText.objId);\n\n            var title = anno.title || \"Note\";\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Text\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptorText(anno.contents)) +\n              \")\";\n            line += \" /Popup \" + objPopup.objId + \" 0 R\";\n            line += \" /P \" + pageInfo.objId + \" 0 R\";\n            line += \" /T (\" + escape(encryptorText(title)) + \") >>\";\n            objText.content = line;\n\n            var parent = objText.objId + \" 0 R\";\n            var popoff = 30;\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x + popoff) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \" \" +\n              getHorizontalCoordinateString(\n                anno.bounds.x + anno.bounds.w + popoff\n              ) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \"] \";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"Popup\" +\n              \" \" +\n              rect +\n              \" /Parent \" +\n              parent;\n            if (anno.open) {\n              line += \" /Open true\";\n            }\n            line += \" >>\";\n            objPopup.content = line;\n\n            this.internal.write(objText.objId, \"0 R\", objPopup.objId, \"0 R\");\n\n            break;\n          case \"freetext\":\n            rect =\n              \"/Rect [\" +\n              getHorizontalCoordinateString(anno.bounds.x) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y) +\n              \" \" +\n              getHorizontalCoordinateString(anno.bounds.x + anno.bounds.w) +\n              \" \" +\n              getVerticalCoordinateString(anno.bounds.y + anno.bounds.h) +\n              \"] \";\n            var color = anno.color || \"#000000\";\n            line =\n              \"<</Type /Annot /Subtype /\" +\n              \"FreeText\" +\n              \" \" +\n              rect +\n              \"/Contents (\" +\n              escape(encryptor(anno.contents)) +\n              \")\";\n            line +=\n              \" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#\" +\n              color +\n              \")\";\n            line += \" /Border [0 0 0]\";\n            line += \" >>\";\n            this.internal.write(line);\n            break;\n          case \"link\":\n            if (anno.options.name) {\n              var loc = this.annotations._nameMap[anno.options.name];\n              anno.options.pageNumber = loc.page;\n              anno.options.top = loc.y;\n            } else {\n              if (!anno.options.top) {\n                anno.options.top = 0;\n              }\n            }\n\n            rect =\n              \"/Rect [\" +\n              anno.finalBounds.x +\n              \" \" +\n              anno.finalBounds.y +\n              \" \" +\n              anno.finalBounds.w +\n              \" \" +\n              anno.finalBounds.h +\n              \"] \";\n\n            line = \"\";\n            if (anno.options.url) {\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /A <</S /URI /URI (\" +\n                escape(encryptor(anno.options.url)) +\n                \") >>\";\n            } else if (anno.options.pageNumber) {\n              // first page is 0\n              var info = this.internal.getPageInfo(anno.options.pageNumber);\n              line =\n                \"<</Type /Annot /Subtype /Link \" +\n                rect +\n                \"/Border [0 0 0] /Dest [\" +\n                info.objId +\n                \" 0 R\";\n              anno.options.magFactor = anno.options.magFactor || \"XYZ\";\n              switch (anno.options.magFactor) {\n                case \"Fit\":\n                  line += \" /Fit]\";\n                  break;\n                case \"FitH\":\n                  line += \" /FitH \" + anno.options.top + \"]\";\n                  break;\n                case \"FitV\":\n                  anno.options.left = anno.options.left || 0;\n                  line += \" /FitV \" + anno.options.left + \"]\";\n                  break;\n                case \"XYZ\":\n                default:\n                  var top = getVerticalCoordinateString(anno.options.top);\n                  anno.options.left = anno.options.left || 0;\n                  // 0 or null zoom will not change zoom factor\n                  if (typeof anno.options.zoom === \"undefined\") {\n                    anno.options.zoom = 0;\n                  }\n                  line +=\n                    \" /XYZ \" +\n                    anno.options.left +\n                    \" \" +\n                    top +\n                    \" \" +\n                    anno.options.zoom +\n                    \"]\";\n                  break;\n              }\n            }\n\n            if (line != \"\") {\n              line += \" >>\";\n              this.internal.write(line);\n            }\n            break;\n        }\n      }\n      this.internal.write(\"]\");\n    }\n  ]);\n\n  /**\n   * @name createAnnotation\n   * @function\n   * @param {Object} options\n   */\n  jsPDFAPI.createAnnotation = function(options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    switch (options.type) {\n      case \"link\":\n        this.link(\n          options.bounds.x,\n          options.bounds.y,\n          options.bounds.w,\n          options.bounds.h,\n          options\n        );\n        break;\n      case \"text\":\n      case \"freetext\":\n        pageInfo.pageContext.annotations.push(options);\n        break;\n    }\n  };\n\n  /**\n   * Create a link\n   *\n   * valid options\n   * <li> pageNumber or url [required]\n   * <p>If pageNumber is specified, top and zoom may also be specified</p>\n   * @name link\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} w\n   * @param {number} h\n   * @param {Object} options\n   */\n  jsPDFAPI.link = function(x, y, w, h, options) {\n    var pageInfo = this.internal.getCurrentPageInfo();\n    var getHorizontalCoordinateString = this.internal.getCoordinateString;\n    var getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\n\n    pageInfo.pageContext.annotations.push({\n      finalBounds: {\n        x: getHorizontalCoordinateString(x),\n        y: getVerticalCoordinateString(y),\n        w: getHorizontalCoordinateString(x + w),\n        h: getVerticalCoordinateString(y + h)\n      },\n      options: options,\n      type: \"link\"\n    });\n  };\n\n  /**\n   * Currently only supports single line text.\n   * Returns the width of the text/link\n   *\n   * @name textWithLink\n   * @function\n   * @param {string} text\n   * @param {number} x\n   * @param {number} y\n   * @param {Object} options\n   * @returns {number} width the width of the text/link\n   */\n  jsPDFAPI.textWithLink = function(text, x, y, options) {\n    var totalLineWidth = this.getTextWidth(text);\n    var lineHeight = this.internal.getLineHeight() / this.internal.scaleFactor;\n    var linkHeight, linkWidth;\n\n    // Checking if maxWidth option is passed to determine lineWidth and number of lines for each line\n    if (options.maxWidth !== undefined) {\n      var { maxWidth } = options;\n      linkWidth = maxWidth;\n      var numOfLines = this.splitTextToSize(text, linkWidth).length;\n      linkHeight = Math.ceil(lineHeight * numOfLines);\n    } else {\n      linkWidth = totalLineWidth;\n      linkHeight = lineHeight;\n    }\n\n    this.text(text, x, y, options);\n\n    //TODO We really need the text baseline height to do this correctly.\n    // Or ability to draw text on top, bottom, center, or baseline.\n    y += lineHeight * 0.2;\n    //handle x position based on the align option\n    if (options.align === \"center\") {\n      x = x - totalLineWidth / 2; //since starting from center move the x position by half of text width\n    }\n    if (options.align === \"right\") {\n      x = x - totalLineWidth;\n    }\n    this.link(x, y - lineHeight, linkWidth, linkHeight, options);\n    return totalLineWidth;\n  };\n\n  //TODO move into external library\n  /**\n   * @name getTextWidth\n   * @function\n   * @param {string} text\n   * @returns {number} txtWidth\n   */\n  jsPDFAPI.getTextWidth = function(text) {\n    var fontSize = this.internal.getFontSize();\n    var txtWidth =\n      (this.getStringUnitWidth(text) * fontSize) / this.internal.scaleFactor;\n    return txtWidth;\n  };\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF arabic parser PlugIn\n *\n * @name arabic\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Arabic shape substitutions: char code => (isolated, final, initial, medial).\n   * Arabic Substition A\n   */\n  var arabicSubstitionA = {\n    0x0621: [0xfe80], // ARABIC LETTER HAMZA\n    0x0622: [0xfe81, 0xfe82], // ARABIC LETTER ALEF WITH MADDA ABOVE\n    0x0623: [0xfe83, 0xfe84], // ARABIC LETTER ALEF WITH HAMZA ABOVE\n    0x0624: [0xfe85, 0xfe86], // ARABIC LETTER WAW WITH HAMZA ABOVE\n    0x0625: [0xfe87, 0xfe88], // ARABIC LETTER ALEF WITH HAMZA BELOW\n    0x0626: [0xfe89, 0xfe8a, 0xfe8b, 0xfe8c], // ARABIC LETTER YEH WITH HAMZA ABOVE\n    0x0627: [0xfe8d, 0xfe8e], // ARABIC LETTER ALEF\n    0x0628: [0xfe8f, 0xfe90, 0xfe91, 0xfe92], // ARABIC LETTER BEH\n    0x0629: [0xfe93, 0xfe94], // ARABIC LETTER TEH MARBUTA\n    0x062a: [0xfe95, 0xfe96, 0xfe97, 0xfe98], // ARABIC LETTER TEH\n    0x062b: [0xfe99, 0xfe9a, 0xfe9b, 0xfe9c], // ARABIC LETTER THEH\n    0x062c: [0xfe9d, 0xfe9e, 0xfe9f, 0xfea0], // ARABIC LETTER JEEM\n    0x062d: [0xfea1, 0xfea2, 0xfea3, 0xfea4], // ARABIC LETTER HAH\n    0x062e: [0xfea5, 0xfea6, 0xfea7, 0xfea8], // ARABIC LETTER KHAH\n    0x062f: [0xfea9, 0xfeaa], // ARABIC LETTER DAL\n    0x0630: [0xfeab, 0xfeac], // ARABIC LETTER THAL\n    0x0631: [0xfead, 0xfeae], // ARABIC LETTER REH\n    0x0632: [0xfeaf, 0xfeb0], // ARABIC LETTER ZAIN\n    0x0633: [0xfeb1, 0xfeb2, 0xfeb3, 0xfeb4], // ARABIC LETTER SEEN\n    0x0634: [0xfeb5, 0xfeb6, 0xfeb7, 0xfeb8], // ARABIC LETTER SHEEN\n    0x0635: [0xfeb9, 0xfeba, 0xfebb, 0xfebc], // ARABIC LETTER SAD\n    0x0636: [0xfebd, 0xfebe, 0xfebf, 0xfec0], // ARABIC LETTER DAD\n    0x0637: [0xfec1, 0xfec2, 0xfec3, 0xfec4], // ARABIC LETTER TAH\n    0x0638: [0xfec5, 0xfec6, 0xfec7, 0xfec8], // ARABIC LETTER ZAH\n    0x0639: [0xfec9, 0xfeca, 0xfecb, 0xfecc], // ARABIC LETTER AIN\n    0x063a: [0xfecd, 0xfece, 0xfecf, 0xfed0], // ARABIC LETTER GHAIN\n    0x0641: [0xfed1, 0xfed2, 0xfed3, 0xfed4], // ARABIC LETTER FEH\n    0x0642: [0xfed5, 0xfed6, 0xfed7, 0xfed8], // ARABIC LETTER QAF\n    0x0643: [0xfed9, 0xfeda, 0xfedb, 0xfedc], // ARABIC LETTER KAF\n    0x0644: [0xfedd, 0xfede, 0xfedf, 0xfee0], // ARABIC LETTER LAM\n    0x0645: [0xfee1, 0xfee2, 0xfee3, 0xfee4], // ARABIC LETTER MEEM\n    0x0646: [0xfee5, 0xfee6, 0xfee7, 0xfee8], // ARABIC LETTER NOON\n    0x0647: [0xfee9, 0xfeea, 0xfeeb, 0xfeec], // ARABIC LETTER HEH\n    0x0648: [0xfeed, 0xfeee], // ARABIC LETTER WAW\n    0x0649: [0xfeef, 0xfef0, 64488, 64489], // ARABIC LETTER ALEF MAKSURA\n    0x064a: [0xfef1, 0xfef2, 0xfef3, 0xfef4], // ARABIC LETTER YEH\n    0x0671: [0xfb50, 0xfb51], // ARABIC LETTER ALEF WASLA\n    0x0677: [0xfbdd], // ARABIC LETTER U WITH HAMZA ABOVE\n    0x0679: [0xfb66, 0xfb67, 0xfb68, 0xfb69], // ARABIC LETTER TTEH\n    0x067a: [0xfb5e, 0xfb5f, 0xfb60, 0xfb61], // ARABIC LETTER TTEHEH\n    0x067b: [0xfb52, 0xfb53, 0xfb54, 0xfb55], // ARABIC LETTER BEEH\n    0x067e: [0xfb56, 0xfb57, 0xfb58, 0xfb59], // ARABIC LETTER PEH\n    0x067f: [0xfb62, 0xfb63, 0xfb64, 0xfb65], // ARABIC LETTER TEHEH\n    0x0680: [0xfb5a, 0xfb5b, 0xfb5c, 0xfb5d], // ARABIC LETTER BEHEH\n    0x0683: [0xfb76, 0xfb77, 0xfb78, 0xfb79], // ARABIC LETTER NYEH\n    0x0684: [0xfb72, 0xfb73, 0xfb74, 0xfb75], // ARABIC LETTER DYEH\n    0x0686: [0xfb7a, 0xfb7b, 0xfb7c, 0xfb7d], // ARABIC LETTER TCHEH\n    0x0687: [0xfb7e, 0xfb7f, 0xfb80, 0xfb81], // ARABIC LETTER TCHEHEH\n    0x0688: [0xfb88, 0xfb89], // ARABIC LETTER DDAL\n    0x068c: [0xfb84, 0xfb85], // ARABIC LETTER DAHAL\n    0x068d: [0xfb82, 0xfb83], // ARABIC LETTER DDAHAL\n    0x068e: [0xfb86, 0xfb87], // ARABIC LETTER DUL\n    0x0691: [0xfb8c, 0xfb8d], // ARABIC LETTER RREH\n    0x0698: [0xfb8a, 0xfb8b], // ARABIC LETTER JEH\n    0x06a4: [0xfb6a, 0xfb6b, 0xfb6c, 0xfb6d], // ARABIC LETTER VEH\n    0x06a6: [0xfb6e, 0xfb6f, 0xfb70, 0xfb71], // ARABIC LETTER PEHEH\n    0x06a9: [0xfb8e, 0xfb8f, 0xfb90, 0xfb91], // ARABIC LETTER KEHEH\n    0x06ad: [0xfbd3, 0xfbd4, 0xfbd5, 0xfbd6], // ARABIC LETTER NG\n    0x06af: [0xfb92, 0xfb93, 0xfb94, 0xfb95], // ARABIC LETTER GAF\n    0x06b1: [0xfb9a, 0xfb9b, 0xfb9c, 0xfb9d], // ARABIC LETTER NGOEH\n    0x06b3: [0xfb96, 0xfb97, 0xfb98, 0xfb99], // ARABIC LETTER GUEH\n    0x06ba: [0xfb9e, 0xfb9f], // ARABIC LETTER NOON GHUNNA\n    0x06bb: [0xfba0, 0xfba1, 0xfba2, 0xfba3], // ARABIC LETTER RNOON\n    0x06be: [0xfbaa, 0xfbab, 0xfbac, 0xfbad], // ARABIC LETTER HEH DOACHASHMEE\n    0x06c0: [0xfba4, 0xfba5], // ARABIC LETTER HEH WITH YEH ABOVE\n    0x06c1: [0xfba6, 0xfba7, 0xfba8, 0xfba9], // ARABIC LETTER HEH GOAL\n    0x06c5: [0xfbe0, 0xfbe1], // ARABIC LETTER KIRGHIZ OE\n    0x06c6: [0xfbd9, 0xfbda], // ARABIC LETTER OE\n    0x06c7: [0xfbd7, 0xfbd8], // ARABIC LETTER U\n    0x06c8: [0xfbdb, 0xfbdc], // ARABIC LETTER YU\n    0x06c9: [0xfbe2, 0xfbe3], // ARABIC LETTER KIRGHIZ YU\n    0x06cb: [0xfbde, 0xfbdf], // ARABIC LETTER VE\n    0x06cc: [0xfbfc, 0xfbfd, 0xfbfe, 0xfbff], // ARABIC LETTER FARSI YEH\n    0x06d0: [0xfbe4, 0xfbe5, 0xfbe6, 0xfbe7], //ARABIC LETTER E\n    0x06d2: [0xfbae, 0xfbaf], // ARABIC LETTER YEH BARREE\n    0x06d3: [0xfbb0, 0xfbb1] // ARABIC LETTER YEH BARREE WITH HAMZA ABOVE\n  };\n\n  /*\n    var ligaturesSubstitutionA = {\n        0xFBEA: []// ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM\n    };\n    */\n\n  var ligatures = {\n    0xfedf: {\n      0xfe82: 0xfef5, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE ISOLATED FORM\n      0xfe84: 0xfef7, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE ISOLATED FORM\n      0xfe88: 0xfef9, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW ISOLATED FORM\n      0xfe8e: 0xfefb // ARABIC LIGATURE LAM WITH ALEF ISOLATED FORM\n    },\n    0xfee0: {\n      0xfe82: 0xfef6, // ARABIC LIGATURE LAM WITH ALEF WITH MADDA ABOVE FINAL FORM\n      0xfe84: 0xfef8, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA ABOVE FINAL FORM\n      0xfe88: 0xfefa, // ARABIC LIGATURE LAM WITH ALEF WITH HAMZA BELOW FINAL FORM\n      0xfe8e: 0xfefc // ARABIC LIGATURE LAM WITH ALEF FINAL FORM\n    },\n    0xfe8d: { 0xfedf: { 0xfee0: { 0xfeea: 0xfdf2 } } }, // ALLAH\n    0x0651: {\n      0x064c: 0xfc5e, // Shadda + Dammatan\n      0x064d: 0xfc5f, // Shadda + Kasratan\n      0x064e: 0xfc60, // Shadda + Fatha\n      0x064f: 0xfc61, // Shadda + Damma\n      0x0650: 0xfc62 // Shadda + Kasra\n    }\n  };\n\n  var arabic_diacritics = {\n    1612: 64606, // Shadda + Dammatan\n    1613: 64607, // Shadda + Kasratan\n    1614: 64608, // Shadda + Fatha\n    1615: 64609, // Shadda + Damma\n    1616: 64610 // Shadda + Kasra\n  };\n\n  var alfletter = [1570, 1571, 1573, 1575];\n\n  var noChangeInForm = -1;\n  var isolatedForm = 0;\n  var finalForm = 1;\n  var initialForm = 2;\n  var medialForm = 3;\n\n  jsPDFAPI.__arabicParser__ = {};\n\n  //private\n  var isInArabicSubstitutionA = (jsPDFAPI.__arabicParser__.isInArabicSubstitutionA = function(\n    letter\n  ) {\n    return typeof arabicSubstitionA[letter.charCodeAt(0)] !== \"undefined\";\n  });\n\n  var isArabicLetter = (jsPDFAPI.__arabicParser__.isArabicLetter = function(\n    letter\n  ) {\n    return (\n      typeof letter === \"string\" &&\n      /^[\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF\\uFB50-\\uFDFF\\uFE70-\\uFEFF]+$/.test(\n        letter\n      )\n    );\n  });\n\n  var isArabicEndLetter = (jsPDFAPI.__arabicParser__.isArabicEndLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length <= 2\n    );\n  });\n\n  var isArabicAlfLetter = (jsPDFAPI.__arabicParser__.isArabicAlfLetter = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) && alfletter.indexOf(letter.charCodeAt(0)) >= 0\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasIsolatedForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 1\n    );\n  };\n\n  var arabicLetterHasFinalForm = (jsPDFAPI.__arabicParser__.arabicLetterHasFinalForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 2\n    );\n  });\n\n  jsPDFAPI.__arabicParser__.arabicLetterHasInitialForm = function(letter) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length >= 3\n    );\n  };\n\n  var arabicLetterHasMedialForm = (jsPDFAPI.__arabicParser__.arabicLetterHasMedialForm = function(\n    letter\n  ) {\n    return (\n      isArabicLetter(letter) &&\n      isInArabicSubstitutionA(letter) &&\n      arabicSubstitionA[letter.charCodeAt(0)].length == 4\n    );\n  });\n\n  var resolveLigatures = (jsPDFAPI.__arabicParser__.resolveLigatures = function(\n    letters\n  ) {\n    var i = 0;\n    var tmpLigatures = ligatures;\n    var result = \"\";\n    var effectedLetters = 0;\n\n    for (i = 0; i < letters.length; i += 1) {\n      if (typeof tmpLigatures[letters.charCodeAt(i)] !== \"undefined\") {\n        effectedLetters++;\n        tmpLigatures = tmpLigatures[letters.charCodeAt(i)];\n\n        if (typeof tmpLigatures === \"number\") {\n          result += String.fromCharCode(tmpLigatures);\n          tmpLigatures = ligatures;\n          effectedLetters = 0;\n        }\n        if (i === letters.length - 1) {\n          tmpLigatures = ligatures;\n          result += letters.charAt(i - (effectedLetters - 1));\n          i = i - (effectedLetters - 1);\n          effectedLetters = 0;\n        }\n      } else {\n        tmpLigatures = ligatures;\n        result += letters.charAt(i - effectedLetters);\n        i = i - effectedLetters;\n        effectedLetters = 0;\n      }\n    }\n\n    return result;\n  });\n\n  jsPDFAPI.__arabicParser__.isArabicDiacritic = function(letter) {\n    return (\n      letter !== undefined &&\n      arabic_diacritics[letter.charCodeAt(0)] !== undefined\n    );\n  };\n\n  var getCorrectForm = (jsPDFAPI.__arabicParser__.getCorrectForm = function(\n    currentChar,\n    beforeChar,\n    nextChar\n  ) {\n    if (!isArabicLetter(currentChar)) {\n      return -1;\n    }\n\n    if (isInArabicSubstitutionA(currentChar) === false) {\n      return noChangeInForm;\n    }\n    if (\n      !arabicLetterHasFinalForm(currentChar) ||\n      (!isArabicLetter(beforeChar) && !isArabicLetter(nextChar)) ||\n      (!isArabicLetter(nextChar) && isArabicEndLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && !isArabicLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicAlfLetter(beforeChar)) ||\n      (isArabicEndLetter(currentChar) && isArabicEndLetter(beforeChar))\n    ) {\n      return isolatedForm;\n    }\n\n    if (\n      arabicLetterHasMedialForm(currentChar) &&\n      isArabicLetter(beforeChar) &&\n      !isArabicEndLetter(beforeChar) &&\n      isArabicLetter(nextChar) &&\n      arabicLetterHasFinalForm(nextChar)\n    ) {\n      return medialForm;\n    }\n\n    if (isArabicEndLetter(currentChar) || !isArabicLetter(nextChar)) {\n      return finalForm;\n    }\n    return initialForm;\n  });\n\n  /**\n   * @name processArabic\n   * @function\n   * @param {string} text\n   * @returns {string}\n   */\n  var parseArabic = function(text) {\n    text = text || \"\";\n\n    var result = \"\";\n    var i = 0;\n    var j = 0;\n    var position = 0;\n    var currentLetter = \"\";\n    var prevLetter = \"\";\n    var nextLetter = \"\";\n\n    var words = text.split(\"\\\\s+\");\n    var newWords = [];\n    for (i = 0; i < words.length; i += 1) {\n      newWords.push(\"\");\n      for (j = 0; j < words[i].length; j += 1) {\n        currentLetter = words[i][j];\n        prevLetter = words[i][j - 1];\n        nextLetter = words[i][j + 1];\n        if (isArabicLetter(currentLetter)) {\n          position = getCorrectForm(currentLetter, prevLetter, nextLetter);\n          if (position !== -1) {\n            newWords[i] += String.fromCharCode(\n              arabicSubstitionA[currentLetter.charCodeAt(0)][position]\n            );\n          } else {\n            newWords[i] += currentLetter;\n          }\n        } else {\n          newWords[i] += currentLetter;\n        }\n      }\n\n      newWords[i] = resolveLigatures(newWords[i]);\n    }\n    result = newWords.join(\" \");\n\n    return result;\n  };\n\n  var processArabic = (jsPDFAPI.__arabicParser__.processArabic = jsPDFAPI.processArabic = function() {\n    var text =\n      typeof arguments[0] === \"string\" ? arguments[0] : arguments[0].text;\n    var tmpText = [];\n    var result;\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          tmpText.push([parseArabic(text[i][0]), text[i][1], text[i][2]]);\n        } else {\n          tmpText.push([parseArabic(text[i])]);\n        }\n      }\n      result = tmpText;\n    } else {\n      result = parseArabic(text);\n    }\n    if (typeof arguments[0] === \"string\") {\n      return result;\n    } else {\n      arguments[0].text = result;\n      return arguments[0];\n    }\n  });\n\n  jsPDFAPI.events.push([\"preProcessText\", processArabic]);\n})(jsPDF.API);\n","/** @license\n * jsPDF Autoprint Plugin\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name autoprint\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Makes the PDF automatically open the print-Dialog when opened in a PDF-viewer.\n   *\n   * @name autoPrint\n   * @function\n   * @param {Object} options (optional) Set the attribute variant to 'non-conform' (default) or 'javascript' to activate different methods of automatic printing when opening in a PDF-viewer .\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF();\n   * doc.text(10, 10, 'This is a test');\n   * doc.autoPrint({variant: 'non-conform'});\n   * doc.save('autoprint.pdf');\n   */\n  jsPDFAPI.autoPrint = function(options) {\n    \"use strict\";\n    var refAutoPrintTag;\n    options = options || {};\n    options.variant = options.variant || \"non-conform\";\n\n    switch (options.variant) {\n      case \"javascript\":\n        //https://github.com/Rob--W/pdf.js/commit/c676ecb5a0f54677b9f3340c3ef2cf42225453bb\n        this.addJS(\"print({});\");\n        break;\n      case \"non-conform\":\n      default:\n        this.internal.events.subscribe(\"postPutResources\", function() {\n          refAutoPrintTag = this.internal.newObject();\n          this.internal.out(\"<<\");\n          this.internal.out(\"/S /Named\");\n          this.internal.out(\"/Type /Action\");\n          this.internal.out(\"/N /Print\");\n          this.internal.out(\">>\");\n          this.internal.out(\"endobj\");\n        });\n\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.out(\"/OpenAction \" + refAutoPrintTag + \" 0 R\");\n        });\n        break;\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Canvas PlugIn\n * This plugin mimics the HTML5 Canvas\n *\n * The goal is to provide a way for current canvas users to print directly to a PDF.\n * @name canvas\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @class Canvas\n   * @classdesc A Canvas Wrapper for jsPDF\n   */\n  var Canvas = function() {\n    var jsPdfInstance = undefined;\n    Object.defineProperty(this, \"pdf\", {\n      get: function() {\n        return jsPdfInstance;\n      },\n      set: function(value) {\n        jsPdfInstance = value;\n      }\n    });\n\n    var _width = 150;\n    /**\n     * The height property is a positive integer reflecting the height HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 150 is used.\n     * This is one of the two properties, the other being width, that controls the size of the canvas.\n     *\n     * @name width\n     */\n    Object.defineProperty(this, \"width\", {\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _width = 150;\n        } else {\n          _width = value;\n        }\n        if (this.getContext(\"2d\").pageWrapXEnabled) {\n          this.getContext(\"2d\").pageWrapX = _width + 1;\n        }\n      }\n    });\n\n    var _height = 300;\n    /**\n     * The width property is a positive integer reflecting the width HTML attribute of the <canvas> element interpreted in CSS pixels. When the attribute is not specified, or if it is set to an invalid value, like a negative, the default value of 300 is used.\n     * This is one of the two properties, the other being height, that controls the size of the canvas.\n     *\n     * @name height\n     */\n    Object.defineProperty(this, \"height\", {\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        if (isNaN(value) || Number.isInteger(value) === false || value < 0) {\n          _height = 300;\n        } else {\n          _height = value;\n        }\n        if (this.getContext(\"2d\").pageWrapYEnabled) {\n          this.getContext(\"2d\").pageWrapY = _height + 1;\n        }\n      }\n    });\n\n    var _childNodes = [];\n    Object.defineProperty(this, \"childNodes\", {\n      get: function() {\n        return _childNodes;\n      },\n      set: function(value) {\n        _childNodes = value;\n      }\n    });\n\n    var _style = {};\n    Object.defineProperty(this, \"style\", {\n      get: function() {\n        return _style;\n      },\n      set: function(value) {\n        _style = value;\n      }\n    });\n\n    Object.defineProperty(this, \"parentNode\", {});\n  };\n\n  /**\n   * The getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\n   *\n   * @name getContext\n   * @function\n   * @param {string} contextType Is a String containing the context identifier defining the drawing context associated to the canvas. Possible value is \"2d\", leading to the creation of a Context2D object representing a two-dimensional rendering context.\n   * @param {object} contextAttributes\n   */\n  Canvas.prototype.getContext = function(contextType, contextAttributes) {\n    contextType = contextType || \"2d\";\n    var key;\n\n    if (contextType !== \"2d\") {\n      return null;\n    }\n    for (key in contextAttributes) {\n      if (this.pdf.context2d.hasOwnProperty(key)) {\n        this.pdf.context2d[key] = contextAttributes[key];\n      }\n    }\n    this.pdf.context2d._canvas = this;\n    return this.pdf.context2d;\n  };\n\n  /**\n   * The toDataURL() method is just a stub to throw an error if accidently called.\n   *\n   * @name toDataURL\n   * @function\n   */\n  Canvas.prototype.toDataURL = function() {\n    throw new Error(\"toDataURL is not implemented.\");\n  };\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      this.canvas = new Canvas();\n      this.canvas.pdf = this;\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *               2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *               2013 Lee Driscoll, https://github.com/lsdriscoll\n *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria\n *               2014 James Hall, james@parall.ax\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name cell\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var NO_MARGINS = { left: 0, top: 0, bottom: 0, right: 0 };\n\n  var px2pt = (0.264583 * 72) / 25.4;\n  var printingHeaderRow = false;\n\n  var _initialize = function() {\n    if (typeof this.internal.__cell__ === \"undefined\") {\n      this.internal.__cell__ = {};\n      this.internal.__cell__.padding = 3;\n      this.internal.__cell__.headerFunction = undefined;\n      this.internal.__cell__.margins = Object.assign({}, NO_MARGINS);\n      this.internal.__cell__.margins.width = this.getPageWidth();\n      _reset.call(this);\n    }\n  };\n\n  var _reset = function() {\n    this.internal.__cell__.lastCell = new Cell();\n    this.internal.__cell__.pages = 1;\n  };\n\n  var Cell = function() {\n    var _x = arguments[0];\n    Object.defineProperty(this, \"x\", {\n      enumerable: true,\n      get: function() {\n        return _x;\n      },\n      set: function(value) {\n        _x = value;\n      }\n    });\n    var _y = arguments[1];\n    Object.defineProperty(this, \"y\", {\n      enumerable: true,\n      get: function() {\n        return _y;\n      },\n      set: function(value) {\n        _y = value;\n      }\n    });\n    var _width = arguments[2];\n    Object.defineProperty(this, \"width\", {\n      enumerable: true,\n      get: function() {\n        return _width;\n      },\n      set: function(value) {\n        _width = value;\n      }\n    });\n    var _height = arguments[3];\n    Object.defineProperty(this, \"height\", {\n      enumerable: true,\n      get: function() {\n        return _height;\n      },\n      set: function(value) {\n        _height = value;\n      }\n    });\n    var _text = arguments[4];\n    Object.defineProperty(this, \"text\", {\n      enumerable: true,\n      get: function() {\n        return _text;\n      },\n      set: function(value) {\n        _text = value;\n      }\n    });\n    var _lineNumber = arguments[5];\n    Object.defineProperty(this, \"lineNumber\", {\n      enumerable: true,\n      get: function() {\n        return _lineNumber;\n      },\n      set: function(value) {\n        _lineNumber = value;\n      }\n    });\n    var _align = arguments[6];\n    Object.defineProperty(this, \"align\", {\n      enumerable: true,\n      get: function() {\n        return _align;\n      },\n      set: function(value) {\n        _align = value;\n      }\n    });\n\n    return this;\n  };\n\n  Cell.prototype.clone = function() {\n    return new Cell(\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    );\n  };\n\n  Cell.prototype.toArray = function() {\n    return [\n      this.x,\n      this.y,\n      this.width,\n      this.height,\n      this.text,\n      this.lineNumber,\n      this.align\n    ];\n  };\n\n  /**\n   * @name setHeaderFunction\n   * @function\n   * @param {function} func\n   */\n  jsPDFAPI.setHeaderFunction = function(func) {\n    _initialize.call(this);\n    this.internal.__cell__.headerFunction =\n      typeof func === \"function\" ? func : undefined;\n    return this;\n  };\n\n  /**\n   * @name getTextDimensions\n   * @function\n   * @param {string} txt\n   * @returns {Object} dimensions\n   */\n  jsPDFAPI.getTextDimensions = function(text, options) {\n    _initialize.call(this);\n    options = options || {};\n    var fontSize = options.fontSize || this.getFontSize();\n    var font = options.font || this.getFont();\n    var scaleFactor = options.scaleFactor || this.internal.scaleFactor;\n    var width = 0;\n    var amountOfLines = 0;\n    var height = 0;\n    var tempWidth = 0;\n    var scope = this;\n\n    if (!Array.isArray(text) && typeof text !== \"string\") {\n      if (typeof text === \"number\") {\n        text = String(text);\n      } else {\n        throw new Error(\n          \"getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.\"\n        );\n      }\n    }\n\n    const maxWidth = options.maxWidth;\n    if (maxWidth > 0) {\n      if (typeof text === \"string\") {\n        text = this.splitTextToSize(text, maxWidth);\n      } else if (Object.prototype.toString.call(text) === \"[object Array]\") {\n        text = text.reduce(function(acc, textLine) {\n          return acc.concat(scope.splitTextToSize(textLine, maxWidth));\n        }, []);\n      }\n    } else {\n      // Without the else clause, it will not work if you do not pass along maxWidth\n      text = Array.isArray(text) ? text : [text];\n    }\n\n    for (var i = 0; i < text.length; i++) {\n      tempWidth = this.getStringUnitWidth(text[i], { font: font }) * fontSize;\n      if (width < tempWidth) {\n        width = tempWidth;\n      }\n    }\n\n    if (width !== 0) {\n      amountOfLines = text.length;\n    }\n\n    width = width / scaleFactor;\n    height = Math.max(\n      (amountOfLines * fontSize * this.getLineHeightFactor() -\n        fontSize * (this.getLineHeightFactor() - 1)) /\n        scaleFactor,\n      0\n    );\n    return { w: width, h: height };\n  };\n\n  /**\n   * @name cellAddPage\n   * @function\n   */\n  jsPDFAPI.cellAddPage = function() {\n    _initialize.call(this);\n\n    this.addPage();\n\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    this.internal.__cell__.lastCell = new Cell(\n      margins.left,\n      margins.top,\n      undefined,\n      undefined\n    );\n    this.internal.__cell__.pages += 1;\n\n    return this;\n  };\n\n  /**\n   * @name cell\n   * @function\n   * @param {number} x\n   * @param {number} y\n   * @param {number} width\n   * @param {number} height\n   * @param {string} text\n   * @param {number} lineNumber lineNumber\n   * @param {string} align\n   * @return {jsPDF} jsPDF-instance\n   */\n  var cell = (jsPDFAPI.cell = function() {\n    var currentCell;\n\n    if (arguments[0] instanceof Cell) {\n      currentCell = arguments[0];\n    } else {\n      currentCell = new Cell(\n        arguments[0],\n        arguments[1],\n        arguments[2],\n        arguments[3],\n        arguments[4],\n        arguments[5]\n      );\n    }\n    _initialize.call(this);\n    var lastCell = this.internal.__cell__.lastCell;\n    var padding = this.internal.__cell__.padding;\n    var margins = this.internal.__cell__.margins || NO_MARGINS;\n    var tableHeaderRow = this.internal.__cell__.tableHeaderRow;\n    var printHeaders = this.internal.__cell__.printHeaders;\n    // If this is not the first cell, we must change its position\n    if (typeof lastCell.lineNumber !== \"undefined\") {\n      if (lastCell.lineNumber === currentCell.lineNumber) {\n        //Same line\n        currentCell.x = (lastCell.x || 0) + (lastCell.width || 0);\n        currentCell.y = lastCell.y || 0;\n      } else {\n        //New line\n        if (\n          lastCell.y + lastCell.height + currentCell.height + margins.bottom >\n          this.getPageHeight()\n        ) {\n          this.cellAddPage();\n          currentCell.y = margins.top;\n          if (printHeaders && tableHeaderRow) {\n            this.printHeaderRow(currentCell.lineNumber, true);\n            currentCell.y += tableHeaderRow[0].height;\n          }\n        } else {\n          currentCell.y = lastCell.y + lastCell.height || currentCell.y;\n        }\n      }\n    }\n\n    if (typeof currentCell.text[0] !== \"undefined\") {\n      this.rect(\n        currentCell.x,\n        currentCell.y,\n        currentCell.width,\n        currentCell.height,\n        printingHeaderRow === true ? \"FD\" : undefined\n      );\n      if (currentCell.align === \"right\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width - padding,\n          currentCell.y + padding,\n          { align: \"right\", baseline: \"top\" }\n        );\n      } else if (currentCell.align === \"center\") {\n        this.text(\n          currentCell.text,\n          currentCell.x + currentCell.width / 2,\n          currentCell.y + padding,\n          {\n            align: \"center\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      } else {\n        this.text(\n          currentCell.text,\n          currentCell.x + padding,\n          currentCell.y + padding,\n          {\n            align: \"left\",\n            baseline: \"top\",\n            maxWidth: currentCell.width - padding - padding\n          }\n        );\n      }\n    }\n    this.internal.__cell__.lastCell = currentCell;\n    return this;\n  });\n\n  /**\n     * Create a table from a set of data.\n     * @name table\n     * @function\n     * @param {Integer} [x] : left-position for top-left corner of table\n     * @param {Integer} [y] top-position for top-left corner of table\n     * @param {Object[]} [data] An array of objects containing key-value pairs corresponding to a row of data.\n     * @param {String[]} [headers] Omit or null to auto-generate headers at a performance cost\n\n     * @param {Object} [config.printHeaders] True to print column headers at the top of every page\n     * @param {Object} [config.autoSize] True to dynamically set the column widths to match the widest cell value\n     * @param {Object} [config.margins] margin values for left, top, bottom, and width\n     * @param {Object} [config.fontSize] Integer fontSize to use (optional)\n     * @param {Object} [config.padding] cell-padding in pt to use (optional)\n     * @param {Object} [config.headerBackgroundColor] default is #c8c8c8 (optional)\n     * @param {Object} [config.headerTextColor] default is #000 (optional)\n     * @param {Object} [config.rowStart] callback to handle before print each row (optional)\n     * @param {Object} [config.cellStart] callback to handle before print each cell (optional)\n     * @returns {jsPDF} jsPDF-instance\n     */\n\n  jsPDFAPI.table = function(x, y, data, headers, config) {\n    _initialize.call(this);\n    if (!data) {\n      throw new Error(\"No data for PDF table.\");\n    }\n\n    config = config || {};\n\n    var headerNames = [],\n      headerLabels = [],\n      headerAligns = [],\n      i,\n      columnMatrix = {},\n      columnWidths = {},\n      column,\n      columnMinWidths = [],\n      j,\n      tableHeaderConfigs = [],\n      //set up defaults. If a value is provided in config, defaults will be overwritten:\n      autoSize = config.autoSize || false,\n      printHeaders = config.printHeaders === false ? false : true,\n      fontSize =\n        config.css && typeof config.css[\"font-size\"] !== \"undefined\"\n          ? config.css[\"font-size\"] * 16\n          : config.fontSize || 12,\n      margins =\n        config.margins ||\n        Object.assign({ width: this.getPageWidth() }, NO_MARGINS),\n      padding = typeof config.padding === \"number\" ? config.padding : 3,\n      headerBackgroundColor = config.headerBackgroundColor || \"#c8c8c8\",\n      headerTextColor = config.headerTextColor || \"#000\";\n\n    _reset.call(this);\n\n    this.internal.__cell__.printHeaders = printHeaders;\n    this.internal.__cell__.margins = margins;\n    this.internal.__cell__.table_font_size = fontSize;\n    this.internal.__cell__.padding = padding;\n    this.internal.__cell__.headerBackgroundColor = headerBackgroundColor;\n    this.internal.__cell__.headerTextColor = headerTextColor;\n    this.setFontSize(fontSize);\n\n    // Set header values\n    if (headers === undefined || headers === null) {\n      // No headers defined so we derive from data\n      headerNames = Object.keys(data[0]);\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    } else if (Array.isArray(headers) && typeof headers[0] === \"object\") {\n      headerNames = headers.map(function(header) {\n        return header.name;\n      });\n      headerLabels = headers.map(function(header) {\n        return header.prompt || header.name || \"\";\n      });\n      headerAligns = headers.map(function(header) {\n        return header.align || \"left\";\n      });\n      // Split header configs into names and prompts\n      for (i = 0; i < headers.length; i += 1) {\n        columnWidths[headers[i].name] = headers[i].width * px2pt;\n      }\n    } else if (Array.isArray(headers) && typeof headers[0] === \"string\") {\n      headerNames = headers;\n      headerLabels = headerNames;\n      headerAligns = headerNames.map(function() {\n        return \"left\";\n      });\n    }\n\n    if (\n      autoSize ||\n      (Array.isArray(headers) && typeof headers[0] === \"string\")\n    ) {\n      var headerName;\n      for (i = 0; i < headerNames.length; i += 1) {\n        headerName = headerNames[i];\n\n        // Create a matrix of columns e.g., {column_title: [row1_Record, row2_Record]}\n\n        columnMatrix[headerName] = data.map(function(rec) {\n          return rec[headerName];\n        });\n\n        // get header width\n        this.setFont(undefined, \"bold\");\n        columnMinWidths.push(\n          this.getTextDimensions(headerLabels[i], {\n            fontSize: this.internal.__cell__.table_font_size,\n            scaleFactor: this.internal.scaleFactor\n          }).w\n        );\n        column = columnMatrix[headerName];\n\n        // get cell widths\n        this.setFont(undefined, \"normal\");\n        for (j = 0; j < column.length; j += 1) {\n          columnMinWidths.push(\n            this.getTextDimensions(column[j], {\n              fontSize: this.internal.__cell__.table_font_size,\n              scaleFactor: this.internal.scaleFactor\n            }).w\n          );\n        }\n\n        // get final column width\n        columnWidths[headerName] =\n          Math.max.apply(null, columnMinWidths) + padding + padding;\n\n        //have to reset\n        columnMinWidths = [];\n      }\n    }\n\n    // -- Construct the table\n\n    if (printHeaders) {\n      var row = {};\n      for (i = 0; i < headerNames.length; i += 1) {\n        row[headerNames[i]] = {};\n        row[headerNames[i]].text = headerLabels[i];\n        row[headerNames[i]].align = headerAligns[i];\n      }\n\n      var rowHeight = calculateLineHeight.call(this, row, columnWidths);\n\n      // Construct the header row\n      tableHeaderConfigs = headerNames.map(function(value) {\n        return new Cell(\n          x,\n          y,\n          columnWidths[value],\n          rowHeight,\n          row[value].text,\n          undefined,\n          row[value].align\n        );\n      });\n\n      // Store the table header config\n      this.setTableHeaderRow(tableHeaderConfigs);\n\n      // Print the header for the start of the table\n      this.printHeaderRow(1, false);\n    }\n\n    // Construct the data rows\n\n    var align = headers.reduce(function(pv, cv) {\n      pv[cv.name] = cv.align;\n      return pv;\n    }, {});\n    for (i = 0; i < data.length; i += 1) {\n      if (\"rowStart\" in config && config.rowStart instanceof Function) {\n        config.rowStart(\n          {\n            row: i,\n            data: data[i]\n          },\n          this\n        );\n      }\n      var lineHeight = calculateLineHeight.call(this, data[i], columnWidths);\n\n      for (j = 0; j < headerNames.length; j += 1) {\n        var cellData = data[i][headerNames[j]];\n        if (\"cellStart\" in config && config.cellStart instanceof Function) {\n          config.cellStart(\n            {\n              row: i,\n              col: j,\n              data: cellData\n            },\n            this\n          );\n        }\n        cell.call(\n          this,\n          new Cell(\n            x,\n            y,\n            columnWidths[headerNames[j]],\n            lineHeight,\n            cellData,\n            i + 2,\n            align[headerNames[j]]\n          )\n        );\n      }\n    }\n    this.internal.__cell__.table_x = x;\n    this.internal.__cell__.table_y = y;\n    return this;\n  };\n\n  /**\n   * Calculate the height for containing the highest column\n   *\n   * @name calculateLineHeight\n   * @function\n   * @param {Object[]} model is the line of data we want to calculate the height of\n   * @param {Integer[]} columnWidths is size of each column\n   * @returns {number} lineHeight\n   * @private\n   */\n  var calculateLineHeight = function calculateLineHeight(model, columnWidths) {\n    var padding = this.internal.__cell__.padding;\n    var fontSize = this.internal.__cell__.table_font_size;\n    var scaleFactor = this.internal.scaleFactor;\n\n    return Object.keys(model)\n      .map(function(key) {\n        var value = model[key];\n        return this.splitTextToSize(\n          value.hasOwnProperty(\"text\") ? value.text : value,\n          columnWidths[key] - padding - padding\n        );\n      }, this)\n      .map(function(value) {\n        return (\n          (this.getLineHeightFactor() * value.length * fontSize) / scaleFactor +\n          padding +\n          padding\n        );\n      }, this)\n      .reduce(function(pv, cv) {\n        return Math.max(pv, cv);\n      }, 0);\n  };\n\n  /**\n   * Store the config for outputting a table header\n   *\n   * @name setTableHeaderRow\n   * @function\n   * @param {Object[]} config\n   * An array of cell configs that would define a header row: Each config matches the config used by jsPDFAPI.cell\n   * except the lineNumber parameter is excluded\n   */\n  jsPDFAPI.setTableHeaderRow = function(config) {\n    _initialize.call(this);\n    this.internal.__cell__.tableHeaderRow = config;\n  };\n\n  /**\n   * Output the store header row\n   *\n   * @name printHeaderRow\n   * @function\n   * @param {number} lineNumber The line number to output the header at\n   * @param {boolean} new_page\n   */\n  jsPDFAPI.printHeaderRow = function(lineNumber, new_page) {\n    _initialize.call(this);\n    if (!this.internal.__cell__.tableHeaderRow) {\n      throw new Error(\"Property tableHeaderRow does not exist.\");\n    }\n\n    var tableHeaderCell;\n\n    printingHeaderRow = true;\n    if (typeof this.internal.__cell__.headerFunction === \"function\") {\n      var position = this.internal.__cell__.headerFunction(\n        this,\n        this.internal.__cell__.pages\n      );\n      this.internal.__cell__.lastCell = new Cell(\n        position[0],\n        position[1],\n        position[2],\n        position[3],\n        undefined,\n        -1\n      );\n    }\n    this.setFont(undefined, \"bold\");\n\n    var tempHeaderConf = [];\n    for (var i = 0; i < this.internal.__cell__.tableHeaderRow.length; i += 1) {\n      tableHeaderCell = this.internal.__cell__.tableHeaderRow[i].clone();\n      if (new_page) {\n        tableHeaderCell.y = this.internal.__cell__.margins.top || 0;\n        tempHeaderConf.push(tableHeaderCell);\n      }\n      tableHeaderCell.lineNumber = lineNumber;\n      var currentTextColor = this.getTextColor();\n      this.setTextColor(this.internal.__cell__.headerTextColor);\n      this.setFillColor(this.internal.__cell__.headerBackgroundColor);\n      cell.call(this, tableHeaderCell);\n      this.setTextColor(currentTextColor);\n    }\n    if (tempHeaderConf.length > 0) {\n      this.setTableHeaderRow(tempHeaderConf);\n    }\n    this.setFont(undefined, \"normal\");\n    printingHeaderRow = false;\n  };\n})(jsPDF.API);\n","/* eslint-disable no-fallthrough */\r\n/* eslint-disable no-console */\r\n/**\r\n * @license\r\n * jsPDF Context2D PlugIn Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv\r\n *\r\n * Licensed under the MIT License. http://opensource.org/licenses/mit-license\r\n */\r\n\r\nimport { jsPDF } from \"../jspdf.js\";\r\nimport { RGBColor } from \"../libs/rgbcolor.js\";\r\nimport { console } from \"../libs/console.js\";\r\nimport {\r\n  buildFontFaceMap,\r\n  parseFontFamily,\r\n  resolveFontFace\r\n} from \"../libs/fontFace.js\";\r\n\r\n/**\r\n * This plugin mimics the HTML5 CanvasRenderingContext2D.\r\n *\r\n * The goal is to provide a way for current canvas implementations to print directly to a PDF.\r\n *\r\n * @name context2d\r\n * @module\r\n */\r\n(function(jsPDFAPI) {\r\n  \"use strict\";\r\n  var ContextLayer = function(ctx) {\r\n    ctx = ctx || {};\r\n    this.isStrokeTransparent = ctx.isStrokeTransparent || false;\r\n    this.strokeOpacity = ctx.strokeOpacity || 1;\r\n    this.strokeStyle = ctx.strokeStyle || \"#000000\";\r\n    this.fillStyle = ctx.fillStyle || \"#000000\";\r\n    this.isFillTransparent = ctx.isFillTransparent || false;\r\n    this.fillOpacity = ctx.fillOpacity || 1;\r\n    this.font = ctx.font || \"10px sans-serif\";\r\n    this.textBaseline = ctx.textBaseline || \"alphabetic\";\r\n    this.textAlign = ctx.textAlign || \"left\";\r\n    this.lineWidth = ctx.lineWidth || 1;\r\n    this.lineJoin = ctx.lineJoin || \"miter\";\r\n    this.lineCap = ctx.lineCap || \"butt\";\r\n    this.path = ctx.path || [];\r\n    this.transform =\r\n      typeof ctx.transform !== \"undefined\"\r\n        ? ctx.transform.clone()\r\n        : new Matrix();\r\n    this.globalCompositeOperation = ctx.globalCompositeOperation || \"normal\";\r\n    this.globalAlpha = ctx.globalAlpha || 1.0;\r\n    this.clip_path = ctx.clip_path || [];\r\n    this.currentPoint = ctx.currentPoint || new Point();\r\n    this.miterLimit = ctx.miterLimit || 10.0;\r\n    this.lastPoint = ctx.lastPoint || new Point();\r\n    this.lineDashOffset = ctx.lineDashOffset || 0.0;\r\n    this.lineDash = ctx.lineDash || [];\r\n    this.margin = ctx.margin || [0, 0, 0, 0];\r\n    this.prevPageLastElemOffset = ctx.prevPageLastElemOffset || 0;\r\n\r\n    this.ignoreClearRect =\r\n      typeof ctx.ignoreClearRect === \"boolean\" ? ctx.ignoreClearRect : true;\r\n    return this;\r\n  };\r\n\r\n  //stub\r\n  var f2,\r\n    getHorizontalCoordinateString,\r\n    getVerticalCoordinateString,\r\n    getHorizontalCoordinate,\r\n    getVerticalCoordinate,\r\n    Point,\r\n    Rectangle,\r\n    Matrix,\r\n    _ctx;\r\n  jsPDFAPI.events.push([\r\n    \"initialized\",\r\n    function() {\r\n      this.context2d = new Context2D(this);\r\n\r\n      f2 = this.internal.f2;\r\n      getHorizontalCoordinateString = this.internal.getCoordinateString;\r\n      getVerticalCoordinateString = this.internal.getVerticalCoordinateString;\r\n      getHorizontalCoordinate = this.internal.getHorizontalCoordinate;\r\n      getVerticalCoordinate = this.internal.getVerticalCoordinate;\r\n      Point = this.internal.Point;\r\n      Rectangle = this.internal.Rectangle;\r\n      Matrix = this.internal.Matrix;\r\n      _ctx = new ContextLayer();\r\n    }\r\n  ]);\r\n\r\n  var Context2D = function(pdf) {\r\n    Object.defineProperty(this, \"canvas\", {\r\n      get: function() {\r\n        return { parentNode: false, style: false };\r\n      }\r\n    });\r\n\r\n    var _pdf = pdf;\r\n    Object.defineProperty(this, \"pdf\", {\r\n      get: function() {\r\n        return _pdf;\r\n      }\r\n    });\r\n\r\n    var _pageWrapXEnabled = false;\r\n    /**\r\n     * @name pageWrapXEnabled\r\n     * @type {boolean}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"pageWrapXEnabled\", {\r\n      get: function() {\r\n        return _pageWrapXEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapXEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _pageWrapYEnabled = false;\r\n    /**\r\n     * @name pageWrapYEnabled\r\n     * @type {boolean}\r\n     * @default true\r\n     */\r\n    Object.defineProperty(this, \"pageWrapYEnabled\", {\r\n      get: function() {\r\n        return _pageWrapYEnabled;\r\n      },\r\n      set: function(value) {\r\n        _pageWrapYEnabled = Boolean(value);\r\n      }\r\n    });\r\n\r\n    var _posX = 0;\r\n    /**\r\n     * @name posX\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posX\", {\r\n      get: function() {\r\n        return _posX;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posX = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _posY = 0;\r\n    /**\r\n     * @name posY\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"posY\", {\r\n      get: function() {\r\n        return _posY;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          _posY = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Gets or sets the page margin when using auto paging. Has no effect when {@link autoPaging} is off.\r\n     * @name margin\r\n     * @type {number|number[]}\r\n     * @default [0, 0, 0, 0]\r\n     */\r\n    Object.defineProperty(this, \"margin\", {\r\n      get: function() {\r\n        return _ctx.margin;\r\n      },\r\n      set: function(value) {\r\n        var margin;\r\n        if (typeof value === \"number\") {\r\n          margin = [value, value, value, value];\r\n        } else {\r\n          margin = new Array(4);\r\n          margin[0] = value[0];\r\n          margin[1] = value.length >= 2 ? value[1] : margin[0];\r\n          margin[2] = value.length >= 3 ? value[2] : margin[0];\r\n          margin[3] = value.length >= 4 ? value[3] : margin[1];\r\n        }\r\n        _ctx.margin = margin;\r\n      }\r\n    });\r\n\r\n    var _autoPaging = false;\r\n    /**\r\n     * Gets or sets the auto paging mode. When auto paging is enabled, the context2d will automatically draw on the\r\n     * next page if a shape or text chunk doesn't fit entirely on the current page. The context2d will create new\r\n     * pages if required.\r\n     *\r\n     * Context2d supports different modes:\r\n     * <ul>\r\n     * <li>\r\n     *   <code>false</code>: Auto paging is disabled.\r\n     * </li>\r\n     * <li>\r\n     *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\r\n     *   slice text in half, making it difficult to read.\r\n     * </li>\r\n     * <li>\r\n     *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\r\n     *   mostly of a single column of text.\r\n     * </li>\r\n     * </ul>\r\n     * @name Context2D#autoPaging\r\n     * @type {boolean|\"slice\"|\"text\"}\r\n     * @default false\r\n     */\r\n    Object.defineProperty(this, \"autoPaging\", {\r\n      get: function() {\r\n        return _autoPaging;\r\n      },\r\n      set: function(value) {\r\n        _autoPaging = value;\r\n      }\r\n    });\r\n\r\n    var lastBreak = 0;\r\n    /**\r\n     * @name lastBreak\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"lastBreak\", {\r\n      get: function() {\r\n        return lastBreak;\r\n      },\r\n      set: function(value) {\r\n        lastBreak = value;\r\n      }\r\n    });\r\n\r\n    var pageBreaks = [];\r\n    /**\r\n     * Y Position of page breaks.\r\n     * @name pageBreaks\r\n     * @type {number}\r\n     * @default 0\r\n     */\r\n    Object.defineProperty(this, \"pageBreaks\", {\r\n      get: function() {\r\n        return pageBreaks;\r\n      },\r\n      set: function(value) {\r\n        pageBreaks = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctx\r\n     * @type {object}\r\n     * @default {}\r\n     */\r\n    Object.defineProperty(this, \"ctx\", {\r\n      get: function() {\r\n        return _ctx;\r\n      },\r\n      set: function(value) {\r\n        if (value instanceof ContextLayer) {\r\n          _ctx = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name path\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    Object.defineProperty(this, \"path\", {\r\n      get: function() {\r\n        return _ctx.path;\r\n      },\r\n      set: function(value) {\r\n        _ctx.path = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * @name ctxStack\r\n     * @type {array}\r\n     * @default []\r\n     */\r\n    var _ctxStack = [];\r\n    Object.defineProperty(this, \"ctxStack\", {\r\n      get: function() {\r\n        return _ctxStack;\r\n      },\r\n      set: function(value) {\r\n        _ctxStack = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used to fill the drawing\r\n     *\r\n     * @name fillStyle\r\n     * @default #000000\r\n     * @property {(color|gradient|pattern)} value The color of the drawing. Default value is #000000<br />\r\n     * A gradient object (linear or radial) used to fill the drawing (not supported by context2d)<br />\r\n     * A pattern object to use to fill the drawing (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"fillStyle\", {\r\n      get: function() {\r\n        return this.ctx.fillStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba;\r\n        rgba = getRGBA(value);\r\n\r\n        this.ctx.fillStyle = rgba.style;\r\n        this.ctx.isFillTransparent = rgba.a === 0;\r\n        this.ctx.fillOpacity = rgba.a;\r\n\r\n        this.pdf.setFillColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n        this.pdf.setTextColor(rgba.r, rgba.g, rgba.b, { a: rgba.a });\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the color, gradient, or pattern used for strokes\r\n     *\r\n     * @name strokeStyle\r\n     * @default #000000\r\n     * @property {color} color A CSS color value that indicates the stroke color of the drawing. Default value is #000000 (not supported by context2d)\r\n     * @property {gradient} gradient A gradient object (linear or radial) used to create a gradient stroke (not supported by context2d)\r\n     * @property {pattern} pattern A pattern object used to create a pattern stroke (not supported by context2d)\r\n     */\r\n    Object.defineProperty(this, \"strokeStyle\", {\r\n      get: function() {\r\n        return this.ctx.strokeStyle;\r\n      },\r\n      set: function(value) {\r\n        var rgba = getRGBA(value);\r\n\r\n        this.ctx.strokeStyle = rgba.style;\r\n        this.ctx.isStrokeTransparent = rgba.a === 0;\r\n        this.ctx.strokeOpacity = rgba.a;\r\n\r\n        if (rgba.a === 0) {\r\n          this.pdf.setDrawColor(255, 255, 255);\r\n        } else if (rgba.a === 1) {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        } else {\r\n          this.pdf.setDrawColor(rgba.r, rgba.g, rgba.b);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the style of the end caps for a line\r\n     *\r\n     * @name lineCap\r\n     * @default butt\r\n     * @property {(butt|round|square)} lineCap butt A flat edge is added to each end of the line <br/>\r\n     * round A rounded end cap is added to each end of the line<br/>\r\n     * square A square end cap is added to each end of the line<br/>\r\n     */\r\n    Object.defineProperty(this, \"lineCap\", {\r\n      get: function() {\r\n        return this.ctx.lineCap;\r\n      },\r\n      set: function(value) {\r\n        if ([\"butt\", \"round\", \"square\"].indexOf(value) !== -1) {\r\n          this.ctx.lineCap = value;\r\n          this.pdf.setLineCap(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the current line width\r\n     *\r\n     * @name lineWidth\r\n     * @default 1\r\n     * @property {number} lineWidth The current line width, in pixels\r\n     */\r\n    Object.defineProperty(this, \"lineWidth\", {\r\n      get: function() {\r\n        return this.ctx.lineWidth;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.lineWidth = value;\r\n          this.pdf.setLineWidth(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * Sets or returns the type of corner created, when two lines meet\r\n     */\r\n    Object.defineProperty(this, \"lineJoin\", {\r\n      get: function() {\r\n        return this.ctx.lineJoin;\r\n      },\r\n      set: function(value) {\r\n        if ([\"bevel\", \"round\", \"miter\"].indexOf(value) !== -1) {\r\n          this.ctx.lineJoin = value;\r\n          this.pdf.setLineJoin(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A number specifying the miter limit ratio in coordinate space units. Zero, negative, Infinity, and NaN values are ignored. The default value is 10.0.\r\n     *\r\n     * @name miterLimit\r\n     * @default 10\r\n     */\r\n    Object.defineProperty(this, \"miterLimit\", {\r\n      get: function() {\r\n        return this.ctx.miterLimit;\r\n      },\r\n      set: function(value) {\r\n        if (!isNaN(value)) {\r\n          this.ctx.miterLimit = value;\r\n          this.pdf.setMiterLimit(value);\r\n        }\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textBaseline\", {\r\n      get: function() {\r\n        return this.ctx.textBaseline;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.textBaseline = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"textAlign\", {\r\n      get: function() {\r\n        return this.ctx.textAlign;\r\n      },\r\n      set: function(value) {\r\n        if ([\"right\", \"end\", \"center\", \"left\", \"start\"].indexOf(value) !== -1) {\r\n          this.ctx.textAlign = value;\r\n        }\r\n      }\r\n    });\r\n\r\n    var _fontFaceMap = null;\r\n\r\n    function getFontFaceMap(pdf, fontFaces) {\r\n      if (_fontFaceMap === null) {\r\n        var fontMap = pdf.getFontList();\r\n\r\n        var convertedFontFaces = convertToFontFaces(fontMap);\r\n\r\n        _fontFaceMap = buildFontFaceMap(convertedFontFaces.concat(fontFaces));\r\n      }\r\n\r\n      return _fontFaceMap;\r\n    }\r\n\r\n    function convertToFontFaces(fontMap) {\r\n      var fontFaces = [];\r\n\r\n      Object.keys(fontMap).forEach(function(family) {\r\n        var styles = fontMap[family];\r\n\r\n        styles.forEach(function(style) {\r\n          var fontFace = null;\r\n\r\n          switch (style) {\r\n            case \"bold\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\"\r\n              };\r\n              break;\r\n\r\n            case \"italic\":\r\n              fontFace = {\r\n                family: family,\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"bolditalic\":\r\n              fontFace = {\r\n                family: family,\r\n                weight: \"bold\",\r\n                style: \"italic\"\r\n              };\r\n              break;\r\n\r\n            case \"\":\r\n            case \"normal\":\r\n              fontFace = {\r\n                family: family\r\n              };\r\n              break;\r\n          }\r\n\r\n          // If font-face is still null here, it is a font with some styling we don't recognize and\r\n          // cannot map or it is a font added via the fontFaces option of .html().\r\n          if (fontFace !== null) {\r\n            fontFace.ref = {\r\n              name: family,\r\n              style: style\r\n            };\r\n\r\n            fontFaces.push(fontFace);\r\n          }\r\n        });\r\n      });\r\n\r\n      return fontFaces;\r\n    }\r\n\r\n    var _fontFaces = null;\r\n    /**\r\n     * A map of available font-faces, as passed in the options of\r\n     * .html(). If set a limited implementation of the font style matching\r\n     * algorithm defined by https://www.w3.org/TR/css-fonts-3/#font-matching-algorithm\r\n     * will be used. If not set it will fallback to previous behavior.\r\n     */\r\n\r\n    Object.defineProperty(this, \"fontFaces\", {\r\n      get: function() {\r\n        return _fontFaces;\r\n      },\r\n      set: function(value) {\r\n        _fontFaceMap = null;\r\n        _fontFaces = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"font\", {\r\n      get: function() {\r\n        return this.ctx.font;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.font = value;\r\n        var rx, matches;\r\n\r\n        //source: https://stackoverflow.com/a/10136041\r\n        // eslint-disable-next-line no-useless-escape\r\n        rx = /^\\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;\r\n        matches = rx.exec(value);\r\n        if (matches !== null) {\r\n          var fontStyle = matches[1];\r\n          var fontVariant = matches[2];\r\n          var fontWeight = matches[3];\r\n          var fontSize = matches[4];\r\n          var lineHeight = matches[5];\r\n          var fontFamily = matches[6];\r\n        } else {\r\n          return;\r\n        }\r\n        var rxFontSize = /^([.\\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i;\r\n        var fontSizeUnit = rxFontSize.exec(fontSize)[2];\r\n\r\n        if (\"px\" === fontSizeUnit) {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        } else if (\"em\" === fontSizeUnit) {\r\n          fontSize = Math.floor(parseFloat(fontSize) * this.pdf.getFontSize());\r\n        } else {\r\n          fontSize = Math.floor(\r\n            parseFloat(fontSize) * this.pdf.internal.scaleFactor\r\n          );\r\n        }\r\n\r\n        this.pdf.setFontSize(fontSize);\r\n        var parts = parseFontFamily(fontFamily);\r\n\r\n        if (this.fontFaces) {\r\n          var fontFaceMap = getFontFaceMap(this.pdf, this.fontFaces);\r\n\r\n          var rules = parts.map(function(ff) {\r\n            return {\r\n              family: ff,\r\n              stretch: \"normal\", // TODO: Extract font-stretch from font rule (perhaps write proper parser for it?)\r\n              weight: fontWeight,\r\n              style: fontStyle\r\n            };\r\n          });\r\n\r\n          var font = resolveFontFace(fontFaceMap, rules);\r\n          this.pdf.setFont(font.ref.name, font.ref.style);\r\n          return;\r\n        }\r\n\r\n        var style = \"\";\r\n        if (\r\n          fontWeight === \"bold\" ||\r\n          parseInt(fontWeight, 10) >= 700 ||\r\n          fontStyle === \"bold\"\r\n        ) {\r\n          style = \"bold\";\r\n        }\r\n\r\n        if (fontStyle === \"italic\") {\r\n          style += \"italic\";\r\n        }\r\n\r\n        if (style.length === 0) {\r\n          style = \"normal\";\r\n        }\r\n        var jsPdfFontName = \"\";\r\n\r\n        var fallbackFonts = {\r\n          arial: \"Helvetica\",\r\n          Arial: \"Helvetica\",\r\n          verdana: \"Helvetica\",\r\n          Verdana: \"Helvetica\",\r\n          helvetica: \"Helvetica\",\r\n          Helvetica: \"Helvetica\",\r\n          \"sans-serif\": \"Helvetica\",\r\n          fixed: \"Courier\",\r\n          monospace: \"Courier\",\r\n          terminal: \"Courier\",\r\n          cursive: \"Times\",\r\n          fantasy: \"Times\",\r\n          serif: \"Times\"\r\n        };\r\n\r\n        for (var i = 0; i < parts.length; i++) {\r\n          if (\r\n            this.pdf.internal.getFont(parts[i], style, {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            break;\r\n          } else if (\r\n            style === \"bolditalic\" &&\r\n            this.pdf.internal.getFont(parts[i], \"bold\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"bold\";\r\n          } else if (\r\n            this.pdf.internal.getFont(parts[i], \"normal\", {\r\n              noFallback: true,\r\n              disableWarning: true\r\n            }) !== undefined\r\n          ) {\r\n            jsPdfFontName = parts[i];\r\n            style = \"normal\";\r\n            break;\r\n          }\r\n        }\r\n        if (jsPdfFontName === \"\") {\r\n          for (var j = 0; j < parts.length; j++) {\r\n            if (fallbackFonts[parts[j]]) {\r\n              jsPdfFontName = fallbackFonts[parts[j]];\r\n              break;\r\n            }\r\n          }\r\n        }\r\n        jsPdfFontName = jsPdfFontName === \"\" ? \"Times\" : jsPdfFontName;\r\n        this.pdf.setFont(jsPdfFontName, style);\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalCompositeOperation\", {\r\n      get: function() {\r\n        return this.ctx.globalCompositeOperation;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalCompositeOperation = value;\r\n      }\r\n    });\r\n\r\n    Object.defineProperty(this, \"globalAlpha\", {\r\n      get: function() {\r\n        return this.ctx.globalAlpha;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.globalAlpha = value;\r\n      }\r\n    });\r\n\r\n    /**\r\n     * A float specifying the amount of the line dash offset. The default value is 0.0.\r\n     *\r\n     * @name lineDashOffset\r\n     * @default 0.0\r\n     */\r\n    Object.defineProperty(this, \"lineDashOffset\", {\r\n      get: function() {\r\n        return this.ctx.lineDashOffset;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDashOffset = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"lineDash\", {\r\n      get: function() {\r\n        return this.ctx.lineDash;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.lineDash = value;\r\n        setLineDash.call(this);\r\n      }\r\n    });\r\n\r\n    // Not HTML API\r\n    Object.defineProperty(this, \"ignoreClearRect\", {\r\n      get: function() {\r\n        return this.ctx.ignoreClearRect;\r\n      },\r\n      set: function(value) {\r\n        this.ctx.ignoreClearRect = Boolean(value);\r\n      }\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Sets the line dash pattern used when stroking lines.\r\n   * @name setLineDash\r\n   * @function\r\n   * @description It uses an array of values that specify alternating lengths of lines and gaps which describe the pattern.\r\n   */\r\n  Context2D.prototype.setLineDash = function(dashArray) {\r\n    this.lineDash = dashArray;\r\n  };\r\n\r\n  /**\r\n   * gets the current line dash pattern.\r\n   * @name getLineDash\r\n   * @function\r\n   * @returns {Array} An Array of numbers that specify distances to alternately draw a line and a gap (in coordinate space units). If the number, when setting the elements, is odd, the elements of the array get copied and concatenated. For example, setting the line dash to [5, 15, 25] will result in getting back [5, 15, 25, 5, 15, 25].\r\n   */\r\n  Context2D.prototype.getLineDash = function() {\r\n    if (this.lineDash.length % 2) {\r\n      // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash#return_value\r\n      return this.lineDash.concat(this.lineDash);\r\n    } else {\r\n      // The copied value is returned to prevent contamination from outside.\r\n      return this.lineDash.slice();\r\n    }\r\n  };\r\n\r\n  Context2D.prototype.fill = function() {\r\n    pathPreProcess.call(this, \"fill\", false);\r\n  };\r\n\r\n  /**\r\n   * Actually draws the path you have defined\r\n   *\r\n   * @name stroke\r\n   * @function\r\n   * @description The stroke() method actually draws the path you have defined with all those moveTo() and lineTo() methods. The default color is black.\r\n   */\r\n  Context2D.prototype.stroke = function() {\r\n    pathPreProcess.call(this, \"stroke\", false);\r\n  };\r\n\r\n  /**\r\n   * Begins a path, or resets the current\r\n   *\r\n   * @name beginPath\r\n   * @function\r\n   * @description The beginPath() method begins a path, or resets the current path.\r\n   */\r\n  Context2D.prototype.beginPath = function() {\r\n    this.path = [\r\n      {\r\n        type: \"begin\"\r\n      }\r\n    ];\r\n  };\r\n\r\n  /**\r\n   * Moves the path to the specified point in the canvas, without creating a line\r\n   *\r\n   * @name moveTo\r\n   * @function\r\n   * @param x {Number} The x-coordinate of where to move the path to\r\n   * @param y {Number} The y-coordinate of where to move the path to\r\n   */\r\n  Context2D.prototype.moveTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.moveTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.moveTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"mt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(x, y);\r\n  };\r\n\r\n  /**\r\n   * Creates a path from the current point back to the starting point\r\n   *\r\n   * @name closePath\r\n   * @function\r\n   * @description The closePath() method creates a path from the current point back to the starting point.\r\n   */\r\n  Context2D.prototype.closePath = function() {\r\n    var pathBegin = new Point(0, 0);\r\n    var i = 0;\r\n    for (i = this.path.length - 1; i !== -1; i--) {\r\n      if (this.path[i].type === \"begin\") {\r\n        if (\r\n          typeof this.path[i + 1] === \"object\" &&\r\n          typeof this.path[i + 1].x === \"number\"\r\n        ) {\r\n          pathBegin = new Point(this.path[i + 1].x, this.path[i + 1].y);\r\n          break;\r\n        }\r\n      }\r\n    }\r\n    this.path.push({\r\n      type: \"close\"\r\n    });\r\n    this.ctx.lastPoint = new Point(pathBegin.x, pathBegin.y);\r\n  };\r\n\r\n  /**\r\n   * Adds a new point and creates a line to that point from the last specified point in the canvas\r\n   *\r\n   * @name lineTo\r\n   * @function\r\n   * @param x The x-coordinate of where to create the line to\r\n   * @param y The y-coordinate of where to create the line to\r\n   * @description The lineTo() method adds a new point and creates a line TO that point FROM the last specified point in the canvas (this method does not draw the line).\r\n   */\r\n  Context2D.prototype.lineTo = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.lineTo: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.lineTo\");\r\n    }\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n\r\n    this.path.push({\r\n      type: \"lt\",\r\n      x: pt.x,\r\n      y: pt.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt.x, pt.y);\r\n  };\r\n\r\n  /**\r\n   * Clips a region of any shape and size from the original canvas\r\n   *\r\n   * @name clip\r\n   * @function\r\n   * @description The clip() method clips a region of any shape and size from the original canvas.\r\n   */\r\n  Context2D.prototype.clip = function() {\r\n    this.ctx.clip_path = JSON.parse(JSON.stringify(this.path));\r\n    pathPreProcess.call(this, null, true);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name quadraticCurveTo\r\n   * @function\r\n   * @param cpx {Number} The x-coordinate of the Bézier control point\r\n   * @param cpy {Number} The y-coordinate of the Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The quadraticCurveTo() method adds a point to the current path by using the specified control points that represent a quadratic Bézier curve.<br /><br /> A quadratic Bézier curve requires two points. The first point is a control point that is used in the quadratic Bézier calculation and the second point is the ending point for the curve. The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.quadraticCurveTo = function(cpx, cpy, x, y) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(cpx) || isNaN(cpy)) {\r\n      console.error(\r\n        \"jsPDF.context2d.quadraticCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.quadraticCurveTo\"\r\n      );\r\n    }\r\n\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cpx, cpy));\r\n\r\n    this.path.push({\r\n      type: \"qct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates a cubic Bézier curve\r\n   *\r\n   * @name bezierCurveTo\r\n   * @function\r\n   * @param cp1x {Number} The x-coordinate of the first Bézier control point\r\n   * @param cp1y {Number} The y-coordinate of the first Bézier control point\r\n   * @param cp2x {Number} The x-coordinate of the second Bézier control point\r\n   * @param cp2y {Number} The y-coordinate of the second Bézier control point\r\n   * @param x {Number} The x-coordinate of the ending point\r\n   * @param y {Number} The y-coordinate of the ending point\r\n   * @description The bezierCurveTo() method adds a point to the current path by using the specified control points that represent a cubic Bézier curve. <br /><br />A cubic bezier curve requires three points. The first two points are control points that are used in the cubic Bézier calculation and the last point is the ending point for the curve.  The starting point for the curve is the last point in the current path. If a path does not exist, use the beginPath() and moveTo() methods to define a starting point.\r\n   */\r\n  Context2D.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(cp1x) ||\r\n      isNaN(cp1y) ||\r\n      isNaN(cp2x) ||\r\n      isNaN(cp2y)\r\n    ) {\r\n      console.error(\r\n        \"jsPDF.context2d.bezierCurveTo: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.bezierCurveTo\"\r\n      );\r\n    }\r\n    var pt0 = this.ctx.transform.applyToPoint(new Point(x, y));\r\n    var pt1 = this.ctx.transform.applyToPoint(new Point(cp1x, cp1y));\r\n    var pt2 = this.ctx.transform.applyToPoint(new Point(cp2x, cp2y));\r\n\r\n    this.path.push({\r\n      type: \"bct\",\r\n      x1: pt1.x,\r\n      y1: pt1.y,\r\n      x2: pt2.x,\r\n      y2: pt2.y,\r\n      x: pt0.x,\r\n      y: pt0.y\r\n    });\r\n    this.ctx.lastPoint = new Point(pt0.x, pt0.y);\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve (used to create circles, or parts of circles)\r\n   *\r\n   * @name arc\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the center of the circle\r\n   * @param y {Number} The y-coordinate of the center of the circle\r\n   * @param radius {Number} The radius of the circle\r\n   * @param startAngle {Number} The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle)\r\n   * @param endAngle {Number} The ending angle, in radians\r\n   * @param counterclockwise {Boolean} Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise.\r\n   * @description The arc() method creates an arc/curve (used to create circles, or parts of circles).\r\n   */\r\n  Context2D.prototype.arc = function(\r\n    x,\r\n    y,\r\n    radius,\r\n    startAngle,\r\n    endAngle,\r\n    counterclockwise\r\n  ) {\r\n    if (\r\n      isNaN(x) ||\r\n      isNaN(y) ||\r\n      isNaN(radius) ||\r\n      isNaN(startAngle) ||\r\n      isNaN(endAngle)\r\n    ) {\r\n      console.error(\"jsPDF.context2d.arc: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.arc\");\r\n    }\r\n    counterclockwise = Boolean(counterclockwise);\r\n\r\n    if (!this.ctx.transform.isIdentity) {\r\n      var xpt = this.ctx.transform.applyToPoint(new Point(x, y));\r\n      x = xpt.x;\r\n      y = xpt.y;\r\n\r\n      var x_radPt = this.ctx.transform.applyToPoint(new Point(0, radius));\r\n      var x_radPt0 = this.ctx.transform.applyToPoint(new Point(0, 0));\r\n      radius = Math.sqrt(\r\n        Math.pow(x_radPt.x - x_radPt0.x, 2) +\r\n          Math.pow(x_radPt.y - x_radPt0.y, 2)\r\n      );\r\n    }\r\n    if (Math.abs(endAngle - startAngle) >= 2 * Math.PI) {\r\n      startAngle = 0;\r\n      endAngle = 2 * Math.PI;\r\n    }\r\n\r\n    this.path.push({\r\n      type: \"arc\",\r\n      x: x,\r\n      y: y,\r\n      radius: radius,\r\n      startAngle: startAngle,\r\n      endAngle: endAngle,\r\n      counterclockwise: counterclockwise\r\n    });\r\n    // this.ctx.lastPoint(new Point(pt.x,pt.y));\r\n  };\r\n\r\n  /**\r\n   * Creates an arc/curve between two tangents\r\n   *\r\n   * @name arcTo\r\n   * @function\r\n   * @param x1 {Number} The x-coordinate of the first tangent\r\n   * @param y1 {Number} The y-coordinate of the first tangent\r\n   * @param x2 {Number} The x-coordinate of the second tangent\r\n   * @param y2 {Number} The y-coordinate of the second tangent\r\n   * @param radius The radius of the arc\r\n   * @description The arcTo() method creates an arc/curve between two tangents on the canvas.\r\n   */\r\n  // eslint-disable-next-line no-unused-vars\r\n  Context2D.prototype.arcTo = function(x1, y1, x2, y2, radius) {\r\n    throw new Error(\"arcTo not implemented.\");\r\n  };\r\n\r\n  /**\r\n   * Creates a rectangle\r\n   *\r\n   * @name rect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The rect() method creates a rectangle.\r\n   */\r\n  Context2D.prototype.rect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.rect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rect\");\r\n    }\r\n    this.moveTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x + w, y + h);\r\n    this.lineTo(x, y + h);\r\n    this.lineTo(x, y);\r\n    this.lineTo(x + w, y);\r\n    this.lineTo(x, y);\r\n  };\r\n\r\n  /**\r\n   * Draws a \"filled\" rectangle\r\n   *\r\n   * @name fillRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The fillRect() method draws a \"filled\" rectangle. The default color of the fill is black.\r\n   */\r\n  Context2D.prototype.fillRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.fillRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillRect\");\r\n    }\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n    var tmp = {};\r\n    if (this.lineCap !== \"butt\") {\r\n      tmp.lineCap = this.lineCap;\r\n      this.lineCap = \"butt\";\r\n    }\r\n    if (this.lineJoin !== \"miter\") {\r\n      tmp.lineJoin = this.lineJoin;\r\n      this.lineJoin = \"miter\";\r\n    }\r\n\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.fill();\r\n\r\n    if (tmp.hasOwnProperty(\"lineCap\")) {\r\n      this.lineCap = tmp.lineCap;\r\n    }\r\n    if (tmp.hasOwnProperty(\"lineJoin\")) {\r\n      this.lineJoin = tmp.lineJoin;\r\n    }\r\n  };\r\n\r\n  /**\r\n   *     Draws a rectangle (no fill)\r\n   *\r\n   * @name strokeRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle, in pixels\r\n   * @param h {Number} The height of the rectangle, in pixels\r\n   * @description The strokeRect() method draws a rectangle (no fill). The default color of the stroke is black.\r\n   */\r\n  Context2D.prototype.strokeRect = function strokeRect(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.strokeRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeRect\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n    this.beginPath();\r\n    this.rect(x, y, w, h);\r\n    this.stroke();\r\n  };\r\n\r\n  /**\r\n   * Clears the specified pixels within a given rectangle\r\n   *\r\n   * @name clearRect\r\n   * @function\r\n   * @param x {Number} The x-coordinate of the upper-left corner of the rectangle\r\n   * @param y {Number} The y-coordinate of the upper-left corner of the rectangle\r\n   * @param w {Number} The width of the rectangle to clear, in pixels\r\n   * @param h {Number} The height of the rectangle to clear, in pixels\r\n   * @description We cannot clear PDF commands that were already written to PDF, so we use white instead. <br />\r\n   * As a special case, read a special flag (ignoreClearRect) and do nothing if it is set.\r\n   * This results in all calls to clearRect() to do nothing, and keep the canvas transparent.\r\n   * This flag is stored in the save/restore context and is managed the same way as other drawing states.\r\n   *\r\n   */\r\n  Context2D.prototype.clearRect = function(x, y, w, h) {\r\n    if (isNaN(x) || isNaN(y) || isNaN(w) || isNaN(h)) {\r\n      console.error(\"jsPDF.context2d.clearRect: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.clearRect\");\r\n    }\r\n    if (this.ignoreClearRect) {\r\n      return;\r\n    }\r\n\r\n    this.fillStyle = \"#ffffff\";\r\n    this.fillRect(x, y, w, h);\r\n  };\r\n\r\n  /**\r\n   * Saves the state of the current context\r\n   *\r\n   * @name save\r\n   * @function\r\n   */\r\n  Context2D.prototype.save = function(doStackPush) {\r\n    doStackPush = typeof doStackPush === \"boolean\" ? doStackPush : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPush) {\r\n      this.ctx.fontSize = this.pdf.internal.getFontSize();\r\n      var ctx = new ContextLayer(this.ctx);\r\n      this.ctxStack.push(this.ctx);\r\n      this.ctx = ctx;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * Returns previously saved path state and attributes\r\n   *\r\n   * @name restore\r\n   * @function\r\n   */\r\n  Context2D.prototype.restore = function(doStackPop) {\r\n    doStackPop = typeof doStackPop === \"boolean\" ? doStackPop : true;\r\n    var tmpPageNumber = this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    for (var i = 0; i < this.pdf.internal.getNumberOfPages(); i++) {\r\n      this.pdf.setPage(i + 1);\r\n      this.pdf.internal.out(\"Q\");\r\n    }\r\n    this.pdf.setPage(tmpPageNumber);\r\n\r\n    if (doStackPop && this.ctxStack.length !== 0) {\r\n      this.ctx = this.ctxStack.pop();\r\n      this.fillStyle = this.ctx.fillStyle;\r\n      this.strokeStyle = this.ctx.strokeStyle;\r\n      this.font = this.ctx.font;\r\n      this.lineCap = this.ctx.lineCap;\r\n      this.lineWidth = this.ctx.lineWidth;\r\n      this.lineJoin = this.ctx.lineJoin;\r\n      this.lineDash = this.ctx.lineDash;\r\n      this.lineDashOffset = this.ctx.lineDashOffset;\r\n    }\r\n  };\r\n\r\n  /**\r\n   * @name toDataURL\r\n   * @function\r\n   */\r\n  Context2D.prototype.toDataURL = function() {\r\n    throw new Error(\"toDataUrl not implemented.\");\r\n  };\r\n\r\n  //helper functions\r\n\r\n  /**\r\n   * Get the decimal values of r, g, b and a\r\n   *\r\n   * @name getRGBA\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var getRGBA = function(style) {\r\n    var rxRgb = /rgb\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*\\)/;\r\n    var rxRgba = /rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*([\\d.]+)\\s*\\)/;\r\n    var rxTransparent = /transparent|rgba\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*0+\\s*\\)/;\r\n\r\n    var r, g, b, a;\r\n\r\n    if (style.isCanvasGradient === true) {\r\n      style = style.getColor();\r\n    }\r\n\r\n    if (!style) {\r\n      return { r: 0, g: 0, b: 0, a: 0, style: style };\r\n    }\r\n\r\n    if (rxTransparent.test(style)) {\r\n      r = 0;\r\n      g = 0;\r\n      b = 0;\r\n      a = 0;\r\n    } else {\r\n      var matches = rxRgb.exec(style);\r\n      if (matches !== null) {\r\n        r = parseInt(matches[1]);\r\n        g = parseInt(matches[2]);\r\n        b = parseInt(matches[3]);\r\n        a = 1;\r\n      } else {\r\n        matches = rxRgba.exec(style);\r\n        if (matches !== null) {\r\n          r = parseInt(matches[1]);\r\n          g = parseInt(matches[2]);\r\n          b = parseInt(matches[3]);\r\n          a = parseFloat(matches[4]);\r\n        } else {\r\n          a = 1;\r\n\r\n          if (typeof style === \"string\" && style.charAt(0) !== \"#\") {\r\n            var rgbColor = new RGBColor(style);\r\n            if (rgbColor.ok) {\r\n              style = rgbColor.toHex();\r\n            } else {\r\n              style = \"#000000\";\r\n            }\r\n          }\r\n\r\n          if (style.length === 4) {\r\n            r = style.substring(1, 2);\r\n            r += r;\r\n            g = style.substring(2, 3);\r\n            g += g;\r\n            b = style.substring(3, 4);\r\n            b += b;\r\n          } else {\r\n            r = style.substring(1, 3);\r\n            g = style.substring(3, 5);\r\n            b = style.substring(5, 7);\r\n          }\r\n          r = parseInt(r, 16);\r\n          g = parseInt(g, 16);\r\n          b = parseInt(b, 16);\r\n        }\r\n      }\r\n    }\r\n    return { r: r, g: g, b: b, a: a, style: style };\r\n  };\r\n\r\n  /**\r\n   * @name isFillTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isFillTransparent = function() {\r\n    return this.ctx.isFillTransparent || this.globalAlpha == 0;\r\n  };\r\n\r\n  /**\r\n   * @name isStrokeTransparent\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns {Boolean}\r\n   */\r\n  var isStrokeTransparent = function() {\r\n    return Boolean(this.ctx.isStrokeTransparent || this.globalAlpha == 0);\r\n  };\r\n\r\n  /**\r\n   * Draws \"filled\" text on the canvas\r\n   *\r\n   * @name fillText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The fillText() method draws filled text on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.fillText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.fillText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.fillText\");\r\n    }\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n    if (isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n\r\n    // We only use X axis as scale hint\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Draws text on the canvas (no fill)\r\n   *\r\n   * @name strokeText\r\n   * @function\r\n   * @param text {String} Specifies the text that will be written on the canvas\r\n   * @param x {Number} The x coordinate where to start painting the text (relative to the canvas)\r\n   * @param y {Number} The y coordinate where to start painting the text (relative to the canvas)\r\n   * @param maxWidth {Number} Optional. The maximum allowed width of the text, in pixels\r\n   * @description The strokeText() method draws text (with no fill) on the canvas. The default color of the text is black.\r\n   */\r\n  Context2D.prototype.strokeText = function(text, x, y, maxWidth) {\r\n    if (isNaN(x) || isNaN(y) || typeof text !== \"string\") {\r\n      console.error(\"jsPDF.context2d.strokeText: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.strokeText\");\r\n    }\r\n    if (isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    maxWidth = isNaN(maxWidth) ? undefined : maxWidth;\r\n\r\n    var degs = rad2deg(this.ctx.transform.rotation);\r\n    var scale = this.ctx.transform.scaleX;\r\n\r\n    putText.call(this, {\r\n      text: text,\r\n      x: x,\r\n      y: y,\r\n      scale: scale,\r\n      renderingMode: \"stroke\",\r\n      angle: degs,\r\n      align: this.textAlign,\r\n      maxWidth: maxWidth\r\n    });\r\n  };\r\n\r\n  /**\r\n   * Returns an object that contains the width of the specified text\r\n   *\r\n   * @name measureText\r\n   * @function\r\n   * @param text {String} The text to be measured\r\n   * @description The measureText() method returns an object that contains the width of the specified text, in pixels.\r\n   * @returns {Number}\r\n   */\r\n  Context2D.prototype.measureText = function(text) {\r\n    if (typeof text !== \"string\") {\r\n      console.error(\r\n        \"jsPDF.context2d.measureText: Invalid arguments\",\r\n        arguments\r\n      );\r\n      throw new Error(\r\n        \"Invalid arguments passed to jsPDF.context2d.measureText\"\r\n      );\r\n    }\r\n    var pdf = this.pdf;\r\n    var k = this.pdf.internal.scaleFactor;\r\n\r\n    var fontSize = pdf.internal.getFontSize();\r\n    var txtWidth =\r\n      (pdf.getStringUnitWidth(text) * fontSize) / pdf.internal.scaleFactor;\r\n    txtWidth *= Math.round(((k * 96) / 72) * 10000) / 10000;\r\n\r\n    var TextMetrics = function(options) {\r\n      options = options || {};\r\n      var _width = options.width || 0;\r\n      Object.defineProperty(this, \"width\", {\r\n        get: function() {\r\n          return _width;\r\n        }\r\n      });\r\n      return this;\r\n    };\r\n    return new TextMetrics({ width: txtWidth });\r\n  };\r\n\r\n  //Transformations\r\n\r\n  /**\r\n   * Scales the current drawing bigger or smaller\r\n   *\r\n   * @name scale\r\n   * @function\r\n   * @param scalewidth {Number} Scales the width of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @param scaleheight {Number} Scales the height of the current drawing (1=100%, 0.5=50%, 2=200%, etc.)\r\n   * @description The scale() method scales the current drawing, bigger or smaller.\r\n   */\r\n  Context2D.prototype.scale = function(scalewidth, scaleheight) {\r\n    if (isNaN(scalewidth) || isNaN(scaleheight)) {\r\n      console.error(\"jsPDF.context2d.scale: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.scale\");\r\n    }\r\n    var matrix = new Matrix(scalewidth, 0.0, 0.0, scaleheight, 0.0, 0.0);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Rotates the current drawing\r\n   *\r\n   * @name rotate\r\n   * @function\r\n   * @param angle {Number} The rotation angle, in radians.\r\n   * @description To calculate from degrees to radians: degrees*Math.PI/180. <br />\r\n   * Example: to rotate 5 degrees, specify the following: 5*Math.PI/180\r\n   */\r\n  Context2D.prototype.rotate = function(angle) {\r\n    if (isNaN(angle)) {\r\n      console.error(\"jsPDF.context2d.rotate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.rotate\");\r\n    }\r\n    var matrix = new Matrix(\r\n      Math.cos(angle),\r\n      Math.sin(angle),\r\n      -Math.sin(angle),\r\n      Math.cos(angle),\r\n      0.0,\r\n      0.0\r\n    );\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Remaps the (0,0) position on the canvas\r\n   *\r\n   * @name translate\r\n   * @function\r\n   * @param x {Number} The value to add to horizontal (x) coordinates\r\n   * @param y {Number} The value to add to vertical (y) coordinates\r\n   * @description The translate() method remaps the (0,0) position on the canvas.\r\n   */\r\n  Context2D.prototype.translate = function(x, y) {\r\n    if (isNaN(x) || isNaN(y)) {\r\n      console.error(\"jsPDF.context2d.translate: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.translate\");\r\n    }\r\n    var matrix = new Matrix(1.0, 0.0, 0.0, 1.0, x, y);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Replaces the current transformation matrix for the drawing\r\n   *\r\n   * @name transform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix.<br /><br />The transform() method replaces the current transformation matrix. It multiplies the current transformation matrix with the matrix described by:<br /><br /><br /><br />a    c    e<br /><br />b    d    f<br /><br />0    0    1<br /><br />In other words, the transform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.transform = function(a, b, c, d, e, f) {\r\n    if (isNaN(a) || isNaN(b) || isNaN(c) || isNaN(d) || isNaN(e) || isNaN(f)) {\r\n      console.error(\"jsPDF.context2d.transform: Invalid arguments\", arguments);\r\n      throw new Error(\"Invalid arguments passed to jsPDF.context2d.transform\");\r\n    }\r\n    var matrix = new Matrix(a, b, c, d, e, f);\r\n    this.ctx.transform = this.ctx.transform.multiply(matrix);\r\n  };\r\n\r\n  /**\r\n   * Resets the current transform to the identity matrix. Then runs transform()\r\n   *\r\n   * @name setTransform\r\n   * @function\r\n   * @param a {Number} Horizontal scaling\r\n   * @param b {Number} Horizontal skewing\r\n   * @param c {Number} Vertical skewing\r\n   * @param d {Number} Vertical scaling\r\n   * @param e {Number} Horizontal moving\r\n   * @param f {Number} Vertical moving\r\n   * @description Each object on the canvas has a current transformation matrix. <br /><br />The setTransform() method resets the current transform to the identity matrix, and then runs transform() with the same arguments.<br /><br />In other words, the setTransform() method lets you scale, rotate, move, and skew the current context.\r\n   */\r\n  Context2D.prototype.setTransform = function(a, b, c, d, e, f) {\r\n    a = isNaN(a) ? 1 : a;\r\n    b = isNaN(b) ? 0 : b;\r\n    c = isNaN(c) ? 0 : c;\r\n    d = isNaN(d) ? 1 : d;\r\n    e = isNaN(e) ? 0 : e;\r\n    f = isNaN(f) ? 0 : f;\r\n    this.ctx.transform = new Matrix(a, b, c, d, e, f);\r\n  };\r\n\r\n  /**\r\n   * Should only be used if pageWrapYEnabled is true\r\n   *\r\n   * @name setPageByYPosition\r\n   * @function\r\n   * @private\r\n   * @ignore\r\n   * @returns One-based Page Number\r\n   */\r\n  var setPageByYPosition = function(y) {\r\n    if (this.pageWrapYEnabled) {\r\n      this.lastBreak = 0;\r\n      var manualBreaks = 0;\r\n      var autoBreaks = 0;\r\n      for (var i = 0; i < this.pageBreaks.length; i++) {\r\n        if (y >= this.pageBreaks[i]) {\r\n          manualBreaks++;\r\n          if (this.lastBreak === 0) {\r\n            autoBreaks++;\r\n          }\r\n          var spaceBetweenLastBreak = this.pageBreaks[i] - this.lastBreak;\r\n          this.lastBreak = this.pageBreaks[i];\r\n          var pagesSinceLastBreak = Math.floor(\r\n            spaceBetweenLastBreak / this.pageWrapY\r\n          );\r\n          autoBreaks += pagesSinceLastBreak;\r\n        }\r\n      }\r\n      if (this.lastBreak === 0) {\r\n        var pagesSinceLastBreak = Math.floor(y / this.pageWrapY) + 1;\r\n        autoBreaks += pagesSinceLastBreak;\r\n      }\r\n      return autoBreaks + manualBreaks;\r\n    } else {\r\n      return this.pdf.internal.getCurrentPageInfo().pageNumber;\r\n    }\r\n  };\r\n\r\n  var hasMargins = function() {\r\n    return (\r\n      this.margin[0] > 0 ||\r\n      this.margin[1] > 0 ||\r\n      this.margin[2] > 0 ||\r\n      this.margin[3] > 0\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Draws an image, canvas, or video onto the canvas\r\n   *\r\n   * @function\r\n   * @param img {} Specifies the image, canvas, or video element to use\r\n   * @param sx {Number} Optional. The x coordinate where to start clipping\r\n   * @param sy {Number} Optional. The y coordinate where to start clipping\r\n   * @param swidth {Number} Optional. The width of the clipped image\r\n   * @param sheight {Number} Optional. The height of the clipped image\r\n   * @param x {Number} The x coordinate where to place the image on the canvas\r\n   * @param y {Number} The y coordinate where to place the image on the canvas\r\n   * @param width {Number} Optional. The width of the image to use (stretch or reduce the image)\r\n   * @param height {Number} Optional. The height of the image to use (stretch or reduce the image)\r\n   */\r\n  Context2D.prototype.drawImage = function(\r\n    img,\r\n    sx,\r\n    sy,\r\n    swidth,\r\n    sheight,\r\n    x,\r\n    y,\r\n    width,\r\n    height\r\n  ) {\r\n    var imageProperties = this.pdf.getImageProperties(img);\r\n    var factorX = 1;\r\n    var factorY = 1;\r\n    var isClip;\r\n\r\n    var clipFactorX = 1;\r\n    var clipFactorY = 1;\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width !== \"undefined\") {\r\n      isClip = true;\r\n      clipFactorX = width / swidth;\r\n      clipFactorY = height / sheight;\r\n      factorX = ((imageProperties.width / swidth) * width) / swidth;\r\n      factorY = ((imageProperties.height / sheight) * height) / sheight;\r\n    }\r\n\r\n    //is sx and sy are set and x and y not, set x and y with values of sx and sy\r\n    if (typeof x === \"undefined\") {\r\n      x = sx;\r\n      y = sy;\r\n      sx = 0;\r\n      sy = 0;\r\n    }\r\n\r\n    if (typeof swidth !== \"undefined\" && typeof width === \"undefined\") {\r\n      width = swidth;\r\n      height = sheight;\r\n    }\r\n    if (typeof swidth === \"undefined\" && typeof width === \"undefined\") {\r\n      width = imageProperties.width;\r\n      height = imageProperties.height;\r\n    }\r\n\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var angle = rad2deg(decomposedTransformationMatrix.rotate.shx);\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n    var xRect = matrix.applyToRectangle(\r\n      new Rectangle(\r\n        x - sx * clipFactorX,\r\n        y - sy * clipFactorY,\r\n        swidth * factorX,\r\n        sheight * factorY\r\n      )\r\n    );\r\n    var pageArray = getPagesByPath.call(this, xRect);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var tmpRect = JSON.parse(JSON.stringify(xRect));\r\n        tmpRect = pathPositionRedo(\r\n          [tmpRect],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        const needsClipping = (i > min || i < max) && hasMargins.call(this);\r\n\r\n        if (needsClipping) {\r\n          this.pdf.saveGraphicsState();\r\n          this.pdf\r\n            .rect(\r\n              this.margin[3],\r\n              this.margin[0],\r\n              pageWidthMinusMargins,\r\n              pageHeightMinusMargins,\r\n              null\r\n            )\r\n            .clip()\r\n            .discardPath();\r\n        }\r\n        this.pdf.addImage(\r\n          img,\r\n          \"JPEG\",\r\n          tmpRect.x,\r\n          tmpRect.y,\r\n          tmpRect.w,\r\n          tmpRect.h,\r\n          null,\r\n          null,\r\n          angle\r\n        );\r\n        if (needsClipping) {\r\n          this.pdf.restoreGraphicsState();\r\n        }\r\n      }\r\n    } else {\r\n      this.pdf.addImage(\r\n        img,\r\n        \"JPEG\",\r\n        xRect.x,\r\n        xRect.y,\r\n        xRect.w,\r\n        xRect.h,\r\n        null,\r\n        null,\r\n        angle\r\n      );\r\n    }\r\n  };\r\n\r\n  var getPagesByPath = function(path, pageWrapX, pageWrapY) {\r\n    var result = [];\r\n    pageWrapX = pageWrapX || this.pdf.internal.pageSize.width;\r\n    pageWrapY =\r\n      pageWrapY ||\r\n      this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n    var yOffset = this.posY + this.ctx.prevPageLastElemOffset;\r\n\r\n    switch (path.type) {\r\n      default:\r\n      case \"mt\":\r\n      case \"lt\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        break;\r\n      case \"arc\":\r\n        result.push(\r\n          Math.floor((path.y + yOffset - path.radius) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor((path.y + yOffset + path.radius) / pageWrapY) + 1\r\n        );\r\n        break;\r\n      case \"qct\":\r\n        var rectOfQuadraticCurve = getQuadraticCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfQuadraticCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfQuadraticCurve.y + rectOfQuadraticCurve.h + yOffset) /\r\n              pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"bct\":\r\n        var rectOfBezierCurve = getBezierCurveBoundary(\r\n          this.ctx.lastPoint.x,\r\n          this.ctx.lastPoint.y,\r\n          path.x1,\r\n          path.y1,\r\n          path.x2,\r\n          path.y2,\r\n          path.x,\r\n          path.y\r\n        );\r\n        result.push(\r\n          Math.floor((rectOfBezierCurve.y + yOffset) / pageWrapY) + 1\r\n        );\r\n        result.push(\r\n          Math.floor(\r\n            (rectOfBezierCurve.y + rectOfBezierCurve.h + yOffset) / pageWrapY\r\n          ) + 1\r\n        );\r\n        break;\r\n      case \"rect\":\r\n        result.push(Math.floor((path.y + yOffset) / pageWrapY) + 1);\r\n        result.push(Math.floor((path.y + path.h + yOffset) / pageWrapY) + 1);\r\n    }\r\n\r\n    for (var i = 0; i < result.length; i += 1) {\r\n      while (this.pdf.internal.getNumberOfPages() < result[i]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    return result;\r\n  };\r\n\r\n  var addPage = function() {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var font = this.font;\r\n    var lineCap = this.lineCap;\r\n    var lineWidth = this.lineWidth;\r\n    var lineJoin = this.lineJoin;\r\n    this.pdf.addPage();\r\n    this.fillStyle = fillStyle;\r\n    this.strokeStyle = strokeStyle;\r\n    this.font = font;\r\n    this.lineCap = lineCap;\r\n    this.lineWidth = lineWidth;\r\n    this.lineJoin = lineJoin;\r\n  };\r\n\r\n  var pathPositionRedo = function(paths, x, y) {\r\n    for (var i = 0; i < paths.length; i++) {\r\n      switch (paths[i].type) {\r\n        case \"bct\":\r\n          paths[i].x2 += x;\r\n          paths[i].y2 += y;\r\n        case \"qct\":\r\n          paths[i].x1 += x;\r\n          paths[i].y1 += y;\r\n        case \"mt\":\r\n        case \"lt\":\r\n        case \"arc\":\r\n        default:\r\n          paths[i].x += x;\r\n          paths[i].y += y;\r\n      }\r\n    }\r\n    return paths;\r\n  };\r\n\r\n  var sortPages = function(pages) {\r\n    return pages.sort(function(a, b) {\r\n      return a - b;\r\n    });\r\n  };\r\n\r\n  var pathPreProcess = function(rule, isClip) {\r\n    var fillStyle = this.fillStyle;\r\n    var strokeStyle = this.strokeStyle;\r\n    var lineCap = this.lineCap;\r\n    var oldLineWidth = this.lineWidth;\r\n    var lineWidth = Math.abs(oldLineWidth * this.ctx.transform.scaleX);\r\n    var lineJoin = this.lineJoin;\r\n\r\n    var origPath = JSON.parse(JSON.stringify(this.path));\r\n    var xPath = JSON.parse(JSON.stringify(this.path));\r\n    var clipPath;\r\n    var tmpPath;\r\n    var pages = [];\r\n\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      if (typeof xPath[i].x !== \"undefined\") {\r\n        var page = getPagesByPath.call(this, xPath[i]);\r\n\r\n        for (var ii = 0; ii < page.length; ii += 1) {\r\n          if (pages.indexOf(page[ii]) === -1) {\r\n            pages.push(page[ii]);\r\n          }\r\n        }\r\n      }\r\n    }\r\n\r\n    for (var j = 0; j < pages.length; j++) {\r\n      while (this.pdf.internal.getNumberOfPages() < pages[j]) {\r\n        addPage.call(this);\r\n      }\r\n    }\r\n    sortPages(pages);\r\n\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var k = min; k < max + 1; k++) {\r\n        this.pdf.setPage(k);\r\n\r\n        this.fillStyle = fillStyle;\r\n        this.strokeStyle = strokeStyle;\r\n        this.lineCap = lineCap;\r\n        this.lineWidth = lineWidth;\r\n        this.lineJoin = lineJoin;\r\n\r\n        var pageWidthMinusMargins =\r\n          this.pdf.internal.pageSize.width - this.margin[3] - this.margin[1];\r\n        var topMargin = k === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          this.pdf.internal.pageSize.height - this.margin[0] - this.margin[2];\r\n        var previousPageHeightSum =\r\n          k === 1 ? 0 : firstPageHeight + (k - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n          );\r\n          drawPaths.call(this, rule, true);\r\n          this.path = tmpPaths;\r\n        }\r\n        tmpPath = JSON.parse(JSON.stringify(origPath));\r\n        this.path = pathPositionRedo(\r\n          tmpPath,\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        );\r\n        if (isClip === false || k === 0) {\r\n          const needsClipping = (k > min || k < max) && hasMargins.call(this);\r\n          if (needsClipping) {\r\n            this.pdf.saveGraphicsState();\r\n            this.pdf\r\n              .rect(\r\n                this.margin[3],\r\n                this.margin[0],\r\n                pageWidthMinusMargins,\r\n                pageHeightMinusMargins,\r\n                null\r\n              )\r\n              .clip()\r\n              .discardPath();\r\n          }\r\n          drawPaths.call(this, rule, isClip);\r\n          if (needsClipping) {\r\n            this.pdf.restoreGraphicsState();\r\n          }\r\n        }\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    } else {\r\n      this.lineWidth = lineWidth;\r\n      drawPaths.call(this, rule, isClip);\r\n      this.lineWidth = oldLineWidth;\r\n    }\r\n    this.path = origPath;\r\n  };\r\n\r\n  /**\r\n   * Processes the paths\r\n   *\r\n   * @function\r\n   * @param rule {String}\r\n   * @param isClip {Boolean}\r\n   * @private\r\n   * @ignore\r\n   */\r\n  var drawPaths = function(rule, isClip) {\r\n    if (rule === \"stroke\" && !isClip && isStrokeTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    if (rule !== \"stroke\" && !isClip && isFillTransparent.call(this)) {\r\n      return;\r\n    }\r\n\r\n    var moves = [];\r\n\r\n    //var alpha = (this.ctx.fillOpacity < 1) ? this.ctx.fillOpacity : this.ctx.globalAlpha;\r\n    var delta;\r\n    var xPath = this.path;\r\n    for (var i = 0; i < xPath.length; i++) {\r\n      var pt = xPath[i];\r\n\r\n      switch (pt.type) {\r\n        case \"begin\":\r\n          moves.push({\r\n            begin: true\r\n          });\r\n          break;\r\n\r\n        case \"close\":\r\n          moves.push({\r\n            close: true\r\n          });\r\n          break;\r\n\r\n        case \"mt\":\r\n          moves.push({\r\n            start: pt,\r\n            deltas: [],\r\n            abs: []\r\n          });\r\n          break;\r\n\r\n        case \"lt\":\r\n          var iii = moves.length;\r\n          if (xPath[i - 1] && !isNaN(xPath[i - 1].x)) {\r\n            delta = [pt.x - xPath[i - 1].x, pt.y - xPath[i - 1].y];\r\n            if (iii > 0) {\r\n              for (iii; iii >= 0; iii--) {\r\n                if (\r\n                  moves[iii - 1].close !== true &&\r\n                  moves[iii - 1].begin !== true\r\n                ) {\r\n                  moves[iii - 1].deltas.push(delta);\r\n                  moves[iii - 1].abs.push(pt);\r\n                  break;\r\n                }\r\n              }\r\n            }\r\n          }\r\n          break;\r\n\r\n        case \"bct\":\r\n          delta = [\r\n            pt.x1 - xPath[i - 1].x,\r\n            pt.y1 - xPath[i - 1].y,\r\n            pt.x2 - xPath[i - 1].x,\r\n            pt.y2 - xPath[i - 1].y,\r\n            pt.x - xPath[i - 1].x,\r\n            pt.y - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"qct\":\r\n          var x1 = xPath[i - 1].x + (2.0 / 3.0) * (pt.x1 - xPath[i - 1].x);\r\n          var y1 = xPath[i - 1].y + (2.0 / 3.0) * (pt.y1 - xPath[i - 1].y);\r\n          var x2 = pt.x + (2.0 / 3.0) * (pt.x1 - pt.x);\r\n          var y2 = pt.y + (2.0 / 3.0) * (pt.y1 - pt.y);\r\n          var x3 = pt.x;\r\n          var y3 = pt.y;\r\n          delta = [\r\n            x1 - xPath[i - 1].x,\r\n            y1 - xPath[i - 1].y,\r\n            x2 - xPath[i - 1].x,\r\n            y2 - xPath[i - 1].y,\r\n            x3 - xPath[i - 1].x,\r\n            y3 - xPath[i - 1].y\r\n          ];\r\n          moves[moves.length - 1].deltas.push(delta);\r\n          break;\r\n\r\n        case \"arc\":\r\n          moves.push({\r\n            deltas: [],\r\n            abs: [],\r\n            arc: true\r\n          });\r\n\r\n          if (Array.isArray(moves[moves.length - 1].abs)) {\r\n            moves[moves.length - 1].abs.push(pt);\r\n          }\r\n          break;\r\n      }\r\n    }\r\n    var style;\r\n    if (!isClip) {\r\n      if (rule === \"stroke\") {\r\n        style = \"stroke\";\r\n      } else {\r\n        style = \"fill\";\r\n      }\r\n    } else {\r\n      style = null;\r\n    }\r\n\r\n    var began = false;\r\n    for (var k = 0; k < moves.length; k++) {\r\n      if (moves[k].arc) {\r\n        var arcs = moves[k].abs;\r\n\r\n        for (var ii = 0; ii < arcs.length; ii++) {\r\n          var arc = arcs[ii];\r\n\r\n          if (arc.type === \"arc\") {\r\n            drawArc.call(\r\n              this,\r\n              arc.x,\r\n              arc.y,\r\n              arc.radius,\r\n              arc.startAngle,\r\n              arc.endAngle,\r\n              arc.counterclockwise,\r\n              undefined,\r\n              isClip,\r\n              !began\r\n            );\r\n          } else {\r\n            drawLine.call(this, arc.x, arc.y);\r\n          }\r\n          began = true;\r\n        }\r\n      } else if (moves[k].close === true) {\r\n        this.pdf.internal.out(\"h\");\r\n        began = false;\r\n      } else if (moves[k].begin !== true) {\r\n        var x = moves[k].start.x;\r\n        var y = moves[k].start.y;\r\n        drawLines.call(this, moves[k].deltas, x, y);\r\n        began = true;\r\n      }\r\n    }\r\n\r\n    if (style) {\r\n      putStyle.call(this, style);\r\n    }\r\n    if (isClip) {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var getBaseline = function(y) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    switch (this.ctx.textBaseline) {\r\n      case \"bottom\":\r\n        return y - descent;\r\n      case \"top\":\r\n        return y + height - descent;\r\n      case \"hanging\":\r\n        return y + height - 2 * descent;\r\n      case \"middle\":\r\n        return y + height / 2 - descent;\r\n      case \"ideographic\":\r\n        // TODO not implemented\r\n        return y;\r\n      case \"alphabetic\":\r\n      default:\r\n        return y;\r\n    }\r\n  };\r\n\r\n  var getTextBottom = function(yBaseLine) {\r\n    var height =\r\n      this.pdf.internal.getFontSize() / this.pdf.internal.scaleFactor;\r\n    var descent = height * (this.pdf.internal.getLineHeightFactor() - 1);\r\n    return yBaseLine + descent;\r\n  };\r\n\r\n  Context2D.prototype.createLinearGradient = function createLinearGradient() {\r\n    var canvasGradient = function canvasGradient() {};\r\n\r\n    canvasGradient.colorStops = [];\r\n    canvasGradient.addColorStop = function(offset, color) {\r\n      this.colorStops.push([offset, color]);\r\n    };\r\n\r\n    canvasGradient.getColor = function() {\r\n      if (this.colorStops.length === 0) {\r\n        return \"#000000\";\r\n      }\r\n\r\n      return this.colorStops[0][1];\r\n    };\r\n\r\n    canvasGradient.isCanvasGradient = true;\r\n    return canvasGradient;\r\n  };\r\n  Context2D.prototype.createPattern = function createPattern() {\r\n    return this.createLinearGradient();\r\n  };\r\n  Context2D.prototype.createRadialGradient = function createRadialGradient() {\r\n    return this.createLinearGradient();\r\n  };\r\n\r\n  /**\r\n   *\r\n   * @param x Edge point X\r\n   * @param y Edge point Y\r\n   * @param r Radius\r\n   * @param a1 start angle\r\n   * @param a2 end angle\r\n   * @param counterclockwise\r\n   * @param style\r\n   * @param isClip\r\n   */\r\n  var drawArc = function(\r\n    x,\r\n    y,\r\n    r,\r\n    a1,\r\n    a2,\r\n    counterclockwise,\r\n    style,\r\n    isClip,\r\n    includeMove\r\n  ) {\r\n    // http://hansmuller-flex.blogspot.com/2011/10/more-about-approximating-circular-arcs.html\r\n    var curves = createArc.call(this, r, a1, a2, counterclockwise);\r\n\r\n    for (var i = 0; i < curves.length; i++) {\r\n      var curve = curves[i];\r\n      if (i === 0) {\r\n        if (includeMove) {\r\n          doMove.call(this, curve.x1 + x, curve.y1 + y);\r\n        } else {\r\n          drawLine.call(this, curve.x1 + x, curve.y1 + y);\r\n        }\r\n      }\r\n      drawCurve.call(\r\n        this,\r\n        x,\r\n        y,\r\n        curve.x2,\r\n        curve.y2,\r\n        curve.x3,\r\n        curve.y3,\r\n        curve.x4,\r\n        curve.y4\r\n      );\r\n    }\r\n\r\n    if (!isClip) {\r\n      putStyle.call(this, style);\r\n    } else {\r\n      doClip.call(this);\r\n    }\r\n  };\r\n\r\n  var putStyle = function(style) {\r\n    switch (style) {\r\n      case \"stroke\":\r\n        this.pdf.internal.out(\"S\");\r\n        break;\r\n      case \"fill\":\r\n        this.pdf.internal.out(\"f\");\r\n        break;\r\n    }\r\n  };\r\n\r\n  var doClip = function() {\r\n    this.pdf.clip();\r\n    this.pdf.discardPath();\r\n  };\r\n\r\n  var doMove = function(x, y) {\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y) +\r\n        \" m\"\r\n    );\r\n  };\r\n\r\n  var putText = function(options) {\r\n    var textAlign;\r\n    switch (options.align) {\r\n      case \"right\":\r\n      case \"end\":\r\n        textAlign = \"right\";\r\n        break;\r\n      case \"center\":\r\n        textAlign = \"center\";\r\n        break;\r\n      case \"left\":\r\n      case \"start\":\r\n      default:\r\n        textAlign = \"left\";\r\n        break;\r\n    }\r\n\r\n    var textDimensions = this.pdf.getTextDimensions(options.text);\r\n    var yBaseLine = getBaseline.call(this, options.y);\r\n    var yBottom = getTextBottom.call(this, yBaseLine);\r\n    var yTop = yBottom - textDimensions.h;\r\n\r\n    var pt = this.ctx.transform.applyToPoint(new Point(options.x, yBaseLine));\r\n    var decomposedTransformationMatrix = this.ctx.transform.decompose();\r\n    var matrix = new Matrix();\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.translate);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.skew);\r\n    matrix = matrix.multiply(decomposedTransformationMatrix.scale);\r\n\r\n    var baselineRect = this.ctx.transform.applyToRectangle(\r\n      new Rectangle(options.x, yBaseLine, textDimensions.w, textDimensions.h)\r\n    );\r\n    var textBounds = matrix.applyToRectangle(\r\n      new Rectangle(options.x, yTop, textDimensions.w, textDimensions.h)\r\n    );\r\n    var pageArray = getPagesByPath.call(this, textBounds);\r\n    var pages = [];\r\n    for (var ii = 0; ii < pageArray.length; ii += 1) {\r\n      if (pages.indexOf(pageArray[ii]) === -1) {\r\n        pages.push(pageArray[ii]);\r\n      }\r\n    }\r\n\r\n    sortPages(pages);\r\n\r\n    var clipPath, oldSize, oldLineWidth;\r\n    if (this.autoPaging) {\r\n      var min = pages[0];\r\n      var max = pages[pages.length - 1];\r\n      for (var i = min; i < max + 1; i++) {\r\n        this.pdf.setPage(i);\r\n\r\n        var topMargin = i === 1 ? this.posY + this.margin[0] : this.margin[0];\r\n        var firstPageHeight =\r\n          this.pdf.internal.pageSize.height -\r\n          this.posY -\r\n          this.margin[0] -\r\n          this.margin[2];\r\n        var pageHeightMinusBottomMargin =\r\n          this.pdf.internal.pageSize.height - this.margin[2];\r\n        var pageHeightMinusMargins =\r\n          pageHeightMinusBottomMargin - this.margin[0];\r\n        var pageWidthMinusRightMargin =\r\n          this.pdf.internal.pageSize.width - this.margin[1];\r\n        var pageWidthMinusMargins = pageWidthMinusRightMargin - this.margin[3];\r\n        var previousPageHeightSum =\r\n          i === 1 ? 0 : firstPageHeight + (i - 2) * pageHeightMinusMargins;\r\n\r\n        if (this.ctx.clip_path.length !== 0) {\r\n          var tmpPaths = this.path;\r\n          clipPath = JSON.parse(JSON.stringify(this.ctx.clip_path));\r\n          this.path = pathPositionRedo(\r\n            clipPath,\r\n            this.posX + this.margin[3],\r\n            -1 * previousPageHeightSum + topMargin\r\n          );\r\n          drawPaths.call(this, \"fill\", true);\r\n          this.path = tmpPaths;\r\n        }\r\n        var textBoundsOnPage = pathPositionRedo(\r\n          [JSON.parse(JSON.stringify(textBounds))],\r\n          this.posX + this.margin[3],\r\n          -previousPageHeightSum + topMargin + this.ctx.prevPageLastElemOffset\r\n        )[0];\r\n\r\n        if (options.scale >= 0.01) {\r\n          oldSize = this.pdf.internal.getFontSize();\r\n          this.pdf.setFontSize(oldSize * options.scale);\r\n          oldLineWidth = this.lineWidth;\r\n          this.lineWidth = oldLineWidth * options.scale;\r\n        }\r\n\r\n        var doSlice = this.autoPaging !== \"text\";\r\n\r\n        if (\r\n          doSlice ||\r\n          textBoundsOnPage.y + textBoundsOnPage.h <= pageHeightMinusBottomMargin\r\n        ) {\r\n          if (\r\n            doSlice ||\r\n            (textBoundsOnPage.y >= topMargin &&\r\n              textBoundsOnPage.x <= pageWidthMinusRightMargin)\r\n          ) {\r\n            var croppedText = doSlice\r\n              ? options.text\r\n              : this.pdf.splitTextToSize(\r\n                  options.text,\r\n                  options.maxWidth ||\r\n                    pageWidthMinusRightMargin - textBoundsOnPage.x\r\n                )[0];\r\n            var baseLineRectOnPage = pathPositionRedo(\r\n              [JSON.parse(JSON.stringify(baselineRect))],\r\n              this.posX + this.margin[3],\r\n              -previousPageHeightSum +\r\n                topMargin +\r\n                this.ctx.prevPageLastElemOffset\r\n            )[0];\r\n\r\n            const needsClipping =\r\n              doSlice && (i > min || i < max) && hasMargins.call(this);\r\n\r\n            if (needsClipping) {\r\n              this.pdf.saveGraphicsState();\r\n              this.pdf\r\n                .rect(\r\n                  this.margin[3],\r\n                  this.margin[0],\r\n                  pageWidthMinusMargins,\r\n                  pageHeightMinusMargins,\r\n                  null\r\n                )\r\n                .clip()\r\n                .discardPath();\r\n            }\r\n\r\n            this.pdf.text(\r\n              croppedText,\r\n              baseLineRectOnPage.x,\r\n              baseLineRectOnPage.y,\r\n              {\r\n                angle: options.angle,\r\n                align: textAlign,\r\n                renderingMode: options.renderingMode\r\n              }\r\n            );\r\n\r\n            if (needsClipping) {\r\n              this.pdf.restoreGraphicsState();\r\n            }\r\n          }\r\n        } else {\r\n          // This text is the last element of the page, but it got cut off due to the margin\r\n          // so we render it in the next page\r\n\r\n          if (textBoundsOnPage.y < pageHeightMinusBottomMargin) {\r\n            // As a result, all other elements have their y offset increased\r\n            this.ctx.prevPageLastElemOffset +=\r\n              pageHeightMinusBottomMargin - textBoundsOnPage.y;\r\n          }\r\n        }\r\n\r\n        if (options.scale >= 0.01) {\r\n          this.pdf.setFontSize(oldSize);\r\n          this.lineWidth = oldLineWidth;\r\n        }\r\n      }\r\n    } else {\r\n      if (options.scale >= 0.01) {\r\n        oldSize = this.pdf.internal.getFontSize();\r\n        this.pdf.setFontSize(oldSize * options.scale);\r\n        oldLineWidth = this.lineWidth;\r\n        this.lineWidth = oldLineWidth * options.scale;\r\n      }\r\n      this.pdf.text(options.text, pt.x + this.posX, pt.y + this.posY, {\r\n        angle: options.angle,\r\n        align: textAlign,\r\n        renderingMode: options.renderingMode,\r\n        maxWidth: options.maxWidth\r\n      });\r\n\r\n      if (options.scale >= 0.01) {\r\n        this.pdf.setFontSize(oldSize);\r\n        this.lineWidth = oldLineWidth;\r\n      }\r\n    }\r\n  };\r\n\r\n  var drawLine = function(x, y, prevX, prevY) {\r\n    prevX = prevX || 0;\r\n    prevY = prevY || 0;\r\n\r\n    this.pdf.internal.out(\r\n      getHorizontalCoordinateString(x + prevX) +\r\n        \" \" +\r\n        getVerticalCoordinateString(y + prevY) +\r\n        \" l\"\r\n    );\r\n  };\r\n\r\n  var drawLines = function(lines, x, y) {\r\n    return this.pdf.lines(lines, x, y, null, null);\r\n  };\r\n\r\n  var drawCurve = function(x, y, x1, y1, x2, y2, x3, y3) {\r\n    this.pdf.internal.out(\r\n      [\r\n        f2(getHorizontalCoordinate(x1 + x)),\r\n        f2(getVerticalCoordinate(y1 + y)),\r\n        f2(getHorizontalCoordinate(x2 + x)),\r\n        f2(getVerticalCoordinate(y2 + y)),\r\n        f2(getHorizontalCoordinate(x3 + x)),\r\n        f2(getVerticalCoordinate(y3 + y)),\r\n        \"c\"\r\n      ].join(\" \")\r\n    );\r\n  };\r\n\r\n  /**\r\n   * Return a array of objects that represent bezier curves which approximate the circular arc centered at the origin, from startAngle to endAngle (radians) with the specified radius.\r\n   *\r\n   * Each bezier curve is an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   * @function createArc\r\n   */\r\n  var createArc = function(radius, startAngle, endAngle, anticlockwise) {\r\n    var EPSILON = 0.00001; // Roughly 1/1000th of a degree, see below\r\n    var twoPi = Math.PI * 2;\r\n    var halfPi = Math.PI / 2.0;\r\n\r\n    while (startAngle > endAngle) {\r\n      startAngle = startAngle - twoPi;\r\n    }\r\n    var totalAngle = Math.abs(endAngle - startAngle);\r\n    if (totalAngle < twoPi) {\r\n      if (anticlockwise) {\r\n        totalAngle = twoPi - totalAngle;\r\n      }\r\n    }\r\n\r\n    // Compute the sequence of arc curves, up to PI/2 at a time.\r\n    var curves = [];\r\n\r\n    // clockwise or counterclockwise\r\n    var sgn = anticlockwise ? -1 : +1;\r\n\r\n    var a1 = startAngle;\r\n    for (; totalAngle > EPSILON; ) {\r\n      var remain = sgn * Math.min(totalAngle, halfPi);\r\n      var a2 = a1 + remain;\r\n      curves.push(createSmallArc.call(this, radius, a1, a2));\r\n      totalAngle -= Math.abs(a2 - a1);\r\n      a1 = a2;\r\n    }\r\n\r\n    return curves;\r\n  };\r\n\r\n  /**\r\n   * Cubic bezier approximation of a circular arc centered at the origin, from (radians) a1 to a2, where a2-a1 < pi/2. The arc's radius is r.\r\n   *\r\n   * Returns an object with four points, where x1,y1 and x4,y4 are the arc's end points and x2,y2 and x3,y3 are the cubic bezier's control points.\r\n   *\r\n   * This algorithm is based on the approach described in: A. Riškus, \"Approximation of a Cubic Bezier Curve by Circular Arcs and Vice Versa,\" Information Technology and Control, 35(4), 2006 pp. 371-378.\r\n   */\r\n  var createSmallArc = function(r, a1, a2) {\r\n    var a = (a2 - a1) / 2.0;\r\n\r\n    var x4 = r * Math.cos(a);\r\n    var y4 = r * Math.sin(a);\r\n    var x1 = x4;\r\n    var y1 = -y4;\r\n\r\n    var q1 = x1 * x1 + y1 * y1;\r\n    var q2 = q1 + x1 * x4 + y1 * y4;\r\n    var k2 = ((4 / 3) * (Math.sqrt(2 * q1 * q2) - q2)) / (x1 * y4 - y1 * x4);\r\n\r\n    var x2 = x1 - k2 * y1;\r\n    var y2 = y1 + k2 * x1;\r\n    var x3 = x2;\r\n    var y3 = -y2;\r\n\r\n    var ar = a + a1;\r\n    var cos_ar = Math.cos(ar);\r\n    var sin_ar = Math.sin(ar);\r\n\r\n    return {\r\n      x1: r * Math.cos(a1),\r\n      y1: r * Math.sin(a1),\r\n      x2: x2 * cos_ar - y2 * sin_ar,\r\n      y2: x2 * sin_ar + y2 * cos_ar,\r\n      x3: x3 * cos_ar - y3 * sin_ar,\r\n      y3: x3 * sin_ar + y3 * cos_ar,\r\n      x4: r * Math.cos(a2),\r\n      y4: r * Math.sin(a2)\r\n    };\r\n  };\r\n\r\n  var rad2deg = function(value) {\r\n    return (value * 180) / Math.PI;\r\n  };\r\n\r\n  var getQuadraticCurveBoundary = function(sx, sy, cpx, cpy, ex, ey) {\r\n    var midX1 = sx + (cpx - sx) * 0.5;\r\n    var midY1 = sy + (cpy - sy) * 0.5;\r\n    var midX2 = ex + (cpx - ex) * 0.5;\r\n    var midY2 = ey + (cpy - ey) * 0.5;\r\n    var resultX1 = Math.min(sx, ex, midX1, midX2);\r\n    var resultX2 = Math.max(sx, ex, midX1, midX2);\r\n    var resultY1 = Math.min(sy, ey, midY1, midY2);\r\n    var resultY2 = Math.max(sy, ey, midY1, midY2);\r\n    return new Rectangle(\r\n      resultX1,\r\n      resultY1,\r\n      resultX2 - resultX1,\r\n      resultY2 - resultY1\r\n    );\r\n  };\r\n\r\n  //De Casteljau algorithm\r\n  var getBezierCurveBoundary = function(ax, ay, bx, by, cx, cy, dx, dy) {\r\n    var tobx = bx - ax;\r\n    var toby = by - ay;\r\n    var tocx = cx - bx;\r\n    var tocy = cy - by;\r\n    var todx = dx - cx;\r\n    var tody = dy - cy;\r\n    var precision = 40;\r\n    var d,\r\n      i,\r\n      px,\r\n      py,\r\n      qx,\r\n      qy,\r\n      rx,\r\n      ry,\r\n      tx,\r\n      ty,\r\n      sx,\r\n      sy,\r\n      x,\r\n      y,\r\n      minx,\r\n      miny,\r\n      maxx,\r\n      maxy,\r\n      toqx,\r\n      toqy,\r\n      torx,\r\n      tory,\r\n      totx,\r\n      toty;\r\n    for (i = 0; i < precision + 1; i++) {\r\n      d = i / precision;\r\n      px = ax + d * tobx;\r\n      py = ay + d * toby;\r\n      qx = bx + d * tocx;\r\n      qy = by + d * tocy;\r\n      rx = cx + d * todx;\r\n      ry = cy + d * tody;\r\n      toqx = qx - px;\r\n      toqy = qy - py;\r\n      torx = rx - qx;\r\n      tory = ry - qy;\r\n\r\n      sx = px + d * toqx;\r\n      sy = py + d * toqy;\r\n      tx = qx + d * torx;\r\n      ty = qy + d * tory;\r\n      totx = tx - sx;\r\n      toty = ty - sy;\r\n\r\n      x = sx + d * totx;\r\n      y = sy + d * toty;\r\n      if (i == 0) {\r\n        minx = x;\r\n        miny = y;\r\n        maxx = x;\r\n        maxy = y;\r\n      } else {\r\n        minx = Math.min(minx, x);\r\n        miny = Math.min(miny, y);\r\n        maxx = Math.max(maxx, x);\r\n        maxy = Math.max(maxy, y);\r\n      }\r\n    }\r\n    return new Rectangle(\r\n      Math.round(minx),\r\n      Math.round(miny),\r\n      Math.round(maxx - minx),\r\n      Math.round(maxy - miny)\r\n    );\r\n  };\r\n\r\n  var getPrevLineDashValue = function(lineDash, lineDashOffset) {\r\n    return JSON.stringify({\r\n      lineDash: lineDash,\r\n      lineDashOffset: lineDashOffset\r\n    });\r\n  };\r\n\r\n  var setLineDash = function() {\r\n    // Avoid unnecessary line dash declarations.\r\n    if (\r\n      !this.prevLineDash &&\r\n      !this.ctx.lineDash.length &&\r\n      !this.ctx.lineDashOffset\r\n    ) {\r\n      return;\r\n    }\r\n\r\n    // Avoid unnecessary line dash declarations.\r\n    const nextLineDash = getPrevLineDashValue(\r\n      this.ctx.lineDash,\r\n      this.ctx.lineDashOffset\r\n    );\r\n    if (this.prevLineDash !== nextLineDash) {\r\n      this.pdf.setLineDash(this.ctx.lineDash, this.ctx.lineDashOffset);\r\n      this.prevLineDash = nextLineDash;\r\n    }\r\n  };\r\n})(jsPDF.API);\r\n","// DEFLATE is a complex format; to read this code, you should probably check the RFC first:\n// https://tools.ietf.org/html/rfc1951\n// You may also wish to take a look at the guide I made about this program:\n// https://gist.github.com/101arrowz/253f31eb5abc3d9275ab943003ffecad\n// Some of the following code is similar to that of UZIP.js:\n// https://github.com/photopea/UZIP.js\n// However, the vast majority of the codebase has diverged from UZIP.js to increase performance and reduce bundle size.\n// Sometimes 0 will appear where -1 would be more appropriate. This is because using a uint\n// is better for memory in most engines (I *think*).\nvar ch2 = {};\nvar wk = (function (c, id, msg, transfer, cb) {\n    var w = new Worker(ch2[id] || (ch2[id] = URL.createObjectURL(new Blob([\n        c + ';addEventListener(\"error\",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'\n    ], { type: 'text/javascript' }))));\n    w.onmessage = function (e) {\n        var d = e.data, ed = d.$e$;\n        if (ed) {\n            var err = new Error(ed[0]);\n            err['code'] = ed[1];\n            err.stack = ed[2];\n            cb(err, null);\n        }\n        else\n            cb(null, d);\n    };\n    w.postMessage(msg, transfer);\n    return w;\n});\n\n// aliases for shorter compressed code (most minifers don't do this)\nvar u8 = Uint8Array, u16 = Uint16Array, i32 = Int32Array;\n// fixed length extra bits\nvar fleb = new u8([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, /* unused */ 0, 0, /* impossible */ 0]);\n// fixed distance extra bits\nvar fdeb = new u8([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, /* unused */ 0, 0]);\n// code length index map\nvar clim = new u8([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]);\n// get base, reverse index map from extra bits\nvar freb = function (eb, start) {\n    var b = new u16(31);\n    for (var i = 0; i < 31; ++i) {\n        b[i] = start += 1 << eb[i - 1];\n    }\n    // numbers here are at max 18 bits\n    var r = new i32(b[30]);\n    for (var i = 1; i < 30; ++i) {\n        for (var j = b[i]; j < b[i + 1]; ++j) {\n            r[j] = ((j - b[i]) << 5) | i;\n        }\n    }\n    return { b: b, r: r };\n};\nvar _a = freb(fleb, 2), fl = _a.b, revfl = _a.r;\n// we can ignore the fact that the other numbers are wrong; they never happen anyway\nfl[28] = 258, revfl[258] = 28;\nvar _b = freb(fdeb, 0), fd = _b.b, revfd = _b.r;\n// map of value to reverse (assuming 16 bits)\nvar rev = new u16(32768);\nfor (var i = 0; i < 32768; ++i) {\n    // reverse table algorithm from SO\n    var x = ((i & 0xAAAA) >> 1) | ((i & 0x5555) << 1);\n    x = ((x & 0xCCCC) >> 2) | ((x & 0x3333) << 2);\n    x = ((x & 0xF0F0) >> 4) | ((x & 0x0F0F) << 4);\n    rev[i] = (((x & 0xFF00) >> 8) | ((x & 0x00FF) << 8)) >> 1;\n}\n// create huffman tree from u8 \"map\": index -> code length for code index\n// mb (max bits) must be at most 15\n// TODO: optimize/split up?\nvar hMap = (function (cd, mb, r) {\n    var s = cd.length;\n    // index\n    var i = 0;\n    // u16 \"map\": index -> # of codes with bit length = index\n    var l = new u16(mb);\n    // length of cd must be 288 (total # of codes)\n    for (; i < s; ++i) {\n        if (cd[i])\n            ++l[cd[i] - 1];\n    }\n    // u16 \"map\": index -> minimum code for bit length = index\n    var le = new u16(mb);\n    for (i = 1; i < mb; ++i) {\n        le[i] = (le[i - 1] + l[i - 1]) << 1;\n    }\n    var co;\n    if (r) {\n        // u16 \"map\": index -> number of actual bits, symbol for code\n        co = new u16(1 << mb);\n        // bits to remove for reverser\n        var rvb = 15 - mb;\n        for (i = 0; i < s; ++i) {\n            // ignore 0 lengths\n            if (cd[i]) {\n                // num encoding both symbol and bits read\n                var sv = (i << 4) | cd[i];\n                // free bits\n                var r_1 = mb - cd[i];\n                // start value\n                var v = le[cd[i] - 1]++ << r_1;\n                // m is end value\n                for (var m = v | ((1 << r_1) - 1); v <= m; ++v) {\n                    // every 16 bit value starting with the code yields the same result\n                    co[rev[v] >> rvb] = sv;\n                }\n            }\n        }\n    }\n    else {\n        co = new u16(s);\n        for (i = 0; i < s; ++i) {\n            if (cd[i]) {\n                co[i] = rev[le[cd[i] - 1]++] >> (15 - cd[i]);\n            }\n        }\n    }\n    return co;\n});\n// fixed length tree\nvar flt = new u8(288);\nfor (var i = 0; i < 144; ++i)\n    flt[i] = 8;\nfor (var i = 144; i < 256; ++i)\n    flt[i] = 9;\nfor (var i = 256; i < 280; ++i)\n    flt[i] = 7;\nfor (var i = 280; i < 288; ++i)\n    flt[i] = 8;\n// fixed distance tree\nvar fdt = new u8(32);\nfor (var i = 0; i < 32; ++i)\n    fdt[i] = 5;\n// fixed length map\nvar flm = /*#__PURE__*/ hMap(flt, 9, 0), flrm = /*#__PURE__*/ hMap(flt, 9, 1);\n// fixed distance map\nvar fdm = /*#__PURE__*/ hMap(fdt, 5, 0), fdrm = /*#__PURE__*/ hMap(fdt, 5, 1);\n// find max of array\nvar max = function (a) {\n    var m = a[0];\n    for (var i = 1; i < a.length; ++i) {\n        if (a[i] > m)\n            m = a[i];\n    }\n    return m;\n};\n// read d, starting at bit p and mask with m\nvar bits = function (d, p, m) {\n    var o = (p / 8) | 0;\n    return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m;\n};\n// read d, starting at bit p continuing for at least 16 bits\nvar bits16 = function (d, p) {\n    var o = (p / 8) | 0;\n    return ((d[o] | (d[o + 1] << 8) | (d[o + 2] << 16)) >> (p & 7));\n};\n// get end of byte\nvar shft = function (p) { return ((p + 7) / 8) | 0; };\n// typed array slice - allows garbage collector to free original reference,\n// while being more compatible than .slice\nvar slc = function (v, s, e) {\n    if (s == null || s < 0)\n        s = 0;\n    if (e == null || e > v.length)\n        e = v.length;\n    // can't use .constructor in case user-supplied\n    return new u8(v.subarray(s, e));\n};\n/**\n * Codes for errors generated within this library\n */\nexport var FlateErrorCode = {\n    UnexpectedEOF: 0,\n    InvalidBlockType: 1,\n    InvalidLengthLiteral: 2,\n    InvalidDistance: 3,\n    StreamFinished: 4,\n    NoStreamHandler: 5,\n    InvalidHeader: 6,\n    NoCallback: 7,\n    InvalidUTF8: 8,\n    ExtraFieldTooLong: 9,\n    InvalidDate: 10,\n    FilenameTooLong: 11,\n    StreamFinishing: 12,\n    InvalidZipData: 13,\n    UnknownCompressionMethod: 14\n};\n// error codes\nvar ec = [\n    'unexpected EOF',\n    'invalid block type',\n    'invalid length/literal',\n    'invalid distance',\n    'stream finished',\n    'no stream handler',\n    ,\n    'no callback',\n    'invalid UTF-8 data',\n    'extra field too long',\n    'date not in range 1980-2099',\n    'filename too long',\n    'stream finishing',\n    'invalid zip data'\n    // determined by unknown compression method\n];\n;\nvar err = function (ind, msg, nt) {\n    var e = new Error(msg || ec[ind]);\n    e.code = ind;\n    if (Error.captureStackTrace)\n        Error.captureStackTrace(e, err);\n    if (!nt)\n        throw e;\n    return e;\n};\n// expands raw DEFLATE data\nvar inflt = function (dat, st, buf, dict) {\n    // source length       dict length\n    var sl = dat.length, dl = dict ? dict.length : 0;\n    if (!sl || st.f && !st.l)\n        return buf || new u8(0);\n    var noBuf = !buf;\n    // have to estimate size\n    var resize = noBuf || st.i != 2;\n    // no state\n    var noSt = st.i;\n    // Assumes roughly 33% compression ratio average\n    if (noBuf)\n        buf = new u8(sl * 3);\n    // ensure buffer can fit at least l elements\n    var cbuf = function (l) {\n        var bl = buf.length;\n        // need to increase size to fit\n        if (l > bl) {\n            // Double or set to necessary, whichever is greater\n            var nbuf = new u8(Math.max(bl * 2, l));\n            nbuf.set(buf);\n            buf = nbuf;\n        }\n    };\n    //  last chunk         bitpos           bytes\n    var final = st.f || 0, pos = st.p || 0, bt = st.b || 0, lm = st.l, dm = st.d, lbt = st.m, dbt = st.n;\n    // total bits\n    var tbts = sl * 8;\n    do {\n        if (!lm) {\n            // BFINAL - this is only 1 when last chunk is next\n            final = bits(dat, pos, 1);\n            // type: 0 = no compression, 1 = fixed huffman, 2 = dynamic huffman\n            var type = bits(dat, pos + 1, 3);\n            pos += 3;\n            if (!type) {\n                // go to end of byte boundary\n                var s = shft(pos) + 4, l = dat[s - 4] | (dat[s - 3] << 8), t = s + l;\n                if (t > sl) {\n                    if (noSt)\n                        err(0);\n                    break;\n                }\n                // ensure size\n                if (resize)\n                    cbuf(bt + l);\n                // Copy over uncompressed data\n                buf.set(dat.subarray(s, t), bt);\n                // Get new bitpos, update byte count\n                st.b = bt += l, st.p = pos = t * 8, st.f = final;\n                continue;\n            }\n            else if (type == 1)\n                lm = flrm, dm = fdrm, lbt = 9, dbt = 5;\n            else if (type == 2) {\n                //  literal                            lengths\n                var hLit = bits(dat, pos, 31) + 257, hcLen = bits(dat, pos + 10, 15) + 4;\n                var tl = hLit + bits(dat, pos + 5, 31) + 1;\n                pos += 14;\n                // length+distance tree\n                var ldt = new u8(tl);\n                // code length tree\n                var clt = new u8(19);\n                for (var i = 0; i < hcLen; ++i) {\n                    // use index map to get real code\n                    clt[clim[i]] = bits(dat, pos + i * 3, 7);\n                }\n                pos += hcLen * 3;\n                // code lengths bits\n                var clb = max(clt), clbmsk = (1 << clb) - 1;\n                // code lengths map\n                var clm = hMap(clt, clb, 1);\n                for (var i = 0; i < tl;) {\n                    var r = clm[bits(dat, pos, clbmsk)];\n                    // bits read\n                    pos += r & 15;\n                    // symbol\n                    var s = r >> 4;\n                    // code length to copy\n                    if (s < 16) {\n                        ldt[i++] = s;\n                    }\n                    else {\n                        //  copy   count\n                        var c = 0, n = 0;\n                        if (s == 16)\n                            n = 3 + bits(dat, pos, 3), pos += 2, c = ldt[i - 1];\n                        else if (s == 17)\n                            n = 3 + bits(dat, pos, 7), pos += 3;\n                        else if (s == 18)\n                            n = 11 + bits(dat, pos, 127), pos += 7;\n                        while (n--)\n                            ldt[i++] = c;\n                    }\n                }\n                //    length tree                 distance tree\n                var lt = ldt.subarray(0, hLit), dt = ldt.subarray(hLit);\n                // max length bits\n                lbt = max(lt);\n                // max dist bits\n                dbt = max(dt);\n                lm = hMap(lt, lbt, 1);\n                dm = hMap(dt, dbt, 1);\n            }\n            else\n                err(1);\n            if (pos > tbts) {\n                if (noSt)\n                    err(0);\n                break;\n            }\n        }\n        // Make sure the buffer can hold this + the largest possible addition\n        // Maximum chunk size (practically, theoretically infinite) is 2^17\n        if (resize)\n            cbuf(bt + 131072);\n        var lms = (1 << lbt) - 1, dms = (1 << dbt) - 1;\n        var lpos = pos;\n        for (;; lpos = pos) {\n            // bits read, code\n            var c = lm[bits16(dat, pos) & lms], sym = c >> 4;\n            pos += c & 15;\n            if (pos > tbts) {\n                if (noSt)\n                    err(0);\n                break;\n            }\n            if (!c)\n                err(2);\n            if (sym < 256)\n                buf[bt++] = sym;\n            else if (sym == 256) {\n                lpos = pos, lm = null;\n                break;\n            }\n            else {\n                var add = sym - 254;\n                // no extra bits needed if less\n                if (sym > 264) {\n                    // index\n                    var i = sym - 257, b = fleb[i];\n                    add = bits(dat, pos, (1 << b) - 1) + fl[i];\n                    pos += b;\n                }\n                // dist\n                var d = dm[bits16(dat, pos) & dms], dsym = d >> 4;\n                if (!d)\n                    err(3);\n                pos += d & 15;\n                var dt = fd[dsym];\n                if (dsym > 3) {\n                    var b = fdeb[dsym];\n                    dt += bits16(dat, pos) & (1 << b) - 1, pos += b;\n                }\n                if (pos > tbts) {\n                    if (noSt)\n                        err(0);\n                    break;\n                }\n                if (resize)\n                    cbuf(bt + 131072);\n                var end = bt + add;\n                if (bt < dt) {\n                    var shift = dl - dt, dend = Math.min(dt, end);\n                    if (shift + bt < 0)\n                        err(3);\n                    for (; bt < dend; ++bt)\n                        buf[bt] = dict[shift + bt];\n                }\n                for (; bt < end; ++bt)\n                    buf[bt] = buf[bt - dt];\n            }\n        }\n        st.l = lm, st.p = lpos, st.b = bt, st.f = final;\n        if (lm)\n            final = 1, st.m = lbt, st.d = dm, st.n = dbt;\n    } while (!final);\n    // don't reallocate for streams or user buffers\n    return bt != buf.length && noBuf ? slc(buf, 0, bt) : buf.subarray(0, bt);\n};\n// starting at p, write the minimum number of bits that can hold v to d\nvar wbits = function (d, p, v) {\n    v <<= p & 7;\n    var o = (p / 8) | 0;\n    d[o] |= v;\n    d[o + 1] |= v >> 8;\n};\n// starting at p, write the minimum number of bits (>8) that can hold v to d\nvar wbits16 = function (d, p, v) {\n    v <<= p & 7;\n    var o = (p / 8) | 0;\n    d[o] |= v;\n    d[o + 1] |= v >> 8;\n    d[o + 2] |= v >> 16;\n};\n// creates code lengths from a frequency table\nvar hTree = function (d, mb) {\n    // Need extra info to make a tree\n    var t = [];\n    for (var i = 0; i < d.length; ++i) {\n        if (d[i])\n            t.push({ s: i, f: d[i] });\n    }\n    var s = t.length;\n    var t2 = t.slice();\n    if (!s)\n        return { t: et, l: 0 };\n    if (s == 1) {\n        var v = new u8(t[0].s + 1);\n        v[t[0].s] = 1;\n        return { t: v, l: 1 };\n    }\n    t.sort(function (a, b) { return a.f - b.f; });\n    // after i2 reaches last ind, will be stopped\n    // freq must be greater than largest possible number of symbols\n    t.push({ s: -1, f: 25001 });\n    var l = t[0], r = t[1], i0 = 0, i1 = 1, i2 = 2;\n    t[0] = { s: -1, f: l.f + r.f, l: l, r: r };\n    // efficient algorithm from UZIP.js\n    // i0 is lookbehind, i2 is lookahead - after processing two low-freq\n    // symbols that combined have high freq, will start processing i2 (high-freq,\n    // non-composite) symbols instead\n    // see https://reddit.com/r/photopea/comments/ikekht/uzipjs_questions/\n    while (i1 != s - 1) {\n        l = t[t[i0].f < t[i2].f ? i0++ : i2++];\n        r = t[i0 != i1 && t[i0].f < t[i2].f ? i0++ : i2++];\n        t[i1++] = { s: -1, f: l.f + r.f, l: l, r: r };\n    }\n    var maxSym = t2[0].s;\n    for (var i = 1; i < s; ++i) {\n        if (t2[i].s > maxSym)\n            maxSym = t2[i].s;\n    }\n    // code lengths\n    var tr = new u16(maxSym + 1);\n    // max bits in tree\n    var mbt = ln(t[i1 - 1], tr, 0);\n    if (mbt > mb) {\n        // more algorithms from UZIP.js\n        // TODO: find out how this code works (debt)\n        //  ind    debt\n        var i = 0, dt = 0;\n        //    left            cost\n        var lft = mbt - mb, cst = 1 << lft;\n        t2.sort(function (a, b) { return tr[b.s] - tr[a.s] || a.f - b.f; });\n        for (; i < s; ++i) {\n            var i2_1 = t2[i].s;\n            if (tr[i2_1] > mb) {\n                dt += cst - (1 << (mbt - tr[i2_1]));\n                tr[i2_1] = mb;\n            }\n            else\n                break;\n        }\n        dt >>= lft;\n        while (dt > 0) {\n            var i2_2 = t2[i].s;\n            if (tr[i2_2] < mb)\n                dt -= 1 << (mb - tr[i2_2]++ - 1);\n            else\n                ++i;\n        }\n        for (; i >= 0 && dt; --i) {\n            var i2_3 = t2[i].s;\n            if (tr[i2_3] == mb) {\n                --tr[i2_3];\n                ++dt;\n            }\n        }\n        mbt = mb;\n    }\n    return { t: new u8(tr), l: mbt };\n};\n// get the max length and assign length codes\nvar ln = function (n, l, d) {\n    return n.s == -1\n        ? Math.max(ln(n.l, l, d + 1), ln(n.r, l, d + 1))\n        : (l[n.s] = d);\n};\n// length codes generation\nvar lc = function (c) {\n    var s = c.length;\n    // Note that the semicolon was intentional\n    while (s && !c[--s])\n        ;\n    var cl = new u16(++s);\n    //  ind      num         streak\n    var cli = 0, cln = c[0], cls = 1;\n    var w = function (v) { cl[cli++] = v; };\n    for (var i = 1; i <= s; ++i) {\n        if (c[i] == cln && i != s)\n            ++cls;\n        else {\n            if (!cln && cls > 2) {\n                for (; cls > 138; cls -= 138)\n                    w(32754);\n                if (cls > 2) {\n                    w(cls > 10 ? ((cls - 11) << 5) | 28690 : ((cls - 3) << 5) | 12305);\n                    cls = 0;\n                }\n            }\n            else if (cls > 3) {\n                w(cln), --cls;\n                for (; cls > 6; cls -= 6)\n                    w(8304);\n                if (cls > 2)\n                    w(((cls - 3) << 5) | 8208), cls = 0;\n            }\n            while (cls--)\n                w(cln);\n            cls = 1;\n            cln = c[i];\n        }\n    }\n    return { c: cl.subarray(0, cli), n: s };\n};\n// calculate the length of output from tree, code lengths\nvar clen = function (cf, cl) {\n    var l = 0;\n    for (var i = 0; i < cl.length; ++i)\n        l += cf[i] * cl[i];\n    return l;\n};\n// writes a fixed block\n// returns the new bit pos\nvar wfblk = function (out, pos, dat) {\n    // no need to write 00 as type: TypedArray defaults to 0\n    var s = dat.length;\n    var o = shft(pos + 2);\n    out[o] = s & 255;\n    out[o + 1] = s >> 8;\n    out[o + 2] = out[o] ^ 255;\n    out[o + 3] = out[o + 1] ^ 255;\n    for (var i = 0; i < s; ++i)\n        out[o + i + 4] = dat[i];\n    return (o + 4 + s) * 8;\n};\n// writes a block\nvar wblk = function (dat, out, final, syms, lf, df, eb, li, bs, bl, p) {\n    wbits(out, p++, final);\n    ++lf[256];\n    var _a = hTree(lf, 15), dlt = _a.t, mlb = _a.l;\n    var _b = hTree(df, 15), ddt = _b.t, mdb = _b.l;\n    var _c = lc(dlt), lclt = _c.c, nlc = _c.n;\n    var _d = lc(ddt), lcdt = _d.c, ndc = _d.n;\n    var lcfreq = new u16(19);\n    for (var i = 0; i < lclt.length; ++i)\n        ++lcfreq[lclt[i] & 31];\n    for (var i = 0; i < lcdt.length; ++i)\n        ++lcfreq[lcdt[i] & 31];\n    var _e = hTree(lcfreq, 7), lct = _e.t, mlcb = _e.l;\n    var nlcc = 19;\n    for (; nlcc > 4 && !lct[clim[nlcc - 1]]; --nlcc)\n        ;\n    var flen = (bl + 5) << 3;\n    var ftlen = clen(lf, flt) + clen(df, fdt) + eb;\n    var dtlen = clen(lf, dlt) + clen(df, ddt) + eb + 14 + 3 * nlcc + clen(lcfreq, lct) + 2 * lcfreq[16] + 3 * lcfreq[17] + 7 * lcfreq[18];\n    if (bs >= 0 && flen <= ftlen && flen <= dtlen)\n        return wfblk(out, p, dat.subarray(bs, bs + bl));\n    var lm, ll, dm, dl;\n    wbits(out, p, 1 + (dtlen < ftlen)), p += 2;\n    if (dtlen < ftlen) {\n        lm = hMap(dlt, mlb, 0), ll = dlt, dm = hMap(ddt, mdb, 0), dl = ddt;\n        var llm = hMap(lct, mlcb, 0);\n        wbits(out, p, nlc - 257);\n        wbits(out, p + 5, ndc - 1);\n        wbits(out, p + 10, nlcc - 4);\n        p += 14;\n        for (var i = 0; i < nlcc; ++i)\n            wbits(out, p + 3 * i, lct[clim[i]]);\n        p += 3 * nlcc;\n        var lcts = [lclt, lcdt];\n        for (var it = 0; it < 2; ++it) {\n            var clct = lcts[it];\n            for (var i = 0; i < clct.length; ++i) {\n                var len = clct[i] & 31;\n                wbits(out, p, llm[len]), p += lct[len];\n                if (len > 15)\n                    wbits(out, p, (clct[i] >> 5) & 127), p += clct[i] >> 12;\n            }\n        }\n    }\n    else {\n        lm = flm, ll = flt, dm = fdm, dl = fdt;\n    }\n    for (var i = 0; i < li; ++i) {\n        var sym = syms[i];\n        if (sym > 255) {\n            var len = (sym >> 18) & 31;\n            wbits16(out, p, lm[len + 257]), p += ll[len + 257];\n            if (len > 7)\n                wbits(out, p, (sym >> 23) & 31), p += fleb[len];\n            var dst = sym & 31;\n            wbits16(out, p, dm[dst]), p += dl[dst];\n            if (dst > 3)\n                wbits16(out, p, (sym >> 5) & 8191), p += fdeb[dst];\n        }\n        else {\n            wbits16(out, p, lm[sym]), p += ll[sym];\n        }\n    }\n    wbits16(out, p, lm[256]);\n    return p + ll[256];\n};\n// deflate options (nice << 13) | chain\nvar deo = /*#__PURE__*/ new i32([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]);\n// empty\nvar et = /*#__PURE__*/ new u8(0);\n// compresses data into a raw DEFLATE buffer\nvar dflt = function (dat, lvl, plvl, pre, post, st) {\n    var s = st.z || dat.length;\n    var o = new u8(pre + s + 5 * (1 + Math.ceil(s / 7000)) + post);\n    // writing to this writes to the output buffer\n    var w = o.subarray(pre, o.length - post);\n    var lst = st.l;\n    var pos = (st.r || 0) & 7;\n    if (lvl) {\n        if (pos)\n            w[0] = st.r >> 3;\n        var opt = deo[lvl - 1];\n        var n = opt >> 13, c = opt & 8191;\n        var msk_1 = (1 << plvl) - 1;\n        //    prev 2-byte val map    curr 2-byte val map\n        var prev = st.p || new u16(32768), head = st.h || new u16(msk_1 + 1);\n        var bs1_1 = Math.ceil(plvl / 3), bs2_1 = 2 * bs1_1;\n        var hsh = function (i) { return (dat[i] ^ (dat[i + 1] << bs1_1) ^ (dat[i + 2] << bs2_1)) & msk_1; };\n        // 24576 is an arbitrary number of maximum symbols per block\n        // 424 buffer for last block\n        var syms = new i32(25000);\n        // length/literal freq   distance freq\n        var lf = new u16(288), df = new u16(32);\n        //  l/lcnt  exbits  index          l/lind  waitdx          blkpos\n        var lc_1 = 0, eb = 0, i = st.i || 0, li = 0, wi = st.w || 0, bs = 0;\n        for (; i + 2 < s; ++i) {\n            // hash value\n            var hv = hsh(i);\n            // index mod 32768    previous index mod\n            var imod = i & 32767, pimod = head[hv];\n            prev[imod] = pimod;\n            head[hv] = imod;\n            // We always should modify head and prev, but only add symbols if\n            // this data is not yet processed (\"wait\" for wait index)\n            if (wi <= i) {\n                // bytes remaining\n                var rem = s - i;\n                if ((lc_1 > 7000 || li > 24576) && (rem > 423 || !lst)) {\n                    pos = wblk(dat, w, 0, syms, lf, df, eb, li, bs, i - bs, pos);\n                    li = lc_1 = eb = 0, bs = i;\n                    for (var j = 0; j < 286; ++j)\n                        lf[j] = 0;\n                    for (var j = 0; j < 30; ++j)\n                        df[j] = 0;\n                }\n                //  len    dist   chain\n                var l = 2, d = 0, ch_1 = c, dif = imod - pimod & 32767;\n                if (rem > 2 && hv == hsh(i - dif)) {\n                    var maxn = Math.min(n, rem) - 1;\n                    var maxd = Math.min(32767, i);\n                    // max possible length\n                    // not capped at dif because decompressors implement \"rolling\" index population\n                    var ml = Math.min(258, rem);\n                    while (dif <= maxd && --ch_1 && imod != pimod) {\n                        if (dat[i + l] == dat[i + l - dif]) {\n                            var nl = 0;\n                            for (; nl < ml && dat[i + nl] == dat[i + nl - dif]; ++nl)\n                                ;\n                            if (nl > l) {\n                                l = nl, d = dif;\n                                // break out early when we reach \"nice\" (we are satisfied enough)\n                                if (nl > maxn)\n                                    break;\n                                // now, find the rarest 2-byte sequence within this\n                                // length of literals and search for that instead.\n                                // Much faster than just using the start\n                                var mmd = Math.min(dif, nl - 2);\n                                var md = 0;\n                                for (var j = 0; j < mmd; ++j) {\n                                    var ti = i - dif + j & 32767;\n                                    var pti = prev[ti];\n                                    var cd = ti - pti & 32767;\n                                    if (cd > md)\n                                        md = cd, pimod = ti;\n                                }\n                            }\n                        }\n                        // check the previous match\n                        imod = pimod, pimod = prev[imod];\n                        dif += imod - pimod & 32767;\n                    }\n                }\n                // d will be nonzero only when a match was found\n                if (d) {\n                    // store both dist and len data in one int32\n                    // Make sure this is recognized as a len/dist with 28th bit (2^28)\n                    syms[li++] = 268435456 | (revfl[l] << 18) | revfd[d];\n                    var lin = revfl[l] & 31, din = revfd[d] & 31;\n                    eb += fleb[lin] + fdeb[din];\n                    ++lf[257 + lin];\n                    ++df[din];\n                    wi = i + l;\n                    ++lc_1;\n                }\n                else {\n                    syms[li++] = dat[i];\n                    ++lf[dat[i]];\n                }\n            }\n        }\n        for (i = Math.max(i, wi); i < s; ++i) {\n            syms[li++] = dat[i];\n            ++lf[dat[i]];\n        }\n        pos = wblk(dat, w, lst, syms, lf, df, eb, li, bs, i - bs, pos);\n        if (!lst) {\n            st.r = (pos & 7) | w[(pos / 8) | 0] << 3;\n            // shft(pos) now 1 less if pos & 7 != 0\n            pos -= 7;\n            st.h = head, st.p = prev, st.i = i, st.w = wi;\n        }\n    }\n    else {\n        for (var i = st.w || 0; i < s + lst; i += 65535) {\n            // end\n            var e = i + 65535;\n            if (e >= s) {\n                // write final block\n                w[(pos / 8) | 0] = lst;\n                e = s;\n            }\n            pos = wfblk(w, pos + 1, dat.subarray(i, e));\n        }\n        st.i = s;\n    }\n    return slc(o, 0, pre + shft(pos) + post);\n};\n// CRC32 table\nvar crct = /*#__PURE__*/ (function () {\n    var t = new Int32Array(256);\n    for (var i = 0; i < 256; ++i) {\n        var c = i, k = 9;\n        while (--k)\n            c = ((c & 1) && -306674912) ^ (c >>> 1);\n        t[i] = c;\n    }\n    return t;\n})();\n// CRC32\nvar crc = function () {\n    var c = -1;\n    return {\n        p: function (d) {\n            // closures have awful performance\n            var cr = c;\n            for (var i = 0; i < d.length; ++i)\n                cr = crct[(cr & 255) ^ d[i]] ^ (cr >>> 8);\n            c = cr;\n        },\n        d: function () { return ~c; }\n    };\n};\n// Adler32\nvar adler = function () {\n    var a = 1, b = 0;\n    return {\n        p: function (d) {\n            // closures have awful performance\n            var n = a, m = b;\n            var l = d.length | 0;\n            for (var i = 0; i != l;) {\n                var e = Math.min(i + 2655, l);\n                for (; i < e; ++i)\n                    m += n += d[i];\n                n = (n & 65535) + 15 * (n >> 16), m = (m & 65535) + 15 * (m >> 16);\n            }\n            a = n, b = m;\n        },\n        d: function () {\n            a %= 65521, b %= 65521;\n            return (a & 255) << 24 | (a & 0xFF00) << 8 | (b & 255) << 8 | (b >> 8);\n        }\n    };\n};\n;\n// deflate with opts\nvar dopt = function (dat, opt, pre, post, st) {\n    if (!st) {\n        st = { l: 1 };\n        if (opt.dictionary) {\n            var dict = opt.dictionary.subarray(-32768);\n            var newDat = new u8(dict.length + dat.length);\n            newDat.set(dict);\n            newDat.set(dat, dict.length);\n            dat = newDat;\n            st.w = dict.length;\n        }\n    }\n    return dflt(dat, opt.level == null ? 6 : opt.level, opt.mem == null ? Math.ceil(Math.max(8, Math.min(13, Math.log(dat.length))) * 1.5) : (12 + opt.mem), pre, post, st);\n};\n// Walmart object spread\nvar mrg = function (a, b) {\n    var o = {};\n    for (var k in a)\n        o[k] = a[k];\n    for (var k in b)\n        o[k] = b[k];\n    return o;\n};\n// worker clone\n// This is possibly the craziest part of the entire codebase, despite how simple it may seem.\n// The only parameter to this function is a closure that returns an array of variables outside of the function scope.\n// We're going to try to figure out the variable names used in the closure as strings because that is crucial for workerization.\n// We will return an object mapping of true variable name to value (basically, the current scope as a JS object).\n// The reason we can't just use the original variable names is minifiers mangling the toplevel scope.\n// This took me three weeks to figure out how to do.\nvar wcln = function (fn, fnStr, td) {\n    var dt = fn();\n    var st = fn.toString();\n    var ks = st.slice(st.indexOf('[') + 1, st.lastIndexOf(']')).replace(/\\s+/g, '').split(',');\n    for (var i = 0; i < dt.length; ++i) {\n        var v = dt[i], k = ks[i];\n        if (typeof v == 'function') {\n            fnStr += ';' + k + '=';\n            var st_1 = v.toString();\n            if (v.prototype) {\n                // for global objects\n                if (st_1.indexOf('[native code]') != -1) {\n                    var spInd = st_1.indexOf(' ', 8) + 1;\n                    fnStr += st_1.slice(spInd, st_1.indexOf('(', spInd));\n                }\n                else {\n                    fnStr += st_1;\n                    for (var t in v.prototype)\n                        fnStr += ';' + k + '.prototype.' + t + '=' + v.prototype[t].toString();\n                }\n            }\n            else\n                fnStr += st_1;\n        }\n        else\n            td[k] = v;\n    }\n    return fnStr;\n};\nvar ch = [];\n// clone bufs\nvar cbfs = function (v) {\n    var tl = [];\n    for (var k in v) {\n        if (v[k].buffer) {\n            tl.push((v[k] = new v[k].constructor(v[k])).buffer);\n        }\n    }\n    return tl;\n};\n// use a worker to execute code\nvar wrkr = function (fns, init, id, cb) {\n    if (!ch[id]) {\n        var fnStr = '', td_1 = {}, m = fns.length - 1;\n        for (var i = 0; i < m; ++i)\n            fnStr = wcln(fns[i], fnStr, td_1);\n        ch[id] = { c: wcln(fns[m], fnStr, td_1), e: td_1 };\n    }\n    var td = mrg({}, ch[id].e);\n    return wk(ch[id].c + ';onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=' + init.toString() + '}', id, td, cbfs(td), cb);\n};\n// base async inflate fn\nvar bInflt = function () { return [u8, u16, i32, fleb, fdeb, clim, fl, fd, flrm, fdrm, rev, ec, hMap, max, bits, bits16, shft, slc, err, inflt, inflateSync, pbf, gopt]; };\nvar bDflt = function () { return [u8, u16, i32, fleb, fdeb, clim, revfl, revfd, flm, flt, fdm, fdt, rev, deo, et, hMap, wbits, wbits16, hTree, ln, lc, clen, wfblk, wblk, shft, slc, dflt, dopt, deflateSync, pbf]; };\n// gzip extra\nvar gze = function () { return [gzh, gzhl, wbytes, crc, crct]; };\n// gunzip extra\nvar guze = function () { return [gzs, gzl]; };\n// zlib extra\nvar zle = function () { return [zlh, wbytes, adler]; };\n// unzlib extra\nvar zule = function () { return [zls]; };\n// post buf\nvar pbf = function (msg) { return postMessage(msg, [msg.buffer]); };\n// get opts\nvar gopt = function (o) { return o && {\n    out: o.size && new u8(o.size),\n    dictionary: o.dictionary\n}; };\n// async helper\nvar cbify = function (dat, opts, fns, init, id, cb) {\n    var w = wrkr(fns, init, id, function (err, dat) {\n        w.terminate();\n        cb(err, dat);\n    });\n    w.postMessage([dat, opts], opts.consume ? [dat.buffer] : []);\n    return function () { w.terminate(); };\n};\n// auto stream\nvar astrm = function (strm) {\n    strm.ondata = function (dat, final) { return postMessage([dat, final], [dat.buffer]); };\n    return function (ev) { return strm.push(ev.data[0], ev.data[1]); };\n};\n// async stream attach\nvar astrmify = function (fns, strm, opts, init, id, ext) {\n    var t;\n    var w = wrkr(fns, init, id, function (err, dat) {\n        if (err)\n            w.terminate(), strm.ondata.call(strm, err);\n        else if (!Array.isArray(dat))\n            ext(dat);\n        else {\n            if (dat[1])\n                w.terminate();\n            strm.ondata.call(strm, err, dat[0], dat[1]);\n        }\n    });\n    w.postMessage(opts);\n    strm.push = function (d, f) {\n        if (!strm.ondata)\n            err(5);\n        if (t)\n            strm.ondata(err(4, 0, 1), null, !!f);\n        w.postMessage([d, t = f], [d.buffer]);\n    };\n    strm.terminate = function () { w.terminate(); };\n};\n// read 2 bytes\nvar b2 = function (d, b) { return d[b] | (d[b + 1] << 8); };\n// read 4 bytes\nvar b4 = function (d, b) { return (d[b] | (d[b + 1] << 8) | (d[b + 2] << 16) | (d[b + 3] << 24)) >>> 0; };\nvar b8 = function (d, b) { return b4(d, b) + (b4(d, b + 4) * 4294967296); };\n// write bytes\nvar wbytes = function (d, b, v) {\n    for (; v; ++b)\n        d[b] = v, v >>>= 8;\n};\n// gzip header\nvar gzh = function (c, o) {\n    var fn = o.filename;\n    c[0] = 31, c[1] = 139, c[2] = 8, c[8] = o.level < 2 ? 4 : o.level == 9 ? 2 : 0, c[9] = 3; // assume Unix\n    if (o.mtime != 0)\n        wbytes(c, 4, Math.floor(new Date(o.mtime || Date.now()) / 1000));\n    if (fn) {\n        c[3] = 8;\n        for (var i = 0; i <= fn.length; ++i)\n            c[i + 10] = fn.charCodeAt(i);\n    }\n};\n// gzip footer: -8 to -4 = CRC, -4 to -0 is length\n// gzip start\nvar gzs = function (d) {\n    if (d[0] != 31 || d[1] != 139 || d[2] != 8)\n        err(6, 'invalid gzip data');\n    var flg = d[3];\n    var st = 10;\n    if (flg & 4)\n        st += (d[10] | d[11] << 8) + 2;\n    for (var zs = (flg >> 3 & 1) + (flg >> 4 & 1); zs > 0; zs -= !d[st++])\n        ;\n    return st + (flg & 2);\n};\n// gzip length\nvar gzl = function (d) {\n    var l = d.length;\n    return (d[l - 4] | d[l - 3] << 8 | d[l - 2] << 16 | d[l - 1] << 24) >>> 0;\n};\n// gzip header length\nvar gzhl = function (o) { return 10 + (o.filename ? o.filename.length + 1 : 0); };\n// zlib header\nvar zlh = function (c, o) {\n    var lv = o.level, fl = lv == 0 ? 0 : lv < 6 ? 1 : lv == 9 ? 3 : 2;\n    c[0] = 120, c[1] = (fl << 6) | (o.dictionary && 32);\n    c[1] |= 31 - ((c[0] << 8) | c[1]) % 31;\n    if (o.dictionary) {\n        var h = adler();\n        h.p(o.dictionary);\n        wbytes(c, 2, h.d());\n    }\n};\n// zlib start\nvar zls = function (d, dict) {\n    if ((d[0] & 15) != 8 || (d[0] >> 4) > 7 || ((d[0] << 8 | d[1]) % 31))\n        err(6, 'invalid zlib data');\n    if ((d[1] >> 5 & 1) == +!dict)\n        err(6, 'invalid zlib data: ' + (d[1] & 32 ? 'need' : 'unexpected') + ' dictionary');\n    return (d[1] >> 3 & 4) + 2;\n};\nfunction StrmOpt(opts, cb) {\n    if (typeof opts == 'function')\n        cb = opts, opts = {};\n    this.ondata = cb;\n    return opts;\n}\n/**\n * Streaming DEFLATE compression\n */\nvar Deflate = /*#__PURE__*/ (function () {\n    function Deflate(opts, cb) {\n        if (typeof opts == 'function')\n            cb = opts, opts = {};\n        this.ondata = cb;\n        this.o = opts || {};\n        this.s = { l: 0, i: 32768, w: 32768, z: 32768 };\n        // Buffer length must always be 0 mod 32768 for index calculations to be correct when modifying head and prev\n        // 98304 = 32768 (lookback) + 65536 (common chunk size)\n        this.b = new u8(98304);\n        if (this.o.dictionary) {\n            var dict = this.o.dictionary.subarray(-32768);\n            this.b.set(dict, 32768 - dict.length);\n            this.s.i = 32768 - dict.length;\n        }\n    }\n    Deflate.prototype.p = function (c, f) {\n        this.ondata(dopt(c, this.o, 0, 0, this.s), f);\n    };\n    /**\n     * Pushes a chunk to be deflated\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Deflate.prototype.push = function (chunk, final) {\n        if (!this.ondata)\n            err(5);\n        if (this.s.l)\n            err(4);\n        var endLen = chunk.length + this.s.z;\n        if (endLen > this.b.length) {\n            if (endLen > 2 * this.b.length - 32768) {\n                var newBuf = new u8(endLen & -32768);\n                newBuf.set(this.b.subarray(0, this.s.z));\n                this.b = newBuf;\n            }\n            var split = this.b.length - this.s.z;\n            if (split) {\n                this.b.set(chunk.subarray(0, split), this.s.z);\n                this.s.z = this.b.length;\n                this.p(this.b, false);\n            }\n            this.b.set(this.b.subarray(-32768));\n            this.b.set(chunk.subarray(split), 32768);\n            this.s.z = chunk.length - split + 32768;\n            this.s.i = 32766, this.s.w = 32768;\n        }\n        else {\n            this.b.set(chunk, this.s.z);\n            this.s.z += chunk.length;\n        }\n        this.s.l = final & 1;\n        if (this.s.z > this.s.w + 8191 || final) {\n            this.p(this.b, final || false);\n            this.s.w = this.s.i, this.s.i -= 2;\n        }\n    };\n    return Deflate;\n}());\nexport { Deflate };\n/**\n * Asynchronous streaming DEFLATE compression\n */\nvar AsyncDeflate = /*#__PURE__*/ (function () {\n    function AsyncDeflate(opts, cb) {\n        astrmify([\n            bDflt,\n            function () { return [astrm, Deflate]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Deflate(ev.data);\n            onmessage = astrm(strm);\n        }, 6);\n    }\n    return AsyncDeflate;\n}());\nexport { AsyncDeflate };\nexport function deflate(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bDflt,\n    ], function (ev) { return pbf(deflateSync(ev.data[0], ev.data[1])); }, 0, cb);\n}\n/**\n * Compresses data with DEFLATE without any wrapper\n * @param data The data to compress\n * @param opts The compression options\n * @returns The deflated version of the data\n */\nexport function deflateSync(data, opts) {\n    return dopt(data, opts || {}, 0, 0);\n}\n/**\n * Streaming DEFLATE decompression\n */\nvar Inflate = /*#__PURE__*/ (function () {\n    function Inflate(opts, cb) {\n        // no StrmOpt here to avoid adding to workerizer\n        if (typeof opts == 'function')\n            cb = opts, opts = {};\n        this.ondata = cb;\n        var dict = opts && opts.dictionary && opts.dictionary.subarray(-32768);\n        this.s = { i: 0, b: dict ? dict.length : 0 };\n        this.o = new u8(32768);\n        this.p = new u8(0);\n        if (dict)\n            this.o.set(dict);\n    }\n    Inflate.prototype.e = function (c) {\n        if (!this.ondata)\n            err(5);\n        if (this.d)\n            err(4);\n        if (!this.p.length)\n            this.p = c;\n        else if (c.length) {\n            var n = new u8(this.p.length + c.length);\n            n.set(this.p), n.set(c, this.p.length), this.p = n;\n        }\n    };\n    Inflate.prototype.c = function (final) {\n        this.s.i = +(this.d = final || false);\n        var bts = this.s.b;\n        var dt = inflt(this.p, this.s, this.o);\n        this.ondata(slc(dt, bts, this.s.b), this.d);\n        this.o = slc(dt, this.s.b - 32768), this.s.b = this.o.length;\n        this.p = slc(this.p, (this.s.p / 8) | 0), this.s.p &= 7;\n    };\n    /**\n     * Pushes a chunk to be inflated\n     * @param chunk The chunk to push\n     * @param final Whether this is the final chunk\n     */\n    Inflate.prototype.push = function (chunk, final) {\n        this.e(chunk), this.c(final);\n    };\n    return Inflate;\n}());\nexport { Inflate };\n/**\n * Asynchronous streaming DEFLATE decompression\n */\nvar AsyncInflate = /*#__PURE__*/ (function () {\n    function AsyncInflate(opts, cb) {\n        astrmify([\n            bInflt,\n            function () { return [astrm, Inflate]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Inflate(ev.data);\n            onmessage = astrm(strm);\n        }, 7);\n    }\n    return AsyncInflate;\n}());\nexport { AsyncInflate };\nexport function inflate(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bInflt\n    ], function (ev) { return pbf(inflateSync(ev.data[0], gopt(ev.data[1]))); }, 1, cb);\n}\n/**\n * Expands DEFLATE data with no wrapper\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function inflateSync(data, opts) {\n    return inflt(data, { i: 2 }, opts && opts.out, opts && opts.dictionary);\n}\n// before you yell at me for not just using extends, my reason is that TS inheritance is hard to workerize.\n/**\n * Streaming GZIP compression\n */\nvar Gzip = /*#__PURE__*/ (function () {\n    function Gzip(opts, cb) {\n        this.c = crc();\n        this.l = 0;\n        this.v = 1;\n        Deflate.call(this, opts, cb);\n    }\n    /**\n     * Pushes a chunk to be GZIPped\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Gzip.prototype.push = function (chunk, final) {\n        this.c.p(chunk);\n        this.l += chunk.length;\n        Deflate.prototype.push.call(this, chunk, final);\n    };\n    Gzip.prototype.p = function (c, f) {\n        var raw = dopt(c, this.o, this.v && gzhl(this.o), f && 8, this.s);\n        if (this.v)\n            gzh(raw, this.o), this.v = 0;\n        if (f)\n            wbytes(raw, raw.length - 8, this.c.d()), wbytes(raw, raw.length - 4, this.l);\n        this.ondata(raw, f);\n    };\n    return Gzip;\n}());\nexport { Gzip };\n/**\n * Asynchronous streaming GZIP compression\n */\nvar AsyncGzip = /*#__PURE__*/ (function () {\n    function AsyncGzip(opts, cb) {\n        astrmify([\n            bDflt,\n            gze,\n            function () { return [astrm, Deflate, Gzip]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Gzip(ev.data);\n            onmessage = astrm(strm);\n        }, 8);\n    }\n    return AsyncGzip;\n}());\nexport { AsyncGzip };\nexport function gzip(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bDflt,\n        gze,\n        function () { return [gzipSync]; }\n    ], function (ev) { return pbf(gzipSync(ev.data[0], ev.data[1])); }, 2, cb);\n}\n/**\n * Compresses data with GZIP\n * @param data The data to compress\n * @param opts The compression options\n * @returns The gzipped version of the data\n */\nexport function gzipSync(data, opts) {\n    if (!opts)\n        opts = {};\n    var c = crc(), l = data.length;\n    c.p(data);\n    var d = dopt(data, opts, gzhl(opts), 8), s = d.length;\n    return gzh(d, opts), wbytes(d, s - 8, c.d()), wbytes(d, s - 4, l), d;\n}\n/**\n * Streaming single or multi-member GZIP decompression\n */\nvar Gunzip = /*#__PURE__*/ (function () {\n    function Gunzip(opts, cb) {\n        this.v = 1;\n        this.r = 0;\n        Inflate.call(this, opts, cb);\n    }\n    /**\n     * Pushes a chunk to be GUNZIPped\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Gunzip.prototype.push = function (chunk, final) {\n        Inflate.prototype.e.call(this, chunk);\n        this.r += chunk.length;\n        if (this.v) {\n            var p = this.p.subarray(this.v - 1);\n            var s = p.length > 3 ? gzs(p) : 4;\n            if (s > p.length) {\n                if (!final)\n                    return;\n            }\n            else if (this.v > 1 && this.onmember) {\n                this.onmember(this.r - p.length);\n            }\n            this.p = p.subarray(s), this.v = 0;\n        }\n        // necessary to prevent TS from using the closure value\n        // This allows for workerization to function correctly\n        Inflate.prototype.c.call(this, final);\n        // process concatenated GZIP\n        if (this.s.f && !this.s.l) {\n            this.v = shft(this.s.p) + 9;\n            this.s = { i: 0 };\n            this.o = new u8(0);\n            if (this.p.length)\n                this.push(new u8(0), final);\n        }\n    };\n    return Gunzip;\n}());\nexport { Gunzip };\n/**\n * Asynchronous streaming single or multi-member GZIP decompression\n */\nvar AsyncGunzip = /*#__PURE__*/ (function () {\n    function AsyncGunzip(opts, cb) {\n        var _this_1 = this;\n        astrmify([\n            bInflt,\n            guze,\n            function () { return [astrm, Inflate, Gunzip]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Gunzip(ev.data);\n            strm.onmember = function (offset) { return postMessage(offset); };\n            onmessage = astrm(strm);\n        }, 9, function (offset) { return _this_1.onmember && _this_1.onmember(offset); });\n    }\n    return AsyncGunzip;\n}());\nexport { AsyncGunzip };\nexport function gunzip(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bInflt,\n        guze,\n        function () { return [gunzipSync]; }\n    ], function (ev) { return pbf(gunzipSync(ev.data[0], ev.data[1])); }, 3, cb);\n}\n/**\n * Expands GZIP data\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function gunzipSync(data, opts) {\n    var st = gzs(data);\n    if (st + 8 > data.length)\n        err(6, 'invalid gzip data');\n    return inflt(data.subarray(st, -8), { i: 2 }, opts && opts.out || new u8(gzl(data)), opts && opts.dictionary);\n}\n/**\n * Streaming Zlib compression\n */\nvar Zlib = /*#__PURE__*/ (function () {\n    function Zlib(opts, cb) {\n        this.c = adler();\n        this.v = 1;\n        Deflate.call(this, opts, cb);\n    }\n    /**\n     * Pushes a chunk to be zlibbed\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Zlib.prototype.push = function (chunk, final) {\n        this.c.p(chunk);\n        Deflate.prototype.push.call(this, chunk, final);\n    };\n    Zlib.prototype.p = function (c, f) {\n        var raw = dopt(c, this.o, this.v && (this.o.dictionary ? 6 : 2), f && 4, this.s);\n        if (this.v)\n            zlh(raw, this.o), this.v = 0;\n        if (f)\n            wbytes(raw, raw.length - 4, this.c.d());\n        this.ondata(raw, f);\n    };\n    return Zlib;\n}());\nexport { Zlib };\n/**\n * Asynchronous streaming Zlib compression\n */\nvar AsyncZlib = /*#__PURE__*/ (function () {\n    function AsyncZlib(opts, cb) {\n        astrmify([\n            bDflt,\n            zle,\n            function () { return [astrm, Deflate, Zlib]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Zlib(ev.data);\n            onmessage = astrm(strm);\n        }, 10);\n    }\n    return AsyncZlib;\n}());\nexport { AsyncZlib };\nexport function zlib(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bDflt,\n        zle,\n        function () { return [zlibSync]; }\n    ], function (ev) { return pbf(zlibSync(ev.data[0], ev.data[1])); }, 4, cb);\n}\n/**\n * Compress data with Zlib\n * @param data The data to compress\n * @param opts The compression options\n * @returns The zlib-compressed version of the data\n */\nexport function zlibSync(data, opts) {\n    if (!opts)\n        opts = {};\n    var a = adler();\n    a.p(data);\n    var d = dopt(data, opts, opts.dictionary ? 6 : 2, 4);\n    return zlh(d, opts), wbytes(d, d.length - 4, a.d()), d;\n}\n/**\n * Streaming Zlib decompression\n */\nvar Unzlib = /*#__PURE__*/ (function () {\n    function Unzlib(opts, cb) {\n        Inflate.call(this, opts, cb);\n        this.v = opts && opts.dictionary ? 2 : 1;\n    }\n    /**\n     * Pushes a chunk to be unzlibbed\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Unzlib.prototype.push = function (chunk, final) {\n        Inflate.prototype.e.call(this, chunk);\n        if (this.v) {\n            if (this.p.length < 6 && !final)\n                return;\n            this.p = this.p.subarray(zls(this.p, this.v - 1)), this.v = 0;\n        }\n        if (final) {\n            if (this.p.length < 4)\n                err(6, 'invalid zlib data');\n            this.p = this.p.subarray(0, -4);\n        }\n        // necessary to prevent TS from using the closure value\n        // This allows for workerization to function correctly\n        Inflate.prototype.c.call(this, final);\n    };\n    return Unzlib;\n}());\nexport { Unzlib };\n/**\n * Asynchronous streaming Zlib decompression\n */\nvar AsyncUnzlib = /*#__PURE__*/ (function () {\n    function AsyncUnzlib(opts, cb) {\n        astrmify([\n            bInflt,\n            zule,\n            function () { return [astrm, Inflate, Unzlib]; }\n        ], this, StrmOpt.call(this, opts, cb), function (ev) {\n            var strm = new Unzlib(ev.data);\n            onmessage = astrm(strm);\n        }, 11);\n    }\n    return AsyncUnzlib;\n}());\nexport { AsyncUnzlib };\nexport function unzlib(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return cbify(data, opts, [\n        bInflt,\n        zule,\n        function () { return [unzlibSync]; }\n    ], function (ev) { return pbf(unzlibSync(ev.data[0], gopt(ev.data[1]))); }, 5, cb);\n}\n/**\n * Expands Zlib data\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function unzlibSync(data, opts) {\n    return inflt(data.subarray(zls(data, opts && opts.dictionary), -4), { i: 2 }, opts && opts.out, opts && opts.dictionary);\n}\n// Default algorithm for compression (used because having a known output size allows faster decompression)\nexport { gzip as compress, AsyncGzip as AsyncCompress };\nexport { gzipSync as compressSync, Gzip as Compress };\n/**\n * Streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar Decompress = /*#__PURE__*/ (function () {\n    function Decompress(opts, cb) {\n        this.G = Gunzip;\n        this.I = Inflate;\n        this.Z = Unzlib;\n        this.o = StrmOpt.call(this, opts, cb) || {};\n    }\n    /**\n     * Pushes a chunk to be decompressed\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Decompress.prototype.push = function (chunk, final) {\n        if (!this.ondata)\n            err(5);\n        if (!this.s) {\n            if (this.p && this.p.length) {\n                var n = new u8(this.p.length + chunk.length);\n                n.set(this.p), n.set(chunk, this.p.length);\n            }\n            else\n                this.p = chunk;\n            if (this.p.length > 2) {\n                var _this_2 = this;\n                // enables reuse of this method by AsyncDecompress\n                var cb = function () { _this_2.ondata.apply(_this_2, arguments); };\n                this.s = (this.p[0] == 31 && this.p[1] == 139 && this.p[2] == 8)\n                    ? new this.G(this.o, cb)\n                    : ((this.p[0] & 15) != 8 || (this.p[0] >> 4) > 7 || ((this.p[0] << 8 | this.p[1]) % 31))\n                        ? new this.I(this.o, cb)\n                        : new this.Z(this.o, cb);\n                this.s.push(this.p, final);\n                this.p = null;\n            }\n        }\n        else\n            this.s.push(chunk, final);\n    };\n    return Decompress;\n}());\nexport { Decompress };\n/**\n * Asynchronous streaming GZIP, Zlib, or raw DEFLATE decompression\n */\nvar AsyncDecompress = /*#__PURE__*/ (function () {\n    function AsyncDecompress(opts, cb) {\n        this.G = AsyncGunzip;\n        this.I = AsyncInflate;\n        this.Z = AsyncUnzlib;\n        Decompress.call(this, opts, cb);\n    }\n    /**\n     * Pushes a chunk to be decompressed\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    AsyncDecompress.prototype.push = function (chunk, final) {\n        Decompress.prototype.push.call(this, chunk, final);\n    };\n    return AsyncDecompress;\n}());\nexport { AsyncDecompress };\nexport function decompress(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n        ? gunzip(data, opts, cb)\n        : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n            ? inflate(data, opts, cb)\n            : unzlib(data, opts, cb);\n}\n/**\n * Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format\n * @param data The data to decompress\n * @param opts The decompression options\n * @returns The decompressed version of the data\n */\nexport function decompressSync(data, opts) {\n    return (data[0] == 31 && data[1] == 139 && data[2] == 8)\n        ? gunzipSync(data, opts)\n        : ((data[0] & 15) != 8 || (data[0] >> 4) > 7 || ((data[0] << 8 | data[1]) % 31))\n            ? inflateSync(data, opts)\n            : unzlibSync(data, opts);\n}\n// flatten a directory structure\nvar fltn = function (d, p, t, o) {\n    for (var k in d) {\n        var val = d[k], n = p + k, op = o;\n        if (Array.isArray(val))\n            op = mrg(o, val[1]), val = val[0];\n        if (val instanceof u8)\n            t[n] = [val, op];\n        else {\n            t[n += '/'] = [new u8(0), op];\n            fltn(val, n, t, o);\n        }\n    }\n};\n// text encoder\nvar te = typeof TextEncoder != 'undefined' && /*#__PURE__*/ new TextEncoder();\n// text decoder\nvar td = typeof TextDecoder != 'undefined' && /*#__PURE__*/ new TextDecoder();\n// text decoder stream\nvar tds = 0;\ntry {\n    td.decode(et, { stream: true });\n    tds = 1;\n}\ncatch (e) { }\n// decode UTF8\nvar dutf8 = function (d) {\n    for (var r = '', i = 0;;) {\n        var c = d[i++];\n        var eb = (c > 127) + (c > 223) + (c > 239);\n        if (i + eb > d.length)\n            return { s: r, r: slc(d, i - 1) };\n        if (!eb)\n            r += String.fromCharCode(c);\n        else if (eb == 3) {\n            c = ((c & 15) << 18 | (d[i++] & 63) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63)) - 65536,\n                r += String.fromCharCode(55296 | (c >> 10), 56320 | (c & 1023));\n        }\n        else if (eb & 1)\n            r += String.fromCharCode((c & 31) << 6 | (d[i++] & 63));\n        else\n            r += String.fromCharCode((c & 15) << 12 | (d[i++] & 63) << 6 | (d[i++] & 63));\n    }\n};\n/**\n * Streaming UTF-8 decoding\n */\nvar DecodeUTF8 = /*#__PURE__*/ (function () {\n    /**\n     * Creates a UTF-8 decoding stream\n     * @param cb The callback to call whenever data is decoded\n     */\n    function DecodeUTF8(cb) {\n        this.ondata = cb;\n        if (tds)\n            this.t = new TextDecoder();\n        else\n            this.p = et;\n    }\n    /**\n     * Pushes a chunk to be decoded from UTF-8 binary\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    DecodeUTF8.prototype.push = function (chunk, final) {\n        if (!this.ondata)\n            err(5);\n        final = !!final;\n        if (this.t) {\n            this.ondata(this.t.decode(chunk, { stream: true }), final);\n            if (final) {\n                if (this.t.decode().length)\n                    err(8);\n                this.t = null;\n            }\n            return;\n        }\n        if (!this.p)\n            err(4);\n        var dat = new u8(this.p.length + chunk.length);\n        dat.set(this.p);\n        dat.set(chunk, this.p.length);\n        var _a = dutf8(dat), s = _a.s, r = _a.r;\n        if (final) {\n            if (r.length)\n                err(8);\n            this.p = null;\n        }\n        else\n            this.p = r;\n        this.ondata(s, final);\n    };\n    return DecodeUTF8;\n}());\nexport { DecodeUTF8 };\n/**\n * Streaming UTF-8 encoding\n */\nvar EncodeUTF8 = /*#__PURE__*/ (function () {\n    /**\n     * Creates a UTF-8 decoding stream\n     * @param cb The callback to call whenever data is encoded\n     */\n    function EncodeUTF8(cb) {\n        this.ondata = cb;\n    }\n    /**\n     * Pushes a chunk to be encoded to UTF-8\n     * @param chunk The string data to push\n     * @param final Whether this is the last chunk\n     */\n    EncodeUTF8.prototype.push = function (chunk, final) {\n        if (!this.ondata)\n            err(5);\n        if (this.d)\n            err(4);\n        this.ondata(strToU8(chunk), this.d = final || false);\n    };\n    return EncodeUTF8;\n}());\nexport { EncodeUTF8 };\n/**\n * Converts a string into a Uint8Array for use with compression/decompression methods\n * @param str The string to encode\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n *               not need to be true unless decoding a binary string.\n * @returns The string encoded in UTF-8/Latin-1 binary\n */\nexport function strToU8(str, latin1) {\n    if (latin1) {\n        var ar_1 = new u8(str.length);\n        for (var i = 0; i < str.length; ++i)\n            ar_1[i] = str.charCodeAt(i);\n        return ar_1;\n    }\n    if (te)\n        return te.encode(str);\n    var l = str.length;\n    var ar = new u8(str.length + (str.length >> 1));\n    var ai = 0;\n    var w = function (v) { ar[ai++] = v; };\n    for (var i = 0; i < l; ++i) {\n        if (ai + 5 > ar.length) {\n            var n = new u8(ai + 8 + ((l - i) << 1));\n            n.set(ar);\n            ar = n;\n        }\n        var c = str.charCodeAt(i);\n        if (c < 128 || latin1)\n            w(c);\n        else if (c < 2048)\n            w(192 | (c >> 6)), w(128 | (c & 63));\n        else if (c > 55295 && c < 57344)\n            c = 65536 + (c & 1023 << 10) | (str.charCodeAt(++i) & 1023),\n                w(240 | (c >> 18)), w(128 | ((c >> 12) & 63)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n        else\n            w(224 | (c >> 12)), w(128 | ((c >> 6) & 63)), w(128 | (c & 63));\n    }\n    return slc(ar, 0, ai);\n}\n/**\n * Converts a Uint8Array to a string\n * @param dat The data to decode to string\n * @param latin1 Whether or not to interpret the data as Latin-1. This should\n *               not need to be true unless encoding to binary string.\n * @returns The original UTF-8/Latin-1 string\n */\nexport function strFromU8(dat, latin1) {\n    if (latin1) {\n        var r = '';\n        for (var i = 0; i < dat.length; i += 16384)\n            r += String.fromCharCode.apply(null, dat.subarray(i, i + 16384));\n        return r;\n    }\n    else if (td) {\n        return td.decode(dat);\n    }\n    else {\n        var _a = dutf8(dat), s = _a.s, r = _a.r;\n        if (r.length)\n            err(8);\n        return s;\n    }\n}\n;\n// deflate bit flag\nvar dbf = function (l) { return l == 1 ? 3 : l < 6 ? 2 : l == 9 ? 1 : 0; };\n// skip local zip header\nvar slzh = function (d, b) { return b + 30 + b2(d, b + 26) + b2(d, b + 28); };\n// read zip header\nvar zh = function (d, b, z) {\n    var fnl = b2(d, b + 28), fn = strFromU8(d.subarray(b + 46, b + 46 + fnl), !(b2(d, b + 8) & 2048)), es = b + 46 + fnl, bs = b4(d, b + 20);\n    var _a = z && bs == 4294967295 ? z64e(d, es) : [bs, b4(d, b + 24), b4(d, b + 42)], sc = _a[0], su = _a[1], off = _a[2];\n    return [b2(d, b + 10), sc, su, fn, es + b2(d, b + 30) + b2(d, b + 32), off];\n};\n// read zip64 extra field\nvar z64e = function (d, b) {\n    for (; b2(d, b) != 1; b += 4 + b2(d, b + 2))\n        ;\n    return [b8(d, b + 12), b8(d, b + 4), b8(d, b + 20)];\n};\n// extra field length\nvar exfl = function (ex) {\n    var le = 0;\n    if (ex) {\n        for (var k in ex) {\n            var l = ex[k].length;\n            if (l > 65535)\n                err(9);\n            le += l + 4;\n        }\n    }\n    return le;\n};\n// write zip header\nvar wzh = function (d, b, f, fn, u, c, ce, co) {\n    var fl = fn.length, ex = f.extra, col = co && co.length;\n    var exl = exfl(ex);\n    wbytes(d, b, ce != null ? 0x2014B50 : 0x4034B50), b += 4;\n    if (ce != null)\n        d[b++] = 20, d[b++] = f.os;\n    d[b] = 20, b += 2; // spec compliance? what's that?\n    d[b++] = (f.flag << 1) | (c < 0 && 8), d[b++] = u && 8;\n    d[b++] = f.compression & 255, d[b++] = f.compression >> 8;\n    var dt = new Date(f.mtime == null ? Date.now() : f.mtime), y = dt.getFullYear() - 1980;\n    if (y < 0 || y > 119)\n        err(10);\n    wbytes(d, b, (y << 25) | ((dt.getMonth() + 1) << 21) | (dt.getDate() << 16) | (dt.getHours() << 11) | (dt.getMinutes() << 5) | (dt.getSeconds() >> 1)), b += 4;\n    if (c != -1) {\n        wbytes(d, b, f.crc);\n        wbytes(d, b + 4, c < 0 ? -c - 2 : c);\n        wbytes(d, b + 8, f.size);\n    }\n    wbytes(d, b + 12, fl);\n    wbytes(d, b + 14, exl), b += 16;\n    if (ce != null) {\n        wbytes(d, b, col);\n        wbytes(d, b + 6, f.attrs);\n        wbytes(d, b + 10, ce), b += 14;\n    }\n    d.set(fn, b);\n    b += fl;\n    if (exl) {\n        for (var k in ex) {\n            var exf = ex[k], l = exf.length;\n            wbytes(d, b, +k);\n            wbytes(d, b + 2, l);\n            d.set(exf, b + 4), b += 4 + l;\n        }\n    }\n    if (col)\n        d.set(co, b), b += col;\n    return b;\n};\n// write zip footer (end of central directory)\nvar wzf = function (o, b, c, d, e) {\n    wbytes(o, b, 0x6054B50); // skip disk\n    wbytes(o, b + 8, c);\n    wbytes(o, b + 10, c);\n    wbytes(o, b + 12, d);\n    wbytes(o, b + 16, e);\n};\n/**\n * A pass-through stream to keep data uncompressed in a ZIP archive.\n */\nvar ZipPassThrough = /*#__PURE__*/ (function () {\n    /**\n     * Creates a pass-through stream that can be added to ZIP archives\n     * @param filename The filename to associate with this data stream\n     */\n    function ZipPassThrough(filename) {\n        this.filename = filename;\n        this.c = crc();\n        this.size = 0;\n        this.compression = 0;\n    }\n    /**\n     * Processes a chunk and pushes to the output stream. You can override this\n     * method in a subclass for custom behavior, but by default this passes\n     * the data through. You must call this.ondata(err, chunk, final) at some\n     * point in this method.\n     * @param chunk The chunk to process\n     * @param final Whether this is the last chunk\n     */\n    ZipPassThrough.prototype.process = function (chunk, final) {\n        this.ondata(null, chunk, final);\n    };\n    /**\n     * Pushes a chunk to be added. If you are subclassing this with a custom\n     * compression algorithm, note that you must push data from the source\n     * file only, pre-compression.\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    ZipPassThrough.prototype.push = function (chunk, final) {\n        if (!this.ondata)\n            err(5);\n        this.c.p(chunk);\n        this.size += chunk.length;\n        if (final)\n            this.crc = this.c.d();\n        this.process(chunk, final || false);\n    };\n    return ZipPassThrough;\n}());\nexport { ZipPassThrough };\n// I don't extend because TypeScript extension adds 1kB of runtime bloat\n/**\n * Streaming DEFLATE compression for ZIP archives. Prefer using AsyncZipDeflate\n * for better performance\n */\nvar ZipDeflate = /*#__PURE__*/ (function () {\n    /**\n     * Creates a DEFLATE stream that can be added to ZIP archives\n     * @param filename The filename to associate with this data stream\n     * @param opts The compression options\n     */\n    function ZipDeflate(filename, opts) {\n        var _this_1 = this;\n        if (!opts)\n            opts = {};\n        ZipPassThrough.call(this, filename);\n        this.d = new Deflate(opts, function (dat, final) {\n            _this_1.ondata(null, dat, final);\n        });\n        this.compression = 8;\n        this.flag = dbf(opts.level);\n    }\n    ZipDeflate.prototype.process = function (chunk, final) {\n        try {\n            this.d.push(chunk, final);\n        }\n        catch (e) {\n            this.ondata(e, null, final);\n        }\n    };\n    /**\n     * Pushes a chunk to be deflated\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    ZipDeflate.prototype.push = function (chunk, final) {\n        ZipPassThrough.prototype.push.call(this, chunk, final);\n    };\n    return ZipDeflate;\n}());\nexport { ZipDeflate };\n/**\n * Asynchronous streaming DEFLATE compression for ZIP archives\n */\nvar AsyncZipDeflate = /*#__PURE__*/ (function () {\n    /**\n     * Creates an asynchronous DEFLATE stream that can be added to ZIP archives\n     * @param filename The filename to associate with this data stream\n     * @param opts The compression options\n     */\n    function AsyncZipDeflate(filename, opts) {\n        var _this_1 = this;\n        if (!opts)\n            opts = {};\n        ZipPassThrough.call(this, filename);\n        this.d = new AsyncDeflate(opts, function (err, dat, final) {\n            _this_1.ondata(err, dat, final);\n        });\n        this.compression = 8;\n        this.flag = dbf(opts.level);\n        this.terminate = this.d.terminate;\n    }\n    AsyncZipDeflate.prototype.process = function (chunk, final) {\n        this.d.push(chunk, final);\n    };\n    /**\n     * Pushes a chunk to be deflated\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    AsyncZipDeflate.prototype.push = function (chunk, final) {\n        ZipPassThrough.prototype.push.call(this, chunk, final);\n    };\n    return AsyncZipDeflate;\n}());\nexport { AsyncZipDeflate };\n// TODO: Better tree shaking\n/**\n * A zippable archive to which files can incrementally be added\n */\nvar Zip = /*#__PURE__*/ (function () {\n    /**\n     * Creates an empty ZIP archive to which files can be added\n     * @param cb The callback to call whenever data for the generated ZIP archive\n     *           is available\n     */\n    function Zip(cb) {\n        this.ondata = cb;\n        this.u = [];\n        this.d = 1;\n    }\n    /**\n     * Adds a file to the ZIP archive\n     * @param file The file stream to add\n     */\n    Zip.prototype.add = function (file) {\n        var _this_1 = this;\n        if (!this.ondata)\n            err(5);\n        // finishing or finished\n        if (this.d & 2)\n            this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, false);\n        else {\n            var f = strToU8(file.filename), fl_1 = f.length;\n            var com = file.comment, o = com && strToU8(com);\n            var u = fl_1 != file.filename.length || (o && (com.length != o.length));\n            var hl_1 = fl_1 + exfl(file.extra) + 30;\n            if (fl_1 > 65535)\n                this.ondata(err(11, 0, 1), null, false);\n            var header = new u8(hl_1);\n            wzh(header, 0, file, f, u, -1);\n            var chks_1 = [header];\n            var pAll_1 = function () {\n                for (var _i = 0, chks_2 = chks_1; _i < chks_2.length; _i++) {\n                    var chk = chks_2[_i];\n                    _this_1.ondata(null, chk, false);\n                }\n                chks_1 = [];\n            };\n            var tr_1 = this.d;\n            this.d = 0;\n            var ind_1 = this.u.length;\n            var uf_1 = mrg(file, {\n                f: f,\n                u: u,\n                o: o,\n                t: function () {\n                    if (file.terminate)\n                        file.terminate();\n                },\n                r: function () {\n                    pAll_1();\n                    if (tr_1) {\n                        var nxt = _this_1.u[ind_1 + 1];\n                        if (nxt)\n                            nxt.r();\n                        else\n                            _this_1.d = 1;\n                    }\n                    tr_1 = 1;\n                }\n            });\n            var cl_1 = 0;\n            file.ondata = function (err, dat, final) {\n                if (err) {\n                    _this_1.ondata(err, dat, final);\n                    _this_1.terminate();\n                }\n                else {\n                    cl_1 += dat.length;\n                    chks_1.push(dat);\n                    if (final) {\n                        var dd = new u8(16);\n                        wbytes(dd, 0, 0x8074B50);\n                        wbytes(dd, 4, file.crc);\n                        wbytes(dd, 8, cl_1);\n                        wbytes(dd, 12, file.size);\n                        chks_1.push(dd);\n                        uf_1.c = cl_1, uf_1.b = hl_1 + cl_1 + 16, uf_1.crc = file.crc, uf_1.size = file.size;\n                        if (tr_1)\n                            uf_1.r();\n                        tr_1 = 1;\n                    }\n                    else if (tr_1)\n                        pAll_1();\n                }\n            };\n            this.u.push(uf_1);\n        }\n    };\n    /**\n     * Ends the process of adding files and prepares to emit the final chunks.\n     * This *must* be called after adding all desired files for the resulting\n     * ZIP file to work properly.\n     */\n    Zip.prototype.end = function () {\n        var _this_1 = this;\n        if (this.d & 2) {\n            this.ondata(err(4 + (this.d & 1) * 8, 0, 1), null, true);\n            return;\n        }\n        if (this.d)\n            this.e();\n        else\n            this.u.push({\n                r: function () {\n                    if (!(_this_1.d & 1))\n                        return;\n                    _this_1.u.splice(-1, 1);\n                    _this_1.e();\n                },\n                t: function () { }\n            });\n        this.d = 3;\n    };\n    Zip.prototype.e = function () {\n        var bt = 0, l = 0, tl = 0;\n        for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n            var f = _a[_i];\n            tl += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0);\n        }\n        var out = new u8(tl + 22);\n        for (var _b = 0, _c = this.u; _b < _c.length; _b++) {\n            var f = _c[_b];\n            wzh(out, bt, f, f.f, f.u, -f.c - 2, l, f.o);\n            bt += 46 + f.f.length + exfl(f.extra) + (f.o ? f.o.length : 0), l += f.b;\n        }\n        wzf(out, bt, this.u.length, tl, l);\n        this.ondata(null, out, true);\n        this.d = 2;\n    };\n    /**\n     * A method to terminate any internal workers used by the stream. Subsequent\n     * calls to add() will fail.\n     */\n    Zip.prototype.terminate = function () {\n        for (var _i = 0, _a = this.u; _i < _a.length; _i++) {\n            var f = _a[_i];\n            f.t();\n        }\n        this.d = 2;\n    };\n    return Zip;\n}());\nexport { Zip };\nexport function zip(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    var r = {};\n    fltn(data, '', r, opts);\n    var k = Object.keys(r);\n    var lft = k.length, o = 0, tot = 0;\n    var slft = lft, files = new Array(lft);\n    var term = [];\n    var tAll = function () {\n        for (var i = 0; i < term.length; ++i)\n            term[i]();\n    };\n    var cbd = function (a, b) {\n        mt(function () { cb(a, b); });\n    };\n    mt(function () { cbd = cb; });\n    var cbf = function () {\n        var out = new u8(tot + 22), oe = o, cdl = tot - o;\n        tot = 0;\n        for (var i = 0; i < slft; ++i) {\n            var f = files[i];\n            try {\n                var l = f.c.length;\n                wzh(out, tot, f, f.f, f.u, l);\n                var badd = 30 + f.f.length + exfl(f.extra);\n                var loc = tot + badd;\n                out.set(f.c, loc);\n                wzh(out, o, f, f.f, f.u, l, tot, f.m), o += 16 + badd + (f.m ? f.m.length : 0), tot = loc + l;\n            }\n            catch (e) {\n                return cbd(e, null);\n            }\n        }\n        wzf(out, o, files.length, cdl, oe);\n        cbd(null, out);\n    };\n    if (!lft)\n        cbf();\n    var _loop_1 = function (i) {\n        var fn = k[i];\n        var _a = r[fn], file = _a[0], p = _a[1];\n        var c = crc(), size = file.length;\n        c.p(file);\n        var f = strToU8(fn), s = f.length;\n        var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n        var exl = exfl(p.extra);\n        var compression = p.level == 0 ? 0 : 8;\n        var cbl = function (e, d) {\n            if (e) {\n                tAll();\n                cbd(e, null);\n            }\n            else {\n                var l = d.length;\n                files[i] = mrg(p, {\n                    size: size,\n                    crc: c.d(),\n                    c: d,\n                    f: f,\n                    m: m,\n                    u: s != fn.length || (m && (com.length != ms)),\n                    compression: compression\n                });\n                o += 30 + s + exl + l;\n                tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n                if (!--lft)\n                    cbf();\n            }\n        };\n        if (s > 65535)\n            cbl(err(11, 0, 1), null);\n        if (!compression)\n            cbl(null, file);\n        else if (size < 160000) {\n            try {\n                cbl(null, deflateSync(file, p));\n            }\n            catch (e) {\n                cbl(e, null);\n            }\n        }\n        else\n            term.push(deflate(file, p, cbl));\n    };\n    // Cannot use lft because it can decrease\n    for (var i = 0; i < slft; ++i) {\n        _loop_1(i);\n    }\n    return tAll;\n}\n/**\n * Synchronously creates a ZIP file. Prefer using `zip` for better performance\n * with more than one file.\n * @param data The directory structure for the ZIP archive\n * @param opts The main options, merged with per-file options\n * @returns The generated ZIP archive\n */\nexport function zipSync(data, opts) {\n    if (!opts)\n        opts = {};\n    var r = {};\n    var files = [];\n    fltn(data, '', r, opts);\n    var o = 0;\n    var tot = 0;\n    for (var fn in r) {\n        var _a = r[fn], file = _a[0], p = _a[1];\n        var compression = p.level == 0 ? 0 : 8;\n        var f = strToU8(fn), s = f.length;\n        var com = p.comment, m = com && strToU8(com), ms = m && m.length;\n        var exl = exfl(p.extra);\n        if (s > 65535)\n            err(11);\n        var d = compression ? deflateSync(file, p) : file, l = d.length;\n        var c = crc();\n        c.p(file);\n        files.push(mrg(p, {\n            size: file.length,\n            crc: c.d(),\n            c: d,\n            f: f,\n            m: m,\n            u: s != fn.length || (m && (com.length != ms)),\n            o: o,\n            compression: compression\n        }));\n        o += 30 + s + exl + l;\n        tot += 76 + 2 * (s + exl) + (ms || 0) + l;\n    }\n    var out = new u8(tot + 22), oe = o, cdl = tot - o;\n    for (var i = 0; i < files.length; ++i) {\n        var f = files[i];\n        wzh(out, f.o, f, f.f, f.u, f.c.length);\n        var badd = 30 + f.f.length + exfl(f.extra);\n        out.set(f.c, f.o + badd);\n        wzh(out, o, f, f.f, f.u, f.c.length, f.o, f.m), o += 16 + badd + (f.m ? f.m.length : 0);\n    }\n    wzf(out, o, files.length, cdl, oe);\n    return out;\n}\n/**\n * Streaming pass-through decompression for ZIP archives\n */\nvar UnzipPassThrough = /*#__PURE__*/ (function () {\n    function UnzipPassThrough() {\n    }\n    UnzipPassThrough.prototype.push = function (data, final) {\n        this.ondata(null, data, final);\n    };\n    UnzipPassThrough.compression = 0;\n    return UnzipPassThrough;\n}());\nexport { UnzipPassThrough };\n/**\n * Streaming DEFLATE decompression for ZIP archives. Prefer AsyncZipInflate for\n * better performance.\n */\nvar UnzipInflate = /*#__PURE__*/ (function () {\n    /**\n     * Creates a DEFLATE decompression that can be used in ZIP archives\n     */\n    function UnzipInflate() {\n        var _this_1 = this;\n        this.i = new Inflate(function (dat, final) {\n            _this_1.ondata(null, dat, final);\n        });\n    }\n    UnzipInflate.prototype.push = function (data, final) {\n        try {\n            this.i.push(data, final);\n        }\n        catch (e) {\n            this.ondata(e, null, final);\n        }\n    };\n    UnzipInflate.compression = 8;\n    return UnzipInflate;\n}());\nexport { UnzipInflate };\n/**\n * Asynchronous streaming DEFLATE decompression for ZIP archives\n */\nvar AsyncUnzipInflate = /*#__PURE__*/ (function () {\n    /**\n     * Creates a DEFLATE decompression that can be used in ZIP archives\n     */\n    function AsyncUnzipInflate(_, sz) {\n        var _this_1 = this;\n        if (sz < 320000) {\n            this.i = new Inflate(function (dat, final) {\n                _this_1.ondata(null, dat, final);\n            });\n        }\n        else {\n            this.i = new AsyncInflate(function (err, dat, final) {\n                _this_1.ondata(err, dat, final);\n            });\n            this.terminate = this.i.terminate;\n        }\n    }\n    AsyncUnzipInflate.prototype.push = function (data, final) {\n        if (this.i.terminate)\n            data = slc(data, 0);\n        this.i.push(data, final);\n    };\n    AsyncUnzipInflate.compression = 8;\n    return AsyncUnzipInflate;\n}());\nexport { AsyncUnzipInflate };\n/**\n * A ZIP archive decompression stream that emits files as they are discovered\n */\nvar Unzip = /*#__PURE__*/ (function () {\n    /**\n     * Creates a ZIP decompression stream\n     * @param cb The callback to call whenever a file in the ZIP archive is found\n     */\n    function Unzip(cb) {\n        this.onfile = cb;\n        this.k = [];\n        this.o = {\n            0: UnzipPassThrough\n        };\n        this.p = et;\n    }\n    /**\n     * Pushes a chunk to be unzipped\n     * @param chunk The chunk to push\n     * @param final Whether this is the last chunk\n     */\n    Unzip.prototype.push = function (chunk, final) {\n        var _this_1 = this;\n        if (!this.onfile)\n            err(5);\n        if (!this.p)\n            err(4);\n        if (this.c > 0) {\n            var len = Math.min(this.c, chunk.length);\n            var toAdd = chunk.subarray(0, len);\n            this.c -= len;\n            if (this.d)\n                this.d.push(toAdd, !this.c);\n            else\n                this.k[0].push(toAdd);\n            chunk = chunk.subarray(len);\n            if (chunk.length)\n                return this.push(chunk, final);\n        }\n        else {\n            var f = 0, i = 0, is = void 0, buf = void 0;\n            if (!this.p.length)\n                buf = chunk;\n            else if (!chunk.length)\n                buf = this.p;\n            else {\n                buf = new u8(this.p.length + chunk.length);\n                buf.set(this.p), buf.set(chunk, this.p.length);\n            }\n            var l = buf.length, oc = this.c, add = oc && this.d;\n            var _loop_2 = function () {\n                var _a;\n                var sig = b4(buf, i);\n                if (sig == 0x4034B50) {\n                    f = 1, is = i;\n                    this_1.d = null;\n                    this_1.c = 0;\n                    var bf = b2(buf, i + 6), cmp_1 = b2(buf, i + 8), u = bf & 2048, dd = bf & 8, fnl = b2(buf, i + 26), es = b2(buf, i + 28);\n                    if (l > i + 30 + fnl + es) {\n                        var chks_3 = [];\n                        this_1.k.unshift(chks_3);\n                        f = 2;\n                        var sc_1 = b4(buf, i + 18), su_1 = b4(buf, i + 22);\n                        var fn_1 = strFromU8(buf.subarray(i + 30, i += 30 + fnl), !u);\n                        if (sc_1 == 4294967295) {\n                            _a = dd ? [-2] : z64e(buf, i), sc_1 = _a[0], su_1 = _a[1];\n                        }\n                        else if (dd)\n                            sc_1 = -1;\n                        i += es;\n                        this_1.c = sc_1;\n                        var d_1;\n                        var file_1 = {\n                            name: fn_1,\n                            compression: cmp_1,\n                            start: function () {\n                                if (!file_1.ondata)\n                                    err(5);\n                                if (!sc_1)\n                                    file_1.ondata(null, et, true);\n                                else {\n                                    var ctr = _this_1.o[cmp_1];\n                                    if (!ctr)\n                                        file_1.ondata(err(14, 'unknown compression type ' + cmp_1, 1), null, false);\n                                    d_1 = sc_1 < 0 ? new ctr(fn_1) : new ctr(fn_1, sc_1, su_1);\n                                    d_1.ondata = function (err, dat, final) { file_1.ondata(err, dat, final); };\n                                    for (var _i = 0, chks_4 = chks_3; _i < chks_4.length; _i++) {\n                                        var dat = chks_4[_i];\n                                        d_1.push(dat, false);\n                                    }\n                                    if (_this_1.k[0] == chks_3 && _this_1.c)\n                                        _this_1.d = d_1;\n                                    else\n                                        d_1.push(et, true);\n                                }\n                            },\n                            terminate: function () {\n                                if (d_1 && d_1.terminate)\n                                    d_1.terminate();\n                            }\n                        };\n                        if (sc_1 >= 0)\n                            file_1.size = sc_1, file_1.originalSize = su_1;\n                        this_1.onfile(file_1);\n                    }\n                    return \"break\";\n                }\n                else if (oc) {\n                    if (sig == 0x8074B50) {\n                        is = i += 12 + (oc == -2 && 8), f = 3, this_1.c = 0;\n                        return \"break\";\n                    }\n                    else if (sig == 0x2014B50) {\n                        is = i -= 4, f = 3, this_1.c = 0;\n                        return \"break\";\n                    }\n                }\n            };\n            var this_1 = this;\n            for (; i < l - 4; ++i) {\n                var state_1 = _loop_2();\n                if (state_1 === \"break\")\n                    break;\n            }\n            this.p = et;\n            if (oc < 0) {\n                var dat = f ? buf.subarray(0, is - 12 - (oc == -2 && 8) - (b4(buf, is - 16) == 0x8074B50 && 4)) : buf.subarray(0, i);\n                if (add)\n                    add.push(dat, !!f);\n                else\n                    this.k[+(f == 2)].push(dat);\n            }\n            if (f & 2)\n                return this.push(buf.subarray(i), final);\n            this.p = buf.subarray(i);\n        }\n        if (final) {\n            if (this.c)\n                err(13);\n            this.p = null;\n        }\n    };\n    /**\n     * Registers a decoder with the stream, allowing for files compressed with\n     * the compression type provided to be expanded correctly\n     * @param decoder The decoder constructor\n     */\n    Unzip.prototype.register = function (decoder) {\n        this.o[decoder.compression] = decoder;\n    };\n    return Unzip;\n}());\nexport { Unzip };\nvar mt = typeof queueMicrotask == 'function' ? queueMicrotask : typeof setTimeout == 'function' ? setTimeout : function (fn) { fn(); };\nexport function unzip(data, opts, cb) {\n    if (!cb)\n        cb = opts, opts = {};\n    if (typeof cb != 'function')\n        err(7);\n    var term = [];\n    var tAll = function () {\n        for (var i = 0; i < term.length; ++i)\n            term[i]();\n    };\n    var files = {};\n    var cbd = function (a, b) {\n        mt(function () { cb(a, b); });\n    };\n    mt(function () { cbd = cb; });\n    var e = data.length - 22;\n    for (; b4(data, e) != 0x6054B50; --e) {\n        if (!e || data.length - e > 65558) {\n            cbd(err(13, 0, 1), null);\n            return tAll;\n        }\n    }\n    ;\n    var lft = b2(data, e + 8);\n    if (lft) {\n        var c = lft;\n        var o = b4(data, e + 16);\n        var z = o == 4294967295 || c == 65535;\n        if (z) {\n            var ze = b4(data, e - 12);\n            z = b4(data, ze) == 0x6064B50;\n            if (z) {\n                c = lft = b4(data, ze + 32);\n                o = b4(data, ze + 48);\n            }\n        }\n        var fltr = opts && opts.filter;\n        var _loop_3 = function (i) {\n            var _a = zh(data, o, z), c_1 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n            o = no;\n            var cbl = function (e, d) {\n                if (e) {\n                    tAll();\n                    cbd(e, null);\n                }\n                else {\n                    if (d)\n                        files[fn] = d;\n                    if (!--lft)\n                        cbd(null, files);\n                }\n            };\n            if (!fltr || fltr({\n                name: fn,\n                size: sc,\n                originalSize: su,\n                compression: c_1\n            })) {\n                if (!c_1)\n                    cbl(null, slc(data, b, b + sc));\n                else if (c_1 == 8) {\n                    var infl = data.subarray(b, b + sc);\n                    if (sc < 320000) {\n                        try {\n                            cbl(null, inflateSync(infl, { out: new u8(su) }));\n                        }\n                        catch (e) {\n                            cbl(e, null);\n                        }\n                    }\n                    else\n                        term.push(inflate(infl, { size: su }, cbl));\n                }\n                else\n                    cbl(err(14, 'unknown compression type ' + c_1, 1), null);\n            }\n            else\n                cbl(null, null);\n        };\n        for (var i = 0; i < c; ++i) {\n            _loop_3(i);\n        }\n    }\n    else\n        cbd(null, {});\n    return tAll;\n}\n/**\n * Synchronously decompresses a ZIP archive. Prefer using `unzip` for better\n * performance with more than one file.\n * @param data The raw compressed ZIP file\n * @param opts The ZIP extraction options\n * @returns The decompressed files\n */\nexport function unzipSync(data, opts) {\n    var files = {};\n    var e = data.length - 22;\n    for (; b4(data, e) != 0x6054B50; --e) {\n        if (!e || data.length - e > 65558)\n            err(13);\n    }\n    ;\n    var c = b2(data, e + 8);\n    if (!c)\n        return {};\n    var o = b4(data, e + 16);\n    var z = o == 4294967295 || c == 65535;\n    if (z) {\n        var ze = b4(data, e - 12);\n        z = b4(data, ze) == 0x6064B50;\n        if (z) {\n            c = b4(data, ze + 32);\n            o = b4(data, ze + 48);\n        }\n    }\n    var fltr = opts && opts.filter;\n    for (var i = 0; i < c; ++i) {\n        var _a = zh(data, o, z), c_2 = _a[0], sc = _a[1], su = _a[2], fn = _a[3], no = _a[4], off = _a[5], b = slzh(data, off);\n        o = no;\n        if (!fltr || fltr({\n            name: fn,\n            size: sc,\n            originalSize: su,\n            compression: c_2\n        })) {\n            if (!c_2)\n                files[fn] = slc(data, b, b + sc);\n            else if (c_2 == 8)\n                files[fn] = inflateSync(data.subarray(b, b + sc), { out: new u8(su) });\n            else\n                err(14, 'unknown compression type ' + c_2);\n        }\n    }\n    return files;\n}\n","/**\n * @license\n * jsPDF filters PlugIn\n * Copyright (c) 2014 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\n\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var ASCII85Encode = function(a) {\n    var b, c, d, e, f, g, h, i, j, k;\n    // eslint-disable-next-line no-control-regex\n    for (\n      !/[^\\x00-\\xFF]/.test(a),\n        b = \"\\x00\\x00\\x00\\x00\".slice(a.length % 4 || 4),\n        a += b,\n        c = [],\n        d = 0,\n        e = a.length;\n      e > d;\n      d += 4\n    )\n      (f =\n        (a.charCodeAt(d) << 24) +\n        (a.charCodeAt(d + 1) << 16) +\n        (a.charCodeAt(d + 2) << 8) +\n        a.charCodeAt(d + 3)),\n        0 !== f\n          ? ((k = f % 85),\n            (f = (f - k) / 85),\n            (j = f % 85),\n            (f = (f - j) / 85),\n            (i = f % 85),\n            (f = (f - i) / 85),\n            (h = f % 85),\n            (f = (f - h) / 85),\n            (g = f % 85),\n            c.push(g + 33, h + 33, i + 33, j + 33, k + 33))\n          : c.push(122);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(c, b.length),\n      String.fromCharCode.apply(String, c) + \"~>\"\n    );\n  };\n\n  var ASCII85Decode = function(a) {\n    var c,\n      d,\n      e,\n      f,\n      g,\n      h = String,\n      l = \"length\",\n      w = 255,\n      x = \"charCodeAt\",\n      y = \"slice\",\n      z = \"replace\";\n    for (\n      \"~>\" === a[y](-2),\n        a = a[y](0, -2)\n          [z](/\\s/g, \"\")\n          [z](\"z\", \"!!!!!\"),\n        c = \"uuuuu\"[y](a[l] % 5 || 5),\n        a += c,\n        e = [],\n        f = 0,\n        g = a[l];\n      g > f;\n      f += 5\n    )\n      (d =\n        52200625 * (a[x](f) - 33) +\n        614125 * (a[x](f + 1) - 33) +\n        7225 * (a[x](f + 2) - 33) +\n        85 * (a[x](f + 3) - 33) +\n        (a[x](f + 4) - 33)),\n        e.push(w & (d >> 24), w & (d >> 16), w & (d >> 8), w & d);\n    return (\n      (function(a, b) {\n        for (var c = b; c > 0; c--) a.pop();\n      })(e, c[l]),\n      h.fromCharCode.apply(h, e)\n    );\n  };\n\n  var ASCIIHexEncode = function(value) {\n    return (\n      value\n        .split(\"\")\n        .map(function(value) {\n          return (\"0\" + value.charCodeAt().toString(16)).slice(-2);\n        })\n        .join(\"\") + \">\"\n    );\n  };\n\n  var ASCIIHexDecode = function(value) {\n    var regexCheckIfHex = new RegExp(/^([0-9A-Fa-f]{2})+$/);\n    value = value.replace(/\\s/g, \"\");\n    if (value.indexOf(\">\") !== -1) {\n      value = value.substr(0, value.indexOf(\">\"));\n    }\n    if (value.length % 2) {\n      value += \"0\";\n    }\n    if (regexCheckIfHex.test(value) === false) {\n      return \"\";\n    }\n    var result = \"\";\n    for (var i = 0; i < value.length; i += 2) {\n      result += String.fromCharCode(\"0x\" + (value[i] + value[i + 1]));\n    }\n    return result;\n  };\n  /*\n  var FlatePredictors = {\n      None: 1,\n      TIFF: 2,\n      PNG_None: 10,\n      PNG_Sub: 11,\n      PNG_Up: 12,\n      PNG_Average: 13,\n      PNG_Paeth: 14,\n      PNG_Optimum: 15\n  };\n  */\n\n  var FlateEncode = function(data) {\n    var arr = new Uint8Array(data.length);\n    var i = data.length;\n    while (i--) {\n      arr[i] = data.charCodeAt(i);\n    }\n    arr = zlibSync(arr);\n    data = arr.reduce(function(data, byte) {\n      return data + String.fromCharCode(byte);\n    }, \"\");\n    return data;\n  };\n\n  jsPDFAPI.processDataByFilters = function(origData, filterChain) {\n    \"use strict\";\n    var i = 0;\n    var data = origData || \"\";\n    var reverseChain = [];\n    filterChain = filterChain || [];\n\n    if (typeof filterChain === \"string\") {\n      filterChain = [filterChain];\n    }\n\n    for (i = 0; i < filterChain.length; i += 1) {\n      switch (filterChain[i]) {\n        case \"ASCII85Decode\":\n        case \"/ASCII85Decode\":\n          data = ASCII85Decode(data);\n          reverseChain.push(\"/ASCII85Encode\");\n          break;\n        case \"ASCII85Encode\":\n        case \"/ASCII85Encode\":\n          data = ASCII85Encode(data);\n          reverseChain.push(\"/ASCII85Decode\");\n          break;\n        case \"ASCIIHexDecode\":\n        case \"/ASCIIHexDecode\":\n          data = ASCIIHexDecode(data);\n          reverseChain.push(\"/ASCIIHexEncode\");\n          break;\n        case \"ASCIIHexEncode\":\n        case \"/ASCIIHexEncode\":\n          data = ASCIIHexEncode(data);\n          reverseChain.push(\"/ASCIIHexDecode\");\n          break;\n        case \"FlateEncode\":\n        case \"/FlateEncode\":\n          data = FlateEncode(data);\n          reverseChain.push(\"/FlateDecode\");\n          break;\n        default:\n          throw new Error(\n            'The filter: \"' + filterChain[i] + '\" is not implemented'\n          );\n      }\n    }\n\n    return { data: data, reverseChain: reverseChain.reverse().join(\" \") };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF fileloading PlugIn\n * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name fileloading\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name loadFile\n   * @function\n   * @param {string} url\n   * @param {boolean} sync\n   * @param {function} callback\n   * @returns {string|undefined} result\n   */\n  jsPDFAPI.loadFile = function(url, sync, callback) {\n    return browserRequest(url, sync, callback);\n\n  };\n\n  /**\n   * @name loadImageFile\n   * @function\n   * @param {string} path\n   * @param {boolean} sync\n   * @param {function} callback\n   */\n  jsPDFAPI.loadImageFile = jsPDFAPI.loadFile;\n\n  function browserRequest(url, sync, callback) {\n    sync = sync === false ? false : true;\n    callback = typeof callback === \"function\" ? callback : function() {};\n    var result = undefined;\n\n    var xhr = function(url, sync, callback) {\n      var request = new XMLHttpRequest();\n      var i = 0;\n\n      var sanitizeUnicode = function(data) {\n        var dataLength = data.length;\n        var charArray = [];\n        var StringFromCharCode = String.fromCharCode;\n\n        //Transform Unicode to ASCII\n        for (i = 0; i < dataLength; i += 1) {\n          charArray.push(StringFromCharCode(data.charCodeAt(i) & 0xff));\n        }\n        return charArray.join(\"\");\n      };\n\n      request.open(\"GET\", url, !sync);\n      // XHR binary charset opt by Marcus Granado 2006 [http://mgran.blogspot.com]\n      request.overrideMimeType(\"text/plain; charset=x-user-defined\");\n\n      if (sync === false) {\n        request.onload = function() {\n          if (request.status === 200) {\n            callback(sanitizeUnicode(this.responseText));\n          } else {\n            callback(undefined);\n          }\n        };\n      }\n      request.send(null);\n\n      if (sync && request.status === 200) {\n        return sanitizeUnicode(request.responseText);\n      }\n    };\n    try {\n      result = xhr(url, sync, callback);\n      // eslint-disable-next-line no-empty\n    } catch (e) {}\n    return result;\n  }\n\n  function nodeReadFile(url, sync, callback) {\n    sync = sync === false ? false : true;\n    var result = undefined;\n\n    var fs = require(\"fs\");\n    var path = require(\"path\");\n\n    url = path.resolve(url);\n    if (sync) {\n      try {\n        result = fs.readFileSync(url, { encoding: \"latin1\" });\n      } catch (e) {\n        return undefined;\n      }\n    } else {\n      fs.readFile(url, { encoding: \"latin1\" }, function(err, data) {\n        if (!callback) {\n          return;\n        }\n        if (err) {\n          callback(undefined);\n        }\n        callback(data);\n      });\n    }\n\n    return result;\n  }\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2018 Erik Koopmans\n * Released under the MIT License.\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { normalizeFontFace } from \"../libs/fontFace.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF html PlugIn\n *\n * @name html\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadHtml2Canvas() {\n    return (function() {\n      if (globalObject[\"html2canvas\"]) {\n        return Promise.resolve(globalObject[\"html2canvas\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"html2canvas\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"html2canvas\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load html2canvas\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load html2canvas: \" + e));\n      })\n      .then(function(html2canvas) {\n        return html2canvas.default ? html2canvas.default : html2canvas;\n      });\n  }\n\n  function loadDomPurify() {\n    return (function() {\n      if (globalObject[\"DOMPurify\"]) {\n        return Promise.resolve(globalObject[\"DOMPurify\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"dompurify\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"dompurify\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load dompurify\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load dompurify: \" + e));\n      })\n      .then(function(dompurify) {\n        return dompurify.default ? dompurify.default : dompurify;\n      });\n  }\n\n  /**\n   * Determine the type of a variable/object.\n   *\n   * @private\n   * @ignore\n   */\n  var objType = function(obj) {\n    var type = typeof obj;\n    if (type === \"undefined\") return \"undefined\";\n    else if (type === \"string\" || obj instanceof String) return \"string\";\n    else if (type === \"number\" || obj instanceof Number) return \"number\";\n    else if (type === \"function\" || obj instanceof Function) return \"function\";\n    else if (!!obj && obj.constructor === Array) return \"array\";\n    else if (obj && obj.nodeType === 1) return \"element\";\n    else if (type === \"object\") return \"object\";\n    else return \"unknown\";\n  };\n\n  /**\n   * Create an HTML element with optional className, innerHTML, and style.\n   *\n   * @private\n   * @ignore\n   */\n  var createElement = function(tagName, opt) {\n    var el = document.createElement(tagName);\n    if (opt.className) el.className = opt.className;\n    if (opt.innerHTML && opt.dompurify) {\n      el.innerHTML = opt.dompurify.sanitize(opt.innerHTML);\n    }\n    for (var key in opt.style) {\n      el.style[key] = opt.style[key];\n    }\n    return el;\n  };\n\n  /**\n   * Deep-clone a node and preserve contents/properties.\n   *\n   * @private\n   * @ignore\n   */\n  var cloneNode = function(node, javascriptEnabled) {\n    // Recursively clone the node.\n    var clone =\n      node.nodeType === 3\n        ? document.createTextNode(node.nodeValue)\n        : node.cloneNode(false);\n    for (var child = node.firstChild; child; child = child.nextSibling) {\n      if (\n        javascriptEnabled === true ||\n        child.nodeType !== 1 ||\n        child.nodeName !== \"SCRIPT\"\n      ) {\n        clone.appendChild(cloneNode(child, javascriptEnabled));\n      }\n    }\n\n    if (node.nodeType === 1) {\n      // Preserve contents/properties of special nodes.\n      if (node.nodeName === \"CANVAS\") {\n        clone.width = node.width;\n        clone.height = node.height;\n        clone.getContext(\"2d\").drawImage(node, 0, 0);\n      } else if (node.nodeName === \"TEXTAREA\" || node.nodeName === \"SELECT\") {\n        clone.value = node.value;\n      }\n\n      // Preserve the node's scroll position when it loads.\n      clone.addEventListener(\n        \"load\",\n        function() {\n          clone.scrollTop = node.scrollTop;\n          clone.scrollLeft = node.scrollLeft;\n        },\n        true\n      );\n    }\n\n    // Return the cloned node.\n    return clone;\n  };\n\n  /* ----- CONSTRUCTOR ----- */\n\n  var Worker = function Worker(opt) {\n    // Create the root parent for the proto chain, and the starting Worker.\n    var root = Object.assign(\n      Worker.convert(Promise.resolve()),\n      JSON.parse(JSON.stringify(Worker.template))\n    );\n    var self = Worker.convert(Promise.resolve(), root);\n\n    // Set progress, optional settings, and return.\n    self = self.setProgress(1, Worker, 1, [Worker]);\n    self = self.set(opt);\n    return self;\n  };\n\n  // Boilerplate for subclassing Promise.\n  Worker.prototype = Object.create(Promise.prototype);\n  Worker.prototype.constructor = Worker;\n\n  // Converts/casts promises into Workers.\n  Worker.convert = function convert(promise, inherit) {\n    // Uses prototypal inheritance to receive changes made to ancestors' properties.\n    promise.__proto__ = inherit || Worker.prototype;\n    return promise;\n  };\n\n  Worker.template = {\n    prop: {\n      src: null,\n      container: null,\n      overlay: null,\n      canvas: null,\n      img: null,\n      pdf: null,\n      pageSize: null,\n      callback: function() {}\n    },\n    progress: {\n      val: 0,\n      state: null,\n      n: 0,\n      stack: []\n    },\n    opt: {\n      filename: \"file.pdf\",\n      margin: [0, 0, 0, 0],\n      enableLinks: true,\n      x: 0,\n      y: 0,\n      html2canvas: {},\n      jsPDF: {},\n      backgroundColor: \"transparent\"\n    }\n  };\n\n  /* ----- FROM / TO ----- */\n\n  Worker.prototype.from = function from(src, type) {\n    function getType(src) {\n      switch (objType(src)) {\n        case \"string\":\n          return \"string\";\n        case \"element\":\n          return src.nodeName.toLowerCase() === \"canvas\" ? \"canvas\" : \"element\";\n        default:\n          return \"unknown\";\n      }\n    }\n\n    return this.then(function from_main() {\n      type = type || getType(src);\n      switch (type) {\n        case \"string\":\n          return this.then(loadDomPurify).then(function(dompurify) {\n            return this.set({\n              src: createElement(\"div\", {\n                innerHTML: src,\n                dompurify: dompurify\n              })\n            });\n          });\n        case \"element\":\n          return this.set({ src: src });\n        case \"canvas\":\n          return this.set({ canvas: src });\n        case \"img\":\n          return this.set({ img: src });\n        default:\n          return this.error(\"Unknown source type.\");\n      }\n    });\n  };\n\n  Worker.prototype.to = function to(target) {\n    // Route the 'to' request to the appropriate method.\n    switch (target) {\n      case \"container\":\n        return this.toContainer();\n      case \"canvas\":\n        return this.toCanvas();\n      case \"img\":\n        return this.toImg();\n      case \"pdf\":\n        return this.toPdf();\n      default:\n        return this.error(\"Invalid target.\");\n    }\n  };\n\n  Worker.prototype.toContainer = function toContainer() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkSrc() {\n        return (\n          this.prop.src || this.error(\"Cannot duplicate - no source HTML.\")\n        );\n      },\n      function checkPageSize() {\n        return this.prop.pageSize || this.setPageSize();\n      }\n    ];\n    return this.thenList(prereqs).then(function toContainer_main() {\n      // Define the CSS styles for the container and its overlay parent.\n      var overlayCSS = {\n        position: \"fixed\",\n        overflow: \"hidden\",\n        zIndex: 1000,\n        left: \"-100000px\",\n        right: 0,\n        bottom: 0,\n        top: 0\n      };\n      var containerCSS = {\n        position: \"relative\",\n        display: \"inline-block\",\n        width:\n          (typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.windowWidth\n            : Math.max(\n                this.prop.src.clientWidth,\n                this.prop.src.scrollWidth,\n                this.prop.src.offsetWidth\n              )) + \"px\",\n        left: 0,\n        right: 0,\n        top: 0,\n        margin: \"auto\",\n        backgroundColor: this.opt.backgroundColor\n      }; // Set the overlay to hidden (could be changed in the future to provide a print preview).\n\n      var source = cloneNode(\n        this.prop.src,\n        this.opt.html2canvas.javascriptEnabled\n      );\n\n      if (source.tagName === \"BODY\") {\n        containerCSS.height =\n          Math.max(\n            document.body.scrollHeight,\n            document.body.offsetHeight,\n            document.documentElement.clientHeight,\n            document.documentElement.scrollHeight,\n            document.documentElement.offsetHeight\n          ) + \"px\";\n      }\n\n      this.prop.overlay = createElement(\"div\", {\n        className: \"html2pdf__overlay\",\n        style: overlayCSS\n      });\n      this.prop.container = createElement(\"div\", {\n        className: \"html2pdf__container\",\n        style: containerCSS\n      });\n      this.prop.container.appendChild(source);\n      this.prop.container.firstChild.appendChild(\n        createElement(\"div\", {\n          style: {\n            clear: \"both\",\n            border: \"0 none transparent\",\n            margin: 0,\n            padding: 0,\n            height: 0\n          }\n        })\n      );\n      this.prop.container.style.float = \"none\";\n      this.prop.overlay.appendChild(this.prop.container);\n      document.body.appendChild(this.prop.overlay);\n      this.prop.container.firstChild.style.position = \"relative\";\n      this.prop.container.height =\n        Math.max(\n          this.prop.container.firstChild.clientHeight,\n          this.prop.container.firstChild.scrollHeight,\n          this.prop.container.firstChild.offsetHeight\n        ) + \"px\";\n    });\n  };\n\n  Worker.prototype.toCanvas = function toCanvas() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toCanvas_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var options = Object.assign({}, this.opt.html2canvas);\n        delete options.onrendered;\n\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toCanvas_post(canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toContext2d = function toContext2d() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContainer() {\n        return (\n          document.body.contains(this.prop.container) || this.toContainer()\n        );\n      }\n    ];\n\n    // Fulfill prereqs then create the canvas.\n    return this.thenList(prereqs)\n      .then(loadHtml2Canvas)\n      .then(function toContext2d_main(html2canvas) {\n        // Handle old-fashioned 'onrendered' argument.\n\n        var pdf = this.opt.jsPDF;\n        var fontFaces = this.opt.fontFaces;\n\n        var scale =\n          typeof this.opt.width === \"number\" &&\n          !isNaN(this.opt.width) &&\n          typeof this.opt.windowWidth === \"number\" &&\n          !isNaN(this.opt.windowWidth)\n            ? this.opt.width / this.opt.windowWidth\n            : 1;\n\n        var options = Object.assign(\n          {\n            async: true,\n            allowTaint: true,\n            scale: scale,\n            scrollX: this.opt.scrollX || 0,\n            scrollY: this.opt.scrollY || 0,\n            backgroundColor: \"#ffffff\",\n            imageTimeout: 15000,\n            logging: true,\n            proxy: null,\n            removeContainer: true,\n            foreignObjectRendering: false,\n            useCORS: false\n          },\n          this.opt.html2canvas\n        );\n        delete options.onrendered;\n\n        pdf.context2d.autoPaging =\n          typeof this.opt.autoPaging === \"undefined\"\n            ? true\n            : this.opt.autoPaging;\n        pdf.context2d.posX = this.opt.x;\n        pdf.context2d.posY = this.opt.y;\n        pdf.context2d.margin = this.opt.margin;\n        pdf.context2d.fontFaces = fontFaces;\n\n        if (fontFaces) {\n          for (var i = 0; i < fontFaces.length; ++i) {\n            var font = fontFaces[i];\n            var src = font.src.find(function(src) {\n              return src.format === \"truetype\";\n            });\n\n            if (src) {\n              pdf.addFont(src.url, font.ref.name, font.ref.style);\n            }\n          }\n        }\n\n        options.windowHeight = options.windowHeight || 0;\n        options.windowHeight =\n          options.windowHeight == 0\n            ? Math.max(\n                this.prop.container.clientHeight,\n                this.prop.container.scrollHeight,\n                this.prop.container.offsetHeight\n              )\n            : options.windowHeight;\n\n        pdf.context2d.save(true);\n        return html2canvas(this.prop.container, options);\n      })\n      .then(function toContext2d_post(canvas) {\n        this.opt.jsPDF.context2d.restore(true);\n\n        // Handle old-fashioned 'onrendered' argument.\n        var onRendered = this.opt.html2canvas.onrendered || function() {};\n        onRendered(canvas);\n\n        this.prop.canvas = canvas;\n        document.body.removeChild(this.prop.overlay);\n      });\n  };\n\n  Worker.prototype.toImg = function toImg() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkCanvas() {\n        return this.prop.canvas || this.toCanvas();\n      }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toImg_main() {\n      var imgData = this.prop.canvas.toDataURL(\n        \"image/\" + this.opt.image.type,\n        this.opt.image.quality\n      );\n      this.prop.img = document.createElement(\"img\");\n      this.prop.img.src = imgData;\n    });\n  };\n\n  Worker.prototype.toPdf = function toPdf() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkContext2d() {\n        return this.toContext2d();\n      }\n      //function checkCanvas() { return this.prop.canvas || this.toCanvas(); }\n    ];\n\n    // Fulfill prereqs then create the image.\n    return this.thenList(prereqs).then(function toPdf_main() {\n      // Create local copies of frequently used properties.\n      this.prop.pdf = this.prop.pdf || this.opt.jsPDF;\n    });\n  };\n\n  /* ----- OUTPUT / SAVE ----- */\n\n  Worker.prototype.output = function output(type, options, src) {\n    // Redirect requests to the correct function (outputPdf / outputImg).\n    src = src || \"pdf\";\n    if (src.toLowerCase() === \"img\" || src.toLowerCase() === \"image\") {\n      return this.outputImg(type, options);\n    } else {\n      return this.outputPdf(type, options);\n    }\n  };\n\n  Worker.prototype.outputPdf = function outputPdf(type, options) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputPdf_main() {\n      /* Currently implemented output types:\n       *    https://rawgit.com/MrRio/jsPDF/master/docs/jspdf.js.html#line992\n       *  save(options), arraybuffer, blob, bloburi/bloburl,\n       *  datauristring/dataurlstring, dataurlnewwindow, datauri/dataurl\n       */\n      return this.prop.pdf.output(type, options);\n    });\n  };\n\n  Worker.prototype.outputImg = function outputImg(type) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkImg() {\n        return this.prop.img || this.toImg();\n      }\n    ];\n\n    // Fulfill prereqs then perform the appropriate output.\n    return this.thenList(prereqs).then(function outputImg_main() {\n      switch (type) {\n        case undefined:\n        case \"img\":\n          return this.prop.img;\n        case \"datauristring\":\n        case \"dataurlstring\":\n          return this.prop.img.src;\n        case \"datauri\":\n        case \"dataurl\":\n          return (document.location.href = this.prop.img.src);\n        default:\n          throw 'Image output type \"' + type + '\" is not supported.';\n      }\n    });\n  };\n\n  Worker.prototype.save = function save(filename) {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs)\n      .set(filename ? { filename: filename } : null)\n      .then(function save_main() {\n        this.prop.pdf.save(this.opt.filename);\n      });\n  };\n\n  Worker.prototype.doCallback = function doCallback() {\n    // Set up function prerequisites.\n    var prereqs = [\n      function checkPdf() {\n        return this.prop.pdf || this.toPdf();\n      }\n    ];\n\n    // Fulfill prereqs, update the filename (if provided), and save the PDF.\n    return this.thenList(prereqs).then(function doCallback_main() {\n      this.prop.callback(this.prop.pdf);\n    });\n  };\n\n  /* ----- SET / GET ----- */\n\n  Worker.prototype.set = function set(opt) {\n    // TODO: Implement ordered pairs?\n\n    // Silently ignore invalid or empty input.\n    if (objType(opt) !== \"object\") {\n      return this;\n    }\n\n    // Build an array of setter functions to queue.\n    var fns = Object.keys(opt || {}).map(function(key) {\n      if (key in Worker.template.prop) {\n        // Set pre-defined properties.\n        return function set_prop() {\n          this.prop[key] = opt[key];\n        };\n      } else {\n        switch (key) {\n          case \"margin\":\n            return this.setMargin.bind(this, opt.margin);\n          case \"jsPDF\":\n            return function set_jsPDF() {\n              this.opt.jsPDF = opt.jsPDF;\n              return this.setPageSize();\n            };\n          case \"pageSize\":\n            return this.setPageSize.bind(this, opt.pageSize);\n          default:\n            // Set any other properties in opt.\n            return function set_opt() {\n              this.opt[key] = opt[key];\n            };\n        }\n      }\n    }, this);\n\n    // Set properties within the promise chain.\n    return this.then(function set_main() {\n      return this.thenList(fns);\n    });\n  };\n\n  Worker.prototype.get = function get(key, cbk) {\n    return this.then(function get_main() {\n      // Fetch the requested property, either as a predefined prop or in opt.\n      var val = key in Worker.template.prop ? this.prop[key] : this.opt[key];\n      return cbk ? cbk(val) : val;\n    });\n  };\n\n  Worker.prototype.setMargin = function setMargin(margin) {\n    return this.then(function setMargin_main() {\n      // Parse the margin property.\n      switch (objType(margin)) {\n        case \"number\":\n          margin = [margin, margin, margin, margin];\n        // eslint-disable-next-line no-fallthrough\n        case \"array\":\n          if (margin.length === 2) {\n            margin = [margin[0], margin[1], margin[0], margin[1]];\n          }\n          if (margin.length === 4) {\n            break;\n          }\n        // eslint-disable-next-line no-fallthrough\n        default:\n          return this.error(\"Invalid margin array.\");\n      }\n\n      // Set the margin property, then update pageSize.\n      this.opt.margin = margin;\n    }).then(this.setPageSize);\n  };\n\n  Worker.prototype.setPageSize = function setPageSize(pageSize) {\n    function toPx(val, k) {\n      return Math.floor(((val * k) / 72) * 96);\n    }\n\n    return this.then(function setPageSize_main() {\n      // Retrieve page-size based on jsPDF settings, if not explicitly provided.\n      pageSize = pageSize || jsPDF.getPageSize(this.opt.jsPDF);\n\n      // Add 'inner' field if not present.\n      if (!pageSize.hasOwnProperty(\"inner\")) {\n        pageSize.inner = {\n          width: pageSize.width - this.opt.margin[1] - this.opt.margin[3],\n          height: pageSize.height - this.opt.margin[0] - this.opt.margin[2]\n        };\n        pageSize.inner.px = {\n          width: toPx(pageSize.inner.width, pageSize.k),\n          height: toPx(pageSize.inner.height, pageSize.k)\n        };\n        pageSize.inner.ratio = pageSize.inner.height / pageSize.inner.width;\n      }\n\n      // Attach pageSize to this.\n      this.prop.pageSize = pageSize;\n    });\n  };\n\n  Worker.prototype.setProgress = function setProgress(val, state, n, stack) {\n    // Immediately update all progress values.\n    if (val != null) this.progress.val = val;\n    if (state != null) this.progress.state = state;\n    if (n != null) this.progress.n = n;\n    if (stack != null) this.progress.stack = stack;\n    this.progress.ratio = this.progress.val / this.progress.state;\n\n    // Return this for command chaining.\n    return this;\n  };\n\n  Worker.prototype.updateProgress = function updateProgress(\n    val,\n    state,\n    n,\n    stack\n  ) {\n    // Immediately update all progress values, using setProgress.\n    return this.setProgress(\n      val ? this.progress.val + val : null,\n      state ? state : null,\n      n ? this.progress.n + n : null,\n      stack ? this.progress.stack.concat(stack) : null\n    );\n  };\n\n  /* ----- PROMISE MAPPING ----- */\n\n  Worker.prototype.then = function then(onFulfilled, onRejected) {\n    // Wrap `this` for encapsulation.\n    var self = this;\n\n    return this.thenCore(onFulfilled, onRejected, function then_main(\n      onFulfilled,\n      onRejected\n    ) {\n      // Update progress while queuing, calling, and resolving `then`.\n      self.updateProgress(null, null, 1, [onFulfilled]);\n      return Promise.prototype.then\n        .call(this, function then_pre(val) {\n          self.updateProgress(null, onFulfilled);\n          return val;\n        })\n        .then(onFulfilled, onRejected)\n        .then(function then_post(val) {\n          self.updateProgress(1);\n          return val;\n        });\n    });\n  };\n\n  Worker.prototype.thenCore = function thenCore(\n    onFulfilled,\n    onRejected,\n    thenBase\n  ) {\n    // Handle optional thenBase parameter.\n    thenBase = thenBase || Promise.prototype.then;\n\n    // Wrap `this` for encapsulation and bind it to the promise handlers.\n    var self = this;\n    if (onFulfilled) {\n      onFulfilled = onFulfilled.bind(self);\n    }\n    if (onRejected) {\n      onRejected = onRejected.bind(self);\n    }\n\n    // Cast self into a Promise to avoid polyfills recursively defining `then`.\n    var isNative =\n      Promise.toString().indexOf(\"[native code]\") !== -1 &&\n      Promise.name === \"Promise\";\n    var selfPromise = isNative\n      ? self\n      : Worker.convert(Object.assign({}, self), Promise.prototype);\n\n    // Return the promise, after casting it into a Worker and preserving props.\n    var returnVal = thenBase.call(selfPromise, onFulfilled, onRejected);\n    return Worker.convert(returnVal, self.__proto__);\n  };\n\n  Worker.prototype.thenExternal = function thenExternal(\n    onFulfilled,\n    onRejected\n  ) {\n    // Call `then` and return a standard promise (exits the Worker chain).\n    return Promise.prototype.then.call(this, onFulfilled, onRejected);\n  };\n\n  Worker.prototype.thenList = function thenList(fns) {\n    // Queue a series of promise 'factories' into the promise chain.\n    var self = this;\n    fns.forEach(function thenList_forEach(fn) {\n      self = self.thenCore(fn);\n    });\n    return self;\n  };\n\n  Worker.prototype[\"catch\"] = function(onRejected) {\n    // Bind `this` to the promise handler, call `catch`, and return a Worker.\n    if (onRejected) {\n      onRejected = onRejected.bind(this);\n    }\n    var returnVal = Promise.prototype[\"catch\"].call(this, onRejected);\n    return Worker.convert(returnVal, this);\n  };\n\n  Worker.prototype.catchExternal = function catchExternal(onRejected) {\n    // Call `catch` and return a standard promise (exits the Worker chain).\n    return Promise.prototype[\"catch\"].call(this, onRejected);\n  };\n\n  Worker.prototype.error = function error(msg) {\n    // Throw the error in the Promise chain.\n    return this.then(function error_main() {\n      throw new Error(msg);\n    });\n  };\n\n  /* ----- ALIASES ----- */\n\n  Worker.prototype.using = Worker.prototype.set;\n  Worker.prototype.saveAs = Worker.prototype.save;\n  Worker.prototype.export = Worker.prototype.output;\n  Worker.prototype.run = Worker.prototype.then;\n\n  // Get dimensions of a PDF page, as determined by jsPDF.\n  jsPDF.getPageSize = function(orientation, unit, format) {\n    // Decode options object\n    if (typeof orientation === \"object\") {\n      var options = orientation;\n      orientation = options.orientation;\n      unit = options.unit || unit;\n      format = options.format || format;\n    }\n\n    // Default options\n    unit = unit || \"mm\";\n    format = format || \"a4\";\n    orientation = (\"\" + (orientation || \"P\")).toLowerCase();\n    var format_as_string = (\"\" + format).toLowerCase();\n\n    // Size in pt of various paper formats\n    var pageFormats = {\n      a0: [2383.94, 3370.39],\n      a1: [1683.78, 2383.94],\n      a2: [1190.55, 1683.78],\n      a3: [841.89, 1190.55],\n      a4: [595.28, 841.89],\n      a5: [419.53, 595.28],\n      a6: [297.64, 419.53],\n      a7: [209.76, 297.64],\n      a8: [147.4, 209.76],\n      a9: [104.88, 147.4],\n      a10: [73.7, 104.88],\n      b0: [2834.65, 4008.19],\n      b1: [2004.09, 2834.65],\n      b2: [1417.32, 2004.09],\n      b3: [1000.63, 1417.32],\n      b4: [708.66, 1000.63],\n      b5: [498.9, 708.66],\n      b6: [354.33, 498.9],\n      b7: [249.45, 354.33],\n      b8: [175.75, 249.45],\n      b9: [124.72, 175.75],\n      b10: [87.87, 124.72],\n      c0: [2599.37, 3676.54],\n      c1: [1836.85, 2599.37],\n      c2: [1298.27, 1836.85],\n      c3: [918.43, 1298.27],\n      c4: [649.13, 918.43],\n      c5: [459.21, 649.13],\n      c6: [323.15, 459.21],\n      c7: [229.61, 323.15],\n      c8: [161.57, 229.61],\n      c9: [113.39, 161.57],\n      c10: [79.37, 113.39],\n      dl: [311.81, 623.62],\n      letter: [612, 792],\n      \"government-letter\": [576, 756],\n      legal: [612, 1008],\n      \"junior-legal\": [576, 360],\n      ledger: [1224, 792],\n      tabloid: [792, 1224],\n      \"credit-card\": [153, 243]\n    };\n\n    var k;\n    // Unit conversion\n    switch (unit) {\n      case \"pt\":\n        k = 1;\n        break;\n      case \"mm\":\n        k = 72 / 25.4;\n        break;\n      case \"cm\":\n        k = 72 / 2.54;\n        break;\n      case \"in\":\n        k = 72;\n        break;\n      case \"px\":\n        k = 72 / 96;\n        break;\n      case \"pc\":\n        k = 12;\n        break;\n      case \"em\":\n        k = 12;\n        break;\n      case \"ex\":\n        k = 6;\n        break;\n      default:\n        throw \"Invalid unit: \" + unit;\n    }\n    var pageHeight = 0;\n    var pageWidth = 0;\n\n    // Dimensions are stored as user units and converted to points on output\n    if (pageFormats.hasOwnProperty(format_as_string)) {\n      pageHeight = pageFormats[format_as_string][1] / k;\n      pageWidth = pageFormats[format_as_string][0] / k;\n    } else {\n      try {\n        pageHeight = format[1];\n        pageWidth = format[0];\n      } catch (err) {\n        throw new Error(\"Invalid format: \" + format);\n      }\n    }\n\n    var tmp;\n    // Handle page orientation\n    if (orientation === \"p\" || orientation === \"portrait\") {\n      orientation = \"p\";\n      if (pageWidth > pageHeight) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else if (orientation === \"l\" || orientation === \"landscape\") {\n      orientation = \"l\";\n      if (pageHeight > pageWidth) {\n        tmp = pageWidth;\n        pageWidth = pageHeight;\n        pageHeight = tmp;\n      }\n    } else {\n      throw \"Invalid orientation: \" + orientation;\n    }\n\n    // Return information (k is the unit conversion ratio from pts)\n    var info = {\n      width: pageWidth,\n      height: pageHeight,\n      unit: unit,\n      k: k,\n      orientation: orientation\n    };\n    return info;\n  };\n\n  /**\n   * @typedef FontFace\n   *\n   * The font-face type implements an interface similar to that of the font-face CSS rule,\n   * and is used by jsPDF to match fonts when the font property of CanvasRenderingContext2D\n   * is updated.\n   *\n   * All properties expect values similar to those in the font-face CSS rule. A difference\n   * is the font-family, which do not need to be enclosed in double-quotes when containing\n   * spaces like in CSS.\n   *\n   * @property {string} family The name of the font-family.\n   * @property {string|undefined} style The style that this font-face defines, e.g. 'italic'.\n   * @property {string|number|undefined} weight The weight of the font, either as a string or a number (400, 500, 600, e.g.)\n   * @property {string|undefined} stretch The stretch of the font, e.g. condensed, normal, expanded.\n   * @property {Object[]} src A list of URLs from where fonts of various formats can be fetched.\n   * @property {string} [src] url A URL to a font of a specific format.\n   * @property {string} [src] format Format of the font referenced by the URL.\n   */\n\n  /**\n   * Generate a PDF from an HTML element or string using.\n   *\n   * @name html\n   * @function\n   * @param {HTMLElement|string} source The source HTMLElement or a string containing HTML.\n   * @param {Object} [options] Collection of settings\n   * @param {function} [options.callback] The mandatory callback-function gets as first parameter the current jsPDF instance\n   * @param {(number|number[])=} [options.margin] Page margins [top, right, bottom, left]. Default is 0.\n   * @param {(boolean|'slice'|'text')=} [options.autoPaging] The auto paging mode.\n   * <ul>\n   * <li>\n   *   <code>false</code>: Auto paging is disabled.\n   * </li>\n   * <li>\n   *   <code>true</code> or <code>'slice'</code>: Will cut shapes or text chunks across page breaks. Will possibly\n   *   slice text in half, making it difficult to read.\n   * </li>\n   * <li>\n   *   <code>'text'</code>: Trys not to cut text in half across page breaks. Works best for documents consisting\n   *   mostly of a single column of text.\n   * </li>\n   * </ul>\n   * Default is <code>true</code>.\n   * @param {string} [options.filename] name of the file\n   * @param {HTMLOptionImage} [options.image] image settings when converting HTML to image\n   * @param {Html2CanvasOptions} [options.html2canvas] html2canvas options\n   * @param {FontFace[]} [options.fontFaces] A list of font-faces to match when resolving fonts. Fonts will be added to the PDF based on the specified URL. If omitted, the font match algorithm falls back to old algorithm.\n   * @param {jsPDF} [options.jsPDF] jsPDF instance\n   * @param {number=} [options.x] x position on the PDF document in jsPDF units.\n   * @param {number=} [options.y] y position on the PDF document in jsPDF units.\n   * @param {number=} [options.width] The target width in the PDF document in jsPDF units. The rendered element will be\n   * scaled such that it fits into the specified width. Has no effect if either the <code>html2canvas.scale<code> is\n   * specified or the <code>windowWidth</code> option is NOT specified.\n   * @param {number=} [options.windowWidth] The window width in CSS pixels. In contrast to the\n   * <code>html2canvas.windowWidth</code> option, this option affects the actual container size while rendering and\n   * does NOT affect CSS media queries. This option only has an effect, if the <code>width<code> option is also specified.\n   *\n   * @example\n   * var doc = new jsPDF();\n   *\n   * doc.html(document.body, {\n   *    callback: function (doc) {\n   *      doc.save();\n   *    },\n   *    x: 10,\n   *    y: 10\n   * });\n   */\n  jsPDFAPI.html = function(src, options) {\n    \"use strict\";\n\n    options = options || {};\n    options.callback = options.callback || function() {};\n    options.html2canvas = options.html2canvas || {};\n    options.html2canvas.canvas = options.html2canvas.canvas || this.canvas;\n    options.jsPDF = options.jsPDF || this;\n    options.fontFaces = options.fontFaces\n      ? options.fontFaces.map(normalizeFontFace)\n      : null;\n\n    // Create a new worker with the given options.\n    var worker = new Worker(options);\n\n    if (!options.worker) {\n      // If worker is not set to true, perform the traditional 'simple' operation.\n      return worker.from(src).doCallback();\n    } else {\n      // Otherwise, return the worker for new Promise-based operation.\n      return worker;\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF JavaScript plugin\n *\n * @name javascript\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  var jsNamesObj, jsJsObj, text;\n  /**\n   * @name addJS\n   * @function\n   * @param {string} javascript The javascript to be embedded into the PDF-file.\n   * @returns {jsPDF}\n   */\n  jsPDFAPI.addJS = function(javascript) {\n    text = javascript;\n    this.internal.events.subscribe(\"postPutResources\", function() {\n      jsNamesObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/Names [(EmbeddedJS) \" + (jsNamesObj + 1) + \" 0 R]\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n\n      jsJsObj = this.internal.newObject();\n      this.internal.out(\"<<\");\n      this.internal.out(\"/S /JavaScript\");\n      this.internal.out(\"/JS (\" + text + \")\");\n      this.internal.out(\">>\");\n      this.internal.out(\"endobj\");\n    });\n    this.internal.events.subscribe(\"putCatalog\", function() {\n      if (jsNamesObj !== undefined && jsJsObj !== undefined) {\n        this.internal.out(\"/Names <</JavaScript \" + jsNamesObj + \" 0 R>>\");\n      }\n    });\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF Outline PlugIn\n *\n * Generates a PDF Outline\n * @name outline\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var namesOid;\n  //var destsGoto = [];\n\n  jsPDFAPI.events.push([\n    \"postPutResources\",\n    function() {\n      var pdf = this;\n      var rx = /^(\\d+) 0 obj$/;\n\n      // Write action goto objects for each page\n      // this.outline.destsGoto = [];\n      // for (var i = 0; i < totalPages; i++) {\n      // var id = pdf.internal.newObject();\n      // this.outline.destsGoto.push(id);\n      // pdf.internal.write(\"<</D[\" + (i * 2 + 3) + \" 0 R /XYZ null\n      // null null]/S/GoTo>> endobj\");\n      // }\n      //\n      // for (var i = 0; i < dests.length; i++) {\n      // pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0\n      // R\");\n      // }\n      //\n      if (this.outline.root.children.length > 0) {\n        var lines = pdf.outline.render().split(/\\r\\n/);\n        for (var i = 0; i < lines.length; i++) {\n          var line = lines[i];\n          var m = rx.exec(line);\n          if (m != null) {\n            var oid = m[1];\n            pdf.internal.newObjectDeferredBegin(oid, false);\n          }\n          pdf.internal.write(line);\n        }\n      }\n\n      // This code will write named destination for each page reference\n      // (page_1, etc)\n      if (this.outline.createNamedDestinations) {\n        var totalPages = this.internal.pages.length;\n        // WARNING: this assumes jsPDF starts on page 3 and pageIDs\n        // follow 5, 7, 9, etc\n        // Write destination objects for each page\n        var dests = [];\n        for (var i = 0; i < totalPages; i++) {\n          var id = pdf.internal.newObject();\n          dests.push(id);\n          var info = pdf.internal.getPageInfo(i + 1);\n          pdf.internal.write(\n            \"<< /D[\" + info.objId + \" 0 R /XYZ null null null]>> endobj\"\n          );\n        }\n\n        // assign a name for each destination\n        var names2Oid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Names [ \");\n        for (var i = 0; i < dests.length; i++) {\n          pdf.internal.write(\"(page_\" + (i + 1) + \")\" + dests[i] + \" 0 R\");\n        }\n        pdf.internal.write(\" ] >>\", \"endobj\");\n\n        // var kids = pdf.internal.newObject();\n        // pdf.internal.write('<< /Kids [ ' + names2Oid + ' 0 R');\n        // pdf.internal.write(' ] >>', 'endobj');\n\n        namesOid = pdf.internal.newObject();\n        pdf.internal.write(\"<< /Dests \" + names2Oid + \" 0 R\");\n        pdf.internal.write(\">>\", \"endobj\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"putCatalog\",\n    function() {\n      var pdf = this;\n      if (pdf.outline.root.children.length > 0) {\n        pdf.internal.write(\n          \"/Outlines\",\n          this.outline.makeRef(this.outline.root)\n        );\n        if (this.outline.createNamedDestinations) {\n          pdf.internal.write(\"/Names \" + namesOid + \" 0 R\");\n        }\n        // Open with Bookmarks showing\n        // pdf.internal.write(\"/PageMode /UseOutlines\");\n      }\n    }\n  ]);\n\n  jsPDFAPI.events.push([\n    \"initialized\",\n    function() {\n      var pdf = this;\n\n      pdf.outline = {\n        createNamedDestinations: false,\n        root: {\n          children: []\n        }\n      };\n\n      /**\n       * Options: pageNumber\n       */\n      pdf.outline.add = function(parent, title, options) {\n        var item = {\n          title: title,\n          options: options,\n          children: []\n        };\n        if (parent == null) {\n          parent = this.root;\n        }\n        parent.children.push(item);\n        return item;\n      };\n\n      pdf.outline.render = function() {\n        this.ctx = {};\n        this.ctx.val = \"\";\n        this.ctx.pdf = pdf;\n\n        this.genIds_r(this.root);\n        this.renderRoot(this.root);\n        this.renderItems(this.root);\n\n        return this.ctx.val;\n      };\n\n      pdf.outline.genIds_r = function(node) {\n        node.id = pdf.internal.newObjectDeferred();\n        for (var i = 0; i < node.children.length; i++) {\n          this.genIds_r(node.children[i]);\n        }\n      };\n\n      pdf.outline.renderRoot = function(node) {\n        this.objStart(node);\n        this.line(\"/Type /Outlines\");\n        if (node.children.length > 0) {\n          this.line(\"/First \" + this.makeRef(node.children[0]));\n          this.line(\n            \"/Last \" + this.makeRef(node.children[node.children.length - 1])\n          );\n        }\n        this.line(\n          \"/Count \" +\n            this.count_r(\n              {\n                count: 0\n              },\n              node\n            )\n        );\n        this.objEnd();\n      };\n\n      pdf.outline.renderItems = function(node) {\n        var getVerticalCoordinateString = this.ctx.pdf.internal\n          .getVerticalCoordinateString;\n        for (var i = 0; i < node.children.length; i++) {\n          var item = node.children[i];\n          this.objStart(item);\n\n          this.line(\"/Title \" + this.makeString(item.title));\n\n          this.line(\"/Parent \" + this.makeRef(node));\n          if (i > 0) {\n            this.line(\"/Prev \" + this.makeRef(node.children[i - 1]));\n          }\n          if (i < node.children.length - 1) {\n            this.line(\"/Next \" + this.makeRef(node.children[i + 1]));\n          }\n          if (item.children.length > 0) {\n            this.line(\"/First \" + this.makeRef(item.children[0]));\n            this.line(\n              \"/Last \" + this.makeRef(item.children[item.children.length - 1])\n            );\n          }\n\n          var count = (this.count = this.count_r(\n            {\n              count: 0\n            },\n            item\n          ));\n          if (count > 0) {\n            this.line(\"/Count \" + count);\n          }\n\n          if (item.options) {\n            if (item.options.pageNumber) {\n              // Explicit Destination\n              //WARNING this assumes page ids are 3,5,7, etc.\n              var info = pdf.internal.getPageInfo(item.options.pageNumber);\n              this.line(\n                \"/Dest \" +\n                  \"[\" +\n                  info.objId +\n                  \" 0 R /XYZ 0 \" +\n                  getVerticalCoordinateString(0) +\n                  \" 0]\"\n              );\n              // this line does not work on all clients (pageNumber instead of page ref)\n              //this.line('/Dest ' + '[' + (item.options.pageNumber - 1) + ' /XYZ 0 ' + this.ctx.pdf.internal.pageSize.getHeight() + ' 0]');\n\n              // Named Destination\n              // this.line('/Dest (page_' + (item.options.pageNumber) + ')');\n\n              // Action Destination\n              // var id = pdf.internal.newObject();\n              // pdf.internal.write('<</D[' + (item.options.pageNumber - 1) + ' /XYZ null null null]/S/GoTo>> endobj');\n              // this.line('/A ' + id + ' 0 R' );\n            }\n          }\n          this.objEnd();\n        }\n        for (var z = 0; z < node.children.length; z++) {\n          this.renderItems(node.children[z]);\n        }\n      };\n\n      pdf.outline.line = function(text) {\n        this.ctx.val += text + \"\\r\\n\";\n      };\n\n      pdf.outline.makeRef = function(node) {\n        return node.id + \" 0 R\";\n      };\n\n      pdf.outline.makeString = function(val) {\n        return \"(\" + pdf.internal.pdfEscape(val) + \")\";\n      };\n\n      pdf.outline.objStart = function(node) {\n        this.ctx.val += \"\\r\\n\" + node.id + \" 0 obj\" + \"\\r\\n<<\\r\\n\";\n      };\n\n      pdf.outline.objEnd = function() {\n        this.ctx.val += \">> \\r\\n\" + \"endobj\" + \"\\r\\n\";\n      };\n\n      pdf.outline.count_r = function(ctx, node) {\n        for (var i = 0; i < node.children.length; i++) {\n          ctx.count++;\n          this.count_r(ctx, node.children[i]);\n        }\n        return ctx.count;\n      };\n    }\n  ]);\n\n  return this;\n})(jsPDF.API);\n","/**\n * @license\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF jpeg Support PlugIn\n *\n * @name jpeg_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * 0xc0 (SOF) Huffman  - Baseline DCT\n   * 0xc1 (SOF) Huffman  - Extended sequential DCT\n   * 0xc2 Progressive DCT (SOF2)\n   * 0xc3 Spatial (sequential) lossless (SOF3)\n   * 0xc4 Differential sequential DCT (SOF5)\n   * 0xc5 Differential progressive DCT (SOF6)\n   * 0xc6 Differential spatial (SOF7)\n   * 0xc7\n   */\n  var markers = [0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7];\n\n  //takes a string imgData containing the raw bytes of\n  //a jpeg image and returns [width, height]\n  //Algorithm from: http://www.64lines.com/jpeg-width-height\n  var getJpegInfo = function(imgData) {\n    var width, height, numcomponents;\n    var blockLength = imgData.charCodeAt(4) * 256 + imgData.charCodeAt(5);\n    var len = imgData.length;\n    var result = { width: 0, height: 0, numcomponents: 1 };\n    for (var i = 4; i < len; i += 2) {\n      i += blockLength;\n      if (markers.indexOf(imgData.charCodeAt(i + 1)) !== -1) {\n        height = imgData.charCodeAt(i + 5) * 256 + imgData.charCodeAt(i + 6);\n        width = imgData.charCodeAt(i + 7) * 256 + imgData.charCodeAt(i + 8);\n        numcomponents = imgData.charCodeAt(i + 9);\n        result = { width: width, height: height, numcomponents: numcomponents };\n        break;\n      } else {\n        blockLength =\n          imgData.charCodeAt(i + 2) * 256 + imgData.charCodeAt(i + 3);\n      }\n    }\n    return result;\n  };\n\n  /**\n   * @ignore\n   */\n  jsPDFAPI.processJPEG = function(\n    data,\n    index,\n    alias,\n    compression,\n    dataAsBinaryString,\n    colorSpace\n  ) {\n    var filter = this.decode.DCT_DECODE,\n      bpc = 8,\n      dims,\n      result = null;\n\n    if (\n      typeof data === \"string\" ||\n      this.__addimage__.isArrayBuffer(data) ||\n      this.__addimage__.isArrayBufferView(data)\n    ) {\n      // if we already have a stored binary string rep use that\n      data = dataAsBinaryString || data;\n      data = this.__addimage__.isArrayBuffer(data)\n        ? new Uint8Array(data)\n        : data;\n      data = this.__addimage__.isArrayBufferView(data)\n        ? this.__addimage__.arrayBufferToBinaryString(data)\n        : data;\n\n      dims = getJpegInfo(data);\n      switch (dims.numcomponents) {\n        case 1:\n          colorSpace = this.color_spaces.DEVICE_GRAY;\n          break;\n        case 4:\n          colorSpace = this.color_spaces.DEVICE_CMYK;\n          break;\n        case 3:\n          colorSpace = this.color_spaces.DEVICE_RGB;\n          break;\n      }\n\n      result = {\n        data: data,\n        width: dims.width,\n        height: dims.height,\n        colorSpace: colorSpace,\n        bitsPerComponent: bpc,\n        filter: filter,\n        index: index,\n        alias: alias\n      };\n    }\n    return result;\n  };\n})(jsPDF.API);\n","// Generated by CoffeeScript 1.4.0\n\n/**\n * @license\n * PNG.js\n * Copyright (c) 2011 Devon Govett\n * MIT LICENSE\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this\n * software and associated documentation files (the \"Software\"), to deal in the Software\n * without restriction, including without limitation the rights to use, copy, modify, merge,\n * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons\n * to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or\n * substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\n * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\nimport { unzlibSync } from \"./fflate.js\";\nimport { globalObject } from \"./globalObject.js\";\n\nvar PNG = (function() {\n  var APNG_BLEND_OP_OVER,\n    APNG_BLEND_OP_SOURCE,\n    APNG_DISPOSE_OP_BACKGROUND,\n    APNG_DISPOSE_OP_NONE,\n    APNG_DISPOSE_OP_PREVIOUS,\n    makeImage,\n    scratchCanvas,\n    scratchCtx;\n\n  APNG_DISPOSE_OP_NONE = 0;\n\n  APNG_DISPOSE_OP_BACKGROUND = 1;\n\n  APNG_DISPOSE_OP_PREVIOUS = 2;\n\n  APNG_BLEND_OP_SOURCE = 0;\n\n  APNG_BLEND_OP_OVER = 1;\n\n  function PNG(data) {\n    var chunkSize,\n      colors,\n      palLen,\n      delayDen,\n      delayNum,\n      frame,\n      i,\n      index,\n      key,\n      section,\n      palShort,\n      text,\n      _i,\n      _j,\n      _ref;\n    this.data = data;\n    this.pos = 8;\n    this.palette = [];\n    this.imgData = [];\n    this.transparency = {};\n    this.animation = null;\n    this.text = {};\n    frame = null;\n    while (true) {\n      chunkSize = this.readUInt32();\n      section = function() {\n        var _i, _results;\n        _results = [];\n        for (i = _i = 0; _i < 4; i = ++_i) {\n          _results.push(String.fromCharCode(this.data[this.pos++]));\n        }\n        return _results;\n      }\n        .call(this)\n        .join(\"\");\n      switch (section) {\n        case \"IHDR\":\n          this.width = this.readUInt32();\n          this.height = this.readUInt32();\n          this.bits = this.data[this.pos++];\n          this.colorType = this.data[this.pos++];\n          this.compressionMethod = this.data[this.pos++];\n          this.filterMethod = this.data[this.pos++];\n          this.interlaceMethod = this.data[this.pos++];\n          break;\n        case \"acTL\":\n          this.animation = {\n            numFrames: this.readUInt32(),\n            numPlays: this.readUInt32() || Infinity,\n            frames: []\n          };\n          break;\n        case \"PLTE\":\n          this.palette = this.read(chunkSize);\n          break;\n        case \"fcTL\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.pos += 4;\n          frame = {\n            width: this.readUInt32(),\n            height: this.readUInt32(),\n            xOffset: this.readUInt32(),\n            yOffset: this.readUInt32()\n          };\n          delayNum = this.readUInt16();\n          delayDen = this.readUInt16() || 100;\n          frame.delay = (1000 * delayNum) / delayDen;\n          frame.disposeOp = this.data[this.pos++];\n          frame.blendOp = this.data[this.pos++];\n          frame.data = [];\n          break;\n        case \"IDAT\":\n        case \"fdAT\":\n          if (section === \"fdAT\") {\n            this.pos += 4;\n            chunkSize -= 4;\n          }\n          data = (frame != null ? frame.data : void 0) || this.imgData;\n          for (\n            i = _i = 0;\n            0 <= chunkSize ? _i < chunkSize : _i > chunkSize;\n            i = 0 <= chunkSize ? ++_i : --_i\n          ) {\n            data.push(this.data[this.pos++]);\n          }\n          break;\n        case \"tRNS\":\n          this.transparency = {};\n          switch (this.colorType) {\n            case 3:\n              palLen = this.palette.length / 3;\n              this.transparency.indexed = this.read(chunkSize);\n              if (this.transparency.indexed.length > palLen)\n                throw new Error(\"More transparent colors than palette size\");\n              /*\n               * According to the PNG spec trns should be increased to the same size as palette if shorter\n               */\n              //palShort = 255 - this.transparency.indexed.length;\n              palShort = palLen - this.transparency.indexed.length;\n              if (palShort > 0) {\n                for (\n                  i = _j = 0;\n                  0 <= palShort ? _j < palShort : _j > palShort;\n                  i = 0 <= palShort ? ++_j : --_j\n                ) {\n                  this.transparency.indexed.push(255);\n                }\n              }\n              break;\n            case 0:\n              this.transparency.grayscale = this.read(chunkSize)[0];\n              break;\n            case 2:\n              this.transparency.rgb = this.read(chunkSize);\n          }\n          break;\n        case \"tEXt\":\n          text = this.read(chunkSize);\n          index = text.indexOf(0);\n          key = String.fromCharCode.apply(String, text.slice(0, index));\n          this.text[key] = String.fromCharCode.apply(\n            String,\n            text.slice(index + 1)\n          );\n          break;\n        case \"IEND\":\n          if (frame) {\n            this.animation.frames.push(frame);\n          }\n          this.colors = function() {\n            switch (this.colorType) {\n              case 0:\n              case 3:\n              case 4:\n                return 1;\n              case 2:\n              case 6:\n                return 3;\n            }\n          }.call(this);\n          this.hasAlphaChannel = (_ref = this.colorType) === 4 || _ref === 6;\n          colors = this.colors + (this.hasAlphaChannel ? 1 : 0);\n          this.pixelBitlength = this.bits * colors;\n          this.colorSpace = function() {\n            switch (this.colors) {\n              case 1:\n                return \"DeviceGray\";\n              case 3:\n                return \"DeviceRGB\";\n            }\n          }.call(this);\n          this.imgData = new Uint8Array(this.imgData);\n          return;\n        default:\n          this.pos += chunkSize;\n      }\n      this.pos += 4;\n      if (this.pos > this.data.length) {\n        throw new Error(\"Incomplete or corrupt PNG file\");\n      }\n    }\n  }\n\n  PNG.prototype.read = function(bytes) {\n    var i, _i, _results;\n    _results = [];\n    for (\n      i = _i = 0;\n      0 <= bytes ? _i < bytes : _i > bytes;\n      i = 0 <= bytes ? ++_i : --_i\n    ) {\n      _results.push(this.data[this.pos++]);\n    }\n    return _results;\n  };\n\n  PNG.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.data[this.pos++] << 24;\n    b2 = this.data[this.pos++] << 16;\n    b3 = this.data[this.pos++] << 8;\n    b4 = this.data[this.pos++];\n    return b1 | b2 | b3 | b4;\n  };\n\n  PNG.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.data[this.pos++] << 8;\n    b2 = this.data[this.pos++];\n    return b1 | b2;\n  };\n\n  PNG.prototype.decodePixels = function(data) {\n    var pixelBytes = this.pixelBitlength / 8;\n    var fullPixels = new Uint8Array(this.width * this.height * pixelBytes);\n    var pos = 0;\n    var _this = this;\n\n    if (data == null) {\n      data = this.imgData;\n    }\n    if (data.length === 0) {\n      return new Uint8Array(0);\n    }\n\n    data = unzlibSync(data);\n    function pass(x0, y0, dx, dy) {\n      var abyte,\n        c,\n        col,\n        i,\n        left,\n        length,\n        p,\n        pa,\n        paeth,\n        pb,\n        pc,\n        pixels,\n        row,\n        scanlineLength,\n        upper,\n        upperLeft,\n        _i,\n        _j,\n        _k,\n        _l,\n        _m;\n      var w = Math.ceil((_this.width - x0) / dx),\n        h = Math.ceil((_this.height - y0) / dy);\n      var isFull = _this.width == w && _this.height == h;\n      scanlineLength = pixelBytes * w;\n      pixels = isFull ? fullPixels : new Uint8Array(scanlineLength * h);\n      length = data.length;\n      row = 0;\n      c = 0;\n      while (row < h && pos < length) {\n        switch (data[pos++]) {\n          case 0:\n            for (i = _i = 0; _i < scanlineLength; i = _i += 1) {\n              pixels[c++] = data[pos++];\n            }\n            break;\n          case 1:\n            for (i = _j = 0; _j < scanlineLength; i = _j += 1) {\n              abyte = data[pos++];\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              pixels[c++] = (abyte + left) % 256;\n            }\n            break;\n          case 2:\n            for (i = _k = 0; _k < scanlineLength; i = _k += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (upper + abyte) % 256;\n            }\n            break;\n          case 3:\n            for (i = _l = 0; _l < scanlineLength; i = _l += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              upper =\n                row &&\n                pixels[\n                  (row - 1) * scanlineLength +\n                    col * pixelBytes +\n                    (i % pixelBytes)\n                ];\n              pixels[c++] = (abyte + Math.floor((left + upper) / 2)) % 256;\n            }\n            break;\n          case 4:\n            for (i = _m = 0; _m < scanlineLength; i = _m += 1) {\n              abyte = data[pos++];\n              col = (i - (i % pixelBytes)) / pixelBytes;\n              left = i < pixelBytes ? 0 : pixels[c - pixelBytes];\n              if (row === 0) {\n                upper = upperLeft = 0;\n              } else {\n                upper =\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      col * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n                upperLeft =\n                  col &&\n                  pixels[\n                    (row - 1) * scanlineLength +\n                      (col - 1) * pixelBytes +\n                      (i % pixelBytes)\n                  ];\n              }\n              p = left + upper - upperLeft;\n              pa = Math.abs(p - left);\n              pb = Math.abs(p - upper);\n              pc = Math.abs(p - upperLeft);\n              if (pa <= pb && pa <= pc) {\n                paeth = left;\n              } else if (pb <= pc) {\n                paeth = upper;\n              } else {\n                paeth = upperLeft;\n              }\n              pixels[c++] = (abyte + paeth) % 256;\n            }\n            break;\n          default:\n            throw new Error(\"Invalid filter algorithm: \" + data[pos - 1]);\n        }\n        if (!isFull) {\n          var fullPos = ((y0 + row * dy) * _this.width + x0) * pixelBytes;\n          var partPos = row * scanlineLength;\n          for (i = 0; i < w; i += 1) {\n            for (var j = 0; j < pixelBytes; j += 1)\n              fullPixels[fullPos++] = pixels[partPos++];\n            fullPos += (dx - 1) * pixelBytes;\n          }\n        }\n        row++;\n      }\n    }\n    if (_this.interlaceMethod == 1) {\n      /*\n          1 6 4 6 2 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n          3 6 4 6 3 6 4 6\n          7 7 7 7 7 7 7 7\n          5 6 5 6 5 6 5 6\n          7 7 7 7 7 7 7 7\n        */\n      pass(0, 0, 8, 8); // 1\n      /* NOTE these seem to follow the pattern:\n       * pass(x, 0, 2*x, 2*x);\n       * pass(0, x,   x, 2*x);\n       * with x being 4, 2, 1.\n       */\n      pass(4, 0, 8, 8); // 2\n      pass(0, 4, 4, 8); // 3\n\n      pass(2, 0, 4, 4); // 4\n      pass(0, 2, 2, 4); // 5\n\n      pass(1, 0, 2, 2); // 6\n      pass(0, 1, 1, 2); // 7\n    } else {\n      pass(0, 0, 1, 1);\n    }\n    return fullPixels;\n  };\n\n  PNG.prototype.decodePalette = function() {\n    var c, i, length, palette, pos, ret, transparency, _i, _ref, _ref1;\n    palette = this.palette;\n    transparency = this.transparency.indexed || [];\n    ret = new Uint8Array((transparency.length || 0) + palette.length);\n    pos = 0;\n    length = palette.length;\n    c = 0;\n    for (i = _i = 0, _ref = length; _i < _ref; i = _i += 3) {\n      ret[pos++] = palette[i];\n      ret[pos++] = palette[i + 1];\n      ret[pos++] = palette[i + 2];\n      ret[pos++] = (_ref1 = transparency[c++]) != null ? _ref1 : 255;\n    }\n    return ret;\n  };\n\n  PNG.prototype.copyToImageData = function(imageData, pixels) {\n    var alpha, colors, data, i, input, j, k, length, palette, v, _ref;\n    colors = this.colors;\n    palette = null;\n    alpha = this.hasAlphaChannel;\n    if (this.palette.length) {\n      palette =\n        (_ref = this._decodedPalette) != null\n          ? _ref\n          : (this._decodedPalette = this.decodePalette());\n      colors = 4;\n      alpha = true;\n    }\n    data = imageData.data || imageData;\n    length = data.length;\n    input = palette || pixels;\n    i = j = 0;\n    if (colors === 1) {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        v = input[k++];\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = v;\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    } else {\n      while (i < length) {\n        k = palette ? pixels[i / 4] * 4 : j;\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = input[k++];\n        data[i++] = alpha ? input[k++] : 255;\n        j = k;\n      }\n    }\n  };\n\n  PNG.prototype.decode = function() {\n    var ret;\n    ret = new Uint8Array(this.width * this.height * 4);\n    this.copyToImageData(ret, this.decodePixels());\n    return ret;\n  };\n\n  var hasBrowserCanvas = function() {\n    if (Object.prototype.toString.call(globalObject) === \"[object Window]\") {\n      try {\n        scratchCanvas = globalObject.document.createElement(\"canvas\");\n        scratchCtx = scratchCanvas.getContext(\"2d\");\n      } catch (e) {\n        return false;\n      }\n      return true;\n    }\n    return false;\n  };\n\n  hasBrowserCanvas();\n\n  makeImage = function(imageData) {\n    if (hasBrowserCanvas() === true) {\n      var img;\n      scratchCtx.width = imageData.width;\n      scratchCtx.height = imageData.height;\n      scratchCtx.clearRect(0, 0, imageData.width, imageData.height);\n      scratchCtx.putImageData(imageData, 0, 0);\n      img = new Image();\n      img.src = scratchCanvas.toDataURL();\n      return img;\n    }\n    throw new Error(\"This method requires a Browser with Canvas-capability.\");\n  };\n\n  PNG.prototype.decodeFrames = function(ctx) {\n    var frame, i, imageData, pixels, _i, _len, _ref, _results;\n    if (!this.animation) {\n      return;\n    }\n    _ref = this.animation.frames;\n    _results = [];\n    for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) {\n      frame = _ref[i];\n      imageData = ctx.createImageData(frame.width, frame.height);\n      pixels = this.decodePixels(new Uint8Array(frame.data));\n      this.copyToImageData(imageData, pixels);\n      frame.imageData = imageData;\n      _results.push((frame.image = makeImage(imageData)));\n    }\n    return _results;\n  };\n\n  PNG.prototype.renderFrame = function(ctx, number) {\n    var frame, frames, prev;\n    frames = this.animation.frames;\n    frame = frames[number];\n    prev = frames[number - 1];\n    if (number === 0) {\n      ctx.clearRect(0, 0, this.width, this.height);\n    }\n    if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_BACKGROUND\n    ) {\n      ctx.clearRect(prev.xOffset, prev.yOffset, prev.width, prev.height);\n    } else if (\n      (prev != null ? prev.disposeOp : void 0) === APNG_DISPOSE_OP_PREVIOUS\n    ) {\n      ctx.putImageData(prev.imageData, prev.xOffset, prev.yOffset);\n    }\n    if (frame.blendOp === APNG_BLEND_OP_SOURCE) {\n      ctx.clearRect(frame.xOffset, frame.yOffset, frame.width, frame.height);\n    }\n    return ctx.drawImage(frame.image, frame.xOffset, frame.yOffset);\n  };\n\n  PNG.prototype.animate = function(ctx) {\n    var doFrame,\n      frameNumber,\n      frames,\n      numFrames,\n      numPlays,\n      _ref,\n      _this = this;\n    frameNumber = 0;\n    (_ref = this.animation),\n      (numFrames = _ref.numFrames),\n      (frames = _ref.frames),\n      (numPlays = _ref.numPlays);\n    return (doFrame = function() {\n      var f, frame;\n      f = frameNumber++ % numFrames;\n      frame = frames[f];\n      _this.renderFrame(ctx, f);\n      if (numFrames > 1 && frameNumber / numFrames < numPlays) {\n        return (_this.animation._timeout = setTimeout(doFrame, frame.delay));\n      }\n    })();\n  };\n\n  PNG.prototype.stopAnimation = function() {\n    var _ref;\n    return clearTimeout(\n      (_ref = this.animation) != null ? _ref._timeout : void 0\n    );\n  };\n\n  PNG.prototype.render = function(canvas) {\n    var ctx, data;\n    if (canvas._png) {\n      canvas._png.stopAnimation();\n    }\n    canvas._png = this;\n    canvas.width = this.width;\n    canvas.height = this.height;\n    ctx = canvas.getContext(\"2d\");\n    if (this.animation) {\n      this.decodeFrames(ctx);\n      return this.animate(ctx);\n    } else {\n      data = ctx.createImageData(this.width, this.height);\n      this.copyToImageData(data, this.decodePixels());\n      return ctx.putImageData(data, 0, 0);\n    }\n  };\n\n  return PNG;\n})();\n\nexport { PNG };\n","/** @license\n * MIT license.\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *               2014 Diego Casorran, https://github.com/diegocr\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF split_text_to_size plugin\n *\n * @name split_text_to_size\n * @module\n */\n(function(API) {\n  \"use strict\";\n  /**\n   * Returns an array of length matching length of the 'word' string, with each\n   * cell occupied by the width of the char in that position.\n   *\n   * @name getCharWidthsArray\n   * @function\n   * @param {string} text\n   * @param {Object} options\n   * @returns {Array}\n   */\n  var getCharWidthsArray = (API.getCharWidthsArray = function(text, options) {\n    options = options || {};\n\n    var activeFont = options.font || this.internal.getFont();\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n\n    var widths = options.widths\n      ? options.widths\n      : activeFont.metadata.Unicode.widths;\n    var widthsFractionOf = widths.fof ? widths.fof : 1;\n    var kerning = options.kerning\n      ? options.kerning\n      : activeFont.metadata.Unicode.kerning;\n    var kerningFractionOf = kerning.fof ? kerning.fof : 1;\n    var doKerning = options.doKerning === false ? false : true;\n    var kerningValue = 0;\n\n    var i;\n    var length = text.length;\n    var char_code;\n    var prior_char_code = 0; //for kerning\n    var default_char_width = widths[0] || widthsFractionOf;\n    var output = [];\n\n    for (i = 0; i < length; i++) {\n      char_code = text.charCodeAt(i);\n\n      if (typeof activeFont.metadata.widthOfString === \"function\") {\n        output.push(\n          (activeFont.metadata.widthOfGlyph(\n            activeFont.metadata.characterToGlyph(char_code)\n          ) +\n            charSpace * (1000 / fontSize) || 0) / 1000\n        );\n      } else {\n        if (\n          doKerning &&\n          typeof kerning[char_code] === \"object\" &&\n          !isNaN(parseInt(kerning[char_code][prior_char_code], 10))\n        ) {\n          kerningValue =\n            kerning[char_code][prior_char_code] / kerningFractionOf;\n        } else {\n          kerningValue = 0;\n        }\n        output.push(\n          (widths[char_code] || default_char_width) / widthsFractionOf +\n            kerningValue\n        );\n      }\n      prior_char_code = char_code;\n    }\n\n    return output;\n  });\n\n  /**\n   * Returns a widths of string in a given font, if the font size is set as 1 point.\n   *\n   * In other words, this is \"proportional\" value. For 1 unit of font size, the length\n   * of the string will be that much.\n   *\n   * Multiply by font size to get actual width in *points*\n   * Then divide by 72 to get inches or divide by (72/25.6) to get 'mm' etc.\n   *\n   * @name getStringUnitWidth\n   * @public\n   * @function\n   * @param {string} text\n   * @param {string} options\n   * @returns {number} result\n   */\n  var getStringUnitWidth = (API.getStringUnitWidth = function(text, options) {\n    options = options || {};\n\n    var fontSize = options.fontSize || this.internal.getFontSize();\n    var font = options.font || this.internal.getFont();\n    var charSpace = options.charSpace || this.internal.getCharSpace();\n    var result = 0;\n\n    if (API.processArabic) {\n      text = API.processArabic(text);\n    }\n\n    if (typeof font.metadata.widthOfString === \"function\") {\n      result =\n        font.metadata.widthOfString(text, fontSize, charSpace) / fontSize;\n    } else {\n      result = getCharWidthsArray\n        .apply(this, arguments)\n        .reduce(function(pv, cv) {\n          return pv + cv;\n        }, 0);\n    }\n    return result;\n  });\n\n  /**\n  returns array of lines\n  */\n  var splitLongWord = function(word, widths_array, firstLineMaxLen, maxLen) {\n    var answer = [];\n\n    // 1st, chop off the piece that can fit on the hanging line.\n    var i = 0,\n      l = word.length,\n      workingLen = 0;\n    while (i !== l && workingLen + widths_array[i] < firstLineMaxLen) {\n      workingLen += widths_array[i];\n      i++;\n    }\n    // this is first line.\n    answer.push(word.slice(0, i));\n\n    // 2nd. Split the rest into maxLen pieces.\n    var startOfLine = i;\n    workingLen = 0;\n    while (i !== l) {\n      if (workingLen + widths_array[i] > maxLen) {\n        answer.push(word.slice(startOfLine, i));\n        workingLen = 0;\n        startOfLine = i;\n      }\n      workingLen += widths_array[i];\n      i++;\n    }\n    if (startOfLine !== i) {\n      answer.push(word.slice(startOfLine, i));\n    }\n\n    return answer;\n  };\n\n  // Note, all sizing inputs for this function must be in \"font measurement units\"\n  // By default, for PDF, it's \"point\".\n  var splitParagraphIntoLines = function(text, maxlen, options) {\n    // at this time works only on Western scripts, ones with space char\n    // separating the words. Feel free to expand.\n\n    if (!options) {\n      options = {};\n    }\n\n    var line = [],\n      lines = [line],\n      line_length = options.textIndent || 0,\n      separator_length = 0,\n      current_word_length = 0,\n      word,\n      widths_array,\n      words = text.split(\" \"),\n      spaceCharWidth = getCharWidthsArray.apply(this, [\" \", options])[0],\n      i,\n      l,\n      tmp,\n      lineIndent;\n\n    if (options.lineIndent === -1) {\n      lineIndent = words[0].length + 2;\n    } else {\n      lineIndent = options.lineIndent || 0;\n    }\n    if (lineIndent) {\n      var pad = Array(lineIndent).join(\" \"),\n        wrds = [];\n      words.map(function(wrd) {\n        wrd = wrd.split(/\\s*\\n/);\n        if (wrd.length > 1) {\n          wrds = wrds.concat(\n            wrd.map(function(wrd, idx) {\n              return (idx && wrd.length ? \"\\n\" : \"\") + wrd;\n            })\n          );\n        } else {\n          wrds.push(wrd[0]);\n        }\n      });\n      words = wrds;\n      lineIndent = getStringUnitWidth.apply(this, [pad, options]);\n    }\n\n    for (i = 0, l = words.length; i < l; i++) {\n      var force = 0;\n\n      word = words[i];\n      if (lineIndent && word[0] == \"\\n\") {\n        word = word.substr(1);\n        force = 1;\n      }\n      widths_array = getCharWidthsArray.apply(this, [word, options]);\n      current_word_length = widths_array.reduce(function(pv, cv) {\n        return pv + cv;\n      }, 0);\n\n      if (\n        line_length + separator_length + current_word_length > maxlen ||\n        force\n      ) {\n        if (current_word_length > maxlen) {\n          // this happens when you have space-less long URLs for example.\n          // we just chop these to size. We do NOT insert hiphens\n          tmp = splitLongWord.apply(this, [\n            word,\n            widths_array,\n            maxlen - (line_length + separator_length),\n            maxlen\n          ]);\n          // first line we add to existing line object\n          line.push(tmp.shift()); // it's ok to have extra space indicator there\n          // last line we make into new line object\n          line = [tmp.pop()];\n          // lines in the middle we apped to lines object as whole lines\n          while (tmp.length) {\n            lines.push([tmp.shift()]); // single fragment occupies whole line\n          }\n          current_word_length = widths_array\n            .slice(word.length - (line[0] ? line[0].length : 0))\n            .reduce(function(pv, cv) {\n              return pv + cv;\n            }, 0);\n        } else {\n          // just put it on a new line\n          line = [word];\n        }\n\n        // now we attach new line to lines\n        lines.push(line);\n        line_length = current_word_length + lineIndent;\n        separator_length = spaceCharWidth;\n      } else {\n        line.push(word);\n\n        line_length += separator_length + current_word_length;\n        separator_length = spaceCharWidth;\n      }\n    }\n\n    var postProcess;\n    if (lineIndent) {\n      postProcess = function(ln, idx) {\n        return (idx ? pad : \"\") + ln.join(\" \");\n      };\n    } else {\n      postProcess = function(ln) {\n        return ln.join(\" \");\n      };\n    }\n\n    return lines.map(postProcess);\n  };\n\n  /**\n   * Splits a given string into an array of strings. Uses 'size' value\n   * (in measurement units declared as default for the jsPDF instance)\n   * and the font's \"widths\" and \"Kerning\" tables, where available, to\n   * determine display length of a given string for a given font.\n   *\n   * We use character's 100% of unit size (height) as width when Width\n   * table or other default width is not available.\n   *\n   * @name splitTextToSize\n   * @public\n   * @function\n   * @param {string} text Unencoded, regular JavaScript (Unicode, UTF-16 / UCS-2) string.\n   * @param {number} size Nominal number, measured in units default to this instance of jsPDF.\n   * @param {Object} options Optional flags needed for chopper to do the right thing.\n   * @returns {Array} array Array with strings chopped to size.\n   */\n  API.splitTextToSize = function(text, maxlen, options) {\n    \"use strict\";\n\n    options = options || {};\n\n    var fsize = options.fontSize || this.internal.getFontSize(),\n      newOptions = function(options) {\n        var widths = {\n            0: 1\n          },\n          kerning = {};\n\n        if (!options.widths || !options.kerning) {\n          var f = this.internal.getFont(options.fontName, options.fontStyle),\n            encoding = \"Unicode\";\n          // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE\n          // Actual JavaScript-native String's 16bit char codes used.\n          // no multi-byte logic here\n\n          if (f.metadata[encoding]) {\n            return {\n              widths: f.metadata[encoding].widths || widths,\n              kerning: f.metadata[encoding].kerning || kerning\n            };\n          } else {\n            return {\n              font: f.metadata,\n              fontSize: this.internal.getFontSize(),\n              charSpace: this.internal.getCharSpace()\n            };\n          }\n        } else {\n          return {\n            widths: options.widths,\n            kerning: options.kerning\n          };\n        }\n      }.call(this, options);\n\n    // first we split on end-of-line chars\n    var paragraphs;\n    if (Array.isArray(text)) {\n      paragraphs = text;\n    } else {\n      paragraphs = String(text).split(/\\r?\\n/);\n    }\n\n    // now we convert size (max length of line) into \"font size units\"\n    // at present time, the \"font size unit\" is always 'point'\n    // 'proportional' means, \"in proportion to font size\"\n    var fontUnit_maxLen = (1.0 * this.internal.scaleFactor * maxlen) / fsize;\n    // at this time, fsize is always in \"points\" regardless of the default measurement unit of the doc.\n    // this may change in the future?\n    // until then, proportional_maxlen is likely to be in 'points'\n\n    // If first line is to be indented (shorter or longer) than maxLen\n    // we indicate that by using CSS-style \"text-indent\" option.\n    // here it's in font units too (which is likely 'points')\n    // it can be negative (which makes the first line longer than maxLen)\n    newOptions.textIndent = options.textIndent\n      ? (options.textIndent * 1.0 * this.internal.scaleFactor) / fsize\n      : 0;\n    newOptions.lineIndent = options.lineIndent;\n\n    var i,\n      l,\n      output = [];\n    for (i = 0, l = paragraphs.length; i < l; i++) {\n      output = output.concat(\n        splitParagraphIntoLines.apply(this, [\n          paragraphs[i],\n          fontUnit_maxLen,\n          newOptions\n        ])\n      );\n    }\n\n    return output;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * (c) Dean McNamee <dean@gmail.com>, 2013.\n *\n * https://github.com/deanm/omggif\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,\n * including animation and compression.  It does not rely on any specific\n * underlying system, so should run in the browser, Node, or Plask.\n */\n\n\"use strict\";\n\nimport { console } from \"./console.js\";\n\nfunction GifWriter(buf, width, height, gopts) {\n  var p = 0;\n\n  var gopts = gopts === undefined ? {} : gopts;\n  var loop_count = gopts.loop === undefined ? null : gopts.loop;\n  var global_palette = gopts.palette === undefined ? null : gopts.palette;\n\n  if (width <= 0 || height <= 0 || width > 65535 || height > 65535)\n    throw new Error(\"Width/Height invalid.\");\n\n  function check_palette_and_num_colors(palette) {\n    var num_colors = palette.length;\n    if (num_colors < 2 || num_colors > 256 || num_colors & (num_colors - 1)) {\n      throw new Error(\n        \"Invalid code/color length, must be power of 2 and 2 .. 256.\"\n      );\n    }\n    return num_colors;\n  }\n\n  // - Header.\n  buf[p++] = 0x47;\n  buf[p++] = 0x49;\n  buf[p++] = 0x46; // GIF\n  buf[p++] = 0x38;\n  buf[p++] = 0x39;\n  buf[p++] = 0x61; // 89a\n\n  // Handling of Global Color Table (palette) and background index.\n  var gp_num_colors_pow2 = 0;\n  var background = 0;\n  if (global_palette !== null) {\n    var gp_num_colors = check_palette_and_num_colors(global_palette);\n    while ((gp_num_colors >>= 1)) ++gp_num_colors_pow2;\n    gp_num_colors = 1 << gp_num_colors_pow2;\n    --gp_num_colors_pow2;\n    if (gopts.background !== undefined) {\n      background = gopts.background;\n      if (background >= gp_num_colors)\n        throw new Error(\"Background index out of range.\");\n      // The GIF spec states that a background index of 0 should be ignored, so\n      // this is probably a mistake and you really want to set it to another\n      // slot in the palette.  But actually in the end most browsers, etc end\n      // up ignoring this almost completely (including for dispose background).\n      if (background === 0)\n        throw new Error(\"Background index explicitly passed as 0.\");\n    }\n  }\n\n  // - Logical Screen Descriptor.\n  // NOTE(deanm): w/h apparently ignored by implementations, but set anyway.\n  buf[p++] = width & 0xff;\n  buf[p++] = (width >> 8) & 0xff;\n  buf[p++] = height & 0xff;\n  buf[p++] = (height >> 8) & 0xff;\n  // NOTE: Indicates 0-bpp original color resolution (unused?).\n  buf[p++] = (global_palette !== null ? 0x80 : 0) | gp_num_colors_pow2; // Global Color Table Flag. // NOTE: No sort flag (unused?).\n  buf[p++] = background; // Background Color Index.\n  buf[p++] = 0; // Pixel aspect ratio (unused?).\n\n  // - Global Color Table\n  if (global_palette !== null) {\n    for (var i = 0, il = global_palette.length; i < il; ++i) {\n      var rgb = global_palette[i];\n      buf[p++] = (rgb >> 16) & 0xff;\n      buf[p++] = (rgb >> 8) & 0xff;\n      buf[p++] = rgb & 0xff;\n    }\n  }\n\n  if (loop_count !== null) {\n    // Netscape block for looping.\n    if (loop_count < 0 || loop_count > 65535)\n      throw new Error(\"Loop count invalid.\");\n    // Extension code, label, and length.\n    buf[p++] = 0x21;\n    buf[p++] = 0xff;\n    buf[p++] = 0x0b;\n    // NETSCAPE2.0\n    buf[p++] = 0x4e;\n    buf[p++] = 0x45;\n    buf[p++] = 0x54;\n    buf[p++] = 0x53;\n    buf[p++] = 0x43;\n    buf[p++] = 0x41;\n    buf[p++] = 0x50;\n    buf[p++] = 0x45;\n    buf[p++] = 0x32;\n    buf[p++] = 0x2e;\n    buf[p++] = 0x30;\n    // Sub-block\n    buf[p++] = 0x03;\n    buf[p++] = 0x01;\n    buf[p++] = loop_count & 0xff;\n    buf[p++] = (loop_count >> 8) & 0xff;\n    buf[p++] = 0x00; // Terminator.\n  }\n\n  var ended = false;\n\n  this.addFrame = function(x, y, w, h, indexed_pixels, opts) {\n    if (ended === true) {\n      --p;\n      ended = false;\n    } // Un-end.\n\n    opts = opts === undefined ? {} : opts;\n\n    // TODO(deanm): Bounds check x, y.  Do they need to be within the virtual\n    // canvas width/height, I imagine?\n    if (x < 0 || y < 0 || x > 65535 || y > 65535)\n      throw new Error(\"x/y invalid.\");\n\n    if (w <= 0 || h <= 0 || w > 65535 || h > 65535)\n      throw new Error(\"Width/Height invalid.\");\n\n    if (indexed_pixels.length < w * h)\n      throw new Error(\"Not enough pixels for the frame size.\");\n\n    var using_local_palette = true;\n    var palette = opts.palette;\n    if (palette === undefined || palette === null) {\n      using_local_palette = false;\n      palette = global_palette;\n    }\n\n    if (palette === undefined || palette === null)\n      throw new Error(\"Must supply either a local or global palette.\");\n\n    var num_colors = check_palette_and_num_colors(palette);\n\n    // Compute the min_code_size (power of 2), destroying num_colors.\n    var min_code_size = 0;\n    while ((num_colors >>= 1)) ++min_code_size;\n    num_colors = 1 << min_code_size; // Now we can easily get it back.\n\n    var delay = opts.delay === undefined ? 0 : opts.delay;\n\n    // From the spec:\n    //     0 -   No disposal specified. The decoder is\n    //           not required to take any action.\n    //     1 -   Do not dispose. The graphic is to be left\n    //           in place.\n    //     2 -   Restore to background color. The area used by the\n    //           graphic must be restored to the background color.\n    //     3 -   Restore to previous. The decoder is required to\n    //           restore the area overwritten by the graphic with\n    //           what was there prior to rendering the graphic.\n    //  4-7 -    To be defined.\n    // NOTE(deanm): Dispose background doesn't really work, apparently most\n    // browsers ignore the background palette index and clear to transparency.\n    var disposal = opts.disposal === undefined ? 0 : opts.disposal;\n    if (disposal < 0 || disposal > 3)\n      // 4-7 is reserved.\n      throw new Error(\"Disposal out of range.\");\n\n    var use_transparency = false;\n    var transparent_index = 0;\n    if (opts.transparent !== undefined && opts.transparent !== null) {\n      use_transparency = true;\n      transparent_index = opts.transparent;\n      if (transparent_index < 0 || transparent_index >= num_colors)\n        throw new Error(\"Transparent color index.\");\n    }\n\n    if (disposal !== 0 || use_transparency || delay !== 0) {\n      // - Graphics Control Extension\n      buf[p++] = 0x21;\n      buf[p++] = 0xf9; // Extension / Label.\n      buf[p++] = 4; // Byte size.\n\n      buf[p++] = (disposal << 2) | (use_transparency === true ? 1 : 0);\n      buf[p++] = delay & 0xff;\n      buf[p++] = (delay >> 8) & 0xff;\n      buf[p++] = transparent_index; // Transparent color index.\n      buf[p++] = 0; // Block Terminator.\n    }\n\n    // - Image Descriptor\n    buf[p++] = 0x2c; // Image Seperator.\n    buf[p++] = x & 0xff;\n    buf[p++] = (x >> 8) & 0xff; // Left.\n    buf[p++] = y & 0xff;\n    buf[p++] = (y >> 8) & 0xff; // Top.\n    buf[p++] = w & 0xff;\n    buf[p++] = (w >> 8) & 0xff;\n    buf[p++] = h & 0xff;\n    buf[p++] = (h >> 8) & 0xff;\n    // NOTE: No sort flag (unused?).\n    // TODO(deanm): Support interlace.\n    buf[p++] = using_local_palette === true ? 0x80 | (min_code_size - 1) : 0;\n\n    // - Local Color Table\n    if (using_local_palette === true) {\n      for (var i = 0, il = palette.length; i < il; ++i) {\n        var rgb = palette[i];\n        buf[p++] = (rgb >> 16) & 0xff;\n        buf[p++] = (rgb >> 8) & 0xff;\n        buf[p++] = rgb & 0xff;\n      }\n    }\n\n    p = GifWriterOutputLZWCodeStream(\n      buf,\n      p,\n      min_code_size < 2 ? 2 : min_code_size,\n      indexed_pixels\n    );\n\n    return p;\n  };\n\n  this.end = function() {\n    if (ended === false) {\n      buf[p++] = 0x3b; // Trailer.\n      ended = true;\n    }\n    return p;\n  };\n\n  this.getOutputBuffer = function() {\n    return buf;\n  };\n  this.setOutputBuffer = function(v) {\n    buf = v;\n  };\n  this.getOutputBufferPosition = function() {\n    return p;\n  };\n  this.setOutputBufferPosition = function(v) {\n    p = v;\n  };\n}\n\n// Main compression routine, palette indexes -> LZW code stream.\n// |index_stream| must have at least one entry.\nfunction GifWriterOutputLZWCodeStream(buf, p, min_code_size, index_stream) {\n  buf[p++] = min_code_size;\n  var cur_subblock = p++; // Pointing at the length field.\n\n  var clear_code = 1 << min_code_size;\n  var code_mask = clear_code - 1;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  var cur_shift = 0;\n  // We have at most 12-bit codes, so we should have to hold a max of 19\n  // bits here (and then we would write out).\n  var cur = 0;\n\n  function emit_bytes_to_buffer(bit_block_size) {\n    while (cur_shift >= bit_block_size) {\n      buf[p++] = cur & 0xff;\n      cur >>= 8;\n      cur_shift -= 8;\n      if (p === cur_subblock + 256) {\n        // Finished a subblock.\n        buf[cur_subblock] = 255;\n        cur_subblock = p++;\n      }\n    }\n  }\n\n  function emit_code(c) {\n    cur |= c << cur_shift;\n    cur_shift += cur_code_size;\n    emit_bytes_to_buffer(8);\n  }\n\n  // I am not an expert on the topic, and I don't want to write a thesis.\n  // However, it is good to outline here the basic algorithm and the few data\n  // structures and optimizations here that make this implementation fast.\n  // The basic idea behind LZW is to build a table of previously seen runs\n  // addressed by a short id (herein called output code).  All data is\n  // referenced by a code, which represents one or more values from the\n  // original input stream.  All input bytes can be referenced as the same\n  // value as an output code.  So if you didn't want any compression, you\n  // could more or less just output the original bytes as codes (there are\n  // some details to this, but it is the idea).  In order to achieve\n  // compression, values greater then the input range (codes can be up to\n  // 12-bit while input only 8-bit) represent a sequence of previously seen\n  // inputs.  The decompressor is able to build the same mapping while\n  // decoding, so there is always a shared common knowledge between the\n  // encoding and decoder, which is also important for \"timing\" aspects like\n  // how to handle variable bit width code encoding.\n  //\n  // One obvious but very important consequence of the table system is there\n  // is always a unique id (at most 12-bits) to map the runs.  'A' might be\n  // 4, then 'AA' might be 10, 'AAA' 11, 'AAAA' 12, etc.  This relationship\n  // can be used for an effecient lookup strategy for the code mapping.  We\n  // need to know if a run has been seen before, and be able to map that run\n  // to the output code.  Since we start with known unique ids (input bytes),\n  // and then from those build more unique ids (table entries), we can\n  // continue this chain (almost like a linked list) to always have small\n  // integer values that represent the current byte chains in the encoder.\n  // This means instead of tracking the input bytes (AAAABCD) to know our\n  // current state, we can track the table entry for AAAABC (it is guaranteed\n  // to exist by the nature of the algorithm) and the next character D.\n  // Therefor the tuple of (table_entry, byte) is guaranteed to also be\n  // unique.  This allows us to create a simple lookup key for mapping input\n  // sequences to codes (table indices) without having to store or search\n  // any of the code sequences.  So if 'AAAA' has a table entry of 12, the\n  // tuple of ('AAAA', K) for any input byte K will be unique, and can be our\n  // key.  This leads to a integer value at most 20-bits, which can always\n  // fit in an SMI value and be used as a fast sparse array / object key.\n\n  // Output code for the current contents of the index buffer.\n  var ib_code = index_stream[0] & code_mask; // Load first input index.\n  var code_table = {}; // Key'd on our 20-bit \"tuple\".\n\n  emit_code(clear_code); // Spec says first code should be a clear code.\n\n  // First index already loaded, process the rest of the stream.\n  for (var i = 1, il = index_stream.length; i < il; ++i) {\n    var k = index_stream[i] & code_mask;\n    var cur_key = (ib_code << 8) | k; // (prev, k) unique tuple.\n    var cur_code = code_table[cur_key]; // buffer + k.\n\n    // Check if we have to create a new code table entry.\n    if (cur_code === undefined) {\n      // We don't have buffer + k.\n      // Emit index buffer (without k).\n      // This is an inline version of emit_code, because this is the core\n      // writing routine of the compressor (and V8 cannot inline emit_code\n      // because it is a closure here in a different context).  Additionally\n      // we can call emit_byte_to_buffer less often, because we can have\n      // 30-bits (from our 31-bit signed SMI), and we know our codes will only\n      // be 12-bits, so can safely have 18-bits there without overflow.\n      // emit_code(ib_code);\n      cur |= ib_code << cur_shift;\n      cur_shift += cur_code_size;\n      while (cur_shift >= 8) {\n        buf[p++] = cur & 0xff;\n        cur >>= 8;\n        cur_shift -= 8;\n        if (p === cur_subblock + 256) {\n          // Finished a subblock.\n          buf[cur_subblock] = 255;\n          cur_subblock = p++;\n        }\n      }\n\n      if (next_code === 4096) {\n        // Table full, need a clear.\n        emit_code(clear_code);\n        next_code = eoi_code + 1;\n        cur_code_size = min_code_size + 1;\n        code_table = {};\n      } else {\n        // Table not full, insert a new entry.\n        // Increase our variable bit code sizes if necessary.  This is a bit\n        // tricky as it is based on \"timing\" between the encoding and\n        // decoder.  From the encoders perspective this should happen after\n        // we've already emitted the index buffer and are about to create the\n        // first table entry that would overflow our current code bit size.\n        if (next_code >= 1 << cur_code_size) ++cur_code_size;\n        code_table[cur_key] = next_code++; // Insert into code table.\n      }\n\n      ib_code = k; // Index buffer to single input k.\n    } else {\n      ib_code = cur_code; // Index buffer to sequence in code table.\n    }\n  }\n\n  emit_code(ib_code); // There will still be something in the index buffer.\n  emit_code(eoi_code); // End Of Information.\n\n  // Flush / finalize the sub-blocks stream to the buffer.\n  emit_bytes_to_buffer(1);\n\n  // Finish the sub-blocks, writing out any unfinished lengths and\n  // terminating with a sub-block of length 0.  If we have already started\n  // but not yet used a sub-block it can just become the terminator.\n  if (cur_subblock + 1 === p) {\n    // Started but unused.\n    buf[cur_subblock] = 0;\n  } else {\n    // Started and used, write length and additional terminator block.\n    buf[cur_subblock] = p - cur_subblock - 1;\n    buf[p++] = 0;\n  }\n  return p;\n}\n\nfunction GifReader(buf) {\n  var p = 0;\n\n  // - Header (GIF87a or GIF89a).\n  if (\n    buf[p++] !== 0x47 ||\n    buf[p++] !== 0x49 ||\n    buf[p++] !== 0x46 ||\n    buf[p++] !== 0x38 ||\n    ((buf[p++] + 1) & 0xfd) !== 0x38 ||\n    buf[p++] !== 0x61\n  ) {\n    throw new Error(\"Invalid GIF 87a/89a header.\");\n  }\n\n  // - Logical Screen Descriptor.\n  var width = buf[p++] | (buf[p++] << 8);\n  var height = buf[p++] | (buf[p++] << 8);\n  var pf0 = buf[p++]; // <Packed Fields>.\n  var global_palette_flag = pf0 >> 7;\n  var num_global_colors_pow2 = pf0 & 0x7;\n  var num_global_colors = 1 << (num_global_colors_pow2 + 1);\n  var background = buf[p++];\n  buf[p++]; // Pixel aspect ratio (unused?).\n\n  var global_palette_offset = null;\n  var global_palette_size = null;\n\n  if (global_palette_flag) {\n    global_palette_offset = p;\n    global_palette_size = num_global_colors;\n    p += num_global_colors * 3; // Seek past palette.\n  }\n\n  var no_eof = true;\n\n  var frames = [];\n\n  var delay = 0;\n  var transparent_index = null;\n  var disposal = 0; // 0 - No disposal specified.\n  var loop_count = null;\n\n  this.width = width;\n  this.height = height;\n\n  while (no_eof && p < buf.length) {\n    switch (buf[p++]) {\n      case 0x21: // Graphics Control Extension Block\n        switch (buf[p++]) {\n          case 0xff: // Application specific block\n            // Try if it's a Netscape block (with animation loop counter).\n            if (\n              buf[p] !== 0x0b || // 21 FF already read, check block size.\n              // NETSCAPE2.0\n              (buf[p + 1] == 0x4e &&\n                buf[p + 2] == 0x45 &&\n                buf[p + 3] == 0x54 &&\n                buf[p + 4] == 0x53 &&\n                buf[p + 5] == 0x43 &&\n                buf[p + 6] == 0x41 &&\n                buf[p + 7] == 0x50 &&\n                buf[p + 8] == 0x45 &&\n                buf[p + 9] == 0x32 &&\n                buf[p + 10] == 0x2e &&\n                buf[p + 11] == 0x30 &&\n                // Sub-block\n                buf[p + 12] == 0x03 &&\n                buf[p + 13] == 0x01 &&\n                buf[p + 16] == 0)\n            ) {\n              p += 14;\n              loop_count = buf[p++] | (buf[p++] << 8);\n              p++; // Skip terminator.\n            } else {\n              // We don't know what it is, just try to get past it.\n              p += 12;\n              while (true) {\n                // Seek through subblocks.\n                var block_size = buf[p++];\n                // Bad block size (ex: undefined from an out of bounds read).\n                if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n                if (block_size === 0) break; // 0 size is terminator\n                p += block_size;\n              }\n            }\n            break;\n\n          case 0xf9: // Graphics Control Extension\n            if (buf[p++] !== 0x4 || buf[p + 4] !== 0)\n              throw new Error(\"Invalid graphics extension block.\");\n            var pf1 = buf[p++];\n            delay = buf[p++] | (buf[p++] << 8);\n            transparent_index = buf[p++];\n            if ((pf1 & 1) === 0) transparent_index = null;\n            disposal = (pf1 >> 2) & 0x7;\n            p++; // Skip terminator.\n            break;\n\n          case 0xfe: // Comment Extension.\n            while (true) {\n              // Seek through subblocks.\n              var block_size = buf[p++];\n              // Bad block size (ex: undefined from an out of bounds read).\n              if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n              if (block_size === 0) break; // 0 size is terminator\n              // console.log(buf.slice(p, p+block_size).toString('ascii'));\n              p += block_size;\n            }\n            break;\n\n          default:\n            throw new Error(\n              \"Unknown graphic control label: 0x\" + buf[p - 1].toString(16)\n            );\n        }\n        break;\n\n      case 0x2c: // Image Descriptor.\n        var x = buf[p++] | (buf[p++] << 8);\n        var y = buf[p++] | (buf[p++] << 8);\n        var w = buf[p++] | (buf[p++] << 8);\n        var h = buf[p++] | (buf[p++] << 8);\n        var pf2 = buf[p++];\n        var local_palette_flag = pf2 >> 7;\n        var interlace_flag = (pf2 >> 6) & 1;\n        var num_local_colors_pow2 = pf2 & 0x7;\n        var num_local_colors = 1 << (num_local_colors_pow2 + 1);\n        var palette_offset = global_palette_offset;\n        var palette_size = global_palette_size;\n        var has_local_palette = false;\n        if (local_palette_flag) {\n          var has_local_palette = true;\n          palette_offset = p; // Override with local palette.\n          palette_size = num_local_colors;\n          p += num_local_colors * 3; // Seek past palette.\n        }\n\n        var data_offset = p;\n\n        p++; // codesize\n        while (true) {\n          var block_size = buf[p++];\n          // Bad block size (ex: undefined from an out of bounds read).\n          if (!(block_size >= 0)) throw Error(\"Invalid block size\");\n          if (block_size === 0) break; // 0 size is terminator\n          p += block_size;\n        }\n\n        frames.push({\n          x: x,\n          y: y,\n          width: w,\n          height: h,\n          has_local_palette: has_local_palette,\n          palette_offset: palette_offset,\n          palette_size: palette_size,\n          data_offset: data_offset,\n          data_length: p - data_offset,\n          transparent_index: transparent_index,\n          interlaced: !!interlace_flag,\n          delay: delay,\n          disposal: disposal\n        });\n        break;\n\n      case 0x3b: // Trailer Marker (end of file).\n        no_eof = false;\n        break;\n\n      default:\n        throw new Error(\"Unknown gif block: 0x\" + buf[p - 1].toString(16));\n        break;\n    }\n  }\n\n  this.numFrames = function() {\n    return frames.length;\n  };\n\n  this.loopCount = function() {\n    return loop_count;\n  };\n\n  this.frameInfo = function(frame_num) {\n    if (frame_num < 0 || frame_num >= frames.length)\n      throw new Error(\"Frame index out of range.\");\n    return frames[frame_num];\n  };\n\n  this.decodeAndBlitFrameBGRA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = b;\n        pixels[op++] = g;\n        pixels[op++] = r;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n\n  // I will go to copy and paste hell one day...\n  this.decodeAndBlitFrameRGBA = function(frame_num, pixels) {\n    var frame = this.frameInfo(frame_num);\n    var num_pixels = frame.width * frame.height;\n    var index_stream = new Uint8Array(num_pixels); // At most 8-bit indices.\n    GifReaderLZWOutputIndexStream(\n      buf,\n      frame.data_offset,\n      index_stream,\n      num_pixels\n    );\n    var palette_offset = frame.palette_offset;\n\n    // NOTE(deanm): It seems to be much faster to compare index to 256 than\n    // to === null.  Not sure why, but CompareStub_EQ_STRICT shows up high in\n    // the profile, not sure if it's related to using a Uint8Array.\n    var trans = frame.transparent_index;\n    if (trans === null) trans = 256;\n\n    // We are possibly just blitting to a portion of the entire frame.\n    // That is a subrect within the framerect, so the additional pixels\n    // must be skipped over after we finished a scanline.\n    var framewidth = frame.width;\n    var framestride = width - framewidth;\n    var xleft = framewidth; // Number of subrect pixels left in scanline.\n\n    // Output indices of the top left and bottom right corners of the subrect.\n    var opbeg = (frame.y * width + frame.x) * 4;\n    var opend = ((frame.y + frame.height) * width + frame.x) * 4;\n    var op = opbeg;\n\n    var scanstride = framestride * 4;\n\n    // Use scanstride to skip past the rows when interlacing.  This is skipping\n    // 7 rows for the first two passes, then 3 then 1.\n    if (frame.interlaced === true) {\n      scanstride += width * 4 * 7; // Pass 1.\n    }\n\n    var interlaceskip = 8; // Tracking the row interval in the current pass.\n\n    for (var i = 0, il = index_stream.length; i < il; ++i) {\n      var index = index_stream[i];\n\n      if (xleft === 0) {\n        // Beginning of new scan line\n        op += scanstride;\n        xleft = framewidth;\n        if (op >= opend) {\n          // Catch the wrap to switch passes when interlacing.\n          scanstride = framestride * 4 + width * 4 * (interlaceskip - 1);\n          // interlaceskip / 2 * 4 is interlaceskip << 1.\n          op = opbeg + (framewidth + framestride) * (interlaceskip << 1);\n          interlaceskip >>= 1;\n        }\n      }\n\n      if (index === trans) {\n        op += 4;\n      } else {\n        var r = buf[palette_offset + index * 3];\n        var g = buf[palette_offset + index * 3 + 1];\n        var b = buf[palette_offset + index * 3 + 2];\n        pixels[op++] = r;\n        pixels[op++] = g;\n        pixels[op++] = b;\n        pixels[op++] = 255;\n      }\n      --xleft;\n    }\n  };\n}\n\nfunction GifReaderLZWOutputIndexStream(code_stream, p, output, output_length) {\n  var min_code_size = code_stream[p++];\n\n  var clear_code = 1 << min_code_size;\n  var eoi_code = clear_code + 1;\n  var next_code = eoi_code + 1;\n\n  var cur_code_size = min_code_size + 1; // Number of bits per code.\n  // NOTE: This shares the same name as the encoder, but has a different\n  // meaning here.  Here this masks each code coming from the code stream.\n  var code_mask = (1 << cur_code_size) - 1;\n  var cur_shift = 0;\n  var cur = 0;\n\n  var op = 0; // Output pointer.\n\n  var subblock_size = code_stream[p++];\n\n  // TODO(deanm): Would using a TypedArray be any faster?  At least it would\n  // solve the fast mode / backing store uncertainty.\n  // var code_table = Array(4096);\n  var code_table = new Int32Array(4096); // Can be signed, we only use 20 bits.\n\n  var prev_code = null; // Track code-1.\n\n  while (true) {\n    // Read up to two bytes, making sure we always 12-bits for max sized code.\n    while (cur_shift < 16) {\n      if (subblock_size === 0) break; // No more data to be read.\n\n      cur |= code_stream[p++] << cur_shift;\n      cur_shift += 8;\n\n      if (subblock_size === 1) {\n        // Never let it get to 0 to hold logic above.\n        subblock_size = code_stream[p++]; // Next subblock.\n      } else {\n        --subblock_size;\n      }\n    }\n\n    // TODO(deanm): We should never really get here, we should have received\n    // and EOI.\n    if (cur_shift < cur_code_size) break;\n\n    var code = cur & code_mask;\n    cur >>= cur_code_size;\n    cur_shift -= cur_code_size;\n\n    // TODO(deanm): Maybe should check that the first code was a clear code,\n    // at least this is what you're supposed to do.  But actually our encoder\n    // now doesn't emit a clear code first anyway.\n    if (code === clear_code) {\n      // We don't actually have to clear the table.  This could be a good idea\n      // for greater error checking, but we don't really do any anyway.  We\n      // will just track it with next_code and overwrite old entries.\n\n      next_code = eoi_code + 1;\n      cur_code_size = min_code_size + 1;\n      code_mask = (1 << cur_code_size) - 1;\n\n      // Don't update prev_code ?\n      prev_code = null;\n      continue;\n    } else if (code === eoi_code) {\n      break;\n    }\n\n    // We have a similar situation as the decoder, where we want to store\n    // variable length entries (code table entries), but we want to do in a\n    // faster manner than an array of arrays.  The code below stores sort of a\n    // linked list within the code table, and then \"chases\" through it to\n    // construct the dictionary entries.  When a new entry is created, just the\n    // last byte is stored, and the rest (prefix) of the entry is only\n    // referenced by its table entry.  Then the code chases through the\n    // prefixes until it reaches a single byte code.  We have to chase twice,\n    // first to compute the length, and then to actually copy the data to the\n    // output (backwards, since we know the length).  The alternative would be\n    // storing something in an intermediate stack, but that doesn't make any\n    // more sense.  I implemented an approach where it also stored the length\n    // in the code table, although it's a bit tricky because you run out of\n    // bits (12 + 12 + 8), but I didn't measure much improvements (the table\n    // entries are generally not the long).  Even when I created benchmarks for\n    // very long table entries the complexity did not seem worth it.\n    // The code table stores the prefix entry in 12 bits and then the suffix\n    // byte in 8 bits, so each entry is 20 bits.\n\n    var chase_code = code < next_code ? code : prev_code;\n\n    // Chase what we will output, either {CODE} or {CODE-1}.\n    var chase_length = 0;\n    var chase = chase_code;\n    while (chase > clear_code) {\n      chase = code_table[chase] >> 8;\n      ++chase_length;\n    }\n\n    var k = chase;\n\n    var op_end = op + chase_length + (chase_code !== code ? 1 : 0);\n    if (op_end > output_length) {\n      console.log(\"Warning, gif stream longer than expected.\");\n      return;\n    }\n\n    // Already have the first byte from the chase, might as well write it fast.\n    output[op++] = k;\n\n    op += chase_length;\n    var b = op; // Track pointer, writing backwards.\n\n    if (chase_code !== code)\n      // The case of emitting {CODE-1} + k.\n      output[op++] = k;\n\n    chase = chase_code;\n    while (chase_length--) {\n      chase = code_table[chase];\n      output[--b] = chase & 0xff; // Write backwards.\n      chase >>= 8; // Pull down to the prefix code.\n    }\n\n    if (prev_code !== null && next_code < 4096) {\n      code_table[next_code++] = (prev_code << 8) | k;\n      // TODO(deanm): Figure out this clearing vs code growth logic better.  I\n      // have an feeling that it should just happen somewhere else, for now it\n      // is awkward between when we grow past the max and then hit a clear code.\n      // For now just check if we hit the max 12-bits (then a clear code should\n      // follow, also of course encoded in 12-bits).\n      if (next_code >= code_mask + 1 && cur_code_size < 12) {\n        ++cur_code_size;\n        code_mask = (code_mask << 1) | 1;\n      }\n    }\n\n    prev_code = code;\n  }\n\n  if (op !== output_length) {\n    console.log(\"Warning, gif stream shorter than expected.\");\n  }\n\n  return output;\n}\n\nexport { GifReader, GifWriter };\n","/**\n * @license\n  Copyright (c) 2008, Adobe Systems Incorporated\n  All rights reserved.\n\n  Redistribution and use in source and binary forms, with or without \n  modification, are permitted provided that the following conditions are\n  met:\n\n  * Redistributions of source code must retain the above copyright notice, \n    this list of conditions and the following disclaimer.\n  \n  * Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the \n    documentation and/or other materials provided with the distribution.\n  \n  * Neither the name of Adobe Systems Incorporated nor the names of its \n    contributors may be used to endorse or promote products derived from \n    this software without specific prior written permission.\n\n  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n  IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR \n  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n/*\nJPEG encoder ported to JavaScript and optimized by Andreas Ritter, www.bytestrom.eu, 11/2009\n\nBasic GUI blocking jpeg encoder\n*/\n\nfunction JPEGEncoder(quality) {\n  var ffloor = Math.floor;\n  var YTable = new Array(64);\n  var UVTable = new Array(64);\n  var fdtbl_Y = new Array(64);\n  var fdtbl_UV = new Array(64);\n  var YDC_HT;\n  var UVDC_HT;\n  var YAC_HT;\n  var UVAC_HT;\n\n  var bitcode = new Array(65535);\n  var category = new Array(65535);\n  var outputfDCTQuant = new Array(64);\n  var DU = new Array(64);\n  var byteout = [];\n  var bytenew = 0;\n  var bytepos = 7;\n\n  var YDU = new Array(64);\n  var UDU = new Array(64);\n  var VDU = new Array(64);\n  var clt = new Array(256);\n  var RGB_YUV_TABLE = new Array(2048);\n  var currentQuality;\n\n  var ZigZag = [\n    0,\n    1,\n    5,\n    6,\n    14,\n    15,\n    27,\n    28,\n    2,\n    4,\n    7,\n    13,\n    16,\n    26,\n    29,\n    42,\n    3,\n    8,\n    12,\n    17,\n    25,\n    30,\n    41,\n    43,\n    9,\n    11,\n    18,\n    24,\n    31,\n    40,\n    44,\n    53,\n    10,\n    19,\n    23,\n    32,\n    39,\n    45,\n    52,\n    54,\n    20,\n    22,\n    33,\n    38,\n    46,\n    51,\n    55,\n    60,\n    21,\n    34,\n    37,\n    47,\n    50,\n    56,\n    59,\n    61,\n    35,\n    36,\n    48,\n    49,\n    57,\n    58,\n    62,\n    63\n  ];\n\n  var std_dc_luminance_nrcodes = [\n    0,\n    0,\n    1,\n    5,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_luminance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_luminance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    3,\n    3,\n    2,\n    4,\n    3,\n    5,\n    5,\n    4,\n    4,\n    0,\n    0,\n    1,\n    0x7d\n  ];\n  var std_ac_luminance_values = [\n    0x01,\n    0x02,\n    0x03,\n    0x00,\n    0x04,\n    0x11,\n    0x05,\n    0x12,\n    0x21,\n    0x31,\n    0x41,\n    0x06,\n    0x13,\n    0x51,\n    0x61,\n    0x07,\n    0x22,\n    0x71,\n    0x14,\n    0x32,\n    0x81,\n    0x91,\n    0xa1,\n    0x08,\n    0x23,\n    0x42,\n    0xb1,\n    0xc1,\n    0x15,\n    0x52,\n    0xd1,\n    0xf0,\n    0x24,\n    0x33,\n    0x62,\n    0x72,\n    0x82,\n    0x09,\n    0x0a,\n    0x16,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x25,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x34,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe1,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf1,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  var std_dc_chrominance_nrcodes = [\n    0,\n    0,\n    3,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    1,\n    0,\n    0,\n    0,\n    0,\n    0\n  ];\n  var std_dc_chrominance_values = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n  var std_ac_chrominance_nrcodes = [\n    0,\n    0,\n    2,\n    1,\n    2,\n    4,\n    4,\n    3,\n    4,\n    7,\n    5,\n    4,\n    4,\n    0,\n    1,\n    2,\n    0x77\n  ];\n  var std_ac_chrominance_values = [\n    0x00,\n    0x01,\n    0x02,\n    0x03,\n    0x11,\n    0x04,\n    0x05,\n    0x21,\n    0x31,\n    0x06,\n    0x12,\n    0x41,\n    0x51,\n    0x07,\n    0x61,\n    0x71,\n    0x13,\n    0x22,\n    0x32,\n    0x81,\n    0x08,\n    0x14,\n    0x42,\n    0x91,\n    0xa1,\n    0xb1,\n    0xc1,\n    0x09,\n    0x23,\n    0x33,\n    0x52,\n    0xf0,\n    0x15,\n    0x62,\n    0x72,\n    0xd1,\n    0x0a,\n    0x16,\n    0x24,\n    0x34,\n    0xe1,\n    0x25,\n    0xf1,\n    0x17,\n    0x18,\n    0x19,\n    0x1a,\n    0x26,\n    0x27,\n    0x28,\n    0x29,\n    0x2a,\n    0x35,\n    0x36,\n    0x37,\n    0x38,\n    0x39,\n    0x3a,\n    0x43,\n    0x44,\n    0x45,\n    0x46,\n    0x47,\n    0x48,\n    0x49,\n    0x4a,\n    0x53,\n    0x54,\n    0x55,\n    0x56,\n    0x57,\n    0x58,\n    0x59,\n    0x5a,\n    0x63,\n    0x64,\n    0x65,\n    0x66,\n    0x67,\n    0x68,\n    0x69,\n    0x6a,\n    0x73,\n    0x74,\n    0x75,\n    0x76,\n    0x77,\n    0x78,\n    0x79,\n    0x7a,\n    0x82,\n    0x83,\n    0x84,\n    0x85,\n    0x86,\n    0x87,\n    0x88,\n    0x89,\n    0x8a,\n    0x92,\n    0x93,\n    0x94,\n    0x95,\n    0x96,\n    0x97,\n    0x98,\n    0x99,\n    0x9a,\n    0xa2,\n    0xa3,\n    0xa4,\n    0xa5,\n    0xa6,\n    0xa7,\n    0xa8,\n    0xa9,\n    0xaa,\n    0xb2,\n    0xb3,\n    0xb4,\n    0xb5,\n    0xb6,\n    0xb7,\n    0xb8,\n    0xb9,\n    0xba,\n    0xc2,\n    0xc3,\n    0xc4,\n    0xc5,\n    0xc6,\n    0xc7,\n    0xc8,\n    0xc9,\n    0xca,\n    0xd2,\n    0xd3,\n    0xd4,\n    0xd5,\n    0xd6,\n    0xd7,\n    0xd8,\n    0xd9,\n    0xda,\n    0xe2,\n    0xe3,\n    0xe4,\n    0xe5,\n    0xe6,\n    0xe7,\n    0xe8,\n    0xe9,\n    0xea,\n    0xf2,\n    0xf3,\n    0xf4,\n    0xf5,\n    0xf6,\n    0xf7,\n    0xf8,\n    0xf9,\n    0xfa\n  ];\n\n  function initQuantTables(sf) {\n    var YQT = [\n      16,\n      11,\n      10,\n      16,\n      24,\n      40,\n      51,\n      61,\n      12,\n      12,\n      14,\n      19,\n      26,\n      58,\n      60,\n      55,\n      14,\n      13,\n      16,\n      24,\n      40,\n      57,\n      69,\n      56,\n      14,\n      17,\n      22,\n      29,\n      51,\n      87,\n      80,\n      62,\n      18,\n      22,\n      37,\n      56,\n      68,\n      109,\n      103,\n      77,\n      24,\n      35,\n      55,\n      64,\n      81,\n      104,\n      113,\n      92,\n      49,\n      64,\n      78,\n      87,\n      103,\n      121,\n      120,\n      101,\n      72,\n      92,\n      95,\n      98,\n      112,\n      100,\n      103,\n      99\n    ];\n\n    for (var i = 0; i < 64; i++) {\n      var t = ffloor((YQT[i] * sf + 50) / 100);\n      t = Math.min(Math.max(t, 1), 255);\n      YTable[ZigZag[i]] = t;\n    }\n    var UVQT = [\n      17,\n      18,\n      24,\n      47,\n      99,\n      99,\n      99,\n      99,\n      18,\n      21,\n      26,\n      66,\n      99,\n      99,\n      99,\n      99,\n      24,\n      26,\n      56,\n      99,\n      99,\n      99,\n      99,\n      99,\n      47,\n      66,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99,\n      99\n    ];\n    for (var j = 0; j < 64; j++) {\n      var u = ffloor((UVQT[j] * sf + 50) / 100);\n      u = Math.min(Math.max(u, 1), 255);\n      UVTable[ZigZag[j]] = u;\n    }\n    var aasf = [\n      1.0,\n      1.387039845,\n      1.306562965,\n      1.175875602,\n      1.0,\n      0.785694958,\n      0.5411961,\n      0.275899379\n    ];\n    var k = 0;\n    for (var row = 0; row < 8; row++) {\n      for (var col = 0; col < 8; col++) {\n        fdtbl_Y[k] = 1.0 / (YTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        fdtbl_UV[k] = 1.0 / (UVTable[ZigZag[k]] * aasf[row] * aasf[col] * 8.0);\n        k++;\n      }\n    }\n  }\n\n  function computeHuffmanTbl(nrcodes, std_table) {\n    var codevalue = 0;\n    var pos_in_table = 0;\n    var HT = new Array();\n    for (var k = 1; k <= 16; k++) {\n      for (var j = 1; j <= nrcodes[k]; j++) {\n        HT[std_table[pos_in_table]] = [];\n        HT[std_table[pos_in_table]][0] = codevalue;\n        HT[std_table[pos_in_table]][1] = k;\n        pos_in_table++;\n        codevalue++;\n      }\n      codevalue *= 2;\n    }\n    return HT;\n  }\n\n  function initHuffmanTbl() {\n    YDC_HT = computeHuffmanTbl(\n      std_dc_luminance_nrcodes,\n      std_dc_luminance_values\n    );\n    UVDC_HT = computeHuffmanTbl(\n      std_dc_chrominance_nrcodes,\n      std_dc_chrominance_values\n    );\n    YAC_HT = computeHuffmanTbl(\n      std_ac_luminance_nrcodes,\n      std_ac_luminance_values\n    );\n    UVAC_HT = computeHuffmanTbl(\n      std_ac_chrominance_nrcodes,\n      std_ac_chrominance_values\n    );\n  }\n\n  function initCategoryNumber() {\n    var nrlower = 1;\n    var nrupper = 2;\n    for (var cat = 1; cat <= 15; cat++) {\n      //Positive numbers\n      for (var nr = nrlower; nr < nrupper; nr++) {\n        category[32767 + nr] = cat;\n        bitcode[32767 + nr] = [];\n        bitcode[32767 + nr][1] = cat;\n        bitcode[32767 + nr][0] = nr;\n      }\n      //Negative numbers\n      for (var nrneg = -(nrupper - 1); nrneg <= -nrlower; nrneg++) {\n        category[32767 + nrneg] = cat;\n        bitcode[32767 + nrneg] = [];\n        bitcode[32767 + nrneg][1] = cat;\n        bitcode[32767 + nrneg][0] = nrupper - 1 + nrneg;\n      }\n      nrlower <<= 1;\n      nrupper <<= 1;\n    }\n  }\n\n  function initRGBYUVTable() {\n    for (var i = 0; i < 256; i++) {\n      RGB_YUV_TABLE[i] = 19595 * i;\n      RGB_YUV_TABLE[(i + 256) >> 0] = 38470 * i;\n      RGB_YUV_TABLE[(i + 512) >> 0] = 7471 * i + 0x8000;\n      RGB_YUV_TABLE[(i + 768) >> 0] = -11059 * i;\n      RGB_YUV_TABLE[(i + 1024) >> 0] = -21709 * i;\n      RGB_YUV_TABLE[(i + 1280) >> 0] = 32768 * i + 0x807fff;\n      RGB_YUV_TABLE[(i + 1536) >> 0] = -27439 * i;\n      RGB_YUV_TABLE[(i + 1792) >> 0] = -5329 * i;\n    }\n  }\n\n  // IO functions\n  function writeBits(bs) {\n    var value = bs[0];\n    var posval = bs[1] - 1;\n    while (posval >= 0) {\n      if (value & (1 << posval)) {\n        bytenew |= 1 << bytepos;\n      }\n      posval--;\n      bytepos--;\n      if (bytepos < 0) {\n        if (bytenew == 0xff) {\n          writeByte(0xff);\n          writeByte(0);\n        } else {\n          writeByte(bytenew);\n        }\n        bytepos = 7;\n        bytenew = 0;\n      }\n    }\n  }\n\n  function writeByte(value) {\n    //byteout.push(clt[value]); // write char directly instead of converting later\n    byteout.push(value);\n  }\n\n  function writeWord(value) {\n    writeByte((value >> 8) & 0xff);\n    writeByte(value & 0xff);\n  }\n\n  // DCT & quantization core\n  function fDCTQuant(data, fdtbl) {\n    var d0, d1, d2, d3, d4, d5, d6, d7;\n    /* Pass 1: process rows. */\n    var dataOff = 0;\n    var i;\n    var I8 = 8;\n    var I64 = 64;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 1];\n      d2 = data[dataOff + 2];\n      d3 = data[dataOff + 3];\n      d4 = data[dataOff + 4];\n      d5 = data[dataOff + 5];\n      d6 = data[dataOff + 6];\n      d7 = data[dataOff + 7];\n\n      var tmp0 = d0 + d7;\n      var tmp7 = d0 - d7;\n      var tmp1 = d1 + d6;\n      var tmp6 = d1 - d6;\n      var tmp2 = d2 + d5;\n      var tmp5 = d2 - d5;\n      var tmp3 = d3 + d4;\n      var tmp4 = d3 - d4;\n\n      /* Even part */\n      var tmp10 = tmp0 + tmp3; /* phase 2 */\n      var tmp13 = tmp0 - tmp3;\n      var tmp11 = tmp1 + tmp2;\n      var tmp12 = tmp1 - tmp2;\n\n      data[dataOff] = tmp10 + tmp11; /* phase 3 */\n      data[dataOff + 4] = tmp10 - tmp11;\n\n      var z1 = (tmp12 + tmp13) * 0.707106781; /* c4 */\n      data[dataOff + 2] = tmp13 + z1; /* phase 5 */\n      data[dataOff + 6] = tmp13 - z1;\n\n      /* Odd part */\n      tmp10 = tmp4 + tmp5; /* phase 2 */\n      tmp11 = tmp5 + tmp6;\n      tmp12 = tmp6 + tmp7;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5 = (tmp10 - tmp12) * 0.382683433; /* c6 */\n      var z2 = 0.5411961 * tmp10 + z5; /* c2-c6 */\n      var z4 = 1.306562965 * tmp12 + z5; /* c2+c6 */\n      var z3 = tmp11 * 0.707106781; /* c4 */\n\n      var z11 = tmp7 + z3; /* phase 5 */\n      var z13 = tmp7 - z3;\n\n      data[dataOff + 5] = z13 + z2; /* phase 6 */\n      data[dataOff + 3] = z13 - z2;\n      data[dataOff + 1] = z11 + z4;\n      data[dataOff + 7] = z11 - z4;\n\n      dataOff += 8; /* advance pointer to next row */\n    }\n\n    /* Pass 2: process columns. */\n    dataOff = 0;\n    for (i = 0; i < I8; ++i) {\n      d0 = data[dataOff];\n      d1 = data[dataOff + 8];\n      d2 = data[dataOff + 16];\n      d3 = data[dataOff + 24];\n      d4 = data[dataOff + 32];\n      d5 = data[dataOff + 40];\n      d6 = data[dataOff + 48];\n      d7 = data[dataOff + 56];\n\n      var tmp0p2 = d0 + d7;\n      var tmp7p2 = d0 - d7;\n      var tmp1p2 = d1 + d6;\n      var tmp6p2 = d1 - d6;\n      var tmp2p2 = d2 + d5;\n      var tmp5p2 = d2 - d5;\n      var tmp3p2 = d3 + d4;\n      var tmp4p2 = d3 - d4;\n\n      /* Even part */\n      var tmp10p2 = tmp0p2 + tmp3p2; /* phase 2 */\n      var tmp13p2 = tmp0p2 - tmp3p2;\n      var tmp11p2 = tmp1p2 + tmp2p2;\n      var tmp12p2 = tmp1p2 - tmp2p2;\n\n      data[dataOff] = tmp10p2 + tmp11p2; /* phase 3 */\n      data[dataOff + 32] = tmp10p2 - tmp11p2;\n\n      var z1p2 = (tmp12p2 + tmp13p2) * 0.707106781; /* c4 */\n      data[dataOff + 16] = tmp13p2 + z1p2; /* phase 5 */\n      data[dataOff + 48] = tmp13p2 - z1p2;\n\n      /* Odd part */\n      tmp10p2 = tmp4p2 + tmp5p2; /* phase 2 */\n      tmp11p2 = tmp5p2 + tmp6p2;\n      tmp12p2 = tmp6p2 + tmp7p2;\n\n      /* The rotator is modified from fig 4-8 to avoid extra negations. */\n      var z5p2 = (tmp10p2 - tmp12p2) * 0.382683433; /* c6 */\n      var z2p2 = 0.5411961 * tmp10p2 + z5p2; /* c2-c6 */\n      var z4p2 = 1.306562965 * tmp12p2 + z5p2; /* c2+c6 */\n      var z3p2 = tmp11p2 * 0.707106781; /* c4 */\n\n      var z11p2 = tmp7p2 + z3p2; /* phase 5 */\n      var z13p2 = tmp7p2 - z3p2;\n\n      data[dataOff + 40] = z13p2 + z2p2; /* phase 6 */\n      data[dataOff + 24] = z13p2 - z2p2;\n      data[dataOff + 8] = z11p2 + z4p2;\n      data[dataOff + 56] = z11p2 - z4p2;\n\n      dataOff++; /* advance pointer to next column */\n    }\n\n    // Quantize/descale the coefficients\n    var fDCTQuant;\n    for (i = 0; i < I64; ++i) {\n      // Apply the quantization and scaling factor & Round to nearest integer\n      fDCTQuant = data[i] * fdtbl[i];\n      outputfDCTQuant[i] =\n        fDCTQuant > 0.0 ? (fDCTQuant + 0.5) | 0 : (fDCTQuant - 0.5) | 0;\n      //outputfDCTQuant[i] = fround(fDCTQuant);\n    }\n    return outputfDCTQuant;\n  }\n\n  function writeAPP0() {\n    writeWord(0xffe0); // marker\n    writeWord(16); // length\n    writeByte(0x4a); // J\n    writeByte(0x46); // F\n    writeByte(0x49); // I\n    writeByte(0x46); // F\n    writeByte(0); // = \"JFIF\",'\\0'\n    writeByte(1); // versionhi\n    writeByte(1); // versionlo\n    writeByte(0); // xyunits\n    writeWord(1); // xdensity\n    writeWord(1); // ydensity\n    writeByte(0); // thumbnwidth\n    writeByte(0); // thumbnheight\n  }\n\n  function writeSOF0(width, height) {\n    writeWord(0xffc0); // marker\n    writeWord(17); // length, truecolor YUV JPG\n    writeByte(8); // precision\n    writeWord(height);\n    writeWord(width);\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0x11); // HVY\n    writeByte(0); // QTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HVU\n    writeByte(1); // QTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HVV\n    writeByte(1); // QTV\n  }\n\n  function writeDQT() {\n    writeWord(0xffdb); // marker\n    writeWord(132); // length\n    writeByte(0);\n    for (var i = 0; i < 64; i++) {\n      writeByte(YTable[i]);\n    }\n    writeByte(1);\n    for (var j = 0; j < 64; j++) {\n      writeByte(UVTable[j]);\n    }\n  }\n\n  function writeDHT() {\n    writeWord(0xffc4); // marker\n    writeWord(0x01a2); // length\n\n    writeByte(0); // HTYDCinfo\n    for (var i = 0; i < 16; i++) {\n      writeByte(std_dc_luminance_nrcodes[i + 1]);\n    }\n    for (var j = 0; j <= 11; j++) {\n      writeByte(std_dc_luminance_values[j]);\n    }\n\n    writeByte(0x10); // HTYACinfo\n    for (var k = 0; k < 16; k++) {\n      writeByte(std_ac_luminance_nrcodes[k + 1]);\n    }\n    for (var l = 0; l <= 161; l++) {\n      writeByte(std_ac_luminance_values[l]);\n    }\n\n    writeByte(1); // HTUDCinfo\n    for (var m = 0; m < 16; m++) {\n      writeByte(std_dc_chrominance_nrcodes[m + 1]);\n    }\n    for (var n = 0; n <= 11; n++) {\n      writeByte(std_dc_chrominance_values[n]);\n    }\n\n    writeByte(0x11); // HTUACinfo\n    for (var o = 0; o < 16; o++) {\n      writeByte(std_ac_chrominance_nrcodes[o + 1]);\n    }\n    for (var p = 0; p <= 161; p++) {\n      writeByte(std_ac_chrominance_values[p]);\n    }\n  }\n\n  function writeSOS() {\n    writeWord(0xffda); // marker\n    writeWord(12); // length\n    writeByte(3); // nrofcomponents\n    writeByte(1); // IdY\n    writeByte(0); // HTY\n    writeByte(2); // IdU\n    writeByte(0x11); // HTU\n    writeByte(3); // IdV\n    writeByte(0x11); // HTV\n    writeByte(0); // Ss\n    writeByte(0x3f); // Se\n    writeByte(0); // Bf\n  }\n\n  function processDU(CDU, fdtbl, DC, HTDC, HTAC) {\n    var EOB = HTAC[0x00];\n    var M16zeroes = HTAC[0xf0];\n    var pos;\n    var I16 = 16;\n    var I63 = 63;\n    var I64 = 64;\n    var DU_DCT = fDCTQuant(CDU, fdtbl);\n    //ZigZag reorder\n    for (var j = 0; j < I64; ++j) {\n      DU[ZigZag[j]] = DU_DCT[j];\n    }\n    var Diff = DU[0] - DC;\n    DC = DU[0];\n    //Encode DC\n    if (Diff == 0) {\n      writeBits(HTDC[0]); // Diff might be 0\n    } else {\n      pos = 32767 + Diff;\n      writeBits(HTDC[category[pos]]);\n      writeBits(bitcode[pos]);\n    }\n    //Encode ACs\n    var end0pos = 63; // was const... which is crazy\n    while (end0pos > 0 && DU[end0pos] == 0) {\n      end0pos--;\n    }\n    //end0pos = first element in reverse order !=0\n    if (end0pos == 0) {\n      writeBits(EOB);\n      return DC;\n    }\n    var i = 1;\n    var lng;\n    while (i <= end0pos) {\n      var startpos = i;\n      while (DU[i] == 0 && i <= end0pos) {\n        ++i;\n      }\n      var nrzeroes = i - startpos;\n      if (nrzeroes >= I16) {\n        lng = nrzeroes >> 4;\n        for (var nrmarker = 1; nrmarker <= lng; ++nrmarker)\n          writeBits(M16zeroes);\n        nrzeroes = nrzeroes & 0xf;\n      }\n      pos = 32767 + DU[i];\n      writeBits(HTAC[(nrzeroes << 4) + category[pos]]);\n      writeBits(bitcode[pos]);\n      i++;\n    }\n    if (end0pos != I63) {\n      writeBits(EOB);\n    }\n    return DC;\n  }\n\n  function initCharLookupTable() {\n    var sfcc = String.fromCharCode;\n    for (var i = 0; i < 256; i++) {\n      ///// ACHTUNG // 255\n      clt[i] = sfcc(i);\n    }\n  }\n\n  this.encode = function(\n    image,\n    quality // image data object\n  ) {\n    if (quality) setQuality(quality);\n\n    // Initialize bit writer\n    byteout = new Array();\n    bytenew = 0;\n    bytepos = 7;\n\n    // Add JPEG headers\n    writeWord(0xffd8); // SOI\n    writeAPP0();\n    writeDQT();\n    writeSOF0(image.width, image.height);\n    writeDHT();\n    writeSOS();\n\n    // Encode 8x8 macroblocks\n    var DCY = 0;\n    var DCU = 0;\n    var DCV = 0;\n\n    bytenew = 0;\n    bytepos = 7;\n\n    this.encode.displayName = \"_encode_\";\n\n    var imageData = image.data;\n    var width = image.width;\n    var height = image.height;\n\n    var quadWidth = width * 4;\n\n    var x,\n      y = 0;\n    var r, g, b;\n    var start, p, col, row, pos;\n    while (y < height) {\n      x = 0;\n      while (x < quadWidth) {\n        start = quadWidth * y + x;\n        col = -1;\n        row = 0;\n\n        for (pos = 0; pos < 64; pos++) {\n          row = pos >> 3; // /8\n          col = (pos & 7) * 4; // %8\n          p = start + row * quadWidth + col;\n\n          if (y + row >= height) {\n            // padding bottom\n            p -= quadWidth * (y + 1 + row - height);\n          }\n\n          if (x + col >= quadWidth) {\n            // padding right\n            p -= x + col - quadWidth + 4;\n          }\n\n          r = imageData[p++];\n          g = imageData[p++];\n          b = imageData[p++];\n\n          /* // calculate YUV values dynamically\n\t\t\t\t\tYDU[pos]=((( 0.29900)*r+( 0.58700)*g+( 0.11400)*b))-128; //-0x80\n\t\t\t\t\tUDU[pos]=(((-0.16874)*r+(-0.33126)*g+( 0.50000)*b));\n\t\t\t\t\tVDU[pos]=((( 0.50000)*r+(-0.41869)*g+(-0.08131)*b));\n\t\t\t\t\t*/\n\n          // use lookup table (slightly faster)\n          YDU[pos] =\n            ((RGB_YUV_TABLE[r] +\n              RGB_YUV_TABLE[(g + 256) >> 0] +\n              RGB_YUV_TABLE[(b + 512) >> 0]) >>\n              16) -\n            128;\n          UDU[pos] =\n            ((RGB_YUV_TABLE[(r + 768) >> 0] +\n              RGB_YUV_TABLE[(g + 1024) >> 0] +\n              RGB_YUV_TABLE[(b + 1280) >> 0]) >>\n              16) -\n            128;\n          VDU[pos] =\n            ((RGB_YUV_TABLE[(r + 1280) >> 0] +\n              RGB_YUV_TABLE[(g + 1536) >> 0] +\n              RGB_YUV_TABLE[(b + 1792) >> 0]) >>\n              16) -\n            128;\n        }\n\n        DCY = processDU(YDU, fdtbl_Y, DCY, YDC_HT, YAC_HT);\n        DCU = processDU(UDU, fdtbl_UV, DCU, UVDC_HT, UVAC_HT);\n        DCV = processDU(VDU, fdtbl_UV, DCV, UVDC_HT, UVAC_HT);\n        x += 32;\n      }\n      y += 8;\n    }\n\n    ////////////////////////////////////////////////////////////////\n\n    // Do the bit alignment of the EOI marker\n    if (bytepos >= 0) {\n      var fillbits = [];\n      fillbits[1] = bytepos + 1;\n      fillbits[0] = (1 << (bytepos + 1)) - 1;\n      writeBits(fillbits);\n    }\n\n    writeWord(0xffd9); //EOI\n\n    return new Uint8Array(byteout);\n  };\n\n  function setQuality(quality) {\n    quality = Math.min(Math.max(quality, 1), 100);\n\n    if (currentQuality == quality) return; // don't recalc if unchanged\n\n    var sf =\n      quality < 50 ? Math.floor(5000 / quality) : Math.floor(200 - quality * 2);\n\n    initQuantTables(sf);\n    currentQuality = quality;\n    //console.log('Quality set to: '+quality +'%');\n  }\n\n  function init() {\n    quality = quality || 50;\n    // Create tables\n    initCharLookupTable();\n    initHuffmanTbl();\n    initCategoryNumber();\n    initRGBYUVTable();\n\n    setQuality(quality);\n  }\n  init();\n}\n\nexport { JPEGEncoder };\n","/**\n * @author shaozilee\n *\n * Bmp format decoder,support 1bit 4bit 8bit 24bit bmp\n *\n */\n\nimport { console } from \"./console.js\";\n\nfunction BmpDecoder(buffer, is_with_alpha) {\n  this.pos = 0;\n  this.buffer = buffer;\n  this.datav = new DataView(buffer.buffer);\n  this.is_with_alpha = !!is_with_alpha;\n  this.bottom_up = true;\n  this.flag =\n    String.fromCharCode(this.buffer[0]) + String.fromCharCode(this.buffer[1]);\n  this.pos += 2;\n  if ([\"BM\", \"BA\", \"CI\", \"CP\", \"IC\", \"PT\"].indexOf(this.flag) === -1)\n    throw new Error(\"Invalid BMP File\");\n  this.parseHeader();\n  this.parseBGR();\n}\n\nBmpDecoder.prototype.parseHeader = function() {\n  this.fileSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.reserved = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.offset = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.headerSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.width = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.height = this.datav.getInt32(this.pos, true);\n  this.pos += 4;\n  this.planes = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.bitPP = this.datav.getUint16(this.pos, true);\n  this.pos += 2;\n  this.compress = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.rawSize = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.hr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.vr = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.colors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n  this.importantColors = this.datav.getUint32(this.pos, true);\n  this.pos += 4;\n\n  if (this.bitPP === 16 && this.is_with_alpha) {\n    this.bitPP = 15;\n  }\n  if (this.bitPP < 15) {\n    var len = this.colors === 0 ? 1 << this.bitPP : this.colors;\n    this.palette = new Array(len);\n    for (var i = 0; i < len; i++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var quad = this.datav.getUint8(this.pos++, true);\n      this.palette[i] = {\n        red: red,\n        green: green,\n        blue: blue,\n        quad: quad\n      };\n    }\n  }\n  if (this.height < 0) {\n    this.height *= -1;\n    this.bottom_up = false;\n  }\n};\n\nBmpDecoder.prototype.parseBGR = function() {\n  this.pos = this.offset;\n  try {\n    var bitn = \"bit\" + this.bitPP;\n    var len = this.width * this.height * 4;\n    this.data = new Uint8Array(len);\n\n    this[bitn]();\n  } catch (e) {\n    console.log(\"bit decode error:\" + e);\n  }\n};\n\nBmpDecoder.prototype.bit1 = function() {\n  var xlen = Math.ceil(this.width / 8);\n  var mode = xlen % 4;\n  var y;\n  for (y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 8 * 4;\n      for (var i = 0; i < 8; i++) {\n        if (x * 8 + i < this.width) {\n          var rgb = this.palette[(b >> (7 - i)) & 0x1];\n          this.data[location + i * 4] = rgb.blue;\n          this.data[location + i * 4 + 1] = rgb.green;\n          this.data[location + i * 4 + 2] = rgb.red;\n          this.data[location + i * 4 + 3] = 0xff;\n        } else {\n          break;\n        }\n      }\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit4 = function() {\n  var xlen = Math.ceil(this.width / 2);\n  var mode = xlen % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < xlen; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 2 * 4;\n\n      var before = b >> 4;\n      var after = b & 0x0f;\n\n      var rgb = this.palette[before];\n      this.data[location] = rgb.blue;\n      this.data[location + 1] = rgb.green;\n      this.data[location + 2] = rgb.red;\n      this.data[location + 3] = 0xff;\n\n      if (x * 2 + 1 >= this.width) break;\n\n      rgb = this.palette[after];\n      this.data[location + 4] = rgb.blue;\n      this.data[location + 4 + 1] = rgb.green;\n      this.data[location + 4 + 2] = rgb.red;\n      this.data[location + 4 + 3] = 0xff;\n    }\n\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit8 = function() {\n  var mode = this.width % 4;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var b = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      if (b < this.palette.length) {\n        var rgb = this.palette[b];\n        this.data[location] = rgb.red;\n        this.data[location + 1] = rgb.green;\n        this.data[location + 2] = rgb.blue;\n        this.data[location + 3] = 0xff;\n      } else {\n        this.data[location] = 0xff;\n        this.data[location + 1] = 0xff;\n        this.data[location + 2] = 0xff;\n        this.data[location + 3] = 0xff;\n      }\n    }\n    if (mode !== 0) {\n      this.pos += 4 - mode;\n    }\n  }\n};\n\nBmpDecoder.prototype.bit15 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_5) / _1_5) * 255) | 0;\n      var red = ((((B >> 10) & _1_5) / _1_5) * 255) | 0;\n      var alpha = B >> 15 ? 0xff : 0x00;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit16 = function() {\n  var dif_w = this.width % 3;\n  var _11111 = parseInt(\"11111\", 2),\n    _1_5 = _11111;\n  var _111111 = parseInt(\"111111\", 2),\n    _1_6 = _111111;\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var B = this.datav.getUint16(this.pos, true);\n      this.pos += 2;\n      var alpha = 0xff;\n      var blue = (((B & _1_5) / _1_5) * 255) | 0;\n      var green = ((((B >> 5) & _1_6) / _1_6) * 255) | 0;\n      var red = (((B >> 11) / _1_5) * 255) | 0;\n\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    this.pos += dif_w;\n  }\n};\n\nBmpDecoder.prototype.bit24 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = 0xff;\n    }\n    //skip extra bytes\n    this.pos += this.width % 4;\n  }\n};\n\n/**\n * add 32bit decode func\n * @author soubok\n */\nBmpDecoder.prototype.bit32 = function() {\n  //when height > 0\n  for (var y = this.height - 1; y >= 0; y--) {\n    var line = this.bottom_up ? y : this.height - 1 - y;\n    for (var x = 0; x < this.width; x++) {\n      var blue = this.datav.getUint8(this.pos++, true);\n      var green = this.datav.getUint8(this.pos++, true);\n      var red = this.datav.getUint8(this.pos++, true);\n      var alpha = this.datav.getUint8(this.pos++, true);\n      var location = line * this.width * 4 + x * 4;\n      this.data[location] = red;\n      this.data[location + 1] = green;\n      this.data[location + 2] = blue;\n      this.data[location + 3] = alpha;\n    }\n    //skip extra bytes\n    //this.pos += (this.width % 4);\n  }\n};\n\nBmpDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { BmpDecoder };\n","function WebPDecoder(imageData) {\n  /** @license\n   * Copyright 2011 Google Inc.\n   *\n   * This code is licensed under the same terms as WebM:\n   *  Software License Agreement:  http://www.webmproject.org/license/software/\n   *  Additional IP Rights Grant:  http://www.webmproject.org/license/additional/\n   * -----------------------------------------------------------------------------\n   *\n   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n   * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n   * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n   * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,\n   * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n   * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n   * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY\n   * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n   * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\n   * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n   *\n   * -----------------------------------------------------------------------------\n   *\n   * Copyright 2011-2017 Dominik Homberger\n   * Libwebp Javascript / libwebpjs - the libwebp implementation in javascript (v0.6.0)\n   *\n   * Author: Dominik Homberger (dominik.homberger@gmail.com)\n   */\n\n  var self = this;\n  var UpsampleRgbLinePair,\n    UpsampleBgrLinePair,\n    UpsampleRgbaLinePair,\n    UpsampleBgraLinePair,\n    UpsampleArgbLinePair,\n    UpsampleArgbLinePair,\n    UpsampleRgba4444LinePair,\n    UpsampleRgb565LinePair;\n\n  function x(F) {\n    if (!F) throw Error(\"assert :P\");\n  }\n  function fa(F, L, J) {\n    for (var H = 0; 4 > H; H++) if (F[L + H] != J.charCodeAt(H)) return !0;\n    return !1;\n  }\n  function I(F, L, J, H, Z) {\n    for (var O = 0; O < Z; O++) F[L + O] = J[H + O];\n  }\n  function M(F, L, J, H) {\n    for (var Z = 0; Z < H; Z++) F[L + Z] = J;\n  }\n  function V(F) {\n    return new Int32Array(F);\n  }\n  function wa(F, L) {\n    for (var J = [], H = 0; H < F; H++) J.push(new L());\n    return J;\n  }\n  function wb() {\n    function F(J, H, Z) {\n      for (var O = Z[H], L = 0; L < O; L++) {\n        J.push(Z.length > H + 1 ? [] : 0);\n        if (Z.length < H + 1) break;\n        F(J[L], H + 1, Z);\n      }\n    }\n    var L = [];\n    F(L, 0, [3, 11]);\n    return L;\n  }\n  function Ed(F, L) {\n    function J(H, O, F) {\n      for (var Z = F[O], ma = 0; ma < Z; ma++) {\n        H.push(F.length > O + 1 ? [] : new L());\n        if (F.length < O + 1) break;\n        J(H[ma], O + 1, F);\n      }\n    }\n    var H = [];\n    J(H, 0, F);\n    return H;\n  }\n  var _WebPDecoder = function() {\n    var self = this;\n    function F() {\n      V(55);\n    }\n    function L(a, b) {\n      for (var c = (1 << (b - 1)) >>> 0; a & c; ) c >>>= 1;\n      return c ? (a & (c - 1)) + c : a;\n    }\n    function J(a, b, c, d, e) {\n      x(!(d % c));\n      do (d -= c), (a[b + d] = e);\n      while (0 < d);\n    }\n    function H(a, b, c, d, e, f) {\n      var g = b,\n        h = 1 << c,\n        k,\n        l,\n        m = V(16),\n        n = V(16);\n      x(0 != e);\n      x(null != d);\n      x(null != a);\n      x(0 < c);\n      for (l = 0; l < e; ++l) {\n        if (15 < d[l]) return 0;\n        ++m[d[l]];\n      }\n      if (m[0] == e) return 0;\n      n[1] = 0;\n      for (k = 1; 15 > k; ++k) {\n        if (m[k] > 1 << k) return 0;\n        n[k + 1] = n[k] + m[k];\n      }\n      for (l = 0; l < e; ++l) (k = d[l]), 0 < d[l] && (f[n[k]++] = l);\n      if (1 == n[15])\n        return (d = new O()), (d.g = 0), (d.value = f[0]), J(a, g, 1, h, d), h;\n      var r = -1,\n        q = h - 1,\n        t = 0,\n        v = 1,\n        p = 1,\n        u,\n        w = 1 << c;\n      l = 0;\n      k = 1;\n      for (e = 2; k <= c; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k])\n          (d = new O()),\n            (d.g = k),\n            (d.value = f[l++]),\n            J(a, g + t, e, w, d),\n            (t = L(t, k));\n      }\n      k = c + 1;\n      for (e = 2; 15 >= k; ++k, e <<= 1) {\n        p <<= 1;\n        v += p;\n        p -= m[k];\n        if (0 > p) return 0;\n        for (; 0 < m[k]; --m[k]) {\n          d = new O();\n          if ((t & q) != r) {\n            g += w;\n            r = k;\n            for (u = 1 << (r - c); 15 > r; ) {\n              u -= m[r];\n              if (0 >= u) break;\n              ++r;\n              u <<= 1;\n            }\n            u = r - c;\n            w = 1 << u;\n            h += w;\n            r = t & q;\n            a[b + r].g = u + c;\n            a[b + r].value = g - b - r;\n          }\n          d.g = k - c;\n          d.value = f[l++];\n          J(a, g + (t >> c), e, w, d);\n          t = L(t, k);\n        }\n      }\n      return v != 2 * n[15] - 1 ? 0 : h;\n    }\n    function Z(a, b, c, d, e) {\n      x(2328 >= e);\n      if (512 >= e) var f = V(512);\n      else if (((f = V(e)), null == f)) return 0;\n      return H(a, b, c, d, e, f);\n    }\n    function O() {\n      this.value = this.g = 0;\n    }\n    function Fd() {\n      this.value = this.g = 0;\n    }\n    function Ub() {\n      this.G = wa(5, O);\n      this.H = V(5);\n      this.jc = this.Qb = this.qb = this.nd = 0;\n      this.pd = wa(xb, Fd);\n    }\n    function ma(a, b, c, d) {\n      x(null != a);\n      x(null != b);\n      x(2147483648 > d);\n      a.Ca = 254;\n      a.I = 0;\n      a.b = -8;\n      a.Ka = 0;\n      a.oa = b;\n      a.pa = c;\n      a.Jd = b;\n      a.Yc = c + d;\n      a.Zc = 4 <= d ? c + d - 4 + 1 : c;\n      Qa(a);\n    }\n    function na(a, b) {\n      for (var c = 0; 0 < b--; ) c |= K(a, 128) << b;\n      return c;\n    }\n    function ca(a, b) {\n      var c = na(a, b);\n      return G(a) ? -c : c;\n    }\n    function cb(a, b, c, d) {\n      var e,\n        f = 0;\n      x(null != a);\n      x(null != b);\n      x(4294967288 > d);\n      a.Sb = d;\n      a.Ra = 0;\n      a.u = 0;\n      a.h = 0;\n      4 < d && (d = 4);\n      for (e = 0; e < d; ++e) f += b[c + e] << (8 * e);\n      a.Ra = f;\n      a.bb = d;\n      a.oa = b;\n      a.pa = c;\n    }\n    function Vb(a) {\n      for (; 8 <= a.u && a.bb < a.Sb; )\n        (a.Ra >>>= 8),\n          (a.Ra += (a.oa[a.pa + a.bb] << (ob - 8)) >>> 0),\n          ++a.bb,\n          (a.u -= 8);\n      db(a) && ((a.h = 1), (a.u = 0));\n    }\n    function D(a, b) {\n      x(0 <= b);\n      if (!a.h && b <= Gd) {\n        var c = pb(a) & Hd[b];\n        a.u += b;\n        Vb(a);\n        return c;\n      }\n      a.h = 1;\n      return (a.u = 0);\n    }\n    function Wb() {\n      this.b = this.Ca = this.I = 0;\n      this.oa = [];\n      this.pa = 0;\n      this.Jd = [];\n      this.Yc = 0;\n      this.Zc = [];\n      this.Ka = 0;\n    }\n    function Ra() {\n      this.Ra = 0;\n      this.oa = [];\n      this.h = this.u = this.bb = this.Sb = this.pa = 0;\n    }\n    function pb(a) {\n      return (a.Ra >>> (a.u & (ob - 1))) >>> 0;\n    }\n    function db(a) {\n      x(a.bb <= a.Sb);\n      return a.h || (a.bb == a.Sb && a.u > ob);\n    }\n    function qb(a, b) {\n      a.u = b;\n      a.h = db(a);\n    }\n    function Sa(a) {\n      a.u >= Xb && (x(a.u >= Xb), Vb(a));\n    }\n    function Qa(a) {\n      x(null != a && null != a.oa);\n      a.pa < a.Zc\n        ? ((a.I = (a.oa[a.pa++] | (a.I << 8)) >>> 0), (a.b += 8))\n        : (x(null != a && null != a.oa),\n          a.pa < a.Yc\n            ? ((a.b += 8), (a.I = a.oa[a.pa++] | (a.I << 8)))\n            : a.Ka\n            ? (a.b = 0)\n            : ((a.I <<= 8), (a.b += 8), (a.Ka = 1)));\n    }\n    function G(a) {\n      return na(a, 1);\n    }\n    function K(a, b) {\n      var c = a.Ca;\n      0 > a.b && Qa(a);\n      var d = a.b,\n        e = (c * b) >>> 8,\n        f = (a.I >>> d > e) + 0;\n      f ? ((c -= e), (a.I -= ((e + 1) << d) >>> 0)) : (c = e + 1);\n      d = c;\n      for (e = 0; 256 <= d; ) (e += 8), (d >>= 8);\n      d = 7 ^ (e + Id[d]);\n      a.b -= d;\n      a.Ca = (c << d) - 1;\n      return f;\n    }\n    function ra(a, b, c) {\n      a[b + 0] = (c >> 24) & 255;\n      a[b + 1] = (c >> 16) & 255;\n      a[b + 2] = (c >> 8) & 255;\n      a[b + 3] = (c >> 0) & 255;\n    }\n    function Ta(a, b) {\n      return (a[b + 0] << 0) | (a[b + 1] << 8);\n    }\n    function Yb(a, b) {\n      return Ta(a, b) | (a[b + 2] << 16);\n    }\n    function Ha(a, b) {\n      return Ta(a, b) | (Ta(a, b + 2) << 16);\n    }\n    function Zb(a, b) {\n      var c = 1 << b;\n      x(null != a);\n      x(0 < b);\n      a.X = V(c);\n      if (null == a.X) return 0;\n      a.Mb = 32 - b;\n      a.Xa = b;\n      return 1;\n    }\n    function $b(a, b) {\n      x(null != a);\n      x(null != b);\n      x(a.Xa == b.Xa);\n      I(b.X, 0, a.X, 0, 1 << b.Xa);\n    }\n    function ac() {\n      this.X = [];\n      this.Xa = this.Mb = 0;\n    }\n    function bc(a, b, c, d) {\n      x(null != c);\n      x(null != d);\n      var e = c[0],\n        f = d[0];\n      0 == e && (e = (a * f + b / 2) / b);\n      0 == f && (f = (b * e + a / 2) / a);\n      if (0 >= e || 0 >= f) return 0;\n      c[0] = e;\n      d[0] = f;\n      return 1;\n    }\n    function xa(a, b) {\n      return (a + (1 << b) - 1) >>> b;\n    }\n    function yb(a, b) {\n      return (\n        (((((a & 4278255360) + (b & 4278255360)) >>> 0) & 4278255360) +\n          ((((a & 16711935) + (b & 16711935)) >>> 0) & 16711935)) >>>\n        0\n      );\n    }\n    function X(a, b) {\n      self[b] = function(b, d, e, f, g, h, k) {\n        var c;\n        for (c = 0; c < g; ++c) {\n          var m = self[a](h[k + c - 1], e, f + c);\n          h[k + c] = yb(b[d + c], m);\n        }\n      };\n    }\n    function Jd() {\n      this.ud = this.hd = this.jd = 0;\n    }\n    function aa(a, b) {\n      return ((((a ^ b) & 4278124286) >>> 1) + (a & b)) >>> 0;\n    }\n    function sa(a) {\n      if (0 <= a && 256 > a) return a;\n      if (0 > a) return 0;\n      if (255 < a) return 255;\n    }\n    function eb(a, b) {\n      return sa(a + ((a - b + 0.5) >> 1));\n    }\n    function Ia(a, b, c) {\n      return Math.abs(b - c) - Math.abs(a - c);\n    }\n    function cc(a, b, c, d, e, f, g) {\n      d = f[g - 1];\n      for (c = 0; c < e; ++c) f[g + c] = d = yb(a[b + c], d);\n    }\n    function Kd(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < c; ++f) {\n        var g = a[b + f],\n          h = (g >> 8) & 255,\n          k = g & 16711935,\n          k = k + ((h << 16) + h),\n          k = k & 16711935;\n        d[e + f] = ((g & 4278255360) + k) >>> 0;\n      }\n    }\n    function dc(a, b) {\n      b.jd = (a >> 0) & 255;\n      b.hd = (a >> 8) & 255;\n      b.ud = (a >> 16) & 255;\n    }\n    function Ld(a, b, c, d, e, f) {\n      var g;\n      for (g = 0; g < d; ++g) {\n        var h = b[c + g],\n          k = h >>> 8,\n          l = h >>> 16,\n          m = h,\n          l = l + ((((a.jd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          l = l & 255,\n          m = m + ((((a.hd << 24) >> 24) * ((k << 24) >> 24)) >>> 5),\n          m = m + ((((a.ud << 24) >> 24) * ((l << 24) >> 24)) >>> 5),\n          m = m & 255;\n        e[f + g] = (h & 4278255360) + (l << 16) + m;\n      }\n    }\n    function ec(a, b, c, d, e) {\n      self[b] = function(a, b, c, k, l, m, n, r, q) {\n        for (k = n; k < r; ++k)\n          for (n = 0; n < q; ++n) l[m++] = e(c[d(a[b++])]);\n      };\n      self[a] = function(a, b, h, k, l, m, n) {\n        var f = 8 >> a.b,\n          g = a.Ea,\n          t = a.K[0],\n          v = a.w;\n        if (8 > f)\n          for (a = (1 << a.b) - 1, v = (1 << f) - 1; b < h; ++b) {\n            var p = 0,\n              u;\n            for (u = 0; u < g; ++u)\n              u & a || (p = d(k[l++])), (m[n++] = e(t[p & v])), (p >>= f);\n          }\n        else self[\"VP8LMapColor\" + c](k, l, t, v, m, n, b, h, g);\n      };\n    }\n    function Md(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n      }\n    }\n    function Nd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 16) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 24) & 255;\n      }\n    }\n    function Od(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 240) | ((f >> 12) & 15),\n          f = ((f >> 0) & 240) | ((f >> 28) & 15);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Pd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++],\n          g = ((f >> 16) & 248) | ((f >> 13) & 7),\n          f = ((f >> 5) & 224) | ((f >> 3) & 31);\n        d[e++] = g;\n        d[e++] = f;\n      }\n    }\n    function Qd(a, b, c, d, e) {\n      for (c = b + c; b < c; ) {\n        var f = a[b++];\n        d[e++] = (f >> 0) & 255;\n        d[e++] = (f >> 8) & 255;\n        d[e++] = (f >> 16) & 255;\n      }\n    }\n    function fb(a, b, c, d, e, f) {\n      if (0 == f)\n        for (c = b + c; b < c; )\n          (f = a[b++]),\n            ra(\n              d,\n              ((f[0] >> 24) |\n                ((f[1] >> 8) & 65280) |\n                ((f[2] << 8) & 16711680) |\n                (f[3] << 24)) >>>\n                0\n            ),\n            (e += 32);\n      else I(d, e, a, b, c);\n    }\n    function gb(a, b) {\n      self[b][0] = self[a + \"0\"];\n      self[b][1] = self[a + \"1\"];\n      self[b][2] = self[a + \"2\"];\n      self[b][3] = self[a + \"3\"];\n      self[b][4] = self[a + \"4\"];\n      self[b][5] = self[a + \"5\"];\n      self[b][6] = self[a + \"6\"];\n      self[b][7] = self[a + \"7\"];\n      self[b][8] = self[a + \"8\"];\n      self[b][9] = self[a + \"9\"];\n      self[b][10] = self[a + \"10\"];\n      self[b][11] = self[a + \"11\"];\n      self[b][12] = self[a + \"12\"];\n      self[b][13] = self[a + \"13\"];\n      self[b][14] = self[a + \"0\"];\n      self[b][15] = self[a + \"0\"];\n    }\n    function hb(a) {\n      return a == zb || a == Ab || a == Ja || a == Bb;\n    }\n    function Rd() {\n      this.eb = [];\n      this.size = this.A = this.fb = 0;\n    }\n    function Sd() {\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.F = [];\n      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;\n    }\n    function Cb() {\n      this.Rd = this.height = this.width = this.S = 0;\n      this.f = {};\n      this.f.RGBA = new Rd();\n      this.f.kb = new Sd();\n      this.sd = null;\n    }\n    function Td() {\n      this.width = [0];\n      this.height = [0];\n      this.Pd = [0];\n      this.Qd = [0];\n      this.format = [0];\n    }\n    function Ud() {\n      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;\n    }\n    function Vd(a) {\n      alert(\"todo:WebPSamplerProcessPlane\");\n      return a.T;\n    }\n    function Wd(a, b) {\n      var c = a.T,\n        d = b.ba.f.RGBA,\n        e = d.eb,\n        f = d.fb + a.ka * d.A,\n        g = P[b.ba.S],\n        h = a.y,\n        k = a.O,\n        l = a.f,\n        m = a.N,\n        n = a.ea,\n        r = a.W,\n        q = b.cc,\n        t = b.dc,\n        v = b.Mc,\n        p = b.Nc,\n        u = a.ka,\n        w = a.ka + a.T,\n        y = a.U,\n        A = (y + 1) >> 1;\n      0 == u\n        ? g(h, k, null, null, l, m, n, r, l, m, n, r, e, f, null, null, y)\n        : (g(b.ec, b.fc, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y),\n          ++c);\n      for (; u + 2 < w; u += 2)\n        (q = l),\n          (t = m),\n          (v = n),\n          (p = r),\n          (m += a.Rc),\n          (r += a.Rc),\n          (f += 2 * d.A),\n          (k += 2 * a.fa),\n          g(h, k - a.fa, h, k, q, t, v, p, l, m, n, r, e, f - d.A, e, f, y);\n      k += a.fa;\n      a.j + w < a.o\n        ? (I(b.ec, b.fc, h, k, y),\n          I(b.cc, b.dc, l, m, A),\n          I(b.Mc, b.Nc, n, r, A),\n          c--)\n        : w & 1 ||\n          g(\n            h,\n            k,\n            null,\n            null,\n            l,\n            m,\n            n,\n            r,\n            l,\n            m,\n            n,\n            r,\n            e,\n            f + d.A,\n            null,\n            null,\n            y\n          );\n      return c;\n    }\n    function Xd(a, b, c) {\n      var d = a.F,\n        e = [a.J];\n      if (null != d) {\n        var f = a.U,\n          g = b.ba.S,\n          h = g == ya || g == Ja;\n        b = b.ba.f.RGBA;\n        var k = [0],\n          l = a.ka;\n        k[0] = a.T;\n        a.Kb &&\n          (0 == l ? --k[0] : (--l, (e[0] -= a.width)),\n          a.j + a.ka + a.T == a.o && (k[0] = a.o - a.j - l));\n        var m = b.eb,\n          l = b.fb + l * b.A;\n        a = fc(d, e[0], a.width, f, k, m, l + (h ? 0 : 3), b.A);\n        x(c == k);\n        a && hb(g) && za(m, l, h, f, k, b.A);\n      }\n      return 0;\n    }\n    function gc(a) {\n      var b = a.ma,\n        c = b.ba.S,\n        d = 11 > c,\n        e = c == Ua || c == Va || c == ya || c == Db || 12 == c || hb(c);\n      b.memory = null;\n      b.Ib = null;\n      b.Jb = null;\n      b.Nd = null;\n      if (!hc(b.Oa, a, e ? 11 : 12)) return 0;\n      e && hb(c) && ic();\n      if (a.da) alert(\"todo:use_scaling\");\n      else {\n        if (d) {\n          if (((b.Ib = Vd), a.Kb)) {\n            c = (a.U + 1) >> 1;\n            b.memory = V(a.U + 2 * c);\n            if (null == b.memory) return 0;\n            b.ec = b.memory;\n            b.fc = 0;\n            b.cc = b.ec;\n            b.dc = b.fc + a.U;\n            b.Mc = b.cc;\n            b.Nc = b.dc + c;\n            b.Ib = Wd;\n            ic();\n          }\n        } else alert(\"todo:EmitYUV\");\n        e && ((b.Jb = Xd), d && Aa());\n      }\n      if (d && !jc) {\n        for (a = 0; 256 > a; ++a)\n          (Yd[a] = (89858 * (a - 128) + Ba) >> Wa),\n            (Zd[a] = -22014 * (a - 128) + Ba),\n            ($d[a] = -45773 * (a - 128)),\n            (ae[a] = (113618 * (a - 128) + Ba) >> Wa);\n        for (a = ta; a < Eb; ++a)\n          (b = (76283 * (a - 16) + Ba) >> Wa),\n            (be[a - ta] = ga(b, 255)),\n            (ce[a - ta] = ga((b + 8) >> 4, 15));\n        jc = 1;\n      }\n      return 1;\n    }\n    function kc(a) {\n      var b = a.ma,\n        c = a.U,\n        d = a.T;\n      x(!(a.ka & 1));\n      if (0 >= c || 0 >= d) return 0;\n      c = b.Ib(a, b);\n      null != b.Jb && b.Jb(a, b, c);\n      b.Dc += c;\n      return 1;\n    }\n    function lc(a) {\n      a.ma.memory = null;\n    }\n    function mc(a, b, c, d) {\n      if (47 != D(a, 8)) return 0;\n      b[0] = D(a, 14) + 1;\n      c[0] = D(a, 14) + 1;\n      d[0] = D(a, 1);\n      return 0 != D(a, 3) ? 0 : !a.h;\n    }\n    function ib(a, b) {\n      if (4 > a) return a + 1;\n      var c = (a - 2) >> 1;\n      return ((2 + (a & 1)) << c) + D(b, c) + 1;\n    }\n    function nc(a, b) {\n      if (120 < b) return b - 120;\n      var c = de[b - 1],\n        c = (c >> 4) * a + (8 - (c & 15));\n      return 1 <= c ? c : 1;\n    }\n    function ua(a, b, c) {\n      var d = pb(c);\n      b += d & 255;\n      var e = a[b].g - 8;\n      0 < e &&\n        (qb(c, c.u + 8),\n        (d = pb(c)),\n        (b += a[b].value),\n        (b += d & ((1 << e) - 1)));\n      qb(c, c.u + a[b].g);\n      return a[b].value;\n    }\n    function ub(a, b, c) {\n      c.g += a.g;\n      c.value += (a.value << b) >>> 0;\n      x(8 >= c.g);\n      return a.g;\n    }\n    function ha(a, b, c) {\n      var d = a.xc;\n      b = 0 == d ? 0 : a.vc[a.md * (c >> d) + (b >> d)];\n      x(b < a.Wb);\n      return a.Ya[b];\n    }\n    function oc(a, b, c, d) {\n      var e = a.ab,\n        f = a.c * b,\n        g = a.C;\n      b = g + b;\n      var h = c,\n        k = d;\n      d = a.Ta;\n      for (c = a.Ua; 0 < e--; ) {\n        var l = a.gc[e],\n          m = g,\n          n = b,\n          r = h,\n          q = k,\n          k = d,\n          h = c,\n          t = l.Ea;\n        x(m < n);\n        x(n <= l.nc);\n        switch (l.hc) {\n          case 2:\n            pc(r, q, (n - m) * t, k, h);\n            break;\n          case 0:\n            var v = l,\n              p = m,\n              u = n,\n              w = k,\n              y = h,\n              A = v.Ea;\n            0 == p &&\n              (ee(r, q, null, null, 1, w, y),\n              cc(r, q + 1, 0, 0, A - 1, w, y + 1),\n              (q += A),\n              (y += A),\n              ++p);\n            for (\n              var E = 1 << v.b,\n                B = E - 1,\n                C = xa(A, v.b),\n                N = v.K,\n                v = v.w + (p >> v.b) * C;\n              p < u;\n\n            ) {\n              var z = N,\n                Q = v,\n                S = 1;\n              for (fe(r, q, w, y - A, 1, w, y); S < A; ) {\n                var K = qc[(z[Q++] >> 8) & 15],\n                  D = (S & ~B) + E;\n                D > A && (D = A);\n                K(r, q + +S, w, y + S - A, D - S, w, y + S);\n                S = D;\n              }\n              q += A;\n              y += A;\n              ++p;\n              p & B || (v += C);\n            }\n            n != l.nc && I(k, h - t, k, h + (n - m - 1) * t, t);\n            break;\n          case 1:\n            t = r;\n            u = q;\n            r = l.Ea;\n            q = 1 << l.b;\n            w = q - 1;\n            y = r & ~w;\n            A = r - y;\n            p = xa(r, l.b);\n            E = l.K;\n            for (l = l.w + (m >> l.b) * p; m < n; ) {\n              B = E;\n              C = l;\n              N = new Jd();\n              v = u + y;\n              for (z = u + r; u < v; )\n                dc(B[C++], N), Fb(N, t, u, q, k, h), (u += q), (h += q);\n              u < z &&\n                (dc(B[C++], N), Fb(N, t, u, A, k, h), (u += A), (h += A));\n              ++m;\n              m & w || (l += p);\n            }\n            break;\n          case 3:\n            if (r == k && q == h && 0 < l.b) {\n              y = (n - m) * xa(l.Ea, l.b);\n              t = h + (n - m) * t - y;\n              u = k;\n              r = t;\n              q = k;\n              w = h;\n              A = y;\n              p = [];\n              for (y = A - 1; 0 <= y; --y) p[y] = q[w + y];\n              for (y = A - 1; 0 <= y; --y) u[r + y] = p[y];\n              rc(l, m, n, k, t, k, h);\n            } else rc(l, m, n, r, q, k, h);\n        }\n        h = d;\n        k = c;\n      }\n      k != c && I(d, c, h, k, f);\n    }\n    function ge(a, b) {\n      var c = a.V,\n        d = a.Ba + a.c * a.C,\n        e = b - a.C;\n      x(b <= a.l.o);\n      x(16 >= e);\n      if (0 < e) {\n        var f = a.l,\n          g = a.Ta,\n          h = a.Ua,\n          k = f.width;\n        oc(a, e, c, d);\n        h = [h];\n        c = a.C;\n        d = b;\n        e = h;\n        x(c < d);\n        x(f.v < f.va);\n        d > f.o && (d = f.o);\n        if (c < f.j) {\n          var l = f.j - c,\n            c = f.j;\n          e[0] += l * k;\n        }\n        c >= d\n          ? (c = 0)\n          : ((e[0] += 4 * f.v),\n            (f.ka = c - f.j),\n            (f.U = f.va - f.v),\n            (f.T = d - c),\n            (c = 1));\n        if (c) {\n          h = h[0];\n          c = a.ca;\n          if (11 > c.S) {\n            for (\n              var m = c.f.RGBA,\n                d = c.S,\n                e = f.U,\n                f = f.T,\n                l = m.eb,\n                n = m.A,\n                r = f,\n                m = m.fb + a.Ma * m.A;\n              0 < r--;\n\n            ) {\n              var q = g,\n                t = h,\n                v = e,\n                p = l,\n                u = m;\n              switch (d) {\n                case Ca:\n                  sc(q, t, v, p, u);\n                  break;\n                case Ua:\n                  Gb(q, t, v, p, u);\n                  break;\n                case zb:\n                  Gb(q, t, v, p, u);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case tc:\n                  uc(q, t, v, p, u);\n                  break;\n                case Va:\n                  fb(q, t, v, p, u, 1);\n                  break;\n                case Ab:\n                  fb(q, t, v, p, u, 1);\n                  za(p, u, 0, v, 1, 0);\n                  break;\n                case ya:\n                  fb(q, t, v, p, u, 0);\n                  break;\n                case Ja:\n                  fb(q, t, v, p, u, 0);\n                  za(p, u, 1, v, 1, 0);\n                  break;\n                case Db:\n                  Hb(q, t, v, p, u);\n                  break;\n                case Bb:\n                  Hb(q, t, v, p, u);\n                  vc(p, u, v, 1, 0);\n                  break;\n                case wc:\n                  xc(q, t, v, p, u);\n                  break;\n                default:\n                  x(0);\n              }\n              h += k;\n              m += n;\n            }\n            a.Ma += f;\n          } else alert(\"todo:EmitRescaledRowsYUVA\");\n          x(a.Ma <= c.height);\n        }\n      }\n      a.C = b;\n      x(a.C <= a.i);\n    }\n    function yc(a) {\n      var b;\n      if (0 < a.ua) return 0;\n      for (b = 0; b < a.Wb; ++b) {\n        var c = a.Ya[b].G,\n          d = a.Ya[b].H;\n        if (\n          0 < c[1][d[1] + 0].g ||\n          0 < c[2][d[2] + 0].g ||\n          0 < c[3][d[3] + 0].g\n        )\n          return 0;\n      }\n      return 1;\n    }\n    function zc(a, b, c, d, e, f) {\n      if (0 != a.Z) {\n        var g = a.qd,\n          h = a.rd;\n        for (x(null != ia[a.Z]); b < c; ++b)\n          ia[a.Z](g, h, d, e, d, e, f), (g = d), (h = e), (e += f);\n        a.qd = g;\n        a.rd = h;\n      }\n    }\n    function Ib(a, b) {\n      var c = a.l.ma,\n        d = 0 == c.Z || 1 == c.Z ? a.l.j : a.C,\n        d = a.C < d ? d : a.C;\n      x(b <= a.l.o);\n      if (b > d) {\n        var e = a.l.width,\n          f = c.ca,\n          g = c.tb + e * d,\n          h = a.V,\n          k = a.Ba + a.c * d,\n          l = a.gc;\n        x(1 == a.ab);\n        x(3 == l[0].hc);\n        he(l[0], d, b, h, k, f, g);\n        zc(c, d, b, f, g, e);\n      }\n      a.C = a.Ma = b;\n    }\n    function Jb(a, b, c, d, e, f, g) {\n      var h = a.$ / d,\n        k = a.$ % d,\n        l = a.m,\n        m = a.s,\n        n = c + a.$,\n        r = n;\n      e = c + d * e;\n      var q = c + d * f,\n        t = 280 + m.ua,\n        v = a.Pb ? h : 16777216,\n        p = 0 < m.ua ? m.Wa : null,\n        u = m.wc,\n        w = n < q ? ha(m, k, h) : null;\n      x(a.C < f);\n      x(q <= e);\n      var y = !1;\n      a: for (;;) {\n        for (; y || n < q; ) {\n          var A = 0;\n          if (h >= v) {\n            var v = a,\n              E = n - c;\n            x(v.Pb);\n            v.wd = v.m;\n            v.xd = E;\n            0 < v.s.ua && $b(v.s.Wa, v.s.vb);\n            v = h + ie;\n          }\n          k & u || (w = ha(m, k, h));\n          x(null != w);\n          w.Qb && ((b[n] = w.qb), (y = !0));\n          if (!y)\n            if ((Sa(l), w.jc)) {\n              var A = l,\n                E = b,\n                B = n,\n                C = w.pd[pb(A) & (xb - 1)];\n              x(w.jc);\n              256 > C.g\n                ? (qb(A, A.u + C.g), (E[B] = C.value), (A = 0))\n                : (qb(A, A.u + C.g - 256), x(256 <= C.value), (A = C.value));\n              0 == A && (y = !0);\n            } else A = ua(w.G[0], w.H[0], l);\n          if (l.h) break;\n          if (y || 256 > A) {\n            if (!y)\n              if (w.nd) b[n] = (w.qb | (A << 8)) >>> 0;\n              else {\n                Sa(l);\n                y = ua(w.G[1], w.H[1], l);\n                Sa(l);\n                E = ua(w.G[2], w.H[2], l);\n                B = ua(w.G[3], w.H[3], l);\n                if (l.h) break;\n                b[n] = ((B << 24) | (y << 16) | (A << 8) | E) >>> 0;\n              }\n            y = !1;\n            ++n;\n            ++k;\n            if (\n              k >= d &&\n              ((k = 0),\n              ++h,\n              null != g && h <= f && !(h % 16) && g(a, h),\n              null != p)\n            )\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (280 > A) {\n            A = ib(A - 256, l);\n            E = ua(w.G[4], w.H[4], l);\n            Sa(l);\n            E = ib(E, l);\n            E = nc(d, E);\n            if (l.h) break;\n            if (n - c < E || e - n < A) break a;\n            else for (B = 0; B < A; ++B) b[n + B] = b[n + B - E];\n            n += A;\n            for (k += A; k >= d; )\n              (k -= d), ++h, null != g && h <= f && !(h % 16) && g(a, h);\n            x(n <= e);\n            k & u && (w = ha(m, k, h));\n            if (null != p)\n              for (; r < n; )\n                (A = b[r++]),\n                  (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n          } else if (A < t) {\n            y = A - 280;\n            for (x(null != p); r < n; )\n              (A = b[r++]), (p.X[((506832829 * A) & 4294967295) >>> p.Mb] = A);\n            A = n;\n            E = p;\n            x(!(y >>> E.Xa));\n            b[A] = E.X[y];\n            y = !0;\n          } else break a;\n          y || x(l.h == db(l));\n        }\n        if (a.Pb && l.h && n < e)\n          x(a.m.h),\n            (a.a = 5),\n            (a.m = a.wd),\n            (a.$ = a.xd),\n            0 < a.s.ua && $b(a.s.vb, a.s.Wa);\n        else if (l.h) break a;\n        else null != g && g(a, h > f ? f : h), (a.a = 0), (a.$ = n - c);\n        return 1;\n      }\n      a.a = 3;\n      return 0;\n    }\n    function Ac(a) {\n      x(null != a);\n      a.vc = null;\n      a.yc = null;\n      a.Ya = null;\n      var b = a.Wa;\n      null != b && (b.X = null);\n      a.vb = null;\n      x(null != a);\n    }\n    function Bc() {\n      var a = new je();\n      if (null == a) return null;\n      a.a = 0;\n      a.xb = Cc;\n      gb(\"Predictor\", \"VP8LPredictors\");\n      gb(\"Predictor\", \"VP8LPredictors_C\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd\");\n      gb(\"PredictorAdd\", \"VP8LPredictorsAdd_C\");\n      pc = Kd;\n      Fb = Ld;\n      sc = Md;\n      Gb = Nd;\n      Hb = Od;\n      xc = Pd;\n      uc = Qd;\n      self.VP8LMapColor32b = ke;\n      self.VP8LMapColor8b = le;\n      return a;\n    }\n    function rb(a, b, c, d, e) {\n      var f = 1,\n        g = [a],\n        h = [b],\n        k = d.m,\n        l = d.s,\n        m = null,\n        n = 0;\n      a: for (;;) {\n        if (c)\n          for (; f && D(k, 1); ) {\n            var r = g,\n              q = h,\n              t = d,\n              v = 1,\n              p = t.m,\n              u = t.gc[t.ab],\n              w = D(p, 2);\n            if (t.Oc & (1 << w)) f = 0;\n            else {\n              t.Oc |= 1 << w;\n              u.hc = w;\n              u.Ea = r[0];\n              u.nc = q[0];\n              u.K = [null];\n              ++t.ab;\n              x(4 >= t.ab);\n              switch (w) {\n                case 0:\n                case 1:\n                  u.b = D(p, 3) + 2;\n                  v = rb(xa(u.Ea, u.b), xa(u.nc, u.b), 0, t, u.K);\n                  u.K = u.K[0];\n                  break;\n                case 3:\n                  var y = D(p, 8) + 1,\n                    A = 16 < y ? 0 : 4 < y ? 1 : 2 < y ? 2 : 3;\n                  r[0] = xa(u.Ea, A);\n                  u.b = A;\n                  var v = rb(y, 1, 0, t, u.K),\n                    E;\n                  if ((E = v)) {\n                    var B,\n                      C = y,\n                      N = u,\n                      z = 1 << (8 >> N.b),\n                      Q = V(z);\n                    if (null == Q) E = 0;\n                    else {\n                      var S = N.K[0],\n                        K = N.w;\n                      Q[0] = N.K[0][0];\n                      for (B = 1; B < 1 * C; ++B) Q[B] = yb(S[K + B], Q[B - 1]);\n                      for (; B < 4 * z; ++B) Q[B] = 0;\n                      N.K[0] = null;\n                      N.K[0] = Q;\n                      E = 1;\n                    }\n                  }\n                  v = E;\n                  break;\n                case 2:\n                  break;\n                default:\n                  x(0);\n              }\n              f = v;\n            }\n          }\n        g = g[0];\n        h = h[0];\n        if (f && D(k, 1) && ((n = D(k, 4)), (f = 1 <= n && 11 >= n), !f)) {\n          d.a = 3;\n          break a;\n        }\n        var H;\n        if ((H = f))\n          b: {\n            var F = d,\n              G = g,\n              L = h,\n              J = n,\n              T = c,\n              Da,\n              ba,\n              X = F.m,\n              R = F.s,\n              P = [null],\n              U,\n              W = 1,\n              aa = 0,\n              na = me[J];\n            c: for (;;) {\n              if (T && D(X, 1)) {\n                var ca = D(X, 3) + 2,\n                  ga = xa(G, ca),\n                  ka = xa(L, ca),\n                  qa = ga * ka;\n                if (!rb(ga, ka, 0, F, P)) break c;\n                P = P[0];\n                R.xc = ca;\n                for (Da = 0; Da < qa; ++Da) {\n                  var ia = (P[Da] >> 8) & 65535;\n                  P[Da] = ia;\n                  ia >= W && (W = ia + 1);\n                }\n              }\n              if (X.h) break c;\n              for (ba = 0; 5 > ba; ++ba) {\n                var Y = Dc[ba];\n                !ba && 0 < J && (Y += 1 << J);\n                aa < Y && (aa = Y);\n              }\n              var ma = wa(W * na, O);\n              var ua = W,\n                va = wa(ua, Ub);\n              if (null == va) var la = null;\n              else x(65536 >= ua), (la = va);\n              var ha = V(aa);\n              if (null == la || null == ha || null == ma) {\n                F.a = 1;\n                break c;\n              }\n              var pa = ma;\n              for (Da = U = 0; Da < W; ++Da) {\n                var ja = la[Da],\n                  da = ja.G,\n                  ea = ja.H,\n                  Fa = 0,\n                  ra = 1,\n                  Ha = 0;\n                for (ba = 0; 5 > ba; ++ba) {\n                  Y = Dc[ba];\n                  da[ba] = pa;\n                  ea[ba] = U;\n                  !ba && 0 < J && (Y += 1 << J);\n                  d: {\n                    var sa,\n                      za = Y,\n                      ta = F,\n                      oa = ha,\n                      db = pa,\n                      eb = U,\n                      Ia = 0,\n                      Ka = ta.m,\n                      fb = D(Ka, 1);\n                    M(oa, 0, 0, za);\n                    if (fb) {\n                      var gb = D(Ka, 1) + 1,\n                        hb = D(Ka, 1),\n                        Ja = D(Ka, 0 == hb ? 1 : 8);\n                      oa[Ja] = 1;\n                      2 == gb && ((Ja = D(Ka, 8)), (oa[Ja] = 1));\n                      var ya = 1;\n                    } else {\n                      var Ua = V(19),\n                        Va = D(Ka, 4) + 4;\n                      if (19 < Va) {\n                        ta.a = 3;\n                        var Aa = 0;\n                        break d;\n                      }\n                      for (sa = 0; sa < Va; ++sa) Ua[ne[sa]] = D(Ka, 3);\n                      var Ba = void 0,\n                        sb = void 0,\n                        Wa = ta,\n                        ib = Ua,\n                        Ca = za,\n                        Xa = oa,\n                        Oa = 0,\n                        La = Wa.m,\n                        Ya = 8,\n                        Za = wa(128, O);\n                      e: for (;;) {\n                        if (!Z(Za, 0, 7, ib, 19)) break e;\n                        if (D(La, 1)) {\n                          var kb = 2 + 2 * D(La, 3),\n                            Ba = 2 + D(La, kb);\n                          if (Ba > Ca) break e;\n                        } else Ba = Ca;\n                        for (sb = 0; sb < Ca && Ba--; ) {\n                          Sa(La);\n                          var $a = Za[0 + (pb(La) & 127)];\n                          qb(La, La.u + $a.g);\n                          var jb = $a.value;\n                          if (16 > jb) (Xa[sb++] = jb), 0 != jb && (Ya = jb);\n                          else {\n                            var lb = 16 == jb,\n                              ab = jb - 16,\n                              mb = oe[ab],\n                              bb = D(La, pe[ab]) + mb;\n                            if (sb + bb > Ca) break e;\n                            else\n                              for (var nb = lb ? Ya : 0; 0 < bb--; )\n                                Xa[sb++] = nb;\n                          }\n                        }\n                        Oa = 1;\n                        break e;\n                      }\n                      Oa || (Wa.a = 3);\n                      ya = Oa;\n                    }\n                    (ya = ya && !Ka.h) && (Ia = Z(db, eb, 8, oa, za));\n                    ya && 0 != Ia ? (Aa = Ia) : ((ta.a = 3), (Aa = 0));\n                  }\n                  if (0 == Aa) break c;\n                  ra && 1 == qe[ba] && (ra = 0 == pa[U].g);\n                  Fa += pa[U].g;\n                  U += Aa;\n                  if (3 >= ba) {\n                    var Pa = ha[0],\n                      tb;\n                    for (tb = 1; tb < Y; ++tb) ha[tb] > Pa && (Pa = ha[tb]);\n                    Ha += Pa;\n                  }\n                }\n                ja.nd = ra;\n                ja.Qb = 0;\n                ra &&\n                  ((ja.qb =\n                    ((da[3][ea[3] + 0].value << 24) |\n                      (da[1][ea[1] + 0].value << 16) |\n                      da[2][ea[2] + 0].value) >>>\n                    0),\n                  0 == Fa &&\n                    256 > da[0][ea[0] + 0].value &&\n                    ((ja.Qb = 1), (ja.qb += da[0][ea[0] + 0].value << 8)));\n                ja.jc = !ja.Qb && 6 > Ha;\n                if (ja.jc) {\n                  var Ga,\n                    Ea = ja;\n                  for (Ga = 0; Ga < xb; ++Ga) {\n                    var Ma = Ga,\n                      Na = Ea.pd[Ma],\n                      vb = Ea.G[0][Ea.H[0] + Ma];\n                    256 <= vb.value\n                      ? ((Na.g = vb.g + 256), (Na.value = vb.value))\n                      : ((Na.g = 0),\n                        (Na.value = 0),\n                        (Ma >>= ub(vb, 8, Na)),\n                        (Ma >>= ub(Ea.G[1][Ea.H[1] + Ma], 16, Na)),\n                        (Ma >>= ub(Ea.G[2][Ea.H[2] + Ma], 0, Na)),\n                        ub(Ea.G[3][Ea.H[3] + Ma], 24, Na));\n                  }\n                }\n              }\n              R.vc = P;\n              R.Wb = W;\n              R.Ya = la;\n              R.yc = ma;\n              H = 1;\n              break b;\n            }\n            H = 0;\n          }\n        f = H;\n        if (!f) {\n          d.a = 3;\n          break a;\n        }\n        if (0 < n) {\n          if (((l.ua = 1 << n), !Zb(l.Wa, n))) {\n            d.a = 1;\n            f = 0;\n            break a;\n          }\n        } else l.ua = 0;\n        var Qa = d,\n          cb = g,\n          ob = h,\n          Ra = Qa.s,\n          Ta = Ra.xc;\n        Qa.c = cb;\n        Qa.i = ob;\n        Ra.md = xa(cb, Ta);\n        Ra.wc = 0 == Ta ? -1 : (1 << Ta) - 1;\n        if (c) {\n          d.xb = re;\n          break a;\n        }\n        m = V(g * h);\n        if (null == m) {\n          d.a = 1;\n          f = 0;\n          break a;\n        }\n        f = (f = Jb(d, m, 0, g, h, h, null)) && !k.h;\n        break a;\n      }\n      f\n        ? (null != e ? (e[0] = m) : (x(null == m), x(c)), (d.$ = 0), c || Ac(l))\n        : Ac(l);\n      return f;\n    }\n    function Ec(a, b) {\n      var c = a.c * a.i,\n        d = c + b + 16 * b;\n      x(a.c <= b);\n      a.V = V(d);\n      if (null == a.V) return (a.Ta = null), (a.Ua = 0), (a.a = 1), 0;\n      a.Ta = a.V;\n      a.Ua = a.Ba + c + b;\n      return 1;\n    }\n    function se(a, b) {\n      var c = a.C,\n        d = b - c,\n        e = a.V,\n        f = a.Ba + a.c * c;\n      for (x(b <= a.l.o); 0 < d; ) {\n        var g = 16 < d ? 16 : d,\n          h = a.l.ma,\n          k = a.l.width,\n          l = k * g,\n          m = h.ca,\n          n = h.tb + k * c,\n          r = a.Ta,\n          q = a.Ua;\n        oc(a, g, e, f);\n        Fc(r, q, m, n, l);\n        zc(h, c, c + g, m, n, k);\n        d -= g;\n        e += g * a.c;\n        c += g;\n      }\n      x(c == b);\n      a.C = a.Ma = b;\n    }\n    function te(a, b) {\n      var c = [0],\n        d = [0],\n        e = [0];\n      a: for (;;) {\n        if (null == a) return 0;\n        if (null == b) return (a.a = 2), 0;\n        a.l = b;\n        a.a = 0;\n        cb(a.m, b.data, b.w, b.ha);\n        if (!mc(a.m, c, d, e)) {\n          a.a = 3;\n          break a;\n        }\n        a.xb = Cc;\n        b.width = c[0];\n        b.height = d[0];\n        if (!rb(c[0], d[0], 1, a, null)) break a;\n        return 1;\n      }\n      x(0 != a.a);\n      return 0;\n    }\n    function ue() {\n      this.ub = this.yd = this.td = this.Rb = 0;\n    }\n    function ve() {\n      this.Kd = this.Ld = this.Ud = this.Td = this.i = this.c = 0;\n    }\n    function we() {\n      this.Fb = this.Bb = this.Cb = 0;\n      this.Zb = V(4);\n      this.Lb = V(4);\n    }\n    function Gc() {\n      this.Yb = wb();\n    }\n    function xe() {\n      this.jb = V(3);\n      this.Wc = Ed([4, 8], Gc);\n      this.Xc = Ed([4, 17], Gc);\n    }\n    function ye() {\n      this.Pc = this.wb = this.Tb = this.zd = 0;\n      this.vd = new V(4);\n      this.od = new V(4);\n    }\n    function Xa() {\n      this.ld = this.La = this.dd = this.tc = 0;\n    }\n    function Hc() {\n      this.Na = this.la = 0;\n    }\n    function ze() {\n      this.Sc = [0, 0];\n      this.Eb = [0, 0];\n      this.Qc = [0, 0];\n      this.ia = this.lc = 0;\n    }\n    function Kb() {\n      this.ad = V(384);\n      this.Za = 0;\n      this.Ob = V(16);\n      this.$b = this.Ad = this.ia = this.Gc = this.Hc = this.Dd = 0;\n    }\n    function Ae() {\n      this.uc = this.M = this.Nb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.ya = Array(new Kb());\n      this.aa = 0;\n      this.l = new Oa();\n    }\n    function Ic() {\n      this.y = V(16);\n      this.f = V(8);\n      this.ea = V(8);\n    }\n    function Be() {\n      this.cb = this.a = 0;\n      this.sc = \"\";\n      this.m = new Wb();\n      this.Od = new ue();\n      this.Kc = new ve();\n      this.ed = new ye();\n      this.Qa = new we();\n      this.Ic = this.$c = this.Aa = 0;\n      this.D = new Ae();\n      this.Xb = this.Va = this.Hb = this.zb = this.yb = this.Ub = this.za = 0;\n      this.Jc = wa(8, Wb);\n      this.ia = 0;\n      new F();\n      this.pb = wa(4, ze);\n      this.Pa = new xe();\n      this.Bd = this.kc = 0;\n      this.Ac = [];\n      this.Bc = 0;\n      this.zc = [0, 0, 0, 0];\n      this.Gd = Array(new Ic());\n      this.Hd = 0;\n      this.rb = Array(new Hc());\n      this.sb = 0;\n      this.wa = Array(new Xa());\n      this.Y = 0;\n      this.oc = [];\n      this.pc = 0;\n      this.sa = [];\n      this.ta = 0;\n      this.qa = [];\n      this.ra = 0;\n      this.Ha = [];\n      this.B = this.R = this.Ia = 0;\n      this.Ec = [];\n      this.M = this.ja = this.Vb = this.Fc = 0;\n      this.ya = Array(new Kb());\n      this.L = this.aa = 0;\n      this.gd = Ed([4, 2], Xa);\n      this.ga = null;\n      this.Fa = [];\n      this.Cc = this.qc = this.P = 0;\n      this.Gb = [];\n      this.Uc = 0;\n      this.mb = [];\n      this.nb = 0;\n      this.rc = [];\n      this.Ga = this.Vc = 0;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function Oa() {\n      this.T = this.U = this.ka = this.height = this.width = 0;\n      this.y = [];\n      this.f = [];\n      this.ea = [];\n      this.Rc = this.fa = this.W = this.N = this.O = 0;\n      this.ma = \"void\";\n      this.put = \"VP8IoPutHook\";\n      this.ac = \"VP8IoSetupHook\";\n      this.bc = \"VP8IoTeardownHook\";\n      this.ha = this.Kb = 0;\n      this.data = [];\n      this.hb = this.ib = this.da = this.o = this.j = this.va = this.v = this.Da = this.ob = this.w = 0;\n      this.F = [];\n      this.J = 0;\n    }\n    function Ce() {\n      var a = new Be();\n      null != a &&\n        ((a.a = 0), (a.sc = \"OK\"), (a.cb = 0), (a.Xb = 0), oa || (oa = De));\n      return a;\n    }\n    function T(a, b, c) {\n      0 == a.a && ((a.a = b), (a.sc = c), (a.cb = 0));\n      return 0;\n    }\n    function Jc(a, b, c) {\n      return 3 <= c && 157 == a[b + 0] && 1 == a[b + 1] && 42 == a[b + 2];\n    }\n    function Kc(a, b) {\n      if (null == a) return 0;\n      a.a = 0;\n      a.sc = \"OK\";\n      if (null == b) return T(a, 2, \"null VP8Io passed to VP8GetHeaders()\");\n      var c = b.data;\n      var d = b.w;\n      var e = b.ha;\n      if (4 > e) return T(a, 7, \"Truncated header.\");\n      var f = c[d + 0] | (c[d + 1] << 8) | (c[d + 2] << 16);\n      var g = a.Od;\n      g.Rb = !(f & 1);\n      g.td = (f >> 1) & 7;\n      g.yd = (f >> 4) & 1;\n      g.ub = f >> 5;\n      if (3 < g.td) return T(a, 3, \"Incorrect keyframe parameters.\");\n      if (!g.yd) return T(a, 4, \"Frame not displayable.\");\n      d += 3;\n      e -= 3;\n      var h = a.Kc;\n      if (g.Rb) {\n        if (7 > e) return T(a, 7, \"cannot parse picture header\");\n        if (!Jc(c, d, e)) return T(a, 3, \"Bad code word\");\n        h.c = ((c[d + 4] << 8) | c[d + 3]) & 16383;\n        h.Td = c[d + 4] >> 6;\n        h.i = ((c[d + 6] << 8) | c[d + 5]) & 16383;\n        h.Ud = c[d + 6] >> 6;\n        d += 7;\n        e -= 7;\n        a.za = (h.c + 15) >> 4;\n        a.Ub = (h.i + 15) >> 4;\n        b.width = h.c;\n        b.height = h.i;\n        b.Da = 0;\n        b.j = 0;\n        b.v = 0;\n        b.va = b.width;\n        b.o = b.height;\n        b.da = 0;\n        b.ib = b.width;\n        b.hb = b.height;\n        b.U = b.width;\n        b.T = b.height;\n        f = a.Pa;\n        M(f.jb, 0, 255, f.jb.length);\n        f = a.Qa;\n        x(null != f);\n        f.Cb = 0;\n        f.Bb = 0;\n        f.Fb = 1;\n        M(f.Zb, 0, 0, f.Zb.length);\n        M(f.Lb, 0, 0, f.Lb);\n      }\n      if (g.ub > e) return T(a, 7, \"bad partition length\");\n      f = a.m;\n      ma(f, c, d, g.ub);\n      d += g.ub;\n      e -= g.ub;\n      g.Rb && ((h.Ld = G(f)), (h.Kd = G(f)));\n      h = a.Qa;\n      var k = a.Pa,\n        l;\n      x(null != f);\n      x(null != h);\n      h.Cb = G(f);\n      if (h.Cb) {\n        h.Bb = G(f);\n        if (G(f)) {\n          h.Fb = G(f);\n          for (l = 0; 4 > l; ++l) h.Zb[l] = G(f) ? ca(f, 7) : 0;\n          for (l = 0; 4 > l; ++l) h.Lb[l] = G(f) ? ca(f, 6) : 0;\n        }\n        if (h.Bb) for (l = 0; 3 > l; ++l) k.jb[l] = G(f) ? na(f, 8) : 255;\n      } else h.Bb = 0;\n      if (f.Ka) return T(a, 3, \"cannot parse segment header\");\n      h = a.ed;\n      h.zd = G(f);\n      h.Tb = na(f, 6);\n      h.wb = na(f, 3);\n      h.Pc = G(f);\n      if (h.Pc && G(f)) {\n        for (k = 0; 4 > k; ++k) G(f) && (h.vd[k] = ca(f, 6));\n        for (k = 0; 4 > k; ++k) G(f) && (h.od[k] = ca(f, 6));\n      }\n      a.L = 0 == h.Tb ? 0 : h.zd ? 1 : 2;\n      if (f.Ka) return T(a, 3, \"cannot parse filter header\");\n      l = d;\n      var m = e;\n      e = l;\n      d = l + m;\n      h = m;\n      a.Xb = (1 << na(a.m, 2)) - 1;\n      k = a.Xb;\n      if (m < 3 * k) c = 7;\n      else {\n        l += 3 * k;\n        h -= 3 * k;\n        for (m = 0; m < k; ++m) {\n          var n = c[e + 0] | (c[e + 1] << 8) | (c[e + 2] << 16);\n          n > h && (n = h);\n          ma(a.Jc[+m], c, l, n);\n          l += n;\n          h -= n;\n          e += 3;\n        }\n        ma(a.Jc[+k], c, l, h);\n        c = l < d ? 0 : 5;\n      }\n      if (0 != c) return T(a, c, \"cannot parse partitions\");\n      l = a.m;\n      c = na(l, 7);\n      e = G(l) ? ca(l, 4) : 0;\n      d = G(l) ? ca(l, 4) : 0;\n      h = G(l) ? ca(l, 4) : 0;\n      k = G(l) ? ca(l, 4) : 0;\n      l = G(l) ? ca(l, 4) : 0;\n      m = a.Qa;\n      for (n = 0; 4 > n; ++n) {\n        if (m.Cb) {\n          var r = m.Zb[n];\n          m.Fb || (r += c);\n        } else if (0 < n) {\n          a.pb[n] = a.pb[0];\n          continue;\n        } else r = c;\n        var q = a.pb[n];\n        q.Sc[0] = Lb[ga(r + e, 127)];\n        q.Sc[1] = Mb[ga(r + 0, 127)];\n        q.Eb[0] = 2 * Lb[ga(r + d, 127)];\n        q.Eb[1] = (101581 * Mb[ga(r + h, 127)]) >> 16;\n        8 > q.Eb[1] && (q.Eb[1] = 8);\n        q.Qc[0] = Lb[ga(r + k, 117)];\n        q.Qc[1] = Mb[ga(r + l, 127)];\n        q.lc = r + l;\n      }\n      if (!g.Rb) return T(a, 4, \"Not a key frame.\");\n      G(f);\n      g = a.Pa;\n      for (c = 0; 4 > c; ++c) {\n        for (e = 0; 8 > e; ++e)\n          for (d = 0; 3 > d; ++d)\n            for (h = 0; 11 > h; ++h)\n              (k = K(f, Ee[c][e][d][h]) ? na(f, 8) : Fe[c][e][d][h]),\n                (g.Wc[c][e].Yb[d][h] = k);\n        for (e = 0; 17 > e; ++e) g.Xc[c][e] = g.Wc[c][Ge[e]];\n      }\n      a.kc = G(f);\n      a.kc && (a.Bd = na(f, 8));\n      return (a.cb = 1);\n    }\n    function De(a, b, c, d, e, f, g) {\n      var h = b[e].Yb[c];\n      for (c = 0; 16 > e; ++e) {\n        if (!K(a, h[c + 0])) return e;\n        for (; !K(a, h[c + 1]); )\n          if (((h = b[++e].Yb[0]), (c = 0), 16 == e)) return 16;\n        var k = b[e + 1].Yb;\n        if (K(a, h[c + 2])) {\n          var l = a,\n            m = h,\n            n = c;\n          var r = 0;\n          if (K(l, m[n + 3]))\n            if (K(l, m[n + 6])) {\n              h = 0;\n              r = K(l, m[n + 8]);\n              m = K(l, m[n + 9 + r]);\n              n = 2 * r + m;\n              r = 0;\n              for (m = He[n]; m[h]; ++h) r += r + K(l, m[h]);\n              r += 3 + (8 << n);\n            } else\n              K(l, m[n + 7])\n                ? ((r = 7 + 2 * K(l, 165)), (r += K(l, 145)))\n                : (r = 5 + K(l, 159));\n          else K(l, m[n + 4]) ? (r = 3 + K(l, m[n + 5])) : (r = 2);\n          h = k[2];\n        } else (r = 1), (h = k[1]);\n        k = g + Ie[e];\n        l = a;\n        0 > l.b && Qa(l);\n        var m = l.b,\n          n = l.Ca >> 1,\n          q = (n - (l.I >> m)) >> 31;\n        --l.b;\n        l.Ca += q;\n        l.Ca |= 1;\n        l.I -= ((n + 1) & q) << m;\n        f[k] = ((r ^ q) - q) * d[(0 < e) + 0];\n      }\n      return 16;\n    }\n    function Lc(a) {\n      var b = a.rb[a.sb - 1];\n      b.la = 0;\n      b.Na = 0;\n      M(a.zc, 0, 0, a.zc.length);\n      a.ja = 0;\n    }\n    function Je(a, b) {\n      for (a.M = 0; a.M < a.Va; ++a.M) {\n        var c = a.Jc[a.M & a.Xb],\n          d = a.m,\n          e = a,\n          f;\n        for (f = 0; f < e.za; ++f) {\n          var g = d;\n          var h = e;\n          var k = h.Ac,\n            l = h.Bc + 4 * f,\n            m = h.zc,\n            n = h.ya[h.aa + f];\n          h.Qa.Bb\n            ? (n.$b = K(g, h.Pa.jb[0])\n                ? 2 + K(g, h.Pa.jb[2])\n                : K(g, h.Pa.jb[1]))\n            : (n.$b = 0);\n          h.kc && (n.Ad = K(g, h.Bd));\n          n.Za = !K(g, 145) + 0;\n          if (n.Za) {\n            var r = n.Ob,\n              q = 0;\n            for (h = 0; 4 > h; ++h) {\n              var t = m[0 + h];\n              var v;\n              for (v = 0; 4 > v; ++v) {\n                t = Ke[k[l + v]][t];\n                for (var p = Mc[K(g, t[0])]; 0 < p; )\n                  p = Mc[2 * p + K(g, t[p])];\n                t = -p;\n                k[l + v] = t;\n              }\n              I(r, q, k, l, 4);\n              q += 4;\n              m[0 + h] = t;\n            }\n          } else\n            (t = K(g, 156) ? (K(g, 128) ? 1 : 3) : K(g, 163) ? 2 : 0),\n              (n.Ob[0] = t),\n              M(k, l, t, 4),\n              M(m, 0, t, 4);\n          n.Dd = K(g, 142) ? (K(g, 114) ? (K(g, 183) ? 1 : 3) : 2) : 0;\n        }\n        if (e.m.Ka) return T(a, 7, \"Premature end-of-partition0 encountered.\");\n        for (; a.ja < a.za; ++a.ja) {\n          d = a;\n          e = c;\n          g = d.rb[d.sb - 1];\n          k = d.rb[d.sb + d.ja];\n          f = d.ya[d.aa + d.ja];\n          if ((l = d.kc ? f.Ad : 0))\n            (g.la = k.la = 0),\n              f.Za || (g.Na = k.Na = 0),\n              (f.Hc = 0),\n              (f.Gc = 0),\n              (f.ia = 0);\n          else {\n            var u,\n              w,\n              g = k,\n              k = e,\n              l = d.Pa.Xc,\n              m = d.ya[d.aa + d.ja],\n              n = d.pb[m.$b];\n            h = m.ad;\n            r = 0;\n            q = d.rb[d.sb - 1];\n            t = v = 0;\n            M(h, r, 0, 384);\n            if (m.Za) {\n              var y = 0;\n              var A = l[3];\n            } else {\n              p = V(16);\n              var E = g.Na + q.Na;\n              E = oa(k, l[1], E, n.Eb, 0, p, 0);\n              g.Na = q.Na = (0 < E) + 0;\n              if (1 < E) Nc(p, 0, h, r);\n              else {\n                var B = (p[0] + 3) >> 3;\n                for (p = 0; 256 > p; p += 16) h[r + p] = B;\n              }\n              y = 1;\n              A = l[0];\n            }\n            var C = g.la & 15;\n            var N = q.la & 15;\n            for (p = 0; 4 > p; ++p) {\n              var z = N & 1;\n              for (B = w = 0; 4 > B; ++B)\n                (E = z + (C & 1)),\n                  (E = oa(k, A, E, n.Sc, y, h, r)),\n                  (z = E > y),\n                  (C = (C >> 1) | (z << 7)),\n                  (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                  (r += 16);\n              C >>= 4;\n              N = (N >> 1) | (z << 7);\n              v = ((v << 8) | w) >>> 0;\n            }\n            A = C;\n            y = N >> 4;\n            for (u = 0; 4 > u; u += 2) {\n              w = 0;\n              C = g.la >> (4 + u);\n              N = q.la >> (4 + u);\n              for (p = 0; 2 > p; ++p) {\n                z = N & 1;\n                for (B = 0; 2 > B; ++B)\n                  (E = z + (C & 1)),\n                    (E = oa(k, l[2], E, n.Qc, 0, h, r)),\n                    (z = 0 < E),\n                    (C = (C >> 1) | (z << 3)),\n                    (w = (w << 2) | (3 < E ? 3 : 1 < E ? 2 : 0 != h[r + 0])),\n                    (r += 16);\n                C >>= 2;\n                N = (N >> 1) | (z << 5);\n              }\n              t |= w << (4 * u);\n              A |= (C << 4) << u;\n              y |= (N & 240) << u;\n            }\n            g.la = A;\n            q.la = y;\n            m.Hc = v;\n            m.Gc = t;\n            m.ia = t & 43690 ? 0 : n.ia;\n            l = !(v | t);\n          }\n          0 < d.L &&\n            ((d.wa[d.Y + d.ja] = d.gd[f.$b][f.Za]),\n            (d.wa[d.Y + d.ja].La |= !l));\n          if (e.Ka) return T(a, 7, \"Premature end-of-file encountered.\");\n        }\n        Lc(a);\n        c = a;\n        d = b;\n        e = 1;\n        f = c.D;\n        g = 0 < c.L && c.M >= c.zb && c.M <= c.Va;\n        if (0 == c.Aa)\n          a: {\n            (f.M = c.M), (f.uc = g), Oc(c, f), (e = 1);\n            w = c.D;\n            f = w.Nb;\n            t = Ya[c.L];\n            g = t * c.R;\n            k = (t / 2) * c.B;\n            p = 16 * f * c.R;\n            B = 8 * f * c.B;\n            l = c.sa;\n            m = c.ta - g + p;\n            n = c.qa;\n            h = c.ra - k + B;\n            r = c.Ha;\n            q = c.Ia - k + B;\n            C = w.M;\n            N = 0 == C;\n            v = C >= c.Va - 1;\n            2 == c.Aa && Oc(c, w);\n            if (w.uc)\n              for (E = c, z = E.D.M, x(E.D.uc), w = E.yb; w < E.Hb; ++w) {\n                var Q = E;\n                y = w;\n                A = z;\n                var S = Q.D,\n                  D = S.Nb;\n                u = Q.R;\n                var S = S.wa[S.Y + y],\n                  F = Q.sa,\n                  H = Q.ta + 16 * D * u + 16 * y,\n                  J = S.dd,\n                  G = S.tc;\n                if (0 != G)\n                  if ((x(3 <= G), 1 == Q.L))\n                    0 < y && Pc(F, H, u, G + 4),\n                      S.La && Qc(F, H, u, G),\n                      0 < A && Rc(F, H, u, G + 4),\n                      S.La && Sc(F, H, u, G);\n                  else {\n                    var L = Q.B,\n                      O = Q.qa,\n                      P = Q.ra + 8 * D * L + 8 * y,\n                      R = Q.Ha,\n                      Q = Q.Ia + 8 * D * L + 8 * y,\n                      D = S.ld;\n                    0 < y &&\n                      (Tc(F, H, u, G + 4, J, D),\n                      Uc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Vc(F, H, u, G, J, D), Wc(O, P, R, Q, L, G, J, D));\n                    0 < A &&\n                      (Xc(F, H, u, G + 4, J, D),\n                      Yc(O, P, R, Q, L, G + 4, J, D));\n                    S.La && (Zc(F, H, u, G, J, D), $c(O, P, R, Q, L, G, J, D));\n                  }\n              }\n            c.ia && alert(\"todo:DitherRow\");\n            if (null != d.put) {\n              w = 16 * C;\n              C = 16 * (C + 1);\n              N\n                ? ((d.y = c.sa),\n                  (d.O = c.ta + p),\n                  (d.f = c.qa),\n                  (d.N = c.ra + B),\n                  (d.ea = c.Ha),\n                  (d.W = c.Ia + B))\n                : ((w -= t),\n                  (d.y = l),\n                  (d.O = m),\n                  (d.f = n),\n                  (d.N = h),\n                  (d.ea = r),\n                  (d.W = q));\n              v || (C -= t);\n              C > d.o && (C = d.o);\n              d.F = null;\n              d.J = null;\n              if (\n                null != c.Fa &&\n                0 < c.Fa.length &&\n                w < C &&\n                ((d.J = Le(c, d, w, C - w)),\n                (d.F = c.mb),\n                null == d.F && 0 == d.F.length)\n              ) {\n                e = T(c, 3, \"Could not decode alpha data.\");\n                break a;\n              }\n              w < d.j &&\n                ((t = d.j - w),\n                (w = d.j),\n                x(!(t & 1)),\n                (d.O += c.R * t),\n                (d.N += c.B * (t >> 1)),\n                (d.W += c.B * (t >> 1)),\n                null != d.F && (d.J += d.width * t));\n              w < C &&\n                ((d.O += d.v),\n                (d.N += d.v >> 1),\n                (d.W += d.v >> 1),\n                null != d.F && (d.J += d.v),\n                (d.ka = w - d.j),\n                (d.U = d.va - d.v),\n                (d.T = C - w),\n                (e = d.put(d)));\n            }\n            f + 1 != c.Ic ||\n              v ||\n              (I(c.sa, c.ta - g, l, m + 16 * c.R, g),\n              I(c.qa, c.ra - k, n, h + 8 * c.B, k),\n              I(c.Ha, c.Ia - k, r, q + 8 * c.B, k));\n          }\n        if (!e) return T(a, 6, \"Output aborted.\");\n      }\n      return 1;\n    }\n    function Me(a, b) {\n      if (null == a) return 0;\n      if (null == b) return T(a, 2, \"NULL VP8Io parameter in VP8Decode().\");\n      if (!a.cb && !Kc(a, b)) return 0;\n      x(a.cb);\n      if (null == b.ac || b.ac(b)) {\n        b.ob && (a.L = 0);\n        var c = Ya[a.L];\n        2 == a.L\n          ? ((a.yb = 0), (a.zb = 0))\n          : ((a.yb = (b.v - c) >> 4),\n            (a.zb = (b.j - c) >> 4),\n            0 > a.yb && (a.yb = 0),\n            0 > a.zb && (a.zb = 0));\n        a.Va = (b.o + 15 + c) >> 4;\n        a.Hb = (b.va + 15 + c) >> 4;\n        a.Hb > a.za && (a.Hb = a.za);\n        a.Va > a.Ub && (a.Va = a.Ub);\n        if (0 < a.L) {\n          var d = a.ed;\n          for (c = 0; 4 > c; ++c) {\n            var e;\n            if (a.Qa.Cb) {\n              var f = a.Qa.Lb[c];\n              a.Qa.Fb || (f += d.Tb);\n            } else f = d.Tb;\n            for (e = 0; 1 >= e; ++e) {\n              var g = a.gd[c][e],\n                h = f;\n              d.Pc && ((h += d.vd[0]), e && (h += d.od[0]));\n              h = 0 > h ? 0 : 63 < h ? 63 : h;\n              if (0 < h) {\n                var k = h;\n                0 < d.wb &&\n                  ((k = 4 < d.wb ? k >> 2 : k >> 1),\n                  k > 9 - d.wb && (k = 9 - d.wb));\n                1 > k && (k = 1);\n                g.dd = k;\n                g.tc = 2 * h + k;\n                g.ld = 40 <= h ? 2 : 15 <= h ? 1 : 0;\n              } else g.tc = 0;\n              g.La = e;\n            }\n          }\n        }\n        c = 0;\n      } else T(a, 6, \"Frame setup failed\"), (c = a.a);\n      if ((c = 0 == c)) {\n        if (c) {\n          a.$c = 0;\n          0 < a.Aa || (a.Ic = Ne);\n          b: {\n            c = a.Ic;\n            var k = a.za,\n              d = 4 * k,\n              l = 32 * k,\n              m = k + 1,\n              n = 0 < a.L ? k * (0 < a.Aa ? 2 : 1) : 0,\n              r = (2 == a.Aa ? 2 : 1) * k;\n            e = ((3 * (16 * c + Ya[a.L])) / 2) * l;\n            f = null != a.Fa && 0 < a.Fa.length ? a.Kc.c * a.Kc.i : 0;\n            g = d + 832 + e + f;\n            if (g != g) c = 0;\n            else {\n              if (g > a.Vb) {\n                a.Vb = 0;\n                a.Ec = V(g);\n                a.Fc = 0;\n                if (null == a.Ec) {\n                  c = T(a, 1, \"no memory during frame initialization.\");\n                  break b;\n                }\n                a.Vb = g;\n              }\n              g = a.Ec;\n              h = a.Fc;\n              a.Ac = g;\n              a.Bc = h;\n              h += d;\n              a.Gd = wa(l, Ic);\n              a.Hd = 0;\n              a.rb = wa(m + 1, Hc);\n              a.sb = 1;\n              a.wa = n ? wa(n, Xa) : null;\n              a.Y = 0;\n              a.D.Nb = 0;\n              a.D.wa = a.wa;\n              a.D.Y = a.Y;\n              0 < a.Aa && (a.D.Y += k);\n              x(!0);\n              a.oc = g;\n              a.pc = h;\n              h += 832;\n              a.ya = wa(r, Kb);\n              a.aa = 0;\n              a.D.ya = a.ya;\n              a.D.aa = a.aa;\n              2 == a.Aa && (a.D.aa += k);\n              a.R = 16 * k;\n              a.B = 8 * k;\n              l = Ya[a.L];\n              k = l * a.R;\n              l = (l / 2) * a.B;\n              a.sa = g;\n              a.ta = h + k;\n              a.qa = a.sa;\n              a.ra = a.ta + 16 * c * a.R + l;\n              a.Ha = a.qa;\n              a.Ia = a.ra + 8 * c * a.B + l;\n              a.$c = 0;\n              h += e;\n              a.mb = f ? g : null;\n              a.nb = f ? h : null;\n              x(h + f <= a.Fc + a.Vb);\n              Lc(a);\n              M(a.Ac, a.Bc, 0, d);\n              c = 1;\n            }\n          }\n          if (c) {\n            b.ka = 0;\n            b.y = a.sa;\n            b.O = a.ta;\n            b.f = a.qa;\n            b.N = a.ra;\n            b.ea = a.Ha;\n            b.Vd = a.Ia;\n            b.fa = a.R;\n            b.Rc = a.B;\n            b.F = null;\n            b.J = 0;\n            if (!ad) {\n              for (c = -255; 255 >= c; ++c) bd[255 + c] = 0 > c ? -c : c;\n              for (c = -1020; 1020 >= c; ++c)\n                cd[1020 + c] = -128 > c ? -128 : 127 < c ? 127 : c;\n              for (c = -112; 112 >= c; ++c)\n                dd[112 + c] = -16 > c ? -16 : 15 < c ? 15 : c;\n              for (c = -255; 510 >= c; ++c)\n                ed[255 + c] = 0 > c ? 0 : 255 < c ? 255 : c;\n              ad = 1;\n            }\n            Nc = Oe;\n            Za = Pe;\n            Nb = Qe;\n            pa = Re;\n            Ob = Se;\n            fd = Te;\n            Xc = Ue;\n            Tc = Ve;\n            Yc = We;\n            Uc = Xe;\n            Zc = Ye;\n            Vc = Ze;\n            $c = $e;\n            Wc = af;\n            Rc = gd;\n            Pc = hd;\n            Sc = bf;\n            Qc = cf;\n            W[0] = df;\n            W[1] = ef;\n            W[2] = ff;\n            W[3] = gf;\n            W[4] = hf;\n            W[5] = jf;\n            W[6] = kf;\n            W[7] = lf;\n            W[8] = mf;\n            W[9] = nf;\n            Y[0] = of;\n            Y[1] = pf;\n            Y[2] = qf;\n            Y[3] = rf;\n            Y[4] = sf;\n            Y[5] = tf;\n            Y[6] = uf;\n            ka[0] = vf;\n            ka[1] = wf;\n            ka[2] = xf;\n            ka[3] = yf;\n            ka[4] = zf;\n            ka[5] = Af;\n            ka[6] = Bf;\n            c = 1;\n          } else c = 0;\n        }\n        c && (c = Je(a, b));\n        null != b.bc && b.bc(b);\n        c &= 1;\n      }\n      if (!c) return 0;\n      a.cb = 0;\n      return c;\n    }\n    function qa(a, b, c, d, e) {\n      e = a[b + c + 32 * d] + (e >> 3);\n      a[b + c + 32 * d] = e & -256 ? (0 > e ? 0 : 255) : e;\n    }\n    function kb(a, b, c, d, e, f) {\n      qa(a, b, 0, c, d + e);\n      qa(a, b, 1, c, d + f);\n      qa(a, b, 2, c, d - f);\n      qa(a, b, 3, c, d - e);\n    }\n    function da(a) {\n      return ((20091 * a) >> 16) + a;\n    }\n    function id(a, b, c, d) {\n      var e = 0,\n        f;\n      var g = V(16);\n      for (f = 0; 4 > f; ++f) {\n        var h = a[b + 0] + a[b + 8];\n        var k = a[b + 0] - a[b + 8];\n        var l = ((35468 * a[b + 4]) >> 16) - da(a[b + 12]);\n        var m = da(a[b + 4]) + ((35468 * a[b + 12]) >> 16);\n        g[e + 0] = h + m;\n        g[e + 1] = k + l;\n        g[e + 2] = k - l;\n        g[e + 3] = h - m;\n        e += 4;\n        b++;\n      }\n      for (f = e = 0; 4 > f; ++f)\n        (a = g[e + 0] + 4),\n          (h = a + g[e + 8]),\n          (k = a - g[e + 8]),\n          (l = ((35468 * g[e + 4]) >> 16) - da(g[e + 12])),\n          (m = da(g[e + 4]) + ((35468 * g[e + 12]) >> 16)),\n          qa(c, d, 0, 0, h + m),\n          qa(c, d, 1, 0, k + l),\n          qa(c, d, 2, 0, k - l),\n          qa(c, d, 3, 0, h - m),\n          e++,\n          (d += 32);\n    }\n    function Te(a, b, c, d) {\n      var e = a[b + 0] + 4,\n        f = (35468 * a[b + 4]) >> 16,\n        g = da(a[b + 4]),\n        h = (35468 * a[b + 1]) >> 16;\n      a = da(a[b + 1]);\n      kb(c, d, 0, e + g, a, h);\n      kb(c, d, 1, e + f, a, h);\n      kb(c, d, 2, e - f, a, h);\n      kb(c, d, 3, e - g, a, h);\n    }\n    function Pe(a, b, c, d, e) {\n      id(a, b, c, d);\n      e && id(a, b + 16, c, d + 4);\n    }\n    function Qe(a, b, c, d) {\n      Za(a, b + 0, c, d, 1);\n      Za(a, b + 32, c, d + 128, 1);\n    }\n    function Re(a, b, c, d) {\n      a = a[b + 0] + 4;\n      var e;\n      for (e = 0; 4 > e; ++e) for (b = 0; 4 > b; ++b) qa(c, d, b, e, a);\n    }\n    function Se(a, b, c, d) {\n      a[b + 0] && pa(a, b + 0, c, d);\n      a[b + 16] && pa(a, b + 16, c, d + 4);\n      a[b + 32] && pa(a, b + 32, c, d + 128);\n      a[b + 48] && pa(a, b + 48, c, d + 128 + 4);\n    }\n    function Oe(a, b, c, d) {\n      var e = V(16),\n        f;\n      for (f = 0; 4 > f; ++f) {\n        var g = a[b + 0 + f] + a[b + 12 + f];\n        var h = a[b + 4 + f] + a[b + 8 + f];\n        var k = a[b + 4 + f] - a[b + 8 + f];\n        var l = a[b + 0 + f] - a[b + 12 + f];\n        e[0 + f] = g + h;\n        e[8 + f] = g - h;\n        e[4 + f] = l + k;\n        e[12 + f] = l - k;\n      }\n      for (f = 0; 4 > f; ++f)\n        (a = e[0 + 4 * f] + 3),\n          (g = a + e[3 + 4 * f]),\n          (h = e[1 + 4 * f] + e[2 + 4 * f]),\n          (k = e[1 + 4 * f] - e[2 + 4 * f]),\n          (l = a - e[3 + 4 * f]),\n          (c[d + 0] = (g + h) >> 3),\n          (c[d + 16] = (l + k) >> 3),\n          (c[d + 32] = (g - h) >> 3),\n          (c[d + 48] = (l - k) >> 3),\n          (d += 64);\n    }\n    function Pb(a, b, c) {\n      var d = b - 32,\n        e = R,\n        f = 255 - a[d - 1],\n        g;\n      for (g = 0; g < c; ++g) {\n        var h = e,\n          k = f + a[b - 1],\n          l;\n        for (l = 0; l < c; ++l) a[b + l] = h[k + a[d + l]];\n        b += 32;\n      }\n    }\n    function ef(a, b) {\n      Pb(a, b, 4);\n    }\n    function wf(a, b) {\n      Pb(a, b, 8);\n    }\n    function pf(a, b) {\n      Pb(a, b, 16);\n    }\n    function qf(a, b) {\n      var c;\n      for (c = 0; 16 > c; ++c) I(a, b + 32 * c, a, b - 32, 16);\n    }\n    function rf(a, b) {\n      var c;\n      for (c = 16; 0 < c; --c) M(a, b, a[b - 1], 16), (b += 32);\n    }\n    function $a(a, b, c) {\n      var d;\n      for (d = 0; 16 > d; ++d) M(b, c + 32 * d, a, 16);\n    }\n    function of(a, b) {\n      var c = 16,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d] + a[b + d - 32];\n      $a(c >> 5, a, b);\n    }\n    function sf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b - 1 + 32 * d];\n      $a(c >> 4, a, b);\n    }\n    function tf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 16 > d; ++d) c += a[b + d - 32];\n      $a(c >> 4, a, b);\n    }\n    function uf(a, b) {\n      $a(128, a, b);\n    }\n    function z(a, b, c) {\n      return (a + 2 * b + c + 2) >> 2;\n    }\n    function ff(a, b) {\n      var c = b - 32,\n        c = new Uint8Array([\n          z(a[c - 1], a[c + 0], a[c + 1]),\n          z(a[c + 0], a[c + 1], a[c + 2]),\n          z(a[c + 1], a[c + 2], a[c + 3]),\n          z(a[c + 2], a[c + 3], a[c + 4])\n        ]),\n        d;\n      for (d = 0; 4 > d; ++d) I(a, b + 32 * d, c, 0, c.length);\n    }\n    function gf(a, b) {\n      var c = a[b - 1],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      ra(a, b + 0, 16843009 * z(a[b - 1 - 32], c, d));\n      ra(a, b + 32, 16843009 * z(c, d, e));\n      ra(a, b + 64, 16843009 * z(d, e, f));\n      ra(a, b + 96, 16843009 * z(e, f, f));\n    }\n    function df(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 4 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      c >>= 3;\n      for (d = 0; 4 > d; ++d) M(a, b + 32 * d, c, 4);\n    }\n    function hf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 96] = z(d, e, a[b - 1 + 96]);\n      a[b + 1 + 96] = a[b + 0 + 64] = z(c, d, e);\n      a[b + 2 + 96] = a[b + 1 + 64] = a[b + 0 + 32] = z(f, c, d);\n      a[b + 3 + 96] = a[b + 2 + 64] = a[b + 1 + 32] = a[b + 0 + 0] = z(g, f, c);\n      a[b + 3 + 64] = a[b + 2 + 32] = a[b + 1 + 0] = z(h, g, f);\n      a[b + 3 + 32] = a[b + 2 + 0] = z(k, h, g);\n      a[b + 3 + 0] = z(l, k, h);\n    }\n    function kf(a, b) {\n      var c = a[b + 1 - 32],\n        d = a[b + 2 - 32],\n        e = a[b + 3 - 32],\n        f = a[b + 4 - 32],\n        g = a[b + 5 - 32],\n        h = a[b + 6 - 32],\n        k = a[b + 7 - 32];\n      a[b + 0 + 0] = z(a[b + 0 - 32], c, d);\n      a[b + 1 + 0] = a[b + 0 + 32] = z(c, d, e);\n      a[b + 2 + 0] = a[b + 1 + 32] = a[b + 0 + 64] = z(d, e, f);\n      a[b + 3 + 0] = a[b + 2 + 32] = a[b + 1 + 64] = a[b + 0 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 64] = a[b + 1 + 96] = z(f, g, h);\n      a[b + 3 + 64] = a[b + 2 + 96] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, k);\n    }\n    function jf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 - 32],\n        g = a[b + 0 - 32],\n        h = a[b + 1 - 32],\n        k = a[b + 2 - 32],\n        l = a[b + 3 - 32];\n      a[b + 0 + 0] = a[b + 1 + 64] = (f + g + 1) >> 1;\n      a[b + 1 + 0] = a[b + 2 + 64] = (g + h + 1) >> 1;\n      a[b + 2 + 0] = a[b + 3 + 64] = (h + k + 1) >> 1;\n      a[b + 3 + 0] = (k + l + 1) >> 1;\n      a[b + 0 + 96] = z(e, d, c);\n      a[b + 0 + 64] = z(d, c, f);\n      a[b + 0 + 32] = a[b + 1 + 96] = z(c, f, g);\n      a[b + 1 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 2 + 32] = a[b + 3 + 96] = z(g, h, k);\n      a[b + 3 + 32] = z(h, k, l);\n    }\n    function lf(a, b) {\n      var c = a[b + 0 - 32],\n        d = a[b + 1 - 32],\n        e = a[b + 2 - 32],\n        f = a[b + 3 - 32],\n        g = a[b + 4 - 32],\n        h = a[b + 5 - 32],\n        k = a[b + 6 - 32],\n        l = a[b + 7 - 32];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 1 + 0] = a[b + 0 + 64] = (d + e + 1) >> 1;\n      a[b + 2 + 0] = a[b + 1 + 64] = (e + f + 1) >> 1;\n      a[b + 3 + 0] = a[b + 2 + 64] = (f + g + 1) >> 1;\n      a[b + 0 + 32] = z(c, d, e);\n      a[b + 1 + 32] = a[b + 0 + 96] = z(d, e, f);\n      a[b + 2 + 32] = a[b + 1 + 96] = z(e, f, g);\n      a[b + 3 + 32] = a[b + 2 + 96] = z(f, g, h);\n      a[b + 3 + 64] = z(g, h, k);\n      a[b + 3 + 96] = z(h, k, l);\n    }\n    function nf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96];\n      a[b + 0 + 0] = (c + d + 1) >> 1;\n      a[b + 2 + 0] = a[b + 0 + 32] = (d + e + 1) >> 1;\n      a[b + 2 + 32] = a[b + 0 + 64] = (e + f + 1) >> 1;\n      a[b + 1 + 0] = z(c, d, e);\n      a[b + 3 + 0] = a[b + 1 + 32] = z(d, e, f);\n      a[b + 3 + 32] = a[b + 1 + 64] = z(e, f, f);\n      a[b + 3 + 64] = a[b + 2 + 64] = a[b + 0 + 96] = a[b + 1 + 96] = a[\n        b + 2 + 96\n      ] = a[b + 3 + 96] = f;\n    }\n    function mf(a, b) {\n      var c = a[b - 1 + 0],\n        d = a[b - 1 + 32],\n        e = a[b - 1 + 64],\n        f = a[b - 1 + 96],\n        g = a[b - 1 - 32],\n        h = a[b + 0 - 32],\n        k = a[b + 1 - 32],\n        l = a[b + 2 - 32];\n      a[b + 0 + 0] = a[b + 2 + 32] = (c + g + 1) >> 1;\n      a[b + 0 + 32] = a[b + 2 + 64] = (d + c + 1) >> 1;\n      a[b + 0 + 64] = a[b + 2 + 96] = (e + d + 1) >> 1;\n      a[b + 0 + 96] = (f + e + 1) >> 1;\n      a[b + 3 + 0] = z(h, k, l);\n      a[b + 2 + 0] = z(g, h, k);\n      a[b + 1 + 0] = a[b + 3 + 32] = z(c, g, h);\n      a[b + 1 + 32] = a[b + 3 + 64] = z(d, c, g);\n      a[b + 1 + 64] = a[b + 3 + 96] = z(e, d, c);\n      a[b + 1 + 96] = z(f, e, d);\n    }\n    function xf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) I(a, b + 32 * c, a, b - 32, 8);\n    }\n    function yf(a, b) {\n      var c;\n      for (c = 0; 8 > c; ++c) M(a, b, a[b - 1], 8), (b += 32);\n    }\n    function lb(a, b, c) {\n      var d;\n      for (d = 0; 8 > d; ++d) M(b, c + 32 * d, a, 8);\n    }\n    function vf(a, b) {\n      var c = 8,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32] + a[b - 1 + 32 * d];\n      lb(c >> 4, a, b);\n    }\n    function Af(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b + d - 32];\n      lb(c >> 3, a, b);\n    }\n    function zf(a, b) {\n      var c = 4,\n        d;\n      for (d = 0; 8 > d; ++d) c += a[b - 1 + 32 * d];\n      lb(c >> 3, a, b);\n    }\n    function Bf(a, b) {\n      lb(128, a, b);\n    }\n    function ab(a, b, c) {\n      var d = a[b - c],\n        e = a[b + 0],\n        f = 3 * (e - d) + Qb[1020 + a[b - 2 * c] - a[b + c]],\n        g = mb[112 + ((f + 4) >> 3)];\n      a[b - c] = R[255 + d + mb[112 + ((f + 3) >> 3)]];\n      a[b + 0] = R[255 + e - g];\n    }\n    function jd(a, b, c, d) {\n      var e = a[b + 0],\n        f = a[b + c];\n      return U[255 + a[b - 2 * c] - a[b - c]] > d || U[255 + f - e] > d;\n    }\n    function kd(a, b, c, d) {\n      return (\n        4 * U[255 + a[b - c] - a[b + 0]] + U[255 + a[b - 2 * c] - a[b + c]] <= d\n      );\n    }\n    function ld(a, b, c, d, e) {\n      var f = a[b - 3 * c],\n        g = a[b - 2 * c],\n        h = a[b - c],\n        k = a[b + 0],\n        l = a[b + c],\n        m = a[b + 2 * c],\n        n = a[b + 3 * c];\n      return 4 * U[255 + h - k] + U[255 + g - l] > d\n        ? 0\n        : U[255 + a[b - 4 * c] - f] <= e &&\n            U[255 + f - g] <= e &&\n            U[255 + g - h] <= e &&\n            U[255 + n - m] <= e &&\n            U[255 + m - l] <= e &&\n            U[255 + l - k] <= e;\n    }\n    function gd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d, c, e) && ab(a, b + d, c);\n    }\n    function hd(a, b, c, d) {\n      var e = 2 * d + 1;\n      for (d = 0; 16 > d; ++d) kd(a, b + d * c, 1, e) && ab(a, b + d * c, 1);\n    }\n    function bf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4 * c), gd(a, b, c, d);\n    }\n    function cf(a, b, c, d) {\n      var e;\n      for (e = 3; 0 < e; --e) (b += 4), hd(a, b, c, d);\n    }\n    function ea(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - 2 * m],\n              r = k[l - m],\n              q = k[l + 0],\n              t = k[l + m],\n              v = k[l + 2 * m],\n              p = Qb[1020 + 3 * (q - r) + Qb[1020 + n - t]],\n              u = (27 * p + 63) >> 7,\n              w = (18 * p + 63) >> 7,\n              p = (9 * p + 63) >> 7;\n            k[l - 3 * m] = R[255 + k[l - 3 * m] + p];\n            k[l - 2 * m] = R[255 + n + w];\n            k[l - m] = R[255 + r + u];\n            k[l + 0] = R[255 + q - u];\n            k[l + m] = R[255 + t - w];\n            k[l + 2 * m] = R[255 + v - p];\n          }\n        b += d;\n      }\n    }\n    function Fa(a, b, c, d, e, f, g, h) {\n      for (f = 2 * f + 1; 0 < e--; ) {\n        if (ld(a, b, c, f, g))\n          if (jd(a, b, c, h)) ab(a, b, c);\n          else {\n            var k = a,\n              l = b,\n              m = c,\n              n = k[l - m],\n              r = k[l + 0],\n              q = k[l + m],\n              t = 3 * (r - n),\n              v = mb[112 + ((t + 4) >> 3)],\n              t = mb[112 + ((t + 3) >> 3)],\n              p = (v + 1) >> 1;\n            k[l - 2 * m] = R[255 + k[l - 2 * m] + p];\n            k[l - m] = R[255 + n + t];\n            k[l + 0] = R[255 + r - v];\n            k[l + m] = R[255 + q - p];\n          }\n        b += d;\n      }\n    }\n    function Ue(a, b, c, d, e, f) {\n      ea(a, b, c, 1, 16, d, e, f);\n    }\n    function Ve(a, b, c, d, e, f) {\n      ea(a, b, 1, c, 16, d, e, f);\n    }\n    function Ye(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4 * c), Fa(a, b, c, 1, 16, d, e, f);\n    }\n    function Ze(a, b, c, d, e, f) {\n      var g;\n      for (g = 3; 0 < g; --g) (b += 4), Fa(a, b, 1, c, 16, d, e, f);\n    }\n    function We(a, b, c, d, e, f, g, h) {\n      ea(a, b, e, 1, 8, f, g, h);\n      ea(c, d, e, 1, 8, f, g, h);\n    }\n    function Xe(a, b, c, d, e, f, g, h) {\n      ea(a, b, 1, e, 8, f, g, h);\n      ea(c, d, 1, e, 8, f, g, h);\n    }\n    function $e(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4 * e, e, 1, 8, f, g, h);\n      Fa(c, d + 4 * e, e, 1, 8, f, g, h);\n    }\n    function af(a, b, c, d, e, f, g, h) {\n      Fa(a, b + 4, 1, e, 8, f, g, h);\n      Fa(c, d + 4, 1, e, 8, f, g, h);\n    }\n    function Cf() {\n      this.ba = new Cb();\n      this.ec = [];\n      this.cc = [];\n      this.Mc = [];\n      this.Dc = this.Nc = this.dc = this.fc = 0;\n      this.Oa = new Ud();\n      this.memory = 0;\n      this.Ib = \"OutputFunc\";\n      this.Jb = \"OutputAlphaFunc\";\n      this.Nd = \"OutputRowFunc\";\n    }\n    function md() {\n      this.data = [];\n      this.offset = this.kd = this.ha = this.w = 0;\n      this.na = [];\n      this.xa = this.gb = this.Ja = this.Sa = this.P = 0;\n    }\n    function Df() {\n      this.nc = this.Ea = this.b = this.hc = 0;\n      this.K = [];\n      this.w = 0;\n    }\n    function Ef() {\n      this.ua = 0;\n      this.Wa = new ac();\n      this.vb = new ac();\n      this.md = this.xc = this.wc = 0;\n      this.vc = [];\n      this.Wb = 0;\n      this.Ya = new Ub();\n      this.yc = new O();\n    }\n    function je() {\n      this.xb = this.a = 0;\n      this.l = new Oa();\n      this.ca = new Cb();\n      this.V = [];\n      this.Ba = 0;\n      this.Ta = [];\n      this.Ua = 0;\n      this.m = new Ra();\n      this.Pb = 0;\n      this.wd = new Ra();\n      this.Ma = this.$ = this.C = this.i = this.c = this.xd = 0;\n      this.s = new Ef();\n      this.ab = 0;\n      this.gc = wa(4, Df);\n      this.Oc = 0;\n    }\n    function Ff() {\n      this.Lc = this.Z = this.$a = this.i = this.c = 0;\n      this.l = new Oa();\n      this.ic = 0;\n      this.ca = [];\n      this.tb = 0;\n      this.qd = null;\n      this.rd = 0;\n    }\n    function Rb(a, b, c, d, e, f, g) {\n      a = null == a ? 0 : a[b + 0];\n      for (b = 0; b < g; ++b) (e[f + b] = (a + c[d + b]) & 255), (a = e[f + b]);\n    }\n    function Gf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h;\n        for (h = 0; h < g; ++h) e[f + h] = (a[b + h] + c[d + h]) & 255;\n      }\n    }\n    function Hf(a, b, c, d, e, f, g) {\n      if (null == a) Rb(null, null, c, d, e, f, g);\n      else {\n        var h = a[b + 0],\n          k = h,\n          l = h,\n          m;\n        for (m = 0; m < g; ++m)\n          (h = a[b + m]),\n            (k = l + h - k),\n            (l = (c[d + m] + (k & -256 ? (0 > k ? 0 : 255) : k)) & 255),\n            (k = h),\n            (e[f + m] = l);\n      }\n    }\n    function Le(a, b, c, d) {\n      var e = b.width,\n        f = b.o;\n      x(null != a && null != b);\n      if (0 > c || 0 >= d || c + d > f) return null;\n      if (!a.Cc) {\n        if (null == a.ga) {\n          a.ga = new Ff();\n          var g;\n          (g = null == a.ga) ||\n            ((g = b.width * b.o),\n            x(0 == a.Gb.length),\n            (a.Gb = V(g)),\n            (a.Uc = 0),\n            null == a.Gb\n              ? (g = 0)\n              : ((a.mb = a.Gb), (a.nb = a.Uc), (a.rc = null), (g = 1)),\n            (g = !g));\n          if (!g) {\n            g = a.ga;\n            var h = a.Fa,\n              k = a.P,\n              l = a.qc,\n              m = a.mb,\n              n = a.nb,\n              r = k + 1,\n              q = l - 1,\n              t = g.l;\n            x(null != h && null != m && null != b);\n            ia[0] = null;\n            ia[1] = Rb;\n            ia[2] = Gf;\n            ia[3] = Hf;\n            g.ca = m;\n            g.tb = n;\n            g.c = b.width;\n            g.i = b.height;\n            x(0 < g.c && 0 < g.i);\n            if (1 >= l) b = 0;\n            else if (\n              ((g.$a = (h[k + 0] >> 0) & 3),\n              (g.Z = (h[k + 0] >> 2) & 3),\n              (g.Lc = (h[k + 0] >> 4) & 3),\n              (k = (h[k + 0] >> 6) & 3),\n              0 > g.$a || 1 < g.$a || 4 <= g.Z || 1 < g.Lc || k)\n            )\n              b = 0;\n            else if (\n              ((t.put = kc),\n              (t.ac = gc),\n              (t.bc = lc),\n              (t.ma = g),\n              (t.width = b.width),\n              (t.height = b.height),\n              (t.Da = b.Da),\n              (t.v = b.v),\n              (t.va = b.va),\n              (t.j = b.j),\n              (t.o = b.o),\n              g.$a)\n            )\n              b: {\n                x(1 == g.$a), (b = Bc());\n                c: for (;;) {\n                  if (null == b) {\n                    b = 0;\n                    break b;\n                  }\n                  x(null != g);\n                  g.mc = b;\n                  b.c = g.c;\n                  b.i = g.i;\n                  b.l = g.l;\n                  b.l.ma = g;\n                  b.l.width = g.c;\n                  b.l.height = g.i;\n                  b.a = 0;\n                  cb(b.m, h, r, q);\n                  if (!rb(g.c, g.i, 1, b, null)) break c;\n                  1 == b.ab && 3 == b.gc[0].hc && yc(b.s)\n                    ? ((g.ic = 1),\n                      (h = b.c * b.i),\n                      (b.Ta = null),\n                      (b.Ua = 0),\n                      (b.V = V(h)),\n                      (b.Ba = 0),\n                      null == b.V ? ((b.a = 1), (b = 0)) : (b = 1))\n                    : ((g.ic = 0), (b = Ec(b, g.c)));\n                  if (!b) break c;\n                  b = 1;\n                  break b;\n                }\n                g.mc = null;\n                b = 0;\n              }\n            else b = q >= g.c * g.i;\n            g = !b;\n          }\n          if (g) return null;\n          1 != a.ga.Lc ? (a.Ga = 0) : (d = f - c);\n        }\n        x(null != a.ga);\n        x(c + d <= f);\n        a: {\n          h = a.ga;\n          b = h.c;\n          f = h.l.o;\n          if (0 == h.$a) {\n            r = a.rc;\n            q = a.Vc;\n            t = a.Fa;\n            k = a.P + 1 + c * b;\n            l = a.mb;\n            m = a.nb + c * b;\n            x(k <= a.P + a.qc);\n            if (0 != h.Z)\n              for (x(null != ia[h.Z]), g = 0; g < d; ++g)\n                ia[h.Z](r, q, t, k, l, m, b),\n                  (r = l),\n                  (q = m),\n                  (m += b),\n                  (k += b);\n            else\n              for (g = 0; g < d; ++g)\n                I(l, m, t, k, b), (r = l), (q = m), (m += b), (k += b);\n            a.rc = r;\n            a.Vc = q;\n          } else {\n            x(null != h.mc);\n            b = c + d;\n            g = h.mc;\n            x(null != g);\n            x(b <= g.i);\n            if (g.C >= b) b = 1;\n            else if ((h.ic || Aa(), h.ic)) {\n              var h = g.V,\n                r = g.Ba,\n                q = g.c,\n                v = g.i,\n                t = 1,\n                k = g.$ / q,\n                l = g.$ % q,\n                m = g.m,\n                n = g.s,\n                p = g.$,\n                u = q * v,\n                w = q * b,\n                y = n.wc,\n                A = p < w ? ha(n, l, k) : null;\n              x(p <= u);\n              x(b <= v);\n              x(yc(n));\n              c: for (;;) {\n                for (; !m.h && p < w; ) {\n                  l & y || (A = ha(n, l, k));\n                  x(null != A);\n                  Sa(m);\n                  v = ua(A.G[0], A.H[0], m);\n                  if (256 > v)\n                    (h[r + p] = v),\n                      ++p,\n                      ++l,\n                      l >= q && ((l = 0), ++k, k <= b && !(k % 16) && Ib(g, k));\n                  else if (280 > v) {\n                    var v = ib(v - 256, m);\n                    var E = ua(A.G[4], A.H[4], m);\n                    Sa(m);\n                    E = ib(E, m);\n                    E = nc(q, E);\n                    if (p >= E && u - p >= v) {\n                      var B;\n                      for (B = 0; B < v; ++B) h[r + p + B] = h[r + p + B - E];\n                    } else {\n                      t = 0;\n                      break c;\n                    }\n                    p += v;\n                    for (l += v; l >= q; )\n                      (l -= q), ++k, k <= b && !(k % 16) && Ib(g, k);\n                    p < w && l & y && (A = ha(n, l, k));\n                  } else {\n                    t = 0;\n                    break c;\n                  }\n                  x(m.h == db(m));\n                }\n                Ib(g, k > b ? b : k);\n                break c;\n              }\n              !t || (m.h && p < u) ? ((t = 0), (g.a = m.h ? 5 : 3)) : (g.$ = p);\n              b = t;\n            } else b = Jb(g, g.V, g.Ba, g.c, g.i, b, se);\n            if (!b) {\n              d = 0;\n              break a;\n            }\n          }\n          c + d >= f && (a.Cc = 1);\n          d = 1;\n        }\n        if (!d) return null;\n        if (\n          a.Cc &&\n          ((d = a.ga), null != d && (d.mc = null), (a.ga = null), 0 < a.Ga)\n        )\n          return alert(\"todo:WebPDequantizeLevels\"), null;\n      }\n      return a.nb + c * e;\n    }\n    function If(a, b, c, d, e, f) {\n      for (; 0 < e--; ) {\n        var g = a,\n          h = b + (c ? 1 : 0),\n          k = a,\n          l = b + (c ? 0 : 3),\n          m;\n        for (m = 0; m < d; ++m) {\n          var n = k[l + 4 * m];\n          255 != n &&\n            ((n *= 32897),\n            (g[h + 4 * m + 0] = (g[h + 4 * m + 0] * n) >> 23),\n            (g[h + 4 * m + 1] = (g[h + 4 * m + 1] * n) >> 23),\n            (g[h + 4 * m + 2] = (g[h + 4 * m + 2] * n) >> 23));\n        }\n        b += f;\n      }\n    }\n    function Jf(a, b, c, d, e) {\n      for (; 0 < d--; ) {\n        var f;\n        for (f = 0; f < c; ++f) {\n          var g = a[b + 2 * f + 0],\n            h = a[b + 2 * f + 1],\n            k = h & 15,\n            l = 4369 * k,\n            h = (((h & 240) | (h >> 4)) * l) >> 16;\n          a[b + 2 * f + 0] =\n            (((((g & 240) | (g >> 4)) * l) >> 16) & 240) |\n            ((((((g & 15) | (g << 4)) * l) >> 16) >> 4) & 15);\n          a[b + 2 * f + 1] = (h & 240) | k;\n        }\n        b += e;\n      }\n    }\n    function Kf(a, b, c, d, e, f, g, h) {\n      var k = 255,\n        l,\n        m;\n      for (m = 0; m < e; ++m) {\n        for (l = 0; l < d; ++l) {\n          var n = a[b + l];\n          f[g + 4 * l] = n;\n          k &= n;\n        }\n        b += c;\n        g += h;\n      }\n      return 255 != k;\n    }\n    function Lf(a, b, c, d, e) {\n      var f;\n      for (f = 0; f < e; ++f) c[d + f] = a[b + f] >> 8;\n    }\n    function Aa() {\n      za = If;\n      vc = Jf;\n      fc = Kf;\n      Fc = Lf;\n    }\n    function va(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n, r, q, t, v, p, u, w, y) {\n        var d,\n          E = (y - 1) >> 1;\n        var B = h[k + 0] | (l[m + 0] << 16);\n        var C = n[r + 0] | (q[t + 0] << 16);\n        x(null != a);\n        var z = (3 * B + C + 131074) >> 2;\n        b(a[e + 0], z & 255, z >> 16, v, p);\n        null != f &&\n          ((z = (3 * C + B + 131074) >> 2),\n          b(f[g + 0], z & 255, z >> 16, u, w));\n        for (d = 1; d <= E; ++d) {\n          var D = h[k + d] | (l[m + d] << 16);\n          var G = n[r + d] | (q[t + d] << 16);\n          var F = B + D + C + G + 524296;\n          var H = (F + 2 * (D + C)) >> 3;\n          F = (F + 2 * (B + G)) >> 3;\n          z = (H + B) >> 1;\n          B = (F + D) >> 1;\n          b(a[e + 2 * d - 1], z & 255, z >> 16, v, p + (2 * d - 1) * c);\n          b(a[e + 2 * d - 0], B & 255, B >> 16, v, p + (2 * d - 0) * c);\n          null != f &&\n            ((z = (F + C) >> 1),\n            (B = (H + G) >> 1),\n            b(f[g + 2 * d - 1], z & 255, z >> 16, u, w + (2 * d - 1) * c),\n            b(f[g + 2 * d + 0], B & 255, B >> 16, u, w + (2 * d + 0) * c));\n          B = D;\n          C = G;\n        }\n        y & 1 ||\n          ((z = (3 * B + C + 131074) >> 2),\n          b(a[e + y - 1], z & 255, z >> 16, v, p + (y - 1) * c),\n          null != f &&\n            ((z = (3 * C + B + 131074) >> 2),\n            b(f[g + y - 1], z & 255, z >> 16, u, w + (y - 1) * c)));\n      };\n    }\n    function ic() {\n      P[Ca] = Mf;\n      P[Ua] = nd;\n      P[tc] = Nf;\n      P[Va] = od;\n      P[ya] = pd;\n      P[Db] = qd;\n      P[wc] = Of;\n      P[zb] = nd;\n      P[Ab] = od;\n      P[Ja] = pd;\n      P[Bb] = qd;\n    }\n    function Sb(a) {\n      return a & ~Pf ? (0 > a ? 0 : 255) : a >> rd;\n    }\n    function bb(a, b) {\n      return Sb(((19077 * a) >> 8) + ((26149 * b) >> 8) - 14234);\n    }\n    function nb(a, b, c) {\n      return Sb(\n        ((19077 * a) >> 8) - ((6419 * b) >> 8) - ((13320 * c) >> 8) + 8708\n      );\n    }\n    function Pa(a, b) {\n      return Sb(((19077 * a) >> 8) + ((33050 * b) >> 8) - 17685);\n    }\n    function Ga(a, b, c, d, e) {\n      d[e + 0] = bb(a, c);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = Pa(a, b);\n    }\n    function Tb(a, b, c, d, e) {\n      d[e + 0] = Pa(a, b);\n      d[e + 1] = nb(a, b, c);\n      d[e + 2] = bb(a, c);\n    }\n    function sd(a, b, c, d, e) {\n      var f = nb(a, b, c);\n      b = ((f << 3) & 224) | (Pa(a, b) >> 3);\n      d[e + 0] = (bb(a, c) & 248) | (f >> 5);\n      d[e + 1] = b;\n    }\n    function td(a, b, c, d, e) {\n      var f = (Pa(a, b) & 240) | 15;\n      d[e + 0] = (bb(a, c) & 240) | (nb(a, b, c) >> 4);\n      d[e + 1] = f;\n    }\n    function ud(a, b, c, d, e) {\n      d[e + 0] = 255;\n      Ga(a, b, c, d, e + 1);\n    }\n    function vd(a, b, c, d, e) {\n      Tb(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function wd(a, b, c, d, e) {\n      Ga(a, b, c, d, e);\n      d[e + 3] = 255;\n    }\n    function ga(a, b) {\n      return 0 > a ? 0 : a > b ? b : a;\n    }\n    function la(a, b, c) {\n      self[a] = function(a, e, f, g, h, k, l, m, n) {\n        for (var d = m + (n & -2) * c; m != d; )\n          b(a[e + 0], f[g + 0], h[k + 0], l, m),\n            b(a[e + 1], f[g + 0], h[k + 0], l, m + c),\n            (e += 2),\n            ++g,\n            ++k,\n            (m += 2 * c);\n        n & 1 && b(a[e + 0], f[g + 0], h[k + 0], l, m);\n      };\n    }\n    function xd(a, b, c) {\n      return 0 == c ? (0 == a ? (0 == b ? 6 : 5) : 0 == b ? 4 : 0) : c;\n    }\n    function yd(a, b, c, d, e) {\n      switch (a >>> 30) {\n        case 3:\n          Za(b, c, d, e, 0);\n          break;\n        case 2:\n          fd(b, c, d, e);\n          break;\n        case 1:\n          pa(b, c, d, e);\n      }\n    }\n    function Oc(a, b) {\n      var c,\n        d,\n        e = b.M,\n        f = b.Nb,\n        g = a.oc,\n        h = a.pc + 40,\n        k = a.oc,\n        l = a.pc + 584,\n        m = a.oc,\n        n = a.pc + 600;\n      for (c = 0; 16 > c; ++c) g[h + 32 * c - 1] = 129;\n      for (c = 0; 8 > c; ++c)\n        (k[l + 32 * c - 1] = 129), (m[n + 32 * c - 1] = 129);\n      0 < e\n        ? (g[h - 1 - 32] = k[l - 1 - 32] = m[n - 1 - 32] = 129)\n        : (M(g, h - 32 - 1, 127, 21),\n          M(k, l - 32 - 1, 127, 9),\n          M(m, n - 32 - 1, 127, 9));\n      for (d = 0; d < a.za; ++d) {\n        var r = b.ya[b.aa + d];\n        if (0 < d) {\n          for (c = -1; 16 > c; ++c) I(g, h + 32 * c - 4, g, h + 32 * c + 12, 4);\n          for (c = -1; 8 > c; ++c)\n            I(k, l + 32 * c - 4, k, l + 32 * c + 4, 4),\n              I(m, n + 32 * c - 4, m, n + 32 * c + 4, 4);\n        }\n        var q = a.Gd,\n          t = a.Hd + d,\n          v = r.ad,\n          p = r.Hc;\n        0 < e &&\n          (I(g, h - 32, q[t].y, 0, 16),\n          I(k, l - 32, q[t].f, 0, 8),\n          I(m, n - 32, q[t].ea, 0, 8));\n        if (r.Za) {\n          var u = g;\n          var w = h - 32 + 16;\n          0 < e &&\n            (d >= a.za - 1\n              ? M(u, w, q[t].y[15], 4)\n              : I(u, w, q[t + 1].y, 0, 4));\n          for (c = 0; 4 > c; c++)\n            u[w + 128 + c] = u[w + 256 + c] = u[w + 384 + c] = u[w + 0 + c];\n          for (c = 0; 16 > c; ++c, p <<= 2)\n            (u = g), (w = h + zd[c]), W[r.Ob[c]](u, w), yd(p, v, 16 * +c, u, w);\n        } else if (((u = xd(d, e, r.Ob[0])), Y[u](g, h), 0 != p))\n          for (c = 0; 16 > c; ++c, p <<= 2) yd(p, v, 16 * +c, g, h + zd[c]);\n        c = r.Gc;\n        u = xd(d, e, r.Dd);\n        ka[u](k, l);\n        ka[u](m, n);\n        r = c >> 0;\n        p = v;\n        u = k;\n        w = l;\n        r & 255 && (r & 170 ? Nb(p, 256, u, w) : Ob(p, 256, u, w));\n        c >>= 8;\n        r = m;\n        p = n;\n        c & 255 && (c & 170 ? Nb(v, 320, r, p) : Ob(v, 320, r, p));\n        e < a.Ub - 1 &&\n          (I(q[t].y, 0, g, h + 480, 16),\n          I(q[t].f, 0, k, l + 224, 8),\n          I(q[t].ea, 0, m, n + 224, 8));\n        c = 8 * f * a.B;\n        q = a.sa;\n        t = a.ta + 16 * d + 16 * f * a.R;\n        v = a.qa;\n        r = a.ra + 8 * d + c;\n        p = a.Ha;\n        u = a.Ia + 8 * d + c;\n        for (c = 0; 16 > c; ++c) I(q, t + c * a.R, g, h + 32 * c, 16);\n        for (c = 0; 8 > c; ++c)\n          I(v, r + c * a.B, k, l + 32 * c, 8),\n            I(p, u + c * a.B, m, n + 32 * c, 8);\n      }\n    }\n    function Ad(a, b, c, d, e, f, g, h, k) {\n      var l = [0],\n        m = [0],\n        n = 0,\n        r = null != k ? k.kd : 0,\n        q = null != k ? k : new md();\n      if (null == a || 12 > c) return 7;\n      q.data = a;\n      q.w = b;\n      q.ha = c;\n      b = [b];\n      c = [c];\n      q.gb = [q.gb];\n      a: {\n        var t = b;\n        var v = c;\n        var p = q.gb;\n        x(null != a);\n        x(null != v);\n        x(null != p);\n        p[0] = 0;\n        if (12 <= v[0] && !fa(a, t[0], \"RIFF\")) {\n          if (fa(a, t[0] + 8, \"WEBP\")) {\n            p = 3;\n            break a;\n          }\n          var u = Ha(a, t[0] + 4);\n          if (12 > u || 4294967286 < u) {\n            p = 3;\n            break a;\n          }\n          if (r && u > v[0] - 8) {\n            p = 7;\n            break a;\n          }\n          p[0] = u;\n          t[0] += 12;\n          v[0] -= 12;\n        }\n        p = 0;\n      }\n      if (0 != p) return p;\n      u = 0 < q.gb[0];\n      for (c = c[0]; ; ) {\n        t = [0];\n        n = [n];\n        a: {\n          var w = a;\n          v = b;\n          p = c;\n          var y = n,\n            A = l,\n            z = m,\n            B = t;\n          y[0] = 0;\n          if (8 > p[0]) p = 7;\n          else {\n            if (!fa(w, v[0], \"VP8X\")) {\n              if (10 != Ha(w, v[0] + 4)) {\n                p = 3;\n                break a;\n              }\n              if (18 > p[0]) {\n                p = 7;\n                break a;\n              }\n              var C = Ha(w, v[0] + 8);\n              var D = 1 + Yb(w, v[0] + 12);\n              w = 1 + Yb(w, v[0] + 15);\n              if (2147483648 <= D * w) {\n                p = 3;\n                break a;\n              }\n              null != B && (B[0] = C);\n              null != A && (A[0] = D);\n              null != z && (z[0] = w);\n              v[0] += 18;\n              p[0] -= 18;\n              y[0] = 1;\n            }\n            p = 0;\n          }\n        }\n        n = n[0];\n        t = t[0];\n        if (0 != p) return p;\n        v = !!(t & 2);\n        if (!u && n) return 3;\n        null != f && (f[0] = !!(t & 16));\n        null != g && (g[0] = v);\n        null != h && (h[0] = 0);\n        g = l[0];\n        t = m[0];\n        if (n && v && null == k) {\n          p = 0;\n          break;\n        }\n        if (4 > c) {\n          p = 7;\n          break;\n        }\n        if ((u && n) || (!u && !n && !fa(a, b[0], \"ALPH\"))) {\n          c = [c];\n          q.na = [q.na];\n          q.P = [q.P];\n          q.Sa = [q.Sa];\n          a: {\n            C = a;\n            p = b;\n            u = c;\n            var y = q.gb,\n              A = q.na,\n              z = q.P,\n              B = q.Sa;\n            D = 22;\n            x(null != C);\n            x(null != u);\n            w = p[0];\n            var F = u[0];\n            x(null != A);\n            x(null != B);\n            A[0] = null;\n            z[0] = null;\n            for (B[0] = 0; ; ) {\n              p[0] = w;\n              u[0] = F;\n              if (8 > F) {\n                p = 7;\n                break a;\n              }\n              var G = Ha(C, w + 4);\n              if (4294967286 < G) {\n                p = 3;\n                break a;\n              }\n              var H = (8 + G + 1) & -2;\n              D += H;\n              if (0 < y && D > y) {\n                p = 3;\n                break a;\n              }\n              if (!fa(C, w, \"VP8 \") || !fa(C, w, \"VP8L\")) {\n                p = 0;\n                break a;\n              }\n              if (F[0] < H) {\n                p = 7;\n                break a;\n              }\n              fa(C, w, \"ALPH\") || ((A[0] = C), (z[0] = w + 8), (B[0] = G));\n              w += H;\n              F -= H;\n            }\n          }\n          c = c[0];\n          q.na = q.na[0];\n          q.P = q.P[0];\n          q.Sa = q.Sa[0];\n          if (0 != p) break;\n        }\n        c = [c];\n        q.Ja = [q.Ja];\n        q.xa = [q.xa];\n        a: if (\n          ((y = a),\n          (p = b),\n          (u = c),\n          (A = q.gb[0]),\n          (z = q.Ja),\n          (B = q.xa),\n          (C = p[0]),\n          (w = !fa(y, C, \"VP8 \")),\n          (D = !fa(y, C, \"VP8L\")),\n          x(null != y),\n          x(null != u),\n          x(null != z),\n          x(null != B),\n          8 > u[0])\n        )\n          p = 7;\n        else {\n          if (w || D) {\n            y = Ha(y, C + 4);\n            if (12 <= A && y > A - 12) {\n              p = 3;\n              break a;\n            }\n            if (r && y > u[0] - 8) {\n              p = 7;\n              break a;\n            }\n            z[0] = y;\n            p[0] += 8;\n            u[0] -= 8;\n            B[0] = D;\n          } else\n            (B[0] = 5 <= u[0] && 47 == y[C + 0] && !(y[C + 4] >> 5)),\n              (z[0] = u[0]);\n          p = 0;\n        }\n        c = c[0];\n        q.Ja = q.Ja[0];\n        q.xa = q.xa[0];\n        b = b[0];\n        if (0 != p) break;\n        if (4294967286 < q.Ja) return 3;\n        null == h || v || (h[0] = q.xa ? 2 : 1);\n        g = [g];\n        t = [t];\n        if (q.xa) {\n          if (5 > c) {\n            p = 7;\n            break;\n          }\n          h = g;\n          r = t;\n          v = f;\n          null == a || 5 > c\n            ? (a = 0)\n            : 5 <= c && 47 == a[b + 0] && !(a[b + 4] >> 5)\n            ? ((u = [0]),\n              (y = [0]),\n              (A = [0]),\n              (z = new Ra()),\n              cb(z, a, b, c),\n              mc(z, u, y, A)\n                ? (null != h && (h[0] = u[0]),\n                  null != r && (r[0] = y[0]),\n                  null != v && (v[0] = A[0]),\n                  (a = 1))\n                : (a = 0))\n            : (a = 0);\n        } else {\n          if (10 > c) {\n            p = 7;\n            break;\n          }\n          h = t;\n          null == a || 10 > c || !Jc(a, b + 3, c - 3)\n            ? (a = 0)\n            : ((r = a[b + 0] | (a[b + 1] << 8) | (a[b + 2] << 16)),\n              (v = ((a[b + 7] << 8) | a[b + 6]) & 16383),\n              (a = ((a[b + 9] << 8) | a[b + 8]) & 16383),\n              r & 1 ||\n              3 < ((r >> 1) & 7) ||\n              !((r >> 4) & 1) ||\n              r >> 5 >= q.Ja ||\n              !v ||\n              !a\n                ? (a = 0)\n                : (g && (g[0] = v), h && (h[0] = a), (a = 1)));\n        }\n        if (!a) return 3;\n        g = g[0];\n        t = t[0];\n        if (n && (l[0] != g || m[0] != t)) return 3;\n        null != k &&\n          ((k[0] = q),\n          (k.offset = b - k.w),\n          x(4294967286 > b - k.w),\n          x(k.offset == k.ha - c));\n        break;\n      }\n      return 0 == p || (7 == p && n && null == k)\n        ? (null != f && (f[0] |= null != q.na && 0 < q.na.length),\n          null != d && (d[0] = g),\n          null != e && (e[0] = t),\n          0)\n        : p;\n    }\n    function hc(a, b, c) {\n      var d = b.width,\n        e = b.height,\n        f = 0,\n        g = 0,\n        h = d,\n        k = e;\n      b.Da = null != a && 0 < a.Da;\n      if (\n        b.Da &&\n        ((h = a.cd),\n        (k = a.bd),\n        (f = a.v),\n        (g = a.j),\n        11 > c || ((f &= -2), (g &= -2)),\n        0 > f || 0 > g || 0 >= h || 0 >= k || f + h > d || g + k > e)\n      )\n        return 0;\n      b.v = f;\n      b.j = g;\n      b.va = f + h;\n      b.o = g + k;\n      b.U = h;\n      b.T = k;\n      b.da = null != a && 0 < a.da;\n      if (b.da) {\n        c = [a.ib];\n        f = [a.hb];\n        if (!bc(h, k, c, f)) return 0;\n        b.ib = c[0];\n        b.hb = f[0];\n      }\n      b.ob = null != a && a.ob;\n      b.Kb = null == a || !a.Sd;\n      b.da && ((b.ob = b.ib < (3 * d) / 4 && b.hb < (3 * e) / 4), (b.Kb = 0));\n      return 1;\n    }\n    function Bd(a) {\n      if (null == a) return 2;\n      if (11 > a.S) {\n        var b = a.f.RGBA;\n        b.fb += (a.height - 1) * b.A;\n        b.A = -b.A;\n      } else\n        (b = a.f.kb),\n          (a = a.height),\n          (b.O += (a - 1) * b.fa),\n          (b.fa = -b.fa),\n          (b.N += ((a - 1) >> 1) * b.Ab),\n          (b.Ab = -b.Ab),\n          (b.W += ((a - 1) >> 1) * b.Db),\n          (b.Db = -b.Db),\n          null != b.F && ((b.J += (a - 1) * b.lb), (b.lb = -b.lb));\n      return 0;\n    }\n    function Cd(a, b, c, d) {\n      if (null == d || 0 >= a || 0 >= b) return 2;\n      if (null != c) {\n        if (c.Da) {\n          var e = c.cd,\n            f = c.bd,\n            g = c.v & -2,\n            h = c.j & -2;\n          if (0 > g || 0 > h || 0 >= e || 0 >= f || g + e > a || h + f > b)\n            return 2;\n          a = e;\n          b = f;\n        }\n        if (c.da) {\n          e = [c.ib];\n          f = [c.hb];\n          if (!bc(a, b, e, f)) return 2;\n          a = e[0];\n          b = f[0];\n        }\n      }\n      d.width = a;\n      d.height = b;\n      a: {\n        var k = d.width;\n        var l = d.height;\n        a = d.S;\n        if (0 >= k || 0 >= l || !(a >= Ca && 13 > a)) a = 2;\n        else {\n          if (0 >= d.Rd && null == d.sd) {\n            var g = (f = e = b = 0),\n              h = k * Dd[a],\n              m = h * l;\n            11 > a ||\n              ((b = (k + 1) / 2),\n              (f = ((l + 1) / 2) * b),\n              12 == a && ((e = k), (g = e * l)));\n            l = V(m + 2 * f + g);\n            if (null == l) {\n              a = 1;\n              break a;\n            }\n            d.sd = l;\n            11 > a\n              ? ((k = d.f.RGBA),\n                (k.eb = l),\n                (k.fb = 0),\n                (k.A = h),\n                (k.size = m))\n              : ((k = d.f.kb),\n                (k.y = l),\n                (k.O = 0),\n                (k.fa = h),\n                (k.Fd = m),\n                (k.f = l),\n                (k.N = 0 + m),\n                (k.Ab = b),\n                (k.Cd = f),\n                (k.ea = l),\n                (k.W = 0 + m + f),\n                (k.Db = b),\n                (k.Ed = f),\n                12 == a && ((k.F = l), (k.J = 0 + m + 2 * f)),\n                (k.Tc = g),\n                (k.lb = e));\n          }\n          b = 1;\n          e = d.S;\n          f = d.width;\n          g = d.height;\n          if (e >= Ca && 13 > e)\n            if (11 > e)\n              (a = d.f.RGBA),\n                (h = Math.abs(a.A)),\n                (b &= h * (g - 1) + f <= a.size),\n                (b &= h >= f * Dd[e]),\n                (b &= null != a.eb);\n            else {\n              a = d.f.kb;\n              h = (f + 1) / 2;\n              m = (g + 1) / 2;\n              k = Math.abs(a.fa);\n              var l = Math.abs(a.Ab),\n                n = Math.abs(a.Db),\n                r = Math.abs(a.lb),\n                q = r * (g - 1) + f;\n              b &= k * (g - 1) + f <= a.Fd;\n              b &= l * (m - 1) + h <= a.Cd;\n              b &= n * (m - 1) + h <= a.Ed;\n              b = b & (k >= f) & (l >= h) & (n >= h);\n              b &= null != a.y;\n              b &= null != a.f;\n              b &= null != a.ea;\n              12 == e && ((b &= r >= f), (b &= q <= a.Tc), (b &= null != a.F));\n            }\n          else b = 0;\n          a = b ? 0 : 2;\n        }\n      }\n      if (0 != a) return a;\n      null != c && c.fd && (a = Bd(d));\n      return a;\n    }\n    var xb = 64,\n      Hd = [\n        0,\n        1,\n        3,\n        7,\n        15,\n        31,\n        63,\n        127,\n        255,\n        511,\n        1023,\n        2047,\n        4095,\n        8191,\n        16383,\n        32767,\n        65535,\n        131071,\n        262143,\n        524287,\n        1048575,\n        2097151,\n        4194303,\n        8388607,\n        16777215\n      ],\n      Gd = 24,\n      ob = 32,\n      Xb = 8,\n      Id = [\n        0,\n        0,\n        1,\n        1,\n        2,\n        2,\n        2,\n        2,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        3,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        4,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        5,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        6,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7,\n        7\n      ];\n    X(\"Predictor0\", \"PredictorAdd0\");\n    self.Predictor0 = function() {\n      return 4278190080;\n    };\n    self.Predictor1 = function(a) {\n      return a;\n    };\n    self.Predictor2 = function(a, b, c) {\n      return b[c + 0];\n    };\n    self.Predictor3 = function(a, b, c) {\n      return b[c + 1];\n    };\n    self.Predictor4 = function(a, b, c) {\n      return b[c - 1];\n    };\n    self.Predictor5 = function(a, b, c) {\n      return aa(aa(a, b[c + 1]), b[c + 0]);\n    };\n    self.Predictor6 = function(a, b, c) {\n      return aa(a, b[c - 1]);\n    };\n    self.Predictor7 = function(a, b, c) {\n      return aa(a, b[c + 0]);\n    };\n    self.Predictor8 = function(a, b, c) {\n      return aa(b[c - 1], b[c + 0]);\n    };\n    self.Predictor9 = function(a, b, c) {\n      return aa(b[c + 0], b[c + 1]);\n    };\n    self.Predictor10 = function(a, b, c) {\n      return aa(aa(a, b[c - 1]), aa(b[c + 0], b[c + 1]));\n    };\n    self.Predictor11 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return 0 >=\n        Ia((d >> 24) & 255, (a >> 24) & 255, (b >> 24) & 255) +\n          Ia((d >> 16) & 255, (a >> 16) & 255, (b >> 16) & 255) +\n          Ia((d >> 8) & 255, (a >> 8) & 255, (b >> 8) & 255) +\n          Ia(d & 255, a & 255, b & 255)\n        ? d\n        : a;\n    };\n    self.Predictor12 = function(a, b, c) {\n      var d = b[c + 0];\n      b = b[c - 1];\n      return (\n        ((sa(((a >> 24) & 255) + ((d >> 24) & 255) - ((b >> 24) & 255)) << 24) |\n          (sa(((a >> 16) & 255) + ((d >> 16) & 255) - ((b >> 16) & 255)) <<\n            16) |\n          (sa(((a >> 8) & 255) + ((d >> 8) & 255) - ((b >> 8) & 255)) << 8) |\n          sa((a & 255) + (d & 255) - (b & 255))) >>>\n        0\n      );\n    };\n    self.Predictor13 = function(a, b, c) {\n      var d = b[c - 1];\n      a = aa(a, b[c + 0]);\n      return (\n        ((eb((a >> 24) & 255, (d >> 24) & 255) << 24) |\n          (eb((a >> 16) & 255, (d >> 16) & 255) << 16) |\n          (eb((a >> 8) & 255, (d >> 8) & 255) << 8) |\n          eb((a >> 0) & 255, (d >> 0) & 255)) >>>\n        0\n      );\n    };\n    var ee = self.PredictorAdd0;\n    self.PredictorAdd1 = cc;\n    X(\"Predictor2\", \"PredictorAdd2\");\n    X(\"Predictor3\", \"PredictorAdd3\");\n    X(\"Predictor4\", \"PredictorAdd4\");\n    X(\"Predictor5\", \"PredictorAdd5\");\n    X(\"Predictor6\", \"PredictorAdd6\");\n    X(\"Predictor7\", \"PredictorAdd7\");\n    X(\"Predictor8\", \"PredictorAdd8\");\n    X(\"Predictor9\", \"PredictorAdd9\");\n    X(\"Predictor10\", \"PredictorAdd10\");\n    X(\"Predictor11\", \"PredictorAdd11\");\n    X(\"Predictor12\", \"PredictorAdd12\");\n    X(\"Predictor13\", \"PredictorAdd13\");\n    var fe = self.PredictorAdd2;\n    ec(\n      \"ColorIndexInverseTransform\",\n      \"MapARGB\",\n      \"32b\",\n      function(a) {\n        return (a >> 8) & 255;\n      },\n      function(a) {\n        return a;\n      }\n    );\n    ec(\n      \"VP8LColorIndexInverseTransformAlpha\",\n      \"MapAlpha\",\n      \"8b\",\n      function(a) {\n        return a;\n      },\n      function(a) {\n        return (a >> 8) & 255;\n      }\n    );\n    var rc = self.ColorIndexInverseTransform,\n      ke = self.MapARGB,\n      he = self.VP8LColorIndexInverseTransformAlpha,\n      le = self.MapAlpha,\n      pc,\n      qc = (self.VP8LPredictorsAdd = []);\n    qc.length = 16;\n    (self.VP8LPredictors = []).length = 16;\n    (self.VP8LPredictorsAdd_C = []).length = 16;\n    (self.VP8LPredictors_C = []).length = 16;\n    var Fb,\n      sc,\n      Gb,\n      Hb,\n      xc,\n      uc,\n      bd = V(511),\n      cd = V(2041),\n      dd = V(225),\n      ed = V(767),\n      ad = 0,\n      Qb = cd,\n      mb = dd,\n      R = ed,\n      U = bd,\n      Ca = 0,\n      Ua = 1,\n      tc = 2,\n      Va = 3,\n      ya = 4,\n      Db = 5,\n      wc = 6,\n      zb = 7,\n      Ab = 8,\n      Ja = 9,\n      Bb = 10,\n      pe = [2, 3, 7],\n      oe = [3, 3, 11],\n      Dc = [280, 256, 256, 256, 40],\n      qe = [0, 1, 1, 1, 0],\n      ne = [17, 18, 0, 1, 2, 3, 4, 5, 16, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],\n      de = [\n        24,\n        7,\n        23,\n        25,\n        40,\n        6,\n        39,\n        41,\n        22,\n        26,\n        38,\n        42,\n        56,\n        5,\n        55,\n        57,\n        21,\n        27,\n        54,\n        58,\n        37,\n        43,\n        72,\n        4,\n        71,\n        73,\n        20,\n        28,\n        53,\n        59,\n        70,\n        74,\n        36,\n        44,\n        88,\n        69,\n        75,\n        52,\n        60,\n        3,\n        87,\n        89,\n        19,\n        29,\n        86,\n        90,\n        35,\n        45,\n        68,\n        76,\n        85,\n        91,\n        51,\n        61,\n        104,\n        2,\n        103,\n        105,\n        18,\n        30,\n        102,\n        106,\n        34,\n        46,\n        84,\n        92,\n        67,\n        77,\n        101,\n        107,\n        50,\n        62,\n        120,\n        1,\n        119,\n        121,\n        83,\n        93,\n        17,\n        31,\n        100,\n        108,\n        66,\n        78,\n        118,\n        122,\n        33,\n        47,\n        117,\n        123,\n        49,\n        63,\n        99,\n        109,\n        82,\n        94,\n        0,\n        116,\n        124,\n        65,\n        79,\n        16,\n        32,\n        98,\n        110,\n        48,\n        115,\n        125,\n        81,\n        95,\n        64,\n        114,\n        126,\n        97,\n        111,\n        80,\n        113,\n        127,\n        96,\n        112\n      ],\n      me = [\n        2954,\n        2956,\n        2958,\n        2962,\n        2970,\n        2986,\n        3018,\n        3082,\n        3212,\n        3468,\n        3980,\n        5004\n      ],\n      ie = 8,\n      Lb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        17,\n        18,\n        19,\n        20,\n        20,\n        21,\n        21,\n        22,\n        22,\n        23,\n        23,\n        24,\n        25,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        59,\n        60,\n        61,\n        62,\n        63,\n        64,\n        65,\n        66,\n        67,\n        68,\n        69,\n        70,\n        71,\n        72,\n        73,\n        74,\n        75,\n        76,\n        76,\n        77,\n        78,\n        79,\n        80,\n        81,\n        82,\n        83,\n        84,\n        85,\n        86,\n        87,\n        88,\n        89,\n        91,\n        93,\n        95,\n        96,\n        98,\n        100,\n        101,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        118,\n        122,\n        124,\n        126,\n        128,\n        130,\n        132,\n        134,\n        136,\n        138,\n        140,\n        143,\n        145,\n        148,\n        151,\n        154,\n        157\n      ],\n      Mb = [\n        4,\n        5,\n        6,\n        7,\n        8,\n        9,\n        10,\n        11,\n        12,\n        13,\n        14,\n        15,\n        16,\n        17,\n        18,\n        19,\n        20,\n        21,\n        22,\n        23,\n        24,\n        25,\n        26,\n        27,\n        28,\n        29,\n        30,\n        31,\n        32,\n        33,\n        34,\n        35,\n        36,\n        37,\n        38,\n        39,\n        40,\n        41,\n        42,\n        43,\n        44,\n        45,\n        46,\n        47,\n        48,\n        49,\n        50,\n        51,\n        52,\n        53,\n        54,\n        55,\n        56,\n        57,\n        58,\n        60,\n        62,\n        64,\n        66,\n        68,\n        70,\n        72,\n        74,\n        76,\n        78,\n        80,\n        82,\n        84,\n        86,\n        88,\n        90,\n        92,\n        94,\n        96,\n        98,\n        100,\n        102,\n        104,\n        106,\n        108,\n        110,\n        112,\n        114,\n        116,\n        119,\n        122,\n        125,\n        128,\n        131,\n        134,\n        137,\n        140,\n        143,\n        146,\n        149,\n        152,\n        155,\n        158,\n        161,\n        164,\n        167,\n        170,\n        173,\n        177,\n        181,\n        185,\n        189,\n        193,\n        197,\n        201,\n        205,\n        209,\n        213,\n        217,\n        221,\n        225,\n        229,\n        234,\n        239,\n        245,\n        249,\n        254,\n        259,\n        264,\n        269,\n        274,\n        279,\n        284\n      ],\n      oa = null,\n      He = [\n        [173, 148, 140, 0],\n        [176, 155, 140, 135, 0],\n        [180, 157, 141, 134, 130, 0],\n        [254, 254, 243, 230, 196, 177, 153, 140, 133, 130, 129, 0]\n      ],\n      Ie = [0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15],\n      Mc = [-0, 1, -1, 2, -2, 3, 4, 6, -3, 5, -4, -5, -6, 7, -7, 8, -8, -9],\n      Fe = [\n        [\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [253, 136, 254, 255, 228, 219, 128, 128, 128, 128, 128],\n            [189, 129, 242, 255, 227, 213, 255, 219, 128, 128, 128],\n            [106, 126, 227, 252, 214, 209, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 98, 248, 255, 236, 226, 255, 255, 128, 128, 128],\n            [181, 133, 238, 254, 221, 234, 255, 154, 128, 128, 128],\n            [78, 134, 202, 247, 198, 180, 255, 219, 128, 128, 128]\n          ],\n          [\n            [1, 185, 249, 255, 243, 255, 128, 128, 128, 128, 128],\n            [184, 150, 247, 255, 236, 224, 128, 128, 128, 128, 128],\n            [77, 110, 216, 255, 236, 230, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 101, 251, 255, 241, 255, 128, 128, 128, 128, 128],\n            [170, 139, 241, 252, 236, 209, 255, 255, 128, 128, 128],\n            [37, 116, 196, 243, 228, 255, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 204, 254, 255, 245, 255, 128, 128, 128, 128, 128],\n            [207, 160, 250, 255, 238, 128, 128, 128, 128, 128, 128],\n            [102, 103, 231, 255, 211, 171, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 152, 252, 255, 240, 255, 128, 128, 128, 128, 128],\n            [177, 135, 243, 255, 234, 225, 128, 128, 128, 128, 128],\n            [80, 129, 211, 255, 194, 224, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [246, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [255, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [198, 35, 237, 223, 193, 187, 162, 160, 145, 155, 62],\n            [131, 45, 198, 221, 172, 176, 220, 157, 252, 221, 1],\n            [68, 47, 146, 208, 149, 167, 221, 162, 255, 223, 128]\n          ],\n          [\n            [1, 149, 241, 255, 221, 224, 255, 255, 128, 128, 128],\n            [184, 141, 234, 253, 222, 220, 255, 199, 128, 128, 128],\n            [81, 99, 181, 242, 176, 190, 249, 202, 255, 255, 128]\n          ],\n          [\n            [1, 129, 232, 253, 214, 197, 242, 196, 255, 255, 128],\n            [99, 121, 210, 250, 201, 198, 255, 202, 128, 128, 128],\n            [23, 91, 163, 242, 170, 187, 247, 210, 255, 255, 128]\n          ],\n          [\n            [1, 200, 246, 255, 234, 255, 128, 128, 128, 128, 128],\n            [109, 178, 241, 255, 231, 245, 255, 255, 128, 128, 128],\n            [44, 130, 201, 253, 205, 192, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 132, 239, 251, 219, 209, 255, 165, 128, 128, 128],\n            [94, 136, 225, 251, 218, 190, 255, 255, 128, 128, 128],\n            [22, 100, 174, 245, 186, 161, 255, 199, 128, 128, 128]\n          ],\n          [\n            [1, 182, 249, 255, 232, 235, 128, 128, 128, 128, 128],\n            [124, 143, 241, 255, 227, 234, 128, 128, 128, 128, 128],\n            [35, 77, 181, 251, 193, 211, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 157, 247, 255, 236, 231, 255, 255, 128, 128, 128],\n            [121, 141, 235, 255, 225, 227, 255, 255, 128, 128, 128],\n            [45, 99, 188, 251, 195, 217, 255, 224, 128, 128, 128]\n          ],\n          [\n            [1, 1, 251, 255, 213, 255, 128, 128, 128, 128, 128],\n            [203, 1, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [137, 1, 177, 255, 224, 255, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [253, 9, 248, 251, 207, 208, 255, 192, 128, 128, 128],\n            [175, 13, 224, 243, 193, 185, 249, 198, 255, 255, 128],\n            [73, 17, 171, 221, 161, 179, 236, 167, 255, 234, 128]\n          ],\n          [\n            [1, 95, 247, 253, 212, 183, 255, 255, 128, 128, 128],\n            [239, 90, 244, 250, 211, 209, 255, 255, 128, 128, 128],\n            [155, 77, 195, 248, 188, 195, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 24, 239, 251, 218, 219, 255, 205, 128, 128, 128],\n            [201, 51, 219, 255, 196, 186, 128, 128, 128, 128, 128],\n            [69, 46, 190, 239, 201, 218, 255, 228, 128, 128, 128]\n          ],\n          [\n            [1, 191, 251, 255, 255, 128, 128, 128, 128, 128, 128],\n            [223, 165, 249, 255, 213, 255, 128, 128, 128, 128, 128],\n            [141, 124, 248, 255, 255, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 16, 248, 255, 255, 128, 128, 128, 128, 128, 128],\n            [190, 36, 230, 255, 236, 255, 128, 128, 128, 128, 128],\n            [149, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 226, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [247, 192, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [240, 128, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [1, 134, 252, 255, 255, 128, 128, 128, 128, 128, 128],\n            [213, 62, 250, 255, 255, 128, 128, 128, 128, 128, 128],\n            [55, 93, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ],\n          [\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128],\n            [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ],\n        [\n          [\n            [202, 24, 213, 235, 186, 191, 220, 160, 240, 175, 255],\n            [126, 38, 182, 232, 169, 184, 228, 174, 255, 187, 128],\n            [61, 46, 138, 219, 151, 178, 240, 170, 255, 216, 128]\n          ],\n          [\n            [1, 112, 230, 250, 199, 191, 247, 159, 255, 255, 128],\n            [166, 109, 228, 252, 211, 215, 255, 174, 128, 128, 128],\n            [39, 77, 162, 232, 172, 180, 245, 178, 255, 255, 128]\n          ],\n          [\n            [1, 52, 220, 246, 198, 199, 249, 220, 255, 255, 128],\n            [124, 74, 191, 243, 183, 193, 250, 221, 255, 255, 128],\n            [24, 71, 130, 219, 154, 170, 243, 182, 255, 255, 128]\n          ],\n          [\n            [1, 182, 225, 249, 219, 240, 255, 224, 128, 128, 128],\n            [149, 150, 226, 252, 216, 205, 255, 171, 128, 128, 128],\n            [28, 108, 170, 242, 183, 194, 254, 223, 255, 255, 128]\n          ],\n          [\n            [1, 81, 230, 252, 204, 203, 255, 192, 128, 128, 128],\n            [123, 102, 209, 247, 188, 196, 255, 233, 128, 128, 128],\n            [20, 95, 153, 243, 164, 173, 255, 203, 128, 128, 128]\n          ],\n          [\n            [1, 222, 248, 255, 216, 213, 128, 128, 128, 128, 128],\n            [168, 175, 246, 252, 235, 205, 255, 255, 128, 128, 128],\n            [47, 116, 215, 255, 211, 212, 255, 255, 128, 128, 128]\n          ],\n          [\n            [1, 121, 236, 253, 212, 214, 255, 255, 128, 128, 128],\n            [141, 84, 213, 252, 201, 202, 255, 219, 128, 128, 128],\n            [42, 80, 160, 240, 162, 185, 255, 205, 128, 128, 128]\n          ],\n          [\n            [1, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [244, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128],\n            [238, 1, 255, 128, 128, 128, 128, 128, 128, 128, 128]\n          ]\n        ]\n      ],\n      Ke = [\n        [\n          [231, 120, 48, 89, 115, 113, 120, 152, 112],\n          [152, 179, 64, 126, 170, 118, 46, 70, 95],\n          [175, 69, 143, 80, 85, 82, 72, 155, 103],\n          [56, 58, 10, 171, 218, 189, 17, 13, 152],\n          [114, 26, 17, 163, 44, 195, 21, 10, 173],\n          [121, 24, 80, 195, 26, 62, 44, 64, 85],\n          [144, 71, 10, 38, 171, 213, 144, 34, 26],\n          [170, 46, 55, 19, 136, 160, 33, 206, 71],\n          [63, 20, 8, 114, 114, 208, 12, 9, 226],\n          [81, 40, 11, 96, 182, 84, 29, 16, 36]\n        ],\n        [\n          [134, 183, 89, 137, 98, 101, 106, 165, 148],\n          [72, 187, 100, 130, 157, 111, 32, 75, 80],\n          [66, 102, 167, 99, 74, 62, 40, 234, 128],\n          [41, 53, 9, 178, 241, 141, 26, 8, 107],\n          [74, 43, 26, 146, 73, 166, 49, 23, 157],\n          [65, 38, 105, 160, 51, 52, 31, 115, 128],\n          [104, 79, 12, 27, 217, 255, 87, 17, 7],\n          [87, 68, 71, 44, 114, 51, 15, 186, 23],\n          [47, 41, 14, 110, 182, 183, 21, 17, 194],\n          [66, 45, 25, 102, 197, 189, 23, 18, 22]\n        ],\n        [\n          [88, 88, 147, 150, 42, 46, 45, 196, 205],\n          [43, 97, 183, 117, 85, 38, 35, 179, 61],\n          [39, 53, 200, 87, 26, 21, 43, 232, 171],\n          [56, 34, 51, 104, 114, 102, 29, 93, 77],\n          [39, 28, 85, 171, 58, 165, 90, 98, 64],\n          [34, 22, 116, 206, 23, 34, 43, 166, 73],\n          [107, 54, 32, 26, 51, 1, 81, 43, 31],\n          [68, 25, 106, 22, 64, 171, 36, 225, 114],\n          [34, 19, 21, 102, 132, 188, 16, 76, 124],\n          [62, 18, 78, 95, 85, 57, 50, 48, 51]\n        ],\n        [\n          [193, 101, 35, 159, 215, 111, 89, 46, 111],\n          [60, 148, 31, 172, 219, 228, 21, 18, 111],\n          [112, 113, 77, 85, 179, 255, 38, 120, 114],\n          [40, 42, 1, 196, 245, 209, 10, 25, 109],\n          [88, 43, 29, 140, 166, 213, 37, 43, 154],\n          [61, 63, 30, 155, 67, 45, 68, 1, 209],\n          [100, 80, 8, 43, 154, 1, 51, 26, 71],\n          [142, 78, 78, 16, 255, 128, 34, 197, 171],\n          [41, 40, 5, 102, 211, 183, 4, 1, 221],\n          [51, 50, 17, 168, 209, 192, 23, 25, 82]\n        ],\n        [\n          [138, 31, 36, 171, 27, 166, 38, 44, 229],\n          [67, 87, 58, 169, 82, 115, 26, 59, 179],\n          [63, 59, 90, 180, 59, 166, 93, 73, 154],\n          [40, 40, 21, 116, 143, 209, 34, 39, 175],\n          [47, 15, 16, 183, 34, 223, 49, 45, 183],\n          [46, 17, 33, 183, 6, 98, 15, 32, 183],\n          [57, 46, 22, 24, 128, 1, 54, 17, 37],\n          [65, 32, 73, 115, 28, 128, 23, 128, 205],\n          [40, 3, 9, 115, 51, 192, 18, 6, 223],\n          [87, 37, 9, 115, 59, 77, 64, 21, 47]\n        ],\n        [\n          [104, 55, 44, 218, 9, 54, 53, 130, 226],\n          [64, 90, 70, 205, 40, 41, 23, 26, 57],\n          [54, 57, 112, 184, 5, 41, 38, 166, 213],\n          [30, 34, 26, 133, 152, 116, 10, 32, 134],\n          [39, 19, 53, 221, 26, 114, 32, 73, 255],\n          [31, 9, 65, 234, 2, 15, 1, 118, 73],\n          [75, 32, 12, 51, 192, 255, 160, 43, 51],\n          [88, 31, 35, 67, 102, 85, 55, 186, 85],\n          [56, 21, 23, 111, 59, 205, 45, 37, 192],\n          [55, 38, 70, 124, 73, 102, 1, 34, 98]\n        ],\n        [\n          [125, 98, 42, 88, 104, 85, 117, 175, 82],\n          [95, 84, 53, 89, 128, 100, 113, 101, 45],\n          [75, 79, 123, 47, 51, 128, 81, 171, 1],\n          [57, 17, 5, 71, 102, 57, 53, 41, 49],\n          [38, 33, 13, 121, 57, 73, 26, 1, 85],\n          [41, 10, 67, 138, 77, 110, 90, 47, 114],\n          [115, 21, 2, 10, 102, 255, 166, 23, 6],\n          [101, 29, 16, 10, 85, 128, 101, 196, 26],\n          [57, 18, 10, 102, 102, 213, 34, 20, 43],\n          [117, 20, 15, 36, 163, 128, 68, 1, 26]\n        ],\n        [\n          [102, 61, 71, 37, 34, 53, 31, 243, 192],\n          [69, 60, 71, 38, 73, 119, 28, 222, 37],\n          [68, 45, 128, 34, 1, 47, 11, 245, 171],\n          [62, 17, 19, 70, 146, 85, 55, 62, 70],\n          [37, 43, 37, 154, 100, 163, 85, 160, 1],\n          [63, 9, 92, 136, 28, 64, 32, 201, 85],\n          [75, 15, 9, 9, 64, 255, 184, 119, 16],\n          [86, 6, 28, 5, 64, 255, 25, 248, 1],\n          [56, 8, 17, 132, 137, 255, 55, 116, 128],\n          [58, 15, 20, 82, 135, 57, 26, 121, 40]\n        ],\n        [\n          [164, 50, 31, 137, 154, 133, 25, 35, 218],\n          [51, 103, 44, 131, 131, 123, 31, 6, 158],\n          [86, 40, 64, 135, 148, 224, 45, 183, 128],\n          [22, 26, 17, 131, 240, 154, 14, 1, 209],\n          [45, 16, 21, 91, 64, 222, 7, 1, 197],\n          [56, 21, 39, 155, 60, 138, 23, 102, 213],\n          [83, 12, 13, 54, 192, 255, 68, 47, 28],\n          [85, 26, 85, 85, 128, 128, 32, 146, 171],\n          [18, 11, 7, 63, 144, 171, 4, 4, 246],\n          [35, 27, 10, 146, 174, 171, 12, 26, 128]\n        ],\n        [\n          [190, 80, 35, 99, 180, 80, 126, 54, 45],\n          [85, 126, 47, 87, 176, 51, 41, 20, 32],\n          [101, 75, 128, 139, 118, 146, 116, 128, 85],\n          [56, 41, 15, 176, 236, 85, 37, 9, 62],\n          [71, 30, 17, 119, 118, 255, 17, 18, 138],\n          [101, 38, 60, 138, 55, 70, 43, 26, 142],\n          [146, 36, 19, 30, 171, 255, 97, 27, 20],\n          [138, 45, 61, 62, 219, 1, 81, 188, 64],\n          [32, 41, 20, 117, 151, 142, 20, 21, 163],\n          [112, 19, 12, 61, 195, 128, 48, 4, 24]\n        ]\n      ],\n      Ee = [\n        [\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [176, 246, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 241, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 244, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 246, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [239, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 254, 255, 255, 255, 255, 255, 255],\n            [250, 255, 254, 255, 254, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [217, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [225, 252, 241, 253, 255, 255, 254, 255, 255, 255, 255],\n            [234, 250, 241, 250, 253, 255, 253, 254, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [223, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [238, 253, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 248, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [247, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [186, 251, 250, 255, 255, 255, 255, 255, 255, 255, 255],\n            [234, 251, 244, 254, 255, 255, 255, 255, 255, 255, 255],\n            [251, 251, 243, 253, 254, 255, 254, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [236, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [251, 253, 253, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ],\n        [\n          [\n            [248, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 254, 252, 254, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 249, 253, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [246, 253, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 254, 251, 254, 254, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 254, 252, 255, 255, 255, 255, 255, 255, 255, 255],\n            [248, 254, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 255, 254, 254, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [245, 251, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [253, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 251, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [252, 253, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 254, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 252, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [249, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 254, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 253, 255, 255, 255, 255, 255, 255, 255, 255],\n            [250, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ],\n          [\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [254, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255],\n            [255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]\n          ]\n        ]\n      ],\n      Ge = [0, 1, 2, 3, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 0],\n      Nc,\n      Y = [],\n      W = [],\n      ka = [],\n      Za,\n      fd,\n      Nb,\n      pa,\n      Ob,\n      Xc,\n      Tc,\n      Yc,\n      Uc,\n      Zc,\n      Vc,\n      $c,\n      Wc,\n      Rc,\n      Pc,\n      Sc,\n      Qc,\n      re = 1,\n      Cc = 2,\n      ia = [],\n      za,\n      vc,\n      fc,\n      Fc,\n      P = [];\n    va(\"UpsampleRgbLinePair\", Ga, 3);\n    va(\"UpsampleBgrLinePair\", Tb, 3);\n    va(\"UpsampleRgbaLinePair\", wd, 4);\n    va(\"UpsampleBgraLinePair\", vd, 4);\n    va(\"UpsampleArgbLinePair\", ud, 4);\n    va(\"UpsampleRgba4444LinePair\", td, 2);\n    va(\"UpsampleRgb565LinePair\", sd, 2);\n    var Mf = self.UpsampleRgbLinePair,\n      Nf = self.UpsampleBgrLinePair,\n      nd = self.UpsampleRgbaLinePair,\n      od = self.UpsampleBgraLinePair,\n      pd = self.UpsampleArgbLinePair,\n      qd = self.UpsampleRgba4444LinePair,\n      Of = self.UpsampleRgb565LinePair,\n      Wa = 16,\n      Ba = 1 << (Wa - 1),\n      ta = -227,\n      Eb = 482,\n      rd = 6,\n      Pf = (256 << rd) - 1,\n      jc = 0,\n      Yd = V(256),\n      ae = V(256),\n      $d = V(256),\n      Zd = V(256),\n      be = V(Eb - ta),\n      ce = V(Eb - ta);\n    la(\"YuvToRgbRow\", Ga, 3);\n    la(\"YuvToBgrRow\", Tb, 3);\n    la(\"YuvToRgbaRow\", wd, 4);\n    la(\"YuvToBgraRow\", vd, 4);\n    la(\"YuvToArgbRow\", ud, 4);\n    la(\"YuvToRgba4444Row\", td, 2);\n    la(\"YuvToRgb565Row\", sd, 2);\n    var zd = [\n        0,\n        4,\n        8,\n        12,\n        128,\n        132,\n        136,\n        140,\n        256,\n        260,\n        264,\n        268,\n        384,\n        388,\n        392,\n        396\n      ],\n      Ya = [0, 2, 8],\n      Qf = [8, 7, 6, 4, 4, 2, 2, 2, 1, 1, 1, 1],\n      Ne = 1;\n    this.WebPDecodeRGBA = function(a, b, c, d, e) {\n      var f = Ua;\n      var g = new Cf(),\n        h = new Cb();\n      g.ba = h;\n      h.S = f;\n      h.width = [h.width];\n      h.height = [h.height];\n      var k = h.width;\n      var l = h.height,\n        m = new Td();\n      if (null == m || null == a) var n = 2;\n      else\n        x(null != m),\n          (n = Ad(a, b, c, m.width, m.height, m.Pd, m.Qd, m.format, null));\n      0 != n\n        ? (k = 0)\n        : (null != k && (k[0] = m.width[0]),\n          null != l && (l[0] = m.height[0]),\n          (k = 1));\n      if (k) {\n        h.width = h.width[0];\n        h.height = h.height[0];\n        null != d && (d[0] = h.width);\n        null != e && (e[0] = h.height);\n        b: {\n          d = new Oa();\n          e = new md();\n          e.data = a;\n          e.w = b;\n          e.ha = c;\n          e.kd = 1;\n          b = [0];\n          x(null != e);\n          a = Ad(e.data, e.w, e.ha, null, null, null, b, null, e);\n          (0 == a || 7 == a) && b[0] && (a = 4);\n          b = a;\n          if (0 == b) {\n            x(null != g);\n            d.data = e.data;\n            d.w = e.w + e.offset;\n            d.ha = e.ha - e.offset;\n            d.put = kc;\n            d.ac = gc;\n            d.bc = lc;\n            d.ma = g;\n            if (e.xa) {\n              a = Bc();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              if (te(a, d)) {\n                b = Cd(d.width, d.height, g.Oa, g.ba);\n                if ((d = 0 == b)) {\n                  c: {\n                    d = a;\n                    d: for (;;) {\n                      if (null == d) {\n                        d = 0;\n                        break c;\n                      }\n                      x(null != d.s.yc);\n                      x(null != d.s.Ya);\n                      x(0 < d.s.Wb);\n                      c = d.l;\n                      x(null != c);\n                      e = c.ma;\n                      x(null != e);\n                      if (0 != d.xb) {\n                        d.ca = e.ba;\n                        d.tb = e.tb;\n                        x(null != d.ca);\n                        if (!hc(e.Oa, c, Va)) {\n                          d.a = 2;\n                          break d;\n                        }\n                        if (!Ec(d, c.width)) break d;\n                        if (c.da) break d;\n                        (c.da || hb(d.ca.S)) && Aa();\n                        11 > d.ca.S ||\n                          (alert(\"todo:WebPInitConvertARGBToYUV\"),\n                          null != d.ca.f.kb.F && Aa());\n                        if (\n                          d.Pb &&\n                          0 < d.s.ua &&\n                          null == d.s.vb.X &&\n                          !Zb(d.s.vb, d.s.Wa.Xa)\n                        ) {\n                          d.a = 1;\n                          break d;\n                        }\n                        d.xb = 0;\n                      }\n                      if (!Jb(d, d.V, d.Ba, d.c, d.i, c.o, ge)) break d;\n                      e.Dc = d.Ma;\n                      d = 1;\n                      break c;\n                    }\n                    x(0 != d.a);\n                    d = 0;\n                  }\n                  d = !d;\n                }\n                d && (b = a.a);\n              } else b = a.a;\n            } else {\n              a = new Ce();\n              if (null == a) {\n                g = 1;\n                break b;\n              }\n              a.Fa = e.na;\n              a.P = e.P;\n              a.qc = e.Sa;\n              if (Kc(a, d)) {\n                if (((b = Cd(d.width, d.height, g.Oa, g.ba)), 0 == b)) {\n                  a.Aa = 0;\n                  c = g.Oa;\n                  e = a;\n                  x(null != e);\n                  if (null != c) {\n                    k = c.Md;\n                    k = 0 > k ? 0 : 100 < k ? 255 : (255 * k) / 100;\n                    if (0 < k) {\n                      for (l = m = 0; 4 > l; ++l)\n                        (n = e.pb[l]),\n                          12 > n.lc &&\n                            (n.ia = (k * Qf[0 > n.lc ? 0 : n.lc]) >> 3),\n                          (m |= n.ia);\n                      m && (alert(\"todo:VP8InitRandom\"), (e.ia = 1));\n                    }\n                    e.Ga = c.Id;\n                    100 < e.Ga ? (e.Ga = 100) : 0 > e.Ga && (e.Ga = 0);\n                  }\n                  Me(a, d) || (b = a.a);\n                }\n              } else b = a.a;\n            }\n            0 == b && null != g.Oa && g.Oa.fd && (b = Bd(g.ba));\n          }\n          g = b;\n        }\n        f = 0 != g ? null : 11 > f ? h.f.RGBA.eb : h.f.kb.y;\n      } else f = null;\n      return f;\n    };\n    var Dd = [3, 4, 3, 4, 4, 2, 2, 4, 4, 4, 2, 1, 1];\n  };\n  new _WebPDecoder();\n\n  /** @license\n   * Copyright (c) 2017 Dominik Homberger\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nhttps://webpjs.appspot.com\nWebPRiffParser dominikhlbg@gmail.com\n*/\n\n  function memcmp(data, data_off, str, size) {\n    for (var i = 0; i < size; i++)\n      if (data[data_off + i] != str.charCodeAt(i)) return true;\n    return false;\n  }\n\n  function GetTag(data, data_off) {\n    var str = \"\";\n    for (var i = 0; i < 4; i++) str += String.fromCharCode(data[data_off++]);\n    return str;\n  }\n\n  function GetLE16(data, data_off) {\n    return (data[data_off + 0] << 0) | (data[data_off + 1] << 8);\n  }\n\n  function GetLE24(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16)) >>>\n      0\n    );\n  }\n\n  function GetLE32(data, data_off) {\n    return (\n      ((data[data_off + 0] << 0) |\n        (data[data_off + 1] << 8) |\n        (data[data_off + 2] << 16) |\n        (data[data_off + 3] << 24)) >>>\n      0\n    );\n  }\n\n  function WebPRiffParser(src, src_off) {\n    var imagearray = {};\n    var i = 0;\n    var alpha_chunk = false;\n    var alpha_size = 0;\n    var alpha_offset = 0;\n    imagearray[\"frames\"] = [];\n    if (memcmp(src, src_off, \"RIFF\", 4)) return;\n    src_off += 4;\n    var riff_size = GetLE32(src, src_off) + 8;\n    src_off += 8;\n\n    while (src_off < src.length) {\n      var fourcc = GetTag(src, src_off);\n      src_off += 4;\n\n      var payload_size = GetLE32(src, src_off);\n      src_off += 4;\n      var payload_size_padded = payload_size + (payload_size & 1);\n\n      switch (fourcc) {\n        case \"VP8 \":\n        case \"VP8L\":\n          if (typeof imagearray[\"frames\"][i] === \"undefined\")\n            imagearray[\"frames\"][i] = {};\n          var obj = imagearray[\"frames\"][i];\n          var height = [0];\n          var width = [0];\n          obj[\"src_off\"] = alpha_chunk ? alpha_offset : src_off - 8;\n          obj[\"src_size\"] = alpha_size + payload_size + 8;\n          //var rgba = webpdecoder.WebPDecodeRGBA(src,(alpha_chunk?alpha_offset:src_off-8),alpha_size+payload_size+8,width,height);\n          //imagearray[i]={'rgba':rgba,'width':width[0],'height':height[0]};\n          i++;\n          if (alpha_chunk) {\n            alpha_chunk = false;\n            alpha_size = 0;\n            alpha_offset = 0;\n          }\n          break;\n        case \"VP8X\":\n          var obj = (imagearray[\"header\"] = {});\n          var feature_flags = (obj[\"feature_flags\"] = src[src_off]);\n          var src_off_ = src_off + 4;\n          var canvas_width = (obj[\"canvas_width\"] = 1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          var canvas_height = (obj[\"canvas_height\"] =\n            1 + GetLE24(src, src_off_));\n          src_off_ += 3;\n          break;\n        case \"ALPH\":\n          alpha_chunk = true;\n          alpha_size = payload_size_padded + 8;\n          alpha_offset = src_off - 8;\n          break;\n\n        case \"ANIM\":\n          var obj = imagearray[\"header\"];\n          var bgcolor = (obj[\"bgcolor\"] = GetLE32(src, src_off));\n          src_off_ = src_off + 4;\n\n          var loop_count = (obj[\"loop_count\"] = GetLE16(src, src_off_));\n          src_off_ += 2;\n          break;\n        case \"ANMF\":\n          var offset_x = 0,\n            offset_y = 0,\n            width = 0,\n            height = 0,\n            duration = 0,\n            blend = 0,\n            dispose = 0,\n            temp = 0;\n          var obj = (imagearray[\"frames\"][i] = {});\n          obj[\"offset_x\"] = offset_x = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"offset_y\"] = offset_y = 2 * GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"width\"] = width = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"height\"] = height = 1 + GetLE24(src, src_off);\n          src_off += 3;\n          obj[\"duration\"] = duration = GetLE24(src, src_off);\n          src_off += 3;\n          temp = src[src_off++];\n          obj[\"dispose\"] = dispose = temp & 1;\n          obj[\"blend\"] = blend = (temp >> 1) & 1;\n          break;\n        default:\n      }\n      if (fourcc != \"ANMF\") src_off += payload_size_padded;\n    }\n    return imagearray;\n  }\n\n  var height = [0];\n  var width = [0];\n  var pixels = [];\n  var webpdecoder = new _WebPDecoder();\n\n  var response = imageData;\n  var imagearray = WebPRiffParser(response, 0);\n  imagearray[\"response\"] = response;\n  imagearray[\"rgbaoutput\"] = true;\n  imagearray[\"dataurl\"] = false;\n\n  var header = imagearray[\"header\"] ? imagearray[\"header\"] : null;\n  var frames = imagearray[\"frames\"] ? imagearray[\"frames\"] : null;\n\n  if (header) {\n    header[\"loop_counter\"] = header[\"loop_count\"];\n    height = [header[\"canvas_height\"]];\n    width = [header[\"canvas_width\"]];\n\n    var blend = false;\n    for (var f = 0; f < frames.length; f++)\n      if (frames[f][\"blend\"] == 0) {\n        blend = true;\n        break;\n      }\n  }\n\n  var frame = frames[0];\n  var rgba = webpdecoder.WebPDecodeRGBA(\n    response,\n    frame[\"src_off\"],\n    frame[\"src_size\"],\n    width,\n    height\n  );\n  frame[\"rgba\"] = rgba;\n  frame[\"imgwidth\"] = width[0];\n  frame[\"imgheight\"] = height[0];\n\n  for (var i = 0; i < width[0] * height[0] * 4; i++) {\n    pixels[i] = rgba[i];\n  }\n\n  this.width = width;\n  this.height = height;\n  this.data = pixels;\n  return this;\n}\n\nWebPDecoder.prototype.getData = function() {\n  return this.data;\n};\n\nexport { WebPDecoder };\n","/**\n * @license\n *\n * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { zlibSync } from \"../libs/fflate.js\";\nimport { PNG } from \"../libs/png.js\";\n\n/**\n * jsPDF PNG PlugIn\n * @name png_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /*\n   * @see http://www.w3.org/TR/PNG-Chunks.html\n   *\n   Color    Allowed      Interpretation\n   Type     Bit Depths\n\n     0       1,2,4,8,16  Each pixel is a grayscale sample.\n\n     2       8,16        Each pixel is an R,G,B triple.\n\n     3       1,2,4,8     Each pixel is a palette index;\n                         a PLTE chunk must appear.\n\n     4       8,16        Each pixel is a grayscale sample,\n                         followed by an alpha sample.\n\n     6       8,16        Each pixel is an R,G,B triple,\n                         followed by an alpha sample.\n  */\n\n  /*\n   * PNG filter method types\n   *\n   * @see http://www.w3.org/TR/PNG-Filters.html\n   * @see http://www.libpng.org/pub/png/book/chapter09.html\n   *\n   * This is what the value 'Predictor' in decode params relates to\n   *\n   * 15 is \"optimal prediction\", which means the prediction algorithm can change from line to line.\n   * In that case, you actually have to read the first byte off each line for the prediction algorthim (which should be 0-4, corresponding to PDF 10-14) and select the appropriate unprediction algorithm based on that byte.\n   *\n     0       None\n     1       Sub\n     2       Up\n     3       Average\n     4       Paeth\n   */\n\n  var canCompress = function(value) {\n    return value !== jsPDFAPI.image_compression.NONE && hasCompressionJS();\n  };\n\n  var hasCompressionJS = function() {\n    return typeof zlibSync === \"function\";\n  };\n  var compressBytes = function(bytes, lineLength, colorsPerPixel, compression) {\n    var level = 4;\n    var filter_method = filterUp;\n\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        level = 1;\n        filter_method = filterSub;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        level = 6;\n        filter_method = filterAverage;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        level = 9;\n        filter_method = filterPaeth;\n        break;\n    }\n\n    bytes = applyPngFilterMethod(\n      bytes,\n      lineLength,\n      colorsPerPixel,\n      filter_method\n    );\n    var dat = zlibSync(bytes, { level: level });\n    return jsPDFAPI.__addimage__.arrayBufferToBinaryString(dat);\n  };\n\n  var applyPngFilterMethod = function(\n    bytes,\n    lineLength,\n    colorsPerPixel,\n    filter_method\n  ) {\n    var lines = bytes.length / lineLength,\n      result = new Uint8Array(bytes.length + lines),\n      filter_methods = getFilterMethods(),\n      line,\n      prevLine,\n      offset;\n\n    for (var i = 0; i < lines; i += 1) {\n      offset = i * lineLength;\n      line = bytes.subarray(offset, offset + lineLength);\n\n      if (filter_method) {\n        result.set(filter_method(line, colorsPerPixel, prevLine), offset + i);\n      } else {\n        var len = filter_methods.length,\n          results = [];\n\n        for (var j; j < len; j += 1) {\n          results[j] = filter_methods[j](line, colorsPerPixel, prevLine);\n        }\n\n        var ind = getIndexOfSmallestSum(results.concat());\n\n        result.set(results[ind], offset + i);\n      }\n\n      prevLine = line;\n    }\n\n    return result;\n  };\n\n  var filterNone = function(line) {\n    /*var result = new Uint8Array(line.length + 1);\n    result[0] = 0;\n    result.set(line, 1);*/\n\n    var result = Array.apply([], line);\n    result.unshift(0);\n\n    return result;\n  };\n\n  var filterSub = function(line, colorsPerPixel) {\n    var result = [],\n      len = line.length,\n      left;\n\n    result[0] = 1;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      result[i + 1] = (line[i] - left + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterUp = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      up;\n\n    result[0] = 2;\n\n    for (var i = 0; i < len; i += 1) {\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] - up + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterAverage = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up;\n\n    result[0] = 3;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      result[i + 1] = (line[i] + 0x0100 - ((left + up) >>> 1)) & 0xff;\n    }\n\n    return result;\n  };\n\n  var filterPaeth = function(line, colorsPerPixel, prevLine) {\n    var result = [],\n      len = line.length,\n      left,\n      up,\n      upLeft,\n      paeth;\n\n    result[0] = 4;\n\n    for (var i = 0; i < len; i += 1) {\n      left = line[i - colorsPerPixel] || 0;\n      up = (prevLine && prevLine[i]) || 0;\n      upLeft = (prevLine && prevLine[i - colorsPerPixel]) || 0;\n      paeth = paethPredictor(left, up, upLeft);\n      result[i + 1] = (line[i] - paeth + 0x0100) & 0xff;\n    }\n\n    return result;\n  };\n\n  var paethPredictor = function(left, up, upLeft) {\n    if (left === up && up === upLeft) {\n      return left;\n    }\n    var pLeft = Math.abs(up - upLeft),\n      pUp = Math.abs(left - upLeft),\n      pUpLeft = Math.abs(left + up - upLeft - upLeft);\n    return pLeft <= pUp && pLeft <= pUpLeft\n      ? left\n      : pUp <= pUpLeft\n      ? up\n      : upLeft;\n  };\n\n  var getFilterMethods = function() {\n    return [filterNone, filterSub, filterUp, filterAverage, filterPaeth];\n  };\n\n  var getIndexOfSmallestSum = function(arrays) {\n    var sum = arrays.map(function(value) {\n      return value.reduce(function(pv, cv) {\n        return pv + Math.abs(cv);\n      }, 0);\n    });\n    return sum.indexOf(Math.min.apply(null, sum));\n  };\n\n  var getPredictorFromCompression = function(compression) {\n    var predictor;\n    switch (compression) {\n      case jsPDFAPI.image_compression.FAST:\n        predictor = 11;\n        break;\n\n      case jsPDFAPI.image_compression.MEDIUM:\n        predictor = 13;\n        break;\n\n      case jsPDFAPI.image_compression.SLOW:\n        predictor = 14;\n        break;\n\n      default:\n        predictor = 12;\n        break;\n    }\n    return predictor;\n  };\n\n  /**\n   * @name processPNG\n   * @function\n   * @ignore\n   */\n  jsPDFAPI.processPNG = function(imageData, index, alias, compression) {\n    \"use strict\";\n\n    var colorSpace,\n      filter = this.decode.FLATE_DECODE,\n      bitsPerComponent,\n      image,\n      decodeParameters = \"\",\n      trns,\n      colors,\n      pal,\n      smask,\n      pixels,\n      len,\n      alphaData,\n      imgData,\n      hasColors,\n      pixel,\n      i,\n      n;\n\n    if (this.__addimage__.isArrayBuffer(imageData))\n      imageData = new Uint8Array(imageData);\n\n    if (this.__addimage__.isArrayBufferView(imageData)) {\n      image = new PNG(imageData);\n      imageData = image.imgData;\n      bitsPerComponent = image.bits;\n      colorSpace = image.colorSpace;\n      colors = image.colors;\n\n      /*\n       * colorType 6 - Each pixel is an R,G,B triple, followed by an alpha sample.\n       *\n       * colorType 4 - Each pixel is a grayscale sample, followed by an alpha sample.\n       *\n       * Extract alpha to create two separate images, using the alpha as a sMask\n       */\n      if ([4, 6].indexOf(image.colorType) !== -1) {\n        /*\n         * processes 8 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 8) {\n          pixels =\n            image.pixelBitlength == 32\n              ? new Uint32Array(image.decodePixels().buffer)\n              : image.pixelBitlength == 16\n              ? new Uint16Array(image.decodePixels().buffer)\n              : new Uint8Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(len * image.colors);\n          alphaData = new Uint8Array(len);\n          var pDiff = image.pixelBitlength - image.bits;\n          i = 0;\n          n = 0;\n          var pbl;\n\n          for (; i < len; i++) {\n            pixel = pixels[i];\n            pbl = 0;\n\n            while (pbl < pDiff) {\n              imgData[n++] = (pixel >>> pbl) & 0xff;\n              pbl = pbl + image.bits;\n            }\n\n            alphaData[i] = (pixel >>> pbl) & 0xff;\n          }\n        }\n\n        /*\n         * processes 16 bit RGBA and grayscale + alpha images\n         */\n        if (image.bits === 16) {\n          pixels = new Uint32Array(image.decodePixels().buffer);\n          len = pixels.length;\n          imgData = new Uint8Array(\n            len * (32 / image.pixelBitlength) * image.colors\n          );\n          alphaData = new Uint8Array(len * (32 / image.pixelBitlength));\n          hasColors = image.colors > 1;\n          i = 0;\n          n = 0;\n          var a = 0;\n\n          while (i < len) {\n            pixel = pixels[i++];\n\n            imgData[n++] = (pixel >>> 0) & 0xff;\n\n            if (hasColors) {\n              imgData[n++] = (pixel >>> 16) & 0xff;\n\n              pixel = pixels[i++];\n              imgData[n++] = (pixel >>> 0) & 0xff;\n            }\n\n            alphaData[a++] = (pixel >>> 16) & 0xff;\n          }\n          bitsPerComponent = 8;\n        }\n\n        if (canCompress(compression)) {\n          imageData = compressBytes(\n            imgData,\n            image.width * image.colors,\n            image.colors,\n            compression\n          );\n          smask = compressBytes(alphaData, image.width, 1, compression);\n        } else {\n          imageData = imgData;\n          smask = alphaData;\n          filter = undefined;\n        }\n      }\n\n      /*\n       * Indexed png. Each pixel is a palette index.\n       */\n      if (image.colorType === 3) {\n        colorSpace = this.color_spaces.INDEXED;\n        pal = image.palette;\n\n        if (image.transparency.indexed) {\n          var trans = image.transparency.indexed;\n          var total = 0;\n          i = 0;\n          len = trans.length;\n\n          for (; i < len; ++i) {\n            total += trans[i];\n          }\n\n          total = total / 255;\n\n          /*\n           * a single color is specified as 100% transparent (0),\n           * so we set trns to use a /Mask with that index\n           */\n          if (total === len - 1 && trans.indexOf(0) !== -1) {\n            trns = [trans.indexOf(0)];\n\n            /*\n             * there's more than one colour within the palette that specifies\n             * a transparency value less than 255, so we unroll the pixels to create an image sMask\n             */\n          } else if (total !== len) {\n            pixels = image.decodePixels();\n            alphaData = new Uint8Array(pixels.length);\n            i = 0;\n            len = pixels.length;\n\n            for (; i < len; i++) {\n              alphaData[i] = trans[pixels[i]];\n            }\n\n            smask = compressBytes(alphaData, image.width, 1);\n          }\n        }\n      }\n\n      var predictor = getPredictorFromCompression(compression);\n\n      if (filter === this.decode.FLATE_DECODE) {\n        decodeParameters = \"/Predictor \" + predictor + \" \";\n      }\n      decodeParameters +=\n        \"/Colors \" +\n        colors +\n        \" /BitsPerComponent \" +\n        bitsPerComponent +\n        \" /Columns \" +\n        image.width;\n\n      if (\n        this.__addimage__.isArrayBuffer(imageData) ||\n        this.__addimage__.isArrayBufferView(imageData)\n      ) {\n        imageData = this.__addimage__.arrayBufferToBinaryString(imageData);\n      }\n\n      if (\n        (smask && this.__addimage__.isArrayBuffer(smask)) ||\n        this.__addimage__.isArrayBufferView(smask)\n      ) {\n        smask = this.__addimage__.arrayBufferToBinaryString(smask);\n      }\n\n      return {\n        alias: alias,\n        data: imageData,\n        index: index,\n        filter: filter,\n        decodeParameters: decodeParameters,\n        transparency: trns,\n        palette: pal,\n        sMask: smask,\n        predictor: predictor,\n        width: image.width,\n        height: image.height,\n        bitsPerComponent: bitsPerComponent,\n        colorSpace: colorSpace\n      };\n    }\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2017 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { GifReader } from \"../libs/omggif.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\n\n/**\n * jsPDF Gif Support PlugIn\n *\n * @name gif_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processGIF89A = function(imageData, index, alias, compression) {\n    var reader = new GifReader(imageData);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = [];\n\n    reader.decodeAndBlitFrameRGBA(0, pixels);\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n\n  jsPDFAPI.processGIF87A = jsPDFAPI.processGIF89A;\n})(jsPDF.API);\n","import { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { BmpDecoder } from \"../libs/BMPDecoder.js\";\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @license\n * Copyright (c) 2018 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\n/**\n * jsPDF bmp Support PlugIn\n * @name bmp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processBMP = function(imageData, index, alias, compression) {\n    var reader = new BmpDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Copyright (c) 2019 Aras Abbasi\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { JPEGEncoder } from \"../libs/JPEGEncoder.js\";\nimport { WebPDecoder } from \"../libs/WebPDecoder.js\";\n\n/**\n * jsPDF webp Support PlugIn\n *\n * @name webp_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  jsPDFAPI.processWEBP = function(imageData, index, alias, compression) {\n    var reader = new WebPDecoder(imageData, false);\n    var width = reader.width,\n      height = reader.height;\n    var qu = 100;\n    var pixels = reader.getData();\n\n    var rawImageData = {\n      data: pixels,\n      width: width,\n      height: height\n    };\n\n    var encoder = new JPEGEncoder(qu);\n    var data = encoder.encode(rawImageData, qu);\n    return jsPDFAPI.processJPEG.call(this, data, index, alias, compression);\n  };\n})(jsPDF.API);\n","/**\n * @license\n *\n * Copyright (c) 2021 Antti Palola, https://github.com/Pantura\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF RGBA array PlugIn\n * @name rgba_support\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * @name processRGBA\n   * @function\n   *\n   * Process RGBA Array. This is a one-dimension array with pixel data [red, green, blue, alpha, red, green, ...].\n   * RGBA array data can be obtained from DOM canvas getImageData.\n   * @ignore\n   */\n  jsPDFAPI.processRGBA = function(imageData, index, alias) {\n    \"use strict\";\n\n    var imagePixels = imageData.data;\n    var length = imagePixels.length;\n    // jsPDF takes alpha data separately so extract that.\n    var rgbOut = new Uint8Array((length / 4) * 3);\n    var alphaOut = new Uint8Array(length / 4);\n    var outIndex = 0;\n    var alphaIndex = 0;\n\n    for (var i = 0; i < length; i += 4) {\n      var r = imagePixels[i];\n      var g = imagePixels[i + 1];\n      var b = imagePixels[i + 2];\n      var alpha = imagePixels[i + 3];\n      rgbOut[outIndex++] = r;\n      rgbOut[outIndex++] = g;\n      rgbOut[outIndex++] = b;\n      alphaOut[alphaIndex++] = alpha;\n    }\n\n    var rgbData = this.__addimage__.arrayBufferToBinaryString(rgbOut);\n    var alphaData = this.__addimage__.arrayBufferToBinaryString(alphaOut);\n\n    return {\n      alpha: alphaData,\n      data: rgbData,\n      index: index,\n      alias: alias,\n      colorSpace: \"DeviceRGB\",\n      bitsPerComponent: 8,\n      width: imageData.width,\n      height: imageData.height\n    };\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF setLanguage Plugin\n *\n * @name setLanguage\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  /**\n   * Add Language Tag to the generated PDF\n   *\n   * @name setLanguage\n   * @function\n   * @param {string} langCode The Language code as ISO-639-1 (e.g. 'en') or as country language code (e.g. 'en-GB').\n   * @returns {jsPDF}\n   * @example\n   * var doc = new jsPDF()\n   * doc.text(10, 10, 'This is a test')\n   * doc.setLanguage(\"en-US\")\n   * doc.save('english.pdf')\n   */\n  jsPDFAPI.setLanguage = function(langCode) {\n    \"use strict\";\n\n    var langCodes = {\n      af: \"Afrikaans\",\n      sq: \"Albanian\",\n      ar: \"Arabic (Standard)\",\n      \"ar-DZ\": \"Arabic (Algeria)\",\n      \"ar-BH\": \"Arabic (Bahrain)\",\n      \"ar-EG\": \"Arabic (Egypt)\",\n      \"ar-IQ\": \"Arabic (Iraq)\",\n      \"ar-JO\": \"Arabic (Jordan)\",\n      \"ar-KW\": \"Arabic (Kuwait)\",\n      \"ar-LB\": \"Arabic (Lebanon)\",\n      \"ar-LY\": \"Arabic (Libya)\",\n      \"ar-MA\": \"Arabic (Morocco)\",\n      \"ar-OM\": \"Arabic (Oman)\",\n      \"ar-QA\": \"Arabic (Qatar)\",\n      \"ar-SA\": \"Arabic (Saudi Arabia)\",\n      \"ar-SY\": \"Arabic (Syria)\",\n      \"ar-TN\": \"Arabic (Tunisia)\",\n      \"ar-AE\": \"Arabic (U.A.E.)\",\n      \"ar-YE\": \"Arabic (Yemen)\",\n      an: \"Aragonese\",\n      hy: \"Armenian\",\n      as: \"Assamese\",\n      ast: \"Asturian\",\n      az: \"Azerbaijani\",\n      eu: \"Basque\",\n      be: \"Belarusian\",\n      bn: \"Bengali\",\n      bs: \"Bosnian\",\n      br: \"Breton\",\n      bg: \"Bulgarian\",\n      my: \"Burmese\",\n      ca: \"Catalan\",\n      ch: \"Chamorro\",\n      ce: \"Chechen\",\n      zh: \"Chinese\",\n      \"zh-HK\": \"Chinese (Hong Kong)\",\n      \"zh-CN\": \"Chinese (PRC)\",\n      \"zh-SG\": \"Chinese (Singapore)\",\n      \"zh-TW\": \"Chinese (Taiwan)\",\n      cv: \"Chuvash\",\n      co: \"Corsican\",\n      cr: \"Cree\",\n      hr: \"Croatian\",\n      cs: \"Czech\",\n      da: \"Danish\",\n      nl: \"Dutch (Standard)\",\n      \"nl-BE\": \"Dutch (Belgian)\",\n      en: \"English\",\n      \"en-AU\": \"English (Australia)\",\n      \"en-BZ\": \"English (Belize)\",\n      \"en-CA\": \"English (Canada)\",\n      \"en-IE\": \"English (Ireland)\",\n      \"en-JM\": \"English (Jamaica)\",\n      \"en-NZ\": \"English (New Zealand)\",\n      \"en-PH\": \"English (Philippines)\",\n      \"en-ZA\": \"English (South Africa)\",\n      \"en-TT\": \"English (Trinidad & Tobago)\",\n      \"en-GB\": \"English (United Kingdom)\",\n      \"en-US\": \"English (United States)\",\n      \"en-ZW\": \"English (Zimbabwe)\",\n      eo: \"Esperanto\",\n      et: \"Estonian\",\n      fo: \"Faeroese\",\n      fj: \"Fijian\",\n      fi: \"Finnish\",\n      fr: \"French (Standard)\",\n      \"fr-BE\": \"French (Belgium)\",\n      \"fr-CA\": \"French (Canada)\",\n      \"fr-FR\": \"French (France)\",\n      \"fr-LU\": \"French (Luxembourg)\",\n      \"fr-MC\": \"French (Monaco)\",\n      \"fr-CH\": \"French (Switzerland)\",\n      fy: \"Frisian\",\n      fur: \"Friulian\",\n      gd: \"Gaelic (Scots)\",\n      \"gd-IE\": \"Gaelic (Irish)\",\n      gl: \"Galacian\",\n      ka: \"Georgian\",\n      de: \"German (Standard)\",\n      \"de-AT\": \"German (Austria)\",\n      \"de-DE\": \"German (Germany)\",\n      \"de-LI\": \"German (Liechtenstein)\",\n      \"de-LU\": \"German (Luxembourg)\",\n      \"de-CH\": \"German (Switzerland)\",\n      el: \"Greek\",\n      gu: \"Gujurati\",\n      ht: \"Haitian\",\n      he: \"Hebrew\",\n      hi: \"Hindi\",\n      hu: \"Hungarian\",\n      is: \"Icelandic\",\n      id: \"Indonesian\",\n      iu: \"Inuktitut\",\n      ga: \"Irish\",\n      it: \"Italian (Standard)\",\n      \"it-CH\": \"Italian (Switzerland)\",\n      ja: \"Japanese\",\n      kn: \"Kannada\",\n      ks: \"Kashmiri\",\n      kk: \"Kazakh\",\n      km: \"Khmer\",\n      ky: \"Kirghiz\",\n      tlh: \"Klingon\",\n      ko: \"Korean\",\n      \"ko-KP\": \"Korean (North Korea)\",\n      \"ko-KR\": \"Korean (South Korea)\",\n      la: \"Latin\",\n      lv: \"Latvian\",\n      lt: \"Lithuanian\",\n      lb: \"Luxembourgish\",\n      mk: \"North Macedonia\",\n      ms: \"Malay\",\n      ml: \"Malayalam\",\n      mt: \"Maltese\",\n      mi: \"Maori\",\n      mr: \"Marathi\",\n      mo: \"Moldavian\",\n      nv: \"Navajo\",\n      ng: \"Ndonga\",\n      ne: \"Nepali\",\n      no: \"Norwegian\",\n      nb: \"Norwegian (Bokmal)\",\n      nn: \"Norwegian (Nynorsk)\",\n      oc: \"Occitan\",\n      or: \"Oriya\",\n      om: \"Oromo\",\n      fa: \"Persian\",\n      \"fa-IR\": \"Persian/Iran\",\n      pl: \"Polish\",\n      pt: \"Portuguese\",\n      \"pt-BR\": \"Portuguese (Brazil)\",\n      pa: \"Punjabi\",\n      \"pa-IN\": \"Punjabi (India)\",\n      \"pa-PK\": \"Punjabi (Pakistan)\",\n      qu: \"Quechua\",\n      rm: \"Rhaeto-Romanic\",\n      ro: \"Romanian\",\n      \"ro-MO\": \"Romanian (Moldavia)\",\n      ru: \"Russian\",\n      \"ru-MO\": \"Russian (Moldavia)\",\n      sz: \"Sami (Lappish)\",\n      sg: \"Sango\",\n      sa: \"Sanskrit\",\n      sc: \"Sardinian\",\n      sd: \"Sindhi\",\n      si: \"Singhalese\",\n      sr: \"Serbian\",\n      sk: \"Slovak\",\n      sl: \"Slovenian\",\n      so: \"Somani\",\n      sb: \"Sorbian\",\n      es: \"Spanish\",\n      \"es-AR\": \"Spanish (Argentina)\",\n      \"es-BO\": \"Spanish (Bolivia)\",\n      \"es-CL\": \"Spanish (Chile)\",\n      \"es-CO\": \"Spanish (Colombia)\",\n      \"es-CR\": \"Spanish (Costa Rica)\",\n      \"es-DO\": \"Spanish (Dominican Republic)\",\n      \"es-EC\": \"Spanish (Ecuador)\",\n      \"es-SV\": \"Spanish (El Salvador)\",\n      \"es-GT\": \"Spanish (Guatemala)\",\n      \"es-HN\": \"Spanish (Honduras)\",\n      \"es-MX\": \"Spanish (Mexico)\",\n      \"es-NI\": \"Spanish (Nicaragua)\",\n      \"es-PA\": \"Spanish (Panama)\",\n      \"es-PY\": \"Spanish (Paraguay)\",\n      \"es-PE\": \"Spanish (Peru)\",\n      \"es-PR\": \"Spanish (Puerto Rico)\",\n      \"es-ES\": \"Spanish (Spain)\",\n      \"es-UY\": \"Spanish (Uruguay)\",\n      \"es-VE\": \"Spanish (Venezuela)\",\n      sx: \"Sutu\",\n      sw: \"Swahili\",\n      sv: \"Swedish\",\n      \"sv-FI\": \"Swedish (Finland)\",\n      \"sv-SV\": \"Swedish (Sweden)\",\n      ta: \"Tamil\",\n      tt: \"Tatar\",\n      te: \"Teluga\",\n      th: \"Thai\",\n      tig: \"Tigre\",\n      ts: \"Tsonga\",\n      tn: \"Tswana\",\n      tr: \"Turkish\",\n      tk: \"Turkmen\",\n      uk: \"Ukrainian\",\n      hsb: \"Upper Sorbian\",\n      ur: \"Urdu\",\n      ve: \"Venda\",\n      vi: \"Vietnamese\",\n      vo: \"Volapuk\",\n      wa: \"Walloon\",\n      cy: \"Welsh\",\n      xh: \"Xhosa\",\n      ji: \"Yiddish\",\n      zu: \"Zulu\"\n    };\n\n    if (this.internal.languageSettings === undefined) {\n      this.internal.languageSettings = {};\n      this.internal.languageSettings.isSubscribed = false;\n    }\n\n    if (langCodes[langCode] !== undefined) {\n      this.internal.languageSettings.languageCode = langCode;\n      if (this.internal.languageSettings.isSubscribed === false) {\n        this.internal.events.subscribe(\"putCatalog\", function() {\n          this.internal.write(\n            \"/Lang (\" + this.internal.languageSettings.languageCode + \")\"\n          );\n        });\n        this.internal.languageSettings.isSubscribed = true;\n      }\n    }\n    return this;\n  };\n})(jsPDF.API);\n","/** @license\n jsPDF standard_fonts_metrics plugin\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n * MIT license.\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n * \n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * This file adds the standard font metrics to jsPDF.\n *\n * Font metrics data is reprocessed derivative of contents of\n * \"Font Metrics for PDF Core 14 Fonts\" package, which exhibits the following copyright and license:\n *\n * Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.\n *\n * This file and the 14 PostScript(R) AFM files it accompanies may be used,\n * copied, and distributed for any purpose and without charge, with or without\n * modification, provided that all copyright notices are retained; that the AFM\n * files are not distributed without this file; that all modifications to this\n * file or any of the AFM files are prominently noted in the modified file(s);\n * and that this paragraph is not modified. Adobe Systems has no responsibility\n * or obligation to support the use of the AFM files.\n *\n * @name standard_fonts_metrics\n * @module\n */\n\n(function(API) {\n  \"use strict\";\n  API.__fontmetrics__ = API.__fontmetrics__ || {};\n\n  var decoded = \"0123456789abcdef\",\n    encoded = \"klmnopqrstuvwxyz\",\n    mappingUncompress = {},\n    mappingCompress = {};\n\n  for (var i = 0; i < encoded.length; i++) {\n    mappingUncompress[encoded[i]] = decoded[i];\n    mappingCompress[decoded[i]] = encoded[i];\n  }\n\n  var hex = function(value) {\n    return \"0x\" + parseInt(value, 10).toString(16);\n  };\n\n  var compress = (API.__fontmetrics__.compress = function(data) {\n    var vals = [\"{\"];\n    var value, keystring, valuestring, numberprefix;\n\n    for (var key in data) {\n      value = data[key];\n\n      if (!isNaN(parseInt(key, 10))) {\n        key = parseInt(key, 10);\n        keystring = hex(key).slice(2);\n        keystring =\n          keystring.slice(0, -1) + mappingCompress[keystring.slice(-1)];\n      } else {\n        keystring = \"'\" + key + \"'\";\n      }\n\n      if (typeof value == \"number\") {\n        if (value < 0) {\n          valuestring = hex(value).slice(3);\n          numberprefix = \"-\";\n        } else {\n          valuestring = hex(value).slice(2);\n          numberprefix = \"\";\n        }\n        valuestring =\n          numberprefix +\n          valuestring.slice(0, -1) +\n          mappingCompress[valuestring.slice(-1)];\n      } else {\n        if (typeof value === \"object\") {\n          valuestring = compress(value);\n        } else {\n          throw new Error(\n            \"Don't know what to do with value type \" + typeof value + \".\"\n          );\n        }\n      }\n      vals.push(keystring + valuestring);\n    }\n    vals.push(\"}\");\n    return vals.join(\"\");\n  });\n\n  /**\n   * Uncompresses data compressed into custom, base16-like format.\n   *\n   * @public\n   * @function\n   * @param\n   * @returns {Type}\n   */\n  var uncompress = (API.__fontmetrics__.uncompress = function(data) {\n    if (typeof data !== \"string\") {\n      throw new Error(\"Invalid argument passed to uncompress.\");\n    }\n\n    var output = {},\n      sign = 1,\n      stringparts, // undef. will be [] in string mode\n      activeobject = output,\n      parentchain = [],\n      parent_key_pair,\n      keyparts = \"\",\n      valueparts = \"\",\n      key, // undef. will be Truthy when Key is resolved.\n      datalen = data.length - 1, // stripping ending }\n      ch;\n\n    for (var i = 1; i < datalen; i += 1) {\n      // - { } ' are special.\n\n      ch = data[i];\n\n      if (ch == \"'\") {\n        if (stringparts) {\n          // end of string mode\n          key = stringparts.join(\"\");\n          stringparts = undefined;\n        } else {\n          // start of string mode\n          stringparts = [];\n        }\n      } else if (stringparts) {\n        stringparts.push(ch);\n      } else if (ch == \"{\") {\n        // start of object\n        parentchain.push([activeobject, key]);\n        activeobject = {};\n        key = undefined;\n      } else if (ch == \"}\") {\n        // end of object\n        parent_key_pair = parentchain.pop();\n        parent_key_pair[0][parent_key_pair[1]] = activeobject;\n        key = undefined;\n        activeobject = parent_key_pair[0];\n      } else if (ch == \"-\") {\n        sign = -1;\n      } else {\n        // must be number\n        if (key === undefined) {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            keyparts += mappingUncompress[ch];\n            key = parseInt(keyparts, 16) * sign;\n            sign = +1;\n            keyparts = \"\";\n          } else {\n            keyparts += ch;\n          }\n        } else {\n          if (mappingUncompress.hasOwnProperty(ch)) {\n            valueparts += mappingUncompress[ch];\n            activeobject[key] = parseInt(valueparts, 16) * sign;\n            sign = +1;\n            key = undefined;\n            valueparts = \"\";\n          } else {\n            valueparts += ch;\n          }\n        }\n      }\n    }\n    return output;\n  });\n\n  // encoding = 'Unicode'\n  // NOT UTF8, NOT UTF16BE/LE, NOT UCS2BE/LE. NO clever BOM behavior\n  // Actual 16bit char codes used.\n  // no multi-byte logic here\n\n  // Unicode characters to WinAnsiEncoding:\n  // {402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240:137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158}\n  // as you can see, all Unicode chars are outside of 0-255 range. No char code conflicts.\n  // this means that you can give Win cp1252 encoded strings to jsPDF for rendering directly\n  // as well as give strings with some (supported by these fonts) Unicode characters and\n  // these will be mapped to win cp1252\n  // for example, you can send char code (cp1252) 0x80 or (unicode) 0x20AC, getting \"Euro\" glyph displayed in both cases.\n\n  var encodingBlock = {\n    codePages: [\"WinAnsiEncoding\"],\n    WinAnsiEncoding: uncompress(\n      \"{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}\"\n    )\n  };\n  var encodings = {\n    Unicode: {\n      Courier: encodingBlock,\n      \"Courier-Bold\": encodingBlock,\n      \"Courier-BoldOblique\": encodingBlock,\n      \"Courier-Oblique\": encodingBlock,\n      Helvetica: encodingBlock,\n      \"Helvetica-Bold\": encodingBlock,\n      \"Helvetica-BoldOblique\": encodingBlock,\n      \"Helvetica-Oblique\": encodingBlock,\n      \"Times-Roman\": encodingBlock,\n      \"Times-Bold\": encodingBlock,\n      \"Times-BoldItalic\": encodingBlock,\n      \"Times-Italic\": encodingBlock\n      //\t, 'Symbol'\n      //\t, 'ZapfDingbats'\n    }\n  };\n\n  var fontMetrics = {\n    Unicode: {\n      // all sizing numbers are n/fontMetricsFractionOf = one font size unit\n      // this means that if fontMetricsFractionOf = 1000, and letter A's width is 476, it's\n      // width is 476/1000 or 47.6% of its height (regardless of font size)\n      // At this time this value applies to \"widths\" and \"kerning\" numbers.\n\n      // char code 0 represents \"default\" (average) width - use it for chars missing in this table.\n      // key 'fof' represents the \"fontMetricsFractionOf\" value\n\n      \"Courier-Oblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-BoldItalic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Courier: uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-BoldOblique\": uncompress(\n        \"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"\n      ),\n      \"Times-Bold\": uncompress(\n        \"{'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}}}\"\n      ),\n      Symbol: uncompress(\n        \"{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}\"\n      ),\n      Helvetica: uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-BoldOblique\": uncompress(\n        \"{'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}}}\"\n      ),\n      ZapfDingbats: uncompress(\"{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Courier-Bold\": uncompress(\"{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}\"),\n      \"Times-Italic\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Times-Roman\": uncompress(\n        \"{'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}}}\"\n      ),\n      \"Helvetica-Oblique\": uncompress(\n        \"{'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}}}\"\n      )\n    }\n  };\n\n  /*\n\tThis event handler is fired when a new jsPDF object is initialized\n\tThis event handler appends metrics data to standard fonts within\n\tthat jsPDF instance. The metrics are mapped over Unicode character\n\tcodes, NOT CIDs or other codes matching the StandardEncoding table of the\n\tstandard PDF fonts.\n\tFuture:\n\tAlso included is the encoding maping table, converting Unicode (UCS-2, UTF-16)\n\tchar codes to StandardEncoding character codes. The encoding table is to be used\n\tsomewhere around \"pdfEscape\" call.\n\t*/\n  API.events.push([\n    \"addFont\",\n    function(data) {\n      var font = data.font;\n\n      var metrics = fontMetrics[\"Unicode\"][font.postScriptName];\n      if (metrics) {\n        font.metadata[\"Unicode\"] = {};\n        font.metadata[\"Unicode\"].widths = metrics.widths;\n        font.metadata[\"Unicode\"].kerning = metrics.kerning;\n      }\n\n      var encodingBlock = encodings[\"Unicode\"][font.postScriptName];\n      if (encodingBlock) {\n        font.metadata[\"Unicode\"].encoding = encodingBlock;\n        font.encoding = encodingBlock.codePages[0];\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF.API);\n","/**\n * @license\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { atob } from \"../libs/AtobBtoa.js\";\n\n/**\n * @name ttfsupport\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n\n  var binaryStringToUint8Array = function(binary_string) {\n    var len = binary_string.length;\n    var bytes = new Uint8Array(len);\n    for (var i = 0; i < len; i++) {\n      bytes[i] = binary_string.charCodeAt(i);\n    }\n    return bytes;\n  };\n\n  var addFont = function(font, file) {\n    // eslint-disable-next-line no-control-regex\n    if (/^\\x00\\x01\\x00\\x00/.test(file)) {\n      file = binaryStringToUint8Array(file);\n    } else {\n      file = binaryStringToUint8Array(atob(file));\n    }\n    font.metadata = jsPDF.API.TTFFont.open(file);\n    font.metadata.Unicode = font.metadata.Unicode || {\n      encoding: {},\n      kerning: {},\n      widths: []\n    };\n    font.metadata.glyIdsUsed = [0];\n  };\n\n  jsPDF.API.events.push([\n    \"addFont\",\n    function(data) {\n      var file = undefined;\n      var font = data.font;\n      var instance = data.instance;\n      if (font.isStandardFont) {\n        return;\n      }\n      if (typeof instance !== \"undefined\") {\n        if (instance.existsFileInVFS(font.postScriptName) === false) {\n          file = instance.loadFile(font.postScriptName);\n        } else {\n          file = instance.getFileFromVFS(font.postScriptName);\n        }\n        if (typeof file !== \"string\") {\n          throw new Error(\n            \"Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('\" +\n              font.postScriptName +\n              \"').\"\n          );\n        }\n        addFont(font, file);\n      } else {\n        throw new Error(\n          \"Font does not exist in vFS, import fonts or remove declaration doc.addFont('\" +\n            font.postScriptName +\n            \"').\"\n        );\n      }\n    }\n  ]); // end of adding event handler\n})(jsPDF);\n","/** @license\n * Copyright (c) 2012 Willow Systems Corporation, https://github.com/willowsystems\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\nimport { console } from \"../libs/console.js\";\nimport { globalObject } from \"../libs/globalObject.js\";\n\n/**\n * jsPDF SVG plugin\n *\n * @name svg\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  function loadCanvg() {\n    return (function() {\n      if (globalObject[\"canvg\"]) {\n        return Promise.resolve(globalObject[\"canvg\"]);\n      }\n\n\n      if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n        return new Promise(function(resolve, reject) {\n          try {\n            resolve(require(\"canvg\"));\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      if (typeof define === \"function\" && define.amd) {\n        return new Promise(function(resolve, reject) {\n          try {\n            require([\"canvg\"], resolve);\n          } catch (e) {\n            reject(e);\n          }\n        });\n      }\n      return Promise.reject(new Error(\"Could not load canvg\"));\n    })()\n      .catch(function(e) {\n        return Promise.reject(new Error(\"Could not load canvg: \" + e));\n      })\n      .then(function(canvg) {\n        return canvg.default ? canvg.default : canvg;\n      });\n  }\n\n  /**\n   * Parses SVG XML and saves it as image into the PDF.\n   *\n   * Depends on canvas-element and canvg\n   *\n   * @name addSvgAsImage\n   * @public\n   * @function\n   * @param {string} SVG-Data as Text\n   * @param {number} x Coordinate (in units declared at inception of PDF document) against left edge of the page\n   * @param {number} y Coordinate (in units declared at inception of PDF document) against upper edge of the page\n   * @param {number} width of SVG-Image (in units declared at inception of PDF document)\n   * @param {number} height of SVG-Image (in units declared at inception of PDF document)\n   * @param {string} alias of SVG-Image (if used multiple times)\n   * @param {string} compression of the generated JPEG, can have the values 'NONE', 'FAST', 'MEDIUM' and 'SLOW'\n   * @param {number} rotation of the image in degrees (0-359)\n   *\n   * @returns jsPDF jsPDF-instance\n   */\n  jsPDFAPI.addSvgAsImage = function(\n    svg,\n    x,\n    y,\n    w,\n    h,\n    alias,\n    compression,\n    rotation\n  ) {\n    if (isNaN(x) || isNaN(y)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid coordinates\", arguments);\n      throw new Error(\"Invalid coordinates passed to jsPDF.addSvgAsImage\");\n    }\n\n    if (isNaN(w) || isNaN(h)) {\n      console.error(\"jsPDF.addSvgAsImage: Invalid measurements\", arguments);\n      throw new Error(\n        \"Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage\"\n      );\n    }\n\n    var canvas = document.createElement(\"canvas\");\n    canvas.width = w;\n    canvas.height = h;\n    var ctx = canvas.getContext(\"2d\");\n    ctx.fillStyle = \"#fff\"; /// set white fill style\n    ctx.fillRect(0, 0, canvas.width, canvas.height);\n\n    var options = {\n      ignoreMouse: true,\n      ignoreAnimation: true,\n      ignoreDimensions: true\n    };\n    var doc = this;\n    return loadCanvg()\n      .then(\n        function(canvg) {\n          return canvg.fromString(ctx, svg, options);\n        },\n        function() {\n          return Promise.reject(new Error(\"Could not load canvg.\"));\n        }\n      )\n      .then(function(instance) {\n        return instance.render(options);\n      })\n      .then(function() {\n        doc.addImage(\n          canvas.toDataURL(\"image/jpeg\", 1.0),\n          x,\n          y,\n          w,\n          h,\n          compression,\n          rotation\n        );\n      });\n  };\n})(jsPDF.API);\n","/**\n * @license\n * ====================================================================\n * Copyright (c) 2013 Eduardo Menezes de Morais, eduardo.morais@usp.br\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * jsPDF total_pages plugin\n * @name total_pages\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * @name putTotalPages\n   * @function\n   * @param {string} pageExpression Regular Expression\n   * @returns {jsPDF} jsPDF-instance\n   */\n\n  jsPDFAPI.putTotalPages = function(pageExpression) {\n    \"use strict\";\n\n    var replaceExpression;\n    var totalNumberOfPages = 0;\n    if (parseInt(this.internal.getFont().id.substr(1), 10) < 15) {\n      replaceExpression = new RegExp(pageExpression, \"g\");\n      totalNumberOfPages = this.internal.getNumberOfPages();\n    } else {\n      replaceExpression = new RegExp(\n        this.pdfEscape16(pageExpression, this.internal.getFont()),\n        \"g\"\n      );\n      totalNumberOfPages = this.pdfEscape16(\n        this.internal.getNumberOfPages() + \"\",\n        this.internal.getFont()\n      );\n    }\n\n    for (var n = 1; n <= this.internal.getNumberOfPages(); n++) {\n      for (var i = 0; i < this.internal.pages[n].length; i++) {\n        this.internal.pages[n][i] = this.internal.pages[n][i].replace(\n          replaceExpression,\n          totalNumberOfPages\n        );\n      }\n    }\n\n    return this;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * jsPDF viewerPreferences Plugin\n * @author Aras Abbasi (github.com/arasabbasi)\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Adds the ability to set ViewerPreferences and by thus\n * controlling the way the document is to be presented on the\n * screen or in print.\n * @name viewerpreferences\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n  /**\n   * Set the ViewerPreferences of the generated PDF\n   *\n   * @name viewerPreferences\n   * @function\n   * @public\n   * @param {Object} options Array with the ViewerPreferences<br />\n   * Example: doc.viewerPreferences({\"FitWindow\":true});<br />\n   * <br />\n   * You can set following preferences:<br />\n   * <br/>\n   * <b>HideToolbar</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>HideMenubar</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>HideWindowUI</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>FitWindow</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>CenterWindow</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>DisplayDocTitle</b> <i>(boolean)</i><br />\n   * Default value: false.<br />\n   * <br />\n   * <b>NonFullScreenPageMode</b> <i>(string)</i><br />\n   * Possible values: UseNone, UseOutlines, UseThumbs, UseOC<br />\n   * Default value: UseNone<br/>\n   * <br />\n   * <b>Direction</b> <i>(string)</i><br />\n   * Possible values: L2R, R2L<br />\n   * Default value: L2R.<br />\n   * <br />\n   * <b>ViewArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>ViewClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintArea</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox<br />\n   * <br />\n   * <b>PrintClip</b> <i>(string)</i><br />\n   * Possible values: MediaBox, CropBox, TrimBox, BleedBox, ArtBox<br />\n   * Default value: CropBox.<br />\n   * <br />\n   * <b>PrintScaling</b> <i>(string)</i><br />\n   * Possible values: AppDefault, None<br />\n   * Default value: AppDefault.<br />\n   * <br />\n   * <b>Duplex</b> <i>(string)</i><br />\n   * Possible values: Simplex, DuplexFlipLongEdge, DuplexFlipShortEdge\n   * Default value: none<br />\n   * <br />\n   * <b>PickTrayByPDFSize</b> <i>(boolean)</i><br />\n   * Default value: false<br />\n   * <br />\n   * <b>PrintPageRange</b> <i>(Array)</i><br />\n   * Example: [[1,5], [7,9]]<br />\n   * Default value: as defined by PDF viewer application<br />\n   * <br />\n   * <b>NumCopies</b> <i>(Number)</i><br />\n   * Possible values: 1, 2, 3, 4, 5<br />\n   * Default value: 1<br />\n   * <br />\n   * For more information see the PDF Reference, sixth edition on Page 577\n   * @param {boolean} doReset True to reset the settings\n   * @function\n   * @returns jsPDF jsPDF-instance\n   * @example\n   * var doc = new jsPDF()\n   * doc.text('This is a test', 10, 10)\n   * doc.viewerPreferences({'FitWindow': true}, true)\n   * doc.save(\"viewerPreferences.pdf\")\n   *\n   * // Example printing 10 copies, using cropbox, and hiding UI.\n   * doc.viewerPreferences({\n   *   'HideWindowUI': true,\n   *   'PrintArea': 'CropBox',\n   *   'NumCopies': 10\n   * })\n   */\n  jsPDFAPI.viewerPreferences = function(options, doReset) {\n    options = options || {};\n    doReset = doReset || false;\n\n    var configuration;\n    var configurationTemplate = {\n      HideToolbar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideMenubar: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      HideWindowUI: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      FitWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      CenterWindow: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.3\n      },\n      DisplayDocTitle: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.4\n      },\n      NonFullScreenPageMode: {\n        defaultValue: \"UseNone\",\n        value: \"UseNone\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"UseNone\", \"UseOutlines\", \"UseThumbs\", \"UseOC\"],\n        pdfVersion: 1.3\n      },\n      Direction: {\n        defaultValue: \"L2R\",\n        value: \"L2R\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"L2R\", \"R2L\"],\n        pdfVersion: 1.3\n      },\n      ViewArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      ViewClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintArea: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintClip: {\n        defaultValue: \"CropBox\",\n        value: \"CropBox\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"MediaBox\", \"CropBox\", \"TrimBox\", \"BleedBox\", \"ArtBox\"],\n        pdfVersion: 1.4\n      },\n      PrintScaling: {\n        defaultValue: \"AppDefault\",\n        value: \"AppDefault\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\"AppDefault\", \"None\"],\n        pdfVersion: 1.6\n      },\n      Duplex: {\n        defaultValue: \"\",\n        value: \"none\",\n        type: \"name\",\n        explicitSet: false,\n        valueSet: [\n          \"Simplex\",\n          \"DuplexFlipShortEdge\",\n          \"DuplexFlipLongEdge\",\n          \"none\"\n        ],\n        pdfVersion: 1.7\n      },\n      PickTrayByPDFSize: {\n        defaultValue: false,\n        value: false,\n        type: \"boolean\",\n        explicitSet: false,\n        valueSet: [true, false],\n        pdfVersion: 1.7\n      },\n      PrintPageRange: {\n        defaultValue: \"\",\n        value: \"\",\n        type: \"array\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      },\n      NumCopies: {\n        defaultValue: 1,\n        value: 1,\n        type: \"integer\",\n        explicitSet: false,\n        valueSet: null,\n        pdfVersion: 1.7\n      }\n    };\n\n    var configurationKeys = Object.keys(configurationTemplate);\n\n    var rangeArray = [];\n    var i = 0;\n    var j = 0;\n    var k = 0;\n    var isValid;\n\n    var method;\n    var value;\n\n    function arrayContainsElement(array, element) {\n      var iterator;\n      var result = false;\n\n      for (iterator = 0; iterator < array.length; iterator += 1) {\n        if (array[iterator] === element) {\n          result = true;\n        }\n      }\n      return result;\n    }\n\n    if (this.internal.viewerpreferences === undefined) {\n      this.internal.viewerpreferences = {};\n      this.internal.viewerpreferences.configuration = JSON.parse(\n        JSON.stringify(configurationTemplate)\n      );\n      this.internal.viewerpreferences.isSubscribed = false;\n    }\n    configuration = this.internal.viewerpreferences.configuration;\n\n    if (options === \"reset\" || doReset === true) {\n      var len = configurationKeys.length;\n\n      for (k = 0; k < len; k += 1) {\n        configuration[configurationKeys[k]].value =\n          configuration[configurationKeys[k]].defaultValue;\n        configuration[configurationKeys[k]].explicitSet = false;\n      }\n    }\n\n    if (typeof options === \"object\") {\n      for (method in options) {\n        value = options[method];\n        if (\n          arrayContainsElement(configurationKeys, method) &&\n          value !== undefined\n        ) {\n          if (\n            configuration[method].type === \"boolean\" &&\n            typeof value === \"boolean\"\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"name\" &&\n            arrayContainsElement(configuration[method].valueSet, value)\n          ) {\n            configuration[method].value = value;\n          } else if (\n            configuration[method].type === \"integer\" &&\n            Number.isInteger(value)\n          ) {\n            configuration[method].value = value;\n          } else if (configuration[method].type === \"array\") {\n            for (i = 0; i < value.length; i += 1) {\n              isValid = true;\n              if (value[i].length === 1 && typeof value[i][0] === \"number\") {\n                rangeArray.push(String(value[i] - 1));\n              } else if (value[i].length > 1) {\n                for (j = 0; j < value[i].length; j += 1) {\n                  if (typeof value[i][j] !== \"number\") {\n                    isValid = false;\n                  }\n                }\n                if (isValid === true) {\n                  rangeArray.push([value[i][0] - 1, value[i][1] - 1].join(\" \"));\n                }\n              }\n            }\n            configuration[method].value = \"[\" + rangeArray.join(\" \") + \"]\";\n          } else {\n            configuration[method].value = configuration[method].defaultValue;\n          }\n\n          configuration[method].explicitSet = true;\n        }\n      }\n    }\n\n    if (this.internal.viewerpreferences.isSubscribed === false) {\n      this.internal.events.subscribe(\"putCatalog\", function() {\n        var pdfDict = [];\n        var vPref;\n        for (vPref in configuration) {\n          if (configuration[vPref].explicitSet === true) {\n            if (configuration[vPref].type === \"name\") {\n              pdfDict.push(\"/\" + vPref + \" /\" + configuration[vPref].value);\n            } else {\n              pdfDict.push(\"/\" + vPref + \" \" + configuration[vPref].value);\n            }\n          }\n        }\n        if (pdfDict.length !== 0) {\n          this.internal.write(\n            \"/ViewerPreferences\\n<<\\n\" + pdfDict.join(\"\\n\") + \"\\n>>\"\n          );\n        }\n      });\n      this.internal.viewerpreferences.isSubscribed = true;\n    }\n\n    this.internal.viewerpreferences.configuration = configuration;\n    return this;\n  };\n})(jsPDF.API);\n","/** ====================================================================\n * @license\n * jsPDF XMP metadata plugin\n * Copyright (c) 2016 Jussi Utunen, u-jussi@suomi24.fi\n *\n * Permission is hereby granted, free of charge, to any person obtaining\n * a copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sublicense, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\n * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\n * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * ====================================================================\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * @name xmp_metadata\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var postPutResources = function() {\n    var xmpmeta_beginning = '<x:xmpmeta xmlns:x=\"adobe:ns:meta/\">';\n    var rdf_beginning =\n      '<rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\" xmlns:jspdf=\"' +\n      this.internal.__metadata__.namespaceuri +\n      '\"><jspdf:metadata>';\n    var rdf_ending = \"</jspdf:metadata></rdf:Description></rdf:RDF>\";\n    var xmpmeta_ending = \"</x:xmpmeta>\";\n    var utf8_xmpmeta_beginning = unescape(\n      encodeURIComponent(xmpmeta_beginning)\n    );\n    var utf8_rdf_beginning = unescape(encodeURIComponent(rdf_beginning));\n    var utf8_metadata = unescape(\n      encodeURIComponent(this.internal.__metadata__.metadata)\n    );\n    var utf8_rdf_ending = unescape(encodeURIComponent(rdf_ending));\n    var utf8_xmpmeta_ending = unescape(encodeURIComponent(xmpmeta_ending));\n\n    var total_len =\n      utf8_rdf_beginning.length +\n      utf8_metadata.length +\n      utf8_rdf_ending.length +\n      utf8_xmpmeta_beginning.length +\n      utf8_xmpmeta_ending.length;\n\n    this.internal.__metadata__.metadata_object_number = this.internal.newObject();\n    this.internal.write(\n      \"<< /Type /Metadata /Subtype /XML /Length \" + total_len + \" >>\"\n    );\n    this.internal.write(\"stream\");\n    this.internal.write(\n      utf8_xmpmeta_beginning +\n        utf8_rdf_beginning +\n        utf8_metadata +\n        utf8_rdf_ending +\n        utf8_xmpmeta_ending\n    );\n    this.internal.write(\"endstream\");\n    this.internal.write(\"endobj\");\n  };\n\n  var putCatalog = function() {\n    if (this.internal.__metadata__.metadata_object_number) {\n      this.internal.write(\n        \"/Metadata \" +\n          this.internal.__metadata__.metadata_object_number +\n          \" 0 R\"\n      );\n    }\n  };\n\n  /**\n   * Adds XMP formatted metadata to PDF\n   *\n   * @name addMetadata\n   * @function\n   * @param {String} metadata The actual metadata to be added. The metadata shall be stored as XMP simple value. Note that if the metadata string contains XML markup characters \"<\", \">\" or \"&\", those characters should be written using XML entities.\n   * @param {String} namespaceuri Sets the namespace URI for the metadata. Last character should be slash or hash.\n   * @returns {jsPDF} jsPDF-instance\n   */\n  jsPDFAPI.addMetadata = function(metadata, namespaceuri) {\n    if (typeof this.internal.__metadata__ === \"undefined\") {\n      this.internal.__metadata__ = {\n        metadata: metadata,\n        namespaceuri: namespaceuri || \"http://jspdf.default.namespaceuri/\"\n      };\n      this.internal.events.subscribe(\"putCatalog\", putCatalog);\n\n      this.internal.events.subscribe(\"postPutResources\", postPutResources);\n    }\n    return this;\n  };\n})(jsPDF.API);\n","import { jsPDF } from \"../jspdf.js\";\nimport { toPDFName } from \"../libs/pdfname.js\";\n\n/**\n * @name utf8\n * @module\n */\n(function(jsPDF) {\n  \"use strict\";\n  var jsPDFAPI = jsPDF.API;\n\n  /***************************************************************************************************/\n  /* function : pdfEscape16                                                                          */\n  /* comment : The character id of a 2-byte string is converted to a hexadecimal number by obtaining */\n  /*   the corresponding glyph id and width, and then adding padding to the string.                  */\n  /***************************************************************************************************/\n  var pdfEscape16 = (jsPDFAPI.pdfEscape16 = function(text, font) {\n    var widths = font.metadata.Unicode.widths;\n    var padz = [\"\", \"0\", \"00\", \"000\", \"0000\"];\n    var ar = [\"\"];\n    for (var i = 0, l = text.length, t; i < l; ++i) {\n      t = font.metadata.characterToGlyph(text.charCodeAt(i));\n      font.metadata.glyIdsUsed.push(t);\n      font.metadata.toUnicode[t] = text.charCodeAt(i);\n      if (widths.indexOf(t) == -1) {\n        widths.push(t);\n        widths.push([parseInt(font.metadata.widthOfGlyph(t), 10)]);\n      }\n      if (t == \"0\") {\n        //Spaces are not allowed in cmap.\n        return ar.join(\"\");\n      } else {\n        t = t.toString(16);\n        ar.push(padz[4 - t.length], t);\n      }\n    }\n    return ar.join(\"\");\n  });\n\n  var toUnicodeCmap = function(map) {\n    var code, codes, range, unicode, unicodeMap, _i, _len;\n    unicodeMap =\n      \"/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    codes = Object.keys(map).sort(function(a, b) {\n      return a - b;\n    });\n\n    range = [];\n    for (_i = 0, _len = codes.length; _i < _len; _i++) {\n      code = codes[_i];\n      if (range.length >= 100) {\n        unicodeMap +=\n          \"\\n\" +\n          range.length +\n          \" beginbfchar\\n\" +\n          range.join(\"\\n\") +\n          \"\\nendbfchar\";\n        range = [];\n      }\n\n      if (\n        map[code] !== undefined &&\n        map[code] !== null &&\n        typeof map[code].toString === \"function\"\n      ) {\n        unicode = (\"0000\" + map[code].toString(16)).slice(-4);\n        code = (\"0000\" + (+code).toString(16)).slice(-4);\n        range.push(\"<\" + code + \"><\" + unicode + \">\");\n      }\n    }\n\n    if (range.length) {\n      unicodeMap +=\n        \"\\n\" +\n        range.length +\n        \" beginbfchar\\n\" +\n        range.join(\"\\n\") +\n        \"\\nendbfchar\\n\";\n    }\n    unicodeMap +=\n      \"endcmap\\nCMapName currentdict /CMap defineresource pop\\nend\\nend\";\n    return unicodeMap;\n  };\n\n  var identityHFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"Identity-H\"\n    ) {\n      //Tag with Identity-H\n      var widths = font.metadata.Unicode.widths;\n      var data = font.metadata.subset.encode(font.metadata.glyIdsUsed, 1);\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/Flags \" + font.metadata.flags);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\">>\");\n      out(\"endobj\");\n\n      var DescendantFont = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/FontDescriptor \" + fontDescriptor + \" 0 R\");\n      out(\"/W \" + jsPDF.API.PDFObject.convert(widths));\n      out(\"/CIDToGIDMap /Identity\");\n      out(\"/DW 1000\");\n      out(\"/Subtype /CIDFontType2\");\n      out(\"/CIDSystemInfo\");\n      out(\"<<\");\n      out(\"/Supplement 0\");\n      out(\"/Registry (Adobe)\");\n      out(\"/Ordering (\" + font.encoding + \")\");\n      out(\">>\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.objectNumber = newObject();\n      out(\"<<\");\n      out(\"/Type /Font\");\n      out(\"/Subtype /Type0\");\n      out(\"/ToUnicode \" + cmap + \" 0 R\");\n      out(\"/BaseFont /\" + toPDFName(font.fontName));\n      out(\"/Encoding /\" + font.encoding);\n      out(\"/DescendantFonts [\" + DescendantFont + \" 0 R]\");\n      out(\">>\");\n      out(\"endobj\");\n\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      identityHFunction(args);\n    }\n  ]);\n\n  var winAnsiEncodingFunction = function(options) {\n    var font = options.font;\n    var out = options.out;\n    var newObject = options.newObject;\n    var putStream = options.putStream;\n\n    if (\n      font.metadata instanceof jsPDF.API.TTFFont &&\n      font.encoding === \"WinAnsiEncoding\"\n    ) {\n      //Tag with WinAnsi encoding\n      var data = font.metadata.rawData;\n      var pdfOutput = data;\n      var pdfOutput2 = \"\";\n      for (var i = 0; i < pdfOutput.length; i++) {\n        pdfOutput2 += String.fromCharCode(pdfOutput[i]);\n      }\n      var fontTable = newObject();\n      putStream({ data: pdfOutput2, addLength1: true, objectId: fontTable });\n      out(\"endobj\");\n\n      var cmap = newObject();\n      var cmapData = toUnicodeCmap(font.metadata.toUnicode);\n      putStream({ data: cmapData, addLength1: true, objectId: cmap });\n      out(\"endobj\");\n\n      var fontDescriptor = newObject();\n      out(\"<<\");\n      out(\"/Descent \" + font.metadata.decender);\n      out(\"/CapHeight \" + font.metadata.capHeight);\n      out(\"/StemV \" + font.metadata.stemV);\n      out(\"/Type /FontDescriptor\");\n      out(\"/FontFile2 \" + fontTable + \" 0 R\");\n      out(\"/Flags 96\");\n      out(\"/FontBBox \" + jsPDF.API.PDFObject.convert(font.metadata.bbox));\n      out(\"/FontName /\" + toPDFName(font.fontName));\n      out(\"/ItalicAngle \" + font.metadata.italicAngle);\n      out(\"/Ascent \" + font.metadata.ascender);\n      out(\">>\");\n      out(\"endobj\");\n      font.objectNumber = newObject();\n      for (var j = 0; j < font.metadata.hmtx.widths.length; j++) {\n        font.metadata.hmtx.widths[j] = parseInt(\n          font.metadata.hmtx.widths[j] * (1000 / font.metadata.head.unitsPerEm)\n        ); //Change the width of Em units to Point units.\n      }\n      out(\n        \"<</Subtype/TrueType/Type/Font/ToUnicode \" +\n          cmap +\n          \" 0 R/BaseFont/\" +\n          toPDFName(font.fontName) +\n          \"/FontDescriptor \" +\n          fontDescriptor +\n          \" 0 R\" +\n          \"/Encoding/\" +\n          font.encoding +\n          \" /FirstChar 29 /LastChar 255 /Widths \" +\n          jsPDF.API.PDFObject.convert(font.metadata.hmtx.widths) +\n          \">>\"\n      );\n      out(\"endobj\");\n      font.isAlreadyPutted = true;\n    }\n  };\n\n  jsPDFAPI.events.push([\n    \"putFont\",\n    function(args) {\n      winAnsiEncodingFunction(args);\n    }\n  ]);\n\n  var utf8TextFunction = function(args) {\n    var text = args.text || \"\";\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n\n    var pdfEscape = mutex.pdfEscape;\n    var activeFontKey = mutex.activeFontKey;\n    var fonts = mutex.fonts;\n    var key = activeFontKey;\n\n    var str = \"\",\n      s = 0,\n      cmapConfirm;\n    var strText = \"\";\n    var encoding = fonts[key].encoding;\n\n    if (fonts[key].encoding !== \"Identity-H\") {\n      return {\n        text: text,\n        x: x,\n        y: y,\n        options: options,\n        mutex: mutex\n      };\n    }\n    strText = text;\n\n    key = activeFontKey;\n    if (Array.isArray(text)) {\n      strText = text[0];\n    }\n    for (s = 0; s < strText.length; s += 1) {\n      if (fonts[key].metadata.hasOwnProperty(\"cmap\")) {\n        cmapConfirm =\n          fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)];\n        /*\n             if (Object.prototype.toString.call(text) === '[object Array]') {\n                var i = 0;\n               // for (i = 0; i < text.length; i += 1) {\n                    if (Object.prototype.toString.call(text[s]) === '[object Array]') {\n                        cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s][0].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n                    } else {\n\n                    }\n                //}\n\n            } else {\n                cmapConfirm = fonts[key].metadata.cmap.unicode.codeMap[strText[s].charCodeAt(0)]; //Make sure the cmap has the corresponding glyph id\n            }*/\n      }\n      if (!cmapConfirm) {\n        if (\n          strText[s].charCodeAt(0) < 256 &&\n          fonts[key].metadata.hasOwnProperty(\"Unicode\")\n        ) {\n          str += strText[s];\n        } else {\n          str += \"\";\n        }\n      } else {\n        str += strText[s];\n      }\n    }\n    var result = \"\";\n    if (parseInt(key.slice(1)) < 14 || encoding === \"WinAnsiEncoding\") {\n      //For the default 13 font\n      result = pdfEscape(str, key)\n        .split(\"\")\n        .map(function(cv) {\n          return cv.charCodeAt(0).toString(16);\n        })\n        .join(\"\");\n    } else if (encoding === \"Identity-H\") {\n      result = pdfEscape16(str, fonts[key]);\n    }\n    mutex.isHex = true;\n\n    return {\n      text: result,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n  };\n\n  var utf8EscapeFunction = function(parms) {\n    var text = parms.text || \"\",\n      x = parms.x,\n      y = parms.y,\n      options = parms.options,\n      mutex = parms.mutex;\n    var tmpText = [];\n    var args = {\n      text: text,\n      x: x,\n      y: y,\n      options: options,\n      mutex: mutex\n    };\n\n    if (Array.isArray(text)) {\n      var i = 0;\n      for (i = 0; i < text.length; i += 1) {\n        if (Array.isArray(text[i])) {\n          if (text[i].length === 3) {\n            tmpText.push([\n              utf8TextFunction(Object.assign({}, args, { text: text[i][0] }))\n                .text,\n              text[i][1],\n              text[i][2]\n            ]);\n          } else {\n            tmpText.push(\n              utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n            );\n          }\n        } else {\n          tmpText.push(\n            utf8TextFunction(Object.assign({}, args, { text: text[i] })).text\n          );\n        }\n      }\n      parms.text = tmpText;\n    } else {\n      parms.text = utf8TextFunction(\n        Object.assign({}, args, { text: text })\n      ).text;\n    }\n  };\n\n  jsPDFAPI.events.push([\"postProcessText\", utf8EscapeFunction]);\n})(jsPDF);\n","/**\n * @license\n * jsPDF virtual FileSystem functionality\n *\n * Licensed under the MIT License.\n * http://opensource.org/licenses/mit-license\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n/**\n * Use the vFS to handle files\n *\n * @name vFS\n * @module\n */\n(function(jsPDFAPI) {\n  \"use strict\";\n\n  var _initializeVFS = function() {\n    if (typeof this.internal.vFS === \"undefined\") {\n      this.internal.vFS = {};\n    }\n    return true;\n  };\n\n  /**\n   * Check if the file exists in the vFS\n   *\n   * @name existsFileInVFS\n   * @function\n   * @param {string} Possible filename in the vFS.\n   * @returns {boolean}\n   * @example\n   * doc.existsFileInVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.existsFileInVFS = function(filename) {\n    _initializeVFS.call(this);\n    return typeof this.internal.vFS[filename] !== \"undefined\";\n  };\n\n  /**\n   * Add a file to the vFS\n   *\n   * @name addFileToVFS\n   * @function\n   * @param {string} filename The name of the file which should be added.\n   * @param {string} filecontent The content of the file.\n   * @returns {jsPDF}\n   * @example\n   * doc.addFileToVFS(\"someFile.txt\", \"BADFACE1\");\n   */\n  jsPDFAPI.addFileToVFS = function(filename, filecontent) {\n    _initializeVFS.call(this);\n    this.internal.vFS[filename] = filecontent;\n    return this;\n  };\n\n  /**\n   * Get the file from the vFS\n   *\n   * @name getFileFromVFS\n   * @function\n   * @param {string} The name of the file which gets requested.\n   * @returns {string}\n   * @example\n   * doc.getFileFromVFS(\"someFile.txt\");\n   */\n  jsPDFAPI.getFileFromVFS = function(filename) {\n    _initializeVFS.call(this);\n\n    if (typeof this.internal.vFS[filename] !== \"undefined\") {\n      return this.internal.vFS[filename];\n    }\n    return null;\n  };\n})(jsPDF.API);\n","/**\n * @license\n * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)\n * MIT License\n */\n\nimport { jsPDF } from \"../jspdf.js\";\n\n(function(jsPDF) {\n  \"use strict\";\n  /**\n   * Table of Unicode types.\n   *\n   * Generated by:\n   *\n   * var bidi = require(\"./bidi/index\");\n   * var bidi_accumulate = bidi.slice(0, 256).concat(bidi.slice(0x0500, 0x0500 + 256 * 3)).\n   * concat(bidi.slice(0x2000, 0x2000 + 256)).concat(bidi.slice(0xFB00, 0xFB00 + 256)).\n   * concat(bidi.slice(0xFE00, 0xFE00 + 2 * 256));\n   *\n   * for( var i = 0; i < bidi_accumulate.length; i++) {\n   * \tif(bidi_accumulate[i] === undefined || bidi_accumulate[i] === 'ON')\n   * \t\tbidi_accumulate[i] = 'N'; //mark as neutral to conserve space and substitute undefined\n   * }\n   * var bidiAccumulateStr = 'return [ \"' + bidi_accumulate.toString().replace(/,/g, '\", \"') + '\" ];';\n   * require(\"fs\").writeFile('unicode-types.js', bidiAccumulateStr);\n   *\n   * Based on:\n   * https://github.com/mathiasbynens/unicode-8.0.0\n   */\n  var bidiUnicodeTypes = [\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"S\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"B\",\n    \"B\",\n    \"S\",\n    \"WS\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"B\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"CS\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"EN\",\n    \"EN\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"ET\",\n    \"ET\",\n    \"AL\",\n    \"CS\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"AN\",\n    \"ET\",\n    \"AN\",\n    \"AN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AN\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"AL\",\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    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"L\",\n    \"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\",\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\",\n    \"B\",\n    \"LRE\",\n    \"RLE\",\n    \"PDF\",\n    \"LRO\",\n    \"RLO\",\n    \"CS\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"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\",\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    \"WS\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"N\",\n    \"LRI\",\n    \"RLI\",\n    \"FSI\",\n    \"PDI\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"BN\",\n    \"EN\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"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    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\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    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"R\",\n    \"NSM\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"ES\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"N\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"R\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\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\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"NSM\",\n    \"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\",\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\",\n    \"CS\",\n    \"N\",\n    \"CS\",\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    \"ET\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"ES\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"AL\",\n    \"N\",\n    \"N\",\n    \"BN\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ES\",\n    \"CS\",\n    \"ES\",\n    \"CS\",\n    \"CS\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"EN\",\n    \"CS\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"L\",\n    \"L\",\n    \"L\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"ET\",\n    \"N\",\n    \"N\",\n    \"N\",\n    \"ET\",\n    \"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    \"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   * Unicode Bidi algorithm compliant Bidi engine.\n   * For reference see http://unicode.org/reports/tr9/\n   */\n\n  /**\n   * constructor ( options )\n   *\n   * Initializes Bidi engine\n   *\n   * @param {Object} See 'setOptions' below for detailed description.\n   * options are cashed between invocation of 'doBidiReorder' method\n   *\n   * sample usage pattern of BidiEngine:\n   * var opt = {\n   * \tisInputVisual: true,\n   * \tisInputRtl: false,\n   * \tisOutputVisual: false,\n   * \tisOutputRtl: false,\n   * \tisSymmetricSwapping: true\n   * }\n   * var sourceToTarget = [], levels = [];\n   * var bidiEng = Globalize.bidiEngine(opt);\n   * var src = \"text string to be reordered\";\n   * var ret = bidiEng.doBidiReorder(src, sourceToTarget, levels);\n   */\n\n  jsPDF.__bidiEngine__ = jsPDF.prototype.__bidiEngine__ = function(options) {\n    var _UNICODE_TYPES = _bidiUnicodeTypes;\n\n    var _STATE_TABLE_LTR = [\n      [0, 3, 0, 1, 0, 0, 0],\n      [0, 3, 0, 1, 2, 2, 0],\n      [0, 3, 0, 0x11, 2, 0, 1],\n      [0, 3, 5, 5, 4, 1, 0],\n      [0, 3, 0x15, 0x15, 4, 0, 1],\n      [0, 3, 5, 5, 4, 2, 0]\n    ];\n\n    var _STATE_TABLE_RTL = [\n      [2, 0, 1, 1, 0, 1, 0],\n      [2, 0, 1, 1, 0, 2, 0],\n      [2, 0, 2, 1, 3, 2, 0],\n      [2, 0, 2, 0x21, 3, 1, 1]\n    ];\n\n    var _TYPE_NAMES_MAP = { L: 0, R: 1, EN: 2, AN: 3, N: 4, B: 5, S: 6 };\n\n    var _UNICODE_RANGES_MAP = {\n      0: 0,\n      5: 1,\n      6: 2,\n      7: 3,\n      0x20: 4,\n      0xfb: 5,\n      0xfe: 6,\n      0xff: 7\n    };\n\n    var _SWAP_TABLE = [\n      \"\\u0028\",\n      \"\\u0029\",\n      \"\\u0028\",\n      \"\\u003C\",\n      \"\\u003E\",\n      \"\\u003C\",\n      \"\\u005B\",\n      \"\\u005D\",\n      \"\\u005B\",\n      \"\\u007B\",\n      \"\\u007D\",\n      \"\\u007B\",\n      \"\\u00AB\",\n      \"\\u00BB\",\n      \"\\u00AB\",\n      \"\\u2039\",\n      \"\\u203A\",\n      \"\\u2039\",\n      \"\\u2045\",\n      \"\\u2046\",\n      \"\\u2045\",\n      \"\\u207D\",\n      \"\\u207E\",\n      \"\\u207D\",\n      \"\\u208D\",\n      \"\\u208E\",\n      \"\\u208D\",\n      \"\\u2264\",\n      \"\\u2265\",\n      \"\\u2264\",\n      \"\\u2329\",\n      \"\\u232A\",\n      \"\\u2329\",\n      \"\\uFE59\",\n      \"\\uFE5A\",\n      \"\\uFE59\",\n      \"\\uFE5B\",\n      \"\\uFE5C\",\n      \"\\uFE5B\",\n      \"\\uFE5D\",\n      \"\\uFE5E\",\n      \"\\uFE5D\",\n      \"\\uFE64\",\n      \"\\uFE65\",\n      \"\\uFE64\"\n    ];\n\n    var _LTR_RANGES_REG_EXPR = new RegExp(\n      /^([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)$/\n    );\n\n    var _lastArabic = false,\n      _hasUbatAl,\n      _hasUbatB,\n      _hasUbatS,\n      DIR_LTR = 0,\n      DIR_RTL = 1,\n      _isInVisual,\n      _isInRtl,\n      _isOutVisual,\n      _isOutRtl,\n      _isSymmetricSwapping,\n      _dir = DIR_LTR;\n\n    this.__bidiEngine__ = {};\n\n    var _init = function(text, sourceToTargetMap) {\n      if (sourceToTargetMap) {\n        for (var i = 0; i < text.length; i++) {\n          sourceToTargetMap[i] = i;\n        }\n      }\n      if (_isInRtl === undefined) {\n        _isInRtl = _isContextualDirRtl(text);\n      }\n      if (_isOutRtl === undefined) {\n        _isOutRtl = _isContextualDirRtl(text);\n      }\n    };\n\n    // for reference see 3.2 in http://unicode.org/reports/tr9/\n    //\n    var _getCharType = function(ch) {\n      var charCode = ch.charCodeAt(),\n        range = charCode >> 8,\n        rangeIdx = _UNICODE_RANGES_MAP[range];\n\n      if (rangeIdx !== undefined) {\n        return _UNICODE_TYPES[rangeIdx * 256 + (charCode & 0xff)];\n      } else if (range === 0xfc || range === 0xfd) {\n        return \"AL\";\n      } else if (_LTR_RANGES_REG_EXPR.test(range)) {\n        //unlikely case\n        return \"L\";\n      } else if (range === 8) {\n        // even less likely\n        return \"R\";\n      }\n      return \"N\"; //undefined type, mark as neutral\n    };\n\n    var _isContextualDirRtl = function(text) {\n      for (var i = 0, charType; i < text.length; i++) {\n        charType = _getCharType(text.charAt(i));\n        if (charType === \"L\") {\n          return false;\n        } else if (charType === \"R\") {\n          return true;\n        }\n      }\n      return false;\n    };\n\n    // for reference see 3.3.4 & 3.3.5 in http://unicode.org/reports/tr9/\n    //\n    var _resolveCharType = function(chars, types, resolvedTypes, index) {\n      var cType = types[index],\n        wType,\n        nType,\n        i,\n        len;\n      switch (cType) {\n        case \"L\":\n        case \"R\":\n          _lastArabic = false;\n          break;\n        case \"N\":\n        case \"AN\":\n          break;\n\n        case \"EN\":\n          if (_lastArabic) {\n            cType = \"AN\";\n          }\n          break;\n\n        case \"AL\":\n          _lastArabic = true;\n          _hasUbatAl = true;\n          cType = \"R\";\n          break;\n\n        case \"WS\":\n          cType = \"N\";\n          break;\n\n        case \"CS\":\n          if (\n            index < 1 ||\n            index + 1 >= types.length ||\n            ((wType = resolvedTypes[index - 1]) !== \"EN\" && wType !== \"AN\") ||\n            ((nType = types[index + 1]) !== \"EN\" && nType !== \"AN\")\n          ) {\n            cType = \"N\";\n          } else if (_lastArabic) {\n            nType = \"AN\";\n          }\n          cType = nType === wType ? nType : \"N\";\n          break;\n\n        case \"ES\":\n          wType = index > 0 ? resolvedTypes[index - 1] : \"B\";\n          cType =\n            wType === \"EN\" &&\n            index + 1 < types.length &&\n            types[index + 1] === \"EN\"\n              ? \"EN\"\n              : \"N\";\n          break;\n\n        case \"ET\":\n          if (index > 0 && resolvedTypes[index - 1] === \"EN\") {\n            cType = \"EN\";\n            break;\n          } else if (_lastArabic) {\n            cType = \"N\";\n            break;\n          }\n          i = index + 1;\n          len = types.length;\n          while (i < len && types[i] === \"ET\") {\n            i++;\n          }\n          if (i < len && types[i] === \"EN\") {\n            cType = \"EN\";\n          } else {\n            cType = \"N\";\n          }\n          break;\n\n        case \"NSM\":\n          if (_isInVisual && !_isInRtl) {\n            //V->L\n            len = types.length;\n            i = index + 1;\n            while (i < len && types[i] === \"NSM\") {\n              i++;\n            }\n            if (i < len) {\n              var c = chars[index];\n              var rtlCandidate = (c >= 0x0591 && c <= 0x08ff) || c === 0xfb1e;\n              wType = types[i];\n              if (rtlCandidate && (wType === \"R\" || wType === \"AL\")) {\n                cType = \"R\";\n                break;\n              }\n            }\n          }\n          if (index < 1 || (wType = types[index - 1]) === \"B\") {\n            cType = \"N\";\n          } else {\n            cType = resolvedTypes[index - 1];\n          }\n          break;\n\n        case \"B\":\n          _lastArabic = false;\n          _hasUbatB = true;\n          cType = _dir;\n          break;\n\n        case \"S\":\n          _hasUbatS = true;\n          cType = \"N\";\n          break;\n\n        case \"LRE\":\n        case \"RLE\":\n        case \"LRO\":\n        case \"RLO\":\n        case \"PDF\":\n          _lastArabic = false;\n          break;\n        case \"BN\":\n          cType = \"N\";\n          break;\n      }\n      return cType;\n    };\n\n    var _handleUbatS = function(types, levels, length) {\n      for (var i = 0; i < length; i++) {\n        if (types[i] === \"S\") {\n          levels[i] = _dir;\n          for (var j = i - 1; j >= 0; j--) {\n            if (types[j] === \"WS\") {\n              levels[j] = _dir;\n            } else {\n              break;\n            }\n          }\n        }\n      }\n    };\n\n    var _invertString = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\");\n      if (levels) {\n        _computeLevels(charArray, levels, { hiLevel: _dir });\n      }\n      charArray.reverse();\n      sourceToTargetMap && sourceToTargetMap.reverse();\n      return charArray.join(\"\");\n    };\n\n    // For reference see 3.3 in http://unicode.org/reports/tr9/\n    //\n    var _computeLevels = function(chars, levels, params) {\n      var action,\n        condition,\n        i,\n        index,\n        newLevel,\n        prevState,\n        condPos = -1,\n        len = chars.length,\n        newState = 0,\n        resolvedTypes = [],\n        stateTable = _dir ? _STATE_TABLE_RTL : _STATE_TABLE_LTR,\n        types = [];\n\n      _lastArabic = false;\n      _hasUbatAl = false;\n      _hasUbatB = false;\n      _hasUbatS = false;\n      for (i = 0; i < len; i++) {\n        types[i] = _getCharType(chars[i]);\n      }\n      for (index = 0; index < len; index++) {\n        prevState = newState;\n        resolvedTypes[index] = _resolveCharType(\n          chars,\n          types,\n          resolvedTypes,\n          index\n        );\n        newState = stateTable[prevState][_TYPE_NAMES_MAP[resolvedTypes[index]]];\n        action = newState & 0xf0;\n        newState &= 0x0f;\n        levels[index] = newLevel = stateTable[newState][5];\n        if (action > 0) {\n          if (action === 0x10) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = 1;\n            }\n            condPos = -1;\n          } else {\n            condPos = -1;\n          }\n        }\n        condition = stateTable[newState][6];\n        if (condition) {\n          if (condPos === -1) {\n            condPos = index;\n          }\n        } else {\n          if (condPos > -1) {\n            for (i = condPos; i < index; i++) {\n              levels[i] = newLevel;\n            }\n            condPos = -1;\n          }\n        }\n        if (types[index] === \"B\") {\n          levels[index] = 0;\n        }\n        params.hiLevel |= newLevel;\n      }\n      if (_hasUbatS) {\n        _handleUbatS(types, levels, len);\n      }\n    };\n\n    // for reference see 3.4 in http://unicode.org/reports/tr9/\n    //\n    var _invertByLevel = function(\n      level,\n      charArray,\n      sourceToTargetMap,\n      levels,\n      params\n    ) {\n      if (params.hiLevel < level) {\n        return;\n      }\n      if (level === 1 && _dir === DIR_RTL && !_hasUbatB) {\n        charArray.reverse();\n        sourceToTargetMap && sourceToTargetMap.reverse();\n        return;\n      }\n      var ch,\n        high,\n        end,\n        low,\n        len = charArray.length,\n        start = 0;\n\n      while (start < len) {\n        if (levels[start] >= level) {\n          end = start + 1;\n          while (end < len && levels[end] >= level) {\n            end++;\n          }\n          for (low = start, high = end - 1; low < high; low++, high--) {\n            ch = charArray[low];\n            charArray[low] = charArray[high];\n            charArray[high] = ch;\n            if (sourceToTargetMap) {\n              ch = sourceToTargetMap[low];\n              sourceToTargetMap[low] = sourceToTargetMap[high];\n              sourceToTargetMap[high] = ch;\n            }\n          }\n          start = end;\n        }\n        start++;\n      }\n    };\n\n    // for reference see 7 & BD16 in http://unicode.org/reports/tr9/\n    //\n    var _symmetricSwap = function(charArray, levels, params) {\n      if (params.hiLevel !== 0 && _isSymmetricSwapping) {\n        for (var i = 0, index; i < charArray.length; i++) {\n          if (levels[i] === 1) {\n            index = _SWAP_TABLE.indexOf(charArray[i]);\n            if (index >= 0) {\n              charArray[i] = _SWAP_TABLE[index + 1];\n            }\n          }\n        }\n      }\n    };\n\n    var _reorder = function(text, sourceToTargetMap, levels) {\n      var charArray = text.split(\"\"),\n        params = { hiLevel: _dir };\n\n      if (!levels) {\n        levels = [];\n      }\n      _computeLevels(charArray, levels, params);\n      _symmetricSwap(charArray, levels, params);\n      _invertByLevel(DIR_RTL + 1, charArray, sourceToTargetMap, levels, params);\n      _invertByLevel(DIR_RTL, charArray, sourceToTargetMap, levels, params);\n      return charArray.join(\"\");\n    };\n\n    // doBidiReorder( text, sourceToTargetMap, levels )\n    // Performs Bidi reordering by implementing Unicode Bidi algorithm.\n    // Returns reordered string\n    // @text [String]:\n    // - input string to be reordered, this is input parameter\n    // $sourceToTargetMap [Array] (optional)\n    // - resultant mapping between input and output strings, this is output parameter\n    // $levels [Array] (optional)\n    // - array of calculated Bidi levels, , this is output parameter\n    this.__bidiEngine__.doBidiReorder = function(\n      text,\n      sourceToTargetMap,\n      levels\n    ) {\n      _init(text, sourceToTargetMap);\n      if (!_isInVisual && _isOutVisual && !_isOutRtl) {\n        // LLTR->VLTR, LRTL->VLTR\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && _isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VRTL->VLTR, VLTR->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _invertString(text, sourceToTargetMap, levels);\n      } else if (!_isInVisual && _isOutVisual && _isOutRtl) {\n        // LLTR->VRTL, LRTL->VRTL\n        _dir = _isInRtl ? DIR_RTL : DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (_isInVisual && !_isInRtl && !_isOutVisual && !_isOutRtl) {\n        // VLTR->LLTR\n        _dir = DIR_LTR;\n        text = _reorder(text, sourceToTargetMap, levels);\n      } else if (_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // VLTR->LRTL, VRTL->LLTR\n        text = _invertString(text, sourceToTargetMap);\n        if (_isInRtl) {\n          //LLTR -> VLTR\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n        } else {\n          //LRTL -> VRTL\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n        }\n      } else if (_isInVisual && _isInRtl && !_isOutVisual && _isOutRtl) {\n        //  VRTL->LRTL\n        _dir = DIR_RTL;\n        text = _reorder(text, sourceToTargetMap, levels);\n        text = _invertString(text, sourceToTargetMap);\n      } else if (!_isInVisual && !_isOutVisual && _isInRtl ^ _isOutRtl) {\n        // LRTL->LLTR, LLTR->LRTL\n        var isSymmetricSwappingOrig = _isSymmetricSwapping;\n        if (_isInRtl) {\n          //LRTL->LLTR\n          _dir = DIR_RTL;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _dir = DIR_LTR;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n        } else {\n          //LLTR->LRTL\n          _dir = DIR_LTR;\n          text = _reorder(text, sourceToTargetMap, levels);\n          text = _invertString(text, sourceToTargetMap);\n          _dir = DIR_RTL;\n          _isSymmetricSwapping = false;\n          text = _reorder(text, sourceToTargetMap, levels);\n          _isSymmetricSwapping = isSymmetricSwappingOrig;\n          text = _invertString(text, sourceToTargetMap);\n        }\n      }\n      return text;\n    };\n\n    /**\n     * @name setOptions( options )\n     * @function\n     * Sets options for Bidi conversion\n     * @param {Object}:\n     * - isInputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isInputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong character of input string)\n     * - isOutputVisual {boolean} (defaults to false): allowed values: true(Visual mode), false(Logical mode)\n     * - isOutputRtl {boolean}: allowed values true(Right-to-left direction), false (Left-to-right directiion), undefined(Contectual direction, i.e.direction defined by first strong characterof input string)\n     * - isSymmetricSwapping {boolean} (defaults to false): allowed values true(needs symmetric swapping), false (no need in symmetric swapping),\n     */\n    this.__bidiEngine__.setOptions = function(options) {\n      if (options) {\n        _isInVisual = options.isInputVisual;\n        _isOutVisual = options.isOutputVisual;\n        _isInRtl = options.isInputRtl;\n        _isOutRtl = options.isOutputRtl;\n        _isSymmetricSwapping = options.isSymmetricSwapping;\n      }\n    };\n\n    this.__bidiEngine__.setOptions(options);\n    return this.__bidiEngine__;\n  };\n\n  var _bidiUnicodeTypes = bidiUnicodeTypes;\n\n  var bidiEngine = new jsPDF.__bidiEngine__({ isInputVisual: true });\n\n  var bidiEngineFunction = function(args) {\n    var text = args.text;\n    var x = args.x;\n    var y = args.y;\n    var options = args.options || {};\n    var mutex = args.mutex || {};\n    var lang = options.lang;\n    var tmpText = [];\n\n    options.isInputVisual =\n      typeof options.isInputVisual === \"boolean\" ? options.isInputVisual : true;\n    bidiEngine.setOptions(options);\n\n    if (Object.prototype.toString.call(text) === \"[object Array]\") {\n      var i = 0;\n      tmpText = [];\n      for (i = 0; i < text.length; i += 1) {\n        if (Object.prototype.toString.call(text[i]) === \"[object Array]\") {\n          tmpText.push([\n            bidiEngine.doBidiReorder(text[i][0]),\n            text[i][1],\n            text[i][2]\n          ]);\n        } else {\n          tmpText.push([bidiEngine.doBidiReorder(text[i])]);\n        }\n      }\n      args.text = tmpText;\n    } else {\n      args.text = bidiEngine.doBidiReorder(text);\n    }\n    bidiEngine.setOptions({ isInputVisual: true });\n  };\n\n  jsPDF.API.events.push([\"postProcessText\", bidiEngineFunction]);\n})(jsPDF);\n","/* eslint-disable no-control-regex */\n/************************************************\n * Title : custom font                          *\n * Start Data : 2017. 01. 22.                   *\n * Comment : TEXT API                           *\n ************************************************/\n\n/******************************\n * jsPDF extension API Design *\n * ****************************/\n\nimport { jsPDF } from \"../jspdf.js\";\n\njsPDF.API.TTFFont = (function() {\n  /************************************************************************/\n  /* function : open                                                       */\n  /* comment : Decode the encoded ttf content and create a TTFFont object. */\n  /************************************************************************/\n  TTFFont.open = function(file) {\n    return new TTFFont(file);\n  };\n  /***************************************************************/\n  /* function : TTFFont gernerator                               */\n  /* comment : Decode TTF contents are parsed, Data,             */\n  /* Subset object is created, and registerTTF function is called.*/\n  /***************************************************************/\n  function TTFFont(rawData) {\n    var data;\n    this.rawData = rawData;\n    data = this.contents = new Data(rawData);\n    this.contents.pos = 4;\n    if (data.readString(4) === \"ttcf\") {\n      throw new Error(\"TTCF not supported.\");\n    } else {\n      data.pos = 0;\n      this.parse();\n      this.subset = new Subset(this);\n      this.registerTTF();\n    }\n  }\n  /********************************************************/\n  /* function : parse                                     */\n  /* comment : TTF Parses the file contents by each table.*/\n  /********************************************************/\n  TTFFont.prototype.parse = function() {\n    this.directory = new Directory(this.contents);\n    this.head = new HeadTable(this);\n    this.name = new NameTable(this);\n    this.cmap = new CmapTable(this);\n    this.toUnicode = {};\n    this.hhea = new HheaTable(this);\n    this.maxp = new MaxpTable(this);\n    this.hmtx = new HmtxTable(this);\n    this.post = new PostTable(this);\n    this.os2 = new OS2Table(this);\n    this.loca = new LocaTable(this);\n    this.glyf = new GlyfTable(this);\n    this.ascender =\n      (this.os2.exists && this.os2.ascender) || this.hhea.ascender;\n    this.decender =\n      (this.os2.exists && this.os2.decender) || this.hhea.decender;\n    this.lineGap = (this.os2.exists && this.os2.lineGap) || this.hhea.lineGap;\n    return (this.bbox = [\n      this.head.xMin,\n      this.head.yMin,\n      this.head.xMax,\n      this.head.yMax\n    ]);\n  };\n  /***************************************************************/\n  /* function : registerTTF                                      */\n  /* comment : Get the value to assign pdf font descriptors.     */\n  /***************************************************************/\n  TTFFont.prototype.registerTTF = function() {\n    var e, hi, low, raw, _ref;\n    this.scaleFactor = 1000.0 / this.head.unitsPerEm;\n    this.bbox = function() {\n      var _i, _len, _ref, _results;\n      _ref = this.bbox;\n      _results = [];\n      for (_i = 0, _len = _ref.length; _i < _len; _i++) {\n        e = _ref[_i];\n        _results.push(Math.round(e * this.scaleFactor));\n      }\n      return _results;\n    }.call(this);\n    this.stemV = 0;\n    if (this.post.exists) {\n      raw = this.post.italic_angle;\n      hi = raw >> 16;\n      low = raw & 0xff;\n      if ((hi & 0x8000) !== 0) {\n        hi = -((hi ^ 0xffff) + 1);\n      }\n      this.italicAngle = +(\"\" + hi + \".\" + low);\n    } else {\n      this.italicAngle = 0;\n    }\n    this.ascender = Math.round(this.ascender * this.scaleFactor);\n    this.decender = Math.round(this.decender * this.scaleFactor);\n    this.lineGap = Math.round(this.lineGap * this.scaleFactor);\n    this.capHeight = (this.os2.exists && this.os2.capHeight) || this.ascender;\n    this.xHeight = (this.os2.exists && this.os2.xHeight) || 0;\n    this.familyClass = ((this.os2.exists && this.os2.familyClass) || 0) >> 8;\n    this.isSerif =\n      (_ref = this.familyClass) === 1 ||\n      _ref === 2 ||\n      _ref === 3 ||\n      _ref === 4 ||\n      _ref === 5 ||\n      _ref === 7;\n    this.isScript = this.familyClass === 10;\n    this.flags = 0;\n    if (this.post.isFixedPitch) {\n      this.flags |= 1 << 0;\n    }\n    if (this.isSerif) {\n      this.flags |= 1 << 1;\n    }\n    if (this.isScript) {\n      this.flags |= 1 << 3;\n    }\n    if (this.italicAngle !== 0) {\n      this.flags |= 1 << 6;\n    }\n    this.flags |= 1 << 5;\n    if (!this.cmap.unicode) {\n      throw new Error(\"No unicode cmap for font\");\n    }\n  };\n  TTFFont.prototype.characterToGlyph = function(character) {\n    var _ref;\n    return (\n      ((_ref = this.cmap.unicode) != null ? _ref.codeMap[character] : void 0) ||\n      0\n    );\n  };\n  TTFFont.prototype.widthOfGlyph = function(glyph) {\n    var scale;\n    scale = 1000.0 / this.head.unitsPerEm;\n    return this.hmtx.forGlyph(glyph).advance * scale;\n  };\n  TTFFont.prototype.widthOfString = function(string, size, charSpace) {\n    var charCode, i, scale, width, _ref;\n    string = \"\" + string;\n    width = 0;\n    for (\n      i = 0, _ref = string.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      charCode = string.charCodeAt(i);\n      width +=\n        this.widthOfGlyph(this.characterToGlyph(charCode)) +\n          charSpace * (1000 / size) || 0;\n    }\n    scale = size / 1000;\n    return width * scale;\n  };\n  TTFFont.prototype.lineHeight = function(size, includeGap) {\n    var gap;\n    if (includeGap == null) {\n      includeGap = false;\n    }\n    gap = includeGap ? this.lineGap : 0;\n    return ((this.ascender + gap - this.decender) / 1000) * size;\n  };\n  return TTFFont;\n})();\n\n/************************************************************************************************/\n/* function : Data                                                                              */\n/* comment : The ttf data decoded and stored in an array is read and written to the Data object.*/\n/************************************************************************************************/\nvar Data = (function() {\n  function Data(data) {\n    this.data = data != null ? data : [];\n    this.pos = 0;\n    this.length = this.data.length;\n  }\n  Data.prototype.readByte = function() {\n    return this.data[this.pos++];\n  };\n  Data.prototype.writeByte = function(byte) {\n    return (this.data[this.pos++] = byte);\n  };\n  Data.prototype.readUInt32 = function() {\n    var b1, b2, b3, b4;\n    b1 = this.readByte() * 0x1000000;\n    b2 = this.readByte() << 16;\n    b3 = this.readByte() << 8;\n    b4 = this.readByte();\n    return b1 + b2 + b3 + b4;\n  };\n  Data.prototype.writeUInt32 = function(val) {\n    this.writeByte((val >>> 24) & 0xff);\n    this.writeByte((val >> 16) & 0xff);\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt32 = function() {\n    var int;\n    int = this.readUInt32();\n    if (int >= 0x80000000) {\n      return int - 0x100000000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt32 = function(val) {\n    if (val < 0) {\n      val += 0x100000000;\n    }\n    return this.writeUInt32(val);\n  };\n  Data.prototype.readUInt16 = function() {\n    var b1, b2;\n    b1 = this.readByte() << 8;\n    b2 = this.readByte();\n    return b1 | b2;\n  };\n  Data.prototype.writeUInt16 = function(val) {\n    this.writeByte((val >> 8) & 0xff);\n    return this.writeByte(val & 0xff);\n  };\n  Data.prototype.readInt16 = function() {\n    var int;\n    int = this.readUInt16();\n    if (int >= 0x8000) {\n      return int - 0x10000;\n    } else {\n      return int;\n    }\n  };\n  Data.prototype.writeInt16 = function(val) {\n    if (val < 0) {\n      val += 0x10000;\n    }\n    return this.writeUInt16(val);\n  };\n  Data.prototype.readString = function(length) {\n    var i, ret;\n    ret = [];\n    for (\n      i = 0;\n      0 <= length ? i < length : i > length;\n      i = 0 <= length ? ++i : --i\n    ) {\n      ret[i] = String.fromCharCode(this.readByte());\n    }\n    return ret.join(\"\");\n  };\n  Data.prototype.writeString = function(val) {\n    var i, _ref, _results;\n    _results = [];\n    for (\n      i = 0, _ref = val.length;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      _results.push(this.writeByte(val.charCodeAt(i)));\n    }\n    return _results;\n  };\n  /*Data.prototype.stringAt = function (pos, length) {\n            this.pos = pos;\n            return this.readString(length);\n        };*/\n  Data.prototype.readShort = function() {\n    return this.readInt16();\n  };\n  Data.prototype.writeShort = function(val) {\n    return this.writeInt16(val);\n  };\n  Data.prototype.readLongLong = function() {\n    var b1, b2, b3, b4, b5, b6, b7, b8;\n    b1 = this.readByte();\n    b2 = this.readByte();\n    b3 = this.readByte();\n    b4 = this.readByte();\n    b5 = this.readByte();\n    b6 = this.readByte();\n    b7 = this.readByte();\n    b8 = this.readByte();\n    if (b1 & 0x80) {\n      return (\n        ((b1 ^ 0xff) * 0x100000000000000 +\n          (b2 ^ 0xff) * 0x1000000000000 +\n          (b3 ^ 0xff) * 0x10000000000 +\n          (b4 ^ 0xff) * 0x100000000 +\n          (b5 ^ 0xff) * 0x1000000 +\n          (b6 ^ 0xff) * 0x10000 +\n          (b7 ^ 0xff) * 0x100 +\n          (b8 ^ 0xff) +\n          1) *\n        -1\n      );\n    }\n    return (\n      b1 * 0x100000000000000 +\n      b2 * 0x1000000000000 +\n      b3 * 0x10000000000 +\n      b4 * 0x100000000 +\n      b5 * 0x1000000 +\n      b6 * 0x10000 +\n      b7 * 0x100 +\n      b8\n    );\n  };\n  Data.prototype.writeLongLong = function(val) {\n    var high, low;\n    high = Math.floor(val / 0x100000000);\n    low = val & 0xffffffff;\n    this.writeByte((high >> 24) & 0xff);\n    this.writeByte((high >> 16) & 0xff);\n    this.writeByte((high >> 8) & 0xff);\n    this.writeByte(high & 0xff);\n    this.writeByte((low >> 24) & 0xff);\n    this.writeByte((low >> 16) & 0xff);\n    this.writeByte((low >> 8) & 0xff);\n    return this.writeByte(low & 0xff);\n  };\n  Data.prototype.readInt = function() {\n    return this.readInt32();\n  };\n  Data.prototype.writeInt = function(val) {\n    return this.writeInt32(val);\n  };\n  /*Data.prototype.slice = function (start, end) {\n            return this.data.slice(start, end);\n        };*/\n  Data.prototype.read = function(bytes) {\n    var buf, i;\n    buf = [];\n    for (\n      i = 0;\n      0 <= bytes ? i < bytes : i > bytes;\n      i = 0 <= bytes ? ++i : --i\n    ) {\n      buf.push(this.readByte());\n    }\n    return buf;\n  };\n  Data.prototype.write = function(bytes) {\n    var byte, i, _len, _results;\n    _results = [];\n    for (i = 0, _len = bytes.length; i < _len; i++) {\n      byte = bytes[i];\n      _results.push(this.writeByte(byte));\n    }\n    return _results;\n  };\n  return Data;\n})();\n\nvar Directory = (function() {\n  var checksum;\n\n  /*****************************************************************************************************/\n  /* function : Directory generator                                                                    */\n  /* comment : Initialize the offset, tag, length, and checksum for each table for the font to be used.*/\n  /*****************************************************************************************************/\n  function Directory(data) {\n    var entry, i, _ref;\n    this.scalarType = data.readInt();\n    this.tableCount = data.readShort();\n    this.searchRange = data.readShort();\n    this.entrySelector = data.readShort();\n    this.rangeShift = data.readShort();\n    this.tables = {};\n    for (\n      i = 0, _ref = this.tableCount;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      entry = {\n        tag: data.readString(4),\n        checksum: data.readInt(),\n        offset: data.readInt(),\n        length: data.readInt()\n      };\n      this.tables[entry.tag] = entry;\n    }\n  }\n  /********************************************************************************************************/\n  /* function : encode                                                                                    */\n  /* comment : It encodes and stores the font table object and information used for the directory object. */\n  /********************************************************************************************************/\n  Directory.prototype.encode = function(tables) {\n    var adjustment,\n      directory,\n      directoryLength,\n      entrySelector,\n      headOffset,\n      log2,\n      offset,\n      rangeShift,\n      searchRange,\n      sum,\n      table,\n      tableCount,\n      tableData,\n      tag;\n    tableCount = Object.keys(tables).length;\n    log2 = Math.log(2);\n    searchRange = Math.floor(Math.log(tableCount) / log2) * 16;\n    entrySelector = Math.floor(searchRange / log2);\n    rangeShift = tableCount * 16 - searchRange;\n    directory = new Data();\n    directory.writeInt(this.scalarType);\n    directory.writeShort(tableCount);\n    directory.writeShort(searchRange);\n    directory.writeShort(entrySelector);\n    directory.writeShort(rangeShift);\n    directoryLength = tableCount * 16;\n    offset = directory.pos + directoryLength;\n    headOffset = null;\n    tableData = [];\n    for (tag in tables) {\n      table = tables[tag];\n      directory.writeString(tag);\n      directory.writeInt(checksum(table));\n      directory.writeInt(offset);\n      directory.writeInt(table.length);\n      tableData = tableData.concat(table);\n      if (tag === \"head\") {\n        headOffset = offset;\n      }\n      offset += table.length;\n      while (offset % 4) {\n        tableData.push(0);\n        offset++;\n      }\n    }\n    directory.write(tableData);\n    sum = checksum(directory.data);\n    adjustment = 0xb1b0afba - sum;\n    directory.pos = headOffset + 8;\n    directory.writeUInt32(adjustment);\n    return directory.data;\n  };\n  /***************************************************************/\n  /* function : checksum                                         */\n  /* comment : Duplicate the table for the tag.                  */\n  /***************************************************************/\n  checksum = function(data) {\n    var i, sum, tmp, _ref;\n    data = __slice.call(data);\n    while (data.length % 4) {\n      data.push(0);\n    }\n    tmp = new Data(data);\n    sum = 0;\n    for (i = 0, _ref = data.length; i < _ref; i = i += 4) {\n      sum += tmp.readUInt32();\n    }\n    return sum & 0xffffffff;\n  };\n  return Directory;\n})();\n\nvar Table,\n  __hasProp = {}.hasOwnProperty,\n  __extends = function(child, parent) {\n    for (var key in parent) {\n      if (__hasProp.call(parent, key)) child[key] = parent[key];\n    }\n\n    function ctor() {\n      this.constructor = child;\n    }\n    ctor.prototype = parent.prototype;\n    child.prototype = new ctor();\n    child.__super__ = parent.prototype;\n    return child;\n  };\n\n/***************************************************************/\n/* function : Table                                            */\n/* comment : Save info for each table, and parse the table.    */\n/***************************************************************/\nTable = (function() {\n  function Table(file) {\n    var info;\n    this.file = file;\n    info = this.file.directory.tables[this.tag];\n    this.exists = !!info;\n    if (info) {\n      (this.offset = info.offset), (this.length = info.length);\n      this.parse(this.file.contents);\n    }\n  }\n  Table.prototype.parse = function() {};\n  Table.prototype.encode = function() {};\n  Table.prototype.raw = function() {\n    if (!this.exists) {\n      return null;\n    }\n    this.file.contents.pos = this.offset;\n    return this.file.contents.read(this.length);\n  };\n  return Table;\n})();\n\nvar HeadTable = (function(_super) {\n  __extends(HeadTable, _super);\n\n  function HeadTable() {\n    return HeadTable.__super__.constructor.apply(this, arguments);\n  }\n  HeadTable.prototype.tag = \"head\";\n  HeadTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.revision = data.readInt();\n    this.checkSumAdjustment = data.readInt();\n    this.magicNumber = data.readInt();\n    this.flags = data.readShort();\n    this.unitsPerEm = data.readShort();\n    this.created = data.readLongLong();\n    this.modified = data.readLongLong();\n    this.xMin = data.readShort();\n    this.yMin = data.readShort();\n    this.xMax = data.readShort();\n    this.yMax = data.readShort();\n    this.macStyle = data.readShort();\n    this.lowestRecPPEM = data.readShort();\n    this.fontDirectionHint = data.readShort();\n    this.indexToLocFormat = data.readShort();\n    return (this.glyphDataFormat = data.readShort());\n  };\n  HeadTable.prototype.encode = function(indexToLocFormat) {\n    var table;\n    table = new Data();\n    table.writeInt(this.version);\n    table.writeInt(this.revision);\n    table.writeInt(this.checkSumAdjustment);\n    table.writeInt(this.magicNumber);\n    table.writeShort(this.flags);\n    table.writeShort(this.unitsPerEm);\n    table.writeLongLong(this.created);\n    table.writeLongLong(this.modified);\n    table.writeShort(this.xMin);\n    table.writeShort(this.yMin);\n    table.writeShort(this.xMax);\n    table.writeShort(this.yMax);\n    table.writeShort(this.macStyle);\n    table.writeShort(this.lowestRecPPEM);\n    table.writeShort(this.fontDirectionHint);\n    table.writeShort(indexToLocFormat);\n    table.writeShort(this.glyphDataFormat);\n    return table.data;\n  };\n  return HeadTable;\n})(Table);\n\n/************************************************************************************/\n/* function : CmapEntry                                                             */\n/* comment : Cmap Initializes and encodes object information (required by pdf spec).*/\n/************************************************************************************/\nvar CmapEntry = (function() {\n  function CmapEntry(data, offset) {\n    var code,\n      count,\n      endCode,\n      glyphId,\n      glyphIds,\n      i,\n      idDelta,\n      idRangeOffset,\n      index,\n      saveOffset,\n      segCount,\n      segCountX2,\n      start,\n      startCode,\n      tail,\n      _j,\n      _k,\n      _len;\n    this.platformID = data.readUInt16();\n    this.encodingID = data.readShort();\n    this.offset = offset + data.readInt();\n    saveOffset = data.pos;\n    data.pos = this.offset;\n    this.format = data.readUInt16();\n    this.length = data.readUInt16();\n    this.language = data.readUInt16();\n    this.isUnicode =\n      (this.platformID === 3 && this.encodingID === 1 && this.format === 4) ||\n      (this.platformID === 0 && this.format === 4);\n    this.codeMap = {};\n    switch (this.format) {\n      case 0:\n        for (i = 0; i < 256; ++i) {\n          this.codeMap[i] = data.readByte();\n        }\n        break;\n      case 4:\n        segCountX2 = data.readUInt16();\n        segCount = segCountX2 / 2;\n        data.pos += 6;\n        endCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        data.pos += 2;\n        startCode = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idDelta = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        idRangeOffset = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= segCount ? _j < segCount : _j > segCount;\n            i = 0 <= segCount ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        count = (this.length - data.pos + this.offset) / 2;\n        glyphIds = (function() {\n          var _j, _results;\n          _results = [];\n          for (\n            i = _j = 0;\n            0 <= count ? _j < count : _j > count;\n            i = 0 <= count ? ++_j : --_j\n          ) {\n            _results.push(data.readUInt16());\n          }\n          return _results;\n        })();\n        for (i = _j = 0, _len = endCode.length; _j < _len; i = ++_j) {\n          tail = endCode[i];\n          start = startCode[i];\n          for (\n            code = _k = start;\n            start <= tail ? _k <= tail : _k >= tail;\n            code = start <= tail ? ++_k : --_k\n          ) {\n            if (idRangeOffset[i] === 0) {\n              glyphId = code + idDelta[i];\n            } else {\n              index = idRangeOffset[i] / 2 + (code - start) - (segCount - i);\n              glyphId = glyphIds[index] || 0;\n              if (glyphId !== 0) {\n                glyphId += idDelta[i];\n              }\n            }\n            this.codeMap[code] = glyphId & 0xffff;\n          }\n        }\n    }\n    data.pos = saveOffset;\n  }\n  CmapEntry.encode = function(charmap, encoding) {\n    var charMap,\n      code,\n      codeMap,\n      codes,\n      delta,\n      deltas,\n      diff,\n      endCode,\n      endCodes,\n      entrySelector,\n      glyphIDs,\n      i,\n      id,\n      indexes,\n      last,\n      map,\n      nextID,\n      offset,\n      old,\n      rangeOffsets,\n      rangeShift,\n      searchRange,\n      segCount,\n      segCountX2,\n      startCode,\n      startCodes,\n      startGlyph,\n      subtable,\n      _i,\n      _j,\n      _k,\n      _l,\n      _len,\n      _len1,\n      _len2,\n      _len3,\n      _len4,\n      _len5,\n      _len6,\n      _len7,\n      _m,\n      _n,\n      _name,\n      _o,\n      _p,\n      _q;\n    subtable = new Data();\n    codes = Object.keys(charmap).sort(function(a, b) {\n      return a - b;\n    });\n    switch (encoding) {\n      case \"macroman\":\n        id = 0;\n        indexes = (function() {\n          var _results = [];\n          for (i = 0; i < 256; ++i) {\n            _results.push(0);\n          }\n          return _results;\n        })();\n        map = {\n          0: 0\n        };\n        codeMap = {};\n        for (_i = 0, _len = codes.length; _i < _len; _i++) {\n          code = codes[_i];\n          if (map[(_name = charmap[code])] == null) {\n            map[_name] = ++id;\n          }\n          codeMap[code] = {\n            old: charmap[code],\n            new: map[charmap[code]]\n          };\n          indexes[code] = map[charmap[code]];\n        }\n        subtable.writeUInt16(1);\n        subtable.writeUInt16(0);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(262);\n        subtable.writeUInt16(0);\n        subtable.write(indexes);\n        return {\n          charMap: codeMap,\n          subtable: subtable.data,\n          maxGlyphID: id + 1\n        };\n      case \"unicode\":\n        startCodes = [];\n        endCodes = [];\n        nextID = 0;\n        map = {};\n        charMap = {};\n        last = diff = null;\n        for (_j = 0, _len1 = codes.length; _j < _len1; _j++) {\n          code = codes[_j];\n          old = charmap[code];\n          if (map[old] == null) {\n            map[old] = ++nextID;\n          }\n          charMap[code] = {\n            old: old,\n            new: map[old]\n          };\n          delta = map[old] - code;\n          if (last == null || delta !== diff) {\n            if (last) {\n              endCodes.push(last);\n            }\n            startCodes.push(code);\n            diff = delta;\n          }\n          last = code;\n        }\n        if (last) {\n          endCodes.push(last);\n        }\n        endCodes.push(0xffff);\n        startCodes.push(0xffff);\n        segCount = startCodes.length;\n        segCountX2 = segCount * 2;\n        searchRange = 2 * Math.pow(Math.log(segCount) / Math.LN2, 2);\n        entrySelector = Math.log(searchRange / 2) / Math.LN2;\n        rangeShift = 2 * segCount - searchRange;\n        deltas = [];\n        rangeOffsets = [];\n        glyphIDs = [];\n        for (i = _k = 0, _len2 = startCodes.length; _k < _len2; i = ++_k) {\n          startCode = startCodes[i];\n          endCode = endCodes[i];\n          if (startCode === 0xffff) {\n            deltas.push(0);\n            rangeOffsets.push(0);\n            break;\n          }\n          startGlyph = charMap[startCode][\"new\"];\n          if (startCode - startGlyph >= 0x8000) {\n            deltas.push(0);\n            rangeOffsets.push(2 * (glyphIDs.length + segCount - i));\n            for (\n              code = _l = startCode;\n              startCode <= endCode ? _l <= endCode : _l >= endCode;\n              code = startCode <= endCode ? ++_l : --_l\n            ) {\n              glyphIDs.push(charMap[code][\"new\"]);\n            }\n          } else {\n            deltas.push(startGlyph - startCode);\n            rangeOffsets.push(0);\n          }\n        }\n        subtable.writeUInt16(3);\n        subtable.writeUInt16(1);\n        subtable.writeUInt32(12);\n        subtable.writeUInt16(4);\n        subtable.writeUInt16(16 + segCount * 8 + glyphIDs.length * 2);\n        subtable.writeUInt16(0);\n        subtable.writeUInt16(segCountX2);\n        subtable.writeUInt16(searchRange);\n        subtable.writeUInt16(entrySelector);\n        subtable.writeUInt16(rangeShift);\n        for (_m = 0, _len3 = endCodes.length; _m < _len3; _m++) {\n          code = endCodes[_m];\n          subtable.writeUInt16(code);\n        }\n        subtable.writeUInt16(0);\n        for (_n = 0, _len4 = startCodes.length; _n < _len4; _n++) {\n          code = startCodes[_n];\n          subtable.writeUInt16(code);\n        }\n        for (_o = 0, _len5 = deltas.length; _o < _len5; _o++) {\n          delta = deltas[_o];\n          subtable.writeUInt16(delta);\n        }\n        for (_p = 0, _len6 = rangeOffsets.length; _p < _len6; _p++) {\n          offset = rangeOffsets[_p];\n          subtable.writeUInt16(offset);\n        }\n        for (_q = 0, _len7 = glyphIDs.length; _q < _len7; _q++) {\n          id = glyphIDs[_q];\n          subtable.writeUInt16(id);\n        }\n        return {\n          charMap: charMap,\n          subtable: subtable.data,\n          maxGlyphID: nextID + 1\n        };\n    }\n  };\n  return CmapEntry;\n})();\n\nvar CmapTable = (function(_super) {\n  __extends(CmapTable, _super);\n\n  function CmapTable() {\n    return CmapTable.__super__.constructor.apply(this, arguments);\n  }\n  CmapTable.prototype.tag = \"cmap\";\n  CmapTable.prototype.parse = function(data) {\n    var entry, i, tableCount;\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    tableCount = data.readUInt16();\n    this.tables = [];\n    this.unicode = null;\n    for (\n      i = 0;\n      0 <= tableCount ? i < tableCount : i > tableCount;\n      i = 0 <= tableCount ? ++i : --i\n    ) {\n      entry = new CmapEntry(data, this.offset);\n      this.tables.push(entry);\n      if (entry.isUnicode) {\n        if (this.unicode == null) {\n          this.unicode = entry;\n        }\n      }\n    }\n    return true;\n  };\n  /*************************************************************************/\n  /* function : encode                                                     */\n  /* comment : Encode the cmap table corresponding to the input character. */\n  /*************************************************************************/\n  CmapTable.encode = function(charmap, encoding) {\n    var result, table;\n    if (encoding == null) {\n      encoding = \"macroman\";\n    }\n    result = CmapEntry.encode(charmap, encoding);\n    table = new Data();\n    table.writeUInt16(0);\n    table.writeUInt16(1);\n    result.table = table.data.concat(result.subtable);\n    return result;\n  };\n  return CmapTable;\n})(Table);\n\nvar HheaTable = (function(_super) {\n  __extends(HheaTable, _super);\n\n  function HheaTable() {\n    return HheaTable.__super__.constructor.apply(this, arguments);\n  }\n  HheaTable.prototype.tag = \"hhea\";\n  HheaTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.ascender = data.readShort();\n    this.decender = data.readShort();\n    this.lineGap = data.readShort();\n    this.advanceWidthMax = data.readShort();\n    this.minLeftSideBearing = data.readShort();\n    this.minRightSideBearing = data.readShort();\n    this.xMaxExtent = data.readShort();\n    this.caretSlopeRise = data.readShort();\n    this.caretSlopeRun = data.readShort();\n    this.caretOffset = data.readShort();\n    data.pos += 4 * 2;\n    this.metricDataFormat = data.readShort();\n    return (this.numberOfMetrics = data.readUInt16());\n  };\n  /*HheaTable.prototype.encode = function (ids) {\n            var i, table, _i, _ref;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeShort(this.ascender);\n            table.writeShort(this.decender);\n            table.writeShort(this.lineGap);\n            table.writeShort(this.advanceWidthMax);\n            table.writeShort(this.minLeftSideBearing);\n            table.writeShort(this.minRightSideBearing);\n            table.writeShort(this.xMaxExtent);\n            table.writeShort(this.caretSlopeRise);\n            table.writeShort(this.caretSlopeRun);\n            table.writeShort(this.caretOffset);\n            for (i = _i = 0, _ref = 4 * 2; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                table.writeByte(0);\n            }\n            table.writeShort(this.metricDataFormat);\n            table.writeUInt16(ids.length);\n            return table.data;\n        };*/\n  return HheaTable;\n})(Table);\n\nvar OS2Table = (function(_super) {\n  __extends(OS2Table, _super);\n\n  function OS2Table() {\n    return OS2Table.__super__.constructor.apply(this, arguments);\n  }\n  OS2Table.prototype.tag = \"OS/2\";\n  OS2Table.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readUInt16();\n    this.averageCharWidth = data.readShort();\n    this.weightClass = data.readUInt16();\n    this.widthClass = data.readUInt16();\n    this.type = data.readShort();\n    this.ySubscriptXSize = data.readShort();\n    this.ySubscriptYSize = data.readShort();\n    this.ySubscriptXOffset = data.readShort();\n    this.ySubscriptYOffset = data.readShort();\n    this.ySuperscriptXSize = data.readShort();\n    this.ySuperscriptYSize = data.readShort();\n    this.ySuperscriptXOffset = data.readShort();\n    this.ySuperscriptYOffset = data.readShort();\n    this.yStrikeoutSize = data.readShort();\n    this.yStrikeoutPosition = data.readShort();\n    this.familyClass = data.readShort();\n    this.panose = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 10; ++i) {\n        _results.push(data.readByte());\n      }\n      return _results;\n    })();\n    this.charRange = (function() {\n      var i, _results;\n      _results = [];\n      for (i = 0; i < 4; ++i) {\n        _results.push(data.readInt());\n      }\n      return _results;\n    })();\n    this.vendorID = data.readString(4);\n    this.selection = data.readShort();\n    this.firstCharIndex = data.readShort();\n    this.lastCharIndex = data.readShort();\n    if (this.version > 0) {\n      this.ascent = data.readShort();\n      this.descent = data.readShort();\n      this.lineGap = data.readShort();\n      this.winAscent = data.readShort();\n      this.winDescent = data.readShort();\n      this.codePageRange = (function() {\n        var i, _results;\n        _results = [];\n        for (i = 0; i < 2; i = ++i) {\n          _results.push(data.readInt());\n        }\n        return _results;\n      })();\n      if (this.version > 1) {\n        this.xHeight = data.readShort();\n        this.capHeight = data.readShort();\n        this.defaultChar = data.readShort();\n        this.breakChar = data.readShort();\n        return (this.maxContext = data.readShort());\n      }\n    }\n  };\n  /*OS2Table.prototype.encode = function () {\n            return this.raw();\n        };*/\n  return OS2Table;\n})(Table);\n\nvar PostTable = (function(_super) {\n  var POSTSCRIPT_GLYPHS;\n  __extends(PostTable, _super);\n\n  function PostTable() {\n    return PostTable.__super__.constructor.apply(this, arguments);\n  }\n  PostTable.prototype.tag = \"post\";\n  PostTable.prototype.parse = function(data) {\n    var length, numberOfGlyphs, _results;\n    data.pos = this.offset;\n    this.format = data.readInt();\n    this.italicAngle = data.readInt();\n    this.underlinePosition = data.readShort();\n    this.underlineThickness = data.readShort();\n    this.isFixedPitch = data.readInt();\n    this.minMemType42 = data.readInt();\n    this.maxMemType42 = data.readInt();\n    this.minMemType1 = data.readInt();\n    this.maxMemType1 = data.readInt();\n    switch (this.format) {\n      case 0x00010000:\n        break;\n      case 0x00020000:\n        numberOfGlyphs = data.readUInt16();\n        this.glyphNameIndex = [];\n        var i;\n        for (\n          i = 0;\n          0 <= numberOfGlyphs ? i < numberOfGlyphs : i > numberOfGlyphs;\n          i = 0 <= numberOfGlyphs ? ++i : --i\n        ) {\n          this.glyphNameIndex.push(data.readUInt16());\n        }\n        this.names = [];\n        _results = [];\n        while (data.pos < this.offset + this.length) {\n          length = data.readByte();\n          _results.push(this.names.push(data.readString(length)));\n        }\n        return _results;\n      case 0x00025000:\n        numberOfGlyphs = data.readUInt16();\n        return (this.offsets = data.read(numberOfGlyphs));\n      case 0x00030000:\n        break;\n      case 0x00040000:\n        return (this.map = function() {\n          var _j, _ref, _results1;\n          _results1 = [];\n          for (\n            i = _j = 0, _ref = this.file.maxp.numGlyphs;\n            0 <= _ref ? _j < _ref : _j > _ref;\n            i = 0 <= _ref ? ++_j : --_j\n          ) {\n            _results1.push(data.readUInt32());\n          }\n          return _results1;\n        }.call(this));\n    }\n  };\n  /*PostTable.prototype.glyphFor = function (code) {\n            var index;\n            switch (this.format) {\n            case 0x00010000:\n                return POSTSCRIPT_GLYPHS[code] || '.notdef';\n            case 0x00020000:\n                index = this.glyphNameIndex[code];\n                if (index <= 257) {\n                    return POSTSCRIPT_GLYPHS[index];\n                }\n                else {\n                    return this.names[index - 258] || '.notdef';\n                }\n                break;\n            case 0x00025000:\n                return POSTSCRIPT_GLYPHS[code + this.offsets[code]] || '.notdef';\n            case 0x00030000:\n                return '.notdef';\n            case 0x00040000:\n                return this.map[code] || 0xFFFF;\n            }\n        };*/\n  /*PostTable.prototype.encode = function (mapping) {\n            var id, index, indexes, position, post, raw, string, strings, table, _i, _j, _k, _len, _len1, _len2;\n            if (!this.exists) {\n                return null;\n            }\n            raw = this.raw();\n            if (this.format === 0x00030000) {\n                return raw;\n            }\n            table = new Data(raw.slice(0, 32));\n            table.writeUInt32(0x00020000);\n            table.pos = 32;\n            indexes = [];\n            strings = [];\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                post = this.glyphFor(id);\n                position = POSTSCRIPT_GLYPHS.indexOf(post);\n                if (position !== -1) {\n                    indexes.push(position);\n                }\n                else {\n                    indexes.push(257 + strings.length);\n                    strings.push(post);\n                }\n            }\n            table.writeUInt16(Object.keys(mapping).length);\n            for (_j = 0, _len1 = indexes.length; _j < _len1; _j++) {\n                index = indexes[_j];\n                table.writeUInt16(index);\n            }\n            for (_k = 0, _len2 = strings.length; _k < _len2; _k++) {\n                string = strings[_k];\n                table.writeByte(string.length);\n                table.writeString(string);\n            }\n            return table.data;\n        };*/\n  POSTSCRIPT_GLYPHS = \".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent\\nampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash\\nzero one two three four five six seven eight nine colon semicolon less equal greater\\nquestion at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z\\nbracketleft backslash bracketright asciicircum underscore grave\\na b c d e f g h i j k l m n o p q r s t u v w x y z\\nbraceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis\\nUdieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave\\necircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve\\nocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent\\nsterling section bullet paragraph germandbls registered copyright trademark acute\\ndieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu\\npartialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash\\nquestiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft\\nguillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash\\nquotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis\\nfraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered\\nquotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis\\nEgrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute\\nUcircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla\\nhungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth\\neth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior\\nonehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla\\nCacute cacute Ccaron ccaron dcroat\".split(\n    /\\s+/g\n  );\n  return PostTable;\n})(Table);\n\n/*********************************************************************************************************/\n/* function : NameEntry                                                                                  */\n/* comment : Store copyright information, platformID, encodingID, and languageID in the NameEntry object.*/\n/*********************************************************************************************************/\nvar NameEntry = (function() {\n  function NameEntry(raw, entry) {\n    this.raw = raw;\n    this.length = raw.length;\n    this.platformID = entry.platformID;\n    this.encodingID = entry.encodingID;\n    this.languageID = entry.languageID;\n  }\n  return NameEntry;\n})();\n\nvar NameTable = (function(_super) {\n  var subsetTag;\n  __extends(NameTable, _super);\n\n  function NameTable() {\n    return NameTable.__super__.constructor.apply(this, arguments);\n  }\n  NameTable.prototype.tag = \"name\";\n  NameTable.prototype.parse = function(data) {\n    var count,\n      entries,\n      entry,\n      i,\n      name,\n      stringOffset,\n      strings,\n      text,\n      _j,\n      _len,\n      _name;\n    data.pos = this.offset;\n    data.readShort(); //format\n    count = data.readShort();\n    stringOffset = data.readShort();\n    entries = [];\n    for (\n      i = 0;\n      0 <= count ? i < count : i > count;\n      i = 0 <= count ? ++i : --i\n    ) {\n      entries.push({\n        platformID: data.readShort(),\n        encodingID: data.readShort(),\n        languageID: data.readShort(),\n        nameID: data.readShort(),\n        length: data.readShort(),\n        offset: this.offset + stringOffset + data.readShort()\n      });\n    }\n    strings = {};\n    for (i = _j = 0, _len = entries.length; _j < _len; i = ++_j) {\n      entry = entries[i];\n      data.pos = entry.offset;\n      text = data.readString(entry.length);\n      name = new NameEntry(text, entry);\n      if (strings[(_name = entry.nameID)] == null) {\n        strings[_name] = [];\n      }\n      strings[entry.nameID].push(name);\n    }\n    this.strings = strings;\n    this.copyright = strings[0];\n    this.fontFamily = strings[1];\n    this.fontSubfamily = strings[2];\n    this.uniqueSubfamily = strings[3];\n    this.fontName = strings[4];\n    this.version = strings[5];\n    try {\n      this.postscriptName = strings[6][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    } catch (e) {\n      this.postscriptName = strings[4][0].raw.replace(\n        /[\\x00-\\x19\\x80-\\xff]/g,\n        \"\"\n      );\n    }\n    this.trademark = strings[7];\n    this.manufacturer = strings[8];\n    this.designer = strings[9];\n    this.description = strings[10];\n    this.vendorUrl = strings[11];\n    this.designerUrl = strings[12];\n    this.license = strings[13];\n    this.licenseUrl = strings[14];\n    this.preferredFamily = strings[15];\n    this.preferredSubfamily = strings[17];\n    this.compatibleFull = strings[18];\n    return (this.sampleText = strings[19]);\n  };\n  subsetTag = \"AAAAAA\";\n  /*NameTable.prototype.encode = function () {\n            var id, list, nameID, nameTable, postscriptName, strCount, strTable, string, strings, table, val, _i, _len, _ref;\n            strings = {};\n            _ref = this.strings;\n            for (id in _ref) {\n                val = _ref[id];\n                strings[id] = val;\n            }\n            postscriptName = new NameEntry(\"\" + subsetTag + \"+\" + this.postscriptName, {\n                platformID: 1\n                , encodingID: 0\n                , languageID: 0\n            });\n            strings[6] = [postscriptName];\n            subsetTag = successorOf(subsetTag);\n            strCount = 0;\n            for (id in strings) {\n                list = strings[id];\n                if (list != null) {\n                    strCount += list.length;\n                }\n            }\n            table = new Data;\n            strTable = new Data;\n            table.writeShort(0);\n            table.writeShort(strCount);\n            table.writeShort(6 + 12 * strCount);\n            for (nameID in strings) {\n                list = strings[nameID];\n                if (list != null) {\n                    for (_i = 0, _len = list.length; _i < _len; _i++) {\n                        string = list[_i];\n                        table.writeShort(string.platformID);\n                        table.writeShort(string.encodingID);\n                        table.writeShort(string.languageID);\n                        table.writeShort(nameID);\n                        table.writeShort(string.length);\n                        table.writeShort(strTable.pos);\n                        strTable.writeString(string.raw);\n                    }\n                }\n            }\n            return nameTable = {\n                postscriptName: postscriptName.raw\n                , table: table.data.concat(strTable.data)\n            };\n        };*/\n  return NameTable;\n})(Table);\n\nvar MaxpTable = (function(_super) {\n  __extends(MaxpTable, _super);\n\n  function MaxpTable() {\n    return MaxpTable.__super__.constructor.apply(this, arguments);\n  }\n  MaxpTable.prototype.tag = \"maxp\";\n  MaxpTable.prototype.parse = function(data) {\n    data.pos = this.offset;\n    this.version = data.readInt();\n    this.numGlyphs = data.readUInt16();\n    this.maxPoints = data.readUInt16();\n    this.maxContours = data.readUInt16();\n    this.maxCompositePoints = data.readUInt16();\n    this.maxComponentContours = data.readUInt16();\n    this.maxZones = data.readUInt16();\n    this.maxTwilightPoints = data.readUInt16();\n    this.maxStorage = data.readUInt16();\n    this.maxFunctionDefs = data.readUInt16();\n    this.maxInstructionDefs = data.readUInt16();\n    this.maxStackElements = data.readUInt16();\n    this.maxSizeOfInstructions = data.readUInt16();\n    this.maxComponentElements = data.readUInt16();\n    return (this.maxComponentDepth = data.readUInt16());\n  };\n  /*MaxpTable.prototype.encode = function (ids) {\n            var table;\n            table = new Data;\n            table.writeInt(this.version);\n            table.writeUInt16(ids.length);\n            table.writeUInt16(this.maxPoints);\n            table.writeUInt16(this.maxContours);\n            table.writeUInt16(this.maxCompositePoints);\n            table.writeUInt16(this.maxComponentContours);\n            table.writeUInt16(this.maxZones);\n            table.writeUInt16(this.maxTwilightPoints);\n            table.writeUInt16(this.maxStorage);\n            table.writeUInt16(this.maxFunctionDefs);\n            table.writeUInt16(this.maxInstructionDefs);\n            table.writeUInt16(this.maxStackElements);\n            table.writeUInt16(this.maxSizeOfInstructions);\n            table.writeUInt16(this.maxComponentElements);\n            table.writeUInt16(this.maxComponentDepth);\n            return table.data;\n        };*/\n  return MaxpTable;\n})(Table);\n\nvar HmtxTable = (function(_super) {\n  __extends(HmtxTable, _super);\n\n  function HmtxTable() {\n    return HmtxTable.__super__.constructor.apply(this, arguments);\n  }\n  HmtxTable.prototype.tag = \"hmtx\";\n  HmtxTable.prototype.parse = function(data) {\n    var i, last, lsbCount, m, _j, _ref, _results;\n    data.pos = this.offset;\n    this.metrics = [];\n    for (\n      i = 0, _ref = this.file.hhea.numberOfMetrics;\n      0 <= _ref ? i < _ref : i > _ref;\n      i = 0 <= _ref ? ++i : --i\n    ) {\n      this.metrics.push({\n        advance: data.readUInt16(),\n        lsb: data.readInt16()\n      });\n    }\n    lsbCount = this.file.maxp.numGlyphs - this.file.hhea.numberOfMetrics;\n    this.leftSideBearings = (function() {\n      var _j, _results;\n      _results = [];\n      for (\n        i = _j = 0;\n        0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n        i = 0 <= lsbCount ? ++_j : --_j\n      ) {\n        _results.push(data.readInt16());\n      }\n      return _results;\n    })();\n    this.widths = function() {\n      var _j, _len, _ref1, _results;\n      _ref1 = this.metrics;\n      _results = [];\n      for (_j = 0, _len = _ref1.length; _j < _len; _j++) {\n        m = _ref1[_j];\n        _results.push(m.advance);\n      }\n      return _results;\n    }.call(this);\n    last = this.widths[this.widths.length - 1];\n    _results = [];\n    for (\n      i = _j = 0;\n      0 <= lsbCount ? _j < lsbCount : _j > lsbCount;\n      i = 0 <= lsbCount ? ++_j : --_j\n    ) {\n      _results.push(this.widths.push(last));\n    }\n    return _results;\n  };\n  /***************************************************************/\n  /* function : forGlyph                                         */\n  /* comment : Returns the advance width and lsb for this glyph. */\n  /***************************************************************/\n  HmtxTable.prototype.forGlyph = function(id) {\n    if (id in this.metrics) {\n      return this.metrics[id];\n    }\n    return {\n      advance: this.metrics[this.metrics.length - 1].advance,\n      lsb: this.leftSideBearings[id - this.metrics.length]\n    };\n  };\n  /*HmtxTable.prototype.encode = function (mapping) {\n            var id, metric, table, _i, _len;\n            table = new Data;\n            for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n                id = mapping[_i];\n                metric = this.forGlyph(id);\n                table.writeUInt16(metric.advance);\n                table.writeUInt16(metric.lsb);\n            }\n            return table.data;\n        };*/\n  return HmtxTable;\n})(Table);\n\nvar __slice = [].slice;\n\nvar GlyfTable = (function(_super) {\n  __extends(GlyfTable, _super);\n\n  function GlyfTable() {\n    return GlyfTable.__super__.constructor.apply(this, arguments);\n  }\n  GlyfTable.prototype.tag = \"glyf\";\n  GlyfTable.prototype.parse = function() {\n    return (this.cache = {});\n  };\n  GlyfTable.prototype.glyphFor = function(id) {\n    var data,\n      index,\n      length,\n      loca,\n      numberOfContours,\n      raw,\n      xMax,\n      xMin,\n      yMax,\n      yMin;\n    if (id in this.cache) {\n      return this.cache[id];\n    }\n    loca = this.file.loca;\n    data = this.file.contents;\n    index = loca.indexOf(id);\n    length = loca.lengthOf(id);\n    if (length === 0) {\n      return (this.cache[id] = null);\n    }\n    data.pos = this.offset + index;\n    raw = new Data(data.read(length));\n    numberOfContours = raw.readShort();\n    xMin = raw.readShort();\n    yMin = raw.readShort();\n    xMax = raw.readShort();\n    yMax = raw.readShort();\n    if (numberOfContours === -1) {\n      this.cache[id] = new CompoundGlyph(raw, xMin, yMin, xMax, yMax);\n    } else {\n      this.cache[id] = new SimpleGlyph(\n        raw,\n        numberOfContours,\n        xMin,\n        yMin,\n        xMax,\n        yMax\n      );\n    }\n    return this.cache[id];\n  };\n  GlyfTable.prototype.encode = function(glyphs, mapping, old2new) {\n    var glyph, id, offsets, table, _i, _len;\n    table = [];\n    offsets = [];\n    for (_i = 0, _len = mapping.length; _i < _len; _i++) {\n      id = mapping[_i];\n      glyph = glyphs[id];\n      offsets.push(table.length);\n      if (glyph) {\n        table = table.concat(glyph.encode(old2new));\n      }\n    }\n    offsets.push(table.length);\n    return {\n      table: table,\n      offsets: offsets\n    };\n  };\n  return GlyfTable;\n})(Table);\n\nvar SimpleGlyph = (function() {\n  /**************************************************************************/\n  /* function : SimpleGlyph                                                 */\n  /* comment : Stores raw, xMin, yMin, xMax, and yMax values for this glyph.*/\n  /**************************************************************************/\n  function SimpleGlyph(raw, numberOfContours, xMin, yMin, xMax, yMax) {\n    this.raw = raw;\n    this.numberOfContours = numberOfContours;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = false;\n  }\n  SimpleGlyph.prototype.encode = function() {\n    return this.raw.data;\n  };\n  return SimpleGlyph;\n})();\n\nvar CompoundGlyph = (function() {\n  var ARG_1_AND_2_ARE_WORDS,\n    MORE_COMPONENTS,\n    WE_HAVE_AN_X_AND_Y_SCALE,\n    WE_HAVE_A_SCALE,\n    WE_HAVE_A_TWO_BY_TWO,\n    WE_HAVE_INSTRUCTIONS;\n  ARG_1_AND_2_ARE_WORDS = 0x0001;\n  WE_HAVE_A_SCALE = 0x0008;\n  MORE_COMPONENTS = 0x0020;\n  WE_HAVE_AN_X_AND_Y_SCALE = 0x0040;\n  WE_HAVE_A_TWO_BY_TWO = 0x0080;\n  WE_HAVE_INSTRUCTIONS = 0x0100;\n\n  /********************************************************************************************************************/\n  /* function : CompoundGlypg generator                                                                               */\n  /* comment : It stores raw, xMin, yMin, xMax, yMax, glyph id, and glyph offset for the corresponding compound glyph.*/\n  /********************************************************************************************************************/\n  function CompoundGlyph(raw, xMin, yMin, xMax, yMax) {\n    var data, flags;\n    this.raw = raw;\n    this.xMin = xMin;\n    this.yMin = yMin;\n    this.xMax = xMax;\n    this.yMax = yMax;\n    this.compound = true;\n    this.glyphIDs = [];\n    this.glyphOffsets = [];\n    data = this.raw;\n    while (true) {\n      flags = data.readShort();\n      this.glyphOffsets.push(data.pos);\n      this.glyphIDs.push(data.readUInt16());\n      if (!(flags & MORE_COMPONENTS)) {\n        break;\n      }\n      if (flags & ARG_1_AND_2_ARE_WORDS) {\n        data.pos += 4;\n      } else {\n        data.pos += 2;\n      }\n      if (flags & WE_HAVE_A_TWO_BY_TWO) {\n        data.pos += 8;\n      } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n        data.pos += 4;\n      } else if (flags & WE_HAVE_A_SCALE) {\n        data.pos += 2;\n      }\n    }\n  }\n  /****************************************************************************************************************/\n  /* function : CompoundGlypg encode                                                                              */\n  /* comment : After creating a table for the characters you typed, you call directory.encode to encode the table.*/\n  /****************************************************************************************************************/\n  CompoundGlyph.prototype.encode = function() {\n    var i, result, _len, _ref;\n    result = new Data(__slice.call(this.raw.data));\n    _ref = this.glyphIDs;\n    for (i = 0, _len = _ref.length; i < _len; ++i) {\n      result.pos = this.glyphOffsets[i];\n    }\n    return result.data;\n  };\n  return CompoundGlyph;\n})();\n\nvar LocaTable = (function(_super) {\n  __extends(LocaTable, _super);\n\n  function LocaTable() {\n    return LocaTable.__super__.constructor.apply(this, arguments);\n  }\n  LocaTable.prototype.tag = \"loca\";\n  LocaTable.prototype.parse = function(data) {\n    var format, i;\n    data.pos = this.offset;\n    format = this.file.head.indexToLocFormat;\n    if (format === 0) {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 2) {\n          _results.push(data.readUInt16() * 2);\n        }\n        return _results;\n      }.call(this));\n    } else {\n      return (this.offsets = function() {\n        var _ref, _results;\n        _results = [];\n        for (i = 0, _ref = this.length; i < _ref; i += 4) {\n          _results.push(data.readUInt32());\n        }\n        return _results;\n      }.call(this));\n    }\n  };\n  LocaTable.prototype.indexOf = function(id) {\n    return this.offsets[id];\n  };\n  LocaTable.prototype.lengthOf = function(id) {\n    return this.offsets[id + 1] - this.offsets[id];\n  };\n  LocaTable.prototype.encode = function(offsets, activeGlyphs) {\n    var LocaTable = new Uint32Array(this.offsets.length);\n    var glyfPtr = 0;\n    var listGlyf = 0;\n    for (var k = 0; k < LocaTable.length; ++k) {\n      LocaTable[k] = glyfPtr;\n      if (listGlyf < activeGlyphs.length && activeGlyphs[listGlyf] == k) {\n        ++listGlyf;\n        LocaTable[k] = glyfPtr;\n        var start = this.offsets[k];\n        var len = this.offsets[k + 1] - start;\n        if (len > 0) {\n          glyfPtr += len;\n        }\n      }\n    }\n    var newLocaTable = new Array(LocaTable.length * 4);\n    for (var j = 0; j < LocaTable.length; ++j) {\n      newLocaTable[4 * j + 3] = LocaTable[j] & 0x000000ff;\n      newLocaTable[4 * j + 2] = (LocaTable[j] & 0x0000ff00) >> 8;\n      newLocaTable[4 * j + 1] = (LocaTable[j] & 0x00ff0000) >> 16;\n      newLocaTable[4 * j] = (LocaTable[j] & 0xff000000) >> 24;\n    }\n    return newLocaTable;\n  };\n  return LocaTable;\n})(Table);\n\n/************************************************************************************/\n/* function : invert                                                                */\n/* comment : Change the object's (key: value) to create an object with (value: key).*/\n/************************************************************************************/\nvar invert = function(object) {\n  var key, ret, val;\n  ret = {};\n  for (key in object) {\n    val = object[key];\n    ret[val] = key;\n  }\n  return ret;\n};\n\n/*var successorOf = function (input) {\n        var added, alphabet, carry, i, index, isUpperCase, last, length, next, result;\n        alphabet = 'abcdefghijklmnopqrstuvwxyz';\n        length = alphabet.length;\n        result = input;\n        i = input.length;\n        while (i >= 0) {\n            last = input.charAt(--i);\n            if (isNaN(last)) {\n                index = alphabet.indexOf(last.toLowerCase());\n                if (index === -1) {\n                    next = last;\n                    carry = true;\n                }\n                else {\n                    next = alphabet.charAt((index + 1) % length);\n                    isUpperCase = last === last.toUpperCase();\n                    if (isUpperCase) {\n                        next = next.toUpperCase();\n                    }\n                    carry = index + 1 >= length;\n                    if (carry && i === 0) {\n                        added = isUpperCase ? 'A' : 'a';\n                        result = added + next + result.slice(1);\n                        break;\n                    }\n                }\n            }\n            else {\n                next = +last + 1;\n                carry = next > 9;\n                if (carry) {\n                    next = 0;\n                }\n                if (carry && i === 0) {\n                    result = '1' + next + result.slice(1);\n                    break;\n                }\n            }\n            result = result.slice(0, i) + next + result.slice(i + 1);\n            if (!carry) {\n                break;\n            }\n        }\n        return result;\n    };*/\n\nvar Subset = (function() {\n  function Subset(font) {\n    this.font = font;\n    this.subset = {};\n    this.unicodes = {};\n    this.next = 33;\n  }\n  /*Subset.prototype.use = function (character) {\n            var i, _i, _ref;\n            if (typeof character === 'string') {\n                for (i = _i = 0, _ref = character.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                    this.use(character.charCodeAt(i));\n                }\n                return;\n            }\n            if (!this.unicodes[character]) {\n                this.subset[this.next] = character;\n                return this.unicodes[character] = this.next++;\n            }\n        };*/\n  /*Subset.prototype.encodeText = function (text) {\n            var char, i, string, _i, _ref;\n            string = '';\n            for (i = _i = 0, _ref = text.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {\n                char = this.unicodes[text.charCodeAt(i)];\n                string += String.fromCharCode(char);\n            }\n            return string;\n        };*/\n  /***************************************************************/\n  /* function : generateCmap                                     */\n  /* comment : Returns the unicode cmap for this font.         */\n  /***************************************************************/\n  Subset.prototype.generateCmap = function() {\n    var mapping, roman, unicode, unicodeCmap, _ref;\n    unicodeCmap = this.font.cmap.tables[0].codeMap;\n    mapping = {};\n    _ref = this.subset;\n    for (roman in _ref) {\n      unicode = _ref[roman];\n      mapping[roman] = unicodeCmap[unicode];\n    }\n    return mapping;\n  };\n  /*Subset.prototype.glyphIDs = function () {\n            var ret, roman, unicode, unicodeCmap, val, _ref;\n            unicodeCmap = this.font.cmap.tables[0].codeMap;\n            ret = [0];\n            _ref = this.subset;\n            for (roman in _ref) {\n                unicode = _ref[roman];\n                val = unicodeCmap[unicode];\n                if ((val != null) && __indexOf.call(ret, val) < 0) {\n                    ret.push(val);\n                }\n            }\n            return ret.sort();\n        };*/\n  /******************************************************************/\n  /* function : glyphsFor                                           */\n  /* comment : Returns simple glyph objects for the input character.*/\n  /******************************************************************/\n  Subset.prototype.glyphsFor = function(glyphIDs) {\n    var additionalIDs, glyph, glyphs, id, _i, _len, _ref;\n    glyphs = {};\n    for (_i = 0, _len = glyphIDs.length; _i < _len; _i++) {\n      id = glyphIDs[_i];\n      glyphs[id] = this.font.glyf.glyphFor(id);\n    }\n    additionalIDs = [];\n    for (id in glyphs) {\n      glyph = glyphs[id];\n      if (glyph != null ? glyph.compound : void 0) {\n        additionalIDs.push.apply(additionalIDs, glyph.glyphIDs);\n      }\n    }\n    if (additionalIDs.length > 0) {\n      _ref = this.glyphsFor(additionalIDs);\n      for (id in _ref) {\n        glyph = _ref[id];\n        glyphs[id] = glyph;\n      }\n    }\n    return glyphs;\n  };\n  /***************************************************************/\n  /* function : encode                                           */\n  /* comment : Encode various tables for the characters you use. */\n  /***************************************************************/\n  Subset.prototype.encode = function(glyID, indexToLocFormat) {\n    var cmap,\n      code,\n      glyf,\n      glyphs,\n      id,\n      ids,\n      loca,\n      new2old,\n      newIDs,\n      nextGlyphID,\n      old2new,\n      oldID,\n      oldIDs,\n      tables,\n      _ref;\n    cmap = CmapTable.encode(this.generateCmap(), \"unicode\");\n    glyphs = this.glyphsFor(glyID);\n    old2new = {\n      0: 0\n    };\n    _ref = cmap.charMap;\n    for (code in _ref) {\n      ids = _ref[code];\n      old2new[ids.old] = ids[\"new\"];\n    }\n    nextGlyphID = cmap.maxGlyphID;\n    for (oldID in glyphs) {\n      if (!(oldID in old2new)) {\n        old2new[oldID] = nextGlyphID++;\n      }\n    }\n    new2old = invert(old2new);\n    newIDs = Object.keys(new2old).sort(function(a, b) {\n      return a - b;\n    });\n    oldIDs = (function() {\n      var _i, _len, _results;\n      _results = [];\n      for (_i = 0, _len = newIDs.length; _i < _len; _i++) {\n        id = newIDs[_i];\n        _results.push(new2old[id]);\n      }\n      return _results;\n    })();\n    glyf = this.font.glyf.encode(glyphs, oldIDs, old2new);\n    loca = this.font.loca.encode(glyf.offsets, oldIDs);\n    tables = {\n      cmap: this.font.cmap.raw(),\n      glyf: glyf.table,\n      loca: loca,\n      hmtx: this.font.hmtx.raw(),\n      hhea: this.font.hhea.raw(),\n      maxp: this.font.maxp.raw(),\n      post: this.font.post.raw(),\n      name: this.font.name.raw(),\n      head: this.font.head.encode(indexToLocFormat)\n    };\n    if (this.font.os2.exists) {\n      tables[\"OS/2\"] = this.font.os2.raw();\n    }\n    return this.font.directory.encode(tables);\n  };\n  return Subset;\n})();\n\njsPDF.API.PDFObject = (function() {\n  var pad;\n\n  function PDFObject() {}\n  pad = function(str, length) {\n    return (Array(length + 1).join(\"0\") + str).slice(-length);\n  };\n  /*****************************************************************************/\n  /* function : convert                                                        */\n  /* comment :Converts pdf tag's / FontBBox and array values in / W to strings */\n  /*****************************************************************************/\n  PDFObject.convert = function(object) {\n    var e, items, key, out, val;\n    if (Array.isArray(object)) {\n      items = (function() {\n        var _i, _len, _results;\n        _results = [];\n        for (_i = 0, _len = object.length; _i < _len; _i++) {\n          e = object[_i];\n          _results.push(PDFObject.convert(e));\n        }\n        return _results;\n      })().join(\" \");\n      return \"[\" + items + \"]\";\n    } else if (typeof object === \"string\") {\n      return \"/\" + object;\n    } else if (object != null ? object.isString : void 0) {\n      return \"(\" + object + \")\";\n    } else if (object instanceof Date) {\n      return (\n        \"(D:\" +\n        pad(object.getUTCFullYear(), 4) +\n        pad(object.getUTCMonth(), 2) +\n        pad(object.getUTCDate(), 2) +\n        pad(object.getUTCHours(), 2) +\n        pad(object.getUTCMinutes(), 2) +\n        pad(object.getUTCSeconds(), 2) +\n        \"Z)\"\n      );\n    } else if ({}.toString.call(object) === \"[object Object]\") {\n      out = [\"<<\"];\n      for (key in object) {\n        val = object[key];\n        out.push(\"/\" + key + \" \" + PDFObject.convert(val));\n      }\n      out.push(\">>\");\n      return out.join(\"\\n\");\n    } else {\n      return \"\" + object;\n    }\n  };\n  return PDFObject;\n})();\n"],"names":["globalObject","window","global","self","this","consoleLog","console","log","apply","arguments","warn","str","call","error","download","url","name","opts","xhr","XMLHttpRequest","open","responseType","onload","saveAs","response","onerror","send","corsEnabled","e","status","click","node","dispatchEvent","MouseEvent","evt","document","createEvent","initMouseEvent","atob","btoa","_global","HTMLAnchorElement","prototype","blob","URL","webkitURL","a","createElement","rel","href","origin","location","target","createObjectURL","setTimeout","revokeObjectURL","navigator","msSaveOrOpenBlob","autoBom","_typeof","test","type","Blob","String","fromCharCode","bom","popup","title","body","innerText","force","isSafari","HTMLElement","safari","isChromeIOS","userAgent","FileReader","reader","onloadend","result","replace","readAsDataURL","RGBColor","color_string","channels","ok","charAt","substr","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","feldspar","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslateblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","violetred","wheat","white","whitesmoke","yellow","yellowgreen","toLowerCase","color_defs","re","example","process","bits","parseInt","i","length","processor","exec","r","g","b","isNaN","toRGB","toHex","toString","md5cycle","x","k","c","d","ff","gg","hh","ii","add32","cmn","q","s","t","md51","n","state","md5blk","substring","tail","charCodeAt","md5blks","bind","hex_chr","split","rhex","j","singleToByteString","md5Bin","map","join","toByteString","md5Check","hex","lsw","rc4","key","data","lastKey","lastState","num","Array","out","permissionOptions","print","modify","copy","PDFSecurity","permissions","userPassword","ownerPassword","fileId","v","protection","forEach","perm","Error","padding","paddedUserPassword","paddedOwnerPassword","O","processOwnerPassword","P","encryptionKey","lsbFirstWord","hexToBytes","U","toPDFName","strLength","charCode","slice","PubSub","context","topics","subscribe","topic","callback","once","hasOwnProperty","token","Math","random","unsubscribe","Object","keys","publish","args","tokens","sub","ex","message","push","getTopics","GState","parameters","supported","p","indexOf","id","objectNumber","Pattern","gState","matrix","ShadingPattern","coords","colors","TilingPattern","boundingBox","xStep","yStep","stream","cloneIndex","jsPDF","options","precision","orientation","unit","format","compressPdf","filters","userUnit","floatPrecision","defaultPathOperation","encryptionOptions","compress","encryption","userPermissions","abs","putOnlyUsedFonts","usedFonts","API","internal","__private__","pdfVersion","getPdfVersion","setPdfVersion","value","pageFormats","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","a10","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","b10","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","c10","dl","letter","legal","ledger","tabloid","getPageFormats","getPageFormat","ApiMode","COMPAT","ADVANCED","apiMode","advancedAPI","saveGraphicsState","Matrix","scaleFactor","getPageHeight","setFontSize","getFontSize","compatAPI","restoreGraphicsState","combineFontStyleAndFontWeight","fontStyle","fontWeight","doSwitch","isAdvancedAPI","hpf","advancedApiModeTrap","methodName","roundToPrecision","number","parmPrecision","tmpPrecision","toFixed","f2","f3","scale","transformY","y","transformScaleY","setPrecision","creationDate","getFileId","setFileId","toUpperCase","floor","convertDateToPDFDate","parmDate","tzoffset","getTimezoneOffset","tzsign","tzhour","tzmin","timeZoneString","padd2","getFullYear","getMonth","getDate","getHours","getMinutes","getSeconds","convertPDFDateToDate","parmPDFDate","year","month","date","hour","minutes","seconds","Date","setCreationDate","tmpCreationDateString","getCreationDate","currentPage","padd2Hex","hexString","offsets","content","contentLength","additionalObjects","pages","hasCustomDestination","outputDestination","resetDocument","rootDictionaryObjId","newObjectDeferred","resourceDictionaryObjId","setCustomOutputDestination","destination","setOutputDestination","resetCustomOutputDestination","string","write","getArrayBuffer","len","ab","ArrayBuffer","u8","Uint8Array","standardFonts","getStandardFonts","activeFontSize","fontSize","size","zoomMode","R2L","setR2L","getR2L","pageMode","setZoomMode","zoom","validZoomModes","undefined","getZoomMode","layoutMode","setPageMode","pmode","getPageMode","setLayoutMode","layout","getLayoutMode","setDisplayMode","documentProperties","subject","author","keywords","creator","getDocumentProperty","getDocumentProperties","setDocumentProperties","setProperties","properties","property","setDocumentProperty","activeFontKey","pageX","pageY","pageMatrix","fonts","fontmap","fontStateStack","patterns","patternMap","gStates","gStatesMap","activeGState","page","pagesContext","events","hotfixes","renderTargets","renderTargetMap","renderTargetStack","sx","shy","shx","sy","tx","ty","_matrix","defineProperty","get","set","atan2","decompose","separator","multiply","f","scaleX","sqrt","shear","scaleY","translate","rotate","skew","inversed","quot","aInv","bInv","cInv","dInv","applyToPoint","pt","Point","applyToRectangle","rect","pt1","pt2","w","h","Rectangle","clone","matrixMult","m1","m2","identityMatrix","unitMatrix","addPattern","pattern","patternKey","addShadingPattern","beginTilingPattern","beginNewRenderTarget","endTilingPattern","pop","restore","newObject","oid","newObjectDeferredBegin","doOutput","newAdditionalObject","obj","objId","decodeColorString","color","colorEncoded","floatVal","parseFloat","colorAsRGB","encodeColorString","ch1","ch2","ch3","ch4","letterArray","pdfColorType","rgbColor","getFilters","putStream","alreadyAppliedFilters","addLength1","valueOfLength1","objectId","encryptor","processedData","keyValues","additionalKeyValues","filterAsString","processDataByFilters","reverseChain","isArray","decodeParmsArray","putPage","pageNumber","pageObjectNumber","pageContentsObjId","contentsObjId","mediaBox","bottomLeftX","bottomLeftY","topRightX","topRightY","cropBox","bleedBox","trimBox","artBox","pageContext","pageContent","putPages","pageObjectNumbers","kids","putFont","font","isAlreadyPutted","postScriptName","encoding","putFonts","fontKey","putXObject","xObject","width","height","putXObjects","xObjectKey","interpolateAndEncodeRGBStream","numberSamples","tValues","dT","offset","unshift","index","aColor","bColor","round","trim","putShadingPattern","funcObjectNumber","putTilingPattern","deferredResourceDictionaryIds","resourcesObjectId","patternObjectId","resourcesOid","objectOid","putPatterns","putGState","putGStates","gStateKey","putXobjectDict","putEncryptionDict","toHexString","putFontDict","putShadingPatternDict","putTilingPatternDict","putGStatesDict","putResourceDictionary","objectIds","putResources","Number","MAX_SAFE_INTEGER","putAdditionalObjects","addFontToFontDictionary","fontName","addFont","isStandardFont","metadata","instance","addFonts","arrayOfFonts","l","parts","dictionary","SAFE","fn","foo","stack","m","alert","bar","to8bitStream","text","flags","sourceEncoding","encodingBlock","outputEncoding","newtext","isUnicode","ch","bch","autoencode","codePages","noBOM","pdfEscape","beginPage","_setPage","_addPage","parmFormat","parmOrientation","dimensions","min","setLineWidth","lineWidth","strokeColor","lineCapID","lineJoinID","_deletePage","splice","setPage","getNumberOfPages","getFont","fontNameLowerCase","disableWarning","noFallback","putInfo","version","putCatalog","tmpRootDictionaryObjId","pcn","putTrailer","putHeader","putXRef","buildDocument","offsetOfXRef","getBlob","output","filename","save","dataURI","pdfDocument","unescape","encodeURIComponent","pdfObjectUrl","integrity","htmlForNewWindow","JSON","stringify","nW","htmlForPDFjsNewWindow","pdfJsUrl","PDFjsNewWindow","scope","documentElement","querySelector","contentWindow","PDFViewerApplication","htmlForDataURLNewWindow","dataURLNewWindow","hasHotfix","hotfixName","getEncryptor","getPageInfo","pageNumberOneBased","getPageInfoByObjId","getCurrentPageInfo","addPage","insertPage","beforePage","movePage","targetPage","tmpPages","tmpPagesContext","deletePage","transform","payload","da","angle","align","charSpace","maxWidth","horizontalScale","transformationMatrix","tmp","xtra","isHex","lineHeight","lineHeightFactor","ESC","TabLen","transformTextToSpecialArray","curDa","sa","concat","shift","processTextByFunction","processingFunction","tmpResult","textIsOfTypeString","tmpTextIsOfTypeString","match","descent","baseline","splitTextToSize","reduce","acc","textLine","mutex","PI","rotationDirection","cos","sin","activeCharSpace","setCharSpace","getCharSpace","lang","renderingMode","parmRenderingMode","stroke","usedRenderingMode","lineWidths","leading","pageWidth","pageSize","getWidth","activeFont","assign","wordSpacingPerLine","findWidth","getStringUnitWidth","doKerning","newY","newX","prevWidth","getHorizontalCoordinate","getVerticalCoordinate","backToStartX","spacing","words","shiftAmount","doReversing","posX","posY","reverse","activeFontEncoding","STRING","ARRAY","variant","wordSpacing","generatePosition","parmPosX","parmPosY","parmTransformationMatrix","position","lineIndex","textColor","clip","rule","clipEvenOdd","discardPath","isValidStyle","style","setDefaultPathOperation","operator","getStyle","op","close","fill","fillWithOptionalPattern","fillEvenOdd","fillStroke","fillStrokeEvenOdd","fillWithPattern","putStyle","cloneTilingPattern","patternData","patternId","clipRuleFromStyle","setGState","moveTo","lineTo","curveTo","x1","y1","x2","y2","x3","y3","line","lines","closed","scalex","scaley","leg","x4","y4","path","triangle","roundedRect","rx","ry","MyArc","SQRT2","ellipse","lx","ly","circle","setFont","getFontEntry","getFontList","list","encodingOptions","getLineWidth","setLineDash","setLineDashPattern","dashArray","dashPhase","getLineHeight","setLineHeightFactor","getLineHeightFactor","getHorizontalCoordinateString","getVerticalCoordinateString","getStrokeColor","getDrawColor","setStrokeColor","setDrawColor","fillColor","getFillColor","setFillColor","getTextColor","setTextColor","CapJoinStyles","butt","but","miter","rounded","projecting","project","square","bevel","setLineCap","setLineJoin","setLineMiterLimit","setMiterLimit","addGState","equals","duplicate","fontState","setCurrentTransformationMatrix","comment","_x","enumerable","_y","_type","_w","_h","RenderTarget","getPageWidth","setPageWidth","setPageHeight","endFormObject","newXObject","xObjectId","plugin","beginFormObject","doFormObject","getFormObject","returnPromise","unload","Promise","resolve","reject","newEvents","eventname","handler_and_args","getCoordinateString","collections","setWidth","getHeight","setHeight","getPDFVersion","configurable","byteString","byte","bytes","generation","other","ignore","count","jsPDFAPI","pdfUnescape","f5","__acroform__","inherit","child","parent","create","constructor","createFormXObject","formObject","xobj","AcroFormXObject","AcroFormAppearance","BBox","setBit","bitPosition","clearBit","getBit","getBitForPdf","setBitForPdf","clearBitForPdf","calculateCoordinates","coordinates","lowerLeft_X","lowerLeft_Y","upperRight_X","upperRight_Y","calculateAppearanceStream","appearanceStreamContent","V","DV","_V","calcRes","calculateX","maxFontSize","returnValue","textSplit","multiline","word","isSmallerThanWidth","lastLine","calculateFontSpace","FontSize","startX","lastLength","textHeight","startY","lastY","firstWordInLine","lastWordInLine","currWord","lineCount","isWithNewLine","nextLineIsSmaller","isLastWord","currLine","textAlign","acroformPluginTemplate","fields","xForms","acroFormDictionaryRoot","printedOut","isInitialized","createAnnotationReference","object","annotations","find","entry","createXFormObjectCallback","fieldArray","fieldObject","initializeAcroForm","acroformPlugin","AcroFormField","FieldNum","parse","AcroFormDictionary","_eventID","AcroFormDictionaryCallback","Fields","hasAnnotation","annotReferenceCallback","putCatalogCallback","standardFields","Kids","keyValueList","oldRect","Rect","DA","createDefaultAppearanceStream","getKeyValueListForStream","hasAppearanceStream","appearance","appearanceStreamString","createFieldCallback","arrayToPdfArray","array","toPdfString","AcroFormPDFObject","_objId","_scope","writable","getOwnPropertyNames","filter","getOwnPropertyDescriptor","_stream","_BBox","_DA","_Kids","_F","Boolean","F","_Ff","_Rect","_FT","_T","AcroFormChildClass","_fontName","_fontStyle","_fontSize","_maxFontSize","_color","AcroFormTextField","_DV","AcroFormButton","_page","_hasAppearanceStream","Ff","_Q","AcroFormChoiceField","FT","_TI","_Opt","regex","matches","getMatches","getOptions","setOptions","sort","addOption","removeOption","allEntries","combo","AcroFormListBox","AcroFormComboBox","AcroFormEditBox","edit","_AS","_MK","CA","AcroFormPushButton","pushButton","AcroFormRadioButton","radio","_parent","_optionName","caption","appearanceState","_AppearanceType","RadioButton","Circle","createAppearanceStream","optionName","setAppearance","getCA","createOption","Parent","addField","AcroFormCheckBox","CheckBox","_MaxLen","isInteger","AcroFormPasswordField","password","N","On","YesNormal","D","YesPushDown","Off","OffPushDown","encodedColor","DotRadius","Bezier_C","DotRadiusBezier","kc","dc","Cross","cross","calculateCross","AcroForm","ChoiceField","ListBox","ComboBox","EditBox","Button","PushButton","TextField","PasswordField","Appearance","toLookup","arr","lookup","__addimage__","UNKNOWN","imageFileTypeHeaders","PNG","TIFF","JPEG","JPEG2000","GIF87a","GIF89a","WEBP","BMP","getImageFileTypeByImageData","imageData","fallbackFormat","headerSchemata","compareResult","fileType","Uint8ClampedArray","isArrayBufferView","putImage","image","colorSpace","color_spaces","INDEXED","palette","sMask","DEVICE_CMYK","bitsPerComponent","decodeParameters","transparency","predictor","arrayBufferToBinaryString","putResourcesCallback","images","putXObjectsDictCallback","initialize","getImages","getImageIndex","isImageTypeSupported","isDOMElement","nodeType","getImageDataFromElement","element","nodeName","hasAttribute","src","getAttribute","tmpImageData","loadFile","mimeType","toDataURL","checkImagesForAlias","alias","determineWidthAndHeight","writeImageToPDF","rotation","dims","coord","vcoord","f4","rotationTransformationMatrix","DEVICE_RGB","DEVICE_GRAY","CAL_GREY","CAL_RGB","LAB","ICC_BASED","PATTERN","SEPARATION","DEVICE_N","decode","DCT_DECODE","FLATE_DECODE","LZW_DECODE","JPX_DECODE","JBIG2_DECODE","ASCII85_DECODE","ASCII_HEX_DECODE","RUN_LENGTH_DECODE","CCITT_FAX_DECODE","image_compression","NONE","FAST","MEDIUM","SLOW","sHashCode","hash","byteLength","validateStringAsBase64","possibleBase64String","extractImageFromDataUrl","dataUrl","dataUrlParts","extractedInfo","charset","supportsArrayBuffer","isArrayBuffer","Uint32Array","Int8Array","Int16Array","Uint16Array","Int32Array","Float32Array","Float64Array","binaryStringToUint8Array","binary_string","buffer","buf","subarray","addImage","compression","processImageData","dataAsBinaryString","convertBase64ToBinaryString","generateAliasFromImageData","checkCompressValue","stringData","throwError","base64Info","rawData","getImageProperties","notEmpty","addPageData","putPageData","anno","pageInfo","pageAnnos","found","escape","objText","objPopup","encryptorText","bounds","contents","loc","_nameMap","top","finalBounds","magFactor","left","createAnnotation","link","textWithLink","linkHeight","linkWidth","totalLineWidth","getTextWidth","numOfLines","ceil","arabicSubstitionA","ligatures","arabic_diacritics","alfletter","__arabicParser__","isInArabicSubstitutionA","isArabicLetter","isArabicEndLetter","isArabicAlfLetter","arabicLetterHasIsolatedForm","arabicLetterHasFinalForm","arabicLetterHasInitialForm","arabicLetterHasMedialForm","resolveLigatures","letters","tmpLigatures","effectedLetters","isArabicDiacritic","getCorrectForm","currentChar","beforeChar","nextChar","parseArabic","currentLetter","prevLetter","nextLetter","newWords","processArabic","tmpText","autoPrint","refAutoPrintTag","addJS","Canvas","jsPdfInstance","_width","getContext","pageWrapXEnabled","pageWrapX","_height","pageWrapYEnabled","pageWrapY","_childNodes","_style","contextType","contextAttributes","pdf","context2d","_canvas","canvas","NO_MARGINS","bottom","right","printingHeaderRow","_initialize","__cell__","headerFunction","margins","_reset","lastCell","Cell","_text","_lineNumber","_align","lineNumber","toArray","setHeaderFunction","func","getTextDimensions","amountOfLines","tempWidth","max","cellAddPage","cell","currentCell","tableHeaderRow","printHeaders","printHeaderRow","table","headers","config","column","headerName","headerNames","headerLabels","headerAligns","columnMatrix","columnWidths","columnMinWidths","tableHeaderConfigs","autoSize","css","headerBackgroundColor","headerTextColor","table_font_size","header","prompt","rec","row","rowHeight","calculateLineHeight","setTableHeaderRow","pv","cv","rowStart","Function","cellData","cellStart","col","table_x","table_y","model","new_page","tableHeaderCell","tempHeaderConf","currentTextColor","fontStyleOrder","italic","oblique","normal","fontStretchOrder","fontStretchLookup","fontWeights","fontWeightsLookup","normalizeFontFace","fontFace","family","normalizeFontStyle","weight","normalizeFontWeight","stretch","normalizeFontStretch","ref","searchFromPivot","matchingSet","order","pivot","dir","defaultGenericFontFamilies","fixed","monospace","terminal","cursive","fantasy","serif","systemFonts","icon","menu","ruleToString","resolveFontFace","fontFaceMap","rules","defaultFontFamily","genericFontFamilies","resolveFontStretch","ordering","resolveFontStyle","resolveFontWeight","eatWhiteSpace","input","trimLeft","parseQuotedFontFamily","quote","parseNonQuotedFontFamily","defaultFont","_ctx","ContextLayer","ctx","isStrokeTransparent","strokeOpacity","strokeStyle","fillStyle","isFillTransparent","fillOpacity","textBaseline","lineJoin","lineCap","globalCompositeOperation","globalAlpha","clip_path","currentPoint","miterLimit","lastPoint","lineDashOffset","lineDash","margin","prevPageLastElemOffset","ignoreClearRect","Context2D","parentNode","_pdf","_pageWrapXEnabled","_pageWrapYEnabled","_posX","_posY","_autoPaging","lastBreak","pageBreaks","_ctxStack","rgba","getRGBA","_fontFaceMap","getFontFaceMap","fontFaces","convertedFontFaces","fontMap","convertToFontFaces","normalized","buildFontFaceMap","_fontFaces","fontFamily","fontSizeUnit","parsed","remaining","parseFontFamily","jsPdfFontName","fallbackFonts","arial","Arial","verdana","Verdana","helvetica","Helvetica","getLineDash","pathPreProcess","beginPath","closePath","pathBegin","quadraticCurveTo","cpx","cpy","pt0","bezierCurveTo","cp1x","cp1y","cp2x","cp2y","arc","radius","startAngle","endAngle","counterclockwise","isIdentity","xpt","x_radPt","x_radPt0","pow","arcTo","fillRect","strokeRect","clearRect","doStackPush","tmpPageNumber","ctxStack","doStackPop","isCanvasGradient","getColor","fillText","degs","rad2deg","putText","strokeText","measureText","txtWidth","TextMetrics","scalewidth","scaleheight","setTransform","hasMargins","drawImage","img","swidth","sheight","imageProperties","factorX","factorY","clipFactorX","clipFactorY","clipPath","decomposedTransformationMatrix","xRect","pageArray","getPagesByPath","sortPages","autoPaging","pageWidthMinusMargins","topMargin","firstPageHeight","pageHeightMinusMargins","previousPageHeightSum","tmpPaths","pathPositionRedo","drawPaths","tmpRect","needsClipping","yOffset","rectOfQuadraticCurve","getQuadraticCurveBoundary","rectOfBezierCurve","getBezierCurveBoundary","paths","isClip","tmpPath","oldLineWidth","origPath","xPath","delta","moves","begin","start","deltas","iii","began","arcs","drawArc","drawLine","drawLines","doClip","getBaseline","getTextBottom","yBaseLine","createLinearGradient","canvasGradient","colorStops","addColorStop","createPattern","createRadialGradient","includeMove","curves","createArc","curve","doMove","drawCurve","textDimensions","yTop","oldSize","baselineRect","textBounds","pageHeightMinusBottomMargin","pageWidthMinusRightMargin","textBoundsOnPage","doSlice","croppedText","baseLineRectOnPage","prevX","prevY","anticlockwise","twoPi","halfPi","totalAngle","sgn","createSmallArc","q1","q2","k2","ar","cos_ar","sin_ar","ey","midX1","midY1","midX2","midY2","resultX1","resultX2","resultY1","resultY2","ax","ay","bx","by","cx","cy","dx","dy","px","py","qx","qy","minx","miny","maxx","maxy","tobx","toby","tocx","tocy","todx","tody","prevLineDash","nextLineDash","u16","i32","fleb","fdeb","clim","freb","eb","_a","fl","revfl","_b","fd","revfd","rev","hMap","cd","mb","co","le","rvb","sv","r_1","flt","fdt","flm","flrm","fdm","fdrm","o","bits16","shft","slc","ec","err","ind","msg","nt","code","captureStackTrace","wbits","wbits16","hTree","t2","et","i0","i1","i2","maxSym","tr","mbt","ln","dt","lft","cst","i2_1","i2_2","i2_3","lc","cl","cli","cln","cls","clen","cf","wfblk","pos","dat","wblk","final","syms","lf","df","li","bs","bl","dlt","mlb","ddt","mdb","_c","lclt","nlc","_d","lcdt","ndc","lcfreq","_e","lct","mlcb","nlcc","lm","ll","dm","flen","ftlen","dtlen","llm","lcts","it","clct","sym","dst","deo","adler","dopt","opt","pre","post","st","dict","newDat","lvl","plvl","z","lst","msk_1","prev","head","bs1_1","bs2_1","hsh","lc_1","wi","hv","imod","pimod","rem","ch_1","dif","maxn","maxd","ml","nl","mmd","md","ti","lin","din","dflt","level","mem","wbytes","zlibSync","lv","zlh","unzlibSync","sl","noBuf","resize","noSt","cbuf","nbuf","bt","lbt","dbt","tbts","hLit","hcLen","tl","ldt","clt","clb","clbmsk","clm","lt","lms","dms","lpos","add","dsym","end","dend","inflt","td","TextDecoder","ASCII85Encode","ASCII85Decode","ASCIIHexDecode","regexCheckIfHex","RegExp","FlateEncode","origData","filterChain","sync","request","sanitizeUnicode","dataLength","charArray","StringFromCharCode","overrideMimeType","responseText","browserRequest","loadImageFile","loadHtml2Canvas","exports","module","require","define","amd","catch","then","html2canvas","default","loadDomPurify","dompurify","objType","tagName","el","className","innerHTML","sanitize","Worker","root","convert","template","setProgress","promise","__proto__","prop","container","overlay","progress","val","enableLinks","backgroundColor","from","getType","to","toContainer","toCanvas","toImg","toPdf","thenList","setPageSize","containerCSS","display","windowWidth","clientWidth","scrollWidth","offsetWidth","source","cloneNode","javascriptEnabled","createTextNode","nodeValue","firstChild","nextSibling","appendChild","addEventListener","scrollTop","scrollLeft","scrollHeight","offsetHeight","clientHeight","overflow","zIndex","clear","border","float","prereqs","contains","onrendered","removeChild","toContext2d","async","allowTaint","scrollX","scrollY","imageTimeout","logging","proxy","removeContainer","foreignObjectRendering","useCORS","windowHeight","imgData","quality","outputImg","outputPdf","doCallback","fns","setMargin","cbk","toPx","getPageSize","inner","ratio","updateProgress","onFulfilled","onRejected","thenCore","thenBase","selfPromise","returnVal","thenExternal","catchExternal","using","export","run","format_as_string","pageHeight","html","worker","jsNamesObj","jsJsObj","javascript","namesOid","outline","children","render","createNamedDestinations","totalPages","dests","info","names2Oid","makeRef","item","genIds_r","renderRoot","renderItems","objStart","count_r","objEnd","makeString","markers","processJPEG","blockLength","numcomponents","getJpegInfo","getCharWidthsArray","splitLongWord","splitParagraphIntoLines","makeImage","scratchCanvas","scratchCtx","chunkSize","palLen","delayDen","delayNum","frame","section","palShort","_i","_j","_ref","animation","readUInt32","_results","colorType","compressionMethod","filterMethod","interlaceMethod","numFrames","numPlays","Infinity","frames","read","xOffset","readUInt16","delay","disposeOp","blendOp","indexed","grayscale","rgb","hasAlphaChannel","pixelBitlength","decodePixels","pixelBytes","fullPixels","_this","pass","x0","y0","abyte","pa","paeth","pb","pc","pixels","scanlineLength","upper","upperLeft","_k","_l","_m","isFull","fullPos","partPos","decodePalette","ret","_ref1","copyToImageData","alpha","_decodedPalette","hasBrowserCanvas","putImageData","Image","decodeFrames","_len","createImageData","renderFrame","animate","doFrame","frameNumber","_timeout","stopAnimation","clearTimeout","_png","GifReader","pf0","global_palette_flag","num_global_colors","global_palette_offset","global_palette_size","no_eof","transparent_index","disposal","loop_count","block_size","pf1","pf2","interlace_flag","num_local_colors","palette_offset","palette_size","has_local_palette","data_offset","data_length","interlaced","loopCount","frameInfo","frame_num","decodeAndBlitFrameBGRA","num_pixels","index_stream","GifReaderLZWOutputIndexStream","trans","framewidth","framestride","xleft","opbeg","opend","scanstride","interlaceskip","il","decodeAndBlitFrameRGBA","code_stream","output_length","min_code_size","clear_code","eoi_code","next_code","cur_code_size","code_mask","cur_shift","cur","subblock_size","code_table","prev_code","chase_code","chase_length","chase","JPEGEncoder","YDC_HT","UVDC_HT","YAC_HT","UVAC_HT","currentQuality","ffloor","YTable","UVTable","fdtbl_Y","fdtbl_UV","bitcode","category","outputfDCTQuant","DU","byteout","bytenew","bytepos","YDU","UDU","VDU","RGB_YUV_TABLE","ZigZag","std_dc_luminance_nrcodes","std_dc_luminance_values","std_ac_luminance_nrcodes","std_ac_luminance_values","std_dc_chrominance_nrcodes","std_dc_chrominance_values","std_ac_chrominance_nrcodes","std_ac_chrominance_values","computeHuffmanTbl","nrcodes","std_table","codevalue","pos_in_table","HT","writeBits","posval","writeByte","writeWord","processDU","CDU","fdtbl","DC","HTDC","HTAC","EOB","M16zeroes","DU_DCT","d0","d1","d2","d3","d4","d5","d6","d7","fDCTQuant","dataOff","tmp0","tmp7","tmp1","tmp6","tmp2","tmp5","tmp3","tmp4","tmp10","tmp13","tmp11","tmp12","z1","z5","z2","z4","z3","z11","z13","tmp0p2","tmp7p2","tmp1p2","tmp6p2","tmp2p2","tmp5p2","tmp3p2","tmp4p2","tmp10p2","tmp13p2","tmp11p2","tmp12p2","z1p2","z5p2","z2p2","z4p2","z3p2","z11p2","z13p2","Diff","end0pos","lng","startpos","nrzeroes","nrmarker","setQuality","sf","YQT","UVQT","u","aasf","initQuantTables","encode","writeDQT","writeSOF0","writeDHT","DCY","DCU","DCV","displayName","quadWidth","fillbits","sfcc","initCharLookupTable","nrlower","nrupper","cat","nr","nrneg","initCategoryNumber","initRGBYUVTable","BmpDecoder","is_with_alpha","datav","DataView","bottom_up","flag","parseHeader","parseBGR","WebPDecoder","fa","L","J","H","I","Z","M","wa","Ed","ma","_WebPDecoder","Fd","Ub","G","jc","Qb","qb","nd","pd","xb","Ca","Ka","oa","Jd","Yc","Zc","Qa","na","K","ca","cb","Sb","Ra","bb","Vb","ob","db","Gd","Hd","Wb","Sa","Xb","Id","ra","Ta","Yb","Ha","Zb","X","Mb","Xa","$b","ac","bc","xa","yb","ud","hd","jd","aa","Ia","cc","Kd","Ld","Ea","Md","Nd","Od","Pd","Qd","fb","gb","hb","zb","Ab","Ja","Bb","Rd","A","Sd","ea","Tc","Cd","lb","Db","W","Cb","S","RGBA","kb","sd","Td","Ud","ib","bd","Da","Vd","T","Wd","ba","ka","Mc","Nc","fc","Rc","Xd","ya","Kb","za","gc","Ua","Va","memory","Ib","Jb","hc","Oa","ic","Aa","Yd","Ba","Wa","Zd","$d","ae","ta","Eb","be","ga","ce","Dc","mc","nc","de","ua","ub","ha","xc","vc","Ya","oc","C","ee","E","B","Q","fe","qc","Fb","rc","ge","va","Ma","sc","Gb","tc","uc","Hb","wc","yc","zc","qd","rd","ia","tb","he","$","Pb","wd","xd","vb","ie","Ac","Bc","je","Cc","VP8LMapColor32b","ke","VP8LMapColor8b","rb","Oc","R","me","qa","Y","la","ja","Fa","ne","sb","La","Za","$a","jb","oe","pe","nb","qe","Pa","Ga","Na","Ec","se","Fc","ue","yd","Rb","ve","we","Lb","Gc","wb","xe","Wc","Xc","ye","Pc","Tb","zd","vd","od","ld","dd","Hc","ze","Sc","Qc","ad","Ob","Ad","Dd","Ae","Nb","Ic","Be","Kc","ed","$c","Jc","Bd","gd","Uc","Vc","put","Ce","De","Ee","Fe","Ge","He","Ie","Lc","Me","Ne","Oe","Pe","Qe","Re","Se","Te","Ue","Ve","We","Xe","Ye","Ze","$e","af","bf","ef","gf","hf","jf","kf","mf","nf","of","pf","qf","rf","tf","uf","vf","wf","xf","yf","zf","Af","Bf","Ke","Le","Je","kd","Cf","Df","Ef","Gf","Hf","If","Jf","Kf","Lf","Mf","Nf","Of","Pf","Predictor0","Predictor1","Predictor2","Predictor3","Predictor4","Predictor5","Predictor6","Predictor7","Predictor8","Predictor9","Predictor10","Predictor11","Predictor12","Predictor13","PredictorAdd0","PredictorAdd1","PredictorAdd2","ColorIndexInverseTransform","MapARGB","VP8LColorIndexInverseTransformAlpha","MapAlpha","VP8LPredictorsAdd","VP8LPredictors","VP8LPredictorsAdd_C","VP8LPredictors_C","UpsampleRgbLinePair","UpsampleBgrLinePair","UpsampleRgbaLinePair","UpsampleBgraLinePair","UpsampleArgbLinePair","UpsampleRgba4444LinePair","UpsampleRgb565LinePair","Qf","WebPDecodeRGBA","te","GetTag","data_off","GetLE24","GetLE32","webpdecoder","imagearray","src_off","alpha_chunk","alpha_size","alpha_offset","memcmp","fourcc","payload_size","payload_size_padded","src_off_","temp","WebPRiffParser","hasCompressionJS","compressBytes","lineLength","colorsPerPixel","filter_method","filterUp","filterSub","filterAverage","filterPaeth","applyPngFilterMethod","prevLine","filter_methods","getFilterMethods","results","getIndexOfSmallestSum","filterNone","up","upLeft","paethPredictor","pLeft","pUp","pUpLeft","arrays","sum","processPNG","trns","pal","smask","alphaData","hasColors","pixel","pbl","pDiff","total","getPredictorFromCompression","processGIF89A","rawImageData","processGIF87A","fileSize","getUint32","reserved","headerSize","getInt32","planes","getUint16","bitPP","rawSize","hr","vr","importantColors","getUint8","quad","bitn","bit1","xlen","mode","bit4","before","after","bit8","bit15","dif_w","_1_5","bit16","_1_6","bit24","bit32","getData","processBMP","processWEBP","processRGBA","imagePixels","rgbOut","alphaOut","outIndex","alphaIndex","rgbData","setLanguage","langCode","languageSettings","isSubscribed","sq","an","hy","as","ast","az","eu","bn","br","bg","my","zh","cr","cs","en","eo","fo","fj","fi","fr","fy","fur","gl","gu","ht","hi","hu","is","iu","kn","ks","kk","km","ky","tlh","ko","mk","ms","mt","mi","mr","mo","nv","ng","no","nn","or","om","pl","qu","rm","ro","ru","sz","sg","si","sr","sk","so","es","sw","tt","th","tig","ts","tn","tk","uk","hsb","ur","vi","vo","xh","ji","zu","languageCode","char_code","widths","Unicode","widthsFractionOf","fof","kerning","kerningFractionOf","kerningValue","prior_char_code","default_char_width","widthOfString","widthOfGlyph","characterToGlyph","widths_array","firstLineMaxLen","maxLen","answer","workingLen","startOfLine","maxlen","lineIndent","postProcess","line_length","textIndent","separator_length","current_word_length","spaceCharWidth","pad","wrds","wrd","idx","paragraphs","fsize","newOptions","fontUnit_maxLen","__fontmetrics__","encoded","mappingUncompress","mappingCompress","keystring","valuestring","numberprefix","vals","uncompress","stringparts","parent_key_pair","sign","activeobject","parentchain","keyparts","valueparts","datalen","WinAnsiEncoding","encodings","Courier","fontMetrics","Symbol","ZapfDingbats","metrics","file","existsFileInVFS","getFileFromVFS","TTFFont","glyIdsUsed","loadCanvg","canvg","addSvgAsImage","svg","ignoreMouse","ignoreAnimation","ignoreDimensions","doc","fromString","putTotalPages","pageExpression","replaceExpression","totalNumberOfPages","pdfEscape16","viewerPreferences","doReset","configuration","isValid","method","configurationTemplate","HideToolbar","defaultValue","explicitSet","valueSet","HideMenubar","HideWindowUI","FitWindow","CenterWindow","DisplayDocTitle","NonFullScreenPageMode","Direction","ViewArea","ViewClip","PrintArea","PrintClip","PrintScaling","Duplex","PickTrayByPDFSize","PrintPageRange","NumCopies","configurationKeys","rangeArray","arrayContainsElement","iterator","viewerpreferences","vPref","pdfDict","postPutResources","rdf_beginning","__metadata__","namespaceuri","utf8_xmpmeta_beginning","utf8_rdf_beginning","utf8_metadata","utf8_rdf_ending","utf8_xmpmeta_ending","total_len","metadata_object_number","addMetadata","padz","toUnicode","toUnicodeCmap","codes","range","unicode","unicodeMap","pdfOutput","subset","pdfOutput2","fontTable","cmap","fontDescriptor","PDFObject","bbox","stemV","italicAngle","ascender","decender","capHeight","DescendantFont","identityHFunction","hmtx","unitsPerEm","winAnsiEncodingFunction","utf8TextFunction","cmapConfirm","strText","codeMap","parms","_initializeVFS","vFS","addFileToVFS","filecontent","__bidiEngine__","_hasUbatB","_hasUbatS","_isInVisual","_isInRtl","_isOutVisual","_isOutRtl","_isSymmetricSwapping","_UNICODE_TYPES","_bidiUnicodeTypes","_STATE_TABLE_LTR","_STATE_TABLE_RTL","_TYPE_NAMES_MAP","EN","AN","_UNICODE_RANGES_MAP","_SWAP_TABLE","_LTR_RANGES_REG_EXPR","_lastArabic","_dir","_getCharType","rangeIdx","_isContextualDirRtl","charType","_resolveCharType","chars","types","resolvedTypes","wType","nType","cType","rtlCandidate","_invertString","sourceToTargetMap","levels","_computeLevels","hiLevel","params","action","newLevel","prevState","condPos","newState","stateTable","_handleUbatS","_invertByLevel","high","low","_reorder","_symmetricSwap","DIR_RTL","doBidiReorder","_init","isSymmetricSwappingOrig","isInputVisual","isOutputVisual","isInputRtl","isOutputRtl","isSymmetricSwapping","bidiEngine","Data","readString","Subset","registerTTF","directory","Directory","HeadTable","NameTable","CmapTable","hhea","HheaTable","maxp","MaxpTable","HmtxTable","PostTable","os2","OS2Table","loca","LocaTable","glyf","GlyfTable","exists","lineGap","xMin","yMin","xMax","yMax","raw","italic_angle","xHeight","familyClass","isSerif","isScript","isFixedPitch","character","glyph","forGlyph","advance","includeGap","gap","Table","readByte","writeUInt32","readInt32","int","writeInt32","writeUInt16","readInt16","writeInt16","writeString","readShort","writeShort","readLongLong","writeLongLong","readInt","writeInt","checksum","scalarType","tableCount","searchRange","entrySelector","rangeShift","tables","tag","adjustment","directoryLength","headOffset","log2","tableData","__slice","__hasProp","__extends","ctor","__super__","_super","revision","checkSumAdjustment","magicNumber","created","modified","macStyle","lowestRecPPEM","fontDirectionHint","indexToLocFormat","glyphDataFormat","CmapEntry","endCode","glyphId","glyphIds","idDelta","idRangeOffset","saveOffset","segCount","segCountX2","startCode","platformID","encodingID","language","charmap","charMap","diff","endCodes","glyphIDs","indexes","last","nextID","old","rangeOffsets","startCodes","startGlyph","subtable","_len1","_len2","_len3","_len4","_len5","_len6","_len7","_n","_name","_o","_p","_q","new","maxGlyphID","LN2","advanceWidthMax","minLeftSideBearing","minRightSideBearing","xMaxExtent","caretSlopeRise","caretSlopeRun","caretOffset","metricDataFormat","numberOfMetrics","averageCharWidth","weightClass","widthClass","ySubscriptXSize","ySubscriptYSize","ySubscriptXOffset","ySubscriptYOffset","ySuperscriptXSize","ySuperscriptYSize","ySuperscriptXOffset","ySuperscriptYOffset","yStrikeoutSize","yStrikeoutPosition","panose","charRange","vendorID","selection","firstCharIndex","lastCharIndex","ascent","winAscent","winDescent","codePageRange","defaultChar","breakChar","maxContext","numberOfGlyphs","underlinePosition","underlineThickness","minMemType42","maxMemType42","minMemType1","maxMemType1","glyphNameIndex","names","_results1","numGlyphs","NameEntry","languageID","entries","stringOffset","strings","nameID","copyright","fontSubfamily","uniqueSubfamily","postscriptName","trademark","manufacturer","designer","description","vendorUrl","designerUrl","license","licenseUrl","preferredFamily","preferredSubfamily","compatibleFull","sampleText","maxPoints","maxContours","maxCompositePoints","maxComponentContours","maxZones","maxTwilightPoints","maxStorage","maxFunctionDefs","maxInstructionDefs","maxStackElements","maxSizeOfInstructions","maxComponentElements","maxComponentDepth","lsbCount","lsb","leftSideBearings","cache","glyphFor","numberOfContours","lengthOf","CompoundGlyph","SimpleGlyph","glyphs","mapping","old2new","compound","glyphOffsets","activeGlyphs","glyfPtr","listGlyf","newLocaTable","unicodes","next","generateCmap","roman","unicodeCmap","glyphsFor","additionalIDs","glyID","ids","new2old","newIDs","nextGlyphID","oldID","oldIDs","invert","isString","getUTCFullYear","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;waAAO,IAAIA,EAAgB,iBAClB,oBAAuBC,OAC1BA,OACA,oBAAuBC,OACvBA,OACA,oBAAuBC,KACvBA,KACAC,KAPqB,GCE3B,SAASC,IACHL,EAAaM,SAA+C,mBAA7BN,EAAaM,QAAQC,KACtDP,EAAaM,QAAQC,IAAIC,MAAMR,EAAaM,QAASG,WAuBlD,IAAIH,EAAU,CACnBC,IAAKF,EACLK,KArBF,SAAqBC,GACfX,EAAaM,UAC0B,mBAA9BN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AAaE,EAAY,GAAKD,EAAgB,OAC9CA,EACFC,EAAaA,GAAa,EAAK,IAInCK,EAAYta,OA9EV+Z,EAAYD,EAAW,EAEvBG,GAAa,IADbD,EAAgBJ,EAAgB,IACG,EAGnCU,EAAY,YA4EZ9yC,IAAOmyC,GACTtrE,EAAQC,IAAI,8CAGPixB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ICz1BT,SAASm7C,GAAY3L,OAMf4L,EACAC,EACAC,EACAC,EAeAC,EAvBAC,EAASx4D,KAAKuI,MACdkwD,EAAS,IAAIh7D,MAAM,IACnBi7D,EAAU,IAAIj7D,MAAM,IACpBk7D,EAAU,IAAIl7D,MAAM,IACpBm7D,EAAW,IAAIn7D,MAAM,IAMrBo7D,EAAU,IAAIp7D,MAAM,OACpBq7D,EAAW,IAAIr7D,MAAM,OACrBs7D,EAAkB,IAAIt7D,MAAM,IAC5Bu7D,EAAK,IAAIv7D,MAAM,IACfw7D,EAAU,GACVC,EAAU,EACVC,EAAU,EAEVC,EAAM,IAAI37D,MAAM,IAChB47D,EAAM,IAAI57D,MAAM,IAChB67D,EAAM,IAAI77D,MAAM,IAChB0nD,EAAM,IAAI1nD,MAAM,KAChB87D,EAAgB,IAAI97D,MAAM,MAG1B+7D,EAAS,CACX,EACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IAGEC,EAA2B,CAC7B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEEC,EAA0B,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,IAC7DC,EAA2B,CAC7B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KAEEC,EAA0B,CAC5B,EACA,EACA,EACA,EACA,EACA,GACA,EACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,EACA,GACA,IACA,GACA,GACA,IACA,IACA,IACA,EACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,IACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAGEC,EAA6B,CAC/B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEEC,EAA4B,CAAC,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,IAC/DC,EAA6B,CAC/B,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,KAEEC,EAA4B,CAC9B,EACA,EACA,EACA,EACA,GACA,EACA,EACA,GACA,GACA,EACA,GACA,GACA,GACA,EACA,GACA,IACA,GACA,GACA,GACA,IACA,EACA,GACA,GACA,IACA,IACA,IACA,IACA,EACA,GACA,GACA,GACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,GACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,cAuKOC,EAAkBC,EAASC,WAC9BC,EAAY,EACZC,EAAe,EACfC,EAAK,IAAI78D,MACJvC,EAAI,EAAGA,GAAK,GAAIA,IAAK,KACvB,IAAIwB,EAAI,EAAGA,GAAKw9D,EAAQh/D,GAAIwB,IAC/B49D,EAAGH,EAAUE,IAAiB,GAC9BC,EAAGH,EAAUE,IAAe,GAAKD,EACjCE,EAAGH,EAAUE,IAAe,GAAKn/D,EACjCm/D,IACAD,IAEFA,GAAa,SAERE,WA2DAC,EAAU3a,WACbp8C,EAAQo8C,EAAG,GACX4a,EAAS5a,EAAG,GAAK,EACd4a,GAAU,GACXh3D,EAAS,GAAKg3D,IAChBtB,GAAW,GAAKC,GAElBqB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olB,EAAS,GAAI,KAErCgM,GAAkBhM,eA1qBCoS,WACnBC,EAAM,CACR,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IAGOvkE,EAAI,EAAGA,EAAI,GAAIA,IAAK,KACvBwB,EAAI28D,GAAQoG,EAAIvkE,GAAKskE,EAAK,IAAM,KACpC9iE,EAAImE,KAAKsb,IAAItb,KAAKmnC,IAAItrC,EAAG,GAAI,KAC7B48D,EAAOe,EAAOn/D,IAAMwB,UAElBgjE,EAAO,CACT,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IAEOniE,EAAI,EAAGA,EAAI,GAAIA,IAAK,KACvBoiE,EAAItG,GAAQqG,EAAKniE,GAAKiiE,EAAK,IAAM,KACrCG,EAAI9+D,KAAKsb,IAAItb,KAAKmnC,IAAI23B,EAAG,GAAI,KAC7BpG,EAAQc,EAAO98D,IAAMoiE,UAEnBC,EAAO,CACT,EACA,YACA,YACA,YACA,EACA,WACA,SACA,YAEE7jE,EAAI,EACC4tC,EAAM,EAAGA,EAAM,EAAGA,QACpB,IAAIU,EAAM,EAAGA,EAAM,EAAGA,IACzBmvB,E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AAIiE,KAAK+C,IAAI1U,EAAE43E,IACfxrE,EAAIuF,KAAK+C,IAAI1U,EAAE23E,IACfrqE,EAAIlB,GAAKC,EAAI,GAAKuV,EACpBtV,GAAKO,GAAKR,EAAI,GAAKuV,GAAK5hB,EAAEmzE,GAC1B7mE,GAAK6e,GAAKO,EAAI,GAAKxI,GAAKljB,EAAE03E,GAE1BprE,GADAA,GAAKoB,GAAKge,EAAI,GAAKxI,GAAKljB,EAAEgzE,IACjBnmE,GAAK+U,EAAMuJ,GAAKjI,EAAMxV,GAAKwV,EACpC5W,GAAK,MAAQtM,EAAE2Z,EACfrN,GAAK,MAAQtM,EAAE4hB,EACftV,GAAK,MAAQtM,EAAEw3E,OACT14E,IAAOwN,GAAKF,GAAKwV,EAAKtV,GAAKgB,GAAKtN,EAAEy3E,GAAMnrE,GAAK,MAAQtM,EAAEulC,QAE5Dj5B,EAAI,EACTtM,EAAIsM,EAAI,EAAI,UAGZ,GAAKtM,SACD8M,GAAKA,EAAE2gD,KAAOztD,EAAIuhF,GAAGx0E,IADV/M,MAIjB2zE,GAAK,GACPmB,GAAK,CACH,EACA,EACA,EACA,EACA,GACA,GACA,GACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,OACA,OACA,OACA,QACA,QACA,QACA,QACA,UAEFD,GAAK,GACLF,GAAK,GACLM,GAAK,EACLC,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAEJM,EAAE,aAAc,iBAChBn4E,EAAKqoF,WAAa,kBACT,YAETroF,EAAKsoF,WAAa,SAAS3lF,UAClBA,GAET3C,EAAKuoF,WAAa,SAAS5lF,EAAGsM,EAAGQ,UACxBR,EAAEQ,EAAI,IAEfzP,EAAKwoF,WAAa,SAAS7lF,EAAGsM,EAAGQ,UACxBR,EAAEQ,EAAI,IAEfzP,EAAKyoF,WAAa,SAAS9lF,EAAGsM,EAAGQ,UACxBR,EAAEQ,EAAI,IAEfzP,EAAK0oF,WAAa,SAAS/lF,EAAGsM,EAAGQ,UACxBqpE,EAAGA,E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IAAIh7E,OAAS,IACxC5O,EAAK6pF,iBAAmB,IAAIj7E,OAAS,OAClC2vE,GACFK,GACAC,GACAG,GACApB,GACAmB,GA+3BAtD,GAIAyF,GACA9wB,GACAuzB,GACA3c,GACAuc,GACAd,GACArI,GACAzD,GACAyN,GACAxN,GACAyN,GACAL,GACAxB,GACA7G,GACAgH,GACAS,GACAC,GAIAtH,GACA8B,GACAnC,GACAoG,GAz5BA7G,GAAKj4C,EAAE,KACPwtB,GAAKxtB,EAAE,MACPigD,GAAKjgD,EAAE,KACP+gD,GAAK/gD,EAAE,KACPsgD,GAAK,EACLpN,GAAK1lB,GACLC,GAAKwyB,GACLzC,GAAIuD,GACJvwE,GAAIynE,GACJ1E,GAAK,EACL0F,GAAK,EACL6C,GAAK,EACL5C,GAAK,EACLL,GAAK,EACLtB,GAAK,EACL0E,GAAK,EACLrF,GAAK,EACLC,GAAK,EACLC,GAAK,EACLC,GAAK,GACLuH,GAAK,CAAC,EAAG,EAAG,GACZD,GAAK,CAAC,EAAG,EAAG,IACZhE,GAAK,CAAC,IAAK,IAAK,IAAK,IAAK,IAC1BmE,GAAK,CAAC,EAAG,EAAG,EAAG,EAAG,GAClBT,GAAK,CAAC,GAAI,GAAI,EAAG,EAAG,EAAG,EAAG,EAAG,EAAG,GAAI,EAAG,EAAG,EAAG,EAAG,GAAI,GAAI,GAAI,GAAI,GAAI,IACpEvD,GAAK,CACH,GACA,EACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,EACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,EACA,IACA,IACA,GACA,GACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,GACA,GACA,EACA,IACA,IACA,GACA,GACA,GACA,GACA,GACA,IACA,GACA,IACA,IACA,GACA,GACA,GACA,IACA,IACA,GACA,IACA,GACA,IACA,IACA,GACA,KAEFiD,GAAK,CACH,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MAEFX,GAAK,EACLsC,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAEFhK,GAAK,CACH,EACA,EACA,EACA,EACA,EACA,EACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GAC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,2BACA,2BACA,4BACA,4BACA,gCACA,gCACA,iCACA,sCACA,mCACA,kCACA,qBACTC,GAAI,YACJr/B,GAAI,WACJs/B,GAAI,WACJC,GAAI,SACJC,GAAI,UACJC,GAAI,4BACK,2BACA,0BACA,0BACA,8BACA,0BACA,uBACTC,GAAI,UACJC,IAAK,WACL5N,GAAI,yBACK,iBACT6N,GAAI,WACJzW,GAAI,WACJiC,GAAI,4BACK,2BACA,2BACA,iCACA,8BACA,uBACThhB,GAAI,QACJy1B,GAAI,WACJC,GAAI,UACJ1S,GAAI,SACJ2S,GAAI,QACJC,GAAI,YACJC,GAAI,YACJ78E,GAAI,aACJ88E,GAAI,YACJnV,GAAI,QACJxnB,GAAI,6BACK,wBACTkrB,GAAI,WACJ0R,GAAI,UACJC,GAAI,WACJC,GAAI,SACJC,GAAI,QACJC,GAAI,UACJC,IAAK,UACLC,GAAI,iBACK,+BACA,uBACTjS,GAAI,QACJpoB,GAAI,UACJqB,GAAI,aACJygB,GAAI,gBACJwY,GAAI,kBACJC,GAAI,QACJn7B,GAAI,YACJo7B,GAAI,UACJC,GAAI,QACJC,GAAI,UACJC,GAAI,YACJC,GAAI,SACJC,GAAI,SACJtS,GAAI,SACJuS,GAAI,YACJ/R,GAAI,qBACJgS,GAAI,sBACJxV,GAAI,UACJyV,GAAI,QACJC,GAAI,QACJte,GAAI,kBACK,eACTue,GAAI,SACJpuE,GAAI,qBACK,sBACT0hD,GAAI,kBACK,0BACA,qBACT2sB,GAAI,UACJC,GAAI,iBACJC,GAAI,mBACK,sBACTC,GAAI,kBACK,qBACTC,GAAI,iBACJC,GAAI,QACJn/D,GAAI,WACJ+pD,GAAI,YACJ/D,GAAI,SACJoZ,GAAI,aACJC,GAAI,UACJC,GAAI,SACJx7B,GAAI,YACJy7B,GAAI,SACJpT,GAAI,UACJqT,GAAI,kBACK,8BACA,4BACA,0BACA,6BACA,+BACA,uCACA,4BACA,gCACA,8BACA,6BACA,2BACA,8BACA,2BACA,6BACA,yBAC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KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,MACA,IACA,MACA,MACA,IACA,MACA,MACA,IACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,MACA,MACA,IACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,MACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,MACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,KACA,IACA,IACA,IACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,KACA,KACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KA8jBEkD,EAAa,IAAIxsF,EAAM6oF,eAAe,CAAEsD,eAAe,IAoC3DnsF,EAAMkB,IAAI4L,OAAOnO,KAAK,CAAC,kBAlCE,SAASL,OAC5B6Z,EAAO7Z,EAAK6Z,KAGZlY,GAFI3B,EAAKrF,EACLqF,EAAK0H,EACC1H,EAAK2B,SAAW,IAG1BwiC,GAFQnkC,EAAKghB,MACNrf,EAAQ6f,K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iB,GAC5Bnb,EAAI9xD,EAAOktE,gBAAiB,GAC5B,KAEG,GAAiC,oBAA7B,GAAGhjG,SAAS5O,KAAK0kC,GAA+B,KAEpDzzB,KADLM,EAAM,CAAC,MACKmzB,EACVo4B,EAAMp4B,EAAOzzB,GACbM,EAAIiD,KAAK,IAAMvD,EAAM,IAAMosF,EAAUhhC,QAAQS,WAE/CvrD,EAAIiD,KAAK,MACFjD,EAAIZ,KAAK,YAET,GAAK+zB,GAGT24D,EAnDc"}
Index: imaps-frontend/node_modules/jspdf/dist/polyfills.es.js
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/polyfills.es.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/polyfills.es.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,62 @@
+/** @license
+ *
+ * jsPDF - PDF Document creation from JavaScript
+ * Version 2.5.2 Built on 2024-09-17T13:29:57.860Z
+ *                      CommitID 00000000
+ *
+ * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
+ *               2015-2021 yWorks GmbH, http://www.yworks.com
+ *               2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
+ *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
+ *               2010 Aaron Spike, https://github.com/acspike
+ *               2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2012 Pablo Hess, https://github.com/pablohess
+ *               2012 Florian Jenett, https://github.com/fjenett
+ *               2013 Warren Weckesser, https://github.com/warrenweckesser
+ *               2013 Youssef Beddad, https://github.com/lifof
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2013 Stefan Slonevskiy, https://github.com/stefslon
+ *               2013 Jeremy Morel, https://github.com/jmorel
+ *               2013 Christoph Hartmann, https://github.com/chris-rock
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Makes, https://github.com/dollaruw
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 Steven Spungin, https://github.com/Flamenco
+ *               2014 Kenneth Glassey, https://github.com/Gavvers
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Contributor(s):
+ *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
+ *    kim3er, mfo, alnorth, Flamenco
+ */
+
+import"core-js/es/promise";import"core-js/es/array/map";import"core-js/es/array/is-array";import"core-js/es/array/reduce";import"core-js/es/array/for-each";import"core-js/es/array/find";import"core-js/es/object/create";import"core-js/es/object/keys";import"core-js/es/object/values";import"core-js/es/object/assign";import"core-js/es/string/trim";import"core-js/es/string/trim-left";import"core-js/es/string/trim-right";import"core-js/es/number/is-integer";import"core-js/es/typed-array/uint8-array";import"core-js/es/typed-array/reduce";var e=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}(),t=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder;
+/**
+ * @license
+ * Blob.js
+ * A Blob, File, FileReader & URL implementation.
+ * 2018-08-09
+ *
+ * By Eli Grey, http://eligrey.com
+ * By Jimmy Wärting, https://github.com/jimmywarting
+ * License: MIT
+ *   See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md
+ */e.URL=e.URL||e.webkitURL||function(e,t){return(t=document.createElement("a")).href=e,t};var r=e.Blob,o=URL.createObjectURL,n=URL.revokeObjectURL,i=e.Symbol&&e.Symbol.toStringTag,a=!1,s=!1,c=!!e.ArrayBuffer,l=t&&t.prototype.append&&t.prototype.getBlob;try{a=2===new Blob(["ä"]).size,s=2===new Blob([new Uint8Array([1,2])]).size}catch(e){}function p(e){return e.map((function(e){if(e.buffer instanceof ArrayBuffer){var t=e.buffer;if(e.byteLength!==t.byteLength){var r=new Uint8Array(e.byteLength);r.set(new Uint8Array(t,e.byteOffset,e.byteLength)),t=r.buffer}return t}return e}))}function f(e,r){r=r||{};var o=new t;return p(e).forEach((function(e){o.append(e)})),r.type?o.getBlob(r.type):o.getBlob()}function u(e,t){return new r(p(e),t||{})}if(e.Blob&&(f.prototype=Blob.prototype,u.prototype=Blob.prototype),i)try{File.prototype[i]="File",Blob.prototype[i]="Blob",FileReader.prototype[i]="FileReader"}catch(e){}function d(){var t=!!e.ActiveXObject||"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,r=e.XMLHttpRequest&&e.XMLHttpRequest.prototype.send;t&&r&&(XMLHttpRequest.prototype.send=function(e){e instanceof Blob?(this.setRequestHeader("Content-Type",e.type),r.call(this,e)):r.call(this,e)});try{new File([],"")}catch(t){try{var o=new Function('class File extends Blob {constructor(chunks, name, opts) {opts = opts || {};super(chunks, opts || {});this.name = name;this.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date;this.lastModified = +this.lastModifiedDate;}};return new File([], ""), File')();e.File=o}catch(t){o=function(e,t,r){var o=new Blob(e,r),n=r&&void 0!==r.lastModified?new Date(r.lastModified):new Date;return o.name=t,o.lastModifiedDate=n,o.lastModified=+n,o.toString=function(){return"[object File]"},i&&(o[i]="File"),o};e.File=o}}}a?(d(),e.Blob=s?e.Blob:u):l?(d(),e.Blob=f):function(){function t(e){for(var t=[],r=0;r<e.length;r++){var o=e.charCodeAt(r);o<128?t.push(o):o<2048?t.push(192|o>>6,128|63&o):o<55296||o>=57344?t.push(224|o>>12,128|o>>6&63,128|63&o):(r++,o=65536+((1023&o)<<10|1023&e.charCodeAt(r)),t.push(240|o>>18,128|o>>12&63,128|o>>6&63,128|63&o))}return t}function r(e){var t,r,o,n,i,a;for(t="",o=e.length,r=0;r<o;)switch((n=e[r++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:t+=String.fromCharCode(n);break;case 12:case 13:i=e[r++],t+=String.fromCharCode((31&n)<<6|63&i);break;case 14:i=e[r++],a=e[r++],t+=String.fromCharCode((15&n)<<12|(63&i)<<6|(63&a)<<0)}return t}function i(e){for(var t=new Array(e.byteLength),r=new Uint8Array(e),o=t.length;o--;)t[o]=r[o];return t}function a(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r=[],o=0;o<e.length;o+=3){var n=e[o],i=o+1<e.length,a=i?e[o+1]:0,s=o+2<e.length,c=s?e[o+2]:0,l=n>>2,p=(3&n)<<4|a>>4,f=(15&a)<<2|c>>6,u=63&c;s||(u=64,i||(f=64)),r.push(t[l],t[p],t[f],t[u])}return r.join("")}var s=Object.create||function(e){function t(){}return t.prototype=e,new t};if(c)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],p=ArrayBuffer.isView||function(e){return e&&l.indexOf(Object.prototype.toString.call(e))>-1};function f(e,r){for(var o=0,n=(e=e||[]).length;o<n;o++){var a=e[o];a instanceof f?e[o]=a._buffer:"string"==typeof a?e[o]=t(a):c&&(ArrayBuffer.prototype.isPrototypeOf(a)||p(a))?e[o]=i(a):c&&((s=a)&&DataView.prototype.isPrototypeOf(s))?e[o]=i(a.buffer):e[o]=t(String(a))}var s;this._buffer=[].concat.apply([],e),this.size=this._buffer.length,this.type=r&&r.type||""}function u(e,t,r){r=r||{};var o=f.call(this,e,r)||this;return o.name=t,o.lastModifiedDate=r.lastModified?new Date(r.lastModified):new Date,o.lastModified=+o.lastModifiedDate,o}if(f.prototype.slice=function(e,t,r){return new f([this._buffer.slice(e||0,t||this._buffer.length)],{type:r})},f.prototype.toString=function(){return"[object Blob]"},u.prototype=s(f.prototype),u.prototype.constructor=u,Object.setPrototypeOf)Object.setPrototypeOf(u,f);else try{u.__proto__=f}catch(e){}function d(){if(!(this instanceof d))throw new TypeError("Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");var e=document.createDocumentFragment();this.addEventListener=e.addEventListener,this.dispatchEvent=function(t){var r=this["on"+t.type];"function"==typeof r&&r(t),e.dispatchEvent(t)},this.removeEventListener=e.removeEventListener}function y(e,t,r){if(!(t instanceof f))throw new TypeError("Failed to execute '"+r+"' on 'FileReader': parameter 1 is not of type 'Blob'.");e.result="",setTimeout((function(){this.readyState=d.LOADING,e.dispatchEvent(new Event("load")),e.dispatchEvent(new Event("loadend"))}))}u.prototype.toString=function(){return"[object File]"},d.EMPTY=0,d.LOADING=1,d.DONE=2,d.prototype.error=null,d.prototype.onabort=null,d.prototype.onerror=null,d.prototype.onload=null,d.prototype.onloadend=null,d.prototype.onloadstart=null,d.prototype.onprogress=null,d.prototype.readAsDataURL=function(e){y(this,e,"readAsDataURL"),this.result="data:"+e.type+";base64,"+a(e._buffer)},d.prototype.readAsText=function(e){y(this,e,"readAsText"),this.result=r(e._buffer)},d.prototype.readAsArrayBuffer=function(e){y(this,e,"readAsText"),this.result=e._buffer.slice()},d.prototype.abort=function(){},URL.createObjectURL=function(e){return e instanceof f?"data:"+e.type+";base64,"+a(e._buffer):o.call(URL,e)},URL.revokeObjectURL=function(e){n&&n.call(URL,e)};var h=e.XMLHttpRequest&&e.XMLHttpRequest.prototype.send;h&&(XMLHttpRequest.prototype.send=function(e){e instanceof f?(this.setRequestHeader("Content-Type",e.type),h.call(this,r(e._buffer))):h.call(this,e)}),e.FileReader=d,e.File=u,e.Blob=f}();var y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";void 0===e.btoa&&(e.btoa=function(e){var t,r,o,n,i,a=0,s=0,c="",l=[];if(!e)return e;do{t=(i=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,r=i>>12&63,o=i>>6&63,n=63&i,l[s++]=y.charAt(t)+y.charAt(r)+y.charAt(o)+y.charAt(n)}while(a<e.length);c=l.join("");var p=e.length%3;return(p?c.slice(0,p-3):c)+"===".slice(p||3)}),void 0===e.atob&&(e.atob=function(e){var t,r,o,n,i,a,s=0,c=0,l=[];if(!e)return e;e+="";do{t=(a=y.indexOf(e.charAt(s++))<<18|y.indexOf(e.charAt(s++))<<12|(n=y.indexOf(e.charAt(s++)))<<6|(i=y.indexOf(e.charAt(s++))))>>16&255,r=a>>8&255,o=255&a,l[c++]=64==n?String.fromCharCode(t):64==i?String.fromCharCode(t,r):String.fromCharCode(t,r,o)}while(s<e.length);return l.join("")});
Index: imaps-frontend/node_modules/jspdf/dist/polyfills.umd.js
===================================================================
--- imaps-frontend/node_modules/jspdf/dist/polyfills.umd.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/dist/polyfills.umd.js	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,75 @@
+/** @license
+ *
+ * jsPDF - PDF Document creation from JavaScript
+ * Version 2.5.2 Built on 2024-09-17T13:29:57.860Z
+ *                      CommitID 00000000
+ *
+ * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
+ *               2015-2021 yWorks GmbH, http://www.yworks.com
+ *               2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
+ *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
+ *               2010 Aaron Spike, https://github.com/acspike
+ *               2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2012 Pablo Hess, https://github.com/pablohess
+ *               2012 Florian Jenett, https://github.com/fjenett
+ *               2013 Warren Weckesser, https://github.com/warrenweckesser
+ *               2013 Youssef Beddad, https://github.com/lifof
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2013 Stefan Slonevskiy, https://github.com/stefslon
+ *               2013 Jeremy Morel, https://github.com/jmorel
+ *               2013 Christoph Hartmann, https://github.com/chris-rock
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Makes, https://github.com/dollaruw
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 Steven Spungin, https://github.com/Flamenco
+ *               2014 Kenneth Glassey, https://github.com/Gavvers
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Contributor(s):
+ *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
+ *    kim3er, mfo, alnorth, Flamenco
+ */
+
+/**
+ * Copyright (c) 2014-2023 Denis Pushkarev
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+!function(t){"function"==typeof define&&define.amd?define(t):t()}((function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t,r){return t(r={exports:{}},r.exports),r.exports}var e,n,o=function(t){return t&&t.Math===Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||function(){return this}()||t||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),c=!a((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),f=Function.prototype.call,s=c?f.bind(f):function(){return f.apply(f,arguments)},l={}.propertyIsEnumerable,p=Object.getOwnPropertyDescriptor,y={f:p&&!l.call({1:2},1)?function(t){var r=p(this,t);return!!r&&r.enumerable}:l},h=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}},d=Function.prototype,v=d.call,g=c&&d.bind.bind(v,v),b=c?g:function(t){return function(){return v.apply(t,arguments)}},w=b({}.toString),m=b("".slice),A=function(t){return m(w(t),8,-1)},T=Object,E=b("".split),O=a((function(){return!T("z").propertyIsEnumerable(0)}))?function(t){return"String"===A(t)?E(t,""):T(t)}:T,S=function(t){return null==t},j=TypeError,R=function(t){if(S(t))throw new j("Can't call method on "+t);return t},M=function(t){return O(R(t))},x="object"==typeof document&&document.all,I={all:x,IS_HTMLDDA:void 0===x&&void 0!==x},P=I.all,L=I.IS_HTMLDDA?function(t){return"function"==typeof t||t===P}:function(t){return"function"==typeof t},C=I.all,_=I.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:L(t)||t===C}:function(t){return"object"==typeof t?null!==t:L(t)},B=function(t){return L(t)?t:void 0},F=function(t,r){return arguments.length<2?B(i[t]):i[t]&&i[t][r]},U=b({}.isPrototypeOf),D="undefined"!=typeof navigator&&String(navigator.userAgent)||"",N=i.process,k=i.Deno,W=N&&N.versions||k&&k.version,V=W&&W.v8;V&&(n=(e=V.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!n&&D&&(!(e=D.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=D.match(/Chrome\/(\d+)/))&&(n=+e[1]);var Y=n,G=i.String,z=!!Object.getOwnPropertySymbols&&!a((function(){var t=Symbol("symbol detection");return!G(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Y&&Y<41})),q=z&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,H=Object,X=q?function(t){return"symbol"==typeof t}:function(t){var r=F("Symbol");return L(r)&&U(r.prototype,H(t))},K=String,J=function(t){try{return K(t)}catch(t){return"Object"}},$=TypeError,Q=function(t){if(L(t))return t;throw new $(J(t)+" is not a function")},Z=function(t,r){var e=t[r];return S(e)?void 0:Q(e)},tt=TypeError,rt=Object.defineProperty,et=function(t,r){try{rt(i,t,{value:r,configurable:!0,writable:!0})}catch(e){i[t]=r}return r},nt=i["__core-js_shared__"]||et("__core-js_shared__",{}),ot=r((function(t){(t.exports=function(t,r){return nt[t]||(nt[t]=void 0!==r?r:{})})("versions",[]).push({version:"3.33.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"})})),it=Object,at=function(t){return it(R(t))},ut=b({}.hasOwnProperty),ct=Object.hasOwn||function(t,r){return ut(at(t),r)},ft=0,st=Math.random(),lt=b(1..toString),pt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+lt(++ft+st,36)},yt=i.Symbol,ht=ot("wks"),dt=q?yt.for||yt:yt&&yt.withoutSetter||pt,vt=function(t){return ct(ht,t)||(ht[t]=z&&ct(yt,t)?yt[t]:dt("Symbol."+t)),ht[t]},gt=TypeError,bt=vt("toPrimitive"),wt=function(t,r){if(!_(t)||X(t))return t;var e,n=Z(t,bt);if(n){if(void 0===r&&(r="default"),e=s(n,t,r),!_(e)||X(e))return e;throw new gt("Can't convert object to primitive value")}return void 0===r&&(r="number"),function(t,r){var e,n;if("string"===r&&L(e=t.toString)&&!_(n=s(e,t)))return n;if(L(e=t.valueOf)&&!_(n=s(e,t)))return n;if("string"!==r&&L(e=t.toString)&&!_(n=s(e,t)))return n;throw new tt("Can't convert object to primitive value")}(t,r)},mt=function(t){var r=wt(t,"string");return X(r)?r:r+""},At=i.document,Tt=_(At)&&_(At.createElement),Et=function(t){return Tt?At.createElement(t):{}},Ot=!u&&!a((function(){return 7!==Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a})),St=Object.getOwnPropertyDescriptor,jt={f:u?St:function(t,r){if(t=M(t),r=mt(r),Ot)try{return St(t,r)}catch(t){}if(ct(t,r))return h(!s(y.f,t,r),t[r])}},Rt=u&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Mt=String,xt=TypeError,It=function(t){if(_(t))return t;throw new xt(Mt(t)+" is not an object")},Pt=TypeError,Lt=Object.defineProperty,Ct=Object.getOwnPropertyDescriptor,_t={f:u?Rt?function(t,r,e){if(It(t),r=mt(r),It(e),"function"==typeof t&&"prototype"===r&&"value"in e&&"writable"in e&&!e.writable){var n=Ct(t,r);n&&n.writable&&(t[r]=e.value,e={configurable:"configurable"in e?e.configurable:n.configurable,enumerable:"enumerable"in e?e.enumerable:n.enumerable,writable:!1})}return Lt(t,r,e)}:Lt:function(t,r,e){if(It(t),r=mt(r),It(e),Ot)try{return Lt(t,r,e)}catch(t){}if("get"in e||"set"in e)throw new Pt("Accessors not supported");return"value"in e&&(t[r]=e.value),t}},Bt=u?function(t,r,e){return _t.f(t,r,h(1,e))}:function(t,r,e){return t[r]=e,t},Ft=Function.prototype,Ut=u&&Object.getOwnPropertyDescriptor,Dt=ct(Ft,"name"),Nt={EXISTS:Dt,PROPER:Dt&&"something"===function(){}.name,CONFIGURABLE:Dt&&(!u||u&&Ut(Ft,"name").configurable)},kt=b(Function.toString);L(nt.inspectSource)||(nt.inspectSource=function(t){return kt(t)});var Wt,Vt,Yt,Gt=nt.inspectSource,zt=i.WeakMap,qt=L(zt)&&/native code/.test(String(zt)),Ht=ot("keys"),Xt=function(t){return Ht[t]||(Ht[t]=pt(t))},Kt={},Jt=i.TypeError,$t=i.WeakMap;if(qt||nt.state){var Qt=nt.state||(nt.state=new $t);Qt.get=Qt.get,Qt.has=Qt.has,Qt.set=Qt.set,Wt=function(t,r){if(Qt.has(t))throw new Jt("Object already initialized");return r.facade=t,Qt.set(t,r),r},Vt=function(t){return Qt.get(t)||{}},Yt=function(t){return Qt.has(t)}}else{var Zt=Xt("state");Kt[Zt]=!0,Wt=function(t,r){if(ct(t,Zt))throw new Jt("Object already initialized");return r.facade=t,Bt(t,Zt,r),r},Vt=function(t){return ct(t,Zt)?t[Zt]:{}},Yt=function(t){return ct(t,Zt)}}var tr,rr={set:Wt,get:Vt,has:Yt,enforce:function(t){return Yt(t)?Vt(t):Wt(t,{})},getterFor:function(t){return function(r){var e;if(!_(r)||(e=Vt(r)).type!==t)throw new Jt("Incompatible receiver, "+t+" required");return e}}},er=r((function(t){var r=Nt.CONFIGURABLE,e=rr.enforce,n=rr.get,o=String,i=Object.defineProperty,c=b("".slice),f=b("".replace),s=b([].join),l=u&&!a((function(){return 8!==i((function(){}),"length",{value:8}).length})),p=String(String).split("String"),y=t.exports=function(t,n,a){"Symbol("===c(o(n),0,7)&&(n="["+f(o(n),/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(n="get "+n),a&&a.setter&&(n="set "+n),(!ct(t,"name")||r&&t.name!==n)&&(u?i(t,"name",{value:n,configurable:!0}):t.name=n),l&&a&&ct(a,"arity")&&t.length!==a.arity&&i(t,"length",{value:a.arity});try{a&&ct(a,"constructor")&&a.constructor?u&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var y=e(t);return ct(y,"source")||(y.source=s(p,"string"==typeof n?n:"")),t};Function.prototype.toString=y((function(){return L(this)&&n(this).source||Gt(this)}),"toString")})),nr=function(t,r,e,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:r;if(L(e)&&er(e,i,n),n.global)o?t[r]=e:et(r,e);else{try{n.unsafe?t[r]&&(o=!0):delete t[r]}catch(t){}o?t[r]=e:_t.f(t,r,{value:e,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},or=Math.ceil,ir=Math.floor,ar=Math.trunc||function(t){var r=+t;return(r>0?ir:or)(r)},ur=function(t){var r=+t;return r!=r||0===r?0:ar(r)},cr=Math.max,fr=Math.min,sr=function(t,r){var e=ur(t);return e<0?cr(e+r,0):fr(e,r)},lr=Math.min,pr=function(t){return t>0?lr(ur(t),9007199254740991):0},yr=function(t){return pr(t.length)},hr=function(t){return function(r,e,n){var o,i=M(r),a=yr(i),u=sr(n,a);if(t&&e!=e){for(;a>u;)if((o=i[u++])!=o)return!0}else for(;a>u;u++)if((t||u in i)&&i[u]===e)return t||u||0;return!t&&-1}},dr={includes:hr(!0),indexOf:hr(!1)},vr=dr.indexOf,gr=b([].push),br=function(t,r){var e,n=M(t),o=0,i=[];for(e in n)!ct(Kt,e)&&ct(n,e)&&gr(i,e);for(;r.length>o;)ct(n,e=r[o++])&&(~vr(i,e)||gr(i,e));return i},wr=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],mr=wr.concat("length","prototype"),Ar={f:Object.getOwnPropertyNames||function(t){return br(t,mr)}},Tr={f:Object.getOwnPropertySymbols},Er=b([].concat),Or=F("Reflect","ownKeys")||function(t){var r=Ar.f(It(t)),e=Tr.f;return e?Er(r,e(t)):r},Sr=function(t,r,e){for(var n=Or(r),o=_t.f,i=jt.f,a=0;a<n.length;a++){var u=n[a];ct(t,u)||e&&ct(e,u)||o(t,u,i(r,u))}},jr=/#|\.prototype\./,Rr=function(t,r){var e=xr[Mr(t)];return e===Pr||e!==Ir&&(L(r)?a(r):!!r)},Mr=Rr.normalize=function(t){return String(t).replace(jr,".").toLowerCase()},xr=Rr.data={},Ir=Rr.NATIVE="N",Pr=Rr.POLYFILL="P",Lr=Rr,Cr=jt.f,_r=function(t,r){var e,n,o,a,u,c=t.target,f=t.global,s=t.stat;if(e=f?i:s?i[c]||et(c,{}):(i[c]||{}).prototype)for(n in r){if(a=r[n],o=t.dontCallGetSet?(u=Cr(e,n))&&u.value:e[n],!Lr(f?n:c+(s?".":"#")+n,t.forced)&&void 0!==o){if(typeof a==typeof o)continue;Sr(a,o)}(t.sham||o&&o.sham)&&Bt(a,"sham",!0),nr(e,n,a,t)}},Br=!a((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Fr=Xt("IE_PROTO"),Ur=Object,Dr=Ur.prototype,Nr=Br?Ur.getPrototypeOf:function(t){var r=at(t);if(ct(r,Fr))return r[Fr];var e=r.constructor;return L(e)&&r instanceof e?e.prototype:r instanceof Ur?Dr:null},kr=String,Wr=TypeError,Vr=Object.setPrototypeOf||("__proto__"in{}?function(){var t,r=!1,e={};try{(t=function(t,r,e){try{return b(Q(Object.getOwnPropertyDescriptor(t,r)[e]))}catch(t){}}(Object.prototype,"__proto__","set"))(e,[]),r=e instanceof Array}catch(t){}return function(e,n){return It(e),function(t){if("object"==typeof t||L(t))return t;throw new Wr("Can't set "+kr(t)+" as a prototype")}(n),r?t(e,n):e.__proto__=n,e}}():void 0),Yr=Object.keys||function(t){return br(t,wr)},Gr={f:u&&!Rt?Object.defineProperties:function(t,r){It(t);for(var e,n=M(r),o=Yr(r),i=o.length,a=0;i>a;)_t.f(t,e=o[a++],n[e]);return t}},zr=F("document","documentElement"),qr=Xt("IE_PROTO"),Hr=function(){},Xr=function(t){return"<script>"+t+"<\/script>"},Kr=function(t){t.write(Xr("")),t.close();var r=t.parentWindow.Object;return t=null,r},Jr=function(){try{tr=new ActiveXObject("htmlfile")}catch(t){}var t,r;Jr="undefined"!=typeof document?document.domain&&tr?Kr(tr):((r=Et("iframe")).style.display="none",zr.appendChild(r),r.src=String("javascript:"),(t=r.contentWindow.document).open(),t.write(Xr("document.F=Object")),t.close(),t.F):Kr(tr);for(var e=wr.length;e--;)delete Jr.prototype[wr[e]];return Jr()};Kt[qr]=!0;var $r=Object.create||function(t,r){var e;return null!==t?(Hr.prototype=It(t),e=new Hr,Hr.prototype=null,e[qr]=t):e=Jr(),void 0===r?e:Gr.f(e,r)},Qr=function(t,r){_(r)&&"cause"in r&&Bt(t,"cause",r.cause)},Zr=Error,te=b("".replace),re=String(new Zr("zxcasd").stack),ee=/\n\s*at [^:]*:[^\n]*/,ne=ee.test(re),oe=!a((function(){var t=new Error("a");return!("stack"in t)||(Object.defineProperty(t,"stack",h(1,7)),7!==t.stack)})),ie=Error.captureStackTrace,ae=function(t,r,e,n){oe&&(ie?ie(t,r):Bt(t,"stack",function(t,r){if(ne&&"string"==typeof t&&!Zr.prepareStackTrace)for(;r--;)t=te(t,ee,"");return t}(e,n)))},ue=function(t){if("Function"===A(t))return b(t)},ce=ue(ue.bind),fe=function(t,r){return Q(t),void 0===r?t:c?ce(t,r):function(){return t.apply(r,arguments)}},se={},le=vt("iterator"),pe=Array.prototype,ye=function(t){return void 0!==t&&(se.Array===t||pe[le]===t)},he={};he[vt("toStringTag")]="z";var de="[object z]"===String(he),ve=vt("toStringTag"),ge=Object,be="Arguments"===A(function(){return arguments}()),we=de?A:function(t){var r,e,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(e=function(t,r){try{return t[r]}catch(t){}}(r=ge(t),ve))?e:be?A(r):"Object"===(n=A(r))&&L(r.callee)?"Arguments":n},me=vt("iterator"),Ae=function(t){if(!S(t))return Z(t,me)||Z(t,"@@iterator")||se[we(t)]},Te=TypeError,Ee=function(t,r){var e=arguments.length<2?Ae(t):r;if(Q(e))return It(s(e,t));throw new Te(J(t)+" is not iterable")},Oe=function(t,r,e){var n,o;It(t);try{if(!(n=Z(t,"return"))){if("throw"===r)throw e;return e}n=s(n,t)}catch(t){o=!0,n=t}if("throw"===r)throw e;if(o)throw n;return It(n),e},Se=TypeError,je=function(t,r){this.stopped=t,this.result=r},Re=je.prototype,Me=function(t,r,e){var n,o,i,a,u,c,f,l=e&&e.that,p=!(!e||!e.AS_ENTRIES),y=!(!e||!e.IS_RECORD),h=!(!e||!e.IS_ITERATOR),d=!(!e||!e.INTERRUPTED),v=fe(r,l),g=function(t){return n&&Oe(n,"normal",t),new je(!0,t)},b=function(t){return p?(It(t),d?v(t[0],t[1],g):v(t[0],t[1])):d?v(t,g):v(t)};if(y)n=t.iterator;else if(h)n=t;else{if(!(o=Ae(t)))throw new Se(J(t)+" is not iterable");if(ye(o)){for(i=0,a=yr(t);a>i;i++)if((u=b(t[i]))&&U(Re,u))return u;return new je(!1)}n=Ee(t,o)}for(c=y?t.next:n.next;!(f=s(c,n)).done;){try{u=b(f.value)}catch(t){Oe(n,"throw",t)}if("object"==typeof u&&u&&U(Re,u))return u}return new je(!1)},xe=String,Ie=function(t){if("Symbol"===we(t))throw new TypeError("Cannot convert a Symbol value to a string");return xe(t)},Pe=function(t,r){return void 0===t?arguments.length<2?"":r:Ie(t)},Le=vt("toStringTag"),Ce=Error,_e=[].push,Be=function(t,r){var e,n=U(Fe,this);Vr?e=Vr(new Ce,n?Nr(this):Fe):(e=n?this:$r(Fe),Bt(e,Le,"Error")),void 0!==r&&Bt(e,"message",Pe(r)),ae(e,Be,e.stack,1),arguments.length>2&&Qr(e,arguments[2]);var o=[];return Me(t,_e,{that:o}),Bt(e,"errors",o),e};Vr?Vr(Be,Ce):Sr(Be,Ce,{name:!0});var Fe=Be.prototype=$r(Ce.prototype,{constructor:h(1,Be),message:h(1,""),name:h(1,"AggregateError")});_r({global:!0,constructor:!0,arity:2},{AggregateError:Be});var Ue=_t.f,De=vt("unscopables"),Ne=Array.prototype;void 0===Ne[De]&&Ue(Ne,De,{configurable:!0,value:$r(null)});var ke,We,Ve,Ye=function(t){Ne[De][t]=!0},Ge=vt("iterator"),ze=!1;[].keys&&("next"in(Ve=[].keys())?(We=Nr(Nr(Ve)))!==Object.prototype&&(ke=We):ze=!0),(!_(ke)||a((function(){var t={};return ke[Ge].call(t)!==t})))&&(ke={}),L(ke[Ge])||nr(ke,Ge,(function(){return this}));var qe={IteratorPrototype:ke,BUGGY_SAFARI_ITERATORS:ze},He=_t.f,Xe=vt("toStringTag"),Ke=function(t,r,e){t&&!e&&(t=t.prototype),t&&!ct(t,Xe)&&He(t,Xe,{configurable:!0,value:r})},Je=qe.IteratorPrototype,$e=function(){return this},Qe=Nt.PROPER,Ze=Nt.CONFIGURABLE,tn=qe.IteratorPrototype,rn=qe.BUGGY_SAFARI_ITERATORS,en=vt("iterator"),nn=function(){return this},on=function(t,r,e,n,o,i,a){!function(t,r,e,n){var o=r+" Iterator";t.prototype=$r(Je,{next:h(+!n,e)}),Ke(t,o,!1),se[o]=$e}(e,r,n);var u,c,f,l=function(t){if(t===o&&g)return g;if(!rn&&t&&t in d)return d[t];switch(t){case"keys":case"values":case"entries":return function(){return new e(this,t)}}return function(){return new e(this)}},p=r+" Iterator",y=!1,d=t.prototype,v=d[en]||d["@@iterator"]||o&&d[o],g=!rn&&v||l(o),b="Array"===r&&d.entries||v;if(b&&(u=Nr(b.call(new t)))!==Object.prototype&&u.next&&(Nr(u)!==tn&&(Vr?Vr(u,tn):L(u[en])||nr(u,en,nn)),Ke(u,p,!0)),Qe&&"values"===o&&v&&"values"!==v.name&&(Ze?Bt(d,"name","values"):(y=!0,g=function(){return s(v,this)})),o)if(c={values:l("values"),keys:i?g:l("keys"),entries:l("entries")},a)for(f in c)(rn||y||!(f in d))&&nr(d,f,c[f]);else _r({target:r,proto:!0,forced:rn||y},c);return d[en]!==g&&nr(d,en,g,{name:o}),se[r]=g,c},an=function(t,r){return{value:t,done:r}},un=_t.f,cn=rr.set,fn=rr.getterFor("Array Iterator"),sn=on(Array,"Array",(function(t,r){cn(this,{type:"Array Iterator",target:M(t),index:0,kind:r})}),(function(){var t=fn(this),r=t.target,e=t.kind,n=t.index++;if(!r||n>=r.length)return t.target=void 0,an(void 0,!0);switch(e){case"keys":return an(n,!1);case"values":return an(r[n],!1)}return an([n,r[n]],!1)}),"values"),ln=se.Arguments=se.Array;if(Ye("keys"),Ye("values"),Ye("entries"),u&&"values"!==ln.name)try{un(ln,"name",{value:"values"})}catch(t){}var pn=de?{}.toString:function(){return"[object "+we(this)+"]"};de||nr(Object.prototype,"toString",pn,{unsafe:!0});var yn="process"===A(i.process),hn=function(t,r,e){return e.get&&er(e.get,r,{getter:!0}),e.set&&er(e.set,r,{setter:!0}),_t.f(t,r,e)},dn=vt("species"),vn=function(t){var r=F(t);u&&r&&!r[dn]&&hn(r,dn,{configurable:!0,get:function(){return this}})},gn=TypeError,bn=function(t,r){if(U(r,t))return t;throw new gn("Incorrect invocation")},wn=function(){},mn=[],An=F("Reflect","construct"),Tn=/^\s*(?:class|function)\b/,En=b(Tn.exec),On=!Tn.test(wn),Sn=function(t){if(!L(t))return!1;try{return An(wn,mn,t),!0}catch(t){return!1}},jn=function(t){if(!L(t))return!1;switch(we(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return On||!!En(Tn,Gt(t))}catch(t){return!0}};jn.sham=!0;var Rn,Mn,xn,In,Pn=!An||a((function(){var t;return Sn(Sn.call)||!Sn(Object)||!Sn((function(){t=!0}))||t}))?jn:Sn,Ln=TypeError,Cn=function(t){if(Pn(t))return t;throw new Ln(J(t)+" is not a constructor")},_n=vt("species"),Bn=function(t,r){var e,n=It(t).constructor;return void 0===n||S(e=It(n)[_n])?r:Cn(e)},Fn=Function.prototype,Un=Fn.apply,Dn=Fn.call,Nn="object"==typeof Reflect&&Reflect.apply||(c?Dn.bind(Un):function(){return Dn.apply(Un,arguments)}),kn=b([].slice),Wn=TypeError,Vn=function(t,r){if(t<r)throw new Wn("Not enough arguments");return t},Yn=/(?:ipad|iphone|ipod).*applewebkit/i.test(D),Gn=i.setImmediate,zn=i.clearImmediate,qn=i.process,Hn=i.Dispatch,Xn=i.Function,Kn=i.MessageChannel,Jn=i.String,$n=0,Qn={};a((function(){Rn=i.location}));var Zn=function(t){if(ct(Qn,t)){var r=Qn[t];delete Qn[t],r()}},to=function(t){return function(){Zn(t)}},ro=function(t){Zn(t.data)},eo=function(t){i.postMessage(Jn(t),Rn.protocol+"//"+Rn.host)};Gn&&zn||(Gn=function(t){Vn(arguments.length,1);var r=L(t)?t:Xn(t),e=kn(arguments,1);return Qn[++$n]=function(){Nn(r,void 0,e)},Mn($n),$n},zn=function(t){delete Qn[t]},yn?Mn=function(t){qn.nextTick(to(t))}:Hn&&Hn.now?Mn=function(t){Hn.now(to(t))}:Kn&&!Yn?(In=(xn=new Kn).port2,xn.port1.onmessage=ro,Mn=fe(In.postMessage,In)):i.addEventListener&&L(i.postMessage)&&!i.importScripts&&Rn&&"file:"!==Rn.protocol&&!a(eo)?(Mn=eo,i.addEventListener("message",ro,!1)):Mn="onreadystatechange"in Et("script")?function(t){zr.appendChild(Et("script")).onreadystatechange=function(){zr.removeChild(this),Zn(t)}}:function(t){setTimeout(to(t),0)});var no={set:Gn,clear:zn},oo=function(){this.head=null,this.tail=null};oo.prototype={add:function(t){var r={item:t,next:null},e=this.tail;e?e.next=r:this.head=r,this.tail=r},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var io,ao,uo,co,fo,so=oo,lo=/ipad|iphone|ipod/i.test(D)&&"undefined"!=typeof Pebble,po=/web0s(?!.*chrome)/i.test(D),yo=jt.f,ho=no.set,vo=i.MutationObserver||i.WebKitMutationObserver,go=i.document,bo=i.process,wo=i.Promise,mo=yo(i,"queueMicrotask"),Ao=mo&&mo.value;if(!Ao){var To=new so,Eo=function(){var t,r;for(yn&&(t=bo.domain)&&t.exit();r=To.get();)try{r()}catch(t){throw To.head&&io(),t}t&&t.enter()};Yn||yn||po||!vo||!go?!lo&&wo&&wo.resolve?((co=wo.resolve(void 0)).constructor=wo,fo=fe(co.then,co),io=function(){fo(Eo)}):yn?io=function(){bo.nextTick(Eo)}:(ho=fe(ho,i),io=function(){ho(Eo)}):(ao=!0,uo=go.createTextNode(""),new vo(Eo).observe(uo,{characterData:!0}),io=function(){uo.data=ao=!ao}),Ao=function(t){To.head||io(),To.add(t)}}var Oo,So,jo,Ro=Ao,Mo=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},xo=i.Promise,Io="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Po=!Io&&!yn&&"object"==typeof window&&"object"==typeof document,Lo=(xo&&xo.prototype,vt("species")),Co=!1,_o=L(i.PromiseRejectionEvent),Bo={CONSTRUCTOR:Lr("Promise",(function(){var t=Gt(xo),r=t!==String(xo);if(!r&&66===Y)return!0;if(!Y||Y<51||!/native code/.test(t)){var e=new xo((function(t){t(1)})),n=function(t){t((function(){}),(function(){}))};if((e.constructor={})[Lo]=n,!(Co=e.then((function(){}))instanceof n))return!0}return!r&&(Po||Io)&&!_o})),REJECTION_EVENT:_o,SUBCLASSING:Co},Fo=TypeError,Uo=function(t){var r,e;this.promise=new t((function(t,n){if(void 0!==r||void 0!==e)throw new Fo("Bad Promise constructor");r=t,e=n})),this.resolve=Q(r),this.reject=Q(e)},Do={f:function(t){return new Uo(t)}},No=no.set,ko=Bo.CONSTRUCTOR,Wo=Bo.REJECTION_EVENT,Vo=Bo.SUBCLASSING,Yo=rr.getterFor("Promise"),Go=rr.set,zo=xo&&xo.prototype,qo=xo,Ho=zo,Xo=i.TypeError,Ko=i.document,Jo=i.process,$o=Do.f,Qo=$o,Zo=!!(Ko&&Ko.createEvent&&i.dispatchEvent),ti=function(t){var r;return!(!_(t)||!L(r=t.then))&&r},ri=function(t,r){var e,n,o,i=r.value,a=1===r.state,u=a?t.ok:t.fail,c=t.resolve,f=t.reject,l=t.domain;try{u?(a||(2===r.rejection&&ai(r),r.rejection=1),!0===u?e=i:(l&&l.enter(),e=u(i),l&&(l.exit(),o=!0)),e===t.promise?f(new Xo("Promise-chain cycle")):(n=ti(e))?s(n,e,c,f):c(e)):f(i)}catch(t){l&&!o&&l.exit(),f(t)}},ei=function(t,r){t.notified||(t.notified=!0,Ro((function(){for(var e,n=t.reactions;e=n.get();)ri(e,t);t.notified=!1,r&&!t.rejection&&oi(t)})))},ni=function(t,r,e){var n,o;Zo?((n=Ko.createEvent("Event")).promise=r,n.reason=e,n.initEvent(t,!1,!0),i.dispatchEvent(n)):n={promise:r,reason:e},!Wo&&(o=i["on"+t])?o(n):"unhandledrejection"===t&&function(t,r){try{1===arguments.length?console.error(t):console.error(t,r)}catch(t){}}("Unhandled promise rejection",e)},oi=function(t){s(No,i,(function(){var r,e=t.facade,n=t.value;if(ii(t)&&(r=Mo((function(){yn?Jo.emit("unhandledRejection",n,e):ni("unhandledrejection",e,n)})),t.rejection=yn||ii(t)?2:1,r.error))throw r.value}))},ii=function(t){return 1!==t.rejection&&!t.parent},ai=function(t){s(No,i,(function(){var r=t.facade;yn?Jo.emit("rejectionHandled",r):ni("rejectionhandled",r,t.value)}))},ui=function(t,r,e){return function(n){t(r,n,e)}},ci=function(t,r,e){t.done||(t.done=!0,e&&(t=e),t.value=r,t.state=2,ei(t,!0))},fi=function(t,r,e){if(!t.done){t.done=!0,e&&(t=e);try{if(t.facade===r)throw new Xo("Promise can't be resolved itself");var n=ti(r);n?Ro((function(){var e={done:!1};try{s(n,r,ui(fi,e,t),ui(ci,e,t))}catch(r){ci(e,r,t)}})):(t.value=r,t.state=1,ei(t,!1))}catch(r){ci({done:!1},r,t)}}};if(ko&&(Ho=(qo=function(t){bn(this,Ho),Q(t),s(Oo,this);var r=Yo(this);try{t(ui(fi,r),ui(ci,r))}catch(t){ci(r,t)}}).prototype,(Oo=function(t){Go(this,{type:"Promise",done:!1,notified:!1,parent:!1,reactions:new so,rejection:!1,state:0,value:void 0})}).prototype=nr(Ho,"then",(function(t,r){var e=Yo(this),n=$o(Bn(this,qo));return e.parent=!0,n.ok=!L(t)||t,n.fail=L(r)&&r,n.domain=yn?Jo.domain:void 0,0===e.state?e.reactions.add(n):Ro((function(){ri(n,e)})),n.promise})),So=function(){var t=new Oo,r=Yo(t);this.promise=t,this.resolve=ui(fi,r),this.reject=ui(ci,r)},Do.f=$o=function(t){return t===qo||void 0===t?new So(t):Qo(t)},L(xo)&&zo!==Object.prototype)){jo=zo.then,Vo||nr(zo,"then",(function(t,r){var e=this;return new qo((function(t,r){s(jo,e,t,r)})).then(t,r)}),{unsafe:!0});try{delete zo.constructor}catch(t){}Vr&&Vr(zo,Ho)}_r({global:!0,constructor:!0,wrap:!0,forced:ko},{Promise:qo}),Ke(qo,"Promise",!1),vn("Promise");var si=vt("iterator"),li=!1;try{var pi=0,yi={next:function(){return{done:!!pi++}},return:function(){li=!0}};yi[si]=function(){return this},Array.from(yi,(function(){throw 2}))}catch(t){}var hi=function(t,r){try{if(!r&&!li)return!1}catch(t){return!1}var e=!1;try{var n={};n[si]=function(){return{next:function(){return{done:e=!0}}}},t(n)}catch(t){}return e},di=Bo.CONSTRUCTOR||!hi((function(t){xo.all(t).then(void 0,(function(){}))}));_r({target:"Promise",stat:!0,forced:di},{all:function(t){var r=this,e=Do.f(r),n=e.resolve,o=e.reject,i=Mo((function(){var e=Q(r.resolve),i=[],a=0,u=1;Me(t,(function(t){var c=a++,f=!1;u++,s(e,r,t).then((function(t){f||(f=!0,i[c]=t,--u||n(i))}),o)})),--u||n(i)}));return i.error&&o(i.value),e.promise}});var vi=Bo.CONSTRUCTOR,gi=xo&&xo.prototype;if(_r({target:"Promise",proto:!0,forced:vi,real:!0},{catch:function(t){return this.then(void 0,t)}}),L(xo)){var bi=F("Promise").prototype.catch;gi.catch!==bi&&nr(gi,"catch",bi,{unsafe:!0})}_r({target:"Promise",stat:!0,forced:di},{race:function(t){var r=this,e=Do.f(r),n=e.reject,o=Mo((function(){var o=Q(r.resolve);Me(t,(function(t){s(o,r,t).then(e.resolve,n)}))}));return o.error&&n(o.value),e.promise}}),_r({target:"Promise",stat:!0,forced:Bo.CONSTRUCTOR},{reject:function(t){var r=Do.f(this);return s(r.reject,void 0,t),r.promise}});var wi=function(t,r){if(It(t),_(r)&&r.constructor===t)return r;var e=Do.f(t);return(0,e.resolve)(r),e.promise},mi=Bo.CONSTRUCTOR;F("Promise");_r({target:"Promise",stat:!0,forced:mi},{resolve:function(t){return wi(this,t)}}),_r({target:"Promise",stat:!0,forced:di},{allSettled:function(t){var r=this,e=Do.f(r),n=e.resolve,o=e.reject,i=Mo((function(){var e=Q(r.resolve),o=[],i=0,a=1;Me(t,(function(t){var u=i++,c=!1;a++,s(e,r,t).then((function(t){c||(c=!0,o[u]={status:"fulfilled",value:t},--a||n(o))}),(function(t){c||(c=!0,o[u]={status:"rejected",reason:t},--a||n(o))}))})),--a||n(o)}));return i.error&&o(i.value),e.promise}});_r({target:"Promise",stat:!0,forced:di},{any:function(t){var r=this,e=F("AggregateError"),n=Do.f(r),o=n.resolve,i=n.reject,a=Mo((function(){var n=Q(r.resolve),a=[],u=0,c=1,f=!1;Me(t,(function(t){var l=u++,p=!1;c++,s(n,r,t).then((function(t){p||f||(f=!0,o(t))}),(function(t){p||f||(p=!0,a[l]=t,--c||i(new e(a,"No one promise resolved")))}))})),--c||i(new e(a,"No one promise resolved"))}));return a.error&&i(a.value),n.promise}});var Ai=xo&&xo.prototype,Ti=!!xo&&a((function(){Ai.finally.call({then:function(){}},(function(){}))}));if(_r({target:"Promise",proto:!0,real:!0,forced:Ti},{finally:function(t){var r=Bn(this,F("Promise")),e=L(t);return this.then(e?function(e){return wi(r,t()).then((function(){return e}))}:t,e?function(e){return wi(r,t()).then((function(){throw e}))}:t)}}),L(xo)){var Ei=F("Promise").prototype.finally;Ai.finally!==Ei&&nr(Ai,"finally",Ei,{unsafe:!0})}var Oi=b("".charAt),Si=b("".charCodeAt),ji=b("".slice),Ri=function(t){return function(r,e){var n,o,i=Ie(R(r)),a=ur(e),u=i.length;return a<0||a>=u?t?"":void 0:(n=Si(i,a))<55296||n>56319||a+1===u||(o=Si(i,a+1))<56320||o>57343?t?Oi(i,a):n:t?ji(i,a,a+2):o-56320+(n-55296<<10)+65536}},Mi={codeAt:Ri(!1),charAt:Ri(!0)}.charAt,xi=rr.set,Ii=rr.getterFor("String Iterator");on(String,"String",(function(t){xi(this,{type:"String Iterator",string:Ie(t),index:0})}),(function(){var t,r=Ii(this),e=r.string,n=r.index;return n>=e.length?an(void 0,!0):(t=Mi(e,n),r.index+=t.length,an(t,!1))}));var Pi,Li=i,Ci=(Li.Promise,Array.isArray||function(t){return"Array"===A(t)}),_i=vt("species"),Bi=Array,Fi=function(t,r){return new(function(t){var r;return Ci(t)&&(r=t.constructor,(Pn(r)&&(r===Bi||Ci(r.prototype))||_(r)&&null===(r=r[_i]))&&(r=void 0)),void 0===r?Bi:r}(t))(0===r?0:r)},Ui=b([].push),Di=function(t){var r=1===t,e=2===t,n=3===t,o=4===t,i=6===t,a=7===t,u=5===t||i;return function(c,f,s,l){for(var p,y,h=at(c),d=O(h),v=fe(f,s),g=yr(d),b=0,w=l||Fi,m=r?w(c,g):e||a?w(c,0):void 0;g>b;b++)if((u||b in d)&&(y=v(p=d[b],b,h),t))if(r)m[b]=y;else if(y)switch(t){case 3:return!0;case 5:return p;case 6:return b;case 2:Ui(m,p)}else switch(t){case 4:return!1;case 7:Ui(m,p)}return i?-1:n||o?o:m}},Ni={forEach:Di(0),map:Di(1),filter:Di(2),some:Di(3),every:Di(4),find:Di(5),findIndex:Di(6),filterReject:Di(7)},ki=vt("species"),Wi=Ni.map,Vi=(Pi="map",Y>=51||!a((function(){var t=[];return(t.constructor={})[ki]=function(){return{foo:1}},1!==t[Pi](Boolean).foo})));_r({target:"Array",proto:!0,forced:!Vi},{map:function(t){return Wi(this,t,arguments.length>1?arguments[1]:void 0)}});var Yi=function(t,r){return b(i[t].prototype[r])};Yi("Array","map");_r({target:"Array",stat:!0},{isArray:Ci});Li.Array.isArray;var Gi=TypeError,zi=function(t){return function(r,e,n,o){Q(e);var i=at(r),a=O(i),u=yr(i),c=t?u-1:0,f=t?-1:1;if(n<2)for(;;){if(c in a){o=a[c],c+=f;break}if(c+=f,t?c<0:u<=c)throw new Gi("Reduce of empty array with no initial value")}for(;t?c>=0:u>c;c+=f)c in a&&(o=e(o,a[c],c,i));return o}},qi={left:zi(!1),right:zi(!0)},Hi=function(t,r){var e=[][t];return!!e&&a((function(){e.call(null,r||function(){return 1},1)}))},Xi=qi.left,Ki=!yn&&Y>79&&Y<83||!Hi("reduce");_r({target:"Array",proto:!0,forced:Ki},{reduce:function(t){var r=arguments.length;return Xi(this,t,r,r>1?arguments[1]:void 0)}});Yi("Array","reduce");var Ji=Ni.forEach,$i=Hi("forEach")?[].forEach:function(t){return Ji(this,t,arguments.length>1?arguments[1]:void 0)};_r({target:"Array",proto:!0,forced:[].forEach!==$i},{forEach:$i});Yi("Array","forEach");var Qi=Ni.find,Zi=!0;"find"in[]&&Array(1).find((function(){Zi=!1})),_r({target:"Array",proto:!0,forced:Zi},{find:function(t){return Qi(this,t,arguments.length>1?arguments[1]:void 0)}}),Ye("find");Yi("Array","find");_r({target:"Object",stat:!0,sham:!u},{create:$r});Li.Object;var ta=a((function(){Yr(1)}));_r({target:"Object",stat:!0,forced:ta},{keys:function(t){return Yr(at(t))}});Li.Object.keys;var ra=b(y.f),ea=b([].push),na=u&&a((function(){var t=Object.create(null);return t[2]=2,!ra(t,2)})),oa=function(t){return function(r){for(var e,n=M(r),o=Yr(n),i=na&&null===Nr(n),a=o.length,c=0,f=[];a>c;)e=o[c++],u&&!(i?e in n:ra(n,e))||ea(f,t?[e,n[e]]:n[e]);return f}},ia={entries:oa(!0),values:oa(!1)}.values;_r({target:"Object",stat:!0},{values:function(t){return ia(t)}});Li.Object.values;var aa=Object.assign,ua=Object.defineProperty,ca=b([].concat),fa=!aa||a((function(){if(u&&1!==aa({b:1},aa(ua({},"a",{enumerable:!0,get:function(){ua(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},r={},e=Symbol("assign detection");return t[e]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),7!==aa({},t)[e]||"abcdefghijklmnopqrst"!==Yr(aa({},r)).join("")}))?function(t,r){for(var e=at(t),n=arguments.length,o=1,i=Tr.f,a=y.f;n>o;)for(var c,f=O(arguments[o++]),l=i?ca(Yr(f),i(f)):Yr(f),p=l.length,h=0;p>h;)c=l[h++],u&&!s(a,f,c)||(e[c]=f[c]);return e}:aa;_r({target:"Object",stat:!0,arity:2,forced:Object.assign!==fa},{assign:fa});Li.Object.assign;var sa="\t\n\v\f\r                　\u2028\u2029\ufeff",la=b("".replace),pa=RegExp("^["+sa+"]+"),ya=RegExp("(^|[^"+sa+"])["+sa+"]+$"),ha=function(t){return function(r){var e=Ie(R(r));return 1&t&&(e=la(e,pa,"")),2&t&&(e=la(e,ya,"$1")),e}},da={start:ha(1),end:ha(2),trim:ha(3)},va=Nt.PROPER,ga=function(t){return a((function(){return!!sa[t]()||"​
+᠎"!=="​
+᠎"[t]()||va&&sa[t].name!==t}))},ba=da.trim;_r({target:"String",proto:!0,forced:ga("trim")},{trim:function(){return ba(this)}});Yi("String","trim");var wa=da.start,ma=ga("trimStart")?function(){return wa(this)}:"".trimStart;_r({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==ma},{trimLeft:ma}),_r({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==ma},{trimStart:ma});Yi("String","trimLeft");var Aa=da.end,Ta=ga("trimEnd")?function(){return Aa(this)}:"".trimEnd;_r({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==Ta},{trimRight:Ta}),_r({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==Ta},{trimEnd:Ta});Yi("String","trimRight");var Ea=Math.floor,Oa=Number.isInteger||function(t){return!_(t)&&isFinite(t)&&Ea(t)===t};_r({target:"Number",stat:!0},{isInteger:Oa});Li.Number.isInteger;var Sa="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,ja=function(t,r,e){for(var n in r)nr(t,n,r[n],e);return t},Ra=RangeError,Ma=function(t){if(void 0===t)return 0;var r=ur(t),e=pr(r);if(r!==e)throw new Ra("Wrong length or index");return e},xa=Math.sign||function(t){var r=+t;return 0===r||r!=r?r:r<0?-1:1},Ia=Math.abs,Pa=Math.fround||function(t){return function(t,r,e,n){var o=+t,i=Ia(o),a=xa(o);if(i<n)return a*function(t){return t+4503599627370496-4503599627370496}(i/n/r)*n*r;var u=(1+r/2220446049250313e-31)*i,c=u-(u-i);return c>e||c!=c?a*(1/0):a*c}(t,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)},La=Array,Ca=Math.abs,_a=Math.pow,Ba=Math.floor,Fa=Math.log,Ua=Math.LN2,Da=function(t,r,e){var n,o,i,a=La(e),u=8*e-r-1,c=(1<<u)-1,f=c>>1,s=23===r?_a(2,-24)-_a(2,-77):0,l=t<0||0===t&&1/t<0?1:0,p=0;for((t=Ca(t))!=t||t===1/0?(o=t!=t?1:0,n=c):(n=Ba(Fa(t)/Ua),t*(i=_a(2,-n))<1&&(n--,i*=2),(t+=n+f>=1?s/i:s*_a(2,1-f))*i>=2&&(n++,i/=2),n+f>=c?(o=0,n=c):n+f>=1?(o=(t*i-1)*_a(2,r),n+=f):(o=t*_a(2,f-1)*_a(2,r),n=0));r>=8;)a[p++]=255&o,o/=256,r-=8;for(n=n<<r|o,u+=r;u>0;)a[p++]=255&n,n/=256,u-=8;return a[--p]|=128*l,a},Na=function(t,r){var e,n=t.length,o=8*n-r-1,i=(1<<o)-1,a=i>>1,u=o-7,c=n-1,f=t[c--],s=127&f;for(f>>=7;u>0;)s=256*s+t[c--],u-=8;for(e=s&(1<<-u)-1,s>>=-u,u+=r;u>0;)e=256*e+t[c--],u-=8;if(0===s)s=1-a;else{if(s===i)return e?NaN:f?-1/0:1/0;e+=_a(2,r),s-=a}return(f?-1:1)*e*_a(2,s-r)},ka=function(t){for(var r=at(this),e=yr(r),n=arguments.length,o=sr(n>1?arguments[1]:void 0,e),i=n>2?arguments[2]:void 0,a=void 0===i?e:sr(i,e);a>o;)r[o++]=t;return r},Wa=function(t,r,e){var n=mt(r);n in t?_t.f(t,n,h(0,e)):t[n]=e},Va=Array,Ya=Math.max,Ga=function(t,r,e){for(var n=yr(t),o=sr(r,n),i=sr(void 0===e?n:e,n),a=Va(Ya(i-o,0)),u=0;o<i;o++,u++)Wa(a,u,t[o]);return a.length=u,a},za=Ar.f,qa=Nt.PROPER,Ha=Nt.CONFIGURABLE,Xa=rr.getterFor("ArrayBuffer"),Ka=rr.getterFor("DataView"),Ja=rr.set,$a=i.ArrayBuffer,Qa=$a,Za=Qa&&Qa.prototype,tu=i.DataView,ru=tu&&tu.prototype,eu=Object.prototype,nu=i.Array,ou=i.RangeError,iu=b(ka),au=b([].reverse),uu=Da,cu=Na,fu=function(t){return[255&t]},su=function(t){return[255&t,t>>8&255]},lu=function(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]},pu=function(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]},yu=function(t){return uu(Pa(t),23,4)},hu=function(t){return uu(t,52,8)},du=function(t,r,e){hn(t.prototype,r,{configurable:!0,get:function(){return e(this)[r]}})},vu=function(t,r,e,n){var o=Ka(t),i=Ma(e),a=!!n;if(i+r>o.byteLength)throw new ou("Wrong index");var u=o.bytes,c=i+o.byteOffset,f=Ga(u,c,c+r);return a?f:au(f)},gu=function(t,r,e,n,o,i){var a=Ka(t),u=Ma(e),c=n(+o),f=!!i;if(u+r>a.byteLength)throw new ou("Wrong index");for(var s=a.bytes,l=u+a.byteOffset,p=0;p<r;p++)s[l+p]=c[f?p:r-p-1]};if(Sa){var bu=qa&&"ArrayBuffer"!==$a.name;if(a((function(){$a(1)}))&&a((function(){new $a(-1)}))&&!a((function(){return new $a,new $a(1.5),new $a(NaN),1!==$a.length||bu&&!Ha})))bu&&Ha&&Bt($a,"name","ArrayBuffer");else{(Qa=function(t){return bn(this,Za),new $a(Ma(t))}).prototype=Za;for(var wu,mu=za($a),Au=0;mu.length>Au;)(wu=mu[Au++])in Qa||Bt(Qa,wu,$a[wu]);Za.constructor=Qa}Vr&&Nr(ru)!==eu&&Vr(ru,eu);var Tu=new tu(new Qa(2)),Eu=b(ru.setInt8);Tu.setInt8(0,2147483648),Tu.setInt8(1,2147483649),!Tu.getInt8(0)&&Tu.getInt8(1)||ja(ru,{setInt8:function(t,r){Eu(this,t,r<<24>>24)},setUint8:function(t,r){Eu(this,t,r<<24>>24)}},{unsafe:!0})}else Za=(Qa=function(t){bn(this,Za);var r=Ma(t);Ja(this,{type:"ArrayBuffer",bytes:iu(nu(r),0),byteLength:r}),u||(this.byteLength=r,this.detached=!1)}).prototype,ru=(tu=function(t,r,e){bn(this,ru),bn(t,Za);var n=Xa(t),o=n.byteLength,i=ur(r);if(i<0||i>o)throw new ou("Wrong offset");if(i+(e=void 0===e?o-i:pr(e))>o)throw new ou("Wrong length");Ja(this,{type:"DataView",buffer:t,byteLength:e,byteOffset:i,bytes:n.bytes}),u||(this.buffer=t,this.byteLength=e,this.byteOffset=i)}).prototype,u&&(du(Qa,"byteLength",Xa),du(tu,"buffer",Ka),du(tu,"byteLength",Ka),du(tu,"byteOffset",Ka)),ja(ru,{getInt8:function(t){return vu(this,1,t)[0]<<24>>24},getUint8:function(t){return vu(this,1,t)[0]},getInt16:function(t){var r=vu(this,2,t,arguments.length>1&&arguments[1]);return(r[1]<<8|r[0])<<16>>16},getUint16:function(t){var r=vu(this,2,t,arguments.length>1&&arguments[1]);return r[1]<<8|r[0]},getInt32:function(t){return pu(vu(this,4,t,arguments.length>1&&arguments[1]))},getUint32:function(t){return pu(vu(this,4,t,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(t){return cu(vu(this,4,t,arguments.length>1&&arguments[1]),23)},getFloat64:function(t){return cu(vu(this,8,t,arguments.length>1&&arguments[1]),52)},setInt8:function(t,r){gu(this,1,t,fu,r)},setUint8:function(t,r){gu(this,1,t,fu,r)},setInt16:function(t,r){gu(this,2,t,su,r,arguments.length>2&&arguments[2])},setUint16:function(t,r){gu(this,2,t,su,r,arguments.length>2&&arguments[2])},setInt32:function(t,r){gu(this,4,t,lu,r,arguments.length>2&&arguments[2])},setUint32:function(t,r){gu(this,4,t,lu,r,arguments.length>2&&arguments[2])},setFloat32:function(t,r){gu(this,4,t,yu,r,arguments.length>2&&arguments[2])},setFloat64:function(t,r){gu(this,8,t,hu,r,arguments.length>2&&arguments[2])}});Ke(Qa,"ArrayBuffer"),Ke(tu,"DataView");var Ou={ArrayBuffer:Qa,DataView:tu},Su=Ou.ArrayBuffer,ju=i.ArrayBuffer;_r({global:!0,constructor:!0,forced:ju!==Su},{ArrayBuffer:Su}),vn("ArrayBuffer");var Ru=Ou.ArrayBuffer,Mu=Ou.DataView,xu=Mu.prototype,Iu=ue(Ru.prototype.slice),Pu=ue(xu.getUint8),Lu=ue(xu.setUint8),Cu=a((function(){return!new Ru(2).slice(1,void 0).byteLength}));_r({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:Cu},{slice:function(t,r){if(Iu&&void 0===r)return Iu(It(this),t);for(var e=It(this).byteLength,n=sr(t,e),o=sr(void 0===r?e:r,e),i=new(Bn(this,Ru))(pr(o-n)),a=new Mu(this),u=new Mu(i),c=0;n<o;)Lu(u,c++,Pu(a,n++));return i}});var _u,Bu,Fu,Uu=rr.enforce,Du=rr.get,Nu=i.Int8Array,ku=Nu&&Nu.prototype,Wu=i.Uint8ClampedArray,Vu=Wu&&Wu.prototype,Yu=Nu&&Nr(Nu),Gu=ku&&Nr(ku),zu=Object.prototype,qu=i.TypeError,Hu=vt("toStringTag"),Xu=pt("TYPED_ARRAY_TAG"),Ku=Sa&&!!Vr&&"Opera"!==we(i.opera),Ju=!1,$u={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Qu={BigInt64Array:8,BigUint64Array:8},Zu=function(t){var r=Nr(t);if(_(r)){var e=Du(r);return e&&ct(e,"TypedArrayConstructor")?e.TypedArrayConstructor:Zu(r)}},tc=function(t){if(!_(t))return!1;var r=we(t);return ct($u,r)||ct(Qu,r)};for(_u in $u)(Fu=(Bu=i[_u])&&Bu.prototype)?Uu(Fu).TypedArrayConstructor=Bu:Ku=!1;for(_u in Qu)(Fu=(Bu=i[_u])&&Bu.prototype)&&(Uu(Fu).TypedArrayConstructor=Bu);if((!Ku||!L(Yu)||Yu===Function.prototype)&&(Yu=function(){throw new qu("Incorrect invocation")},Ku))for(_u in $u)i[_u]&&Vr(i[_u],Yu);if((!Ku||!Gu||Gu===zu)&&(Gu=Yu.prototype,Ku))for(_u in $u)i[_u]&&Vr(i[_u].prototype,Gu);if(Ku&&Nr(Vu)!==Gu&&Vr(Vu,Gu),u&&!ct(Gu,Hu))for(_u in Ju=!0,hn(Gu,Hu,{configurable:!0,get:function(){return _(this)?this[Xu]:void 0}}),$u)i[_u]&&Bt(i[_u],Xu,_u);var rc={NATIVE_ARRAY_BUFFER_VIEWS:Ku,TYPED_ARRAY_TAG:Ju&&Xu,aTypedArray:function(t){if(tc(t))return t;throw new qu("Target is not a typed array")},aTypedArrayConstructor:function(t){if(L(t)&&(!Vr||U(Yu,t)))return t;throw new qu(J(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,r,e,n){if(u){if(e)for(var o in $u){var a=i[o];if(a&&ct(a.prototype,t))try{delete a.prototype[t]}catch(e){try{a.prototype[t]=r}catch(t){}}}Gu[t]&&!e||nr(Gu,t,e?r:Ku&&ku[t]||r,n)}},exportTypedArrayStaticMethod:function(t,r,e){var n,o;if(u){if(Vr){if(e)for(n in $u)if((o=i[n])&&ct(o,t))try{delete o[t]}catch(t){}if(Yu[t]&&!e)return;try{return nr(Yu,t,e?r:Ku&&Yu[t]||r)}catch(t){}}for(n in $u)!(o=i[n])||o[t]&&!e||nr(o,t,r)}},getTypedArrayConstructor:Zu,isView:function(t){if(!_(t))return!1;var r=we(t);return"DataView"===r||ct($u,r)||ct(Qu,r)},isTypedArray:tc,TypedArray:Yu,TypedArrayPrototype:Gu},ec=rc.NATIVE_ARRAY_BUFFER_VIEWS,nc=i.ArrayBuffer,oc=i.Int8Array,ic=!ec||!a((function(){oc(1)}))||!a((function(){new oc(-1)}))||!hi((function(t){new oc,new oc(null),new oc(1.5),new oc(t)}),!0)||a((function(){return 1!==new oc(new nc(2),1,void 0).length})),ac=RangeError,uc=RangeError,cc=function(t,r){var e=function(t){var r=ur(t);if(r<0)throw new ac("The argument can't be less than 0");return r}(t);if(e%r)throw new uc("Wrong offset");return e},fc=Math.round,sc=function(t){var r=we(t);return"BigInt64Array"===r||"BigUint64Array"===r},lc=TypeError,pc=function(t){var r=wt(t,"number");if("number"==typeof r)throw new lc("Can't convert number to bigint");return BigInt(r)},yc=rc.aTypedArrayConstructor,hc=function(t){var r,e,n,o,i,a,u,c,f=Cn(this),l=at(t),p=arguments.length,y=p>1?arguments[1]:void 0,h=void 0!==y,d=Ae(l);if(d&&!ye(d))for(c=(u=Ee(l,d)).next,l=[];!(a=s(c,u)).done;)l.push(a.value);for(h&&p>2&&(y=fe(y,arguments[2])),e=yr(l),n=new(yc(f))(e),o=sc(n),r=0;e>r;r++)i=h?y(l[r],r):l[r],n[r]=o?pc(i):+i;return n};r((function(t){var r=Ar.f,e=Ni.forEach,n=rr.get,o=rr.set,a=rr.enforce,c=_t.f,f=jt.f,l=i.RangeError,p=Ou.ArrayBuffer,y=p.prototype,d=Ou.DataView,v=rc.NATIVE_ARRAY_BUFFER_VIEWS,g=rc.TYPED_ARRAY_TAG,b=rc.TypedArray,w=rc.TypedArrayPrototype,m=rc.aTypedArrayConstructor,A=rc.isTypedArray,T=function(t,r){m(t);for(var e=0,n=r.length,o=new t(n);n>e;)o[e]=r[e++];return o},E=function(t,r){hn(t,r,{configurable:!0,get:function(){return n(this)[r]}})},O=function(t){var r;return U(y,t)||"ArrayBuffer"===(r=we(t))||"SharedArrayBuffer"===r},S=function(t,r){return A(t)&&!X(r)&&r in t&&Oa(+r)&&r>=0},j=function(t,r){return r=mt(r),S(t,r)?h(2,t[r]):f(t,r)},R=function(t,r,e){return r=mt(r),!(S(t,r)&&_(e)&&ct(e,"value"))||ct(e,"get")||ct(e,"set")||e.configurable||ct(e,"writable")&&!e.writable||ct(e,"enumerable")&&!e.enumerable?c(t,r,e):(t[r]=e.value,t)};u?(v||(jt.f=j,_t.f=R,E(w,"buffer"),E(w,"byteOffset"),E(w,"byteLength"),E(w,"length")),_r({target:"Object",stat:!0,forced:!v},{getOwnPropertyDescriptor:j,defineProperty:R}),t.exports=function(t,u,f){var y=t.match(/\d+/)[0]/8,h=t+(f?"Clamped":"")+"Array",m="get"+t,E="set"+t,S=i[h],j=S,R=j&&j.prototype,M={},x=function(t,r,e){var o=n(t);o.view[E](r*y+o.byteOffset,f?function(t){var r=fc(t);return r<0?0:r>255?255:255&r}(e):e,!0)},I=function(t,r){c(t,r,{get:function(){return function(t,r){var e=n(t);return e.view[m](r*y+e.byteOffset,!0)}(this,r)},set:function(t){return x(this,r,t)},enumerable:!0})};v?ic&&(j=u((function(t,r,e,n){return bn(t,R),function(t,r,e){var n,o;return Vr&&L(n=r.constructor)&&n!==e&&_(o=n.prototype)&&o!==e.prototype&&Vr(t,o),t}(_(r)?O(r)?void 0!==n?new S(r,cc(e,y),n):void 0!==e?new S(r,cc(e,y)):new S(r):A(r)?T(j,r):s(hc,j,r):new S(Ma(r)),t,j)})),Vr&&Vr(j,b),e(r(S),(function(t){t in j||Bt(j,t,S[t])})),j.prototype=R):(j=u((function(t,r,e,n){bn(t,R);var i,a,u,c=0,f=0;if(_(r)){if(!O(r))return A(r)?T(j,r):s(hc,j,r);i=r,f=cc(e,y);var h=r.byteLength;if(void 0===n){if(h%y)throw new l("Wrong length");if((a=h-f)<0)throw new l("Wrong length")}else if((a=pr(n)*y)+f>h)throw new l("Wrong length");u=a/y}else u=Ma(r),i=new p(a=u*y);for(o(t,{buffer:i,byteOffset:f,byteLength:a,length:u,view:new d(i)});c<u;)I(t,c++)})),Vr&&Vr(j,b),R=j.prototype=$r(w)),R.constructor!==j&&Bt(R,"constructor",j),a(R).TypedArrayConstructor=j,g&&Bt(R,g,h);var P=j!==S;M[h]=j,_r({global:!0,constructor:!0,forced:P,sham:!v},M),"BYTES_PER_ELEMENT"in j||Bt(j,"BYTES_PER_ELEMENT",y),"BYTES_PER_ELEMENT"in R||Bt(R,"BYTES_PER_ELEMENT",y),vn(h)}):t.exports=function(){}}))("Uint8",(function(t){return function(r,e,n){return t(this,r,e,n)}})),(0,rc.exportTypedArrayStaticMethod)("from",hc,ic);var dc=rc.aTypedArrayConstructor;(0,rc.exportTypedArrayStaticMethod)("of",(function(){for(var t=0,r=arguments.length,e=new(dc(this))(r);r>t;)e[t]=arguments[t++];return e}),ic);var vc=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("at",(function(t){var r=vc(this),e=yr(r),n=ur(t),o=n>=0?n:e+n;return o<0||o>=e?void 0:r[o]}));var gc=TypeError,bc=function(t,r){if(!delete t[r])throw new gc("Cannot delete property "+J(r)+" of "+J(t))},wc=Math.min,mc=b([].copyWithin||function(t,r){var e=at(this),n=yr(e),o=sr(t,n),i=sr(r,n),a=arguments.length>2?arguments[2]:void 0,u=wc((void 0===a?n:sr(a,n))-i,n-o),c=1;for(i<o&&o<i+u&&(c=-1,i+=u-1,o+=u-1);u-- >0;)i in e?e[o]=e[i]:bc(e,o),o+=c,i+=c;return e}),Ac=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("copyWithin",(function(t,r){return mc(Ac(this),t,r,arguments.length>2?arguments[2]:void 0)}));var Tc=Ni.every,Ec=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("every",(function(t){return Tc(Ec(this),t,arguments.length>1?arguments[1]:void 0)}));var Oc=rc.aTypedArray,Sc=rc.exportTypedArrayMethod,jc=b("".slice);Sc("fill",(function(t){var r=arguments.length;Oc(this);var e="Big"===jc(we(this),0,3)?pc(t):+t;return s(ka,this,e,r>1?arguments[1]:void 0,r>2?arguments[2]:void 0)}),a((function(){var t=0;return new Int8Array(2).fill({valueOf:function(){return t++}}),1!==t})));var Rc=function(t,r){for(var e=0,n=yr(r),o=new t(n);n>e;)o[e]=r[e++];return o},Mc=rc.aTypedArrayConstructor,xc=rc.getTypedArrayConstructor,Ic=function(t){return Mc(Bn(t,xc(t)))},Pc=function(t,r){return Rc(Ic(t),r)},Lc=Ni.filter,Cc=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("filter",(function(t){var r=Lc(Cc(this),t,arguments.length>1?arguments[1]:void 0);return Pc(this,r)}));var _c=Ni.find,Bc=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("find",(function(t){return _c(Bc(this),t,arguments.length>1?arguments[1]:void 0)}));var Fc=Ni.findIndex,Uc=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("findIndex",(function(t){return Fc(Uc(this),t,arguments.length>1?arguments[1]:void 0)}));var Dc=function(t){var r=1===t;return function(e,n,o){for(var i,a=at(e),u=O(a),c=fe(n,o),f=yr(u);f-- >0;)if(c(i=u[f],f,a))switch(t){case 0:return i;case 1:return f}return r?-1:void 0}},Nc={findLast:Dc(0),findLastIndex:Dc(1)},kc=Nc.findLast,Wc=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("findLast",(function(t){return kc(Wc(this),t,arguments.length>1?arguments[1]:void 0)}));var Vc=Nc.findLastIndex,Yc=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("findLastIndex",(function(t){return Vc(Yc(this),t,arguments.length>1?arguments[1]:void 0)}));var Gc=Ni.forEach,zc=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("forEach",(function(t){Gc(zc(this),t,arguments.length>1?arguments[1]:void 0)}));var qc=dr.includes,Hc=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("includes",(function(t){return qc(Hc(this),t,arguments.length>1?arguments[1]:void 0)}));var Xc=dr.indexOf,Kc=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("indexOf",(function(t){return Xc(Kc(this),t,arguments.length>1?arguments[1]:void 0)}));var Jc=rc.aTypedArray,$c=rc.exportTypedArrayMethod,Qc=b([].join);$c("join",(function(t){return Qc(Jc(this),t)}));var Zc=Math.min,tf=[].lastIndexOf,rf=!!tf&&1/[1].lastIndexOf(1,-0)<0,ef=Hi("lastIndexOf"),nf=rf||!ef?function(t){if(rf)return Nn(tf,this,arguments)||0;var r=M(this),e=yr(r),n=e-1;for(arguments.length>1&&(n=Zc(n,ur(arguments[1]))),n<0&&(n=e+n);n>=0;n--)if(n in r&&r[n]===t)return n||0;return-1}:tf,of=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("lastIndexOf",(function(t){var r=arguments.length;return Nn(nf,of(this),r>1?[t,arguments[1]]:[t])}));var af=Ni.map,uf=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("map",(function(t){return af(uf(this),t,arguments.length>1?arguments[1]:void 0,(function(t,r){return new(Ic(t))(r)}))}));var cf=qi.left,ff=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("reduce",(function(t){var r=arguments.length;return cf(ff(this),t,r,r>1?arguments[1]:void 0)}));var sf=qi.right,lf=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("reduceRight",(function(t){var r=arguments.length;return sf(lf(this),t,r,r>1?arguments[1]:void 0)}));var pf=rc.aTypedArray,yf=rc.exportTypedArrayMethod,hf=Math.floor;yf("reverse",(function(){for(var t,r=pf(this).length,e=hf(r/2),n=0;n<e;)t=this[n],this[n++]=this[--r],this[r]=t;return this}));var df=i.RangeError,vf=i.Int8Array,gf=vf&&vf.prototype,bf=gf&&gf.set,wf=rc.aTypedArray,mf=rc.exportTypedArrayMethod,Af=!a((function(){var t=new Uint8ClampedArray(2);return s(bf,t,{length:1,0:3},1),3!==t[1]})),Tf=Af&&rc.NATIVE_ARRAY_BUFFER_VIEWS&&a((function(){var t=new vf(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));mf("set",(function(t){wf(this);var r=cc(arguments.length>1?arguments[1]:void 0,1),e=at(t);if(Af)return s(bf,this,e,r);var n=this.length,o=yr(e),i=0;if(o+r>n)throw new df("Wrong length");for(;i<o;)this[r+i]=e[i++]}),!Af||Tf);var Ef=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("slice",(function(t,r){for(var e=kn(Ef(this),t,r),n=Ic(this),o=0,i=e.length,a=new n(i);i>o;)a[o]=e[o++];return a}),a((function(){new Int8Array(1).slice()})));var Of=Ni.some,Sf=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("some",(function(t){return Of(Sf(this),t,arguments.length>1?arguments[1]:void 0)}));var jf=Math.floor,Rf=function(t,r){var e=t.length,n=jf(e/2);return e<8?Mf(t,r):xf(t,Rf(Ga(t,0,n),r),Rf(Ga(t,n),r),r)},Mf=function(t,r){for(var e,n,o=t.length,i=1;i<o;){for(n=i,e=t[i];n&&r(t[n-1],e)>0;)t[n]=t[--n];n!==i++&&(t[n]=e)}return t},xf=function(t,r,e,n){for(var o=r.length,i=e.length,a=0,u=0;a<o||u<i;)t[a+u]=a<o&&u<i?n(r[a],e[u])<=0?r[a++]:e[u++]:a<o?r[a++]:e[u++];return t},If=Rf,Pf=D.match(/firefox\/(\d+)/i),Lf=!!Pf&&+Pf[1],Cf=/MSIE|Trident/.test(D),_f=D.match(/AppleWebKit\/(\d+)\./),Bf=!!_f&&+_f[1],Ff=rc.aTypedArray,Uf=rc.exportTypedArrayMethod,Df=i.Uint16Array,Nf=Df&&ue(Df.prototype.sort),kf=!(!Nf||a((function(){Nf(new Df(2),null)}))&&a((function(){Nf(new Df(2),{})}))),Wf=!!Nf&&!a((function(){if(Y)return Y<74;if(Lf)return Lf<67;if(Cf)return!0;if(Bf)return Bf<602;var t,r,e=new Df(516),n=Array(516);for(t=0;t<516;t++)r=t%4,e[t]=515-t,n[t]=t-2*r+3;for(Nf(e,(function(t,r){return(t/4|0)-(r/4|0)})),t=0;t<516;t++)if(e[t]!==n[t])return!0}));Uf("sort",(function(t){return void 0!==t&&Q(t),Wf?Nf(this,t):If(Ff(this),function(t){return function(r,e){return void 0!==t?+t(r,e)||0:e!=e?-1:r!=r?1:0===r&&0===e?1/r>0&&1/e<0?1:-1:r>e}}(t))}),!Wf||kf);var Vf=rc.aTypedArray;(0,rc.exportTypedArrayMethod)("subarray",(function(t,r){var e=Vf(this),n=e.length,o=sr(t,n);return new(Ic(e))(e.buffer,e.byteOffset+o*e.BYTES_PER_ELEMENT,pr((void 0===r?n:sr(r,n))-o))}));var Yf=i.Int8Array,Gf=rc.aTypedArray,zf=rc.exportTypedArrayMethod,qf=[].toLocaleString,Hf=!!Yf&&a((function(){qf.call(new Yf(1))}));zf("toLocaleString",(function(){return Nn(qf,Hf?kn(Gf(this)):Gf(this),kn(arguments))}),a((function(){return[1,2].toLocaleString()!==new Yf([1,2]).toLocaleString()}))||!a((function(){Yf.prototype.toLocaleString.call([1,2])})));var Xf=rc.exportTypedArrayMethod,Kf=i.Uint8Array,Jf=Kf&&Kf.prototype||{},$f=[].toString,Qf=b([].join);a((function(){$f.call({})}))&&($f=function(){return Qf(this)});var Zf=Jf.toString!==$f;Xf("toString",$f,Zf);var ts=rc.aTypedArray,rs=rc.getTypedArrayConstructor;(0,rc.exportTypedArrayMethod)("toReversed",(function(){return function(t,r){for(var e=yr(t),n=new r(e),o=0;o<e;o++)n[o]=t[e-o-1];return n}(ts(this),rs(this))}));var es=rc.aTypedArray,ns=rc.getTypedArrayConstructor,os=rc.exportTypedArrayMethod,is=b(rc.TypedArrayPrototype.sort);os("toSorted",(function(t){void 0!==t&&Q(t);var r=es(this),e=Rc(ns(r),r);return is(e,t)}));var as=RangeError,us=rc.aTypedArray,cs=rc.getTypedArrayConstructor,fs=rc.exportTypedArrayMethod,ss=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();fs("with",{with:function(t,r){var e=us(this),n=ur(t),o=sc(e)?pc(r):+r;return function(t,r,e,n){var o=yr(t),i=ur(e),a=i<0?o+i:i;if(a>=o||a<0)throw new as("Incorrect index");for(var u=new r(o),c=0;c<o;c++)u[c]=c===a?n:t[c];return u}(e,cs(e),n,o)}}.with,!ss);var ls=vt("iterator"),ps=i.Uint8Array,ys=b(sn.values),hs=b(sn.keys),ds=b(sn.entries),vs=rc.aTypedArray,gs=rc.exportTypedArrayMethod,bs=ps&&ps.prototype,ws=!a((function(){bs[ls].call([1])})),ms=!!bs&&bs.values&&bs[ls]===bs.values&&"values"===bs.values.name,As=function(){return ys(vs(this))};gs("entries",(function(){return ds(vs(this))}),ws),gs("keys",(function(){return hs(vs(this))}),ws),gs("values",As,ws||!ms,{name:"values"}),gs(ls,As,ws||!ms,{name:"values"});i.Uint8Array;var Ts=function(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this}(),Es=Ts.BlobBuilder||Ts.WebKitBlobBuilder||Ts.MSBlobBuilder||Ts.MozBlobBuilder;Ts.URL=Ts.URL||Ts.webkitURL||function(t,r){return(r=document.createElement("a")).href=t,r};var Os=Ts.Blob,Ss=URL.createObjectURL,js=URL.revokeObjectURL,Rs=Ts.Symbol&&Ts.Symbol.toStringTag,Ms=!1,xs=!1,Is=!!Ts.ArrayBuffer,Ps=Es&&Es.prototype.append&&Es.prototype.getBlob;try{Ms=2===new Blob(["ä"]).size,xs=2===new Blob([new Uint8Array([1,2])]).size}catch(t){}function Ls(t){return t.map((function(t){if(t.buffer instanceof ArrayBuffer){var r=t.buffer;if(t.byteLength!==r.byteLength){var e=new Uint8Array(t.byteLength);e.set(new Uint8Array(r,t.byteOffset,t.byteLength)),r=e.buffer}return r}return t}))}function Cs(t,r){r=r||{};var e=new Es;return Ls(t).forEach((function(t){e.append(t)})),r.type?e.getBlob(r.type):e.getBlob()}function _s(t,r){return new Os(Ls(t),r||{})}if(Ts.Blob&&(Cs.prototype=Blob.prototype,_s.prototype=Blob.prototype),Rs)try{File.prototype[Rs]="File",Blob.prototype[Rs]="Blob",FileReader.prototype[Rs]="FileReader"}catch(t){}function Bs(){var t=!!Ts.ActiveXObject||"-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,r=Ts.XMLHttpRequest&&Ts.XMLHttpRequest.prototype.send;t&&r&&(XMLHttpRequest.prototype.send=function(t){t instanceof Blob?(this.setRequestHeader("Content-Type",t.type),r.call(this,t)):r.call(this,t)});try{new File([],"")}catch(t){try{var e=new Function('class File extends Blob {constructor(chunks, name, opts) {opts = opts || {};super(chunks, opts || {});this.name = name;this.lastModifiedDate = opts.lastModified ? new Date(opts.lastModified) : new Date;this.lastModified = +this.lastModifiedDate;}};return new File([], ""), File')();Ts.File=e}catch(t){e=function(t,r,e){var n=new Blob(t,e),o=e&&void 0!==e.lastModified?new Date(e.lastModified):new Date;return n.name=r,n.lastModifiedDate=o,n.lastModified=+o,n.toString=function(){return"[object File]"},Rs&&(n[Rs]="File"),n};Ts.File=e}}}Ms?(Bs(),Ts.Blob=xs?Ts.Blob:_s):Ps?(Bs(),Ts.Blob=Cs):function(){function t(t){for(var r=[],e=0;e<t.length;e++){var n=t.charCodeAt(e);n<128?r.push(n):n<2048?r.push(192|n>>6,128|63&n):n<55296||n>=57344?r.push(224|n>>12,128|n>>6&63,128|63&n):(e++,n=65536+((1023&n)<<10|1023&t.charCodeAt(e)),r.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return r}function r(t){var r,e,n,o,i,a;for(r="",n=t.length,e=0;e<n;)switch((o=t[e++])>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:r+=String.fromCharCode(o);break;case 12:case 13:i=t[e++],r+=String.fromCharCode((31&o)<<6|63&i);break;case 14:i=t[e++],a=t[e++],r+=String.fromCharCode((15&o)<<12|(63&i)<<6|(63&a)<<0)}return r}function e(t){for(var r=new Array(t.byteLength),e=new Uint8Array(t),n=r.length;n--;)r[n]=e[n];return r}function n(t){for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e=[],n=0;n<t.length;n+=3){var o=t[n],i=n+1<t.length,a=i?t[n+1]:0,u=n+2<t.length,c=u?t[n+2]:0,f=o>>2,s=(3&o)<<4|a>>4,l=(15&a)<<2|c>>6,p=63&c;u||(p=64,i||(l=64)),e.push(r[f],r[s],r[l],r[p])}return e.join("")}var o=Object.create||function(t){function r(){}return r.prototype=t,new r};if(Is)var i=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(t){return t&&i.indexOf(Object.prototype.toString.call(t))>-1};function u(r,n){for(var o=0,i=(r=r||[]).length;o<i;o++){var c=r[o];c instanceof u?r[o]=c._buffer:"string"==typeof c?r[o]=t(c):Is&&(ArrayBuffer.prototype.isPrototypeOf(c)||a(c))?r[o]=e(c):Is&&((f=c)&&DataView.prototype.isPrototypeOf(f))?r[o]=e(c.buffer):r[o]=t(String(c))}var f;this._buffer=[].concat.apply([],r),this.size=this._buffer.length,this.type=n&&n.type||""}function c(t,r,e){e=e||{};var n=u.call(this,t,e)||this;return n.name=r,n.lastModifiedDate=e.lastModified?new Date(e.lastModified):new Date,n.lastModified=+n.lastModifiedDate,n}if(u.prototype.slice=function(t,r,e){return new u([this._buffer.slice(t||0,r||this._buffer.length)],{type:e})},u.prototype.toString=function(){return"[object Blob]"},c.prototype=o(u.prototype),c.prototype.constructor=c,Object.setPrototypeOf)Object.setPrototypeOf(c,u);else try{c.__proto__=u}catch(t){}function f(){if(!(this instanceof f))throw new TypeError("Failed to construct 'FileReader': Please use the 'new' operator, this DOM object constructor cannot be called as a function.");var t=document.createDocumentFragment();this.addEventListener=t.addEventListener,this.dispatchEvent=function(r){var e=this["on"+r.type];"function"==typeof e&&e(r),t.dispatchEvent(r)},this.removeEventListener=t.removeEventListener}function s(t,r,e){if(!(r instanceof u))throw new TypeError("Failed to execute '"+e+"' on 'FileReader': parameter 1 is not of type 'Blob'.");t.result="",setTimeout((function(){this.readyState=f.LOADING,t.dispatchEvent(new Event("load")),t.dispatchEvent(new Event("loadend"))}))}c.prototype.toString=function(){return"[object File]"},f.EMPTY=0,f.LOADING=1,f.DONE=2,f.prototype.error=null,f.prototype.onabort=null,f.prototype.onerror=null,f.prototype.onload=null,f.prototype.onloadend=null,f.prototype.onloadstart=null,f.prototype.onprogress=null,f.prototype.readAsDataURL=function(t){s(this,t,"readAsDataURL"),this.result="data:"+t.type+";base64,"+n(t._buffer)},f.prototype.readAsText=function(t){s(this,t,"readAsText"),this.result=r(t._buffer)},f.prototype.readAsArrayBuffer=function(t){s(this,t,"readAsText"),this.result=t._buffer.slice()},f.prototype.abort=function(){},URL.createObjectURL=function(t){return t instanceof u?"data:"+t.type+";base64,"+n(t._buffer):Ss.call(URL,t)},URL.revokeObjectURL=function(t){js&&js.call(URL,t)};var l=Ts.XMLHttpRequest&&Ts.XMLHttpRequest.prototype.send;l&&(XMLHttpRequest.prototype.send=function(t){t instanceof u?(this.setRequestHeader("Content-Type",t.type),l.call(this,r(t._buffer))):l.call(this,t)}),Ts.FileReader=f,Ts.File=c,Ts.Blob=u}();var Fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";void 0===Ts.btoa&&(Ts.btoa=function(t){var r,e,n,o,i,a=0,u=0,c="",f=[];if(!t)return t;do{r=(i=t.charCodeAt(a++)<<16|t.charCodeAt(a++)<<8|t.charCodeAt(a++))>>18&63,e=i>>12&63,n=i>>6&63,o=63&i,f[u++]=Fs.charAt(r)+Fs.charAt(e)+Fs.charAt(n)+Fs.charAt(o)}while(a<t.length);c=f.join("");var s=t.length%3;return(s?c.slice(0,s-3):c)+"===".slice(s||3)}),void 0===Ts.atob&&(Ts.atob=function(t){var r,e,n,o,i,a,u=0,c=0,f=[];if(!t)return t;t+="";do{r=(a=Fs.indexOf(t.charAt(u++))<<18|Fs.indexOf(t.charAt(u++))<<12|(o=Fs.indexOf(t.charAt(u++)))<<6|(i=Fs.indexOf(t.charAt(u++))))>>16&255,e=a>>8&255,n=255&a,f[c++]=64==o?String.fromCharCode(r):64==i?String.fromCharCode(r,e):String.fromCharCode(r,e,n)}while(u<t.length);return f.join("")})}));
Index: imaps-frontend/node_modules/jspdf/package.json
===================================================================
--- imaps-frontend/node_modules/jspdf/package.json	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/package.json	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,149 @@
+{
+  "_from": "jspdf@2.5.2",
+  "_id": "jspdf@2.5.2",
+  "_inBundle": false,
+  "_integrity": "sha512-myeX9c+p7znDWPk0eTrujCzNjT+CXdXyk7YmJq5nD5V7uLLKmSXnlQ/Jn/kuo3X09Op70Apm0rQSnFWyGK8uEQ==",
+  "_location": "/jspdf",
+  "_phantomChildren": {},
+  "_requested": {
+    "type": "version",
+    "registry": true,
+    "raw": "jspdf@2.5.2",
+    "name": "jspdf",
+    "escapedName": "jspdf",
+    "rawSpec": "2.5.2",
+    "saveSpec": null,
+    "fetchSpec": "2.5.2"
+  },
+  "_requiredBy": [
+    "/"
+  ],
+  "_resolved": "https://registry.npmjs.org/jspdf/-/jspdf-2.5.2.tgz",
+  "_shasum": "3c35bb1063ee3ad9428e6353852b0d685d1f923a",
+  "_spec": "jspdf@2.5.2",
+  "_where": "/home/stevetosak/Proekt/IMaps/imaps-frontend",
+  "browser": "dist/jspdf.es.min.js",
+  "browserslist": [
+    "last 2 versions",
+    "IE 11"
+  ],
+  "bugs": {
+    "url": "https://github.com/MrRio/jsPDF/issues"
+  },
+  "bundleDependencies": false,
+  "dependencies": {
+    "@babel/runtime": "^7.23.2",
+    "atob": "^2.1.2",
+    "btoa": "^1.2.1",
+    "canvg": "^3.0.6",
+    "core-js": "^3.6.0",
+    "dompurify": "^2.5.4",
+    "fflate": "^0.8.1",
+    "html2canvas": "^1.0.0-rc.5"
+  },
+  "deprecated": false,
+  "description": "PDF Document creation from JavaScript",
+  "devDependencies": {
+    "@babel/core": "^7.10.4",
+    "@babel/plugin-transform-runtime": "^7.14.5",
+    "@babel/preset-env": "^7.10.4",
+    "@rollup/plugin-babel": "^5.3.0",
+    "@rollup/plugin-replace": "^2.3.3",
+    "@rollup/plugin-typescript": "^8.0.0",
+    "@types/jasmine": "^3.5.11",
+    "@types/node": "^20.16.5",
+    "@typescript-eslint/eslint-plugin": "^3.6.0",
+    "@typescript-eslint/parser": "^3.6.0",
+    "chalk": "^4.1.0",
+    "codeclimate-test-reporter": "^0.5.1",
+    "core-js": "^3.33.0",
+    "diff": "^4.0.2",
+    "docdash": "^1.2.0",
+    "eslint": "^7.4.0",
+    "eslint-plugin-jasmine": "^4.1.1",
+    "folder-delete": "^1.0.4",
+    "inquirer": "^6.5.2",
+    "jasmine": "3.5.0",
+    "jasmine-core": "3.5.0",
+    "jasmine-expect": "4.0.3",
+    "js-yaml": "3.13.1",
+    "jsdoc": "^3.6.3",
+    "karma": "5.1.0",
+    "karma-babel-preprocessor": "8.0.1",
+    "karma-chrome-launcher": "3.1.0",
+    "karma-coverage": "2.0.2",
+    "karma-firefox-launcher": "1.3.0",
+    "karma-ie-launcher": "1.0.0",
+    "karma-jasmine": "3.3.1",
+    "karma-jasmine-matchers": "4.0.2",
+    "karma-mocha-reporter": "2.2.5",
+    "karma-rollup-preprocessor": "^7.0.7",
+    "karma-sauce-launcher": "4.1.5",
+    "karma-typescript": "^5.5.4",
+    "karma-verbose-reporter": "0.0.6",
+    "local-web-server": "^4.2.1",
+    "log-utils": "^1.0.0",
+    "markdown": "0.5.0",
+    "preprocess": "^3.2.0",
+    "prettier": "^1.19.1",
+    "regenerator-runtime": "^0.13.5",
+    "requirejs": "^2.3.6",
+    "rollup": "^2.18.2",
+    "rollup-plugin-commonjs": "^10.1.0",
+    "rollup-plugin-license": "^2.1.0",
+    "rollup-plugin-node-resolve": "5.2.0",
+    "rollup-plugin-preprocess": "0.0.4",
+    "rollup-plugin-terser": "^6.1.0",
+    "typescript": "^5.6.2",
+    "yarpm": "^0.2.1"
+  },
+  "files": [
+    "dist",
+    "types/index.d.ts",
+    "README.md",
+    "LICENSE"
+  ],
+  "homepage": "https://github.com/mrrio/jspdf",
+  "keywords": [
+    "pdf"
+  ],
+  "license": "MIT",
+  "main": "dist/jspdf.node.min.js",
+  "module": "dist/jspdf.es.min.js",
+  "name": "jspdf",
+  "optionalDependencies": {
+    "canvg": "^3.0.6",
+    "core-js": "^3.6.0",
+    "dompurify": "^2.5.4",
+    "html2canvas": "^1.0.0-rc.5"
+  },
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/MrRio/jsPDF.git"
+  },
+  "scripts": {
+    "build": "rollup --config rollup.config.js",
+    "generate-docs": "jsdoc -c jsdoc.json --readme README.md",
+    "lint": "prettier --check \"*.{js,ts,md,css,json}\" \"{spec,examples,src,types}/**/*.{js,ts,md,css,json}\"",
+    "pregenerate-docs": "node deletedocs.js",
+    "pretest": "yarpm run build",
+    "prettier": "prettier --write \"*.{js,ts,md,css,json}\" \"{spec,examples,src,types}/**/*.{js,ts,md,css,json}\"",
+    "start": "ws",
+    "test": "yarpm run test-node && yarpm run test-saucelabs",
+    "test-amd": "karma start test/deployment/amd/karma.conf.js --single-run",
+    "test-esm": "karma start test/deployment/esm/karma.conf.js --single-run",
+    "test-globals": "karma start test/deployment/globals/karma.conf.js --single-run",
+    "test-local": "yarpm run test-unit && yarpm run test-node && yarpm run test-amd && yarpm run test-esm && yarpm run test-globals && yarpm run test-typescript && yarpm run test-webworker",
+    "test-node": "jasmine --config=test/deployment/node/jasmine.json",
+    "test-saucelabs": "karma start test/saucelabs/karma.conf.js --single-run --verbose && for a in coverage/*; do codeclimate-test-reporter < \\\"$a/lcov.info\\\"; break; done",
+    "test-training": "node test/utils/reference-server.js",
+    "test-typescript": "karma start test/deployment/typescript/karma.conf.js --single-run",
+    "test-typings": "tsc -p types/tsconfig.json && tsc -p types/tsconfig-node.json",
+    "test-unit": "karma start test/unit/karma.conf.js --single-run",
+    "test-webworker": "karma start test/deployment/webworker/karma.conf.js --single-run",
+    "version": "yarpm run build && yarpm run generate-docs && git add -A dist docs"
+  },
+  "types": "types/index.d.ts",
+  "typings": "types/index.d.ts",
+  "version": "2.5.2"
+}
Index: imaps-frontend/node_modules/jspdf/types/index.d.ts
===================================================================
--- imaps-frontend/node_modules/jspdf/types/index.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
+++ imaps-frontend/node_modules/jspdf/types/index.d.ts	(revision 79a03170cdde4e801d12257ee86723774970427b)
@@ -0,0 +1,1461 @@
+/** @license
+ *
+ * jsPDF - PDF Document creation from JavaScript
+ *
+ * Copyright (c) 2010-2021 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
+ *               2015-2021 yWorks GmbH, http://www.yworks.com
+ *               2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
+ *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
+ *               2018 Amber Schühmacher <https://github.com/amberjs>
+ *               2018 Kevin Gonnord <https://github.com/lleios>
+ *               2018 Jackie Weng <https://github.com/jemerald>
+ *               2010 Aaron Spike, https://github.com/acspike
+ *               2012 Willow Systems Corporation, https://github.com/willowsystems
+ *               2012 Pablo Hess, https://github.com/pablohess
+ *               2012 Florian Jenett, https://github.com/fjenett
+ *               2013 Warren Weckesser, https://github.com/warrenweckesser
+ *               2013 Youssef Beddad, https://github.com/lifof
+ *               2013 Lee Driscoll, https://github.com/lsdriscoll
+ *               2013 Stefan Slonevskiy, https://github.com/stefslon
+ *               2013 Jeremy Morel, https://github.com/jmorel
+ *               2013 Christoph Hartmann, https://github.com/chris-rock
+ *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
+ *               2014 James Makes, https://github.com/dollaruw
+ *               2014 Diego Casorran, https://github.com/diegocr
+ *               2014 Steven Spungin, https://github.com/Flamenco
+ *               2014 Kenneth Glassey, https://github.com/Gavvers
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sublicense, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ * Contributor(s):
+ *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
+ *    kim3er, mfo, alnorth, Flamenco
+ */
+
+declare module "jspdf" {
+  export interface Annotation {
+    type: "text" | "freetext" | "link";
+    title?: string;
+    bounds: {
+      x: number;
+      y: number;
+      w: number;
+      h: number;
+    };
+    contents: string;
+    open?: boolean;
+    color?: string;
+    name?: string;
+    top?: number;
+    pageNumber?: number;
+  }
+
+  export interface TextWithLinkOptions {
+    pageNumber?: number;
+    magFactor?: "Fit" | "FitH" | "FitV" | "XYZ";
+    zoom?: number;
+  }
+
+  //jsPDF plugin:AutoPrint
+
+  export interface AutoPrintInput {
+    variant: "non-conform" | "javascript";
+  }
+
+  //jsPDF plugn: HTML
+  export interface Html2CanvasOptions {
+    /** Whether to parse and render the element asynchronously */
+    async?: boolean;
+
+    /** Whether to allow cross-origin images to taint the canvas */
+    allowTaint?: boolean;
+
+    /** Canvas background color, if none is specified in DOM. Set null for transparent */
+    backgroundColor?: string | null;
+
+    /** Existing canvas element to use as a base for drawing on */
+    canvas?: any;
+
+    /** Whether to use ForeignObject rendering if the browser supports it */
+    foreignObjectRendering?: boolean;
+
+    /** Predicate function which removes the matching elements from the render. */
+    ignoreElements?: (element: HTMLElement) => boolean;
+
+    /** Timeout for loading images, in milliseconds. Setting it to 0 will result in no timeout. */
+    imageTimeout?: number;
+
+    /** Whether to render each letter seperately. Necessary if letter-spacing is used. */
+    letterRendering?: boolean;
+
+    /** Whether to log events in the console. */
+    logging?: boolean;
+
+    /** Callback function which is called when the Document has been cloned for rendering, can be used to modify the contents that will be rendered without affecting the original source document. */
+    onclone?: { (doc: HTMLDocument): void };
+
+    /** Url to the proxy which is to be used for loading cross-origin images. If left empty, cross-origin images won't be loaded. */
+    proxy?: string;
+
+    /** Whether to cleanup the cloned DOM elements html2canvas creates temporarily */
+    removeContainer?: boolean;
+
+    /** The scale to use for rendering. Defaults to the browsers device pixel ratio. */
+    scale?: number;
+
+    /** Use svg powered rendering where available (FF11+). */
+    svgRendering?: boolean;
+
+    /** Whether to test each image if it taints the canvas before drawing them */
+    taintTest?: boolean;
+
+    /** Whether to attempt to load cross-origin images as CORS served, before reverting back to proxy. */
+    useCORS?: boolean;
+
+    /** Define the width of the canvas in pixels. If null, renders with full width of the window. */
+    width?: number;
+
+    /** Define the heigt of the canvas in pixels. If null, renders with full height of the window. */
+    height?: number;
+
+    /** Crop canvas x-coordinate */
+    x?: number;
+
+    /** Crop canvas y-coordinate */
+    y?: number;
+
+    /** The x-scroll position to used when rendering element, (for example if the Element uses position: fixed ) */
+    scrollX?: number;
+
+    /** The y-scroll position to used when rendering element, (for example if the Element uses position: fixed ) */
+    scrollY?: number;
+
+    /** Window width to use when rendering Element, which may affect things like Media queries */
+    windowWidth?: number;
+
+    /** Window height to use when rendering Element, which may affect things like Media queries */
+    windowHeight?: number;
+  }
+
+  export interface HTMLWorkerProgress extends Promise<any> {
+    val: number;
+    n: number;
+    ratio: number;
+    state: any;
+    stack: Function[];
+  }
+
+  export interface HTMLWorker extends Promise<any> {
+    from(
+      src: HTMLElement | string,
+      type: "container" | "canvas" | "img" | "pdf" | "context2d"
+    ): HTMLWorker;
+    progress: HTMLWorkerProgress;
+    error(msg: string): void;
+    save(filename: string): Promise<void>;
+    set(opt: HTMLOptions): HTMLWorker;
+    get(key: "string"): HTMLWorker;
+    get(key: "string", cbk: (value: string) => void): string;
+    doCallback(): Promise<void>;
+    outputImg(
+      type: "img" | "datauristring" | "dataurlstring" | "datauri" | "dataurl"
+    ): Promise<string>;
+    outputPdf: jsPDF["output"];
+  }
+
+  export interface HTMLOptionImage {
+    type: "jpeg" | "png" | "webp";
+    quality: number;
+  }
+
+  export interface HTMLFontFace {
+    family: string;
+    style?: "italic" | "oblique" | "normal";
+    stretch?:
+      | "ultra-condensed"
+      | "extra-condensed"
+      | "condensed"
+      | "semi-condensed"
+      | "normal"
+      | "semi-expanded"
+      | "expanded"
+      | "extra-expanded"
+      | "ultra-expanded";
+    weight?:
+      | "normal"
+      | "bold"
+      | 100
+      | 200
+      | 300
+      | 400
+      | 500
+      | 600
+      | 700
+      | 800
+      | 900
+      | "100"
+      | "200"
+      | "300"
+      | "400"
+      | "500"
+      | "600"
+      | "700"
+      | "800"
+      | "900";
+    src: Array<{
+      url: string;
+      format: "truetype";
+    }>;
+  }
+
+  export interface HTMLOptions {
+    callback?: (doc: jsPDF) => void;
+    margin?: number | number[];
+    autoPaging?: boolean | "slice" | "text";
+    filename?: string;
+    image?: HTMLOptionImage;
+    html2canvas?: Html2CanvasOptions;
+    jsPDF?: jsPDF;
+    x?: number;
+    y?: number;
+    width?: number;
+    windowWidth?: number;
+    fontFaces?: HTMLFontFace[];
+  }
+
+  //jsPDF plugin: viewerPreferences
+
+  export interface ViewerPreferencesInput {
+    HideToolbar?: boolean;
+    HideMenubar?: boolean;
+    HideWindowUI?: boolean;
+    FitWindow?: boolean;
+    CenterWindow?: boolean;
+    DisplayDocTitle?: boolean;
+    NonFullScreenPageMode?: "UseNone" | "UseOutlines" | "UseThumbs" | "UseOC";
+    Direction?: "L2R" | "R2L";
+    ViewArea?: "MediaBox" | "CropBox" | "TrimBox" | "BleedBox" | "ArtBox";
+    ViewClip?: "MediaBox" | "CropBox" | "TrimBox" | "BleedBox" | "ArtBox";
+    PrintArea?: "MediaBox" | "CropBox" | "TrimBox" | "BleedBox" | "ArtBox";
+    PrintClip?: "MediaBox" | "CropBox" | "TrimBox" | "BleedBox" | "ArtBox";
+    PrintScaling?: "AppDefault" | "None";
+    Duplex?: "Simplex" | "DuplexFlipShortEdge" | "DuplexFlipLongEdge" | "none";
+    PickTrayByPDFSize?: boolean;
+    PrintPageRange?: number[][];
+    NumCopies?: number;
+  }
+
+  //jsPDF plugin: Outline
+
+  export interface Outline {
+    add(parent: any, title: string, options: OutlineOptions): OutlineItem;
+  }
+  export interface OutlineItem {
+    title: string;
+    options: any;
+    children: any[];
+  }
+  export interface OutlineOptions {
+    pageNumber: number;
+  }
+  // jsPDF plugin: AcroForm
+  export abstract class AcroFormField {}
+  export interface AcroFormField {
+    constructor(): AcroFormField;
+    showWhenPrinted: boolean;
+    x: number;
+    y: number;
+    width: number;
+    height: number;
+    fieldName: string;
+    fontName: string;
+    fontStyle: string;
+    fontSize: number;
+    maxFontSize: number;
+    color: string;
+    defaultValue: string;
+    value: string;
+    hasAnnotation: boolean;
+    readOnly: boolean;
+    required: boolean;
+    noExport: boolean;
+    textAlign: "left" | "center" | "right";
+  }
+
+  export class AcroFormChoiceField {}
+  export interface AcroFormChoiceField extends AcroFormField {
+    topIndex: number;
+    getOptions(): string[];
+    setOptions(value: string[]): void;
+    addOption(value: string): void;
+    removeOption(value: string, allEntries: boolean): void;
+    combo: boolean;
+    edit: boolean;
+    sort: boolean;
+    multiSelect: boolean;
+    doNotSpellCheck: boolean;
+    commitOnSelChange: boolean;
+  }
+
+  export class AcroFormListBox {}
+  export interface AcroFormListBox extends AcroFormChoiceField {}
+
+  export class AcroFormComboBox {}
+  export interface AcroFormComboBox extends AcroFormListBox {}
+
+  export class AcroFormEditBox {}
+  export interface AcroFormEditBox extends AcroFormComboBox {}
+
+  export class AcroFormButton {}
+  export interface AcroFormButton extends AcroFormField {
+    noToggleToOff: boolean;
+    radio: boolean;
+    pushButton: boolean;
+    radioIsUnison: boolean;
+    caption: string;
+    appearanceState: any;
+  }
+
+  export class AcroFormPushButton {}
+  export interface AcroFormPushButton extends AcroFormButton {}
+
+  export class AcroFormChildClass {}
+  export interface AcroFormChildClass extends AcroFormField {
+    Parent: any;
+    optionName: string;
+    caption: string;
+    appearanceState: "On" | "Off";
+  }
+
+  export class AcroFormRadioButton {}
+  export interface AcroFormRadioButton extends AcroFormButton {
+    setAppearance(appearance: string): void;
+    createOption(name: string): AcroFormChildClass;
+  }
+
+  export class AcroFormCheckBox {}
+  export interface AcroFormCheckBox extends AcroFormButton {
+    appearanceState: "On" | "Off";
+  }
+
+  export class AcroFormTextField {}
+  export interface AcroFormTextField extends AcroFormField {
+    multiline: boolean;
+    fileSelect: boolean;
+    doNotSpellCheck: boolean;
+    doNotScroll: boolean;
+    comb: boolean;
+    richText: boolean;
+    maxLength: number;
+    hasAppearanceStream: boolean;
+  }
+
+  export class AcroFormPasswordField {}
+  export interface AcroFormPasswordField extends AcroFormTextField {}
+  // jsPDF plugin: Context2D
+
+  export interface Gradient {
+    addColorStop(position: number, color: string): void;
+    getColor(): string;
+  }
+
+  export interface Context2d {
+    autoPaging: boolean;
+    margin: number[];
+    fillStyle: string | Gradient;
+    filter: string;
+    font: string;
+    globalAlpha: number;
+    globalCompositeOperation: "source-over";
+    imageSmoothingEnabled: boolean;
+    imageSmoothingQuality: "low" | "high";
+    ignoreClearRect: boolean;
+    lastBreak: number;
+    lineCap: "butt" | "round" | "square";
+    lineDashOffset: number;
+    lineJoin: "bevel" | "round" | "miter";
+    lineWidth: number;
+    miterLimit: number;
+    pageBreaks: number[];
+    pageWrapXEnabled: boolean;
+    pageWrapYEnabled: boolean;
+    posX: number;
+    posY: number;
+    shadowBlur: number;
+    shadowColor: string;
+    shadowOffsetX: number;
+    shadowOffsetY: number;
+    strokeStyle: string | Gradient;
+    textAlign: "right" | "end" | "center" | "left" | "start";
+    textBaseline:
+      | "alphabetic"
+      | "bottom"
+      | "top"
+      | "hanging"
+      | "middle"
+      | "ideographic";
+    arc(
+      x: number,
+      y: number,
+      radius: number,
+      startAngle: number,
+      endAngle: number,
+      counterclockwise: boolean
+    ): void;
+    arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+    beginPath(): void;
+    bezierCurveTo(
+      cp1x: number,
+      cp1y: number,
+      cp2x: number,
+      cp2y: number,
+      x: number,
+      y: number
+    ): void;
+    clearRect(x: number, y: number, w: number, h: number): void;
+    clip(): jsPDF;
+    clipEvenOdd(): jsPDF;
+    closePath(): void;
+    createLinearGradient(
+      x0: number,
+      y0: number,
+      x1: number,
+      y1: number
+    ): Gradient;
+    createPattern(): Gradient;
+    createRadialGradient(): Gradient;
+    drawImage(
+      img: string,
+      x: number,
+      y: number,
+      width: number,
+      height: number
+    ): void;
+    drawImage(
+      img: string,
+      sx: number,
+      sy: number,
+      swidth: number,
+      sheight: number,
+      x: number,
+      y: number,
+      width: number,
+      height: number
+    ): void;
+    fill(): void;
+    fillRect(x: number, y: number, w: number, h: number): void;
+    fillText(text: string, x: number, y: number, maxWidth?: number): void;
+    lineTo(x: number, y: number): void;
+    measureText(text: string): number;
+    moveTo(x: number, y: number): void;
+    quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
+    rect(x: number, y: number, w: number, h: number): void;
+    restore(): void;
+    rotate(angle: number): void;
+    save(): void;
+    scale(scalewidth: number, scaleheight: number): void;
+    setTransform(
+      a: number,
+      b: number,
+      c: number,
+      d: number,
+      e: number,
+      f: number
+    ): void;
+    stroke(): void;
+    strokeRect(x: number, y: number, w: number, h: number): void;
+    strokeText(text: string, x: number, y: number, maxWidth?: number): void;
+    transform(
+      a: number,
+      b: number,
+      c: number,
+      d: number,
+      e: number,
+      f: number
+    ): void;
+    translate(x: number, y: number): void;
+  }
+
+  export type ImageCompression = "NONE" | "FAST" | "MEDIUM" | "SLOW";
+  export type ColorSpace =
+    | "DeviceRGB"
+    | "DeviceGray"
+    | "DeviceCMYK"
+    | "CalGray"
+    | "CalRGB"
+    | "Lab"
+    | "ICCBased"
+    | "Indexed"
+    | "Pattern"
+    | "Separation"
+    | "DeviceN";
+
+  export type ImageFormat =
+    | "RGBA"
+    | "UNKNOWN"
+    | "PNG"
+    | "TIFF"
+    | "JPG"
+    | "JPEG"
+    | "JPEG2000"
+    | "GIF87a"
+    | "GIF89a"
+    | "WEBP"
+    | "BMP";
+
+  export interface ImageOptions {
+    imageData:
+      | string
+      | HTMLImageElement
+      | HTMLCanvasElement
+      | Uint8Array
+      | RGBAData;
+    x: number;
+    y: number;
+    width: number;
+    height: number;
+    alias?: string;
+    compression?: ImageCompression;
+    rotation?: number;
+    format?: ImageFormat;
+  }
+  export interface ImageProperties {
+    alias: number;
+    width: number;
+    height: number;
+    colorSpace: ColorSpace;
+    bitsPerComponent: number;
+    filter: string;
+    decodeParameters?: string;
+    transparency?: any;
+    palette?: any;
+    sMask?: any;
+    predictor?: number;
+    index: number;
+    data: string;
+    fileType: ImageFormat;
+  }
+
+  export interface TextOptionsLight {
+    align?: "left" | "center" | "right" | "justify";
+    angle?: number | Matrix;
+    baseline?:
+      | "alphabetic"
+      | "ideographic"
+      | "bottom"
+      | "top"
+      | "middle"
+      | "hanging";
+    flags?: {
+      noBOM: boolean;
+      autoencode: boolean;
+    };
+    rotationDirection?: 0 | 1;
+    charSpace?: number;
+    horizontalScale?: number;
+    lineHeightFactor?: number;
+    maxWidth?: number;
+    renderingMode?:
+      | "fill"
+      | "stroke"
+      | "fillThenStroke"
+      | "invisible"
+      | "fillAndAddForClipping"
+      | "strokeAndAddPathForClipping"
+      | "fillThenStrokeAndAddToPathForClipping"
+      | "addToPathForClipping";
+    isInputVisual?: boolean;
+    isOutputVisual?: boolean;
+    isInputRtl?: boolean;
+    isOutputRtl?: boolean;
+    isSymmetricSwapping?: boolean;
+  }
+  export interface TextOptions extends TextOptionsLight {
+    text: string | string[];
+    x: number;
+    y: number;
+  }
+
+  export interface TableRowData {
+    row?: number;
+    data?: any[];
+  }
+
+  export interface TableCellData {
+    row?: number;
+    col?: number;
+    data?: any;
+  }
+
+  export interface TableConfig {
+    printHeaders?: boolean;
+    autoSize?: boolean;
+    margins?: number;
+    fontSize?: number;
+    padding?: number;
+    headerBackgroundColor?: string;
+    headerTextColor?: string;
+    rowStart?: (e: TableRowData, doc: jsPDF) => void;
+    cellStart?: (e: TableCellData, doc: jsPDF) => void;
+    css?: {
+      "font-size": number;
+    };
+  }
+
+  export interface CellConfig {
+    name: string;
+    prompt: string;
+    align: "left" | "center" | "right";
+    padding: number;
+    width: number;
+  }
+
+  export interface EncryptionOptions {
+    userPassword?: string;
+    ownerPassword?: string;
+    userPermissions?: ("print" | "modify" | "copy" | "annot-forms")[];
+  }
+
+  export interface jsPDFOptions {
+    orientation?: "p" | "portrait" | "l" | "landscape";
+    unit?: "pt" | "px" | "in" | "mm" | "cm" | "ex" | "em" | "pc";
+    format?: string | number[];
+    compress?: boolean;
+    precision?: number;
+    filters?: string[];
+    userUnit?: number;
+    encryption?: EncryptionOptions;
+    putOnlyUsedFonts?: boolean;
+    hotfixes?: string[];
+    floatPrecision?: number | "smart";
+  }
+
+  export interface Point {
+    x: number;
+    y: number;
+  }
+
+  export interface Rectangle extends Point {
+    w: number;
+    h: number;
+  }
+
+  export interface PageInfo {
+    objId: number;
+    pageNumber: number;
+    pageContext: any;
+  }
+
+  export interface Font {
+    id: number;
+    encoding: string;
+    fontName: string;
+    fontStyle: string;
+    isStandardFont: boolean;
+    metadata: any;
+    objectNumber: number;
+    postScriptName: string;
+  }
+
+  export interface DocumentProperties {
+    title?: string;
+    subject?: string;
+    author?: string;
+    keywords?: string;
+    creator?: string;
+  }
+
+  export interface PatternData {
+    key: string;
+    matrix?: Matrix;
+    boundingBox?: number[];
+    xStep?: number;
+    yStep?: number;
+  }
+
+  // Single dimensional array of RGBA values. For example from canvas getImageData.
+  export interface RGBAData {
+    data: Uint8ClampedArray;
+    width: number;
+    height: number;
+  }
+
+  export interface PubSub {
+    subscribe(
+      topic: string,
+      callback: (...args: any[]) => void,
+      once?: boolean
+    ): string;
+    unsubscribe(token: string): boolean;
+    publish(topic: string, ...args: any[]): void;
+    getTopics(): Record<
+      string,
+      Record<string, [(...args: any[]) => void, boolean]>
+    >;
+  }
+
+  export class jsPDF {
+    constructor(options?: jsPDFOptions);
+    constructor(
+      orientation?: "p" | "portrait" | "l" | "landscape",
+      unit?: "pt" | "px" | "in" | "mm" | "cm" | "ex" | "em" | "pc",
+      format?: string | number[],
+      compressPdf?: boolean
+    );
+
+    CapJoinStyles: any;
+    version: string;
+
+    compatAPI(body?: (pdf: jsPDF) => void): void;
+    advancedAPI(body?: (pdf: jsPDF) => void): void;
+    isAdvancedAPI(): boolean;
+
+    addFont(
+      postScriptName: string,
+      id: string,
+      fontStyle: string,
+      fontWeight?: string | number,
+      encoding?:
+        | "StandardEncoding"
+        | "MacRomanEncoding"
+        | "Identity-H"
+        | "WinAnsiEncoding",
+      isStandardFont?: boolean
+    ): string;
+    addFont(
+      url: URL,
+      id: string,
+      fontStyle: string,
+      fontWeight?: string | number,
+      encoding?:
+        | "StandardEncoding"
+        | "MacRomanEncoding"
+        | "Identity-H"
+        | "WinAnsiEncoding"
+    ): string;
+    addGState(key: string, gState: GState): jsPDF;
+    addPage(
+      format?: string | number[],
+      orientation?: "p" | "portrait" | "l" | "landscape"
+    ): jsPDF;
+    beginFormObject(
+      x: number,
+      y: number,
+      width: number,
+      height: number,
+      matrix: any
+    ): jsPDF;
+    circle(x: number, y: number, r: number, style?: string | null): jsPDF;
+    clip(rule?: "evenodd"): jsPDF;
+    discardPath(): jsPDF;
+    deletePage(targetPage: number): jsPDF;
+    doFormObject(key: any, matrix: any): jsPDF;
+    ellipse(
+      x: number,
+      y: number,
+      rx: number,
+      ry: number,
+      style?: string | null
+    ): jsPDF;
+    endFormObject(key: any): jsPDF;
+    f2(number: number): string;
+    f3(number: number): string;
+    getCharSpace(): number;
+    getCreationDate(type: string): Date;
+    getCurrentPageInfo(): PageInfo;
+    getDrawColor(): string;
+    getFileId(): string;
+    getFillColor(): string;
+    getFont(): Font;
+    getFontList(): { [key: string]: string[] };
+    getFontSize(): number;
+    getFormObject(key: any): any;
+    getLineHeight(): number;
+    getLineHeightFactor(): number;
+    getLineWidth(): number;
+    getNumberOfPages(): number;
+    getPageInfo(pageNumberOneBased: number): PageInfo;
+    getR2L(): boolean;
+    getStyle(style: string): string;
+    getTextColor(): string;
+    insertPage(beforePage: number): jsPDF;
+    line(
+      x1: number,
+      y1: number,
+      x2: number,
+      y2: number,
+      style?: string | null
+    ): jsPDF;
+    lines(
+      lines: any[],
+      x: any,
+      y: any,
+      scale?: any,
+      style?: string | null,
+      closed?: boolean
+    ): jsPDF;
+    clipEvenOdd(): jsPDF;
+    close(): jsPDF;
+    stroke(): jsPDF;
+    fill(pattern?: PatternData): jsPDF;
+    fillEvenOdd(pattern?: PatternData): jsPDF;
+    fillStroke(pattern?: PatternData): jsPDF;
+    fillStrokeEvenOdd(pattern?: PatternData): jsPDF;
+    moveTo(x: number, y: number): jsPDF;
+    lineTo(x: number, y: number): jsPDF;
+    curveTo(
+      x1: number,
+      y1: number,
+      x2: number,
+      y2: number,
+      x3: number,
+      y3: number
+    ): jsPDF;
+    movePage(targetPage: number, beforePage: number): jsPDF;
+    output(): string;
+    output(type: "arraybuffer"): ArrayBuffer;
+    output(type: "blob"): Blob;
+    output(type: "bloburi" | "bloburl"): URL;
+    output(
+      type: "datauristring" | "dataurlstring",
+      options?: { filename?: string }
+    ): string;
+    output(
+      type: "pdfobjectnewwindow" | "pdfjsnewwindow" | "dataurlnewwindow",
+      options?: { filename?: string }
+    ): Window;
+    output(
+      type: "dataurl" | "datauri",
+      options?: { filename?: string }
+    ): boolean;
+    pdfEscape(text: string, flags: any): string;
+    path(lines?: any[], style?: string): jsPDF;
+    rect(
+      x: number,
+      y: number,
+      w: number,
+      h: number,
+      style?: string | null
+    ): jsPDF;
+    restoreGraphicsState(): jsPDF;
+    roundedRect(
+      x: number,
+      y: number,
+      w: number,
+      h: number,
+      rx: number,
+      ry: number,
+      style?: string | null
+    ): jsPDF;
+    save(filename: string, options: { returnPromise: true }): Promise<void>;
+    save(filename?: string): jsPDF;
+    saveGraphicsState(): jsPDF;
+    setCharSpace(charSpace: number): jsPDF;
+    setCreationDate(date?: Date | string): jsPDF;
+    setCurrentTransformationMatrix(matrix: Matrix): jsPDF;
+    setDisplayMode(
+      zoom:
+        | undefined
+        | null
+        | number
+        | "fullheight"
+        | "fullwidth"
+        | "fullpage"
+        | "original"
+        | string,
+      layout?:
+        | undefined
+        | null
+        | "continuous"
+        | "single"
+        | "twoleft"
+        | "tworight"
+        | "two",
+      pmode?: undefined | null | "UseOutlines" | "UseThumbs" | "FullScreen"
+    ): jsPDF;
+    setDocumentProperties(properties: DocumentProperties): jsPDF;
+    setProperties(properties: DocumentProperties): jsPDF;
+    setDrawColor(ch1: string): jsPDF;
+    setDrawColor(ch1: number): jsPDF;
+    setDrawColor(ch1: number, ch2: number, ch3: number, ch4?: number): jsPDF;
+    setFileId(value: string): jsPDF;
+    setFillColor(ch1: string): jsPDF;
+    setFillColor(ch1: number, ch2: number, ch3: number, ch4?: number): jsPDF;
+    setFont(
+      fontName: string,
+      fontStyle?: string,
+      fontWeight?: string | number
+    ): jsPDF;
+    setFontSize(size: number): jsPDF;
+    setGState(gState: any): jsPDF;
+    setLineCap(style: string | number): jsPDF;
+    setLineDashPattern(dashArray: number[], dashPhase: number): jsPDF;
+    setLineHeightFactor(value: number): jsPDF;
+    setLineJoin(style: string | number): jsPDF;
+    setLineMiterLimit(length: number): jsPDF;
+    setLineWidth(width: number): jsPDF;
+    setPage(pageNumber: number): jsPDF;
+    setR2L(value: boolean): jsPDF;
+    setTextColor(ch1: string): jsPDF;
+    setTextColor(ch1: number): jsPDF;
+    setTextColor(ch1: number, ch2: number, ch3: number, ch4?: number): jsPDF;
+    text(
+      text: string | string[],
+      x: number,
+      y: number,
+      options?: TextOptionsLight,
+      transform?: number | any
+    ): jsPDF;
+    triangle(
+      x1: number,
+      y1: number,
+      x2: number,
+      y2: number,
+      x3: number,
+      y3: number,
+      style?: string | null
+    ): jsPDF;
+    getHorizontalCoordinateString(value: number): number;
+    getVerticalCoordinateString(value: number): number;
+
+    internal: {
+      events: PubSub;
+      scaleFactor: number;
+      pageSize: {
+        width: number;
+        getWidth: () => number;
+        height: number;
+        getHeight: () => number;
+      };
+      pages: number[];
+      getEncryptor(objectId: number): (data: string) => string;
+    };
+
+    /**
+     * jsPDF plugins below:
+     *
+     *  - AcroForm
+     *  - AddImage
+     *  - Annotations
+     *  - AutoPrint
+     *  - Canvas
+     *  - Cell
+     *  - Context2D
+     *  - fileloading
+     *  - html
+     *  - JavaScript
+     *  - split_text_to_size
+     *  - SVG
+     *  - total_pages
+     *  - utf8
+     *  - vfs
+     *  - xmp_metadata
+     */
+
+    // jsPDF plugin: addImage
+    addImage(
+      imageData:
+        | string
+        | HTMLImageElement
+        | HTMLCanvasElement
+        | Uint8Array
+        | RGBAData,
+      format: string,
+      x: number,
+      y: number,
+      w: number,
+      h: number,
+      alias?: string,
+      compression?: ImageCompression,
+      rotation?: number
+    ): jsPDF;
+    addImage(
+      imageData:
+        | string
+        | HTMLImageElement
+        | HTMLCanvasElement
+        | Uint8Array
+        | RGBAData,
+      x: number,
+      y: number,
+      w: number,
+      h: number,
+      alias?: string,
+      compression?: ImageCompression,
+      rotation?: number
+    ): jsPDF;
+    addImage(options: ImageOptions): jsPDF;
+    getImageProperties(
+      imageData: string | HTMLImageElement | HTMLCanvasElement | Uint8Array
+    ): ImageProperties;
+
+    // jsPDF plugin: arabic
+    processArabic(text: string): string;
+
+    // jsPDF plugin: Annotations
+    createAnnotation(options: Annotation): void;
+    link(x: number, y: number, w: number, h: number, options: any): void;
+    textWithLink(text: string, x: number, y: number, options: any): number;
+    getTextWidth(text: string): number;
+
+    // jsPDF plugin: AutoPrint
+    autoPrint(options?: AutoPrintInput): jsPDF;
+
+    // jsPDF plugin: AcroForm
+    addField(field: AcroFormField): jsPDF;
+
+    AcroForm: {
+      ChoiceField(): AcroFormChoiceField;
+      ListBox(): AcroFormListBox;
+      ComboBox(): AcroFormComboBox;
+      EditBox(): AcroFormEditBox;
+      Button(): AcroFormButton;
+      PushButton(): AcroFormPushButton;
+      RadioButton(): AcroFormRadioButton;
+      CheckBox(): AcroFormCheckBox;
+      TextField(): AcroFormTextField;
+      PasswordField(): AcroFormPasswordField;
+      Appearance(): any;
+    };
+
+    // jsPDF plugin: Canvas
+    canvas: {
+      pdf: jsPDF;
+      width: number;
+      height: number;
+      getContext(type?: string): Context2d;
+      style: any;
+    };
+
+    // jsPDF plugin: Cell
+    setHeaderFunction(
+      func: (jsPDFInstance: jsPDF, pages: number) => number[]
+    ): jsPDF;
+    getTextDimensions(
+      text: string,
+      options?: {
+        font?: string;
+        fontSize?: number;
+        maxWidth?: number;
+        scaleFactor?: number;
+      }
+    ): { w: number; h: number };
+
+    cellAddPage(): jsPDF;
+    cell(
+      x: number,
+      y: number,
+      w: number,
+      h: number,
+      txt: string,
+      ln: number,
+      align: string
+    ): jsPDF;
+    table(
+      x: number,
+      y: number,
+      data: { [key: string]: string }[],
+      headers: string[] | CellConfig[],
+      config: TableConfig
+    ): jsPDF;
+    calculateLineHeight(
+      headerNames: string[],
+      columnWidths: number[],
+      model: any[]
+    ): number;
+    setTableHeaderRow(config: CellConfig[]): void;
+    printHeaderRow(lineNumber: number, new_page?: boolean): void;
+
+    context2d: Context2d;
+
+    //jsPDF plugin: Outline
+    outline: Outline;
+    // jsPDF plugin: fileloading
+    loadFile(url: string, sync?: true): string;
+    loadFile(
+      url: string,
+      sync: false,
+      callback: (data: string) => string
+    ): void;
+
+    // jsPDF plugin: html
+    html(src: string | HTMLElement, options?: HTMLOptions): HTMLWorker;
+
+    // jsPDF plugin: JavaScript
+    addJS(javascript: string): jsPDF;
+
+    // jsPDF plugin: split_text_to_size
+    getCharWidthsArray(text: string, options?: any): any[];
+    getStringUnitWidth(text: string, options?: any): number;
+    splitTextToSize(text: string, maxlen: number, options?: any): any;
+
+    // jsPDF plugin: SVG
+    addSvgAsImage(
+      svg: string,
+      x: number,
+      y: number,
+      w: number,
+      h: number,
+      alias?: string,
+      compression?: boolean,
+      rotation?: number
+    ): jsPDF;
+    // jsPDF plugin: setlanguage
+    setLanguage(
+      langCode:
+        | "af"
+        | "sq"
+        | "ar"
+        | "ar-DZ"
+        | "ar-BH"
+        | "ar-EG"
+        | "ar-IQ"
+        | "ar-JO"
+        | "ar-KW"
+        | "ar-LB"
+        | "ar-LY"
+        | "ar-MA"
+        | "ar-OM"
+        | "ar-QA"
+        | "ar-SA"
+        | "ar-SY"
+        | "ar-TN"
+        | "ar-AE"
+        | "ar-YE"
+        | "an"
+        | "hy"
+        | "as"
+        | "ast"
+        | "az"
+        | "eu"
+        | "be"
+        | "bn"
+        | "bs"
+        | "br"
+        | "bg"
+        | "my"
+        | "ca"
+        | "ch"
+        | "ce"
+        | "zh"
+        | "zh-HK"
+        | "zh-CN"
+        | "zh-SG"
+        | "zh-TW"
+        | "cv"
+        | "co"
+        | "cr"
+        | "hr"
+        | "cs"
+        | "da"
+        | "nl"
+        | "nl-BE"
+        | "en"
+        | "en-AU"
+        | "en-BZ"
+        | "en-CA"
+        | "en-IE"
+        | "en-JM"
+        | "en-NZ"
+        | "en-PH"
+        | "en-ZA"
+        | "en-TT"
+        | "en-GB"
+        | "en-US"
+        | "en-ZW"
+        | "eo"
+        | "et"
+        | "fo"
+        | "fj"
+        | "fi"
+        | "fr"
+        | "fr-BE"
+        | "fr-CA"
+        | "fr-FR"
+        | "fr-LU"
+        | "fr-MC"
+        | "fr-CH"
+        | "fy"
+        | "fur"
+        | "gd"
+        | "gd-IE"
+        | "gl"
+        | "ka"
+        | "de"
+        | "de-AT"
+        | "de-DE"
+        | "de-LI"
+        | "de-LU"
+        | "de-CH"
+        | "el"
+        | "gu"
+        | "ht"
+        | "he"
+        | "hi"
+        | "hu"
+        | "is"
+        | "id"
+        | "iu"
+        | "ga"
+        | "it"
+        | "it-CH"
+        | "ja"
+        | "kn"
+        | "ks"
+        | "kk"
+        | "km"
+        | "ky"
+        | "tlh"
+        | "ko"
+        | "ko-KP"
+        | "ko-KR"
+        | "la"
+        | "lv"
+        | "lt"
+        | "lb"
+        | "mk"
+        | "ms"
+        | "ml"
+        | "mt"
+        | "mi"
+        | "mr"
+        | "mo"
+        | "nv"
+        | "ng"
+        | "ne"
+        | "no"
+        | "nb"
+        | "nn"
+        | "oc"
+        | "or"
+        | "om"
+        | "fa"
+        | "fa-IR"
+        | "pl"
+        | "pt"
+        | "pt-BR"
+        | "pa"
+        | "pa-IN"
+        | "pa-PK"
+        | "qu"
+        | "rm"
+        | "ro"
+        | "ro-MO"
+        | "ru"
+        | "ru-MO"
+        | "sz"
+        | "sg"
+        | "sa"
+        | "sc"
+        | "sd"
+        | "si"
+        | "sr"
+        | "sk"
+        | "sl"
+        | "so"
+        | "sb"
+        | "es"
+        | "es-AR"
+        | "es-BO"
+        | "es-CL"
+        | "es-CO"
+        | "es-CR"
+        | "es-DO"
+        | "es-EC"
+        | "es-SV"
+        | "es-GT"
+        | "es-HN"
+        | "es-MX"
+        | "es-NI"
+        | "es-PA"
+        | "es-PY"
+        | "es-PE"
+        | "es-PR"
+        | "es-ES"
+        | "es-UY"
+        | "es-VE"
+        | "sx"
+        | "sw"
+        | "sv"
+        | "sv-FI"
+        | "sv-SV"
+        | "ta"
+        | "tt"
+        | "te"
+        | "th"
+        | "tig"
+        | "ts"
+        | "tn"
+        | "tr"
+        | "tk"
+        | "uk"
+        | "hsb"
+        | "ur"
+        | "ve"
+        | "vi"
+        | "vo"
+        | "wa"
+        | "cy"
+        | "xh"
+        | "ji"
+        | "zu"
+    ): jsPDF;
+
+    // jsPDF plugin: total_pages
+    putTotalPages(pageExpression: string): jsPDF;
+
+    // jsPDF plugin: viewerpreferences
+    viewerPreferences(
+      options: ViewerPreferencesInput,
+      doReset?: boolean
+    ): jsPDF;
+    viewerPreferences(arg: "reset"): jsPDF;
+
+    // jsPDF plugin: vfs
+    existsFileInVFS(filename: string): boolean;
+    addFileToVFS(filename: string, filecontent: string): jsPDF;
+    getFileFromVFS(filename: string): string;
+
+    // jsPDF plugin: xmp_metadata
+    addMetadata(metadata: string, namespaceuri?: string): jsPDF;
+
+    Matrix(
+      a: number,
+      b: number,
+      c: number,
+      d: number,
+      e: number,
+      f: number
+    ): Matrix;
+    matrixMult(m1: Matrix, m2: Matrix): Matrix;
+    unitMatrix: Matrix;
+
+    GState(parameters: GState): GState;
+
+    ShadingPattern(
+      type: ShadingPatternType,
+      coords: number[],
+      colors: ShadingPatterStop[],
+      gState?: GState,
+      matrix?: Matrix
+    ): ShadingPattern;
+    TilingPattern(
+      boundingBox: number[],
+      xStep: number,
+      yStep: number,
+      gState?: GState,
+      matrix?: Matrix
+    ): TilingPattern;
+
+    addShadingPattern(key: string, pattern: ShadingPattern): jsPDF;
+    beginTilingPattern(pattern: TilingPattern): void;
+    endTilingPattern(key: string, pattern: TilingPattern): void;
+
+    static API: jsPDFAPI;
+    static version: string;
+  }
+
+  export class GState {
+    constructor(parameters: GState);
+  }
+
+  export interface GState {
+    opacity?: number;
+    "stroke-opacity"?: number;
+  }
+
+  export interface Matrix {
+    a: number;
+    b: number;
+    c: number;
+    d: number;
+    e: number;
+    f: number;
+
+    sx: number;
+    shy: number;
+    shx: number;
+    sy: number;
+    tx: number;
+    ty: number;
+
+    join(separator?: string): string;
+    multiply(matrix: Matrix): Matrix;
+    decompose(): {
+      scale: Matrix;
+      translate: Matrix;
+      rotate: Matrix;
+      skew: Matrix;
+    };
+    toString(): string;
+    inversed(): Matrix;
+    applyToPoint(point: Point): Point;
+    applyToRectangle(rect: Rectangle): Rectangle;
+    clone(): Matrix;
+  }
+
+  export interface Pattern {
+    gState?: GState;
+    matrix?: Matrix;
+  }
+
+  export interface ShadingPatterStop {
+    offset: number;
+    color: number[];
+  }
+
+  export type ShadingPatternType = "axial" | "radial";
+
+  export class ShadingPattern {
+    constructor(
+      type: ShadingPatternType,
+      coords: number[],
+      colors: ShadingPatterStop[],
+      gState?: GState,
+      matrix?: Matrix
+    );
+  }
+  export interface ShadingPattern extends Pattern {
+    coords: number[];
+    colors: ShadingPatterStop[];
+  }
+
+  export class TilingPattern {
+    constructor(
+      boundingBox: number[],
+      xStep: number,
+      yStep: number,
+      gState?: GState,
+      matrix?: Matrix
+    );
+  }
+
+  export interface TilingPattern extends Pattern {
+    boundingBox: number[];
+    xStep: number;
+    yStep: number;
+  }
+
+  export interface jsPDFAPI {
+    events: any[];
+  }
+
+  export default jsPDF;
+}
